diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000000..7f909e5306 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,11 @@ +# Usefull with: +# +# cat < ~/.local/bin/podiff +# #!/bin/sh +# grep -v '^#:' "$1" +# EOF +# chmod a+x ~/.local/bin/podiff +# git config diff.podiff.textconv podiff + +*.po diff=podiff +*.pot diff=podiff diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000000..501166396f --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1 @@ +liberapay: python-docs-fr diff --git a/.github/ISSUE_TEMPLATE/r-servation.md b/.github/ISSUE_TEMPLATE/r-servation.md new file mode 100644 index 0000000000..6a3f74edb8 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/r-servation.md @@ -0,0 +1,12 @@ +--- +name: Réservation +about: Juste réserver un fichier po (je veux être le seul à travailler dessus). +title: Je travaille sur DOSSIER/FICHIER.po +labels: reservation +assignees: '' + +--- + + diff --git a/.github/problem-matchers/pospell.json b/.github/problem-matchers/pospell.json new file mode 100644 index 0000000000..cedddb008a --- /dev/null +++ b/.github/problem-matchers/pospell.json @@ -0,0 +1,15 @@ +{ + "problemMatcher": [ + { + "owner": "pospell", + "pattern": [ + { + "regexp": "^(.*):(\\d+):(.*)$", + "file": 1, + "line": 2, + "message": 3 + } + ] + } + ] +} diff --git a/.github/stale.yml b/.github/stale.yml new file mode 100644 index 0000000000..c005b30158 --- /dev/null +++ b/.github/stale.yml @@ -0,0 +1,26 @@ +# Number of days of inactivity before an issue becomes stale +daysUntilStale: 60 +# Number of days of inactivity before a stale issue is closed +daysUntilClose: 14 +# Issues with these labels will never be considered stale +exemptLabels: + - meta + - on hold + - EASY +# Label to use when marking an issue as stale +staleLabel: stale +# Comment to post when marking an issue as stale. Set to `false` to disable +markComment: > + Cette issue/pull request a été automatiquement marquée comme innactive car elle n'a pas eu d'activité récente. + Elle sera fermée si il ne se passe rien dans les 14 jours qui viennent. Merci pour votre contribution + + This issue/pull request has been automatically marked as stale because it has not had + recent activity. It will be closed if no further activity occurs. Thank you + for your contributions. +# Comment to post when closing a stale issue. Set to `false` to disable +closeComment: true + +# Comment to post when removing the stale label. +unmarkComment: > + Cette issue n'est plus innactive ! + This issue isn't stale anymore! diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000000..ec71c0146f --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,101 @@ +--- + +name: Tests + +on: + push: + branches: + - '*.*' + pull_request: + branches: + - '*.*' + +jobs: + checks: + strategy: + matrix: + tool: + - name: sphinx-lint + package: sphinx-lint + command: 'sphinx-lint --enable default-role --ignore .git' + - name: Orthographe + package: pospell + apt_dependencies: hunspell hunspell-fr-comprehensive + command: 'pospell -p dict -l fr_FR $CHANGED_PO_FILES' + - name: Longueur des lignes + command: 'awk ''{if (length($0) > 80 && length(gensub(/[^ ]/, "", "g")) > 1) {print FILENAME ":" FNR, "line too long:", $0; ERRORS+=1}} END {if (ERRORS>0) {exit 1}}'' $CHANGED_PO_FILES' + - name: Grammaire + package: padpo + command: 'padpo -i $CHANGED_PO_FILES 2>&1 | grep -v -Ff padpo.ignore' + + name: ${{ matrix.tool.name }} (${{ matrix.tool.package }}) + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Register problem matchers + run: echo "::add-matcher::.github/problem-matchers/pospell.json" + - uses: lots0logs/gh-action-get-changed-files@2.1.4 + id: changed_files + with: + token: ${{ secrets.GITHUB_TOKEN }} + - uses: actions/setup-python@v2 + with: + python-version: '3.9' + - name: Install ${{ matrix.tool.package }} + run: | + if [ -n "${{ matrix.tool.apt_dependencies }}" ]; then + sudo apt-get update && sudo apt-get install -y ${{ matrix.tool.apt_dependencies }} + fi + if [ -n "${{ matrix.tool.package }}" ]; then + python -m pip install --upgrade pip setuptools wheel + python -m pip install ${{ matrix.tool.package }} + fi + - name: Run ${{ matrix.tool.package }} + env: + ADDED_FILES: ${{ join(fromJSON(steps.changed_files.outputs.added), ' ') }} + MODIFIED_FILES: ${{ join(fromJSON(steps.changed_files.outputs.modified), ' ') }} + run: | + CHANGED_PO_FILES=$(printf "%s %s\n" "$ADDED_FILES" "$MODIFIED_FILES" | tr ' ' '\n' | grep '.po$'; true) + if [ -n "$CHANGED_PO_FILES" ] + then + echo "Running on:" $CHANGED_PO_FILES + ${{ matrix.tool.command }} + else + echo "No changed po files, nothing to check." + fi + + sphinx: + name: 'Génération de la doc (sphinx)' + runs-on: ubuntu-latest + timeout-minutes: 30 + steps: + - uses: actions/checkout@v3 + - uses: actions/cache@v3 + with: + path: '~/cpython/' + key: '1' + - uses: actions/cache@v3 + with: + path: ~/.cache/pip + key: '1' + - uses: actions/setup-python@v4 + with: + python-version: '3.10' + - name: Clone cpython + run: | + if [ ! -d ~/cpython ]; then + git clone https://github.com/python/cpython ~/cpython/ + else + git -C ~/cpython fetch + fi + - name: Prepare build hierarchy + run: | + mkdir -p ~/locales/fr/LC_MESSAGES/ + cp -uv --parents *.po */*.po ~/locales/fr/LC_MESSAGES/ + git -C ~/cpython checkout $(grep ^CPYTHON_CURRENT_COMMIT Makefile| cut -d= -f2) + - name: Prepare venv + run: | + make -C $HOME/cpython/Doc clean-venv + make -C $HOME/cpython/Doc venv + - name: sphinx-build + run: make -C $HOME/cpython/Doc SPHINXOPTS="-q -j4 -D locale_dirs=$HOME/locales -D language=fr -D gettext_compact=0" autobuild-dev-html diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000..6d4d663da4 --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ +*.mo +.tx/**/*.po +venv/ +.idea/ +.DS_Store +.pospell/ +.potodo/ +locales/ +.venv/ diff --git a/.potodoignore b/.potodoignore new file mode 100644 index 0000000000..734b522417 --- /dev/null +++ b/.potodoignore @@ -0,0 +1,2 @@ +venv/ +locales/ diff --git a/CONTRIBUTING-CORE.rst b/CONTRIBUTING-CORE.rst new file mode 100644 index 0000000000..9701a87ee4 --- /dev/null +++ b/CONTRIBUTING-CORE.rst @@ -0,0 +1,61 @@ +Maintenance +----------- + +Dans certains cas on a besoin de propager des traductions d'une branche +à l'autre : + +- d'une ancienne branche vers une nouvelle branche : lors du passage + d'une version à l'autre de CPython, lorsque quelqu'un a une PR sur une + ancienne version (*forward porting*) ; +- d'une nouvelle branche vers des anciennes branches : pour propager + de temps en temps le travail sur d'anciennes versions (rétroportage + ou *backporting*). + +Pour forward-porter un ou plusieurs commits, il vaut mieux utiliser ``git +cherry-pick -x LE_SHA``, ça garde l'auteur, le sha1 d'origine, et +toutes les modifications. + +Pour rétroporter « en gros » on utilise ``pomerge``\ : on le fait lire +sur une branche, puis écrire sur une autre, par exemple pour copier de +la 3.8 à la 3.7 : + +.. code-block:: bash + + git fetch + git checkout 3.8 + git reset --hard upstream/3.8 + pomerge --from-files *.po */*.po + git checkout --branch back-porting upstream/3.7 + pomerge --no-overwrite --to-files *.po */*.po + powrap --modified + git add --patch + git commit --message="Backporting from 3.8" + git push --set-upstream origin HEAD + + +Notes : + +- j'utilise ``git fetch`` au début pour avoir *upstream/3.7* et + *upstream/3.8* à jour localement, ainsi je peux travailler sans + toucher au réseau jusqu'au ``git push``, mais chacun fait comme il + veut ; +- j'utilise ``*.po */*.po`` et pas ``**/*.po``, car si vous avez un + *venv* dans l'arborescence il va vous trouver des traductions de Sphinx + et peut-être d'autres paquets dans ``.venv/lib/python*/`` (et mettre + beaucoup plus de temps) ; +- j'utilise ``pomerge --no-overwrite``, ça indique à ``pomerge`` de + n'écrire que si le ``msgstr`` est vide, donc de ne pas modifier + l'existant, ainsi il est impossible de casser quelque chose. + On peut le tenter sans ``--no-overwrite``, attention, ça fait + des bêtises, ça nécessite une relecture attentive : + certaines traductions, comme *example:* sont en parfois traduites en + français avec une majuscule, et parfois non, en + fonction du contexte, ``pomerge`` uniformiserait ça, ce n'est pas bien ; +- attention, si vous testez sans ``--no-overwrite``, il est peut-être + bon de vider la mémoire de ``pomerge`` avant la lecture, pour éviter + de lui faire écrire des choses lues lors des sessions précédentes, + via un ``rm -f ~/.pomerge.json``\ ; +- j'utilise ``git add --patch`` (ou ``-p``) car j'aime bien relire quand même, + en général, je n'ajoute pas les différences d'ordre dans les entêtes, + mais un ``git add --update`` irait très bien ; +- attention au fichier *dict* auquel il peut manquer des lignes. diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst new file mode 100644 index 0000000000..03363622b8 --- /dev/null +++ b/CONTRIBUTING.rst @@ -0,0 +1,843 @@ +Guide de contribution à la documentation via GitHub +################################################### + +Prérequis +========= + +Outils souhaitables +------------------- + +Pour pouvoir participer à la traduction en commun, il est souhaitable +d'installer : + +- un client ``git`` `Linux `_, `MacOS + `_ ou `Windows `_ ; + +- un éditeur de fichier ``.po`` (comme `Poedit `_). + + +Outils facultatifs +------------------ +De plus, il peut être utile de s'équiper d'utilitaires pour faciliter +la manipulation des fichiers ``.po`` et la traduction. + +`Poutils `_ est un paquet PyPI qui +regroupe un certain nombre d'outils liés à la traduction. Dans un +environnement disposant de Python 3.7 ou plus, installez-le avec :: + + python3 -m pip install poutils + +Dans notre cas, les utilitaires de *Poutils* qui nous intéressent sont : + +Pospell +^^^^^^^ + +Vérificateur d'orthographe fondé sur Hunspell. ``make spell`` exécute +Pospell. Pour l'utiliser, il vous faut installer Hunspell. Attention, +dans Debian notamment (et ses dérivés comme Ubuntu), il existe plusieurs +dictionnaires français qui diffèrent en raison de l'orthographe +réformée. Installez celui qui contient les deux orthographes avec :: + + sudo apt install hunspell hunspell-fr-comprehensive + +Potodo +^^^^^^ + +Permet d'identifier les parties de la documentation qu'il reste à +traduire. ``make todo`` fait appel à Potodo. + +Pogrep +^^^^^^ + +Permet de rechercher dans la documentation des termes. Utile si on a un doute +sur comment traduire un terme ou chercher la traduction d'un terme dans +d'autres fichiers. Pour connaître les options disponibles, tapez :: + + pogrep --help + +Powrap +^^^^^^ + +Formateur de fichier *.po*. C'est l'outil qui se cache derrière ``make +wrap``. + +Padpo (beta) +^^^^^^^^^^^^ + +Analyseur de code qui encapsule notamment `Grammalecte +`_ et qui vérifie la grammaire, l'orthographe +et la syntaxe des fichiers *.po*. + +Configuration des outils +------------------------ + +Configuration de Poedit +^^^^^^^^^^^^^^^^^^^^^^^ +* N'oubliez pas de configurer votre nom et + votre adresse de courriel (Édition → Préférences → Général). +* Vérifiez également qu'il est configuré pour passer à la ligne à 79 + caractères (Édition → Préférences → Avancé → Passer à la ligne à + 79). + +Configuration de Git (rendre plus lisible l'affichage des modifications) +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Le résultat de ``git diff`` est souvent encombré de changements inutiles de numéros +de ligne, comme : + +.. code-block:: diff + + -#: ../Doc/library/sys.rst:406 + +#: ../Doc/library/sys.rst:408 + + +Pour dire à Git que ce ne sont pas des informations utiles, vous pouvez faire +ce qui suit après vous être assuré que ``~/.local/bin/`` se trouve dans votre +``PATH``. + +.. code-block:: bash + + cat < ~/.local/bin/podiff + #!/bin/sh + grep -v '^#:' "\$1" + EOF + + chmod a+x ~/.local/bin/podiff + + git config diff.podiff.textconv podiff + + +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. + +Première étape : créer et peupler son dépôt +=========================================== + +Sur Github +---------- + +Depuis votre compte GitHub, se rendre dans le dépôt des sources `python-docs-fr +`_ puis cliquer sur son bouton ``Fork``. +Ceci crée une copie du projet sur votre compte Github. C'est sur cette copie +que vous avez le droit de faire des modifications. + +Étape par étape : + +.. code-block:: bash + + # Clonez votre fork Github avec `git` en utilisant ssh + git clone git@github.com:VOTRE_NOM_DE_COMPTE_GITHUB/python-docs-fr.git + + # ou bien avec HTTPS + git clone https://github.com/VOTRE_NOM_DE_COMPTE_GITHUB/python-docs-fr.git + + # Allez dans le répertoire cloné + cd python-docs-fr/ + + # Ajoutez le dépôt officiel (nommé upstream), + # ceci permet à *git* de savoir quoi et où est *upstream* + git remote add upstream https://github.com/python/python-docs-fr.git + + +Sur une autre forge +------------------- + +Si vous n'avez pas de compte Github, il est possible d'utiliser une autre forge. +Vous devez dans un premier temps initier un dépôt vide sur la forge où vous voulez héberger le +dépôt puis le peupler. + +Étape par étape : + +.. code-block:: bash + + # Clonez en HTTPS le dépôt + git clone https://github.com/python/python-docs-fr + + # Allez dans le répertoire cloné + cd python-docs-fr/ + + # Renommez *origin* en *upstream* pour avoir une référence vers le dépôt officiel + # Il permettra de récupérer les nouveaux commits + git remote rename origin upstream + + # Rajoutez le *remote* de votre forge (en HTTPS ou SSH) + git remote add origin + + # Envoyez le dépôt sur votre forge et définir par défaut + git push -u origin + + +Deuxième étape : choisir et réserver le fichier sur lequel travailler +===================================================================== + +Note liminaire +-------------- + +Il est vivement conseillé de ne pas travailler sur fichiers des +répertoires *c-api/*, *whatsnew/*, *distutils/* et *install/* : + +- *c-api/* car c'est une partie très technique ; + +- *whatsnew/* car les anciennes versions de Python sont pour la plupart + obsolètes et leurs journaux de modifications ne sont pas les pages les plus + consultées ; + +- *distutils/*, *install/*, et quelques autres parties qui seront bientôt + obsolètes. De manière générale, il n'est pas utile de traduire un module que + sa documentation mentionne comme obsolète. + +Trouver un fichier sur lequel travailler +---------------------------------------- + +Pour vous aiguiller dans votre choix, vous pouvez utiliser ``potodo``, +un outil recherchant des fichiers ``.po`` à traduire. Une fois +installé, utilisez la commande ``make todo`` dans votre clone local. + +La liste renvoyée contient tous les fichiers qui ne sont pas encore complètement +traduits. Vous pouvez choisir n'importe quel fichier non réservé dans la liste +renvoyée (notez que ceux mentionnés plus haut sont automatiquement exclus). + +Vous pouvez commencer par des tâches faciles comme réviser les entrées +*fuzzy* pour aider à garder la documentation à jour (trouvez-les à l'aide +de ``make fuzzy``). Une entrée *fuzzy* correspond à une entrée déjà traduite +mais dont la source en anglais a été modifiée depuis (correction orthographique, +changement d'un terme, ajout ou suppression d'une phrase…). Elles sont +généralement plus « faciles » à traduire. + +Vous pouvez également relire des entrées déjà traduites pour vous faire une +idée, et passer ensuite à la traduction de celles qui ne le sont pas encore. + +Nous vous conseillons de choisir, si possible, un fichier traitant +d'un sujet que vous maîtrisez, cela vous aidera grandement à produire +une traduction de bonne qualité. + +Si c'est votre première contribution, commencez par une toute petite +traduction, de quelques paragraphes maximum, pour vous familiariser. Il n'est +pas nécessaire de terminer un fichier lorsqu'on le commence, vous +pouvez donc prendre n'importe quel fichier, mais ne traduire que +quelques paragraphes. + +Réserver le fichier +------------------- + +*Chaque fois que vous commencez un nouveau fichier, suivez cette procédure.* + +Une fois que vous avez choisi un fichier sur lequel travailler vous pouvez nous +le signaler par différents moyens : + +* Soit en ouvrant un `ticket sur Github `_ + en indiquant dans le titre ``Je travaille sur DOSSIER/FICHIER.po`` + (par exemple « Je travaille sur library/sys.po »). + +Ceci permet à `potodo`_ de détecter via l'API Github les fichiers ``.po`` réservés +dans les tickets et les *pull requests*. + +* Soit en créant un sujet sur le + `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 + `irc://irc.libera.chat/#python-docs-fr `_ + pour nous le signaler. + + +Création de la branche de traduction +------------------------------------ + +*Chaque fois que vous commencez un nouveau fichier, suivez cette procédure.* + +Vous êtes maintenant prêt. Pour travailler, nous avons besoin d'une +branche, basée sur une version à jour (fraîchement récupérée) de la +branche « upstream/3.10 ». On met donc à jour notre version locale. + +.. code-block:: bash + + git fetch upstream + + +On crée ensuite la branche, en la basant sur « upstream/3.10 », fraîchement récupérée. +Il est pratique de nommer cette branche en fonction du +fichier sur lequel on travaille. Par exemple, si vous travaillez sur +« library/sys.po », vous pouvez nommer votre branche « library-sys ». + +.. code-block:: bash + + git checkout -b library-sys upstream/3.10 + + + +Troisième étape: Traduction +=========================== + +Avec Poedit +--------------- +Ici, remplacez « library/sys.po » par le fichier que vous avez choisi précédemment. + +.. code-block:: bash + + poedit library/sys.po + + +Ou lancez simplement Poedit puis « Fichier » → « Ouvrir ». + + +Vérifications après traduction +------------------------------ + +Après avoir modifié les fichiers, vérifiez que vous respectez les +`conventions`_ du projet. Pour vous y aider, la commande : + +.. code-block:: bash + + make verifs + +vérifie la longueur des lignes et l'orthographe (mais pas la +grammaire, pour cela utilisez `padpo (beta)`_). En cas de doute, un +`glossaire`_ répertorie déjà les traductions retenues pour certains +termes techniques ou faux amis en anglais. + +Si ``make verifs`` trouve des problèmes de longueurs de ligne, +vérifiez votre configuration ``poedit`` (Édition → Préférences → +Avancé → Passer à la ligne à 79) ou utilisez ``make wrap``. + +Une fois la traduction finie, il faut compiler la documentation, +c'est-à-dire générer les fichiers HTML affichés par le site, pour les +relire. Si la commande précédente s'est exécutée sans erreur, la +compilation ne devrait pas échouer. + +.. code-block:: bash + + make + + +Vérifiez alors le rendu de la traduction « en vrai ». Lancez un serveur de +documentation local : + +.. code-block:: bash + + make serve + + +La documentation est publiée à l'adresse ``_. + +Attention: le port TCP/8000 ne peut être changé, il convient d'arrêter +tout service qui écouterait sur celui-ci. + +Vous pouvez recommencer les étapes de cette section autant de fois que +nécessaire. + +Poedit donne beaucoup d'avertissements, par exemple pour vous informer que +« la traduction devrait commencer par une majuscule » car c'est le cas pour +la source. Ces avertissements ne sont pas tous fondés. En cas de doute, +*affichez et relisez la page HTML produite* avec ``make serve``. + +Quatrième étape : publier sa traduction +======================================= + +Une fois que le *make verifs* ne lève pas d'erreur et que vous êtes certains de bien respecter les +`Conventions`_ de traduction, vient le moment d'envoyer votre travail sur le dépôt local. + +* ``git add`` place nos modifications dans l'index de Git en attendant + d'être propagées dans le dépôt local. + +.. code-block:: bash + + git add library/sys.po + + +* ``git commit`` permet de les propager : + +.. code-block:: bash + + git commit --message "Traduction de library/sys.po" # Ou un autre message plus inspiré :) + + + +Poussez ensuite vos modifications sur votre *fork* avec ``git push``. +Le ``-u`` n'est utile qu'une fois pour que votre client git se souvienne que cette +branche est liée à votre *fork* (et donc que vos futurs ``git pull`` et +``git push`` sachent quoi tirer). + +.. code-block:: bash + + git push --set-upstream origin + +Sur Github +---------- + +La commande précédente vous affiche un lien pour ouvrir une *pull request* sur +Github. Si vous l'avez manqué, allez simplement sur https://github.com/python/python-docs-fr/pulls +et un joli bouton « Compare & pull request » devrait apparaître au bout de +quelques secondes vous indiquant que vous pouvez demander une *pull request*. + +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 +------------------- + +Quand vous avez poussé vos modifications, il y a plusieurs possibilités. + +Soit vous signalez via le `discuss de l'AFPy `_ ou sur IRC que +vous avez traduit une section. Nous viendrons récupérer les modifications pour les intégrer +sur Github. + +Soit en créant un *`bundle `_* Git, +pour cela, il faut créer un fichier contenant les différentes modifications effectuées. + +.. code-block:: bash + + git bundle create .bundle .. + +Puis nous partager ce *bundle* sur le `discuss de l'AFPy `_ pour pouvoir l'intégrer. + + +À partir de là, quelqu'un passera en revue vos modifications, et vous fera des +suggestions et corrections. Pour les prendre en compte, retournez sur votre branche +contenant le fichier concerné (au cas où vous auriez commencé quelque chose d'autre +sur une autre branche) : + +.. code-block:: bash + + git checkout library-sys + git pull # pour rapatrier les modifications que vous auriez acceptées + # sur l'interface web. + + # Réglez les problèmes, puis commitez à nouveau : + git commit --all --message "prise en compte des remarques" + git push + + +Vous avez peut-être remarqué que cela ressemble à un triangle, avec un +segment manquant : + +- vous récupérez depuis *upstream* (le dépôt commun public sur Github) ; +- vous poussez sur *origin* (votre clone sur Github). + +C'est le travail de quelqu'un d'autre d'ajouter le dernier segment, +de votre *origin* au *upstream* public, pour « boucler la boucle ». C'est le +rôle des personnes qui *fusionnent* les *pull requests* après les avoir relues. + +Vous avez peut-être aussi remarqué que vous n'avez jamais commité sur une +branche de version (3.9, 3.10, etc.), seulement récupéré les +modifications à partir d'elles. + +Toutes les traductions sont faites sur la dernière version. +Nous ne traduisons jamais sur une version plus ancienne. Par exemple, +si la dernière version de python est Python 3.10, nous ne voulons pas +traduire directement sur la version Python 3.6. +Si nécessaire, les traductions seraient rétroportées sur les versions +les plus anciennes par l'`équipe de documentation +`_. + + + + +Conventions +=========== + +Certaines conventions ont été édictées pour homogénéiser la traduction. +Il faut suivre les règles de `style`_ imposées, les `règles rst`_ et +les traductions déjà définies dans le `glossaire`_. + + +Style +----- + +Une bonne traduction est une traduction qui transcrit fidèlement l'idée originelle +en français, sans rien ajouter ni enlever au fond, tout en restant claire, concise et +agréable à lire. Les traductions mot-à-mot sont à proscrire et il est permis — même +conseillé — d'intervertir des propositions ou de réarranger des phrases de la +documentation anglaise, si le rythme l'exige. Il faut aussi chercher des +équivalents français aux termes techniques et aux idiotismes rencontrés, et prendre +garde aux anglicismes. + +Utilisation du futur +^^^^^^^^^^^^^^^^^^^^ + +Dans la description du comportement de Python (au sens large, c'est-à-dire +l'interpréteur lui-même mais aussi toutes les bibliothèques), la version +originale utilise souvent le futur : « if you do this, it will produce +that… ». En français, l'utilisation du présent convient tout à fait et le +présent est souvent plus facile à lire : « si vous faites ceci, il se +produit cela… ». On ne conserve le futur que si la seconde proposition +se situe réellement dans le futur (par exemple, on peut penser qu'un +processus de compilation n'est pas immédiat) ou pour des raisons de +concordance des temps. + +Utilisation du conditionnel +^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +La version originale est très polie envers le lecteur ; elle lui intime +rarement des obligations, préférant employer « you should ». Cependant, en +français, il est d'usage d'être plus direct pour être correctement compris : +« vous devez ». *Vous devriez* est en effet généralement compris comme quelque +chose dont on peut de temps en temps se passer, alors que c'est très +rarement le cas pour les « you should » de cette documentation. +De la même manière, « can » est souvent mieux traduit sans introduire de notion +de possibilité, en particulier quand la phrase est à la voix passive ; la +phrase « these objects can be accessed by… » se traduit mieux par « on accède à +ces objets en… ». + +Utilisation du masculin +^^^^^^^^^^^^^^^^^^^^^^^ + +Dans un souci de lisibilité et en accord avec la préconisation de +l'Académie française, nous utilisons le masculin pour indiquer un +genre neutre. Par exemple : l'utilisateur ou le lecteur. + +Règles rst +---------- + +Prototypes et exemples +^^^^^^^^^^^^^^^^^^^^^^ + +Il ne faut pas traduire le nom des éléments de la bibliothèque standard (noms +de fonctions, paramètres de ces fonctions, constantes, etc.) mais les laisser +tels quel, entourés d'astérisques dans les blocs de texte. +Si la documentation contient des exemples, vous *pouvez* traduire les noms +utilisés, en prenant garde d'être cohérent. Vous pouvez ainsi traduire : + +.. code-block:: python + + def sample_function(): + result = thread.join(timeout=...) + ... + + +en + +.. code-block:: python + + def fonction_exemple(): + resultat = thread.join(timeout=...) + ... + + +mais pas en + +.. code-block:: python + + def fonction_exemple(): + resultat = fildexécution.attendre(délai=...) + ... + + +Liens hypertextes +^^^^^^^^^^^^^^^^^ + +Il faut transformer les liens hypertextes qui redirigent vers une page dont il +existe une version française (c'est notamment très souvent le cas pour les +articles de Wikipédia). Modifiez le lien *et* sa description dans ce cas. +Si aucune traduction de la cible n'existe, ne traduisez pas la description. +Par exemple, ```Conway's Game of Life `_`` +doit devenir ```Jeu de la vie `_``. + + +Balises +^^^^^^^ + +Ne traduisez pas le contenu des balises comme ``:ref:...`` ou ``:class:...``. +Vous devez cependant traduire les balises ``:term:...``, qui font référence à +une primitive ou un concept défini dans le `glossaire Python `_. +La syntaxe est ``:term:nom_français``. Par exemple, traduisez +``:term:`dictionary``` en ``:term:`dictionnaire ```. + +Comme le glossaire est déjà traduit, il y a forcément une correspondance à chaque +terme que vous pouvez rencontrer. + + +Glossaire +========= + +Afin d'assurer la cohérence de la traduction, voici quelques +termes fréquents déjà traduits. Une liste blanche de noms propres, comme « Guido », +« C99 » ou de certains anglicismes comme « sérialisable » ou « implémentation», +est stockée dans le fichier *dict* à la racine du projet. Vous pouvez +y ajouter une entrée si cela est nécessaire. +Si vous devez *absolument* utiliser un mot anglais, mettez-le en italique +(entouré par des astérisques). + +Pour trouver facilement comment un terme est déjà traduit dans la +documentation, vous pouvez utiliser `pogrep`_. + +========================== =============================================== +Terme Traduction +========================== =============================================== +-like -compatible +abstract data type type abstrait +argument argument (à ne pas confondre avec *paramètre*) +backslash antislash, *backslash* +backtrace trace d'appels, trace de pile +backport rétroporter +bound lier +bug bogue +built-in natif +bytecode code intermédiaire +callback fonction de rappel +call stack pile d'appels +caught (exception) interceptée +daemon *daemon* +debugging débogage +deep copy copie récursive (préféré), ou copie profonde +double quote guillemet +deprecated obsolète +e.g. p. ex. (on n'utilise pas l'anglicisme « e.g. », + lui-même issu du latin *exempli gratia*). + On sépare les deux mots par une espace + insécable pour éviter les retours à la ligne + malheureux. +et al. et autres, `à accorder + `_ + suivant le contexte +export exportation +expression expression +framework cadriciel +frozen package or set paquet ou ensemble figé +garbage collector ramasse-miettes +getter accesseur +i.e. c.-à-d. (on n'utilise pas l'anglicisme « i.e. », + lui-même issu du latin *id est*) +identifier identifiant +immutable immuable +import importation +index indice (en particulier quand on parle de chaînes + de caractères) +installer installateur +interpreter interpréteur +keyword mot clé +keyword argument argument nommé +library bibliothèque +list comprehension liste en compréhension (liste en intension est + valide, mais nous ne l'utilisons pas) +little-endian, big-endian `petit-boutiste, gros-boutiste + `_ +mixin type type de mélange +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 +regular expression expression rationnelle, expression régulière +return renvoie, donne (on évite « retourne » qui + pourrait porter à confusion) +roughly approximativement, à peu près (on ne traduit pas + « roughly equivalent » par « sensiblement équivalent ») +setter mutateur +simple quote guillemet simple +socket connecteur ou interface de connexion +sort trier (préféré), ordonner, classer +specify définir, préciser (plutôt que « spécifier ») +statement instruction +subprocess sous-processus +support prendre en charge, implémenter (« supporter » + n'a pas le même sens en français) +token (parsing) lexème +thread fil d'exécution +traceback trace d'appels, trace de pile +tuple *n*-uplet (avec *n* en italique), on peut + traduire *2-tuple* par « paire » ou « couple », + *3-tuple* par « triplet », *4-tuple* par + « quadruplet » etc. +typically normalement, habituellement, comme d'habitude + (plutôt que « typiquement ») +underscore tiret bas, *underscore*, sous-tiret +whitespace caractère d'espacement +========================== =============================================== + +Ressources de traduction +======================== + +- 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 ; +- les listes de diffusion relatives à la documentation (courriel) : + + - `de l'AFPy `_, + - `de CPython `_ ; +- des glossaires et dictionnaires : + + - le `glossaire de la documentation Python `_, car il est déjà traduit, + - les `glossaires et dictionnaires de traduc.org `_, en particulier le `grand dictionnaire terminologique `_ de l'Office québécois de la langue française, + - Wikipédia. En consultant un article sur la version anglaise, puis en basculant sur la version française pour voir comment le sujet de l'article est traduit ; +- le `guide stylistique pour le français de localisation des produits Sun + `_ donne + beaucoup de conseils pour éviter une traduction trop mot à mot ; +- `Petites leçons de typographie `_, + résumé succinct de typographie, utile pour apprendre le bon usage des + majuscules, des espaces, etc. + +L'utilisation de traducteurs automatiques comme `DeepL `_ ou semi-automatiques comme +`reverso `_ est proscrite. +Les traductions générées sont très souvent à retravailler, ils ignorent les règles énoncées sur cette +page et génèrent une documentation au style très « lourd ». + + +Caractères spéciaux et typographie +================================== + +La touche de composition +------------------------ + +Cette `touche `_, +absente par défaut des claviers, permet de saisir des +caractères spéciaux en combinant les caractères déjà présents sur le +clavier. C'est à l'utilisateur de définir la touche de composition. + +Avec une touche de composition, vous pouvez utiliser les +compositions suivantes : + +- :kbd:`Compose < <` donne ``«`` +- :kbd:`Compose > >` donne ``»`` +- :kbd:`Compose SPACE SPACE` donne une espace insécable +- :kbd:`Compose . . .` donne ``…`` + +Comme vous l'avez noté, presque toutes les compositions sont intuitives, +vous pouvez donc en essayer d'autres et elles devraient tout +simplement fonctionner : + +- :kbd:`Compose C =` donne ``€`` +- :kbd:`Compose 1 2` donne ``½`` +- :kbd:`Compose ' E` donne ``É`` +- etc. + +Comment définir la touche de composition ? +------------------------------------------ + +Cela dépend de votre système d'exploitation et de votre clavier. + +⇒ Sous Linux, Unix et \*BSD (tel OpenBSD), vous pouvez la configurer à l'aide de +l'outil graphique de configuration de votre clavier ou avec +``dpkg-reconfigure keyboard-configuration`` +(pour `Ubuntu `_ ou Debian +et distributions assimilées). + +À tout le moins, vous pouvez configurer votre fichier *~/.Xmodmap* pour +ajouter l'équivalent de : + +.. code-block:: shell + + # key Compose + keycode 115 = Multi_key + + +Utilisez ``xev`` pour connaître la bonne correspondance de la touche que vous +voulez assigner ! + +Ensuite, dans votre fichier *~/.xsession*, ajoutez : + +.. code-block:: shell + + # Gestion des touches clavier + xmodmap $HOME/.Xmodmap + + +⇒ Sous X, avec un bureau graphique, tel que Gnome, ou Xfce, il faut aller +modifier dans les « Paramètres » → « Clavier » → « Disposition » → +« Touche composée ». Pour finir, redémarrez votre session. + +⇒ Sous Windows, vous +pouvez utiliser `wincompose `_. + +Le cas de « --- », « -- », « ... » +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +La version anglaise utilise les +`smartquotes `_, +qui fonctionnent en anglais, mais causent des problèmes dans d'autres langues. +Nous les avons donc désactivées (voir #303) dans la version française. + +Les *smartquotes* sont normalement responsables de la transformation de +``--`` en *en-dash* (``—``), de ``---`` en *em-dash* (``—``), et de +``...`` en *ellipses* ``…``. + +⇒ Si vous voyez : +| « -- » ou « --- » : faites :kbd:`Compose - - -` +| « ... » : faites :kbd:`Compose . . .` + +Le cas de « "…" » +^^^^^^^^^^^^^^^^^ + +Les guillemets français ``«`` et ``»`` ne sont pas identiques aux +guillemets anglais ``"``. Cependant, Python utilise les guillemets +anglais comme délimiteurs de chaîne de caractères. Il convient donc de +traduire les guillemets mais pas les délimiteurs de chaîne. + +⇒ Si vous voyez : +| « "…" » : faites :kbd:`Compose < <` ou :kbd:`Compose > >` + +Le cas de « :: » +^^^^^^^^^^^^^^^^ + +| Du point de vue du langage *reStructuredText* (ou *rst*) utilisé dans la + documentation nous voyons soit « bla bla:: », soit « bla bla. :: ». +| ``::`` collé à la fin d'un mot signifie « affiche ``:`` et introduit un bloc de code », + mais un ``::`` après une espace signifie « introduit juste un bloc de code ». + +En français, nous mettons une espace insécable devant nos deux-points, comme : +« Et voilà : ». + +⇒ Traduisez ``mot deux-points deux-points`` par +``mot espace-insécable deux-points deux-points``. + +Pour saisir une espace insécable faites :kbd:`Compose SPACE SPACE` + +Les doubles-espaces +^^^^^^^^^^^^^^^^^^^ + +La documentation originale comporte beaucoup de doubles-espaces. +Cela se fait en anglais, mais pas en français. De toute manière, +ils passent ensuite à une moulinette et le rendu des espaces est délégué +au HTML et au PDF, qui n'en tiennent pas compte. +Nous avons décidé de ne rien changer pour les doubles-espaces +coté traduction : nous ne les retirons pas et ce n'est pas grave +si des traducteurs en retirent par accident. + +Les énumérations +^^^^^^^^^^^^^^^^ + +Chaque paragraphe d'une énumération introduite par un deux-point +doit se terminer par un point-virgule (bien entendu précédé d'une +espace insécable) quelle que soit sa ponctuation interne. Seul le dernier +paragraphe de l'énumération s'achève par un point ou, si la phrase +continue après l'énumération, une virgule. Si l'un des paragraphes est +lui-même une énumération, chacun des sous-paragraphes se termine par +une virgule et le dernier par un point-virgule. + +Par exemple : + +- le premier paragraphe de l'énumération ; +- le deuxième paragraphe, lui aussi une énumération : + + - premier sous-paragraphe, + - second sous-paragraphe ; + +- le dernier paragraphe. + +Malheureusement Poedit n'aime pas les différences de ponctuation finales +entre un paragraphe et sa traduction ; il faut passer outre ses avertissements. +Vous pouvez aussi rajouter un commentaire dans le fichier *.po* pour avertir +les traducteurs suivants et éviter qu'ils ne « corrigent » par erreur ces +avertissements. diff --git a/Makefile b/Makefile new file mode 100644 index 0000000000..48251e3c0d --- /dev/null +++ b/Makefile @@ -0,0 +1,188 @@ +# Makefile for French Python Documentation +# +# Here is what you can do: +# +# - make # Automatically build an HTML local version +# - make todo # To list remaining tasks and show current progression +# - make verifs # To check for correctness: wrapping, spelling +# - make wrap # To rewrap modified files +# - make spell # To check for spelling +# - make clean # To remove build artifacts +# - make fuzzy # To find fuzzy strings +# +# Modes are: autobuild-stable, autobuild-dev, and autobuild-html, +# documented in gen/src/3.6/Doc/Makefile as we're only delegating the +# real work to the Python Doc Makefile. + +# Configuration + +# The CPYTHON_CURRENT_COMMIT is the commit, in the cpython repository, +# 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 := 100da7c31aeb3888962bf33c8cc3594272964815 +LANGUAGE := fr +BRANCH := 3.10 + +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 + +UPSTREAM := https://github.com/python/cpython + +PYTHON := $(shell which python3) +MODE := html +POSPELL_TMP_DIR := .pospell/ +JOBS := auto +SPHINXERRORHANDLING = -W + +# Detect OS + +ifeq '$(findstring ;,$(PATH))' ';' + detected_OS := Windows +else + detected_OS := $(shell uname 2>/dev/null || echo Unknown) + detected_OS := $(patsubst CYGWIN%,Cygwin,$(detected_OS)) + detected_OS := $(patsubst MSYS%,MSYS,$(detected_OS)) + detected_OS := $(patsubst MINGW%,MSYS,$(detected_OS)) +endif + +ifeq ($(detected_OS),Darwin) # Mac OS X + CP_CMD := gcp # accessible with `brew install coreutils` or `brew upgrade coreutils` +else + CP_CMD := cp +endif + +.PHONY: all +all: ensure_prerequisites + 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 venv/cpython/Doc/ \ + JOBS='$(JOBS)' \ + SPHINXOPTS='-D locale_dirs=$(abspath locales) \ + -D language=$(LANGUAGE) \ + -D gettext_compact=0 \ + -D latex_engine=xelatex \ + -D latex_elements.inputenc= \ + -D latex_elements.fontenc=' \ + SPHINXERRORHANDLING=$(SPHINXERRORHANDLING) \ + $(MODE) + @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: venv/cpython/.git/HEAD + @if ! (blurb help >/dev/null 2>&1 && sphinx-build --version >/dev/null 2>&1); then \ + git -C venv/cpython/ checkout $(BRANCH); \ + echo "You're missing dependencies please install:"; \ + echo ""; \ + echo " python -m pip install -r requirements.txt -r venv/cpython/Doc/requirements.txt"; \ + exit 1; \ + fi + +.PHONY: htmlview +htmlview: MODE=htmlview +htmlview: all + +.PHONY: todo +todo: ensure_prerequisites + 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 "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 +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) + pospell -p dict -l fr_FR $< && touch $@ + +.PHONY: fuzzy +fuzzy: ensure_prerequisites + 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: spell line-length sphinx-lint check-headers + +.PHONY: clean +clean: + @echo "Cleaning *.mo and $(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 62319459e4..16c5a5a8b9 100644 --- a/README.rst +++ b/README.rst @@ -1,10 +1,74 @@ Traduction française de la documentation Python =============================================== -Ce repo existe sur deux forges : +Ce projet est réalisé en collaboration avec l'`AFPy +`_ (Association Francophone Python), dont le but est la +promotion du langage de développement Python dans l'ensemble des +nations francophones à travers des événements accessibles à tous comme +l'édition francophone de la PyCon, la `PyConFR +`_, de nombreux meetups dans plusieurs villes et le +maintien de nombreux projets communautaires pour enrichir +l'écosystème. -- https://git.afpy.org/AFPy/python-docs-fr/ -- https://github.com/python/python-docs-fr/ +Contribuer à la traduction +-------------------------- + +Vous pouvez contribuer : + +- en proposant des *pull requests* Github (solution recommandée) ; +- en remontant des erreurs et propositions d'amélioration sur + le `forum de l'AFPy `_ ou sur la + `liste de diffusion `_ ; +- en devenant `membre `_ de l'AFPy ou + `mécène `_ du projet. + +Consultez le +`guide `_ +pour apprendre les conventions à respecter. + +Le `coordinateur `_ de +cette traduction est `Julien Palard (mdk) `_. +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 +----------------------------------------- + +NOTE CONCERNANT LA LICENCE POUR LES TRADUCTIONS : La documentation de Python +est maintenue grâce à un réseau mondial de bénévoles. En publiant ce projet +sur Transifex, Github, et d'autres endroits publics, et vous invitant +à participer, la PSF vous enjoint à accepter cet accord qui stipule que vous +acceptez de fournir vos améliorations à la documentation de Python ou à la +traduction de la documentation de Python pour le bénéfice de la PSF sous licence +CC0 (disponible à l'adresse +https://creativecommons.org/publicdomain/zero/1.0/legalcode). En retour, vous +pouvez demander à ce que votre contribution à la documentation soit +publiquement reconnue, et si votre traduction est acceptée par la +PSF, vous pouvez (mais vous n'êtes pas obligé) soumettre un correctif incluant +une modification appropriée dans le fichier Misc/ACKS ou TRANSLATORS. Bien que +rien dans le présent *accord de contribution* à la documentation n'oblige la PSF +à incorporer votre contribution textuelle, votre participation à la communauté +Python est bienvenue et appréciée. + +En soumettant votre travail à la PSF pour inclusion dans la documentation, +vous signifiez votre acceptation de cet accord. + + +Historique du projet +-------------------- + +- vers 2000 : `lancement du projet `_ ; +- vers 2012 : `reprise `_ par l'`AFPy `_ ; +- 2016 : 15 % de la documentation traduite ; +- 2017 : le projet devient traduction officielle de la documentation Python par la `PEP 545 `_ ; +- 2019 : 30 % de la documentation traduite ; +- 2021 : 50 % de la documentation traduite. + +.. image:: https://julienpalard.frama.io/write-the-docs-paris-19/fr_translation_percent.png + :target: https://framagit.org/JulienPalard/write-the-docs-paris-19 + :alt: Progression de la traduction -le travail s’effectue sur ``git.afpy.org``, github est un mirroir -utilisé pour générer la doc sur https://docs.python.org/fr/ diff --git a/TRANSLATORS b/TRANSLATORS new file mode 100644 index 0000000000..6df8140bf5 --- /dev/null +++ b/TRANSLATORS @@ -0,0 +1,23 @@ +Baptiste Fontaine +Julien Palard +RobinPetit +Valentin Lorentz +Antoine Rozo +Mohamed Kiouaz +Hervé Sousset +Mickaël Bergem +Vincent Poulailleau +Jules Lasne +Mathieu Dupuy +Vivien Lambert +Andy Kwok +Aya Keddam +Antoine Wecxsteen +Youen 'laën' Froger +Sascha Salles +Valériane Venance +Loc Cosnier +Yannick Gingras +Martin Chlumsky +Stephan Michaud +Edith Viau diff --git a/about.po b/about.po new file mode 100644 index 0000000000..e3811998b5 --- /dev/null +++ b/about.po @@ -0,0 +1,91 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-18 15:46+0200\n" +"PO-Revision-Date: 2022-07-08 17:54+0200\n" +"Last-Translator: Julien Palard \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" + +#: about.rst:3 +msgid "About these documents" +msgstr "À propos de ces documents" + +#: about.rst:6 +msgid "" +"These documents are generated from `reStructuredText`_ sources by `Sphinx`_, " +"a document processor specifically written for the Python documentation." +msgstr "" +"Ces documents sont générés à partir de sources en `reStructuredText`_ par " +"`Sphinx`_, un analyseur de documents spécialement conçu pour la " +"documentation Python." + +#: about.rst:15 +msgid "" +"Development of the documentation and its toolchain is an entirely volunteer " +"effort, just like Python itself. If you want to contribute, please take a " +"look at the :ref:`reporting-bugs` page for information on how to do so. New " +"volunteers are always welcome!" +msgstr "" +"Le développement de la documentation et de ses outils est entièrement basé " +"sur le volontariat, tout comme Python. Si vous voulez contribuer, allez voir " +"la page :ref:`reporting-bugs` qui contient des informations pour vous y " +"aider. Les nouveaux volontaires sont toujours les bienvenus !" + +#: about.rst:20 +msgid "Many thanks go to:" +msgstr "Merci beaucoup à :" + +#: about.rst:22 +msgid "" +"Fred L. Drake, Jr., the creator of the original Python documentation toolset " +"and writer of much of the content;" +msgstr "" +"Fred L. Drake, Jr., créateur des outils originaux de la documentation Python " +"et rédacteur de la plupart de son contenu ;" + +#: about.rst:24 +msgid "" +"the `Docutils `_ project for creating " +"reStructuredText and the Docutils suite;" +msgstr "" +"le projet `Docutils `_ pour avoir créé " +"*reStructuredText* et la suite d'outils *Docutils* ;" + +#: about.rst:26 +msgid "" +"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." + +#: about.rst:31 +msgid "Contributors to the Python Documentation" +msgstr "Contributeurs de la documentation Python" + +#: 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 " +"Python source distribution for a partial list of contributors." +msgstr "" +"De nombreuses personnes ont contribué au langage Python, à sa bibliothèque " +"standard et à sa documentation. Consultez :source:`Misc/ACKS` dans les " +"sources de la distribution Python pour avoir une liste partielle des " +"contributeurs." + +#: about.rst:37 +msgid "" +"It is only with the input and contributions of the Python community that " +"Python has such wonderful documentation -- Thank You!" +msgstr "" +"Ce n'est que grâce aux suggestions et contributions de la communauté Python " +"que Python a une documentation si merveilleuse — Merci !" diff --git a/bugs.po b/bugs.po new file mode 100644 index 0000000000..045b57f2c2 --- /dev/null +++ b/bugs.po @@ -0,0 +1,288 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-22 22:57+0100\n" +"PO-Revision-Date: 2022-07-08 17:50+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 3.0\n" + +#: bugs.rst:5 +msgid "Dealing with Bugs" +msgstr "S'attaquer aux bogues" + +#: bugs.rst:7 +msgid "" +"Python is a mature programming language which has established a reputation " +"for stability. In order to maintain this reputation, the developers would " +"like to know of any deficiencies you find in Python." +msgstr "" +"Python est un langage de programmation robuste réputé pour sa stabilité. " +"Afin de maintenir cette réputation, les développeurs souhaitent connaître " +"tout problème que vous pourriez rencontrer dans Python." + +#: bugs.rst:11 +msgid "" +"It can be sometimes faster to fix bugs yourself and contribute patches to " +"Python as it streamlines the process and involves less people. Learn how to :" +"ref:`contribute `." +msgstr "" +"Il est parfois plus rapide de réparer les bogues soi-même et d'en proposer " +"les correctifs, ça simplifie le processus et implique moins de monde. " +"Apprenez à :ref:`contribuer `." + +#: bugs.rst:16 +msgid "Documentation bugs" +msgstr "Bogues de documentation" + +#: bugs.rst:18 +msgid "" +"If you find a bug in this documentation or would like to propose an " +"improvement, please submit a bug report on the :ref:`tracker `. If you have a suggestion on how to fix it, include that as well." +msgstr "" +"Si vous trouvez un bogue dans cette documentation ou si vous désirez " +"proposer une amélioration, si cela concerne aussi la documentation en " +"anglais, ouvrez un rapport sur le :ref:`tracker ` " +"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 *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 "" +"You can also open a discussion item on our `Documentation Discourse forum " +"`_." +msgstr "" + +#: bugs.rst:25 +msgid "" +"If you're short on time, you can also email documentation bug reports to " +"docs@python.org (behavioral bugs can be sent to python-list@python.org). " +"'docs@' is a mailing list run by volunteers; your request will be noticed, " +"though it may take a while to be processed." +msgstr "" +"Si vous êtes limité par le temps, vous pouvez aussi envoyer un courriel à " +"docs@python.org (les bogues de comportement peuvent être envoyés à python-" +"list@python.org). « docs@ » est une liste de diffusion gérée par des " +"volontaires, votre requête sera vue, mais elle peut prendre un moment pour " +"être traitée." + +#: bugs.rst:33 +msgid "`Documentation bugs`_" +msgstr "`Bogues de documentation`_" + +#: bugs.rst:33 +msgid "" +"A list of documentation bugs that have been submitted to the Python issue " +"tracker." +msgstr "" +"Liste des bogues de documentation soumis à l'outil de suivi des problèmes " +"Python." + +#: bugs.rst:36 +msgid "`Issue Tracking `_" +msgstr "`Outil de suivi des problèmes `_" + +#: bugs.rst:36 +msgid "" +"Overview of the process involved in reporting an improvement on the tracker." +msgstr "" +"Vue d'ensemble du processus pour proposer une amélioration avec l'outil de " +"suivi." + +#: bugs.rst:39 +msgid "" +"`Helping with Documentation `_" +msgstr "" +"`Aider avec la documentation `_" + +#: bugs.rst:39 +msgid "" +"Comprehensive guide for individuals that are interested in contributing to " +"Python documentation." +msgstr "Guide complet pour qui souhaite contribuer à la documentation Python." + +#: bugs.rst:41 +msgid "" +"`Documentation Translations `_" +msgstr "" +"`Aider avec la documentation `_" + +#: bugs.rst:42 +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:48 +msgid "Using the Python issue tracker" +msgstr "Utilisation du gestionnaire de tickets Python" + +#: bugs.rst:50 +msgid "" +"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 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:55 +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 " +"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 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 ; " +"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 le " +"gestionnaire de tickets grâce à la boîte de recherche en haut de la page." + +#: bugs.rst:62 +msgid "" +"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 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:67 +msgid "" +"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 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:70 +msgid "The submission form has two fields, \"Title\" and \"Comment\"." +msgstr "Le formulaire de rapport contient deux champs, *Title* et *Comment*." + +#: bugs.rst:72 +#, fuzzy +msgid "" +"For the \"Title\" field, enter a *very* short description of the problem; " +"fewer than ten words is good." +msgstr "" +"Dans le champ *Title*, entrez une *très* brève description du problème " +"rencontré ; tâchez de vous limiter à dix mots." + +#: bugs.rst:75 +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 " +"extension modules were involved, and what hardware and software platform you " +"were using (including version information as appropriate)." +msgstr "" +"Dans le champ « Commentaire », décrivez le problème de manière détaillée, " +"incluant ce à quoi vous vous attendiez et ce qui s'est vraiment produit. " +"Assurez-vous d'y inclure les éventuels modules d'extensions impliqués et la " +"plateforme matérielle et logicielle vous utilisiez (en incluant les " +"informations de versions)." + +#: bugs.rst:80 +msgid "" +"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 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 concernant le rapport." + +#: bugs.rst:89 +msgid "" +"`How to Report Bugs Effectively `_" +msgstr "" +"`Comment signaler des bogues de manière efficace `_ (en anglais)" + +#: bugs.rst:88 +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." +msgstr "" +"Article qui entre dans les détails sur la manière de créer un rapport de " +"bogue utile. Il décrit quel genre d'information est utile et pourquoi elle " +"est utile." + +#: bugs.rst:92 +msgid "" +"`Bug Writing Guidelines `_" +msgstr "" +"`Guide pour la rédaction de rapports de bogues `_" + +#: bugs.rst:92 +msgid "" +"Information about writing a good bug report. Some of this is specific to " +"the Mozilla project, but describes general good practices." +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:98 +msgid "Getting started contributing to Python yourself" +msgstr "Commencer à contribuer à Python vous-même" + +#: bugs.rst:100 +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 " +"patching Python in the `Python Developer's Guide`_. If you have questions, " +"the `core-mentorship mailing list`_ is a friendly place to get answers to " +"any and all questions pertaining to the process of fixing issues in Python." +msgstr "" +"Au-delà de simplement remonter les bogues que vous trouvez, il est aussi " +"apprécié d'y attacher des correctifs. Vous pouvez trouver plus " +"d'informations pour débuter la rédaction de correctifs dans le `Python " +"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/abstract.po b/c-api/abstract.po new file mode 100644 index 0000000000..903aed00e7 --- /dev/null +++ b/c-api/abstract.po @@ -0,0 +1,45 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +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-10-17 19:31+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\n" + +#: c-api/abstract.rst:7 +msgid "Abstract Objects Layer" +msgstr "Couche d'abstraction des objets" + +#: c-api/abstract.rst:9 +msgid "" +"The functions in this chapter interact with Python objects regardless of " +"their type, or with wide classes of object types (e.g. all numerical types, " +"or all sequence types). When used on object types for which they do not " +"apply, they will raise a Python exception." +msgstr "" +"Dans ce chapitre, les fonctions s'appliquent à des objets Python sans tenir " +"compte de leur type, ou des classes d'objets au sens large (par exemple, " +"tous les types numériques, ou tous les types de séquence). Quand ils sont " +"utilisés sur des types d'objets qui ne correspondent pas, ils lèveront une " +"exception Python." + +#: c-api/abstract.rst:14 +msgid "" +"It is not possible to use these functions on objects that are not properly " +"initialized, such as a list object that has been created by :c:func:" +"`PyList_New`, but whose items have not been set to some non-\\ ``NULL`` " +"value yet." +msgstr "" +"Il n'est pas possible d'utiliser ces fonctions sur des objets qui n'ont pas " +"été correctement initialisés, comme un objet liste qui a été créé avec :c:" +"func:`PyList_New` mais dont les éléments n'ont pas encore été mis à une " +"valeur non-\\ ``NULL``." diff --git a/c-api/allocation.po b/c-api/allocation.po new file mode 100644 index 0000000000..7dfa7cea54 --- /dev/null +++ b/c-api/allocation.po @@ -0,0 +1,111 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-18 15:46+0200\n" +"PO-Revision-Date: 2018-10-20 21:16+0200\n" +"Last-Translator: Julien Palard \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\n" + +#: c-api/allocation.rst:6 +msgid "Allocating Objects on the Heap" +msgstr "Allouer des objets dans le tas" + +#: c-api/allocation.rst:17 +#, fuzzy +msgid "" +"Initialize a newly allocated object *op* with its type and initial " +"reference. Returns the initialized object. If *type* indicates that the " +"object participates in the cyclic garbage detector, it is added to the " +"detector's set of observed objects. Other fields of the object are not " +"affected." +msgstr "" +"Permet d'initialiser un objet *op* nouvellement alloué ainsi que son type et " +"sa référence initiale. Renvoie l'objet initialisé. La présence de *type* " +"indique que l'objet doit être traité par le détecteur d'ordures cycliques, " +"il est de ce fait ajouté à l'ensemble du détecteur d'objets observés. Les " +"autres champs de l'objet ne sont pas affectés." + +#: c-api/allocation.rst:26 +msgid "" +"This does everything :c:func:`PyObject_Init` does, and also initializes the " +"length information for a variable-size object." +msgstr "" +"Effectue les mêmes opérations que :c:func:`PyObject_Init` fait, et " +"initialise également l'information de la longueur pour un objet de taille " +"variable." + +#: c-api/allocation.rst:32 +msgid "" +"Allocate a new Python object using the C structure type *TYPE* and the " +"Python type object *type*. Fields not defined by the Python object header " +"are not initialized; the object's reference count will be one. The size of " +"the memory allocation is determined from the :c:member:`~PyTypeObject." +"tp_basicsize` field of the type object." +msgstr "" +"Alloue un nouvel objet Python en utilisant le type de structure C *TYPE* et " +"l'objet Python *type*. Les champs non définis par l'en-tête de l'objet " +"Python ne sont pas initialisés; le compteur de la référence objet sera égal " +"à un. La taille de l'allocation mémoire est déterminée par le champ :c:" +"member:`~PyTypeObject.tp_basicsize` de l'objet type." + +#: c-api/allocation.rst:41 +msgid "" +"Allocate a new Python object using the C structure type *TYPE* and the " +"Python type object *type*. Fields not defined by the Python object header " +"are not initialized. The allocated memory allows for the *TYPE* structure " +"plus *size* fields of the size given by the :c:member:`~PyTypeObject." +"tp_itemsize` field of *type*. This is useful for implementing objects like " +"tuples, which are able to determine their size at construction time. " +"Embedding the array of fields into the same allocation decreases the number " +"of allocations, improving the memory management efficiency." +msgstr "" +"Alloue un nouvel objet Python en utilisant le type de structure C *TYPE* et " +"l'objet Python de type *type*. Les champs non définis par l'en-tête de " +"l'objet Python ne sont pas initialisés. La mémoire allouée est suffisante " +"pour la structure *TYPE* plus *size* champs de la taille donnée par le champ " +"de *type* :c:member:`~PyTypeObject.tp_itemsize`. Ceci est utile pour " +"l'implémentation d'objets comme les *n*-uplets, qui sont capables de " +"déterminer leur taille à la construction. Allouer les champs en même temps " +"que l'objet diminue le nombre d'allocations, améliorant ainsi les " +"performances." + +#: c-api/allocation.rst:53 +msgid "" +"Releases memory allocated to an object using :c:func:`PyObject_New` or :c:" +"func:`PyObject_NewVar`. This is normally called from the :c:member:" +"`~PyTypeObject.tp_dealloc` handler specified in the object's type. The " +"fields of the object should not be accessed after this call as the memory is " +"no longer a valid Python object." +msgstr "" +"Libère la mémoire allouée à un objet utilisant :c:func:`PyObject_New` ou :c:" +"func:`PyObject_NewVar`. Ceci est normalement appelé par le gestionnaire :c:" +"member:`~PyTypeObject.tp_dealloc` spécifié dans le type d'objet. Les champs " +"de l'objet ne doivent plus être accédés après cet appel puisque cet " +"emplacement mémoire ne correspond plus à un objet Python valide." + +#: c-api/allocation.rst:62 +msgid "" +"Object which is visible in Python as ``None``. This should only be accessed " +"using the :c:macro:`Py_None` macro, which evaluates to a pointer to this " +"object." +msgstr "" +"Objet qui est visible en tant que ``None`` dans Python. Ne devrait être " +"accessible uniquement en utilisant la macro :c:macro:`Py_None`, qui évalue " +"cet objet à un pointeur." + +#: c-api/allocation.rst:69 +msgid ":c:func:`PyModule_Create`" +msgstr ":c:func:`PyModule_Create`" + +#: c-api/allocation.rst:70 +msgid "To allocate and create extension modules." +msgstr "Allouer et créer des modules d'extension." diff --git a/c-api/apiabiversion.po b/c-api/apiabiversion.po new file mode 100644 index 0000000000..374251d475 --- /dev/null +++ b/c-api/apiabiversion.po @@ -0,0 +1,190 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-09-23 16:16+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \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" + +#: c-api/apiabiversion.rst:7 +msgid "API and ABI Versioning" +msgstr "Version des API et ABI" + +#: c-api/apiabiversion.rst:9 +msgid "" +"CPython exposes its version number in the following macros. Note that these " +"correspond to the version code is **built** with, not necessarily the " +"version used at **run time**." +msgstr "" +"CPython révèle son numéro de version dans les macros suivantes. À noter " +"qu'ils correspondent au code de la version **compilée** avec, pas " +"nécessairement la version utilisée à l'**exécution**." + +#: c-api/apiabiversion.rst:13 +msgid "" +"See :ref:`stable` for a discussion of API and ABI stability across versions." +msgstr "" +"Voir :ref:`stable` pour une discussion sur la stabilité des API et ABI entre " +"(ou en fonction) de la version." + +#: c-api/apiabiversion.rst:17 +msgid "The ``3`` in ``3.4.1a2``." +msgstr "Le ``3`` dans ``3.4.1a2``.)" + +#: c-api/apiabiversion.rst:21 +msgid "The ``4`` in ``3.4.1a2``." +msgstr "Le ``4`` dans ``3.4.1a2``." + +#: c-api/apiabiversion.rst:25 +msgid "The ``1`` in ``3.4.1a2``." +msgstr "Le ``1`` dans ``3.4.1a2``.)" + +#: c-api/apiabiversion.rst:29 +msgid "" +"The ``a`` in ``3.4.1a2``. This can be ``0xA`` for alpha, ``0xB`` for beta, " +"``0xC`` for release candidate or ``0xF`` for final." +msgstr "" +" Le ``a`` dans ``3.4.1a2``. Cela peut être ``0xA`` pour alpha, ``0xB`` pour " +"bêta, ``0xC`` pour une version candidate ou ``0xF`` pour finale)." + +#: c-api/apiabiversion.rst:35 +msgid "The ``2`` in ``3.4.1a2``. Zero for final releases." +msgstr "Le ``2`` dans ``3.4.1a2``. Nul pour des versions finales." + +#: c-api/apiabiversion.rst:39 +msgid "The Python version number encoded in a single integer." +msgstr "Le numéro de version de Python encodé en un seul entier." + +#: c-api/apiabiversion.rst:41 +msgid "" +"The underlying version information can be found by treating it as a 32 bit " +"number in the following manner:" +msgstr "" +"L'information sur la version sous-jacente peut être trouvée en la traitant " +"comme un nombre sous 32 bits de la manière suivante:" + +#: c-api/apiabiversion.rst:45 +msgid "Bytes" +msgstr "Bytes" + +#: c-api/apiabiversion.rst:45 +msgid "Bits (big endian order)" +msgstr "Bits (ordre gros-boutiste)" + +#: c-api/apiabiversion.rst:45 +msgid "Meaning" +msgstr "Signification" + +#: c-api/apiabiversion.rst:45 +msgid "Value for ``3.4.1a2``" +msgstr "Valeur pour ``3.4.1a2``" + +#: c-api/apiabiversion.rst:47 +msgid "1" +msgstr "1" + +#: c-api/apiabiversion.rst:47 +msgid "1-8" +msgstr "1-8" + +#: c-api/apiabiversion.rst:47 +msgid "``PY_MAJOR_VERSION``" +msgstr "``PY_MAJOR_VERSION``" + +#: c-api/apiabiversion.rst:47 +msgid "``0x03``" +msgstr "``0x03``" + +#: c-api/apiabiversion.rst:49 +msgid "2" +msgstr "2" + +#: c-api/apiabiversion.rst:49 +msgid "9-16" +msgstr "9-16" + +#: c-api/apiabiversion.rst:49 +msgid "``PY_MINOR_VERSION``" +msgstr "``PY_MINOR_VERSION``" + +#: c-api/apiabiversion.rst:49 +msgid "``0x04``" +msgstr "``0x04``" + +#: c-api/apiabiversion.rst:51 +msgid "3" +msgstr "3" + +#: c-api/apiabiversion.rst:51 +msgid "17-24" +msgstr "17-24" + +#: c-api/apiabiversion.rst:51 +msgid "``PY_MICRO_VERSION``" +msgstr "``PY_MICRO_VERSION``" + +#: c-api/apiabiversion.rst:51 +msgid "``0x01``" +msgstr "``0x01``" + +#: c-api/apiabiversion.rst:53 +msgid "4" +msgstr "4" + +#: c-api/apiabiversion.rst:53 +msgid "25-28" +msgstr "25-28" + +#: c-api/apiabiversion.rst:53 +msgid "``PY_RELEASE_LEVEL``" +msgstr "``PY_RELEASE_LEVEL``" + +#: c-api/apiabiversion.rst:53 +msgid "``0xA``" +msgstr "``0xA``" + +#: c-api/apiabiversion.rst:55 +msgid "29-32" +msgstr "29-32" + +#: c-api/apiabiversion.rst:55 +msgid "``PY_RELEASE_SERIAL``" +msgstr "``PY_RELEASE_SERIAL``" + +#: c-api/apiabiversion.rst:55 +msgid "``0x2``" +msgstr "``0x2``" + +#: c-api/apiabiversion.rst:58 +msgid "" +"Thus ``3.4.1a2`` is hexversion ``0x030401a2`` and ``3.10.0`` is hexversion " +"``0x030a00f0``." +msgstr "" +"Ainsi, ``0x030401a2`` est la version en notation hexadécimale sur un entier " +"de ``3.4.1a2`` et ``0x030a00f0`` est la version en notation hexadécimale sur " +"un entier de ``3.10.0``" + +#: c-api/apiabiversion.rst:62 +msgid "All the given macros are defined in :source:`Include/patchlevel.h`." +msgstr "" +"Toutes les macros données sont définies dans :source:`Include/patchlevel.h`." + +#~ msgid "``1``" +#~ msgstr "``1``" + +#~ msgid "``2``" +#~ msgstr "``2``" + +#~ msgid "``3``" +#~ msgstr "``3``" + +#~ msgid "``4``" +#~ msgstr "``4``" diff --git a/c-api/arg.po b/c-api/arg.po new file mode 100644 index 0000000000..fae360ef57 --- /dev/null +++ b/c-api/arg.po @@ -0,0 +1,1395 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-22 22:57+0100\n" +"PO-Revision-Date: 2021-12-11 11:44+0100\n" +"Last-Translator: Julien Palard \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/arg.rst:6 +msgid "Parsing arguments and building values" +msgstr "Analyse des arguments et construction des valeurs" + +#: c-api/arg.rst:8 +msgid "" +"These functions are useful when creating your own extensions functions and " +"methods. Additional information and examples are available in :ref:" +"`extending-index`." +msgstr "" +"Ces fonctions sont utiles pour créer vos propres fonctions et méthodes " +"d'extensions. Des informations supplémentaires et des exemples sont " +"disponibles ici: :ref:`extending-index`." + +#: c-api/arg.rst:12 +msgid "" +"The first three of these functions described, :c:func:`PyArg_ParseTuple`, :c:" +"func:`PyArg_ParseTupleAndKeywords`, and :c:func:`PyArg_Parse`, all use " +"*format strings* which are used to tell the function about the expected " +"arguments. The format strings use the same syntax for each of these " +"functions." +msgstr "" +"Dans Les trois premières de ces fonctions décrites, :c:func:" +"`PyArg_ParseTuple`, :c:func:`PyArg_ParseTupleAndKeywords`, et :c:func:" +"`PyArg_Parse`, toutes utilisent *des chaînes de format* qui sont utilisées " +"pour indiquer à la fonction les arguments attendus. Les chaînes de format " +"utilise la même syntaxe pour chacune de ces fonctions." + +#: c-api/arg.rst:19 +msgid "Parsing arguments" +msgstr "Analyse des arguments" + +#: c-api/arg.rst:21 +msgid "" +"A format string consists of zero or more \"format units.\" A format unit " +"describes one Python object; it is usually a single character or a " +"parenthesized sequence of format units. With a few exceptions, a format " +"unit that is not a parenthesized sequence normally corresponds to a single " +"address argument to these functions. In the following description, the " +"quoted form is the format unit; the entry in (round) parentheses is the " +"Python object type that matches the format unit; and the entry in [square] " +"brackets is the type of the C variable(s) whose address should be passed." +msgstr "" +"Une chaîne de format se compose de zéro ou plusieurs \"unités de format\". " +"Une unité de format décrit un objet Python, elle est généralement composée " +"d'un seul caractère ou d'une séquence d'unités de format entre parenthèses. " +"À quelques exceptions près, une unité de format qui n'est pas une séquence " +"entre parenthèses correspond normalement à un argument d'une seule adresse " +"pour ces fonctions. Dans la description qui suit, la forme entre guillemets " +"est l'unité de format, l'entrée entre parenthèses est le type d'objet Python " +"qui correspond à l'unité de format, et l'entrée entre crochets est le type " +"de la variable C (ou des variables) dont l'adresse doit être donnée." + +#: c-api/arg.rst:31 +msgid "Strings and buffers" +msgstr "Chaînes et tampons" + +#: c-api/arg.rst:33 +msgid "" +"These formats allow accessing an object as a contiguous chunk of memory. You " +"don't have to provide raw storage for the returned unicode or bytes area." +msgstr "" +"Ces formats permettent d'accéder à un objet sous forme d'un fragment de " +"mémoire contiguë. Il n'est pas nécessaire d'allouer la mémoire pour " +"l'*unicode* ou le *bytes* renvoyé." + +#: c-api/arg.rst:37 +msgid "Unless otherwise stated, buffers are not NUL-terminated." +msgstr "Sauf indication contraire, les tampons ne se terminent pas par NUL." + +#: c-api/arg.rst:39 +msgid "There are three ways strings and buffers can be converted to C:" +msgstr "" + +#: c-api/arg.rst:41 +#, fuzzy +msgid "" +"Formats such as ``y*`` and ``s*`` fill a :c:type:`Py_buffer` structure. This " +"locks the underlying buffer so that the caller can subsequently use the " +"buffer even inside a :c:type:`Py_BEGIN_ALLOW_THREADS` block without the risk " +"of mutable data being resized or destroyed. As a result, **you have to " +"call** :c:func:`PyBuffer_Release` after you have finished processing the " +"data (or in any early abort case)." +msgstr "" +"Néanmoins, quand une structure :c:type:`Py_buffer` est en cours de " +"remplissage, le tampon sous-jacent est verrouillé pour permettre à " +"l'appelant d'utiliser le tampon par la suite, même à l'intérieur d'un bloc :" +"c:type:`Py_BEGIN_ALLOW_THREADS`, sans risques de voir des données muables se " +"faire redimensionner ou supprimer. En conséquence, **il vous appartient " +"d'appeler** :c:func:`PyBuffer_Release` après avoir terminé de traiter les " +"données (ou après une interruption prématurée du traitement de ces données)." + +#: c-api/arg.rst:48 +msgid "" +"The ``es``, ``es#``, ``et`` and ``et#`` formats allocate the result buffer. " +"**You have to call** :c:func:`PyMem_Free` after you have finished processing " +"the data (or in any early abort case)." +msgstr "" + +#: c-api/arg.rst:54 +#, fuzzy +msgid "" +"Other formats take a :class:`str` or a read-only :term:`bytes-like object`, " +"such as :class:`bytes`, and provide a ``const char *`` pointer to its " +"buffer. In this case the buffer is \"borrowed\": it is managed by the " +"corresponding Python object, and shares the lifetime of this object. You " +"won't have to release any memory yourself." +msgstr "" +"En général, lorsqu'un format définit un pointeur vers un tampon, le tampon " +"est géré par l'objet Python correspondant et le tampon partage la durée de " +"vie de cet objet. vous n'avez pas à libérer de mémoire. Les seules " +"exceptions sont ``es``, ``es#``, ``et`` et ``et#``." + +#: c-api/arg.rst:61 +msgid "" +"To ensure that the underlying buffer may be safely borrowed, the object's :c:" +"member:`PyBufferProcs.bf_releasebuffer` field must be ``NULL``. This " +"disallows common mutable objects such as :class:`bytearray`, but also some " +"read-only objects such as :class:`memoryview` of :class:`bytes`." +msgstr "" + +#: c-api/arg.rst:67 +msgid "" +"Besides this ``bf_releasebuffer`` requirement, there is no check to verify " +"whether the input object is immutable (e.g. whether it would honor a request " +"for a writable buffer, or whether another thread can mutate the data)." +msgstr "" + +#: c-api/arg.rst:73 +msgid "" +"For all ``#`` variants of formats (``s#``, ``y#``, etc.), the macro :c:macro:" +"`PY_SSIZE_T_CLEAN` must be defined before including :file:`Python.h`. On " +"Python 3.9 and older, the type of the length argument is :c:type:" +"`Py_ssize_t` if the :c:macro:`PY_SSIZE_T_CLEAN` macro is defined, or int " +"otherwise." +msgstr "" + +#: c-api/arg.rst:98 +msgid "``s`` (:class:`str`) [const char \\*]" +msgstr "``s`` (:class:`str`) [``const char *``]" + +#: c-api/arg.rst:81 +msgid "" +"Convert a Unicode object to a C pointer to a character string. A pointer to " +"an existing string is stored in the character pointer variable whose address " +"you pass. The C string is NUL-terminated. The Python string must not " +"contain embedded null code points; if it does, a :exc:`ValueError` exception " +"is raised. Unicode objects are converted to C strings using ``'utf-8'`` " +"encoding. If this conversion fails, a :exc:`UnicodeError` is raised." +msgstr "" +"Convertit un objet Unicode en un pointeur vers une chaîne de caractères. " +"S'il s'agit d'un pointeur vers une chaîne de caractères déjà existante, il " +"est stocké dans la variable de type pointeur vers un caractère dont vous " +"avez donné l'adresse. Une chaîne de caractères en C se termine par *NULL*. " +"La chaîne de caractères Python ne doit donc pas contenir de caractère dont " +"le code est *null*. Si elle en contient, une exception :exc:`ValueError` est " +"levée. Si la conversion échoue, une :exc:`UnicodeError` est levée." + +#: c-api/arg.rst:90 +msgid "" +"This format does not accept :term:`bytes-like objects `. " +"If you want to accept filesystem paths and convert them to C character " +"strings, it is preferable to use the ``O&`` format with :c:func:" +"`PyUnicode_FSConverter` as *converter*." +msgstr "" +"Ce format n'accepte pas les :term:`objets compatibles avec une chaîne " +"d'octets `. Si vous voulez accepter les chemins du " +"système de fichiers et les convertir vers des chaînes de caractères C, il " +"est préférable d'utiliser le format ``O&`` avec :c:func:" +"`PyUnicode_FSConverter` en tant que *converter*." + +#: c-api/arg.rst:164 +msgid "" +"Previously, :exc:`TypeError` was raised when embedded null code points were " +"encountered in the Python string." +msgstr "" +"Auparavant, une :exc:`TypeError` était levée quand la chaîne de caractères " +"Python contenait des codes NULL." + +#: c-api/arg.rst:104 +msgid "``s*`` (:class:`str` or :term:`bytes-like object`) [Py_buffer]" +msgstr "``s*`` (:class:`str` ou :term:`bytes-like object`) [``Py_buffer``]" + +#: c-api/arg.rst:101 +msgid "" +"This format accepts Unicode objects as well as bytes-like objects. It fills " +"a :c:type:`Py_buffer` structure provided by the caller. In this case the " +"resulting C string may contain embedded NUL bytes. Unicode objects are " +"converted to C strings using ``'utf-8'`` encoding." +msgstr "" +"Ce format accepte les objets Unicode et les *bytes-like object*. Cela " +"remplit une structure :c:type:`Py_buffer` qui est fournie par l'appelant. " +"Dans ce cas, la chaîne de caractères C qui en résulte peut contenir des " +"octets NULL. Les objets Unicode sont convertis en chaînes de caractères C en " +"utilisant l'encodage ``'utf-8'``." + +#: c-api/arg.rst:111 +#, fuzzy +msgid "" +"``s#`` (:class:`str`, read-only :term:`bytes-like object`) [const char \\*, :" +"c:type:`Py_ssize_t`]" +msgstr "" +"``s#`` (:class:`str`, :term:`bytes-like object` en lecture seule) [``const " +"char \\*``, ``int`` ou :c:type:`Py_ssize_t`]" + +#: c-api/arg.rst:107 +#, fuzzy +msgid "" +"Like ``s*``, except that it provides a :ref:`borrowed buffer `. The result is stored into two C variables, the first one a pointer " +"to a C string, the second one its length. The string may contain embedded " +"null bytes. Unicode objects are converted to C strings using ``'utf-8'`` " +"encoding." +msgstr "" +"La même chose que ``s*``, mais n'accepte pas les objets muables. Le résultat " +"est stocké dans deux variables C, la première est un pointeur vers une " +"chaîne de caractères C, la seconde contient sa taille. La chaîne de " +"caractères peut contenir des octets NULL. Les objets Unicode sont convertis " +"vers des chaînes de caractères C utilisant l'encodage ``'utf-8'``." + +#: c-api/arg.rst:581 +msgid "``z`` (:class:`str` or ``None``) [const char \\*]" +msgstr "``z`` (:class:`str` ou ``None``) [``const char *``]" + +#: c-api/arg.rst:114 +#, fuzzy +msgid "" +"Like ``s``, but the Python object may also be ``None``, in which case the C " +"pointer is set to ``NULL``." +msgstr "" +"Comme ``s``, mais l'objet Python peut aussi être ``None``, auquel cas le " +"pointeur C devient *NULL*." + +#: c-api/arg.rst:119 +msgid "" +"``z*`` (:class:`str`, :term:`bytes-like object` or ``None``) [Py_buffer]" +msgstr "" +"``z*`` (:class:`str`, :term:`bytes-like object` ou ``None``) [``Py_buffer``]" + +#: c-api/arg.rst:118 +msgid "" +"Like ``s*``, but the Python object may also be ``None``, in which case the " +"``buf`` member of the :c:type:`Py_buffer` structure is set to ``NULL``." +msgstr "" +"Comme ``s*``, mais l'objet Python peut aussi être ``None``, auquel cas le " +"membre ``buf``, dont la structure est :c:type:`Py_buffer` est fixée à *NULL*." + +#: c-api/arg.rst:123 +#, fuzzy +msgid "" +"``z#`` (:class:`str`, read-only :term:`bytes-like object` or ``None``) " +"[const char \\*, :c:type:`Py_ssize_t`]" +msgstr "" +"``s#`` (:class:`str`, :term:`bytes-like object` en lecture seule) [``const " +"char \\*``, ``int`` ou :c:type:`Py_ssize_t`]" + +#: c-api/arg.rst:122 +#, fuzzy +msgid "" +"Like ``s#``, but the Python object may also be ``None``, in which case the C " +"pointer is set to ``NULL``." +msgstr "" +"Comme ``s#``, mais l'objet Python peut également être ``None``, dans ce cas " +"le pointeur C est définie à *NULL*." + +#: c-api/arg.rst:134 +msgid "``y`` (read-only :term:`bytes-like object`) [const char \\*]" +msgstr "" +"``y`` (lecture seule :term:`objet compatible avec une chaîne d'octets `) [constante char \\*]" + +#: c-api/arg.rst:126 +#, fuzzy +msgid "" +"This format converts a bytes-like object to a C pointer to a :ref:`borrowed " +"` character string; it does not accept Unicode " +"objects. The bytes buffer must not contain embedded null bytes; if it does, " +"a :exc:`ValueError` exception is raised." +msgstr "" +"Ce format convertit un *objet compatible avec une chaîne d'octets* en un " +"pointeur C vers une chaîne de caractères ; il n'accepte pas les objets " +"Unicode. Le tampon d'octets ne doit pas contenir d'octets *null* ; si c'est " +"le cas, une exception :exc:`ValueError` est levée." + +#: c-api/arg.rst:132 +msgid "" +"Previously, :exc:`TypeError` was raised when embedded null bytes were " +"encountered in the bytes buffer." +msgstr "" +"Auparavant, :exc:`TypeError` était levée lorsque des octets *null* étaient " +"rencontrés dans le tampon d'octets." + +#: c-api/arg.rst:139 +msgid "``y*`` (:term:`bytes-like object`) [Py_buffer]" +msgstr "``y*`` (:term:`bytes-like object`) [``Py_buffer``]" + +#: c-api/arg.rst:137 +msgid "" +"This variant on ``s*`` doesn't accept Unicode objects, only bytes-like " +"objects. **This is the recommended way to accept binary data.**" +msgstr "" + +#: c-api/arg.rst:143 +#, fuzzy +msgid "" +"``y#`` (read-only :term:`bytes-like object`) [const char \\*, :c:type:" +"`Py_ssize_t`]" +msgstr "" +"``s#`` (:class:`str`, :term:`bytes-like object` en lecture seule) [``const " +"char \\*``, ``int`` ou :c:type:`Py_ssize_t`]" + +#: c-api/arg.rst:142 +msgid "" +"This variant on ``s#`` doesn't accept Unicode objects, only bytes-like " +"objects." +msgstr "" +"Cette variante de ``s#`` n'accepte pas les objets Unicode, uniquement des " +"objets assimilés à des octets." + +#: c-api/arg.rst:148 +msgid "``S`` (:class:`bytes`) [PyBytesObject \\*]" +msgstr "``S`` (:class:`bytes`) [``PyBytesObject *``]" + +#: c-api/arg.rst:146 +#, fuzzy +msgid "" +"Requires that the Python object is a :class:`bytes` object, without " +"attempting any conversion. Raises :exc:`TypeError` if the object is not a " +"bytes object. The C variable may also be declared as :c:expr:`PyObject*`." +msgstr "" +"Nécessite que l'objet Python soit de type :class:`bytes`, sans avoir tenté " +"de conversion. :exc:`TypeError` est levée si l'objet n'est pas un objet de " +"type *bytes*. La variable C doit aussi être déclarée en tant que :c:type:" +"`PyObject\\*`." + +#: c-api/arg.rst:153 +msgid "``Y`` (:class:`bytearray`) [PyByteArrayObject \\*]" +msgstr "``Y`` (:class:`bytearray`) [``PyByteArrayObject *``]" + +#: c-api/arg.rst:151 +#, fuzzy +msgid "" +"Requires that the Python object is a :class:`bytearray` object, without " +"attempting any conversion. Raises :exc:`TypeError` if the object is not a :" +"class:`bytearray` object. The C variable may also be declared as :c:expr:" +"`PyObject*`." +msgstr "" +"Nécessite que l'objet Python soit de type :class:`bytes`, sans avoir tenté " +"de conversion. :exc:`TypeError` est levée si l'objet n'est pas un objet de " +"type *bytes*. La variable C doit aussi être déclarée en tant que :c:type:" +"`PyObject\\*`." + +#: c-api/arg.rst:170 +msgid "``u`` (:class:`str`) [const Py_UNICODE \\*]" +msgstr "``u`` (:class:`str`) [``const Py_UNICODE *``]" + +#: c-api/arg.rst:156 +msgid "" +"Convert a Python Unicode object to a C pointer to a NUL-terminated buffer of " +"Unicode characters. You must pass the address of a :c:type:`Py_UNICODE` " +"pointer variable, which will be filled with the pointer to an existing " +"Unicode buffer. Please note that the width of a :c:type:`Py_UNICODE` " +"character depends on compilation options (it is either 16 or 32 bits). The " +"Python string must not contain embedded null code points; if it does, a :exc:" +"`ValueError` exception is raised." +msgstr "" +"Convertit un objet Python Unicode en un pointeur C vers un tampon de " +"caractères Unicode terminé par *NULL*. Vous devez passer l'adresse d'un " +"pointeur :c:type:`Py_UNICODE`, qui sera rempli avec le pointeur vers un " +"tampon Unicode existant. Veuillez noter que la taille d'un :c:type:" +"`Py_UNICODE` dépend des options de compilation (soit 16, soit 32 bits). La " +"chaîne de caractères Python ne doit pas contenir de code *NULL*. Si elle en " +"contient, une exception :exc:`ValueError` est levée." + +#: c-api/arg.rst:188 c-api/arg.rst:196 +msgid "" +"Part of the old-style :c:type:`Py_UNICODE` API; please migrate to using :c:" +"func:`PyUnicode_AsWideCharString`." +msgstr "" + +#: c-api/arg.rst:179 +#, fuzzy +msgid "``u#`` (:class:`str`) [const Py_UNICODE \\*, :c:type:`Py_ssize_t`]" +msgstr "``u#`` (:class:`str`) [``const Py_UNICODE *``, ``int``]" + +#: c-api/arg.rst:173 +msgid "" +"This variant on ``u`` stores into two C variables, the first one a pointer " +"to a Unicode data buffer, the second one its length. This variant allows " +"null code points." +msgstr "" + +#: c-api/arg.rst:187 +msgid "``Z`` (:class:`str` or ``None``) [const Py_UNICODE \\*]" +msgstr "``Z`` (:class:`str` ou ``None``) [``const Py_UNICODE *``]" + +#: c-api/arg.rst:182 +#, fuzzy +msgid "" +"Like ``u``, but the Python object may also be ``None``, in which case the :c:" +"type:`Py_UNICODE` pointer is set to ``NULL``." +msgstr "" +"Comme ``u``, mais l'objet Python peut aussi être ``None``, auquel cas le " +"pointeur :c:type:`Py_UNICODE` vaut *NULL*." + +#: c-api/arg.rst:195 +#, fuzzy +msgid "" +"``Z#`` (:class:`str` or ``None``) [const Py_UNICODE \\*, :c:type:" +"`Py_ssize_t`]" +msgstr "``Z#`` (:class:`str` ou ``None``) [``const Py_UNICODE *``, ``int``]" + +#: c-api/arg.rst:190 +#, fuzzy +msgid "" +"Like ``u#``, but the Python object may also be ``None``, in which case the :" +"c:type:`Py_UNICODE` pointer is set to ``NULL``." +msgstr "" +"Comme ``u#``, mais l'objet Python peut également être ``None``, auquel cas " +"le pointeur :c:type:`Py_UNICODE` vaut *NULL*." + +#: c-api/arg.rst:200 +msgid "``U`` (:class:`str`) [PyObject \\*]" +msgstr "``U`` (:class:`str`) [``PyObject *``]" + +#: c-api/arg.rst:198 +#, fuzzy +msgid "" +"Requires that the Python object is a Unicode object, without attempting any " +"conversion. Raises :exc:`TypeError` if the object is not a Unicode object. " +"The C variable may also be declared as :c:expr:`PyObject*`." +msgstr "" +"Nécessite que l'objet Python soit de type :class:`bytes`, sans avoir tenté " +"de conversion. :exc:`TypeError` est levée si l'objet n'est pas un objet de " +"type *bytes*. La variable C doit aussi être déclarée en tant que :c:type:" +"`PyObject\\*`." + +#: c-api/arg.rst:206 +msgid "``w*`` (read-write :term:`bytes-like object`) [Py_buffer]" +msgstr "``w*`` (lecture-écriture :term:`bytes-like object`) [``Py_buffer``]" + +#: c-api/arg.rst:203 +msgid "" +"This format accepts any object which implements the read-write buffer " +"interface. It fills a :c:type:`Py_buffer` structure provided by the caller. " +"The buffer may contain embedded null bytes. The caller have to call :c:func:" +"`PyBuffer_Release` when it is done with the buffer." +msgstr "" + +#: c-api/arg.rst:223 +msgid "``es`` (:class:`str`) [const char \\*encoding, char \\*\\*buffer]" +msgstr "" + +#: c-api/arg.rst:209 +msgid "" +"This variant on ``s`` is used for encoding Unicode into a character buffer. " +"It only works for encoded data without embedded NUL bytes." +msgstr "" + +#: c-api/arg.rst:212 +msgid "" +"This format requires two arguments. The first is only used as input, and " +"must be a :c:expr:`const char*` which points to the name of an encoding as a " +"NUL-terminated string, or ``NULL``, in which case ``'utf-8'`` encoding is " +"used. An exception is raised if the named encoding is not known to Python. " +"The second argument must be a :c:expr:`char**`; the value of the pointer it " +"references will be set to a buffer with the contents of the argument text. " +"The text will be encoded in the encoding specified by the first argument." +msgstr "" + +#: c-api/arg.rst:220 +msgid "" +":c:func:`PyArg_ParseTuple` will allocate a buffer of the needed size, copy " +"the encoded data into this buffer and adjust *\\*buffer* to reference the " +"newly allocated storage. The caller is responsible for calling :c:func:" +"`PyMem_Free` to free the allocated buffer after use." +msgstr "" + +#: c-api/arg.rst:228 +msgid "" +"``et`` (:class:`str`, :class:`bytes` or :class:`bytearray`) [const char " +"\\*encoding, char \\*\\*buffer]" +msgstr "" + +#: c-api/arg.rst:226 +msgid "" +"Same as ``es`` except that byte string objects are passed through without " +"recoding them. Instead, the implementation assumes that the byte string " +"object uses the encoding passed in as parameter." +msgstr "" + +#: c-api/arg.rst:259 +#, fuzzy +msgid "" +"``es#`` (:class:`str`) [const char \\*encoding, char \\*\\*buffer, :c:type:" +"`Py_ssize_t` \\*buffer_length]" +msgstr "" +"``s#`` (:class:`str`, :term:`bytes-like object` en lecture seule) [``const " +"char \\*``, ``int`` ou :c:type:`Py_ssize_t`]" + +#: c-api/arg.rst:231 +msgid "" +"This variant on ``s#`` is used for encoding Unicode into a character buffer. " +"Unlike the ``es`` format, this variant allows input data which contains NUL " +"characters." +msgstr "" + +#: c-api/arg.rst:235 +msgid "" +"It requires three arguments. The first is only used as input, and must be " +"a :c:expr:`const char*` which points to the name of an encoding as a NUL-" +"terminated string, or ``NULL``, in which case ``'utf-8'`` encoding is used. " +"An exception is raised if the named encoding is not known to Python. The " +"second argument must be a :c:expr:`char**`; the value of the pointer it " +"references will be set to a buffer with the contents of the argument text. " +"The text will be encoded in the encoding specified by the first argument. " +"The third argument must be a pointer to an integer; the referenced integer " +"will be set to the number of bytes in the output buffer." +msgstr "" + +#: c-api/arg.rst:245 +msgid "There are two modes of operation:" +msgstr "Il existe deux modes de fonctionnement :" + +#: c-api/arg.rst:247 +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 " +"responsible for calling :c:func:`PyMem_Free` to free the allocated buffer " +"after usage." +msgstr "" + +#: c-api/arg.rst:252 +msgid "" +"If *\\*buffer* points to a non-``NULL`` pointer (an already allocated " +"buffer), :c:func:`PyArg_ParseTuple` will use this location as the buffer and " +"interpret the initial value of *\\*buffer_length* as the buffer size. It " +"will then copy the encoded data into the buffer and NUL-terminate it. If " +"the buffer is not large enough, a :exc:`ValueError` will be set." +msgstr "" + +#: c-api/arg.rst:258 +msgid "" +"In both cases, *\\*buffer_length* is set to the length of the encoded data " +"without the trailing NUL byte." +msgstr "" +"Dans les deux cas, *\\*buffer_length* est la longueur des données encodées, " +"sans l'octet NUL de fin." + +#: c-api/arg.rst:264 +#, fuzzy +msgid "" +"``et#`` (:class:`str`, :class:`bytes` or :class:`bytearray`) [const char " +"\\*encoding, char \\*\\*buffer, :c:type:`Py_ssize_t` \\*buffer_length]" +msgstr "" +"``s#`` (:class:`str`, :term:`bytes-like object` en lecture seule) [``const " +"char \\*``, ``int`` ou :c:type:`Py_ssize_t`]" + +#: c-api/arg.rst:262 +msgid "" +"Same as ``es#`` except that byte string objects are passed through without " +"recoding them. Instead, the implementation assumes that the byte string " +"object uses the encoding passed in as parameter." +msgstr "" + +#: c-api/arg.rst:267 +msgid "Numbers" +msgstr "Les nombres" + +#: c-api/arg.rst:271 +msgid "``b`` (:class:`int`) [unsigned char]" +msgstr "``b`` (:class:`int`) [``unsigned char``]" + +#: c-api/arg.rst:270 +#, fuzzy +msgid "" +"Convert a nonnegative Python integer to an unsigned tiny int, stored in a C :" +"c:expr:`unsigned char`." +msgstr "" +"Convertit un entier Python positif ou nul en un ``unsigned tiny int``, " +"stocké dans un :c:type:`unsigned char` C." + +#: c-api/arg.rst:615 +msgid "``B`` (:class:`int`) [unsigned char]" +msgstr "``B`` (:class:`int`) [``unsigned char``]" + +#: c-api/arg.rst:274 +#, fuzzy +msgid "" +"Convert a Python integer to a tiny int without overflow checking, stored in " +"a C :c:expr:`unsigned char`." +msgstr "" +"Convertit un entier Python en un ``tiny int`` sans vérifier le débordement, " +"stocké dans un :c:type:`unsigned char` C." + +#: c-api/arg.rst:609 +msgid "``h`` (:class:`int`) [short int]" +msgstr "``h`` (:class:`int`) [``short int``]" + +#: c-api/arg.rst:278 +#, fuzzy +msgid "Convert a Python integer to a C :c:expr:`short int`." +msgstr "Convertit un entier Python en un :c:type:`short int` C." + +#: c-api/arg.rst:618 +msgid "``H`` (:class:`int`) [unsigned short int]" +msgstr "``H`` (:class:`int`) [``unsigned short int``]" + +#: c-api/arg.rst:281 +#, fuzzy +msgid "" +"Convert a Python integer to a C :c:expr:`unsigned short int`, without " +"overflow checking." +msgstr "" +"Convertit un entier Python en un :c:type:`unsigned short int` C, sans " +"contrôle de débordement." + +#: c-api/arg.rst:603 +msgid "``i`` (:class:`int`) [int]" +msgstr "``i`` (:class:`int`) [``int``]" + +#: c-api/arg.rst:285 +#, fuzzy +msgid "Convert a Python integer to a plain C :c:expr:`int`." +msgstr "Convertit un entier Python en un :c:type:`int` C." + +#: c-api/arg.rst:621 +msgid "``I`` (:class:`int`) [unsigned int]" +msgstr "``I`` (:class:`int`) [``unsigned int``]" + +#: c-api/arg.rst:288 +#, fuzzy +msgid "" +"Convert a Python integer to a C :c:expr:`unsigned int`, without overflow " +"checking." +msgstr "" +"Convertit un entier Python en un :c:type:`unsigned int` C, sans contrôle de " +"le débordement." + +#: c-api/arg.rst:612 +msgid "``l`` (:class:`int`) [long int]" +msgstr "``l`` (:class:`int`) [``long int``]" + +#: c-api/arg.rst:292 +#, fuzzy +msgid "Convert a Python integer to a C :c:expr:`long int`." +msgstr "Convertit un entier Python en un :c:type:`long int`." + +#: c-api/arg.rst:624 +msgid "``k`` (:class:`int`) [unsigned long]" +msgstr "``k`` (:class:`int`) [``unsigned long``]" + +#: c-api/arg.rst:295 +#, fuzzy +msgid "" +"Convert a Python integer to a C :c:expr:`unsigned long` without overflow " +"checking." +msgstr "" +"Convertit un entier Python en un :c:type:`unsigned long` C sans en vérifier " +"le débordement." + +#: c-api/arg.rst:627 +msgid "``L`` (:class:`int`) [long long]" +msgstr "``L`` (:class:`int`) [``long long``]" + +#: c-api/arg.rst:299 +#, fuzzy +msgid "Convert a Python integer to a C :c:expr:`long long`." +msgstr "Convertit un entier Python en un :c:type:`long int`." + +#: c-api/arg.rst:630 +msgid "``K`` (:class:`int`) [unsigned long long]" +msgstr "``K`` (:class:`int`) [``unsigned long long``]" + +#: c-api/arg.rst:302 +#, fuzzy +msgid "" +"Convert a Python integer to a C :c:expr:`unsigned long long` without " +"overflow checking." +msgstr "" +"Convertit un entier Python en un :c:type:`unsigned long` C sans en vérifier " +"le débordement." + +#: c-api/arg.rst:633 +#, fuzzy +msgid "``n`` (:class:`int`) [:c:type:`Py_ssize_t`]" +msgstr "``n`` (:class:`int`) [``Py_ssize_t``]" + +#: c-api/arg.rst:306 +msgid "Convert a Python integer to a C :c:type:`Py_ssize_t`." +msgstr "Convertit un entier Python en un :c:type:`Py_ssize_t`." + +#: c-api/arg.rst:313 +msgid "``c`` (:class:`bytes` or :class:`bytearray` of length 1) [char]" +msgstr "``c`` (:class:`bytes` ou :class:`bytearray` de longueur 1) [``char``]" + +#: c-api/arg.rst:309 +#, fuzzy +msgid "" +"Convert a Python byte, represented as a :class:`bytes` or :class:`bytearray` " +"object of length 1, to a C :c:expr:`char`." +msgstr "" +"Convertit un *byte* Python, représenté comme un objet :class:`bytes` ou :" +"class:`bytearray` de longueur 1, en un :c:type:`char` C." + +#: c-api/arg.rst:312 +msgid "Allow :class:`bytearray` objects." +msgstr "" + +#: c-api/arg.rst:641 +msgid "``C`` (:class:`str` of length 1) [int]" +msgstr "``C`` (:class:`str` de longueur 1) [``int``]" + +#: c-api/arg.rst:316 +#, fuzzy +msgid "" +"Convert a Python character, represented as a :class:`str` object of length " +"1, to a C :c:expr:`int`." +msgstr "" +"Convertit un caractère Python, représenté comme un objet :class:`str` de " +"longueur 1, en un :c:type:`int` C." + +#: c-api/arg.rst:647 +msgid "``f`` (:class:`float`) [float]" +msgstr "``f`` (:class:`float`) [``float``]" + +#: c-api/arg.rst:320 +#, fuzzy +msgid "Convert a Python floating point number to a C :c:expr:`float`." +msgstr "Convertit un nombre flottant Python vers un :c:type:`float`." + +#: c-api/arg.rst:644 +msgid "``d`` (:class:`float`) [double]" +msgstr "``d`` (:class:`float`) [``double``]" + +#: c-api/arg.rst:323 +#, fuzzy +msgid "Convert a Python floating point number to a C :c:expr:`double`." +msgstr "Convertit un nombre flottant Python vers un :c:type:`double` C." + +#: c-api/arg.rst:326 +msgid "``D`` (:class:`complex`) [Py_complex]" +msgstr "``D`` (:class:`complex`) [``Py_complex``]" + +#: c-api/arg.rst:326 +msgid "Convert a Python complex number to a C :c:type:`Py_complex` structure." +msgstr "" +"Convertit un nombre complexe Python vers une structure :c:type:`Py_complex` " +"C." + +#: c-api/arg.rst:329 +msgid "Other objects" +msgstr "Autres objets" + +#: c-api/arg.rst:658 +msgid "``O`` (object) [PyObject \\*]" +msgstr "``O`` (objet) [``PyObject *``]" + +#: c-api/arg.rst:332 +#, fuzzy +msgid "" +"Store a Python object (without any conversion) in a C object pointer. The C " +"program thus receives the actual object that was passed. The object's " +"reference count is not increased. The pointer stored is not ``NULL``." +msgstr "" +"Stocke un objet Python (sans aucune conversion) en un pointeur sur un objet " +"C. Ainsi, Le programme C reçoit l'objet réel qui a été passé. Le compteur de " +"référence sur l'objet n'est pas incrémenté. Le pointeur stocké n'est pas " +"*NULL*." + +#: c-api/arg.rst:341 +msgid "``O!`` (object) [*typeobject*, PyObject \\*]" +msgstr "``O!`` (objet) [*typeobject*, ``PyObject *``]" + +#: c-api/arg.rst:337 +msgid "" +"Store a Python object in a C object pointer. This is similar to ``O``, but " +"takes two C arguments: the first is the address of a Python type object, the " +"second is the address of the C variable (of type :c:expr:`PyObject*`) into " +"which the object pointer is stored. If the Python object does not have the " +"required type, :exc:`TypeError` is raised." +msgstr "" + +#: c-api/arg.rst:672 +msgid "``O&`` (object) [*converter*, *anything*]" +msgstr "``O&`` (objet) [*converter*, *anything*]" + +#: c-api/arg.rst:346 +msgid "" +"Convert a Python object to a C variable through a *converter* function. " +"This takes two arguments: the first is a function, the second is the address " +"of a C variable (of arbitrary type), converted to :c:expr:`void *`. The " +"*converter* function in turn is called as follows::" +msgstr "" + +#: c-api/arg.rst:353 +msgid "" +"where *object* is the Python object to be converted and *address* is the :c:" +"expr:`void*` argument that was passed to the ``PyArg_Parse*`` function. The " +"returned *status* should be ``1`` for a successful conversion and ``0`` if " +"the conversion has failed. When the conversion fails, the *converter* " +"function should raise an exception and leave the content of *address* " +"unmodified." +msgstr "" + +#: c-api/arg.rst:359 +msgid "" +"If the *converter* returns ``Py_CLEANUP_SUPPORTED``, it may get called a " +"second time if the argument parsing eventually fails, giving the converter a " +"chance to release any memory that it had already allocated. In this second " +"call, the *object* parameter will be ``NULL``; *address* will have the same " +"value as in the original call." +msgstr "" + +#: c-api/arg.rst:365 +msgid "``Py_CLEANUP_SUPPORTED`` was added." +msgstr "``Py_CLEANUP_SUPPORTED`` à été ajouté." + +#: c-api/arg.rst:375 +msgid "``p`` (:class:`bool`) [int]" +msgstr "``p`` (:class:`bool`) [``int``]" + +#: c-api/arg.rst:369 +msgid "" +"Tests the value passed in for truth (a boolean **p**\\ redicate) and " +"converts the result to its equivalent C true/false integer value. Sets the " +"int to ``1`` if the expression was true and ``0`` if it was false. This " +"accepts any valid Python value. See :ref:`truth` for more information about " +"how Python tests values for truth." +msgstr "" + +#: c-api/arg.rst:675 +msgid "``(items)`` (:class:`tuple`) [*matching-items*]" +msgstr "``(items)`` (:class:`tuple`) [*matching-items*]" + +#: c-api/arg.rst:378 +msgid "" +"The object must be a Python sequence whose length is the number of format " +"units in *items*. The C arguments must correspond to the individual format " +"units in *items*. Format units for sequences may be nested." +msgstr "" +"L'objet doit être une séquence Python dont la longueur est le nombre " +"d'unités de formats dans *articles*. Les arguments C doivent correspondre à " +"chaque unité de format particulière dans *articles*. Les unités de formats " +"pour les séquences peuvent être imbriquées." + +#: c-api/arg.rst:382 +msgid "" +"It is possible to pass \"long\" integers (integers whose value exceeds the " +"platform's :const:`LONG_MAX`) however no proper range checking is done --- " +"the most significant bits are silently truncated when the receiving field is " +"too small to receive the value (actually, the semantics are inherited from " +"downcasts in C --- your mileage may vary)." +msgstr "" + +#: c-api/arg.rst:388 +msgid "" +"A few other characters have a meaning in a format string. These may not " +"occur inside nested parentheses. They are:" +msgstr "" +"Quelques autres caractères ont un sens dans une chaîne de format. On ne doit " +"pas les trouvées dans des parenthèses imbriquées. Ce sont :" + +#: c-api/arg.rst:396 +msgid "``|``" +msgstr "``|``" + +#: c-api/arg.rst:392 +msgid "" +"Indicates that the remaining arguments in the Python argument list are " +"optional. The C variables corresponding to optional arguments should be " +"initialized to their default value --- when an optional argument is not " +"specified, :c:func:`PyArg_ParseTuple` does not touch the contents of the " +"corresponding C variable(s)." +msgstr "" + +#: c-api/arg.rst:405 +msgid "``$``" +msgstr "``$``" + +#: c-api/arg.rst:399 +msgid "" +":c:func:`PyArg_ParseTupleAndKeywords` only: Indicates that the remaining " +"arguments in the Python argument list are keyword-only. Currently, all " +"keyword-only arguments must also be optional arguments, so ``|`` must always " +"be specified before ``$`` in the format string." +msgstr "" + +#: c-api/arg.rst:410 +msgid "``:``" +msgstr "" + +#: c-api/arg.rst:408 +msgid "" +"The list of format units ends here; the string after the colon is used as " +"the function name in error messages (the \"associated value\" of the " +"exception that :c:func:`PyArg_ParseTuple` raises)." +msgstr "" + +#: c-api/arg.rst:415 +msgid "``;``" +msgstr "" + +#: c-api/arg.rst:413 +msgid "" +"The list of format units ends here; the string after the semicolon is used " +"as the error message *instead* of the default error message. ``:`` and ``;" +"`` mutually exclude each other." +msgstr "" +"La liste des unités de format s'arrête ici ; la chaîne après le point-" +"virgule est utilise comme message d'erreur *au lieu* du message d'erreur par " +"défaut. ``:`` et ``;`` sont mutuellement exclusifs." + +#: c-api/arg.rst:417 +msgid "" +"Note that any Python object references which are provided to the caller are " +"*borrowed* references; do not decrement their reference count!" +msgstr "" +"Notez que n'importe quelles références sur un objet Python qui sont données " +"à l'appelant sont des références *empruntées* ; ne décrémentez pas leur " +"compteur de références !" + +#: c-api/arg.rst:420 +msgid "" +"Additional arguments passed to these functions must be addresses of " +"variables whose type is determined by the format string; these are used to " +"store values from the input tuple. There are a few cases, as described in " +"the list of format units above, where these parameters are used as input " +"values; they should match what is specified for the corresponding format " +"unit in that case." +msgstr "" +"Les arguments additionnels qui sont donnés à ces fonctions doivent être des " +"adresses de variables dont le type est déterminé par la chaîne de format. " +"Elles sont utilisées pour stocker les valeurs du *n*-uplet d'entrée. Il y a " +"quelques cas, comme décrit précédemment dans le liste des unités de formats, " +"où ces paramètres sont utilisés comme valeurs d'entrée. Dans ce cas, ils " +"devraient correspondre à ce qui est spécifié pour l'unité de format " +"correspondante." + +#: c-api/arg.rst:426 +msgid "" +"For the conversion to succeed, the *arg* object must match the format and " +"the format must be exhausted. On success, the ``PyArg_Parse*`` functions " +"return true, otherwise they return false and raise an appropriate exception. " +"When the ``PyArg_Parse*`` functions fail due to conversion failure in one of " +"the format units, the variables at the addresses corresponding to that and " +"the following format units are left untouched." +msgstr "" + +#: c-api/arg.rst:435 +msgid "API Functions" +msgstr "Fonction de l'API" + +#: c-api/arg.rst:439 +msgid "" +"Parse the parameters of a function that takes only positional parameters " +"into local variables. Returns true on success; on failure, it returns false " +"and raises the appropriate exception." +msgstr "" + +#: c-api/arg.rst:446 +msgid "" +"Identical to :c:func:`PyArg_ParseTuple`, except that it accepts a va_list " +"rather than a variable number of arguments." +msgstr "" + +#: c-api/arg.rst:452 +msgid "" +"Parse the parameters of a function that takes both positional and keyword " +"parameters into local variables. The *keywords* argument is a ``NULL``-" +"terminated array of keyword parameter names. Empty names denote :ref:" +"`positional-only parameters `. Returns true on " +"success; on failure, it returns false and raises the appropriate exception." +msgstr "" + +#: c-api/arg.rst:459 +msgid "" +"Added support for :ref:`positional-only parameters `." +msgstr "" + +#: c-api/arg.rst:466 +msgid "" +"Identical to :c:func:`PyArg_ParseTupleAndKeywords`, except that it accepts a " +"va_list rather than a variable number of arguments." +msgstr "" + +#: c-api/arg.rst:472 +msgid "" +"Ensure that the keys in the keywords argument dictionary are strings. This " +"is only needed if :c:func:`PyArg_ParseTupleAndKeywords` is not used, since " +"the latter already does this check." +msgstr "" + +#: c-api/arg.rst:482 +msgid "" +"Function used to deconstruct the argument lists of \"old-style\" functions " +"--- these are functions which use the :const:`METH_OLDARGS` parameter " +"parsing method, which has been removed in Python 3. This is not recommended " +"for use in parameter parsing in new code, and most code in the standard " +"interpreter has been modified to no longer use this for that purpose. It " +"does remain a convenient way to decompose other tuples, however, and may " +"continue to be used for that purpose." +msgstr "" + +#: c-api/arg.rst:493 +msgid "" +"A simpler form of parameter retrieval which does not use a format string to " +"specify the types of the arguments. Functions which use this method to " +"retrieve their parameters should be declared as :const:`METH_VARARGS` in " +"function or method tables. The tuple containing the actual parameters " +"should be passed as *args*; it must actually be a tuple. The length of the " +"tuple must be at least *min* and no more than *max*; *min* and *max* may be " +"equal. Additional arguments must be passed to the function, each of which " +"should be a pointer to a :c:expr:`PyObject*` variable; these will be filled " +"in with the values from *args*; they will contain :term:`borrowed references " +"`. The variables which correspond to optional parameters " +"not given by *args* will not be filled in; these should be initialized by " +"the caller. This function returns true on success and false if *args* is not " +"a tuple or contains the wrong number of elements; an exception will be set " +"if there was a failure." +msgstr "" + +#: c-api/arg.rst:508 +msgid "" +"This is an example of the use of this function, taken from the sources for " +"the :mod:`_weakref` helper module for weak references::" +msgstr "" + +#: c-api/arg.rst:524 +msgid "" +"The call to :c:func:`PyArg_UnpackTuple` in this example is entirely " +"equivalent to this call to :c:func:`PyArg_ParseTuple`::" +msgstr "" + +#: c-api/arg.rst:532 +msgid "Building values" +msgstr "Construction des valeurs" + +#: c-api/arg.rst:536 +msgid "" +"Create a new value based on a format string similar to those accepted by the " +"``PyArg_Parse*`` family of functions and a sequence of values. Returns the " +"value or ``NULL`` in the case of an error; an exception will be raised if " +"``NULL`` is returned." +msgstr "" + +#: c-api/arg.rst:541 +msgid "" +":c:func:`Py_BuildValue` does not always build a tuple. It builds a tuple " +"only if its format string contains two or more format units. If the format " +"string is empty, it returns ``None``; if it contains exactly one format " +"unit, it returns whatever object is described by that format unit. To force " +"it to return a tuple of size 0 or one, parenthesize the format string." +msgstr "" + +#: c-api/arg.rst:547 +msgid "" +"When memory buffers are passed as parameters to supply data to build " +"objects, as for the ``s`` and ``s#`` formats, the required data is copied. " +"Buffers provided by the caller are never referenced by the objects created " +"by :c:func:`Py_BuildValue`. In other words, if your code invokes :c:func:" +"`malloc` and passes the allocated memory to :c:func:`Py_BuildValue`, your " +"code is responsible for calling :c:func:`free` for that memory once :c:func:" +"`Py_BuildValue` returns." +msgstr "" + +#: c-api/arg.rst:555 +msgid "" +"In the following description, the quoted form is the format unit; the entry " +"in (round) parentheses is the Python object type that the format unit will " +"return; and the entry in [square] brackets is the type of the C value(s) to " +"be passed." +msgstr "" + +#: c-api/arg.rst:559 +msgid "" +"The characters space, tab, colon and comma are ignored in format strings " +"(but not within format units such as ``s#``). This can be used to make long " +"format strings a tad more readable." +msgstr "" + +#: c-api/arg.rst:565 +msgid "``s`` (:class:`str` or ``None``) [const char \\*]" +msgstr "``s`` (:class:`str` ou ``None``) [``const char *``]" + +#: c-api/arg.rst:564 +msgid "" +"Convert a null-terminated C string to a Python :class:`str` object using " +"``'utf-8'`` encoding. If the C string pointer is ``NULL``, ``None`` is used." +msgstr "" + +#: c-api/arg.rst:570 +#, fuzzy +msgid "" +"``s#`` (:class:`str` or ``None``) [const char \\*, :c:type:`Py_ssize_t`]" +msgstr "``s#`` (:class:`str` ou ``None``) [``const char *``, ``int``]" + +#: c-api/arg.rst:568 +msgid "" +"Convert a C string and its length to a Python :class:`str` object using " +"``'utf-8'`` encoding. If the C string pointer is ``NULL``, the length is " +"ignored and ``None`` is returned." +msgstr "" + +#: c-api/arg.rst:574 +msgid "``y`` (:class:`bytes`) [const char \\*]" +msgstr "``y`` (:class:`bytes`) [``const char *``]" + +#: c-api/arg.rst:573 +msgid "" +"This converts a C string to a Python :class:`bytes` object. If the C string " +"pointer is ``NULL``, ``None`` is returned." +msgstr "" + +#: c-api/arg.rst:578 +#, fuzzy +msgid "``y#`` (:class:`bytes`) [const char \\*, :c:type:`Py_ssize_t`]" +msgstr "``y#`` (:class:`bytes`) [``const char *, int``]" + +#: c-api/arg.rst:577 +msgid "" +"This converts a C string and its lengths to a Python object. If the C " +"string pointer is ``NULL``, ``None`` is returned." +msgstr "" + +#: c-api/arg.rst:597 +msgid "Same as ``s``." +msgstr "" + +#: c-api/arg.rst:584 +#, fuzzy +msgid "" +"``z#`` (:class:`str` or ``None``) [const char \\*, :c:type:`Py_ssize_t`]" +msgstr "``z#`` (:class:`str` ou ``None``) [``const char *``, ``int``]" + +#: c-api/arg.rst:600 +msgid "Same as ``s#``." +msgstr "" + +#: c-api/arg.rst:589 +msgid "``u`` (:class:`str`) [const wchar_t \\*]" +msgstr "``u`` (:class:`str`) [``const wchar_t *``]" + +#: c-api/arg.rst:587 +msgid "" +"Convert a null-terminated :c:expr:`wchar_t` buffer of Unicode (UTF-16 or " +"UCS-4) data to a Python Unicode object. If the Unicode buffer pointer is " +"``NULL``, ``None`` is returned." +msgstr "" + +#: c-api/arg.rst:594 +#, fuzzy +msgid "``u#`` (:class:`str`) [const wchar_t \\*, :c:type:`Py_ssize_t`]" +msgstr "``u#`` (:class:`str`) [``const wchar_t *``, ``int``]" + +#: c-api/arg.rst:592 +msgid "" +"Convert a Unicode (UTF-16 or UCS-4) data buffer and its length to a Python " +"Unicode object. If the Unicode buffer pointer is ``NULL``, the length is " +"ignored and ``None`` is returned." +msgstr "" + +#: c-api/arg.rst:597 +msgid "``U`` (:class:`str` or ``None``) [const char \\*]" +msgstr "``U`` (:class:`str` ou ``None``) [``const char *``]" + +#: c-api/arg.rst:600 +#, fuzzy +msgid "" +"``U#`` (:class:`str` or ``None``) [const char \\*, :c:type:`Py_ssize_t`]" +msgstr "``U#`` (:class:`str` ou ``None``) [``const char *``, ``int``]" + +#: c-api/arg.rst:603 +#, fuzzy +msgid "Convert a plain C :c:expr:`int` to a Python integer object." +msgstr "Convertit un :c:type:`long int` en un *int* Python." + +#: c-api/arg.rst:606 +msgid "``b`` (:class:`int`) [char]" +msgstr "``b`` (:class:`int`) [``char``]" + +#: c-api/arg.rst:606 +#, fuzzy +msgid "Convert a plain C :c:expr:`char` to a Python integer object." +msgstr "Convertit un :c:type:`long int` en un *int* Python." + +#: c-api/arg.rst:609 +#, fuzzy +msgid "Convert a plain C :c:expr:`short int` to a Python integer object." +msgstr "Convertit un :c:type:`long int` en un *int* Python." + +#: c-api/arg.rst:612 +#, fuzzy +msgid "Convert a C :c:expr:`long int` to a Python integer object." +msgstr "Convertit un :c:type:`long int` en un *int* Python." + +#: c-api/arg.rst:615 +#, fuzzy +msgid "Convert a C :c:expr:`unsigned char` to a Python integer object." +msgstr "Convertit un :c:type:`long int` en un *int* Python." + +#: c-api/arg.rst:618 +#, fuzzy +msgid "Convert a C :c:expr:`unsigned short int` to a Python integer object." +msgstr "Convertit un :c:type:`long int` en un *int* Python." + +#: c-api/arg.rst:621 +#, fuzzy +msgid "Convert a C :c:expr:`unsigned int` to a Python integer object." +msgstr "Convertit un :c:type:`long int` en un *int* Python." + +#: c-api/arg.rst:624 +#, fuzzy +msgid "Convert a C :c:expr:`unsigned long` to a Python integer object." +msgstr "Convertit un :c:type:`long int` en un *int* Python." + +#: c-api/arg.rst:627 +#, fuzzy +msgid "Convert a C :c:expr:`long long` to a Python integer object." +msgstr "Convertit un :c:type:`long int` en un *int* Python." + +#: c-api/arg.rst:630 +#, fuzzy +msgid "Convert a C :c:expr:`unsigned long long` to a Python integer object." +msgstr "Convertit un :c:type:`long int` en un *int* Python." + +#: c-api/arg.rst:633 +msgid "Convert a C :c:type:`Py_ssize_t` to a Python integer." +msgstr "" + +#: c-api/arg.rst:637 +msgid "``c`` (:class:`bytes` of length 1) [char]" +msgstr "``c`` (:class:`bytes` de taille 1) [``char``]" + +#: c-api/arg.rst:636 +#, fuzzy +msgid "" +"Convert a C :c:expr:`int` representing a byte to a Python :class:`bytes` " +"object of length 1." +msgstr "" +"Convertit un caractère Python, représenté comme un objet :class:`str` de " +"longueur 1, en un :c:type:`int` C." + +#: c-api/arg.rst:640 +#, fuzzy +msgid "" +"Convert a C :c:expr:`int` representing a character to Python :class:`str` " +"object of length 1." +msgstr "" +"Convertit un caractère Python, représenté comme un objet :class:`str` de " +"longueur 1, en un :c:type:`int` C." + +#: c-api/arg.rst:644 +#, fuzzy +msgid "Convert a C :c:expr:`double` to a Python floating point number." +msgstr "Convertit un :c:type:`long int` en un *int* Python." + +#: c-api/arg.rst:647 +#, fuzzy +msgid "Convert a C :c:expr:`float` to a Python floating point number." +msgstr "Convertit un :c:type:`long int` en un *int* Python." + +#: c-api/arg.rst:650 +msgid "``D`` (:class:`complex`) [Py_complex \\*]" +msgstr "``D`` (:class:`complex`) [``Py_complex *``]" + +#: c-api/arg.rst:650 +msgid "Convert a C :c:type:`Py_complex` structure to a Python complex number." +msgstr "" + +#: c-api/arg.rst:653 +msgid "" +"Pass a Python object untouched (except for its reference count, which is " +"incremented by one). If the object passed in is a ``NULL`` pointer, it is " +"assumed that this was caused because the call producing the argument found " +"an error and set an exception. Therefore, :c:func:`Py_BuildValue` will " +"return ``NULL`` but won't raise an exception. If no exception has been " +"raised yet, :exc:`SystemError` is set." +msgstr "" + +#: c-api/arg.rst:661 +msgid "``S`` (object) [PyObject \\*]" +msgstr "``S`` (objet) [``PyObject *``]" + +#: c-api/arg.rst:661 +msgid "Same as ``O``." +msgstr "" + +#: c-api/arg.rst:666 +msgid "``N`` (object) [PyObject \\*]" +msgstr "``N`` (objet) [``PyObject *``]" + +#: c-api/arg.rst:664 +msgid "" +"Same as ``O``, except it doesn't increment the reference count on the " +"object. Useful when the object is created by a call to an object constructor " +"in the argument list." +msgstr "" + +#: c-api/arg.rst:669 +msgid "" +"Convert *anything* to a Python object through a *converter* function. The " +"function is called with *anything* (which should be compatible with :c:expr:" +"`void*`) as its argument and should return a \"new\" Python object, or " +"``NULL`` if an error occurred." +msgstr "" + +#: c-api/arg.rst:675 +msgid "" +"Convert a sequence of C values to a Python tuple with the same number of " +"items." +msgstr "" + +#: c-api/arg.rst:678 +msgid "``[items]`` (:class:`list`) [*matching-items*]" +msgstr "``[items]`` (:class:`list`) [*matching-items*]" + +#: c-api/arg.rst:678 +msgid "" +"Convert a sequence of C values to a Python list with the same number of " +"items." +msgstr "" + +#: c-api/arg.rst:683 +msgid "``{items}`` (:class:`dict`) [*matching-items*]" +msgstr "``{items}`` (:class:`dict`) [*matching-items*]" + +#: c-api/arg.rst:681 +msgid "" +"Convert a sequence of C values to a Python dictionary. Each pair of " +"consecutive C values adds one item to the dictionary, serving as key and " +"value, respectively." +msgstr "" + +#: c-api/arg.rst:685 +msgid "" +"If there is an error in the format string, the :exc:`SystemError` exception " +"is set and ``NULL`` returned." +msgstr "" + +#: c-api/arg.rst:690 +msgid "" +"Identical to :c:func:`Py_BuildValue`, except that it accepts a va_list " +"rather than a variable number of arguments." +msgstr "" + +#~ msgid "" +#~ "Some formats require a read-only :term:`bytes-like object`, and set a " +#~ "pointer instead of a buffer structure. They work by checking that the " +#~ "object's :c:member:`PyBufferProcs.bf_releasebuffer` field is ``NULL``, " +#~ "which disallows mutable objects such as :class:`bytearray`." +#~ msgstr "" +#~ "Certains formats requièrent un :term:`objet compatible avec une chaîne " +#~ "d'octets ` en lecture seule, et définissent un " +#~ "pointeur à la place d'une structure tampon. Ils fonctionnent en vérifiant " +#~ "que le champ :c:member:`PyBufferProcs.bf_releasebuffer` de l'objet est " +#~ "*NULL*, ce qui n'autorise pas les objets muables tels que :class:" +#~ "`bytearray`." + +#~ msgid "" +#~ "For all ``#`` variants of formats (``s#``, ``y#``, etc.), the type of the " +#~ "length argument (int or :c:type:`Py_ssize_t`) is controlled by defining " +#~ "the macro :c:macro:`PY_SSIZE_T_CLEAN` before including :file:`Python.h`. " +#~ "If the macro was defined, length is a :c:type:`Py_ssize_t` rather than " +#~ "an :c:type:`int`. This behavior will change in a future Python version to " +#~ "only support :c:type:`Py_ssize_t` and drop :c:type:`int` support. It is " +#~ "best to always define :c:macro:`PY_SSIZE_T_CLEAN`." +#~ msgstr "" +#~ "Pour toutes les variantes du marqueur ``#`` (``s#``, ``y#``, etc), le " +#~ "type de l'argument *length* (*int* ou :c:type:`Py_ssize_t`) est contrôlé " +#~ "en définissant la macro :c:macro:`PY_SSIZE_T_CLEAN` avant d'inclure le " +#~ "fichier :file:`Python.h`. Si la macro est définie, la longueur est de " +#~ "type :c:type:`Py_ssize_t` au lieu d'être de type :c:type:`int`. Ce " +#~ "comportement changera dans une future version de Python, qui supportera " +#~ "seulement :c:type:`Py_ssize_t` a la place de :c:type:`int`. Il est " +#~ "préférable de toujours définir :c:macro:`PY_SSIZE_T_CLEAN`." diff --git a/c-api/bool.po b/c-api/bool.po new file mode 100644 index 0000000000..4394ddb715 --- /dev/null +++ b/c-api/bool.po @@ -0,0 +1,83 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-11-04 18:14+0100\n" +"PO-Revision-Date: 2021-10-27 19:19+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 3.0\n" + +#: c-api/bool.rst:6 +msgid "Boolean Objects" +msgstr "Les objets booléens" + +#: c-api/bool.rst:8 +msgid "" +"Booleans in Python are implemented as a subclass of integers. There are " +"only two booleans, :const:`Py_False` and :const:`Py_True`. As such, the " +"normal creation and deletion functions don't apply to booleans. The " +"following macros are available, however." +msgstr "" +"Les booléens en Python sont implémentés comme une classe dérivée des " +"entiers. Il y a seulement deux booléens, :const:`Py_False` et :const:" +"`Py_True`. Comme tel, les fonctions de création de suppression ne " +"s'appliquent pas aux booléens. Toutefois, les macros suivantes sont " +"disponibles." + +#: c-api/bool.rst:16 +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`. Cette fonction " +"réussit systématiquement." + +#: c-api/bool.rst:22 +msgid "" +"The Python ``False`` object. This object has no methods. It needs to be " +"treated just like any other object with respect to reference counts." +msgstr "" +"L'objet Python ``False``. Cet objet n'a pas de méthodes. En ce qui concerne " +"le comptage de référence, il doit être traité comme n'importe quel autre " +"objet." + +#: c-api/bool.rst:28 +msgid "" +"The Python ``True`` object. This object has no methods. It needs to be " +"treated just like any other object with respect to reference counts." +msgstr "" +"L'objet Python ``True``. Cet objet n'a pas de méthodes. En ce qui concerne " +"le comptage de références, il doit être traité comme n'importe quel autre " +"objet." + +#: c-api/bool.rst:34 +msgid "" +"Return :const:`Py_False` from a function, properly incrementing its " +"reference count." +msgstr "" +"Renvoie :const:`Py_False` depuis une fonction tout en incrémentant son " +"nombre de références." + +#: c-api/bool.rst:40 +msgid "" +"Return :const:`Py_True` from a function, properly incrementing its reference " +"count." +msgstr "" +"Renvoie :const:`Py_True` depuis une fonction, en incrémentant son nombre de " +"références." + +#: c-api/bool.rst:46 +msgid "" +"Return a new reference to :const:`Py_True` or :const:`Py_False` depending on " +"the truth value of *v*." +msgstr "" +"Renvoie une nouvelle référence de :const:`Py_True` ou :const:`Py_False` en " +"fonction de la valeur de *v*." diff --git a/c-api/buffer.po b/c-api/buffer.po new file mode 100644 index 0000000000..dc4feeb0e1 --- /dev/null +++ b/c-api/buffer.po @@ -0,0 +1,713 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-04-05 10:05+0200\n" +"PO-Revision-Date: 2021-10-27 21:13+0200\n" +"Last-Translator: David GIRAUD \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 3.0\n" + +#: c-api/buffer.rst:11 +msgid "Buffer Protocol" +msgstr "Protocole tampon" + +#: c-api/buffer.rst:18 +msgid "" +"Certain objects available in Python wrap access to an underlying memory " +"array or *buffer*. Such objects include the built-in :class:`bytes` and :" +"class:`bytearray`, and some extension types like :class:`array.array`. Third-" +"party libraries may define their own types for special purposes, such as " +"image processing or numeric analysis." +msgstr "" +"Certains objets Python enveloppent l'accès à un tableau de mémoire sous-" +"jacente (nommée zone tampon ou simplement tampon, *buffer* en anglais). Les " +"objets natifs :class:`bytes` et :class:`bytearray` en sont des exemples, " +"ainsi que quelques types d'extension comme :class:`array.array`. Les " +"bibliothèques tierces peuvent définir leurs propres types à des fins " +"spéciales, telles que le traitement d'image ou l'analyse numérique." + +#: c-api/buffer.rst:24 +msgid "" +"While each of these types have their own semantics, they share the common " +"characteristic of being backed by a possibly large memory buffer. It is " +"then desirable, in some situations, to access that buffer directly and " +"without intermediate copying." +msgstr "" +"Alors que chacun de ces types a sa propre sémantique, ils partagent la " +"caractéristique commune d'être soutenus par un tampon de mémoire important. " +"Il est donc souhaitable, dans certains cas, d'accéder à cette mémoire " +"directement sans l'étape intermédiaire de copie." + +#: c-api/buffer.rst:29 +msgid "" +"Python provides such a facility at the C level in the form of the :ref:" +"`buffer protocol `. This protocol has two sides:" +msgstr "" +"Python fournit une telle facilité au niveau du C sous la forme de :ref:" +"`protocole tampon `. Ce protocole comporte deux aspects :" + +#: c-api/buffer.rst:34 +msgid "" +"on the producer side, a type can export a \"buffer interface\" which allows " +"objects of that type to expose information about their underlying buffer. " +"This interface is described in the section :ref:`buffer-structs`;" +msgstr "" +"du côté producteur, un type peut exporter une \"interface tampon\" qui " +"permet aux objets de ce type d'exposer des informations concernant leur " +"tampon sous-jacent. Cette interface est décrite dans la section :ref:`buffer-" +"structs` ;" + +#: c-api/buffer.rst:38 +msgid "" +"on the consumer side, several means are available to obtain a pointer to the " +"raw underlying data of an object (for example a method parameter)." +msgstr "" +"du côté consommateur, plusieurs moyens sont disponibles pour obtenir un " +"pointeur vers les données sous-jacentes brutes d'un objet (par exemple un " +"paramètre de méthode)." + +#: c-api/buffer.rst:41 +msgid "" +"Simple objects such as :class:`bytes` and :class:`bytearray` expose their " +"underlying buffer in byte-oriented form. Other forms are possible; for " +"example, the elements exposed by an :class:`array.array` can be multi-byte " +"values." +msgstr "" +"Des objets simples tels que :class:`bytes` et :class:`bytearray` exposent " +"leur tampon sous-jacent dans un format orienté octet. D'autres formes sont " +"possibles ; par exemple, les éléments exposés par un :class:`array.array` " +"peuvent être des valeurs multi-octets." + +#: c-api/buffer.rst:45 +msgid "" +"An example consumer of the buffer interface is the :meth:`~io.BufferedIOBase." +"write` method of file objects: any object that can export a series of bytes " +"through the buffer interface can be written to a file. While :meth:`write` " +"only needs read-only access to the internal contents of the object passed to " +"it, other methods such as :meth:`~io.BufferedIOBase.readinto` need write " +"access to the contents of their argument. The buffer interface allows " +"objects to selectively allow or reject exporting of read-write and read-only " +"buffers." +msgstr "" +"Un exemple de consommateur de l'interface tampon est la méthode :meth:`~io." +"BufferedIOBase.write` des objets fichiers : tout objet qui peut exporter une " +"série d'octets à travers l'interface tampon peut être écrit dans un fichier. " +"Alors que :meth:`write` n'a besoin que d'un accès lecture au contenu " +"interne de l'objet qui lui est passé, d'autres méthodes telles que :meth:" +"`~io.BufferedIOBase.readinto` nécessitent un accès écriture au contenu de " +"leur argument. L'interface *buffer* permet aux objets d'autoriser ou de " +"rejeter sélectivement l'exportation de tampons en mode lecture-écriture et " +"en mode lecture seule." + +#: c-api/buffer.rst:53 +msgid "" +"There are two ways for a consumer of the buffer interface to acquire a " +"buffer over a target object:" +msgstr "" +"Un consommateur de l'interface tampon peut acquérir un tampon sur un objet " +"cible de deux manières :" + +#: c-api/buffer.rst:56 +msgid "call :c:func:`PyObject_GetBuffer` with the right parameters;" +msgstr "appelez :c:func:`PyObject_GetBuffer` avec les paramètres appropriés ;" + +#: c-api/buffer.rst:58 +msgid "" +"call :c:func:`PyArg_ParseTuple` (or one of its siblings) with one of the " +"``y*``, ``w*`` or ``s*`` :ref:`format codes `." +msgstr "" +"appelez :c:func:`PyArg_ParseTuple` (ou l'un de ses fonctions sœurs) avec " +"l'un des ``y*``, ``w*`` ou ``s*`` :ref:`format codes `." + +#: c-api/buffer.rst:61 +msgid "" +"In both cases, :c:func:`PyBuffer_Release` must be called when the buffer " +"isn't needed anymore. Failure to do so could lead to various issues such as " +"resource leaks." +msgstr "" +"Dans les deux cas, :c:func:`PyBuffer_Release` doit être appelée quand le " +"tampon n'est plus nécessaire. Ne pas le faire peut conduire à divers " +"problèmes tels que des fuites de ressources." + +#: c-api/buffer.rst:69 +msgid "Buffer structure" +msgstr "La structure *buffer*" + +#: c-api/buffer.rst:71 +msgid "" +"Buffer structures (or simply \"buffers\") are useful as a way to expose the " +"binary data from another object to the Python programmer. They can also be " +"used as a zero-copy slicing mechanism. Using their ability to reference a " +"block of memory, it is possible to expose any data to the Python programmer " +"quite easily. The memory could be a large, constant array in a C extension, " +"it could be a raw block of memory for manipulation before passing to an " +"operating system library, or it could be used to pass around structured data " +"in its native, in-memory format." +msgstr "" +"Les structures tampons (ou simplement les \"tampons\", *buffers* en anglais) " +"sont utiles pour exposer les données binaires d'un autre objet au " +"programmeur Python. Elles peuvent également être utilisées comme un " +"mécanisme de découpage sans copie. En utilisant leur capacité à référencer " +"un bloc de mémoire, il est possible d'exposer toutes les données au " +"programmeur Python assez facilement. La mémoire peut être un grand tableau " +"constant dans une extension C, il peut s'agir d'un bloc brut de mémoire à " +"manipuler avant de passer à une bibliothèque de système d'exploitation ou " +"être utilisé pour transmettre des données structurées dans son format natif " +"en mémoire." + +#: c-api/buffer.rst:80 +msgid "" +"Contrary to most data types exposed by the Python interpreter, buffers are " +"not :c:type:`PyObject` pointers but rather simple C structures. This allows " +"them to be created and copied very simply. When a generic wrapper around a " +"buffer is needed, a :ref:`memoryview ` object can be " +"created." +msgstr "" +"Contrairement à la plupart des types de données exposés par l'interpréteur " +"Python, les tampons ne sont pas de simples pointeurs vers :c:type:`PyObject` " +"mais plutôt des structures C simples. Cela leur permet d'être créés et " +"copiés très simplement. lorsque vous avez besoin d'une enveloppe générique " +"(*wrapper* en anglais) pour un tampon, un objet :ref:`memoryview ` peut être créé." + +#: c-api/buffer.rst:86 +msgid "" +"For short instructions how to write an exporting object, see :ref:`Buffer " +"Object Structures `. For obtaining a buffer, see :c:func:" +"`PyObject_GetBuffer`." +msgstr "" + +#: c-api/buffer.rst:94 +msgid "" +"A pointer to the start of the logical structure described by the buffer " +"fields. This can be any location within the underlying physical memory block " +"of the exporter. For example, with negative :c:member:`~Py_buffer.strides` " +"the value may point to the end of the memory block." +msgstr "" + +#: c-api/buffer.rst:99 +msgid "" +"For :term:`contiguous` arrays, the value points to the beginning of the " +"memory block." +msgstr "" + +#: c-api/buffer.rst:104 +msgid "" +"A new reference to the exporting object. The reference is owned by the " +"consumer and automatically decremented and set to ``NULL`` by :c:func:" +"`PyBuffer_Release`. The field is the equivalent of the return value of any " +"standard C-API function." +msgstr "" + +#: c-api/buffer.rst:109 +msgid "" +"As a special case, for *temporary* buffers that are wrapped by :c:func:" +"`PyMemoryView_FromBuffer` or :c:func:`PyBuffer_FillInfo` this field is " +"``NULL``. In general, exporting objects MUST NOT use this scheme." +msgstr "" + +#: c-api/buffer.rst:116 +msgid "" +"``product(shape) * itemsize``. For contiguous arrays, this is the length of " +"the underlying memory block. For non-contiguous arrays, it is the length " +"that the logical structure would have if it were copied to a contiguous " +"representation." +msgstr "" + +#: c-api/buffer.rst:121 +msgid "" +"Accessing ``((char *)buf)[0] up to ((char *)buf)[len-1]`` is only valid if " +"the buffer has been obtained by a request that guarantees contiguity. In " +"most cases such a request will be :c:macro:`PyBUF_SIMPLE` or :c:macro:" +"`PyBUF_WRITABLE`." +msgstr "" + +#: c-api/buffer.rst:127 +msgid "" +"An indicator of whether the buffer is read-only. This field is controlled by " +"the :c:macro:`PyBUF_WRITABLE` flag." +msgstr "" + +#: c-api/buffer.rst:132 +msgid "" +"Item size in bytes of a single element. Same as the value of :func:`struct." +"calcsize` called on non-``NULL`` :c:member:`~Py_buffer.format` values." +msgstr "" + +#: c-api/buffer.rst:135 +msgid "" +"Important exception: If a consumer requests a buffer without the :c:macro:" +"`PyBUF_FORMAT` flag, :c:member:`~Py_buffer.format` will be set to " +"``NULL``, but :c:member:`~Py_buffer.itemsize` still has the value for the " +"original format." +msgstr "" + +#: c-api/buffer.rst:140 +msgid "" +"If :c:member:`~Py_buffer.shape` is present, the equality ``product(shape) * " +"itemsize == len`` still holds and the consumer can use :c:member:`~Py_buffer." +"itemsize` to navigate the buffer." +msgstr "" + +#: c-api/buffer.rst:144 +msgid "" +"If :c:member:`~Py_buffer.shape` is ``NULL`` as a result of a :c:macro:" +"`PyBUF_SIMPLE` or a :c:macro:`PyBUF_WRITABLE` request, the consumer must " +"disregard :c:member:`~Py_buffer.itemsize` and assume ``itemsize == 1``." +msgstr "" + +#: c-api/buffer.rst:150 +msgid "" +"A *NUL* terminated string in :mod:`struct` module style syntax describing " +"the contents of a single item. If this is ``NULL``, ``\"B\"`` (unsigned " +"bytes) is assumed." +msgstr "" + +#: c-api/buffer.rst:154 +msgid "This field is controlled by the :c:macro:`PyBUF_FORMAT` flag." +msgstr "" + +#: c-api/buffer.rst:158 +msgid "" +"The number of dimensions the memory represents as an n-dimensional array. If " +"it is ``0``, :c:member:`~Py_buffer.buf` points to a single item representing " +"a scalar. In this case, :c:member:`~Py_buffer.shape`, :c:member:`~Py_buffer." +"strides` and :c:member:`~Py_buffer.suboffsets` MUST be ``NULL``." +msgstr "" + +#: c-api/buffer.rst:163 +msgid "" +"The macro :c:macro:`PyBUF_MAX_NDIM` limits the maximum number of dimensions " +"to 64. Exporters MUST respect this limit, consumers of multi-dimensional " +"buffers SHOULD be able to handle up to :c:macro:`PyBUF_MAX_NDIM` dimensions." +msgstr "" + +#: c-api/buffer.rst:169 +msgid "" +"An array of :c:type:`Py_ssize_t` of length :c:member:`~Py_buffer.ndim` " +"indicating the shape of the memory as an n-dimensional array. Note that " +"``shape[0] * ... * shape[ndim-1] * itemsize`` MUST be equal to :c:member:" +"`~Py_buffer.len`." +msgstr "" + +#: c-api/buffer.rst:174 +msgid "" +"Shape values are restricted to ``shape[n] >= 0``. The case ``shape[n] == 0`` " +"requires special attention. See `complex arrays`_ for further information." +msgstr "" + +#: c-api/buffer.rst:178 +msgid "The shape array is read-only for the consumer." +msgstr "" + +#: c-api/buffer.rst:182 +msgid "" +"An array of :c:type:`Py_ssize_t` of length :c:member:`~Py_buffer.ndim` " +"giving the number of bytes to skip to get to a new element in each dimension." +msgstr "" + +#: c-api/buffer.rst:186 +msgid "" +"Stride values can be any integer. For regular arrays, strides are usually " +"positive, but a consumer MUST be able to handle the case ``strides[n] <= " +"0``. See `complex arrays`_ for further information." +msgstr "" + +#: c-api/buffer.rst:190 +msgid "The strides array is read-only for the consumer." +msgstr "" + +#: c-api/buffer.rst:194 +msgid "" +"An array of :c:type:`Py_ssize_t` of length :c:member:`~Py_buffer.ndim`. If " +"``suboffsets[n] >= 0``, the values stored along the nth dimension are " +"pointers and the suboffset value dictates how many bytes to add to each " +"pointer after de-referencing. A suboffset value that is negative indicates " +"that no de-referencing should occur (striding in a contiguous memory block)." +msgstr "" + +#: c-api/buffer.rst:201 +msgid "" +"If all suboffsets are negative (i.e. no de-referencing is needed), then this " +"field must be ``NULL`` (the default value)." +msgstr "" + +#: c-api/buffer.rst:204 +msgid "" +"This type of array representation is used by the Python Imaging Library " +"(PIL). See `complex arrays`_ for further information how to access elements " +"of such an array." +msgstr "" + +#: c-api/buffer.rst:208 +msgid "The suboffsets array is read-only for the consumer." +msgstr "" + +#: c-api/buffer.rst:212 +msgid "" +"This is for use internally by the exporting object. For example, this might " +"be re-cast as an integer by the exporter and used to store flags about " +"whether or not the shape, strides, and suboffsets arrays must be freed when " +"the buffer is released. The consumer MUST NOT alter this value." +msgstr "" + +#: c-api/buffer.rst:221 +msgid "Buffer request types" +msgstr "" + +#: c-api/buffer.rst:223 +msgid "" +"Buffers are usually obtained by sending a buffer request to an exporting " +"object via :c:func:`PyObject_GetBuffer`. Since the complexity of the logical " +"structure of the memory can vary drastically, the consumer uses the *flags* " +"argument to specify the exact buffer type it can handle." +msgstr "" + +#: c-api/buffer.rst:228 +msgid "" +"All :c:data:`Py_buffer` fields are unambiguously defined by the request type." +msgstr "" + +#: c-api/buffer.rst:232 +msgid "request-independent fields" +msgstr "" + +#: c-api/buffer.rst:233 +msgid "" +"The following fields are not influenced by *flags* and must always be filled " +"in with the correct values: :c:member:`~Py_buffer.obj`, :c:member:" +"`~Py_buffer.buf`, :c:member:`~Py_buffer.len`, :c:member:`~Py_buffer." +"itemsize`, :c:member:`~Py_buffer.ndim`." +msgstr "" + +#: c-api/buffer.rst:239 +msgid "readonly, format" +msgstr "" + +#: c-api/buffer.rst:243 +msgid "" +"Controls the :c:member:`~Py_buffer.readonly` field. If set, the exporter " +"MUST provide a writable buffer or else report failure. Otherwise, the " +"exporter MAY provide either a read-only or writable buffer, but the choice " +"MUST be consistent for all consumers." +msgstr "" + +#: c-api/buffer.rst:250 +msgid "" +"Controls the :c:member:`~Py_buffer.format` field. If set, this field MUST be " +"filled in correctly. Otherwise, this field MUST be ``NULL``." +msgstr "" + +#: c-api/buffer.rst:254 +msgid "" +":c:macro:`PyBUF_WRITABLE` can be \\|'d to any of the flags in the next " +"section. Since :c:macro:`PyBUF_SIMPLE` is defined as 0, :c:macro:" +"`PyBUF_WRITABLE` can be used as a stand-alone flag to request a simple " +"writable buffer." +msgstr "" + +#: c-api/buffer.rst:258 +msgid "" +":c:macro:`PyBUF_FORMAT` can be \\|'d to any of the flags except :c:macro:" +"`PyBUF_SIMPLE`. The latter already implies format ``B`` (unsigned bytes)." +msgstr "" + +#: c-api/buffer.rst:263 +msgid "shape, strides, suboffsets" +msgstr "" + +#: c-api/buffer.rst:265 +msgid "" +"The flags that control the logical structure of the memory are listed in " +"decreasing order of complexity. Note that each flag contains all bits of the " +"flags below it." +msgstr "" + +#: c-api/buffer.rst:296 c-api/buffer.rst:321 +msgid "Request" +msgstr "" + +#: c-api/buffer.rst:296 c-api/buffer.rst:321 +msgid "shape" +msgstr "" + +#: c-api/buffer.rst:296 c-api/buffer.rst:321 +msgid "strides" +msgstr "" + +#: c-api/buffer.rst:296 c-api/buffer.rst:321 +msgid "suboffsets" +msgstr "" + +#: c-api/buffer.rst:276 c-api/buffer.rst:298 c-api/buffer.rst:302 +#: c-api/buffer.rst:323 c-api/buffer.rst:327 c-api/buffer.rst:331 +#: c-api/buffer.rst:335 c-api/buffer.rst:337 +msgid "yes" +msgstr "oui" + +#: c-api/buffer.rst:323 c-api/buffer.rst:325 +msgid "if needed" +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 +#: c-api/buffer.rst:337 +msgid "NULL" +msgstr "" + +#: c-api/buffer.rst:287 +msgid "contiguity requests" +msgstr "" + +#: c-api/buffer.rst:289 +msgid "" +"C or Fortran :term:`contiguity ` can be explicitly requested, " +"with and without stride information. Without stride information, the buffer " +"must be C-contiguous." +msgstr "" + +#: c-api/buffer.rst:321 +msgid "contig" +msgstr "" + +#: c-api/buffer.rst:304 c-api/buffer.rst:337 +msgid "C" +msgstr "" + +#: c-api/buffer.rst:300 +msgid "F" +msgstr "F" + +#: c-api/buffer.rst:302 +msgid "C or F" +msgstr "" + +#: c-api/buffer.rst:304 +msgid ":c:macro:`PyBUF_ND`" +msgstr "" + +#: c-api/buffer.rst:309 +msgid "compound requests" +msgstr "" + +#: c-api/buffer.rst:311 +msgid "" +"All possible requests are fully defined by some combination of the flags in " +"the previous section. For convenience, the buffer protocol provides " +"frequently used combinations as single flags." +msgstr "" + +#: c-api/buffer.rst:315 +msgid "" +"In the following table *U* stands for undefined contiguity. The consumer " +"would have to call :c:func:`PyBuffer_IsContiguous` to determine contiguity." +msgstr "" + +#: c-api/buffer.rst:321 +msgid "readonly" +msgstr "lecture seule" + +#: c-api/buffer.rst:321 +msgid "format" +msgstr "format" + +#: c-api/buffer.rst:325 c-api/buffer.rst:329 c-api/buffer.rst:333 +msgid "U" +msgstr "" + +#: c-api/buffer.rst:327 c-api/buffer.rst:335 +msgid "0" +msgstr "0" + +#: c-api/buffer.rst:329 c-api/buffer.rst:337 +msgid "1 or 0" +msgstr "0 ou 1" + +#: c-api/buffer.rst:342 +msgid "Complex arrays" +msgstr "" + +#: c-api/buffer.rst:345 +msgid "NumPy-style: shape and strides" +msgstr "" + +#: c-api/buffer.rst:347 +msgid "" +"The logical structure of NumPy-style arrays is defined by :c:member:" +"`~Py_buffer.itemsize`, :c:member:`~Py_buffer.ndim`, :c:member:`~Py_buffer." +"shape` and :c:member:`~Py_buffer.strides`." +msgstr "" + +#: c-api/buffer.rst:350 +msgid "" +"If ``ndim == 0``, the memory location pointed to by :c:member:`~Py_buffer." +"buf` is interpreted as a scalar of size :c:member:`~Py_buffer.itemsize`. In " +"that case, both :c:member:`~Py_buffer.shape` and :c:member:`~Py_buffer." +"strides` are ``NULL``." +msgstr "" + +#: c-api/buffer.rst:354 +msgid "" +"If :c:member:`~Py_buffer.strides` is ``NULL``, the array is interpreted as a " +"standard n-dimensional C-array. Otherwise, the consumer must access an n-" +"dimensional array as follows:" +msgstr "" + +#: c-api/buffer.rst:364 +msgid "" +"As noted above, :c:member:`~Py_buffer.buf` can point to any location within " +"the actual memory block. An exporter can check the validity of a buffer with " +"this function:" +msgstr "" + +#: c-api/buffer.rst:398 +msgid "PIL-style: shape, strides and suboffsets" +msgstr "" + +#: c-api/buffer.rst:400 +msgid "" +"In addition to the regular items, PIL-style arrays can contain pointers that " +"must be followed in order to get to the next element in a dimension. For " +"example, the regular three-dimensional C-array ``char v[2][2][3]`` can also " +"be viewed as an array of 2 pointers to 2 two-dimensional arrays: ``char " +"(*v[2])[2][3]``. In suboffsets representation, those two pointers can be " +"embedded at the start of :c:member:`~Py_buffer.buf`, pointing to two ``char " +"x[2][3]`` arrays that can be located anywhere in memory." +msgstr "" + +#: c-api/buffer.rst:409 +msgid "" +"Here is a function that returns a pointer to the element in an N-D array " +"pointed to by an N-dimensional index when there are both non-``NULL`` " +"strides and suboffsets::" +msgstr "" + +#: c-api/buffer.rst:428 +msgid "Buffer-related functions" +msgstr "Fonctions relatives aux tampons" + +#: c-api/buffer.rst:432 +msgid "" +"Return ``1`` if *obj* supports the buffer interface otherwise ``0``. When " +"``1`` is returned, it doesn't guarantee that :c:func:`PyObject_GetBuffer` " +"will succeed. This function always succeeds." +msgstr "" + +#: c-api/buffer.rst:439 +msgid "" +"Send a request to *exporter* to fill in *view* as specified by *flags*. If " +"the exporter cannot provide a buffer of the exact type, it MUST raise :c:" +"data:`PyExc_BufferError`, set ``view->obj`` to ``NULL`` and return ``-1``." +msgstr "" + +#: c-api/buffer.rst:444 +msgid "" +"On success, fill in *view*, set ``view->obj`` to a new reference to " +"*exporter* and return 0. In the case of chained buffer providers that " +"redirect requests to a single object, ``view->obj`` MAY refer to this object " +"instead of *exporter* (See :ref:`Buffer Object Structures `)." +msgstr "" + +#: c-api/buffer.rst:449 +msgid "" +"Successful calls to :c:func:`PyObject_GetBuffer` must be paired with calls " +"to :c:func:`PyBuffer_Release`, similar to :c:func:`malloc` and :c:func:" +"`free`. Thus, after the consumer is done with the buffer, :c:func:" +"`PyBuffer_Release` must be called exactly once." +msgstr "" + +#: c-api/buffer.rst:457 +msgid "" +"Release the buffer *view* and decrement the reference count for ``view-" +">obj``. This function MUST be called when the buffer is no longer being " +"used, otherwise reference leaks may occur." +msgstr "" + +#: c-api/buffer.rst:461 +msgid "" +"It is an error to call this function on a buffer that was not obtained via :" +"c:func:`PyObject_GetBuffer`." +msgstr "" + +#: c-api/buffer.rst:467 +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 "" +"Return ``1`` if the memory defined by the *view* is C-style (*order* is " +"``'C'``) or Fortran-style (*order* is ``'F'``) :term:`contiguous` or either " +"one (*order* is ``'A'``). Return ``0`` otherwise. This function always " +"succeeds." +msgstr "" + +#: c-api/buffer.rst:482 +msgid "" +"Get the memory area pointed to by the *indices* inside the given *view*. " +"*indices* must point to an array of ``view->ndim`` indices." +msgstr "" + +#: c-api/buffer.rst:488 +msgid "" +"Copy contiguous *len* bytes from *buf* to *view*. *fort* can be ``'C'`` or " +"``'F'`` (for C-style or Fortran-style ordering). ``0`` is returned on " +"success, ``-1`` on error." +msgstr "" + +#: c-api/buffer.rst:495 +msgid "" +"Copy *len* bytes from *src* to its contiguous representation in *buf*. " +"*order* can be ``'C'`` or ``'F'`` or ``'A'`` (for C-style or Fortran-style " +"ordering or either one). ``0`` is returned on success, ``-1`` on error." +msgstr "" + +#: c-api/buffer.rst:499 +msgid "This function fails if *len* != *src->len*." +msgstr "" + +#: c-api/buffer.rst:504 +msgid "" +"Fill the *strides* array with byte-strides of a :term:`contiguous` (C-style " +"if *order* is ``'C'`` or Fortran-style if *order* is ``'F'``) array of the " +"given shape with the given number of bytes per element." +msgstr "" + +#: c-api/buffer.rst:511 +msgid "" +"Handle buffer requests for an exporter that wants to expose *buf* of size " +"*len* with writability set according to *readonly*. *buf* is interpreted as " +"a sequence of unsigned bytes." +msgstr "" + +#: c-api/buffer.rst:515 +msgid "" +"The *flags* argument indicates the request type. This function always fills " +"in *view* as specified by flags, unless *buf* has been designated as read-" +"only and :c:macro:`PyBUF_WRITABLE` is set in *flags*." +msgstr "" + +#: c-api/buffer.rst:519 +msgid "" +"On success, set ``view->obj`` to a new reference to *exporter* and return 0. " +"Otherwise, raise :c:data:`PyExc_BufferError`, set ``view->obj`` to ``NULL`` " +"and return ``-1``;" +msgstr "" + +#: c-api/buffer.rst:523 +msgid "" +"If this function is used as part of a :ref:`getbufferproc `, " +"*exporter* MUST be set to the exporting object and *flags* must be passed " +"unmodified. Otherwise, *exporter* MUST be ``NULL``." +msgstr "" diff --git a/c-api/bytearray.po b/c-api/bytearray.po new file mode 100644 index 0000000000..1d82668d06 --- /dev/null +++ b/c-api/bytearray.po @@ -0,0 +1,118 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-04-05 10:05+0200\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" +msgstr "Objets tableau d'octets" + +#: c-api/bytearray.rst:13 +msgid "" +"This subtype of :c:type:`PyObject` represents a Python bytearray object." +msgstr "" +"Ce sous-type de :c:type:`PyObject` représente un objet ``bytearray`` Python." + +#: c-api/bytearray.rst:18 +msgid "" +"This instance of :c:type:`PyTypeObject` represents the Python bytearray " +"type; it is the same object as :class:`bytearray` in the Python layer." +msgstr "" +"Cette instance de :c:type:`PyTypeObject` représente le type Python " +"*bytearray*, c'est le même que :class:`bytearray` côté Python." + +#: c-api/bytearray.rst:23 +msgid "Type check macros" +msgstr "Macros de vérification de type" + +#: c-api/bytearray.rst:27 +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``. Cette méthode réussit toujours." + +#: c-api/bytearray.rst:33 +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``. Cette méthode réussit toujours." + +#: c-api/bytearray.rst:38 +msgid "Direct API functions" +msgstr "Fonctions directes sur l'API" + +#: c-api/bytearray.rst:42 +msgid "" +"Return a new bytearray object from any object, *o*, that implements the :ref:" +"`buffer protocol `." +msgstr "" +"Renvoie un nouvel objet *bytearray* depuis n'importe quel objet, *o*, qui " +"implémente le :ref:`protocole buffer `." + +#: c-api/bytearray.rst:48 +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é." + +#: c-api/bytearray.rst:54 +msgid "" +"Concat bytearrays *a* and *b* and return a new bytearray with the result." +msgstr "" +"Concatène les ``bytearrays`` *a* et *b* et renvoie un nouveau ``bytearray`` " +"avec le résultat." + +#: c-api/bytearray.rst:59 +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``." + +#: c-api/bytearray.rst:64 +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é a " +"toujours un caractère *null* rajouté." + +#: c-api/bytearray.rst:71 +msgid "Resize the internal buffer of *bytearray* to *len*." +msgstr "Redimensionne le tampon interne de *bytearray* à la taille *len*." + +#: c-api/bytearray.rst:74 +msgid "Macros" +msgstr "Macros" + +#: c-api/bytearray.rst:76 +msgid "These macros trade safety for speed and they don't check pointers." +msgstr "" +"Ces macros sont taillées pour la vitesse d'exécution et ne vérifient pas les " +"pointeurs." + +#: c-api/bytearray.rst:80 +msgid "Macro version of :c:func:`PyByteArray_AsString`." +msgstr "Version macro de :c:func:`PyByteArray_AsString`." + +#: c-api/bytearray.rst:85 +msgid "Macro version of :c:func:`PyByteArray_Size`." +msgstr "Version macro de :c:func:`PyByteArray_Size`." diff --git a/c-api/bytes.po b/c-api/bytes.po new file mode 100644 index 0000000000..deca3ebd31 --- /dev/null +++ b/c-api/bytes.po @@ -0,0 +1,336 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-05-21 16:37+0200\n" +"PO-Revision-Date: 2018-07-03 11:50+0200\n" +"Last-Translator: FULL NAME \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" + +#: c-api/bytes.rst:6 +msgid "Bytes Objects" +msgstr "Objets *bytes*" + +#: c-api/bytes.rst:8 +msgid "" +"These functions raise :exc:`TypeError` when expecting a bytes parameter and " +"called with a non-bytes parameter." +msgstr "" + +#: c-api/bytes.rst:16 +#, fuzzy +msgid "This subtype of :c:type:`PyObject` represents a Python bytes object." +msgstr "" +"Ce sous-type de :c:type:`PyObject` représente un objet ``bytearray`` Python." + +#: c-api/bytes.rst:21 +#, fuzzy +msgid "" +"This instance of :c:type:`PyTypeObject` represents the Python bytes type; it " +"is the same object as :class:`bytes` in the Python layer." +msgstr "" +"Cette instance de :c:type:`PyTypeObject` représente le type Python " +"*bytearray*, c'est le même que :class:`bytearray` côté Python." + +#: c-api/bytes.rst:27 +#, fuzzy +msgid "" +"Return true if the object *o* is a bytes object or an instance of a subtype " +"of the bytes 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``." + +#: c-api/bytes.rst:33 +#, fuzzy +msgid "" +"Return true if the object *o* is a bytes object, but not an instance of a " +"subtype of the bytes 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``." + +#: c-api/bytes.rst:39 +msgid "" +"Return a new bytes object with a copy of the string *v* as value on success, " +"and ``NULL`` on failure. The parameter *v* must not be ``NULL``; it will " +"not be checked." +msgstr "" + +#: c-api/bytes.rst:46 +msgid "" +"Return a new bytes object with a copy of the string *v* as value and length " +"*len* on success, and ``NULL`` on failure. If *v* is ``NULL``, the contents " +"of the bytes object are uninitialized." +msgstr "" + +#: c-api/bytes.rst:53 +msgid "" +"Take a C :c:func:`printf`\\ -style *format* string and a variable number of " +"arguments, calculate the size of the resulting Python bytes object and " +"return a bytes object with the values formatted into it. The variable " +"arguments must be C types and must correspond exactly to the format " +"characters in the *format* string. The following format characters are " +"allowed:" +msgstr "" + +#: c-api/bytes.rst:68 +msgid "Format Characters" +msgstr "Caractères de format" + +#: c-api/bytes.rst:68 +msgid "Type" +msgstr "Type" + +#: c-api/bytes.rst:68 +#, fuzzy +msgid "Comment" +msgstr "Commentaires" + +#: c-api/bytes.rst:70 +msgid ":attr:`%%`" +msgstr ":attr:`%%`" + +#: c-api/bytes.rst:70 +msgid "*n/a*" +msgstr "" + +#: c-api/bytes.rst:70 +msgid "The literal % character." +msgstr "" + +#: c-api/bytes.rst:72 +msgid ":attr:`%c`" +msgstr ":attr:`%c`" + +#: c-api/bytes.rst:75 c-api/bytes.rst:96 +msgid "int" +msgstr "*int*" + +#: c-api/bytes.rst:72 +msgid "A single byte, represented as a C int." +msgstr "" + +#: c-api/bytes.rst:75 +msgid ":attr:`%d`" +msgstr ":attr:`%d`" + +#: c-api/bytes.rst:75 +msgid "Equivalent to ``printf(\"%d\")``. [1]_" +msgstr "" + +#: c-api/bytes.rst:78 +msgid ":attr:`%u`" +msgstr ":attr:`%u`" + +#: c-api/bytes.rst:78 +msgid "unsigned int" +msgstr "``unsigned int``" + +#: c-api/bytes.rst:78 +msgid "Equivalent to ``printf(\"%u\")``. [1]_" +msgstr "" + +#: c-api/bytes.rst:81 +msgid ":attr:`%ld`" +msgstr ":attr:`%ld`" + +#: c-api/bytes.rst:81 +msgid "long" +msgstr "" + +#: c-api/bytes.rst:81 +msgid "Equivalent to ``printf(\"%ld\")``. [1]_" +msgstr "" + +#: c-api/bytes.rst:84 +msgid ":attr:`%lu`" +msgstr ":attr:`%lu`" + +#: c-api/bytes.rst:84 +msgid "unsigned long" +msgstr "``unsigned long``" + +#: c-api/bytes.rst:84 +msgid "Equivalent to ``printf(\"%lu\")``. [1]_" +msgstr "" + +#: c-api/bytes.rst:87 +msgid ":attr:`%zd`" +msgstr ":attr:`%zd`" + +#: c-api/bytes.rst:87 +msgid ":c:type:`\\ Py_ssize_t`" +msgstr "" + +#: c-api/bytes.rst:87 +msgid "Equivalent to ``printf(\"%zd\")``. [1]_" +msgstr "" + +#: c-api/bytes.rst:90 +msgid ":attr:`%zu`" +msgstr ":attr:`%zu`" + +#: c-api/bytes.rst:90 +msgid "size_t" +msgstr "" + +#: c-api/bytes.rst:90 +msgid "Equivalent to ``printf(\"%zu\")``. [1]_" +msgstr "" + +#: c-api/bytes.rst:93 +msgid ":attr:`%i`" +msgstr ":attr:`%i`" + +#: c-api/bytes.rst:93 +msgid "Equivalent to ``printf(\"%i\")``. [1]_" +msgstr "" + +#: c-api/bytes.rst:96 +msgid ":attr:`%x`" +msgstr ":attr:`%x`" + +#: c-api/bytes.rst:96 +msgid "Equivalent to ``printf(\"%x\")``. [1]_" +msgstr "" + +#: c-api/bytes.rst:99 +msgid ":attr:`%s`" +msgstr ":attr:`%s`" + +#: c-api/bytes.rst:99 +msgid "const char\\*" +msgstr "" + +#: c-api/bytes.rst:99 +msgid "A null-terminated C character array." +msgstr "" + +#: c-api/bytes.rst:102 +msgid ":attr:`%p`" +msgstr ":attr:`%p`" + +#: c-api/bytes.rst:102 +msgid "const void\\*" +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." +msgstr "" + +#: c-api/bytes.rst:111 +msgid "" +"An unrecognized format character causes all the rest of the format string to " +"be copied as-is to the result object, and any extra arguments discarded." +msgstr "" + +#: c-api/bytes.rst:114 +msgid "" +"For integer specifiers (d, u, ld, lu, zd, zu, i, x): the 0-conversion flag " +"has effect even when a precision is given." +msgstr "" + +#: c-api/bytes.rst:120 +msgid "" +"Identical to :c:func:`PyBytes_FromFormat` except that it takes exactly two " +"arguments." +msgstr "" + +#: c-api/bytes.rst:126 +msgid "" +"Return the bytes representation of object *o* that implements the buffer " +"protocol." +msgstr "" + +#: c-api/bytes.rst:132 +msgid "Return the length of the bytes in bytes object *o*." +msgstr "" + +#: c-api/bytes.rst:137 +msgid "Macro form of :c:func:`PyBytes_Size` but without error checking." +msgstr "" + +#: c-api/bytes.rst:142 +msgid "" +"Return a pointer to the contents of *o*. The pointer refers to the internal " +"buffer of *o*, which consists of ``len(o) + 1`` bytes. The last byte in the " +"buffer is always null, regardless of whether there are any other null " +"bytes. The data must not be modified in any way, unless the object was just " +"created using ``PyBytes_FromStringAndSize(NULL, size)``. It must not be " +"deallocated. If *o* is not a bytes object at all, :c:func:" +"`PyBytes_AsString` returns ``NULL`` and raises :exc:`TypeError`." +msgstr "" + +#: c-api/bytes.rst:154 +msgid "Macro form of :c:func:`PyBytes_AsString` but without error checking." +msgstr "" + +#: c-api/bytes.rst:159 +msgid "" +"Return the null-terminated contents of the object *obj* through the output " +"variables *buffer* and *length*." +msgstr "" + +#: c-api/bytes.rst:162 +msgid "" +"If *length* is ``NULL``, the bytes object may not contain embedded null " +"bytes; if it does, the function returns ``-1`` and a :exc:`ValueError` is " +"raised." +msgstr "" + +#: c-api/bytes.rst:166 +msgid "" +"The buffer refers to an internal buffer of *obj*, which includes an " +"additional null byte at the end (not counted in *length*). The data must " +"not be modified in any way, unless the object was just created using " +"``PyBytes_FromStringAndSize(NULL, size)``. It must not be deallocated. If " +"*obj* is not a bytes object at all, :c:func:`PyBytes_AsStringAndSize` " +"returns ``-1`` and raises :exc:`TypeError`." +msgstr "" + +#: c-api/bytes.rst:173 +msgid "" +"Previously, :exc:`TypeError` was raised when embedded null bytes were " +"encountered in the bytes object." +msgstr "" + +#: c-api/bytes.rst:180 +msgid "" +"Create a new bytes object in *\\*bytes* containing the contents of *newpart* " +"appended to *bytes*; the caller will own the new reference. The reference " +"to the old value of *bytes* will be stolen. If the new object cannot be " +"created, the old reference to *bytes* will still be discarded and the value " +"of *\\*bytes* will be set to ``NULL``; the appropriate exception will be set." +msgstr "" + +#: c-api/bytes.rst:189 +msgid "" +"Create a new bytes object in *\\*bytes* containing the contents of *newpart* " +"appended to *bytes*. This version decrements the reference count of " +"*newpart*." +msgstr "" + +#: c-api/bytes.rst:196 +msgid "" +"A way to resize a bytes object even though it is \"immutable\". Only use " +"this to build up a brand new bytes object; don't use this if the bytes may " +"already be known in other parts of the code. It is an error to call this " +"function if the refcount on the input bytes object is not one. Pass the " +"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` " +"is set, and ``-1`` is returned." +msgstr "" diff --git a/c-api/call.po b/c-api/call.po new file mode 100644 index 0000000000..37f5609e90 --- /dev/null +++ b/c-api/call.po @@ -0,0 +1,555 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-18 15:46+0200\n" +"PO-Revision-Date: 2020-07-20 15:07+0200\n" +"Last-Translator: FULL NAME \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" + +#: c-api/call.rst:6 +msgid "Call Protocol" +msgstr "" + +#: c-api/call.rst:8 +msgid "" +"CPython supports two different calling protocols: *tp_call* and vectorcall." +msgstr "" + +#: c-api/call.rst:12 +msgid "The *tp_call* Protocol" +msgstr "" + +#: c-api/call.rst:14 +msgid "" +"Instances of classes that set :c:member:`~PyTypeObject.tp_call` are " +"callable. The signature of the slot is::" +msgstr "" + +#: c-api/call.rst:19 +msgid "" +"A call is made using a tuple for the positional arguments and a dict for the " +"keyword arguments, similarly to ``callable(*args, **kwargs)`` in Python " +"code. *args* must be non-NULL (use an empty tuple if there are no arguments) " +"but *kwargs* may be *NULL* if there are no keyword arguments." +msgstr "" + +#: c-api/call.rst:25 +msgid "" +"This convention is not only used by *tp_call*: :c:member:`~PyTypeObject." +"tp_new` and :c:member:`~PyTypeObject.tp_init` also pass arguments this way." +msgstr "" + +#: c-api/call.rst:29 +msgid "" +"To call an object, use :c:func:`PyObject_Call` or another :ref:`call API " +"`." +msgstr "" + +#: c-api/call.rst:36 +msgid "The Vectorcall Protocol" +msgstr "" + +#: c-api/call.rst:40 +msgid "" +"The vectorcall protocol was introduced in :pep:`590` as an additional " +"protocol for making calls more efficient." +msgstr "" + +#: c-api/call.rst:43 +msgid "" +"As rule of thumb, CPython will prefer the vectorcall for internal calls if " +"the callable supports it. However, this is not a hard rule. Additionally, " +"some third-party extensions use *tp_call* directly (rather than using :c:" +"func:`PyObject_Call`). Therefore, a class supporting vectorcall must also " +"implement :c:member:`~PyTypeObject.tp_call`. Moreover, the callable must " +"behave the same regardless of which protocol is used. The recommended way to " +"achieve this is by setting :c:member:`~PyTypeObject.tp_call` to :c:func:" +"`PyVectorcall_Call`. This bears repeating:" +msgstr "" + +#: c-api/call.rst:57 +msgid "" +"A class supporting vectorcall **must** also implement :c:member:" +"`~PyTypeObject.tp_call` with the same semantics." +msgstr "" + +#: c-api/call.rst:60 +msgid "" +"A class should not implement vectorcall if that would be slower than " +"*tp_call*. For example, if the callee needs to convert the arguments to an " +"args tuple and kwargs dict anyway, then there is no point in implementing " +"vectorcall." +msgstr "" + +#: c-api/call.rst:65 +msgid "" +"Classes can implement the vectorcall protocol by enabling the :const:" +"`Py_TPFLAGS_HAVE_VECTORCALL` flag and setting :c:member:`~PyTypeObject." +"tp_vectorcall_offset` to the offset inside the object structure where a " +"*vectorcallfunc* appears. This is a pointer to a function with the following " +"signature:" +msgstr "" + +#: c-api/call.rst:73 +msgid "*callable* is the object being called." +msgstr "" + +#: c-api/call.rst:75 +msgid "" +"*args* is a C array consisting of the positional arguments followed by the" +msgstr "" + +#: c-api/call.rst:75 +msgid "" +"values of the keyword arguments. This can be *NULL* if there are no " +"arguments." +msgstr "" + +#: c-api/call.rst:79 +msgid "*nargsf* is the number of positional arguments plus possibly the" +msgstr "" + +#: c-api/call.rst:78 +msgid "" +":const:`PY_VECTORCALL_ARGUMENTS_OFFSET` flag. To get the actual number of " +"positional arguments from *nargsf*, use :c:func:`PyVectorcall_NARGS`." +msgstr "" + +#: c-api/call.rst:85 +msgid "*kwnames* is a tuple containing the names of the keyword arguments;" +msgstr "" + +#: c-api/call.rst:82 +msgid "" +"in other words, the keys of the kwargs dict. These names must be strings " +"(instances of ``str`` or a subclass) and they must be unique. If there are " +"no keyword arguments, then *kwnames* can instead be *NULL*." +msgstr "" + +#: c-api/call.rst:89 +msgid "" +"If this flag is set in a vectorcall *nargsf* argument, the callee is allowed " +"to temporarily change ``args[-1]``. In other words, *args* points to " +"argument 1 (not 0) in the allocated vector. The callee must restore the " +"value of ``args[-1]`` before returning." +msgstr "" + +#: c-api/call.rst:94 +msgid "" +"For :c:func:`PyObject_VectorcallMethod`, this flag means instead that " +"``args[0]`` may be changed." +msgstr "" + +#: c-api/call.rst:97 +msgid "" +"Whenever they can do so cheaply (without additional allocation), callers are " +"encouraged to use :const:`PY_VECTORCALL_ARGUMENTS_OFFSET`. Doing so will " +"allow callables such as bound methods to make their onward calls (which " +"include a prepended *self* argument) very efficiently." +msgstr "" + +#: c-api/call.rst:102 +msgid "" +"To call an object that implements vectorcall, use a :ref:`call API ` function as with any other callable. :c:func:`PyObject_Vectorcall` " +"will usually be most efficient." +msgstr "" + +#: c-api/call.rst:109 +msgid "" +"In CPython 3.8, the vectorcall API and related functions were available " +"provisionally under names with a leading underscore: " +"``_PyObject_Vectorcall``, ``_Py_TPFLAGS_HAVE_VECTORCALL``, " +"``_PyObject_VectorcallMethod``, ``_PyVectorcall_Function``, " +"``_PyObject_CallOneArg``, ``_PyObject_CallMethodNoArgs``, " +"``_PyObject_CallMethodOneArg``. Additionally, ``PyObject_VectorcallDict`` " +"was available as ``_PyObject_FastCallDict``. The old names are still defined " +"as aliases of the new, non-underscored names." +msgstr "" + +#: c-api/call.rst:121 +msgid "Recursion Control" +msgstr "Contrôle de la récursion" + +#: c-api/call.rst:123 +msgid "" +"When using *tp_call*, callees do not need to worry about :ref:`recursion " +"`: CPython uses :c:func:`Py_EnterRecursiveCall` and :c:func:" +"`Py_LeaveRecursiveCall` for calls made using *tp_call*." +msgstr "" + +#: c-api/call.rst:128 +msgid "" +"For efficiency, this is not the case for calls done using vectorcall: the " +"callee should use *Py_EnterRecursiveCall* and *Py_LeaveRecursiveCall* if " +"needed." +msgstr "" + +#: c-api/call.rst:134 +msgid "Vectorcall Support API" +msgstr "" + +#: c-api/call.rst:138 +msgid "" +"Given a vectorcall *nargsf* argument, return the actual number of arguments. " +"Currently equivalent to::" +msgstr "" + +#: c-api/call.rst:144 +msgid "" +"However, the function ``PyVectorcall_NARGS`` should be used to allow for " +"future extensions." +msgstr "" + +#: c-api/call.rst:151 +msgid "" +"If *op* does not support the vectorcall protocol (either because the type " +"does not or because the specific instance does not), return *NULL*. " +"Otherwise, return the vectorcall function pointer stored in *op*. This " +"function never raises an exception." +msgstr "" + +#: c-api/call.rst:156 +msgid "" +"This is mostly useful to check whether or not *op* supports vectorcall, " +"which can be done by checking ``PyVectorcall_Function(op) != NULL``." +msgstr "" + +#: c-api/call.rst:163 +msgid "" +"Call *callable*'s :c:type:`vectorcallfunc` with positional and keyword " +"arguments given in a tuple and dict, respectively." +msgstr "" + +#: c-api/call.rst:166 +msgid "" +"This is a specialized function, intended to be put in the :c:member:" +"`~PyTypeObject.tp_call` slot or be used in an implementation of ``tp_call``. " +"It does not check the :const:`Py_TPFLAGS_HAVE_VECTORCALL` flag and it does " +"not fall back to ``tp_call``." +msgstr "" + +#: c-api/call.rst:177 +msgid "Object Calling API" +msgstr "" + +#: c-api/call.rst:179 +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 little conversion as possible, " +"pick one that best fits the format of data you have available." +msgstr "" + +#: c-api/call.rst:185 +msgid "" +"The following table summarizes the available functions; please see " +"individual documentation for details." +msgstr "" + +#: c-api/call.rst:189 +msgid "Function" +msgstr "Fonction" + +#: c-api/call.rst:189 +msgid "callable" +msgstr "appelable (*callable*)" + +#: c-api/call.rst:189 +msgid "args" +msgstr "" + +#: c-api/call.rst:189 +msgid "kwargs" +msgstr "" + +#: c-api/call.rst:191 +msgid ":c:func:`PyObject_Call`" +msgstr "" + +#: c-api/call.rst:193 c-api/call.rst:197 c-api/call.rst:203 c-api/call.rst:213 +msgid "``PyObject *``" +msgstr "" + +#: c-api/call.rst:191 +msgid "tuple" +msgstr "" + +#: c-api/call.rst:213 +msgid "dict/``NULL``" +msgstr "" + +#: c-api/call.rst:193 +msgid ":c:func:`PyObject_CallNoArgs`" +msgstr "" + +#: c-api/call.rst:195 c-api/call.rst:199 c-api/call.rst:203 c-api/call.rst:207 +#: c-api/call.rst:209 +msgid "---" +msgstr "" + +#: c-api/call.rst:195 +msgid ":c:func:`PyObject_CallOneArg`" +msgstr "" + +#: c-api/call.rst:209 +msgid "1 object" +msgstr "" + +#: c-api/call.rst:197 +msgid ":c:func:`PyObject_CallObject`" +msgstr "" + +#: c-api/call.rst:197 +msgid "tuple/``NULL``" +msgstr "" + +#: c-api/call.rst:199 +msgid ":c:func:`PyObject_CallFunction`" +msgstr "" + +#: c-api/call.rst:201 +msgid "format" +msgstr "format" + +#: c-api/call.rst:201 +msgid ":c:func:`PyObject_CallMethod`" +msgstr "" + +#: c-api/call.rst:201 +msgid "obj + ``char*``" +msgstr "" + +#: c-api/call.rst:203 +msgid ":c:func:`PyObject_CallFunctionObjArgs`" +msgstr "" + +#: c-api/call.rst:205 +msgid "variadic" +msgstr "" + +#: c-api/call.rst:205 +msgid ":c:func:`PyObject_CallMethodObjArgs`" +msgstr "" + +#: c-api/call.rst:207 c-api/call.rst:209 +msgid "obj + name" +msgstr "" + +#: c-api/call.rst:207 +msgid ":c:func:`PyObject_CallMethodNoArgs`" +msgstr "" + +#: c-api/call.rst:209 +msgid ":c:func:`PyObject_CallMethodOneArg`" +msgstr "" + +#: c-api/call.rst:211 +msgid ":c:func:`PyObject_Vectorcall`" +msgstr "" + +#: c-api/call.rst:213 c-api/call.rst:215 +msgid "vectorcall" +msgstr "" + +#: c-api/call.rst:213 +msgid ":c:func:`PyObject_VectorcallDict`" +msgstr "" + +#: c-api/call.rst:215 +msgid ":c:func:`PyObject_VectorcallMethod`" +msgstr "" + +#: c-api/call.rst:215 +msgid "arg + name" +msgstr "" + +#: c-api/call.rst:221 +msgid "" +"Call a callable Python object *callable*, with arguments given by the tuple " +"*args*, and named arguments given by the dictionary *kwargs*." +msgstr "" +"Appelle un objet Python appelable *callable*, avec des arguments donnés par " +"le *n*-uplet *args*, et des arguments nommés donnés par le dictionnaire " +"*kwargs*." + +#: c-api/call.rst:224 +msgid "" +"*args* must not be *NULL*; use an empty tuple if no arguments are needed. If " +"no named arguments are needed, *kwargs* can be *NULL*." +msgstr "" + +#: c-api/call.rst:239 c-api/call.rst:261 c-api/call.rst:293 c-api/call.rst:326 +#: c-api/call.rst:347 c-api/call.rst:394 +msgid "" +"Return the result of the call on success, or raise an exception and return " +"*NULL* on failure." +msgstr "" + +#: c-api/call.rst:230 +msgid "" +"This is the equivalent of the Python expression: ``callable(*args, " +"**kwargs)``." +msgstr "" +"Ceci est l'équivalent de l'expression Python : ``callable(*args, **kwargs)``." + +#: c-api/call.rst:236 +msgid "" +"Call a callable Python object *callable* without any arguments. It is the " +"most efficient way to call a callable Python object without any argument." +msgstr "" + +#: c-api/call.rst:247 +msgid "" +"Call a callable Python object *callable* with exactly 1 positional argument " +"*arg* and no keyword arguments." +msgstr "" + +#: c-api/call.rst:258 +msgid "" +"Call a callable Python object *callable*, with arguments given by the tuple " +"*args*. If no arguments are needed, then *args* can be *NULL*." +msgstr "" + +#: c-api/call.rst:276 +msgid "This is the equivalent of the Python expression: ``callable(*args)``." +msgstr "Ceci est l'équivalent de l'expression Python : ``callable(*args)``." + +#: c-api/call.rst:269 +msgid "" +"Call a callable Python object *callable*, with a variable number of C " +"arguments. The C arguments are described using a :c:func:`Py_BuildValue` " +"style format string. The format can be *NULL*, indicating that no arguments " +"are provided." +msgstr "" + +#: c-api/call.rst:278 +msgid "" +"Note that if you only pass :c:expr:`PyObject *` args, :c:func:" +"`PyObject_CallFunctionObjArgs` is a faster alternative." +msgstr "" + +#: c-api/call.rst:281 +msgid "The type of *format* was changed from ``char *``." +msgstr "" + +#: c-api/call.rst:287 +msgid "" +"Call the method named *name* of object *obj* with a variable number of C " +"arguments. The C arguments are described by a :c:func:`Py_BuildValue` " +"format string that should produce a tuple." +msgstr "" + +#: c-api/call.rst:291 +msgid "The format can be *NULL*, indicating that no arguments are provided." +msgstr "" + +#: c-api/call.rst:296 +msgid "" +"This is the equivalent of the Python expression: ``obj.name(arg1, " +"arg2, ...)``." +msgstr "" + +#: c-api/call.rst:299 +msgid "" +"Note that if you only pass :c:expr:`PyObject *` args, :c:func:" +"`PyObject_CallMethodObjArgs` is a faster alternative." +msgstr "" + +#: c-api/call.rst:302 +msgid "The types of *name* and *format* were changed from ``char *``." +msgstr "" + +#: c-api/call.rst:308 +msgid "" +"Call a callable Python object *callable*, with a variable number of :c:expr:" +"`PyObject *` arguments. The arguments are provided as a variable number of " +"parameters followed by *NULL*." +msgstr "" + +#: c-api/call.rst:315 +msgid "" +"This is the equivalent of the Python expression: ``callable(arg1, " +"arg2, ...)``." +msgstr "" + +#: c-api/call.rst:321 +msgid "" +"Call a method of the Python object *obj*, where the name of the method is " +"given as a Python string object in *name*. It is called with a variable " +"number of :c:expr:`PyObject *` arguments. The arguments are provided as a " +"variable number of parameters followed by *NULL*." +msgstr "" + +#: c-api/call.rst:332 +msgid "" +"Call a method of the Python object *obj* without arguments, where the name " +"of the method is given as a Python string object in *name*." +msgstr "" + +#: c-api/call.rst:343 +msgid "" +"Call a method of the Python object *obj* with a single positional argument " +"*arg*, where the name of the method is given as a Python string object in " +"*name*." +msgstr "" + +#: c-api/call.rst:355 +msgid "" +"Call a callable Python object *callable*. The arguments are the same as for :" +"c:type:`vectorcallfunc`. If *callable* supports vectorcall_, this directly " +"calls the vectorcall function stored in *callable*." +msgstr "" + +#: c-api/call.rst:367 +msgid "" +"Call *callable* with positional arguments passed exactly as in the " +"vectorcall_ protocol, but with keyword arguments passed as a dictionary " +"*kwdict*. The *args* array contains only the positional arguments." +msgstr "" + +#: c-api/call.rst:371 +msgid "" +"Regardless of which protocol is used internally, a conversion of arguments " +"needs to be done. Therefore, this function should only be used if the caller " +"already has a dictionary ready to use for the keyword arguments, but not a " +"tuple for the positional arguments." +msgstr "" + +#: c-api/call.rst:381 +msgid "" +"Call a method using the vectorcall calling convention. The name of the " +"method is given as a Python string *name*. The object whose method is called " +"is *args[0]*, and the *args* array starting at *args[1]* represents the " +"arguments of the call. There must be at least one positional argument. " +"*nargsf* is the number of positional arguments including *args[0]*, plus :" +"const:`PY_VECTORCALL_ARGUMENTS_OFFSET` if the value of ``args[0]`` may " +"temporarily be changed. Keyword arguments can be passed just like in :c:func:" +"`PyObject_Vectorcall`." +msgstr "" + +#: c-api/call.rst:390 +msgid "" +"If the object has the :const:`Py_TPFLAGS_METHOD_DESCRIPTOR` feature, this " +"will call the unbound method object with the full *args* vector as arguments." +msgstr "" + +#: c-api/call.rst:401 +msgid "Call Support API" +msgstr "" + +#: c-api/call.rst:405 +msgid "" +"Determine if the object *o* is callable. Return ``1`` if the object is " +"callable and ``0`` otherwise. This function always succeeds." +msgstr "" +"Détermine si l'objet *o* est appelable. Renvoie ``1`` si c'est le cas, et " +"``0`` sinon. Cette fonction réussit toujours." diff --git a/c-api/capsule.po b/c-api/capsule.po new file mode 100644 index 0000000000..ffb042ea56 --- /dev/null +++ b/c-api/capsule.po @@ -0,0 +1,199 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-18 15:46+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \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" + +#: c-api/capsule.rst:6 +msgid "Capsules" +msgstr "Capsules" + +#: c-api/capsule.rst:10 +msgid "" +"Refer to :ref:`using-capsules` for more information on using these objects." +msgstr "" +"Reportez-vous à :ref:`using-capsules` pour plus d'informations sur " +"l'utilisation de ces objets." + +#: c-api/capsule.rst:17 +msgid "" +"This subtype of :c:type:`PyObject` represents an opaque value, useful for C " +"extension modules who need to pass an opaque value (as a :c:expr:`void*` " +"pointer) through Python code to other C code. It is often used to make a C " +"function pointer defined in one module available to other modules, so the " +"regular import mechanism can be used to access C APIs defined in dynamically " +"loaded modules." +msgstr "" + +#: c-api/capsule.rst:27 +msgid "The type of a destructor callback for a capsule. Defined as::" +msgstr "" + +#: c-api/capsule.rst:31 +msgid "" +"See :c:func:`PyCapsule_New` for the semantics of PyCapsule_Destructor " +"callbacks." +msgstr "" + +#: c-api/capsule.rst:37 +msgid "" +"Return true if its argument is a :c:type:`PyCapsule`. This function always " +"succeeds." +msgstr "" + +#: c-api/capsule.rst:43 +msgid "" +"Create a :c:type:`PyCapsule` encapsulating the *pointer*. The *pointer* " +"argument may not be ``NULL``." +msgstr "" + +#: c-api/capsule.rst:46 +msgid "On failure, set an exception and return ``NULL``." +msgstr "" + +#: c-api/capsule.rst:48 +msgid "" +"The *name* string may either be ``NULL`` or a pointer to a valid C string. " +"If non-``NULL``, this string must outlive the capsule. (Though it is " +"permitted to free it inside the *destructor*.)" +msgstr "" + +#: c-api/capsule.rst:52 +msgid "" +"If the *destructor* argument is not ``NULL``, it will be called with the " +"capsule as its argument when it is destroyed." +msgstr "" + +#: c-api/capsule.rst:55 +msgid "" +"If this capsule will be stored as an attribute of a module, the *name* " +"should be specified as ``modulename.attributename``. This will enable other " +"modules to import the capsule using :c:func:`PyCapsule_Import`." +msgstr "" + +#: c-api/capsule.rst:62 +msgid "" +"Retrieve the *pointer* stored in the capsule. On failure, set an exception " +"and return ``NULL``." +msgstr "" + +#: c-api/capsule.rst:65 +msgid "" +"The *name* parameter must compare exactly to the name stored in the capsule. " +"If the name stored in the capsule is ``NULL``, the *name* passed in must " +"also be ``NULL``. Python uses the C function :c:func:`strcmp` to compare " +"capsule names." +msgstr "" + +#: c-api/capsule.rst:73 +msgid "" +"Return the current destructor stored in the capsule. On failure, set an " +"exception and return ``NULL``." +msgstr "" + +#: c-api/capsule.rst:76 +msgid "" +"It is legal for a capsule to have a ``NULL`` destructor. This makes a " +"``NULL`` return code somewhat ambiguous; use :c:func:`PyCapsule_IsValid` or :" +"c:func:`PyErr_Occurred` to disambiguate." +msgstr "" + +#: c-api/capsule.rst:83 +msgid "" +"Return the current context stored in the capsule. On failure, set an " +"exception and return ``NULL``." +msgstr "" + +#: c-api/capsule.rst:86 +msgid "" +"It is legal for a capsule to have a ``NULL`` context. This makes a ``NULL`` " +"return code somewhat ambiguous; use :c:func:`PyCapsule_IsValid` or :c:func:" +"`PyErr_Occurred` to disambiguate." +msgstr "" + +#: c-api/capsule.rst:93 +msgid "" +"Return the current name stored in the capsule. On failure, set an exception " +"and return ``NULL``." +msgstr "" + +#: c-api/capsule.rst:96 +msgid "" +"It is legal for a capsule to have a ``NULL`` name. This makes a ``NULL`` " +"return code somewhat ambiguous; use :c:func:`PyCapsule_IsValid` or :c:func:" +"`PyErr_Occurred` to disambiguate." +msgstr "" + +#: c-api/capsule.rst:103 +msgid "" +"Import a pointer to a C object from a capsule attribute in a module. The " +"*name* parameter should specify the full name to the attribute, as in " +"``module.attribute``. The *name* stored in the capsule must match this " +"string exactly. If *no_block* is true, import the module without blocking " +"(using :c:func:`PyImport_ImportModuleNoBlock`). If *no_block* is false, " +"import the module conventionally (using :c:func:`PyImport_ImportModule`)." +msgstr "" + +#: c-api/capsule.rst:110 +msgid "" +"Return the capsule's internal *pointer* on success. On failure, set an " +"exception and return ``NULL``." +msgstr "" + +#: c-api/capsule.rst:116 +msgid "" +"Determines whether or not *capsule* is a valid capsule. A valid capsule is " +"non-``NULL``, passes :c:func:`PyCapsule_CheckExact`, has a non-``NULL`` " +"pointer stored in it, and its internal name matches the *name* parameter. " +"(See :c:func:`PyCapsule_GetPointer` for information on how capsule names are " +"compared.)" +msgstr "" + +#: c-api/capsule.rst:122 +msgid "" +"In other words, if :c:func:`PyCapsule_IsValid` returns a true value, calls " +"to any of the accessors (any function starting with :c:func:`PyCapsule_Get`) " +"are guaranteed to succeed." +msgstr "" + +#: c-api/capsule.rst:126 +msgid "" +"Return a nonzero value if the object is valid and matches the name passed " +"in. Return ``0`` otherwise. This function will not fail." +msgstr "" + +#: c-api/capsule.rst:132 +msgid "Set the context pointer inside *capsule* to *context*." +msgstr "" + +#: c-api/capsule.rst:141 c-api/capsule.rst:158 +msgid "" +"Return ``0`` on success. Return nonzero and set an exception on failure." +msgstr "" + +#: c-api/capsule.rst:139 +msgid "Set the destructor inside *capsule* to *destructor*." +msgstr "" + +#: c-api/capsule.rst:146 +msgid "" +"Set the name inside *capsule* to *name*. If non-``NULL``, the name must " +"outlive the capsule. If the previous *name* stored in the capsule was not " +"``NULL``, no attempt is made to free it." +msgstr "" + +#: c-api/capsule.rst:155 +msgid "" +"Set the void pointer inside *capsule* to *pointer*. The pointer may not be " +"``NULL``." +msgstr "" diff --git a/c-api/cell.po b/c-api/cell.po new file mode 100644 index 0000000000..8479a01571 --- /dev/null +++ b/c-api/cell.po @@ -0,0 +1,105 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +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-05-09 10:14+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" + +#: c-api/cell.rst:6 +msgid "Cell Objects" +msgstr "Objets Cellules" + +#: c-api/cell.rst:8 +msgid "" +"\"Cell\" objects are used to implement variables referenced by multiple " +"scopes. For each such variable, a cell object is created to store the value; " +"the local variables of each stack frame that references the value contains a " +"reference to the cells from outer scopes which also use that variable. When " +"the value is accessed, the value contained in the cell is used instead of " +"the cell object itself. This de-referencing of the cell object requires " +"support from the generated byte-code; these are not automatically de-" +"referenced when accessed. Cell objects are not likely to be useful elsewhere." +msgstr "" +"Les objets \"Cellules\" (*cell* en anglais) sont utilisés pour implémenter " +"des variables référencées dans de multiples environnements. Pour chacune de " +"ces variables, un objet cellule est créé pour stocker sa valeur ; les " +"variables locales de chaque pile d'exécution qui référence cette valeur " +"contiennent une référence sur les cellules des autres environnements qui " +"utilisent aussi cette variable. Quand la valeur est accédée, la valeur de la " +"cellule est utilisée, au lei de celle de l'objet cellule proprement dit. Ce " +"dé-référencement de l'objet cellule requiert l'intervention du *bytecode* " +"généré ; il n'est pas automatiquement dé-référencé quand il est accédé. Il " +"est plausible que les objets cellules ne soit utilisés ailleurs." + +#: c-api/cell.rst:20 +msgid "The C structure used for cell objects." +msgstr "Structure C utilisée pour les objets cellules." + +#: c-api/cell.rst:25 +msgid "The type object corresponding to cell objects." +msgstr "Type objet correspondant aux objets cellules." + +#: c-api/cell.rst:30 +#, fuzzy +msgid "" +"Return true if *ob* is a cell object; *ob* must not be ``NULL``. This " +"function always succeeds." +msgstr "" +"Renvoie ``True`` si *ob* est un objet cellule ; *ob* ne doit pas être à " +"*NULL*." + +#: c-api/cell.rst:36 +#, fuzzy +msgid "" +"Create and return a new cell object containing the value *ob*. The parameter " +"may be ``NULL``." +msgstr "" +"Crée et retourne un nouvel objet cellule contenant la valeur *ob*. Le " +"paramètre peut être mis à *NULL*." + +#: c-api/cell.rst:42 +msgid "Return the contents of the cell *cell*." +msgstr "Renvoie le contenu de la cellule *cell*." + +#: c-api/cell.rst:47 +#, fuzzy +msgid "" +"Return the contents of the cell *cell*, but without checking that *cell* is " +"non-``NULL`` and a cell object." +msgstr "" +"Renvoie le contenu de la cellule *cell*, mais sans vérifier si *cell* est " +"non *NULL* et sans vérifier si c'est un objet cellule." + +#: c-api/cell.rst:53 +#, fuzzy +msgid "" +"Set the contents of the cell object *cell* to *value*. This releases the " +"reference to any current content of the cell. *value* may be ``NULL``. " +"*cell* must be non-``NULL``; if it is not a cell object, ``-1`` will be " +"returned. On success, ``0`` will be returned." +msgstr "" +"Définit le contenu de l'objet cellule à *value*. Cela libère la référence à " +"toute valeur de la cellule. *value* peut être fixé à *NULL*. *cell* ne doit " +"pas être *NULL* ; si ce n'est pas un objet cellule, ``-1`` est renvoyé. Si " +"c'est un objet cellule, renvoie ``0``." + +#: c-api/cell.rst:61 +#, fuzzy +msgid "" +"Sets the value of the cell object *cell* to *value*. No reference counts " +"are adjusted, and no checks are made for safety; *cell* must be non-``NULL`` " +"and must be a cell object." +msgstr "" +"Définit la valeur de l'objet cellule à *value*. Pas de comptage de " +"références n'est ajusté et il n'y' a pas de contrôle effectué pour vérifier " +"la sûreté ; *cell* doit être à non *NULL* et doit être un objet cellule." diff --git a/c-api/code.po b/c-api/code.po new file mode 100644 index 0000000000..2094616202 --- /dev/null +++ b/c-api/code.po @@ -0,0 +1,98 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-09-23 16:16+0200\n" +"PO-Revision-Date: 2018-02-15 00:30+0100\n" +"Last-Translator: FULL NAME \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" + +#: c-api/code.rst:8 +msgid "Code Objects" +msgstr "Objets code" + +#: c-api/code.rst:12 +msgid "" +"Code objects are a low-level detail of the CPython implementation. Each one " +"represents a chunk of executable code that hasn't yet been bound into a " +"function." +msgstr "" +"Les objets *Code* sont spécifiques à l'implémentation bas niveau de CPython. " +"Chacun d'eux représente une partie de code exécutable, qui n'a pas encore " +"été lié dans une fonction." + +#: c-api/code.rst:18 +msgid "" +"The C structure of the objects used to describe code objects. The fields of " +"this type are subject to change at any time." +msgstr "" +"La structure C utilisée pour décrire les objets *Code*. Les attributs de " +"cette structure sont sujets à changer à tout moment." + +#: c-api/code.rst:24 +msgid "" +"This is an instance of :c:type:`PyTypeObject` representing the Python :class:" +"`code` type." +msgstr "" +"C'est une instance de :c:type:`PyTypeObject` représentant le type Python :" +"class:`code`." + +#: c-api/code.rst:30 +#, fuzzy +msgid "" +"Return true if *co* is a :class:`code` object. This function always " +"succeeds." +msgstr "Renvoie vrai si *co* est un objet :class:`code`." + +#: c-api/code.rst:34 +msgid "Return the number of free variables in *co*." +msgstr "Renvoie le nombre de variables libres dans *co*." + +#: c-api/code.rst:38 +msgid "" +"Return a new code object. If you need a dummy code object to create a " +"frame, use :c:func:`PyCode_NewEmpty` instead. Calling :c:func:`PyCode_New` " +"directly can bind you to a precise Python version since the definition of " +"the bytecode changes often." +msgstr "" +"Renvoie un nouvel objet *code*. Si vous avez besoin d'un objet code factice " +"pour créer une *frame*, utilisez plutôt :c:func:`PyCode_NewEmpty`. Appeler :" +"c:func:`PyCode_New` peut vous lier directement à une version spécifique de " +"Python, le *bytecode* étant sujet à modifications." + +#: c-api/code.rst:45 +msgid "" +"Similar to :c:func:`PyCode_New`, but with an extra \"posonlyargcount\" for " +"positional-only arguments." +msgstr "" + +#: c-api/code.rst:51 +msgid "" +"Return a new empty code object with the specified filename, function name, " +"and first line number. It is illegal to :func:`exec` or :func:`eval` the " +"resulting code object." +msgstr "" +"Renvoie un nouvel objet *code* avec le nom de fichier, le nom de fonction, " +"et le numéro de première ligne donnés. Il n'est pas permis d'utiliser :func:" +"`exec` ou :func:`eval` sur l'objet renvoyé." + +#: c-api/code.rst:57 +msgid "" +"Return the line number of the instruction that occurs on or before " +"``byte_offset`` and ends after it. If you just need the line number of a " +"frame, use :c:func:`PyFrame_GetLineNumber` instead." +msgstr "" + +#: c-api/code.rst:60 +msgid "" +"For efficiently iterating over the line numbers in a code object, use `the " +"API described in PEP 626 `_." +msgstr "" diff --git a/c-api/codec.po b/c-api/codec.po new file mode 100644 index 0000000000..8d0d24baae --- /dev/null +++ b/c-api/codec.po @@ -0,0 +1,170 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-09-23 16:16+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \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" + +#: c-api/codec.rst:4 +msgid "Codec registry and support functions" +msgstr "" + +#: c-api/codec.rst:8 +msgid "Register a new codec search function." +msgstr "" + +#: c-api/codec.rst:10 +msgid "" +"As side effect, this tries to load the :mod:`encodings` package, if not yet " +"done, to make sure that it is always first in the list of search functions." +msgstr "" + +#: c-api/codec.rst:15 +msgid "" +"Unregister a codec search function and clear the registry's cache. If the " +"search function is not registered, do nothing. Return 0 on success. Raise an " +"exception and return -1 on error." +msgstr "" + +#: c-api/codec.rst:23 +msgid "" +"Return ``1`` or ``0`` depending on whether there is a registered codec for " +"the given *encoding*. This function always succeeds." +msgstr "" + +#: c-api/codec.rst:28 +msgid "Generic codec based encoding API." +msgstr "" + +#: c-api/codec.rst:30 +msgid "" +"*object* is passed through the encoder function found for the given " +"*encoding* using the error handling method defined by *errors*. *errors* " +"may be ``NULL`` to use the default method defined for the codec. Raises a :" +"exc:`LookupError` if no encoder can be found." +msgstr "" + +#: c-api/codec.rst:37 +msgid "Generic codec based decoding API." +msgstr "" + +#: c-api/codec.rst:39 +msgid "" +"*object* is passed through the decoder function found for the given " +"*encoding* using the error handling method defined by *errors*. *errors* " +"may be ``NULL`` to use the default method defined for the codec. Raises a :" +"exc:`LookupError` if no encoder can be found." +msgstr "" + +#: c-api/codec.rst:46 +msgid "Codec lookup API" +msgstr "" + +#: c-api/codec.rst:48 +msgid "" +"In the following functions, the *encoding* string is looked up converted to " +"all lower-case characters, which makes encodings looked up through this " +"mechanism effectively case-insensitive. If no codec is found, a :exc:" +"`KeyError` is set and ``NULL`` returned." +msgstr "" + +#: c-api/codec.rst:55 +msgid "Get an encoder function for the given *encoding*." +msgstr "" + +#: c-api/codec.rst:59 +msgid "Get a decoder function for the given *encoding*." +msgstr "" + +#: c-api/codec.rst:63 +msgid "" +"Get an :class:`~codecs.IncrementalEncoder` object for the given *encoding*." +msgstr "" + +#: c-api/codec.rst:67 +msgid "" +"Get an :class:`~codecs.IncrementalDecoder` object for the given *encoding*." +msgstr "" + +#: c-api/codec.rst:71 +msgid "" +"Get a :class:`~codecs.StreamReader` factory function for the given " +"*encoding*." +msgstr "" + +#: c-api/codec.rst:75 +msgid "" +"Get a :class:`~codecs.StreamWriter` factory function for the given " +"*encoding*." +msgstr "" + +#: c-api/codec.rst:79 +msgid "Registry API for Unicode encoding error handlers" +msgstr "" + +#: c-api/codec.rst:83 +msgid "" +"Register the error handling callback function *error* under the given " +"*name*. This callback function will be called by a codec when it encounters " +"unencodable characters/undecodable bytes and *name* is specified as the " +"error parameter in the call to the encode/decode function." +msgstr "" + +#: c-api/codec.rst:88 +msgid "" +"The callback gets a single argument, an instance of :exc:" +"`UnicodeEncodeError`, :exc:`UnicodeDecodeError` or :exc:" +"`UnicodeTranslateError` that holds information about the problematic " +"sequence of characters or bytes and their offset in the original string " +"(see :ref:`unicodeexceptions` for functions to extract this information). " +"The callback must either raise the given exception, or return a two-item " +"tuple containing the replacement for the problematic sequence, and an " +"integer giving the offset in the original string at which encoding/decoding " +"should be resumed." +msgstr "" + +#: c-api/codec.rst:98 +msgid "Return ``0`` on success, ``-1`` on error." +msgstr "" + +#: c-api/codec.rst:102 +msgid "" +"Lookup the error handling callback function registered under *name*. As a " +"special case ``NULL`` can be passed, in which case the error handling " +"callback for \"strict\" will be returned." +msgstr "" + +#: c-api/codec.rst:108 +msgid "Raise *exc* as an exception." +msgstr "" + +#: c-api/codec.rst:112 +msgid "Ignore the unicode error, skipping the faulty input." +msgstr "" + +#: c-api/codec.rst:116 +msgid "Replace the unicode encode error with ``?`` or ``U+FFFD``." +msgstr "" + +#: c-api/codec.rst:120 +msgid "Replace the unicode encode error with XML character references." +msgstr "" + +#: c-api/codec.rst:124 +msgid "" +"Replace the unicode encode error with backslash escapes (``\\x``, ``\\u`` " +"and ``\\U``)." +msgstr "" + +#: c-api/codec.rst:129 +msgid "Replace the unicode encode error with ``\\N{...}`` escapes." +msgstr "" diff --git a/c-api/complex.po b/c-api/complex.po new file mode 100644 index 0000000000..68bc4bbbce --- /dev/null +++ b/c-api/complex.po @@ -0,0 +1,213 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-18 15:46+0200\n" +"PO-Revision-Date: 2019-01-14 20:31+0100\n" +"Last-Translator: ANTOINE FOURES \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.4\n" + +#: c-api/complex.rst:6 +msgid "Complex Number Objects" +msgstr "Objets représentant des nombres complexes" + +#: c-api/complex.rst:10 +msgid "" +"Python's complex number objects are implemented as two distinct types when " +"viewed from the C API: one is the Python object exposed to Python programs, " +"and the other is a C structure which represents the actual complex number " +"value. The API provides functions for working with both." +msgstr "" +"Les nombres complexes Python sont implémentés comme deux types distincts, " +"lorsqu'ils sont vus de l'API C : l'un est l'objet Python tel qu'il est vu " +"par les programmes Python, et l'autre est une structure C qui représente la " +"valeur exacte du nombre complexe. L'API fournit des fonctions pour " +"travailler avec ces deux représentations." + +#: c-api/complex.rst:17 +msgid "Complex Numbers as C Structures" +msgstr "Nombres complexes en tant que structures C" + +#: c-api/complex.rst:19 +msgid "" +"Note that the functions which accept these structures as parameters and " +"return them as results do so *by value* rather than dereferencing them " +"through pointers. This is consistent throughout the API." +msgstr "" +"Les fonctions qui acceptent ces structures comme paramètres et les renvoient " +"comme résultats le font en fonction de leur *valeur* au lieu de les dé-" +"référencer en utilisant des pointeurs. C'est constant dans toute l'API." + +#: c-api/complex.rst:26 +msgid "" +"The C structure which corresponds to the value portion of a Python complex " +"number object. Most of the functions for dealing with complex number " +"objects use structures of this type as input or output values, as " +"appropriate. It is defined as::" +msgstr "" +"Structure C représentant la valeur d'un nombre complexe Python. La majorité " +"des fonctions qui traitent des nombres complexes utilisent cette structure " +"en entrée ou en sortie, selon le cas. Elle est définie par ::" + +#: c-api/complex.rst:39 +msgid "" +"Return the sum of two complex numbers, using the C :c:type:`Py_complex` " +"representation." +msgstr "" +"Renvoie la somme de deux nombres complexes, sous la forme d'un :c:type:" +"`Py_complex` en C." + +#: c-api/complex.rst:45 +msgid "" +"Return the difference between two complex numbers, using the C :c:type:" +"`Py_complex` representation." +msgstr "" +"Renvoie la différence de deux nombres complexes, sous la forme d'un :c:type:" +"`Py_complex` en C." + +#: c-api/complex.rst:51 +#, fuzzy +msgid "" +"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:" +"`Py_complex` en C." + +#: c-api/complex.rst:57 +msgid "" +"Return the product of two complex numbers, using the C :c:type:`Py_complex` " +"representation." +msgstr "" +"Renvoie le produit de deux nombres complexes, sous la forme d'un :c:type:" +"`Py_complex` en C." + +#: c-api/complex.rst:63 +msgid "" +"Return the quotient of two complex numbers, using the C :c:type:`Py_complex` " +"representation." +msgstr "" +"Renvoie le quotient de deux nombres complexes, sous la forme d'un :c:type:" +"`Py_complex` en C." + +#: c-api/complex.rst:66 +msgid "" +"If *divisor* is null, this method returns zero and sets :c:data:`errno` to :" +"c:data:`EDOM`." +msgstr "" +"Si *divisor* est nul, cette méthode renvoie zéro et assigne :c:data:`EDOM` " +"à :c:data:`errno`." + +#: c-api/complex.rst:72 +msgid "" +"Return the exponentiation of *num* by *exp*, using the C :c:type:" +"`Py_complex` representation." +msgstr "" +"Renvoie *num* à la puissance *exp*, sous la forme d'un :c:type:`Py_complex` " +"en C." + +#: c-api/complex.rst:75 +msgid "" +"If *num* is null and *exp* is not a positive real number, this method " +"returns zero and sets :c:data:`errno` to :c:data:`EDOM`." +msgstr "" +"Si *num* est nul et *exp* n'est pas un nombre réel positif, cette méthode " +"renvoie zéro et assigne :c:data:`EDOM` à :c:data:`errno`." + +#: c-api/complex.rst:80 +msgid "Complex Numbers as Python Objects" +msgstr "Nombres complexes en tant qu'objets Python" + +#: c-api/complex.rst:85 +msgid "" +"This subtype of :c:type:`PyObject` represents a Python complex number object." +msgstr "" +"Ce sous-type de l'objet :c:type:`PyObject` représente un nombre complexe en " +"Python." + +#: c-api/complex.rst:90 +msgid "" +"This instance of :c:type:`PyTypeObject` represents the Python complex number " +"type. It is the same object as :class:`complex` in the Python layer." +msgstr "" +"Cette instance de :c:type:`PyTypeObject` représente le type nombre complexe " +"Python. C'est le même objet que la classe :class:`complex` de la couche " +"Python." + +#: c-api/complex.rst:96 +#, fuzzy +msgid "" +"Return true if its argument is a :c:type:`PyComplexObject` or a subtype of :" +"c:type:`PyComplexObject`. This function always succeeds." +msgstr "" +"Renvoie vrai si l'argument est de type :c:type:`PyComplexObject` ou un sous-" +"type de :c:type:`PyComplexObject`." + +#: c-api/complex.rst:102 +#, fuzzy +msgid "" +"Return true if its argument is a :c:type:`PyComplexObject`, but not a " +"subtype of :c:type:`PyComplexObject`. This function always succeeds." +msgstr "" +"Renvoie vrai si l'argument est de type :c:type:`PyComplexObject`, mais pas " +"un sous-type de :c:type:`PyComplexObject`." + +#: c-api/complex.rst:108 +msgid "" +"Create a new Python complex number object from a C :c:type:`Py_complex` " +"value." +msgstr "" +"Crée un nouveau nombre complexe à partir de la valeur d'un :c:type:" +"`Py_complex` en C." + +#: c-api/complex.rst:113 +msgid "Return a new :c:type:`PyComplexObject` object from *real* and *imag*." +msgstr "" +"Renvoie un nouveau :c:type:`PyComplexObject` à partir de *real* et de *imag*." + +#: c-api/complex.rst:118 +#, fuzzy +msgid "Return the real part of *op* as a C :c:expr:`double`." +msgstr "" +"Renvoie la partie réelle du nombre complexe *op* sous la forme d'un :c:type:" +"`double` en C." + +#: c-api/complex.rst:123 +#, fuzzy +msgid "Return the imaginary part of *op* as a C :c:expr:`double`." +msgstr "" +"Renvoie la partie imaginaire du nombre complexe *op* sous la forme d'un :c:" +"type:`double` en C." + +#: c-api/complex.rst:128 +msgid "Return the :c:type:`Py_complex` value of the complex number *op*." +msgstr "" +"Renvoie la valeur du nombre complexe *op* sous la forme d'un :c:type:" +"`Py_complex` en C." + +#: c-api/complex.rst:130 +#, fuzzy +msgid "" +"If *op* is not a Python complex number object but has a :meth:`__complex__` " +"method, this method will first be called to convert *op* to a Python complex " +"number object. If ``__complex__()`` is not defined then it falls back to :" +"meth:`__float__`. If ``__float__()`` is not defined then it falls back to :" +"meth:`__index__`. Upon failure, this method returns ``-1.0`` as a real " +"value." +msgstr "" +"Si *op* n'est pas un nombre complexe Python mais a une méthode :meth:" +"`__complex__`, cette méthode est d'abord appelée pour convertir *op* en " +"nombre complexe Python. En cas d'échec, cette méthode renvoie ``-1.0`` en " +"tant que nombre réel." + +#: c-api/complex.rst:137 +msgid "Use :meth:`__index__` if available." +msgstr "" diff --git a/c-api/concrete.po b/c-api/concrete.po new file mode 100644 index 0000000000..72da448f4a --- /dev/null +++ b/c-api/concrete.po @@ -0,0 +1,91 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +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: 2021-01-28 14:56+0100\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.4.2\n" + +#: c-api/concrete.rst:8 +msgid "Concrete Objects Layer" +msgstr "Couche des objets concrets" + +#: c-api/concrete.rst:10 +msgid "" +"The functions in this chapter are specific to certain Python object types. " +"Passing them an object of the wrong type is not a good idea; if you receive " +"an object from a Python program and you are not sure that it has the right " +"type, you must perform a type check first; for example, to check that an " +"object is a dictionary, use :c:func:`PyDict_Check`. The chapter is " +"structured like the \"family tree\" of Python object types." +msgstr "" +"Les fonctions de ce chapitre sont spécifiques à certains types d'objets " +"Python. Leur donner un objet du mauvais type n'est pas une bonne idée, si " +"vous recevez un objet d'un programme Python, et que vous n'êtes pas sûr " +"qu'il soit du bon type, vous devez vérifier son type en premier. Par " +"exemple, pour vérifier qu'un objet est un dictionnaire, utilisez :c:func:" +"`PyDict_Check`. Ce chapitre est organisé comme un arbre généalogique de " +"types d'objets Python." + +#: c-api/concrete.rst:19 +msgid "" +"While the functions described in this chapter carefully check the type of " +"the objects which are passed in, many of them do not check for ``NULL`` " +"being passed instead of a valid object. Allowing ``NULL`` to be passed in " +"can cause memory access violations and immediate termination of the " +"interpreter." +msgstr "" +"Tandis que les fonctions décrites dans ce chapitre vérifient avec soin le " +"type des objets qui leur sont passés, beaucoup d'entre elles ne vérifient " +"pas que ``NULL`` est passé au lieu d'un objet valide. Autoriser ``NULL`` à " +"être passé peut provoquer des violations d'accès à la mémoire et ainsi " +"terminer immédiatement l'interpréteur." + +#: c-api/concrete.rst:28 +msgid "Fundamental Objects" +msgstr "Objets fondamentaux" + +#: c-api/concrete.rst:30 +msgid "" +"This section describes Python type objects and the singleton object ``None``." +msgstr "" +"Cette section décrit les objets de type Python et l'objet singleton ``None``." + +#: c-api/concrete.rst:41 +msgid "Numeric Objects" +msgstr "Objets numériques" + +#: c-api/concrete.rst:56 +msgid "Sequence Objects" +msgstr "Objets séquences" + +#: c-api/concrete.rst:60 +msgid "" +"Generic operations on sequence objects were discussed in the previous " +"chapter; this section deals with the specific kinds of sequence objects that " +"are intrinsic to the Python language." +msgstr "" +"Les opérations génériques sur les objets séquences ont été discutées dans le " +"chapitre précédent. Cette section traite des genres spécifiques d'objets " +"séquences qui sont intrinsèques au langage Python." + +#: c-api/concrete.rst:78 +msgid "Container Objects" +msgstr "Objets conteneurs" + +#: c-api/concrete.rst:91 +msgid "Function Objects" +msgstr "Objets fonctions" + +#: c-api/concrete.rst:102 +msgid "Other Objects" +msgstr "Autres objets" diff --git a/c-api/contextvars.po b/c-api/contextvars.po new file mode 100644 index 0000000000..36ac798c66 --- /dev/null +++ b/c-api/contextvars.po @@ -0,0 +1,172 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \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" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: c-api/contextvars.rst:6 +msgid "Context Variables Objects" +msgstr "" + +#: c-api/contextvars.rst:13 +msgid "" +"In Python 3.7.1 the signatures of all context variables C APIs were " +"**changed** to use :c:type:`PyObject` pointers instead of :c:type:" +"`PyContext`, :c:type:`PyContextVar`, and :c:type:`PyContextToken`, e.g.::" +msgstr "" + +#: c-api/contextvars.rst:24 +msgid "See :issue:`34762` for more details." +msgstr "" + +#: c-api/contextvars.rst:29 +msgid "" +"This section details the public C API for the :mod:`contextvars` module." +msgstr "" + +#: c-api/contextvars.rst:33 +msgid "" +"The C structure used to represent a :class:`contextvars.Context` object." +msgstr "" + +#: c-api/contextvars.rst:38 +msgid "" +"The C structure used to represent a :class:`contextvars.ContextVar` object." +msgstr "" + +#: c-api/contextvars.rst:43 +msgid "The C structure used to represent a :class:`contextvars.Token` object." +msgstr "" + +#: c-api/contextvars.rst:47 +msgid "The type object representing the *context* type." +msgstr "" + +#: c-api/contextvars.rst:51 +msgid "The type object representing the *context variable* type." +msgstr "" + +#: c-api/contextvars.rst:55 +msgid "The type object representing the *context variable token* type." +msgstr "" + +#: c-api/contextvars.rst:58 +msgid "Type-check macros:" +msgstr "Macros pour vérifier les types :" + +#: c-api/contextvars.rst:62 +msgid "" +"Return true if *o* is of type :c:data:`PyContext_Type`. *o* must not be " +"``NULL``. This function always succeeds." +msgstr "" + +#: c-api/contextvars.rst:67 +msgid "" +"Return true if *o* is of type :c:data:`PyContextVar_Type`. *o* must not be " +"``NULL``. This function always succeeds." +msgstr "" + +#: c-api/contextvars.rst:72 +msgid "" +"Return true if *o* is of type :c:data:`PyContextToken_Type`. *o* must not be " +"``NULL``. This function always succeeds." +msgstr "" + +#: c-api/contextvars.rst:76 +msgid "Context object management functions:" +msgstr "" + +#: c-api/contextvars.rst:80 +msgid "" +"Create a new empty context object. Returns ``NULL`` if an error has " +"occurred." +msgstr "" + +#: c-api/contextvars.rst:85 +msgid "" +"Create a shallow copy of the passed *ctx* context object. Returns ``NULL`` " +"if an error has occurred." +msgstr "" + +#: c-api/contextvars.rst:90 +msgid "" +"Create a shallow copy of the current thread context. Returns ``NULL`` if an " +"error has occurred." +msgstr "" + +#: c-api/contextvars.rst:95 +msgid "" +"Set *ctx* as the current context for the current thread. Returns ``0`` on " +"success, and ``-1`` on error." +msgstr "" + +#: c-api/contextvars.rst:100 +msgid "" +"Deactivate the *ctx* context and restore the previous context as the current " +"context for the current thread. Returns ``0`` on success, and ``-1`` on " +"error." +msgstr "" + +#: c-api/contextvars.rst:105 +msgid "Context variable functions:" +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 specifies a default " +"value for the context variable, or ``NULL`` for no default. If an error has " +"occurred, this function returns ``NULL``." +msgstr "" + +#: c-api/contextvars.rst:116 +msgid "" +"Get the value of a context variable. Returns ``-1`` if an error has " +"occurred during lookup, and ``0`` if no error occurred, whether or not a " +"value was found." +msgstr "" + +#: c-api/contextvars.rst:120 +msgid "" +"If the context variable was found, *value* will be a pointer to it. If the " +"context variable was *not* found, *value* will point to:" +msgstr "" + +#: c-api/contextvars.rst:123 +msgid "*default_value*, if not ``NULL``;" +msgstr "" + +#: c-api/contextvars.rst:124 +msgid "the default value of *var*, if not ``NULL``;" +msgstr "" + +#: c-api/contextvars.rst:125 +msgid "``NULL``" +msgstr "``NULL``" + +#: c-api/contextvars.rst:127 +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 new " +"token object for this change, or ``NULL`` if an error has occurred." +msgstr "" + +#: 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 " +"returns ``0`` on success and ``-1`` on error." +msgstr "" diff --git a/c-api/conversion.po b/c-api/conversion.po new file mode 100644 index 0000000000..af95d132bc --- /dev/null +++ b/c-api/conversion.po @@ -0,0 +1,195 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-18 15:46+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \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" + +#: c-api/conversion.rst:6 +msgid "String conversion and formatting" +msgstr "Conversion et formatage de chaînes" + +#: c-api/conversion.rst:8 +msgid "Functions for number conversion and formatted string output." +msgstr "" +"Fonctions de conversion pour les nombres et pour la sortie des chaînes " +"formatées." + +#: c-api/conversion.rst:13 +msgid "" +"Output not more than *size* bytes to *str* according to the format string " +"*format* and the extra arguments. See the Unix man page :manpage:" +"`snprintf(3)`." +msgstr "" + +#: c-api/conversion.rst:19 +msgid "" +"Output not more than *size* bytes to *str* according to the format string " +"*format* and the variable argument list *va*. Unix man page :manpage:" +"`vsnprintf(3)`." +msgstr "" + +#: c-api/conversion.rst:23 +msgid "" +":c:func:`PyOS_snprintf` and :c:func:`PyOS_vsnprintf` wrap the Standard C " +"library functions :c:func:`snprintf` and :c:func:`vsnprintf`. Their purpose " +"is to guarantee consistent behavior in corner cases, which the Standard C " +"functions do not." +msgstr "" + +#: c-api/conversion.rst:28 +msgid "" +"The wrappers ensure that ``str[size-1]`` is always ``'\\0'`` upon return. " +"They never write more than *size* bytes (including the trailing ``'\\0'``) " +"into str. Both functions require that ``str != NULL``, ``size > 0``, " +"``format != NULL`` and ``size < INT_MAX``. Note that this means there is no " +"equivalent to the C99 ``n = snprintf(NULL, 0, ...)`` which would determine " +"the necessary buffer size." +msgstr "" + +#: c-api/conversion.rst:34 +msgid "" +"The return value (*rv*) for these functions should be interpreted as follows:" +msgstr "" + +#: c-api/conversion.rst:36 +msgid "" +"When ``0 <= rv < size``, the output conversion was successful and *rv* " +"characters were written to *str* (excluding the trailing ``'\\0'`` byte at " +"``str[rv]``)." +msgstr "" + +#: c-api/conversion.rst:40 +msgid "" +"When ``rv >= size``, the output conversion was truncated and a buffer with " +"``rv + 1`` bytes would have been needed to succeed. ``str[size-1]`` is " +"``'\\0'`` in this case." +msgstr "" + +#: c-api/conversion.rst:44 +msgid "" +"When ``rv < 0``, \"something bad happened.\" ``str[size-1]`` is ``'\\0'`` in " +"this case too, but the rest of *str* is undefined. The exact cause of the " +"error depends on the underlying platform." +msgstr "" + +#: c-api/conversion.rst:49 +msgid "" +"The following functions provide locale-independent string to number " +"conversions." +msgstr "" + +#: c-api/conversion.rst:53 +msgid "" +"Convert a string ``s`` to a :c:expr:`double`, raising a Python exception on " +"failure. The set of accepted strings corresponds to the set of strings " +"accepted by Python's :func:`float` constructor, except that ``s`` must not " +"have leading or trailing whitespace. The conversion is independent of the " +"current locale." +msgstr "" + +#: c-api/conversion.rst:59 +msgid "" +"If ``endptr`` is ``NULL``, convert the whole string. Raise :exc:" +"`ValueError` and return ``-1.0`` if the string is not a valid representation " +"of a floating-point number." +msgstr "" + +#: c-api/conversion.rst:63 +msgid "" +"If endptr is not ``NULL``, convert as much of the string as possible and set " +"``*endptr`` to point to the first unconverted character. If no initial " +"segment of the string is the valid representation of a floating-point " +"number, set ``*endptr`` to point to the beginning of the string, raise " +"ValueError, and return ``-1.0``." +msgstr "" + +#: c-api/conversion.rst:70 +msgid "" +"If ``s`` represents a value that is too large to store in a float (for " +"example, ``\"1e500\"`` is such a string on many platforms) then if " +"``overflow_exception`` is ``NULL`` return ``Py_HUGE_VAL`` (with an " +"appropriate sign) and don't set any exception. Otherwise, " +"``overflow_exception`` must point to a Python exception object; raise that " +"exception and return ``-1.0``. In both cases, set ``*endptr`` to point to " +"the first character after the converted value." +msgstr "" + +#: c-api/conversion.rst:78 +msgid "" +"If any other error occurs during the conversion (for example an out-of-" +"memory error), set the appropriate Python exception and return ``-1.0``." +msgstr "" + +#: c-api/conversion.rst:87 +msgid "" +"Convert a :c:expr:`double` *val* to a string using supplied *format_code*, " +"*precision*, and *flags*." +msgstr "" + +#: c-api/conversion.rst:90 +msgid "" +"*format_code* must be one of ``'e'``, ``'E'``, ``'f'``, ``'F'``, ``'g'``, " +"``'G'`` or ``'r'``. For ``'r'``, the supplied *precision* must be 0 and is " +"ignored. The ``'r'`` format code specifies the standard :func:`repr` format." +msgstr "" + +#: c-api/conversion.rst:95 +msgid "" +"*flags* can be zero or more of the values ``Py_DTSF_SIGN``, " +"``Py_DTSF_ADD_DOT_0``, or ``Py_DTSF_ALT``, or-ed together:" +msgstr "" + +#: c-api/conversion.rst:98 +msgid "" +"``Py_DTSF_SIGN`` means to always precede the returned string with a sign " +"character, even if *val* is non-negative." +msgstr "" + +#: c-api/conversion.rst:101 +msgid "" +"``Py_DTSF_ADD_DOT_0`` means to ensure that the returned string will not look " +"like an integer." +msgstr "" + +#: c-api/conversion.rst:104 +msgid "" +"``Py_DTSF_ALT`` means to apply \"alternate\" formatting rules. See the " +"documentation for the :c:func:`PyOS_snprintf` ``'#'`` specifier for details." +msgstr "" + +#: c-api/conversion.rst:108 +msgid "" +"If *ptype* is non-``NULL``, then the value it points to will be set to one " +"of ``Py_DTST_FINITE``, ``Py_DTST_INFINITE``, or ``Py_DTST_NAN``, signifying " +"that *val* is a finite number, an infinite number, or not a number, " +"respectively." +msgstr "" + +#: c-api/conversion.rst:112 +msgid "" +"The return value is a pointer to *buffer* with the converted string or " +"``NULL`` if the conversion failed. The caller is responsible for freeing the " +"returned string by calling :c:func:`PyMem_Free`." +msgstr "" + +#: c-api/conversion.rst:121 +msgid "" +"Case insensitive comparison of strings. The function works almost " +"identically to :c:func:`strcmp` except that it ignores the case." +msgstr "" + +#: c-api/conversion.rst:127 +msgid "" +"Case insensitive comparison of strings. The function works almost " +"identically to :c:func:`strncmp` except that it ignores the case." +msgstr "" diff --git a/c-api/coro.po b/c-api/coro.po new file mode 100644 index 0000000000..7ea10961be --- /dev/null +++ b/c-api/coro.po @@ -0,0 +1,56 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +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:24+0200\n" +"Last-Translator: Julien Palard \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" + +#: c-api/coro.rst:6 +msgid "Coroutine Objects" +msgstr "Objets coroutines" + +#: c-api/coro.rst:10 +msgid "" +"Coroutine objects are what functions declared with an ``async`` keyword " +"return." +msgstr "" +"Les objets coroutines sont les objets renvoyés par les fonctions déclarées " +"avec le mot clef ``async``." + +#: c-api/coro.rst:16 +msgid "The C structure used for coroutine objects." +msgstr "La structure C utilisée pour les objets coroutine." + +#: c-api/coro.rst:21 +msgid "The type object corresponding to coroutine objects." +msgstr "L'objet type correspondant aux objets coroutines." + +#: c-api/coro.rst:26 +#, fuzzy +msgid "" +"Return true if *ob*'s type is :c:type:`PyCoro_Type`; *ob* must not be " +"``NULL``. This function always succeeds." +msgstr "" +"Renvoie vrai si *ob* est de type *PyCoro_Type*. *ob* ne doit pas être *NULL*." + +#: c-api/coro.rst:32 +#, fuzzy +msgid "" +"Create and return a new coroutine object based on the *frame* object, with " +"``__name__`` and ``__qualname__`` set to *name* and *qualname*. A reference " +"to *frame* is stolen by this function. The *frame* argument must not be " +"``NULL``." +msgstr "" +"Crée et renvoie un nouvel objet coroutine basé sur l'objet *frame*, avec " +"``__name__`` et ``__qualname__`` respectivement assignés de *name* et " +"*qualname*. Une référence à *frame* est empruntée par cette fonction. " +"L'argument *frame* ne doit pas être *NULL*." diff --git a/c-api/datetime.po b/c-api/datetime.po new file mode 100644 index 0000000000..d3678e3c6f --- /dev/null +++ b/c-api/datetime.po @@ -0,0 +1,342 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-18 15:46+0200\n" +"PO-Revision-Date: 2021-12-11 11:57+0100\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.3\n" +"X-Poedit-Bookmarks: -1,-1,-1,-1,-1,-1,-1,3,-1,-1\n" + +#: c-api/datetime.rst:6 +msgid "DateTime Objects" +msgstr "Objets DateTime" + +#: c-api/datetime.rst:8 +msgid "" +"Various date and time objects are supplied by the :mod:`datetime` module. " +"Before using any of these functions, the header file :file:`datetime.h` must " +"be included in your source (note that this is not included by :file:`Python." +"h`), and the macro :c:macro:`PyDateTime_IMPORT` must be invoked, usually as " +"part of the module initialisation function. The macro puts a pointer to a C " +"structure into a static variable, :c:data:`PyDateTimeAPI`, that is used by " +"the following macros." +msgstr "" +"De nombreux objets *date* et *time* sont exposés par le module :mod:" +"`DateTime`. Avant d'utiliser une de ces fonctions, le fichier d'en-tête :" +"file:`datetime.h` doit être inclus dans vos sources (veuillez noter qu'il " +"n'est pas inclus par le fichier :file:`Python.h`) et la macro :c:macro:" +"`PyDateTime_IMPORT` doit être invoquée, généralement lors de la fonction " +"d'initialisation du module. La macro crée un pointeur vers une structure C " +"et place celui-ci dans une variable statique, :c:data:`PyDateTimeAPI`, qui " +"est utilisée par les macros suivantes." + +#: c-api/datetime.rst:16 +msgid "Macro for access to the UTC singleton:" +msgstr "Macro pour accéder au singleton UTC :" + +#: c-api/datetime.rst:20 +msgid "" +"Returns the time zone singleton representing UTC, the same object as :attr:" +"`datetime.timezone.utc`." +msgstr "" +"Renvoie le singleton du fuseau horaire UTC, qui est le même objet que :attr:" +"`datetime.timezone.utc`." + +#: c-api/datetime.rst:26 +msgid "Type-check macros:" +msgstr "Macros pour vérifier les types :" + +#: c-api/datetime.rst:30 +#, fuzzy +msgid "" +"Return true if *ob* is of type :c:data:`PyDateTime_DateType` or a subtype " +"of :c:data:`PyDateTime_DateType`. *ob* must not be ``NULL``. This function " +"always succeeds." +msgstr "" +"Renvoie vrai si *ob* est de type :c:data:`PyDateTime_DateType` ou un sous-" +"type de :c:data:`PyDateTime_DateType`. *ob* ne doit pas être *NULL*." + +#: c-api/datetime.rst:37 +#, fuzzy +msgid "" +"Return true if *ob* is of type :c:data:`PyDateTime_DateType`. *ob* must not " +"be ``NULL``. This function always succeeds." +msgstr "" +"Renvoie vrai si *ob* est de type :c:data:`PyDateTime_DateType`. *ob* ne doit " +"pas être *NULL*." + +#: c-api/datetime.rst:43 +#, fuzzy +msgid "" +"Return true if *ob* is of type :c:data:`PyDateTime_DateTimeType` or a " +"subtype of :c:data:`PyDateTime_DateTimeType`. *ob* must not be ``NULL``. " +"This function always succeeds." +msgstr "" +"Renvoie vrai si *ob* est de type :c:data:`PyDateTime_DateTimeType` ou un " +"sous-type de :c:data:`PyDateTime_DateTimeType`. *ob* ne doit pas être *NULL*." + +#: c-api/datetime.rst:50 +#, fuzzy +msgid "" +"Return true if *ob* is of type :c:data:`PyDateTime_DateTimeType`. *ob* must " +"not be ``NULL``. This function always succeeds." +msgstr "" +"Renvoie vrai si *ob* est de type :c:data:`PyDateTime_DateTimeType`. *ob* ne " +"doit pas être *NULL*." + +#: c-api/datetime.rst:56 +#, fuzzy +msgid "" +"Return true if *ob* is of type :c:data:`PyDateTime_TimeType` or a subtype " +"of :c:data:`PyDateTime_TimeType`. *ob* must not be ``NULL``. This function " +"always succeeds." +msgstr "" +"Renvoie vrai si *ob* est de type :c:data:`PyDateTime_TimeType` ou un sous-" +"type de :c:data:`PyDateTime_TimeType`. *ob* ne doit pas être *NULL*." + +#: c-api/datetime.rst:63 +#, fuzzy +msgid "" +"Return true if *ob* is of type :c:data:`PyDateTime_TimeType`. *ob* must not " +"be ``NULL``. This function always succeeds." +msgstr "" +"Renvoie vrai si *ob* est de type :c:data:`PyDateTime_TimeType`. *ob* ne doit " +"pas être *NULL*." + +#: c-api/datetime.rst:69 +#, fuzzy +msgid "" +"Return true if *ob* is of type :c:data:`PyDateTime_DeltaType` or a subtype " +"of :c:data:`PyDateTime_DeltaType`. *ob* must not be ``NULL``. This " +"function always succeeds." +msgstr "" +"Renvoie vrai si *ob* est de type :c:data:`PyDateTime_DeltaType` ou un sous-" +"type de :c:data:`PyDateTime_DeltaType`. *ob* ne doit pas être *NULL*." + +#: c-api/datetime.rst:76 +#, fuzzy +msgid "" +"Return true if *ob* is of type :c:data:`PyDateTime_DeltaType`. *ob* must not " +"be ``NULL``. This function always succeeds." +msgstr "" +"Renvoie vrai si *ob* est de type :c:data:`PyDateTime_DeltaType`. *ob* ne " +"doit pas être *NULL*." + +#: c-api/datetime.rst:82 +#, fuzzy +msgid "" +"Return true if *ob* is of type :c:data:`PyDateTime_TZInfoType` or a subtype " +"of :c:data:`PyDateTime_TZInfoType`. *ob* must not be ``NULL``. This " +"function always succeeds." +msgstr "" +"Renvoie vrai si *ob* est de type :c:data:`PyDateTime_TZInfoType` ou un sous-" +"type de :c:data:`PyDateTime_TZInfoType`. *ob* ne doit pas être *NULL*." + +#: c-api/datetime.rst:89 +#, fuzzy +msgid "" +"Return true if *ob* is of type :c:data:`PyDateTime_TZInfoType`. *ob* must " +"not be ``NULL``. This function always succeeds." +msgstr "" +"Renvoie vrai si *ob* est de type :c:data:`PyDateTime_TZInfoType`. *ob* ne " +"doit pas être *NULL*." + +#: c-api/datetime.rst:93 +msgid "Macros to create objects:" +msgstr "Macros pour créer des objets :" + +#: c-api/datetime.rst:97 +msgid "" +"Return a :class:`datetime.date` object with the specified year, month and " +"day." +msgstr "" +"Renvoie un objet :class:`datetime.date` avec l'année, le mois et le jour " +"spécifiés." + +#: c-api/datetime.rst:102 +msgid "" +"Return a :class:`datetime.datetime` object with the specified year, month, " +"day, hour, minute, second and microsecond." +msgstr "" +"Renvoie un objet :class:`datetime.datetime` avec l'année, le mois, le jour, " +"l'heure, la minute, la seconde et la microseconde spécifiés." + +#: c-api/datetime.rst:108 +msgid "" +"Return a :class:`datetime.datetime` object with the specified year, month, " +"day, hour, minute, second, microsecond and fold." +msgstr "" +"Renvoie un objet :class:`datetime.datetime` avec l'année, le mois, le jour, " +"l'heure, la minute, la seconde, la microseconde et le pli (*fold* en " +"anglais) spécifiés." + +#: c-api/datetime.rst:116 +msgid "" +"Return a :class:`datetime.time` object with the specified hour, minute, " +"second and microsecond." +msgstr "" +"Renvoie un objet :class:`datetime.time` avec l'heure, la minute, la seconde " +"et la microseconde spécifiées." + +#: c-api/datetime.rst:122 +msgid "" +"Return a :class:`datetime.time` object with the specified hour, minute, " +"second, microsecond and fold." +msgstr "" +"Renvoie un objet :class:`datetime.time` avec l'heure, la minute, la seconde, " +"la microseconde et le pli (*fold* en anglais) spécifiés." + +#: c-api/datetime.rst:130 +msgid "" +"Return a :class:`datetime.timedelta` object representing the given number of " +"days, seconds and microseconds. Normalization is performed so that the " +"resulting number of microseconds and seconds lie in the ranges documented " +"for :class:`datetime.timedelta` objects." +msgstr "" +"Renvoie un objet :class:`datetime.timedelta` représentant le nombre passé en " +"paramètre de jours, de secondes et de microsecondes. Le résultat est " +"normalisé pour que le nombre de microsecondes et de secondes tombe dans la " +"plage documentée pour les objets :class:`datetime.timedelta`." + +#: c-api/datetime.rst:138 +msgid "" +"Return a :class:`datetime.timezone` object with an unnamed fixed offset " +"represented by the *offset* argument." +msgstr "" +"Renvoie un objet :class:`datetime.timezone` avec un décalage anonyme fixe " +"représenté par l'argument *offset*." + +#: c-api/datetime.rst:146 +msgid "" +"Return a :class:`datetime.timezone` object with a fixed offset represented " +"by the *offset* argument and with tzname *name*." +msgstr "" +"Renvoie un objet :class:`datetime.timezone` avec un décalage fixe représenté " +"par l'argument *offset* et avec le nom de fuseau horaire *name*." + +#: c-api/datetime.rst:152 +#, fuzzy +msgid "" +"Macros to extract fields from date objects. The argument must be an " +"instance of :c:data:`PyDateTime_Date`, including subclasses (such as :c:data:" +"`PyDateTime_DateTime`). The argument must not be ``NULL``, and the type is " +"not checked:" +msgstr "" +"Macros pour extraire les champs des objets *date*. L'argument doit être une " +"instance de :c:data:`PyDateTime_Date`, ou une sous-classe (telle que :c:data:" +"`PyDateTime_DateTime`). L'argument ne doit pas être *NULL*, et le type n'est " +"pas vérifié :" + +#: c-api/datetime.rst:159 +msgid "Return the year, as a positive int." +msgstr "Renvoie l'année, sous forme d'entier positif." + +#: c-api/datetime.rst:164 +msgid "Return the month, as an int from 1 through 12." +msgstr "Renvoie le mois, sous forme d'entier allant de 1 à 12." + +#: c-api/datetime.rst:169 +msgid "Return the day, as an int from 1 through 31." +msgstr "Renvoie le jour, sous forme d'entier allant de 1 à 31." + +#: c-api/datetime.rst:172 +#, fuzzy +msgid "" +"Macros to extract fields from datetime objects. The argument must be an " +"instance of :c:data:`PyDateTime_DateTime`, including subclasses. The " +"argument must not be ``NULL``, and the type is not checked:" +msgstr "" +"Macros pour extraire les champs des objets *datetime*. L'argument doit être " +"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:216 +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:221 +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:226 +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:231 +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:236 +#, 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:243 +msgid "Return the tzinfo (which may be ``None``)." +msgstr "" + +#: c-api/datetime.rst:210 +#, fuzzy +msgid "" +"Macros to extract fields from time objects. The argument must be an " +"instance of :c:data:`PyDateTime_Time`, including subclasses. The argument " +"must not be ``NULL``, and the type is not checked:" +msgstr "" +"Macros pour extraire les champs des objets *time*. L'argument doit être une " +"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:248 +#, fuzzy +msgid "" +"Macros to extract fields from time delta objects. The argument must be an " +"instance of :c:data:`PyDateTime_Delta`, including subclasses. The argument " +"must not be ``NULL``, and the type is not checked:" +msgstr "" +"Macros pour extraire les champs des objets *time delta*. L'argument doit " +"ê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:254 +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:261 +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:268 +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:273 +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:277 +msgid "" +"Create and return a new :class:`datetime.datetime` object given an argument " +"tuple suitable for passing to :meth:`datetime.datetime.fromtimestamp()`." +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:283 +msgid "" +"Create and return a new :class:`datetime.date` object given an argument " +"tuple suitable for passing to :meth:`datetime.date.fromtimestamp()`." +msgstr "" +"Crée et renvoie un nouvel objet :class:`datetime.date` à partir d'un *n*-" +"uplet qui peut être passé à :meth:`datetime.date.fromtimestamp()`." diff --git a/c-api/descriptor.po b/c-api/descriptor.po new file mode 100644 index 0000000000..b9eae213d3 --- /dev/null +++ b/c-api/descriptor.po @@ -0,0 +1,42 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-09-23 16:16+0200\n" +"PO-Revision-Date: 2018-02-15 00:32+0100\n" +"Last-Translator: Julien Palard \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" + +#: c-api/descriptor.rst:6 +msgid "Descriptor Objects" +msgstr "Les descripteurs" + +#: c-api/descriptor.rst:8 +msgid "" +"\"Descriptors\" are objects that describe some attribute of an object. They " +"are found in the dictionary of type objects." +msgstr "" +"Les \"Descripteurs\" sont des objets décrivant des attributs pour un objet. " +"Ils se trouvent dans le dictionnaire du type de l'objet." + +#: c-api/descriptor.rst:15 +msgid "The type object for the built-in descriptor types." +msgstr "L'objet *type* des descripteurs natifs." + +#: c-api/descriptor.rst:35 +#, fuzzy +msgid "" +"Return non-zero if the descriptor objects *descr* describes a data " +"attribute, or ``0`` if it describes a method. *descr* must be a descriptor " +"object; there is no error checking." +msgstr "" +"Renvoie vrai si le descripteur *descr* décrit un attribut de donnée, ou faux " +"s'il décrit une méthode. *descr* doit être un objet descripteur. Il n'y a " +"pas de vérification d'erreur." diff --git a/c-api/dict.po b/c-api/dict.po new file mode 100644 index 0000000000..4ec951e3a1 --- /dev/null +++ b/c-api/dict.po @@ -0,0 +1,229 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-22 22:57+0100\n" +"PO-Revision-Date: 2018-07-03 11:36+0200\n" +"Last-Translator: FULL NAME \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" + +#: c-api/dict.rst:6 +msgid "Dictionary Objects" +msgstr "Objets dictionnaires" + +#: c-api/dict.rst:13 +#, fuzzy +msgid "" +"This subtype of :c:type:`PyObject` represents a Python dictionary object." +msgstr "" +"Ce sous-type de :c:type:`PyObject` représente un objet ``bytearray`` Python." + +#: c-api/dict.rst:18 +#, fuzzy +msgid "" +"This instance of :c:type:`PyTypeObject` represents the Python dictionary " +"type. This is the same object as :class:`dict` in the Python layer." +msgstr "" +"Cette instance de l'objet :c:type:`PyTypeObject` représente le type nombre à " +"virgule flottante en Python. C'est le même objet que la classe :class:" +"`float` de la couche Python." + +#: c-api/dict.rst:24 +msgid "" +"Return true if *p* is a dict object or an instance of a subtype of the dict " +"type. This function always succeeds." +msgstr "" + +#: c-api/dict.rst:30 +msgid "" +"Return true if *p* is a dict object, but not an instance of a subtype of the " +"dict type. This function always succeeds." +msgstr "" + +#: c-api/dict.rst:36 +msgid "Return a new empty dictionary, or ``NULL`` on failure." +msgstr "" + +#: c-api/dict.rst:41 +msgid "" +"Return a :class:`types.MappingProxyType` object for a mapping which enforces " +"read-only behavior. This is normally used to create a view to prevent " +"modification of the dictionary for non-dynamic class types." +msgstr "" + +#: c-api/dict.rst:48 +msgid "Empty an existing dictionary of all key-value pairs." +msgstr "" + +#: c-api/dict.rst:53 +msgid "" +"Determine if dictionary *p* contains *key*. If an item in *p* is matches " +"*key*, return ``1``, otherwise return ``0``. On error, return ``-1``. This " +"is equivalent to the Python expression ``key in p``." +msgstr "" + +#: c-api/dict.rst:60 +msgid "Return a new dictionary that contains the same key-value pairs as *p*." +msgstr "" + +#: c-api/dict.rst:65 +msgid "" +"Insert *val* into the dictionary *p* with a key of *key*. *key* must be :" +"term:`hashable`; if it isn't, :exc:`TypeError` will be raised. Return ``0`` " +"on success or ``-1`` on failure. This function *does not* steal a reference " +"to *val*." +msgstr "" + +#: c-api/dict.rst:75 +msgid "" +"Insert *val* into the dictionary *p* using *key* as a key. *key* should be " +"a :c:expr:`const char*`. The key object is created using " +"``PyUnicode_FromString(key)``. Return ``0`` on success or ``-1`` on " +"failure. This function *does not* steal a reference to *val*." +msgstr "" + +#: c-api/dict.rst:83 +msgid "" +"Remove the entry in dictionary *p* with key *key*. *key* must be :term:" +"`hashable`; if it isn't, :exc:`TypeError` is raised. If *key* is not in the " +"dictionary, :exc:`KeyError` is raised. Return ``0`` on success or ``-1`` on " +"failure." +msgstr "" + +#: c-api/dict.rst:91 +msgid "" +"Remove the entry in dictionary *p* which has a key specified by the string " +"*key*. If *key* is not in the dictionary, :exc:`KeyError` is raised. Return " +"``0`` on success or ``-1`` on failure." +msgstr "" + +#: c-api/dict.rst:98 +msgid "" +"Return the object from dictionary *p* which has a key *key*. Return " +"``NULL`` if the key *key* is not present, but *without* setting an exception." +msgstr "" + +#: c-api/dict.rst:101 +msgid "" +"Note that exceptions which occur while calling :meth:`__hash__` and :meth:" +"`__eq__` methods will get suppressed. To get error reporting use :c:func:" +"`PyDict_GetItemWithError()` instead." +msgstr "" + +#: c-api/dict.rst:105 +msgid "" +"Calling this API without :term:`GIL` held had been allowed for historical " +"reason. It is no longer allowed." +msgstr "" + +#: c-api/dict.rst:112 +msgid "" +"Variant of :c:func:`PyDict_GetItem` that does not suppress exceptions. " +"Return ``NULL`` **with** an exception set if an exception occurred. Return " +"``NULL`` **without** an exception set if the key wasn't present." +msgstr "" + +#: c-api/dict.rst:120 +msgid "" +"This is the same as :c:func:`PyDict_GetItem`, but *key* is specified as a :c:" +"expr:`const char*`, rather than a :c:expr:`PyObject*`." +msgstr "" + +#: c-api/dict.rst:123 +msgid "" +"Note that exceptions which occur while calling :meth:`__hash__` and :meth:" +"`__eq__` methods and creating a temporary string object will get suppressed. " +"To get error reporting use :c:func:`PyDict_GetItemWithError()` instead." +msgstr "" + +#: c-api/dict.rst:131 +msgid "" +"This is the same as the Python-level :meth:`dict.setdefault`. If present, " +"it returns the value corresponding to *key* from the dictionary *p*. If the " +"key is not in the dict, it is inserted with value *defaultobj* and " +"*defaultobj* is returned. This function evaluates the hash function of " +"*key* only once, instead of evaluating it independently for the lookup and " +"the insertion." +msgstr "" + +#: c-api/dict.rst:141 +msgid "" +"Return a :c:type:`PyListObject` containing all the items from the dictionary." +msgstr "" + +#: c-api/dict.rst:146 +msgid "" +"Return a :c:type:`PyListObject` containing all the keys from the dictionary." +msgstr "" + +#: c-api/dict.rst:151 +msgid "" +"Return a :c:type:`PyListObject` containing all the values from the " +"dictionary *p*." +msgstr "" + +#: c-api/dict.rst:159 +msgid "" +"Return the number of items in the dictionary. This is equivalent to " +"``len(p)`` on a dictionary." +msgstr "" + +#: c-api/dict.rst:165 +msgid "" +"Iterate over all key-value pairs in the dictionary *p*. The :c:type:" +"`Py_ssize_t` referred to by *ppos* must be initialized to ``0`` prior to the " +"first call to this function to start the iteration; the function returns " +"true for each pair in the dictionary, and false once all pairs have been " +"reported. The parameters *pkey* and *pvalue* should either point to :c:expr:" +"`PyObject*` variables that will be filled in with each key and value, " +"respectively, or may be ``NULL``. Any references returned through them are " +"borrowed. *ppos* should not be altered during iteration. Its value " +"represents offsets within the internal dictionary structure, and since the " +"structure is sparse, the offsets are not consecutive." +msgstr "" + +#: c-api/dict.rst:176 +msgid "For example::" +msgstr "Par exemple ::" + +#: c-api/dict.rst:186 +msgid "" +"The dictionary *p* should not be mutated during iteration. It is safe to " +"modify the values of the keys as you iterate over the dictionary, but only " +"so long as the set of keys does not change. For example::" +msgstr "" + +#: c-api/dict.rst:211 +msgid "" +"Iterate over mapping object *b* adding key-value pairs to dictionary *a*. " +"*b* may be a dictionary, or any object supporting :c:func:`PyMapping_Keys` " +"and :c:func:`PyObject_GetItem`. If *override* is true, existing pairs in *a* " +"will be replaced if a matching key is found in *b*, otherwise pairs will " +"only be added if there is not a matching key in *a*. Return ``0`` on success " +"or ``-1`` if an exception was raised." +msgstr "" + +#: c-api/dict.rst:221 +msgid "" +"This is the same as ``PyDict_Merge(a, b, 1)`` in C, and is similar to ``a." +"update(b)`` in Python except that :c:func:`PyDict_Update` doesn't fall back " +"to the iterating over a sequence of key value pairs if the second argument " +"has no \"keys\" attribute. Return ``0`` on success or ``-1`` if an " +"exception was raised." +msgstr "" + +#: c-api/dict.rst:230 +msgid "" +"Update or merge into dictionary *a*, from the key-value pairs in *seq2*. " +"*seq2* must be an iterable object producing iterable objects of length 2, " +"viewed as key-value pairs. In case of duplicate keys, the last wins if " +"*override* is true, else the first wins. Return ``0`` on success or ``-1`` " +"if an exception was raised. Equivalent Python (except for the return value)::" +msgstr "" diff --git a/c-api/exceptions.po b/c-api/exceptions.po new file mode 100644 index 0000000000..533e9b28e5 --- /dev/null +++ b/c-api/exceptions.po @@ -0,0 +1,1503 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-18 15:46+0200\n" +"PO-Revision-Date: 2018-10-04 12:24+0200\n" +"Last-Translator: Julien Palard \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 1.8.11\n" + +#: c-api/exceptions.rst:8 +msgid "Exception Handling" +msgstr "Gestion des exceptions" + +#: c-api/exceptions.rst:10 +msgid "" +"The functions described in this chapter will let you handle and raise Python " +"exceptions. It is important to understand some of the basics of Python " +"exception handling. It works somewhat like the POSIX :c:data:`errno` " +"variable: there is a global indicator (per thread) of the last error that " +"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 ``PyArg_*`` " +"functions return ``1`` for success and ``0`` for failure)." +msgstr "" + +#: c-api/exceptions.rst:20 +msgid "" +"Concretely, the error indicator consists of three object pointers: the " +"exception's type, the exception's value, and the traceback object. Any of " +"those pointers can be ``NULL`` if non-set (although some combinations are " +"forbidden, for example you can't have a non-``NULL`` traceback if the " +"exception type is ``NULL``)." +msgstr "" + +#: c-api/exceptions.rst:26 +msgid "" +"When a function must fail because some function it called failed, it " +"generally doesn't set the error indicator; the function it called already " +"set it. It is responsible for either handling the error and clearing the " +"exception or returning after cleaning up any resources it holds (such as " +"object references or memory allocations); it should *not* continue normally " +"if it is not prepared to handle the error. If returning due to an error, it " +"is important to indicate to the caller that an error has been set. If the " +"error is not handled or carefully propagated, additional calls into the " +"Python/C API may not behave as intended and may fail in mysterious ways." +msgstr "" + +#: c-api/exceptions.rst:37 +msgid "" +"The error indicator is **not** the result of :func:`sys.exc_info()`. The " +"former corresponds to an exception that is not yet caught (and is therefore " +"still propagating), while the latter returns an exception after it is caught " +"(and has therefore stopped propagating)." +msgstr "" + +#: c-api/exceptions.rst:44 +msgid "Printing and clearing" +msgstr "" + +#: c-api/exceptions.rst:49 +msgid "" +"Clear the error indicator. If the error indicator is not set, there is no " +"effect." +msgstr "" + +#: c-api/exceptions.rst:55 +msgid "" +"Print a standard traceback to ``sys.stderr`` and clear the error indicator. " +"**Unless** the error is a ``SystemExit``, in that case no traceback is " +"printed and the Python process will exit with the error code specified by " +"the ``SystemExit`` instance." +msgstr "" + +#: c-api/exceptions.rst:60 +msgid "" +"Call this function **only** when the error indicator is set. Otherwise it " +"will cause a fatal error!" +msgstr "" + +#: c-api/exceptions.rst:63 +msgid "" +"If *set_sys_last_vars* is nonzero, the variables :data:`sys.last_type`, :" +"data:`sys.last_value` and :data:`sys.last_traceback` will be set to the " +"type, value and traceback of the printed exception, respectively." +msgstr "" + +#: c-api/exceptions.rst:70 +msgid "Alias for ``PyErr_PrintEx(1)``." +msgstr "" + +#: c-api/exceptions.rst:75 +msgid "" +"Call :func:`sys.unraisablehook` using the current exception and *obj* " +"argument." +msgstr "" + +#: c-api/exceptions.rst:78 +msgid "" +"This utility function prints a warning message to ``sys.stderr`` when an " +"exception has been set but it is impossible for the interpreter to actually " +"raise the exception. It is used, for example, when an exception occurs in " +"an :meth:`__del__` method." +msgstr "" + +#: c-api/exceptions.rst:83 +msgid "" +"The function is called with a single argument *obj* that identifies the " +"context in which the unraisable exception occurred. If possible, the repr of " +"*obj* will be printed in the warning message." +msgstr "" + +#: c-api/exceptions.rst:87 +msgid "An exception must be set when calling this function." +msgstr "" + +#: c-api/exceptions.rst:91 +msgid "Raising exceptions" +msgstr "Lever des exceptions" + +#: c-api/exceptions.rst:93 +msgid "" +"These functions help you set the current thread's error indicator. For " +"convenience, some of these functions will always return a ``NULL`` pointer " +"for use in a ``return`` statement." +msgstr "" + +#: c-api/exceptions.rst:100 +msgid "" +"This is the most common way to set the error indicator. The first argument " +"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'``." +msgstr "" + +#: c-api/exceptions.rst:108 +msgid "" +"This function is similar to :c:func:`PyErr_SetString` but lets you specify " +"an arbitrary Python object for the \"value\" of the exception." +msgstr "" + +#: c-api/exceptions.rst:114 +msgid "" +"This function sets the error indicator and returns ``NULL``. *exception* " +"should be a Python exception class. The *format* and subsequent parameters " +"help format the error message; they have the same meaning and values as in :" +"c:func:`PyUnicode_FromFormat`. *format* is an ASCII-encoded string." +msgstr "" + +#: c-api/exceptions.rst:123 +msgid "" +"Same as :c:func:`PyErr_Format`, but taking a :c:type:`va_list` argument " +"rather than a variable number of arguments." +msgstr "" + +#: c-api/exceptions.rst:131 +msgid "This is a shorthand for ``PyErr_SetObject(type, Py_None)``." +msgstr "" + +#: c-api/exceptions.rst:136 +msgid "" +"This is a shorthand for ``PyErr_SetString(PyExc_TypeError, message)``, where " +"*message* indicates that a built-in operation was invoked with an illegal " +"argument. It is mostly for internal use." +msgstr "" + +#: c-api/exceptions.rst:143 +msgid "" +"This is a shorthand for ``PyErr_SetNone(PyExc_MemoryError)``; it returns " +"``NULL`` so an object allocation function can write ``return " +"PyErr_NoMemory();`` when it runs out of memory." +msgstr "" + +#: c-api/exceptions.rst:152 +msgid "" +"This is a convenience function to raise an exception when a C library " +"function has returned an error and set the C variable :c:data:`errno`. It " +"constructs a tuple object whose first item is the integer :c:data:`errno` " +"value and whose second item is the corresponding error message (gotten from :" +"c:func:`strerror`), and then calls ``PyErr_SetObject(type, object)``. On " +"Unix, when the :c:data:`errno` value is :const:`EINTR`, indicating an " +"interrupted system call, this calls :c:func:`PyErr_CheckSignals`, and if " +"that set the error indicator, leaves it set to that. The function always " +"returns ``NULL``, so a wrapper function around a system call can write " +"``return PyErr_SetFromErrno(type);`` when the system call returns an error." +msgstr "" + +#: c-api/exceptions.rst:166 +msgid "" +"Similar to :c:func:`PyErr_SetFromErrno`, with the additional behavior that " +"if *filenameObject* is not ``NULL``, it is passed to the constructor of " +"*type* as a third parameter. In the case of :exc:`OSError` exception, this " +"is used to define the :attr:`filename` attribute of the exception instance." +msgstr "" + +#: c-api/exceptions.rst:175 +msgid "" +"Similar to :c:func:`PyErr_SetFromErrnoWithFilenameObject`, but takes a " +"second filename object, for raising errors when a function that takes two " +"filenames fails." +msgstr "" + +#: c-api/exceptions.rst:184 +msgid "" +"Similar to :c:func:`PyErr_SetFromErrnoWithFilenameObject`, but the filename " +"is given as a C string. *filename* is decoded from the :term:`filesystem " +"encoding and error handler`." +msgstr "" + +#: c-api/exceptions.rst:191 +msgid "" +"This is a convenience function to raise :exc:`WindowsError`. If called with " +"*ierr* of ``0``, the error code returned by a call to :c:func:`GetLastError` " +"is used instead. It calls the Win32 function :c:func:`FormatMessage` to " +"retrieve the Windows description of error code given by *ierr* or :c:func:" +"`GetLastError`, then it constructs a tuple object whose first item is the " +"*ierr* value and whose second item is the corresponding error message " +"(gotten from :c:func:`FormatMessage`), and then calls " +"``PyErr_SetObject(PyExc_WindowsError, object)``. This function always " +"returns ``NULL``." +msgstr "" + +#: c-api/exceptions.rst:208 c-api/exceptions.rst:225 c-api/exceptions.rst:243 +msgid ":ref:`Availability `: Windows." +msgstr ":ref:`Disponibilité ` : Windows." + +#: c-api/exceptions.rst:205 +msgid "" +"Similar to :c:func:`PyErr_SetFromWindowsErr`, with an additional parameter " +"specifying the exception type to be raised." +msgstr "" + +#: c-api/exceptions.rst:213 +msgid "" +"Similar to :c:func:`PyErr_SetFromWindowsErrWithFilenameObject`, but the " +"filename is given as a C string. *filename* is decoded from the filesystem " +"encoding (:func:`os.fsdecode`)." +msgstr "" + +#: c-api/exceptions.rst:222 +msgid "" +"Similar to :c:func:`PyErr_SetFromWindowsErrWithFilenameObject`, with an " +"additional parameter specifying the exception type to be raised." +msgstr "" + +#: c-api/exceptions.rst:230 +msgid "" +"Similar to :c:func:`PyErr_SetExcFromWindowsErrWithFilenameObject`, but " +"accepts a second filename object." +msgstr "" + +#: c-api/exceptions.rst:240 +msgid "" +"Similar to :c:func:`PyErr_SetFromWindowsErrWithFilename`, with an additional " +"parameter specifying the exception type to be raised." +msgstr "" + +#: c-api/exceptions.rst:248 +msgid "" +"This is a convenience function to raise :exc:`ImportError`. *msg* will be " +"set as the exception's message string. *name* and *path*, both of which can " +"be ``NULL``, will be set as the :exc:`ImportError`'s respective ``name`` and " +"``path`` attributes." +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:276 +msgid "" +"Like :c:func:`PyErr_SyntaxLocationObject`, but *filename* is a byte string " +"decoded from the :term:`filesystem encoding and error handler`." +msgstr "" + +#: c-api/exceptions.rst:284 +msgid "" +"Like :c:func:`PyErr_SyntaxLocationEx`, but the *col_offset* parameter is " +"omitted." +msgstr "" + +#: 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 " +"function) was invoked with an illegal argument. It is mostly for internal " +"use." +msgstr "" + +#: c-api/exceptions.rst:297 +msgid "Issuing warnings" +msgstr "" + +#: 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 " +"print a warning message to *sys.stderr*; however, it is also possible that " +"the user has specified that warnings are to be turned into errors, and in " +"that case they will raise an exception. It is also possible that the " +"functions raise an exception because of a problem with the warning " +"machinery. The return value is ``0`` if no exception is raised, or ``-1`` if " +"an exception is raised. (It is not possible to determine whether a warning " +"message is actually printed, nor what the reason is for the exception; this " +"is intentional.) If an exception is raised, the caller should do its normal " +"exception handling (for example, :c:func:`Py_DECREF` owned references and " +"return an error value)." +msgstr "" + +#: 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. " +"*stack_level* is a positive number giving a number of stack frames; the " +"warning will be issued from the currently executing line of code in that " +"stack frame. A *stack_level* of 1 is the function calling :c:func:" +"`PyErr_WarnEx`, 2 is the function above that, and so forth." +msgstr "" + +#: 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 " +"warning category is :c:data:`PyExc_RuntimeWarning`. The standard Python " +"warning categories are available as global variables whose names are " +"enumerated at :ref:`standardwarningcategories`." +msgstr "" + +#: 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: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* " +"arguments may be set to ``NULL`` to get the default effect described there." +msgstr "" + +#: 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 :term:" +"`filesystem encoding and error handler`." +msgstr "" + +#: 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: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:368 +msgid "Querying the error indicator" +msgstr "" + +#: 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 ``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:378 +msgid "The caller must hold the GIL." +msgstr "" + +#: 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 " +"fail since the exception may be an instance instead of a class, in the case " +"of a class exception, or it may be a subclass of the expected exception.)" +msgstr "" + +#: 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: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 " +"instance of a subclass. If *exc* is a tuple, all exception types in the " +"tuple (and recursively in subtuples) are searched for a match." +msgstr "" + +#: 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 " +"``NULL``. If it is set, it will be cleared and you own a reference to each " +"object retrieved. The value and traceback object may be ``NULL`` even when " +"the type object is not." +msgstr "" + +#: 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: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 " +"indicator is cleared. Do not pass a ``NULL`` type and non-``NULL`` value or " +"traceback. The exception type should be a class. Do not pass an invalid " +"exception type or value. (Violating these rules will cause subtle problems " +"later.) This call takes away a reference to each object: you must own a " +"reference to each object before the call and after the call you no longer " +"own these references. (If you don't understand this, don't use this " +"function. I warned you.)" +msgstr "" + +#: 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: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 " +"``*val`` is not an instance of the same class. This function can be used " +"to instantiate the class in that case. If the values are already " +"normalized, nothing happens. The delayed normalization is implemented to " +"improve performance." +msgstr "" + +#: 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: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 " +"freshly raised. Returns new references for the three objects, any of which " +"may be ``NULL``. Does not modify the exception info state." +msgstr "" + +#: 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 " +"state temporarily. Use :c:func:`PyErr_SetExcInfo` to restore or clear the " +"exception state." +msgstr "" + +#: 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 " +"raised. This function steals the references of the arguments. To clear the " +"exception state, pass ``NULL`` for all three arguments. For general rules " +"about the three arguments, see :c:func:`PyErr_Restore`." +msgstr "" + +#: 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 " +"state temporarily. Use :c:func:`PyErr_GetExcInfo` to read the exception " +"state." +msgstr "" + +#: c-api/exceptions.rst:499 +msgid "Signal Handling" +msgstr "Traitement des signaux" + +#: c-api/exceptions.rst:509 +msgid "This function interacts with Python's signal handling." +msgstr "" + +#: c-api/exceptions.rst:511 +msgid "" +"If the function is called from the main thread and under the main Python " +"interpreter, it checks whether a signal has been sent to the processes and " +"if so, invokes the corresponding signal handler. If the :mod:`signal` " +"module is supported, this can invoke a signal handler written in Python." +msgstr "" + +#: c-api/exceptions.rst:516 +msgid "" +"The function attempts to handle all pending signals, and then returns ``0``. " +"However, if a Python signal handler raises an exception, the error indicator " +"is set and the function returns ``-1`` immediately (such that other pending " +"signals may not have been handled yet: they will be on the next :c:func:" +"`PyErr_CheckSignals()` invocation)." +msgstr "" + +#: c-api/exceptions.rst:522 +msgid "" +"If the function is called from a non-main thread, or under a non-main Python " +"interpreter, it does nothing and returns ``0``." +msgstr "" + +#: c-api/exceptions.rst:525 +msgid "" +"This function can be called by long-running C code that wants to be " +"interruptible by user requests (such as by pressing Ctrl-C)." +msgstr "" + +#: c-api/exceptions.rst:529 +msgid "" +"The default Python signal handler for :const:`SIGINT` raises the :exc:" +"`KeyboardInterrupt` exception." +msgstr "" + +#: c-api/exceptions.rst:540 +msgid "" +"Simulate the effect of a :const:`SIGINT` signal arriving. This is equivalent " +"to ``PyErr_SetInterruptEx(SIGINT)``." +msgstr "" + +#: c-api/exceptions.rst:571 +msgid "" +"This function is async-signal-safe. It can be called without the :term:" +"`GIL` and from a C signal handler." +msgstr "" + +#: c-api/exceptions.rst:554 +msgid "" +"Simulate the effect of a signal arriving. The next time :c:func:" +"`PyErr_CheckSignals` is called, the Python signal handler for the given " +"signal number will be called." +msgstr "" + +#: c-api/exceptions.rst:558 +msgid "" +"This function can be called by C code that sets up its own signal handling " +"and wants Python signal handlers to be invoked as expected when an " +"interruption is requested (for example when the user presses Ctrl-C to " +"interrupt an operation)." +msgstr "" + +#: c-api/exceptions.rst:563 +msgid "" +"If the given signal isn't handled by Python (it was set to :data:`signal." +"SIG_DFL` or :data:`signal.SIG_IGN`), it will be ignored." +msgstr "" + +#: c-api/exceptions.rst:566 +msgid "" +"If *signum* is outside of the allowed range of signal numbers, ``-1`` is " +"returned. Otherwise, ``0`` is returned. The error indicator is never " +"changed by this function." +msgstr "" + +#: c-api/exceptions.rst:579 +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:583 +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 " +"checking. *fd* should be a valid file descriptor. The function should only " +"be called from the main thread." +msgstr "" + +#: c-api/exceptions.rst:588 +msgid "On Windows, the function now also supports socket handles." +msgstr "" + +#: c-api/exceptions.rst:593 +msgid "Exception Classes" +msgstr "" + +#: c-api/exceptions.rst:597 +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 " +"``module.classname``. The *base* and *dict* arguments are normally " +"``NULL``. This creates a class object derived from :exc:`Exception` " +"(accessible in C as :c:data:`PyExc_Exception`)." +msgstr "" + +#: c-api/exceptions.rst:603 +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 " +"the last part (after the last dot). The *base* argument can be used to " +"specify alternate base classes; it can either be only one class or a tuple " +"of classes. The *dict* argument can be used to specify a dictionary of class " +"variables and methods." +msgstr "" + +#: c-api/exceptions.rst:612 +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:620 +msgid "Exception Objects" +msgstr "Objets exception" + +#: c-api/exceptions.rst:624 +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:631 +msgid "" +"Set the traceback associated with the exception to *tb*. Use ``Py_None`` to " +"clear it." +msgstr "" + +#: c-api/exceptions.rst:637 +msgid "" +"Return the context (another exception instance during whose handling *ex* " +"was raised) associated with the exception as a new reference, as accessible " +"from Python through :attr:`__context__`. If there is no context associated, " +"this returns ``NULL``." +msgstr "" + +#: c-api/exceptions.rst:645 +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:652 +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:659 +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:663 +msgid "" +":attr:`__suppress_context__` is implicitly set to ``True`` by this function." +msgstr "" + +#: c-api/exceptions.rst:669 +msgid "Unicode Exception Objects" +msgstr "Objets exception Unicode" + +#: c-api/exceptions.rst:671 +msgid "" +"The following functions are used to create and modify Unicode exceptions " +"from C." +msgstr "" + +#: c-api/exceptions.rst:675 +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:681 +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:695 +msgid "3.11" +msgstr "3.11" + +#: c-api/exceptions.rst:687 +msgid "" +"``Py_UNICODE`` is deprecated since Python 3.3. Please migrate to " +"``PyObject_CallFunction(PyExc_UnicodeEncodeError, \"sOnns\", ...)``." +msgstr "" + +#: c-api/exceptions.rst:692 +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:697 +msgid "" +"``Py_UNICODE`` is deprecated since Python 3.3. Please migrate to " +"``PyObject_CallFunction(PyExc_UnicodeTranslateError, \"Onns\", ...)``." +msgstr "" + +#: c-api/exceptions.rst:703 +msgid "Return the *encoding* attribute of the given exception object." +msgstr "" + +#: c-api/exceptions.rst:709 +msgid "Return the *object* attribute of the given exception object." +msgstr "" + +#: c-api/exceptions.rst:715 +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`` " +"on failure." +msgstr "" + +#: c-api/exceptions.rst:723 +msgid "" +"Set the *start* attribute of the given exception object to *start*. Return " +"``0`` on success, ``-1`` on failure." +msgstr "" + +#: c-api/exceptions.rst:730 +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 " +"failure." +msgstr "" + +#: c-api/exceptions.rst:738 +msgid "" +"Set the *end* attribute of the given exception object to *end*. Return " +"``0`` on success, ``-1`` on failure." +msgstr "" + +#: c-api/exceptions.rst:745 +msgid "Return the *reason* attribute of the given exception object." +msgstr "" + +#: c-api/exceptions.rst:751 +msgid "" +"Set the *reason* attribute of the given exception object to *reason*. " +"Return ``0`` on success, ``-1`` on failure." +msgstr "" + +#: c-api/exceptions.rst:758 +msgid "Recursion Control" +msgstr "Contrôle de la récursion" + +#: c-api/exceptions.rst:760 +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 " +"recursive code does not necessarily invoke Python code (which tracks its " +"recursion depth automatically). They are also not needed for *tp_call* " +"implementations because the :ref:`call protocol ` takes care of " +"recursion handling." +msgstr "" + +#: c-api/exceptions.rst:769 +msgid "Marks a point where a recursive C-level call is about to be performed." +msgstr "" + +#: c-api/exceptions.rst:771 +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:775 +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:779 +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:791 +msgid "This function is now also available in the limited API." +msgstr "" + +#: c-api/exceptions.rst:788 +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:794 +msgid "" +"Properly implementing :c:member:`~PyTypeObject.tp_repr` for container types " +"requires special recursion handling. In addition to protecting the stack, :" +"c:member:`~PyTypeObject.tp_repr` also needs to track objects to prevent " +"cycles. The following two functions facilitate this functionality. " +"Effectively, these are the C equivalent to :func:`reprlib.recursive_repr`." +msgstr "" + +#: c-api/exceptions.rst:802 +msgid "" +"Called at the beginning of the :c:member:`~PyTypeObject.tp_repr` " +"implementation to detect cycles." +msgstr "" + +#: c-api/exceptions.rst:805 +msgid "" +"If the object has already been processed, the function returns a positive " +"integer. In that case the :c:member:`~PyTypeObject.tp_repr` implementation " +"should return a string object indicating a cycle. As examples, :class:" +"`dict` objects return ``{...}`` and :class:`list` objects return ``[...]``." +msgstr "" + +#: c-api/exceptions.rst:811 +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:815 +msgid "" +"Otherwise, the function returns zero and the :c:member:`~PyTypeObject." +"tp_repr` implementation can continue normally." +msgstr "" + +#: c-api/exceptions.rst:820 +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:827 +msgid "Standard Exceptions" +msgstr "Exceptions standards" + +#: c-api/exceptions.rst:829 +msgid "" +"All standard Python exceptions are available as global variables whose names " +"are ``PyExc_`` followed by the Python exception name. These have the type :" +"c:expr:`PyObject*`; they are all class objects. For completeness, here are " +"all the variables:" +msgstr "" + +#: c-api/exceptions.rst:1023 c-api/exceptions.rst:1068 +msgid "C Name" +msgstr "Nom C" + +#: c-api/exceptions.rst:1068 +msgid "Python Name" +msgstr "Nom Python" + +#: c-api/exceptions.rst:1023 c-api/exceptions.rst:1068 +msgid "Notes" +msgstr "Notes" + +#: c-api/exceptions.rst:892 +msgid ":c:data:`PyExc_BaseException`" +msgstr ":c:data:`PyExc_BaseException`" + +#: c-api/exceptions.rst:892 +msgid ":exc:`BaseException`" +msgstr ":exc:`BaseException`" + +#: c-api/exceptions.rst:894 c-api/exceptions.rst:942 c-api/exceptions.rst:954 +msgid "[1]_" +msgstr "" + +#: c-api/exceptions.rst:894 +msgid ":c:data:`PyExc_Exception`" +msgstr ":c:data:`PyExc_Exception`" + +#: c-api/exceptions.rst:894 +msgid ":exc:`Exception`" +msgstr ":exc:`Exception`" + +#: c-api/exceptions.rst:896 +msgid ":c:data:`PyExc_ArithmeticError`" +msgstr ":c:data:`PyExc_ArithmeticError`" + +#: c-api/exceptions.rst:896 +msgid ":exc:`ArithmeticError`" +msgstr ":exc:`ArithmeticError`" + +#: c-api/exceptions.rst:898 +msgid ":c:data:`PyExc_AssertionError`" +msgstr ":c:data:`PyExc_AssertionError`" + +#: c-api/exceptions.rst:898 +msgid ":exc:`AssertionError`" +msgstr ":exc:`AssertionError`" + +#: c-api/exceptions.rst:900 +msgid ":c:data:`PyExc_AttributeError`" +msgstr ":c:data:`PyExc_AttributeError`" + +#: c-api/exceptions.rst:900 +msgid ":exc:`AttributeError`" +msgstr ":exc:`AttributeError`" + +#: c-api/exceptions.rst:902 +msgid ":c:data:`PyExc_BlockingIOError`" +msgstr ":c:data:`PyExc_BlockingIOError`" + +#: c-api/exceptions.rst:902 +msgid ":exc:`BlockingIOError`" +msgstr ":exc:`BlockingIOError`" + +#: c-api/exceptions.rst:904 +msgid ":c:data:`PyExc_BrokenPipeError`" +msgstr ":c:data:`PyExc_BrokenPipeError`" + +#: c-api/exceptions.rst:904 +msgid ":exc:`BrokenPipeError`" +msgstr ":exc:`BrokenPipeError`" + +#: c-api/exceptions.rst:906 +msgid ":c:data:`PyExc_BufferError`" +msgstr ":c:data:`PyExc_BufferError`" + +#: c-api/exceptions.rst:906 +msgid ":exc:`BufferError`" +msgstr ":exc:`BufferError`" + +#: c-api/exceptions.rst:908 +msgid ":c:data:`PyExc_ChildProcessError`" +msgstr ":c:data:`PyExc_ChildProcessError`" + +#: c-api/exceptions.rst:908 +msgid ":exc:`ChildProcessError`" +msgstr ":exc:`ChildProcessError`" + +#: c-api/exceptions.rst:910 +msgid ":c:data:`PyExc_ConnectionAbortedError`" +msgstr ":c:data:`PyExc_ConnectionAbortedError`" + +#: c-api/exceptions.rst:910 +msgid ":exc:`ConnectionAbortedError`" +msgstr ":exc:`ConnectionAbortedError`" + +#: c-api/exceptions.rst:912 +msgid ":c:data:`PyExc_ConnectionError`" +msgstr ":c:data:`PyExc_ConnectionError`" + +#: c-api/exceptions.rst:912 +msgid ":exc:`ConnectionError`" +msgstr ":exc:`ConnectionError`" + +#: c-api/exceptions.rst:914 +msgid ":c:data:`PyExc_ConnectionRefusedError`" +msgstr ":c:data:`PyExc_ConnectionRefusedError`" + +#: c-api/exceptions.rst:914 +msgid ":exc:`ConnectionRefusedError`" +msgstr ":exc:`ConnectionRefusedError`" + +#: c-api/exceptions.rst:916 +msgid ":c:data:`PyExc_ConnectionResetError`" +msgstr ":c:data:`PyExc_ConnectionResetError`" + +#: c-api/exceptions.rst:916 +msgid ":exc:`ConnectionResetError`" +msgstr ":exc:`ConnectionResetError`" + +#: c-api/exceptions.rst:918 +msgid ":c:data:`PyExc_EOFError`" +msgstr ":c:data:`PyExc_EOFError`" + +#: c-api/exceptions.rst:918 +msgid ":exc:`EOFError`" +msgstr ":exc:`EOFError`" + +#: c-api/exceptions.rst:920 +msgid ":c:data:`PyExc_FileExistsError`" +msgstr ":c:data:`PyExc_FileExistsError`" + +#: c-api/exceptions.rst:920 +msgid ":exc:`FileExistsError`" +msgstr ":exc:`FileExistsError`" + +#: c-api/exceptions.rst:922 +msgid ":c:data:`PyExc_FileNotFoundError`" +msgstr ":c:data:`PyExc_FloatingPointError`" + +#: c-api/exceptions.rst:922 +msgid ":exc:`FileNotFoundError`" +msgstr ":exc:`FileNotFoundError`" + +#: c-api/exceptions.rst:924 +msgid ":c:data:`PyExc_FloatingPointError`" +msgstr ":c:data:`PyExc_FloatingPointError`" + +#: c-api/exceptions.rst:924 +msgid ":exc:`FloatingPointError`" +msgstr ":exc:`FloatingPointError`" + +#: c-api/exceptions.rst:926 +msgid ":c:data:`PyExc_GeneratorExit`" +msgstr ":c:data:`PyExc_GeneratorExit`" + +#: c-api/exceptions.rst:926 +msgid ":exc:`GeneratorExit`" +msgstr ":exc:`GeneratorExit`" + +#: c-api/exceptions.rst:928 +msgid ":c:data:`PyExc_ImportError`" +msgstr ":c:data:`PyExc_ImportError`" + +#: c-api/exceptions.rst:928 +msgid ":exc:`ImportError`" +msgstr ":exc:`ImportError`" + +#: c-api/exceptions.rst:930 +msgid ":c:data:`PyExc_IndentationError`" +msgstr ":c:data:`PyExc_IndentationError`" + +#: c-api/exceptions.rst:930 +msgid ":exc:`IndentationError`" +msgstr ":exc:`IndentationError`" + +#: c-api/exceptions.rst:932 +msgid ":c:data:`PyExc_IndexError`" +msgstr ":c:data:`PyExc_IndexError`" + +#: c-api/exceptions.rst:932 +msgid ":exc:`IndexError`" +msgstr ":exc:`IndexError`" + +#: c-api/exceptions.rst:934 +msgid ":c:data:`PyExc_InterruptedError`" +msgstr ":c:data:`PyExc_InterruptedError`" + +#: c-api/exceptions.rst:934 +msgid ":exc:`InterruptedError`" +msgstr ":exc:`InterruptedError`" + +#: c-api/exceptions.rst:936 +msgid ":c:data:`PyExc_IsADirectoryError`" +msgstr ":c:data:`PyExc_IsADirectoryError`" + +#: c-api/exceptions.rst:936 +msgid ":exc:`IsADirectoryError`" +msgstr ":exc:`IsADirectoryError`" + +#: c-api/exceptions.rst:938 +msgid ":c:data:`PyExc_KeyError`" +msgstr ":c:data:`PyExc_KeyError`" + +#: c-api/exceptions.rst:938 +msgid ":exc:`KeyError`" +msgstr ":exc:`KeyError`" + +#: c-api/exceptions.rst:940 +msgid ":c:data:`PyExc_KeyboardInterrupt`" +msgstr ":c:data:`PyExc_KeyboardInterrupt`" + +#: c-api/exceptions.rst:940 +msgid ":exc:`KeyboardInterrupt`" +msgstr ":exc:`KeyboardInterrupt`" + +#: c-api/exceptions.rst:942 +msgid ":c:data:`PyExc_LookupError`" +msgstr ":c:data:`PyExc_LookupError`" + +#: c-api/exceptions.rst:942 +msgid ":exc:`LookupError`" +msgstr ":exc:`LookupError`" + +#: c-api/exceptions.rst:944 +msgid ":c:data:`PyExc_MemoryError`" +msgstr ":c:data:`PyExc_MemoryError`" + +#: c-api/exceptions.rst:944 +msgid ":exc:`MemoryError`" +msgstr ":exc:`MemoryError`" + +#: c-api/exceptions.rst:946 +#, fuzzy +msgid ":c:data:`PyExc_ModuleNotFoundError`" +msgstr ":c:data:`PyExc_ModuleNotFoundError`." + +#: c-api/exceptions.rst:946 +msgid ":exc:`ModuleNotFoundError`" +msgstr ":exc:`ModuleNotFoundError`" + +#: c-api/exceptions.rst:948 +msgid ":c:data:`PyExc_NameError`" +msgstr ":c:data:`PyExc_NameError`" + +#: c-api/exceptions.rst:948 +msgid ":exc:`NameError`" +msgstr ":exc:`NameError`" + +#: c-api/exceptions.rst:950 +msgid ":c:data:`PyExc_NotADirectoryError`" +msgstr ":c:data:`PyExc_NotADirectoryError`" + +#: c-api/exceptions.rst:950 +msgid ":exc:`NotADirectoryError`" +msgstr ":exc:`NotADirectoryError`" + +#: c-api/exceptions.rst:952 +msgid ":c:data:`PyExc_NotImplementedError`" +msgstr ":c:data:`PyExc_NotImplementedError`" + +#: c-api/exceptions.rst:952 +msgid ":exc:`NotImplementedError`" +msgstr ":exc:`NotImplementedError`" + +#: c-api/exceptions.rst:954 +msgid ":c:data:`PyExc_OSError`" +msgstr ":c:data:`PyExc_OSError`" + +#: c-api/exceptions.rst:954 +msgid ":exc:`OSError`" +msgstr ":exc:`OSError`" + +#: c-api/exceptions.rst:956 +msgid ":c:data:`PyExc_OverflowError`" +msgstr ":c:data:`PyExc_OverflowError`" + +#: c-api/exceptions.rst:956 +msgid ":exc:`OverflowError`" +msgstr ":exc:`OverflowError`" + +#: c-api/exceptions.rst:958 +msgid ":c:data:`PyExc_PermissionError`" +msgstr ":c:data:`PyExc_PermissionError`" + +#: c-api/exceptions.rst:958 +msgid ":exc:`PermissionError`" +msgstr ":exc:`PermissionError`" + +#: c-api/exceptions.rst:960 +msgid ":c:data:`PyExc_ProcessLookupError`" +msgstr ":c:data:`PyExc_ProcessLookupError`" + +#: c-api/exceptions.rst:960 +msgid ":exc:`ProcessLookupError`" +msgstr ":exc:`ProcessLookupError`" + +#: c-api/exceptions.rst:962 +msgid ":c:data:`PyExc_RecursionError`" +msgstr ":c:data:`PyExc_ReferenceError`" + +#: c-api/exceptions.rst:962 +msgid ":exc:`RecursionError`" +msgstr ":exc:`RecursionError`" + +#: c-api/exceptions.rst:964 +msgid ":c:data:`PyExc_ReferenceError`" +msgstr ":c:data:`PyExc_ReferenceError`" + +#: c-api/exceptions.rst:964 +msgid ":exc:`ReferenceError`" +msgstr ":exc:`ReferenceError`" + +#: c-api/exceptions.rst:966 +msgid ":c:data:`PyExc_RuntimeError`" +msgstr ":c:data:`PyExc_RuntimeError`" + +#: c-api/exceptions.rst:966 +msgid ":exc:`RuntimeError`" +msgstr ":exc:`RuntimeError`" + +#: c-api/exceptions.rst:968 +msgid ":c:data:`PyExc_StopAsyncIteration`" +msgstr ":c:data:`PyExc_StopAsyncIteration`" + +#: c-api/exceptions.rst:968 +msgid ":exc:`StopAsyncIteration`" +msgstr ":exc:`StopAsyncIteration`" + +#: c-api/exceptions.rst:970 +msgid ":c:data:`PyExc_StopIteration`" +msgstr ":c:data:`PyExc_StopIteration`" + +#: c-api/exceptions.rst:970 +msgid ":exc:`StopIteration`" +msgstr ":exc:`StopIteration`" + +#: c-api/exceptions.rst:972 +msgid ":c:data:`PyExc_SyntaxError`" +msgstr ":c:data:`PyExc_SyntaxError`" + +#: c-api/exceptions.rst:972 +msgid ":exc:`SyntaxError`" +msgstr ":exc:`SyntaxError`" + +#: c-api/exceptions.rst:974 +msgid ":c:data:`PyExc_SystemError`" +msgstr ":c:data:`PyExc_SystemError`" + +#: c-api/exceptions.rst:974 +msgid ":exc:`SystemError`" +msgstr ":exc:`SystemError`" + +#: c-api/exceptions.rst:976 +msgid ":c:data:`PyExc_SystemExit`" +msgstr ":c:data:`PyExc_SystemExit`" + +#: c-api/exceptions.rst:976 +msgid ":exc:`SystemExit`" +msgstr ":exc:`SystemExit`" + +#: c-api/exceptions.rst:978 +msgid ":c:data:`PyExc_TabError`" +msgstr ":c:data:`PyExc_TabError`" + +#: c-api/exceptions.rst:978 +msgid ":exc:`TabError`" +msgstr ":exc:`TabError`" + +#: c-api/exceptions.rst:980 +msgid ":c:data:`PyExc_TimeoutError`" +msgstr ":c:data:`PyExc_ImportError`" + +#: c-api/exceptions.rst:980 +msgid ":exc:`TimeoutError`" +msgstr ":exc:`TimeoutError`" + +#: c-api/exceptions.rst:982 +msgid ":c:data:`PyExc_TypeError`" +msgstr ":c:data:`PyExc_TypeError`" + +#: c-api/exceptions.rst:982 +msgid ":exc:`TypeError`" +msgstr ":exc:`TypeError`" + +#: c-api/exceptions.rst:984 +msgid ":c:data:`PyExc_UnboundLocalError`" +msgstr ":c:data:`PyExc_UnboundLocalError`" + +#: c-api/exceptions.rst:984 +msgid ":exc:`UnboundLocalError`" +msgstr ":exc:`UnboundLocalError`" + +#: c-api/exceptions.rst:986 +msgid ":c:data:`PyExc_UnicodeDecodeError`" +msgstr ":c:data:`PyExc_UnicodeDecodeError`" + +#: c-api/exceptions.rst:986 +msgid ":exc:`UnicodeDecodeError`" +msgstr ":exc:`UnicodeDecodeError`" + +#: c-api/exceptions.rst:988 +msgid ":c:data:`PyExc_UnicodeEncodeError`" +msgstr ":c:data:`PyExc_UnicodeEncodeError`" + +#: c-api/exceptions.rst:988 +msgid ":exc:`UnicodeEncodeError`" +msgstr ":exc:`UnicodeEncodeError`" + +#: c-api/exceptions.rst:990 +msgid ":c:data:`PyExc_UnicodeError`" +msgstr ":c:data:`PyExc_UnicodeError`" + +#: c-api/exceptions.rst:990 +msgid ":exc:`UnicodeError`" +msgstr ":exc:`UnicodeError`" + +#: c-api/exceptions.rst:992 +msgid ":c:data:`PyExc_UnicodeTranslateError`" +msgstr ":c:data:`PyExc_UnicodeTranslateError`" + +#: c-api/exceptions.rst:992 +msgid ":exc:`UnicodeTranslateError`" +msgstr ":exc:`UnicodeTranslateError`" + +#: c-api/exceptions.rst:994 +msgid ":c:data:`PyExc_ValueError`" +msgstr ":c:data:`PyExc_ValueError`" + +#: c-api/exceptions.rst:994 +msgid ":exc:`ValueError`" +msgstr ":exc:`ValueError`" + +#: c-api/exceptions.rst:996 +msgid ":c:data:`PyExc_ZeroDivisionError`" +msgstr ":c:data:`PyExc_ZeroDivisionError`" + +#: c-api/exceptions.rst:996 +msgid ":exc:`ZeroDivisionError`" +msgstr ":exc:`ZeroDivisionError`" + +#: c-api/exceptions.rst:999 +msgid "" +":c:data:`PyExc_BlockingIOError`, :c:data:`PyExc_BrokenPipeError`, :c:data:" +"`PyExc_ChildProcessError`, :c:data:`PyExc_ConnectionError`, :c:data:" +"`PyExc_ConnectionAbortedError`, :c:data:`PyExc_ConnectionRefusedError`, :c:" +"data:`PyExc_ConnectionResetError`, :c:data:`PyExc_FileExistsError`, :c:data:" +"`PyExc_FileNotFoundError`, :c:data:`PyExc_InterruptedError`, :c:data:" +"`PyExc_IsADirectoryError`, :c:data:`PyExc_NotADirectoryError`, :c:data:" +"`PyExc_PermissionError`, :c:data:`PyExc_ProcessLookupError` and :c:data:" +"`PyExc_TimeoutError` were introduced following :pep:`3151`." +msgstr "" + +#: c-api/exceptions.rst:1009 +msgid ":c:data:`PyExc_StopAsyncIteration` and :c:data:`PyExc_RecursionError`." +msgstr ":c:data:`PyExc_StopAsyncIteration` et :c:data:`PyExc_RecursionError`." + +#: c-api/exceptions.rst:1012 +msgid ":c:data:`PyExc_ModuleNotFoundError`." +msgstr ":c:data:`PyExc_ModuleNotFoundError`." + +#: c-api/exceptions.rst:1015 +msgid "These are compatibility aliases to :c:data:`PyExc_OSError`:" +msgstr "" + +#: c-api/exceptions.rst:1025 +msgid ":c:data:`PyExc_EnvironmentError`" +msgstr ":c:data:`PyExc_EnvironmentError`" + +#: c-api/exceptions.rst:1027 +msgid ":c:data:`PyExc_IOError`" +msgstr ":c:data:`PyExc_IOError`" + +#: c-api/exceptions.rst:1029 +msgid ":c:data:`PyExc_WindowsError`" +msgstr ":c:data:`PyExc_WindowsError`" + +#: c-api/exceptions.rst:1029 +msgid "[2]_" +msgstr "" + +#: c-api/exceptions.rst:1032 +msgid "These aliases used to be separate exception types." +msgstr "" + +#: c-api/exceptions.rst:1096 +msgid "Notes:" +msgstr "Notes :" + +#: c-api/exceptions.rst:1038 +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:1041 +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:1047 +msgid "Standard Warning Categories" +msgstr "" + +#: c-api/exceptions.rst:1049 +msgid "" +"All standard Python warning categories are available as global variables " +"whose names are ``PyExc_`` followed by the Python exception name. These have " +"the type :c:expr:`PyObject*`; they are all class objects. For completeness, " +"here are all the variables:" +msgstr "" + +#: c-api/exceptions.rst:1070 +msgid ":c:data:`PyExc_Warning`" +msgstr ":c:data:`PyExc_Warning`" + +#: c-api/exceptions.rst:1070 +msgid ":exc:`Warning`" +msgstr ":exc:`Warning`" + +#: c-api/exceptions.rst:1070 +msgid "[3]_" +msgstr "" + +#: c-api/exceptions.rst:1072 +msgid ":c:data:`PyExc_BytesWarning`" +msgstr ":c:data:`PyExc_BytesWarning`" + +#: c-api/exceptions.rst:1072 +msgid ":exc:`BytesWarning`" +msgstr ":exc:`BytesWarning`" + +#: c-api/exceptions.rst:1074 +msgid ":c:data:`PyExc_DeprecationWarning`" +msgstr ":c:data:`PyExc_DeprecationWarning`" + +#: c-api/exceptions.rst:1074 +msgid ":exc:`DeprecationWarning`" +msgstr ":exc:`DeprecationWarning`" + +#: c-api/exceptions.rst:1076 +msgid ":c:data:`PyExc_FutureWarning`" +msgstr ":c:data:`PyExc_FutureWarning`" + +#: c-api/exceptions.rst:1076 +msgid ":exc:`FutureWarning`" +msgstr ":exc:`FutureWarning`" + +#: c-api/exceptions.rst:1078 +msgid ":c:data:`PyExc_ImportWarning`" +msgstr ":c:data:`PyExc_ImportWarning`" + +#: c-api/exceptions.rst:1078 +msgid ":exc:`ImportWarning`" +msgstr ":exc:`ImportWarning`" + +#: c-api/exceptions.rst:1080 +msgid ":c:data:`PyExc_PendingDeprecationWarning`" +msgstr ":c:data:`PyExc_PendingDeprecationWarning`" + +#: c-api/exceptions.rst:1080 +msgid ":exc:`PendingDeprecationWarning`" +msgstr ":exc:`PendingDeprecationWarning`" + +#: c-api/exceptions.rst:1082 +msgid ":c:data:`PyExc_ResourceWarning`" +msgstr ":c:data:`PyExc_ResourceWarning`" + +#: c-api/exceptions.rst:1082 +msgid ":exc:`ResourceWarning`" +msgstr ":exc:`ResourceWarning`" + +#: c-api/exceptions.rst:1084 +msgid ":c:data:`PyExc_RuntimeWarning`" +msgstr ":c:data:`PyExc_RuntimeWarning`" + +#: c-api/exceptions.rst:1084 +msgid ":exc:`RuntimeWarning`" +msgstr ":exc:`RuntimeWarning`" + +#: c-api/exceptions.rst:1086 +msgid ":c:data:`PyExc_SyntaxWarning`" +msgstr ":c:data:`PyExc_SyntaxWarning`" + +#: c-api/exceptions.rst:1086 +msgid ":exc:`SyntaxWarning`" +msgstr ":exc:`SyntaxWarning`" + +#: c-api/exceptions.rst:1088 +msgid ":c:data:`PyExc_UnicodeWarning`" +msgstr ":c:data:`PyExc_UnicodeWarning`" + +#: c-api/exceptions.rst:1088 +msgid ":exc:`UnicodeWarning`" +msgstr ":exc:`UnicodeWarning`" + +#: c-api/exceptions.rst:1090 +msgid ":c:data:`PyExc_UserWarning`" +msgstr ":c:data:`PyExc_UserWarning`" + +#: c-api/exceptions.rst:1090 +msgid ":exc:`UserWarning`" +msgstr ":exc:`UserWarning`" + +#: c-api/exceptions.rst:1093 +msgid ":c:data:`PyExc_ResourceWarning`." +msgstr ":c:data:`PyExc_ResourceWarning`." + +#: c-api/exceptions.rst:1099 +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/file.po b/c-api/file.po new file mode 100644 index 0000000000..d33211c76f --- /dev/null +++ b/c-api/file.po @@ -0,0 +1,178 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-18 15:46+0200\n" +"PO-Revision-Date: 2021-12-11 12:00+0100\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 1.8.11\n" + +#: c-api/file.rst:6 +msgid "File Objects" +msgstr "Objets fichiers" + +#: c-api/file.rst:10 +#, fuzzy +msgid "" +"These APIs are a minimal emulation of the Python 2 C API for built-in file " +"objects, which used to rely on the buffered I/O (:c:expr:`FILE*`) support " +"from the C standard library. In Python 3, files and streams use the new :" +"mod:`io` module, which defines several layers over the low-level unbuffered " +"I/O of the operating system. The functions described below are convenience " +"C wrappers over these new APIs, and meant mostly for internal error " +"reporting in the interpreter; third-party code is advised to access the :mod:" +"`io` APIs instead." +msgstr "" +"Ces API sont une émulation minimale de l'API C Python 2 pour les objets " +"fichier natifs, qui reposaient sur la gestion des entrées-sorties avec " +"tampon (:c:type:`FILE\\*`) de la bibliothèque standard C. En Python 3, les " +"fichiers et les flux utilisent le nouveau module :mod:`io`, qui définit " +"plusieurs couches au dessus des entrées/sorties bas niveau sans tampon du " +"système d'exploitation. Les fonctions définies ci-dessous, écrites en C, " +"encapsulent ces nouvelles API pour les rendre plus faciles d'utilisation et " +"sont majoritairement pensées pour signaler des erreurs internes dans " +"l'interpréteur ; il est conseillé au code tiers d'utiliser les API de :mod:" +"`io` à la place." + +#: c-api/file.rst:22 +#, fuzzy +msgid "" +"Create a Python file object from the file descriptor of an already opened " +"file *fd*. The arguments *name*, *encoding*, *errors* and *newline* can be " +"``NULL`` to use the defaults; *buffering* can be *-1* to use the default. " +"*name* is ignored and kept for backward compatibility. Return ``NULL`` on " +"failure. For a more comprehensive description of the arguments, please refer " +"to the :func:`io.open` function documentation." +msgstr "" +"Crée un objet fichier Python à partir du descripteur d'un fichier déjà " +"ouvert *fd*. Les arguments *name*, *encoding*, *errors* et *newline* peuvent " +"être *NULL* pour utiliser ceux par défaut ; *buffering* peut être *-1* pour " +"utiliser celui par défaut ; *name* est ignoré et gardé pour la rétro-" +"compatibilité. Renvoie *NULL* en cas d'échec. Pour une description plus " +"détaillée des arguments, merci de vous référer à la documentation de " +"fonction :func:`io.open`." + +#: c-api/file.rst:31 +msgid "" +"Since Python streams have their own buffering layer, mixing them with OS-" +"level file descriptors can produce various issues (such as unexpected " +"ordering of data)." +msgstr "" +"Étant donné que les flux de données Python possèdent leur propre couche de " +"tampon, les mélanger avec des descripteurs de fichiers du niveau du système " +"d'exploitation peut produire des erreurs (comme par exemple un ordre des " +"données inattendu)." + +#: c-api/file.rst:35 +msgid "Ignore *name* attribute." +msgstr "ignore l'attribut *name*" + +#: c-api/file.rst:41 +#, fuzzy +msgid "" +"Return the file descriptor associated with *p* as an :c:expr:`int`. If the " +"object is an integer, its value is returned. If not, the object's :meth:" +"`~io.IOBase.fileno` method is called if it exists; the method must return an " +"integer, which is returned as the file descriptor value. Sets an exception " +"and returns ``-1`` on failure." +msgstr "" +"Renvoie un descripteur de fichier associé avec *p* comme un :c:type:`int`. " +"Si l'objet est un entier, sa valeur est renvoyée. Sinon, la méthode :meth:" +"`~io.IOBase.fileno` de l'objet est appelée si elle existe; la méthode doit " +"renvoyer un entier, qui est renvoyé en tant que valeur du descripteur. " +"Affecte une exception et renvoie ``-1`` lors d'un échec." + +#: c-api/file.rst:52 +msgid "" +"Equivalent to ``p.readline([n])``, this function reads one line from the " +"object *p*. *p* may be a file object or any object with a :meth:`~io.IOBase." +"readline` method. If *n* is ``0``, exactly one line is read, regardless of " +"the length of the line. If *n* is greater than ``0``, no more than *n* " +"bytes will be read from the file; a partial line can be returned. In both " +"cases, an empty string is returned if the end of the file is reached " +"immediately. If *n* is less than ``0``, however, one line is read " +"regardless of length, but :exc:`EOFError` is raised if the end of the file " +"is reached immediately." +msgstr "" +"Cette fonction, équivalente à ``p.readline([n])``, lit une ligne de l'objet " +"*p*. *p* peut être un objet fichier ou n'importe quel objet qui possède une " +"méthode :meth:`~io.IOBase.readline`. Si *n* vaut ``0``, une seule ligne est " +"lue, indépendamment de la taille de la ligne. Si *n* est plus grand que " +"``0``, un maximum de *n* octets seront lus en provenance du fichier ; une " +"ligne partielle peut être renvoyée. Dans les deux cas, une chaîne de " +"caractères vide est renvoyée si la fin du fichier est atteinte " +"immédiatement. Cependant, si *n* est plus petit que ``0``, une ligne est lue " +"indépendamment de sa taille, mais :exc:`EOFError` est levée si la fin du " +"fichier est atteinte immédiatement." + +#: c-api/file.rst:65 +msgid "" +"Overrides the normal behavior of :func:`io.open_code` to pass its parameter " +"through the provided handler." +msgstr "" + +#: c-api/file.rst:68 +msgid "" +"The handler is a function of type :c:expr:`PyObject *(\\*)(PyObject *path, " +"void *userData)`, where *path* is guaranteed to be :c:type:`PyUnicodeObject`." +msgstr "" + +#: c-api/file.rst:71 +msgid "" +"The *userData* pointer is passed into the hook function. Since hook " +"functions may be called from different runtimes, this pointer should not " +"refer directly to Python state." +msgstr "" + +#: c-api/file.rst:75 +msgid "" +"As this hook is intentionally used during import, avoid importing new " +"modules during its execution unless they are known to be frozen or available " +"in ``sys.modules``." +msgstr "" + +#: c-api/file.rst:79 +msgid "" +"Once a hook has been set, it cannot be removed or replaced, and later calls " +"to :c:func:`PyFile_SetOpenCodeHook` will fail. On failure, the function " +"returns -1 and sets an exception if the interpreter has been initialized." +msgstr "" + +#: c-api/file.rst:83 +msgid "This function is safe to call before :c:func:`Py_Initialize`." +msgstr "" + +#: c-api/file.rst:85 +msgid "" +"Raises an :ref:`auditing event ` ``setopencodehook`` with no " +"arguments." +msgstr "" + +#: c-api/file.rst:95 +msgid "" +"Write object *obj* to file object *p*. The only supported flag for *flags* " +"is :const:`Py_PRINT_RAW`; if given, the :func:`str` of the object is written " +"instead of the :func:`repr`. Return ``0`` on success or ``-1`` on failure; " +"the appropriate exception will be set." +msgstr "" +"Écrit l'objet *obj* dans l'objet fichier *p*. La seule option gérée pour " +"*flags* est :const:`Py_PRINT_RAW` ; si défini, l'attribut :func:`str` de " +"l'objet est écrit à la place de l'attribut :func:`repr`. Retourne ``0`` en " +"cas de succès ou ``-1`` en cas échec ; l'exception appropriée sera levée." + +#: c-api/file.rst:103 +msgid "" +"Write string *s* to file object *p*. Return ``0`` on success or ``-1`` on " +"failure; the appropriate exception will be set." +msgstr "" +"Écrit la chaîne de caractères *s* dans l'objet fichier *p*. Retourne ``0`` " +"en cas de succès ou ``-1`` en cas d'échec ; l'exception appropriée sera mise " +"en place." diff --git a/c-api/float.po b/c-api/float.po new file mode 100644 index 0000000000..cd18ca540b --- /dev/null +++ b/c-api/float.po @@ -0,0 +1,134 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-18 15:46+0200\n" +"PO-Revision-Date: 2019-01-14 15:30+0100\n" +"Last-Translator: ANTOINE FOURES \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" + +#: c-api/float.rst:6 +msgid "Floating Point Objects" +msgstr "Objets représentant les nombres à virgule flottante" + +#: c-api/float.rst:13 +msgid "" +"This subtype of :c:type:`PyObject` represents a Python floating point object." +msgstr "" +"Ce sous-type de l'objet :c:type:`PyObject` représente un nombre à virgule " +"flottante en Python." + +#: c-api/float.rst:18 +msgid "" +"This instance of :c:type:`PyTypeObject` represents the Python floating point " +"type. This is the same object as :class:`float` in the Python layer." +msgstr "" +"Cette instance de l'objet :c:type:`PyTypeObject` représente le type nombre à " +"virgule flottante en Python. C'est le même objet que la classe :class:" +"`float` de la couche Python." + +#: c-api/float.rst:24 +#, fuzzy +msgid "" +"Return true if its argument is a :c:type:`PyFloatObject` or a subtype of :c:" +"type:`PyFloatObject`. This function always succeeds." +msgstr "" +"Renvoie vrai si l'argument est de type :c:type:`PyFloatObject` ou un sous-" +"type de :c:type:`PyFloatObject`." + +#: c-api/float.rst:30 +#, fuzzy +msgid "" +"Return true if its argument is a :c:type:`PyFloatObject`, but not a subtype " +"of :c:type:`PyFloatObject`. This function always succeeds." +msgstr "" +"Renvoie vrai si l'argument est de type :c:type:`PyFloatObject`, mais pas un " +"sous-type de :c:type:`PyFloatObject`." + +#: c-api/float.rst:36 +#, fuzzy +msgid "" +"Create a :c:type:`PyFloatObject` object based on the string value in *str*, " +"or ``NULL`` on failure." +msgstr "" +"Crée un objet :c:type:`PyFloatObject` à partir de la valeur de la chaîne de " +"caractères *str*, ou *NULL* en cas d'échec." + +#: c-api/float.rst:42 +#, fuzzy +msgid "" +"Create a :c:type:`PyFloatObject` object from *v*, or ``NULL`` on failure." +msgstr "" +"Crée un objet :c:type:`PyFloatObject` à partir de *v*, ou *NULL* en cas " +"d'échec." + +#: c-api/float.rst:47 +#, fuzzy +msgid "" +"Return a C :c:expr:`double` representation of the contents of *pyfloat*. If " +"*pyfloat* is not a Python floating point object but has a :meth:`__float__` " +"method, this method will first be called to convert *pyfloat* into a float. " +"If ``__float__()`` is not defined then it falls back to :meth:`__index__`. " +"This method returns ``-1.0`` upon failure, so one should call :c:func:" +"`PyErr_Occurred` to check for errors." +msgstr "" +"Renvoie une représentation du contenu d'un *pyfloat* sous la forme d'un :c:" +"type:`double` en C. Si le *pyfloat* n'est pas un nombre à virgule flottante " +"mais contient une méthode :meth:`__float__`, elle est d'abord appelée pour " +"convertir le *pyfloat* en nombre à virgule flottante. Cette méthode renvoie " +"``-1.0`` en cas d'échec, il faut appeler :c:func:`PyErr_Occurred` pour " +"vérifier les erreurs." + +#: c-api/float.rst:54 +msgid "Use :meth:`__index__` if available." +msgstr "" + +#: c-api/float.rst:60 +#, fuzzy +msgid "" +"Return a C :c:expr:`double` representation of the contents of *pyfloat*, but " +"without error checking." +msgstr "" +"Renvoie une représentation du contenu d'un *pyfloat* sous la forme d'un :c:" +"type:`double` en C, sans vérifier les erreurs." + +#: c-api/float.rst:66 +msgid "" +"Return a structseq instance which contains information about the precision, " +"minimum and maximum values of a float. It's a thin wrapper around the header " +"file :file:`float.h`." +msgstr "" +"Renvoie une instance *structseq* qui contient les informations sur la " +"précision et les valeurs minimales et maximales pour un nombre à virgule " +"flottante. C'est une enveloppe autour du fichier d'entête :file:`float.h`." + +#: c-api/float.rst:73 +#, fuzzy +msgid "" +"Return the maximum representable finite float *DBL_MAX* as C :c:expr:" +"`double`." +msgstr "" +"Renvoie le nombre à virgule flottante fini maximal *DBL_MAX* sous la forme " +"d'un :c:type:`double` en C." + +#: c-api/float.rst:78 +#, fuzzy +msgid "" +"Return the minimum normalized positive float *DBL_MIN* as C :c:expr:`double`." +msgstr "" +"Renvoie le nombre à virgule flottante minimal normalisé *DBL_MIN* sous la " +"forme :c:type:`double` en C." + +#~ msgid "" +#~ "Clear the float free list. Return the number of items that could not be " +#~ "freed." +#~ msgstr "" +#~ "Libère la mémoire de la *free list* des nombres à virgule flottante. " +#~ "Renvoie le nombre d'éléments qui n'ont pas pu être libérés." diff --git a/c-api/function.po b/c-api/function.po new file mode 100644 index 0000000000..2dedf0c20b --- /dev/null +++ b/c-api/function.po @@ -0,0 +1,148 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-04-05 10:05+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \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" + +#: c-api/function.rst:6 +msgid "Function Objects" +msgstr "Objets fonctions" + +#: c-api/function.rst:10 +msgid "There are a few functions specific to Python functions." +msgstr "Certaines fonctions sont spécifiques aux fonctions Python." + +#: c-api/function.rst:15 +msgid "The C structure used for functions." +msgstr "La structure C utilisée pour les fonctions." + +#: c-api/function.rst:22 +msgid "" +"This is an instance of :c:type:`PyTypeObject` and represents the Python " +"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 "" +"Return true if *o* is a function object (has type :c:data:" +"`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 "" +"Return a new function object associated with the code object *code*. " +"*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 "" +"The function's docstring and name are retrieved from the code object. " +"*__module__* is retrieved from *globals*. The argument defaults, annotations " +"and closure are set to ``NULL``. *__qualname__* is set to the same value as " +"the function's name." +msgstr "" + +#: c-api/function.rst:44 +msgid "" +"As :c:func:`PyFunction_New`, but also allows setting the function object's " +"``__qualname__`` attribute. *qualname* should be a unicode object or " +"``NULL``; if ``NULL``, the ``__qualname__`` attribute is set to the same " +"value as its ``__name__`` attribute." +msgstr "" + +#: c-api/function.rst:54 +msgid "Return the code object associated with the function object *op*." +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 "" +"Return a :term:`borrowed reference` to the *__module__* attribute of the " +"function object *op*. It can be *NULL*." +msgstr "" +"Renvoie un :term:`borrowed reference` à l'attribut ``__module__`` de l'objet " +"fonction *op*. Il peut être *NULL*." + +#: c-api/function.rst:67 +msgid "" +"This is normally a string containing the module name, but can be set to any " +"other object by Python code." +msgstr "" +"C'est typiquement une chaîne de caractère contenant le nom du module, mais " +"il peut être changé par du code Python pour n'importe quel autre objet." + +#: c-api/function.rst:73 +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:79 +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:96 c-api/function.rst:110 +msgid "Raises :exc:`SystemError` and returns ``-1`` on failure." +msgstr "Lève :exc:`SystemError` et renvoie ``-1`` en cas de d'échec." + +#: c-api/function.rst:87 +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:93 +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:101 +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:107 +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 new file mode 100644 index 0000000000..6935f39282 --- /dev/null +++ b/c-api/gcsupport.po @@ -0,0 +1,283 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-03-18 17:06+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \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" + +#: c-api/gcsupport.rst:6 +msgid "Supporting Cyclic Garbage Collection" +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." +msgstr "" + +#: c-api/gcsupport.rst:15 +msgid "" +"To create a container type, the :c:member:`~PyTypeObject.tp_flags` field of " +"the type object must include the :const:`Py_TPFLAGS_HAVE_GC` and provide an " +"implementation of the :c:member:`~PyTypeObject.tp_traverse` handler. If " +"instances of the type are mutable, a :c:member:`~PyTypeObject.tp_clear` " +"implementation must also be provided." +msgstr "" + +#: c-api/gcsupport.rst:24 +msgid "" +"Objects with a type with this flag set must conform with the rules " +"documented here. For convenience these objects will be referred to as " +"container objects." +msgstr "" + +#: c-api/gcsupport.rst:28 +msgid "Constructors for container types must conform to two rules:" +msgstr "" + +#: c-api/gcsupport.rst:30 +msgid "" +"The memory for the object must be allocated using :c:func:`PyObject_GC_New` " +"or :c:func:`PyObject_GC_NewVar`." +msgstr "" + +#: c-api/gcsupport.rst:33 +msgid "" +"Once all the fields which may contain references to other containers are " +"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: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: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: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 " +"valid while being tracked. This should be called once all the fields " +"followed by the :c:member:`~PyTypeObject.tp_traverse` handler become valid, " +"usually near the end of the constructor." +msgstr "" + +#: 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:89 +msgid "" +"The object cannot be tracked by the garbage collector if this function " +"returns 0." +msgstr "" + +#: 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:97 +msgid "This is analogous to the Python function :func:`gc.is_tracked`." +msgstr "" + +#: 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:107 +msgid "This is analogous to the Python function :func:`gc.is_finalized`." +msgstr "" + +#: 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: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 " +"this object to add it back to the set of tracked objects. The deallocator (:" +"c:member:`~PyTypeObject.tp_dealloc` handler) should call this for the object " +"before any of the fields used by the :c:member:`~PyTypeObject.tp_traverse` " +"handler become invalid." +msgstr "" + +#: 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:132 +msgid "" +"The :c:member:`~PyTypeObject.tp_traverse` handler accepts a function " +"parameter of this type:" +msgstr "" + +#: 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 " +"traverse as *object* and the third parameter to the :c:member:`~PyTypeObject." +"tp_traverse` handler as *arg*. The Python core uses several visitor " +"functions to implement cyclic garbage detection; it's not expected that " +"users will need to write their own visitor functions." +msgstr "" + +#: c-api/gcsupport.rst:144 +msgid "" +"The :c:member:`~PyTypeObject.tp_traverse` handler must have the following " +"type:" +msgstr "" + +#: 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 " +"parameters to *visit* being the contained object and the *arg* value passed " +"to the handler. The *visit* function must not be called with a ``NULL`` " +"object argument. If *visit* returns a non-zero value that value should be " +"returned immediately." +msgstr "" + +#: 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:" +"member:`~PyTypeObject.tp_traverse` implementation must name its arguments " +"exactly *visit* and *arg*:" +msgstr "" + +#: 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: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: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 " +"reference cycles. Note that the object must still be valid after calling " +"this method (don't just call :c:func:`Py_DECREF` on a reference). The " +"collector will call this method if it detects that this object is involved " +"in a reference cycle." +msgstr "" + +#: c-api/gcsupport.rst:191 +msgid "Controlling the Garbage Collector State" +msgstr "" + +#: c-api/gcsupport.rst:193 +msgid "" +"The C-API provides the following functions for controlling garbage " +"collection runs." +msgstr "" + +#: c-api/gcsupport.rst:198 +msgid "" +"Perform a full garbage collection, if the garbage collector is enabled. " +"(Note that :func:`gc.collect` runs it unconditionally.)" +msgstr "" + +#: c-api/gcsupport.rst:201 +msgid "" +"Returns the number of collected + unreachable objects which cannot be " +"collected. If the garbage collector is disabled or already collecting, " +"returns ``0`` immediately. Errors during garbage collection are passed to :" +"data:`sys.unraisablehook`. This function does not raise exceptions." +msgstr "" + +#: c-api/gcsupport.rst:211 +msgid "" +"Enable the garbage collector: similar to :func:`gc.enable`. Returns the " +"previous state, 0 for disabled and 1 for enabled." +msgstr "" + +#: c-api/gcsupport.rst:219 +msgid "" +"Disable the garbage collector: similar to :func:`gc.disable`. Returns the " +"previous state, 0 for disabled and 1 for enabled." +msgstr "" + +#: c-api/gcsupport.rst:227 +msgid "" +"Query the state of the garbage collector: similar to :func:`gc.isenabled`. " +"Returns the current state, 0 for disabled and 1 for enabled." +msgstr "" diff --git a/c-api/gen.po b/c-api/gen.po new file mode 100644 index 0000000000..83df41a5b0 --- /dev/null +++ b/c-api/gen.po @@ -0,0 +1,82 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +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:24+0200\n" +"Last-Translator: Julien Palard \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.4\n" + +#: c-api/gen.rst:6 +msgid "Generator Objects" +msgstr "Objets générateur" + +#: c-api/gen.rst:8 +msgid "" +"Generator objects are what Python uses to implement generator iterators. " +"They are normally created by iterating over a function that yields values, " +"rather than explicitly calling :c:func:`PyGen_New` or :c:func:" +"`PyGen_NewWithQualName`." +msgstr "" +"Python utilise des objets générateurs pour implémenter les itérations de " +"générateurs. Ils sont normalement crées en itérant sur une fonction donnant " +"des valeurs via ``yield``, au lieu d'appeler explicitement :c:func:" +"`PyGen_New` ou :c:func:`PyGen_NewWithQualName`." + +#: c-api/gen.rst:15 +msgid "The C structure used for generator objects." +msgstr "La structure C utilisée pour les objets générateurs." + +#: c-api/gen.rst:20 +msgid "The type object corresponding to generator objects." +msgstr "Le type objet correspondant aux objets générateurs." + +#: c-api/gen.rst:25 +#, fuzzy +msgid "" +"Return true if *ob* is a generator object; *ob* must not be ``NULL``. This " +"function always succeeds." +msgstr "" +"Renvoie ``True`` si *ob* est un objet générateur. *ob* ne doit pas être " +"*NULL*." + +#: c-api/gen.rst:31 +#, fuzzy +msgid "" +"Return true if *ob*'s type is :c:type:`PyGen_Type`; *ob* must not be " +"``NULL``. This function always succeeds." +msgstr "" +"Renvoie ``True`` si le type de *ob* est *PyGen_Type*. *ob* ne doit pas être " +"*NULL*." + +#: c-api/gen.rst:37 +#, fuzzy +msgid "" +"Create and return a new generator object based on the *frame* object. A " +"reference to *frame* is stolen by this function. The argument must not be " +"``NULL``." +msgstr "" +"Crée et renvoie un nouvel objet générateur basé sur l'objet *frame*. Une " +"référence à *frame* est volée par cette fonction. L'argument ne doit pas " +"être *NULL*." + +#: c-api/gen.rst:43 +#, fuzzy +msgid "" +"Create and return a new generator object based on the *frame* object, with " +"``__name__`` and ``__qualname__`` set to *name* and *qualname*. A reference " +"to *frame* is stolen by this function. The *frame* argument must not be " +"``NULL``." +msgstr "" +"Crée et renvoie un nouvel objet générateur basé sur l'objet *frame*, avec " +"``__name__`` et ``__qualname__`` valant *name* et *qualname*. Une référence " +"à *frame* est volée par cette fonction. L'argument *frame* ne doit pas être " +"*NULL*." diff --git a/c-api/import.po b/c-api/import.po new file mode 100644 index 0000000000..4303354d0e --- /dev/null +++ b/c-api/import.po @@ -0,0 +1,324 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-18 15:46+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \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" + +#: c-api/import.rst:6 +msgid "Importing Modules" +msgstr "Importer des modules" + +#: c-api/import.rst:16 +msgid "" +"This is a simplified interface to :c:func:`PyImport_ImportModuleEx` below, " +"leaving the *globals* and *locals* arguments set to ``NULL`` and *level* set " +"to 0. When the *name* argument contains a dot (when it specifies a " +"submodule of a package), the *fromlist* argument is set to the list " +"``['*']`` so that the return value is the named module rather than the top-" +"level package containing it as would otherwise be the case. (Unfortunately, " +"this has an additional side effect when *name* in fact specifies a " +"subpackage instead of a submodule: the submodules specified in the package's " +"``__all__`` variable are loaded.) Return a new reference to the imported " +"module, or ``NULL`` with an exception set on failure. A failing import of a " +"module doesn't leave the module in :data:`sys.modules`." +msgstr "" + +#: c-api/import.rst:89 +msgid "This function always uses absolute imports." +msgstr "" + +#: c-api/import.rst:33 +msgid "This function is a deprecated alias of :c:func:`PyImport_ImportModule`." +msgstr "" + +#: c-api/import.rst:35 +msgid "" +"This function used to fail immediately when the import lock was held by " +"another thread. In Python 3.3 though, the locking scheme switched to per-" +"module locks for most purposes, so this function's special behaviour isn't " +"needed anymore." +msgstr "" + +#: c-api/import.rst:46 +msgid "" +"Import a module. This is best described by referring to the built-in Python " +"function :func:`__import__`." +msgstr "" + +#: c-api/import.rst:65 +msgid "" +"The return value is a new reference to the imported module or top-level " +"package, or ``NULL`` with an exception set on failure. Like for :func:" +"`__import__`, the return value when a submodule of a package was requested " +"is normally the top-level package, unless a non-empty *fromlist* was given." +msgstr "" + +#: c-api/import.rst:55 +msgid "" +"Failing imports remove incomplete module objects, like with :c:func:" +"`PyImport_ImportModule`." +msgstr "" + +#: c-api/import.rst:61 +msgid "" +"Import a module. This is best described by referring to the built-in Python " +"function :func:`__import__`, as the standard :func:`__import__` function " +"calls this function directly." +msgstr "" + +#: c-api/import.rst:75 +msgid "" +"Similar to :c:func:`PyImport_ImportModuleLevelObject`, but the name is a " +"UTF-8 encoded string instead of a Unicode object." +msgstr "" + +#: c-api/import.rst:78 +msgid "Negative values for *level* are no longer accepted." +msgstr "" + +#: c-api/import.rst:83 +msgid "" +"This is a higher-level interface that calls the current \"import hook " +"function\" (with an explicit *level* of 0, meaning absolute import). It " +"invokes the :func:`__import__` function from the ``__builtins__`` of the " +"current globals. This means that the import is done using whatever import " +"hooks are installed in the current environment." +msgstr "" + +#: c-api/import.rst:94 +msgid "" +"Reload a module. Return a new reference to the reloaded module, or ``NULL`` " +"with an exception set on failure (the module still exists in this case)." +msgstr "" + +#: c-api/import.rst:100 +msgid "" +"Return the module object corresponding to a module name. The *name* " +"argument may be of the form ``package.module``. First check the modules " +"dictionary if there's one there, and if not, create a new one and insert it " +"in the modules dictionary. Return ``NULL`` with an exception set on failure." +msgstr "" + +#: c-api/import.rst:107 +msgid "" +"This function does not load or import the module; if the module wasn't " +"already loaded, you will get an empty module object. Use :c:func:" +"`PyImport_ImportModule` or one of its variants to import a module. Package " +"structures implied by a dotted name for *name* are not created if not " +"already present." +msgstr "" + +#: c-api/import.rst:117 +msgid "" +"Similar to :c:func:`PyImport_AddModuleObject`, but the name is a UTF-8 " +"encoded string instead of a Unicode object." +msgstr "" + +#: c-api/import.rst:125 +msgid "" +"Given a module name (possibly of the form ``package.module``) and a code " +"object read from a Python bytecode file or obtained from the built-in " +"function :func:`compile`, load the module. Return a new reference to the " +"module object, or ``NULL`` with an exception set if an error occurred. " +"*name* is removed from :attr:`sys.modules` in error cases, even if *name* " +"was already in :attr:`sys.modules` on entry to :c:func:" +"`PyImport_ExecCodeModule`. Leaving incompletely initialized modules in :" +"attr:`sys.modules` is dangerous, as imports of such modules have no way to " +"know that the module object is an unknown (and probably damaged with respect " +"to the module author's intents) state." +msgstr "" + +#: c-api/import.rst:135 +msgid "" +"The module's :attr:`__spec__` and :attr:`__loader__` will be set, if not set " +"already, with the appropriate values. The spec's loader will be set to the " +"module's ``__loader__`` (if set) and to an instance of :class:" +"`SourceFileLoader` otherwise." +msgstr "" + +#: c-api/import.rst:140 +msgid "" +"The module's :attr:`__file__` attribute will be set to the code object's :c:" +"member:`co_filename`. If applicable, :attr:`__cached__` will also be set." +msgstr "" + +#: c-api/import.rst:144 +msgid "" +"This function will reload the module if it was already imported. See :c:" +"func:`PyImport_ReloadModule` for the intended way to reload a module." +msgstr "" + +#: c-api/import.rst:147 +msgid "" +"If *name* points to a dotted name of the form ``package.module``, any " +"package structures not already created will still not be created." +msgstr "" + +#: c-api/import.rst:150 +msgid "" +"See also :c:func:`PyImport_ExecCodeModuleEx` and :c:func:" +"`PyImport_ExecCodeModuleWithPathnames`." +msgstr "" + +#: c-api/import.rst:156 +msgid "" +"Like :c:func:`PyImport_ExecCodeModule`, but the :attr:`__file__` attribute " +"of the module object is set to *pathname* if it is non-``NULL``." +msgstr "" + +#: c-api/import.rst:159 +msgid "See also :c:func:`PyImport_ExecCodeModuleWithPathnames`." +msgstr "" + +#: c-api/import.rst:164 +msgid "" +"Like :c:func:`PyImport_ExecCodeModuleEx`, but the :attr:`__cached__` " +"attribute of the module object is set to *cpathname* if it is non-``NULL``. " +"Of the three functions, this is the preferred one to use." +msgstr "" + +#: c-api/import.rst:173 +msgid "" +"Like :c:func:`PyImport_ExecCodeModuleObject`, but *name*, *pathname* and " +"*cpathname* are UTF-8 encoded strings. Attempts are also made to figure out " +"what the value for *pathname* should be from *cpathname* if the former is " +"set to ``NULL``." +msgstr "" + +#: c-api/import.rst:179 +msgid "" +"Uses :func:`imp.source_from_cache()` in calculating the source path if only " +"the bytecode path is provided." +msgstr "" + +#: c-api/import.rst:186 +msgid "" +"Return the magic number for Python bytecode files (a.k.a. :file:`.pyc` " +"file). The magic number should be present in the first four bytes of the " +"bytecode file, in little-endian byte order. Returns ``-1`` on error." +msgstr "" + +#: c-api/import.rst:190 +msgid "Return value of ``-1`` upon failure." +msgstr "" + +#: c-api/import.rst:196 +msgid "" +"Return the magic tag string for :pep:`3147` format Python bytecode file " +"names. Keep in mind that the value at ``sys.implementation.cache_tag`` is " +"authoritative and should be used instead of this function." +msgstr "" + +#: c-api/import.rst:204 +msgid "" +"Return the dictionary used for the module administration (a.k.a. ``sys." +"modules``). Note that this is a per-interpreter variable." +msgstr "" + +#: c-api/import.rst:209 +msgid "" +"Return the already imported module with the given name. If the module has " +"not been imported yet then returns ``NULL`` but does not set an error. " +"Returns ``NULL`` and sets an error if the lookup failed." +msgstr "" + +#: c-api/import.rst:217 +msgid "" +"Return a finder object for a :data:`sys.path`/:attr:`pkg.__path__` item " +"*path*, possibly by fetching it from the :data:`sys.path_importer_cache` " +"dict. If it wasn't yet cached, traverse :data:`sys.path_hooks` until a hook " +"is found that can handle the path item. Return ``None`` if no hook could; " +"this tells our caller that the :term:`path based finder` could not find a " +"finder for this path item. Cache the result in :data:`sys." +"path_importer_cache`. Return a new reference to the finder object." +msgstr "" + +#: c-api/import.rst:228 +msgid "" +"Load a frozen module named *name*. Return ``1`` for success, ``0`` if the " +"module is not found, and ``-1`` with an exception set if the initialization " +"failed. To access the imported module on a successful load, use :c:func:" +"`PyImport_ImportModule`. (Note the misnomer --- this function would reload " +"the module if it was already imported.)" +msgstr "" + +#: c-api/import.rst:236 +msgid "The ``__file__`` attribute is no longer set on the module." +msgstr "" + +#: c-api/import.rst:242 +msgid "" +"Similar to :c:func:`PyImport_ImportFrozenModuleObject`, but the name is a " +"UTF-8 encoded string instead of a Unicode object." +msgstr "" + +#: c-api/import.rst:250 +msgid "" +"This is the structure type definition for frozen module descriptors, as " +"generated by the :program:`freeze` utility (see :file:`Tools/freeze/` in the " +"Python source distribution). Its definition, found in :file:`Include/import." +"h`, is::" +msgstr "" + +#: c-api/import.rst:264 +#, fuzzy +msgid "" +"This pointer is initialized to point to an array of :c:struct:`_frozen` " +"records, terminated by one whose members are all ``NULL`` or zero. When a " +"frozen module is imported, it is searched in this table. Third-party code " +"could play tricks with this to provide a dynamically created collection of " +"frozen modules." +msgstr "" +"Ce pointeur est initialisé de manière à pointer sur un tableau d'entrées de :" +"c:type:`struct _frozen`, dont tous les membres de la dernière valent " +"``NULL`` ou zéro. Quand un module figé est importé, il est cherché dans ce " +"tableau. Du code tiers peut jouer avec pour construire dynamiquement une " +"collection de module figés." + +#: c-api/import.rst:272 +msgid "" +"Add a single module to the existing table of built-in modules. This is a " +"convenience wrapper around :c:func:`PyImport_ExtendInittab`, returning " +"``-1`` if the table could not be extended. The new module can be imported " +"by the name *name*, and uses the function *initfunc* as the initialization " +"function called on the first attempted import. This should be called " +"before :c:func:`Py_Initialize`." +msgstr "" + +#: c-api/import.rst:282 +msgid "" +"Structure describing a single entry in the list of built-in modules. Each " +"of these structures gives the name and initialization function for a module " +"built into the interpreter. The name is an ASCII encoded string. Programs " +"which embed Python may use an array of these structures in conjunction with :" +"c:func:`PyImport_ExtendInittab` to provide additional built-in modules. The " +"structure is defined in :file:`Include/import.h` as::" +msgstr "" + +#: c-api/import.rst:297 +msgid "" +"Add a collection of modules to the table of built-in modules. The *newtab* " +"array must end with a sentinel entry which contains ``NULL`` for the :attr:" +"`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 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/index.po b/c-api/index.po new file mode 100644 index 0000000000..53095f5826 --- /dev/null +++ b/c-api/index.po @@ -0,0 +1,32 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +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-02-15 00:33+0100\n" +"Last-Translator: Julien Palard \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" + +#: c-api/index.rst:5 +msgid "Python/C API Reference Manual" +msgstr "Manuel de référence de l'API Python/C" + +#: c-api/index.rst:7 +msgid "" +"This manual documents the API used by C and C++ programmers who want to " +"write extension modules or embed Python. It is a companion to :ref:" +"`extending-index`, which describes the general principles of extension " +"writing but does not document the API functions in detail." +msgstr "" +"C'est la documentation de l'API utilisée par les développeurs C et C++ " +"écrivant des modules d'extension ou intégrant Python. Elle va de pair avec :" +"ref:`extending-index`, qui décrit les principes généraux de l'écriture " +"d'extensions, mais ne rentre pas dans les détails de chaque fonction de " +"l'API." diff --git a/c-api/init.po b/c-api/init.po new file mode 100644 index 0000000000..a79574f2df --- /dev/null +++ b/c-api/init.po @@ -0,0 +1,2045 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-22 22:57+0100\n" +"PO-Revision-Date: 2018-11-29 18:22+0100\n" +"Last-Translator: FULL NAME \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" + +#: c-api/init.rst:8 +msgid "Initialization, Finalization, and Threads" +msgstr "" + +#: c-api/init.rst:10 +msgid "See also :ref:`Python Initialization Configuration `." +msgstr "" + +#: c-api/init.rst:15 +msgid "Before Python Initialization" +msgstr "" + +#: c-api/init.rst:17 +msgid "" +"In an application embedding Python, the :c:func:`Py_Initialize` function " +"must be called before using any other Python/C API functions; with the " +"exception of a few functions and the :ref:`global configuration variables " +"`." +msgstr "" + +#: c-api/init.rst:22 +msgid "" +"The following functions can be safely called before Python is initialized:" +msgstr "" + +#: c-api/init.rst:24 +msgid "Configuration functions:" +msgstr "" + +#: c-api/init.rst:26 +msgid ":c:func:`PyImport_AppendInittab`" +msgstr "" + +#: c-api/init.rst:27 +msgid ":c:func:`PyImport_ExtendInittab`" +msgstr "" + +#: c-api/init.rst:28 +msgid ":c:func:`PyInitFrozenExtensions`" +msgstr "" + +#: c-api/init.rst:29 +msgid ":c:func:`PyMem_SetAllocator`" +msgstr "" + +#: c-api/init.rst:30 +msgid ":c:func:`PyMem_SetupDebugHooks`" +msgstr "" + +#: c-api/init.rst:31 +msgid ":c:func:`PyObject_SetArenaAllocator`" +msgstr "" + +#: c-api/init.rst:32 +msgid ":c:func:`Py_SetPath`" +msgstr "" + +#: c-api/init.rst:33 +msgid ":c:func:`Py_SetProgramName`" +msgstr "" + +#: c-api/init.rst:34 +msgid ":c:func:`Py_SetPythonHome`" +msgstr "" + +#: c-api/init.rst:35 +msgid ":c:func:`Py_SetStandardStreamEncoding`" +msgstr "" + +#: c-api/init.rst:36 +msgid ":c:func:`PySys_AddWarnOption`" +msgstr "" + +#: c-api/init.rst:37 +msgid ":c:func:`PySys_AddXOption`" +msgstr "" + +#: c-api/init.rst:38 +msgid ":c:func:`PySys_ResetWarnOptions`" +msgstr "" + +#: c-api/init.rst:40 +msgid "Informative functions:" +msgstr "" + +#: c-api/init.rst:42 +msgid ":c:func:`Py_IsInitialized`" +msgstr "" + +#: c-api/init.rst:43 +msgid ":c:func:`PyMem_GetAllocator`" +msgstr "" + +#: c-api/init.rst:44 +msgid ":c:func:`PyObject_GetArenaAllocator`" +msgstr "" + +#: c-api/init.rst:45 +msgid ":c:func:`Py_GetBuildInfo`" +msgstr "" + +#: c-api/init.rst:46 +msgid ":c:func:`Py_GetCompiler`" +msgstr "" + +#: c-api/init.rst:47 +msgid ":c:func:`Py_GetCopyright`" +msgstr "" + +#: c-api/init.rst:48 +msgid ":c:func:`Py_GetPlatform`" +msgstr "" + +#: c-api/init.rst:49 +msgid ":c:func:`Py_GetVersion`" +msgstr "" + +#: c-api/init.rst:51 +#, fuzzy +msgid "Utilities:" +msgstr "Utilitaires" + +#: c-api/init.rst:53 +msgid ":c:func:`Py_DecodeLocale`" +msgstr "" + +#: c-api/init.rst:55 +msgid "Memory allocators:" +msgstr "" + +#: c-api/init.rst:57 +#, fuzzy +msgid ":c:func:`PyMem_RawMalloc`" +msgstr ":c:func:`PyMem_RawCalloc`," + +#: c-api/init.rst:58 +#, fuzzy +msgid ":c:func:`PyMem_RawRealloc`" +msgstr ":c:func:`PyMem_RawCalloc`," + +#: c-api/init.rst:59 +#, fuzzy +msgid ":c:func:`PyMem_RawCalloc`" +msgstr ":c:func:`PyMem_RawCalloc`," + +#: c-api/init.rst:60 +msgid ":c:func:`PyMem_RawFree`" +msgstr "" + +#: c-api/init.rst:64 +msgid "" +"The following functions **should not be called** before :c:func:" +"`Py_Initialize`: :c:func:`Py_EncodeLocale`, :c:func:`Py_GetPath`, :c:func:" +"`Py_GetPrefix`, :c:func:`Py_GetExecPrefix`, :c:func:" +"`Py_GetProgramFullPath`, :c:func:`Py_GetPythonHome`, :c:func:" +"`Py_GetProgramName` and :c:func:`PyEval_InitThreads`." +msgstr "" + +#: c-api/init.rst:74 +msgid "Global configuration variables" +msgstr "" + +#: c-api/init.rst:76 +msgid "" +"Python has variables for the global configuration to control different " +"features and options. By default, these flags are controlled by :ref:" +"`command line options `." +msgstr "" + +#: c-api/init.rst:80 +msgid "" +"When a flag is set by an option, the value of the flag is the number of " +"times that the option was set. For example, ``-b`` sets :c:data:" +"`Py_BytesWarningFlag` to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to " +"2." +msgstr "" + +#: c-api/init.rst:86 +msgid "" +"Issue a warning when comparing :class:`bytes` or :class:`bytearray` with :" +"class:`str` or :class:`bytes` with :class:`int`. Issue an error if greater " +"or equal to ``2``." +msgstr "" + +#: c-api/init.rst:90 +msgid "Set by the :option:`-b` option." +msgstr "" + +#: c-api/init.rst:94 +msgid "" +"Turn on parser debugging output (for expert only, depending on compilation " +"options)." +msgstr "" + +#: c-api/init.rst:97 +msgid "" +"Set by the :option:`-d` option and the :envvar:`PYTHONDEBUG` environment " +"variable." +msgstr "" + +#: c-api/init.rst:102 +msgid "" +"If set to non-zero, Python won't try to write ``.pyc`` files on the import " +"of source modules." +msgstr "" + +#: c-api/init.rst:105 +msgid "" +"Set by the :option:`-B` option and the :envvar:`PYTHONDONTWRITEBYTECODE` " +"environment variable." +msgstr "" + +#: c-api/init.rst:110 +msgid "" +"Suppress error messages when calculating the module search path in :c:func:" +"`Py_GetPath`." +msgstr "" + +#: c-api/init.rst:113 +msgid "Private flag used by ``_freeze_importlib`` and ``frozenmain`` programs." +msgstr "" + +#: c-api/init.rst:117 +msgid "" +"Set to ``1`` if the :envvar:`PYTHONHASHSEED` environment variable is set to " +"a non-empty string." +msgstr "" + +#: c-api/init.rst:120 +msgid "" +"If the flag is non-zero, read the :envvar:`PYTHONHASHSEED` environment " +"variable to initialize the secret hash seed." +msgstr "" + +#: c-api/init.rst:125 +msgid "" +"Ignore all :envvar:`PYTHON*` environment variables, e.g. :envvar:" +"`PYTHONPATH` and :envvar:`PYTHONHOME`, that might be set." +msgstr "" +"Ignore toutes les variables d'environnement :envvar:`PYTHON*` qui pourraient " +"être définies. Par exemple, :envvar:`PYTHONPATH` et :envvar:`PYTHONHOME`." + +#: c-api/init.rst:128 +msgid "Set by the :option:`-E` and :option:`-I` options." +msgstr "" + +#: c-api/init.rst:132 +msgid "" +"When a script is passed as first argument or the :option:`-c` option is " +"used, enter interactive mode after executing the script or the command, even " +"when :data:`sys.stdin` does not appear to be a terminal." +msgstr "" + +#: c-api/init.rst:136 +msgid "" +"Set by the :option:`-i` option and the :envvar:`PYTHONINSPECT` environment " +"variable." +msgstr "" + +#: c-api/init.rst:141 +msgid "Set by the :option:`-i` option." +msgstr "" + +#: c-api/init.rst:145 +msgid "" +"Run Python in isolated mode. In isolated mode :data:`sys.path` contains " +"neither the script's directory nor the user's site-packages directory." +msgstr "" + +#: c-api/init.rst:148 +msgid "Set by the :option:`-I` option." +msgstr "" + +#: c-api/init.rst:154 +msgid "" +"If the flag is non-zero, use the ``mbcs`` encoding with ``replace`` error " +"handler, instead of the UTF-8 encoding with ``surrogatepass`` error handler, " +"for the :term:`filesystem encoding and error handler`." +msgstr "" + +#: c-api/init.rst:158 +msgid "" +"Set to ``1`` if the :envvar:`PYTHONLEGACYWINDOWSFSENCODING` environment " +"variable is set to a non-empty string." +msgstr "" + +#: c-api/init.rst:161 +msgid "See :pep:`529` for more details." +msgstr "Voir la :pep:`529` pour plus d'informations." + +#: c-api/init.rst:175 +msgid ":ref:`Availability `: Windows." +msgstr ":ref:`Disponibilité ` : Windows." + +#: c-api/init.rst:167 +msgid "" +"If the flag is non-zero, use :class:`io.FileIO` instead of :class:" +"`WindowsConsoleIO` for :mod:`sys` standard streams." +msgstr "" + +#: c-api/init.rst:170 +msgid "" +"Set to ``1`` if the :envvar:`PYTHONLEGACYWINDOWSSTDIO` environment variable " +"is set to a non-empty string." +msgstr "" + +#: c-api/init.rst:173 +#, fuzzy +msgid "See :pep:`528` for more details." +msgstr "Voir la :pep:`529` pour plus d'informations." + +#: c-api/init.rst:179 +msgid "" +"Disable the import of the module :mod:`site` and the site-dependent " +"manipulations of :data:`sys.path` that it entails. Also disable these " +"manipulations if :mod:`site` is explicitly imported later (call :func:`site." +"main` if you want them to be triggered)." +msgstr "" +"Désactive l’importation du module :mod:`site` et les modifications locales " +"de :data:`sys.path` qu’il implique. Désactive aussi ces manipulations si :" +"mod:`site` est importé explicitement plus tard (appelez :func:`site.main` si " +"vous voulez les déclencher)." + +#: c-api/init.rst:184 +msgid "Set by the :option:`-S` option." +msgstr "" + +#: c-api/init.rst:188 +msgid "" +"Don't add the :data:`user site-packages directory ` to :data:" +"`sys.path`." +msgstr "" +"N'ajoute pas le répertoire utilisateur :data:`site-packages ` à :data:`sys.path`." + +#: c-api/init.rst:191 +msgid "" +"Set by the :option:`-s` and :option:`-I` options, and the :envvar:" +"`PYTHONNOUSERSITE` environment variable." +msgstr "" + +#: c-api/init.rst:196 +msgid "" +"Set by the :option:`-O` option and the :envvar:`PYTHONOPTIMIZE` environment " +"variable." +msgstr "" + +#: c-api/init.rst:201 +msgid "" +"Don't display the copyright and version messages even in interactive mode." +msgstr "N'affiche pas le copyright et la version, même en mode interactif." + +#: c-api/init.rst:203 +msgid "Set by the :option:`-q` option." +msgstr "" + +#: c-api/init.rst:209 +msgid "Force the stdout and stderr streams to be unbuffered." +msgstr "" + +#: c-api/init.rst:211 +msgid "" +"Set by the :option:`-u` option and the :envvar:`PYTHONUNBUFFERED` " +"environment variable." +msgstr "" + +#: c-api/init.rst:216 +msgid "" +"Print a message each time a module is initialized, showing the place " +"(filename or built-in module) from which it is loaded. If greater or equal " +"to ``2``, print a message for each file that is checked for when searching " +"for a module. Also provides information on module cleanup at exit." +msgstr "" + +#: c-api/init.rst:221 +msgid "" +"Set by the :option:`-v` option and the :envvar:`PYTHONVERBOSE` environment " +"variable." +msgstr "" + +#: c-api/init.rst:226 +msgid "Initializing and finalizing the interpreter" +msgstr "" + +#: c-api/init.rst:244 +msgid "" +"Initialize the Python interpreter. In an application embedding Python, " +"this should be called before using any other Python/C API functions; see :" +"ref:`Before Python Initialization ` for the few exceptions." +msgstr "" + +#: c-api/init.rst:248 +msgid "" +"This initializes the table of loaded modules (``sys.modules``), and creates " +"the fundamental modules :mod:`builtins`, :mod:`__main__` and :mod:`sys`. It " +"also initializes the module search path (``sys.path``). It does not set " +"``sys.argv``; use :c:func:`PySys_SetArgvEx` for that. This is a no-op when " +"called for a second time (without calling :c:func:`Py_FinalizeEx` first). " +"There is no return value; it is a fatal error if the initialization fails." +msgstr "" + +#: c-api/init.rst:257 +msgid "" +"On Windows, changes the console mode from ``O_TEXT`` to ``O_BINARY``, which " +"will also affect non-Python uses of the console using the C Runtime." +msgstr "" + +#: c-api/init.rst:263 +msgid "" +"This function works like :c:func:`Py_Initialize` if *initsigs* is ``1``. If " +"*initsigs* is ``0``, it skips initialization registration of signal " +"handlers, which might be useful when Python is embedded." +msgstr "" + +#: c-api/init.rst:270 +msgid "" +"Return true (nonzero) when the Python interpreter has been initialized, " +"false (zero) if not. After :c:func:`Py_FinalizeEx` is called, this returns " +"false until :c:func:`Py_Initialize` is called again." +msgstr "" + +#: c-api/init.rst:277 +msgid "" +"Undo all initializations made by :c:func:`Py_Initialize` and subsequent use " +"of Python/C API functions, and destroy all sub-interpreters (see :c:func:" +"`Py_NewInterpreter` below) that were created and not yet destroyed since the " +"last call to :c:func:`Py_Initialize`. Ideally, this frees all memory " +"allocated by the Python interpreter. This is a no-op when called for a " +"second time (without calling :c:func:`Py_Initialize` again first). Normally " +"the return value is ``0``. If there were errors during finalization " +"(flushing buffered data), ``-1`` is returned." +msgstr "" + +#: c-api/init.rst:286 +msgid "" +"This function is provided for a number of reasons. An embedding application " +"might want to restart Python without having to restart the application " +"itself. An application that has loaded the Python interpreter from a " +"dynamically loadable library (or DLL) might want to free all memory " +"allocated by Python before unloading the DLL. During a hunt for memory leaks " +"in an application a developer might want to free all memory allocated by " +"Python before exiting from the application." +msgstr "" + +#: c-api/init.rst:294 +msgid "" +"**Bugs and caveats:** The destruction of modules and objects in modules is " +"done in random order; this may cause destructors (:meth:`__del__` methods) " +"to fail when they depend on other objects (even functions) or modules. " +"Dynamically loaded extension modules loaded by Python are not unloaded. " +"Small amounts of memory allocated by the Python interpreter may not be freed " +"(if you find a leak, please report it). Memory tied up in circular " +"references between objects is not freed. Some memory allocated by extension " +"modules may not be freed. Some extensions may not work properly if their " +"initialization routine is called more than once; this can happen if an " +"application calls :c:func:`Py_Initialize` and :c:func:`Py_FinalizeEx` more " +"than once." +msgstr "" + +#: c-api/init.rst:305 +msgid "" +"Raises an :ref:`auditing event ` ``cpython." +"_PySys_ClearAuditHooks`` with no arguments." +msgstr "" + +#: c-api/init.rst:311 +msgid "" +"This is a backwards-compatible version of :c:func:`Py_FinalizeEx` that " +"disregards the return value." +msgstr "" + +#: c-api/init.rst:316 +msgid "Process-wide parameters" +msgstr "" + +#: c-api/init.rst:326 +msgid "" +"This function should be called before :c:func:`Py_Initialize`, if it is " +"called at all. It specifies which encoding and error handling to use with " +"standard IO, with the same meanings as in :func:`str.encode`." +msgstr "" + +#: c-api/init.rst:330 +msgid "" +"It overrides :envvar:`PYTHONIOENCODING` values, and allows embedding code to " +"control IO encoding when the environment variable does not work." +msgstr "" + +#: c-api/init.rst:333 +msgid "" +"*encoding* and/or *errors* may be ``NULL`` to use :envvar:`PYTHONIOENCODING` " +"and/or default values (depending on other settings)." +msgstr "" + +#: c-api/init.rst:337 +msgid "" +"Note that :data:`sys.stderr` always uses the \"backslashreplace\" error " +"handler, regardless of this (or any other) setting." +msgstr "" + +#: c-api/init.rst:340 +msgid "" +"If :c:func:`Py_FinalizeEx` is called, this function will need to be called " +"again in order to affect subsequent calls to :c:func:`Py_Initialize`." +msgstr "" + +#: c-api/init.rst:343 +msgid "" +"Returns ``0`` if successful, a nonzero value on error (e.g. calling after " +"the interpreter has already been initialized)." +msgstr "" + +#: c-api/init.rst:356 +msgid "" +"This function should be called before :c:func:`Py_Initialize` is called for " +"the first time, if it is called at all. It tells the interpreter the value " +"of the ``argv[0]`` argument to the :c:func:`main` function of the program " +"(converted to wide characters). This is used by :c:func:`Py_GetPath` and " +"some other functions below to find the Python run-time libraries relative to " +"the interpreter executable. The default value is ``'python'``. The " +"argument should point to a zero-terminated wide character string in static " +"storage whose contents will not change for the duration of the program's " +"execution. No code in the Python interpreter will change the contents of " +"this storage." +msgstr "" + +#: c-api/init.rst:511 c-api/init.rst:644 c-api/init.rst:661 +msgid "" +"Use :c:func:`Py_DecodeLocale` to decode a bytes string to get a :c:expr:" +"`wchar_*` string." +msgstr "" + +#: c-api/init.rst:375 +msgid "" +"Return the program name set with :c:func:`Py_SetProgramName`, or the " +"default. The returned string points into static storage; the caller should " +"not modify its value." +msgstr "" + +#: c-api/init.rst:398 c-api/init.rst:458 c-api/init.rst:671 +msgid "" +"This function should not be called before :c:func:`Py_Initialize`, otherwise " +"it returns ``NULL``." +msgstr "" + +#: c-api/init.rst:401 c-api/init.rst:461 c-api/init.rst:674 +msgid "It now returns ``NULL`` if called before :c:func:`Py_Initialize`." +msgstr "" + +#: c-api/init.rst:388 +msgid "" +"Return the *prefix* for installed platform-independent files. This is " +"derived through a number of complicated rules from the program name set " +"with :c:func:`Py_SetProgramName` and some environment variables; for " +"example, if the program name is ``'/usr/local/bin/python'``, the prefix is " +"``'/usr/local'``. The returned string points into static storage; the caller " +"should not modify its value. This corresponds to the :makevar:`prefix` " +"variable in the top-level :file:`Makefile` and the :option:`--prefix` " +"argument to the :program:`configure` script at build time. The value is " +"available to Python code as ``sys.prefix``. It is only useful on Unix. See " +"also the next function." +msgstr "" + +#: c-api/init.rst:407 +msgid "" +"Return the *exec-prefix* for installed platform-*dependent* files. This is " +"derived through a number of complicated rules from the program name set " +"with :c:func:`Py_SetProgramName` and some environment variables; for " +"example, if the program name is ``'/usr/local/bin/python'``, the exec-prefix " +"is ``'/usr/local'``. The returned string points into static storage; the " +"caller should not modify its value. This corresponds to the :makevar:" +"`exec_prefix` variable in the top-level :file:`Makefile` and the ``--exec-" +"prefix`` argument to the :program:`configure` script at build time. The " +"value is available to Python code as ``sys.exec_prefix``. It is only useful " +"on Unix." +msgstr "" + +#: c-api/init.rst:417 +msgid "" +"Background: The exec-prefix differs from the prefix when platform dependent " +"files (such as executables and shared libraries) are installed in a " +"different directory tree. In a typical installation, platform dependent " +"files may be installed in the :file:`/usr/local/plat` subtree while platform " +"independent may be installed in :file:`/usr/local`." +msgstr "" + +#: c-api/init.rst:423 +msgid "" +"Generally speaking, a platform is a combination of hardware and software " +"families, e.g. Sparc machines running the Solaris 2.x operating system are " +"considered the same platform, but Intel machines running Solaris 2.x are " +"another platform, and Intel machines running Linux are yet another " +"platform. Different major revisions of the same operating system generally " +"also form different platforms. Non-Unix operating systems are a different " +"story; the installation strategies on those systems are so different that " +"the prefix and exec-prefix are meaningless, and set to the empty string. " +"Note that compiled Python bytecode files are platform independent (but not " +"independent from the Python version by which they were compiled!)." +msgstr "" + +#: c-api/init.rst:434 +msgid "" +"System administrators will know how to configure the :program:`mount` or :" +"program:`automount` programs to share :file:`/usr/local` between platforms " +"while having :file:`/usr/local/plat` be a different filesystem for each " +"platform." +msgstr "" + +#: c-api/init.rst:452 +msgid "" +"Return the full program name of the Python executable; this is computed as " +"a side-effect of deriving the default module search path from the program " +"name (set by :c:func:`Py_SetProgramName` above). The returned string points " +"into static storage; the caller should not modify its value. The value is " +"available to Python code as ``sys.executable``." +msgstr "" + +#: c-api/init.rst:472 +msgid "" +"Return the default module search path; this is computed from the program " +"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 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 " +"for loading modules." +msgstr "" + +#: c-api/init.rst:498 +msgid "" +"Set the default module search path. If this function is called before :c:" +"func:`Py_Initialize`, then :c:func:`Py_GetPath` won't attempt to compute a " +"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 macOS, ``';'`` " +"on Windows." +msgstr "" + +#: c-api/init.rst:506 +msgid "" +"This also causes :data:`sys.executable` to be set to the program full path " +"(see :c:func:`Py_GetProgramFullPath`) and for :data:`sys.prefix` and :data:" +"`sys.exec_prefix` to be empty. It is up to the caller to modify these if " +"required after calling :c:func:`Py_Initialize`." +msgstr "" + +#: c-api/init.rst:514 +msgid "" +"The path argument is copied internally, so the caller may free it after the " +"call completes." +msgstr "" + +#: c-api/init.rst:517 +msgid "" +"The program full path is now used for :data:`sys.executable`, instead of the " +"program name." +msgstr "" + +#: c-api/init.rst:524 +msgid "" +"Return the version of this Python interpreter. This is a string that looks " +"something like ::" +msgstr "" + +#: c-api/init.rst:531 +msgid "" +"The first word (up to the first space character) is the current Python " +"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:541 +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 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:552 +msgid "" +"Return the official copyright string for the current Python version, for " +"example" +msgstr "" + +#: c-api/init.rst:554 +msgid "``'Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam'``" +msgstr "" + +#: c-api/init.rst:558 +msgid "" +"The returned string points into static storage; the caller should not modify " +"its value. The value is available to Python code as ``sys.copyright``." +msgstr "" + +#: c-api/init.rst:564 +msgid "" +"Return an indication of the compiler used to build the current Python " +"version, in square brackets, for example::" +msgstr "" + +#: c-api/init.rst:585 +msgid "" +"The returned string points into static storage; the caller should not modify " +"its value. The value is available to Python code as part of the variable " +"``sys.version``." +msgstr "" + +#: c-api/init.rst:578 +msgid "" +"Return information about the sequence number and build date and time of the " +"current Python interpreter instance, for example ::" +msgstr "" + +#: c-api/init.rst:597 +msgid "" +"Set :data:`sys.argv` based on *argc* and *argv*. These parameters are " +"similar to those passed to the program's :c:func:`main` function with the " +"difference that the first entry should refer to the script file to be " +"executed rather than the executable hosting the Python interpreter. If " +"there isn't a script that will be run, the first entry in *argv* can be an " +"empty string. If this function fails to initialize :data:`sys.argv`, a " +"fatal condition is signalled using :c:func:`Py_FatalError`." +msgstr "" + +#: c-api/init.rst:605 +msgid "" +"If *updatepath* is zero, this is all the function does. If *updatepath* is " +"non-zero, the function also modifies :data:`sys.path` according to the " +"following algorithm:" +msgstr "" + +#: c-api/init.rst:609 +msgid "" +"If the name of an existing script is passed in ``argv[0]``, the absolute " +"path of the directory where the script is located is prepended to :data:`sys." +"path`." +msgstr "" + +#: c-api/init.rst:612 +msgid "" +"Otherwise (that is, if *argc* is ``0`` or ``argv[0]`` doesn't point to an " +"existing file name), an empty string is prepended to :data:`sys.path`, which " +"is the same as prepending the current working directory (``\".\"``)." +msgstr "" + +#: c-api/init.rst:621 +msgid "" +"It is recommended that applications embedding the Python interpreter for " +"purposes other than executing a single script pass ``0`` as *updatepath*, " +"and update :data:`sys.path` themselves if desired. See `CVE-2008-5983 " +"`_." +msgstr "" + +#: c-api/init.rst:626 +msgid "" +"On versions before 3.1.3, you can achieve the same effect by manually " +"popping the first :data:`sys.path` element after having called :c:func:" +"`PySys_SetArgv`, for example using::" +msgstr "" + +#: c-api/init.rst:640 +msgid "" +"This function works like :c:func:`PySys_SetArgvEx` with *updatepath* set to " +"``1`` unless the :program:`python` interpreter was started with the :option:" +"`-I`." +msgstr "" + +#: c-api/init.rst:647 +msgid "The *updatepath* value depends on :option:`-I`." +msgstr "" + +#: c-api/init.rst:652 +msgid "" +"Set the default \"home\" directory, that is, the location of the standard " +"Python libraries. See :envvar:`PYTHONHOME` for the meaning of the argument " +"string." +msgstr "" + +#: c-api/init.rst:656 +msgid "" +"The argument should point to a zero-terminated character string in static " +"storage whose contents will not change for the duration of the program's " +"execution. No code in the Python interpreter will change the contents of " +"this storage." +msgstr "" + +#: c-api/init.rst:667 +msgid "" +"Return the default \"home\", that is, the value set by a previous call to :c:" +"func:`Py_SetPythonHome`, or the value of the :envvar:`PYTHONHOME` " +"environment variable if it is set." +msgstr "" + +#: c-api/init.rst:681 +msgid "Thread State and the Global Interpreter Lock" +msgstr "" + +#: c-api/init.rst:688 +msgid "" +"The Python interpreter is not fully thread-safe. In order to support multi-" +"threaded Python programs, there's a global lock, called the :term:`global " +"interpreter lock` or :term:`GIL`, that must be held by the current thread " +"before it can safely access Python objects. Without the lock, even the " +"simplest operations could cause problems in a multi-threaded program: for " +"example, when two threads simultaneously increment the reference count of " +"the same object, the reference count could end up being incremented only " +"once instead of twice." +msgstr "" + +#: c-api/init.rst:698 +msgid "" +"Therefore, the rule exists that only the thread that has acquired the :term:" +"`GIL` may operate on Python objects or call Python/C API functions. In order " +"to emulate concurrency of execution, the interpreter regularly tries to " +"switch threads (see :func:`sys.setswitchinterval`). The lock is also " +"released around potentially blocking I/O operations like reading or writing " +"a file, so that other Python threads can run in the meantime." +msgstr "" + +#: c-api/init.rst:709 +msgid "" +"The Python interpreter keeps some thread-specific bookkeeping information " +"inside a data structure called :c:type:`PyThreadState`. There's also one " +"global variable pointing to the current :c:type:`PyThreadState`: it can be " +"retrieved using :c:func:`PyThreadState_Get`." +msgstr "" + +#: c-api/init.rst:715 +msgid "Releasing the GIL from extension code" +msgstr "" + +#: c-api/init.rst:717 +msgid "" +"Most extension code manipulating the :term:`GIL` has the following simple " +"structure::" +msgstr "" + +#: c-api/init.rst:726 +msgid "This is so common that a pair of macros exists to simplify it::" +msgstr "" + +#: c-api/init.rst:736 +msgid "" +"The :c:macro:`Py_BEGIN_ALLOW_THREADS` macro opens a new block and declares a " +"hidden local variable; the :c:macro:`Py_END_ALLOW_THREADS` macro closes the " +"block." +msgstr "" + +#: c-api/init.rst:740 +msgid "The block above expands to the following code::" +msgstr "" + +#: c-api/init.rst:752 +msgid "" +"Here is how these functions work: the global interpreter lock is used to " +"protect the pointer to the current thread state. When releasing the lock " +"and saving the thread state, the current thread state pointer must be " +"retrieved before the lock is released (since another thread could " +"immediately acquire the lock and store its own thread state in the global " +"variable). Conversely, when acquiring the lock and restoring the thread " +"state, the lock must be acquired before storing the thread state pointer." +msgstr "" + +#: c-api/init.rst:761 +msgid "" +"Calling system I/O functions is the most common use case for releasing the " +"GIL, but it can also be useful before calling long-running computations " +"which don't need access to Python objects, such as compression or " +"cryptographic functions operating over memory buffers. For example, the " +"standard :mod:`zlib` and :mod:`hashlib` modules release the GIL when " +"compressing or hashing data." +msgstr "" + +#: c-api/init.rst:772 +msgid "Non-Python created threads" +msgstr "" + +#: c-api/init.rst:774 +msgid "" +"When threads are created using the dedicated Python APIs (such as the :mod:" +"`threading` module), a thread state is automatically associated to them and " +"the code showed above is therefore correct. However, when threads are " +"created from C (for example by a third-party library with its own thread " +"management), they don't hold the GIL, nor is there a thread state structure " +"for them." +msgstr "" + +#: c-api/init.rst:781 +msgid "" +"If you need to call Python code from these threads (often this will be part " +"of a callback API provided by the aforementioned third-party library), you " +"must first register these threads with the interpreter by creating a thread " +"state data structure, then acquiring the GIL, and finally storing their " +"thread state pointer, before you can start using the Python/C API. When you " +"are done, you should reset the thread state pointer, release the GIL, and " +"finally free the thread state data structure." +msgstr "" + +#: c-api/init.rst:789 +msgid "" +"The :c:func:`PyGILState_Ensure` and :c:func:`PyGILState_Release` functions " +"do all of the above automatically. The typical idiom for calling into " +"Python from a C thread is::" +msgstr "" + +#: c-api/init.rst:803 +msgid "" +"Note that the ``PyGILState_*`` functions assume there is only one global " +"interpreter (created automatically by :c:func:`Py_Initialize`). Python " +"supports the creation of additional interpreters (using :c:func:" +"`Py_NewInterpreter`), but mixing multiple interpreters and the " +"``PyGILState_*`` API is unsupported." +msgstr "" + +#: c-api/init.rst:813 +msgid "Cautions about fork()" +msgstr "" + +#: c-api/init.rst:815 +msgid "" +"Another important thing to note about threads is their behaviour in the face " +"of the C :c:func:`fork` call. On most systems with :c:func:`fork`, after a " +"process forks only the thread that issued the fork will exist. This has a " +"concrete impact both on how locks must be handled and on all stored state in " +"CPython's runtime." +msgstr "" + +#: c-api/init.rst:821 +msgid "" +"The fact that only the \"current\" thread remains means any locks held by " +"other threads will never be released. Python solves this for :func:`os.fork` " +"by acquiring the locks it uses internally before the fork, and releasing " +"them afterwards. In addition, it resets any :ref:`lock-objects` in the " +"child. When extending or embedding Python, there is no way to inform Python " +"of additional (non-Python) locks that need to be acquired before or reset " +"after a fork. OS facilities such as :c:func:`pthread_atfork` would need to " +"be used to accomplish the same thing. Additionally, when extending or " +"embedding Python, calling :c:func:`fork` directly rather than through :func:" +"`os.fork` (and returning to or calling into Python) may result in a deadlock " +"by one of Python's internal locks being held by a thread that is defunct " +"after the fork. :c:func:`PyOS_AfterFork_Child` tries to reset the necessary " +"locks, but is not always able to." +msgstr "" + +#: c-api/init.rst:836 +msgid "" +"The fact that all other threads go away also means that CPython's runtime " +"state there must be cleaned up properly, which :func:`os.fork` does. This " +"means finalizing all other :c:type:`PyThreadState` objects belonging to the " +"current interpreter and all other :c:type:`PyInterpreterState` objects. Due " +"to this and the special nature of the :ref:`\"main\" interpreter `, :c:func:`fork` should only be called in that " +"interpreter's \"main\" thread, where the CPython global runtime was " +"originally initialized. The only exception is if :c:func:`exec` will be " +"called immediately after." +msgstr "" + +#: c-api/init.rst:849 +#, fuzzy +msgid "High-level API" +msgstr "Bibliothèques de haut-niveau" + +#: c-api/init.rst:851 +msgid "" +"These are the most commonly used types and functions when writing C " +"extension code, or when embedding the Python interpreter:" +msgstr "" + +#: c-api/init.rst:856 +msgid "" +"This data structure represents the state shared by a number of cooperating " +"threads. Threads belonging to the same interpreter share their module " +"administration and a few other internal items. There are no public members " +"in this structure." +msgstr "" + +#: c-api/init.rst:861 +msgid "" +"Threads belonging to different interpreters initially share nothing, except " +"process state like available memory, open file descriptors and such. The " +"global interpreter lock is also shared by all threads, regardless of to " +"which interpreter they belong." +msgstr "" + +#: c-api/init.rst:869 +msgid "" +"This data structure represents the state of a single thread. The only " +"public data member is :attr:`interp` (:c:expr:`PyInterpreterState *`), which " +"points to this thread's interpreter state." +msgstr "" + +#: c-api/init.rst:882 +msgid "Deprecated function which does nothing." +msgstr "" + +#: c-api/init.rst:884 +msgid "" +"In Python 3.6 and older, this function created the GIL if it didn't exist." +msgstr "" + +#: c-api/init.rst:886 +msgid "The function now does nothing." +msgstr "" + +#: c-api/init.rst:889 +msgid "" +"This function is now called by :c:func:`Py_Initialize()`, so you don't have " +"to call it yourself anymore." +msgstr "" + +#: c-api/init.rst:893 +msgid "" +"This function cannot be called before :c:func:`Py_Initialize()` anymore." +msgstr "" + +#: c-api/init.rst:903 +msgid "" +"Returns a non-zero value if :c:func:`PyEval_InitThreads` has been called. " +"This function can be called without holding the GIL, and therefore can be " +"used to avoid calls to the locking API when running single-threaded." +msgstr "" + +#: c-api/init.rst:907 +msgid "The :term:`GIL` is now initialized by :c:func:`Py_Initialize()`." +msgstr "" + +#: c-api/init.rst:915 +msgid "" +"Release the global interpreter lock (if it has been created) and reset the " +"thread state to ``NULL``, returning the previous thread state (which is not " +"``NULL``). If the lock has been created, the current thread must have " +"acquired it." +msgstr "" + +#: c-api/init.rst:923 +msgid "" +"Acquire the global interpreter lock (if it has been created) and set the " +"thread state to *tstate*, which must not be ``NULL``. If the lock has been " +"created, the current thread must not have acquired it, otherwise deadlock " +"ensues." +msgstr "" + +#: c-api/init.rst:975 c-api/init.rst:1272 +msgid "" +"Calling this function from a thread when the runtime is finalizing will " +"terminate the thread, even if the thread was not created by Python. You can " +"use :c:func:`_Py_IsFinalizing` or :func:`sys.is_finalizing` to check if the " +"interpreter is in process of being finalized before calling this function to " +"avoid unwanted termination." +msgstr "" + +#: c-api/init.rst:937 +msgid "" +"Return the current thread state. The global interpreter lock must be held. " +"When the current thread state is ``NULL``, this issues a fatal error (so " +"that the caller needn't check for ``NULL``)." +msgstr "" + +#: c-api/init.rst:944 +msgid "" +"Swap the current thread state with the thread state given by the argument " +"*tstate*, which may be ``NULL``. The global interpreter lock must be held " +"and is not released." +msgstr "" + +#: c-api/init.rst:949 +msgid "" +"The following functions use thread-local storage, and are not compatible " +"with sub-interpreters:" +msgstr "" + +#: c-api/init.rst:954 +msgid "" +"Ensure that the current thread is ready to call the Python C API regardless " +"of the current state of Python, or of the global interpreter lock. This may " +"be called as many times as desired by a thread as long as each call is " +"matched with a call to :c:func:`PyGILState_Release`. In general, other " +"thread-related APIs may be used between :c:func:`PyGILState_Ensure` and :c:" +"func:`PyGILState_Release` calls as long as the thread state is restored to " +"its previous state before the Release(). For example, normal usage of the :" +"c:macro:`Py_BEGIN_ALLOW_THREADS` and :c:macro:`Py_END_ALLOW_THREADS` macros " +"is acceptable." +msgstr "" + +#: c-api/init.rst:964 +msgid "" +"The return value is an opaque \"handle\" to the thread state when :c:func:" +"`PyGILState_Ensure` was called, and must be passed to :c:func:" +"`PyGILState_Release` to ensure Python is left in the same state. Even though " +"recursive calls are allowed, these handles *cannot* be shared - each unique " +"call to :c:func:`PyGILState_Ensure` must save the handle for its call to :c:" +"func:`PyGILState_Release`." +msgstr "" + +#: c-api/init.rst:971 +msgid "" +"When the function returns, the current thread will hold the GIL and be able " +"to call arbitrary Python code. Failure is a fatal error." +msgstr "" + +#: c-api/init.rst:983 +msgid "" +"Release any resources previously acquired. After this call, Python's state " +"will be the same as it was prior to the corresponding :c:func:" +"`PyGILState_Ensure` call (but generally this state will be unknown to the " +"caller, hence the use of the GILState API)." +msgstr "" + +#: c-api/init.rst:988 +msgid "" +"Every call to :c:func:`PyGILState_Ensure` must be matched by a call to :c:" +"func:`PyGILState_Release` on the same thread." +msgstr "" + +#: c-api/init.rst:994 +msgid "" +"Get the current thread state for this thread. May return ``NULL`` if no " +"GILState API has been used on the current thread. Note that the main thread " +"always has such a thread-state, even if no auto-thread-state call has been " +"made on the main thread. This is mainly a helper/diagnostic function." +msgstr "" + +#: c-api/init.rst:1002 +msgid "" +"Return ``1`` if the current thread is holding the GIL and ``0`` otherwise. " +"This function can be called from any thread at any time. Only if it has had " +"its Python thread state initialized and currently is holding the GIL will it " +"return ``1``. This is mainly a helper/diagnostic function. It can be useful " +"for example in callback contexts or memory allocation functions when knowing " +"that the GIL is locked can allow the caller to perform sensitive actions or " +"otherwise behave differently." +msgstr "" + +#: c-api/init.rst:1014 +msgid "" +"The following macros are normally used without a trailing semicolon; look " +"for example usage in the Python source distribution." +msgstr "" + +#: c-api/init.rst:1020 +msgid "" +"This macro expands to ``{ PyThreadState *_save; _save = PyEval_SaveThread();" +"``. Note that it contains an opening brace; it must be matched with a " +"following :c:macro:`Py_END_ALLOW_THREADS` macro. See above for further " +"discussion of this macro." +msgstr "" + +#: c-api/init.rst:1028 +msgid "" +"This macro expands to ``PyEval_RestoreThread(_save); }``. Note that it " +"contains a closing brace; it must be matched with an earlier :c:macro:" +"`Py_BEGIN_ALLOW_THREADS` macro. See above for further discussion of this " +"macro." +msgstr "" + +#: c-api/init.rst:1036 +msgid "" +"This macro expands to ``PyEval_RestoreThread(_save);``: it is equivalent to :" +"c:macro:`Py_END_ALLOW_THREADS` without the closing brace." +msgstr "" + +#: c-api/init.rst:1042 +msgid "" +"This macro expands to ``_save = PyEval_SaveThread();``: it is equivalent to :" +"c:macro:`Py_BEGIN_ALLOW_THREADS` without the opening brace and variable " +"declaration." +msgstr "" + +#: c-api/init.rst:1048 +#, fuzzy +msgid "Low-level API" +msgstr "Bibliothèques de bas-niveau" + +#: c-api/init.rst:1050 +msgid "" +"All of the following functions must be called after :c:func:`Py_Initialize`." +msgstr "" + +#: c-api/init.rst:1052 +msgid ":c:func:`Py_Initialize()` now initializes the :term:`GIL`." +msgstr "" + +#: c-api/init.rst:1058 +msgid "" +"Create a new interpreter state object. The global interpreter lock need not " +"be held, but may be held if it is necessary to serialize calls to this " +"function." +msgstr "" + +#: c-api/init.rst:1062 +msgid "" +"Raises an :ref:`auditing event ` ``cpython." +"PyInterpreterState_New`` with no arguments." +msgstr "" + +#: c-api/init.rst:1067 +msgid "" +"Reset all information in an interpreter state object. The global " +"interpreter lock must be held." +msgstr "" + +#: c-api/init.rst:1070 +msgid "" +"Raises an :ref:`auditing event ` ``cpython." +"PyInterpreterState_Clear`` with no arguments." +msgstr "" + +#: c-api/init.rst:1075 +msgid "" +"Destroy an interpreter state object. The global interpreter lock need not " +"be held. The interpreter state must have been reset with a previous call " +"to :c:func:`PyInterpreterState_Clear`." +msgstr "" + +#: c-api/init.rst:1082 +msgid "" +"Create a new thread state object belonging to the given interpreter object. " +"The global interpreter lock need not be held, but may be held if it is " +"necessary to serialize calls to this function." +msgstr "" + +#: c-api/init.rst:1089 +msgid "" +"Reset all information in a thread state object. The global interpreter lock " +"must be held." +msgstr "" + +#: c-api/init.rst:1092 +msgid "" +"This function now calls the :c:member:`PyThreadState.on_delete` callback. " +"Previously, that happened in :c:func:`PyThreadState_Delete`." +msgstr "" + +#: c-api/init.rst:1099 +msgid "" +"Destroy a thread state object. The global interpreter lock need not be " +"held. The thread state must have been reset with a previous call to :c:func:" +"`PyThreadState_Clear`." +msgstr "" + +#: c-api/init.rst:1106 +msgid "" +"Destroy the current thread state and release the global interpreter lock. " +"Like :c:func:`PyThreadState_Delete`, the global interpreter lock need not be " +"held. The thread state must have been reset with a previous call to :c:func:" +"`PyThreadState_Clear`." +msgstr "" + +#: c-api/init.rst:1114 +msgid "Get the current frame of the Python thread state *tstate*." +msgstr "" + +#: c-api/init.rst:1116 +msgid "" +"Return a :term:`strong reference`. Return ``NULL`` if no frame is currently " +"executing." +msgstr "" + +#: c-api/init.rst:1119 +msgid "See also :c:func:`PyEval_GetFrame`." +msgstr "" + +#: c-api/init.rst:1130 c-api/init.rst:1139 +msgid "*tstate* must not be ``NULL``." +msgstr "" + +#: c-api/init.rst:1128 +msgid "" +"Get the unique thread state identifier of the Python thread state *tstate*." +msgstr "" + +#: c-api/init.rst:1137 +msgid "Get the interpreter of the Python thread state *tstate*." +msgstr "" + +#: c-api/init.rst:1146 +msgid "Get the current interpreter." +msgstr "" + +#: c-api/init.rst:1148 +msgid "" +"Issue a fatal error if there no current Python thread state or no current " +"interpreter. It cannot return NULL." +msgstr "" + +#: c-api/init.rst:1161 +msgid "The caller must hold the GIL." +msgstr "" + +#: c-api/init.rst:1158 +msgid "" +"Return the interpreter's unique ID. If there was any error in doing so then " +"``-1`` is returned and an error is set." +msgstr "" + +#: c-api/init.rst:1168 +msgid "" +"Return a dictionary in which interpreter-specific data may be stored. If " +"this function returns ``NULL`` then no exception has been raised and the " +"caller should assume no interpreter-specific dict is available." +msgstr "" + +#: c-api/init.rst:1172 +msgid "" +"This is not a replacement for :c:func:`PyModule_GetState()`, which " +"extensions should use to store interpreter-specific state information." +msgstr "" + +#: c-api/init.rst:1179 +msgid "Type of a frame evaluation function." +msgstr "" + +#: c-api/init.rst:1181 +msgid "" +"The *throwflag* parameter is used by the ``throw()`` method of generators: " +"if non-zero, handle the current exception." +msgstr "" + +#: c-api/init.rst:1184 +msgid "The function now takes a *tstate* parameter." +msgstr "" + +#: c-api/init.rst:1189 +msgid "Get the frame evaluation function." +msgstr "" + +#: c-api/init.rst:1199 +msgid "See the :pep:`523` \"Adding a frame evaluation API to CPython\"." +msgstr "" + +#: c-api/init.rst:1197 +msgid "Set the frame evaluation function." +msgstr "" + +#: c-api/init.rst:1206 +msgid "" +"Return a dictionary in which extensions can store thread-specific state " +"information. Each extension should use a unique key to use to store state " +"in the dictionary. It is okay to call this function when no current thread " +"state is available. If this function returns ``NULL``, no exception has been " +"raised and the caller should assume no current thread state is available." +msgstr "" + +#: c-api/init.rst:1215 +msgid "" +"Asynchronously raise an exception in a thread. The *id* argument is the " +"thread id of the target thread; *exc* is the exception object to be raised. " +"This function does not steal any references to *exc*. To prevent naive " +"misuse, you must write your own C extension to call this. Must be called " +"with the GIL held. Returns the number of thread states modified; this is " +"normally one, but will be zero if the thread id isn't found. If *exc* is :" +"const:`NULL`, the pending exception (if any) for the thread is cleared. This " +"raises no exceptions." +msgstr "" + +#: c-api/init.rst:1223 +msgid "" +"The type of the *id* parameter changed from :c:expr:`long` to :c:expr:" +"`unsigned long`." +msgstr "" + +#: c-api/init.rst:1229 +msgid "" +"Acquire the global interpreter lock and set the current thread state to " +"*tstate*, which must not be ``NULL``. The lock must have been created " +"earlier. If this thread already has the lock, deadlock ensues." +msgstr "" + +#: c-api/init.rst:1278 +msgid "" +"Updated to be consistent with :c:func:`PyEval_RestoreThread`, :c:func:" +"`Py_END_ALLOW_THREADS`, and :c:func:`PyGILState_Ensure`, and terminate the " +"current thread if called while the interpreter is finalizing." +msgstr "" + +#: c-api/init.rst:1245 +msgid "" +":c:func:`PyEval_RestoreThread` is a higher-level function which is always " +"available (even when threads have not been initialized)." +msgstr "" + +#: c-api/init.rst:1251 +msgid "" +"Reset the current thread state to ``NULL`` and release the global " +"interpreter lock. The lock must have been created earlier and must be held " +"by the current thread. The *tstate* argument, which must not be ``NULL``, " +"is only used to check that it represents the current thread state --- if it " +"isn't, a fatal error is reported." +msgstr "" + +#: c-api/init.rst:1257 +msgid "" +":c:func:`PyEval_SaveThread` is a higher-level function which is always " +"available (even when threads have not been initialized)." +msgstr "" + +#: c-api/init.rst:1263 +msgid "" +"Acquire the global interpreter lock. The lock must have been created " +"earlier. If this thread already has the lock, a deadlock ensues." +msgstr "" + +#: c-api/init.rst:1266 +msgid "" +"This function does not update the current thread state. Please use :c:func:" +"`PyEval_RestoreThread` or :c:func:`PyEval_AcquireThread` instead." +msgstr "" + +#: c-api/init.rst:1286 +msgid "" +"Release the global interpreter lock. The lock must have been created " +"earlier." +msgstr "" + +#: c-api/init.rst:1288 +msgid "" +"This function does not update the current thread state. Please use :c:func:" +"`PyEval_SaveThread` or :c:func:`PyEval_ReleaseThread` instead." +msgstr "" + +#: c-api/init.rst:1297 +msgid "Sub-interpreter support" +msgstr "" + +#: c-api/init.rst:1299 +msgid "" +"While in most uses, you will only embed a single Python interpreter, there " +"are cases where you need to create several independent interpreters in the " +"same process and perhaps even in the same thread. Sub-interpreters allow you " +"to do that." +msgstr "" + +#: c-api/init.rst:1304 +msgid "" +"The \"main\" interpreter is the first one created when the runtime " +"initializes. It is usually the only Python interpreter in a process. Unlike " +"sub-interpreters, the main interpreter has unique process-global " +"responsibilities like signal handling. It is also responsible for execution " +"during runtime initialization and is usually the active interpreter during " +"runtime finalization. The :c:func:`PyInterpreterState_Main` function " +"returns a pointer to its state." +msgstr "" + +#: c-api/init.rst:1311 +msgid "" +"You can switch between sub-interpreters using the :c:func:" +"`PyThreadState_Swap` function. You can create and destroy them using the " +"following functions:" +msgstr "" + +#: c-api/init.rst:1325 +msgid "" +"Create a new sub-interpreter. This is an (almost) totally separate " +"environment for the execution of Python code. In particular, the new " +"interpreter has separate, independent versions of all imported modules, " +"including the fundamental modules :mod:`builtins`, :mod:`__main__` and :mod:" +"`sys`. The table of loaded modules (``sys.modules``) and the module search " +"path (``sys.path``) are also separate. The new environment has no ``sys." +"argv`` variable. It has new standard I/O stream file objects ``sys.stdin``, " +"``sys.stdout`` and ``sys.stderr`` (however these refer to the same " +"underlying file descriptors)." +msgstr "" + +#: c-api/init.rst:1335 +msgid "" +"The return value points to the first thread state created in the new sub-" +"interpreter. This thread state is made in the current thread state. Note " +"that no actual thread is created; see the discussion of thread states " +"below. If creation of the new interpreter is unsuccessful, ``NULL`` is " +"returned; no exception is set since the exception state is stored in the " +"current thread state and there may not be a current thread state. (Like all " +"other Python/C API functions, the global interpreter lock must be held " +"before calling this function and is still held when it returns; however, " +"unlike most other Python/C API functions, there needn't be a current thread " +"state on entry.)" +msgstr "" + +#: c-api/init.rst:1350 +msgid "Extension modules are shared between (sub-)interpreters as follows:" +msgstr "" + +#: c-api/init.rst:1352 +msgid "" +"For modules using multi-phase initialization, e.g. :c:func:" +"`PyModule_FromDefAndSpec`, a separate module object is created and " +"initialized for each interpreter. Only C-level static and global variables " +"are shared between these module objects." +msgstr "" + +#: c-api/init.rst:1358 +msgid "" +"For modules using single-phase initialization, e.g. :c:func:" +"`PyModule_Create`, the first time a particular extension is imported, it is " +"initialized normally, and a (shallow) copy of its module's dictionary is " +"squirreled away. When the same extension is imported by another " +"(sub-)interpreter, a new module is initialized and filled with the contents " +"of this copy; the extension's ``init`` function is not called. Objects in " +"the module's dictionary thus end up shared across (sub-)interpreters, which " +"might cause unwanted behavior (see `Bugs and caveats`_ below)." +msgstr "" + +#: c-api/init.rst:1369 +msgid "" +"Note that this is different from what happens when an extension is imported " +"after the interpreter has been completely re-initialized by calling :c:func:" +"`Py_FinalizeEx` and :c:func:`Py_Initialize`; in that case, the extension's " +"``initmodule`` function *is* called again. As with multi-phase " +"initialization, this means that only C-level static and global variables are " +"shared between these modules." +msgstr "" + +#: c-api/init.rst:1383 +msgid "" +"Destroy the (sub-)interpreter represented by the given thread state. The " +"given thread state must be the current thread state. See the discussion of " +"thread states below. When the call returns, the current thread state is " +"``NULL``. All thread states associated with this interpreter are " +"destroyed. (The global interpreter lock must be held before calling this " +"function and is still held when it returns.) :c:func:`Py_FinalizeEx` will " +"destroy all sub-interpreters that haven't been explicitly destroyed at that " +"point." +msgstr "" + +#: c-api/init.rst:1393 +msgid "Bugs and caveats" +msgstr "" + +#: c-api/init.rst:1395 +msgid "" +"Because sub-interpreters (and the main interpreter) are part of the same " +"process, the insulation between them isn't perfect --- for example, using " +"low-level file operations like :func:`os.close` they can (accidentally or " +"maliciously) affect each other's open files. Because of the way extensions " +"are shared between (sub-)interpreters, some extensions may not work " +"properly; this is especially likely when using single-phase initialization " +"or (static) global variables. It is possible to insert objects created in " +"one sub-interpreter into a namespace of another (sub-)interpreter; this " +"should be avoided if possible." +msgstr "" + +#: c-api/init.rst:1405 +msgid "" +"Special care should be taken to avoid sharing user-defined functions, " +"methods, instances or classes between sub-interpreters, since import " +"operations executed by such objects may affect the wrong (sub-)interpreter's " +"dictionary of loaded modules. It is equally important to avoid sharing " +"objects from which the above are reachable." +msgstr "" + +#: c-api/init.rst:1411 +msgid "" +"Also note that combining this functionality with ``PyGILState_*`` APIs is " +"delicate, because these APIs assume a bijection between Python thread states " +"and OS-level threads, an assumption broken by the presence of sub-" +"interpreters. It is highly recommended that you don't switch sub-" +"interpreters between a pair of matching :c:func:`PyGILState_Ensure` and :c:" +"func:`PyGILState_Release` calls. Furthermore, extensions (such as :mod:" +"`ctypes`) using these APIs to allow calling of Python code from non-Python " +"created threads will probably be broken when using sub-interpreters." +msgstr "" + +#: c-api/init.rst:1422 +msgid "Asynchronous Notifications" +msgstr "" + +#: c-api/init.rst:1424 +msgid "" +"A mechanism is provided to make asynchronous notifications to the main " +"interpreter thread. These notifications take the form of a function pointer " +"and a void pointer argument." +msgstr "" + +#: c-api/init.rst:1433 +msgid "" +"Schedule a function to be called from the main interpreter thread. On " +"success, ``0`` is returned and *func* is queued for being called in the main " +"thread. On failure, ``-1`` is returned without setting any exception." +msgstr "" + +#: c-api/init.rst:1437 +msgid "" +"When successfully queued, *func* will be *eventually* called from the main " +"interpreter thread with the argument *arg*. It will be called " +"asynchronously with respect to normally running Python code, but with both " +"these conditions met:" +msgstr "" + +#: c-api/init.rst:1442 +msgid "on a :term:`bytecode` boundary;" +msgstr "" + +#: c-api/init.rst:1443 +msgid "" +"with the main thread holding the :term:`global interpreter lock` (*func* can " +"therefore use the full C API)." +msgstr "" + +#: c-api/init.rst:1446 +msgid "" +"*func* must return ``0`` on success, or ``-1`` on failure with an exception " +"set. *func* won't be interrupted to perform another asynchronous " +"notification recursively, but it can still be interrupted to switch threads " +"if the global interpreter lock is released." +msgstr "" + +#: c-api/init.rst:1451 +msgid "" +"This function doesn't need a current thread state to run, and it doesn't " +"need the global interpreter lock." +msgstr "" + +#: c-api/init.rst:1454 +msgid "" +"To call this function in a subinterpreter, the caller must hold the GIL. " +"Otherwise, the function *func* can be scheduled to be called from the wrong " +"interpreter." +msgstr "" + +#: c-api/init.rst:1459 +msgid "" +"This is a low-level function, only useful for very special cases. There is " +"no guarantee that *func* will be called as quick as possible. If the main " +"thread is busy executing a system call, *func* won't be called before the " +"system call returns. This function is generally **not** suitable for " +"calling Python code from arbitrary C threads. Instead, use the :ref:" +"`PyGILState API`." +msgstr "" + +#: c-api/init.rst:1466 +msgid "" +"If this function is called in a subinterpreter, the function *func* is now " +"scheduled to be called from the subinterpreter, rather than being called " +"from the main interpreter. Each subinterpreter now has its own list of " +"scheduled calls." +msgstr "" + +#: c-api/init.rst:1477 +msgid "Profiling and Tracing" +msgstr "" + +#: c-api/init.rst:1482 +msgid "" +"The Python interpreter provides some low-level support for attaching " +"profiling and execution tracing facilities. These are used for profiling, " +"debugging, and coverage analysis tools." +msgstr "" + +#: c-api/init.rst:1486 +msgid "" +"This C interface allows the profiling or tracing code to avoid the overhead " +"of calling through Python-level callable objects, making a direct C function " +"call instead. The essential attributes of the facility have not changed; " +"the interface allows trace functions to be installed per-thread, and the " +"basic events reported to the trace function are the same as had been " +"reported to the Python-level trace functions in previous versions." +msgstr "" + +#: c-api/init.rst:1496 +msgid "" +"The type of the trace function registered using :c:func:`PyEval_SetProfile` " +"and :c:func:`PyEval_SetTrace`. The first parameter is the object passed to " +"the registration function as *obj*, *frame* is the frame object to which the " +"event pertains, *what* is one of the constants :const:`PyTrace_CALL`, :const:" +"`PyTrace_EXCEPTION`, :const:`PyTrace_LINE`, :const:`PyTrace_RETURN`, :const:" +"`PyTrace_C_CALL`, :const:`PyTrace_C_EXCEPTION`, :const:`PyTrace_C_RETURN`, " +"or :const:`PyTrace_OPCODE`, and *arg* depends on the value of *what*:" +msgstr "" + +#: c-api/init.rst:1505 +msgid "Value of *what*" +msgstr "" + +#: c-api/init.rst:1505 +msgid "Meaning of *arg*" +msgstr "" + +#: c-api/init.rst:1507 +msgid ":const:`PyTrace_CALL`" +msgstr ":const:`PyTrace_CALL`" + +#: c-api/init.rst:1512 c-api/init.rst:1523 +msgid "Always :c:data:`Py_None`." +msgstr "" + +#: c-api/init.rst:1509 +msgid ":const:`PyTrace_EXCEPTION`" +msgstr ":const:`PyTrace_EXCEPTION`" + +#: c-api/init.rst:1509 +msgid "Exception information as returned by :func:`sys.exc_info`." +msgstr "" + +#: c-api/init.rst:1512 +msgid ":const:`PyTrace_LINE`" +msgstr ":const:`PyTrace_LINE`" + +#: c-api/init.rst:1514 +msgid ":const:`PyTrace_RETURN`" +msgstr ":const:`PyTrace_RETURN`" + +#: c-api/init.rst:1514 +msgid "" +"Value being returned to the caller, or ``NULL`` if caused by an exception." +msgstr "" + +#: c-api/init.rst:1517 +msgid ":const:`PyTrace_C_CALL`" +msgstr ":const:`PyTrace_C_CALL`" + +#: c-api/init.rst:1519 c-api/init.rst:1521 +msgid "Function object being called." +msgstr "" + +#: c-api/init.rst:1519 +msgid ":const:`PyTrace_C_EXCEPTION`" +msgstr ":const:`PyTrace_C_EXCEPTION`" + +#: c-api/init.rst:1521 +msgid ":const:`PyTrace_C_RETURN`" +msgstr ":const:`PyTrace_C_RETURN`" + +#: c-api/init.rst:1523 +msgid ":const:`PyTrace_OPCODE`" +msgstr ":const:`PyTrace_OPCODE`" + +#: c-api/init.rst:1528 +msgid "" +"The value of the *what* parameter to a :c:type:`Py_tracefunc` function when " +"a new call to a function or method is being reported, or a new entry into a " +"generator. Note that the creation of the iterator for a generator function " +"is not reported as there is no control transfer to the Python bytecode in " +"the corresponding frame." +msgstr "" + +#: c-api/init.rst:1537 +msgid "" +"The value of the *what* parameter to a :c:type:`Py_tracefunc` function when " +"an exception has been raised. The callback function is called with this " +"value for *what* when after any bytecode is processed after which the " +"exception becomes set within the frame being executed. The effect of this " +"is that as exception propagation causes the Python stack to unwind, the " +"callback is called upon return to each frame as the exception propagates. " +"Only trace functions receives these events; they are not needed by the " +"profiler." +msgstr "" + +#: c-api/init.rst:1548 +msgid "" +"The value passed as the *what* parameter to a :c:type:`Py_tracefunc` " +"function (but not a profiling function) when a line-number event is being " +"reported. It may be disabled for a frame by setting :attr:`f_trace_lines` to " +"*0* on that frame." +msgstr "" + +#: c-api/init.rst:1555 +msgid "" +"The value for the *what* parameter to :c:type:`Py_tracefunc` functions when " +"a call is about to return." +msgstr "" + +#: c-api/init.rst:1561 +msgid "" +"The value for the *what* parameter to :c:type:`Py_tracefunc` functions when " +"a C function is about to be called." +msgstr "" + +#: c-api/init.rst:1567 +msgid "" +"The value for the *what* parameter to :c:type:`Py_tracefunc` functions when " +"a C function has raised an exception." +msgstr "" + +#: c-api/init.rst:1573 +msgid "" +"The value for the *what* parameter to :c:type:`Py_tracefunc` functions when " +"a C function has returned." +msgstr "" + +#: c-api/init.rst:1579 +msgid "" +"The value for the *what* parameter to :c:type:`Py_tracefunc` functions (but " +"not profiling functions) when a new opcode is about to be executed. This " +"event is not emitted by default: it must be explicitly requested by setting :" +"attr:`f_trace_opcodes` to *1* on the frame." +msgstr "" + +#: c-api/init.rst:1587 +msgid "" +"Set the profiler function to *func*. The *obj* parameter is passed to the " +"function as its first parameter, and may be any Python object, or ``NULL``. " +"If the profile function needs to maintain state, using a different value for " +"*obj* for each thread provides a convenient and thread-safe place to store " +"it. The profile function is called for all monitored events except :const:" +"`PyTrace_LINE` :const:`PyTrace_OPCODE` and :const:`PyTrace_EXCEPTION`." +msgstr "" + +#: c-api/init.rst:1606 +msgid "The caller must hold the :term:`GIL`." +msgstr "" + +#: c-api/init.rst:1599 +msgid "" +"Set the tracing function to *func*. This is similar to :c:func:" +"`PyEval_SetProfile`, except the tracing function does receive line-number " +"events and per-opcode events, but does not receive any event related to C " +"function objects being called. Any trace function registered using :c:func:" +"`PyEval_SetTrace` will not receive :const:`PyTrace_C_CALL`, :const:" +"`PyTrace_C_EXCEPTION` or :const:`PyTrace_C_RETURN` as a value for the *what* " +"parameter." +msgstr "" + +#: c-api/init.rst:1612 +msgid "Advanced Debugger Support" +msgstr "Support avancé du débogueur" + +#: c-api/init.rst:1617 +msgid "" +"These functions are only intended to be used by advanced debugging tools." +msgstr "" + +#: c-api/init.rst:1622 +msgid "" +"Return the interpreter state object at the head of the list of all such " +"objects." +msgstr "" + +#: c-api/init.rst:1627 +msgid "Return the main interpreter state object." +msgstr "" + +#: c-api/init.rst:1632 +msgid "" +"Return the next interpreter state object after *interp* from the list of all " +"such objects." +msgstr "" + +#: c-api/init.rst:1638 +msgid "" +"Return the pointer to the first :c:type:`PyThreadState` object in the list " +"of threads associated with the interpreter *interp*." +msgstr "" + +#: c-api/init.rst:1644 +msgid "" +"Return the next thread state object after *tstate* from the list of all such " +"objects belonging to the same :c:type:`PyInterpreterState` object." +msgstr "" + +#: c-api/init.rst:1651 +msgid "Thread Local Storage Support" +msgstr "" + +#: c-api/init.rst:1655 +msgid "" +"The Python interpreter provides low-level support for thread-local storage " +"(TLS) which wraps the underlying native TLS implementation to support the " +"Python-level thread local storage API (:class:`threading.local`). The " +"CPython C level APIs are similar to those offered by pthreads and Windows: " +"use a thread key and functions to associate a :c:expr:`void*` value per " +"thread." +msgstr "" + +#: c-api/init.rst:1662 +msgid "" +"The GIL does *not* need to be held when calling these functions; they supply " +"their own locking." +msgstr "" + +#: c-api/init.rst:1665 +msgid "" +"Note that :file:`Python.h` does not include the declaration of the TLS APIs, " +"you need to include :file:`pythread.h` to use thread-local storage." +msgstr "" + +#: c-api/init.rst:1669 +msgid "" +"None of these API functions handle memory management on behalf of the :c:" +"expr:`void*` values. You need to allocate and deallocate them yourself. If " +"the :c:expr:`void*` values happen to be :c:expr:`PyObject*`, these functions " +"don't do refcount operations on them either." +msgstr "" + +#: c-api/init.rst:1677 +msgid "Thread Specific Storage (TSS) API" +msgstr "" + +#: c-api/init.rst:1679 +msgid "" +"TSS API is introduced to supersede the use of the existing TLS API within " +"the CPython interpreter. This API uses a new type :c:type:`Py_tss_t` " +"instead of :c:expr:`int` to represent thread keys." +msgstr "" + +#: c-api/init.rst:1685 +msgid "\"A New C-API for Thread-Local Storage in CPython\" (:pep:`539`)" +msgstr "" + +#: c-api/init.rst:1690 +msgid "" +"This data structure represents the state of a thread key, the definition of " +"which may depend on the underlying TLS implementation, and it has an " +"internal field representing the key's initialization state. There are no " +"public members in this structure." +msgstr "" + +#: c-api/init.rst:1695 +msgid "" +"When :ref:`Py_LIMITED_API ` is not defined, static allocation of " +"this type by :c:macro:`Py_tss_NEEDS_INIT` is allowed." +msgstr "" + +#: c-api/init.rst:1701 +msgid "" +"This macro expands to the initializer for :c:type:`Py_tss_t` variables. Note " +"that this macro won't be defined with :ref:`Py_LIMITED_API `." +msgstr "" + +#: c-api/init.rst:1706 +msgid "Dynamic Allocation" +msgstr "" + +#: c-api/init.rst:1708 +msgid "" +"Dynamic allocation of the :c:type:`Py_tss_t`, required in extension modules " +"built with :ref:`Py_LIMITED_API `, where static allocation of this " +"type is not possible due to its implementation being opaque at build time." +msgstr "" + +#: c-api/init.rst:1715 +msgid "" +"Return a value which is the same state as a value initialized with :c:macro:" +"`Py_tss_NEEDS_INIT`, or ``NULL`` in the case of dynamic allocation failure." +msgstr "" + +#: c-api/init.rst:1722 +msgid "" +"Free the given *key* allocated by :c:func:`PyThread_tss_alloc`, after first " +"calling :c:func:`PyThread_tss_delete` to ensure any associated thread locals " +"have been unassigned. This is a no-op if the *key* argument is ``NULL``." +msgstr "" + +#: c-api/init.rst:1728 +msgid "" +"A freed key becomes a dangling pointer. You should reset the key to `NULL`." +msgstr "" + +#: c-api/init.rst:1733 +msgid "Methods" +msgstr "Méthodes" + +#: c-api/init.rst:1735 +msgid "" +"The parameter *key* of these functions must not be ``NULL``. Moreover, the " +"behaviors of :c:func:`PyThread_tss_set` and :c:func:`PyThread_tss_get` are " +"undefined if the given :c:type:`Py_tss_t` has not been initialized by :c:" +"func:`PyThread_tss_create`." +msgstr "" + +#: c-api/init.rst:1743 +msgid "" +"Return a non-zero value if the given :c:type:`Py_tss_t` has been initialized " +"by :c:func:`PyThread_tss_create`." +msgstr "" + +#: c-api/init.rst:1749 +msgid "" +"Return a zero value on successful initialization of a TSS key. The behavior " +"is undefined if the value pointed to by the *key* argument is not " +"initialized by :c:macro:`Py_tss_NEEDS_INIT`. This function can be called " +"repeatedly on the same key -- calling it on an already initialized key is a " +"no-op and immediately returns success." +msgstr "" + +#: c-api/init.rst:1758 +msgid "" +"Destroy a TSS key to forget the values associated with the key across all " +"threads, and change the key's initialization state to uninitialized. A " +"destroyed key is able to be initialized again by :c:func:" +"`PyThread_tss_create`. This function can be called repeatedly on the same " +"key -- calling it on an already destroyed key is a no-op." +msgstr "" + +#: c-api/init.rst:1767 +msgid "" +"Return a zero value to indicate successfully associating a :c:expr:`void*` " +"value with a TSS key in the current thread. Each thread has a distinct " +"mapping of the key to a :c:expr:`void*` value." +msgstr "" + +#: c-api/init.rst:1774 +msgid "" +"Return the :c:expr:`void*` value associated with a TSS key in the current " +"thread. This returns ``NULL`` if no value is associated with the key in the " +"current thread." +msgstr "" + +#: c-api/init.rst:1782 +msgid "Thread Local Storage (TLS) API" +msgstr "" + +#: c-api/init.rst:1784 +msgid "" +"This API is superseded by :ref:`Thread Specific Storage (TSS) API `." +msgstr "" + +#: c-api/init.rst:1789 +msgid "" +"This version of the API does not support platforms where the native TLS key " +"is defined in a way that cannot be safely cast to ``int``. On such " +"platforms, :c:func:`PyThread_create_key` will return immediately with a " +"failure status, and the other TLS functions will all be no-ops on such " +"platforms." +msgstr "" + +#: c-api/init.rst:1794 +msgid "" +"Due to the compatibility problem noted above, this version of the API should " +"not be used in new code." +msgstr "" diff --git a/c-api/init_config.po b/c-api/init_config.po new file mode 100644 index 0000000000..5bbbfd3b49 --- /dev/null +++ b/c-api/init_config.po @@ -0,0 +1,1934 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-22 22:57+0100\n" +"PO-Revision-Date: 2019-09-04 11:42+0200\n" +"Last-Translator: FULL NAME \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" + +#: c-api/init_config.rst:7 +msgid "Python Initialization Configuration" +msgstr "" + +#: c-api/init_config.rst:11 +msgid "" +"Python can be initialized with :c:func:`Py_InitializeFromConfig` and the :c:" +"type:`PyConfig` structure. It can be preinitialized with :c:func:" +"`Py_PreInitialize` and the :c:type:`PyPreConfig` structure." +msgstr "" + +#: c-api/init_config.rst:15 +msgid "There are two kinds of configuration:" +msgstr "" + +#: c-api/init_config.rst:17 +msgid "" +"The :ref:`Python Configuration ` can be used to build a " +"customized Python which behaves as the regular Python. For example, " +"environment variables and command line arguments are used to configure " +"Python." +msgstr "" + +#: c-api/init_config.rst:22 +msgid "" +"The :ref:`Isolated Configuration ` can be used to embed " +"Python into an application. It isolates Python from the system. For example, " +"environment variables are ignored, the LC_CTYPE locale is left unchanged and " +"no signal handler is registered." +msgstr "" + +#: c-api/init_config.rst:27 +msgid "" +"The :c:func:`Py_RunMain` function can be used to write a customized Python " +"program." +msgstr "" + +#: c-api/init_config.rst:30 +msgid "" +"See also :ref:`Initialization, Finalization, and Threads `." +msgstr "" + +#: c-api/init_config.rst:33 +msgid ":pep:`587` \"Python Initialization Configuration\"." +msgstr "" + +#: c-api/init_config.rst:37 +msgid "Example" +msgstr "Exemple" + +#: c-api/init_config.rst:39 +msgid "Example of customized Python always running in isolated mode::" +msgstr "" + +#: c-api/init_config.rst:76 +msgid "PyWideStringList" +msgstr "" + +#: c-api/init_config.rst:80 +msgid "List of ``wchar_t*`` strings." +msgstr "" + +#: c-api/init_config.rst:82 +msgid "" +"If *length* is non-zero, *items* must be non-``NULL`` and all strings must " +"be non-``NULL``." +msgstr "" + +#: c-api/init_config.rst:85 +#, fuzzy +msgid "Methods:" +msgstr "Méthodes" + +#: c-api/init_config.rst:89 +msgid "Append *item* to *list*." +msgstr "" + +#: c-api/init_config.rst:102 +msgid "Python must be preinitialized to call this function." +msgstr "" + +#: c-api/init_config.rst:95 +msgid "Insert *item* into *list* at *index*." +msgstr "" + +#: c-api/init_config.rst:97 +msgid "" +"If *index* is greater than or equal to *list* length, append *item* to " +"*list*." +msgstr "" + +#: c-api/init_config.rst:100 +msgid "*index* must be greater than or equal to 0." +msgstr "" + +#: c-api/init_config.rst:124 c-api/init_config.rst:519 +msgid "Structure fields:" +msgstr "" + +#: c-api/init_config.rst:108 +msgid "List length." +msgstr "" + +#: c-api/init_config.rst:112 +msgid "List items." +msgstr "" + +#: c-api/init_config.rst:115 +msgid "PyStatus" +msgstr "" + +#: c-api/init_config.rst:119 +msgid "" +"Structure to store an initialization function status: success, error or exit." +msgstr "" + +#: c-api/init_config.rst:122 +msgid "For an error, it can store the C function name which created the error." +msgstr "" + +#: c-api/init_config.rst:128 +msgid "Exit code. Argument passed to ``exit()``." +msgstr "" + +#: c-api/init_config.rst:132 +msgid "Error message." +msgstr "" + +#: c-api/init_config.rst:136 +msgid "Name of the function which created an error, can be ``NULL``." +msgstr "" + +#: c-api/init_config.rst:138 +msgid "Functions to create a status:" +msgstr "" + +#: c-api/init_config.rst:142 +msgid "Success." +msgstr "" + +#: c-api/init_config.rst:146 +msgid "Initialization error with a message." +msgstr "" + +#: c-api/init_config.rst:148 +msgid "*err_msg* must not be ``NULL``." +msgstr "" + +#: c-api/init_config.rst:152 +msgid "Memory allocation failure (out of memory)." +msgstr "" + +#: c-api/init_config.rst:156 +msgid "Exit Python with the specified exit code." +msgstr "" + +#: c-api/init_config.rst:158 +msgid "Functions to handle a status:" +msgstr "" + +#: c-api/init_config.rst:162 +msgid "" +"Is the status an error or an exit? If true, the exception must be handled; " +"by calling :c:func:`Py_ExitStatusException` for example." +msgstr "" + +#: c-api/init_config.rst:167 +msgid "Is the result an error?" +msgstr "" + +#: c-api/init_config.rst:171 +msgid "Is the result an exit?" +msgstr "" + +#: c-api/init_config.rst:175 +msgid "" +"Call ``exit(exitcode)`` if *status* is an exit. Print the error message and " +"exit with a non-zero exit code if *status* is an error. Must only be called " +"if ``PyStatus_Exception(status)`` is non-zero." +msgstr "" + +#: c-api/init_config.rst:180 +msgid "" +"Internally, Python uses macros which set ``PyStatus.func``, whereas " +"functions to create a status set ``func`` to ``NULL``." +msgstr "" + +#: c-api/init_config.rst:183 +msgid "Example::" +msgstr "Exemple ::" + +#: c-api/init_config.rst:207 +msgid "PyPreConfig" +msgstr "" + +#: c-api/init_config.rst:211 +msgid "Structure used to preinitialize Python." +msgstr "" + +#: c-api/init_config.rst:213 +msgid "Function to initialize a preconfiguration:" +msgstr "" + +#: c-api/init_config.rst:217 +msgid "" +"Initialize the preconfiguration with :ref:`Python Configuration `." +msgstr "" + +#: c-api/init_config.rst:222 +msgid "" +"Initialize the preconfiguration with :ref:`Isolated Configuration `." +msgstr "" + +#: c-api/init_config.rst:229 +msgid "Name of the Python memory allocators:" +msgstr "" + +#: c-api/init_config.rst:231 +msgid "" +"``PYMEM_ALLOCATOR_NOT_SET`` (``0``): don't change memory allocators (use " +"defaults)." +msgstr "" + +#: c-api/init_config.rst:233 +msgid "" +"``PYMEM_ALLOCATOR_DEFAULT`` (``1``): :ref:`default memory allocators " +"`." +msgstr "" + +#: c-api/init_config.rst:235 +msgid "" +"``PYMEM_ALLOCATOR_DEBUG`` (``2``): :ref:`default memory allocators ` with :ref:`debug hooks `." +msgstr "" + +#: c-api/init_config.rst:238 +msgid "``PYMEM_ALLOCATOR_MALLOC`` (``3``): use ``malloc()`` of the C library." +msgstr "" + +#: c-api/init_config.rst:239 +msgid "" +"``PYMEM_ALLOCATOR_MALLOC_DEBUG`` (``4``): force usage of ``malloc()`` with :" +"ref:`debug hooks `." +msgstr "" + +#: c-api/init_config.rst:241 +msgid "" +"``PYMEM_ALLOCATOR_PYMALLOC`` (``5``): :ref:`Python pymalloc memory allocator " +"`." +msgstr "" + +#: c-api/init_config.rst:243 +msgid "" +"``PYMEM_ALLOCATOR_PYMALLOC_DEBUG`` (``6``): :ref:`Python pymalloc memory " +"allocator ` with :ref:`debug hooks `." +msgstr "" + +#: c-api/init_config.rst:247 +msgid "" +"``PYMEM_ALLOCATOR_PYMALLOC`` and ``PYMEM_ALLOCATOR_PYMALLOC_DEBUG`` are not " +"supported if Python is :option:`configured using --without-pymalloc <--" +"without-pymalloc>`." +msgstr "" + +#: c-api/init_config.rst:251 +msgid "See :ref:`Memory Management `." +msgstr "" + +#: c-api/init_config.rst:253 +msgid "Default: ``PYMEM_ALLOCATOR_NOT_SET``." +msgstr "" + +#: c-api/init_config.rst:257 +msgid "Set the LC_CTYPE locale to the user preferred locale." +msgstr "" + +#: c-api/init_config.rst:259 +msgid "" +"If equals to 0, set :c:member:`~PyPreConfig.coerce_c_locale` and :c:member:" +"`~PyPreConfig.coerce_c_locale_warn` members to 0." +msgstr "" + +#: c-api/init_config.rst:273 +msgid "See the :term:`locale encoding`." +msgstr "" + +#: c-api/init_config.rst:319 c-api/init_config.rst:627 +msgid "Default: ``1`` in Python config, ``0`` in isolated config." +msgstr "" + +#: c-api/init_config.rst:268 +msgid "If equals to 2, coerce the C locale." +msgstr "" + +#: c-api/init_config.rst:270 +msgid "" +"If equals to 1, read the LC_CTYPE locale to decide if it should be coerced." +msgstr "" + +#: c-api/init_config.rst:281 +msgid "Default: ``-1`` in Python config, ``0`` in isolated config." +msgstr "" + +#: c-api/init_config.rst:279 +msgid "If non-zero, emit a warning if the C locale is coerced." +msgstr "" + +#: c-api/init_config.rst:285 +msgid "" +"If non-zero, enables the :ref:`Python Development Mode `: see :c:" +"member:`PyConfig.dev_mode`." +msgstr "" + +#: c-api/init_config.rst:633 c-api/init_config.rst:1093 +msgid "Default: ``-1`` in Python mode, ``0`` in isolated mode." +msgstr "" + +#: c-api/init_config.rst:292 +msgid "Isolated mode: see :c:member:`PyConfig.isolated`." +msgstr "" + +#: c-api/init_config.rst:797 +msgid "Default: ``0`` in Python mode, ``1`` in isolated mode." +msgstr "" + +#: c-api/init_config.rst:298 +msgid "If non-zero:" +msgstr "" + +#: c-api/init_config.rst:300 +msgid "Set :c:member:`PyPreConfig.utf8_mode` to ``0``," +msgstr "" + +#: c-api/init_config.rst:301 +msgid "Set :c:member:`PyConfig.filesystem_encoding` to ``\"mbcs\"``," +msgstr "" + +#: c-api/init_config.rst:302 +msgid "Set :c:member:`PyConfig.filesystem_errors` to ``\"replace\"``." +msgstr "" + +#: c-api/init_config.rst:304 +msgid "" +"Initialized the from :envvar:`PYTHONLEGACYWINDOWSFSENCODING` environment " +"variable value." +msgstr "" + +#: c-api/init_config.rst:810 +msgid "" +"Only available on Windows. ``#ifdef MS_WINDOWS`` macro can be used for " +"Windows specific code." +msgstr "" + +#: c-api/init_config.rst:588 c-api/init_config.rst:646 +#: c-api/init_config.rst:769 c-api/init_config.rst:813 +#: c-api/init_config.rst:880 c-api/init_config.rst:989 +#: c-api/init_config.rst:1057 c-api/init_config.rst:1128 +msgid "Default: ``0``." +msgstr "" + +#: c-api/init_config.rst:314 +msgid "" +"If non-zero, :c:func:`Py_PreInitializeFromArgs` and :c:func:" +"`Py_PreInitializeFromBytesArgs` parse their ``argv`` argument the same way " +"the regular Python parses command line arguments: see :ref:`Command Line " +"Arguments `." +msgstr "" + +#: c-api/init_config.rst:323 +msgid "" +"Use :ref:`environment variables `? See :c:member:`PyConfig." +"use_environment`." +msgstr "" + +#: c-api/init_config.rst:1102 +msgid "Default: ``1`` in Python config and ``0`` in isolated config." +msgstr "" + +#: c-api/init_config.rst:330 +msgid "If non-zero, enable the :ref:`Python UTF-8 Mode `." +msgstr "" + +#: c-api/init_config.rst:332 +msgid "" +"Set by the :option:`-X utf8 <-X>` command line option and the :envvar:" +"`PYTHONUTF8` environment variable." +msgstr "" + +#: c-api/init_config.rst:335 +msgid "Default: ``-1`` in Python config and ``0`` in isolated config." +msgstr "" + +#: c-api/init_config.rst:341 +msgid "Preinitialize Python with PyPreConfig" +msgstr "" + +#: c-api/init_config.rst:343 +msgid "The preinitialization of Python:" +msgstr "" + +#: c-api/init_config.rst:345 +msgid "Set the Python memory allocators (:c:member:`PyPreConfig.allocator`)" +msgstr "" + +#: c-api/init_config.rst:346 +msgid "Configure the LC_CTYPE locale (:term:`locale encoding`)" +msgstr "" + +#: c-api/init_config.rst:347 +msgid "" +"Set the :ref:`Python UTF-8 Mode ` (:c:member:`PyPreConfig." +"utf8_mode`)" +msgstr "" + +#: c-api/init_config.rst:350 +msgid "" +"The current preconfiguration (``PyPreConfig`` type) is stored in " +"``_PyRuntime.preconfig``." +msgstr "" + +#: c-api/init_config.rst:353 +msgid "Functions to preinitialize Python:" +msgstr "" + +#: c-api/init_config.rst:363 c-api/init_config.rst:372 +msgid "Preinitialize Python from *preconfig* preconfiguration." +msgstr "" + +#: c-api/init_config.rst:368 c-api/init_config.rst:377 +msgid "*preconfig* must not be ``NULL``." +msgstr "" + +#: c-api/init_config.rst:365 +msgid "" +"Parse *argv* command line arguments (bytes strings) if :c:member:" +"`~PyPreConfig.parse_argv` of *preconfig* is non-zero." +msgstr "" + +#: c-api/init_config.rst:374 +msgid "" +"Parse *argv* command line arguments (wide strings) if :c:member:" +"`~PyPreConfig.parse_argv` of *preconfig* is non-zero." +msgstr "" + +#: c-api/init_config.rst:1190 +msgid "" +"The caller is responsible to handle exceptions (error or exit) using :c:func:" +"`PyStatus_Exception` and :c:func:`Py_ExitStatusException`." +msgstr "" + +#: c-api/init_config.rst:382 +msgid "" +"For :ref:`Python Configuration ` (:c:func:" +"`PyPreConfig_InitPythonConfig`), if Python is initialized with command line " +"arguments, the command line arguments must also be passed to preinitialize " +"Python, since they have an effect on the pre-configuration like encodings. " +"For example, the :option:`-X utf8 <-X>` command line option enables the :ref:" +"`Python UTF-8 Mode `." +msgstr "" + +#: c-api/init_config.rst:389 +msgid "" +"``PyMem_SetAllocator()`` can be called after :c:func:`Py_PreInitialize` and " +"before :c:func:`Py_InitializeFromConfig` to install a custom memory " +"allocator. It can be called before :c:func:`Py_PreInitialize` if :c:member:" +"`PyPreConfig.allocator` is set to ``PYMEM_ALLOCATOR_NOT_SET``." +msgstr "" + +#: c-api/init_config.rst:394 +msgid "" +"Python memory allocation functions like :c:func:`PyMem_RawMalloc` must not " +"be used before the Python preinitialization, whereas calling directly " +"``malloc()`` and ``free()`` is always safe. :c:func:`Py_DecodeLocale` must " +"not be called before the Python preinitialization." +msgstr "" + +#: c-api/init_config.rst:399 +msgid "" +"Example using the preinitialization to enable the :ref:`Python UTF-8 Mode " +"`::" +msgstr "" + +#: c-api/init_config.rst:421 +msgid "PyConfig" +msgstr "" + +#: c-api/init_config.rst:425 +msgid "Structure containing most parameters to configure Python." +msgstr "" + +#: c-api/init_config.rst:427 +msgid "" +"When done, the :c:func:`PyConfig_Clear` function must be used to release the " +"configuration memory." +msgstr "" + +#: c-api/init_config.rst:430 +msgid "Structure methods:" +msgstr "" + +#: c-api/init_config.rst:434 +msgid "" +"Initialize configuration with the :ref:`Python Configuration `." +msgstr "" + +#: c-api/init_config.rst:439 +msgid "" +"Initialize configuration with the :ref:`Isolated Configuration `." +msgstr "" + +#: c-api/init_config.rst:444 +msgid "Copy the wide character string *str* into ``*config_str``." +msgstr "" + +#: c-api/init_config.rst:453 c-api/init_config.rst:468 +#: c-api/init_config.rst:488 +msgid ":ref:`Preinitialize Python ` if needed." +msgstr "" + +#: c-api/init_config.rst:450 +msgid "" +"Decode *str* using :c:func:`Py_DecodeLocale` and set the result into " +"``*config_str``." +msgstr "" + +#: c-api/init_config.rst:457 +msgid "" +"Set command line arguments (:c:member:`~PyConfig.argv` member of *config*) " +"from the *argv* list of wide character strings." +msgstr "" + +#: c-api/init_config.rst:464 +msgid "" +"Set command line arguments (:c:member:`~PyConfig.argv` member of *config*) " +"from the *argv* list of bytes strings. Decode bytes using :c:func:" +"`Py_DecodeLocale`." +msgstr "" + +#: c-api/init_config.rst:472 +msgid "Set the list of wide strings *list* to *length* and *items*." +msgstr "" + +#: c-api/init_config.rst:478 +msgid "Read all Python configuration." +msgstr "" + +#: c-api/init_config.rst:480 +msgid "Fields which are already initialized are left unchanged." +msgstr "" + +#: c-api/init_config.rst:909 +msgid "" +"The :c:func:`PyConfig_Read` function only parses :c:member:`PyConfig.argv` " +"arguments once: :c:member:`PyConfig.parse_argv` is set to ``2`` after " +"arguments are parsed. Since Python arguments are strippped from :c:member:" +"`PyConfig.argv`, parsing arguments twice would parse the application options " +"as Python options." +msgstr "" + +#: c-api/init_config.rst:490 +msgid "" +"The :c:member:`PyConfig.argv` arguments are now only parsed once, :c:member:" +"`PyConfig.parse_argv` is set to ``2`` after arguments are parsed, and " +"arguments are only parsed if :c:member:`PyConfig.parse_argv` equals ``1``." +msgstr "" + +#: c-api/init_config.rst:498 +msgid "Release configuration memory." +msgstr "" + +#: c-api/init_config.rst:500 +msgid "" +"Most ``PyConfig`` methods :ref:`preinitialize Python ` if needed. " +"In that case, the Python preinitialization configuration (:c:type:" +"`PyPreConfig`) in based on the :c:type:`PyConfig`. If configuration fields " +"which are in common with :c:type:`PyPreConfig` are tuned, they must be set " +"before calling a :c:type:`PyConfig` method:" +msgstr "" + +#: c-api/init_config.rst:506 +msgid ":c:member:`PyConfig.dev_mode`" +msgstr "" + +#: c-api/init_config.rst:507 +msgid ":c:member:`PyConfig.isolated`" +msgstr "" + +#: c-api/init_config.rst:508 +msgid ":c:member:`PyConfig.parse_argv`" +msgstr "" + +#: c-api/init_config.rst:509 +msgid ":c:member:`PyConfig.use_environment`" +msgstr "" + +#: c-api/init_config.rst:511 +msgid "" +"Moreover, if :c:func:`PyConfig_SetArgv` or :c:func:`PyConfig_SetBytesArgv` " +"is used, this method must be called before other methods, since the " +"preinitialization configuration depends on command line arguments (if :c:" +"member:`parse_argv` is non-zero)." +msgstr "" + +#: c-api/init_config.rst:516 +msgid "" +"The caller of these methods is responsible to handle exceptions (error or " +"exit) using ``PyStatus_Exception()`` and ``Py_ExitStatusException()``." +msgstr "" + +#: c-api/init_config.rst:523 +msgid "Command line arguments: :data:`sys.argv`." +msgstr "" + +#: c-api/init_config.rst:525 +msgid "" +"Set :c:member:`~PyConfig.parse_argv` to ``1`` to parse :c:member:`~PyConfig." +"argv` the same way the regular Python parses Python command line arguments " +"and then to strip Python arguments from :c:member:`~PyConfig.argv`." +msgstr "" + +#: c-api/init_config.rst:530 +msgid "" +"If :c:member:`~PyConfig.argv` is empty, an empty string is added to ensure " +"that :data:`sys.argv` always exists and is never empty." +msgstr "" + +#: c-api/init_config.rst:541 c-api/init_config.rst:561 +#: c-api/init_config.rst:662 c-api/init_config.rst:850 +#: c-api/init_config.rst:966 c-api/init_config.rst:997 +#: c-api/init_config.rst:1017 +msgid "Default: ``NULL``." +msgstr "" + +#: c-api/init_config.rst:535 +msgid "See also the :c:member:`~PyConfig.orig_argv` member." +msgstr "" + +#: c-api/init_config.rst:539 +msgid ":data:`sys.base_exec_prefix`." +msgstr "" + +#: c-api/init_config.rst:555 c-api/init_config.rst:655 +#: c-api/init_config.rst:867 c-api/init_config.rst:950 +msgid "Part of the :ref:`Python Path Configuration ` output." +msgstr "" + +#: c-api/init_config.rst:547 +msgid "Python base executable: :data:`sys._base_executable`." +msgstr "" + +#: c-api/init_config.rst:549 +msgid "Set by the :envvar:`__PYVENV_LAUNCHER__` environment variable." +msgstr "" + +#: c-api/init_config.rst:551 +msgid "Set from :c:member:`PyConfig.executable` if ``NULL``." +msgstr "" + +#: c-api/init_config.rst:559 +msgid ":data:`sys.base_prefix`." +msgstr "" + +#: c-api/init_config.rst:567 +msgid "" +"If equals to 0 and :c:member:`~PyConfig.configure_c_stdio` is non-zero, " +"disable buffering on the C streams stdout and stderr." +msgstr "" + +#: c-api/init_config.rst:570 +msgid "" +"Set to 0 by the :option:`-u` command line option and the :envvar:" +"`PYTHONUNBUFFERED` environment variable." +msgstr "" + +#: c-api/init_config.rst:573 +msgid "stdin is always opened in buffered mode." +msgstr "" + +#: c-api/init_config.rst:1045 c-api/init_config.rst:1160 +msgid "Default: ``1``." +msgstr "" + +#: c-api/init_config.rst:579 +msgid "" +"If equals to 1, issue a warning when comparing :class:`bytes` or :class:" +"`bytearray` with :class:`str`, or comparing :class:`bytes` with :class:`int`." +msgstr "" + +#: c-api/init_config.rst:583 +msgid "" +"If equal or greater to 2, raise a :exc:`BytesWarning` exception in these " +"cases." +msgstr "" + +#: c-api/init_config.rst:586 +msgid "Incremented by the :option:`-b` command line option." +msgstr "" + +#: c-api/init_config.rst:592 +msgid "" +"If non-zero, emit a :exc:`EncodingWarning` warning when :class:`io." +"TextIOWrapper` uses its default encoding. See :ref:`io-encoding-warning` for " +"details." +msgstr "" + +#: c-api/init_config.rst:601 +msgid "" +"Control the validation behavior of hash-based ``.pyc`` files: value of the :" +"option:`--check-hash-based-pycs` command line option." +msgstr "" + +#: c-api/init_config.rst:604 +msgid "Valid values:" +msgstr "" + +#: c-api/init_config.rst:606 +msgid "" +"``L\"always\"``: Hash the source file for invalidation regardless of value " +"of the 'check_source' flag." +msgstr "" + +#: c-api/init_config.rst:608 +msgid "``L\"never\"``: Assume that hash-based pycs always are valid." +msgstr "" + +#: c-api/init_config.rst:609 +msgid "" +"``L\"default\"``: The 'check_source' flag in hash-based pycs determines " +"invalidation." +msgstr "" + +#: c-api/init_config.rst:612 +msgid "Default: ``L\"default\"``." +msgstr "" + +#: c-api/init_config.rst:614 +msgid "See also :pep:`552` \"Deterministic pycs\"." +msgstr "" + +#: c-api/init_config.rst:618 +msgid "If non-zero, configure C standard streams:" +msgstr "" + +#: c-api/init_config.rst:620 +msgid "" +"On Windows, set the binary mode (``O_BINARY``) on stdin, stdout and stderr." +msgstr "" + +#: c-api/init_config.rst:622 +msgid "" +"If :c:member:`~PyConfig.buffered_stdio` equals zero, disable buffering of " +"stdin, stdout and stderr streams." +msgstr "" + +#: c-api/init_config.rst:624 +msgid "" +"If :c:member:`~PyConfig.interactive` is non-zero, enable stream buffering on " +"stdin and stdout (only stdout on Windows)." +msgstr "" + +#: c-api/init_config.rst:631 +msgid "If non-zero, enable the :ref:`Python Development Mode `." +msgstr "" + +#: c-api/init_config.rst:637 +msgid "Dump Python references?" +msgstr "" + +#: c-api/init_config.rst:639 +msgid "If non-zero, dump all objects which are still alive at exit." +msgstr "" + +#: c-api/init_config.rst:641 +msgid "Set to ``1`` by the :envvar:`PYTHONDUMPREFS` environment variable." +msgstr "" + +#: c-api/init_config.rst:643 +msgid "" +"Need a special build of Python with the ``Py_TRACE_REFS`` macro defined: see " +"the :option:`configure --with-trace-refs option <--with-trace-refs>`." +msgstr "" + +#: c-api/init_config.rst:650 +msgid "" +"The site-specific directory prefix where the platform-dependent Python files " +"are installed: :data:`sys.exec_prefix`." +msgstr "" + +#: c-api/init_config.rst:659 +msgid "" +"The absolute path of the executable binary for the Python interpreter: :data:" +"`sys.executable`." +msgstr "" + +#: c-api/init_config.rst:668 +msgid "Enable faulthandler?" +msgstr "" + +#: c-api/init_config.rst:670 +msgid "If non-zero, call :func:`faulthandler.enable` at startup." +msgstr "" + +#: c-api/init_config.rst:672 +msgid "" +"Set to ``1`` by :option:`-X faulthandler <-X>` and the :envvar:" +"`PYTHONFAULTHANDLER` environment variable." +msgstr "" + +#: c-api/init_config.rst:679 +msgid "" +":term:`Filesystem encoding `: :func:" +"`sys.getfilesystemencoding`." +msgstr "" + +#: c-api/init_config.rst:682 +msgid "On macOS, Android and VxWorks: use ``\"utf-8\"`` by default." +msgstr "" + +#: c-api/init_config.rst:684 +msgid "" +"On Windows: use ``\"utf-8\"`` by default, or ``\"mbcs\"`` if :c:member:" +"`~PyPreConfig.legacy_windows_fs_encoding` of :c:type:`PyPreConfig` is non-" +"zero." +msgstr "" + +#: c-api/init_config.rst:688 +msgid "Default encoding on other platforms:" +msgstr "" + +#: c-api/init_config.rst:690 +msgid "``\"utf-8\"`` if :c:member:`PyPreConfig.utf8_mode` is non-zero." +msgstr "" + +#: c-api/init_config.rst:691 +msgid "" +"``\"ascii\"`` if Python detects that ``nl_langinfo(CODESET)`` announces the " +"ASCII encoding, whereas the ``mbstowcs()`` function decodes from a different " +"encoding (usually Latin1)." +msgstr "" + +#: c-api/init_config.rst:694 +msgid "``\"utf-8\"`` if ``nl_langinfo(CODESET)`` returns an empty string." +msgstr "" + +#: c-api/init_config.rst:695 +msgid "" +"Otherwise, use the :term:`locale encoding`: ``nl_langinfo(CODESET)`` result." +msgstr "" + +#: c-api/init_config.rst:698 +msgid "" +"At Python startup, the encoding name is normalized to the Python codec name. " +"For example, ``\"ANSI_X3.4-1968\"`` is replaced with ``\"ascii\"``." +msgstr "" + +#: c-api/init_config.rst:701 +msgid "See also the :c:member:`~PyConfig.filesystem_errors` member." +msgstr "" + +#: c-api/init_config.rst:705 +msgid "" +":term:`Filesystem error handler `: :" +"func:`sys.getfilesystemencodeerrors`." +msgstr "" + +#: c-api/init_config.rst:708 +msgid "" +"On Windows: use ``\"surrogatepass\"`` by default, or ``\"replace\"`` if :c:" +"member:`~PyPreConfig.legacy_windows_fs_encoding` of :c:type:`PyPreConfig` is " +"non-zero." +msgstr "" + +#: c-api/init_config.rst:712 +msgid "On other platforms: use ``\"surrogateescape\"`` by default." +msgstr "" + +#: c-api/init_config.rst:714 +msgid "Supported error handlers:" +msgstr "" + +#: c-api/init_config.rst:716 +msgid "``\"strict\"``" +msgstr "" + +#: c-api/init_config.rst:717 +msgid "``\"surrogateescape\"``" +msgstr "" + +#: c-api/init_config.rst:718 +msgid "``\"surrogatepass\"`` (only supported with the UTF-8 encoding)" +msgstr "" + +#: c-api/init_config.rst:720 +msgid "See also the :c:member:`~PyConfig.filesystem_encoding` member." +msgstr "" + +#: c-api/init_config.rst:725 +msgid "Randomized hash function seed." +msgstr "" + +#: c-api/init_config.rst:727 +msgid "" +"If :c:member:`~PyConfig.use_hash_seed` is zero, a seed is chosen randomly at " +"Python startup, and :c:member:`~PyConfig.hash_seed` is ignored." +msgstr "" + +#: c-api/init_config.rst:730 +msgid "Set by the :envvar:`PYTHONHASHSEED` environment variable." +msgstr "" + +#: c-api/init_config.rst:732 +msgid "" +"Default *use_hash_seed* value: ``-1`` in Python mode, ``0`` in isolated mode." +msgstr "" + +#: c-api/init_config.rst:737 +msgid "Python home directory." +msgstr "" + +#: c-api/init_config.rst:739 +msgid "" +"If :c:func:`Py_SetPythonHome` has been called, use its argument if it is not " +"``NULL``." +msgstr "" + +#: c-api/init_config.rst:742 +msgid "Set by the :envvar:`PYTHONHOME` environment variable." +msgstr "" + +#: c-api/init_config.rst:839 c-api/init_config.rst:941 +#: c-api/init_config.rst:968 +msgid "Part of the :ref:`Python Path Configuration ` input." +msgstr "" + +#: c-api/init_config.rst:750 +msgid "If non-zero, profile import time." +msgstr "" + +#: c-api/init_config.rst:752 +msgid "" +"Set the ``1`` by the :option:`-X importtime <-X>` option and the :envvar:" +"`PYTHONPROFILEIMPORTTIME` environment variable." +msgstr "" + +#: c-api/init_config.rst:759 +msgid "Enter interactive mode after executing a script or a command." +msgstr "" + +#: c-api/init_config.rst:761 +msgid "" +"If greater than 0, enable inspect: when a script is passed as first argument " +"or the -c option is used, enter interactive mode after executing the script " +"or the command, even when :data:`sys.stdin` does not appear to be a terminal." +msgstr "" + +#: c-api/init_config.rst:766 +msgid "" +"Incremented by the :option:`-i` command line option. Set to ``1`` if the :" +"envvar:`PYTHONINSPECT` environment variable is non-empty." +msgstr "" + +#: c-api/init_config.rst:773 +msgid "Install Python signal handlers?" +msgstr "" + +#: c-api/init_config.rst:915 c-api/init_config.rst:1112 +msgid "Default: ``1`` in Python mode, ``0`` in isolated mode." +msgstr "" + +#: c-api/init_config.rst:779 +msgid "If greater than 0, enable the interactive mode (REPL)." +msgstr "" + +#: c-api/init_config.rst:781 +msgid "Incremented by the :option:`-i` command line option." +msgstr "" + +#: c-api/init_config.rst:787 +msgid "If greater than 0, enable isolated mode:" +msgstr "" + +#: c-api/init_config.rst:789 +msgid "" +":data:`sys.path` contains neither the script's directory (computed from " +"``argv[0]`` or the current directory) nor the user's site-packages directory." +msgstr "" + +#: c-api/init_config.rst:792 +msgid "" +"Python REPL doesn't import :mod:`readline` nor enable default readline " +"configuration on interactive prompts." +msgstr "" + +#: c-api/init_config.rst:794 +msgid "" +"Set :c:member:`~PyConfig.use_environment` and :c:member:`~PyConfig." +"user_site_directory` to 0." +msgstr "" + +#: c-api/init_config.rst:799 +msgid "See also :c:member:`PyPreConfig.isolated`." +msgstr "" + +#: c-api/init_config.rst:803 +msgid "" +"If non-zero, use :class:`io.FileIO` instead of :class:`io.WindowsConsoleIO` " +"for :data:`sys.stdin`, :data:`sys.stdout` and :data:`sys.stderr`." +msgstr "" + +#: c-api/init_config.rst:807 +msgid "" +"Set to ``1`` if the :envvar:`PYTHONLEGACYWINDOWSSTDIO` environment variable " +"is set to a non-empty string." +msgstr "" + +#: c-api/init_config.rst:815 +msgid "See also the :pep:`528` (Change Windows console encoding to UTF-8)." +msgstr "" + +#: c-api/init_config.rst:819 +msgid "" +"If non-zero, dump statistics on :ref:`Python pymalloc memory allocator " +"` at exit." +msgstr "" + +#: c-api/init_config.rst:822 +msgid "Set to ``1`` by the :envvar:`PYTHONMALLOCSTATS` environment variable." +msgstr "" + +#: c-api/init_config.rst:824 +msgid "" +"The option is ignored if Python is :option:`configured using the --without-" +"pymalloc option <--without-pymalloc>`." +msgstr "" + +#: c-api/init_config.rst:831 +msgid "Platform library directory name: :data:`sys.platlibdir`." +msgstr "" + +#: c-api/init_config.rst:833 +msgid "Set by the :envvar:`PYTHONPLATLIBDIR` environment variable." +msgstr "" + +#: c-api/init_config.rst:835 +msgid "" +"Default: value of the ``PLATLIBDIR`` macro which is set by the :option:" +"`configure --with-platlibdir option <--with-platlibdir>` (default: " +"``\"lib\"``)." +msgstr "" + +#: c-api/init_config.rst:845 +msgid "" +"Module search paths (:data:`sys.path`) as a string separated by ``DELIM`` (:" +"data:`os.path.pathsep`)." +msgstr "" + +#: c-api/init_config.rst:848 +msgid "Set by the :envvar:`PYTHONPATH` environment variable." +msgstr "" + +#: c-api/init_config.rst:857 +msgid "Module search paths: :data:`sys.path`." +msgstr "" + +#: c-api/init_config.rst:859 +msgid "" +"If :c:member:`~PyConfig.module_search_paths_set` is equal to 0, the function " +"calculating the :ref:`Python Path Configuration ` " +"overrides the :c:member:`~PyConfig.module_search_paths` and sets :c:member:" +"`~PyConfig.module_search_paths_set` to ``1``." +msgstr "" + +#: c-api/init_config.rst:864 +msgid "" +"Default: empty list (``module_search_paths``) and ``0`` " +"(``module_search_paths_set``)." +msgstr "" + +#: c-api/init_config.rst:871 +msgid "Compilation optimization level:" +msgstr "" + +#: c-api/init_config.rst:873 +msgid "``0``: Peephole optimizer, set ``__debug__`` to ``True``." +msgstr "" + +#: c-api/init_config.rst:874 +msgid "``1``: Level 0, remove assertions, set ``__debug__`` to ``False``." +msgstr "" + +#: c-api/init_config.rst:875 +msgid "``2``: Level 1, strip docstrings." +msgstr "" + +#: c-api/init_config.rst:877 +msgid "" +"Incremented by the :option:`-O` command line option. Set to the :envvar:" +"`PYTHONOPTIMIZE` environment variable value." +msgstr "" + +#: c-api/init_config.rst:884 +msgid "" +"The list of the original command line arguments passed to the Python " +"executable: :data:`sys.orig_argv`." +msgstr "" + +#: c-api/init_config.rst:887 +msgid "" +"If :c:member:`~PyConfig.orig_argv` list is empty and :c:member:`~PyConfig." +"argv` is not a list only containing an empty string, :c:func:`PyConfig_Read` " +"copies :c:member:`~PyConfig.argv` into :c:member:`~PyConfig.orig_argv` " +"before modifying :c:member:`~PyConfig.argv` (if :c:member:`~PyConfig." +"parse_argv` is non-zero)." +msgstr "" + +#: c-api/init_config.rst:894 +msgid "" +"See also the :c:member:`~PyConfig.argv` member and the :c:func:" +"`Py_GetArgcArgv` function." +msgstr "" + +#: c-api/init_config.rst:1147 c-api/init_config.rst:1166 +msgid "Default: empty list." +msgstr "" + +#: c-api/init_config.rst:903 +msgid "Parse command line arguments?" +msgstr "" + +#: c-api/init_config.rst:905 +msgid "" +"If equals to ``1``, parse :c:member:`~PyConfig.argv` the same way the " +"regular Python parses :ref:`command line arguments `, and " +"strip Python arguments from :c:member:`~PyConfig.argv`." +msgstr "" + +#: c-api/init_config.rst:917 +msgid "" +"The :c:member:`PyConfig.argv` arguments are now only parsed if :c:member:" +"`PyConfig.parse_argv` equals to ``1``." +msgstr "" + +#: c-api/init_config.rst:923 +msgid "" +"Parser debug mode. If greater than 0, turn on parser debugging output (for " +"expert only, depending on compilation options)." +msgstr "" + +#: c-api/init_config.rst:926 +msgid "" +"Incremented by the :option:`-d` command line option. Set to the :envvar:" +"`PYTHONDEBUG` environment variable value." +msgstr "" + +#: c-api/init_config.rst:933 +msgid "" +"On Unix, if non-zero, calculating the :ref:`Python Path Configuration ` can log warnings into ``stderr``. If equals to 0, suppress " +"these warnings." +msgstr "" + +#: c-api/init_config.rst:937 +msgid "It has no effect on Windows." +msgstr "" + +#: c-api/init_config.rst:945 +msgid "" +"The site-specific directory prefix where the platform independent Python " +"files are installed: :data:`sys.prefix`." +msgstr "" + +#: c-api/init_config.rst:954 +msgid "" +"Program name used to initialize :c:member:`~PyConfig.executable` and in " +"early error messages during Python initialization." +msgstr "" + +#: c-api/init_config.rst:957 +msgid "If :func:`Py_SetProgramName` has been called, use its argument." +msgstr "" + +#: c-api/init_config.rst:958 +msgid "On macOS, use :envvar:`PYTHONEXECUTABLE` environment variable if set." +msgstr "" + +#: c-api/init_config.rst:959 +msgid "" +"If the ``WITH_NEXT_FRAMEWORK`` macro is defined, use :envvar:" +"`__PYVENV_LAUNCHER__` environment variable if set." +msgstr "" + +#: c-api/init_config.rst:961 +msgid "" +"Use ``argv[0]`` of :c:member:`~PyConfig.argv` if available and non-empty." +msgstr "" + +#: c-api/init_config.rst:963 +msgid "" +"Otherwise, use ``L\"python\"`` on Windows, or ``L\"python3\"`` on other " +"platforms." +msgstr "" + +#: c-api/init_config.rst:972 +msgid "" +"Directory where cached ``.pyc`` files are written: :data:`sys." +"pycache_prefix`." +msgstr "" + +#: c-api/init_config.rst:975 +msgid "" +"Set by the :option:`-X pycache_prefix=PATH <-X>` command line option and " +"the :envvar:`PYTHONPYCACHEPREFIX` environment variable." +msgstr "" + +#: c-api/init_config.rst:978 +msgid "If ``NULL``, :data:`sys.pycache_prefix` is set to ``None``." +msgstr "" + +#: c-api/init_config.rst:984 +msgid "" +"Quiet mode. If greater than 0, don't display the copyright and version at " +"Python startup in interactive mode." +msgstr "" + +#: c-api/init_config.rst:987 +msgid "Incremented by the :option:`-q` command line option." +msgstr "" + +#: c-api/init_config.rst:993 +msgid "Value of the :option:`-c` command line option." +msgstr "" + +#: c-api/init_config.rst:1007 c-api/init_config.rst:1015 +msgid "Used by :c:func:`Py_RunMain`." +msgstr "" + +#: c-api/init_config.rst:1001 +msgid "" +"Filename passed on the command line: trailing command line argument without :" +"option:`-c` or :option:`-m`." +msgstr "" + +#: c-api/init_config.rst:1004 +msgid "" +"For example, it is set to ``script.py`` by the ``python3 script.py arg`` " +"command." +msgstr "" + +#: c-api/init_config.rst:1013 +msgid "Value of the :option:`-m` command line option." +msgstr "" + +#: c-api/init_config.rst:1021 +msgid "Show total reference count at exit?" +msgstr "" + +#: c-api/init_config.rst:1023 +msgid "Set to 1 by :option:`-X showrefcount <-X>` command line option." +msgstr "" + +#: c-api/init_config.rst:1025 +msgid "" +"Need a :ref:`debug build of Python ` (the ``Py_REF_DEBUG`` " +"macro must be defined)." +msgstr "" + +#: c-api/init_config.rst:1032 +msgid "Import the :mod:`site` module at startup?" +msgstr "" + +#: c-api/init_config.rst:1034 +msgid "" +"If equal to zero, disable the import of the module site and the site-" +"dependent manipulations of :data:`sys.path` that it entails." +msgstr "" + +#: c-api/init_config.rst:1037 +msgid "" +"Also disable these manipulations if the :mod:`site` module is explicitly " +"imported later (call :func:`site.main` if you want them to be triggered)." +msgstr "" + +#: c-api/init_config.rst:1040 +msgid "Set to ``0`` by the :option:`-S` command line option." +msgstr "" + +#: c-api/init_config.rst:1042 +msgid "" +":data:`sys.flags.no_site` is set to the inverted value of :c:member:" +"`~PyConfig.site_import`." +msgstr "" + +#: c-api/init_config.rst:1049 +msgid "" +"If non-zero, skip the first line of the :c:member:`PyConfig.run_filename` " +"source." +msgstr "" + +#: c-api/init_config.rst:1052 +msgid "" +"It allows the usage of non-Unix forms of ``#!cmd``. This is intended for a " +"DOS specific hack only." +msgstr "" + +#: c-api/init_config.rst:1055 +msgid "Set to ``1`` by the :option:`-x` command line option." +msgstr "" + +#: c-api/init_config.rst:1062 +msgid "" +"Encoding and encoding errors of :data:`sys.stdin`, :data:`sys.stdout` and :" +"data:`sys.stderr` (but :data:`sys.stderr` always uses " +"``\"backslashreplace\"`` error handler)." +msgstr "" + +#: c-api/init_config.rst:1066 +msgid "" +"If :c:func:`Py_SetStandardStreamEncoding` has been called, use its *error* " +"and *errors* arguments if they are not ``NULL``." +msgstr "" + +#: c-api/init_config.rst:1069 +msgid "" +"Use the :envvar:`PYTHONIOENCODING` environment variable if it is non-empty." +msgstr "" + +#: c-api/init_config.rst:1072 +msgid "Default encoding:" +msgstr "" + +#: c-api/init_config.rst:1074 +msgid "``\"UTF-8\"`` if :c:member:`PyPreConfig.utf8_mode` is non-zero." +msgstr "" + +#: c-api/init_config.rst:1075 +msgid "Otherwise, use the :term:`locale encoding`." +msgstr "" + +#: c-api/init_config.rst:1077 +msgid "Default error handler:" +msgstr "" + +#: c-api/init_config.rst:1079 +msgid "On Windows: use ``\"surrogateescape\"``." +msgstr "" + +#: c-api/init_config.rst:1080 +msgid "" +"``\"surrogateescape\"`` if :c:member:`PyPreConfig.utf8_mode` is non-zero, or " +"if the LC_CTYPE locale is \"C\" or \"POSIX\"." +msgstr "" + +#: c-api/init_config.rst:1082 +msgid "``\"strict\"`` otherwise." +msgstr "" + +#: c-api/init_config.rst:1086 +msgid "Enable tracemalloc?" +msgstr "" + +#: c-api/init_config.rst:1088 +msgid "If non-zero, call :func:`tracemalloc.start` at startup." +msgstr "" + +#: c-api/init_config.rst:1090 +msgid "" +"Set by :option:`-X tracemalloc=N <-X>` command line option and by the :" +"envvar:`PYTHONTRACEMALLOC` environment variable." +msgstr "" + +#: c-api/init_config.rst:1097 +msgid "Use :ref:`environment variables `?" +msgstr "" + +#: c-api/init_config.rst:1099 +msgid "" +"If equals to zero, ignore the :ref:`environment variables `." +msgstr "" + +#: c-api/init_config.rst:1106 +msgid "If non-zero, add the user site directory to :data:`sys.path`." +msgstr "" + +#: c-api/init_config.rst:1108 +msgid "Set to ``0`` by the :option:`-s` and :option:`-I` command line options." +msgstr "" + +#: c-api/init_config.rst:1110 +msgid "Set to ``0`` by the :envvar:`PYTHONNOUSERSITE` environment variable." +msgstr "" + +#: c-api/init_config.rst:1116 +msgid "" +"Verbose mode. If greater than 0, print a message each time a module is " +"imported, showing the place (filename or built-in module) from which it is " +"loaded." +msgstr "" + +#: c-api/init_config.rst:1120 +msgid "" +"If greater or equal to 2, print a message for each file that is checked for " +"when searching for a module. Also provides information on module cleanup at " +"exit." +msgstr "" + +#: c-api/init_config.rst:1124 +msgid "Incremented by the :option:`-v` command line option." +msgstr "" + +#: c-api/init_config.rst:1126 +msgid "Set to the :envvar:`PYTHONVERBOSE` environment variable value." +msgstr "" + +#: c-api/init_config.rst:1132 +msgid "" +"Options of the :mod:`warnings` module to build warnings filters, lowest to " +"highest priority: :data:`sys.warnoptions`." +msgstr "" + +#: c-api/init_config.rst:1135 +msgid "" +"The :mod:`warnings` module adds :data:`sys.warnoptions` in the reverse " +"order: the last :c:member:`PyConfig.warnoptions` item becomes the first item " +"of :data:`warnings.filters` which is checked first (highest priority)." +msgstr "" + +#: c-api/init_config.rst:1140 +msgid "" +"The :option:`-W` command line options adds its value to :c:member:`~PyConfig." +"warnoptions`, it can be used multiple times." +msgstr "" + +#: c-api/init_config.rst:1143 +msgid "" +"The :envvar:`PYTHONWARNINGS` environment variable can also be used to add " +"warning options. Multiple options can be specified, separated by commas (``," +"``)." +msgstr "" + +#: c-api/init_config.rst:1151 +msgid "" +"If equal to 0, Python won't try to write ``.pyc`` files on the import of " +"source modules." +msgstr "" + +#: c-api/init_config.rst:1154 +msgid "" +"Set to ``0`` by the :option:`-B` command line option and the :envvar:" +"`PYTHONDONTWRITEBYTECODE` environment variable." +msgstr "" + +#: c-api/init_config.rst:1157 +msgid "" +":data:`sys.dont_write_bytecode` is initialized to the inverted value of :c:" +"member:`~PyConfig.write_bytecode`." +msgstr "" + +#: c-api/init_config.rst:1164 +msgid "Values of the :option:`-X` command line options: :data:`sys._xoptions`." +msgstr "" + +#: c-api/init_config.rst:1168 +msgid "" +"If :c:member:`~PyConfig.parse_argv` is non-zero, :c:member:`~PyConfig.argv` " +"arguments are parsed the same way the regular Python parses :ref:`command " +"line arguments `, and Python arguments are stripped from :" +"c:member:`~PyConfig.argv`." +msgstr "" + +#: c-api/init_config.rst:1173 +msgid "" +"The :c:member:`~PyConfig.xoptions` options are parsed to set other options: " +"see the :option:`-X` command line option." +msgstr "" + +#: c-api/init_config.rst:1178 +msgid "The ``show_alloc_count`` field has been removed." +msgstr "" + +#: c-api/init_config.rst:1182 +msgid "Initialization with PyConfig" +msgstr "" + +#: c-api/init_config.rst:1184 +msgid "Function to initialize Python:" +msgstr "" + +#: c-api/init_config.rst:1188 +msgid "Initialize Python from *config* configuration." +msgstr "" + +#: c-api/init_config.rst:1193 +msgid "" +"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:1200 +msgid "" +"The current configuration (``PyConfig`` type) is stored in " +"``PyInterpreterState.config``." +msgstr "" + +#: c-api/init_config.rst:1203 +msgid "Example setting the program name::" +msgstr "" + +#: c-api/init_config.rst:1231 +msgid "" +"More complete example modifying the default configuration, read the " +"configuration, and then override some parameters::" +msgstr "" + +#: c-api/init_config.rst:1282 +msgid "Isolated Configuration" +msgstr "" + +#: c-api/init_config.rst:1284 +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:1289 +msgid "" +"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:1294 +msgid "" +"Configuration files are still used with this configuration. Set the :ref:" +"`Python Path Configuration ` (\"output fields\") to ignore " +"these configuration files and avoid the function computing the default path " +"configuration." +msgstr "" + +#: c-api/init_config.rst:1303 +msgid "Python Configuration" +msgstr "" + +#: c-api/init_config.rst:1305 +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:1309 +msgid "" +"Environments variables and command line arguments are used to configure " +"Python, whereas global configuration variables are ignored." +msgstr "" + +#: c-api/init_config.rst:1312 +msgid "" +"This function enables C locale coercion (:pep:`538`) and :ref:`Python UTF-8 " +"Mode ` (:pep:`540`) depending on the LC_CTYPE locale, :envvar:" +"`PYTHONUTF8` and :envvar:`PYTHONCOERCECLOCALE` environment variables." +msgstr "" + +#: c-api/init_config.rst:1321 +msgid "Python Path Configuration" +msgstr "" + +#: c-api/init_config.rst:1323 +msgid ":c:type:`PyConfig` contains multiple fields for the path configuration:" +msgstr "" + +#: c-api/init_config.rst:1325 +msgid "Path configuration inputs:" +msgstr "" + +#: c-api/init_config.rst:1327 +msgid ":c:member:`PyConfig.home`" +msgstr "" + +#: c-api/init_config.rst:1328 +msgid ":c:member:`PyConfig.platlibdir`" +msgstr "" + +#: c-api/init_config.rst:1329 +msgid ":c:member:`PyConfig.pathconfig_warnings`" +msgstr "" + +#: c-api/init_config.rst:1330 +msgid ":c:member:`PyConfig.program_name`" +msgstr "" + +#: c-api/init_config.rst:1331 +msgid ":c:member:`PyConfig.pythonpath_env`" +msgstr "" + +#: c-api/init_config.rst:1332 +msgid "current working directory: to get absolute paths" +msgstr "" + +#: c-api/init_config.rst:1333 +msgid "" +"``PATH`` environment variable to get the program full path (from :c:member:" +"`PyConfig.program_name`)" +msgstr "" + +#: c-api/init_config.rst:1335 +msgid "``__PYVENV_LAUNCHER__`` environment variable" +msgstr "" + +#: c-api/init_config.rst:1336 +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)." +msgstr "" + +#: c-api/init_config.rst:1340 +msgid "Path configuration output fields:" +msgstr "" + +#: c-api/init_config.rst:1342 +msgid ":c:member:`PyConfig.base_exec_prefix`" +msgstr "" + +#: c-api/init_config.rst:1343 +msgid ":c:member:`PyConfig.base_executable`" +msgstr "" + +#: c-api/init_config.rst:1344 +msgid ":c:member:`PyConfig.base_prefix`" +msgstr "" + +#: c-api/init_config.rst:1345 +msgid ":c:member:`PyConfig.exec_prefix`" +msgstr "" + +#: c-api/init_config.rst:1346 +msgid ":c:member:`PyConfig.executable`" +msgstr "" + +#: c-api/init_config.rst:1347 +msgid "" +":c:member:`PyConfig.module_search_paths_set`, :c:member:`PyConfig." +"module_search_paths`" +msgstr "" + +#: c-api/init_config.rst:1349 +msgid ":c:member:`PyConfig.prefix`" +msgstr "" + +#: c-api/init_config.rst:1351 +msgid "" +"If at least one \"output field\" is not set, Python calculates the path " +"configuration to fill unset fields. If :c:member:`~PyConfig." +"module_search_paths_set` is equal to 0, :c:member:`~PyConfig." +"module_search_paths` is overridden and :c:member:`~PyConfig." +"module_search_paths_set` is set to 1." +msgstr "" + +#: c-api/init_config.rst:1357 +msgid "" +"It is possible to completely ignore the function calculating the default " +"path configuration by setting explicitly all path configuration output " +"fields listed above. A string is considered as set even if it is non-empty. " +"``module_search_paths`` is considered as set if ``module_search_paths_set`` " +"is set to 1. In this case, path configuration input fields are ignored as " +"well." +msgstr "" + +#: c-api/init_config.rst:1364 +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:1367 +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:1371 +msgid ":c:func:`Py_RunMain` and :c:func:`Py_Main` modify :data:`sys.path`:" +msgstr "" + +#: c-api/init_config.rst:1373 +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:1376 +msgid "If :c:member:`~PyConfig.isolated` is zero:" +msgstr "" + +#: c-api/init_config.rst:1378 +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:1380 +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:1382 +msgid "Otherwise, prepend an empty string to :data:`sys.path`." +msgstr "" + +#: c-api/init_config.rst:1384 +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." +"user_site_directory` is non-zero and the user's site-package directory " +"exists, the :mod:`site` module appends the user's site-package directory to :" +"data:`sys.path`." +msgstr "" + +#: c-api/init_config.rst:1390 +msgid "The following configuration files are used by the path configuration:" +msgstr "" + +#: c-api/init_config.rst:1392 +msgid "``pyvenv.cfg``" +msgstr "" + +#: c-api/init_config.rst:1393 +msgid "``python._pth`` (Windows only)" +msgstr "" + +#: c-api/init_config.rst:1394 +msgid "``pybuilddir.txt`` (Unix only)" +msgstr "" + +#: c-api/init_config.rst:1396 +msgid "" +"The ``__PYVENV_LAUNCHER__`` environment variable is used to set :c:member:" +"`PyConfig.base_executable`" +msgstr "" + +#: c-api/init_config.rst:1401 +msgid "Py_RunMain()" +msgstr "" + +#: c-api/init_config.rst:1405 +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:1410 +msgid "By default and when if :option:`-i` option is used, run the REPL." +msgstr "" + +#: c-api/init_config.rst:1412 +msgid "" +"Finally, finalizes Python and returns an exit status that can be passed to " +"the ``exit()`` function." +msgstr "" + +#: c-api/init_config.rst:1415 +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:1421 +msgid "Py_GetArgcArgv()" +msgstr "" + +#: c-api/init_config.rst:1425 +msgid "Get the original command line arguments, before Python modified them." +msgstr "" + +#: c-api/init_config.rst:1427 +msgid "See also :c:member:`PyConfig.orig_argv` member." +msgstr "" + +#: c-api/init_config.rst:1431 +msgid "Multi-Phase Initialization Private Provisional API" +msgstr "" + +#: c-api/init_config.rst:1433 +msgid "" +"This section is a private provisional API introducing multi-phase " +"initialization, the core feature of :pep:`432`:" +msgstr "" + +#: c-api/init_config.rst:1436 +msgid "\"Core\" initialization phase, \"bare minimum Python\":" +msgstr "" + +#: c-api/init_config.rst:1438 +msgid "Builtin types;" +msgstr "" + +#: c-api/init_config.rst:1439 +msgid "Builtin exceptions;" +msgstr "" + +#: c-api/init_config.rst:1440 +msgid "Builtin and frozen modules;" +msgstr "" + +#: c-api/init_config.rst:1441 +msgid "" +"The :mod:`sys` module is only partially initialized (ex: :data:`sys.path` " +"doesn't exist yet)." +msgstr "" + +#: c-api/init_config.rst:1444 +msgid "\"Main\" initialization phase, Python is fully initialized:" +msgstr "" + +#: c-api/init_config.rst:1446 +msgid "Install and configure :mod:`importlib`;" +msgstr "" + +#: c-api/init_config.rst:1447 +msgid "Apply the :ref:`Path Configuration `;" +msgstr "" + +#: c-api/init_config.rst:1448 +msgid "Install signal handlers;" +msgstr "" + +#: c-api/init_config.rst:1449 +msgid "" +"Finish :mod:`sys` module initialization (ex: create :data:`sys.stdout` and :" +"data:`sys.path`);" +msgstr "" + +#: c-api/init_config.rst:1451 +msgid "" +"Enable optional features like :mod:`faulthandler` and :mod:`tracemalloc`;" +msgstr "" + +#: c-api/init_config.rst:1452 +msgid "Import the :mod:`site` module;" +msgstr "" + +#: c-api/init_config.rst:1453 +msgid "etc." +msgstr "" + +#: c-api/init_config.rst:1455 +msgid "Private provisional API:" +msgstr "" + +#: c-api/init_config.rst:1457 +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:1459 +msgid "" +":c:member:`PyConfig._isolated_interpreter`: if non-zero, disallow threads, " +"subprocesses and fork." +msgstr "" + +#: c-api/init_config.rst:1464 +msgid "" +"Move to the \"Main\" initialization phase, finish the Python initialization." +msgstr "" + +#: c-api/init_config.rst:1466 +msgid "" +"No module is imported during the \"Core\" phase and the ``importlib`` module " +"is not configured: the :ref:`Path Configuration ` is only " +"applied during the \"Main\" phase. It may allow to customize Python in " +"Python to override or tune the :ref:`Path Configuration `, " +"maybe install a custom :data:`sys.meta_path` importer or an import hook, etc." +msgstr "" + +#: c-api/init_config.rst:1472 +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:1476 +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 " +"private and provisional: the API can be modified or even be removed anytime " +"until a proper public API is designed." +msgstr "" + +#: c-api/init_config.rst:1481 +msgid "" +"Example running Python code between \"Core\" and \"Main\" initialization " +"phases::" +msgstr "" + +#, fuzzy +#~ msgid "Functions:" +#~ msgstr "Fonctions" + +#, fuzzy +#~ msgid "Interactive mode." +#~ msgstr "Mode interactif" diff --git a/c-api/intro.po b/c-api/intro.po new file mode 100644 index 0000000000..2e2cf77bbd --- /dev/null +++ b/c-api/intro.po @@ -0,0 +1,743 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-22 22:57+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \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" + +#: c-api/intro.rst:8 +msgid "Introduction" +msgstr "Introduction" + +#: c-api/intro.rst:10 +msgid "" +"The Application Programmer's Interface to Python gives C and C++ programmers " +"access to the Python interpreter at a variety of levels. The API is equally " +"usable from C++, but for brevity it is generally referred to as the Python/C " +"API. There are two fundamentally different reasons for using the Python/C " +"API. The first reason is to write *extension modules* for specific purposes; " +"these are C modules that extend the Python interpreter. This is probably " +"the most common use. The second reason is to use Python as a component in a " +"larger application; this technique is generally referred to as :dfn:" +"`embedding` Python in an application." +msgstr "" + +#: c-api/intro.rst:20 +msgid "" +"Writing an extension module is a relatively well-understood process, where a " +"\"cookbook\" approach works well. There are several tools that automate the " +"process to some extent. While people have embedded Python in other " +"applications since its early existence, the process of embedding Python is " +"less straightforward than writing an extension." +msgstr "" + +#: c-api/intro.rst:26 +msgid "" +"Many API functions are useful independent of whether you're embedding or " +"extending Python; moreover, most applications that embed Python will need " +"to provide a custom extension as well, so it's probably a good idea to " +"become familiar with writing an extension before attempting to embed Python " +"in a real application." +msgstr "" + +#: c-api/intro.rst:34 +msgid "Coding standards" +msgstr "" + +#: c-api/intro.rst:36 +msgid "" +"If you're writing C code for inclusion in CPython, you **must** follow the " +"guidelines and standards defined in :PEP:`7`. These guidelines apply " +"regardless of the version of Python you are contributing to. Following " +"these conventions is not necessary for your own third party extension " +"modules, unless you eventually expect to contribute them to Python." +msgstr "" + +#: c-api/intro.rst:46 +msgid "Include Files" +msgstr "" + +#: c-api/intro.rst:48 +msgid "" +"All function, type and macro definitions needed to use the Python/C API are " +"included in your code by the following line::" +msgstr "" + +#: c-api/intro.rst:54 +msgid "" +"This implies inclusion of the following standard headers: ````, " +"````, ````, ````, ```` and ```` (if available)." +msgstr "" + +#: c-api/intro.rst:60 +msgid "" +"Since Python may define some pre-processor definitions which affect the " +"standard headers on some systems, you *must* include :file:`Python.h` before " +"any standard headers are included." +msgstr "" +"Python pouvant définir certaines définitions pré-processeur qui affectent " +"les têtes standard sur certains systèmes, vous *devez* inclure :file:`Python." +"h` avant les en-têtes standards." + +#: c-api/intro.rst:64 +#, fuzzy +msgid "" +"It is recommended to always define ``PY_SSIZE_T_CLEAN`` before including " +"``Python.h``. See :ref:`arg-parsing` for a description of this macro." +msgstr "" +"Il est recommandé de toujours définir ``PY_SSIZE_T_CLEAN`` avant d'inclure " +"``Python.h``. Lisez :ref:`parsetuple` pour avoir une description de cette " +"macro." + +#: c-api/intro.rst:67 +msgid "" +"All user visible names defined by Python.h (except those defined by the " +"included standard headers) have one of the prefixes ``Py`` or ``_Py``. " +"Names beginning with ``_Py`` are for internal use by the Python " +"implementation and should not be used by extension writers. Structure member " +"names do not have a reserved prefix." +msgstr "" + +#: c-api/intro.rst:74 +msgid "" +"User code should never define names that begin with ``Py`` or ``_Py``. This " +"confuses the reader, and jeopardizes the portability of the user code to " +"future Python versions, which may define additional names beginning with one " +"of these prefixes." +msgstr "" + +#: c-api/intro.rst:79 +msgid "" +"The header files are typically installed with Python. On Unix, these are " +"located in the directories :file:`{prefix}/include/pythonversion/` and :file:" +"`{exec_prefix}/include/pythonversion/`, where :option:`prefix <--prefix>` " +"and :option:`exec_prefix <--exec-prefix>` are defined by the corresponding " +"parameters to Python's :program:`configure` script and *version* is ``'%d." +"%d' % sys.version_info[:2]``. On Windows, the headers are installed in :" +"file:`{prefix}/include`, where ``prefix`` is the installation directory " +"specified to the installer." +msgstr "" + +#: c-api/intro.rst:88 +msgid "" +"To include the headers, place both directories (if different) on your " +"compiler's search path for includes. Do *not* place the parent directories " +"on the search path and then use ``#include ``; this will " +"break on multi-platform builds since the platform independent headers under :" +"option:`prefix <--prefix>` include the platform specific headers from :" +"option:`exec_prefix <--exec-prefix>`." +msgstr "" + +#: c-api/intro.rst:95 +msgid "" +"C++ users should note that although the API is defined entirely using C, the " +"header files properly declare the entry points to be ``extern \"C\"``. As a " +"result, there is no need to do anything special to use the API from C++." +msgstr "" + +#: c-api/intro.rst:101 +msgid "Useful macros" +msgstr "" + +#: c-api/intro.rst:103 +msgid "" +"Several useful macros are defined in the Python header files. Many are " +"defined closer to where they are useful (e.g. :c:macro:`Py_RETURN_NONE`). " +"Others of a more general utility are defined here. This is not necessarily " +"a complete listing." +msgstr "" + +#: c-api/intro.rst:110 +msgid "" +"Use this when you have a code path that cannot be reached by design. For " +"example, in the ``default:`` clause in a ``switch`` statement for which all " +"possible values are covered in ``case`` statements. Use this in places " +"where you might be tempted to put an ``assert(0)`` or ``abort()`` call." +msgstr "" + +#: c-api/intro.rst:115 +msgid "" +"In release mode, the macro helps the compiler to optimize the code, and " +"avoids a warning about unreachable code. For example, the macro is " +"implemented with ``__builtin_unreachable()`` on GCC in release mode." +msgstr "" + +#: c-api/intro.rst:119 +msgid "" +"A use for ``Py_UNREACHABLE()`` is following a call a function that never " +"returns but that is not declared :c:macro:`_Py_NO_RETURN`." +msgstr "" + +#: c-api/intro.rst:122 +msgid "" +"If a code path is very unlikely code but can be reached under exceptional " +"case, this macro must not be used. For example, under low memory condition " +"or if a system call returns a value out of the expected range. In this " +"case, it's better to report the error to the caller. If the error cannot be " +"reported to caller, :c:func:`Py_FatalError` can be used." +msgstr "" + +#: c-api/intro.rst:132 +#, fuzzy +msgid "Return the absolute value of ``x``." +msgstr "Renvoie la valeur absolue de *x*." + +#: c-api/intro.rst:138 +msgid "Return the minimum value between ``x`` and ``y``." +msgstr "" + +#: c-api/intro.rst:144 +msgid "Return the maximum value between ``x`` and ``y``." +msgstr "" + +#: c-api/intro.rst:150 +msgid "" +"Convert ``x`` to a C string. E.g. ``Py_STRINGIFY(123)`` returns ``\"123\"``." +msgstr "" + +#: c-api/intro.rst:157 +msgid "Return the size of a structure (``type``) ``member`` in bytes." +msgstr "" + +#: c-api/intro.rst:163 +msgid "" +"Argument must be a character or an integer in the range [-128, 127] or [0, " +"255]. This macro returns ``c`` cast to an ``unsigned char``." +msgstr "" + +#: c-api/intro.rst:168 +msgid "" +"Like ``getenv(s)``, but returns ``NULL`` if :option:`-E` was passed on the " +"command line (i.e. if ``Py_IgnoreEnvironmentFlag`` is set)." +msgstr "" + +#: c-api/intro.rst:173 +msgid "" +"Use this for unused arguments in a function definition to silence compiler " +"warnings. Example: ``int func(int a, int Py_UNUSED(b)) { return a; }``." +msgstr "" + +#: c-api/intro.rst:180 +msgid "" +"Use this for deprecated declarations. The macro must be placed before the " +"symbol name." +msgstr "" + +#: c-api/intro.rst:198 c-api/intro.rst:216 +msgid "Example::" +msgstr "Exemple ::" + +#: c-api/intro.rst:187 +msgid "MSVC support was added." +msgstr "" + +#: c-api/intro.rst:192 +msgid "" +"Creates a variable with name ``name`` that can be used in docstrings. If " +"Python is built without docstrings, the value will be empty." +msgstr "" + +#: c-api/intro.rst:195 +msgid "" +"Use :c:macro:`PyDoc_STRVAR` for docstrings to support building Python " +"without docstrings, as specified in :pep:`7`." +msgstr "" + +#: c-api/intro.rst:210 +msgid "" +"Creates a docstring for the given input string or an empty string if " +"docstrings are disabled." +msgstr "" + +#: c-api/intro.rst:213 +msgid "" +"Use :c:macro:`PyDoc_STR` in specifying docstrings to support building Python " +"without docstrings, as specified in :pep:`7`." +msgstr "" + +#: c-api/intro.rst:227 +msgid "Objects, Types and Reference Counts" +msgstr "" + +#: c-api/intro.rst:231 +msgid "" +"Most Python/C API functions have one or more arguments as well as a return " +"value of type :c:expr:`PyObject*`. This type is a pointer to an opaque data " +"type representing an arbitrary Python object. Since all Python object types " +"are treated the same way by the Python language in most situations (e.g., " +"assignments, scope rules, and argument passing), it is only fitting that " +"they should be represented by a single C type. Almost all Python objects " +"live on the heap: you never declare an automatic or static variable of type :" +"c:type:`PyObject`, only pointer variables of type :c:expr:`PyObject*` can " +"be declared. The sole exception are the type objects; since these must " +"never be deallocated, they are typically static :c:type:`PyTypeObject` " +"objects." +msgstr "" + +#: c-api/intro.rst:242 +msgid "" +"All Python objects (even Python integers) have a :dfn:`type` and a :dfn:" +"`reference count`. An object's type determines what kind of object it is (e." +"g., an integer, a list, or a user-defined function; there are many more as " +"explained in :ref:`types`). For each of the well-known types there is a " +"macro to check whether an object is of that type; for instance, " +"``PyList_Check(a)`` is true if (and only if) the object pointed to by *a* is " +"a Python list." +msgstr "" + +#: c-api/intro.rst:253 +msgid "Reference Counts" +msgstr "Compteurs de références" + +#: c-api/intro.rst:255 +msgid "" +"The reference count is important because today's computers have a finite " +"(and often severely limited) memory size; it counts how many different " +"places there are that have a reference to an object. Such a place could be " +"another object, or a global (or static) C variable, or a local variable in " +"some C function. When an object's reference count becomes zero, the object " +"is deallocated. If it contains references to other objects, their " +"reference count is decremented. Those other objects may be deallocated in " +"turn, if this decrement makes their reference count become zero, and so on. " +"(There's an obvious problem with objects that reference each other here; " +"for now, the solution is \"don't do that.\")" +msgstr "" + +#: c-api/intro.rst:270 +msgid "" +"Reference counts are always manipulated explicitly. The normal way is to " +"use the macro :c:func:`Py_INCREF` to increment an object's reference count " +"by one, and :c:func:`Py_DECREF` to decrement it by one. The :c:func:" +"`Py_DECREF` macro is considerably more complex than the incref one, since it " +"must check whether the reference count becomes zero and then cause the " +"object's deallocator to be called. The deallocator is a function pointer " +"contained in the object's type structure. The type-specific deallocator " +"takes care of decrementing the reference counts for other objects contained " +"in the object if this is a compound object type, such as a list, as well as " +"performing any additional finalization that's needed. There's no chance " +"that the reference count can overflow; at least as many bits are used to " +"hold the reference count as there are distinct memory locations in virtual " +"memory (assuming ``sizeof(Py_ssize_t) >= sizeof(void*)``). Thus, the " +"reference count increment is a simple operation." +msgstr "" + +#: c-api/intro.rst:284 +msgid "" +"It is not necessary to increment an object's reference count for every " +"local variable that contains a pointer to an object. In theory, the " +"object's reference count goes up by one when the variable is made to point " +"to it and it goes down by one when the variable goes out of scope. " +"However, these two cancel each other out, so at the end the reference count " +"hasn't changed. The only real reason to use the reference count is to " +"prevent the object from being deallocated as long as our variable is " +"pointing to it. If we know that there is at least one other reference to " +"the object that lives at least as long as our variable, there is no need to " +"increment the reference count temporarily. An important situation where " +"this arises is in objects that are passed as arguments to C functions in an " +"extension module that are called from Python; the call mechanism guarantees " +"to hold a reference to every argument for the duration of the call." +msgstr "" + +#: c-api/intro.rst:298 +msgid "" +"However, a common pitfall is to extract an object from a list and hold on to " +"it for a while without incrementing its reference count. Some other " +"operation might conceivably remove the object from the list, decrementing " +"its reference count and possibly deallocating it. The real danger is that " +"innocent-looking operations may invoke arbitrary Python code which could do " +"this; there is a code path which allows control to flow back to the user " +"from a :c:func:`Py_DECREF`, so almost any operation is potentially dangerous." +msgstr "" + +#: c-api/intro.rst:306 +msgid "" +"A safe approach is to always use the generic operations (functions whose " +"name begins with ``PyObject_``, ``PyNumber_``, ``PySequence_`` or " +"``PyMapping_``). These operations always increment the reference count of " +"the object they return. This leaves the caller with the responsibility to " +"call :c:func:`Py_DECREF` when they are done with the result; this soon " +"becomes second nature." +msgstr "" + +#: c-api/intro.rst:316 +msgid "Reference Count Details" +msgstr "" + +#: c-api/intro.rst:318 +msgid "" +"The reference count behavior of functions in the Python/C API is best " +"explained in terms of *ownership of references*. Ownership pertains to " +"references, never to objects (objects are not owned: they are always " +"shared). \"Owning a reference\" means being responsible for calling " +"Py_DECREF on it when the reference is no longer needed. Ownership can also " +"be transferred, meaning that the code that receives ownership of the " +"reference then becomes responsible for eventually decref'ing it by calling :" +"c:func:`Py_DECREF` or :c:func:`Py_XDECREF` when it's no longer needed---or " +"passing on this responsibility (usually to its caller). When a function " +"passes ownership of a reference on to its caller, the caller is said to " +"receive a *new* reference. When no ownership is transferred, the caller is " +"said to *borrow* the reference. Nothing needs to be done for a :term:" +"`borrowed reference`." +msgstr "" + +#: c-api/intro.rst:331 +msgid "" +"Conversely, when a calling function passes in a reference to an object, " +"there are two possibilities: the function *steals* a reference to the " +"object, or it does not. *Stealing a reference* means that when you pass a " +"reference to a function, that function assumes that it now owns that " +"reference, and you are not responsible for it any longer." +msgstr "" + +#: c-api/intro.rst:341 +msgid "" +"Few functions steal references; the two notable exceptions are :c:func:" +"`PyList_SetItem` and :c:func:`PyTuple_SetItem`, which steal a reference to " +"the item (but not to the tuple or list into which the item is put!). These " +"functions were designed to steal a reference because of a common idiom for " +"populating a tuple or list with newly created objects; for example, the code " +"to create the tuple ``(1, 2, \"three\")`` could look like this (forgetting " +"about error handling for the moment; a better way to code this is shown " +"below)::" +msgstr "" + +#: c-api/intro.rst:356 +msgid "" +"Here, :c:func:`PyLong_FromLong` returns a new reference which is immediately " +"stolen by :c:func:`PyTuple_SetItem`. When you want to keep using an object " +"although the reference to it will be stolen, use :c:func:`Py_INCREF` to grab " +"another reference before calling the reference-stealing function." +msgstr "" + +#: c-api/intro.rst:361 +msgid "" +"Incidentally, :c:func:`PyTuple_SetItem` is the *only* way to set tuple " +"items; :c:func:`PySequence_SetItem` and :c:func:`PyObject_SetItem` refuse to " +"do this since tuples are an immutable data type. You should only use :c:" +"func:`PyTuple_SetItem` for tuples that you are creating yourself." +msgstr "" + +#: c-api/intro.rst:366 +msgid "" +"Equivalent code for populating a list can be written using :c:func:" +"`PyList_New` and :c:func:`PyList_SetItem`." +msgstr "" + +#: c-api/intro.rst:369 +msgid "" +"However, in practice, you will rarely use these ways of creating and " +"populating a tuple or list. There's a generic function, :c:func:" +"`Py_BuildValue`, that can create most common objects from C values, directed " +"by a :dfn:`format string`. For example, the above two blocks of code could " +"be replaced by the following (which also takes care of the error checking)::" +msgstr "" + +#: c-api/intro.rst:380 +msgid "" +"It is much more common to use :c:func:`PyObject_SetItem` and friends with " +"items whose references you are only borrowing, like arguments that were " +"passed in to the function you are writing. In that case, their behaviour " +"regarding reference counts is much saner, since you don't have to increment " +"a reference count so you can give a reference away (\"have it be stolen\"). " +"For example, this function sets all items of a list (actually, any mutable " +"sequence) to a given item::" +msgstr "" + +#: c-api/intro.rst:410 +msgid "" +"The situation is slightly different for function return values. While " +"passing a reference to most functions does not change your ownership " +"responsibilities for that reference, many functions that return a reference " +"to an object give you ownership of the reference. The reason is simple: in " +"many cases, the returned object is created on the fly, and the reference " +"you get is the only reference to the object. Therefore, the generic " +"functions that return object references, like :c:func:`PyObject_GetItem` " +"and :c:func:`PySequence_GetItem`, always return a new reference (the caller " +"becomes the owner of the reference)." +msgstr "" + +#: c-api/intro.rst:419 +msgid "" +"It is important to realize that whether you own a reference returned by a " +"function depends on which function you call only --- *the plumage* (the type " +"of the object passed as an argument to the function) *doesn't enter into it!" +"* Thus, if you extract an item from a list using :c:func:`PyList_GetItem`, " +"you don't own the reference --- but if you obtain the same item from the " +"same list using :c:func:`PySequence_GetItem` (which happens to take exactly " +"the same arguments), you do own a reference to the returned object." +msgstr "" + +#: c-api/intro.rst:431 +msgid "" +"Here is an example of how you could write a function that computes the sum " +"of the items in a list of integers; once using :c:func:`PyList_GetItem`, " +"and once using :c:func:`PySequence_GetItem`. ::" +msgstr "" + +#: c-api/intro.rst:495 +msgid "Types" +msgstr "" + +#: c-api/intro.rst:497 +msgid "" +"There are few other data types that play a significant role in the Python/C " +"API; most are simple C types such as :c:expr:`int`, :c:expr:`long`, :c:expr:" +"`double` and :c:expr:`char*`. A few structure types are used to describe " +"static tables used to list the functions exported by a module or the data " +"attributes of a new object type, and another is used to describe the value " +"of a complex number. These will be discussed together with the functions " +"that use them." +msgstr "" + +#: 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:518 +msgid "" +"The Python programmer only needs to deal with exceptions if specific error " +"handling is required; unhandled exceptions are automatically propagated to " +"the caller, then to the caller's caller, and so on, until they reach the top-" +"level interpreter, where they are reported to the user accompanied by a " +"stack traceback." +msgstr "" + +#: 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 " +"is made otherwise in a function's documentation. In general, when a " +"function encounters an error, it sets an exception, discards any object " +"references that it owns, and returns an error indicator. If not documented " +"otherwise, this indicator is either ``NULL`` or ``-1``, depending on the " +"function's return type. A few functions return a Boolean true/false result, " +"with false indicating an error. Very few functions return no explicit error " +"indicator or have an ambiguous return value, and require explicit testing " +"for errors with :c:func:`PyErr_Occurred`. These exceptions are always " +"explicitly documented." +msgstr "" + +#: 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 " +"of two states: an exception has occurred, or not. The function :c:func:" +"`PyErr_Occurred` can be used to check for this: it returns a borrowed " +"reference to the exception type object when an exception has occurred, and " +"``NULL`` otherwise. There are a number of functions to set the exception " +"state: :c:func:`PyErr_SetString` is the most common (though not the most " +"general) function to set the exception state, and :c:func:`PyErr_Clear` " +"clears the exception state." +msgstr "" + +#: 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 " +"traceback. These have the same meanings as the Python result of ``sys." +"exc_info()``; however, they are not the same: the Python objects represent " +"the last exception being handled by a Python :keyword:`try` ... :keyword:" +"`except` statement, while the C level exception state only exists while an " +"exception is being passed on between C functions until it reaches the Python " +"bytecode interpreter's main loop, which takes care of transferring it to " +"``sys.exc_info()`` and friends." +msgstr "" + +#: 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." +"exc_info`, which returns the per-thread exception state for Python code. " +"Also, the semantics of both ways to access the exception state have changed " +"so that a function which catches an exception will save and restore its " +"thread's exception state so as to preserve the exception state of its " +"caller. This prevents common bugs in exception handling code caused by an " +"innocent-looking function overwriting the exception being handled; it also " +"reduces the often unwanted lifetime extension for objects that are " +"referenced by the stack frames in the traceback." +msgstr "" + +#: 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 " +"if so, pass the exception state on to its caller. It should discard any " +"object references that it owns, and return an error indicator, but it " +"should *not* set another exception --- that would overwrite the exception " +"that was just raised, and lose important information about the exact cause " +"of the error." +msgstr "" + +#: 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 " +"doesn't need to clean up any owned references when it detects an error. The " +"following example function shows some error cleanup. First, to remind you " +"why you like Python, we show the equivalent Python code::" +msgstr "" + +#: c-api/intro.rst:598 +msgid "Here is the corresponding C code, in all its glory::" +msgstr "" + +#: 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:" +"`PyErr_Clear` to handle specific exceptions, and the use of :c:func:" +"`Py_XDECREF` to dispose of owned references that may be ``NULL`` (note the " +"``'X'`` in the name; :c:func:`Py_DECREF` would crash when confronted with a " +"``NULL`` reference). It is important that the variables used to hold owned " +"references are initialized to ``NULL`` for this to work; likewise, the " +"proposed return value is initialized to ``-1`` (failure) and only set to " +"success after the final call made is successful." +msgstr "" + +#: c-api/intro.rst:664 +msgid "Embedding Python" +msgstr "Embarquer Python" + +#: 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 " +"possibly the finalization, of the Python interpreter. Most functionality of " +"the interpreter can only be used after the interpreter has been initialized." +msgstr "" + +#: 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 " +"modules :mod:`builtins`, :mod:`__main__`, and :mod:`sys`. It also " +"initializes the module search path (``sys.path``)." +msgstr "" + +#: 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 " +"later, it must be set explicitly with a call to ``PySys_SetArgvEx(argc, " +"argv, updatepath)`` after the call to :c:func:`Py_Initialize`." +msgstr "" + +#: 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 " +"search path based upon its best guess for the location of the standard " +"Python interpreter executable, assuming that the Python library is found in " +"a fixed location relative to the Python interpreter executable. In " +"particular, it looks for a directory named :file:`lib/python{X.Y}` relative " +"to the parent directory where the executable named :file:`python` is found " +"on the shell command search path (the environment variable :envvar:`PATH`)." +msgstr "" + +#: 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/" +"python{X.Y}`. (In fact, this particular path is also the \"fallback\" " +"location, used when no executable file named :file:`python` is found along :" +"envvar:`PATH`.) The user can override this behavior by setting the " +"environment variable :envvar:`PYTHONHOME`, or insert additional directories " +"in front of the standard path by setting :envvar:`PYTHONPATH`." +msgstr "" + +#: 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 " +"that :envvar:`PYTHONHOME` still overrides this and :envvar:`PYTHONPATH` is " +"still inserted in front of the standard path. An application that requires " +"total control has to provide its own implementation of :c:func:" +"`Py_GetPath`, :c:func:`Py_GetPrefix`, :c:func:`Py_GetExecPrefix`, and :c:" +"func:`Py_GetProgramFullPath` (all defined in :file:`Modules/getpath.c`)." +msgstr "" + +#: 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:" +"`Py_Initialize`) or the application is simply done with its use of Python " +"and wants to free memory allocated by Python. This can be accomplished by " +"calling :c:func:`Py_FinalizeEx`. The function :c:func:`Py_IsInitialized` " +"returns true if Python is currently in the initialized state. More " +"information about these functions is given in a later chapter. Notice that :" +"c:func:`Py_FinalizeEx` does *not* free all memory allocated by the Python " +"interpreter, e.g. memory allocated by extension modules currently cannot be " +"released." +msgstr "" + +#: c-api/intro.rst:739 +msgid "Debugging Builds" +msgstr "" + +#: 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: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 " +"available that support tracing of reference counts, debugging the memory " +"allocator, or low-level profiling of the main interpreter loop. Only the " +"most frequently used builds will be described in the remainder of this " +"section." +msgstr "" + +#: c-api/intro.rst:751 +msgid "" +"Compiling the interpreter with the :c:macro:`Py_DEBUG` macro defined " +"produces what is generally meant by :ref:`a debug build of Python `. :c:macro:`Py_DEBUG` is enabled in the Unix build by adding :option:" +"`--with-pydebug` to the :file:`./configure` command. It is also implied by " +"the presence of the not-Python-specific :c:macro:`_DEBUG` macro. When :c:" +"macro:`Py_DEBUG` is enabled in the Unix build, compiler optimization is " +"disabled." +msgstr "" + +#: c-api/intro.rst:759 +msgid "" +"In addition to the reference count debugging described below, extra checks " +"are performed, see :ref:`Python Debug Build `." +msgstr "" + +#: c-api/intro.rst:762 +msgid "" +"Defining :c:macro:`Py_TRACE_REFS` enables reference tracing (see the :option:" +"`configure --with-trace-refs option <--with-trace-refs>`). When defined, a " +"circular doubly linked list of active objects is maintained by adding two " +"extra fields to every :c:type:`PyObject`. Total allocations are tracked as " +"well. Upon exit, all existing references are printed. (In interactive mode " +"this happens after every statement run by the interpreter.)" +msgstr "" + +#: c-api/intro.rst:769 +msgid "" +"Please refer to :file:`Misc/SpecialBuilds.txt` in the Python source " +"distribution for more detailed information." +msgstr "" diff --git a/c-api/iter.po b/c-api/iter.po new file mode 100644 index 0000000000..f910b9223c --- /dev/null +++ b/c-api/iter.po @@ -0,0 +1,85 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-04-05 10:05+0200\n" +"PO-Revision-Date: 2018-02-15 00:33+0100\n" +"Last-Translator: Julien Palard \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" + +#: c-api/iter.rst:6 +msgid "Iterator Protocol" +msgstr "Protocole d'itération" + +#: c-api/iter.rst:8 +msgid "There are two functions specifically for working with iterators." +msgstr "Il existe deux fonctions dédiées à l'interaction avec les itérateurs." + +#: c-api/iter.rst:12 +#, fuzzy +msgid "" +"Return non-zero if the object *o* can be safely passed to :c:func:" +"`PyIter_Next`, and ``0`` otherwise. This function always succeeds." +msgstr "Renvoie vrai si l'objet *o* supporte le protocole d'itération." + +#: c-api/iter.rst:17 +#, fuzzy +msgid "" +"Return non-zero if the object *o* provides the :class:`AsyncIterator` " +"protocol, and ``0`` otherwise. This function always succeeds." +msgstr "Renvoie vrai si l'objet *o* supporte le protocole d'itération." + +#: c-api/iter.rst:24 +#, fuzzy +msgid "" +"Return the next value from the iterator *o*. The object must be an iterator " +"according to :c:func:`PyIter_Check` (it is up to the caller to check this). " +"If there are no remaining values, returns ``NULL`` with no exception set. If " +"an error occurs while retrieving the item, returns ``NULL`` and passes along " +"the exception." +msgstr "" +"Renvoie la valeur suivante d'une itération de *o*. L'objet doit être un " +"itérateur (c'est à l'appelant de faire cette vérification). Renvoie *NULL* " +"s'il n'y a plus de valeurs, sans déclarer d'exception. Renvoie *NULL* en " +"déclarant une exception si une erreur survient lors de la récupération d'un " +"élément." + +#: c-api/iter.rst:30 +msgid "" +"To write a loop which iterates over an iterator, the C code should look " +"something like this::" +msgstr "" +"Pour écrire une boucle itérant un itérateur, le code C devrait ressembler " +"à ::" + +#: c-api/iter.rst:59 +msgid "" +"The enum value used to represent different results of :c:func:`PyIter_Send`." +msgstr "" + +#: c-api/iter.rst:66 +msgid "Sends the *arg* value into the iterator *iter*. Returns:" +msgstr "" + +#: c-api/iter.rst:68 +msgid "" +"``PYGEN_RETURN`` if iterator returns. Return value is returned via *presult*." +msgstr "" + +#: c-api/iter.rst:69 +msgid "" +"``PYGEN_NEXT`` if iterator yields. Yielded value is returned via *presult*." +msgstr "" + +#: c-api/iter.rst:70 +msgid "" +"``PYGEN_ERROR`` if iterator has raised and exception. *presult* is set to " +"``NULL``." +msgstr "" diff --git a/c-api/iterator.po b/c-api/iterator.po new file mode 100644 index 0000000000..6d921aa268 --- /dev/null +++ b/c-api/iterator.po @@ -0,0 +1,87 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +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-03-26 17:16+0100\n" +"Last-Translator: ANTOINE FOURES \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" + +#: c-api/iterator.rst:6 +msgid "Iterator Objects" +msgstr "Itérateurs" + +#: c-api/iterator.rst:8 +msgid "" +"Python provides two general-purpose iterator objects. The first, a sequence " +"iterator, works with an arbitrary sequence supporting the :meth:" +"`__getitem__` method. The second works with a callable object and a " +"sentinel value, calling the callable for each item in the sequence, and " +"ending the iteration when the sentinel value is returned." +msgstr "" +"Python fournit deux itérateurs d'usage générique. Le premier est un " +"itérateur de séquence, il fonctionne avec n'importe quelle séquence " +"implémentant la méthode :meth:`__getitem__`. Le second fonctionne avec un " +"objet appelable et une valeur sentinelle, l'appelable permet d'obtenir " +"chaque élément de la séquence, et l'itération se termine lorsque la " +"sentinelle est atteinte." + +#: c-api/iterator.rst:17 +msgid "" +"Type object for iterator objects returned by :c:func:`PySeqIter_New` and the " +"one-argument form of the :func:`iter` built-in function for built-in " +"sequence types." +msgstr "" +"Type des itérateurs renvoyés par les fonctions :c:func:`PySeqIter_New` et la " +"forme à un argument de la fonction native :func:`iter` pour les séquences " +"natives." + +#: c-api/iterator.rst:24 +#, fuzzy +msgid "" +"Return true if the type of *op* is :c:data:`PySeqIter_Type`. This function " +"always succeeds." +msgstr "Renvoie vrai si *op* est de type :c:data:`PySeqIter_Type`." + +#: c-api/iterator.rst:30 +msgid "" +"Return an iterator that works with a general sequence object, *seq*. The " +"iteration ends when the sequence raises :exc:`IndexError` for the " +"subscripting operation." +msgstr "" +"Renvoie un itérateur sur la séquence *seq*. L'itération prend fin lorsque la " +"séquence lève :exc:`IndexError` lors d'une tentative d'accès." + +#: c-api/iterator.rst:37 +msgid "" +"Type object for iterator objects returned by :c:func:`PyCallIter_New` and " +"the two-argument form of the :func:`iter` built-in function." +msgstr "" +"Type de l'itérateur renvoyé par les fonctions :c:func:`PyCallIter_New` et :" +"func:`iter` à deux arguments." + +#: c-api/iterator.rst:43 +#, fuzzy +msgid "" +"Return true if the type of *op* is :c:data:`PyCallIter_Type`. This function " +"always succeeds." +msgstr "Renvoie vrai si *op* est de type :c:data:`PyCallIter_Type`." + +#: c-api/iterator.rst:49 +msgid "" +"Return a new iterator. The first parameter, *callable*, can be any Python " +"callable object that can be called with no parameters; each call to it " +"should return the next item in the iteration. When *callable* returns a " +"value equal to *sentinel*, the iteration will be terminated." +msgstr "" +"Renvoie un nouvel itérateur. Le premier paramètre, *callable*, peut être " +"n'importe quel objet Python appelable sans aucun paramètre ; chaque appel " +"doit renvoyer l'élément suivant de l'itération. Lorsque *callable* renvoie " +"une valeur égale à *sentinel*, l'itération prend fin." diff --git a/c-api/list.po b/c-api/list.po new file mode 100644 index 0000000000..42f3d1a4c3 --- /dev/null +++ b/c-api/list.po @@ -0,0 +1,156 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +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: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \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" + +#: c-api/list.rst:6 +msgid "List Objects" +msgstr "" + +#: c-api/list.rst:13 +#, fuzzy +msgid "This subtype of :c:type:`PyObject` represents a Python list object." +msgstr "" +"Ce sous-type de :c:type:`PyObject` représente un objet ``bytearray`` Python." + +#: c-api/list.rst:18 +#, fuzzy +msgid "" +"This instance of :c:type:`PyTypeObject` represents the Python list type. " +"This is the same object as :class:`list` in the Python layer." +msgstr "" +"Cette instance de l'objet :c:type:`PyTypeObject` représente le type nombre à " +"virgule flottante en Python. C'est le même objet que la classe :class:" +"`float` de la couche Python." + +#: c-api/list.rst:24 +msgid "" +"Return true if *p* is a list object or an instance of a subtype of the list " +"type. This function always succeeds." +msgstr "" + +#: c-api/list.rst:30 +msgid "" +"Return true if *p* is a list object, but not an instance of a subtype of the " +"list type. This function always succeeds." +msgstr "" + +#: c-api/list.rst:36 +msgid "Return a new list of length *len* on success, or ``NULL`` on failure." +msgstr "" + +#: c-api/list.rst:40 +msgid "" +"If *len* is greater than zero, the returned list object's items are set to " +"``NULL``. Thus you cannot use abstract API functions such as :c:func:" +"`PySequence_SetItem` or expose the object to Python code before setting all " +"items to a real object with :c:func:`PyList_SetItem`." +msgstr "" + +#: c-api/list.rst:50 +msgid "" +"Return the length of the list object in *list*; this is equivalent to " +"``len(list)`` on a list object." +msgstr "" + +#: c-api/list.rst:56 +msgid "Macro form of :c:func:`PyList_Size` without error checking." +msgstr "" + +#: c-api/list.rst:61 +msgid "" +"Return the object at position *index* in the list pointed to by *list*. The " +"position must be non-negative; indexing from the end of the list is not " +"supported. If *index* is out of bounds (<0 or >=len(list)), return ``NULL`` " +"and set an :exc:`IndexError` exception." +msgstr "" + +#: c-api/list.rst:69 +msgid "Macro form of :c:func:`PyList_GetItem` without error checking." +msgstr "" + +#: c-api/list.rst:74 +msgid "" +"Set the item at index *index* in list to *item*. Return ``0`` on success. " +"If *index* is out of bounds, return ``-1`` and set an :exc:`IndexError` " +"exception." +msgstr "" + +#: c-api/list.rst:80 +msgid "" +"This function \"steals\" a reference to *item* and discards a reference to " +"an item already in the list at the affected position." +msgstr "" + +#: c-api/list.rst:86 +msgid "" +"Macro form of :c:func:`PyList_SetItem` without error checking. This is " +"normally only used to fill in new lists where there is no previous content." +msgstr "" + +#: c-api/list.rst:91 +msgid "" +"This macro \"steals\" a reference to *item*, and, unlike :c:func:" +"`PyList_SetItem`, does *not* discard a reference to any item that is being " +"replaced; any reference in *list* at position *i* will be leaked." +msgstr "" + +#: c-api/list.rst:99 +msgid "" +"Insert the item *item* into list *list* in front of index *index*. Return " +"``0`` if successful; return ``-1`` and set an exception if unsuccessful. " +"Analogous to ``list.insert(index, item)``." +msgstr "" + +#: c-api/list.rst:106 +msgid "" +"Append the object *item* at the end of list *list*. Return ``0`` if " +"successful; return ``-1`` and set an exception if unsuccessful. Analogous " +"to ``list.append(item)``." +msgstr "" + +#: c-api/list.rst:113 +msgid "" +"Return a list of the objects in *list* containing the objects *between* " +"*low* and *high*. Return ``NULL`` and set an exception if unsuccessful. " +"Analogous to ``list[low:high]``. Indexing from the end of the list is not " +"supported." +msgstr "" + +#: c-api/list.rst:120 +msgid "" +"Set the slice of *list* between *low* and *high* to the contents of " +"*itemlist*. Analogous to ``list[low:high] = itemlist``. The *itemlist* may " +"be ``NULL``, indicating the assignment of an empty list (slice deletion). " +"Return ``0`` on success, ``-1`` on failure. Indexing from the end of the " +"list is not supported." +msgstr "" + +#: c-api/list.rst:129 +msgid "" +"Sort the items of *list* in place. Return ``0`` on success, ``-1`` on " +"failure. This is equivalent to ``list.sort()``." +msgstr "" + +#: c-api/list.rst:135 +msgid "" +"Reverse the items of *list* in place. Return ``0`` on success, ``-1`` on " +"failure. This is the equivalent of ``list.reverse()``." +msgstr "" + +#: c-api/list.rst:143 +msgid "" +"Return a new tuple object containing the contents of *list*; equivalent to " +"``tuple(list)``." +msgstr "" diff --git a/c-api/long.po b/c-api/long.po new file mode 100644 index 0000000000..8ec49d2f49 --- /dev/null +++ b/c-api/long.po @@ -0,0 +1,338 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-22 22:57+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \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" + +#: c-api/long.rst:6 +msgid "Integer Objects" +msgstr "Objets *Integer*" + +#: c-api/long.rst:11 +msgid "" +"All integers are implemented as \"long\" integer objects of arbitrary size." +msgstr "" + +#: c-api/long.rst:13 +msgid "" +"On error, most ``PyLong_As*`` APIs return ``(return type)-1`` which cannot " +"be distinguished from a number. Use :c:func:`PyErr_Occurred` to " +"disambiguate." +msgstr "" + +#: c-api/long.rst:18 +#, fuzzy +msgid "This subtype of :c:type:`PyObject` represents a Python integer object." +msgstr "" +"Ce sous-type de :c:type:`PyObject` représente un objet ``bytearray`` Python." + +#: c-api/long.rst:23 +#, fuzzy +msgid "" +"This instance of :c:type:`PyTypeObject` represents the Python integer type. " +"This is the same object as :class:`int` in the Python layer." +msgstr "" +"Cette instance de l'objet :c:type:`PyTypeObject` représente le type nombre à " +"virgule flottante en Python. C'est le même objet que la classe :class:" +"`float` de la couche Python." + +#: c-api/long.rst:29 +#, fuzzy +msgid "" +"Return true if its argument is a :c:type:`PyLongObject` or a subtype of :c:" +"type:`PyLongObject`. This function always succeeds." +msgstr "" +"Renvoie vrai si l'argument est de type :c:type:`PyFloatObject` ou un sous-" +"type de :c:type:`PyFloatObject`." + +#: c-api/long.rst:35 +#, fuzzy +msgid "" +"Return true if its argument is a :c:type:`PyLongObject`, but not a subtype " +"of :c:type:`PyLongObject`. This function always succeeds." +msgstr "" +"Renvoie vrai si l'argument est de type :c:type:`PyFloatObject`, mais pas un " +"sous-type de :c:type:`PyFloatObject`." + +#: c-api/long.rst:41 +msgid "" +"Return a new :c:type:`PyLongObject` object from *v*, or ``NULL`` on failure." +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 " +"you actually just get back a reference to the existing object." +msgstr "" + +#: c-api/long.rst:50 +msgid "" +"Return a new :c:type:`PyLongObject` object from a C :c:expr:`unsigned long`, " +"or ``NULL`` on failure." +msgstr "" + +#: c-api/long.rst:56 +msgid "" +"Return a new :c:type:`PyLongObject` object from a C :c:type:`Py_ssize_t`, or " +"``NULL`` on failure." +msgstr "" + +#: c-api/long.rst:62 +msgid "" +"Return a new :c:type:`PyLongObject` object from a C :c:type:`size_t`, or " +"``NULL`` on failure." +msgstr "" + +#: c-api/long.rst:68 +msgid "" +"Return a new :c:type:`PyLongObject` object from a C :c:expr:`long long`, or " +"``NULL`` on failure." +msgstr "" + +#: c-api/long.rst:74 +msgid "" +"Return a new :c:type:`PyLongObject` object from a C :c:expr:`unsigned long " +"long`, or ``NULL`` on failure." +msgstr "" + +#: c-api/long.rst:80 +msgid "" +"Return a new :c:type:`PyLongObject` object from the integer part of *v*, or " +"``NULL`` on failure." +msgstr "" + +#: c-api/long.rst:86 +msgid "" +"Return a new :c:type:`PyLongObject` based on the string value in *str*, " +"which is interpreted according to the radix in *base*. If *pend* is non-" +"``NULL``, *\\*pend* will point to the first character in *str* which follows " +"the representation of the number. If *base* is ``0``, *str* is interpreted " +"using the :ref:`integers` definition; in this case, leading zeros in a non-" +"zero decimal number raises a :exc:`ValueError`. If *base* is not ``0``, it " +"must be between ``2`` and ``36``, inclusive. Leading spaces and single " +"underscores after a base specifier and between digits are ignored. If there " +"are no digits, :exc:`ValueError` will be raised." +msgstr "" + +#: c-api/long.rst:96 +msgid "" +"Python methods :meth:`int.to_bytes` and :meth:`int.from_bytes` to convert a :" +"c:type:`PyLongObject` to/from an array of bytes in base ``256``. You can " +"call those from C using :c:func:`PyObject_CallMethod`." +msgstr "" + +#: c-api/long.rst:103 +msgid "" +"Convert a sequence of Unicode digits in the string *u* to a Python integer " +"value." +msgstr "" + +#: c-api/long.rst:111 +msgid "" +"Create a Python integer from the pointer *p*. The pointer value can be " +"retrieved from the resulting value using :c:func:`PyLong_AsVoidPtr`." +msgstr "" + +#: c-api/long.rst:140 +msgid "" +"Return a C :c:expr:`long` representation of *obj*. If *obj* is not an " +"instance of :c:type:`PyLongObject`, first call its :meth:`__index__` method " +"(if present) to convert it to a :c:type:`PyLongObject`." +msgstr "" + +#: c-api/long.rst:126 +msgid "" +"Raise :exc:`OverflowError` if the value of *obj* is out of range for a :c:" +"expr:`long`." +msgstr "" + +#: c-api/long.rst:149 c-api/long.rst:190 c-api/long.rst:213 +msgid "Returns ``-1`` on error. Use :c:func:`PyErr_Occurred` to disambiguate." +msgstr "" + +#: c-api/long.rst:151 c-api/long.rst:194 c-api/long.rst:298 +msgid "Use :meth:`__index__` if available." +msgstr "" + +#: c-api/long.rst:154 c-api/long.rst:197 c-api/long.rst:301 +msgid "This function will no longer use :meth:`__int__`." +msgstr "" + +#: c-api/long.rst:144 +msgid "" +"If the value of *obj* is greater than :const:`LONG_MAX` or less than :const:" +"`LONG_MIN`, set *\\*overflow* to ``1`` or ``-1``, respectively, and return " +"``-1``; otherwise, set *\\*overflow* to ``0``. If any other exception " +"occurs set *\\*overflow* to ``0`` and return ``-1`` as usual." +msgstr "" + +#: c-api/long.rst:181 +msgid "" +"Return a C :c:expr:`long long` representation of *obj*. If *obj* is not an " +"instance of :c:type:`PyLongObject`, first call its :meth:`__index__` method " +"(if present) to convert it to a :c:type:`PyLongObject`." +msgstr "" + +#: c-api/long.rst:167 +msgid "" +"Raise :exc:`OverflowError` if the value of *obj* is out of range for a :c:" +"expr:`long long`." +msgstr "" + +#: c-api/long.rst:185 +msgid "" +"If the value of *obj* is greater than :const:`LLONG_MAX` or less than :const:" +"`LLONG_MIN`, set *\\*overflow* to ``1`` or ``-1``, respectively, and return " +"``-1``; otherwise, set *\\*overflow* to ``0``. If any other exception " +"occurs set *\\*overflow* to ``0`` and return ``-1`` as usual." +msgstr "" + +#: c-api/long.rst:207 +msgid "" +"Return a C :c:type:`Py_ssize_t` representation of *pylong*. *pylong* must " +"be an instance of :c:type:`PyLongObject`." +msgstr "" + +#: c-api/long.rst:210 +msgid "" +"Raise :exc:`OverflowError` if the value of *pylong* is out of range for a :c:" +"type:`Py_ssize_t`." +msgstr "" + +#: c-api/long.rst:222 +msgid "" +"Return a C :c:expr:`unsigned long` representation of *pylong*. *pylong* " +"must be an instance of :c:type:`PyLongObject`." +msgstr "" + +#: c-api/long.rst:225 +msgid "" +"Raise :exc:`OverflowError` if the value of *pylong* is out of range for a :c:" +"expr:`unsigned long`." +msgstr "" + +#: c-api/long.rst:228 +msgid "" +"Returns ``(unsigned long)-1`` on error. Use :c:func:`PyErr_Occurred` to " +"disambiguate." +msgstr "" + +#: c-api/long.rst:238 +msgid "" +"Return a C :c:type:`size_t` representation of *pylong*. *pylong* must be an " +"instance of :c:type:`PyLongObject`." +msgstr "" + +#: c-api/long.rst:241 +msgid "" +"Raise :exc:`OverflowError` if the value of *pylong* is out of range for a :c:" +"type:`size_t`." +msgstr "" + +#: c-api/long.rst:244 +msgid "" +"Returns ``(size_t)-1`` on error. Use :c:func:`PyErr_Occurred` to " +"disambiguate." +msgstr "" + +#: c-api/long.rst:253 +msgid "" +"Return a C :c:expr:`unsigned long long` representation of *pylong*. " +"*pylong* must be an instance of :c:type:`PyLongObject`." +msgstr "" + +#: c-api/long.rst:256 +msgid "" +"Raise :exc:`OverflowError` if the value of *pylong* is out of range for an :" +"c:expr:`unsigned long long`." +msgstr "" + +#: c-api/long.rst:259 +msgid "" +"Returns ``(unsigned long long)-1`` on error. Use :c:func:`PyErr_Occurred` to " +"disambiguate." +msgstr "" + +#: c-api/long.rst:262 +msgid "" +"A negative *pylong* now raises :exc:`OverflowError`, not :exc:`TypeError`." +msgstr "" + +#: c-api/long.rst:268 +msgid "" +"Return a C :c:expr:`unsigned long` representation of *obj*. If *obj* is not " +"an instance of :c:type:`PyLongObject`, first call its :meth:`__index__` " +"method (if present) to convert it to a :c:type:`PyLongObject`." +msgstr "" + +#: c-api/long.rst:272 +msgid "" +"If the value of *obj* is out of range for an :c:expr:`unsigned long`, return " +"the reduction of that value modulo ``ULONG_MAX + 1``." +msgstr "" + +#: c-api/long.rst:275 +msgid "" +"Returns ``(unsigned long)-1`` on error. Use :c:func:`PyErr_Occurred` to " +"disambiguate." +msgstr "" + +#: c-api/long.rst:287 +msgid "" +"Return a C :c:expr:`unsigned long long` representation of *obj*. If *obj* " +"is not an instance of :c:type:`PyLongObject`, first call its :meth:" +"`__index__` method (if present) to convert it to a :c:type:`PyLongObject`." +msgstr "" + +#: c-api/long.rst:292 +msgid "" +"If the value of *obj* is out of range for an :c:expr:`unsigned long long`, " +"return the reduction of that value modulo ``ULLONG_MAX + 1``." +msgstr "" + +#: c-api/long.rst:295 +msgid "" +"Returns ``(unsigned long long)-1`` on error. Use :c:func:`PyErr_Occurred` " +"to disambiguate." +msgstr "" + +#: c-api/long.rst:307 +msgid "" +"Return a C :c:expr:`double` representation of *pylong*. *pylong* must be an " +"instance of :c:type:`PyLongObject`." +msgstr "" + +#: c-api/long.rst:310 +msgid "" +"Raise :exc:`OverflowError` if the value of *pylong* is out of range for a :c:" +"expr:`double`." +msgstr "" + +#: c-api/long.rst:313 +msgid "" +"Returns ``-1.0`` on error. Use :c:func:`PyErr_Occurred` to disambiguate." +msgstr "" + +#: c-api/long.rst:318 +msgid "" +"Convert a Python integer *pylong* to a C :c:expr:`void` pointer. If *pylong* " +"cannot be converted, an :exc:`OverflowError` will be raised. This is only " +"assured to produce a usable :c:expr:`void` pointer for values created with :" +"c:func:`PyLong_FromVoidPtr`." +msgstr "" + +#: c-api/long.rst:323 +msgid "" +"Returns ``NULL`` on error. Use :c:func:`PyErr_Occurred` to disambiguate." +msgstr "" diff --git a/c-api/mapping.po b/c-api/mapping.po new file mode 100644 index 0000000000..55bd3511a0 --- /dev/null +++ b/c-api/mapping.po @@ -0,0 +1,154 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-04-05 10:05+0200\n" +"PO-Revision-Date: 2021-01-28 14:58+0100\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.4.2\n" + +#: c-api/mapping.rst:6 +msgid "Mapping Protocol" +msgstr "Protocole de correspondance" + +#: c-api/mapping.rst:8 +msgid "" +"See also :c:func:`PyObject_GetItem`, :c:func:`PyObject_SetItem` and :c:func:" +"`PyObject_DelItem`." +msgstr "" +"Voir aussi :c:func:`PyObject_GetItem`, :c:func:`PyObject_SetItem` et :c:func:" +"`PyObject_DelItem`." + +# - " in general case it is impossible to determine what the type of keys it +# supports." +# → 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 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 " +"les classes Python avec une méthode :meth:`__getitem__` puisque, dans le cas " +"général, il est impossible de déterminer quel type de clef est pris en " +"charge. Cette fonction ne provoque jamais d'erreur." + +#: c-api/mapping.rst:25 +msgid "" +"Returns the number of keys in object *o* on success, and ``-1`` on failure. " +"This is equivalent to the Python expression ``len(o)``." +msgstr "" +"Renvoie le nombre de clefs dans l'objet *o* et ``-1`` en cas d'échec. C'est " +"l'équivalent de l'expression Python ``len(o)``." + +#: c-api/mapping.rst:31 +msgid "" +"Return element of *o* corresponding to the string *key* or ``NULL`` on " +"failure. This is the equivalent of the Python expression ``o[key]``. See " +"also :c:func:`PyObject_GetItem`." +msgstr "" +"Renvoie les éléments de *o* qui correspondent à la chaîne *key* ou *NULL* en " +"cas d'échec. C'est l'équivalent de l'expression Python ``o[key]``. Voir " +"aussi :c:func:`PyObject_GetItem`." + +#: c-api/mapping.rst:38 +msgid "" +"Map the string *key* to the value *v* in object *o*. Returns ``-1`` on " +"failure. This is the equivalent of the Python statement ``o[key] = v``. See " +"also :c:func:`PyObject_SetItem`. This function *does not* steal a reference " +"to *v*." +msgstr "" +"Fait correspondre la chaîne *key* à la valeur *v* dans l'objet *o*. Renvoie " +"``-1`` en cas d'échec. C'est l'équivalent de la commande Python ``o[key] = " +"v``. Voir aussi :c:func:`PyObject_SetItem`. Cette fonction *ne vole pas* de " +"référence à *v*." + +#: c-api/mapping.rst:46 +msgid "" +"Remove the mapping for the object *key* from the object *o*. Return ``-1`` " +"on failure. This is equivalent to the Python statement ``del o[key]``. This " +"is an alias of :c:func:`PyObject_DelItem`." +msgstr "" +"Supprime la correspondance associée à l'objet *key* dans l'objet *o*. " +"Renvoie ``-1`` en cas d'échec. C'est l'équivalent de la commande Python " +"``del o[key]``. C'est un alias pour :c:func:`PyObject_DelItem`." + +#: c-api/mapping.rst:53 +msgid "" +"Remove the mapping for the string *key* from the object *o*. Return ``-1`` " +"on failure. This is equivalent to the Python statement ``del o[key]``." +msgstr "" +"Supprime la correspondance associée à la chaîne *key* dans l'objet *o*. " +"Renvoie ``-1`` en cas d'échec. C'est l'équivalent de la commande Python " +"``del o[key]``." + +#: c-api/mapping.rst:70 +msgid "" +"Return ``1`` if the mapping object has the key *key* and ``0`` otherwise. " +"This is equivalent to the Python expression ``key in o``. This function " +"always succeeds." +msgstr "" +"Renvoie ``1`` si l'objet de correspondance possède une clef *key* et ``0`` " +"sinon. C'est l'équivalent de l'expression Python ``key in o``. Cette " +"fonction ne provoque jamais d'erreur." + +#: c-api/mapping.rst:63 +msgid "" +"Note that exceptions which occur while calling the :meth:`__getitem__` " +"method will get suppressed. To get error reporting use :c:func:" +"`PyObject_GetItem()` instead." +msgstr "" +"Notez que les exceptions qui surviennent pendant l'appel de la méthode :meth:" +"`__getitem__` seront supprimées. Pour obtenir le rapport d'erreur, utilisez " +"plutôt :c:func:`PyObject_GetItem()`." + +#: c-api/mapping.rst:74 +msgid "" +"Note that exceptions which occur while calling the :meth:`__getitem__` " +"method and creating a temporary string object will get suppressed. To get " +"error reporting use :c:func:`PyMapping_GetItemString()` instead." +msgstr "" +"Notez que les exceptions qui surviennent en créant une chaîne de caractères " +"temporaire pendant l'appel de la méthode :meth:`__getitem__` seront " +"supprimées. Pour obtenir le rapport d'erreur, utilisez plutôt :c:func:" +"`PyMapping_GetItemString()`." + +#: c-api/mapping.rst:81 +msgid "" +"On success, return a list of the keys in object *o*. On failure, return " +"``NULL``." +msgstr "" +"Renvoie la liste des clefs dans l'objet *o*. En cas d'échec, renvoie *NULL*." + +#: c-api/mapping.rst:93 c-api/mapping.rst:102 +msgid "Previously, the function returned a list or a tuple." +msgstr "Auparavant, la fonction renvoyait une liste ou un *n*-uplet." + +#: c-api/mapping.rst:90 +msgid "" +"On success, return a list of the values in object *o*. On failure, return " +"``NULL``." +msgstr "" +"Renvoie la liste des valeurs dans l'objet *o*. En cas d'échec, renvoie " +"*NULL*." + +#: c-api/mapping.rst:99 +msgid "" +"On success, return a list of the items in object *o*, where each item is a " +"tuple containing a key-value pair. On failure, return ``NULL``." +msgstr "" +"Renvoie la liste des éléments dans l'objet *o*, où chaque élément est un n-" +"uplet contenant une paire clef-valeur. En cas d'échec, renvoie *NULL*." diff --git a/c-api/marshal.po b/c-api/marshal.po new file mode 100644 index 0000000000..be0eee8b28 --- /dev/null +++ b/c-api/marshal.po @@ -0,0 +1,112 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-18 15:46+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \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" + +#: c-api/marshal.rst:6 +msgid "Data marshalling support" +msgstr "" + +#: c-api/marshal.rst:8 +msgid "" +"These routines allow C code to work with serialized objects using the same " +"data format as the :mod:`marshal` module. There are functions to write data " +"into the serialization format, and additional functions that can be used to " +"read the data back. Files used to store marshalled data must be opened in " +"binary mode." +msgstr "" + +#: c-api/marshal.rst:14 +msgid "Numeric values are stored with the least significant byte first." +msgstr "" + +#: c-api/marshal.rst:16 +msgid "" +"The module supports two versions of the data format: version 0 is the " +"historical version, version 1 shares interned strings in the file, and upon " +"unmarshalling. Version 2 uses a binary format for floating point numbers. " +"``Py_MARSHAL_VERSION`` indicates the current file format (currently 2)." +msgstr "" + +#: c-api/marshal.rst:24 +msgid "" +"Marshal a :c:expr:`long` integer, *value*, to *file*. This will only write " +"the least-significant 32 bits of *value*; regardless of the size of the " +"native :c:expr:`long` type. *version* indicates the file format." +msgstr "" + +#: c-api/marshal.rst:31 +msgid "" +"Marshal a Python object, *value*, to *file*. *version* indicates the file " +"format." +msgstr "" + +#: c-api/marshal.rst:37 +msgid "" +"Return a bytes object containing the marshalled representation of *value*. " +"*version* indicates the file format." +msgstr "" + +#: c-api/marshal.rst:41 +msgid "The following functions allow marshalled values to be read back in." +msgstr "" + +#: c-api/marshal.rst:46 +msgid "" +"Return a C :c:expr:`long` from the data stream in a :c:expr:`FILE*` opened " +"for reading. Only a 32-bit value can be read in using this function, " +"regardless of the native size of :c:expr:`long`." +msgstr "" + +#: c-api/marshal.rst:60 +msgid "" +"On error, sets the appropriate exception (:exc:`EOFError`) and returns " +"``-1``." +msgstr "" + +#: c-api/marshal.rst:56 +msgid "" +"Return a C :c:expr:`short` from the data stream in a :c:expr:`FILE*` opened " +"for reading. Only a 16-bit value can be read in using this function, " +"regardless of the native size of :c:expr:`short`." +msgstr "" + +#: c-api/marshal.rst:66 +msgid "" +"Return a Python object from the data stream in a :c:expr:`FILE*` opened for " +"reading." +msgstr "" + +#: c-api/marshal.rst:83 c-api/marshal.rst:92 +msgid "" +"On error, sets the appropriate exception (:exc:`EOFError`, :exc:`ValueError` " +"or :exc:`TypeError`) and returns ``NULL``." +msgstr "" + +#: c-api/marshal.rst:75 +msgid "" +"Return a Python object from the data stream in a :c:expr:`FILE*` opened for " +"reading. Unlike :c:func:`PyMarshal_ReadObjectFromFile`, this function " +"assumes that no further objects will be read from the file, allowing it to " +"aggressively load file data into memory so that the de-serialization can " +"operate from data in memory rather than reading a byte at a time from the " +"file. Only use these variant if you are certain that you won't be reading " +"anything else from the file." +msgstr "" + +#: c-api/marshal.rst:89 +msgid "" +"Return a Python object from the data stream in a byte buffer containing " +"*len* bytes pointed to by *data*." +msgstr "" diff --git a/c-api/memory.po b/c-api/memory.po new file mode 100644 index 0000000000..773069639c --- /dev/null +++ b/c-api/memory.po @@ -0,0 +1,1057 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-22 22:57+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \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" + +#: c-api/memory.rst:8 +msgid "Memory Management" +msgstr "" + +#: c-api/memory.rst:17 +msgid "Overview" +msgstr "Aperçu" + +#: c-api/memory.rst:19 +msgid "" +"Memory management in Python involves a private heap containing all Python " +"objects and data structures. The management of this private heap is ensured " +"internally by the *Python memory manager*. The Python memory manager has " +"different components which deal with various dynamic storage management " +"aspects, like sharing, segmentation, preallocation or caching." +msgstr "" + +#: c-api/memory.rst:25 +msgid "" +"At the lowest level, a raw memory allocator ensures that there is enough " +"room in the private heap for storing all Python-related data by interacting " +"with the memory manager of the operating system. On top of the raw memory " +"allocator, several object-specific allocators operate on the same heap and " +"implement distinct memory management policies adapted to the peculiarities " +"of every object type. For example, integer objects are managed differently " +"within the heap than strings, tuples or dictionaries because integers imply " +"different storage requirements and speed/space tradeoffs. The Python memory " +"manager thus delegates some of the work to the object-specific allocators, " +"but ensures that the latter operate within the bounds of the private heap." +msgstr "" + +#: c-api/memory.rst:36 +msgid "" +"It is important to understand that the management of the Python heap is " +"performed by the interpreter itself and that the user has no control over " +"it, even if they regularly manipulate object pointers to memory blocks " +"inside that heap. The allocation of heap space for Python objects and other " +"internal buffers is performed on demand by the Python memory manager through " +"the Python/C API functions listed in this document." +msgstr "" + +#: c-api/memory.rst:49 +msgid "" +"To avoid memory corruption, extension writers should never try to operate on " +"Python objects with the functions exported by the C library: :c:func:" +"`malloc`, :c:func:`calloc`, :c:func:`realloc` and :c:func:`free`. This will " +"result in mixed calls between the C allocator and the Python memory manager " +"with fatal consequences, because they implement different algorithms and " +"operate on different heaps. However, one may safely allocate and release " +"memory blocks with the C library allocator for individual purposes, as shown " +"in the following example::" +msgstr "" + +#: c-api/memory.rst:68 +msgid "" +"In this example, the memory request for the I/O buffer is handled by the C " +"library allocator. The Python memory manager is involved only in the " +"allocation of the bytes object returned as a result." +msgstr "" + +#: c-api/memory.rst:72 +msgid "" +"In most situations, however, it is recommended to allocate memory from the " +"Python heap specifically because the latter is under control of the Python " +"memory manager. For example, this is required when the interpreter is " +"extended with new object types written in C. Another reason for using the " +"Python heap is the desire to *inform* the Python memory manager about the " +"memory needs of the extension module. Even when the requested memory is used " +"exclusively for internal, highly specific purposes, delegating all memory " +"requests to the Python memory manager causes the interpreter to have a more " +"accurate image of its memory footprint as a whole. Consequently, under " +"certain circumstances, the Python memory manager may or may not trigger " +"appropriate actions, like garbage collection, memory compaction or other " +"preventive procedures. Note that by using the C library allocator as shown " +"in the previous example, the allocated memory for the I/O buffer escapes " +"completely the Python memory manager." +msgstr "" + +#: c-api/memory.rst:88 +msgid "" +"The :envvar:`PYTHONMALLOC` environment variable can be used to configure the " +"memory allocators used by Python." +msgstr "" + +#: c-api/memory.rst:91 +msgid "" +"The :envvar:`PYTHONMALLOCSTATS` environment variable can be used to print " +"statistics of the :ref:`pymalloc memory allocator ` every time a " +"new pymalloc object arena is created, and on shutdown." +msgstr "" + +#: c-api/memory.rst:96 +msgid "Allocator Domains" +msgstr "" + +#: c-api/memory.rst:100 +msgid "" +"All allocating functions belong to one of three different \"domains\" (see " +"also :c:type:`PyMemAllocatorDomain`). These domains represent different " +"allocation strategies and are optimized for different purposes. The specific " +"details on how every domain allocates memory or what internal functions each " +"domain calls is considered an implementation detail, but for debugging " +"purposes a simplified table can be found at :ref:`here `. There is no hard requirement to use the memory returned by the " +"allocation functions belonging to a given domain for only the purposes " +"hinted by that domain (although this is the recommended practice). For " +"example, one could use the memory returned by :c:func:`PyMem_RawMalloc` for " +"allocating Python objects or the memory returned by :c:func:" +"`PyObject_Malloc` for allocating memory for buffers." +msgstr "" + +#: c-api/memory.rst:112 +msgid "The three allocation domains are:" +msgstr "" + +#: c-api/memory.rst:114 +msgid "" +"Raw domain: intended for allocating memory for general-purpose memory " +"buffers where the allocation *must* go to the system allocator or where the " +"allocator can operate without the :term:`GIL`. The memory is requested " +"directly to the system." +msgstr "" + +#: c-api/memory.rst:119 +msgid "" +"\"Mem\" domain: intended for allocating memory for Python buffers and " +"general-purpose memory buffers where the allocation must be performed with " +"the :term:`GIL` held. The memory is taken from the Python private heap." +msgstr "" + +#: c-api/memory.rst:123 +msgid "" +"Object domain: intended for allocating memory belonging to Python objects. " +"The memory is taken from the Python private heap." +msgstr "" + +#: c-api/memory.rst:126 +msgid "" +"When freeing memory previously allocated by the allocating functions " +"belonging to a given domain,the matching specific deallocating functions " +"must be used. For example, :c:func:`PyMem_Free` must be used to free memory " +"allocated using :c:func:`PyMem_Malloc`." +msgstr "" + +#: c-api/memory.rst:131 +msgid "Raw Memory Interface" +msgstr "" + +#: c-api/memory.rst:133 +msgid "" +"The following function sets are wrappers to the system allocator. These " +"functions are thread-safe, the :term:`GIL ` does " +"not need to be held." +msgstr "" + +#: c-api/memory.rst:137 +msgid "" +"The :ref:`default raw memory allocator ` uses the " +"following functions: :c:func:`malloc`, :c:func:`calloc`, :c:func:`realloc` " +"and :c:func:`free`; call ``malloc(1)`` (or ``calloc(1, 1)``) when requesting " +"zero bytes." +msgstr "" + +#: c-api/memory.rst:217 c-api/memory.rst:325 +msgid "" +"Allocates *n* bytes and returns a pointer of type :c:expr:`void*` to the " +"allocated memory, or ``NULL`` if the request fails." +msgstr "" + +#: c-api/memory.rst:149 +msgid "" +"Requesting zero bytes returns a distinct non-``NULL`` pointer if possible, " +"as if ``PyMem_RawMalloc(1)`` had been called instead. The memory will not " +"have been initialized in any way." +msgstr "" + +#: c-api/memory.rst:227 c-api/memory.rst:335 +msgid "" +"Allocates *nelem* elements each whose size in bytes is *elsize* and returns " +"a pointer of type :c:expr:`void*` to the allocated memory, or ``NULL`` if " +"the request fails. The memory is initialized to zeros." +msgstr "" + +#: c-api/memory.rst:160 +msgid "" +"Requesting zero elements or elements of size zero bytes returns a distinct " +"non-``NULL`` pointer if possible, as if ``PyMem_RawCalloc(1, 1)`` had been " +"called instead." +msgstr "" + +#: c-api/memory.rst:240 c-api/memory.rst:348 +msgid "" +"Resizes the memory block pointed to by *p* to *n* bytes. The contents will " +"be unchanged to the minimum of the old and the new sizes." +msgstr "" + +#: c-api/memory.rst:172 +msgid "" +"If *p* is ``NULL``, the call is equivalent to ``PyMem_RawMalloc(n)``; else " +"if *n* is equal to zero, the memory block is resized but is not freed, and " +"the returned pointer is non-``NULL``." +msgstr "" + +#: c-api/memory.rst:176 +msgid "" +"Unless *p* is ``NULL``, it must have been returned by a previous call to :c:" +"func:`PyMem_RawMalloc`, :c:func:`PyMem_RawRealloc` or :c:func:" +"`PyMem_RawCalloc`." +msgstr "" + +#: c-api/memory.rst:180 +msgid "" +"If the request fails, :c:func:`PyMem_RawRealloc` returns ``NULL`` and *p* " +"remains a valid pointer to the previous memory area." +msgstr "" + +#: c-api/memory.rst:186 +msgid "" +"Frees the memory block pointed to by *p*, which must have been returned by a " +"previous call to :c:func:`PyMem_RawMalloc`, :c:func:`PyMem_RawRealloc` or :c:" +"func:`PyMem_RawCalloc`. Otherwise, or if ``PyMem_RawFree(p)`` has been " +"called before, undefined behavior occurs." +msgstr "" + +#: c-api/memory.rst:261 c-api/memory.rst:369 +msgid "If *p* is ``NULL``, no operation is performed." +msgstr "" + +#: c-api/memory.rst:197 +msgid "Memory Interface" +msgstr "" + +#: c-api/memory.rst:305 +msgid "" +"The following function sets, modeled after the ANSI C standard, but " +"specifying behavior when requesting zero bytes, are available for allocating " +"and releasing memory from the Python heap." +msgstr "" + +#: c-api/memory.rst:203 +msgid "" +"The :ref:`default memory allocator ` uses the :" +"ref:`pymalloc memory allocator `." +msgstr "" + +#: c-api/memory.rst:320 +msgid "" +"The :term:`GIL ` must be held when using these " +"functions." +msgstr "" + +#: c-api/memory.rst:213 +msgid "" +"The default allocator is now pymalloc instead of system :c:func:`malloc`." +msgstr "" + +#: c-api/memory.rst:220 +msgid "" +"Requesting zero bytes returns a distinct non-``NULL`` pointer if possible, " +"as if ``PyMem_Malloc(1)`` had been called instead. The memory will not have " +"been initialized in any way." +msgstr "" + +#: c-api/memory.rst:231 +msgid "" +"Requesting zero elements or elements of size zero bytes returns a distinct " +"non-``NULL`` pointer if possible, as if ``PyMem_Calloc(1, 1)`` had been " +"called instead." +msgstr "" + +#: c-api/memory.rst:243 +msgid "" +"If *p* is ``NULL``, the call is equivalent to ``PyMem_Malloc(n)``; else if " +"*n* is equal to zero, the memory block is resized but is not freed, and the " +"returned pointer is non-``NULL``." +msgstr "" + +#: c-api/memory.rst:247 +msgid "" +"Unless *p* is ``NULL``, it must have been returned by a previous call to :c:" +"func:`PyMem_Malloc`, :c:func:`PyMem_Realloc` or :c:func:`PyMem_Calloc`." +msgstr "" + +#: c-api/memory.rst:250 +msgid "" +"If the request fails, :c:func:`PyMem_Realloc` returns ``NULL`` and *p* " +"remains a valid pointer to the previous memory area." +msgstr "" + +#: c-api/memory.rst:256 +msgid "" +"Frees the memory block pointed to by *p*, which must have been returned by a " +"previous call to :c:func:`PyMem_Malloc`, :c:func:`PyMem_Realloc` or :c:func:" +"`PyMem_Calloc`. Otherwise, or if ``PyMem_Free(p)`` has been called before, " +"undefined behavior occurs." +msgstr "" + +#: c-api/memory.rst:263 +msgid "" +"The following type-oriented macros are provided for convenience. Note that " +"*TYPE* refers to any C type." +msgstr "" + +#: c-api/memory.rst:269 +msgid "" +"Same as :c:func:`PyMem_Malloc`, but allocates ``(n * sizeof(TYPE))`` bytes " +"of memory. Returns a pointer cast to :c:expr:`TYPE*`. The memory will not " +"have been initialized in any way." +msgstr "" + +#: c-api/memory.rst:276 +msgid "" +"Same as :c:func:`PyMem_Realloc`, but the memory block is resized to ``(n * " +"sizeof(TYPE))`` bytes. Returns a pointer cast to :c:expr:`TYPE*`. On " +"return, *p* will be a pointer to the new memory area, or ``NULL`` in the " +"event of failure." +msgstr "" + +#: c-api/memory.rst:281 +msgid "" +"This is a C preprocessor macro; *p* is always reassigned. Save the original " +"value of *p* to avoid losing memory when handling errors." +msgstr "" + +#: c-api/memory.rst:287 +msgid "Same as :c:func:`PyMem_Free`." +msgstr "" + +#: c-api/memory.rst:289 +msgid "" +"In addition, the following macro sets are provided for calling the Python " +"memory allocator directly, without involving the C API functions listed " +"above. However, note that their use does not preserve binary compatibility " +"across Python versions and is therefore deprecated in extension modules." +msgstr "" + +#: c-api/memory.rst:294 +msgid "``PyMem_MALLOC(size)``" +msgstr "" + +#: c-api/memory.rst:295 +msgid "``PyMem_NEW(type, size)``" +msgstr "" + +#: c-api/memory.rst:296 +msgid "``PyMem_REALLOC(ptr, size)``" +msgstr "" + +#: c-api/memory.rst:297 +msgid "``PyMem_RESIZE(ptr, type, size)``" +msgstr "" + +#: c-api/memory.rst:298 +msgid "``PyMem_FREE(ptr)``" +msgstr "" + +#: c-api/memory.rst:299 +msgid "``PyMem_DEL(ptr)``" +msgstr "" + +#: c-api/memory.rst:303 +msgid "Object allocators" +msgstr "" + +#: c-api/memory.rst:310 +msgid "" +"There is no guarantee that the memory returned by these allocators can be " +"successfully cast to a Python object when intercepting the allocating " +"functions in this domain by the methods described in the :ref:`Customize " +"Memory Allocators ` section." +msgstr "" + +#: c-api/memory.rst:315 +msgid "" +"The :ref:`default object allocator ` uses the :" +"ref:`pymalloc memory allocator `." +msgstr "" + +#: c-api/memory.rst:328 +msgid "" +"Requesting zero bytes returns a distinct non-``NULL`` pointer if possible, " +"as if ``PyObject_Malloc(1)`` had been called instead. The memory will not " +"have been initialized in any way." +msgstr "" + +#: c-api/memory.rst:339 +msgid "" +"Requesting zero elements or elements of size zero bytes returns a distinct " +"non-``NULL`` pointer if possible, as if ``PyObject_Calloc(1, 1)`` had been " +"called instead." +msgstr "" + +#: c-api/memory.rst:351 +msgid "" +"If *p* is ``NULL``, the call is equivalent to ``PyObject_Malloc(n)``; else " +"if *n* is equal to zero, the memory block is resized but is not freed, and " +"the returned pointer is non-``NULL``." +msgstr "" + +#: c-api/memory.rst:355 +msgid "" +"Unless *p* is ``NULL``, it must have been returned by a previous call to :c:" +"func:`PyObject_Malloc`, :c:func:`PyObject_Realloc` or :c:func:" +"`PyObject_Calloc`." +msgstr "" + +#: c-api/memory.rst:358 +msgid "" +"If the request fails, :c:func:`PyObject_Realloc` returns ``NULL`` and *p* " +"remains a valid pointer to the previous memory area." +msgstr "" + +#: c-api/memory.rst:364 +msgid "" +"Frees the memory block pointed to by *p*, which must have been returned by a " +"previous call to :c:func:`PyObject_Malloc`, :c:func:`PyObject_Realloc` or :c:" +"func:`PyObject_Calloc`. Otherwise, or if ``PyObject_Free(p)`` has been " +"called before, undefined behavior occurs." +msgstr "" + +#: c-api/memory.rst:375 +msgid "Default Memory Allocators" +msgstr "" + +#: c-api/memory.rst:377 +msgid "Default memory allocators:" +msgstr "" + +#: c-api/memory.rst:380 +msgid "Configuration" +msgstr "Configuration" + +#: c-api/memory.rst:380 +msgid "Name" +msgstr "Nom" + +#: c-api/memory.rst:380 +msgid "PyMem_RawMalloc" +msgstr "" + +#: c-api/memory.rst:380 +msgid "PyMem_Malloc" +msgstr "" + +#: c-api/memory.rst:380 +msgid "PyObject_Malloc" +msgstr "" + +#: c-api/memory.rst:382 +msgid "Release build" +msgstr "" + +#: c-api/memory.rst:382 +msgid "``\"pymalloc\"``" +msgstr "" + +#: c-api/memory.rst:384 +msgid "``malloc``" +msgstr "" + +#: c-api/memory.rst:382 +msgid "``pymalloc``" +msgstr "" + +#: c-api/memory.rst:383 +msgid "Debug build" +msgstr "" + +#: c-api/memory.rst:383 +msgid "``\"pymalloc_debug\"``" +msgstr "" + +#: c-api/memory.rst:385 +msgid "``malloc`` + debug" +msgstr "" + +#: c-api/memory.rst:383 +msgid "``pymalloc`` + debug" +msgstr "" + +#: c-api/memory.rst:384 +msgid "Release build, without pymalloc" +msgstr "" + +#: c-api/memory.rst:384 +msgid "``\"malloc\"``" +msgstr "" + +#: c-api/memory.rst:385 +msgid "Debug build, without pymalloc" +msgstr "" + +#: c-api/memory.rst:385 +msgid "``\"malloc_debug\"``" +msgstr "" + +#: c-api/memory.rst:388 +msgid "Legend:" +msgstr "" + +#: c-api/memory.rst:390 +msgid "Name: value for :envvar:`PYTHONMALLOC` environment variable." +msgstr "" + +#: c-api/memory.rst:391 +msgid "" +"``malloc``: system allocators from the standard C library, C functions: :c:" +"func:`malloc`, :c:func:`calloc`, :c:func:`realloc` and :c:func:`free`." +msgstr "" + +#: c-api/memory.rst:393 +msgid "``pymalloc``: :ref:`pymalloc memory allocator `." +msgstr "" + +#: c-api/memory.rst:394 +msgid "" +"\"+ debug\": with :ref:`debug hooks on the Python memory allocators `." +msgstr "" + +#: c-api/memory.rst:396 +msgid "\"Debug build\": :ref:`Python build in debug mode `." +msgstr "" + +#: c-api/memory.rst:401 +msgid "Customize Memory Allocators" +msgstr "" + +#: c-api/memory.rst:407 +msgid "" +"Structure used to describe a memory block allocator. The structure has the " +"following fields:" +msgstr "" + +#: c-api/memory.rst:647 +msgid "Field" +msgstr "Champ" + +#: c-api/memory.rst:647 +msgid "Meaning" +msgstr "Signification" + +#: c-api/memory.rst:649 +msgid "``void *ctx``" +msgstr "``void *ctx``" + +#: c-api/memory.rst:649 +msgid "user context passed as first argument" +msgstr "" + +#: c-api/memory.rst:415 +msgid "``void* malloc(void *ctx, size_t size)``" +msgstr "``void* malloc(void *ctx, size_t size)``" + +#: c-api/memory.rst:415 +msgid "allocate a memory block" +msgstr "" + +#: c-api/memory.rst:417 +msgid "``void* calloc(void *ctx, size_t nelem, size_t elsize)``" +msgstr "" + +#: c-api/memory.rst:417 +msgid "allocate a memory block initialized with zeros" +msgstr "" + +#: c-api/memory.rst:420 +msgid "``void* realloc(void *ctx, void *ptr, size_t new_size)``" +msgstr "" + +#: c-api/memory.rst:420 +msgid "allocate or resize a memory block" +msgstr "" + +#: c-api/memory.rst:422 +msgid "``void free(void *ctx, void *ptr)``" +msgstr "``void free(void *ctx, void *ptr)``" + +#: c-api/memory.rst:422 +msgid "free a memory block" +msgstr "" + +#: c-api/memory.rst:425 +msgid "" +"The :c:type:`PyMemAllocator` structure was renamed to :c:type:" +"`PyMemAllocatorEx` and a new ``calloc`` field was added." +msgstr "" + +#: c-api/memory.rst:432 +msgid "Enum used to identify an allocator domain. Domains:" +msgstr "" + +#: c-api/memory.rst:445 c-api/memory.rst:454 +#, fuzzy +msgid "Functions:" +msgstr "Fonctions" + +#: c-api/memory.rst:438 +#, fuzzy +msgid ":c:func:`PyMem_RawMalloc`" +msgstr ":c:func:`PyMem_RawCalloc`," + +#: c-api/memory.rst:439 +#, fuzzy +msgid ":c:func:`PyMem_RawRealloc`" +msgstr ":c:func:`PyMem_RawCalloc`," + +#: c-api/memory.rst:440 +#, fuzzy +msgid ":c:func:`PyMem_RawCalloc`" +msgstr ":c:func:`PyMem_RawCalloc`," + +#: c-api/memory.rst:441 +msgid ":c:func:`PyMem_RawFree`" +msgstr "" + +#: c-api/memory.rst:447 +#, fuzzy +msgid ":c:func:`PyMem_Malloc`," +msgstr ":c:func:`PyMem_Calloc`," + +#: c-api/memory.rst:448 +#, fuzzy +msgid ":c:func:`PyMem_Realloc`" +msgstr ":c:func:`PyMem_Calloc`," + +#: c-api/memory.rst:449 +#, fuzzy +msgid ":c:func:`PyMem_Calloc`" +msgstr ":c:func:`PyMem_Calloc`," + +#: c-api/memory.rst:450 +msgid ":c:func:`PyMem_Free`" +msgstr "" + +#: c-api/memory.rst:456 +msgid ":c:func:`PyObject_Malloc`" +msgstr "" + +#: c-api/memory.rst:457 +msgid ":c:func:`PyObject_Realloc`" +msgstr "" + +#: c-api/memory.rst:458 +msgid ":c:func:`PyObject_Calloc`" +msgstr "" + +#: c-api/memory.rst:459 +msgid ":c:func:`PyObject_Free`" +msgstr "" + +#: c-api/memory.rst:463 +msgid "Get the memory block allocator of the specified domain." +msgstr "" + +#: c-api/memory.rst:468 +msgid "Set the memory block allocator of the specified domain." +msgstr "" + +#: c-api/memory.rst:470 +msgid "" +"The new allocator must return a distinct non-``NULL`` pointer when " +"requesting zero bytes." +msgstr "" + +#: c-api/memory.rst:473 +msgid "" +"For the :c:data:`PYMEM_DOMAIN_RAW` domain, the allocator must be thread-" +"safe: the :term:`GIL ` is not held when the " +"allocator is called." +msgstr "" + +#: c-api/memory.rst:477 +msgid "" +"If the new allocator is not a hook (does not call the previous allocator), " +"the :c:func:`PyMem_SetupDebugHooks` function must be called to reinstall the " +"debug hooks on top on the new allocator." +msgstr "" + +#: c-api/memory.rst:484 +msgid ":c:func:`PyMem_SetAllocator` does have the following contract:" +msgstr "" + +#: c-api/memory.rst:486 +msgid "" +"It can be called after :c:func:`Py_PreInitialize` and before :c:func:" +"`Py_InitializeFromConfig` to install a custom memory allocator. There are no " +"restrictions over the installed allocator other than the ones imposed by the " +"domain (for instance, the Raw Domain allows the allocator to be called " +"without the GIL held). See :ref:`the section on allocator domains ` for more information." +msgstr "" + +#: c-api/memory.rst:494 +msgid "" +"If called after Python has finish initializing (after :c:func:" +"`Py_InitializeFromConfig` has been called) the allocator **must** wrap the " +"existing allocator. Substituting the current allocator for some other " +"arbitrary one is **not supported**." +msgstr "" + +#: c-api/memory.rst:503 +msgid "" +"Setup :ref:`debug hooks in the Python memory allocators ` " +"to detect memory errors." +msgstr "" + +#: c-api/memory.rst:510 +msgid "Debug hooks on the Python memory allocators" +msgstr "" + +#: c-api/memory.rst:512 +msgid "" +"When :ref:`Python is built in debug mode `, the :c:func:" +"`PyMem_SetupDebugHooks` function is called at the :ref:`Python " +"preinitialization ` to setup debug hooks on Python memory " +"allocators to detect memory errors." +msgstr "" + +#: c-api/memory.rst:517 +msgid "" +"The :envvar:`PYTHONMALLOC` environment variable can be used to install debug " +"hooks on a Python compiled in release mode (ex: ``PYTHONMALLOC=debug``)." +msgstr "" + +#: c-api/memory.rst:520 +msgid "" +"The :c:func:`PyMem_SetupDebugHooks` function can be used to set debug hooks " +"after calling :c:func:`PyMem_SetAllocator`." +msgstr "" + +#: c-api/memory.rst:523 +msgid "" +"These debug hooks fill dynamically allocated memory blocks with special, " +"recognizable bit patterns. Newly allocated memory is filled with the byte " +"``0xCD`` (``PYMEM_CLEANBYTE``), freed memory is filled with the byte " +"``0xDD`` (``PYMEM_DEADBYTE``). Memory blocks are surrounded by \"forbidden " +"bytes\" filled with the byte ``0xFD`` (``PYMEM_FORBIDDENBYTE``). Strings of " +"these bytes are unlikely to be valid addresses, floats, or ASCII strings." +msgstr "" + +#: c-api/memory.rst:530 +msgid "Runtime checks:" +msgstr "" + +#: c-api/memory.rst:532 +msgid "" +"Detect API violations. For example, detect if :c:func:`PyObject_Free` is " +"called on a memory block allocated by :c:func:`PyMem_Malloc`." +msgstr "" + +#: c-api/memory.rst:534 +msgid "Detect write before the start of the buffer (buffer underflow)." +msgstr "" + +#: c-api/memory.rst:535 +msgid "Detect write after the end of the buffer (buffer overflow)." +msgstr "" + +#: c-api/memory.rst:536 +msgid "" +"Check that the :term:`GIL ` is held when allocator " +"functions of :c:data:`PYMEM_DOMAIN_OBJ` (ex: :c:func:`PyObject_Malloc`) and :" +"c:data:`PYMEM_DOMAIN_MEM` (ex: :c:func:`PyMem_Malloc`) domains are called." +msgstr "" + +#: c-api/memory.rst:541 +msgid "" +"On error, the debug hooks use the :mod:`tracemalloc` module to get the " +"traceback where a memory block was allocated. The traceback is only " +"displayed if :mod:`tracemalloc` is tracing Python memory allocations and the " +"memory block was traced." +msgstr "" + +#: c-api/memory.rst:546 +msgid "" +"Let *S* = ``sizeof(size_t)``. ``2*S`` bytes are added at each end of each " +"block of *N* bytes requested. The memory layout is like so, where p " +"represents the address returned by a malloc-like or realloc-like function " +"(``p[i:j]`` means the slice of bytes from ``*(p+i)`` inclusive up to " +"``*(p+j)`` exclusive; note that the treatment of negative indices differs " +"from a Python slice):" +msgstr "" + +#: c-api/memory.rst:553 +msgid "``p[-2*S:-S]``" +msgstr "" + +#: c-api/memory.rst:553 +msgid "" +"Number of bytes originally asked for. This is a size_t, big-endian (easier " +"to read in a memory dump)." +msgstr "" + +#: c-api/memory.rst:560 +msgid "``p[-S]``" +msgstr "" + +#: c-api/memory.rst:556 +msgid "API identifier (ASCII character):" +msgstr "" + +#: c-api/memory.rst:558 +msgid "``'r'`` for :c:data:`PYMEM_DOMAIN_RAW`." +msgstr "" + +#: c-api/memory.rst:559 +msgid "``'m'`` for :c:data:`PYMEM_DOMAIN_MEM`." +msgstr "" + +#: c-api/memory.rst:560 +msgid "``'o'`` for :c:data:`PYMEM_DOMAIN_OBJ`." +msgstr "" + +#: c-api/memory.rst:563 +msgid "``p[-S+1:0]``" +msgstr "" + +#: c-api/memory.rst:563 +msgid "Copies of PYMEM_FORBIDDENBYTE. Used to catch under- writes and reads." +msgstr "" + +#: c-api/memory.rst:572 +msgid "``p[0:N]``" +msgstr "" + +#: c-api/memory.rst:566 +msgid "" +"The requested memory, filled with copies of PYMEM_CLEANBYTE, used to catch " +"reference to uninitialized memory. When a realloc-like function is called " +"requesting a larger memory block, the new excess bytes are also filled with " +"PYMEM_CLEANBYTE. When a free-like function is called, these are overwritten " +"with PYMEM_DEADBYTE, to catch reference to freed memory. When a realloc- " +"like function is called requesting a smaller memory block, the excess old " +"bytes are also filled with PYMEM_DEADBYTE." +msgstr "" + +#: c-api/memory.rst:575 +msgid "``p[N:N+S]``" +msgstr "" + +#: c-api/memory.rst:575 +msgid "Copies of PYMEM_FORBIDDENBYTE. Used to catch over- writes and reads." +msgstr "" + +#: c-api/memory.rst:586 +msgid "``p[N+S:N+2*S]``" +msgstr "" + +#: c-api/memory.rst:578 +msgid "" +"Only used if the ``PYMEM_DEBUG_SERIALNO`` macro is defined (not defined by " +"default)." +msgstr "" + +#: c-api/memory.rst:581 +msgid "" +"A serial number, incremented by 1 on each call to a malloc-like or realloc-" +"like function. Big-endian ``size_t``. If \"bad memory\" is detected later, " +"the serial number gives an excellent way to set a breakpoint on the next " +"run, to capture the instant at which this block was passed out. The static " +"function bumpserialno() in obmalloc.c is the only place the serial number is " +"incremented, and exists so you can set such a breakpoint easily." +msgstr "" + +#: c-api/memory.rst:588 +msgid "" +"A realloc-like or free-like function first checks that the " +"PYMEM_FORBIDDENBYTE bytes at each end are intact. If they've been altered, " +"diagnostic output is written to stderr, and the program is aborted via " +"Py_FatalError(). The other main failure mode is provoking a memory error " +"when a program reads up one of the special bit patterns and tries to use it " +"as an address. If you get in a debugger then and look at the object, you're " +"likely to see that it's entirely filled with PYMEM_DEADBYTE (meaning freed " +"memory is getting used) or PYMEM_CLEANBYTE (meaning uninitialized memory is " +"getting used)." +msgstr "" + +#: c-api/memory.rst:597 +msgid "" +"The :c:func:`PyMem_SetupDebugHooks` function now also works on Python " +"compiled in release mode. On error, the debug hooks now use :mod:" +"`tracemalloc` to get the traceback where a memory block was allocated. The " +"debug hooks now also check if the GIL is held when functions of :c:data:" +"`PYMEM_DOMAIN_OBJ` and :c:data:`PYMEM_DOMAIN_MEM` domains are called." +msgstr "" + +#: c-api/memory.rst:605 +msgid "" +"Byte patterns ``0xCB`` (``PYMEM_CLEANBYTE``), ``0xDB`` (``PYMEM_DEADBYTE``) " +"and ``0xFB`` (``PYMEM_FORBIDDENBYTE``) have been replaced with ``0xCD``, " +"``0xDD`` and ``0xFD`` to use the same values than Windows CRT debug " +"``malloc()`` and ``free()``." +msgstr "" + +#: c-api/memory.rst:615 +msgid "The pymalloc allocator" +msgstr "" + +#: c-api/memory.rst:617 +msgid "" +"Python has a *pymalloc* allocator optimized for small objects (smaller or " +"equal to 512 bytes) with a short lifetime. It uses memory mappings called " +"\"arenas\" with a fixed size of 256 KiB. It falls back to :c:func:" +"`PyMem_RawMalloc` and :c:func:`PyMem_RawRealloc` for allocations larger than " +"512 bytes." +msgstr "" + +#: c-api/memory.rst:622 +msgid "" +"*pymalloc* is the :ref:`default allocator ` of " +"the :c:data:`PYMEM_DOMAIN_MEM` (ex: :c:func:`PyMem_Malloc`) and :c:data:" +"`PYMEM_DOMAIN_OBJ` (ex: :c:func:`PyObject_Malloc`) domains." +msgstr "" + +#: c-api/memory.rst:626 +msgid "The arena allocator uses the following functions:" +msgstr "" + +#: c-api/memory.rst:628 +msgid ":c:func:`VirtualAlloc` and :c:func:`VirtualFree` on Windows," +msgstr "" + +#: c-api/memory.rst:629 +msgid ":c:func:`mmap` and :c:func:`munmap` if available," +msgstr "" + +#: c-api/memory.rst:630 +msgid ":c:func:`malloc` and :c:func:`free` otherwise." +msgstr "" + +#: c-api/memory.rst:632 +msgid "" +"This allocator is disabled if Python is configured with the :option:`--" +"without-pymalloc` option. It can also be disabled at runtime using the :" +"envvar:`PYTHONMALLOC` environment variable (ex: ``PYTHONMALLOC=malloc``)." +msgstr "" + +#: c-api/memory.rst:637 +msgid "Customize pymalloc Arena Allocator" +msgstr "" + +#: c-api/memory.rst:643 +msgid "" +"Structure used to describe an arena allocator. The structure has three " +"fields:" +msgstr "" + +#: c-api/memory.rst:651 +msgid "``void* alloc(void *ctx, size_t size)``" +msgstr "``void* alloc(void *ctx, size_t size)``" + +#: c-api/memory.rst:651 +msgid "allocate an arena of size bytes" +msgstr "" + +#: c-api/memory.rst:653 +#, fuzzy +msgid "``void free(void *ctx, void *ptr, size_t size)``" +msgstr "``void free(void *ctx, void *ptr)``" + +#: c-api/memory.rst:653 +msgid "free an arena" +msgstr "" + +#: c-api/memory.rst:658 +msgid "Get the arena allocator." +msgstr "" + +#: c-api/memory.rst:662 +msgid "Set the arena allocator." +msgstr "" + +#: c-api/memory.rst:666 +msgid "tracemalloc C API" +msgstr "" + +#: c-api/memory.rst:672 +msgid "Track an allocated memory block in the :mod:`tracemalloc` module." +msgstr "" + +#: c-api/memory.rst:674 +msgid "" +"Return ``0`` on success, return ``-1`` on error (failed to allocate memory " +"to store the trace). Return ``-2`` if tracemalloc is disabled." +msgstr "" + +#: c-api/memory.rst:677 +msgid "If memory block is already tracked, update the existing trace." +msgstr "" + +#: c-api/memory.rst:681 +msgid "" +"Untrack an allocated memory block in the :mod:`tracemalloc` module. Do " +"nothing if the block was not tracked." +msgstr "" + +#: c-api/memory.rst:684 +msgid "Return ``-2`` if tracemalloc is disabled, otherwise return ``0``." +msgstr "" + +#: c-api/memory.rst:690 +msgid "Examples" +msgstr "Exemples" + +#: c-api/memory.rst:692 +msgid "" +"Here is the example from section :ref:`memoryoverview`, rewritten so that " +"the I/O buffer is allocated from the Python heap by using the first function " +"set::" +msgstr "" + +#: c-api/memory.rst:705 +msgid "The same code using the type-oriented function set::" +msgstr "" + +#: c-api/memory.rst:717 +msgid "" +"Note that in the two examples above, the buffer is always manipulated via " +"functions belonging to the same set. Indeed, it is required to use the same " +"memory API family for a given memory block, so that the risk of mixing " +"different allocators is reduced to a minimum. The following code sequence " +"contains two errors, one of which is labeled as *fatal* because it mixes two " +"different allocators operating on different heaps. ::" +msgstr "" + +#: c-api/memory.rst:732 +msgid "" +"In addition to the functions aimed at handling raw memory blocks from the " +"Python heap, objects in Python are allocated and released with :c:func:" +"`PyObject_New`, :c:func:`PyObject_NewVar` and :c:func:`PyObject_Del`." +msgstr "" + +#: c-api/memory.rst:736 +msgid "" +"These will be explained in the next chapter on defining and implementing new " +"object types in C." +msgstr "" + +#~ msgid "``void free(void *ctx, size_t size, void *ptr)``" +#~ msgstr "``void free(void *ctx, size_t size, void *ptr)``" diff --git a/c-api/memoryview.po b/c-api/memoryview.po new file mode 100644 index 0000000000..df8ea2099c --- /dev/null +++ b/c-api/memoryview.po @@ -0,0 +1,106 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +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: 2020-09-30 11:10+0200\n" +"Last-Translator: Andy Kwok \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" + +#: c-api/memoryview.rst:9 +msgid "MemoryView objects" +msgstr "Objets de type MemoryView" + +#: c-api/memoryview.rst:11 +msgid "" +"A :class:`memoryview` object exposes the C level :ref:`buffer interface " +"` as a Python object which can then be passed around like any " +"other object." +msgstr "" +"Un objet Python :class:`memoryview` expose le :ref:`protocole tampon " +"` du C. Cet objet peut ensuite être passé comme n'importe " +"quel objet." + +#: c-api/memoryview.rst:18 +msgid "" +"Create a memoryview object from an object that provides the buffer " +"interface. If *obj* supports writable buffer exports, the memoryview object " +"will be read/write, otherwise it may be either read-only or read/write at " +"the discretion of the exporter." +msgstr "" +"Crée un objet *memoryview* à partir d'un objet implémentant le protocole " +"tampon. Si *obj* permet d'exporter des tampons modifiables, l'objet " +"*memoryview* crée acceptera la lecture et écriture, sinon l'objet crée est " +"soit en lecture seule ou lecture/écriture, à la discrétion de l'*exporteur*." + +#: c-api/memoryview.rst:25 +msgid "" +"Create a memoryview object using *mem* as the underlying buffer. *flags* can " +"be one of :c:macro:`PyBUF_READ` or :c:macro:`PyBUF_WRITE`." +msgstr "" +"Crée un objet *memoryview* utilisant *mem* comme un tampon sous-jacent. " +"*flags* peut être :c:macro:`PyBUF_READ` ou :c:macro:`PyBUF_WRITE`." + +#: c-api/memoryview.rst:32 +msgid "" +"Create a memoryview object wrapping the given buffer structure *view*. For " +"simple byte buffers, :c:func:`PyMemoryView_FromMemory` is the preferred " +"function." +msgstr "" +"Crée un objet *memoryview* à partir de la structure tampon *view*. Pour de " +"simples tampons d'octets, :c:func:`PyMemoryView_FromMemory` est préférée." + +#: c-api/memoryview.rst:38 +msgid "" +"Create a memoryview object to a :term:`contiguous` chunk of memory (in " +"either 'C' or 'F'ortran *order*) from an object that defines the buffer " +"interface. If memory is contiguous, the memoryview object points to the " +"original memory. Otherwise, a copy is made and the memoryview points to a " +"new bytes object." +msgstr "" +"Crée un objet *memoryview* vers un segment de mémoire :term:`contiguous` " +"(organisé comme en ``'C'`` ou comme en ``'F'`` pour Fortran) à partir d'un " +"objet qui expose le protocole tampon. Si la mémoire est contiguë, l'objet " +"*memoryview* pointe vers la mémoire d'origine. Sinon une copie est faite et " +"la *memoryview* pointe vers un nouvel objet *bytes*." + +#: c-api/memoryview.rst:47 +#, fuzzy +msgid "" +"Return true if the object *obj* is a memoryview object. It is not currently " +"allowed to create subclasses of :class:`memoryview`. This function always " +"succeeds." +msgstr "" +"Renvoie vrai si l'objet *obj* est un objet *memoryview*. Il n'est pas permis " +"de créer une sous-classe de :class:`memoryview`." + +#: c-api/memoryview.rst:54 +msgid "" +"Return a pointer to the memoryview's private copy of the exporter's buffer. " +"*mview* **must** be a memoryview instance; this macro doesn't check its " +"type, you must do it yourself or you will risk crashes." +msgstr "" +"Retourne un pointeur vers la copie privée du tampon de l'*exporteur* de " +"*memoryview*. *mview* **doit** être une instance de *memoryview*; cette " +"macro ne vérifie pas le type, vous devez le faire vous-même sinon vous " +"pourriez subir un crash." + +#: c-api/memoryview.rst:60 +msgid "" +"Return either a pointer to the exporting object that the memoryview is based " +"on or ``NULL`` if the memoryview has been created by one of the functions :c:" +"func:`PyMemoryView_FromMemory` or :c:func:`PyMemoryView_FromBuffer`. *mview* " +"**must** be a memoryview instance." +msgstr "" +"Renvoie soit un pointeur vers l'objet exporté sur lequel est basé la " +"*memoryview* ou ``NULL`` si la *memoryview* a été crée par :c:func:" +"`PyMemoryView_FromMemory` ou :c:func:`PyMemoryView_FromBuffer`. *mview* " +"**doit** être une instance de *memoryview*." diff --git a/c-api/method.po b/c-api/method.po new file mode 100644 index 0000000000..7770ba02e1 --- /dev/null +++ b/c-api/method.po @@ -0,0 +1,103 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-04-05 10:05+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \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" + +#: c-api/method.rst:6 +msgid "Instance Method Objects" +msgstr "" + +#: c-api/method.rst:10 +msgid "" +"An instance method is a wrapper for a :c:data:`PyCFunction` and the new way " +"to bind a :c:data:`PyCFunction` to a class object. It replaces the former " +"call ``PyMethod_New(func, NULL, class)``." +msgstr "" + +#: c-api/method.rst:17 +msgid "" +"This instance of :c:type:`PyTypeObject` represents the Python instance " +"method type. It is not exposed to Python programs." +msgstr "" + +#: c-api/method.rst:23 +msgid "" +"Return true if *o* is an instance method object (has type :c:data:" +"`PyInstanceMethod_Type`). The parameter must not be ``NULL``. This function " +"always succeeds." +msgstr "" + +#: c-api/method.rst:30 +msgid "" +"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 "" + +#: c-api/method.rst:37 +msgid "Return the function object associated with the instance method *im*." +msgstr "" + +#: c-api/method.rst:42 +msgid "" +"Macro version of :c:func:`PyInstanceMethod_Function` which avoids error " +"checking." +msgstr "" + +#: c-api/method.rst:48 +msgid "Method Objects" +msgstr "Objets méthode" + +#: c-api/method.rst:52 +msgid "" +"Methods are bound function objects. Methods are always bound to an instance " +"of a user-defined class. Unbound methods (methods bound to a class object) " +"are no longer available." +msgstr "" + +#: c-api/method.rst:61 +msgid "" +"This instance of :c:type:`PyTypeObject` represents the Python method type. " +"This is exposed to Python programs as ``types.MethodType``." +msgstr "" + +#: c-api/method.rst:67 +msgid "" +"Return true if *o* is a method object (has type :c:data:`PyMethod_Type`). " +"The parameter must not be ``NULL``. This function always succeeds." +msgstr "" + +#: c-api/method.rst:73 +msgid "" +"Return a new method object, with *func* being any callable object and *self* " +"the instance the method should be bound. *func* is the function that will be " +"called when the method is called. *self* must not be ``NULL``." +msgstr "" + +#: c-api/method.rst:80 +msgid "Return the function object associated with the method *meth*." +msgstr "" + +#: c-api/method.rst:85 +msgid "" +"Macro version of :c:func:`PyMethod_Function` which avoids error checking." +msgstr "" + +#: c-api/method.rst:90 +msgid "Return the instance associated with the method *meth*." +msgstr "" + +#: c-api/method.rst:95 +msgid "Macro version of :c:func:`PyMethod_Self` which avoids error checking." +msgstr "" diff --git a/c-api/module.po b/c-api/module.po new file mode 100644 index 0000000000..fb3a4cb71d --- /dev/null +++ b/c-api/module.po @@ -0,0 +1,647 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-22 22:57+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \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" + +#: c-api/module.rst:6 +msgid "Module Objects" +msgstr "" + +#: c-api/module.rst:15 +msgid "" +"This instance of :c:type:`PyTypeObject` represents the Python module type. " +"This is exposed to Python programs as ``types.ModuleType``." +msgstr "" + +#: c-api/module.rst:21 +msgid "" +"Return true if *p* is a module object, or a subtype of a module object. This " +"function always succeeds." +msgstr "" + +#: c-api/module.rst:27 +msgid "" +"Return true if *p* is a module object, but not a subtype of :c:data:" +"`PyModule_Type`. This function always succeeds." +msgstr "" + +#: c-api/module.rst:40 +msgid "" +"Return a new module object with the :attr:`__name__` attribute set to " +"*name*. The module's :attr:`__name__`, :attr:`__doc__`, :attr:`__package__`, " +"and :attr:`__loader__` attributes are filled in (all but :attr:`__name__` " +"are set to ``None``); the caller is responsible for providing a :attr:" +"`__file__` attribute." +msgstr "" + +#: c-api/module.rst:48 +msgid ":attr:`__package__` and :attr:`__loader__` are set to ``None``." +msgstr "" + +#: c-api/module.rst:54 +msgid "" +"Similar to :c:func:`PyModule_NewObject`, but the name is a UTF-8 encoded " +"string instead of a Unicode object." +msgstr "" + +#: c-api/module.rst:62 +msgid "" +"Return the dictionary object that implements *module*'s namespace; this " +"object is the same as the :attr:`~object.__dict__` attribute of the module " +"object. If *module* is not a module object (or a subtype of a module " +"object), :exc:`SystemError` is raised and ``NULL`` is returned." +msgstr "" + +#: c-api/module.rst:67 +msgid "" +"It is recommended extensions use other ``PyModule_*`` and ``PyObject_*`` " +"functions rather than directly manipulate a module's :attr:`~object." +"__dict__`." +msgstr "" + +#: c-api/module.rst:78 +msgid "" +"Return *module*'s :attr:`__name__` value. If the module does not provide " +"one, or if it is not a string, :exc:`SystemError` is raised and ``NULL`` is " +"returned." +msgstr "" + +#: c-api/module.rst:86 +msgid "" +"Similar to :c:func:`PyModule_GetNameObject` but return the name encoded to " +"``'utf-8'``." +msgstr "" + +#: c-api/module.rst:91 +msgid "" +"Return the \"state\" of the module, that is, a pointer to the block of " +"memory allocated at module creation time, or ``NULL``. See :c:member:" +"`PyModuleDef.m_size`." +msgstr "" + +#: c-api/module.rst:98 +msgid "" +"Return a pointer to the :c:type:`PyModuleDef` struct from which the module " +"was created, or ``NULL`` if the module wasn't created from a definition." +msgstr "" + +#: c-api/module.rst:108 +msgid "" +"Return the name of the file from which *module* was loaded using *module*'s :" +"attr:`__file__` attribute. If this is not defined, or if it is not a " +"unicode string, raise :exc:`SystemError` and return ``NULL``; otherwise " +"return a reference to a Unicode object." +msgstr "" + +#: c-api/module.rst:118 +msgid "" +"Similar to :c:func:`PyModule_GetFilenameObject` but return the filename " +"encoded to 'utf-8'." +msgstr "" + +#: c-api/module.rst:121 +msgid "" +":c:func:`PyModule_GetFilename` raises :c:type:`UnicodeEncodeError` on " +"unencodable filenames, use :c:func:`PyModule_GetFilenameObject` instead." +msgstr "" + +#: c-api/module.rst:129 +msgid "Initializing C modules" +msgstr "" + +#: c-api/module.rst:131 +msgid "" +"Modules objects are usually created from extension modules (shared libraries " +"which export an initialization function), or compiled-in modules (where the " +"initialization function is added using :c:func:`PyImport_AppendInittab`). " +"See :ref:`building` or :ref:`extending-with-embedding` for details." +msgstr "" + +#: c-api/module.rst:136 +msgid "" +"The initialization function can either pass a module definition instance to :" +"c:func:`PyModule_Create`, and return the resulting module object, or request " +"\"multi-phase initialization\" by returning the definition struct itself." +msgstr "" + +#: c-api/module.rst:142 +msgid "" +"The module definition struct, which holds all information needed to create a " +"module object. There is usually only one statically initialized variable of " +"this type for each module." +msgstr "" + +#: c-api/module.rst:148 +msgid "Always initialize this member to :const:`PyModuleDef_HEAD_INIT`." +msgstr "" + +#: c-api/module.rst:152 +msgid "Name for the new module." +msgstr "" + +#: c-api/module.rst:156 +msgid "" +"Docstring for the module; usually a docstring variable created with :c:macro:" +"`PyDoc_STRVAR` is used." +msgstr "" + +#: c-api/module.rst:161 +msgid "" +"Module state may be kept in a per-module memory area that can be retrieved " +"with :c:func:`PyModule_GetState`, rather than in static globals. This makes " +"modules safe for use in multiple sub-interpreters." +msgstr "" + +#: c-api/module.rst:165 +msgid "" +"This memory area is allocated based on *m_size* on module creation, and " +"freed when the module object is deallocated, after the :c:member:`m_free` " +"function has been called, if present." +msgstr "" + +#: c-api/module.rst:169 +msgid "" +"Setting ``m_size`` to ``-1`` means that the module does not support sub-" +"interpreters, because it has global state." +msgstr "" + +#: c-api/module.rst:172 +msgid "" +"Setting it to a non-negative value means that the module can be re-" +"initialized and specifies the additional amount of memory it requires for " +"its state. Non-negative ``m_size`` is required for multi-phase " +"initialization." +msgstr "" + +#: c-api/module.rst:177 +msgid "See :PEP:`3121` for more details." +msgstr "" + +#: c-api/module.rst:181 +msgid "" +"A pointer to a table of module-level functions, described by :c:type:" +"`PyMethodDef` values. Can be ``NULL`` if no functions are present." +msgstr "" + +#: c-api/module.rst:186 +msgid "" +"An array of slot definitions for multi-phase initialization, terminated by a " +"``{0, NULL}`` entry. When using single-phase initialization, *m_slots* must " +"be ``NULL``." +msgstr "" + +#: c-api/module.rst:192 +msgid "" +"Prior to version 3.5, this member was always set to ``NULL``, and was " +"defined as:" +msgstr "" + +#: c-api/module.rst:199 +msgid "" +"A traversal function to call during GC traversal of the module object, or " +"``NULL`` if not needed." +msgstr "" + +#: 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 " +"before the module is executed (:c:data:`Py_mod_exec` function). More " +"precisely, this function is not called if :c:member:`m_size` is greater than " +"0 and the module state (as returned by :c:func:`PyModule_GetState`) is " +"``NULL``." +msgstr "" + +#: c-api/module.rst:230 c-api/module.rst:245 +msgid "No longer called before the module state is allocated." +msgstr "" + +#: c-api/module.rst:214 +msgid "" +"A clear function to call during GC clearing of the module object, or " +"``NULL`` if not needed." +msgstr "" + +#: 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:249 +msgid "Single-phase initialization" +msgstr "" + +#: 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: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: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: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:273 +msgid "" +"Before it is returned from in the initialization function, the resulting " +"module object is typically populated using functions like :c:func:" +"`PyModule_AddObjectRef`." +msgstr "" + +#: c-api/module.rst:279 +msgid "Multi-phase initialization" +msgstr "" + +#: 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 " +"modules: the initialization is split between the *creation phase*, when the " +"module object is created, and the *execution phase*, when it is populated. " +"The distinction is similar to the :py:meth:`__new__` and :py:meth:`__init__` " +"methods of classes." +msgstr "" + +#: 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-" +"imported, a new module object is created, and the old module is subject to " +"normal garbage collection -- as with Python modules. By default, multiple " +"modules created from the same definition should be independent: changes to " +"one should not affect the others. This means that all state should be " +"specific to the module object (using e.g. using :c:func:" +"`PyModule_GetState`), or its contents (such as the module's :attr:`__dict__` " +"or individual classes created with :c:func:`PyType_FromSpec`)." +msgstr "" + +#: 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:302 +msgid "" +"To request multi-phase initialization, the initialization function " +"(PyInit_modulename) returns a :c:type:`PyModuleDef` instance with non-empty :" +"c:member:`~PyModuleDef.m_slots`. Before it is returned, the ``PyModuleDef`` " +"instance must be initialized with the following function:" +msgstr "" + +#: 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:312 +msgid "Returns *def* cast to ``PyObject*``, or ``NULL`` if an error occurred." +msgstr "" + +#: 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:323 +msgid "A slot ID, chosen from the available values explained below." +msgstr "" + +#: c-api/module.rst:327 +msgid "Value of the slot, whose meaning depends on the slot ID." +msgstr "" + +#: c-api/module.rst:331 +msgid "The *m_slots* array must be terminated by a slot with id 0." +msgstr "" + +#: c-api/module.rst:333 +msgid "The available slot types are:" +msgstr "" + +#: 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: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: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:351 +msgid "" +"Multiple ``Py_mod_create`` slots may not be specified in one module " +"definition." +msgstr "" + +#: 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 " +"*spec*, not the definition, to allow extension modules to dynamically adjust " +"to their place in the module hierarchy and be imported under different names " +"through symlinks, all while sharing a single module definition." +msgstr "" + +#: 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 " +"getting import-related attributes. However, only ``PyModule_Type`` instances " +"may be returned if the ``PyModuleDef`` has non-``NULL`` ``m_traverse``, " +"``m_clear``, ``m_free``; non-zero ``m_size``; or slots other than " +"``Py_mod_create``." +msgstr "" + +#: 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 " +"function adds classes and constants to the module. The signature of the " +"function is:" +msgstr "" + +#: 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:379 +msgid "See :PEP:`489` for more details on multi-phase initialization." +msgstr "" + +#: c-api/module.rst:382 +msgid "Low-level module creation functions" +msgstr "" + +#: 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 " +"objects dynamically. Note that both ``PyModule_FromDefAndSpec`` and " +"``PyModule_ExecDef`` must be called to fully initialize a module." +msgstr "" + +#: c-api/module.rst:391 +msgid "" +"Create a new module object, given the definition in *def* 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:399 +msgid "" +"Create a new module object, given the definition in *def* and the ModuleSpec " +"*spec*, 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: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:413 +msgid "Process any execution slots (:c:data:`Py_mod_exec`) given in *def*." +msgstr "" + +#: 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:428 +msgid "" +"Add the functions from the ``NULL`` terminated *functions* array to " +"*module*. Refer to the :c:type:`PyMethodDef` documentation for details on " +"individual entries (due to the lack of a shared module namespace, module " +"level \"functions\" implemented in C typically receive the module as their " +"first parameter, making them similar to instance methods on Python classes). " +"This function is called automatically when creating a module from " +"``PyModuleDef``, using either ``PyModule_Create`` or " +"``PyModule_FromDefAndSpec``." +msgstr "" + +#: c-api/module.rst:440 +msgid "Support functions" +msgstr "" + +#: 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 " +"initialization), can use the following functions to help initialize the " +"module state:" +msgstr "" + +#: 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." +msgstr "" + +#: c-api/module.rst:452 +msgid "" +"On success, return ``0``. On error, raise an exception and return ``-1``." +msgstr "" + +#: c-api/module.rst:454 +msgid "" +"Return ``NULL`` if *value* is ``NULL``. It must be called with an exception " +"raised in this case." +msgstr "" + +#: c-api/module.rst:506 +msgid "Example usage::" +msgstr "Exemple d'utilisation ::" + +#: c-api/module.rst:524 +msgid "" +"The example can also be written without checking explicitly if *obj* is " +"``NULL``::" +msgstr "" + +#: c-api/module.rst:540 +msgid "" +"Note that ``Py_XDECREF()`` should be used instead of ``Py_DECREF()`` in this " +"case, since *obj* can be ``NULL``." +msgstr "" + +#: c-api/module.rst:491 +msgid "" +"Similar to :c:func:`PyModule_AddObjectRef`, but steals a reference to " +"*value* on success (if it returns ``0``)." +msgstr "" + +#: c-api/module.rst:494 +msgid "" +"The new :c:func:`PyModule_AddObjectRef` function is recommended, since it is " +"easy to introduce reference leaks by misusing the :c:func:" +"`PyModule_AddObject` function." +msgstr "" + +#: c-api/module.rst:500 +msgid "" +"Unlike other functions that steal references, ``PyModule_AddObject()`` only " +"decrements the reference count of *value* **on success**." +msgstr "" + +#: c-api/module.rst:503 +msgid "" +"This means that its return value must be checked, and calling code must :c:" +"func:`Py_DECREF` *value* manually on error." +msgstr "" + +#: c-api/module.rst:546 +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:553 +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:560 +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 " +"constant *AF_INET* with the value of *AF_INET* to *module*. Return ``-1`` on " +"error, ``0`` on success." +msgstr "" + +#: c-api/module.rst:568 +msgid "Add a string constant to *module*." +msgstr "" + +#: c-api/module.rst:572 +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 " +"the last component of :c:member:`~PyTypeObject.tp_name` after dot. Return " +"``-1`` on error, ``0`` on success." +msgstr "" + +#: c-api/module.rst:582 +msgid "Module lookup" +msgstr "" + +#: c-api/module.rst:584 +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:588 +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:593 +msgid "" +"Returns the module object that was created from *def* for the current " +"interpreter. This method requires that the module object has been attached " +"to the interpreter state with :c:func:`PyState_AddModule` beforehand. In " +"case the corresponding module object is not found or has not been attached " +"to the interpreter state yet, it returns ``NULL``." +msgstr "" + +#: c-api/module.rst:600 +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:603 +msgid "Only effective on modules created using single-phase initialization." +msgstr "" + +#: c-api/module.rst:605 +msgid "" +"Python calls ``PyState_AddModule`` automatically after importing a module, " +"so it is unnecessary (but harmless) to call it from module initialization " +"code. An explicit call is needed only if the module's own init code " +"subsequently calls ``PyState_FindModule``. The function is mainly intended " +"for implementing alternative import mechanisms (either by calling it " +"directly, or by referring to its implementation for details of the required " +"state updates)." +msgstr "" + +#: c-api/module.rst:624 +msgid "The caller must hold the GIL." +msgstr "" + +#: c-api/module.rst:615 +msgid "Return 0 on success or -1 on failure." +msgstr "" + +#: c-api/module.rst:621 +msgid "" +"Removes the module object created from *def* from the interpreter state. " +"Return 0 on success or -1 on failure." +msgstr "" diff --git a/c-api/none.po b/c-api/none.po new file mode 100644 index 0000000000..55612ac6ae --- /dev/null +++ b/c-api/none.po @@ -0,0 +1,49 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +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: 2017-11-05 11:18+0100\n" +"Last-Translator: Julien Palard \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" + +#: c-api/none.rst:6 +msgid "The ``None`` Object" +msgstr "L'objet ``None``" + +#: c-api/none.rst:10 +msgid "" +"Note that the :c:type:`PyTypeObject` for ``None`` is not directly exposed in " +"the Python/C API. Since ``None`` is a singleton, testing for object " +"identity (using ``==`` in C) is sufficient. There is no :c:func:" +"`PyNone_Check` function for the same reason." +msgstr "" +"Notez que le :c:type:`PyTypeObject` de ``None`` n'est pas directement exposé " +"via l'API Python/C. Puisque ``None`` est un singleton, tester son identité " +"(en utilisant ``==`` en C) est suffisant. Il n'existe pas de fonction :c:" +"func:`PyNone_Check` pour la même raison." + +#: c-api/none.rst:18 +msgid "" +"The Python ``None`` object, denoting lack of value. This object has no " +"methods. It needs to be treated just like any other object with respect to " +"reference counts." +msgstr "" +"L'objet Python ``None``, exprimant l'absence de valeur. Cet objet n'a " +"aucune méthode. Il doit être traité exactement comme les autres objets en " +"terme de comptage de références." + +#: c-api/none.rst:25 +msgid "" +"Properly handle returning :c:data:`Py_None` from within a C function (that " +"is, increment the reference count of ``None`` and return it.)" +msgstr "" +"Renvoie, de la bonne manière, :c:data:`Py_None` depuis une fonction C (c'est " +"à dire en incrémentant les références à ``None`` avant de le donner)." diff --git a/c-api/number.po b/c-api/number.po new file mode 100644 index 0000000000..0ae959fba5 --- /dev/null +++ b/c-api/number.po @@ -0,0 +1,298 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-05-21 16:37+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \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" + +#: c-api/number.rst:6 +msgid "Number Protocol" +msgstr "" + +#: c-api/number.rst:11 +msgid "" +"Returns ``1`` if the object *o* provides numeric protocols, and false " +"otherwise. This function always succeeds." +msgstr "" + +#: c-api/number.rst:14 +msgid "Returns ``1`` if *o* is an index integer." +msgstr "" + +#: c-api/number.rst:20 +msgid "" +"Returns the result of adding *o1* and *o2*, or ``NULL`` on failure. This is " +"the equivalent of the Python expression ``o1 + o2``." +msgstr "" + +#: c-api/number.rst:26 +msgid "" +"Returns the result of subtracting *o2* from *o1*, or ``NULL`` on failure. " +"This is the equivalent of the Python expression ``o1 - o2``." +msgstr "" + +#: c-api/number.rst:32 +msgid "" +"Returns the result of multiplying *o1* and *o2*, or ``NULL`` on failure. " +"This is the equivalent of the Python expression ``o1 * o2``." +msgstr "" + +#: c-api/number.rst:38 +msgid "" +"Returns the result of matrix multiplication on *o1* and *o2*, or ``NULL`` on " +"failure. This is the equivalent of the Python expression ``o1 @ o2``." +msgstr "" + +#: c-api/number.rst:46 +msgid "" +"Return the floor of *o1* divided by *o2*, or ``NULL`` on failure. This is " +"the equivalent of the Python expression ``o1 // o2``." +msgstr "" + +#: c-api/number.rst:52 +msgid "" +"Return a reasonable approximation for the mathematical value of *o1* divided " +"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. This is the equivalent of the Python " +"expression ``o1 / o2``." +msgstr "" + +#: c-api/number.rst:61 +msgid "" +"Returns the remainder of dividing *o1* by *o2*, or ``NULL`` on failure. " +"This is the equivalent of the Python expression ``o1 % o2``." +msgstr "" + +#: c-api/number.rst:69 +msgid "" +"See the built-in function :func:`divmod`. Returns ``NULL`` on failure. This " +"is the equivalent of the Python expression ``divmod(o1, o2)``." +msgstr "" + +#: c-api/number.rst:77 +msgid "" +"See the built-in function :func:`pow`. Returns ``NULL`` on failure. This is " +"the equivalent of the Python expression ``pow(o1, o2, o3)``, where *o3* is " +"optional. If *o3* is to be ignored, pass :c:data:`Py_None` in its place " +"(passing ``NULL`` for *o3* would cause an illegal memory access)." +msgstr "" + +#: c-api/number.rst:85 +msgid "" +"Returns the negation of *o* on success, or ``NULL`` on failure. This is the " +"equivalent of the Python expression ``-o``." +msgstr "" + +#: c-api/number.rst:91 +msgid "" +"Returns *o* on success, or ``NULL`` on failure. This is the equivalent of " +"the Python expression ``+o``." +msgstr "" + +#: c-api/number.rst:99 +msgid "" +"Returns the absolute value of *o*, or ``NULL`` on failure. This is the " +"equivalent of the Python expression ``abs(o)``." +msgstr "" + +#: c-api/number.rst:105 +msgid "" +"Returns the bitwise negation of *o* on success, or ``NULL`` on failure. " +"This is the equivalent of the Python expression ``~o``." +msgstr "" + +#: c-api/number.rst:111 +msgid "" +"Returns the result of left shifting *o1* by *o2* on success, or ``NULL`` on " +"failure. This is the equivalent of the Python expression ``o1 << o2``." +msgstr "" + +#: c-api/number.rst:117 +msgid "" +"Returns the result of right shifting *o1* by *o2* on success, or ``NULL`` on " +"failure. This is the equivalent of the Python expression ``o1 >> o2``." +msgstr "" + +#: c-api/number.rst:123 +msgid "" +"Returns the \"bitwise and\" of *o1* and *o2* on success and ``NULL`` on " +"failure. This is the equivalent of the Python expression ``o1 & o2``." +msgstr "" + +#: c-api/number.rst:129 +msgid "" +"Returns the \"bitwise exclusive or\" of *o1* by *o2* on success, or ``NULL`` " +"on failure. This is the equivalent of the Python expression ``o1 ^ o2``." +msgstr "" + +#: c-api/number.rst:135 +msgid "" +"Returns the \"bitwise or\" of *o1* and *o2* on success, or ``NULL`` on " +"failure. This is the equivalent of the Python expression ``o1 | o2``." +msgstr "" + +#: c-api/number.rst:141 +msgid "" +"Returns the result of adding *o1* and *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:148 +msgid "" +"Returns the result of subtracting *o2* from *o1*, 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:155 +msgid "" +"Returns the result of multiplying *o1* and *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:162 +msgid "" +"Returns the result of matrix multiplication on *o1* and *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:171 +msgid "" +"Returns the mathematical floor 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:178 +msgid "" +"Return a reasonable approximation for the mathematical value of *o1* divided " +"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. 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: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: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 " +"of the Python statement ``o1 **= o2`` when o3 is :c:data:`Py_None`, or an in-" +"place variant of ``pow(o1, o2, o3)`` otherwise. If *o3* is to be ignored, " +"pass :c:data:`Py_None` in its place (passing ``NULL`` for *o3* would cause " +"an illegal memory access)." +msgstr "" + +#: 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: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: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: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: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: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: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: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:260 +msgid "" +"The result always has exact type :class:`int`. Previously, the result could " +"have been an instance of a subclass of ``int``." +msgstr "" + +#: c-api/number.rst:267 +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 " +"string is prefixed with a base marker of ``'0b'``, ``'0o'``, or ``'0x'``, " +"respectively. If *n* is not a Python int, it is converted with :c:func:" +"`PyNumber_Index` first." +msgstr "" + +#: c-api/number.rst:276 +msgid "" +"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:279 +msgid "" +"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:289 +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." +msgstr "" diff --git a/c-api/objbuffer.po b/c-api/objbuffer.po new file mode 100644 index 0000000000..0d2b4fc858 --- /dev/null +++ b/c-api/objbuffer.po @@ -0,0 +1,111 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +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-04-11 19:43+0200\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.1\n" + +#: c-api/objbuffer.rst:4 +msgid "Old Buffer Protocol" +msgstr "Ancien Protocole Tampon" + +#: c-api/objbuffer.rst:8 +msgid "" +"These functions were part of the \"old buffer protocol\" API in Python 2. In " +"Python 3, this protocol doesn't exist anymore but the functions are still " +"exposed to ease porting 2.x code. They act as a compatibility wrapper " +"around the :ref:`new buffer protocol `, but they don't give " +"you control over the lifetime of the resources acquired when a buffer is " +"exported." +msgstr "" +"Ces fonctions faisaient partie de l'API de l'ancien protocole de tampons " +"dans Python 2. Dans Python 3, ce protocole n'existe plus, mais les fonctions " +"sont toujours exposées pour simplifier le portage de code Python 2.x. Elles " +"se comportent comme une abstraction de compatibilité du :ref:`nouveau " +"protocole de tampons `, mais sans vous donner de contrôle sur " +"la durée de vie des ressources acquises lorsqu'un tampon est exporté." + +#: c-api/objbuffer.rst:15 +msgid "" +"Therefore, it is recommended that you call :c:func:`PyObject_GetBuffer` (or " +"the ``y*`` or ``w*`` :ref:`format codes ` with the :c:func:" +"`PyArg_ParseTuple` family of functions) to get a buffer view over an object, " +"and :c:func:`PyBuffer_Release` when the buffer view can be released." +msgstr "" +"Il est donc recommandé d'appeler :c:func:`PyObject_GetBuffer` (ou les :ref:" +"`codes ` ``y*`` ou ``w*`` à la famille de fonctions :c:func:" +"`PyArg_ParseTuple`) pour obtenir une vue d'un tampon sur un objet, et :c:" +"func:`PyBuffer_Release` lorsque la vue peut être libérée." + +#: c-api/objbuffer.rst:23 +msgid "" +"Returns a pointer to a read-only memory location usable as character-based " +"input. The *obj* argument must support the single-segment character buffer " +"interface. On success, returns ``0``, sets *buffer* to the memory location " +"and *buffer_len* to the buffer length. Returns ``-1`` and sets a :exc:" +"`TypeError` on error." +msgstr "" +"Retourne un pointeur vers un emplacement de mémoire en lecture seule " +"utilisable en tant qu'entrée basée sur des caractères. L'argument *obj* doit " +"prendre en charge l'interface de tampon de caractère à segment unique. En " +"cas de succès, retourne ``0``, définit *buffer* à l'emplacement de la " +"mémoire et *buffer_len* à la longueur de la mémoire tampon. Retourne ``-1`` " +"et affecte une exception :exc:`TypeError` en cas d'erreur." + +#: c-api/objbuffer.rst:32 +msgid "" +"Returns a pointer to a read-only memory location containing arbitrary data. " +"The *obj* argument must support the single-segment readable buffer " +"interface. On success, returns ``0``, sets *buffer* to the memory location " +"and *buffer_len* to the buffer length. Returns ``-1`` and sets a :exc:" +"`TypeError` on error." +msgstr "" +"Retourne un pointeur vers un emplacement de mémoire en lecture seule " +"contenant des données arbitraires. L'argument *obj* doit prendre en charge " +"l'interface de tampon lisible à segment unique. En cas de succès, retourne " +"``0``, définit *buffer* à l'emplacement de la mémoire et *buffer_len* à la " +"longueur de la mémoire tampon. Renvoie ``-1`` et affecte l'exception :exc:" +"`TypeError` en cas d'erreur." + +#: c-api/objbuffer.rst:41 +msgid "" +"Returns ``1`` if *o* supports the single-segment readable buffer interface. " +"Otherwise returns ``0``. This function always succeeds." +msgstr "" +"Retourne ``1`` si *o* prend en charge l'interface de mémoire tampon lisible " +"à segment unique. Sinon, renvoie ``0``. Cette fonction réussit toujours." + +#: c-api/objbuffer.rst:44 +msgid "" +"Note that this function tries to get and release a buffer, and exceptions " +"which occur while calling corresponding functions will get suppressed. To " +"get error reporting use :c:func:`PyObject_GetBuffer()` instead." +msgstr "" +"Notez que cette fonction tente d'obtenir et de libérer une mémoire tampon, " +"et les exceptions qui se produisent lors de l'appel des fonctions " +"correspondantes seront supprimées. Pour que les erreurs vous soient " +"signalées, utilisez :c:func:`PyObject_GetBuffer()` à la place." + +#: c-api/objbuffer.rst:51 +msgid "" +"Returns a pointer to a writable memory location. The *obj* argument must " +"support the single-segment, character buffer interface. On success, returns " +"``0``, sets *buffer* to the memory location and *buffer_len* to the buffer " +"length. Returns ``-1`` and sets a :exc:`TypeError` on error." +msgstr "" +"Retourne un pointeur vers un emplacement de mémoire accessible en écriture. " +"L'argument *obj* doit prendre en charge l'interface de mémoire tampon de " +"caractère à segment unique. En cas de succès, retourne ``0``, définit " +"*buffer* à l'emplacement de la mémoire et *buffer_len* à la longueur de la " +"mémoire tampon. Renvoie ``-1`` et affecte l'exception :exc:`TypeError` en " +"cas d'erreur." diff --git a/c-api/object.po b/c-api/object.po new file mode 100644 index 0000000000..4005de3226 --- /dev/null +++ b/c-api/object.po @@ -0,0 +1,603 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-22 22:57+0100\n" +"PO-Revision-Date: 2019-08-16 22:56+0200\n" +"Last-Translator: Julien Palard \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\n" + +#: c-api/object.rst:6 +msgid "Object Protocol" +msgstr "Protocole Objet" + +#: c-api/object.rst:11 +msgid "" +"The ``NotImplemented`` singleton, used to signal that an operation is not " +"implemented for the given type combination." +msgstr "" +"Le singleton ``NotImplemented``, utilisé pour signaler qu'une opération " +"n'est pas implémentée pour la combinaison de types en question." + +#: c-api/object.rst:17 +msgid "" +"Properly handle returning :c:data:`Py_NotImplemented` from within a C " +"function (that is, increment the reference count of NotImplemented and " +"return it)." +msgstr "" +"Traite proprement le renvoi de :c:data:`Py_NotImplemented` depuis " +"l'intérieur d'une fonction C (c'est-à-dire, incrémente le compteur de " +"référence de ``NotImplemented`` et le renvoie)." + +#: c-api/object.rst:24 +msgid "" +"Print an object *o*, on file *fp*. Returns ``-1`` on error. The flags " +"argument is used to enable certain printing options. The only option " +"currently supported is :const:`Py_PRINT_RAW`; if given, the :func:`str` of " +"the object is written instead of the :func:`repr`." +msgstr "" +"Écrit un objet *o*, dans le fichier *fp*. Renvoie ``-1`` en cas d'erreur. " +"L'argument *flags* est utilisé pour permettre certaines options de rendu. La " +"seule option actuellement gérée est :const:`Py_PRINT_RAW` ; si cet argument " +"est fourni, le :func:`str` de l'objet est utilisé pour le rendu à la place " +"de :func:`repr`." + +#: c-api/object.rst:43 +msgid "" +"Returns ``1`` if *o* has the attribute *attr_name*, and ``0`` otherwise. " +"This is equivalent to the Python expression ``hasattr(o, attr_name)``. This " +"function always succeeds." +msgstr "" +"Renvoie ``1`` si *o* a l'attribut *attr_name*, et ``0`` sinon. Ceci est " +"équivalent à l'expression Python ``hasattr(o, attr_name)``. Cette fonction " +"réussit toujours." + +#: c-api/object.rst:36 +#, fuzzy +msgid "" +"Note that exceptions which occur while calling :meth:`__getattr__` and :meth:" +"`__getattribute__` methods will get suppressed. To get error reporting use :" +"c:func:`PyObject_GetAttr()` instead." +msgstr "" +"Notez que les exceptions qui surviennent pendant l'appel de la méthode :meth:" +"`__getitem__` seront supprimées. Pour obtenir le rapport d'erreur, utilisez " +"plutôt :c:func:`PyObject_GetItem()`." + +#: c-api/object.rst:47 +msgid "" +"Note that exceptions which occur while calling :meth:`__getattr__` and :meth:" +"`__getattribute__` methods and creating a temporary string object will get " +"suppressed. To get error reporting use :c:func:`PyObject_GetAttrString()` " +"instead." +msgstr "" + +#: c-api/object.rst:55 +#, fuzzy +msgid "" +"Retrieve an attribute named *attr_name* from object *o*. Returns the " +"attribute value on success, or ``NULL`` on failure. This is the equivalent " +"of the Python expression ``o.attr_name``." +msgstr "" +"Récupère l'attribut nommé *attr_name* de l'objet *o*. Renvoie la valeur de " +"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:62 +#, fuzzy +msgid "" +"Retrieve an attribute named *attr_name* from object *o*. Returns the " +"attribute value on success, or ``NULL`` on failure. This is the equivalent " +"of the Python expression ``o.attr_name``." +msgstr "" +"Récupère un attribut nommé *attr_name* de l'objet *o*. Renvoie la valeur de " +"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:69 +msgid "" +"Generic attribute getter function that is meant to be put into a type " +"object's ``tp_getattro`` slot. It looks for a descriptor in the dictionary " +"of classes in the object's MRO as well as an attribute in the object's :attr:" +"`~object.__dict__` (if present). As outlined in :ref:`descriptors`, data " +"descriptors take preference over instance attributes, while non-data " +"descriptors don't. Otherwise, an :exc:`AttributeError` is raised." +msgstr "" +"Accesseur d'attribut générique destiné à être mis dans le *slot* " +"``tp_getattro`` d'un objet type. Recherche un descripteur dans le " +"dictionnaire de classes du MRO de l'objet ainsi qu'un attribut dans le :attr:" +"`~object.__dict__` de l'objet (si présent). Comme défini dans :ref:" +"`descriptors`, les descripteurs de données sont prioritaires sur les " +"attributs d'instance, contrairement aux autres descripteurs. Sinon, une :exc:" +"`AttributeError` est levée." + +#: 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 " +"success. This is the equivalent of the Python statement ``o.attr_name = v``." +msgstr "" +"Définit la valeur de l'attribut nommé *attr_name*, pour l'objet *o*, à la " +"valeur *v*. Lève une exception et renvoie ``-1`` en cas d'échec ; renvoie " +"``0`` en cas de succès. Ceci est équivalent à l'instruction Python ``o." +"attr_name = v``." + +#: c-api/object.rst:84 +#, fuzzy +msgid "" +"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:96 +#, fuzzy +msgid "" +"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: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 " +"data descriptor in the dictionary of classes in the object's MRO, and if " +"found it takes preference over setting or deleting the attribute in the " +"instance dictionary. Otherwise, the attribute is set or deleted in the " +"object's :attr:`~object.__dict__` (if present). On success, ``0`` is " +"returned, otherwise an :exc:`AttributeError` is raised and ``-1`` is " +"returned." +msgstr "" +"Accesseur et suppresseur générique d'attributs qui est fait pour être mis " +"dans le :c:member:`~PyTypeObject.tp_setattro` d'un objet type. Il cherche un " +"descripteur de données dans le dictionnaire de classes dans le MRO de " +"l'objet et, si ce descripteur est trouvé, c'est lui qui est utilisé de " +"préférence pour la suppression et la définition de l'attribut dans le " +"dictionnaire d'instance. Sinon, l'attribut est défini ou supprimé dans le :" +"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: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``." +msgstr "" +"Supprime l'attribut nommé *attr_name*, pour l'objet *o*. Renvoie ``-1`` en " +"cas d'échec. Ceci est l'équivalent de l'expression Python ``del o." +"attr_name``." + +#: c-api/object.rst:126 +msgid "" +"A generic implementation for the getter of a ``__dict__`` descriptor. It " +"creates the dictionary if necessary." +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:134 +msgid "" +"A generic implementation for the setter of a ``__dict__`` descriptor. This " +"implementation does not allow the dictionary to be deleted." +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:142 +#, fuzzy +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:" +"`Py_NE`, :const:`Py_GT`, or :const:`Py_GE`, corresponding to ``<``, ``<=``, " +"``==``, ``!=``, ``>``, or ``>=`` respectively. This is the equivalent of the " +"Python expression ``o1 op o2``, where ``op`` is the operator corresponding " +"to *opid*. Returns the value of the comparison on success, or ``NULL`` on " +"failure." +msgstr "" +"Compare les valeurs de *o1* et *o2* en utilisant l'opération spécifiée par " +"*opid*, qui doit être :const:`Py_LT`, :const:`Py_LE`, :const:`Py_EQ`, :const:" +"`Py_NE`, :const:`Py_GT`, ou :const:`Py_GE`, correspondant à ``<``, ``<=``, " +"``==``, ``!=``, ``>``, ou ``>=`` respectivement. Ceci est l'équivalent de " +"l'expression Python ``o1 op o2``, où ``op`` est l'opérateur correspondant à " +"*opid*. Renvoie la valeur de la comparaison en cas de succès, ou *NULL* en " +"cas d'échec." + +#: 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:" +"`Py_NE`, :const:`Py_GT`, or :const:`Py_GE`, corresponding to ``<``, ``<=``, " +"``==``, ``!=``, ``>``, or ``>=`` respectively. Returns ``-1`` on error, " +"``0`` if the result is false, ``1`` otherwise. This is the equivalent of the " +"Python expression ``o1 op o2``, where ``op`` is the operator corresponding " +"to *opid*." +msgstr "" +"Compare les valeurs de *o1* et *o2* en utilisant l'opération spécifiée par " +"*opid*, qui doit être :const:`Py_LT`, :const:`Py_LE`, :const:`Py_EQ`, :const:" +"`Py_NE`, :const:`Py_GT`, ou :const:`Py_GE`, correspondant à ``<``, ``<=``, " +"``==``, ``!=``, ``>``, ou ``>=`` respectivement. Renvoie ``-1`` en cas " +"d'erreur, ``0`` si le résultat est faux, et ``1`` sinon. Ceci est " +"l'équivalent de l'expression Python ``o1 op o2``, où ``op`` est l'opérateur " +"correspondant à *opid*." + +#: 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`." +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:166 +#, fuzzy +msgid "" +"Format *obj* using *format_spec*. This is equivalent to the Python " +"expression ``format(obj, format_spec)``." +msgstr "Ceci est l'équivalent de l'expression Python : ``callable(*args)``." + +#: c-api/object.rst:169 +msgid "" +"*format_spec* may be ``NULL``. In this case the call is equivalent to " +"``format(obj)``. Returns the formatted string on success, ``NULL`` on " +"failure." +msgstr "" + +#: c-api/object.rst:177 +#, fuzzy +msgid "" +"Compute a string representation of object *o*. Returns the string " +"representation on success, ``NULL`` on failure. This is the equivalent of " +"the Python expression ``repr(o)``. Called by the :func:`repr` built-in " +"function." +msgstr "" +"Calcule une représentation en chaîne de caractères de l'objet *o*. Renvoie " +"la représentation en chaîne de caractères en cas de succès, *NULL* en cas " +"d'échec. Ceci est l'équivalent de l'expression Python ``repr(o)``. Appelé " +"par la fonction native :func:`repr`." + +#: c-api/object.rst:205 +msgid "" +"This function now includes a debug assertion to help ensure that it does not " +"silently discard an active exception." +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:189 +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:" +"`PyObject_Repr` with ``\\x``, ``\\u`` or ``\\U`` escapes. This generates a " +"string similar to that returned by :c:func:`PyObject_Repr` in Python 2. " +"Called by the :func:`ascii` built-in function." +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 " +"renvoyée par :c:func:`PyObject_Repr` en Python 2. Appelée par la fonction " +"native :func:`ascii`." + +#: c-api/object.rst:200 +#, fuzzy +msgid "" +"Compute a string representation of object *o*. Returns the string " +"representation on success, ``NULL`` on failure. This is the equivalent of " +"the Python expression ``str(o)``. Called by the :func:`str` built-in " +"function and, therefore, by the :func:`print` function." +msgstr "" +"Calcule une représentation en chaîne de caractères de l'objet *o*. Renvoie " +"la représentation en chaîne de caractères en cas de succès, *NULL* en cas " +"d'échec. Ceci est l'équivalent de l'expression Python ``str(o)``. Appelée " +"par la fonction native :func:`str`, et, par conséquent, par la fonction :" +"func:`print`." + +#: c-api/object.rst:214 +#, fuzzy +msgid "" +"Compute a bytes representation of object *o*. ``NULL`` is returned on " +"failure and a bytes object on success. This is equivalent to the Python " +"expression ``bytes(o)``, when *o* is not an integer. Unlike ``bytes(o)``, a " +"TypeError is raised when *o* is an integer instead of a zero-initialized " +"bytes object." +msgstr "" +"Calcule une représentation en octets de l'objet *o*. *NULL* est renvoyé en " +"cas d'échec, un objet séquence d'octets est renvoyé en cas de succès. Ceci " +"est l'équivalent de l'expression Python ``bytes(o)``, quand *o* n'est pas un " +"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:223 +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``." +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:245 +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``, " +"otherwise it will be ``0``." +msgstr "" +"Si *cls* est un *n*-uplet, la vérification est menée sur chaque entrée de " +"*cls*. Le résultat sera ``1`` quand au moins une des vérifications renvoie " +"``1``, sinon ce sera ``0``." + +#: c-api/object.rst:230 +msgid "" +"If *cls* has a :meth:`~class.__subclasscheck__` method, it will be called to " +"determine the subclass status as described in :pep:`3119`. Otherwise, " +"*derived* is a subclass of *cls* if it is a direct or indirect subclass, i." +"e. contained in ``cls.__mro__``." +msgstr "" +"Si *cls* a une méthode :meth:`~class.__subclasscheck__`, elle est appelée " +"pour déterminer le statut de la sous-classe comme décrit dans :pep:`3119`. " +"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:235 +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 " +"a :attr:`__bases__` attribute (which must be a tuple of base classes)." +msgstr "" +"Normalement seulement les classes objets, c'est-à-dire les instances de :" +"class:`type` ou d'une classe dérivée, sont considérées classes. Cependant, " +"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:242 +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." +msgstr "" +"Renvoie ``1`` si *inst* est une instance de la classe *cls* ou une sous-" +"classe de *cls*, ou ``0`` sinon. En cas d'erreur, renvoie ``-1`` et " +"initialise une exception." + +#: c-api/object.rst:249 +msgid "" +"If *cls* has a :meth:`~class.__instancecheck__` method, it will be called to " +"determine the subclass status as described in :pep:`3119`. Otherwise, " +"*inst* is an instance of *cls* if its class is a subclass of *cls*." +msgstr "" +"Si *cls* a une méthode :meth:`~class.__subclasscheck__`, elle sera appelée " +"pour déterminer le statut de la sous-classe comme décrit dans :pep:`3119`. " +"Sinon, *inst* est une instance *cls* si sa classe est une sous-classe de " +"*cls*." + +#: c-api/object.rst:253 +msgid "" +"An instance *inst* can override what is considered its class by having a :" +"attr:`__class__` attribute." +msgstr "" +"Une instance *inst* peut surcharger ce qui est considéré comme sa classe en " +"ayant un attribut :attr:`__class__`." + +#: c-api/object.rst:256 +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 " +"of base classes)." +msgstr "" +"Un objet *cls* peut surcharger s'il est considéré comme une classe, et ce " +"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:265 +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:268 +msgid "" +"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:275 +msgid "" +"Set a :exc:`TypeError` indicating that ``type(o)`` is not :term:`hashable` " +"and return ``-1``. This function receives special treatment when stored in a " +"``tp_hash`` slot, allowing a type to explicitly indicate to the interpreter " +"that it is not hashable." +msgstr "" + +#: c-api/object.rst:283 +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:290 +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:299 +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 :c:func:`Py_TYPE()` function, " +"which returns a pointer of type :c:expr:`PyTypeObject*`, except when the " +"incremented reference count is needed." +msgstr "" + +#: c-api/object.rst:310 +msgid "" +"Return non-zero if the object *o* is of type *type* or a subtype of *type*, " +"and ``0`` otherwise. Both parameters must be non-``NULL``." +msgstr "" + +#: c-api/object.rst:319 +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, " +"``-1`` is returned. This is the equivalent to the Python expression " +"``len(o)``." +msgstr "" + +#: c-api/object.rst:326 +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, " +"defaultvalue)``." +msgstr "" + +#: c-api/object.rst:336 +#, fuzzy +msgid "" +"Return element of *o* corresponding to the object *key* or ``NULL`` on " +"failure. This is the equivalent of the Python expression ``o[key]``." +msgstr "" +"Récupère un attribut nommé *attr_name* de l'objet *o*. Renvoie la valeur de " +"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:342 +#, fuzzy +msgid "" +"Map the object *key* to the value *v*. Raise an exception and return ``-1`` " +"on failure; return ``0`` on success. This is the equivalent of the Python " +"statement ``o[key] = v``. This function *does not* steal a reference to *v*." +msgstr "" +"Définit la valeur de l'attribut nommé *attr_name*, pour l'objet *o*, à la " +"valeur *v*. Lève une exception et renvoie ``-1`` en cas d'échec ; renvoie " +"``0`` en cas de succès. Ceci est équivalent à l'instruction Python ``o." +"attr_name = v``." + +#: c-api/object.rst:350 +#, fuzzy +msgid "" +"Remove the mapping for the object *key* from the object *o*. Return ``-1`` " +"on failure. This is equivalent to the Python statement ``del o[key]``." +msgstr "" +"Supprime la correspondance associée à la chaîne *key* dans l'objet *o*. " +"Renvoie ``-1`` en cas d'échec. C'est l'équivalent de la commande Python " +"``del o[key]``." + +#: c-api/object.rst:356 +msgid "" +"This is equivalent to the Python expression ``dir(o)``, returning a " +"(possibly empty) list of strings appropriate for the object argument, or " +"``NULL`` if there was an error. If the argument is ``NULL``, this is like " +"the Python ``dir()``, returning the names of the current locals; in this " +"case, if no execution frame is active then ``NULL`` is returned but :c:func:" +"`PyErr_Occurred` will return false." +msgstr "" + +#: c-api/object.rst:365 +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 " +"already an iterator. Raises :exc:`TypeError` and returns ``NULL`` if the " +"object cannot be iterated." +msgstr "" + +#: c-api/object.rst:373 +msgid "" +"This is the equivalent to the Python expression ``aiter(o)``. Takes an :" +"class:`AsyncIterable` object and returns an :class:`AsyncIterator` for it. " +"This is typically a new iterator but if the argument is an :class:" +"`AsyncIterator`, this returns itself. Raises :exc:`TypeError` and returns " +"``NULL`` if the object cannot be iterated." +msgstr "" + +#~ msgid "" +#~ "Determine if the object *o* is callable. Return ``1`` if the object is " +#~ "callable and ``0`` otherwise. This function always succeeds." +#~ msgstr "" +#~ "Détermine si l'objet *o* est appelable. Renvoie ``1`` si c'est le cas, et " +#~ "``0`` sinon. Cette fonction réussit toujours." + +#~ msgid "" +#~ "Call a callable Python object *callable*, with arguments given by the " +#~ "tuple *args*, and named arguments given by the dictionary *kwargs*." +#~ msgstr "" +#~ "Appelle un objet Python appelable *callable*, avec des arguments donnés " +#~ "par le *n*-uplet *args*, et des arguments nommés donnés par le " +#~ "dictionnaire *kwargs*." + +#, fuzzy +#~ msgid "" +#~ "*args* must not be ``NULL``, use an empty tuple if no arguments are " +#~ "needed. If no named arguments are needed, *kwargs* can be ``NULL``." +#~ msgstr "" +#~ "*args* ne doit pas être égal à *NULL*, utilisez un *n*-uplet vide si " +#~ "aucun argument n'est nécessaire. Si aucun argument nommé n'est " +#~ "nécessaire, *kwargs* peut être égal à *NULL*." + +#, fuzzy +#~ msgid "" +#~ "Return the result of the call on success, or raise an exception and " +#~ "return ``NULL`` on failure." +#~ msgstr "" +#~ "Renvoie le résultat de l'appel en cas de succès, ou lève une exception et " +#~ "renvoie *NULL* en cas d'échec." + +#~ msgid "" +#~ "This is the equivalent of the Python expression: ``callable(*args, " +#~ "**kwargs)``." +#~ msgstr "" +#~ "Ceci est l'équivalent de l'expression Python : ``callable(*args, " +#~ "**kwargs)``." + +#, fuzzy +#~ msgid "" +#~ "Call a callable Python object *callable*, with arguments given by the " +#~ "tuple *args*. If no arguments are needed, then *args* can be ``NULL``." +#~ msgstr "" +#~ "Appelle un objet Python appelable *callable*, avec des arguments donnés " +#~ "par le *n*-uplet *args*. Si aucun argument n'est nécessaire, alors *args* " +#~ "peut être égal à *NULL*." + +#, fuzzy +#~ msgid "" +#~ "Call a callable Python object *callable*, with a variable number of C " +#~ "arguments. The C arguments are described using a :c:func:`Py_BuildValue` " +#~ "style format string. The format can be ``NULL``, indicating that no " +#~ "arguments are provided." +#~ msgstr "" +#~ "Appelle un objet Python appelable, avec un nombre variable d'arguments C. " +#~ "Les arguments C sont décrits par une chaîne de caractères de format de " +#~ "type :c:func:`Py_BuildValue`. Le format peut être *NULL*, indiquant " +#~ "qu'aucun argument n'est donné." + +#, fuzzy +#~ msgid "" +#~ "Call a callable Python object *callable*, with a variable number of :c:" +#~ "type:`PyObject\\*` arguments. The arguments are provided as a variable " +#~ "number of parameters followed by ``NULL``." +#~ msgstr "" +#~ "Appelle un objet Python appelable, avec un nombre variable d'arguments C. " +#~ "Les arguments C sont décrits par une chaîne de caractères de format de " +#~ "type :c:func:`Py_BuildValue`. Le format peut être *NULL*, indiquant " +#~ "qu'aucun argument n'est donné." + +#, fuzzy +#~ msgid "" +#~ "This is the equivalent of the Python expression: ``callable(arg1, " +#~ "arg2, ...)``." +#~ msgstr "" +#~ "Ceci est l'équivalent de l'expression Python : ``callable(*args, " +#~ "**kwargs)``." diff --git a/c-api/objimpl.po b/c-api/objimpl.po new file mode 100644 index 0000000000..9f91703c6d --- /dev/null +++ b/c-api/objimpl.po @@ -0,0 +1,27 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +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: 2017-10-18 09:23+0200\n" +"Last-Translator: Julien Palard \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" + +#: c-api/objimpl.rst:7 +msgid "Object Implementation Support" +msgstr "Implémentation d'objets" + +#: c-api/objimpl.rst:9 +msgid "" +"This chapter describes the functions, types, and macros used when defining " +"new object types." +msgstr "" +"Ce chapitre décrit les fonctions, types, et macros utilisées pour définir de " +"nouveaux types d'objets." diff --git a/c-api/refcounting.po b/c-api/refcounting.po new file mode 100644 index 0000000000..cafe207847 --- /dev/null +++ b/c-api/refcounting.po @@ -0,0 +1,220 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-05-21 16:37+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \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" + +#: c-api/refcounting.rst:8 +msgid "Reference Counting" +msgstr "" + +#: c-api/refcounting.rst:10 +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 "Increment the reference count for object *o*." +msgstr "Incrémente le compteur de références de l'objet *o*." + +#: c-api/refcounting.rst:18 +msgid "" +"This function is usually used to convert a :term:`borrowed reference` to a :" +"term:`strong reference` in-place. The :c:func:`Py_NewRef` function can be " +"used to create a new :term:`strong reference`." +msgstr "" +"Cette fonction est souvent utilisée pour convertir une :term:`référence " +"empruntée` en une :term:`référence forte` *sur place*. La fonction :c:func:" +"`Py_NewRef` peut être utilisée pour créer une nouvelle :term:`référence " +"forte`." + +#: c-api/refcounting.rst:22 +msgid "" +"The object must not be ``NULL``; if you aren't sure that it isn't ``NULL``, " +"use :c:func:`Py_XINCREF`." +msgstr "" +"L'objet ne doit pas être ``NULL``, la fonction :c:func:`Py_XINCREF` doit " +"être utilisée s'il est possible qu'il soit ``NULL``." + +#: c-api/refcounting.rst:28 +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:31 +msgid "See also :c:func:`Py_XNewRef`." +msgstr "Voir aussi :c:func:`Py_XNewRef`." + +#: c-api/refcounting.rst:36 +msgid "" +"Create a new :term:`strong reference` to an object: increment the reference " +"count of the object *o* and return the object *o*." +msgstr "" +"Créer une nouvelle :term:`référence forte` d'un objet : incrémente le " +"compteur de référence de l'objet *o* et renvoie l'objet *o*." + +#: c-api/refcounting.rst:39 +msgid "" +"When the :term:`strong reference` is no longer needed, :c:func:`Py_DECREF` " +"should be called on it to decrement the object reference count." +msgstr "" +":c:func:`Py_DECREF` doit être appelée quand la :term:`référence forte` n'est " +"plus utilisée pour décrémenter le compteur de références de l'objet." + +#: c-api/refcounting.rst:42 +msgid "" +"The object *o* must not be ``NULL``; use :c:func:`Py_XNewRef` if *o* can be " +"``NULL``." +msgstr "" +"L'objet *o* ne doit pas être ``NULL`` et la fonction :c:func:`Py_XNewRef` " +"doit être utilisée si *o* peut être ``NULL``." + +#: c-api/refcounting.rst:45 +msgid "For example::" +msgstr "Par exemple ::" + +#: c-api/refcounting.rst:50 +msgid "can be written as::" +msgstr "peut s'écrire ::" + +#: c-api/refcounting.rst:54 +msgid "See also :c:func:`Py_INCREF`." +msgstr "Voir aussi :c:func:`Py_INCREF`." + +#: c-api/refcounting.rst:61 +msgid "Similar to :c:func:`Py_NewRef`, but the object *o* can be NULL." +msgstr "Semblable à :c:func:`Py_NewRef` mais l'objet *o* peut être ``NULL``." + +#: c-api/refcounting.rst:63 +msgid "If the object *o* is ``NULL``, the function just returns ``NULL``." +msgstr "Cette fonction renvoie ``NULL`` si l'objet *o* est ``NULL``." + +#: c-api/refcounting.rst:70 +msgid "Decrement the reference count for object *o*." +msgstr "Décrémente le compteur de références de l'objet *o*." + +#: c-api/refcounting.rst:72 +msgid "" +"If the reference count reaches zero, the object's type's deallocation " +"function (which must not be ``NULL``) is invoked." +msgstr "" +"Si le compteur de références atteint zéro, la fonction de dés-allocation du " +"type de l'objet (qui ne doit pas être ``NULL``) est invoquée." + +#: c-api/refcounting.rst:75 +msgid "" +"This function is usually used to delete a :term:`strong reference` before " +"exiting its scope." +msgstr "" +"Cette fonction est généralement utilisée pour supprimer une :term:`référence " +"forte` avant qu'elle ne soit plus accessible." + +#: c-api/refcounting.rst:78 +msgid "" +"The object must not be ``NULL``; if you aren't sure that it isn't ``NULL``, " +"use :c:func:`Py_XDECREF`." +msgstr "" +"L'objet en argument ne doit pas être ``NULL``. :c:func:`Py_XDECREF` doit " +"être utilisée si l'objet peut être ``NULL``." + +#: c-api/refcounting.rst:83 +msgid "" +"The deallocation function can cause arbitrary Python code to be invoked (e." +"g. when a class instance with a :meth:`__del__` method is deallocated). " +"While exceptions in such code are not propagated, the executed code has free " +"access to all Python global variables. This means that any object that is " +"reachable from a global variable should be in a consistent state before :c:" +"func:`Py_DECREF` is invoked. For example, code to delete an object from a " +"list should copy a reference to the deleted object in a temporary variable, " +"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:95 +msgid "" +"Decrement the reference count for object *o*. The object may be ``NULL``, " +"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:102 +msgid "" +"Decrement the reference count for object *o*. The object may be ``NULL``, " +"in which case the macro has no effect; otherwise the effect is the same as " +"for :c:func:`Py_DECREF`, except that the argument is also set to ``NULL``. " +"The warning for :c:func:`Py_DECREF` does not apply with respect to the " +"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:109 +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:114 +msgid "" +"Increment the reference count for object *o*. A function version of :c:func:" +"`Py_XINCREF`. It can be used for runtime dynamic embedding of Python." +msgstr "" +"Incrémente le compteur de références de l'objet *o*. C'est la version " +"fonctionnelle de :c:func:`Py_XINCREF`. Elle peut être utilisée lorsque " +"Python est embarqué dynamiquement dans une application." + +#: c-api/refcounting.rst:120 +msgid "" +"Decrement the reference count for object *o*. A function version of :c:func:" +"`Py_XDECREF`. It can be used for runtime dynamic embedding of Python." +msgstr "" +"Décrémente le compteur de références de l'objet *o*. C'est la version " +"fonctionnelle de :c:func:`Py_XDECREF`. Elle peut être utilisée lorsque " +"Python est embarqué dynamiquement dans une application." + +#: c-api/refcounting.rst:124 +msgid "" +"The following functions or macros are only for use within the interpreter " +"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 new file mode 100644 index 0000000000..d04aea96ae --- /dev/null +++ b/c-api/reflection.po @@ -0,0 +1,112 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-03-18 17:06+0100\n" +"PO-Revision-Date: 2019-02-26 12:01+0100\n" +"Last-Translator: Julien Palard \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" + +#: c-api/reflection.rst:6 +msgid "Reflection" +msgstr "Réflexion" + +#: c-api/reflection.rst:10 +msgid "" +"Return a dictionary of the builtins in the current execution frame, or the " +"interpreter of the thread state if no frame is currently executing." +msgstr "" +"Renvoie un dictionnaire des fonctions natives de la *frame* en cours " +"d'exécution, ou si aucune *frame* n'est exécutée, les fonctions natives du " +"*thread* indiqué par le *thread state*." + +#: c-api/reflection.rst:16 +#, fuzzy +msgid "" +"Return a dictionary of the local variables in the current execution frame, " +"or ``NULL`` if no frame is currently executing." +msgstr "" +"Renvoie un dictionnaire des variables locales de la *frame* en cours " +"d'exécution, ou *NULL* si aucune *frame* n'est en cours d'exécution." + +#: c-api/reflection.rst:22 +#, fuzzy +msgid "" +"Return a dictionary of the global variables in the current execution frame, " +"or ``NULL`` if no frame is currently executing." +msgstr "" +"Renvoie un dictionnaire des variables globales de la *frame* en cours " +"d'exécution ou *NULL* si aucune *frame* n'est en cours d'exécution." + +#: c-api/reflection.rst:28 +#, fuzzy +msgid "" +"Return the current thread state's frame, which is ``NULL`` if no frame is " +"currently executing." +msgstr "" +"Renvoie la *frame* actuelle selon le *thread state*, qui est *NULL* si " +"aucune *frame* n'est en cours d'exécution." + +#: c-api/reflection.rst:31 +msgid "See also :c:func:`PyThreadState_GetFrame`." +msgstr "" + +#: c-api/reflection.rst:36 +msgid "Get the *frame* next outer frame." +msgstr "Renvoie la *frame* encadrant immédiatement à *frame*." + +#: c-api/reflection.rst:38 +msgid "" +"Return a :term:`strong reference`, or ``NULL`` if *frame* has no outer frame." +msgstr "" +"Renvoie un :term:`strong reference`, ou ``NULL`` si *frame* n'a pas de " +"*frame* encadrante." + +#: c-api/reflection.rst:60 +msgid "*frame* must not be ``NULL``." +msgstr "" + +#: c-api/reflection.rst:47 +msgid "Get the *frame* code." +msgstr "Obtenir le code *frame*." + +#: c-api/reflection.rst:49 +msgid "Return a :term:`strong reference`." +msgstr "Renvoie un :term:`strong reference`." + +#: c-api/reflection.rst:51 +msgid "" +"*frame* must not be ``NULL``. The result (frame code) cannot be ``NULL``." +msgstr "" + +#: c-api/reflection.rst:58 +msgid "Return the line number that *frame* is currently executing." +msgstr "Renvoie le numéro de ligne que *frame* est en train d'exécuter" + +#: c-api/reflection.rst:65 +msgid "" +"Return the name of *func* if it is a function, class or instance object, " +"else the name of *func*\\s type." +msgstr "" +"Renvoie le nom de *func* s'il s'agit d'une fonction, d'une classe ou d'un " +"objet d'instance, sinon le nom du type de *func*" + +#: c-api/reflection.rst:71 +msgid "" +"Return a description string, depending on the type of *func*. Return values " +"include \"()\" for functions and methods, \" constructor\", \" instance\", " +"and \" object\". Concatenated with the result of :c:func:" +"`PyEval_GetFuncName`, the result will be a description of *func*." +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 " +"résultat sera une description de *func*" diff --git a/c-api/sequence.po b/c-api/sequence.po new file mode 100644 index 0000000000..ffe90e73c4 --- /dev/null +++ b/c-api/sequence.po @@ -0,0 +1,200 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-04-05 10:05+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \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" + +#: c-api/sequence.rst:6 +msgid "Sequence Protocol" +msgstr "" + +#: c-api/sequence.rst:11 +msgid "" +"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 +#, fuzzy +msgid "" +"Returns the number of objects in sequence *o* on success, and ``-1`` on " +"failure. This is equivalent to the Python expression ``len(o)``." +msgstr "" +"Renvoie le nombre de clefs dans l'objet *o* et ``-1`` en cas d'échec. C'est " +"l'équivalent de l'expression Python ``len(o)``." + +#: c-api/sequence.rst:29 +msgid "" +"Return the concatenation of *o1* and *o2* on success, and ``NULL`` on " +"failure. This is the equivalent of the Python expression ``o1 + o2``." +msgstr "" + +#: c-api/sequence.rst:35 +msgid "" +"Return the result of repeating sequence object *o* *count* times, or " +"``NULL`` on failure. This is the equivalent of the Python expression ``o * " +"count``." +msgstr "" + +#: c-api/sequence.rst:41 +msgid "" +"Return the concatenation 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 expression ``o1 += o2``." +msgstr "" + +#: c-api/sequence.rst:48 +msgid "" +"Return the result of repeating sequence object *o* *count* times, or " +"``NULL`` on failure. The operation is done *in-place* when *o* supports " +"it. This is the equivalent of the Python expression ``o *= count``." +msgstr "" + +#: c-api/sequence.rst:55 +msgid "" +"Return the *i*\\ th element of *o*, or ``NULL`` on failure. This is the " +"equivalent of the Python expression ``o[i]``." +msgstr "" + +#: c-api/sequence.rst:61 +msgid "" +"Return the slice of sequence object *o* between *i1* and *i2*, or ``NULL`` " +"on failure. This is the equivalent of the Python expression ``o[i1:i2]``." +msgstr "" + +#: c-api/sequence.rst:67 +msgid "" +"Assign object *v* to the *i*\\ th element of *o*. Raise an exception and " +"return ``-1`` on failure; return ``0`` on success. This is the equivalent " +"of the Python statement ``o[i] = v``. This function *does not* steal a " +"reference to *v*." +msgstr "" + +#: c-api/sequence.rst:72 +msgid "" +"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 +msgid "" +"Delete the *i*\\ th element of object *o*. Returns ``-1`` on failure. This " +"is the equivalent of the Python statement ``del o[i]``." +msgstr "" + +#: c-api/sequence.rst:84 +msgid "" +"Assign the sequence object *v* to the slice in sequence object *o* from *i1* " +"to *i2*. This is the equivalent of the Python statement ``o[i1:i2] = v``." +msgstr "" + +#: c-api/sequence.rst:90 +msgid "" +"Delete the slice in sequence object *o* from *i1* to *i2*. Returns ``-1`` " +"on failure. This is the equivalent of the Python statement ``del o[i1:i2]``." +msgstr "" + +#: c-api/sequence.rst:96 +msgid "" +"Return the number of occurrences of *value* in *o*, that is, return the " +"number of keys for which ``o[key] == value``. On failure, return ``-1``. " +"This is equivalent to the Python expression ``o.count(value)``." +msgstr "" + +#: c-api/sequence.rst:103 +msgid "" +"Determine if *o* contains *value*. If an item in *o* is equal to *value*, " +"return ``1``, otherwise return ``0``. On error, return ``-1``. This is " +"equivalent to the Python expression ``value in o``." +msgstr "" + +#: c-api/sequence.rst:110 +msgid "" +"Return the first index *i* for which ``o[i] == value``. On error, return " +"``-1``. This is equivalent to the Python expression ``o.index(value)``." +msgstr "" + +#: c-api/sequence.rst:116 +msgid "" +"Return a list object with the same contents as the sequence or iterable *o*, " +"or ``NULL`` on failure. The returned list is guaranteed to be new. This is " +"equivalent to the Python expression ``list(o)``." +msgstr "" + +#: c-api/sequence.rst:125 +msgid "" +"Return a tuple object with the same contents as the sequence or iterable " +"*o*, or ``NULL`` on failure. If *o* is a tuple, a new reference will be " +"returned, otherwise a tuple will be constructed with the appropriate " +"contents. This is equivalent to the Python expression ``tuple(o)``." +msgstr "" + +#: c-api/sequence.rst:133 +msgid "" +"Return the sequence or iterable *o* as an object usable by the other " +"``PySequence_Fast*`` family of functions. If the object is not a sequence or " +"iterable, raises :exc:`TypeError` with *m* as the message text. Returns " +"``NULL`` on failure." +msgstr "" + +#: c-api/sequence.rst:138 +msgid "" +"The ``PySequence_Fast*`` functions are thus named because they assume *o* is " +"a :c:type:`PyTupleObject` or a :c:type:`PyListObject` and access the data " +"fields of *o* directly." +msgstr "" + +#: c-api/sequence.rst:142 +msgid "" +"As a CPython implementation detail, if *o* is already a sequence or list, it " +"will be returned." +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 " +"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 "" + +#: c-api/sequence.rst:157 +msgid "" +"Return the *i*\\ th element of *o*, assuming that *o* was returned by :c:" +"func:`PySequence_Fast`, *o* is not ``NULL``, and that *i* is within bounds." +msgstr "" + +#: c-api/sequence.rst:163 +msgid "" +"Return the underlying array of PyObject pointers. Assumes that *o* was " +"returned by :c:func:`PySequence_Fast` and *o* is not ``NULL``." +msgstr "" + +#: c-api/sequence.rst:166 +msgid "" +"Note, if a list gets resized, the reallocation may relocate the items array. " +"So, only use the underlying array pointer in contexts where the sequence " +"cannot change." +msgstr "" + +#: c-api/sequence.rst:173 +msgid "" +"Return the *i*\\ th element of *o* or ``NULL`` on failure. Faster form of :c:" +"func:`PySequence_GetItem` but without checking that :c:func:" +"`PySequence_Check` on *o* is true and without adjustment for negative " +"indices." +msgstr "" diff --git a/c-api/set.po b/c-api/set.po new file mode 100644 index 0000000000..d970a92949 --- /dev/null +++ b/c-api/set.po @@ -0,0 +1,189 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-04-05 10:05+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \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" + +#: c-api/set.rst:6 +msgid "Set Objects" +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 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 "" + +#: c-api/set.rst:29 +msgid "" +"This subtype of :c:type:`PyObject` is used to hold the internal data for " +"both :class:`set` and :class:`frozenset` objects. It is like a :c:type:" +"`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 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 +#, fuzzy +msgid "" +"This is an instance of :c:type:`PyTypeObject` representing the Python :class:" +"`set` type." +msgstr "" +"C'est une instance de :c:type:`PyTypeObject` représentant le type Python :" +"class:`code`." + +#: c-api/set.rst:46 +#, fuzzy +msgid "" +"This is an instance of :c:type:`PyTypeObject` representing the Python :class:" +"`frozenset` type." +msgstr "" +"C'est une instance de :c:type:`PyTypeObject` représentant le type Python :" +"class:`code`." + +#: c-api/set.rst:49 +msgid "" +"The following type check macros work on pointers to any Python object. " +"Likewise, the constructor functions work with any iterable Python object." +msgstr "" + +#: c-api/set.rst:55 +msgid "" +"Return true if *p* is a :class:`set` object or an instance of a subtype. " +"This function always succeeds." +msgstr "" + +#: c-api/set.rst:60 +msgid "" +"Return true if *p* is a :class:`frozenset` object or an instance of a " +"subtype. This function always succeeds." +msgstr "" + +#: c-api/set.rst:65 +msgid "" +"Return true if *p* is a :class:`set` object, a :class:`frozenset` object, or " +"an instance of a subtype. This function always succeeds." +msgstr "" + +#: c-api/set.rst:70 +msgid "" +"Return true if *p* is a :class:`set` object but not an instance of a " +"subtype. This function always succeeds." +msgstr "" + +#: c-api/set.rst:77 +msgid "" +"Return true if *p* is a :class:`set` object or a :class:`frozenset` object " +"but not an instance of a subtype. This function always succeeds." +msgstr "" + +#: c-api/set.rst:83 +msgid "" +"Return true if *p* is a :class:`frozenset` object but not an instance of a " +"subtype. This function always succeeds." +msgstr "" + +#: c-api/set.rst:89 +msgid "" +"Return a new :class:`set` containing objects returned by the *iterable*. " +"The *iterable* may be ``NULL`` to create a new empty set. Return the new " +"set on success or ``NULL`` on failure. Raise :exc:`TypeError` if *iterable* " +"is not actually iterable. The constructor is also useful for copying a set " +"(``c=set(s)``)." +msgstr "" + +#: c-api/set.rst:98 +msgid "" +"Return a new :class:`frozenset` containing objects returned by the " +"*iterable*. The *iterable* may be ``NULL`` to create a new empty frozenset. " +"Return the new set on success or ``NULL`` on failure. Raise :exc:" +"`TypeError` if *iterable* is not actually iterable." +msgstr "" + +#: c-api/set.rst:104 +msgid "" +"The following functions and macros are available for instances of :class:" +"`set` or :class:`frozenset` or instances of their subtypes." +msgstr "" + +#: c-api/set.rst:112 +msgid "" +"Return the length of a :class:`set` or :class:`frozenset` object. Equivalent " +"to ``len(anyset)``. Raises a :exc:`PyExc_SystemError` if *anyset* is not a :" +"class:`set`, :class:`frozenset`, or an instance of a subtype." +msgstr "" + +#: c-api/set.rst:119 +msgid "Macro form of :c:func:`PySet_Size` without error checking." +msgstr "" + +#: c-api/set.rst:124 +msgid "" +"Return ``1`` if found, ``0`` if not found, and ``-1`` if an error is " +"encountered. Unlike the Python :meth:`__contains__` method, this function " +"does not automatically convert unhashable sets into temporary frozensets. " +"Raise a :exc:`TypeError` if the *key* is unhashable. Raise :exc:" +"`PyExc_SystemError` if *anyset* is not a :class:`set`, :class:`frozenset`, " +"or an instance of a subtype." +msgstr "" + +#: c-api/set.rst:133 +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 " +"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 " +"grow. Raise a :exc:`SystemError` if *set* is not an instance of :class:" +"`set` or its subtype." +msgstr "" + +#: c-api/set.rst:142 +msgid "" +"The following functions are available for instances of :class:`set` or its " +"subtypes but not for instances of :class:`frozenset` or its subtypes." +msgstr "" + +#: c-api/set.rst:148 +msgid "" +"Return ``1`` if found and removed, ``0`` if not found (no action taken), and " +"``-1`` if an error is encountered. Does not raise :exc:`KeyError` for " +"missing keys. Raise a :exc:`TypeError` if the *key* is unhashable. Unlike " +"the Python :meth:`~set.discard` method, this function does not automatically " +"convert unhashable sets into temporary frozensets. Raise :exc:" +"`PyExc_SystemError` if *set* is not an instance of :class:`set` or its " +"subtype." +msgstr "" + +#: c-api/set.rst:158 +msgid "" +"Return a new reference to an arbitrary object in the *set*, and removes the " +"object from the *set*. Return ``NULL`` on failure. Raise :exc:`KeyError` " +"if the set is empty. Raise a :exc:`SystemError` if *set* is not an instance " +"of :class:`set` or its subtype." +msgstr "" + +#: c-api/set.rst:166 +msgid "Empty an existing set of all elements." +msgstr "" diff --git a/c-api/slice.po b/c-api/slice.po new file mode 100644 index 0000000000..605d241ce4 --- /dev/null +++ b/c-api/slice.po @@ -0,0 +1,141 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +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: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \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" + +#: c-api/slice.rst:6 +#, fuzzy +msgid "Slice Objects" +msgstr "Objets tranches" + +#: c-api/slice.rst:11 +msgid "" +"The type object for slice objects. This is the same as :class:`slice` in " +"the Python layer." +msgstr "" + +#: c-api/slice.rst:17 +msgid "" +"Return true if *ob* is a slice object; *ob* must not be ``NULL``. This " +"function always succeeds." +msgstr "" + +#: c-api/slice.rst:23 +msgid "" +"Return a new slice object with the given values. The *start*, *stop*, and " +"*step* parameters are used as the values of the slice object attributes of " +"the same names. Any of the values may be ``NULL``, in which case the " +"``None`` will be used for the corresponding attribute. Return ``NULL`` if " +"the new object could not be allocated." +msgstr "" + +#: c-api/slice.rst:32 +msgid "" +"Retrieve the start, stop and step indices from the slice object *slice*, " +"assuming a sequence of length *length*. Treats indices greater than *length* " +"as errors." +msgstr "" + +#: c-api/slice.rst:36 +msgid "" +"Returns ``0`` on success and ``-1`` on error with no exception set (unless " +"one of the indices was not :const:`None` and failed to be converted to an " +"integer, in which case ``-1`` is returned with an exception set)." +msgstr "" + +#: c-api/slice.rst:40 +msgid "You probably do not want to use this function." +msgstr "" + +#: c-api/slice.rst:73 +msgid "" +"The parameter type for the *slice* parameter was ``PySliceObject*`` before." +msgstr "" + +#: c-api/slice.rst:49 +msgid "" +"Usable replacement for :c:func:`PySlice_GetIndices`. Retrieve the start, " +"stop, and step indices from the slice object *slice* assuming a sequence of " +"length *length*, and store the length of the slice in *slicelength*. Out of " +"bounds indices are clipped in a manner consistent with the handling of " +"normal slices." +msgstr "" + +#: c-api/slice.rst:55 +msgid "Returns ``0`` on success and ``-1`` on error with exception set." +msgstr "" + +#: c-api/slice.rst:58 +msgid "" +"This function is considered not safe for resizable sequences. Its invocation " +"should be replaced by a combination of :c:func:`PySlice_Unpack` and :c:func:" +"`PySlice_AdjustIndices` where ::" +msgstr "" + +#: c-api/slice.rst:66 +msgid "is replaced by ::" +msgstr "" + +#: c-api/slice.rst:77 +msgid "" +"If ``Py_LIMITED_API`` is not set or set to the value between ``0x03050400`` " +"and ``0x03060000`` (not including) or ``0x03060100`` or higher :c:func:`!" +"PySlice_GetIndicesEx` is implemented as a macro using :c:func:`!" +"PySlice_Unpack` and :c:func:`!PySlice_AdjustIndices`. Arguments *start*, " +"*stop* and *step* are evaluated more than once." +msgstr "" + +#: c-api/slice.rst:84 +msgid "" +"If ``Py_LIMITED_API`` is set to the value less than ``0x03050400`` or " +"between ``0x03060000`` and ``0x03060100`` (not including) :c:func:`!" +"PySlice_GetIndicesEx` is a deprecated function." +msgstr "" + +#: c-api/slice.rst:92 +msgid "" +"Extract the start, stop and step data members from a slice object as C " +"integers. Silently reduce values larger than ``PY_SSIZE_T_MAX`` to " +"``PY_SSIZE_T_MAX``, silently boost the start and stop values less than " +"``PY_SSIZE_T_MIN`` to ``PY_SSIZE_T_MIN``, and silently boost the step values " +"less than ``-PY_SSIZE_T_MAX`` to ``-PY_SSIZE_T_MAX``." +msgstr "" + +#: c-api/slice.rst:98 +msgid "Return ``-1`` on error, ``0`` on success." +msgstr "" + +#: c-api/slice.rst:105 +msgid "" +"Adjust start/end slice indices assuming a sequence of the specified length. " +"Out of bounds indices are clipped in a manner consistent with the handling " +"of normal slices." +msgstr "" + +#: c-api/slice.rst:109 +msgid "" +"Return the length of the slice. Always successful. Doesn't call Python " +"code." +msgstr "" + +#: c-api/slice.rst:116 +msgid "Ellipsis Object" +msgstr "" + +#: c-api/slice.rst:121 +msgid "" +"The Python ``Ellipsis`` object. This object has no methods. It needs to be " +"treated just like any other object with respect to reference counts. Like :" +"c:data:`Py_None` it is a singleton object." +msgstr "" diff --git a/c-api/stable.po b/c-api/stable.po new file mode 100644 index 0000000000..e1f58647f1 --- /dev/null +++ b/c-api/stable.po @@ -0,0 +1,410 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-09-23 16:16+0200\n" +"PO-Revision-Date: 2018-10-04 12:26+0200\n" +"Last-Translator: Julien Palard \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" + +#: c-api/stable.rst:7 +msgid "C API Stability" +msgstr "Stabilité de l’API C" + +#: c-api/stable.rst:9 +msgid "" +"Python's C API is covered by the Backwards Compatibility Policy, :pep:`387`. " +"While the C API will change with every minor release (e.g. from 3.9 to " +"3.10), most changes will be source-compatible, typically by only adding new " +"API. Changing existing API or removing API is only done after a deprecation " +"period or to fix serious issues." +msgstr "" +"L'API C respecte la politique de rétrocompatibilité de Python, :pep:`387`. " +"Malgré la présence d’évolutions dans chaque version mineure (par exemple " +"entre 3.9 et 3.10), la majorité de ces changements n'affecte pas la " +"compatibilité du code source. Typiquement des API sont ajoutées mais pas " +"modifiées ou supprimées, bien que cela puisse arriver après une période de " +"dépréciation ou pour corriger un problème important." + +#: c-api/stable.rst:15 +msgid "" +"CPython's Application Binary Interface (ABI) is forward- and backwards-" +"compatible across a minor release (if these are compiled the same way; see :" +"ref:`stable-abi-platform` below). So, code compiled for Python 3.10.0 will " +"work on 3.10.8 and vice versa, but will need to be compiled separately for " +"3.9.x and 3.10.x." +msgstr "" +"L’interface binaire de CPython (ABI) est entièrement compatible au sein " +"d’une version mineure (à condition que la compilation soit toujours faite de " +"même manière, comme indiqué dans :ref:`stable-abi-platform` ci-dessous). " +"Ainsi le code compilé pour Python 3.10.0 fonctionnera avec Python 3.10.8 et " +"inversement, mais il devra être compilé séparément pour 3.9.x et 3.10.x." + +#: c-api/stable.rst:21 +msgid "" +"Names prefixed by an underscore, such as ``_Py_InternalState``, are private " +"API that can change without notice even in patch releases." +msgstr "" +"Les noms commençant par un caractère souligné, comme ``_Py_InternalState``, " +"font partie de l’API privée et peuvent changer sans préavis même dans une " +"version de correctif." + +#: c-api/stable.rst:26 +msgid "Stable Application Binary Interface" +msgstr "ABI Stable" + +#: c-api/stable.rst:28 +msgid "" +"Python 3.2 introduced the *Limited API*, a subset of Python's C API. " +"Extensions that only use the Limited API can be compiled once and work with " +"multiple versions of Python. Contents of the Limited API are :ref:`listed " +"below `." +msgstr "" +"Le concept d’*API restreinte*, un sous-ensemble de l’API C de Python, existe " +"depuis Python 3.2. Les extensions qui utilisent uniquement l’API restreinte " +"peuvent être compilées une seule fois et fonctionner avec plusieurs versions " +"de Python. Les objets faisant partie de l’API restreinte sont :ref:" +"`documentés ci-dessous `." + +#: c-api/stable.rst:33 +msgid "" +"To enable this, Python provides a *Stable ABI*: a set of symbols that will " +"remain compatible across Python 3.x versions. The Stable ABI contains " +"symbols exposed in the Limited API, but also other ones – for example, " +"functions necessary to support older versions of the Limited API." +msgstr "" +"Python a aussi une *ABI stable* : un ensemble de symboles qui sont " +"compatibles avec l’ensemble des versions Python 3.x. L’ABI stable contient " +"les symboles utilisés par l’API restreinte, mais pas seulement — par exemple " +"les fonctions nécessaires pour supporter les versions précédentes de l’API " +"restreinte en font aussi partie." + +#: c-api/stable.rst:38 +msgid "" +"(For simplicity, this document talks about *extensions*, but the Limited API " +"and Stable ABI work the same way for all uses of the API – for example, " +"embedding Python.)" +msgstr "" +"(Par simplicité ce document parle *d’extensions*, mais l’API restreinte et " +"l’ABI stable fonctionnent de la même manière pour tous les cas d’usages de " +"l’API — par exemple pour embarquer Python.)" + +#: c-api/stable.rst:44 +msgid "" +"Define this macro before including ``Python.h`` to opt in to only use the " +"Limited API, and to select the Limited API version." +msgstr "" +"Définissez cette macro avant d’inclure ``Python.h`` pour n’inclure que l’API " +"restreinte et indiquer sa version." + +#: c-api/stable.rst:47 +msgid "" +"Define ``Py_LIMITED_API`` to the value of :c:data:`PY_VERSION_HEX` " +"corresponding to the lowest Python version your extension supports. The " +"extension will work without recompilation with all Python 3 releases from " +"the specified one onward, and can use Limited API introduced up to that " +"version." +msgstr "" +"Définissez ``Py_LIMITED_API`` à la valeur de :c:data:`PY_VERSION_HEX` " +"correspond à la version minimale de Python que votre extension supporte. " +"Cette extension fonctionnera sans re-compilation avec toutes les versions " +"futures de Python 3, et peut utiliser l’ensemble des éléments de l’API " +"restreinte présent dans cette version." + +#: c-api/stable.rst:53 +msgid "" +"Rather than using the ``PY_VERSION_HEX`` macro directly, hardcode a minimum " +"minor version (e.g. ``0x030A0000`` for Python 3.10) for stability when " +"compiling with future Python versions." +msgstr "" +"Il est recommandé de renseigner une version mineure minimale (par exemple " +"``0x030A0000`` pour Python 3.10) plutôt que d’utiliser directement la macro " +"``PY_VERSION_HEX`` pour ne pas dépendre de la version de Python utilisée " +"lors de la compilation." + +#: c-api/stable.rst:57 +msgid "" +"You can also define ``Py_LIMITED_API`` to ``3``. This works the same as " +"``0x03020000`` (Python 3.2, the version that introduced Limited API)." +msgstr "" +"Vous pouvez aussi définir ``Py_LIMITED_API`` à ``3``. Cette valeur est " +"équivalente à ``0x03020000`` correspondant à Python 3.2, la première version " +"à supporter l’API restreinte." + +#: c-api/stable.rst:60 +msgid "" +"On Windows, extensions that use the Stable ABI should be linked against " +"``python3.dll`` rather than a version-specific library such as ``python39." +"dll``." +msgstr "" +"Sur Windows les extensions qui utilisent l’ABI stable doivent être liées " +"avec ``python3.dll`` et non pas avec une bibliothèque spécifique à une " +"version comme ``python39.dll``." + +#: c-api/stable.rst:64 +msgid "" +"On some platforms, Python will look for and load shared library files named " +"with the ``abi3`` tag (e.g. ``mymodule.abi3.so``). It does not check if such " +"extensions conform to a Stable ABI. The user (or their packaging tools) need " +"to ensure that, for example, extensions built with the 3.10+ Limited API are " +"not installed for lower versions of Python." +msgstr "" +"Sur certaines plateformes Python essaiera de charger une bibliothèque " +"partagée dont le nom contient ``abi3`` (par exemple ``mymodule.abi3.so``). " +"Il ne vérifie pas si ces extensions respectent l’ABI stable. L’utilisateur " +"(ou ses outils d’administration) doit s’assurer que les extensions compilées " +"avec une version donnée de l’API restreinte, par exemple 3.10+, ne sont pas " +"utilisées avec des versions plus anciennes de Python." + +#: c-api/stable.rst:71 +msgid "" +"All functions in the Stable ABI are present as functions in Python's shared " +"library, not solely as macros. This makes them usable from languages that " +"don't use the C preprocessor." +msgstr "" +"Toutes les fonctions de l’ABI stable sont présentes dans la bibliothèque " +"dynamique de Python en tant que fonction, et pas uniquement comme macro. " +"Elles peuvent donc être utilisées avec des langages qui n’utilisent pas le " +"pré-processeur C." + +#: c-api/stable.rst:77 +msgid "Limited API Scope and Performance" +msgstr "Porté de l’API restreinte et performance" + +#: c-api/stable.rst:79 +msgid "" +"The goal for the Limited API is to allow everything that is possible with " +"the full C API, but possibly with a performance penalty." +msgstr "" +"L’objectif de l’API restreinte est de permettre l’ensemble des opérations " +"possibles avec l’API C étendue, mais peut avoir un impact sur les " +"performances." + +#: c-api/stable.rst:82 +msgid "" +"For example, while :c:func:`PyList_GetItem` is available, its “unsafe” macro " +"variant :c:func:`PyList_GET_ITEM` is not. The macro can be faster because it " +"can rely on version-specific implementation details of the list object." +msgstr "" +"Par exemple la fonction :c:func:`PyList_GetItem` est disponible, mais la " +"macro « dangereuse » :c:func:`PyList_GET_ITEM` ne l’est pas. Cette macro " +"peut être plus rapide car elle dépend de détails d’implémentation spécifique " +"à l’objet ``list``." + +#: c-api/stable.rst:87 +msgid "" +"Without ``Py_LIMITED_API`` defined, some C API functions are inlined or " +"replaced by macros. Defining ``Py_LIMITED_API`` disables this inlining, " +"allowing stability as Python's data structures are improved, but possibly " +"reducing performance." +msgstr "" +"Si ``Py_LIMITED_API`` n’est pas défini certaines fonctions de l’API C seront " +"remplacées par des macros ou une version en-ligne. Définir " +"``Py_LIMITED_API`` désactive cette optimisation, permettant de se garantir " +"contre les évolutions des structures de données utilisées par Python, et " +"peut réduire les performances." + +#: c-api/stable.rst:92 +msgid "" +"By leaving out the ``Py_LIMITED_API`` definition, it is possible to compile " +"a Limited API extension with a version-specific ABI. This can improve " +"performance for that Python version, but will limit compatibility. Compiling " +"with ``Py_LIMITED_API`` will then yield an extension that can be distributed " +"where a version-specific one is not available – for example, for prereleases " +"of an upcoming Python version." +msgstr "" +"En omettant la définition de ``Py_LIMITED_API`` il est possible de compiler " +"une extension utilisant l’API restreinte avec une version spécifique de " +"l’ABI. Les performances seront meilleures pour cette version de Python, mais " +"la compatibilité sera réduite. Compiler en définissant ``Py_LIMITED_API`` " +"produira une extension qui peut être utilisée quand une variante spécifique " +"à une version n’est pas disponible — par exemple pour une version alpha de " +"Python." + +#: c-api/stable.rst:101 +msgid "Limited API Caveats" +msgstr "Inconvénients de l’API restreinte" + +#: c-api/stable.rst:103 +msgid "" +"Note that compiling with ``Py_LIMITED_API`` is *not* a complete guarantee " +"that code conforms to the Limited API or the Stable ABI. ``Py_LIMITED_API`` " +"only covers definitions, but an API also includes other issues, such as " +"expected semantics." +msgstr "" +"Compiler avec ``Py_LIMITED_API`` *n’est pas* une garantie absolue que le " +"code est conforme à l’API restreinte ou à l’ABI stable. ``Py_LIMITED_API`` " +"ne concerne que la définition des objets, mais une API inclut aussi d’autres " +"spécificités comme le comportement attendu." + +#: c-api/stable.rst:108 +msgid "" +"One issue that ``Py_LIMITED_API`` does not guard against is calling a " +"function with arguments that are invalid in a lower Python version. For " +"example, consider a function that starts accepting ``NULL`` for an argument. " +"In Python 3.9, ``NULL`` now selects a default behavior, but in Python 3.8, " +"the argument will be used directly, causing a ``NULL`` dereference and " +"crash. A similar argument works for fields of structs." +msgstr "" +"Une des limitations est que ``Py_LIMITED_API`` ne protège pas contre l’appel " +"d’une fonction avec des arguments qui sont invalides pour une version de " +"Python plus ancienne. Par exemple considérons une fonction qui accepte " +"``NULL`` comme argument à partir de 3.9. ``NULL`` permet maintenant " +"d’utiliser le comportement par défaut, mais Python 3.8 essayera d’accéder à " +"l’objet pointé et dé-référencera ``NULL``, causant un crash. Des problèmes " +"similaires peuvent se produire avec les attributs des structures." + +#: c-api/stable.rst:115 +msgid "" +"Another issue is that some struct fields are currently not hidden when " +"``Py_LIMITED_API`` is defined, even though they're part of the Limited API." +msgstr "" +"Un autre problème est que certains attributs ne sont pas encore cachés " +"lorsque ``Py_LIMITED_API`` est défini, même s’ils ne font pas partie de " +"l’API restreinte." + +#: c-api/stable.rst:118 +msgid "" +"For these reasons, we recommend testing an extension with *all* minor Python " +"versions it supports, and preferably to build with the *lowest* such version." +msgstr "" +"Pour ces raisons il est recommandé de tester une extension avec *l’ensemble " +"des versions mineures* supportées de Python, et généralement de la compiler " +"avec la plus *ancienne* de ces versions." + +#: c-api/stable.rst:121 +msgid "" +"We also recommend reviewing documentation of all used API to check if it is " +"explicitly part of the Limited API. Even with ``Py_LIMITED_API`` defined, a " +"few private declarations are exposed for technical reasons (or even " +"unintentionally, as bugs)." +msgstr "" +"Il est aussi recommandé de vérifier la documentation de toutes les API " +"utilisées pour vérifier qu’elles fassent bien partie de l’API restreinte. " +"Même lorsque ``Py_LIMITED_API`` est défini quelques fonctions privées " +"peuvent être exposées aux utilisateurs pour des raisons techniques, ou par " +"erreur." + +#: c-api/stable.rst:126 +msgid "" +"Also note that the Limited API is not necessarily stable: compiling with " +"``Py_LIMITED_API`` with Python 3.8 means that the extension will run with " +"Python 3.12, but it will not necessarily *compile* with Python 3.12. In " +"particular, parts of the Limited API may be deprecated and removed, provided " +"that the Stable ABI stays stable." +msgstr "" +"Notez aussi que l’API restreinte n’est pas forcément stable : compiler avec " +"Python 3.8 en définissant ``Py_LIMITED_API`` garanti que l’extension " +"fonctionnera avec Python 3.12, mais pas qu’elle pourra *être compilée* avec " +"Python 3.12. En particulier certaines parties de l’API restreinte peuvent " +"être dépréciées et retirées tant que l’ABI stable n’est pas modifiée." + +#: c-api/stable.rst:136 +msgid "Platform Considerations" +msgstr "Considérations relatives aux plateformes" + +#: c-api/stable.rst:138 +msgid "" +"ABI stability depends not only on Python, but also on the compiler used, " +"lower-level libraries and compiler options. For the purposes of the Stable " +"ABI, these details define a “platform”. They usually depend on the OS type " +"and processor architecture" +msgstr "" +"La stabilité de l’ABI ne dépend pas que de Python mais aussi du compilateur " +"utilisé, des bibliothèques systèmes et des options du compilateur. " +"L’ensemble de ces détails correspondent à ce que l’ABI stable appelle une " +"« plateforme ». Ils dépendent généralement du système d’exploitation et de " +"l’architecture du processeur." + +#: c-api/stable.rst:143 +msgid "" +"It is the responsibility of each particular distributor of Python to ensure " +"that all Python versions on a particular platform are built in a way that " +"does not break the Stable ABI. This is the case with Windows and macOS " +"releases from ``python.org`` and many third-party distributors." +msgstr "" +"Les distributeurs de Python doivent s’assurer que toutes les versions de " +"Python pour une plateforme donnée sont compilées de manière à ne pas rompre " +"la compatibilité de l’ABI stable. C’est le cas des versions produites pour " +"Windows et macOS de ``python.org`` et de la plupart des distributions " +"tierces." + +#: c-api/stable.rst:153 +msgid "Contents of Limited API" +msgstr "Contenu de l’API restreinte" + +#: c-api/stable.rst:156 +msgid "Currently, the Limited API includes the following items:" +msgstr "Pour le moment l’API restreinte inclut les éléments suivants :" + +#~ msgid "" +#~ "Unfortunately, the API compatibility does not extend to binary " +#~ "compatibility (the ABI). The reason is primarily the evolution of struct " +#~ "definitions, where addition of a new field, or changing the type of a " +#~ "field, might not break the API, but can break the ABI. As a consequence, " +#~ "extension modules need to be recompiled for every Python release " +#~ "(although an exception is possible on Unix when none of the affected " +#~ "interfaces are used). In addition, on Windows, extension modules link " +#~ "with a specific pythonXY.dll and need to be recompiled to link with a " +#~ "newer one." +#~ msgstr "" +#~ "Malheureusement, la compatibilité de l'API ne s'étend pas à une " +#~ "compatibilité binaire (l'ABI). L'évolution des structures en est la " +#~ "raison principale : l'ajout de nouveaux attributs, ou le changement du " +#~ "type d'un attribut peut ne pas casser l'API mais casser l'ABI. Par " +#~ "conséquent, les modules d'extension doivent être recompilés à chaque " +#~ "nouvelle version de Python (ce n'est exceptionnellement pas nécessaire " +#~ "sur Unix, si aucune des interfaces modifiées n'est utilisée). De plus, " +#~ "sous Windows, les modules d'extension sont liés à un *pythonXY.dll* " +#~ "spécifique, ils est donc nécessaire de les recompiler pour les lier au " +#~ "nouveau DLL." + +#~ 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." +#~ 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 \"API limitée\") doivent définir ``Py_LIMITED_API``. Des " +#~ "spécificités de l'interpréteur sont alors cachées au module, en " +#~ "contrepartie le module devient compatible avec toutes les versions de " +#~ "Python 3.x (x>=2) sans recompilation." + +#~ msgid "" +#~ "In some cases, the stable ABI needs to be extended with new functions. " +#~ "Extension modules wishing to use these new APIs need to set " +#~ "``Py_LIMITED_API`` to the ``PY_VERSION_HEX`` value (see :ref:" +#~ "`apiabiversion`) of the minimum Python version they want to support (e.g. " +#~ "``0x03030000`` for Python 3.3). Such modules will work on all subsequent " +#~ "Python releases, but fail to load (because of missing symbols) on the " +#~ "older releases." +#~ msgstr "" +#~ "Dans certains cas, il est nécessaire d'étendre l'ABI stable avec de " +#~ "nouvelles fonctions. Les modules d'extension souhaitant utiliser ces " +#~ "nouvelles APIs doivent configurer ``Py_LIMITED_API`` à la valeur " +#~ "``Py_VERSION_HEX`` correspondant à la plus ancienne version de Python " +#~ "qu'ils souhaitent supporter (voir :ref:`apiabiversion`, par exemple " +#~ "``0x03030000`` pour Python 3.3). De tels modules fonctionneront dans " +#~ "toutes les versions ultérieures de Python, mais ne pourront pas se " +#~ "charger (dû à des symboles manquants) sur les versions plus anciennes." + +#~ msgid "" +#~ "As of Python 3.2, the set of functions available to the limited API is " +#~ "documented in :pep:`384`. In the C API documentation, API elements that " +#~ "are not part of the limited API are marked as \"Not part of the limited " +#~ "API.\"" +#~ msgstr "" +#~ "Depuis Python 3.2, l'ensemble des fonctions exposées par l'API limitée " +#~ "est documentée dans la :pep:`384`. Dans la documentation de l'API C, les " +#~ "éléments ne faisant pas partie de l'API limitée sont notés \"Ne faisant " +#~ "pas partie de l'API limitée\" (*\"Not part of the limited API\"*)." diff --git a/c-api/structures.po b/c-api/structures.po new file mode 100644 index 0000000000..c086cb1092 --- /dev/null +++ b/c-api/structures.po @@ -0,0 +1,716 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-22 22:57+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \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" + +#: c-api/structures.rst:6 +msgid "Common Object Structures" +msgstr "" + +#: c-api/structures.rst:8 +msgid "" +"There are a large number of structures which are used in the definition of " +"object types for Python. This section describes these structures and how " +"they are used." +msgstr "" + +#: c-api/structures.rst:14 +msgid "Base object types and macros" +msgstr "" + +#: c-api/structures.rst:16 +msgid "" +"All Python objects ultimately share a small number of fields at the " +"beginning of the object's representation in memory. These are represented " +"by the :c:type:`PyObject` and :c:type:`PyVarObject` types, which are " +"defined, in turn, by the expansions of some macros also used, whether " +"directly or indirectly, in the definition of all other Python objects." +msgstr "" + +#: c-api/structures.rst:25 +msgid "" +"All object types are extensions of this type. This is a type which contains " +"the information Python needs to treat a pointer to an object as an object. " +"In a normal \"release\" build, it contains only the object's reference count " +"and a pointer to the corresponding type object. Nothing is actually declared " +"to be a :c:type:`PyObject`, but every pointer to a Python object can be cast " +"to a :c:expr:`PyObject*`. Access to the members must be done by using the " +"macros :c:macro:`Py_REFCNT` and :c:macro:`Py_TYPE`." +msgstr "" + +#: c-api/structures.rst:37 +msgid "" +"This is an extension of :c:type:`PyObject` that adds the :attr:`ob_size` " +"field. This is only used for objects that have some notion of *length*. " +"This type does not often appear in the Python/C API. Access to the members " +"must be done by using the macros :c:macro:`Py_REFCNT`, :c:macro:`Py_TYPE`, " +"and :c:macro:`Py_SIZE`." +msgstr "" + +#: c-api/structures.rst:46 +msgid "" +"This is a macro used when declaring new types which represent objects " +"without a varying length. The PyObject_HEAD macro expands to::" +msgstr "" + +#: c-api/structures.rst:51 +msgid "See documentation of :c:type:`PyObject` above." +msgstr "" + +#: c-api/structures.rst:56 +msgid "" +"This is a macro used when declaring new types which represent objects with a " +"length that varies from instance to instance. The PyObject_VAR_HEAD macro " +"expands to::" +msgstr "" + +#: c-api/structures.rst:62 +msgid "See documentation of :c:type:`PyVarObject` above." +msgstr "" + +#: c-api/structures.rst:67 +msgid "" +"Test if the *x* object is the *y* object, the same as ``x is y`` in Python." +msgstr "" + +#: c-api/structures.rst:74 +msgid "" +"Test if an object is the ``None`` singleton, the same as ``x is None`` in " +"Python." +msgstr "" + +#: c-api/structures.rst:82 +msgid "" +"Test if an object is the ``True`` singleton, the same as ``x is True`` in " +"Python." +msgstr "" + +#: c-api/structures.rst:90 +msgid "" +"Test if an object is the ``False`` singleton, the same as ``x is False`` in " +"Python." +msgstr "" + +#: c-api/structures.rst:98 +msgid "Get the type of the Python object *o*." +msgstr "" + +#: c-api/structures.rst:100 +msgid "Return a :term:`borrowed reference`." +msgstr "" + +#: c-api/structures.rst:102 +msgid "Use the :c:func:`Py_SET_TYPE` function to set an object type." +msgstr "" + +#: c-api/structures.rst:107 +msgid "" +"Return non-zero if the object *o* type is *type*. Return zero otherwise. " +"Equivalent to: ``Py_TYPE(o) == type``." +msgstr "" + +#: c-api/structures.rst:115 +msgid "Set the object *o* type to *type*." +msgstr "" + +#: c-api/structures.rst:122 +msgid "Get the reference count of the Python object *o*." +msgstr "" + +#: c-api/structures.rst:124 +msgid "" +":c:func:`Py_REFCNT()` is changed to the inline static function. Use :c:func:" +"`Py_SET_REFCNT()` to set an object reference count." +msgstr "" + +#: c-api/structures.rst:131 +msgid "Set the object *o* reference counter to *refcnt*." +msgstr "" + +#: c-api/structures.rst:138 +msgid "Get the size of the Python object *o*." +msgstr "" + +#: c-api/structures.rst:140 +msgid "Use the :c:func:`Py_SET_SIZE` function to set an object size." +msgstr "" + +#: c-api/structures.rst:145 +msgid "Set the object *o* size to *size*." +msgstr "" + +#: c-api/structures.rst:152 +msgid "" +"This is a macro which expands to initialization values for a new :c:type:" +"`PyObject` type. This macro expands to::" +msgstr "" + +#: c-api/structures.rst:161 +msgid "" +"This is a macro which expands to initialization values for a new :c:type:" +"`PyVarObject` type, including the :attr:`ob_size` field. This macro expands " +"to::" +msgstr "" + +#: c-api/structures.rst:170 +msgid "Implementing functions and methods" +msgstr "" + +#: c-api/structures.rst:174 +msgid "" +"Type of the functions used to implement most Python callables in C. " +"Functions of this type take two :c:expr:`PyObject*` parameters and return " +"one such value. If the return value is ``NULL``, an exception shall have " +"been set. If not ``NULL``, the return value is interpreted as the return " +"value of the function as exposed in Python. The function must return a new " +"reference." +msgstr "" + +#: c-api/structures.rst:181 +msgid "The function signature is::" +msgstr "" + +#: c-api/structures.rst:188 +msgid "" +"Type of the functions used to implement Python callables in C with " +"signature :const:`METH_VARARGS | METH_KEYWORDS`. The function signature is::" +msgstr "" + +#: c-api/structures.rst:199 +msgid "" +"Type of the functions used to implement Python callables in C with " +"signature :const:`METH_FASTCALL`. The function signature is::" +msgstr "" + +#: c-api/structures.rst:209 +msgid "" +"Type of the functions used to implement Python callables in C with " +"signature :const:`METH_FASTCALL | METH_KEYWORDS`. The function signature is::" +msgstr "" + +#: c-api/structures.rst:220 +msgid "" +"Type of the functions used to implement Python callables in C with " +"signature :const:`METH_METHOD | METH_FASTCALL | METH_KEYWORDS`. The function " +"signature is::" +msgstr "" + +#: c-api/structures.rst:235 +msgid "" +"Structure used to describe a method of an extension type. This structure " +"has four fields:" +msgstr "" + +#: c-api/structures.rst:240 +msgid "name of the method" +msgstr "" + +#: c-api/structures.rst:244 +msgid "pointer to the C implementation" +msgstr "" + +#: c-api/structures.rst:248 +msgid "flags bits indicating how the call should be constructed" +msgstr "" + +#: c-api/structures.rst:411 +msgid "points to the contents of the docstring" +msgstr "" + +#: c-api/structures.rst:254 +msgid "" +"The :c:member:`ml_meth` is a C function pointer. The functions may be of " +"different types, but they always return :c:expr:`PyObject*`. If the " +"function is not of the :c:type:`PyCFunction`, the compiler will require a " +"cast in the method table. Even though :c:type:`PyCFunction` defines the " +"first parameter as :c:expr:`PyObject*`, it is common that the method " +"implementation uses the specific C type of the *self* object." +msgstr "" + +#: c-api/structures.rst:261 +msgid "" +"The :c:member:`ml_flags` field is a bitfield which can include the following " +"flags. The individual flags indicate either a calling convention or a " +"binding convention." +msgstr "" + +#: c-api/structures.rst:265 +msgid "There are these calling conventions:" +msgstr "" + +#: c-api/structures.rst:269 +msgid "" +"This is the typical calling convention, where the methods have the type :c:" +"type:`PyCFunction`. The function expects two :c:expr:`PyObject*` values. The " +"first one is the *self* object for methods; for module functions, it is the " +"module object. The second parameter (often called *args*) is a tuple object " +"representing all arguments. This parameter is typically processed using :c:" +"func:`PyArg_ParseTuple` or :c:func:`PyArg_UnpackTuple`." +msgstr "" + +#: c-api/structures.rst:279 +msgid "" +"Methods with these flags must be of type :c:type:`PyCFunctionWithKeywords`. " +"The function expects three parameters: *self*, *args*, *kwargs* where " +"*kwargs* is a dictionary of all the keyword arguments or possibly ``NULL`` " +"if there are no keyword arguments. The parameters are typically processed " +"using :c:func:`PyArg_ParseTupleAndKeywords`." +msgstr "" + +#: c-api/structures.rst:288 +msgid "" +"Fast calling convention supporting only positional arguments. The methods " +"have the type :c:type:`_PyCFunctionFast`. The first parameter is *self*, the " +"second parameter is a C array of :c:expr:`PyObject*` values indicating the " +"arguments and the third parameter is the number of arguments (the length of " +"the array)." +msgstr "" + +#: c-api/structures.rst:298 +msgid "``METH_FASTCALL`` is now part of the stable ABI." +msgstr "" + +#: c-api/structures.rst:303 +msgid "" +"Extension of :const:`METH_FASTCALL` supporting also keyword arguments, with " +"methods of type :c:type:`_PyCFunctionFastWithKeywords`. Keyword arguments " +"are passed the same way as in the :ref:`vectorcall protocol `: " +"there is an additional fourth :c:expr:`PyObject*` parameter which is a tuple " +"representing the names of the keyword arguments (which are guaranteed to be " +"strings) or possibly ``NULL`` if there are no keywords. The values of the " +"keyword arguments are stored in the *args* array, after the positional " +"arguments." +msgstr "" + +#: c-api/structures.rst:318 +msgid "" +"Extension of :const:`METH_FASTCALL | METH_KEYWORDS` supporting the *defining " +"class*, that is, the class that contains the method in question. The " +"defining class might be a superclass of ``Py_TYPE(self)``." +msgstr "" + +#: c-api/structures.rst:322 +msgid "" +"The method needs to be of type :c:type:`PyCMethod`, the same as for " +"``METH_FASTCALL | METH_KEYWORDS`` with ``defining_class`` argument added " +"after ``self``." +msgstr "" + +#: c-api/structures.rst:331 +msgid "" +"Methods without parameters don't need to check whether arguments are given " +"if they are listed with the :const:`METH_NOARGS` flag. They need to be of " +"type :c:type:`PyCFunction`. The first parameter is typically named *self* " +"and will hold a reference to the module or object instance. In all cases " +"the second parameter will be ``NULL``." +msgstr "" + +#: c-api/structures.rst:340 +msgid "" +"Methods with a single object argument can be listed with the :const:`METH_O` " +"flag, instead of invoking :c:func:`PyArg_ParseTuple` with a ``\"O\"`` " +"argument. They have the type :c:type:`PyCFunction`, with the *self* " +"parameter, and a :c:expr:`PyObject*` parameter representing the single " +"argument." +msgstr "" + +#: c-api/structures.rst:346 +msgid "" +"These two constants are not used to indicate the calling convention but the " +"binding when use with methods of classes. These may not be used for " +"functions defined for modules. At most one of these flags may be set for " +"any given method." +msgstr "" + +#: c-api/structures.rst:356 +msgid "" +"The method will be passed the type object as the first parameter rather than " +"an instance of the type. This is used to create *class methods*, similar to " +"what is created when using the :func:`classmethod` built-in function." +msgstr "" + +#: c-api/structures.rst:366 +msgid "" +"The method will be passed ``NULL`` as the first parameter rather than an " +"instance of the type. This is used to create *static methods*, similar to " +"what is created when using the :func:`staticmethod` built-in function." +msgstr "" + +#: c-api/structures.rst:370 +msgid "" +"One other constant controls whether a method is loaded in place of another " +"definition with the same method name." +msgstr "" + +#: c-api/structures.rst:376 +msgid "" +"The method will be loaded in place of existing definitions. Without " +"*METH_COEXIST*, the default is to skip repeated definitions. Since slot " +"wrappers are loaded before the method table, the existence of a " +"*sq_contains* slot, for example, would generate a wrapped method named :meth:" +"`__contains__` and preclude the loading of a corresponding PyCFunction with " +"the same name. With the flag defined, the PyCFunction will be loaded in " +"place of the wrapper object and will co-exist with the slot. This is " +"helpful because calls to PyCFunctions are optimized more than wrapper object " +"calls." +msgstr "" + +#: c-api/structures.rst:388 +msgid "Accessing attributes of extension types" +msgstr "" + +#: c-api/structures.rst:392 +msgid "" +"Structure which describes an attribute of a type which corresponds to a C " +"struct member. Its fields are:" +msgstr "" + +#: c-api/structures.rst:492 +msgid "Field" +msgstr "Champ" + +#: c-api/structures.rst:492 +msgid "C Type" +msgstr "Type C" + +#: c-api/structures.rst:492 +msgid "Meaning" +msgstr "Signification" + +#: c-api/structures.rst:398 +msgid ":attr:`name`" +msgstr ":attr:`name`" + +#: c-api/structures.rst:411 c-api/structures.rst:494 c-api/structures.rst:502 +msgid "const char \\*" +msgstr "" + +#: c-api/structures.rst:398 +msgid "name of the member" +msgstr "" + +#: c-api/structures.rst:400 +msgid ":attr:`!type`" +msgstr ":attr:`!type`" + +#: c-api/structures.rst:407 c-api/structures.rst:423 +msgid "int" +msgstr "*int*" + +#: c-api/structures.rst:400 +msgid "the type of the member in the C struct" +msgstr "" + +#: c-api/structures.rst:403 +msgid ":attr:`offset`" +msgstr ":attr:`offset`" + +#: c-api/structures.rst:439 +msgid "Py_ssize_t" +msgstr "" + +#: c-api/structures.rst:403 +msgid "" +"the offset in bytes that the member is located on the type's object struct" +msgstr "" + +#: c-api/structures.rst:407 +msgid ":attr:`flags`" +msgstr ":attr:`flags`" + +#: c-api/structures.rst:407 +msgid "flag bits indicating if the field should be read-only or writable" +msgstr "" + +#: c-api/structures.rst:411 +msgid ":attr:`doc`" +msgstr ":attr:`doc`" + +#: c-api/structures.rst:415 +msgid "" +":attr:`!type` can be one of many ``T_`` macros corresponding to various C " +"types. When the member is accessed in Python, it will be converted to the " +"equivalent Python type." +msgstr "" + +#: c-api/structures.rst:420 +msgid "Macro name" +msgstr "" + +#: c-api/structures.rst:420 +msgid "C type" +msgstr "Type C" + +#: c-api/structures.rst:422 +msgid "T_SHORT" +msgstr "" + +#: c-api/structures.rst:422 +msgid "short" +msgstr "" + +#: c-api/structures.rst:423 +msgid "T_INT" +msgstr "" + +#: c-api/structures.rst:424 +msgid "T_LONG" +msgstr "" + +#: c-api/structures.rst:424 +msgid "long" +msgstr "" + +#: c-api/structures.rst:425 +msgid "T_FLOAT" +msgstr "" + +#: c-api/structures.rst:425 +msgid "float" +msgstr "*float*" + +#: c-api/structures.rst:426 +msgid "T_DOUBLE" +msgstr "" + +#: c-api/structures.rst:426 +msgid "double" +msgstr "double" + +#: c-api/structures.rst:427 +msgid "T_STRING" +msgstr "" + +#: c-api/structures.rst:428 +msgid "T_OBJECT" +msgstr "" + +#: c-api/structures.rst:429 +msgid "PyObject \\*" +msgstr "PyObject \\*" + +#: c-api/structures.rst:429 +msgid "T_OBJECT_EX" +msgstr "" + +#: c-api/structures.rst:430 +msgid "T_CHAR" +msgstr "" + +#: c-api/structures.rst:431 c-api/structures.rst:436 +msgid "char" +msgstr "char" + +#: c-api/structures.rst:431 +msgid "T_BYTE" +msgstr "" + +#: c-api/structures.rst:432 +msgid "T_UBYTE" +msgstr "" + +#: c-api/structures.rst:432 +msgid "unsigned char" +msgstr "``unsigned char``" + +#: c-api/structures.rst:433 +msgid "T_UINT" +msgstr "" + +#: c-api/structures.rst:433 +msgid "unsigned int" +msgstr "``unsigned int``" + +#: c-api/structures.rst:434 +msgid "T_USHORT" +msgstr "" + +#: c-api/structures.rst:434 +msgid "unsigned short" +msgstr "``unsigned short``" + +#: c-api/structures.rst:435 +msgid "T_ULONG" +msgstr "" + +#: c-api/structures.rst:435 +msgid "unsigned long" +msgstr "``unsigned long``" + +#: c-api/structures.rst:436 +msgid "T_BOOL" +msgstr "" + +#: c-api/structures.rst:437 +msgid "T_LONGLONG" +msgstr "" + +#: c-api/structures.rst:437 +msgid "long long" +msgstr "" + +#: c-api/structures.rst:438 +msgid "T_ULONGLONG" +msgstr "" + +#: c-api/structures.rst:438 +msgid "unsigned long long" +msgstr "``unsigned long long``" + +#: c-api/structures.rst:439 +msgid "T_PYSSIZET" +msgstr "" + +#: c-api/structures.rst:442 +msgid "" +":c:macro:`T_OBJECT` and :c:macro:`T_OBJECT_EX` differ in that :c:macro:" +"`T_OBJECT` returns ``None`` if the member is ``NULL`` and :c:macro:" +"`T_OBJECT_EX` raises an :exc:`AttributeError`. Try to use :c:macro:" +"`T_OBJECT_EX` over :c:macro:`T_OBJECT` because :c:macro:`T_OBJECT_EX` " +"handles use of the :keyword:`del` statement on that attribute more correctly " +"than :c:macro:`T_OBJECT`." +msgstr "" + +#: c-api/structures.rst:449 +msgid "" +":attr:`flags` can be ``0`` for write and read access or :c:macro:`READONLY` " +"for read-only access. Using :c:macro:`T_STRING` for :attr:`type` implies :c:" +"macro:`READONLY`. :c:macro:`T_STRING` data is interpreted as UTF-8. Only :c:" +"macro:`T_OBJECT` and :c:macro:`T_OBJECT_EX` members can be deleted. (They " +"are set to ``NULL``)." +msgstr "" + +#: c-api/structures.rst:457 +msgid "" +"Heap allocated types (created using :c:func:`PyType_FromSpec` or similar), " +"``PyMemberDef`` may contain definitions for the special members " +"``__dictoffset__``, ``__weaklistoffset__`` and ``__vectorcalloffset__``, " +"corresponding to :c:member:`~PyTypeObject.tp_dictoffset`, :c:member:" +"`~PyTypeObject.tp_weaklistoffset` and :c:member:`~PyTypeObject." +"tp_vectorcall_offset` in type objects. These must be defined with " +"``T_PYSSIZET`` and ``READONLY``, for example::" +msgstr "" + +#: c-api/structures.rst:474 +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:481 +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:488 +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:494 +msgid "name" +msgstr "nom" + +#: c-api/structures.rst:494 +msgid "attribute name" +msgstr "" + +#: c-api/structures.rst:496 +msgid "get" +msgstr "" + +#: c-api/structures.rst:496 +msgid "getter" +msgstr "" + +#: c-api/structures.rst:496 +msgid "C function to get the attribute" +msgstr "" + +#: c-api/structures.rst:498 +msgid "set" +msgstr "" + +#: c-api/structures.rst:498 +msgid "setter" +msgstr "" + +#: c-api/structures.rst:498 +msgid "" +"optional C function to set or delete the attribute, if omitted the attribute " +"is readonly" +msgstr "" + +#: c-api/structures.rst:502 +msgid "doc" +msgstr "" + +#: c-api/structures.rst:502 +msgid "optional docstring" +msgstr "" + +#: c-api/structures.rst:504 +msgid "closure" +msgstr "" + +#: c-api/structures.rst:504 +msgid "void \\*" +msgstr "" + +#: c-api/structures.rst:504 +msgid "" +"optional function pointer, providing additional data for getter and setter" +msgstr "" + +#: c-api/structures.rst:509 +msgid "" +"The ``get`` function takes one :c:expr:`PyObject*` parameter (the instance) " +"and a function pointer (the associated ``closure``)::" +msgstr "" + +#: c-api/structures.rst:514 +msgid "" +"It should return a new reference on success or ``NULL`` with a set exception " +"on failure." +msgstr "" + +#: c-api/structures.rst:517 +msgid "" +"``set`` functions take two :c:expr:`PyObject*` parameters (the instance and " +"the value to be set) and a function pointer (the associated ``closure``)::" +msgstr "" + +#: c-api/structures.rst:522 +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." +msgstr "" + +#~ msgid ":attr:`ml_name`" +#~ msgstr ":attr:`ml_name`" + +#~ msgid ":attr:`ml_meth`" +#~ msgstr ":attr:`ml_meth`" + +#~ msgid "PyCFunction" +#~ msgstr "PyCFunction" + +#~ msgid ":attr:`ml_flags`" +#~ msgstr ":attr:`ml_flags`" + +#~ msgid ":attr:`ml_doc`" +#~ msgstr ":attr:`ml_doc`" diff --git a/c-api/sys.po b/c-api/sys.po new file mode 100644 index 0000000000..beba8891ff --- /dev/null +++ b/c-api/sys.po @@ -0,0 +1,491 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-18 15:46+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \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" + +#: c-api/sys.rst:6 +msgid "Operating System Utilities" +msgstr "" + +#: c-api/sys.rst:10 +msgid "" +"Return the file system representation for *path*. If the object is a :class:" +"`str` or :class:`bytes` object, then its reference count is incremented. If " +"the object implements the :class:`os.PathLike` interface, then :meth:`~os." +"PathLike.__fspath__` is returned as long as it is a :class:`str` or :class:" +"`bytes` object. Otherwise :exc:`TypeError` is raised and ``NULL`` is " +"returned." +msgstr "" + +#: c-api/sys.rst:22 +msgid "" +"Return true (nonzero) if the standard I/O file *fp* with name *filename* is " +"deemed interactive. This is the case for files for which " +"``isatty(fileno(fp))`` is true. If the global flag :c:data:" +"`Py_InteractiveFlag` is true, this function also returns true if the " +"*filename* pointer is ``NULL`` or if the name is equal to one of the strings " +"``''`` or ``'???'``." +msgstr "" + +#: c-api/sys.rst:31 +msgid "" +"Function to prepare some internal state before a process fork. This should " +"be called before calling :c:func:`fork` or any similar function that clones " +"the current process. Only available on systems where :c:func:`fork` is " +"defined." +msgstr "" + +#: c-api/sys.rst:37 +msgid "" +"The C :c:func:`fork` call should only be made from the :ref:`\"main\" thread " +"` (of the :ref:`\"main\" interpreter `). The same is true for ``PyOS_BeforeFork()``." +msgstr "" + +#: c-api/sys.rst:47 +msgid "" +"Function to update some internal state after a process fork. This should be " +"called from the parent process after calling :c:func:`fork` or any similar " +"function that clones the current process, regardless of whether process " +"cloning was successful. Only available on systems where :c:func:`fork` is " +"defined." +msgstr "" + +#: c-api/sys.rst:54 +msgid "" +"The C :c:func:`fork` call should only be made from the :ref:`\"main\" thread " +"` (of the :ref:`\"main\" interpreter `). The same is true for ``PyOS_AfterFork_Parent()``." +msgstr "" + +#: c-api/sys.rst:64 +msgid "" +"Function to update internal interpreter state after a process fork. This " +"must be called from the child process after calling :c:func:`fork`, or any " +"similar function that clones the current process, if there is any chance the " +"process will call back into the Python interpreter. Only available on " +"systems where :c:func:`fork` is defined." +msgstr "" + +#: c-api/sys.rst:71 +msgid "" +"The C :c:func:`fork` call should only be made from the :ref:`\"main\" thread " +"` (of the :ref:`\"main\" interpreter `). The same is true for ``PyOS_AfterFork_Child()``." +msgstr "" + +#: c-api/sys.rst:79 +msgid "" +":func:`os.register_at_fork` allows registering custom Python functions to be " +"called by :c:func:`PyOS_BeforeFork()`, :c:func:`PyOS_AfterFork_Parent` and :" +"c:func:`PyOS_AfterFork_Child`." +msgstr "" + +#: c-api/sys.rst:86 +msgid "" +"Function to update some internal state after a process fork; this should be " +"called in the new process if the Python interpreter will continue to be " +"used. If a new executable is loaded into the new process, this function does " +"not need to be called." +msgstr "" + +#: c-api/sys.rst:91 +msgid "This function is superseded by :c:func:`PyOS_AfterFork_Child()`." +msgstr "" + +#: c-api/sys.rst:97 +msgid "" +"Return true when the interpreter runs out of stack space. This is a " +"reliable check, but is only available when :const:`USE_STACKCHECK` is " +"defined (currently on Windows using the Microsoft Visual C++ compiler). :" +"const:`USE_STACKCHECK` will be defined automatically; you should never " +"change the definition in your own code." +msgstr "" + +#: c-api/sys.rst:106 +msgid "" +"Return the current signal handler for signal *i*. This is a thin wrapper " +"around either :c:func:`sigaction` or :c:func:`signal`. Do not call those " +"functions directly! :c:type:`PyOS_sighandler_t` is a typedef alias for :c:" +"expr:`void (\\*)(int)`." +msgstr "" + +#: c-api/sys.rst:114 +msgid "" +"Set the signal handler for signal *i* to be *h*; return the old signal " +"handler. This is a thin wrapper around either :c:func:`sigaction` or :c:func:" +"`signal`. Do not call those functions directly! :c:type:" +"`PyOS_sighandler_t` is a typedef alias for :c:expr:`void (\\*)(int)`." +msgstr "" + +#: c-api/sys.rst:122 +msgid "" +"This function should not be called directly: use the :c:type:`PyConfig` API " +"with the :c:func:`PyConfig_SetBytesString` function which ensures that :ref:" +"`Python is preinitialized `." +msgstr "" + +#: c-api/sys.rst:193 +msgid "" +"This function must not be called before :ref:`Python is preinitialized ` and so that the LC_CTYPE locale is properly configured: see the :c:" +"func:`Py_PreInitialize` function." +msgstr "" + +#: c-api/sys.rst:130 +msgid "" +"Decode a byte string from the :term:`filesystem encoding and error handler`. " +"If the error handler is :ref:`surrogateescape error handler " +"`, undecodable bytes are decoded as characters in range " +"U+DC80..U+DCFF; and if a byte sequence can be decoded as a surrogate " +"character, the bytes are escaped using the surrogateescape error handler " +"instead of decoding them." +msgstr "" + +#: c-api/sys.rst:137 +msgid "" +"Return a pointer to a newly allocated wide character string, use :c:func:" +"`PyMem_RawFree` to free the memory. If size is not ``NULL``, write the " +"number of wide characters excluding the null character into ``*size``" +msgstr "" + +#: c-api/sys.rst:141 +msgid "" +"Return ``NULL`` on decoding error or memory allocation error. If *size* is " +"not ``NULL``, ``*size`` is set to ``(size_t)-1`` on memory error or set to " +"``(size_t)-2`` on decoding error." +msgstr "" + +#: c-api/sys.rst:185 +msgid "" +"The :term:`filesystem encoding and error handler` are selected by :c:func:" +"`PyConfig_Read`: see :c:member:`~PyConfig.filesystem_encoding` and :c:member:" +"`~PyConfig.filesystem_errors` members of :c:type:`PyConfig`." +msgstr "" + +#: c-api/sys.rst:149 +msgid "" +"Decoding errors should never happen, unless there is a bug in the C library." +msgstr "" + +#: c-api/sys.rst:152 +msgid "" +"Use the :c:func:`Py_EncodeLocale` function to encode the character string " +"back to a byte string." +msgstr "" + +#: c-api/sys.rst:157 +msgid "" +"The :c:func:`PyUnicode_DecodeFSDefaultAndSize` and :c:func:" +"`PyUnicode_DecodeLocaleAndSize` functions." +msgstr "" + +#: c-api/sys.rst:204 +msgid "" +"The function now uses the UTF-8 encoding in the :ref:`Python UTF-8 Mode " +"`." +msgstr "" + +#: c-api/sys.rst:166 +msgid "" +"The function now uses the UTF-8 encoding on Windows if :c:data:" +"`Py_LegacyWindowsFSEncodingFlag` is zero;" +msgstr "" + +#: c-api/sys.rst:173 +msgid "" +"Encode a wide character string to the :term:`filesystem encoding and error " +"handler`. If the error handler is :ref:`surrogateescape error handler " +"`, surrogate characters in the range U+DC80..U+DCFF are " +"converted to bytes 0x80..0xFF." +msgstr "" + +#: c-api/sys.rst:178 +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." +msgstr "" + +#: c-api/sys.rst:182 +msgid "" +"If error_pos is not ``NULL``, ``*error_pos`` is set to ``(size_t)-1`` on " +"success, or set to the index of the invalid character on encoding error." +msgstr "" + +#: c-api/sys.rst:189 +msgid "" +"Use the :c:func:`Py_DecodeLocale` function to decode the bytes string back " +"to a wide character string." +msgstr "" + +#: c-api/sys.rst:199 +msgid "" +"The :c:func:`PyUnicode_EncodeFSDefault` and :c:func:`PyUnicode_EncodeLocale` " +"functions." +msgstr "" + +#: c-api/sys.rst:208 +msgid "" +"The function now uses the UTF-8 encoding on Windows if :c:data:" +"`Py_LegacyWindowsFSEncodingFlag` is zero." +msgstr "" + +#: c-api/sys.rst:216 +msgid "System Functions" +msgstr "" + +#: c-api/sys.rst:218 +msgid "" +"These are utility functions that make functionality from the :mod:`sys` " +"module accessible to C code. They all work with the current interpreter " +"thread's :mod:`sys` module's dict, which is contained in the internal thread " +"state structure." +msgstr "" + +#: c-api/sys.rst:224 +msgid "" +"Return the object *name* from the :mod:`sys` module or ``NULL`` if it does " +"not exist, without setting an exception." +msgstr "" + +#: c-api/sys.rst:229 +msgid "" +"Set *name* in the :mod:`sys` module to *v* unless *v* is ``NULL``, in which " +"case *name* is deleted from the sys module. Returns ``0`` on success, ``-1`` " +"on error." +msgstr "" + +#: c-api/sys.rst:235 +msgid "" +"Reset :data:`sys.warnoptions` to an empty list. This function may be called " +"prior to :c:func:`Py_Initialize`." +msgstr "" + +#: c-api/sys.rst:240 +msgid "" +"Append *s* to :data:`sys.warnoptions`. This function must be called prior " +"to :c:func:`Py_Initialize` in order to affect the warnings filter list." +msgstr "" + +#: c-api/sys.rst:245 +msgid "Append *unicode* to :data:`sys.warnoptions`." +msgstr "" + +#: c-api/sys.rst:247 +msgid "" +"Note: this function is not currently usable from outside the CPython " +"implementation, as it must be called prior to the implicit import of :mod:" +"`warnings` in :c:func:`Py_Initialize` to be effective, but can't be called " +"until enough of the runtime has been initialized to permit the creation of " +"Unicode objects." +msgstr "" + +#: c-api/sys.rst:255 +msgid "" +"Set :data:`sys.path` to a list object of paths found in *path* which should " +"be a list of paths separated with the platform's search path delimiter (``:" +"`` on Unix, ``;`` on Windows)." +msgstr "" + +#: c-api/sys.rst:261 +msgid "" +"Write the output string described by *format* to :data:`sys.stdout`. No " +"exceptions are raised, even if truncation occurs (see below)." +msgstr "" + +#: c-api/sys.rst:264 +msgid "" +"*format* should limit the total size of the formatted output string to 1000 " +"bytes or less -- after 1000 bytes, the output string is truncated. In " +"particular, this means that no unrestricted \"%s\" formats should occur; " +"these should be limited using \"%.s\" where is a decimal number " +"calculated so that plus the maximum size of other formatted text does " +"not exceed 1000 bytes. Also watch out for \"%f\", which can print hundreds " +"of digits for very large numbers." +msgstr "" + +#: c-api/sys.rst:272 +msgid "" +"If a problem occurs, or :data:`sys.stdout` is unset, the formatted message " +"is written to the real (C level) *stdout*." +msgstr "" + +#: c-api/sys.rst:277 +msgid "" +"As :c:func:`PySys_WriteStdout`, but write to :data:`sys.stderr` or *stderr* " +"instead." +msgstr "" + +#: c-api/sys.rst:282 +msgid "" +"Function similar to PySys_WriteStdout() but format the message using :c:func:" +"`PyUnicode_FromFormatV` and don't truncate the message to an arbitrary " +"length." +msgstr "" + +#: c-api/sys.rst:290 +msgid "" +"As :c:func:`PySys_FormatStdout`, but write to :data:`sys.stderr` or *stderr* " +"instead." +msgstr "" + +#: c-api/sys.rst:297 +msgid "" +"Parse *s* as a set of :option:`-X` options and add them to the current " +"options mapping as returned by :c:func:`PySys_GetXOptions`. This function " +"may be called prior to :c:func:`Py_Initialize`." +msgstr "" + +#: c-api/sys.rst:305 +msgid "" +"Return the current dictionary of :option:`-X` options, similarly to :data:" +"`sys._xoptions`. On error, ``NULL`` is returned and an exception is set." +msgstr "" + +#: c-api/sys.rst:314 +msgid "" +"Raise an auditing event with any active hooks. Return zero for success and " +"non-zero with an exception set on failure." +msgstr "" + +#: c-api/sys.rst:317 +msgid "" +"If any hooks have been added, *format* and other arguments will be used to " +"construct a tuple to pass. Apart from ``N``, the same format characters as " +"used in :c:func:`Py_BuildValue` are available. If the built value is not a " +"tuple, it will be added into a single-element tuple. (The ``N`` format " +"option consumes a reference, but since there is no way to know whether " +"arguments to this function will be consumed, using it may cause reference " +"leaks.)" +msgstr "" + +#: c-api/sys.rst:325 +msgid "" +"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:328 +msgid ":func:`sys.audit` performs the same function from Python code." +msgstr "" + +#: c-api/sys.rst:334 +msgid "" +"Require :c:type:`Py_ssize_t` for ``#`` format characters. Previously, an " +"unavoidable deprecation warning was raised." +msgstr "" + +#: c-api/sys.rst:340 +msgid "" +"Append the callable *hook* to the list of active auditing hooks. Return zero " +"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 "" + +#: c-api/sys.rst:346 +msgid "" +"The *userData* pointer is passed into the hook function. Since hook " +"functions may be called from different runtimes, this pointer should not " +"refer directly to Python state." +msgstr "" + +#: c-api/sys.rst:350 +msgid "" +"This function is safe to call before :c:func:`Py_Initialize`. When called " +"after runtime initialization, existing audit hooks are notified and may " +"silently abort the operation by raising an error subclassed from :class:" +"`Exception` (other errors will not be silenced)." +msgstr "" + +#: c-api/sys.rst:355 +msgid "" +"The hook function is of type :c:expr:`int (*)(const char *event, PyObject " +"*args, void *userData)`, where *args* is guaranteed to be a :c:type:" +"`PyTupleObject`. The hook function is always called with the GIL held by the " +"Python interpreter that raised the event." +msgstr "" + +#: c-api/sys.rst:360 +msgid "" +"See :pep:`578` for a detailed description of auditing. Functions in the " +"runtime and standard library that raise events are listed in the :ref:`audit " +"events table `. Details are in each function's documentation." +msgstr "" + +#: c-api/sys.rst:365 +msgid "" +"Raises an :ref:`auditing event ` ``sys.addaudithook`` with no " +"arguments." +msgstr "" +"Déclenche un :ref:`événement d'audit ` ``sys.addaudithook`` sans " +"arguments." + +#: c-api/sys.rst:367 +msgid "" +"If the interpreter is initialized, this function raises a auditing event " +"``sys.addaudithook`` with no arguments. If any existing hooks raise an " +"exception derived from :class:`Exception`, the new hook will not be added " +"and the exception is cleared. As a result, callers cannot assume that their " +"hook has been added unless they control all existing hooks." +msgstr "" + +#: c-api/sys.rst:379 +msgid "Process Control" +msgstr "" + +#: c-api/sys.rst:386 +msgid "" +"Print a fatal error message and kill the process. No cleanup is performed. " +"This function should only be invoked when a condition is detected that would " +"make it dangerous to continue using the Python interpreter; e.g., when the " +"object administration appears to be corrupted. On Unix, the standard C " +"library function :c:func:`abort` is called which will attempt to produce a :" +"file:`core` file." +msgstr "" + +#: c-api/sys.rst:393 +msgid "" +"The ``Py_FatalError()`` function is replaced with a macro which logs " +"automatically the name of the current function, unless the " +"``Py_LIMITED_API`` macro is defined." +msgstr "" + +#: c-api/sys.rst:397 +msgid "Log the function name automatically." +msgstr "" + +#: c-api/sys.rst:407 +msgid "" +"Exit the current process. This calls :c:func:`Py_FinalizeEx` and then calls " +"the standard C library function ``exit(status)``. If :c:func:" +"`Py_FinalizeEx` indicates an error, the exit status is set to 120." +msgstr "" + +#: c-api/sys.rst:411 +msgid "Errors from finalization no longer ignored." +msgstr "" + +#: c-api/sys.rst:421 +msgid "" +"Register a cleanup function to be called by :c:func:`Py_FinalizeEx`. The " +"cleanup function will be called with no arguments and should return no " +"value. At most 32 cleanup functions can be registered. When the " +"registration is successful, :c:func:`Py_AtExit` returns ``0``; on failure, " +"it returns ``-1``. The cleanup function registered last is called first. " +"Each cleanup function will be called at most once. Since Python's internal " +"finalization will have completed before the cleanup function, no Python APIs " +"should be called by *func*." +msgstr "" diff --git a/c-api/tuple.po b/c-api/tuple.po new file mode 100644 index 0000000000..3be93d4b2c --- /dev/null +++ b/c-api/tuple.po @@ -0,0 +1,273 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-18 15:46+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \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" + +#: c-api/tuple.rst:6 +msgid "Tuple Objects" +msgstr "" + +#: c-api/tuple.rst:13 +#, fuzzy +msgid "This subtype of :c:type:`PyObject` represents a Python tuple object." +msgstr "" +"Ce sous-type de :c:type:`PyObject` représente un objet ``bytearray`` Python." + +#: c-api/tuple.rst:18 +#, fuzzy +msgid "" +"This instance of :c:type:`PyTypeObject` represents the Python tuple type; it " +"is the same object as :class:`tuple` in the Python layer." +msgstr "" +"Cette instance de :c:type:`PyTypeObject` représente le type Python " +"*bytearray*, c'est le même que :class:`bytearray` côté Python." + +#: c-api/tuple.rst:24 +msgid "" +"Return true if *p* is a tuple object or an instance of a subtype of the " +"tuple type. This function always succeeds." +msgstr "" + +#: c-api/tuple.rst:30 +msgid "" +"Return true if *p* is a tuple object, but not an instance of a subtype of " +"the tuple type. This function always succeeds." +msgstr "" + +#: c-api/tuple.rst:36 +msgid "Return a new tuple object of size *len*, or ``NULL`` on failure." +msgstr "" + +#: c-api/tuple.rst:41 +msgid "" +"Return a new tuple object of size *n*, or ``NULL`` on failure. The tuple " +"values are initialized to the subsequent *n* C arguments pointing to Python " +"objects. ``PyTuple_Pack(2, a, b)`` is equivalent to " +"``Py_BuildValue(\"(OO)\", a, b)``." +msgstr "" + +#: c-api/tuple.rst:48 +msgid "Take a pointer to a tuple object, and return the size of that tuple." +msgstr "" + +#: c-api/tuple.rst:53 +msgid "" +"Return the size of the tuple *p*, which must be non-``NULL`` and point to a " +"tuple; no error checking is performed." +msgstr "" + +#: c-api/tuple.rst:59 +msgid "" +"Return the object at position *pos* in the tuple pointed to by *p*. If " +"*pos* is negative or out of bounds, return ``NULL`` and set an :exc:" +"`IndexError` exception." +msgstr "" + +#: c-api/tuple.rst:65 +msgid "Like :c:func:`PyTuple_GetItem`, but does no checking of its arguments." +msgstr "" + +#: c-api/tuple.rst:70 +msgid "" +"Return the slice of the tuple pointed to by *p* between *low* and *high*, or " +"``NULL`` on failure. This is the equivalent of the Python expression " +"``p[low:high]``. Indexing from the end of the list is not supported." +msgstr "" + +#: c-api/tuple.rst:77 +msgid "" +"Insert a reference to object *o* at position *pos* of the tuple pointed to " +"by *p*. Return ``0`` on success. If *pos* is out of bounds, return ``-1`` " +"and set an :exc:`IndexError` exception." +msgstr "" + +#: c-api/tuple.rst:83 +msgid "" +"This function \"steals\" a reference to *o* and discards a reference to an " +"item already in the tuple at the affected position." +msgstr "" + +#: c-api/tuple.rst:89 +msgid "" +"Like :c:func:`PyTuple_SetItem`, but does no error checking, and should " +"*only* be used to fill in brand new tuples." +msgstr "" + +#: c-api/tuple.rst:94 +msgid "" +"This macro \"steals\" a reference to *o*, and, unlike :c:func:" +"`PyTuple_SetItem`, does *not* discard a reference to any item that is being " +"replaced; any reference in the tuple at position *pos* will be leaked." +msgstr "" + +#: c-api/tuple.rst:102 +msgid "" +"Can be used to resize a tuple. *newsize* will be the new length of the " +"tuple. Because tuples are *supposed* to be immutable, this should only be " +"used if there is only one reference to the object. Do *not* use this if the " +"tuple may already be known to some other part of the code. The tuple will " +"always grow or shrink at the end. Think of this as destroying the old tuple " +"and creating a new one, only more efficiently. Returns ``0`` on success. " +"Client code should never assume that the resulting value of ``*p`` will be " +"the same as before calling this function. If the object referenced by ``*p`` " +"is replaced, the original ``*p`` is destroyed. On failure, returns ``-1`` " +"and sets ``*p`` to ``NULL``, and raises :exc:`MemoryError` or :exc:" +"`SystemError`." +msgstr "" + +#: c-api/tuple.rst:115 +msgid "Struct Sequence Objects" +msgstr "" + +#: c-api/tuple.rst:117 +msgid "" +"Struct sequence objects are the C equivalent of :func:`~collections." +"namedtuple` objects, i.e. a sequence whose items can also be accessed " +"through attributes. To create a struct sequence, you first have to create a " +"specific struct sequence type." +msgstr "" + +#: c-api/tuple.rst:124 +msgid "" +"Create a new struct sequence type from the data in *desc*, described below. " +"Instances of the resulting type can be created with :c:func:" +"`PyStructSequence_New`." +msgstr "" + +#: c-api/tuple.rst:130 +msgid "Initializes a struct sequence type *type* from *desc* in place." +msgstr "" + +#: c-api/tuple.rst:135 +msgid "" +"The same as ``PyStructSequence_InitType``, but returns ``0`` on success and " +"``-1`` on failure." +msgstr "" + +#: c-api/tuple.rst:143 +msgid "Contains the meta information of a struct sequence type to create." +msgstr "" + +#: c-api/tuple.rst:169 +msgid "Field" +msgstr "Champ" + +#: c-api/tuple.rst:169 +msgid "C Type" +msgstr "Type C" + +#: c-api/tuple.rst:169 +msgid "Meaning" +msgstr "Signification" + +#: c-api/tuple.rst:171 +msgid "``name``" +msgstr "``name``" + +#: c-api/tuple.rst:150 c-api/tuple.rst:176 +msgid "``const char *``" +msgstr "" + +#: c-api/tuple.rst:148 +msgid "name of the struct sequence type" +msgstr "" + +#: c-api/tuple.rst:176 +msgid "``doc``" +msgstr "" + +#: c-api/tuple.rst:150 +msgid "pointer to docstring for the type or ``NULL`` to omit" +msgstr "" + +#: c-api/tuple.rst:153 +msgid "``fields``" +msgstr "" + +#: c-api/tuple.rst:153 +msgid "``PyStructSequence_Field *``" +msgstr "``PyStructSequence_Field *``" + +#: c-api/tuple.rst:153 +msgid "pointer to ``NULL``-terminated array with field names of the new type" +msgstr "" + +#: c-api/tuple.rst:156 +msgid "``n_in_sequence``" +msgstr "``n_in_sequence``" + +#: c-api/tuple.rst:156 +msgid "``int``" +msgstr "``int``" + +#: c-api/tuple.rst:156 +msgid "number of fields visible to the Python side (if used as tuple)" +msgstr "" + +#: c-api/tuple.rst:163 +msgid "" +"Describes a field of a struct sequence. As a struct sequence is modeled as a " +"tuple, all fields are typed as :c:expr:`PyObject*`. The index in the :attr:" +"`fields` array of the :c:type:`PyStructSequence_Desc` determines which field " +"of the struct sequence is described." +msgstr "" + +#: c-api/tuple.rst:171 +msgid "" +"name for the field or ``NULL`` to end the list of named fields, set to :c:" +"data:`PyStructSequence_UnnamedField` to leave unnamed" +msgstr "" + +#: c-api/tuple.rst:176 +msgid "field docstring or ``NULL`` to omit" +msgstr "" + +#: c-api/tuple.rst:182 +msgid "Special value for a field name to leave it unnamed." +msgstr "" + +#: c-api/tuple.rst:184 +msgid "The type was changed from ``char *``." +msgstr "" + +#: c-api/tuple.rst:190 +msgid "" +"Creates an instance of *type*, which must have been created with :c:func:" +"`PyStructSequence_NewType`." +msgstr "" + +#: c-api/tuple.rst:196 +msgid "" +"Return the object at position *pos* in the struct sequence pointed to by " +"*p*. No bounds checking is performed." +msgstr "" + +#: c-api/tuple.rst:202 +msgid "Macro equivalent of :c:func:`PyStructSequence_GetItem`." +msgstr "" + +#: c-api/tuple.rst:207 +msgid "" +"Sets the field at index *pos* of the struct sequence *p* to value *o*. " +"Like :c:func:`PyTuple_SET_ITEM`, this should only be used to fill in brand " +"new instances." +msgstr "" + +#: c-api/tuple.rst:222 +msgid "This function \"steals\" a reference to *o*." +msgstr "" + +#: c-api/tuple.rst:218 +msgid "Macro equivalent of :c:func:`PyStructSequence_SetItem`." +msgstr "" diff --git a/c-api/type.po b/c-api/type.po new file mode 100644 index 0000000000..d741ef3dc0 --- /dev/null +++ b/c-api/type.po @@ -0,0 +1,370 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-18 15:46+0200\n" +"PO-Revision-Date: 2018-02-15 00:33+0100\n" +"Last-Translator: FULL NAME \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" + +#: c-api/type.rst:6 +msgid "Type Objects" +msgstr "Objets type" + +#: c-api/type.rst:13 +msgid "The C structure of the objects used to describe built-in types." +msgstr "" + +#: c-api/type.rst:18 +msgid "" +"This is the type object for type objects; it is the same object as :class:" +"`type` in the Python layer." +msgstr "" + +#: c-api/type.rst:24 +msgid "" +"Return non-zero if the object *o* is a type object, including instances of " +"types derived from the standard type object. Return 0 in all other cases. " +"This function always succeeds." +msgstr "" + +#: c-api/type.rst:31 +msgid "" +"Return non-zero if the object *o* is a type object, but not a subtype of the " +"standard type object. Return 0 in all other cases. This function always " +"succeeds." +msgstr "" + +#: c-api/type.rst:38 +msgid "Clear the internal lookup cache. Return the current version tag." +msgstr "" + +#: c-api/type.rst:42 +msgid "" +"Return the :c:member:`~PyTypeObject.tp_flags` member of *type*. This " +"function is primarily meant for use with ``Py_LIMITED_API``; the individual " +"flag bits are guaranteed to be stable across Python releases, but access to :" +"c:member:`~PyTypeObject.tp_flags` itself is not part of the limited API." +msgstr "" + +#: c-api/type.rst:49 +msgid "The return type is now ``unsigned long`` rather than ``long``." +msgstr "" + +#: c-api/type.rst:55 +msgid "" +"Invalidate the internal lookup cache for the type and all of its subtypes. " +"This function must be called after any manual modification of the attributes " +"or base classes of the type." +msgstr "" + +#: c-api/type.rst:62 +msgid "" +"Return non-zero if the type object *o* sets the feature *feature*. Type " +"features are denoted by single bit flags." +msgstr "" + +#: c-api/type.rst:68 +msgid "" +"Return true if the type object includes support for the cycle detector; this " +"tests the type flag :const:`Py_TPFLAGS_HAVE_GC`." +msgstr "" + +#: c-api/type.rst:74 +msgid "Return true if *a* is a subtype of *b*." +msgstr "" + +#: c-api/type.rst:76 +msgid "" +"This function only checks for actual subtypes, which means that :meth:" +"`~class.__subclasscheck__` is not called on *b*. Call :c:func:" +"`PyObject_IsSubclass` to do the same check that :func:`issubclass` would do." +msgstr "" + +#: c-api/type.rst:84 +msgid "" +"Generic handler for the :c:member:`~PyTypeObject.tp_alloc` slot of a type " +"object. Use Python's default memory allocation mechanism to allocate a new " +"instance and initialize all its contents to ``NULL``." +msgstr "" + +#: c-api/type.rst:90 +msgid "" +"Generic handler for the :c:member:`~PyTypeObject.tp_new` slot of a type " +"object. Create a new instance using the type's :c:member:`~PyTypeObject." +"tp_alloc` slot." +msgstr "" + +#: c-api/type.rst:95 +msgid "" +"Finalize a type object. This should be called on all type objects to finish " +"their initialization. This function is responsible for adding inherited " +"slots from a type's base class. Return ``0`` on success, or return ``-1`` " +"and sets an exception on error." +msgstr "" + +#: 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 " +"function was called with invalid parameters. Callers will typically cast the " +"result pointer into the appropriate function type." +msgstr "" + +#: c-api/type.rst:117 +msgid "" +"See :c:member:`PyType_Slot.slot` for possible values of the *slot* argument." +msgstr "" + +#: c-api/type.rst:121 +msgid "" +":c:func:`PyType_GetSlot` can now accept all types. Previously, it was " +"limited to :ref:`heap types `." +msgstr "" + +#: c-api/type.rst:127 +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:148 +msgid "" +"If no module is associated with the given type, sets :py:class:`TypeError` " +"and returns ``NULL``." +msgstr "" + +#: c-api/type.rst:133 +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 " +"not return the intended result. ``Py_TYPE(self)`` may be a *subclass* of the " +"intended class, and subclasses are not necessarily defined in the same " +"module as their superclass. See :c:type:`PyCMethod` to get the class that " +"defines the method." +msgstr "" + +#: c-api/type.rst:144 +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:151 +msgid "" +"If the *type* has an associated module but its state is ``NULL``, returns " +"``NULL`` without setting an exception." +msgstr "" + +#: c-api/type.rst:158 +msgid "Creating Heap-Allocated Types" +msgstr "" + +#: c-api/type.rst:160 +msgid "" +"The following functions and structs are used to create :ref:`heap types " +"`." +msgstr "" + +#: c-api/type.rst:165 +msgid "" +"Creates and returns a :ref:`heap type ` from the *spec* (:const:" +"`Py_TPFLAGS_HEAPTYPE`)." +msgstr "" + +#: c-api/type.rst:168 +msgid "" +"The *bases* argument can be used to specify base classes; it can either be " +"only one class or a tuple of classes. 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:174 +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 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:181 +msgid "This function calls :c:func:`PyType_Ready` on the new type." +msgstr "" + +#: c-api/type.rst:187 +msgid "" +"The function now accepts a single class as the *bases* argument and ``NULL`` " +"as the ``tp_doc`` slot." +msgstr "" + +#: c-api/type.rst:192 +msgid "Equivalent to ``PyType_FromModuleAndSpec(NULL, spec, bases)``." +msgstr "" + +#: c-api/type.rst:198 +msgid "Equivalent to ``PyType_FromSpecWithBases(spec, NULL)``." +msgstr "" + +#: c-api/type.rst:202 +msgid "Structure defining a type's behavior." +msgstr "" + +#: c-api/type.rst:206 +msgid "Name of the type, used to set :c:member:`PyTypeObject.tp_name`." +msgstr "" + +#: c-api/type.rst:211 +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:217 +msgid "Type flags, used to set :c:member:`PyTypeObject.tp_flags`." +msgstr "" + +#: c-api/type.rst:219 +msgid "" +"If the ``Py_TPFLAGS_HEAPTYPE`` flag is not set, :c:func:" +"`PyType_FromSpecWithBases` sets it automatically." +msgstr "" + +#: c-api/type.rst:224 +msgid "" +"Array of :c:type:`PyType_Slot` structures. Terminated by the special slot " +"value ``{0, NULL}``." +msgstr "" + +#: c-api/type.rst:229 +msgid "" +"Structure defining optional functionality of a type, containing a slot ID " +"and a value pointer." +msgstr "" + +#: c-api/type.rst:234 +msgid "A slot ID." +msgstr "" + +#: c-api/type.rst:236 +msgid "" +"Slot IDs are named like the field names of the structures :c:type:" +"`PyTypeObject`, :c:type:`PyNumberMethods`, :c:type:`PySequenceMethods`, :c:" +"type:`PyMappingMethods` and :c:type:`PyAsyncMethods` with an added ``Py_`` " +"prefix. For example, use:" +msgstr "" + +#: c-api/type.rst:242 +msgid "``Py_tp_dealloc`` to set :c:member:`PyTypeObject.tp_dealloc`" +msgstr "" + +#: c-api/type.rst:243 +msgid "``Py_nb_add`` to set :c:member:`PyNumberMethods.nb_add`" +msgstr "" + +#: c-api/type.rst:244 +msgid "``Py_sq_length`` to set :c:member:`PySequenceMethods.sq_length`" +msgstr "" + +#: c-api/type.rst:246 +msgid "" +"The following fields cannot be set at all using :c:type:`PyType_Spec` and :c:" +"type:`PyType_Slot`:" +msgstr "" + +#: c-api/type.rst:249 +msgid ":c:member:`~PyTypeObject.tp_dict`" +msgstr "" + +#: c-api/type.rst:250 +msgid ":c:member:`~PyTypeObject.tp_mro`" +msgstr "" + +#: c-api/type.rst:251 +msgid ":c:member:`~PyTypeObject.tp_cache`" +msgstr "" + +#: c-api/type.rst:252 +msgid ":c:member:`~PyTypeObject.tp_subclasses`" +msgstr "" + +#: c-api/type.rst:253 +msgid ":c:member:`~PyTypeObject.tp_weaklist`" +msgstr "" + +#: c-api/type.rst:254 +msgid ":c:member:`~PyTypeObject.tp_vectorcall`" +msgstr "" + +#: c-api/type.rst:255 +msgid "" +":c:member:`~PyTypeObject.tp_weaklistoffset` (see :ref:`PyMemberDef " +"`)" +msgstr "" + +#: c-api/type.rst:257 +msgid "" +":c:member:`~PyTypeObject.tp_dictoffset` (see :ref:`PyMemberDef `)" +msgstr "" + +#: c-api/type.rst:259 +msgid "" +":c:member:`~PyTypeObject.tp_vectorcall_offset` (see :ref:`PyMemberDef " +"`)" +msgstr "" + +#: c-api/type.rst:262 +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:265 +msgid ":c:member:`~PyBufferProcs.bf_getbuffer`" +msgstr "" + +#: c-api/type.rst:266 +msgid ":c:member:`~PyBufferProcs.bf_releasebuffer`" +msgstr "" + +#: c-api/type.rst:268 +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:275 +msgid "Slots in :c:type:`PyBufferProcs` may be set in the unlimited API." +msgstr "" + +#: c-api/type.rst:279 +msgid "" +"The desired value of the slot. In most cases, this is a pointer to a " +"function." +msgstr "" + +#: c-api/type.rst:282 +msgid "Slots other than ``Py_tp_doc`` may not be ``NULL``." +msgstr "" diff --git a/c-api/typehints.po b/c-api/typehints.po new file mode 100644 index 0000000000..5ba8daa27b --- /dev/null +++ b/c-api/typehints.po @@ -0,0 +1,55 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-18 15:46+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \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" + +#: c-api/typehints.rst:6 +msgid "Objects for Type Hinting" +msgstr "" + +#: c-api/typehints.rst:8 +msgid "" +"Various built-in types for type hinting are provided. Currently, two types " +"exist -- :ref:`GenericAlias ` and :ref:`Union `. Only ``GenericAlias`` is exposed to C." +msgstr "" + +#: c-api/typehints.rst:14 +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:expr:" +"`PyTypeObject*`, and *args* can be a :c:expr:`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 "" + +#: c-api/typehints.rst:28 +msgid "Here's an example of how to make an extension type generic::" +msgstr "" + +#: c-api/typehints.rst:38 +msgid "The data model method :meth:`__class_getitem__`." +msgstr "" + +#: c-api/typehints.rst:44 +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 new file mode 100644 index 0000000000..2f7311a9d3 --- /dev/null +++ b/c-api/typeobj.po @@ -0,0 +1,3371 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-22 22:57+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \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" + +#: c-api/typeobj.rst:6 +msgid "Type Objects" +msgstr "Objets type" + +#: c-api/typeobj.rst:8 +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 ``PyObject_*`` or " +"``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 +msgid "" +"Type objects are fairly large compared to most of the standard types. The " +"reason for the size is that each type object stores a large number of " +"values, mostly C function pointers, each of which implements a small part of " +"the type's functionality. The fields of the type object are examined in " +"detail in this section. The fields will be described in the order in which " +"they occur in the structure." +msgstr "" + +#: c-api/typeobj.rst:23 +msgid "" +"In addition to the following quick reference, the :ref:`typedef-examples` " +"section provides at-a-glance insight into the meaning and use of :c:type:" +"`PyTypeObject`." +msgstr "" + +#: c-api/typeobj.rst:29 +msgid "Quick Reference" +msgstr "" + +#: c-api/typeobj.rst:34 +msgid "\"tp slots\"" +msgstr "" + +#: c-api/typeobj.rst:40 +msgid "PyTypeObject Slot [#slots]_" +msgstr "" + +#: c-api/typeobj.rst:199 +msgid ":ref:`Type `" +msgstr "" + +#: c-api/typeobj.rst:40 +msgid "special methods/attrs" +msgstr "" + +#: c-api/typeobj.rst:40 +msgid "Info [#cols]_" +msgstr "" + +#: c-api/typeobj.rst:42 +msgid "O" +msgstr "O" + +#: c-api/typeobj.rst:42 +msgid "T" +msgstr "T" + +#: c-api/typeobj.rst:42 +msgid "D" +msgstr "D" + +#: c-api/typeobj.rst:42 +msgid "I" +msgstr "" + +#: c-api/typeobj.rst:44 +msgid " :c:member:`~PyTypeObject.tp_name`" +msgstr "" + +#: c-api/typeobj.rst:86 c-api/typeobj.rst:0 +msgid "const char *" +msgstr "" + +#: c-api/typeobj.rst:44 +msgid "__name__" +msgstr "__name__" + +#: c-api/typeobj.rst:46 c-api/typeobj.rst:50 c-api/typeobj.rst:62 +#: c-api/typeobj.rst:72 c-api/typeobj.rst:76 c-api/typeobj.rst:84 +#: c-api/typeobj.rst:88 c-api/typeobj.rst:92 c-api/typeobj.rst:101 +#: c-api/typeobj.rst:105 c-api/typeobj.rst:109 c-api/typeobj.rst:115 +#: c-api/typeobj.rst:120 c-api/typeobj.rst:124 c-api/typeobj.rst:128 +#: c-api/typeobj.rst:146 +msgid "X" +msgstr "" + +#: c-api/typeobj.rst:46 +msgid ":c:member:`~PyTypeObject.tp_basicsize`" +msgstr "" + +#: c-api/typeobj.rst:48 c-api/typeobj.rst:99 c-api/typeobj.rst:0 +#: c-api/typeobj.rst:414 +msgid ":c:type:`Py_ssize_t`" +msgstr "" + +#: c-api/typeobj.rst:48 +msgid ":c:member:`~PyTypeObject.tp_itemsize`" +msgstr "" + +#: c-api/typeobj.rst:50 +msgid ":c:member:`~PyTypeObject.tp_dealloc`" +msgstr "" + +#: c-api/typeobj.rst:142 c-api/typeobj.rst:344 +msgid ":c:type:`destructor`" +msgstr "" + +#: c-api/typeobj.rst:52 +msgid ":c:member:`~PyTypeObject.tp_vectorcall_offset`" +msgstr "" + +#: c-api/typeobj.rst:54 +msgid "(:c:member:`~PyTypeObject.tp_getattr`)" +msgstr "" + +#: c-api/typeobj.rst:368 +msgid ":c:type:`getattrfunc`" +msgstr "" + +#: c-api/typeobj.rst:76 +msgid "__getattribute__, __getattr__" +msgstr "" + +#: c-api/typeobj.rst:57 c-api/typeobj.rst:76 c-api/typeobj.rst:88 +#: c-api/typeobj.rst:92 +msgid "G" +msgstr "" + +#: c-api/typeobj.rst:57 +msgid "(:c:member:`~PyTypeObject.tp_setattr`)" +msgstr "" + +#: c-api/typeobj.rst:373 +msgid ":c:type:`setattrfunc`" +msgstr "" + +#: c-api/typeobj.rst:79 +msgid "__setattr__, __delattr__" +msgstr "" + +#: c-api/typeobj.rst:60 +msgid ":c:member:`~PyTypeObject.tp_as_async`" +msgstr "" + +#: c-api/typeobj.rst:60 +msgid ":c:type:`PyAsyncMethods` *" +msgstr "" + +#: c-api/typeobj.rst:64 c-api/typeobj.rst:68 +msgid ":ref:`sub-slots`" +msgstr ":ref:`sub-slots`" + +#: c-api/typeobj.rst:64 c-api/typeobj.rst:68 c-api/typeobj.rst:82 +msgid "%" +msgstr "%" + +#: c-api/typeobj.rst:62 +msgid ":c:member:`~PyTypeObject.tp_repr`" +msgstr "" + +#: c-api/typeobj.rst:74 c-api/typeobj.rst:366 +msgid ":c:type:`reprfunc`" +msgstr "" + +#: c-api/typeobj.rst:62 +msgid "__repr__" +msgstr "" + +#: c-api/typeobj.rst:64 +msgid ":c:member:`~PyTypeObject.tp_as_number`" +msgstr "" + +#: c-api/typeobj.rst:64 +msgid ":c:type:`PyNumberMethods` *" +msgstr "" + +#: c-api/typeobj.rst:66 +msgid ":c:member:`~PyTypeObject.tp_as_sequence`" +msgstr "" + +#: c-api/typeobj.rst:66 +msgid ":c:type:`PySequenceMethods` *" +msgstr "" + +#: c-api/typeobj.rst:68 +msgid ":c:member:`~PyTypeObject.tp_as_mapping`" +msgstr "" + +#: c-api/typeobj.rst:68 +msgid ":c:type:`PyMappingMethods` *" +msgstr "" + +#: c-api/typeobj.rst:70 +msgid ":c:member:`~PyTypeObject.tp_hash`" +msgstr "" + +#: c-api/typeobj.rst:402 +msgid ":c:type:`hashfunc`" +msgstr "" + +#: c-api/typeobj.rst:70 +msgid "__hash__" +msgstr "" + +#: c-api/typeobj.rst:72 +msgid ":c:member:`~PyTypeObject.tp_call`" +msgstr "" + +#: c-api/typeobj.rst:235 c-api/typeobj.rst:438 +msgid ":c:type:`ternaryfunc`" +msgstr "" + +#: c-api/typeobj.rst:72 +msgid "__call__" +msgstr "" + +#: c-api/typeobj.rst:74 +msgid ":c:member:`~PyTypeObject.tp_str`" +msgstr "" + +#: c-api/typeobj.rst:74 +msgid "__str__" +msgstr "" + +#: c-api/typeobj.rst:76 +msgid ":c:member:`~PyTypeObject.tp_getattro`" +msgstr "" + +#: c-api/typeobj.rst:379 +msgid ":c:type:`getattrofunc`" +msgstr "" + +#: c-api/typeobj.rst:79 +msgid ":c:member:`~PyTypeObject.tp_setattro`" +msgstr "" + +#: c-api/typeobj.rst:384 +msgid ":c:type:`setattrofunc`" +msgstr "" + +#: c-api/typeobj.rst:82 +msgid ":c:member:`~PyTypeObject.tp_as_buffer`" +msgstr "" + +#: c-api/typeobj.rst:82 +msgid ":c:type:`PyBufferProcs` *" +msgstr "" + +#: c-api/typeobj.rst:84 +msgid ":c:member:`~PyTypeObject.tp_flags`" +msgstr "" + +#: c-api/typeobj.rst:84 +msgid "unsigned long" +msgstr "``unsigned long``" + +#: c-api/typeobj.rst:99 c-api/typeobj.rst:120 c-api/typeobj.rst:126 +#: c-api/typeobj.rst:128 +msgid "?" +msgstr "" + +#: c-api/typeobj.rst:86 +msgid ":c:member:`~PyTypeObject.tp_doc`" +msgstr "" + +#: c-api/typeobj.rst:86 +msgid "__doc__" +msgstr "__doc__" + +#: c-api/typeobj.rst:88 +msgid ":c:member:`~PyTypeObject.tp_traverse`" +msgstr "" + +#: c-api/typeobj.rst:348 +msgid ":c:type:`traverseproc`" +msgstr "" + +#: c-api/typeobj.rst:90 +msgid ":c:member:`~PyTypeObject.tp_clear`" +msgstr "" + +#: c-api/typeobj.rst:130 c-api/typeobj.rst:427 +msgid ":c:type:`inquiry`" +msgstr "" + +#: c-api/typeobj.rst:92 +msgid ":c:member:`~PyTypeObject.tp_richcompare`" +msgstr "" + +#: c-api/typeobj.rst:404 +msgid ":c:type:`richcmpfunc`" +msgstr "" + +#: c-api/typeobj.rst:92 +msgid "__lt__, __le__, __eq__, __ne__, __gt__, __ge__" +msgstr "" + +#: c-api/typeobj.rst:99 +msgid ":c:member:`~PyTypeObject.tp_weaklistoffset`" +msgstr "" + +#: c-api/typeobj.rst:101 +msgid ":c:member:`~PyTypeObject.tp_iter`" +msgstr "" + +#: c-api/typeobj.rst:410 +msgid ":c:type:`getiterfunc`" +msgstr "" + +#: c-api/typeobj.rst:101 +msgid "__iter__" +msgstr "" + +#: c-api/typeobj.rst:103 +msgid ":c:member:`~PyTypeObject.tp_iternext`" +msgstr "" + +#: c-api/typeobj.rst:412 +msgid ":c:type:`iternextfunc`" +msgstr "" + +#: c-api/typeobj.rst:103 +msgid "__next__" +msgstr "" + +#: c-api/typeobj.rst:105 +msgid ":c:member:`~PyTypeObject.tp_methods`" +msgstr "" + +#: c-api/typeobj.rst:105 +msgid ":c:type:`PyMethodDef` []" +msgstr "" + +#: c-api/typeobj.rst:107 +msgid ":c:member:`~PyTypeObject.tp_members`" +msgstr "" + +#: c-api/typeobj.rst:107 +msgid ":c:type:`PyMemberDef` []" +msgstr "" + +#: c-api/typeobj.rst:109 +msgid ":c:member:`~PyTypeObject.tp_getset`" +msgstr "" + +#: c-api/typeobj.rst:109 +msgid ":c:type:`PyGetSetDef` []" +msgstr "" + +#: c-api/typeobj.rst:111 +msgid ":c:member:`~PyTypeObject.tp_base`" +msgstr "" + +#: c-api/typeobj.rst:0 +msgid ":c:type:`PyTypeObject` *" +msgstr "" + +#: c-api/typeobj.rst:111 +msgid "__base__" +msgstr "" + +#: c-api/typeobj.rst:113 +msgid ":c:member:`~PyTypeObject.tp_dict`" +msgstr "" + +#: c-api/typeobj.rst:132 c-api/typeobj.rst:136 c-api/typeobj.rst:140 +#: c-api/typeobj.rst:0 c-api/typeobj.rst:366 c-api/typeobj.rst:379 +#: c-api/typeobj.rst:402 c-api/typeobj.rst:410 c-api/typeobj.rst:414 +#: c-api/typeobj.rst:433 c-api/typeobj.rst:444 +msgid ":c:type:`PyObject` *" +msgstr "" + +#: c-api/typeobj.rst:113 +msgid "__dict__" +msgstr "" + +#: c-api/typeobj.rst:115 +msgid ":c:member:`~PyTypeObject.tp_descr_get`" +msgstr "" + +#: c-api/typeobj.rst:390 +msgid ":c:type:`descrgetfunc`" +msgstr "" + +#: c-api/typeobj.rst:115 +msgid "__get__" +msgstr "" + +#: c-api/typeobj.rst:117 +msgid ":c:member:`~PyTypeObject.tp_descr_set`" +msgstr "" + +#: c-api/typeobj.rst:396 +msgid ":c:type:`descrsetfunc`" +msgstr "" + +#: c-api/typeobj.rst:117 +msgid "__set__, __delete__" +msgstr "" + +#: c-api/typeobj.rst:120 +msgid ":c:member:`~PyTypeObject.tp_dictoffset`" +msgstr "" + +#: c-api/typeobj.rst:122 +msgid ":c:member:`~PyTypeObject.tp_init`" +msgstr "" + +#: c-api/typeobj.rst:360 +msgid ":c:type:`initproc`" +msgstr "" + +#: c-api/typeobj.rst:122 +msgid "__init__" +msgstr "" + +#: c-api/typeobj.rst:124 +msgid ":c:member:`~PyTypeObject.tp_alloc`" +msgstr "" + +#: c-api/typeobj.rst:339 +msgid ":c:type:`allocfunc`" +msgstr "" + +#: c-api/typeobj.rst:126 +msgid ":c:member:`~PyTypeObject.tp_new`" +msgstr "" + +#: c-api/typeobj.rst:354 +msgid ":c:type:`newfunc`" +msgstr "" + +#: c-api/typeobj.rst:126 +msgid "__new__" +msgstr "" + +#: c-api/typeobj.rst:128 +msgid ":c:member:`~PyTypeObject.tp_free`" +msgstr "" + +#: c-api/typeobj.rst:346 +msgid ":c:type:`freefunc`" +msgstr "" + +#: c-api/typeobj.rst:130 +msgid ":c:member:`~PyTypeObject.tp_is_gc`" +msgstr "" + +#: c-api/typeobj.rst:132 +msgid "<:c:member:`~PyTypeObject.tp_bases`>" +msgstr "" + +#: c-api/typeobj.rst:132 +msgid "__bases__" +msgstr "" + +#: c-api/typeobj.rst:134 +msgid "~" +msgstr "" + +#: c-api/typeobj.rst:134 +msgid "<:c:member:`~PyTypeObject.tp_mro`>" +msgstr "" + +#: c-api/typeobj.rst:134 +msgid "__mro__" +msgstr "" + +#: c-api/typeobj.rst:136 +msgid "[:c:member:`~PyTypeObject.tp_cache`]" +msgstr "" + +#: c-api/typeobj.rst:138 +msgid "[:c:member:`~PyTypeObject.tp_subclasses`]" +msgstr "" + +#: c-api/typeobj.rst:138 +msgid "__subclasses__" +msgstr "" + +#: c-api/typeobj.rst:140 +msgid "[:c:member:`~PyTypeObject.tp_weaklist`]" +msgstr "" + +#: c-api/typeobj.rst:142 +msgid "(:c:member:`~PyTypeObject.tp_del`)" +msgstr "" + +#: c-api/typeobj.rst:144 +msgid "[:c:member:`~PyTypeObject.tp_version_tag`]" +msgstr "" + +#: c-api/typeobj.rst:144 +msgid "unsigned int" +msgstr "``unsigned int``" + +#: c-api/typeobj.rst:146 +msgid ":c:member:`~PyTypeObject.tp_finalize`" +msgstr "" + +#: c-api/typeobj.rst:146 +msgid "__del__" +msgstr "" + +#: c-api/typeobj.rst:148 +msgid ":c:member:`~PyTypeObject.tp_vectorcall`" +msgstr "" + +#: c-api/typeobj.rst:148 +msgid ":c:type:`vectorcallfunc`" +msgstr "" + +#: c-api/typeobj.rst:153 +msgid "" +"**()**: A slot name in parentheses indicates it is (effectively) deprecated." +msgstr "" + +#: c-api/typeobj.rst:155 +msgid "" +"**<>**: Names in angle brackets should be initially set to ``NULL`` and " +"treated as read-only." +msgstr "" + +#: c-api/typeobj.rst:158 +msgid "**[]**: Names in square brackets are for internal use only." +msgstr "" + +#: c-api/typeobj.rst:160 +msgid "" +"**** (as a prefix) means the field is required (must be non-``NULL``)." +msgstr "" + +#: c-api/typeobj.rst:162 +msgid "Columns:" +msgstr "" + +#: c-api/typeobj.rst:164 +msgid "**\"O\"**: set on :c:type:`PyBaseObject_Type`" +msgstr "" + +#: c-api/typeobj.rst:166 +msgid "**\"T\"**: set on :c:type:`PyType_Type`" +msgstr "" + +#: c-api/typeobj.rst:168 +msgid "**\"D\"**: default (if slot is set to ``NULL``)" +msgstr "" + +#: c-api/typeobj.rst:178 +msgid "**\"I\"**: inheritance" +msgstr "" + +#: c-api/typeobj.rst:187 +msgid "" +"Note that some slots are effectively inherited through the normal attribute " +"lookup chain." +msgstr "" + +#: c-api/typeobj.rst:193 +msgid "sub-slots" +msgstr "" + +#: c-api/typeobj.rst:199 +msgid "Slot" +msgstr "" + +#: c-api/typeobj.rst:199 +#, fuzzy +msgid "special methods" +msgstr "méthode spéciale" + +#: c-api/typeobj.rst:202 +msgid ":c:member:`~PyAsyncMethods.am_await`" +msgstr "" + +#: c-api/typeobj.rst:204 c-api/typeobj.rst:240 c-api/typeobj.rst:244 +#: c-api/typeobj.rst:275 c-api/typeobj.rst:289 c-api/typeobj.rst:429 +msgid ":c:type:`unaryfunc`" +msgstr "" + +#: c-api/typeobj.rst:202 +msgid "__await__" +msgstr "" + +#: c-api/typeobj.rst:204 +msgid ":c:member:`~PyAsyncMethods.am_aiter`" +msgstr "" + +#: c-api/typeobj.rst:204 +msgid "__aiter__" +msgstr "" + +#: c-api/typeobj.rst:206 +msgid ":c:member:`~PyAsyncMethods.am_anext`" +msgstr "" + +#: c-api/typeobj.rst:206 +msgid "__anext__" +msgstr "" + +#: c-api/typeobj.rst:208 +msgid ":c:member:`~PyAsyncMethods.am_send`" +msgstr "" + +#: c-api/typeobj.rst:208 +msgid ":c:type:`sendfunc`" +msgstr "" + +#: c-api/typeobj.rst:212 +msgid ":c:member:`~PyNumberMethods.nb_add`" +msgstr "" + +#: c-api/typeobj.rst:215 c-api/typeobj.rst:220 c-api/typeobj.rst:225 +#: c-api/typeobj.rst:230 c-api/typeobj.rst:250 c-api/typeobj.rst:255 +#: c-api/typeobj.rst:260 c-api/typeobj.rst:265 c-api/typeobj.rst:270 +#: c-api/typeobj.rst:281 c-api/typeobj.rst:285 c-api/typeobj.rst:291 +#: c-api/typeobj.rst:300 c-api/typeobj.rst:320 c-api/typeobj.rst:433 +msgid ":c:type:`binaryfunc`" +msgstr "" + +#: c-api/typeobj.rst:212 +msgid "__add__ __radd__" +msgstr "" + +#: c-api/typeobj.rst:215 +msgid ":c:member:`~PyNumberMethods.nb_inplace_add`" +msgstr "" + +#: c-api/typeobj.rst:320 +msgid "__iadd__" +msgstr "" + +#: c-api/typeobj.rst:217 +msgid ":c:member:`~PyNumberMethods.nb_subtract`" +msgstr "" + +#: c-api/typeobj.rst:217 +msgid "__sub__ __rsub__" +msgstr "" + +#: c-api/typeobj.rst:220 +msgid ":c:member:`~PyNumberMethods.nb_inplace_subtract`" +msgstr "" + +#: c-api/typeobj.rst:220 +msgid "__isub__" +msgstr "" + +#: c-api/typeobj.rst:222 +msgid ":c:member:`~PyNumberMethods.nb_multiply`" +msgstr "" + +#: c-api/typeobj.rst:222 +msgid "__mul__ __rmul__" +msgstr "" + +#: c-api/typeobj.rst:225 +msgid ":c:member:`~PyNumberMethods.nb_inplace_multiply`" +msgstr "" + +#: c-api/typeobj.rst:322 +msgid "__imul__" +msgstr "" + +#: c-api/typeobj.rst:227 +msgid ":c:member:`~PyNumberMethods.nb_remainder`" +msgstr "" + +#: c-api/typeobj.rst:227 +msgid "__mod__ __rmod__" +msgstr "" + +#: c-api/typeobj.rst:230 +msgid ":c:member:`~PyNumberMethods.nb_inplace_remainder`" +msgstr "" + +#: c-api/typeobj.rst:230 +msgid "__imod__" +msgstr "" + +#: c-api/typeobj.rst:232 +msgid ":c:member:`~PyNumberMethods.nb_divmod`" +msgstr "" + +#: c-api/typeobj.rst:232 +msgid "__divmod__ __rdivmod__" +msgstr "" + +#: c-api/typeobj.rst:235 +msgid ":c:member:`~PyNumberMethods.nb_power`" +msgstr "" + +#: c-api/typeobj.rst:235 +msgid "__pow__ __rpow__" +msgstr "" + +#: c-api/typeobj.rst:238 +msgid ":c:member:`~PyNumberMethods.nb_inplace_power`" +msgstr "" + +#: c-api/typeobj.rst:238 +msgid "__ipow__" +msgstr "" + +#: c-api/typeobj.rst:240 +msgid ":c:member:`~PyNumberMethods.nb_negative`" +msgstr "" + +#: c-api/typeobj.rst:240 +msgid "__neg__" +msgstr "" + +#: c-api/typeobj.rst:242 +msgid ":c:member:`~PyNumberMethods.nb_positive`" +msgstr "" + +#: c-api/typeobj.rst:242 +msgid "__pos__" +msgstr "" + +#: c-api/typeobj.rst:244 +msgid ":c:member:`~PyNumberMethods.nb_absolute`" +msgstr "" + +#: c-api/typeobj.rst:244 +msgid "__abs__" +msgstr "" + +#: c-api/typeobj.rst:246 +msgid ":c:member:`~PyNumberMethods.nb_bool`" +msgstr "" + +#: c-api/typeobj.rst:246 +msgid "__bool__" +msgstr "" + +#: c-api/typeobj.rst:248 +msgid ":c:member:`~PyNumberMethods.nb_invert`" +msgstr "" + +#: c-api/typeobj.rst:248 +msgid "__invert__" +msgstr "" + +#: c-api/typeobj.rst:250 +msgid ":c:member:`~PyNumberMethods.nb_lshift`" +msgstr "" + +#: c-api/typeobj.rst:250 +msgid "__lshift__ __rlshift__" +msgstr "" + +#: c-api/typeobj.rst:253 +msgid ":c:member:`~PyNumberMethods.nb_inplace_lshift`" +msgstr "" + +#: c-api/typeobj.rst:253 +msgid "__ilshift__" +msgstr "" + +#: c-api/typeobj.rst:255 +msgid ":c:member:`~PyNumberMethods.nb_rshift`" +msgstr "" + +#: c-api/typeobj.rst:255 +msgid "__rshift__ __rrshift__" +msgstr "" + +#: c-api/typeobj.rst:258 +msgid ":c:member:`~PyNumberMethods.nb_inplace_rshift`" +msgstr "" + +#: c-api/typeobj.rst:258 +msgid "__irshift__" +msgstr "" + +#: c-api/typeobj.rst:260 +msgid ":c:member:`~PyNumberMethods.nb_and`" +msgstr "" + +#: c-api/typeobj.rst:260 +msgid "__and__ __rand__" +msgstr "" + +#: c-api/typeobj.rst:263 +msgid ":c:member:`~PyNumberMethods.nb_inplace_and`" +msgstr "" + +#: c-api/typeobj.rst:263 +msgid "__iand__" +msgstr "" + +#: c-api/typeobj.rst:265 +msgid ":c:member:`~PyNumberMethods.nb_xor`" +msgstr "" + +#: c-api/typeobj.rst:265 +msgid "__xor__ __rxor__" +msgstr "" + +#: c-api/typeobj.rst:268 +msgid ":c:member:`~PyNumberMethods.nb_inplace_xor`" +msgstr "" + +#: c-api/typeobj.rst:268 +msgid "__ixor__" +msgstr "" + +#: c-api/typeobj.rst:270 +msgid ":c:member:`~PyNumberMethods.nb_or`" +msgstr "" + +#: c-api/typeobj.rst:270 +msgid "__or__ __ror__" +msgstr "" + +#: c-api/typeobj.rst:273 +msgid ":c:member:`~PyNumberMethods.nb_inplace_or`" +msgstr "" + +#: c-api/typeobj.rst:273 +msgid "__ior__" +msgstr "" + +#: c-api/typeobj.rst:275 +msgid ":c:member:`~PyNumberMethods.nb_int`" +msgstr "" + +#: c-api/typeobj.rst:275 +msgid "__int__" +msgstr "" + +#: c-api/typeobj.rst:277 +msgid ":c:member:`~PyNumberMethods.nb_reserved`" +msgstr "" + +#: c-api/typeobj.rst:344 c-api/typeobj.rst:0 c-api/typeobj.rst:427 +msgid "void *" +msgstr "" + +#: c-api/typeobj.rst:279 +msgid ":c:member:`~PyNumberMethods.nb_float`" +msgstr "" + +#: c-api/typeobj.rst:279 +msgid "__float__" +msgstr "" + +#: c-api/typeobj.rst:281 +msgid ":c:member:`~PyNumberMethods.nb_floor_divide`" +msgstr "" + +#: c-api/typeobj.rst:281 +msgid "__floordiv__" +msgstr "" + +#: c-api/typeobj.rst:283 +msgid ":c:member:`~PyNumberMethods.nb_inplace_floor_divide`" +msgstr "" + +#: c-api/typeobj.rst:283 +msgid "__ifloordiv__" +msgstr "" + +#: c-api/typeobj.rst:285 +msgid ":c:member:`~PyNumberMethods.nb_true_divide`" +msgstr "" + +#: c-api/typeobj.rst:285 +msgid "__truediv__" +msgstr "" + +#: c-api/typeobj.rst:287 +msgid ":c:member:`~PyNumberMethods.nb_inplace_true_divide`" +msgstr "" + +#: c-api/typeobj.rst:287 +msgid "__itruediv__" +msgstr "" + +#: c-api/typeobj.rst:289 +msgid ":c:member:`~PyNumberMethods.nb_index`" +msgstr "" + +#: c-api/typeobj.rst:289 +msgid "__index__" +msgstr "" + +#: c-api/typeobj.rst:291 +msgid ":c:member:`~PyNumberMethods.nb_matrix_multiply`" +msgstr "" + +#: c-api/typeobj.rst:291 +msgid "__matmul__ __rmatmul__" +msgstr "" + +#: c-api/typeobj.rst:294 +msgid ":c:member:`~PyNumberMethods.nb_inplace_matrix_multiply`" +msgstr "" + +#: c-api/typeobj.rst:294 +msgid "__imatmul__" +msgstr "" + +#: c-api/typeobj.rst:298 +msgid ":c:member:`~PyMappingMethods.mp_length`" +msgstr "" + +#: c-api/typeobj.rst:307 c-api/typeobj.rst:414 +msgid ":c:type:`lenfunc`" +msgstr "" + +#: c-api/typeobj.rst:307 +msgid "__len__" +msgstr "" + +#: c-api/typeobj.rst:300 +msgid ":c:member:`~PyMappingMethods.mp_subscript`" +msgstr "" + +#: c-api/typeobj.rst:313 +msgid "__getitem__" +msgstr "" + +#: c-api/typeobj.rst:302 +msgid ":c:member:`~PyMappingMethods.mp_ass_subscript`" +msgstr "" + +#: c-api/typeobj.rst:460 +msgid ":c:type:`objobjargproc`" +msgstr "" + +#: c-api/typeobj.rst:302 +msgid "__setitem__, __delitem__" +msgstr "" + +#: c-api/typeobj.rst:307 +msgid ":c:member:`~PySequenceMethods.sq_length`" +msgstr "" + +#: c-api/typeobj.rst:309 +msgid ":c:member:`~PySequenceMethods.sq_concat`" +msgstr "" + +#: c-api/typeobj.rst:309 +msgid "__add__" +msgstr "" + +#: c-api/typeobj.rst:311 +msgid ":c:member:`~PySequenceMethods.sq_repeat`" +msgstr "" + +#: c-api/typeobj.rst:313 c-api/typeobj.rst:444 +msgid ":c:type:`ssizeargfunc`" +msgstr "" + +#: c-api/typeobj.rst:311 +msgid "__mul__" +msgstr "" + +#: c-api/typeobj.rst:313 +msgid ":c:member:`~PySequenceMethods.sq_item`" +msgstr "" + +#: c-api/typeobj.rst:315 +msgid ":c:member:`~PySequenceMethods.sq_ass_item`" +msgstr "" + +#: c-api/typeobj.rst:449 +msgid ":c:type:`ssizeobjargproc`" +msgstr "" + +#: c-api/typeobj.rst:315 +msgid "__setitem__ __delitem__" +msgstr "" + +#: c-api/typeobj.rst:318 +msgid ":c:member:`~PySequenceMethods.sq_contains`" +msgstr "" + +#: c-api/typeobj.rst:455 +msgid ":c:type:`objobjproc`" +msgstr "" + +#: c-api/typeobj.rst:318 +msgid "__contains__" +msgstr "" + +#: c-api/typeobj.rst:320 +msgid ":c:member:`~PySequenceMethods.sq_inplace_concat`" +msgstr "" + +#: c-api/typeobj.rst:322 +msgid ":c:member:`~PySequenceMethods.sq_inplace_repeat`" +msgstr "" + +#: c-api/typeobj.rst:326 +msgid ":c:member:`~PyBufferProcs.bf_getbuffer`" +msgstr "" + +#: c-api/typeobj.rst:326 +msgid ":c:func:`getbufferproc`" +msgstr "" + +#: c-api/typeobj.rst:328 +msgid ":c:member:`~PyBufferProcs.bf_releasebuffer`" +msgstr "" + +#: c-api/typeobj.rst:328 +msgid ":c:func:`releasebufferproc`" +msgstr "" + +#: c-api/typeobj.rst:334 +msgid "slot typedefs" +msgstr "" + +#: c-api/typeobj.rst:337 +msgid "typedef" +msgstr "" + +#: c-api/typeobj.rst:337 +msgid "Parameter Types" +msgstr "" + +#: c-api/typeobj.rst:337 +msgid "Return Type" +msgstr "" + +#: c-api/typeobj.rst:346 c-api/typeobj.rst:422 +msgid "void" +msgstr "" + +#: c-api/typeobj.rst:0 +msgid ":c:type:`visitproc`" +msgstr "" + +#: c-api/typeobj.rst:360 c-api/typeobj.rst:384 c-api/typeobj.rst:0 +#: c-api/typeobj.rst:427 c-api/typeobj.rst:455 c-api/typeobj.rst:460 +msgid "int" +msgstr "*int*" + +#: c-api/typeobj.rst:402 +msgid "Py_hash_t" +msgstr "" + +#: c-api/typeobj.rst:416 +msgid ":c:type:`getbufferproc`" +msgstr "" + +#: c-api/typeobj.rst:0 +msgid ":c:type:`Py_buffer` *" +msgstr "" + +#: c-api/typeobj.rst:422 +msgid ":c:type:`releasebufferproc`" +msgstr "" + +#: c-api/typeobj.rst:467 +msgid "See :ref:`slot-typedefs` below for more detail." +msgstr "" + +#: c-api/typeobj.rst:471 +msgid "PyTypeObject Definition" +msgstr "" + +#: c-api/typeobj.rst:473 +msgid "" +"The structure definition for :c:type:`PyTypeObject` can be found in :file:" +"`Include/object.h`. For convenience of reference, this repeats the " +"definition found there:" +msgstr "" + +#: c-api/typeobj.rst:483 +#, fuzzy +msgid "PyObject Slots" +msgstr "Objets type" + +#: c-api/typeobj.rst:485 +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." +msgstr "" + +#: c-api/typeobj.rst:494 +msgid "" +"This is the type object's reference count, initialized to ``1`` by the " +"``PyObject_HEAD_INIT`` macro. Note that for :ref:`statically allocated type " +"objects `, the type's instances (objects whose :attr:`ob_type` " +"points back to the type) do *not* count as references. But for :ref:" +"`dynamically allocated type objects `, the instances *do* count " +"as references." +msgstr "" + +#: c-api/typeobj.rst:524 c-api/typeobj.rst:560 c-api/typeobj.rst:647 +#: c-api/typeobj.rst:743 c-api/typeobj.rst:779 c-api/typeobj.rst:821 +#: c-api/typeobj.rst:850 c-api/typeobj.rst:895 c-api/typeobj.rst:933 +#: c-api/typeobj.rst:980 c-api/typeobj.rst:1015 c-api/typeobj.rst:1063 +#: c-api/typeobj.rst:1083 c-api/typeobj.rst:1115 c-api/typeobj.rst:1185 +#: c-api/typeobj.rst:1219 c-api/typeobj.rst:1271 c-api/typeobj.rst:1355 +#: c-api/typeobj.rst:1481 c-api/typeobj.rst:1543 c-api/typeobj.rst:1579 +#: c-api/typeobj.rst:1608 c-api/typeobj.rst:1658 c-api/typeobj.rst:1702 +#: c-api/typeobj.rst:1793 c-api/typeobj.rst:1851 c-api/typeobj.rst:1905 +#: c-api/typeobj.rst:1946 c-api/typeobj.rst:1965 c-api/typeobj.rst:1989 +#: c-api/typeobj.rst:2058 +msgid "**Inheritance:**" +msgstr "" + +#: c-api/typeobj.rst:562 c-api/typeobj.rst:606 +msgid "This field is not inherited by subtypes." +msgstr "" + +#: c-api/typeobj.rst:508 +msgid "" +"This is the type's type, in other words its metatype. It is initialized by " +"the argument to the ``PyObject_HEAD_INIT`` macro, and its value should " +"normally be ``&PyType_Type``. However, for dynamically loadable extension " +"modules that must be usable on Windows (at least), the compiler complains " +"that this is not a valid initializer. Therefore, the convention is to pass " +"``NULL`` to the ``PyObject_HEAD_INIT`` macro and to initialize this field " +"explicitly at the start of the module's initialization function, before " +"doing anything else. This is typically done like this::" +msgstr "" + +#: c-api/typeobj.rst:519 +msgid "" +"This should be done before any instances of the type are created. :c:func:" +"`PyType_Ready` checks if :attr:`ob_type` is ``NULL``, and if so, initializes " +"it to the :attr:`ob_type` field of the base class. :c:func:`PyType_Ready` " +"will not change this field if it is non-zero." +msgstr "" + +#: c-api/typeobj.rst:707 c-api/typeobj.rst:915 c-api/typeobj.rst:1545 +#: c-api/typeobj.rst:1686 c-api/typeobj.rst:1795 c-api/typeobj.rst:2037 +msgid "This field is inherited by subtypes." +msgstr "" + +#: c-api/typeobj.rst:532 +msgid "" +"These fields are only present when the macro ``Py_TRACE_REFS`` is defined " +"(see the :option:`configure --with-trace-refs option <--with-trace-refs>`)." +msgstr "" + +#: c-api/typeobj.rst:535 +msgid "" +"Their initialization to ``NULL`` is taken care of by the " +"``PyObject_HEAD_INIT`` macro. For :ref:`statically allocated objects " +"`, these fields always remain ``NULL``. For :ref:`dynamically " +"allocated objects `, these two fields are used to link the " +"object into a doubly linked list of *all* live objects on the heap." +msgstr "" + +#: c-api/typeobj.rst:541 +msgid "" +"This could be used for various debugging purposes; currently the only uses " +"are the :func:`sys.getobjects` function and to print the objects that are " +"still alive at the end of a run when the environment variable :envvar:" +"`PYTHONDUMPREFS` is set." +msgstr "" + +#: c-api/typeobj.rst:548 +msgid "These fields are not inherited by subtypes." +msgstr "" + +#: c-api/typeobj.rst:552 +msgid "PyVarObject Slots" +msgstr "" + +#: c-api/typeobj.rst:556 +msgid "" +"For :ref:`statically allocated type objects `, this should be " +"initialized to zero. For :ref:`dynamically allocated type objects `, this field has a special internal meaning." +msgstr "" + +#: c-api/typeobj.rst:566 +#, fuzzy +msgid "PyTypeObject Slots" +msgstr "Objets type" + +#: c-api/typeobj.rst:568 +msgid "" +"Each slot has a section describing inheritance. If :c:func:`PyType_Ready` " +"may set a value when the field is set to ``NULL`` then there will also be a " +"\"Default\" section. (Note that many fields set on :c:type:" +"`PyBaseObject_Type` and :c:type:`PyType_Type` effectively act as defaults.)" +msgstr "" + +#: c-api/typeobj.rst:575 +msgid "" +"Pointer to a NUL-terminated string containing the name of the type. For " +"types that are accessible as module globals, the string should be the full " +"module name, followed by a dot, followed by the type name; for built-in " +"types, it should be just the type name. If the module is a submodule of a " +"package, the full package name is part of the full module name. For " +"example, a type named :class:`T` defined in module :mod:`M` in subpackage :" +"mod:`Q` in package :mod:`P` should have the :c:member:`~PyTypeObject." +"tp_name` initializer ``\"P.Q.M.T\"``." +msgstr "" + +#: c-api/typeobj.rst:583 +msgid "" +"For :ref:`dynamically allocated type objects `, this should just " +"be the type name, and the module name explicitly stored in the type dict as " +"the value for key ``'__module__'``." +msgstr "" + +#: c-api/typeobj.rst:588 +msgid "" +"For :ref:`statically allocated type objects `, the *tp_name* " +"field should contain a dot. Everything before the last dot is made " +"accessible as the :attr:`__module__` attribute, and everything after the " +"last dot is made accessible as the :attr:`~definition.__name__` attribute." +msgstr "" + +#: c-api/typeobj.rst:594 +msgid "" +"If no dot is present, the entire :c:member:`~PyTypeObject.tp_name` field is " +"made accessible as the :attr:`~definition.__name__` attribute, and the :attr:" +"`__module__` attribute is undefined (unless explicitly set in the " +"dictionary, as explained above). This means your type will be impossible to " +"pickle. Additionally, it will not be listed in module documentations " +"created with pydoc." +msgstr "" + +#: c-api/typeobj.rst:600 +msgid "" +"This field must not be ``NULL``. It is the only required field in :c:func:" +"`PyTypeObject` (other than potentially :c:member:`~PyTypeObject." +"tp_itemsize`)." +msgstr "" + +#: c-api/typeobj.rst:612 +msgid "" +"These fields allow calculating the size in bytes of instances of the type." +msgstr "" + +#: c-api/typeobj.rst:614 +msgid "" +"There are two kinds of types: types with fixed-length instances have a zero :" +"c:member:`~PyTypeObject.tp_itemsize` field, types with variable-length " +"instances have a non-zero :c:member:`~PyTypeObject.tp_itemsize` field. For " +"a type with fixed-length instances, all instances have the same size, given " +"in :c:member:`~PyTypeObject.tp_basicsize`." +msgstr "" + +#: c-api/typeobj.rst:619 +msgid "" +"For a type with variable-length instances, the instances must have an :attr:" +"`ob_size` field, and the instance size is :c:member:`~PyTypeObject." +"tp_basicsize` plus N times :c:member:`~PyTypeObject.tp_itemsize`, where N is " +"the \"length\" of the object. The value of N is typically stored in the " +"instance's :attr:`ob_size` field. There are exceptions: for example, ints " +"use a negative :attr:`ob_size` to indicate a negative number, and N is " +"``abs(ob_size)`` there. Also, the presence of an :attr:`ob_size` field in " +"the instance layout doesn't mean that the instance structure is variable-" +"length (for example, the structure for the list type has fixed-length " +"instances, yet those instances have a meaningful :attr:`ob_size` field)." +msgstr "" + +#: c-api/typeobj.rst:630 +msgid "" +"The basic size includes the fields in the instance declared by the macro :c:" +"macro:`PyObject_HEAD` or :c:macro:`PyObject_VAR_HEAD` (whichever is used to " +"declare the instance struct) and this in turn includes the :attr:`_ob_prev` " +"and :attr:`_ob_next` fields if they are present. This means that the only " +"correct way to get an initializer for the :c:member:`~PyTypeObject." +"tp_basicsize` is to use the ``sizeof`` operator on the struct used to " +"declare the instance layout. The basic size does not include the GC header " +"size." +msgstr "" + +#: c-api/typeobj.rst:638 +msgid "" +"A note about alignment: if the variable items require a particular " +"alignment, this should be taken care of by the value of :c:member:" +"`~PyTypeObject.tp_basicsize`. Example: suppose a type implements an array " +"of ``double``. :c:member:`~PyTypeObject.tp_itemsize` is ``sizeof(double)``. " +"It is the programmer's responsibility that :c:member:`~PyTypeObject." +"tp_basicsize` is a multiple of ``sizeof(double)`` (assuming this is the " +"alignment requirement for ``double``)." +msgstr "" + +#: c-api/typeobj.rst:645 +msgid "" +"For any type with variable-length instances, this field must not be ``NULL``." +msgstr "" + +#: c-api/typeobj.rst:649 +msgid "" +"These fields are inherited separately by subtypes. If the base type has a " +"non-zero :c:member:`~PyTypeObject.tp_itemsize`, it is generally not safe to " +"set :c:member:`~PyTypeObject.tp_itemsize` to a different non-zero value in a " +"subtype (though this depends on the implementation of the base type)." +msgstr "" + +#: c-api/typeobj.rst:657 +msgid "" +"A pointer to the instance destructor function. This function must be " +"defined unless the type guarantees that its instances will never be " +"deallocated (as is the case for the singletons ``None`` and ``Ellipsis``). " +"The function signature is::" +msgstr "" + +#: c-api/typeobj.rst:663 +msgid "" +"The destructor function is called by the :c:func:`Py_DECREF` and :c:func:" +"`Py_XDECREF` macros when the new reference count is zero. At this point, " +"the instance is still in existence, but there are no references to it. The " +"destructor function should free all references which the instance owns, free " +"all memory buffers owned by the instance (using the freeing function " +"corresponding to the allocation function used to allocate the buffer), and " +"call the type's :c:member:`~PyTypeObject.tp_free` function. If the type is " +"not subtypable (doesn't have the :const:`Py_TPFLAGS_BASETYPE` flag bit set), " +"it is permissible to call the object deallocator directly instead of via :c:" +"member:`~PyTypeObject.tp_free`. The object deallocator should be the one " +"used to allocate the instance; this is normally :c:func:`PyObject_Del` if " +"the instance was allocated using :c:func:`PyObject_New` or :c:func:" +"`PyObject_VarNew`, or :c:func:`PyObject_GC_Del` if the instance was " +"allocated using :c:func:`PyObject_GC_New` or :c:func:`PyObject_GC_NewVar`." +msgstr "" + +#: c-api/typeobj.rst:678 +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:690 +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:712 +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:717 +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:721 +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:725 +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 " +"*vectorcallfunc* function. This can be done by setting *tp_call* to :c:func:" +"`PyVectorcall_Call`." +msgstr "" + +#: c-api/typeobj.rst:732 +msgid "" +"It is not recommended for :ref:`heap types ` to implement the " +"vectorcall protocol. When a user sets :attr:`__call__` in Python code, only " +"*tp_call* is updated, likely making it inconsistent with the vectorcall " +"function." +msgstr "" + +#: c-api/typeobj.rst:739 +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:745 +msgid "" +"This field is always inherited. However, the :const:" +"`Py_TPFLAGS_HAVE_VECTORCALL` flag is not always inherited. If it's not, then " +"the subclass won't use :ref:`vectorcall `, except when :c:func:" +"`PyVectorcall_Call` is explicitly called. This is in particular the case " +"for :ref:`heap types ` (including subclasses defined in Python)." +msgstr "" + +#: c-api/typeobj.rst:756 +msgid "An optional pointer to the get-attribute-string function." +msgstr "" + +#: c-api/typeobj.rst:758 +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, " +"but taking a C string instead of a Python string object to give the " +"attribute name." +msgstr "" + +#: c-api/typeobj.rst:956 +msgid "Group: :attr:`tp_getattr`, :attr:`tp_getattro`" +msgstr "" + +#: c-api/typeobj.rst:766 +msgid "" +"This field is inherited by subtypes together with :c:member:`~PyTypeObject." +"tp_getattro`: a subtype inherits both :c:member:`~PyTypeObject.tp_getattr` " +"and :c:member:`~PyTypeObject.tp_getattro` from its base type when the " +"subtype's :c:member:`~PyTypeObject.tp_getattr` and :c:member:`~PyTypeObject." +"tp_getattro` are both ``NULL``." +msgstr "" + +#: c-api/typeobj.rst:969 +msgid "" +"An optional pointer to the function for setting and deleting attributes." +msgstr "" + +#: c-api/typeobj.rst:775 +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, " +"but taking a C string instead of a Python string object to give the " +"attribute name." +msgstr "" + +#: c-api/typeobj.rst:982 +msgid "Group: :attr:`tp_setattr`, :attr:`tp_setattro`" +msgstr "" + +#: c-api/typeobj.rst:783 +msgid "" +"This field is inherited by subtypes together with :c:member:`~PyTypeObject." +"tp_setattro`: a subtype inherits both :c:member:`~PyTypeObject.tp_setattr` " +"and :c:member:`~PyTypeObject.tp_setattro` from its base type when the " +"subtype's :c:member:`~PyTypeObject.tp_setattr` and :c:member:`~PyTypeObject." +"tp_setattro` are both ``NULL``." +msgstr "" + +#: c-api/typeobj.rst:790 +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:794 +msgid "Formerly known as ``tp_compare`` and ``tp_reserved``." +msgstr "" + +#: c-api/typeobj.rst:799 +msgid "" +"The :c:member:`~PyTypeObject.tp_as_async` field is not inherited, but the " +"contained fields are inherited individually." +msgstr "" + +#: c-api/typeobj.rst:807 +msgid "" +"An optional pointer to a function that implements the built-in function :" +"func:`repr`." +msgstr "" + +#: c-api/typeobj.rst:810 +msgid "The signature is the same as for :c:func:`PyObject_Repr`::" +msgstr "" + +#: c-api/typeobj.rst:814 +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 " +"suitable environment, returns an object with the same value. If this is not " +"feasible, it should return a string starting with ``'<'`` and ending with " +"``'>'`` from which both the type and the value of the object can be deduced." +msgstr "" + +#: c-api/typeobj.rst:937 c-api/typeobj.rst:988 c-api/typeobj.rst:1490 +#: c-api/typeobj.rst:1663 c-api/typeobj.rst:1797 c-api/typeobj.rst:1857 +#: c-api/typeobj.rst:1909 +msgid "**Default:**" +msgstr "" + +#: c-api/typeobj.rst:827 +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:834 +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:840 +msgid "" +"The :c:member:`~PyTypeObject.tp_as_number` field is not inherited, but the " +"contained fields are inherited individually." +msgstr "" + +#: c-api/typeobj.rst:846 +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:852 +msgid "" +"The :c:member:`~PyTypeObject.tp_as_sequence` field is not inherited, but the " +"contained fields are inherited individually." +msgstr "" + +#: c-api/typeobj.rst:858 +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:864 +msgid "" +"The :c:member:`~PyTypeObject.tp_as_mapping` field is not inherited, but the " +"contained fields are inherited individually." +msgstr "" + +#: c-api/typeobj.rst:872 +msgid "" +"An optional pointer to a function that implements the built-in function :" +"func:`hash`." +msgstr "" + +#: c-api/typeobj.rst:875 +msgid "The signature is the same as for :c:func:`PyObject_Hash`::" +msgstr "" + +#: c-api/typeobj.rst:879 +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:883 +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:887 +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 " +"as the equivalent of ``__hash__ = None`` at the Python level, causing " +"``isinstance(o, collections.Hashable)`` to correctly return ``False``. Note " +"that the converse is also true - setting ``__hash__ = None`` on a class at " +"the Python level will result in the ``tp_hash`` slot being set to :c:func:" +"`PyObject_HashNotImplemented`." +msgstr "" + +#: c-api/typeobj.rst:1483 +msgid "Group: :attr:`tp_hash`, :attr:`tp_richcompare`" +msgstr "" + +#: c-api/typeobj.rst:899 +msgid "" +"This field is inherited by subtypes together with :c:member:`~PyTypeObject." +"tp_richcompare`: a subtype inherits both of :c:member:`~PyTypeObject." +"tp_richcompare` and :c:member:`~PyTypeObject.tp_hash`, when the subtype's :c:" +"member:`~PyTypeObject.tp_richcompare` and :c:member:`~PyTypeObject.tp_hash` " +"are both ``NULL``." +msgstr "" + +#: c-api/typeobj.rst:907 +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:920 +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 " +"the constructor for that type. This constructor calls :c:func:" +"`PyObject_Str` to do the actual work, and :c:func:`PyObject_Str` will call " +"this handler.)" +msgstr "" + +#: c-api/typeobj.rst:925 +msgid "The signature is the same as for :c:func:`PyObject_Str`::" +msgstr "" + +#: c-api/typeobj.rst:929 +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 " +"representation that will be used, among other things, by the :func:`print` " +"function." +msgstr "" + +#: c-api/typeobj.rst:939 +msgid "" +"When this field is not set, :c:func:`PyObject_Repr` is called to return a " +"string representation." +msgstr "" + +#: c-api/typeobj.rst:945 +msgid "An optional pointer to the get-attribute function." +msgstr "" + +#: c-api/typeobj.rst:947 +msgid "The signature is the same as for :c:func:`PyObject_GetAttr`::" +msgstr "" + +#: c-api/typeobj.rst:951 +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:958 +msgid "" +"This field is inherited by subtypes together with :c:member:`~PyTypeObject." +"tp_getattr`: a subtype inherits both :c:member:`~PyTypeObject.tp_getattr` " +"and :c:member:`~PyTypeObject.tp_getattro` from its base type when the " +"subtype's :c:member:`~PyTypeObject.tp_getattr` and :c:member:`~PyTypeObject." +"tp_getattro` are both ``NULL``." +msgstr "" + +#: c-api/typeobj.rst:964 +msgid ":c:type:`PyBaseObject_Type` uses :c:func:`PyObject_GenericGetAttr`." +msgstr "" + +#: c-api/typeobj.rst:971 +msgid "The signature is the same as for :c:func:`PyObject_SetAttr`::" +msgstr "" + +#: c-api/typeobj.rst:975 +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:" +"`PyObject_GenericSetAttr`, which implements the normal way of setting object " +"attributes." +msgstr "" + +#: c-api/typeobj.rst:984 +msgid "" +"This field is inherited by subtypes together with :c:member:`~PyTypeObject." +"tp_setattr`: a subtype inherits both :c:member:`~PyTypeObject.tp_setattr` " +"and :c:member:`~PyTypeObject.tp_setattro` from its base type when the " +"subtype's :c:member:`~PyTypeObject.tp_setattr` and :c:member:`~PyTypeObject." +"tp_setattro` are both ``NULL``." +msgstr "" + +#: c-api/typeobj.rst:990 +msgid ":c:type:`PyBaseObject_Type` uses :c:func:`PyObject_GenericSetAttr`." +msgstr "" + +#: c-api/typeobj.rst:995 +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:1001 +msgid "" +"The :c:member:`~PyTypeObject.tp_as_buffer` field is not inherited, but the " +"contained fields are inherited individually." +msgstr "" + +#: c-api/typeobj.rst:1007 +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 " +"fields in the type object (or in the extension structures referenced via :c:" +"member:`~PyTypeObject.tp_as_number`, :c:member:`~PyTypeObject." +"tp_as_sequence`, :c:member:`~PyTypeObject.tp_as_mapping`, and :c:member:" +"`~PyTypeObject.tp_as_buffer`) that were historically not always present are " +"valid; if such a flag bit is clear, the type fields it guards must not be " +"accessed and must be considered to have a zero or ``NULL`` value instead." +msgstr "" + +#: c-api/typeobj.rst:1017 +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 " +"this flag bit. The flag bits that pertain to extension structures are " +"strictly inherited if the extension structure is inherited, i.e. the base " +"type's value of the flag bit is copied into the subtype together with a " +"pointer to the extension structure. The :const:`Py_TPFLAGS_HAVE_GC` flag " +"bit is inherited together with the :c:member:`~PyTypeObject.tp_traverse` " +"and :c:member:`~PyTypeObject.tp_clear` fields, i.e. if the :const:" +"`Py_TPFLAGS_HAVE_GC` flag bit is clear in the subtype and the :c:member:" +"`~PyTypeObject.tp_traverse` and :c:member:`~PyTypeObject.tp_clear` fields in " +"the subtype exist and have ``NULL`` values." +msgstr "" + +#: c-api/typeobj.rst:1032 +msgid "" +":c:type:`PyBaseObject_Type` uses ``Py_TPFLAGS_DEFAULT | " +"Py_TPFLAGS_BASETYPE``." +msgstr "" + +#: c-api/typeobj.rst:1035 +msgid "**Bit Masks:**" +msgstr "" + +#: c-api/typeobj.rst:1037 +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." +"tp_flags` field. The macro :c:func:`PyType_HasFeature` takes a type and a " +"flags value, *tp* and *f*, and checks whether ``tp->tp_flags & f`` is non-" +"zero." +msgstr "" + +#: c-api/typeobj.rst:1044 +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 " +"case, the :attr:`ob_type` field of its instances is considered a reference " +"to the type, and the type object is INCREF'ed when a new instance is " +"created, and DECREF'ed when an instance is destroyed (this does not apply to " +"instances of subtypes; only the type referenced by the instance's ob_type " +"gets INCREF'ed or DECREF'ed)." +msgstr "" + +#: c-api/typeobj.rst:1065 c-api/typeobj.rst:1085 c-api/typeobj.rst:1117 +msgid "???" +msgstr "" + +#: c-api/typeobj.rst:1059 +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:1070 +msgid "" +"This bit is set when the type object has been fully initialized by :c:func:" +"`PyType_Ready`." +msgstr "" + +#: c-api/typeobj.rst:1080 +msgid "" +"This bit is set while :c:func:`PyType_Ready` is in the process of " +"initializing the type object." +msgstr "" + +#: c-api/typeobj.rst:1090 +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 " +"using :c:func:`PyObject_GC_Del`. More information in section :ref:" +"`supporting-cycle-detection`. This bit also implies that the GC-related " +"fields :c:member:`~PyTypeObject.tp_traverse` and :c:member:`~PyTypeObject." +"tp_clear` are present in the type object." +msgstr "" + +#: c-api/typeobj.rst:1357 c-api/typeobj.rst:1424 +msgid "" +"Group: :const:`Py_TPFLAGS_HAVE_GC`, :attr:`tp_traverse`, :attr:`tp_clear`" +msgstr "" + +#: c-api/typeobj.rst:1101 +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:" +"`Py_TPFLAGS_HAVE_GC` flag bit is clear in the subtype and the :attr:" +"`tp_traverse` and :attr:`tp_clear` fields in the subtype exist and have " +"``NULL`` values." +msgstr "" + +#: c-api/typeobj.rst:1111 +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 " +"includes the following bits: :const:`Py_TPFLAGS_HAVE_STACKLESS_EXTENSION`." +msgstr "" + +#: c-api/typeobj.rst:1122 +msgid "This bit indicates that objects behave like unbound methods." +msgstr "" + +#: c-api/typeobj.rst:1124 +msgid "If this flag is set for ``type(meth)``, then:" +msgstr "" + +#: c-api/typeobj.rst:1126 +msgid "" +"``meth.__get__(obj, cls)(*args, **kwds)`` (with ``obj`` not None) must be " +"equivalent to ``meth(obj, *args, **kwds)``." +msgstr "" + +#: c-api/typeobj.rst:1129 +msgid "" +"``meth.__get__(None, cls)(*args, **kwds)`` must be equivalent to " +"``meth(*args, **kwds)``." +msgstr "" + +#: c-api/typeobj.rst:1132 +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:1140 +msgid "" +"This flag is never inherited by :ref:`heap types `. For " +"extension types, it is inherited whenever :c:member:`~PyTypeObject." +"tp_descr_get` is inherited." +msgstr "" + +#: c-api/typeobj.rst:1157 +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 " +"are faster than a generic check, like :c:func:`PyObject_IsInstance`. Custom " +"types that inherit from built-ins should have their :c:member:`~PyTypeObject." +"tp_flags` set appropriately, or the code that interacts with such types will " +"behave differently depending on what kind of check is used." +msgstr "" + +#: c-api/typeobj.rst:1168 +msgid "" +"This bit is set when the :c:member:`~PyTypeObject.tp_finalize` slot is " +"present in the type structure." +msgstr "" + +#: c-api/typeobj.rst:1173 +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:1181 +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:1187 +msgid "" +"This bit is inherited for :ref:`static subtypes ` if :c:member:" +"`~PyTypeObject.tp_call` is also inherited. :ref:`Heap types ` do " +"not inherit ``Py_TPFLAGS_HAVE_VECTORCALL``." +msgstr "" + +#: c-api/typeobj.rst:1195 +msgid "" +"This bit is set for type objects that are immutable: type attributes cannot " +"be set nor deleted." +msgstr "" + +#: c-api/typeobj.rst:1197 +msgid "" +":c:func:`PyType_Ready` automatically applies this flag to :ref:`static types " +"`." +msgstr "" + +#: c-api/typeobj.rst:1202 +msgid "This flag is not inherited." +msgstr "" + +#: c-api/typeobj.rst:1208 +msgid "" +"Disallow creating instances of the type: set :c:member:`~PyTypeObject." +"tp_new` to NULL and don't create the ``__new__`` key in the type dictionary." +msgstr "" + +#: c-api/typeobj.rst:1212 +msgid "" +"The flag must be set before creating the type, not after. For example, it " +"must be set before :c:func:`PyType_Ready` is called on the type." +msgstr "" + +#: c-api/typeobj.rst:1215 +msgid "" +"The flag is set automatically on :ref:`static types ` if :c:" +"member:`~PyTypeObject.tp_base` is NULL or ``&PyBaseObject_Type`` and :c:" +"member:`~PyTypeObject.tp_new` is NULL." +msgstr "" + +#: c-api/typeobj.rst:1221 +msgid "" +"This flag is not inherited. However, subclasses will not be instantiable " +"unless they provide a non-NULL :c:member:`~PyTypeObject.tp_new` (which is " +"only possible via the C API)." +msgstr "" + +#: c-api/typeobj.rst:1228 +msgid "" +"To disallow instantiating a class directly but allow instantiating its " +"subclasses (e.g. for an :term:`abstract base class`), do not use this flag. " +"Instead, make :c:member:`~PyTypeObject.tp_new` only succeed for subclasses." +msgstr "" + +#: c-api/typeobj.rst:1239 +msgid "" +"This bit indicates that instances of the class may match mapping patterns " +"when used as the subject of a :keyword:`match` block. It is automatically " +"set when registering or subclassing :class:`collections.abc.Mapping`, and " +"unset when registering :class:`collections.abc.Sequence`." +msgstr "" + +#: c-api/typeobj.rst:1268 +msgid "" +":const:`Py_TPFLAGS_MAPPING` and :const:`Py_TPFLAGS_SEQUENCE` are mutually " +"exclusive; it is an error to enable both flags simultaneously." +msgstr "" + +#: c-api/typeobj.rst:1251 +msgid "" +"This flag is inherited by types that do not already set :const:" +"`Py_TPFLAGS_SEQUENCE`." +msgstr "" + +#: c-api/typeobj.rst:1276 +msgid ":pep:`634` -- Structural Pattern Matching: Specification" +msgstr ":pep:`634` — Spécifications pour le filtrage par motif" + +#: c-api/typeobj.rst:1261 +msgid "" +"This bit indicates that instances of the class may match sequence patterns " +"when used as the subject of a :keyword:`match` block. It is automatically " +"set when registering or subclassing :class:`collections.abc.Sequence`, and " +"unset when registering :class:`collections.abc.Mapping`." +msgstr "" + +#: c-api/typeobj.rst:1273 +msgid "" +"This flag is inherited by types that do not already set :const:" +"`Py_TPFLAGS_MAPPING`." +msgstr "" + +#: c-api/typeobj.rst:1283 +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:1289 +msgid "This field is *not* inherited by subtypes." +msgstr "" + +#: c-api/typeobj.rst:1294 +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:1419 +msgid "" +"More information about Python's garbage collection scheme can be found in " +"section :ref:`supporting-cycle-detection`." +msgstr "" + +#: c-api/typeobj.rst:1302 +msgid "" +"The :c:member:`~PyTypeObject.tp_traverse` pointer is used by the garbage " +"collector to detect reference cycles. A typical implementation of a :c:" +"member:`~PyTypeObject.tp_traverse` function simply calls :c:func:`Py_VISIT` " +"on each of the instance's members that are Python objects that the instance " +"owns. For example, this is function :c:func:`local_traverse` from the :mod:" +"`_thread` extension module::" +msgstr "" + +#: c-api/typeobj.rst:1317 +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`` " +"member, it can only be ``NULL`` or a Python string and therefore cannot be " +"part of a reference cycle." +msgstr "" + +#: c-api/typeobj.rst:1321 +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:1326 +msgid "" +"When implementing :c:member:`~PyTypeObject.tp_traverse`, only the members " +"that the instance *owns* (by having :term:`strong references ` to them) must be visited. For instance, if an object supports " +"weak references via the :c:member:`~PyTypeObject.tp_weaklist` slot, the " +"pointer supporting the linked list (what *tp_weaklist* points to) must " +"**not** be visited as the instance does not directly own the weak references " +"to itself (the weakreference list is there to support the weak reference " +"machinery, but the instance has no strong reference to the elements inside " +"it, as they are allowed to be removed even if the instance is still alive)." +msgstr "" + +#: c-api/typeobj.rst:1337 +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:1341 +msgid "" +"Instances of :ref:`heap-allocated types ` hold a reference to " +"their type. Their traversal function must therefore either visit :c:func:" +"`Py_TYPE(self) `, or delegate this responsibility by calling " +"``tp_traverse`` of another heap-allocated type (such as a heap-allocated " +"superclass). If they do not, the type object may not be garbage-collected." +msgstr "" + +#: c-api/typeobj.rst:1350 +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:1359 +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:" +"member:`~PyTypeObject.tp_traverse`, and :c:member:`~PyTypeObject.tp_clear` " +"are all inherited from the base type if they are all zero in the subtype." +msgstr "" + +#: c-api/typeobj.rst:1367 +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:1372 +msgid "" +"The :c:member:`~PyTypeObject.tp_clear` member function is used to break " +"reference cycles in cyclic garbage detected by the garbage collector. Taken " +"together, all :c:member:`~PyTypeObject.tp_clear` functions in the system " +"must combine to break all reference cycles. This is subtle, and if in any " +"doubt supply a :c:member:`~PyTypeObject.tp_clear` function. For example, " +"the tuple type does not implement a :c:member:`~PyTypeObject.tp_clear` " +"function, because it's possible to prove that no reference cycle can be " +"composed entirely of tuples. Therefore the :c:member:`~PyTypeObject." +"tp_clear` functions of other types must be sufficient to break any cycle " +"containing a tuple. This isn't immediately obvious, and there's rarely a " +"good reason to avoid implementing :c:member:`~PyTypeObject.tp_clear`." +msgstr "" + +#: c-api/typeobj.rst:1382 +msgid "" +"Implementations of :c:member:`~PyTypeObject.tp_clear` should drop the " +"instance's references to those of its members that may be Python objects, " +"and set its pointers to those members to ``NULL``, as in the following " +"example::" +msgstr "" + +#: c-api/typeobj.rst:1396 +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 " +"until after the pointer to the contained object is set to ``NULL``. This is " +"because decrementing the reference count may cause the contained object to " +"become trash, triggering a chain of reclamation activity that may include " +"invoking arbitrary Python code (due to finalizers, or weakref callbacks, " +"associated with the contained object). If it's possible for such code to " +"reference *self* again, it's important that the pointer to the contained " +"object be ``NULL`` at that time, so that *self* knows the contained object " +"can no longer be used. The :c:func:`Py_CLEAR` macro performs the operations " +"in a safe order." +msgstr "" + +#: c-api/typeobj.rst:1407 +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:1413 +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 " +"strings or Python integers, which can't participate in reference cycles. On " +"the other hand, it may be convenient to clear all contained Python objects, " +"and write the type's :c:member:`~PyTypeObject.tp_dealloc` function to " +"invoke :c:member:`~PyTypeObject.tp_clear`." +msgstr "" + +#: c-api/typeobj.rst:1426 +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:" +"member:`~PyTypeObject.tp_traverse`, and :c:member:`~PyTypeObject.tp_clear` " +"are all inherited from the base type if they are all zero in the subtype." +msgstr "" + +#: c-api/typeobj.rst:1434 +msgid "" +"An optional pointer to the rich comparison function, whose signature is::" +msgstr "" + +#: c-api/typeobj.rst:1438 +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:1441 +msgid "" +"The function should return the result of the comparison (usually ``Py_True`` " +"or ``Py_False``). If the comparison is undefined, it must return " +"``Py_NotImplemented``, if another error occurred it must return ``NULL`` and " +"set an exception condition." +msgstr "" + +#: c-api/typeobj.rst:1446 +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:1450 +msgid "Constant" +msgstr "Constante" + +#: c-api/typeobj.rst:1450 +msgid "Comparison" +msgstr "Comparaison" + +#: c-api/typeobj.rst:1452 +msgid ":const:`Py_LT`" +msgstr ":const:`Py_LT`" + +#: c-api/typeobj.rst:1452 +msgid "``<``" +msgstr "``<``" + +#: c-api/typeobj.rst:1454 +msgid ":const:`Py_LE`" +msgstr ":const:`Py_LE`" + +#: c-api/typeobj.rst:1454 +msgid "``<=``" +msgstr "``<=``" + +#: c-api/typeobj.rst:1456 +msgid ":const:`Py_EQ`" +msgstr ":const:`Py_EQ`" + +#: c-api/typeobj.rst:1456 +msgid "``==``" +msgstr "``==``" + +#: c-api/typeobj.rst:1458 +msgid ":const:`Py_NE`" +msgstr ":const:`Py_NE`" + +#: c-api/typeobj.rst:1458 +msgid "``!=``" +msgstr "``!=``" + +#: c-api/typeobj.rst:1460 +msgid ":const:`Py_GT`" +msgstr ":const:`Py_GT`" + +#: c-api/typeobj.rst:1460 +msgid "``>``" +msgstr "``>``" + +#: c-api/typeobj.rst:1462 +msgid ":const:`Py_GE`" +msgstr ":const:`Py_GE`" + +#: c-api/typeobj.rst:1462 +msgid "``>=``" +msgstr "``>=``" + +#: c-api/typeobj.rst:1465 +msgid "" +"The following macro is defined to ease writing rich comparison functions:" +msgstr "" + +#: c-api/typeobj.rst:1469 +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 " +"operators (for example, they may be C ints or floats). The third argument " +"specifies the requested operation, as for :c:func:`PyObject_RichCompare`." +msgstr "" + +#: c-api/typeobj.rst:1475 +msgid "The return value's reference count is properly incremented." +msgstr "" + +#: c-api/typeobj.rst:1477 +msgid "On error, sets an exception and returns ``NULL`` from the function." +msgstr "" + +#: c-api/typeobj.rst:1485 +msgid "" +"This field is inherited by subtypes together with :c:member:`~PyTypeObject." +"tp_hash`: a subtype inherits :c:member:`~PyTypeObject.tp_richcompare` and :c:" +"member:`~PyTypeObject.tp_hash` when the subtype's :c:member:`~PyTypeObject." +"tp_richcompare` and :c:member:`~PyTypeObject.tp_hash` are both ``NULL``." +msgstr "" + +#: c-api/typeobj.rst:1492 +msgid "" +":c:type:`PyBaseObject_Type` provides a :attr:`tp_richcompare` " +"implementation, which may be inherited. However, if only :attr:`tp_hash` is " +"defined, not even the inherited function is used and instances of the type " +"will not be able to participate in any comparisons." +msgstr "" + +#: c-api/typeobj.rst:1501 +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 " +"weak reference list head (ignoring the GC header, if present); this offset " +"is used by :c:func:`PyObject_ClearWeakRefs` and the ``PyWeakref_*`` " +"functions. The instance structure needs to include a field of type :c:expr:" +"`PyObject*` which is initialized to ``NULL``." +msgstr "" + +#: c-api/typeobj.rst:1508 +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:1513 +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 " +"different weak reference list head than the base type. Since the list head " +"is always found via :c:member:`~PyTypeObject.tp_weaklistoffset`, this should " +"not be a problem." +msgstr "" + +#: c-api/typeobj.rst:1518 +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 " +"is made weakly referenceable by adding a weak reference list head slot to " +"the instance layout and setting the :c:member:`~PyTypeObject." +"tp_weaklistoffset` of that slot's offset." +msgstr "" + +#: c-api/typeobj.rst:1523 +msgid "" +"When a type's :attr:`__slots__` declaration contains a slot named :attr:" +"`__weakref__`, that slot becomes the weak reference list head for instances " +"of the type, and the slot's offset is stored in the type's :c:member:" +"`~PyTypeObject.tp_weaklistoffset`." +msgstr "" + +#: c-api/typeobj.rst:1528 +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:1535 +msgid "" +"An optional pointer to a function that returns an :term:`iterator` for the " +"object. Its presence normally signals that the instances of this type are :" +"term:`iterable` (although sequences may be iterable without this function)." +msgstr "" + +#: c-api/typeobj.rst:1539 +msgid "This function has the same signature as :c:func:`PyObject_GetIter`::" +msgstr "" + +#: c-api/typeobj.rst:1550 +msgid "" +"An optional pointer to a function that returns the next item in an :term:" +"`iterator`. The signature is::" +msgstr "" + +#: c-api/typeobj.rst:1555 +msgid "" +"When the iterator is exhausted, it must return ``NULL``; a :exc:" +"`StopIteration` exception may or may not be set. When another error occurs, " +"it must return ``NULL`` too. Its presence signals that the instances of " +"this type are iterators." +msgstr "" + +#: c-api/typeobj.rst:1560 +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:1564 +msgid "This function has the same signature as :c:func:`PyIter_Next`." +msgstr "" + +#: c-api/typeobj.rst:1573 +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:1576 +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:1581 +msgid "" +"This field is not inherited by subtypes (methods are inherited through a " +"different mechanism)." +msgstr "" + +#: c-api/typeobj.rst:1587 +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:1591 +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:1596 +msgid "" +"This field is not inherited by subtypes (members are inherited through a " +"different mechanism)." +msgstr "" + +#: c-api/typeobj.rst:1602 +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:1605 +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:1610 +msgid "" +"This field is not inherited by subtypes (computed attributes are inherited " +"through a different mechanism)." +msgstr "" + +#: c-api/typeobj.rst:1616 +msgid "" +"An optional pointer to a base type from which type properties are " +"inherited. At this level, only single inheritance is supported; multiple " +"inheritance require dynamically creating a type object by calling the " +"metatype." +msgstr "" + +#: c-api/typeobj.rst:1624 +msgid "" +"Slot initialization is subject to the rules of initializing globals. C99 " +"requires the initializers to be \"address constants\". Function designators " +"like :c:func:`PyType_GenericNew`, with implicit conversion to a pointer, are " +"valid C99 address constants." +msgstr "" + +#: c-api/typeobj.rst:1629 +msgid "" +"However, the unary '&' operator applied to a non-static variable like :c:" +"func:`PyBaseObject_Type` is not required to produce an address constant. " +"Compilers may support this (gcc does), MSVC does not. Both compilers are " +"strictly standard conforming in this particular behavior." +msgstr "" + +#: c-api/typeobj.rst:1635 +msgid "" +"Consequently, :c:member:`~PyTypeObject.tp_base` should be set in the " +"extension module's init function." +msgstr "" + +#: c-api/typeobj.rst:1640 +msgid "This field is not inherited by subtypes (obviously)." +msgstr "" + +#: c-api/typeobj.rst:1644 +msgid "" +"This field defaults to ``&PyBaseObject_Type`` (which to Python programmers " +"is known as the type :class:`object`)." +msgstr "" + +#: c-api/typeobj.rst:1650 +msgid "The type's dictionary is stored here by :c:func:`PyType_Ready`." +msgstr "" + +#: c-api/typeobj.rst:1652 +msgid "" +"This field should normally be initialized to ``NULL`` before PyType_Ready is " +"called; it may also be initialized to a dictionary containing initial " +"attributes for the type. Once :c:func:`PyType_Ready` has initialized the " +"type, extra attributes for the type may be added to this dictionary only if " +"they don't correspond to overloaded operations (like :meth:`__add__`)." +msgstr "" + +#: c-api/typeobj.rst:1660 +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:1665 +msgid "" +"If this field is ``NULL``, :c:func:`PyType_Ready` will assign a new " +"dictionary to it." +msgstr "" + +#: c-api/typeobj.rst:1670 +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:1676 +msgid "An optional pointer to a \"descriptor get\" function." +msgstr "" + +#: c-api/typeobj.rst:1694 c-api/typeobj.rst:1806 c-api/typeobj.rst:1830 +msgid "The function signature is::" +msgstr "" + +#: c-api/typeobj.rst:1691 +msgid "" +"An optional pointer to a function for setting and deleting a descriptor's " +"value." +msgstr "" + +#: c-api/typeobj.rst:1698 +msgid "The *value* argument is set to ``NULL`` to delete the value." +msgstr "" + +#: c-api/typeobj.rst:1709 +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 " +"of the type of the instance variable dictionary; this offset is used by :c:" +"func:`PyObject_GenericGetAttr`." +msgstr "" + +#: c-api/typeobj.rst:1714 +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:1717 +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, " +"it specifies the offset from the *end* of the instance structure. A " +"negative offset is more expensive to use, and should only be used when the " +"instance structure contains a variable-length part. This is used for " +"example to add an instance variable dictionary to subtypes of :class:`str` " +"or :class:`tuple`. Note that the :c:member:`~PyTypeObject.tp_basicsize` " +"field should account for the dictionary added to the end in that case, even " +"though the dictionary is not included in the basic object layout. On a " +"system with a pointer size of 4 bytes, :c:member:`~PyTypeObject." +"tp_dictoffset` should be set to ``-4`` to indicate that the dictionary is at " +"the very end of the structure." +msgstr "" + +#: c-api/typeobj.rst:1729 +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:1736 +msgid "" +"where :c:member:`~PyTypeObject.tp_basicsize`, :c:member:`~PyTypeObject." +"tp_itemsize` and :c:member:`~PyTypeObject.tp_dictoffset` are taken from the " +"type object, and :attr:`ob_size` is taken from the instance. The absolute " +"value is taken because ints use the sign of :attr:`ob_size` to store the " +"sign of the number. (There's never a need to do this calculation yourself; " +"it is done for you by :c:func:`_PyObject_GetDictPtr`.)" +msgstr "" + +#: c-api/typeobj.rst:1744 +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 " +"store the dictionary at a difference offset than the base type. Since the " +"dictionary is always found via :c:member:`~PyTypeObject.tp_dictoffset`, this " +"should not be a problem." +msgstr "" + +#: c-api/typeobj.rst:1749 +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, " +"a dictionary slot is added to the instance layout and the :c:member:" +"`~PyTypeObject.tp_dictoffset` is set to that slot's offset." +msgstr "" + +#: c-api/typeobj.rst:1754 +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:1757 +msgid "" +"(Adding a slot named :attr:`~object.__dict__` to the :attr:`__slots__` " +"declaration does not have the expected effect, it just causes confusion. " +"Maybe this should be added as a feature just like :attr:`__weakref__` " +"though.)" +msgstr "" + +#: c-api/typeobj.rst:1763 +msgid "" +"This slot has no default. For :ref:`static types `, if the " +"field is ``NULL`` then no :attr:`__dict__` gets created for instances." +msgstr "" + +#: c-api/typeobj.rst:1769 +msgid "An optional pointer to an instance initialization function." +msgstr "" + +#: c-api/typeobj.rst:1771 +msgid "" +"This function corresponds to the :meth:`__init__` method of classes. Like :" +"meth:`__init__`, it is possible to create an instance without calling :meth:" +"`__init__`, and it is possible to reinitialize an instance by calling its :" +"meth:`__init__` method again." +msgstr "" + +#: c-api/typeobj.rst:1780 +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:1784 +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 :" +"c:member:`~PyTypeObject.tp_new` function has returned an instance of the " +"type. If the :c:member:`~PyTypeObject.tp_new` function returns an instance " +"of some other type that is not a subtype of the original type, no :c:member:" +"`~PyTypeObject.tp_init` function is called; if :c:member:`~PyTypeObject." +"tp_new` returns an instance of a subtype of the original type, the " +"subtype's :c:member:`~PyTypeObject.tp_init` is called." +msgstr "" + +#: c-api/typeobj.rst:1791 +msgid "Returns ``0`` on success, ``-1`` and sets an exception on error." +msgstr "" + +#: c-api/typeobj.rst:1799 +msgid "" +"For :ref:`static types ` this field does not have a default." +msgstr "" + +#: c-api/typeobj.rst:1804 +msgid "An optional pointer to an instance allocation function." +msgstr "" + +#: c-api/typeobj.rst:1812 +msgid "" +"This field is inherited by static subtypes, but not by dynamic subtypes " +"(subtypes created by a class statement)." +msgstr "" + +#: c-api/typeobj.rst:1817 +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:1821 +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:1828 +msgid "An optional pointer to an instance creation function." +msgstr "" + +#: c-api/typeobj.rst:1834 +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 " +"to the type. Note that *subtype* doesn't have to equal the type whose :c:" +"member:`~PyTypeObject.tp_new` function is called; it may be a subtype of " +"that type (but not an unrelated type)." +msgstr "" + +#: c-api/typeobj.rst:1840 +msgid "" +"The :c:member:`~PyTypeObject.tp_new` function should call ``subtype-" +">tp_alloc(subtype, nitems)`` to allocate space for the object, and then do " +"only as much further initialization as is absolutely necessary. " +"Initialization that can safely be ignored or repeated should be placed in " +"the :c:member:`~PyTypeObject.tp_init` handler. A good rule of thumb is that " +"for immutable types, all initialization should take place in :c:member:" +"`~PyTypeObject.tp_new`, while for mutable types, most initialization should " +"be deferred to :c:member:`~PyTypeObject.tp_init`." +msgstr "" + +#: c-api/typeobj.rst:1848 +msgid "" +"Set the :const:`Py_TPFLAGS_DISALLOW_INSTANTIATION` flag to disallow creating " +"instances of the type in Python." +msgstr "" + +#: c-api/typeobj.rst:1853 +msgid "" +"This field is inherited by subtypes, except it is not inherited by :ref:" +"`static types ` whose :c:member:`~PyTypeObject.tp_base` is " +"``NULL`` or ``&PyBaseObject_Type``." +msgstr "" + +#: c-api/typeobj.rst:1859 +msgid "" +"For :ref:`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; presumably there is some other way to create instances, like a " +"factory function." +msgstr "" + +#: c-api/typeobj.rst:1867 +msgid "" +"An optional pointer to an instance deallocation function. Its signature is::" +msgstr "" + +#: c-api/typeobj.rst:1871 +msgid "" +"An initializer that is compatible with this signature is :c:func:" +"`PyObject_Free`." +msgstr "" + +#: c-api/typeobj.rst:1875 +msgid "" +"This field is inherited by static subtypes, but not by dynamic subtypes " +"(subtypes created by a class statement)" +msgstr "" + +#: c-api/typeobj.rst:1880 +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:1884 +msgid "For static subtypes, :c:type:`PyBaseObject_Type` uses PyObject_Del." +msgstr "" + +#: c-api/typeobj.rst:1889 +msgid "An optional pointer to a function called by the garbage collector." +msgstr "" + +#: c-api/typeobj.rst:1891 +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 " +"type's :c:member:`~PyTypeObject.tp_flags` field, and check the :const:" +"`Py_TPFLAGS_HAVE_GC` flag bit. But some types have a mixture of statically " +"and dynamically allocated instances, and the statically allocated instances " +"are not collectible. Such types should define this function; it should " +"return ``1`` for a collectible instance, and ``0`` for a non-collectible " +"instance. The signature is::" +msgstr "" + +#: c-api/typeobj.rst:1901 +msgid "" +"(The only example of this are types themselves. The metatype, :c:data:" +"`PyType_Type`, defines this function to distinguish between statically and :" +"ref:`dynamically allocated types `.)" +msgstr "" + +#: c-api/typeobj.rst:1911 +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:1917 +msgid "Tuple of base types." +msgstr "" + +#: c-api/typeobj.rst:1943 +msgid "" +"This field should be set to ``NULL`` and treated as read-only. Python will " +"fill it in when the type is :c:func:`initialized `." +msgstr "" + +#: c-api/typeobj.rst:1922 +msgid "" +"For dynamically created classes, the ``Py_tp_bases`` :c:type:`slot " +"` can be used instead of the *bases* argument of :c:func:" +"`PyType_FromSpecWithBases`. The argument form is preferred." +msgstr "" + +#: c-api/typeobj.rst:1929 +msgid "" +"Multiple inheritance does not work well for statically defined types. If you " +"set ``tp_bases`` to a tuple, Python will not raise an error, but some slots " +"will only be inherited from the first base." +msgstr "" + +#: c-api/typeobj.rst:1958 c-api/typeobj.rst:1977 c-api/typeobj.rst:1991 +msgid "This field is not inherited." +msgstr "" + +#: c-api/typeobj.rst:1940 +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:1948 +msgid "" +"This field is not inherited; it is calculated fresh by :c:func:" +"`PyType_Ready`." +msgstr "" + +#: c-api/typeobj.rst:1954 +msgid "Unused. Internal use only." +msgstr "" + +#: c-api/typeobj.rst:1963 +msgid "List of weak references to subclasses. Internal use only." +msgstr "" + +#: c-api/typeobj.rst:1972 +msgid "" +"Weak reference list head, for weak references to this type object. Not " +"inherited. Internal use only." +msgstr "" + +#: c-api/typeobj.rst:1982 +msgid "" +"This field is deprecated. Use :c:member:`~PyTypeObject.tp_finalize` instead." +msgstr "" + +#: c-api/typeobj.rst:1987 +msgid "Used to index into the method cache. Internal use only." +msgstr "" + +#: c-api/typeobj.rst:1996 +msgid "" +"An optional pointer to an instance finalization function. Its signature is::" +msgstr "" + +#: c-api/typeobj.rst:2000 +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 " +"collector (if the instance is part of an isolated reference cycle) or just " +"before the object is deallocated. Either way, it is guaranteed to be called " +"before attempting to break reference cycles, ensuring that it finds the " +"object in a sane state." +msgstr "" + +#: c-api/typeobj.rst:2007 +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:2024 +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:2043 +msgid "" +"Before version 3.8 it was necessary to set the :const:" +"`Py_TPFLAGS_HAVE_FINALIZE` flags bit in order for this field to be used. " +"This is no longer required." +msgstr "" + +#: c-api/typeobj.rst:2047 +msgid "\"Safe object finalization\" (:pep:`442`)" +msgstr "" + +#: c-api/typeobj.rst:2052 +msgid "" +"Vectorcall function to use for calls of this type object. In other words, it " +"is used to implement :ref:`vectorcall ` for ``type.__call__``. " +"If ``tp_vectorcall`` is ``NULL``, the default call implementation using :" +"attr:`__new__` and :attr:`__init__` is used." +msgstr "" + +#: c-api/typeobj.rst:2060 +msgid "This field is never inherited." +msgstr "" + +#: c-api/typeobj.rst:2062 +msgid "(the field exists since 3.8 but it's only used since 3.9)" +msgstr "" + +#: c-api/typeobj.rst:2068 +msgid "Static Types" +msgstr "" + +#: c-api/typeobj.rst:2070 +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:2074 +msgid "" +"This results in types that are limited relative to types defined in Python:" +msgstr "" + +#: c-api/typeobj.rst:2076 +msgid "" +"Static types are limited to one base, i.e. they cannot use multiple " +"inheritance." +msgstr "" + +#: c-api/typeobj.rst:2078 +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:2080 +msgid "" +"Static type objects are shared across :ref:`sub-interpreters `, so they should not include any subinterpreter-" +"specific state." +msgstr "" + +#: c-api/typeobj.rst:2084 +msgid "" +"Also, since :c:type:`PyTypeObject` is only part of the :ref:`Limited API " +"` as an opaque struct, any extension modules using static types must " +"be compiled for a specific Python minor version." +msgstr "" + +#: c-api/typeobj.rst:2092 +msgid "Heap Types" +msgstr "" + +#: c-api/typeobj.rst:2094 +msgid "" +"An alternative to :ref:`static types ` is *heap-allocated " +"types*, or *heap types* for short, which correspond closely to classes " +"created by Python's ``class`` statement. Heap types have the :const:" +"`Py_TPFLAGS_HEAPTYPE` flag set." +msgstr "" + +#: c-api/typeobj.rst:2099 +msgid "" +"This is done by filling a :c:type:`PyType_Spec` structure and calling :c:" +"func:`PyType_FromSpec`, :c:func:`PyType_FromSpecWithBases`, or :c:func:" +"`PyType_FromModuleAndSpec`." +msgstr "" + +#: c-api/typeobj.rst:2107 +msgid "Number Object Structures" +msgstr "" + +#: c-api/typeobj.rst:2114 +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:2444 +msgid "Here is the structure definition::" +msgstr "" + +#: c-api/typeobj.rst:2167 +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 " +"instance of the defined type). If the operation is not defined for the " +"given operands, binary and ternary functions must return " +"``Py_NotImplemented``, if another error occurred they must return ``NULL`` " +"and set an exception." +msgstr "" + +#: c-api/typeobj.rst:2176 +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:2221 +msgid "Mapping Object Structures" +msgstr "" + +#: c-api/typeobj.rst:2228 +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:2233 +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:2239 +msgid "" +"This function is used by :c:func:`PyObject_GetItem` and :c:func:" +"`PySequence_GetSlice`, and has the same signature as :c:func:`!" +"PyObject_GetItem`. This slot must be filled for the :c:func:" +"`PyMapping_Check` function to return ``1``, it can be ``NULL`` otherwise." +msgstr "" + +#: c-api/typeobj.rst:2247 +msgid "" +"This function is used by :c:func:`PyObject_SetItem`, :c:func:" +"`PyObject_DelItem`, :c:func:`PyObject_SetSlice` and :c:func:" +"`PyObject_DelSlice`. It has the same signature as :c:func:`!" +"PyObject_SetItem`, but *v* can also be set to ``NULL`` to delete an item. " +"If this slot is ``NULL``, the object does not support item assignment and " +"deletion." +msgstr "" + +#: c-api/typeobj.rst:2258 +msgid "Sequence Object Structures" +msgstr "" + +#: c-api/typeobj.rst:2265 +msgid "" +"This structure holds pointers to the functions which an object uses to " +"implement the sequence protocol." +msgstr "" + +#: c-api/typeobj.rst:2270 +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 " +"negative indices via the :c:member:`~PySequenceMethods.sq_item` and the :c:" +"member:`~PySequenceMethods.sq_ass_item` slots." +msgstr "" + +#: c-api/typeobj.rst:2277 +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:2283 +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:2289 +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 " +"subscription via the :c:member:`~PyMappingMethods.mp_subscript` slot. This " +"slot must be filled for the :c:func:`PySequence_Check` function to return " +"``1``, it can be ``NULL`` otherwise." +msgstr "" + +#: c-api/typeobj.rst:2295 +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 " +"index which is passed to :attr:`sq_item`. If :attr:`sq_length` is ``NULL``, " +"the index is passed as is to the function." +msgstr "" + +#: c-api/typeobj.rst:2302 +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:" +"`PyObject_DelItem`, after trying the item assignment and deletion via the :c:" +"member:`~PyMappingMethods.mp_ass_subscript` slot. This slot may be left to " +"``NULL`` if the object does not support item assignment and deletion." +msgstr "" + +#: c-api/typeobj.rst:2311 +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:2318 +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 " +"may be left to ``NULL``, in this case :c:func:`!PySequence_InPlaceConcat` " +"will fall back to :c:func:`PySequence_Concat`. It is also used by the " +"augmented assignment ``+=``, after trying numeric in-place addition via the :" +"c:member:`~PyNumberMethods.nb_inplace_add` slot." +msgstr "" + +#: c-api/typeobj.rst:2327 +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 " +"may be left to ``NULL``, in this case :c:func:`!PySequence_InPlaceRepeat` " +"will fall back to :c:func:`PySequence_Repeat`. It is also used by the " +"augmented assignment ``*=``, after trying numeric in-place multiplication " +"via the :c:member:`~PyNumberMethods.nb_inplace_multiply` slot." +msgstr "" + +#: c-api/typeobj.rst:2338 +msgid "Buffer Object Structures" +msgstr "" + +#: c-api/typeobj.rst:2346 +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:2401 c-api/typeobj.rst:2466 c-api/typeobj.rst:2487 +msgid "The signature of this function is::" +msgstr "" + +#: c-api/typeobj.rst:2356 +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:2360 +msgid "" +"Check if the request can be met. If not, raise :c:data:`PyExc_BufferError`, " +"set :c:expr:`view->obj` to ``NULL`` and return ``-1``." +msgstr "" + +#: c-api/typeobj.rst:2363 +msgid "Fill in the requested fields." +msgstr "" + +#: c-api/typeobj.rst:2365 +msgid "Increment an internal counter for the number of exports." +msgstr "" + +#: c-api/typeobj.rst:2367 +msgid "" +"Set :c:expr:`view->obj` to *exporter* and increment :c:expr:`view->obj`." +msgstr "" + +#: c-api/typeobj.rst:2369 +msgid "Return ``0``." +msgstr "" + +#: c-api/typeobj.rst:2371 +msgid "" +"If *exporter* is part of a chain or tree of buffer providers, two main " +"schemes can be used:" +msgstr "" + +#: c-api/typeobj.rst:2374 +msgid "" +"Re-export: Each member of the tree acts as the exporting object and sets :c:" +"expr:`view->obj` to a new reference to itself." +msgstr "" + +#: c-api/typeobj.rst:2377 +msgid "" +"Redirect: The buffer request is redirected to the root object of the tree. " +"Here, :c:expr:`view->obj` will be a new reference to the root object." +msgstr "" + +#: c-api/typeobj.rst:2381 +msgid "" +"The individual fields of *view* are described in section :ref:`Buffer " +"structure `, the rules how an exporter must react to " +"specific requests are in section :ref:`Buffer request types `." +msgstr "" + +#: c-api/typeobj.rst:2386 +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:" +"`~Py_buffer.format`, :c:member:`~Py_buffer.shape`, :c:member:`~Py_buffer." +"strides`, :c:member:`~Py_buffer.suboffsets` and :c:member:`~Py_buffer." +"internal` are read-only for the consumer." +msgstr "" + +#: c-api/typeobj.rst:2393 +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:2396 +msgid "" +":c:func:`PyObject_GetBuffer` is the interface for the consumer that wraps " +"this function." +msgstr "" + +#: c-api/typeobj.rst:2405 +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 " +"``NULL``. Otherwise, a standard implementation of this function will take " +"these optional steps:" +msgstr "" + +#: c-api/typeobj.rst:2410 +msgid "Decrement an internal counter for the number of exports." +msgstr "" + +#: c-api/typeobj.rst:2412 +msgid "If the counter is ``0``, free all memory associated with *view*." +msgstr "" + +#: c-api/typeobj.rst:2414 +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 " +"constant, while a consumer MAY pass a copy of the original buffer as the " +"*view* argument." +msgstr "" + +#: c-api/typeobj.rst:2420 +msgid "" +"This function MUST NOT decrement :c:expr:`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:2425 +msgid "" +":c:func:`PyBuffer_Release` is the interface for the consumer that wraps this " +"function." +msgstr "" + +#: c-api/typeobj.rst:2433 +msgid "Async Object Structures" +msgstr "" + +#: c-api/typeobj.rst:2441 +msgid "" +"This structure holds pointers to the functions required to implement :term:" +"`awaitable` and :term:`asynchronous iterator` objects." +msgstr "" + +#: c-api/typeobj.rst:2459 +msgid "" +"The returned object must be an :term:`iterator`, i.e. :c:func:`PyIter_Check` " +"must return ``1`` for it." +msgstr "" + +#: c-api/typeobj.rst:2462 +msgid "" +"This slot may be set to ``NULL`` if an object is not an :term:`awaitable`." +msgstr "" + +#: c-api/typeobj.rst:2470 +msgid "" +"Must return an :term:`asynchronous iterator` object. See :meth:`__anext__` " +"for details." +msgstr "" + +#: c-api/typeobj.rst:2473 +msgid "" +"This slot may be set to ``NULL`` if an object does not implement " +"asynchronous iteration protocol." +msgstr "" + +#: c-api/typeobj.rst:2482 +msgid "" +"Must return an :term:`awaitable` object. See :meth:`__anext__` for details. " +"This slot may be set to ``NULL``." +msgstr "" + +#: c-api/typeobj.rst:2491 +msgid "" +"See :c:func:`PyIter_Send` for details. This slot may be set to ``NULL``." +msgstr "" + +#: c-api/typeobj.rst:2500 +msgid "Slot Type typedefs" +msgstr "" + +#: c-api/typeobj.rst:2504 +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 " +"length for the instance, suitably aligned, and initialized to zeros, but " +"with :attr:`ob_refcnt` set to ``1`` and :attr:`ob_type` set to the type " +"argument. If the type's :c:member:`~PyTypeObject.tp_itemsize` is non-zero, " +"the object's :attr:`ob_size` field should be initialized to *nitems* and the " +"length of the allocated memory block should be ``tp_basicsize + " +"nitems*tp_itemsize``, rounded up to a multiple of ``sizeof(void*)``; " +"otherwise, *nitems* is not used and the length of the block should be :c:" +"member:`~PyTypeObject.tp_basicsize`." +msgstr "" + +#: c-api/typeobj.rst:2514 +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:2521 +msgid "See :c:member:`~PyTypeObject.tp_free`." +msgstr "" + +#: c-api/typeobj.rst:2525 +msgid "See :c:member:`~PyTypeObject.tp_new`." +msgstr "" + +#: c-api/typeobj.rst:2529 +msgid "See :c:member:`~PyTypeObject.tp_init`." +msgstr "" + +#: c-api/typeobj.rst:2533 +msgid "See :c:member:`~PyTypeObject.tp_repr`." +msgstr "" + +#: c-api/typeobj.rst:2546 +msgid "Return the value of the named attribute for the object." +msgstr "" + +#: c-api/typeobj.rst:2552 +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:2548 +msgid "See :c:member:`~PyTypeObject.tp_getattro`." +msgstr "" + +#: c-api/typeobj.rst:2555 +msgid "See :c:member:`~PyTypeObject.tp_setattro`." +msgstr "" + +#: c-api/typeobj.rst:2559 +msgid "See :c:member:`~PyTypeObject.tp_descr_get`." +msgstr "" + +#: c-api/typeobj.rst:2563 +msgid "See :c:member:`~PyTypeObject.tp_descr_set`." +msgstr "" + +#: c-api/typeobj.rst:2567 +msgid "See :c:member:`~PyTypeObject.tp_hash`." +msgstr "" + +#: c-api/typeobj.rst:2571 +msgid "See :c:member:`~PyTypeObject.tp_richcompare`." +msgstr "" + +#: c-api/typeobj.rst:2575 +msgid "See :c:member:`~PyTypeObject.tp_iter`." +msgstr "" + +#: c-api/typeobj.rst:2579 +msgid "See :c:member:`~PyTypeObject.tp_iternext`." +msgstr "" + +#: c-api/typeobj.rst:2593 +msgid "See :c:member:`~PyAsyncMethods.am_send`." +msgstr "" + +#: c-api/typeobj.rst:2609 +msgid "Examples" +msgstr "Exemples" + +#: c-api/typeobj.rst:2611 +msgid "" +"The following are simple examples of Python type definitions. They include " +"common usage you may encounter. Some demonstrate tricky corner cases. For " +"more examples, practical info, and a tutorial, see :ref:`defining-new-types` " +"and :ref:`new-types-topics`." +msgstr "" + +#: c-api/typeobj.rst:2616 +msgid "A basic :ref:`static type `::" +msgstr "" + +#: c-api/typeobj.rst:2633 +msgid "" +"You may also find older code (especially in the CPython code base) with a " +"more verbose initializer::" +msgstr "" + +#: c-api/typeobj.rst:2677 +msgid "A type that supports weakrefs, instance dicts, and hashing::" +msgstr "" + +#: c-api/typeobj.rst:2704 +msgid "" +"A str subclass that cannot be subclassed and cannot be called to create " +"instances (e.g. uses a separate factory func) using :c:data:" +"`Py_TPFLAGS_DISALLOW_INSTANTIATION` flag::" +msgstr "" + +#: c-api/typeobj.rst:2723 +msgid "" +"The simplest :ref:`static type ` with fixed-length instances::" +msgstr "" + +#: c-api/typeobj.rst:2734 +msgid "" +"The simplest :ref:`static type ` with variable-length " +"instances::" +msgstr "" diff --git a/c-api/unicode.po b/c-api/unicode.po new file mode 100644 index 0000000000..e9bbe2915e --- /dev/null +++ b/c-api/unicode.po @@ -0,0 +1,2015 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-18 15:46+0200\n" +"PO-Revision-Date: 2018-10-04 12:27+0200\n" +"Last-Translator: FULL NAME \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" + +#: c-api/unicode.rst:6 +msgid "Unicode Objects and Codecs" +msgstr "Objets Unicode et Codecs" + +#: c-api/unicode.rst:12 +msgid "Unicode Objects" +msgstr "Objets Unicode" + +#: c-api/unicode.rst:14 +msgid "" +"Since the implementation of :pep:`393` in Python 3.3, Unicode objects " +"internally use a variety of representations, in order to allow handling the " +"complete range of Unicode characters while staying memory efficient. There " +"are special cases for strings where all code points are below 128, 256, or " +"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 "" +":c:expr:`Py_UNICODE*` and UTF-8 representations are created on demand and " +"cached in the Unicode object. The :c:expr:`Py_UNICODE*` representation is " +"deprecated and inefficient." +msgstr "" +"Des représentations :c:expr:`Py_UNICODE*` et UTF-8 sont créées à la demande " +"et mises en cache dans l'objet Unicode. La représentation :c:expr:" +"`Py_UNICODE*` est dépréciée et inefficace." + +#: c-api/unicode.rst:24 +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 "" +"\"canonical\" Unicode objects are all objects created by a non-deprecated " +"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 "" +"\"legacy\" Unicode objects have been created through one of the deprecated " +"APIs (typically :c:func:`PyUnicode_FromUnicode`) and only bear the :c:expr:" +"`Py_UNICODE*` representation; you will have to call :c:func:" +"`PyUnicode_READY` on them before calling any other API." +msgstr "" +"Les objets Unicode « historiques » ont été créés via une des APIs dépréciées " +"(typiquement :c:func:`PyUnicode_FromUnicode`) et supportent uniquement la " +"représentation :c:expr:`Py_UNICODE*`; vous devrez appeler :c:func:" +"`PyUnicode_READY` sur eux avant d'appeler n'importe quelle autre API." + +#: c-api/unicode.rst:37 +msgid "" +"The \"legacy\" Unicode object will be removed in Python 3.12 with deprecated " +"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 "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 "" +"These types are typedefs for unsigned integer types wide enough to contain " +"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 "" +"This is a typedef of :c:expr:`wchar_t`, which is a 16-bit type or 32-bit " +"type depending on the platform." +msgstr "" +"Ceci est un *typedef* de :c:expr:`wchar_t`, qui est un type 16-bit ou un " +"type 32-bit selon la plateforme." + +#: c-api/unicode.rst:64 +msgid "" +"In previous versions, this was a 16-bit type or a 32-bit type depending on " +"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 "" +"These subtypes of :c:type:`PyObject` represent a Python Unicode object. In " +"almost all cases, they shouldn't be used directly, since all API functions " +"that deal with Unicode objects take and return :c:type:`PyObject` pointers." +msgstr "" + +#: c-api/unicode.rst:83 +msgid "" +"This instance of :c:type:`PyTypeObject` represents the Python Unicode type. " +"It is exposed to Python code as ``str``." +msgstr "" + +#: c-api/unicode.rst:87 +msgid "" +"The following APIs are really C macros and can be used to do fast checks and " +"to access internal read-only data of Unicode objects:" +msgstr "" + +#: c-api/unicode.rst:92 +msgid "" +"Return true if the object *o* is a Unicode object or an instance of a " +"Unicode subtype. This function always succeeds." +msgstr "" + +#: c-api/unicode.rst:98 +msgid "" +"Return true if the object *o* is a Unicode object, but not an instance of a " +"subtype. This function always succeeds." +msgstr "" + +#: c-api/unicode.rst:104 +msgid "" +"Ensure the string object *o* is in the \"canonical\" representation. This " +"is required before using any of the access macros described below." +msgstr "" + +#: c-api/unicode.rst:109 +msgid "" +"Returns ``0`` on success and ``-1`` with an exception set on failure, which " +"in particular happens if memory allocation fails." +msgstr "" + +#: c-api/unicode.rst:115 +msgid "This API will be removed with :c:func:`PyUnicode_FromUnicode`." +msgstr "" + +#: c-api/unicode.rst:120 +msgid "" +"Return the length of the Unicode string, in code points. *o* has to be a " +"Unicode object in the \"canonical\" representation (not checked)." +msgstr "" + +#: c-api/unicode.rst:130 +msgid "" +"Return a pointer to the canonical representation cast to UCS1, UCS2 or UCS4 " +"integer types for direct character access. No checks are performed if the " +"canonical representation has the correct character size; use :c:func:" +"`PyUnicode_KIND` to select the right macro. Make sure :c:func:" +"`PyUnicode_READY` has been called before accessing this." +msgstr "" + +#: c-api/unicode.rst:144 +msgid "Return values of the :c:func:`PyUnicode_KIND` macro." +msgstr "" + +#: c-api/unicode.rst:149 +msgid "``PyUnicode_WCHAR_KIND`` is deprecated." +msgstr "" + +#: c-api/unicode.rst:154 +msgid "" +"Return one of the PyUnicode kind constants (see above) that indicate how " +"many bytes per character this Unicode object uses to store its data. *o* " +"has to be a Unicode object in the \"canonical\" representation (not checked)." +msgstr "" + +#: c-api/unicode.rst:165 +msgid "" +"Return a void pointer to the raw Unicode buffer. *o* has to be a Unicode " +"object in the \"canonical\" representation (not checked)." +msgstr "" + +#: c-api/unicode.rst:174 +msgid "" +"Write into a canonical representation *data* (as obtained with :c:func:" +"`PyUnicode_DATA`). This macro does not do any sanity checks and is intended " +"for usage in loops. The caller should cache the *kind* value and *data* " +"pointer as obtained from other macro calls. *index* is the index in the " +"string (starts at 0) and *value* is the new code point value which should be " +"written to that location." +msgstr "" + +#: c-api/unicode.rst:186 +msgid "" +"Read a code point from a canonical representation *data* (as obtained with :" +"c:func:`PyUnicode_DATA`). No checks or ready calls are performed." +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." +msgstr "" + +#: c-api/unicode.rst:203 +msgid "" +"Return the maximum code point that is suitable for creating another string " +"based on *o*, which must be in the \"canonical\" representation. This is " +"always an approximation but more efficient than iterating over the string." +msgstr "" + +#: c-api/unicode.rst:212 +msgid "" +"Return the size of the deprecated :c:type:`Py_UNICODE` representation, in " +"code units (this includes surrogate pairs as 2 units). *o* has to be a " +"Unicode object (not checked)." +msgstr "" + +#: c-api/unicode.rst:228 c-api/unicode.rst:756 +msgid "" +"Part of the old-style Unicode API, please migrate to using :c:func:" +"`PyUnicode_GET_LENGTH`." +msgstr "" + +#: c-api/unicode.rst:223 +msgid "" +"Return the size of the deprecated :c:type:`Py_UNICODE` representation in " +"bytes. *o* has to be a Unicode object (not checked)." +msgstr "" + +#: c-api/unicode.rst:234 +msgid "" +"Return a pointer to a :c:type:`Py_UNICODE` representation of the object. " +"The returned buffer is always terminated with an extra null code point. It " +"may also contain embedded null code points, which would cause the string to " +"be truncated when used in most C functions. The ``AS_DATA`` form casts the " +"pointer to :c:expr:`const char *`. The *o* argument has to be a Unicode " +"object (not checked)." +msgstr "" + +#: c-api/unicode.rst:241 +msgid "" +"This macro is now inefficient -- because in many cases the :c:type:" +"`Py_UNICODE` representation does not exist and needs to be created -- and " +"can fail (return ``NULL`` with an exception set). Try to port the code to " +"use the new :c:func:`PyUnicode_nBYTE_DATA` macros or use :c:func:" +"`PyUnicode_WRITE` or :c:func:`PyUnicode_READ`." +msgstr "" + +#: c-api/unicode.rst:250 +msgid "" +"Part of the old-style Unicode API, please migrate to using the :c:func:" +"`PyUnicode_nBYTE_DATA` family of macros." +msgstr "" + +#: c-api/unicode.rst:255 +msgid "" +"Return ``1`` if the string is a valid identifier according to the language " +"definition, section :ref:`identifiers`. Return ``0`` otherwise." +msgstr "" + +#: c-api/unicode.rst:258 +msgid "" +"The function does not call :c:func:`Py_FatalError` anymore if the string is " +"not ready." +msgstr "" + +#: c-api/unicode.rst:264 +msgid "Unicode Character Properties" +msgstr "" + +#: c-api/unicode.rst:266 +msgid "" +"Unicode provides many different character properties. The most often needed " +"ones are available through these macros which are mapped to C functions " +"depending on the Python configuration." +msgstr "" + +#: c-api/unicode.rst:273 +msgid "" +"Return ``1`` or ``0`` depending on whether *ch* is a whitespace character." +msgstr "" + +#: c-api/unicode.rst:278 +msgid "" +"Return ``1`` or ``0`` depending on whether *ch* is a lowercase character." +msgstr "" + +#: c-api/unicode.rst:283 +msgid "" +"Return ``1`` or ``0`` depending on whether *ch* is an uppercase character." +msgstr "" + +#: c-api/unicode.rst:288 +msgid "" +"Return ``1`` or ``0`` depending on whether *ch* is a titlecase character." +msgstr "" + +#: c-api/unicode.rst:293 +msgid "" +"Return ``1`` or ``0`` depending on whether *ch* is a linebreak character." +msgstr "" + +#: c-api/unicode.rst:298 +msgid "Return ``1`` or ``0`` depending on whether *ch* is a decimal character." +msgstr "" + +#: c-api/unicode.rst:303 +msgid "Return ``1`` or ``0`` depending on whether *ch* is a digit character." +msgstr "" + +#: c-api/unicode.rst:308 +msgid "Return ``1`` or ``0`` depending on whether *ch* is a numeric character." +msgstr "" + +#: c-api/unicode.rst:313 +msgid "" +"Return ``1`` or ``0`` depending on whether *ch* is an alphabetic character." +msgstr "" + +#: c-api/unicode.rst:318 +msgid "" +"Return ``1`` or ``0`` depending on whether *ch* is an alphanumeric character." +msgstr "" + +#: c-api/unicode.rst:323 +msgid "" +"Return ``1`` or ``0`` depending on whether *ch* is a printable character. " +"Nonprintable characters are those characters defined in the Unicode " +"character database as \"Other\" or \"Separator\", excepting the ASCII space " +"(0x20) which is considered printable. (Note that printable characters in " +"this context are those which should not be escaped when :func:`repr` is " +"invoked on a string. It has no bearing on the handling of strings written " +"to :data:`sys.stdout` or :data:`sys.stderr`.)" +msgstr "" + +#: c-api/unicode.rst:332 +msgid "These APIs can be used for fast direct character conversions:" +msgstr "" + +#: c-api/unicode.rst:337 +msgid "Return the character *ch* converted to lower case." +msgstr "" + +#: c-api/unicode.rst:347 c-api/unicode.rst:355 +msgid "This function uses simple case mappings." +msgstr "" + +#: c-api/unicode.rst:345 +msgid "Return the character *ch* converted to upper case." +msgstr "" + +#: c-api/unicode.rst:353 +msgid "Return the character *ch* converted to title case." +msgstr "" + +#: c-api/unicode.rst:361 +msgid "" +"Return the character *ch* converted to a decimal positive integer. Return " +"``-1`` if this is not possible. This macro does not raise exceptions." +msgstr "" + +#: c-api/unicode.rst:367 +msgid "" +"Return the character *ch* converted to a single digit integer. Return ``-1`` " +"if this is not possible. This macro does not raise exceptions." +msgstr "" + +#: c-api/unicode.rst:373 +msgid "" +"Return the character *ch* converted to a double. Return ``-1.0`` if this is " +"not possible. This macro does not raise exceptions." +msgstr "" + +#: c-api/unicode.rst:377 +msgid "These APIs can be used to work with surrogates:" +msgstr "" + +#: c-api/unicode.rst:381 +msgid "Check if *ch* is a surrogate (``0xD800 <= ch <= 0xDFFF``)." +msgstr "" + +#: c-api/unicode.rst:385 +msgid "Check if *ch* is a high surrogate (``0xD800 <= ch <= 0xDBFF``)." +msgstr "" + +#: c-api/unicode.rst:389 +msgid "Check if *ch* is a low surrogate (``0xDC00 <= ch <= 0xDFFF``)." +msgstr "" + +#: c-api/unicode.rst:393 +msgid "" +"Join two surrogate characters and return a single Py_UCS4 value. *high* and " +"*low* are respectively the leading and trailing surrogates in a surrogate " +"pair." +msgstr "" + +#: c-api/unicode.rst:399 +msgid "Creating and accessing Unicode strings" +msgstr "" + +#: c-api/unicode.rst:401 +msgid "" +"To create Unicode objects and access their basic sequence properties, use " +"these APIs:" +msgstr "" + +#: c-api/unicode.rst:406 +msgid "" +"Create a new Unicode object. *maxchar* should be the true maximum code " +"point to be placed in the string. As an approximation, it can be rounded up " +"to the nearest value in the sequence 127, 255, 65535, 1114111." +msgstr "" + +#: c-api/unicode.rst:410 +msgid "" +"This is the recommended way to allocate a new Unicode object. Objects " +"created using this function are not resizable." +msgstr "" + +#: c-api/unicode.rst:419 +msgid "" +"Create a new Unicode object with the given *kind* (possible values are :c:" +"macro:`PyUnicode_1BYTE_KIND` etc., as returned by :c:func:" +"`PyUnicode_KIND`). The *buffer* must point to an array of *size* units of " +"1, 2 or 4 bytes per character, as given by the kind." +msgstr "" + +#: c-api/unicode.rst:429 +msgid "" +"Create a Unicode object from the char buffer *u*. The bytes will be " +"interpreted as being UTF-8 encoded. The buffer is copied into the new " +"object. If the buffer is not ``NULL``, the return value might be a shared " +"object, i.e. modification of the data is not allowed." +msgstr "" + +#: c-api/unicode.rst:434 +msgid "" +"If *u* is ``NULL``, this function behaves like :c:func:" +"`PyUnicode_FromUnicode` with the buffer set to ``NULL``. This usage is " +"deprecated in favor of :c:func:`PyUnicode_New`, and will be removed in " +"Python 3.12." +msgstr "" + +#: c-api/unicode.rst:441 +msgid "" +"Create a Unicode object from a UTF-8 encoded null-terminated char buffer *u*." +msgstr "" + +#: c-api/unicode.rst:447 +msgid "" +"Take a C :c:func:`printf`\\ -style *format* string and a variable number of " +"arguments, calculate the size of the resulting Python Unicode string and " +"return a string with the values formatted into it. The variable arguments " +"must be C types and must correspond exactly to the format characters in the " +"*format* ASCII-encoded string. The following format characters are allowed:" +msgstr "" + +#: c-api/unicode.rst:462 +msgid "Format Characters" +msgstr "Caractères de format" + +#: c-api/unicode.rst:462 +msgid "Type" +msgstr "Type" + +#: c-api/unicode.rst:462 +#, fuzzy +msgid "Comment" +msgstr "Commentaires" + +#: c-api/unicode.rst:464 +msgid ":attr:`%%`" +msgstr ":attr:`%%`" + +#: c-api/unicode.rst:464 +msgid "*n/a*" +msgstr "" + +#: c-api/unicode.rst:464 +msgid "The literal % character." +msgstr "" + +#: c-api/unicode.rst:466 +msgid ":attr:`%c`" +msgstr ":attr:`%c`" + +#: c-api/unicode.rst:469 c-api/unicode.rst:505 +msgid "int" +msgstr "*int*" + +#: c-api/unicode.rst:466 +msgid "A single character, represented as a C int." +msgstr "" + +#: c-api/unicode.rst:469 +msgid ":attr:`%d`" +msgstr ":attr:`%d`" + +#: c-api/unicode.rst:469 +msgid "Equivalent to ``printf(\"%d\")``. [1]_" +msgstr "" + +#: c-api/unicode.rst:472 +msgid ":attr:`%u`" +msgstr ":attr:`%u`" + +#: c-api/unicode.rst:472 +msgid "unsigned int" +msgstr "``unsigned int``" + +#: c-api/unicode.rst:472 +msgid "Equivalent to ``printf(\"%u\")``. [1]_" +msgstr "" + +#: c-api/unicode.rst:475 +msgid ":attr:`%ld`" +msgstr ":attr:`%ld`" + +#: c-api/unicode.rst:478 +msgid "long" +msgstr "" + +#: c-api/unicode.rst:475 +msgid "Equivalent to ``printf(\"%ld\")``. [1]_" +msgstr "" + +#: c-api/unicode.rst:478 +msgid ":attr:`%li`" +msgstr ":attr:`%li`" + +#: c-api/unicode.rst:478 +msgid "Equivalent to ``printf(\"%li\")``. [1]_" +msgstr "" + +#: c-api/unicode.rst:481 +msgid ":attr:`%lu`" +msgstr ":attr:`%lu`" + +#: c-api/unicode.rst:481 +msgid "unsigned long" +msgstr "``unsigned long``" + +#: c-api/unicode.rst:481 +msgid "Equivalent to ``printf(\"%lu\")``. [1]_" +msgstr "" + +#: c-api/unicode.rst:484 +msgid ":attr:`%lld`" +msgstr ":attr:`%lld`" + +#: c-api/unicode.rst:487 +msgid "long long" +msgstr "" + +#: c-api/unicode.rst:484 +msgid "Equivalent to ``printf(\"%lld\")``. [1]_" +msgstr "" + +#: c-api/unicode.rst:487 +msgid ":attr:`%lli`" +msgstr ":attr:`%lli`" + +#: c-api/unicode.rst:487 +msgid "Equivalent to ``printf(\"%lli\")``. [1]_" +msgstr "" + +#: c-api/unicode.rst:490 +msgid ":attr:`%llu`" +msgstr ":attr:`%llu`" + +#: c-api/unicode.rst:490 +msgid "unsigned long long" +msgstr "``unsigned long long``" + +#: c-api/unicode.rst:490 +msgid "Equivalent to ``printf(\"%llu\")``. [1]_" +msgstr "" + +#: c-api/unicode.rst:493 +msgid ":attr:`%zd`" +msgstr ":attr:`%zd`" + +#: c-api/unicode.rst:496 +msgid ":c:type:`\\ Py_ssize_t`" +msgstr "" + +#: c-api/unicode.rst:493 +msgid "Equivalent to ``printf(\"%zd\")``. [1]_" +msgstr "" + +#: c-api/unicode.rst:496 +msgid ":attr:`%zi`" +msgstr ":attr:`%zi`" + +#: c-api/unicode.rst:496 +msgid "Equivalent to ``printf(\"%zi\")``. [1]_" +msgstr "" + +#: c-api/unicode.rst:499 +msgid ":attr:`%zu`" +msgstr ":attr:`%zu`" + +#: c-api/unicode.rst:499 +msgid "size_t" +msgstr "" + +#: c-api/unicode.rst:499 +msgid "Equivalent to ``printf(\"%zu\")``. [1]_" +msgstr "" + +#: c-api/unicode.rst:502 +msgid ":attr:`%i`" +msgstr ":attr:`%i`" + +#: c-api/unicode.rst:502 +msgid "Equivalent to ``printf(\"%i\")``. [1]_" +msgstr "" + +#: c-api/unicode.rst:505 +msgid ":attr:`%x`" +msgstr ":attr:`%x`" + +#: c-api/unicode.rst:505 +msgid "Equivalent to ``printf(\"%x\")``. [1]_" +msgstr "" + +#: c-api/unicode.rst:508 +msgid ":attr:`%s`" +msgstr ":attr:`%s`" + +#: c-api/unicode.rst:508 +msgid "const char\\*" +msgstr "" + +#: c-api/unicode.rst:508 +msgid "A null-terminated C character array." +msgstr "" + +#: c-api/unicode.rst:511 +msgid ":attr:`%p`" +msgstr ":attr:`%p`" + +#: c-api/unicode.rst:511 +msgid "const void\\*" +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." +msgstr "" + +#: c-api/unicode.rst:519 +msgid ":attr:`%A`" +msgstr ":attr:`%A`" + +#: c-api/unicode.rst:522 c-api/unicode.rst:534 +msgid "PyObject\\*" +msgstr "PyObject\\*" + +#: c-api/unicode.rst:519 +msgid "The result of calling :func:`ascii`." +msgstr "" + +#: c-api/unicode.rst:522 +msgid ":attr:`%U`" +msgstr ":attr:`%U`" + +#: c-api/unicode.rst:522 +#, fuzzy +msgid "A Unicode object." +msgstr "Un objet Unicode." + +#: c-api/unicode.rst:524 +msgid ":attr:`%V`" +msgstr ":attr:`%V`" + +#: c-api/unicode.rst:524 +msgid "PyObject\\*, const char\\*" +msgstr "" + +#: c-api/unicode.rst:524 +msgid "" +"A Unicode object (which may be ``NULL``) and a null-terminated C character " +"array as a second parameter (which will be used, if the first parameter is " +"``NULL``)." +msgstr "" + +#: c-api/unicode.rst:531 +msgid ":attr:`%S`" +msgstr ":attr:`%S`" + +#: c-api/unicode.rst:531 +msgid "The result of calling :c:func:`PyObject_Str`." +msgstr "" + +#: c-api/unicode.rst:534 +msgid ":attr:`%R`" +msgstr ":attr:`%R`" + +#: c-api/unicode.rst:534 +msgid "The result of calling :c:func:`PyObject_Repr`." +msgstr "" + +#: c-api/unicode.rst:538 +msgid "" +"An unrecognized format character causes all the rest of the format string to " +"be copied as-is to the result string, and any extra arguments discarded." +msgstr "" + +#: c-api/unicode.rst:542 +msgid "" +"The width formatter unit is number of characters rather than bytes. The " +"precision formatter unit is number of bytes for ``\"%s\"`` and ``\"%V\"`` " +"(if the ``PyObject*`` argument is ``NULL``), and a number of characters for " +"``\"%A\"``, ``\"%U\"``, ``\"%S\"``, ``\"%R\"`` and ``\"%V\"`` (if the " +"``PyObject*`` argument is not ``NULL``)." +msgstr "" + +#: c-api/unicode.rst:548 +msgid "" +"For integer specifiers (d, u, ld, li, lu, lld, lli, llu, zd, zi, zu, i, x): " +"the 0-conversion flag has effect even when a precision is given." +msgstr "" + +#: c-api/unicode.rst:551 +msgid "Support for ``\"%lld\"`` and ``\"%llu\"`` added." +msgstr "" + +#: c-api/unicode.rst:554 +msgid "Support for ``\"%li\"``, ``\"%lli\"`` and ``\"%zi\"`` added." +msgstr "" + +#: c-api/unicode.rst:557 +msgid "" +"Support width and precision formatter for ``\"%s\"``, ``\"%A\"``, " +"``\"%U\"``, ``\"%V\"``, ``\"%S\"``, ``\"%R\"`` added." +msgstr "" + +#: c-api/unicode.rst:564 +msgid "" +"Identical to :c:func:`PyUnicode_FromFormat` except that it takes exactly two " +"arguments." +msgstr "" + +#: c-api/unicode.rst:571 +msgid "Decode an encoded object *obj* to a Unicode object." +msgstr "" + +#: c-api/unicode.rst:573 +msgid "" +":class:`bytes`, :class:`bytearray` and other :term:`bytes-like objects " +"` are decoded according to the given *encoding* and using " +"the error handling defined by *errors*. Both can be ``NULL`` to have the " +"interface use the default values (see :ref:`builtincodecs` for details)." +msgstr "" + +#: c-api/unicode.rst:579 +msgid "" +"All other objects, including Unicode objects, cause a :exc:`TypeError` to be " +"set." +msgstr "" + +#: c-api/unicode.rst:582 +msgid "" +"The API returns ``NULL`` if there was an error. The caller is responsible " +"for decref'ing the returned objects." +msgstr "" + +#: c-api/unicode.rst:588 +msgid "Return the length of the Unicode object, in code points." +msgstr "" + +#: c-api/unicode.rst:599 +msgid "" +"Copy characters from one Unicode object into another. This function " +"performs character conversion when necessary and falls back to :c:func:" +"`memcpy` if possible. Returns ``-1`` and sets an exception on error, " +"otherwise returns the number of copied characters." +msgstr "" + +#: c-api/unicode.rst:610 +msgid "" +"Fill a string with a character: write *fill_char* into ``unicode[start:" +"start+length]``." +msgstr "" + +#: c-api/unicode.rst:613 +msgid "" +"Fail if *fill_char* is bigger than the string maximum character, or if the " +"string has more than 1 reference." +msgstr "" + +#: c-api/unicode.rst:616 +msgid "" +"Return the number of written character, or return ``-1`` and raise an " +"exception on error." +msgstr "" + +#: c-api/unicode.rst:625 +msgid "" +"Write a character to a string. The string must have been created through :c:" +"func:`PyUnicode_New`. Since Unicode strings are supposed to be immutable, " +"the string must not be shared, or have been hashed yet." +msgstr "" + +#: c-api/unicode.rst:629 +msgid "" +"This function checks that *unicode* is a Unicode object, that the index is " +"not out of bounds, and that the object can be modified safely (i.e. that it " +"its reference count is one)." +msgstr "" + +#: c-api/unicode.rst:638 +msgid "" +"Read a character from a string. This function checks that *unicode* is a " +"Unicode object and the index is not out of bounds, in contrast to the macro " +"version :c:func:`PyUnicode_READ_CHAR`." +msgstr "" + +#: c-api/unicode.rst:648 +msgid "" +"Return a substring of *str*, from character index *start* (included) to " +"character index *end* (excluded). Negative indices are not supported." +msgstr "" + +#: c-api/unicode.rst:657 +msgid "" +"Copy the string *u* into a UCS4 buffer, including a null character, if " +"*copy_null* is set. Returns ``NULL`` and sets an exception on error (in " +"particular, a :exc:`SystemError` if *buflen* is smaller than the length of " +"*u*). *buffer* is returned on success." +msgstr "" + +#: c-api/unicode.rst:667 +msgid "" +"Copy the string *u* into a new UCS4 buffer that is allocated using :c:func:" +"`PyMem_Malloc`. If this fails, ``NULL`` is returned with a :exc:" +"`MemoryError` set. The returned buffer always has an extra null code point " +"appended." +msgstr "" + +#: c-api/unicode.rst:676 +msgid "Deprecated Py_UNICODE APIs" +msgstr "" + +#: c-api/unicode.rst:680 +msgid "" +"These API functions are deprecated with the implementation of :pep:`393`. " +"Extension modules can continue using them, as they will not be removed in " +"Python 3.x, but need to be aware that their use can now cause performance " +"and memory hits." +msgstr "" + +#: c-api/unicode.rst:687 +msgid "" +"Create a Unicode object from the Py_UNICODE buffer *u* of the given size. " +"*u* may be ``NULL`` which causes the contents to be undefined. It is the " +"user's responsibility to fill in the needed data. The buffer is copied into " +"the new object." +msgstr "" + +#: c-api/unicode.rst:692 +msgid "" +"If the buffer is not ``NULL``, the return value might be a shared object. " +"Therefore, modification of the resulting Unicode object is only allowed when " +"*u* is ``NULL``." +msgstr "" + +#: c-api/unicode.rst:696 +msgid "" +"If the buffer is ``NULL``, :c:func:`PyUnicode_READY` must be called once the " +"string content has been filled before using any of the access macros such " +"as :c:func:`PyUnicode_KIND`." +msgstr "" + +#: c-api/unicode.rst:703 +msgid "" +"Part of the old-style Unicode API, please migrate to using :c:func:" +"`PyUnicode_FromKindAndData`, :c:func:`PyUnicode_FromWideChar`, or :c:func:" +"`PyUnicode_New`." +msgstr "" + +#: c-api/unicode.rst:708 +msgid "" +"Return a read-only pointer to the Unicode object's internal :c:type:" +"`Py_UNICODE` buffer, or ``NULL`` on error. This will create the :c:expr:" +"`Py_UNICODE*` representation of the object if it is not yet available. The " +"buffer is always terminated with an extra null code point. Note that the " +"resulting :c:type:`Py_UNICODE` string may also contain embedded null code " +"points, which would cause the string to be truncated when used in most C " +"functions." +msgstr "" + +#: c-api/unicode.rst:746 +msgid "" +"Part of the old-style Unicode API, please migrate to using :c:func:" +"`PyUnicode_AsUCS4`, :c:func:`PyUnicode_AsWideChar`, :c:func:" +"`PyUnicode_ReadChar` or similar new APIs." +msgstr "" + +#: c-api/unicode.rst:724 +msgid "" +"Create a Unicode object by replacing all decimal digits in :c:type:" +"`Py_UNICODE` buffer of the given *size* by ASCII digits 0--9 according to " +"their decimal value. Return ``NULL`` if an exception occurs." +msgstr "" + +#: c-api/unicode.rst:730 +msgid "" +"Part of the old-style :c:type:`Py_UNICODE` API; please migrate to using :c:" +"func:`Py_UNICODE_TODECIMAL`." +msgstr "" + +#: c-api/unicode.rst:735 +msgid "" +"Like :c:func:`PyUnicode_AsUnicode`, but also saves the :c:func:`Py_UNICODE` " +"array length (excluding the extra null terminator) in *size*. Note that the " +"resulting :c:expr:`Py_UNICODE*` string may contain embedded null code " +"points, which would cause the string to be truncated when used in most C " +"functions." +msgstr "" + +#: c-api/unicode.rst:751 +msgid "" +"Return the size of the deprecated :c:type:`Py_UNICODE` representation, in " +"code units (this includes surrogate pairs as 2 units)." +msgstr "" + +#: c-api/unicode.rst:761 +msgid "" +"Copy an instance of a Unicode subtype to a new true Unicode object if " +"necessary. If *obj* is already a true Unicode object (not a subtype), return " +"the reference with incremented refcount." +msgstr "" + +#: c-api/unicode.rst:765 +msgid "" +"Objects other than Unicode or its subtypes will cause a :exc:`TypeError`." +msgstr "" + +#: c-api/unicode.rst:769 +msgid "Locale Encoding" +msgstr "" + +#: c-api/unicode.rst:771 +msgid "" +"The current locale encoding can be used to decode text from the operating " +"system." +msgstr "" + +#: c-api/unicode.rst:778 +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 " +"null character but cannot contain embedded null characters." +msgstr "" + +#: c-api/unicode.rst:785 +msgid "" +"Use :c:func:`PyUnicode_DecodeFSDefaultAndSize` to decode a string from :c:" +"data:`Py_FileSystemDefaultEncoding` (the locale encoding read at Python " +"startup)." +msgstr "" + +#: c-api/unicode.rst:825 +msgid "This function ignores the :ref:`Python UTF-8 Mode `." +msgstr "" + +#: c-api/unicode.rst:896 +msgid "The :c:func:`Py_DecodeLocale` function." +msgstr "" + +#: c-api/unicode.rst:797 +msgid "" +"The function now also uses the current locale encoding for the " +"``surrogateescape`` error handler, except on Android. Previously, :c:func:" +"`Py_DecodeLocale` was used for the ``surrogateescape``, and the current " +"locale encoding was used for ``strict``." +msgstr "" + +#: c-api/unicode.rst:806 +msgid "" +"Similar to :c:func:`PyUnicode_DecodeLocaleAndSize`, but compute the string " +"length using :c:func:`strlen`." +msgstr "" + +#: c-api/unicode.rst:814 +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." +msgstr "" + +#: c-api/unicode.rst:821 +msgid "" +"Use :c:func:`PyUnicode_EncodeFSDefault` to encode a string to :c:data:" +"`Py_FileSystemDefaultEncoding` (the locale encoding read at Python startup)." +msgstr "" + +#: c-api/unicode.rst:932 +msgid "The :c:func:`Py_EncodeLocale` function." +msgstr "" + +#: c-api/unicode.rst:833 +msgid "" +"The function now also uses the current locale encoding for the " +"``surrogateescape`` error handler, except on Android. Previously, :c:func:" +"`Py_EncodeLocale` was used for the ``surrogateescape``, and the current " +"locale encoding was used for ``strict``." +msgstr "" + +#: c-api/unicode.rst:842 +msgid "File System Encoding" +msgstr "" + +#: c-api/unicode.rst:844 +msgid "" +"To encode and decode file names and other environment strings, :c:data:" +"`Py_FileSystemDefaultEncoding` should be used as the encoding, and :c:data:" +"`Py_FileSystemDefaultEncodeErrors` should be used as the error handler (:pep:" +"`383` and :pep:`529`). To encode file names to :class:`bytes` during " +"argument parsing, the ``\"O&\"`` converter should be used, passing :c:func:" +"`PyUnicode_FSConverter` as the conversion function:" +msgstr "" + +#: c-api/unicode.rst:853 +msgid "" +"ParseTuple converter: encode :class:`str` objects -- obtained directly or " +"through the :class:`os.PathLike` interface -- to :class:`bytes` using :c:" +"func:`PyUnicode_EncodeFSDefault`; :class:`bytes` objects are output as-is. " +"*result* must be a :c:expr:`PyBytesObject*` which must be released when it " +"is no longer used." +msgstr "" + +#: c-api/unicode.rst:878 +msgid "Accepts a :term:`path-like object`." +msgstr "Accepte un :term:`path-like object`." + +#: c-api/unicode.rst:864 +msgid "" +"To decode file names to :class:`str` during argument parsing, the ``\"O&\"`` " +"converter should be used, passing :c:func:`PyUnicode_FSDecoder` as the " +"conversion function:" +msgstr "" + +#: c-api/unicode.rst:870 +msgid "" +"ParseTuple converter: decode :class:`bytes` objects -- obtained either " +"directly or indirectly through the :class:`os.PathLike` interface -- to :" +"class:`str` using :c:func:`PyUnicode_DecodeFSDefaultAndSize`; :class:`str` " +"objects are output as-is. *result* must be a :c:expr:`PyUnicodeObject*` " +"which must be released when it is no longer used." +msgstr "" + +#: c-api/unicode.rst:884 +msgid "Decode a string from the :term:`filesystem encoding and error handler`." +msgstr "" + +#: c-api/unicode.rst:907 c-api/unicode.rst:923 +msgid "" +"If :c:data:`Py_FileSystemDefaultEncoding` is not set, fall back to the " +"locale encoding." +msgstr "" + +#: c-api/unicode.rst:889 +msgid "" +":c:data:`Py_FileSystemDefaultEncoding` is initialized at startup from the " +"locale encoding and cannot be modified later. If you need to decode a string " +"from the current locale encoding, use :c:func:" +"`PyUnicode_DecodeLocaleAndSize`." +msgstr "" + +#: c-api/unicode.rst:912 c-api/unicode.rst:936 +msgid "Use :c:data:`Py_FileSystemDefaultEncodeErrors` error handler." +msgstr "" + +#: c-api/unicode.rst:904 +msgid "" +"Decode a null-terminated string from the :term:`filesystem encoding and " +"error handler`." +msgstr "" + +#: c-api/unicode.rst:910 +msgid "" +"Use :c:func:`PyUnicode_DecodeFSDefaultAndSize` if you know the string length." +msgstr "" + +#: c-api/unicode.rst:918 +msgid "" +"Encode a Unicode object to :c:data:`Py_FileSystemDefaultEncoding` with the :" +"c:data:`Py_FileSystemDefaultEncodeErrors` error handler, and return :class:" +"`bytes`. Note that the resulting :class:`bytes` object may contain null " +"bytes." +msgstr "" + +#: c-api/unicode.rst:926 +msgid "" +":c:data:`Py_FileSystemDefaultEncoding` is initialized at startup from the " +"locale encoding and cannot be modified later. If you need to encode a string " +"to the current locale encoding, use :c:func:`PyUnicode_EncodeLocale`." +msgstr "" + +#: c-api/unicode.rst:940 +msgid "wchar_t Support" +msgstr "" + +#: c-api/unicode.rst:942 +msgid ":c:expr:`wchar_t` support for platforms which support it:" +msgstr "" + +#: c-api/unicode.rst:946 +msgid "" +"Create a Unicode object from the :c:expr:`wchar_t` buffer *w* of the given " +"*size*. Passing ``-1`` as the *size* indicates that the function must itself " +"compute the length, using wcslen. Return ``NULL`` on failure." +msgstr "" + +#: c-api/unicode.rst:954 +msgid "" +"Copy the Unicode object contents into the :c:expr:`wchar_t` buffer *w*. At " +"most *size* :c:expr:`wchar_t` characters are copied (excluding a possibly " +"trailing null termination character). Return the number of :c:expr:" +"`wchar_t` characters copied or ``-1`` in case of an error. Note that the " +"resulting :c:expr:`wchar_t*` string may or may not be null-terminated. It " +"is the responsibility of the caller to make sure that the :c:expr:`wchar_t*` " +"string is null-terminated in case this is required by the application. Also, " +"note that the :c:expr:`wchar_t*` string might contain null characters, which " +"would cause the string to be truncated when used with most C functions." +msgstr "" + +#: c-api/unicode.rst:967 +msgid "" +"Convert the Unicode object to a wide character string. The output string " +"always ends with a null character. If *size* is not ``NULL``, write the " +"number of wide characters (excluding the trailing null termination " +"character) into *\\*size*. Note that the resulting :c:expr:`wchar_t` string " +"might contain null characters, which would cause the string to be truncated " +"when used with most C functions. If *size* is ``NULL`` and the :c:expr:" +"`wchar_t*` string contains null characters a :exc:`ValueError` is raised." +msgstr "" + +#: c-api/unicode.rst:975 +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 " +"failed." +msgstr "" + +#: c-api/unicode.rst:982 +msgid "" +"Raises a :exc:`ValueError` if *size* is ``NULL`` and the :c:expr:`wchar_t*` " +"string contains null characters." +msgstr "" + +#: c-api/unicode.rst:990 +msgid "Built-in Codecs" +msgstr "" + +#: c-api/unicode.rst:992 +msgid "" +"Python provides a set of built-in codecs which are written in C for speed. " +"All of these codecs are directly usable via the following functions." +msgstr "" + +#: c-api/unicode.rst:995 +msgid "" +"Many of the following APIs take two arguments encoding and errors, and they " +"have the same semantics as the ones of the built-in :func:`str` string " +"object constructor." +msgstr "" + +#: c-api/unicode.rst:999 +msgid "" +"Setting encoding to ``NULL`` causes the default encoding to be used which is " +"UTF-8. The file system calls should use :c:func:`PyUnicode_FSConverter` for " +"encoding file names. This uses the variable :c:data:" +"`Py_FileSystemDefaultEncoding` internally. This variable should be treated " +"as read-only: on some systems, it will be a pointer to a static string, on " +"others, it will change at run-time (such as when the application invokes " +"setlocale)." +msgstr "" + +#: c-api/unicode.rst:1007 +msgid "" +"Error handling is set by errors which may also be set to ``NULL`` meaning to " +"use the default handling defined for the codec. Default error handling for " +"all built-in codecs is \"strict\" (:exc:`ValueError` is raised)." +msgstr "" + +#: c-api/unicode.rst:1011 +msgid "" +"The codecs all use a similar interface. Only deviations from the following " +"generic ones are documented for simplicity." +msgstr "" + +#: c-api/unicode.rst:1016 +msgid "Generic Codecs" +msgstr "" + +#: c-api/unicode.rst:1018 +msgid "These are the generic codec APIs:" +msgstr "" + +#: c-api/unicode.rst:1024 +msgid "" +"Create a Unicode object by decoding *size* bytes of the encoded string *s*. " +"*encoding* and *errors* have the same meaning as the parameters of the same " +"name in the :func:`str` built-in function. The codec to be used is looked " +"up using the Python codec registry. Return ``NULL`` if an exception was " +"raised by the codec." +msgstr "" + +#: c-api/unicode.rst:1034 +msgid "" +"Encode a Unicode object and return the result as Python bytes object. " +"*encoding* and *errors* have the same meaning as the parameters of the same " +"name in the Unicode :meth:`~str.encode` method. The codec to be used is " +"looked up using the Python codec registry. Return ``NULL`` if an exception " +"was raised by the codec." +msgstr "" + +#: c-api/unicode.rst:1044 +msgid "" +"Encode the :c:type:`Py_UNICODE` buffer *s* of the given *size* and return a " +"Python bytes object. *encoding* and *errors* have the same meaning as the " +"parameters of the same name in the Unicode :meth:`~str.encode` method. The " +"codec to be used is looked up using the Python codec registry. Return " +"``NULL`` if an exception was raised by the codec." +msgstr "" + +#: c-api/unicode.rst:1313 +msgid "" +"Part of the old-style :c:type:`Py_UNICODE` API; please migrate to using :c:" +"func:`PyUnicode_AsEncodedString`." +msgstr "" + +#: c-api/unicode.rst:1056 +msgid "UTF-8 Codecs" +msgstr "" + +#: c-api/unicode.rst:1058 +msgid "These are the UTF-8 codec APIs:" +msgstr "" + +#: c-api/unicode.rst:1063 +msgid "" +"Create a Unicode object by decoding *size* bytes of the UTF-8 encoded string " +"*s*. Return ``NULL`` if an exception was raised by the codec." +msgstr "" + +#: c-api/unicode.rst:1070 +msgid "" +"If *consumed* is ``NULL``, behave like :c:func:`PyUnicode_DecodeUTF8`. If " +"*consumed* is not ``NULL``, trailing incomplete UTF-8 byte sequences will " +"not be treated as an error. Those bytes will not be decoded and the number " +"of bytes that have been decoded will be stored in *consumed*." +msgstr "" + +#: c-api/unicode.rst:1078 +msgid "" +"Encode a Unicode object using UTF-8 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:1085 +msgid "" +"Return a pointer to the UTF-8 encoding of the Unicode object, and store the " +"size of the encoded representation (in bytes) in *size*. The *size* " +"argument can be ``NULL``; in this case no size will be stored. The returned " +"buffer always has an extra null byte appended (not included in *size*), " +"regardless of whether there are any other null code points." +msgstr "" + +#: c-api/unicode.rst:1091 +msgid "" +"In the case of an error, ``NULL`` is returned with an exception set and no " +"*size* is stored." +msgstr "" + +#: c-api/unicode.rst:1094 +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. The buffer is deallocated " +"and pointers to it become invalid when the Unicode object is garbage " +"collected." +msgstr "" + +#: c-api/unicode.rst:1114 +msgid "The return type is now ``const char *`` rather of ``char *``." +msgstr "" + +#: c-api/unicode.rst:1104 +msgid "This function is a part of the :ref:`limited API `." +msgstr "" + +#: c-api/unicode.rst:1110 +msgid "As :c:func:`PyUnicode_AsUTF8AndSize`, but does not store the size." +msgstr "" + +#: c-api/unicode.rst:1120 +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:1127 +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:1131 +msgid "UTF-32 Codecs" +msgstr "" + +#: c-api/unicode.rst:1133 +msgid "These are the UTF-32 codec APIs:" +msgstr "" + +#: c-api/unicode.rst:1139 +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:1216 +msgid "" +"If *byteorder* is non-``NULL``, the decoder starts decoding using the given " +"byte order::" +msgstr "" + +#: c-api/unicode.rst:1150 +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 " +"is not copied into the resulting Unicode string. If ``*byteorder`` is " +"``-1`` or ``1``, any byte order mark is copied to the output." +msgstr "" + +#: c-api/unicode.rst:1155 +msgid "" +"After completion, *\\*byteorder* is set to the current byte order at the end " +"of input data." +msgstr "" + +#: c-api/unicode.rst:1232 +msgid "If *byteorder* is ``NULL``, the codec starts in native order mode." +msgstr "" + +#: c-api/unicode.rst:1196 c-api/unicode.rst:1271 +msgid "Return ``NULL`` if an exception was raised by the codec." +msgstr "" + +#: c-api/unicode.rst:1166 +msgid "" +"If *consumed* is ``NULL``, behave like :c:func:`PyUnicode_DecodeUTF32`. If " +"*consumed* is not ``NULL``, :c:func:`PyUnicode_DecodeUTF32Stateful` will not " +"treat trailing incomplete UTF-32 byte sequences (such as a number of bytes " +"not divisible by four) as an error. Those bytes will not be decoded and the " +"number of bytes that have been decoded will be stored in *consumed*." +msgstr "" + +#: c-api/unicode.rst:1175 +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:1183 +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:1264 +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:1193 +msgid "" +"If ``Py_UNICODE_WIDE`` is not defined, surrogate pairs will be output as a " +"single code point." +msgstr "" + +#: c-api/unicode.rst:1200 +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:1204 +msgid "UTF-16 Codecs" +msgstr "" + +#: c-api/unicode.rst:1206 +msgid "These are the UTF-16 codec APIs:" +msgstr "" + +#: c-api/unicode.rst:1212 +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:1223 +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 " +"is not copied into the resulting Unicode string. If ``*byteorder`` is " +"``-1`` or ``1``, any byte order mark is copied to the output (where it will " +"result in either a ``\\ufeff`` or a ``\\ufffe`` character)." +msgstr "" + +#: c-api/unicode.rst:1229 +msgid "" +"After completion, ``*byteorder`` is set to the current byte order at the end " +"of input data." +msgstr "" + +#: c-api/unicode.rst:1240 +msgid "" +"If *consumed* is ``NULL``, behave like :c:func:`PyUnicode_DecodeUTF16`. If " +"*consumed* is not ``NULL``, :c:func:`PyUnicode_DecodeUTF16Stateful` will not " +"treat trailing incomplete UTF-16 byte sequences (such as an odd number of " +"bytes or a split surrogate pair) as an error. Those bytes will not be " +"decoded and the number of bytes that have been decoded will be stored in " +"*consumed*." +msgstr "" + +#: c-api/unicode.rst:1249 +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:1257 +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:1267 +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:1275 +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:1279 +msgid "UTF-7 Codecs" +msgstr "" + +#: c-api/unicode.rst:1281 +msgid "These are the UTF-7 codec APIs:" +msgstr "" + +#: c-api/unicode.rst:1286 +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:1293 +msgid "" +"If *consumed* is ``NULL``, behave like :c:func:`PyUnicode_DecodeUTF7`. If " +"*consumed* is not ``NULL``, trailing incomplete UTF-7 base-64 sections will " +"not be treated as an error. Those bytes will not be decoded and the number " +"of bytes that have been decoded will be stored in *consumed*." +msgstr "" + +#: c-api/unicode.rst:1302 +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:1306 +msgid "" +"If *base64SetO* is nonzero, \"Set O\" (punctuation that has no otherwise " +"special meaning) will be encoded in base-64. If *base64WhiteSpace* is " +"nonzero, whitespace will be encoded in base-64. Both are set to zero for " +"the Python \"utf-7\" codec." +msgstr "" + +#: c-api/unicode.rst:1317 +msgid "Unicode-Escape Codecs" +msgstr "" + +#: c-api/unicode.rst:1319 +msgid "These are the \"Unicode Escape\" codec APIs:" +msgstr "" + +#: c-api/unicode.rst:1325 +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:1331 +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:1338 +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:1343 +msgid "" +"Part of the old-style :c:type:`Py_UNICODE` API; please migrate to using :c:" +"func:`PyUnicode_AsUnicodeEscapeString`." +msgstr "" + +#: c-api/unicode.rst:1347 +msgid "Raw-Unicode-Escape Codecs" +msgstr "" + +#: c-api/unicode.rst:1349 +msgid "These are the \"Raw Unicode Escape\" codec APIs:" +msgstr "" + +#: c-api/unicode.rst:1355 +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:1361 +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:1369 +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:1375 +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:1379 +msgid "Latin-1 Codecs" +msgstr "" + +#: c-api/unicode.rst:1381 +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:1387 +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:1393 +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:1400 +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:1407 +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:1411 +msgid "ASCII Codecs" +msgstr "" + +#: c-api/unicode.rst:1413 +msgid "" +"These are the ASCII codec APIs. Only 7-bit ASCII data is accepted. All " +"other codes generate errors." +msgstr "" + +#: c-api/unicode.rst:1419 +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:1425 +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:1432 +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:1439 +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:1443 +msgid "Character Map Codecs" +msgstr "" + +#: c-api/unicode.rst:1445 +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 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:1451 +msgid "These are the mapping codec APIs:" +msgstr "" + +#: c-api/unicode.rst:1456 +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:1460 +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 " +"strings, integers (which are then interpreted as Unicode ordinals) or " +"``None``. Unmapped data bytes -- ones which cause a :exc:`LookupError`, as " +"well as ones which get mapped to ``None``, ``0xFFFE`` or ``'\\ufffe'``, are " +"treated as undefined mappings and cause an error." +msgstr "" + +#: c-api/unicode.rst:1471 +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:1475 +msgid "" +"The *mapping* object must map Unicode ordinal integers to bytes objects, " +"integers in the range from 0 to 255 or ``None``. Unmapped character " +"ordinals (ones which cause a :exc:`LookupError`) as well as mapped to " +"``None`` are treated as \"undefined mapping\" and cause an error." +msgstr "" + +#: c-api/unicode.rst:1484 +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:1491 +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:1494 +msgid "The following codec API is special in that maps Unicode to Unicode." +msgstr "" + +#: c-api/unicode.rst:1498 +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:1502 +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:1505 +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:1509 +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:1516 +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:1523 +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:1527 +msgid "MBCS codecs for Windows" +msgstr "" + +#: c-api/unicode.rst:1529 +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 " +"MBCS (or DBCS) is a class of encodings, not just one. The target encoding " +"is defined by the user settings on the machine running the codec." +msgstr "" + +#: c-api/unicode.rst:1536 +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:1543 +msgid "" +"If *consumed* is ``NULL``, behave like :c:func:`PyUnicode_DecodeMBCS`. If " +"*consumed* is not ``NULL``, :c:func:`PyUnicode_DecodeMBCSStateful` will not " +"decode trailing lead byte and the number of bytes that have been decoded " +"will be stored in *consumed*." +msgstr "" + +#: c-api/unicode.rst:1551 +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:1558 +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:1567 +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:1574 +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:1578 +msgid "Methods & Slots" +msgstr "" + +#: c-api/unicode.rst:1584 +msgid "Methods and Slot Functions" +msgstr "" + +#: c-api/unicode.rst:1586 +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:1590 +msgid "They all return ``NULL`` or ``-1`` if an exception occurs." +msgstr "" + +#: c-api/unicode.rst:1595 +msgid "Concat two strings giving a new Unicode string." +msgstr "" + +#: c-api/unicode.rst:1600 +msgid "" +"Split a string giving a list of Unicode strings. If *sep* is ``NULL``, " +"splitting will be done at all whitespace substrings. Otherwise, splits " +"occur at the given separator. At most *maxsplit* splits will be done. If " +"negative, no limit is set. Separators are not included in the resulting " +"list." +msgstr "" + +#: c-api/unicode.rst:1608 +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 " +"break characters are not included in the resulting strings." +msgstr "" + +#: c-api/unicode.rst:1615 +msgid "" +"Join a sequence of strings using the given *separator* and return the " +"resulting Unicode string." +msgstr "" + +#: c-api/unicode.rst:1622 +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:1630 +msgid "" +"Return the first position of *substr* in ``str[start:end]`` using the given " +"*direction* (*direction* == ``1`` means to do a forward search, *direction* " +"== ``-1`` a backward search). The return value is the index of the first " +"match; a value of ``-1`` indicates that no match was found, and ``-2`` " +"indicates that an error occurred and an exception has been set." +msgstr "" + +#: c-api/unicode.rst:1640 +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, " +"*direction* == ``-1`` a backward search). The return value is the index of " +"the first match; a value of ``-1`` indicates that no match was found, and " +"``-2`` indicates that an error occurred and an exception has been set." +msgstr "" + +#: c-api/unicode.rst:1648 +msgid "*start* and *end* are now adjusted to behave like ``str[start:end]``." +msgstr "" + +#: c-api/unicode.rst:1655 +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:1662 +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:1669 +msgid "" +"Compare two strings and return ``-1``, ``0``, ``1`` for less than, equal, " +"and greater than, respectively." +msgstr "" + +#: c-api/unicode.rst:1672 +msgid "" +"This function returns ``-1`` upon failure, so one should call :c:func:" +"`PyErr_Occurred` to check for errors." +msgstr "" + +#: c-api/unicode.rst:1678 +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 " +"pass only ASCII-encoded strings, but the function interprets the input " +"string as ISO-8859-1 if it contains non-ASCII characters." +msgstr "" + +#: c-api/unicode.rst:1683 +msgid "This function does not raise exceptions." +msgstr "" + +#: c-api/unicode.rst:1688 +msgid "Rich compare two Unicode strings and return one of the following:" +msgstr "" + +#: c-api/unicode.rst:1690 +msgid "``NULL`` in case an exception was raised" +msgstr "" + +#: c-api/unicode.rst:1691 +msgid ":const:`Py_True` or :const:`Py_False` for successful comparisons" +msgstr "" + +#: c-api/unicode.rst:1692 +msgid ":const:`Py_NotImplemented` in case the type combination is unknown" +msgstr "" + +#: c-api/unicode.rst:1694 +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:1700 +msgid "" +"Return a new string object from *format* and *args*; this is analogous to " +"``format % args``." +msgstr "" + +#: c-api/unicode.rst:1706 +msgid "" +"Check whether *element* is contained in *container* and return true or false " +"accordingly." +msgstr "" + +#: c-api/unicode.rst:1709 +msgid "" +"*element* has to coerce to a one element Unicode string. ``-1`` is returned " +"if there was an error." +msgstr "" + +#: c-api/unicode.rst:1715 +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 " +"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 " +"reference counts, think of this function as reference-count-neutral; you own " +"the object after the call if and only if you owned it before the call.)" +msgstr "" + +#: c-api/unicode.rst:1728 +msgid "" +"A combination of :c:func:`PyUnicode_FromString` and :c:func:" +"`PyUnicode_InternInPlace`, returning either a new Unicode string object that " +"has been interned, or a new (\"owned\") reference to an earlier interned " +"string object with the same value." +msgstr "" diff --git a/c-api/utilities.po b/c-api/utilities.po new file mode 100644 index 0000000000..05b73d9417 --- /dev/null +++ b/c-api/utilities.po @@ -0,0 +1,31 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +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-10-04 12:27+0200\n" +"Last-Translator: Julien Palard \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" + +#: c-api/utilities.rst:7 +msgid "Utilities" +msgstr "Utilitaires" + +#: c-api/utilities.rst:9 +msgid "" +"The functions in this chapter perform various utility tasks, ranging from " +"helping C code be more portable across platforms, using Python modules from " +"C, and parsing function arguments and constructing Python values from C " +"values." +msgstr "" +"Les fonctions de ce chapitre sont utilitaires, certaines aident à rendre le " +"code en C plus portable, d'autres à utiliser des modules Python depuis du C, " +"analyser des arguments de fonctions, ou encore construire des valeurs Python " +"à partir de valeurs C." diff --git a/c-api/veryhigh.po b/c-api/veryhigh.po new file mode 100644 index 0000000000..93c436db1b --- /dev/null +++ b/c-api/veryhigh.po @@ -0,0 +1,422 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-18 15:46+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \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" + +#: c-api/veryhigh.rst:8 +msgid "The Very High Level Layer" +msgstr "" + +#: c-api/veryhigh.rst:10 +msgid "" +"The functions in this chapter will let you execute Python source code given " +"in a file or a buffer, but they will not let you interact in a more detailed " +"way with the interpreter." +msgstr "" + +#: c-api/veryhigh.rst:14 +msgid "" +"Several of these functions accept a start symbol from the grammar as a " +"parameter. The available start symbols are :const:`Py_eval_input`, :const:" +"`Py_file_input`, and :const:`Py_single_input`. These are described " +"following the functions which accept them as parameters." +msgstr "" + +#: c-api/veryhigh.rst:19 +msgid "" +"Note also that several of these functions take :c:expr:`FILE*` parameters. " +"One particular issue which needs to be handled carefully is that the :c:expr:" +"`FILE` structure for different C libraries can be different and " +"incompatible. Under Windows (at least), it is possible for dynamically " +"linked extensions to actually use different libraries, so care should be " +"taken that :c:expr:`FILE*` parameters are only passed to these functions if " +"it is certain that they were created by the same library that the Python " +"runtime is using." +msgstr "" + +#: c-api/veryhigh.rst:30 +msgid "" +"The main program for the standard interpreter. This is made available for " +"programs which embed Python. The *argc* and *argv* parameters should be " +"prepared exactly as those which are passed to a C program's :c:func:`main` " +"function (converted to wchar_t according to the user's locale). It is " +"important to note that the argument list may be modified (but the contents " +"of the strings pointed to by the argument list are not). The return value " +"will be ``0`` if the interpreter exits normally (i.e., without an " +"exception), ``1`` if the interpreter exits due to an exception, or ``2`` if " +"the parameter list does not represent a valid Python command line." +msgstr "" + +#: c-api/veryhigh.rst:40 +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:47 +msgid "Similar to :c:func:`Py_Main` but *argv* is an array of bytes strings." +msgstr "" + +#: c-api/veryhigh.rst:54 +msgid "" +"This is a simplified interface to :c:func:`PyRun_AnyFileExFlags` below, " +"leaving *closeit* set to ``0`` and *flags* set to ``NULL``." +msgstr "" + +#: c-api/veryhigh.rst:60 +msgid "" +"This is a simplified interface to :c:func:`PyRun_AnyFileExFlags` below, " +"leaving the *closeit* argument set to ``0``." +msgstr "" + +#: c-api/veryhigh.rst:66 +msgid "" +"This is a simplified interface to :c:func:`PyRun_AnyFileExFlags` below, " +"leaving the *flags* argument set to ``NULL``." +msgstr "" + +#: c-api/veryhigh.rst:72 +msgid "" +"If *fp* refers to a file associated with an interactive device (console or " +"terminal input or Unix pseudo-terminal), return the value of :c:func:" +"`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. If *closeit* is true, the file is closed " +"before ``PyRun_SimpleFileExFlags()`` returns." +msgstr "" + +#: c-api/veryhigh.rst:84 +msgid "" +"This is a simplified interface to :c:func:`PyRun_SimpleStringFlags` below, " +"leaving the :c:struct:`PyCompilerFlags`\\* argument set to ``NULL``." +msgstr "" + +#: 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 " +"exist, it is created. Returns ``0`` on success or ``-1`` if an exception " +"was raised. If there was an error, there is no way to get the exception " +"information. For the meaning of *flags*, see below." +msgstr "" + +#: 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: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:109 +msgid "" +"This is a simplified interface to :c:func:`PyRun_SimpleFileExFlags` below, " +"leaving *flags* set to ``NULL``." +msgstr "" + +#: 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 " +"of the file, it is decoded from :term:`filesystem encoding and error " +"handler`. If *closeit* is true, the file is closed before " +"``PyRun_SimpleFileExFlags()`` returns." +msgstr "" + +#: 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 " +"correctly." +msgstr "" + +#: 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: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 " +"prompted using ``sys.ps1`` and ``sys.ps2``. *filename* is decoded from the :" +"term:`filesystem encoding and error handler`." +msgstr "" + +#: 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 " +"distributed as part of Python if there was a parse error. (Note that :file:" +"`errcode.h` is not included by :file:`Python.h`, so must be included " +"specifically if needed.)" +msgstr "" + +#: 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: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`` " +"and ``sys.ps2``. *filename* is decoded from the :term:`filesystem encoding " +"and error handler`. Returns ``0`` at EOF or a negative number upon failure." +msgstr "" + +#: c-api/veryhigh.rst:162 +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 " +"become idle and wait for user input from the terminal. The return value is " +"ignored. Overriding this hook can be used to integrate the interpreter's " +"prompt with other event loops, as done in the :file:`Modules/_tkinter.c` in " +"the Python source code." +msgstr "" + +#: c-api/veryhigh.rst:173 +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 " +"to read a single line of input at the interpreter's prompt. The function is " +"expected to output the string *prompt* if it's not ``NULL``, and then read a " +"line of input from the provided standard input file, returning the resulting " +"string. For example, The :mod:`readline` module sets this hook to provide " +"line-editing and tab-completion features." +msgstr "" + +#: c-api/veryhigh.rst:182 +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:185 +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 +msgid "" +"This is a simplified interface to :c:func:`PyRun_StringFlags` below, leaving " +"*flags* set to ``NULL``." +msgstr "" + +#: c-api/veryhigh.rst:198 +msgid "" +"Execute Python source code from *str* in the context specified by the " +"objects *globals* and *locals* with the compiler flags specified by " +"*flags*. *globals* must be a dictionary; *locals* can be any object that " +"implements the mapping protocol. The parameter *start* specifies the start " +"token that should be used to parse the source code." +msgstr "" + +#: c-api/veryhigh.rst:204 +msgid "" +"Returns the result of executing the code as a Python object, or ``NULL`` if " +"an exception was raised." +msgstr "" + +#: c-api/veryhigh.rst:210 +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:216 +msgid "" +"This is a simplified interface to :c:func:`PyRun_FileExFlags` below, leaving " +"*flags* set to ``NULL``." +msgstr "" + +#: c-api/veryhigh.rst:222 +msgid "" +"This is a simplified interface to :c:func:`PyRun_FileExFlags` below, leaving " +"*closeit* set to ``0``." +msgstr "" + +#: c-api/veryhigh.rst:228 +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 " +"the file, it is decoded from the :term:`filesystem encoding and error " +"handler`. If *closeit* is true, the file is closed before :c:func:" +"`PyRun_FileExFlags` returns." +msgstr "" + +#: c-api/veryhigh.rst:237 +msgid "" +"This is a simplified interface to :c:func:`Py_CompileStringFlags` below, " +"leaving *flags* set to ``NULL``." +msgstr "" + +#: c-api/veryhigh.rst:243 +msgid "" +"This is a simplified interface to :c:func:`Py_CompileStringExFlags` below, " +"with *optimize* set to ``-1``." +msgstr "" + +#: c-api/veryhigh.rst:249 +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 " +"constrain the code which can be compiled and should be :const:" +"`Py_eval_input`, :const:`Py_file_input`, or :const:`Py_single_input`. The " +"filename specified by *filename* is used to construct the code object and " +"may appear in tracebacks or :exc:`SyntaxError` exception messages. This " +"returns ``NULL`` if the code cannot be parsed or compiled." +msgstr "" + +#: c-api/veryhigh.rst:257 +msgid "" +"The integer *optimize* specifies the optimization level of the compiler; a " +"value of ``-1`` selects the optimization level of the interpreter as given " +"by :option:`-O` options. Explicit levels are ``0`` (no optimization; " +"``__debug__`` is true), ``1`` (asserts are removed, ``__debug__`` is false) " +"or ``2`` (docstrings are removed too)." +msgstr "" + +#: c-api/veryhigh.rst:268 +msgid "" +"Like :c:func:`Py_CompileStringObject`, but *filename* is a byte string " +"decoded from the :term:`filesystem encoding and error handler`." +msgstr "" + +#: c-api/veryhigh.rst:275 +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:282 +msgid "" +"Evaluate a precompiled code object, given a particular environment for its " +"evaluation. This environment consists of a dictionary of global variables, " +"a mapping object of local variables, arrays of arguments, keywords and " +"defaults, a dictionary of default values for :ref:`keyword-only ` arguments and a closure tuple of cells." +msgstr "" + +#: c-api/veryhigh.rst:291 +#, fuzzy +msgid "" +"The C structure of the objects used to describe frame objects. The fields of " +"this type are subject to change at any time." +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:297 +msgid "" +"Evaluate an execution frame. This is a simplified interface to :c:func:" +"`PyEval_EvalFrameEx`, for backward compatibility." +msgstr "" + +#: c-api/veryhigh.rst:303 +msgid "" +"This is the main, unvarnished function of Python interpretation. The code " +"object associated with the execution frame *f* is executed, interpreting " +"bytecode and executing calls as needed. The additional *throwflag* " +"parameter can mostly be ignored - if true, then it causes an exception to " +"immediately be thrown; this is used for the :meth:`~generator.throw` methods " +"of generator objects." +msgstr "" + +#: c-api/veryhigh.rst:310 +msgid "" +"This function now includes a debug assertion to help ensure that it does not " +"silently discard an active exception." +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:317 +msgid "" +"This function changes the flags of the current evaluation frame, and returns " +"true on success, false on failure." +msgstr "" + +#: c-api/veryhigh.rst:325 +msgid "" +"The start symbol from the Python grammar for isolated expressions; for use " +"with :c:func:`Py_CompileString`." +msgstr "" + +#: c-api/veryhigh.rst:333 +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:342 +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:349 +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 " +"is being executed, it is passed as ``PyCompilerFlags *flags``. In this " +"case, ``from __future__ import`` can modify *flags*." +msgstr "" + +#: c-api/veryhigh.rst:354 +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:360 +msgid "Compiler flags." +msgstr "" + +#: c-api/veryhigh.rst:364 +msgid "" +"*cf_feature_version* is the minor Python version. It should be initialized " +"to ``PY_MINOR_VERSION``." +msgstr "" + +#: c-api/veryhigh.rst:367 +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:370 +msgid "Added *cf_feature_version* field." +msgstr "" + +#: c-api/veryhigh.rst:376 +msgid "" +"This bit can be set in *flags* to cause division operator ``/`` to be " +"interpreted as \"true division\" according to :pep:`238`." +msgstr "" diff --git a/c-api/weakref.po b/c-api/weakref.po new file mode 100644 index 0000000000..c87980a274 --- /dev/null +++ b/c-api/weakref.po @@ -0,0 +1,124 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-18 15:46+0200\n" +"PO-Revision-Date: 2021-12-16 17:25+0100\n" +"Last-Translator: Andy Kwok \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" + +#: c-api/weakref.rst:6 +msgid "Weak Reference Objects" +msgstr "Objets à références faibles" + +#: c-api/weakref.rst:8 +msgid "" +"Python supports *weak references* as first-class objects. There are two " +"specific object types which directly implement weak references. The first " +"is a simple reference object, and the second acts as a proxy for the " +"original object as much as it can." +msgstr "" +"Python gère les *références faibles* comme des objets de première classe. Il " +"existe deux types d'objets spécifiques qui implémentent directement les " +"références faibles. Le premier est un objet de référence simple, et le " +"second agit autant que possible comme un mandataire vers l'objet original." + +#: c-api/weakref.rst:16 +#, fuzzy +msgid "" +"Return true if *ob* is either a reference or proxy object. This function " +"always succeeds." +msgstr "Renvoie vrai si *ob* est soit une référence, soit un objet proxy." + +#: c-api/weakref.rst:22 +#, fuzzy +msgid "" +"Return true if *ob* is a reference object. This function always succeeds." +msgstr "Retourne vrai si *ob* est un objet référence." + +#: c-api/weakref.rst:27 +#, fuzzy +msgid "Return true if *ob* is a proxy object. This function always succeeds." +msgstr "Retourne vrai si *ob* est un objet proxy" + +#: c-api/weakref.rst:32 +#, fuzzy +msgid "" +"Return a weak reference object for the object *ob*. This will always return " +"a new reference, but is not guaranteed to create a new object; an existing " +"reference object may be returned. The second parameter, *callback*, can be " +"a callable object that receives notification when *ob* is garbage collected; " +"it should accept a single parameter, which will be the weak reference object " +"itself. *callback* may also be ``None`` or ``NULL``. If *ob* is not a " +"weakly referencable object, or if *callback* is not callable, ``None``, or " +"``NULL``, this will return ``NULL`` and raise :exc:`TypeError`." +msgstr "" +"Retourne un objet de référence faible pour l'objet *ob*. Elle renvoie " +"toujours une nouvelle référence, mais cela ne signifie pas qu'un nouvel " +"objet est créé ; un objet référence existant peut être renvoyé. Le second " +"paramètre, *callback*, peut être un objet appelable qui reçoit une " +"notification lorsque *ob* est collecté par le ramasse-miette (*garbage " +"collected* en anglais) ; il doit accepter un paramètre unique, qui est " +"l'objet référence faible lui-même. *callback* peut aussi être positionné à " +"``None`` ou à *NULL*. Si *ob* n'est pas un objet faiblement référençable, " +"ou si *callback* n'est pas appelable, ``None`` ou *NULL*, ceci retourne " +"*NULL* et lève une :exc:`TypeError`." + +#: c-api/weakref.rst:44 +#, fuzzy +msgid "" +"Return a weak reference proxy object for the object *ob*. This will always " +"return a new reference, but is not guaranteed to create a new object; an " +"existing proxy object may be returned. The second parameter, *callback*, " +"can be a callable object that receives notification when *ob* is garbage " +"collected; it should accept a single parameter, which will be the weak " +"reference object itself. *callback* may also be ``None`` or ``NULL``. If " +"*ob* is not a weakly referencable object, or if *callback* is not callable, " +"``None``, or ``NULL``, this will return ``NULL`` and raise :exc:`TypeError`." +msgstr "" +"Retourne un objet mandataire à référence faible pour l'objet *ob*. Ceci " +"renvoie toujours une nouvelle référence, mais ne garantit pas la création " +"d'un nouvel objet ; un objet proxy existant peut être retourné. Le second " +"paramètre, *callback*, peut être un objet appelable qui reçoit une " +"notification lorsque *ob* est collecté ; il doit accepter un seul paramètre, " +"qui sera l'objet de référence faible lui-même. *callback* peut aussi être " +"``None`` ou *NULL*. Si *ob* n'est pas un objet faiblement référençable, ou " +"si *callback* n'est pas appelable, ``None`` ou *NULL*, ceci renvoie *NULL* " +"et lève une :exc:`TypeError`." + +#: c-api/weakref.rst:56 +msgid "" +"Return the referenced object from a weak reference, *ref*. If the referent " +"is no longer live, returns :const:`Py_None`." +msgstr "" +"Retourne l'objet référencé à partir d'une référence faible, *ref*. Si le " +"référence n'existe plus, alors l'objet renvoie :const:`Py_None`." + +#: c-api/weakref.rst:61 +#, fuzzy +msgid "" +"This function returns a :term:`borrowed reference` to the referenced object. " +"This means that you should always call :c:func:`Py_INCREF` on the object " +"except when it cannot be destroyed before the last usage of the borrowed " +"reference." +msgstr "" +"Cette fonction renvoie une **référence empruntée** à l'objet référencé. Cela " +"signifie que vous devez toujours appeler :c:func:`Py_INCREF` sur l'objet " +"sauf si vous savez qu'il ne peut pas être détruit tant que vous l'utilisez " +"encore." + +#: c-api/weakref.rst:69 +msgid "" +"Similar to :c:func:`PyWeakref_GetObject`, but implemented as a macro that " +"does no error checking." +msgstr "" +"Similaire à :c:func:`PyWeakref_GetObject`, mais implémenté comme une macro " +"qui ne vérifie pas les erreurs." diff --git a/contents.po b/contents.po new file mode 100644 index 0000000000..537cfef69b --- /dev/null +++ b/contents.po @@ -0,0 +1,19 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +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: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \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" + +#: contents.rst:3 +msgid "Python Documentation contents" +msgstr "Contenu de la documentation Python" diff --git a/copyright.po b/copyright.po new file mode 100644 index 0000000000..0876ef0034 --- /dev/null +++ b/copyright.po @@ -0,0 +1,56 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-22 22:57+0100\n" +"PO-Revision-Date: 2022-04-07 14:48-0400\n" +"Last-Translator: Jean-Michel Laprise \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 3.0.1\n" + +#: copyright.rst:3 +msgid "Copyright" +msgstr "Copyright" + +#: copyright.rst:5 +msgid "Python and this documentation is:" +msgstr "Python et cette documentation sont :" + +#: copyright.rst:7 +#, fuzzy +msgid "Copyright © 2001-2023 Python Software Foundation. All rights reserved." +msgstr "" +"Copyright © 2001-2022 Python Software Foundation. Tous droits réservés." + +#: copyright.rst:9 +msgid "Copyright © 2000 BeOpen.com. All rights reserved." +msgstr "Copyright © 2000 *BeOpen.com*. Tous droits réservés." + +#: copyright.rst:11 +msgid "" +"Copyright © 1995-2000 Corporation for National Research Initiatives. All " +"rights reserved." +msgstr "" +"Copyright © 1995-2000 *Corporation for National Research Initiatives*. Tous " +"droits réservés." + +#: copyright.rst:14 +msgid "" +"Copyright © 1991-1995 Stichting Mathematisch Centrum. All rights reserved." +msgstr "" +"Copyright © 1991-1995 *Stichting Mathematisch Centrum*. Tous droits réservés." + +#: copyright.rst:18 +msgid "" +"See :ref:`history-and-license` for complete license and permissions " +"information." +msgstr "" +"Voir :ref:`history-and-license` pour des informations complètes concernant " +"la licence et les permissions." diff --git a/dict b/dict new file mode 100644 index 0000000000..e577577936 --- /dev/null +++ b/dict @@ -0,0 +1,208 @@ +#python-fr +-1 +-ième +-uplet +-uplets +017f +212a +abi +ahlstrom +allocateur +allocateurs +alpn +base16 +base32 +base64 +base85 +batch +boguer +c++ +c- +c/c++ +C14N +C89 +c99 +chacha20 +cadriciel +cadriciels +capturants +catucci +cobjects +composabilité +concourance +contravariante +contravariantes +configurateurs +contribués +coroutine +coroutines +cpython +CSV +curryfication +cython +d'allocateurs +d'indifférentiabilité +d'itérateurs +docstrings +décodables +déduplication +délimitants +désenregistre +déserialisables +déserialisation +déserialisations +déserialise +déserialiser +déserialiseur +déserialiseurs +désérialisation +désérialiseur +désérialiseurs +déserialisées +déserialisés +désérialisés +désérialise +désérialiser +désérialisé +désérialisées +Distutils +encodable +ethnomathématiques +Excel +farrugia +finaliseur +frederik +fredrik +freeze +glibc +guido +gzip +hachabilité +hachable +hachables +hettinger +html +indiçage +indo-arabes +ininterruptible +interchangés +intralignes +ios +ipv4 +itérateur +itérateurs +ième +journalise +journaliser +journaliseur +journalisé +journalisée +journalisés +jr. +kolams +kuchling +l'allocateur +l'indiçage +l'itérateur +lexicographiquement +lorsqu'aucune +lorsqu'aucun +macos +mar +mar. +marshal +marc-andré +mersenne +mertz +Monty +muabilité +muable +muables +multiensemble +multiensembles +mutex +mémoïsant +mémoïsation +métacaractère +métacaractères +métaclasse +métaclasses +n-ième +namespace +non-hachable +non-hachables +npn +openssl +POSIX +pdb +peg +pip +pourcent +proleptique +précompilé +préemptif +préremplis +py2exe +pybsddb +pyc +pychecker +pydb +pylint +pythonwin +qu +re +recompilation +reedy +relationelle +retraçage +réentrant +réentrante +réentrants +réessayable +réexécuter +référençable +référençables +réimplémente +réimplémenter +réimplémentez +résolveurs +réusinage +réusinages +réusiné +réutilisabilité +serwy +shell +slot +smalltalk +sqlite +surprenamment +sextuplet +sérialisable +sérialisables +sérialiser +sérialiseur +sérialisé +sérialisée +sérialisées +sérialisés +sqlite +sqlite3 +tk +tokenisation +tokenisé +tokenisés +tty +uplets +utf-8 +utf-16 +utf-32 +von +w3c +world +wxwidgets +x11 +x86 +zope +émoji +ı +ſ diff --git a/distributing/index.po b/distributing/index.po new file mode 100644 index 0000000000..7631c7f827 --- /dev/null +++ b/distributing/index.po @@ -0,0 +1,350 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-10-21 15:04+0200\n" +"PO-Revision-Date: 2021-12-16 02:36+0100\n" +"Last-Translator: Fipaddict \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 3.0\n" + +#: distributing/index.rst:5 +msgid "Distributing Python Modules" +msgstr "Distribuer des modules Python" + +#: distributing/index.rst:0 +msgid "Email" +msgstr "Email" + +#: distributing/index.rst:7 +msgid "distutils-sig@python.org" +msgstr "distutils-sig@python.org" + +#: distributing/index.rst:10 +msgid "" +"As a popular open source development project, Python has an active " +"supporting community of contributors and users that also make their software " +"available for other Python developers to use under open source license terms." +msgstr "" +"En tant que logiciel libre populaire, Python bénéficie d'une communauté " +"active de contributeurs et d'utilisateurs qui rendent à leur tour leurs " +"logiciels disponibles, sous licence libre, pour les autres développeurs " +"Python." + +#: distributing/index.rst:14 +msgid "" +"This allows Python users to share and collaborate effectively, benefiting " +"from the solutions others have already created to common (and sometimes even " +"rare!) problems, as well as potentially contributing their own solutions to " +"the common pool." +msgstr "" +"Cela permet aux utilisateurs de Python de partager et de collaborer " +"efficacement, bénéficiant des solutions que les autres ont déjà créées pour " +"résoudre les problèmes communs (ou même, parfois, rares !), aussi que de " +"partager leurs propres solutions à tous." + +#: distributing/index.rst:19 +msgid "" +"This guide covers the distribution part of the process. For a guide to " +"installing other Python projects, refer to the :ref:`installation guide " +"`." +msgstr "" +"Ce guide couvre la partie distribution du processus. Pour un guide sur " +"l'installation d'autres projets Python, voir :ref:`installation guide " +"`." + +#: distributing/index.rst:25 +msgid "" +"For corporate and other institutional users, be aware that many " +"organisations have their own policies around using and contributing to open " +"source software. Please take such policies into account when making use of " +"the distribution and installation tools provided with Python." +msgstr "" +"Pour les entreprises et autres institutions, gardez en tête que certaines " +"organisations ont leurs propres règles sur l'utilisation et la contribution " +"au logiciel libre. Prenez ces règles en compte lorsque vous utilisez les " +"outils de distribution et d'installation fournis par Python." + +#: distributing/index.rst:32 +msgid "Key terms" +msgstr "Vocabulaire" + +#: distributing/index.rst:34 +msgid "" +"the `Python Package Index `__ is a public repository of " +"open source licensed packages made available for use by other Python users" +msgstr "" +"Le `Python Package Index `__ est un dépôt public de " +"paquets sous licence libre rendus disponibles par d'autres utilisateurs " +"Python." + +#: distributing/index.rst:37 +msgid "" +"the `Python Packaging Authority `__ are the group of " +"developers and documentation authors responsible for the maintenance and " +"evolution of the standard packaging tools and the associated metadata and " +"file format standards. They maintain a variety of tools, documentation and " +"issue trackers on both `GitHub `__ and `Bitbucket " +"`__." +msgstr "" +"Le `Python Packaging Authority `__ est le groupe de " +"développeurs et d'auteurs de documentation responsables de la maintenance et " +"de l'évolution des outils standards de création de paquets, des métadonnées, " +"et des formats de fichiers standards. Ils maintiennent quelques outils, " +"documentation, et gestionnaires de ticket, aussi bien sur `GitHub `__ que sur `Bitbucket `__." + +#: distributing/index.rst:44 +msgid "" +":mod:`distutils` is the original build and distribution system first added " +"to the Python standard library in 1998. While direct use of :mod:`distutils` " +"is being phased out, it still laid the foundation for the current packaging " +"and distribution infrastructure, and it not only remains part of the " +"standard library, but its name lives on in other ways (such as the name of " +"the mailing list used to coordinate Python packaging standards development)." +msgstr "" +":mod:`distutils` est le premier système de construction et de distribution " +"ajouté à la bibliothèque standard en 1998. Bien que l'utilisation directe " +"de :mod:`distutils` est progressivement supprimée, elle reste le fondement " +"de l'infrastructure actuelle de construction de paquet et de distribution. " +"Au-delà de rester dans la bibliothèque standard, son nom vit aussi sous " +"d'autres formes, tel que la liste de diffusion utilisée pour coordonner le " +"développement et les standards de la création de paquet." + +#: distributing/index.rst:51 +msgid "" +"`setuptools`_ is a (largely) drop-in replacement for :mod:`distutils` first " +"published in 2004. Its most notable addition over the unmodified :mod:" +"`distutils` tools was the ability to declare dependencies on other packages. " +"It is currently recommended as a more regularly updated alternative to :mod:" +"`distutils` that offers consistent support for more recent packaging " +"standards across a wide range of Python versions." +msgstr "" +"`setuptools`_, d'abord publié en 2004, est (en grande partie) le remplaçant " +"de :mod:`distutils`. La nouveauté la plus notable, au-delà des outils non " +"modifiés de :mod:`distutils` est la possibilité de déclarer des dépendances " +"à d'autres paquets. C'est l'alternative actuellement recommandée car plus " +"régulièrement mise à jour que :mod:`distutils` et gère mieux les standards " +"de création de paquets actuels, pour un large choix de version de Python." + +#: distributing/index.rst:57 +msgid "" +"`wheel`_ (in this context) is a project that adds the ``bdist_wheel`` " +"command to :mod:`distutils`/`setuptools`_. This produces a cross platform " +"binary packaging format (called \"wheels\" or \"wheel files\" and defined " +"in :pep:`427`) that allows Python libraries, even those including binary " +"extensions, to be installed on a system without needing to be built locally." +msgstr "" +"`wheel`_ (dans ce contexte) est un projet qui ajoute la commande " +"``bdist_wheel`` à :mod:`distutils`/`setuptools`_. Cela produit un paquet " +"binaire multiplateformes (nommé \"*wheels*\" ou \"*wheel files*\" et définis " +"dans la :pep:`427`) qui permet aux bibliothèques Python, même celles " +"incluant des extensions binaires, d'être installées sur un système sans " +"avoir à les compiler localement." + +#: distributing/index.rst:68 +msgid "Open source licensing and collaboration" +msgstr "Licence libre et collaboration" + +#: distributing/index.rst:70 +msgid "" +"In most parts of the world, software is automatically covered by copyright. " +"This means that other developers require explicit permission to copy, use, " +"modify and redistribute the software." +msgstr "" +"Dans la plupart des pays du monde, le logiciel est automatiquement couvert " +"par les droits d'auteur. Cela signifie que les autres développeurs ont " +"besoin d'une autorisation explicite pour copier, utiliser, modifier, et " +"redistribuer le logiciel." + +#: distributing/index.rst:74 +msgid "" +"Open source licensing is a way of explicitly granting such permission in a " +"relatively consistent way, allowing developers to share and collaborate " +"efficiently by making common solutions to various problems freely available. " +"This leaves many developers free to spend more time focusing on the problems " +"that are relatively unique to their specific situation." +msgstr "" +"Les licences libres sont un moyen d'autoriser explicitement ces permissions " +"par un moyen relativement cohérent, autorisant les développeurs à partager " +"et collaborer efficacement en rendant des solutions communes à divers " +"problèmes librement disponibles. Cela laisse beaucoup de développeurs libres " +"de dépenser plus de temps concentrés sur des problèmes relativement uniques " +"à leur cas spécifique." + +#: distributing/index.rst:80 +msgid "" +"The distribution tools provided with Python are designed to make it " +"reasonably straightforward for developers to make their own contributions " +"back to that common pool of software if they choose to do so." +msgstr "" +"Les outils de distribution fournis avec Python sont conçus pour rendre la " +"vie des développeurs relativement simple lorsqu'ils souhaitent contribuer, " +"s'ils le désirent, à ces ressources communes." + +#: distributing/index.rst:84 +msgid "" +"The same distribution tools can also be used to distribute software within " +"an organisation, regardless of whether that software is published as open " +"source software or not." +msgstr "" +"Ces mêmes outils de distribution peuvent aussi être utilisés pour distribuer " +"du logiciel à l'intérieur d'une organisation, que ce soit du logiciel libre " +"ou non." + +#: distributing/index.rst:90 +msgid "Installing the tools" +msgstr "Installer les outils" + +#: distributing/index.rst:92 +msgid "" +"The standard library does not include build tools that support modern Python " +"packaging standards, as the core development team has found that it is " +"important to have standard tools that work consistently, even on older " +"versions of Python." +msgstr "" +"La bibliothèque standard n'inclut pas d'outils capables de créer des paquets " +"selon les standards modernes, car l'équipe fondamentale de développement a " +"trouvé qu'il était plus important d'avoir des outils standards qui " +"fonctionnent de manière cohérente, même avec de plus vieilles versions de " +"Python." + +#: distributing/index.rst:97 +msgid "" +"The currently recommended build and distribution tools can be installed by " +"invoking the ``pip`` module at the command line::" +msgstr "" +"Les outils de construction de paquets et de distribution actuellement " +"recommandées peuvent être installées en invoquant le module ``pip`` dans une " +"invite de commande ::" + +#: distributing/index.rst:104 +msgid "" +"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 (dont macOS et Linux), ces " +"instructions supposent l'utilisation d'un :term:`environnement virtuel " +"`." + +#: distributing/index.rst:107 +msgid "" +"For Windows users, these instructions assume that the option to adjust the " +"system PATH environment variable was selected when installing Python." +msgstr "" +"Pour les utilisateurs de Windows, ces instructions supposent que l'option " +"proposant de modifier la variable d'environnement PATH a été cochée lors de " +"l'installation de Python." + +#: distributing/index.rst:111 +msgid "" +"The Python Packaging User Guide includes more details on the `currently " +"recommended tools`_." +msgstr "" +"Le *Python Packaging User Guide* contient plus de détails sur les `(en) " +"outils actuellement recommandés `_." + +#: distributing/index.rst:123 +msgid "Reading the Python Packaging User Guide" +msgstr "Consultez le *Python Packaging User Guide*" + +#: distributing/index.rst:125 +msgid "" +"The Python Packaging User Guide covers the various key steps and elements " +"involved in creating and publishing a project:" +msgstr "" +"Le *Python Packaging User Guide* couvre les différentes étapes et les " +"éléments clés de la création et publication d'un projet :" + +#: distributing/index.rst:128 +msgid "`Project structure`_" +msgstr "`(en) Structure d'un projet `_ ;" + +#: distributing/index.rst:129 +msgid "`Building and packaging the project`_" +msgstr "" +"`(en) Construire et empaqueter le projet `_ ;" + +#: distributing/index.rst:130 +msgid "`Uploading the project to the Python Package Index`_" +msgstr "" +"`(en) Téléverser le projet sur le Python Packaging Index `_ ;" + +#: distributing/index.rst:131 +msgid "`The .pypirc file`_" +msgstr "`(en) Le fichier .pypirc `_." + +#: distributing/index.rst:144 +msgid "How do I...?" +msgstr "Comment puis-je… ?" + +#: distributing/index.rst:146 +msgid "These are quick answers or links for some common tasks." +msgstr "" +"Ce sont des réponses rapides ou des liens pour certaines tâches courantes." + +#: distributing/index.rst:149 +msgid "... choose a name for my project?" +msgstr "… choisir un nom pour mon projet ?" + +#: distributing/index.rst:151 +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 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 "" +"check popular hosting sites like GitHub, Bitbucket, etc to see if there is " +"already a project with that name" +msgstr "" +"vérifiez sur quelques sites d'hébergement populaires tels que GitHub, " +"Bitbucket, etc pour voir s'il y existe déjà un projet avec ce nom ;" + +#: distributing/index.rst:156 +msgid "check what comes up in a web search for the name you're considering" +msgstr "" +"vérifiez ce qui sort en recherchant sur le web le nom que vous envisagez ;" + +#: distributing/index.rst:157 +msgid "" +"avoid particularly common words, especially ones with multiple meanings, as " +"they can make it difficult for users to find your software when searching " +"for it" +msgstr "" +"évitez les mots trop communs, plus particulièrement ceux ayant plusieurs " +"significations, car pour vos utilisateurs, cela complique la recherche de " +"votre logiciel." + +#: distributing/index.rst:163 +msgid "... create and distribute binary extensions?" +msgstr "… créer et distribuer des extensions binaires ?" + +#: distributing/index.rst:165 +msgid "" +"This is actually quite a complex topic, with a variety of alternatives " +"available depending on exactly what you're aiming to achieve. See the Python " +"Packaging User Guide for more information and recommendations." +msgstr "" +"C'est un sujet particulièrement compliqué, avec pléthore alternatives " +"disponibles dont le choix dépend de votre objectif exact. Voir le *Python " +"Packaging User Guide* pour plus d'informations et de recommandations." + +#: distributing/index.rst:171 +msgid "" +"`Python Packaging User Guide: Binary Extensions `__" +msgstr "" +"`Python Packaging User Guide: Binary Extensions `__" diff --git a/distutils/_setuptools_disclaimer.po b/distutils/_setuptools_disclaimer.po new file mode 100644 index 0000000000..78a67d8826 --- /dev/null +++ b/distutils/_setuptools_disclaimer.po @@ -0,0 +1,27 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +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: 2020-02-04 21:21+0100\n" +"Last-Translator: ZepmanBC \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" + +#: distutils/_setuptools_disclaimer.rst:3 +msgid "" +"This document is being retained solely until the ``setuptools`` " +"documentation at https://setuptools.readthedocs.io/en/latest/setuptools.html " +"independently covers all of the relevant information currently included here." +msgstr "" +"Cette page est conservée uniquement jusqu'à ce que la documentation " +"``setuptool`` sur https://setuptools.readthedocs.io/en/latest/setuptools." +"html couvre de manière indépendante toutes les informations pertinentes " +"actuellement incluses ici." diff --git a/distutils/apiref.po b/distutils/apiref.po new file mode 100644 index 0000000000..09b0fad9c7 --- /dev/null +++ b/distutils/apiref.po @@ -0,0 +1,3481 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-18 15:46+0200\n" +"PO-Revision-Date: 2022-10-18 12:23+0200\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.4.2\n" + +#: distutils/apiref.rst:5 +msgid "API Reference" +msgstr "Référence de l'API" + +#: distutils/apiref.rst:11 +msgid "`New and changed setup.py arguments in setuptools`_" +msgstr "`Arguments nouveaux et modifiés de *setup.py* dans setuptools`_" + +#: distutils/apiref.rst:10 +msgid "" +"The ``setuptools`` project adds new capabilities to the ``setup`` function " +"and other APIs, makes the API consistent across different Python versions, " +"and is hence recommended over using ``distutils`` directly." +msgstr "" +"Le projet ``setuptools`` ajoute de nouvelles capacités à la fonction " +"``setup`` et à d'autres API, il rend l'API cohérente entre les différentes " +"versions de Python ; il est donc recommandé de l'utiliser plutôt que " +"d'utiliser directement les ``distutils``." + +#: distutils/_setuptools_disclaimer.rst:3 +msgid "" +"This document is being retained solely until the ``setuptools`` " +"documentation at https://setuptools.readthedocs.io/en/latest/setuptools.html " +"independently covers all of the relevant information currently included here." +msgstr "" +"Cette page est conservée uniquement jusqu'à ce que la documentation " +"``setuptool`` sur https://setuptools.readthedocs.io/en/latest/setuptools." +"html couvre de manière indépendante toutes les informations pertinentes " +"actuellement incluses ici." + +#: distutils/apiref.rst:19 +msgid ":mod:`distutils.core` --- Core Distutils functionality" +msgstr "" +":mod:`distutils.core` — Fonctionnalités principales du module Distutils" + +#: distutils/apiref.rst:25 +msgid "" +"The :mod:`distutils.core` module is the only module that needs to be " +"installed to use the Distutils. It provides the :func:`setup` (which is " +"called from the setup script). Indirectly provides the :class:`distutils." +"dist.Distribution` and :class:`distutils.cmd.Command` class." +msgstr "" +"Le module :mod:`distutils.core` est le seul module qui a besoin d'être " +"installé pour utiliser Distutils. Il fournit le :func:`setup` (qui est " +"appelé par le script *setup.py*). Il fournit indirectement les classes :" +"class:`distutils.dist.Distribution` et :class:`distutils.cmd.Command`." + +#: distutils/apiref.rst:33 +msgid "" +"The basic do-everything function that does most everything you could ever " +"ask for from a Distutils method." +msgstr "" +"La fonction de base à tout faire qui fait presque tout ce dont vous pourriez " +"attendre d'une méthode Distutils." + +#: distutils/apiref.rst:36 +msgid "" +"The setup function takes a large number of arguments. These are laid out in " +"the following table." +msgstr "" +"La fonction ``setup`` prend un grand nombre d'arguments. Ils sont présentés " +"dans le tableau suivant." + +#: distutils/apiref.rst:185 +msgid "argument name" +msgstr "nom de l'argument" + +#: distutils/apiref.rst:143 distutils/apiref.rst:185 +msgid "value" +msgstr "valeur" + +#: distutils/apiref.rst:185 +msgid "type" +msgstr "type" + +#: distutils/apiref.rst:187 +msgid "*name*" +msgstr "*name*" + +#: distutils/apiref.rst:44 +msgid "The name of the package" +msgstr "Le nom du paquet" + +#: distutils/apiref.rst:46 distutils/apiref.rst:53 distutils/apiref.rst:58 +#: distutils/apiref.rst:68 distutils/apiref.rst:75 distutils/apiref.rst:106 +#: distutils/apiref.rst:278 +msgid "a string" +msgstr "une chaîne de caractères" + +#: distutils/apiref.rst:46 +msgid "*version*" +msgstr "*version*" + +#: distutils/apiref.rst:46 +msgid "The version number of the package; see :mod:`distutils.version`" +msgstr "Le numéro de version du paquet, voir :mod:`distutils.version`" + +#: distutils/apiref.rst:50 +msgid "*description*" +msgstr "*description*" + +#: distutils/apiref.rst:50 +msgid "A single line describing the package" +msgstr "Une ligne unique décrivant le paquet" + +#: distutils/apiref.rst:53 +msgid "*long_description*" +msgstr "*long_description*" + +#: distutils/apiref.rst:53 +msgid "Longer description of the package" +msgstr "Une description plus longue du paquet" + +#: distutils/apiref.rst:56 +msgid "*author*" +msgstr "*author*" + +#: distutils/apiref.rst:56 +msgid "The name of the package author" +msgstr "Le nom de l'auteur du paquet" + +#: distutils/apiref.rst:58 +msgid "*author_email*" +msgstr "*author_email*" + +#: distutils/apiref.rst:58 +msgid "The email address of the package author" +msgstr "L'adresse e-mail de l'auteur du paquet" + +#: distutils/apiref.rst:61 +msgid "*maintainer*" +msgstr "*maintainer*" + +#: distutils/apiref.rst:61 +msgid "" +"The name of the current maintainer, if different from the author. Note that " +"if the maintainer is provided, distutils will use it as the author in :file:" +"`PKG-INFO`" +msgstr "" +"Le nom de l'actuel mainteneur, s'il est différent de l'auteur. Remarquez que " +"si *maintainer* est fourni, *distutils* l'utilise à la place de *author* " +"dans :file:`PKG-INFO`." + +#: distutils/apiref.rst:68 +msgid "*maintainer_email*" +msgstr "*maintainer_email*" + +#: distutils/apiref.rst:68 +msgid "" +"The email address of the current maintainer, if different from the author" +msgstr "Le courriel de l'actuel mainteneur, si différent de l'auteur" + +#: distutils/apiref.rst:72 +msgid "*url*" +msgstr "*url*" + +#: distutils/apiref.rst:72 +msgid "A URL for the package (homepage)" +msgstr "Une URL pour le paquet (page d'accueil)" + +#: distutils/apiref.rst:75 +msgid "*download_url*" +msgstr "*download_url*" + +#: distutils/apiref.rst:75 +msgid "A URL to download the package" +msgstr "Une URL pour télécharger le paquet" + +#: distutils/apiref.rst:77 +msgid "*packages*" +msgstr "*packages*" + +#: distutils/apiref.rst:77 +msgid "A list of Python packages that distutils will manipulate" +msgstr "Une liste des paquets Python que *distutils* va manipuler" + +#: distutils/apiref.rst:80 distutils/apiref.rst:100 distutils/apiref.rst:207 +#: distutils/apiref.rst:226 distutils/apiref.rst:234 distutils/apiref.rst:247 +#: distutils/apiref.rst:267 distutils/apiref.rst:275 +msgid "a list of strings" +msgstr "une liste de chaînes de caractères" + +#: distutils/apiref.rst:80 +msgid "*py_modules*" +msgstr "*py_modules*" + +#: distutils/apiref.rst:80 +msgid "A list of Python modules that distutils will manipulate" +msgstr "Une liste de modules Python que *distutils* va manipuler" + +#: distutils/apiref.rst:83 +msgid "*scripts*" +msgstr "*scripts*" + +#: distutils/apiref.rst:83 +msgid "A list of standalone script files to be built and installed" +msgstr "Une liste de scripts autonomes à construire et à installer" + +#: distutils/apiref.rst:87 +msgid "*ext_modules*" +msgstr "*ext_modules*" + +#: distutils/apiref.rst:87 +msgid "A list of Python extensions to be built" +msgstr "Une liste des extensions Python à construire" + +#: distutils/apiref.rst:87 +msgid "a list of instances of :class:`distutils.core.Extension`" +msgstr "une liste d'instances de :class:`distutils.core.Extension`" + +#: distutils/apiref.rst:90 +msgid "*classifiers*" +msgstr "*classifiers*" + +#: distutils/apiref.rst:90 +msgid "A list of categories for the package" +msgstr "Une liste de catégories pour le paquet" + +#: distutils/apiref.rst:90 +msgid "" +"a list of strings; valid classifiers are listed on `PyPI `_." +msgstr "" +"une liste des chaînes de caractères, les classificateurs valides sont listés " +"sur `PyPI `_." + +#: distutils/apiref.rst:93 +msgid "*distclass*" +msgstr "*distclass*" + +#: distutils/apiref.rst:93 +msgid "the :class:`Distribution` class to use" +msgstr "la classe :class:`Distribution` à utiliser" + +#: distutils/apiref.rst:93 +msgid "a subclass of :class:`distutils.core.Distribution`" +msgstr "une sous-classe de :class:`distutils.core.Distribution`" + +#: distutils/apiref.rst:96 +msgid "*script_name*" +msgstr "*script_name*" + +#: distutils/apiref.rst:96 +msgid "The name of the setup.py script - defaults to ``sys.argv[0]``" +msgstr "Le nom du script *setup.py*. Initialisé par ``sys.argv[0]``" + +#: distutils/apiref.rst:100 +msgid "*script_args*" +msgstr "*script_args*" + +#: distutils/apiref.rst:100 +msgid "Arguments to supply to the setup script" +msgstr "Arguments à fournir au script d'installation" + +#: distutils/apiref.rst:103 +msgid "*options*" +msgstr "*options*" + +#: distutils/apiref.rst:103 +msgid "default options for the setup script" +msgstr "options par défaut pour le script d'installation" + +#: distutils/apiref.rst:113 distutils/apiref.rst:119 +msgid "a dictionary" +msgstr "un dictionnaire" + +#: distutils/apiref.rst:106 +msgid "*license*" +msgstr "*license*" + +#: distutils/apiref.rst:106 +msgid "The license for the package" +msgstr "La licence pour le paquet" + +#: distutils/apiref.rst:108 +msgid "*keywords*" +msgstr "*keywords*" + +#: distutils/apiref.rst:108 +msgid "Descriptive meta-data, see :pep:`314`" +msgstr "Méta-données descriptives, voir :pep:`314`" + +#: distutils/apiref.rst:111 +msgid "a list of strings or a comma-separated string" +msgstr "" +"Une liste de chaînes de caractères ou une chaîne de caractère dont les " +"éléments sont séparés par des virgules." + +#: distutils/apiref.rst:111 +msgid "*platforms*" +msgstr "*platforms*" + +#: distutils/apiref.rst:113 +msgid "*cmdclass*" +msgstr "*cmdclass*" + +#: distutils/apiref.rst:113 +msgid "A mapping of command names to :class:`Command` subclasses" +msgstr "" +"Un dictionnaire des noms de commandes et des sous-classes :class:`Command`" + +#: distutils/apiref.rst:116 +msgid "*data_files*" +msgstr "*data_files*" + +#: distutils/apiref.rst:116 +msgid "A list of data files to install" +msgstr "Une liste de fichiers de données à installer" + +#: distutils/apiref.rst:116 +msgid "a list" +msgstr "une liste" + +#: distutils/apiref.rst:119 +msgid "*package_dir*" +msgstr "*package_dir*" + +#: distutils/apiref.rst:119 +msgid "A mapping of package to directory names" +msgstr "Un dictionnaire des paquets et des noms de dossiers" + +#: distutils/apiref.rst:127 +msgid "" +"Run a setup script in a somewhat controlled environment, and return the :" +"class:`distutils.dist.Distribution` instance that drives things. This is " +"useful if you need to find out the distribution meta-data (passed as " +"keyword args from *script* to :func:`setup`), or the contents of the config " +"files or command-line." +msgstr "" +"Exécute un script d'installation dans un environnement quelque peu contrôlé, " +"et renvoie une instance :class:`distutils.dist.distribution` qui contrôle " +"l’exécution. Ceci est utile si vous avez besoin de connaître les méta-" +"données de la distribution (passées sous forme d'arguments nommés de " +"*script* à la fonction :func:`setup`), ou le contenu des fichiers de " +"configuration ou de la ligne de commande." + +#: distutils/apiref.rst:133 +msgid "" +"*script_name* is a file that will be read and run with :func:`exec`. ``sys." +"argv[0]`` will be replaced with *script* for the duration of the call. " +"*script_args* is a list of strings; if supplied, ``sys.argv[1:]`` will be " +"replaced by *script_args* for the duration of the call." +msgstr "" +"*script_name* est un fichier qui sera lu et exécuté avec :func:`exec`. ``sys." +"argv[0]`` sera remplacé par *script* par la durée de l'appel. *script_args* " +"est une liste de chaînes de caractères ; s'il est fourni, ``sys.argv[1:]`` " +"sera remplacé par *script_args* pour la durée de l'appel." + +#: distutils/apiref.rst:138 +msgid "" +"*stop_after* tells :func:`setup` when to stop processing; possible values:" +msgstr "*stop_after* dit à :func:`setup` quand s'arrêter ; valeurs possibles :" + +#: distutils/apiref.rst:562 distutils/apiref.rst:1606 +msgid "description" +msgstr "description" + +#: distutils/apiref.rst:145 +msgid "*init*" +msgstr "*init*" + +#: distutils/apiref.rst:145 +msgid "" +"Stop after the :class:`Distribution` instance has been created and " +"populated with the keyword arguments to :func:`setup`" +msgstr "" +"S'arrête une fois que l'instance :class:`Distribution` a été créée et " +"renseignée avec les arguments nommés de :func:`setup`" + +#: distutils/apiref.rst:149 +msgid "*config*" +msgstr "*config*" + +#: distutils/apiref.rst:149 +msgid "" +"Stop after config files have been parsed (and their data stored in the :" +"class:`Distribution` instance)" +msgstr "" +"S'arrête une fois que les fichiers de configuration ont été parcourus (et " +"que leurs données ont été stockées dans l'instance :class:`Distribution`)" + +#: distutils/apiref.rst:153 +msgid "*commandline*" +msgstr "*commandline*" + +#: distutils/apiref.rst:153 +msgid "" +"Stop after the command-line (``sys.argv[1:]`` or *script_args*) have been " +"parsed (and the data stored in the :class:`Distribution` instance.)" +msgstr "" +"S'arrête une fois que la ligne de commande (``sys.argv[1:]`` ou " +"*script_args*) a été parcourue (et les données stockées dans l'instance :" +"class:`Distribution`)." + +#: distutils/apiref.rst:158 +msgid "*run*" +msgstr "*run*" + +#: distutils/apiref.rst:158 +msgid "" +"Stop after all commands have been run (the same as if :func:`setup` had " +"been called in the usual way). This is the default value." +msgstr "" +"S'arrête une fois que toutes les commandes ont été exécutées (comme si :func:" +"`setup` fût appelé de la manière habituelle). Ceci est la valeur par défaut." + +#: distutils/apiref.rst:164 +msgid "" +"In addition, the :mod:`distutils.core` module exposed a number of classes " +"that live elsewhere." +msgstr "" +"De plus, le module :mod:`distutils.core` a exposé un nombre de classe qui " +"existent ailleurs." + +#: distutils/apiref.rst:167 +msgid ":class:`~distutils.extension.Extension` from :mod:`distutils.extension`" +msgstr "" +":class:`~distutils.extension.Extension` du module :mod:`distutils.extension`" + +#: distutils/apiref.rst:169 +msgid ":class:`~distutils.cmd.Command` from :mod:`distutils.cmd`" +msgstr ":class:`~distutils.cmd.Command` du module :mod:`distutils.cmd`" + +#: distutils/apiref.rst:171 +msgid ":class:`~distutils.dist.Distribution` from :mod:`distutils.dist`" +msgstr ":class:`~distutils.dist.Distribution` du module :mod:`distutils.dist`" + +#: distutils/apiref.rst:173 +msgid "" +"A short description of each of these follows, but see the relevant module " +"for the full reference." +msgstr "" +"Une courte description de chacune d'elle suit, mais consultez le module " +"concerné pour une référence complète." + +#: distutils/apiref.rst:179 +msgid "" +"The Extension class describes a single C or C++ extension module in a setup " +"script. It accepts the following keyword arguments in its constructor:" +msgstr "" +"La classe *Extension* décrit un seul module d'extension C ou C++ dans un " +"script d'installation. Elle accepte dans son constructeur les arguments " +"nommés suivants :" + +#: distutils/apiref.rst:187 +msgid "" +"the full name of the extension, including any packages --- ie. *not* a " +"filename or pathname, but Python dotted name" +msgstr "" +"Le nom complet de l'extension, incluant n'importe quel paquet — c.-à-d. " +"*pas* un nom de fichier ou de chemin mais un nom Python séparé par des " +"points." + +#: distutils/apiref.rst:193 +msgid "*sources*" +msgstr "*sources*" + +#: distutils/apiref.rst:193 +msgid "" +"list of source filenames, relative to the distribution root (where the setup " +"script lives), in Unix form (slash-separated) for portability. Source files " +"may be C, C++, SWIG (.i), platform-specific resource files, or whatever else " +"is recognized by the :command:`build_ext` command as source for a Python " +"extension." +msgstr "" +"Listes des noms de fichier des sources, relatifs à la racine de la " +"distribution (où est placé le script *setup.py*), dans un format Unix " +"(séparé par des slashs) dans un souci de portabilité. Les fichiers de code " +"source peuvent être du C, C++, SWIG (*.i*), des fichiers de ressources " +"spécifiques à la plateforme ou tout autre reconnu par la commande :command:" +"`build_ext` comme source d'une extension Python." + +#: distutils/apiref.rst:207 +msgid "*include_dirs*" +msgstr "*include_dirs*" + +#: distutils/apiref.rst:207 +msgid "" +"list of directories to search for C/C++ header files (in Unix form for " +"portability)" +msgstr "" +"Liste des répertoires où chercher les fichiers d'entêtes C/C++ (en format " +"Unix dans un souci de portabilité)." + +#: distutils/apiref.rst:211 +msgid "*define_macros*" +msgstr "*define_macros*" + +#: distutils/apiref.rst:211 +msgid "" +"list of macros to define; each macro is defined using a 2-tuple ``(name, " +"value)``, where *value* is either the string to define it to or ``None`` to " +"define it without a particular value (equivalent of ``#define FOO`` in " +"source or :option:`!-DFOO` on Unix C compiler command line)" +msgstr "" +"Liste de macros à définir ; chaque macro est définie à l'aide d'un couple " +"``(name, value)``, où *value* correspond soit à la chaîne sur laquelle la " +"macro doit être définie, soit à ``None`` pour définir la macro sur aucune " +"valeur particulière (équivalent à ``#define TRUC`` dans la source ou à :" +"option:`!-DTRUC` dans la ligne de commande du compilateur C Unix." + +#: distutils/apiref.rst:211 +msgid "a list of tuples" +msgstr "une liste de *n*-uplets" + +#: distutils/apiref.rst:223 +msgid "*undef_macros*" +msgstr "*undef_macros*" + +#: distutils/apiref.rst:223 +msgid "list of macros to undefine explicitly" +msgstr "Liste de macros à ignorer explicitement." + +#: distutils/apiref.rst:226 +msgid "*library_dirs*" +msgstr "*library_dirs*" + +#: distutils/apiref.rst:226 +msgid "list of directories to search for C/C++ libraries at link time" +msgstr "" +"Liste de répertoires à parcourir pour chercher les bibliothèques C/C++ lors " +"de la phase d'édition de liens." + +#: distutils/apiref.rst:230 +msgid "*libraries*" +msgstr "*libraries*" + +#: distutils/apiref.rst:230 +msgid "list of library names (not filenames or paths) to link against" +msgstr "" +"Liste de noms de bibliothèques à lier à la compilation. Pas de noms de " +"fichiers ou de chemin." + +#: distutils/apiref.rst:234 +msgid "*runtime_library_dirs*" +msgstr "*runtime_library_dirs*" + +#: distutils/apiref.rst:234 +msgid "" +"list of directories to search for C/C++ libraries at run time (for shared " +"extensions, this is when the extension is loaded)" +msgstr "" +"Liste de répertoires à parcourir pour les bibliothèques C/C++ lors de la " +"phase d'exécution. Pour les extensions partagées, c'est à ce moment que " +"l'extension est chargée." + +#: distutils/apiref.rst:240 +msgid "*extra_objects*" +msgstr "*extra_objects*" + +#: distutils/apiref.rst:240 +msgid "" +"list of extra files to link with (eg. object files not implied by 'sources', " +"static library that must be explicitly specified, binary resource files, " +"etc.)" +msgstr "" +"Liste des fichiers supplémentaires à lier (par exemple les fichiers d'objets " +"non explicités dans les 'sources', bibliothèque statique qui doit être " +"explicitement spécifiée, fichiers de ressources binaires, etc.)." + +#: distutils/apiref.rst:247 +msgid "*extra_compile_args*" +msgstr "*extra_compile_args*" + +#: distutils/apiref.rst:247 +msgid "" +"any extra platform- and compiler-specific information to use when compiling " +"the source files in 'sources'. For platforms and compilers where a command " +"line makes sense, this is typically a list of command-line arguments, but " +"for other platforms it could be anything." +msgstr "" +"Toute information supplémentaire spécifique à la plate-forme et au " +"compilateur à utiliser lors de la compilation des fichiers sources dans " +"'sources'. Pour les plates-formes et les compilateurs où une ligne de " +"commande a du sens, il s'agit généralement d'une liste d'arguments de ligne " +"de commande, mais pour d'autres plates-formes, cela peut être n'importe quoi." + +#: distutils/apiref.rst:258 +msgid "*extra_link_args*" +msgstr "*extra_link_args*" + +#: distutils/apiref.rst:258 +msgid "" +"any extra platform- and compiler-specific information to use when linking " +"object files together to create the extension (or to create a new static " +"Python interpreter). Similar interpretation as for 'extra_compile_args'." +msgstr "" +"Toute information supplémentaire spécifique à la plate-forme et au " +"compilateur à utiliser lors de la liaison de fichiers objets pour créer " +"l'extension (ou pour créer un nouvel interpréteur Python statique). " +"Interprétation similaire à celle de *extra_compile_args*." + +#: distutils/apiref.rst:267 +msgid "*export_symbols*" +msgstr "*export_symbols*" + +#: distutils/apiref.rst:267 +msgid "" +"list of symbols to be exported from a shared extension. Not used on all " +"platforms, and not generally necessary for Python extensions, which " +"typically export exactly one symbol: ``init`` + extension_name." +msgstr "" +"Liste des symboles à exporter à partir d'une extension partagée. N'est pas " +"utilisé sur toutes les plates-formes et n'est généralement pas nécessaire " +"pour les extensions Python, qui exportent généralement exactement un " +"symbole : ``init + nom_de_l'extension``." + +#: distutils/apiref.rst:275 +msgid "*depends*" +msgstr "*depends*" + +#: distutils/apiref.rst:275 +msgid "list of files that the extension depends on" +msgstr "Liste des fichiers dont dépend l'extension." + +#: distutils/apiref.rst:278 +msgid "*language*" +msgstr "*language*" + +#: distutils/apiref.rst:278 +msgid "" +"extension language (i.e. ``'c'``, ``'c++'``, ``'objc'``). Will be detected " +"from the source extensions if not provided." +msgstr "" +"Langage de l'extension (par exemple ``'c'``, ``'c++'``, ``'objc'``). Il sera " +"détecté selon l'extension de la source s'il n'est pas précisé." + +#: distutils/apiref.rst:284 +msgid "*optional*" +msgstr "*optional*" + +#: distutils/apiref.rst:284 +msgid "" +"specifies that a build failure in the extension should not abort the build " +"process, but simply skip the extension." +msgstr "" +"Spécifie qu'un échec de compilation dans l'extension ne doit pas interrompre " +"le processus de compilation, mais simplement ignorer l'extension." + +#: distutils/apiref.rst:284 +msgid "a boolean" +msgstr "un booléen" + +#: distutils/apiref.rst:292 +msgid "" +"On Unix, C extensions are no longer linked to libpython except on Android " +"and Cygwin." +msgstr "" +"Sur Unix, les extensions C ne sont plus liées à *libpython* sauf sur Android " +"et Cygwin." + +#: distutils/apiref.rst:298 +msgid "" +"A :class:`Distribution` describes how to build, install and package up a " +"Python software package." +msgstr "" +"Une classe :class:`Distribution` décrit comment compiler, installer et " +"empaqueter un paquet logiciel Python." + +#: distutils/apiref.rst:301 +msgid "" +"See the :func:`setup` function for a list of keyword arguments accepted by " +"the Distribution constructor. :func:`setup` creates a Distribution instance." +msgstr "" +"Voir la fonction :func:`setup` pour une liste des arguments nommés acceptés " +"par le constructeur *Distribution*. :func:`setup` crée une instance de " +"Distribution." + +#: distutils/apiref.rst:304 +msgid "" +":class:`~distutils.core.Distribution` now warns if ``classifiers``, " +"``keywords`` and ``platforms`` fields are not specified as a list or a " +"string." +msgstr "" +":class:`~distutils.core.Distribution` avertit maintenant si les champs " +"``classifiers``, ``keywords`` et ``platforms`` ne sont pas spécifiés comme " +"une liste ou une chaîne de caractères." + +#: distutils/apiref.rst:311 +msgid "" +"A :class:`Command` class (or rather, an instance of one of its subclasses) " +"implement a single distutils command." +msgstr "" +"Une classe :class:`Command` (ou plutôt une instance d'une de ses sous-" +"classes) implémente une commande *distutils* unique." + +#: distutils/apiref.rst:316 +msgid ":mod:`distutils.ccompiler` --- CCompiler base class" +msgstr ":mod:`distutils.ccompiler` — Classe de base CCompiler" + +#: distutils/apiref.rst:322 +msgid "" +"This module provides the abstract base class for the :class:`CCompiler` " +"classes. A :class:`CCompiler` instance can be used for all the compile and " +"link steps needed to build a single project. Methods are provided to set " +"options for the compiler --- macro definitions, include directories, link " +"path, libraries and the like." +msgstr "" +"Ce module fournit la classe de base abstraite pour les classes :class:" +"`CCompiler`. Une instance de :class:`CCompiler` peut être utilisée pour " +"toutes les étapes de compilation et de liaison nécessaires à la compilation " +"d'un projet unique. Des méthodes sont fournies pour définir des options pour " +"le compilateur — définitions de macros, inclusion des répertoires, des " +"chemins de liens, des bibliothèques, etc." + +#: distutils/apiref.rst:328 +msgid "This module provides the following functions." +msgstr "Ce module fournit les fonctions suivantes." + +#: distutils/apiref.rst:333 +msgid "" +"Generate linker options for searching library directories and linking with " +"specific libraries. *libraries* and *library_dirs* are, respectively, lists " +"of library names (not filenames!) and search directories. Returns a list of " +"command-line options suitable for use with some compiler (depending on the " +"two format strings passed in)." +msgstr "" +"Génère des options de liaison pour chercher dans les répertoires des " +"bibliothèques et pour effectuer les liaisons avec des bibliothèques " +"spécifiques. *libraries* et *library_dirs* sont, respectivement, des listes " +"de noms de bibliothèques (pas de noms de fichiers !) et de répertoires à " +"rechercher. Renvoie une liste d'options de ligne de commande utilisables " +"avec certains compilateurs (en fonction des deux chaînes de format " +"transmises)." + +#: distutils/apiref.rst:342 +msgid "" +"Generate C pre-processor options (:option:`!-D`, :option:`!-U`, :option:`!-" +"I`) as used by at least two types of compilers: the typical Unix compiler " +"and Visual C++. *macros* is the usual thing, a list of 1- or 2-tuples, where " +"``(name,)`` means undefine (:option:`!-U`) macro *name*, and ``(name, " +"value)`` means define (:option:`!-D`) macro *name* to *value*. " +"*include_dirs* is just a list of directory names to be added to the header " +"file search path (:option:`!-I`). Returns a list of command-line options " +"suitable for either Unix compilers or Visual C++." +msgstr "" +"Génère les options du préprocesseur C (:option:`!-D`, :option:`!-U`, :option:" +"`!-I`) utilisées par au moins deux types de compilateurs : le compilateur " +"Unix classique et Visual C++. *macros* est une liste de couples où " +"``(name,)`` est traité comme *non définie* (:option:`!-U`) ; ``(name, " +"value)`` est traité comme *définie* (:option:`!-D`). *include_dirs* est la " +"liste de noms de répertoires à ajouter au chemin de recherche du fichier " +"d'en-tête (:option:`!-I`). Renvoie une liste d'options de ligne de commande " +"pour les compilateurs Unix ou Visual C++." + +#: distutils/apiref.rst:354 +msgid "Determine the default compiler to use for the given platform." +msgstr "" +"Détermine le compilateur par défaut à utiliser par une plateforme donnée." + +#: distutils/apiref.rst:356 +msgid "" +"*osname* should be one of the standard Python OS names (i.e. the ones " +"returned by ``os.name``) and *platform* the common value returned by ``sys." +"platform`` for the platform in question." +msgstr "" +"*osname* doit être l'un des noms d'OS Python standard (c'est-à-dire un des " +"noms renvoyés par ``os.name``) et *platform* la valeur ordinaire renvoyée " +"par ``sys.platform`` pour la plate-forme en question." + +#: distutils/apiref.rst:360 +msgid "" +"The default values are ``os.name`` and ``sys.platform`` in case the " +"parameters are not given." +msgstr "" +"Les valeurs par défaut sont ``os.name`` et ``sys.platform`` si les " +"paramètres ne sont pas fournis." + +#: distutils/apiref.rst:366 +msgid "" +"Factory function to generate an instance of some CCompiler subclass for the " +"supplied platform/compiler combination. *plat* defaults to ``os.name`` (eg. " +"``'posix'``, ``'nt'``), and *compiler* defaults to the default compiler for " +"that platform. Currently only ``'posix'`` and ``'nt'`` are supported, and " +"the default compilers are \"traditional Unix interface\" (:class:" +"`UnixCCompiler` class) and Visual C++ (:class:`MSVCCompiler` class). Note " +"that it's perfectly possible to ask for a Unix compiler object under " +"Windows, and a Microsoft compiler object under Unix---if you supply a value " +"for *compiler*, *plat* is ignored." +msgstr "" +"Fonction de génération produisant une instance d'une sous-classe CCompiler " +"pour la combinaison plateforme/compilateur fournie. Par défaut, *plat* est " +"le ``os.name`` (par exemple ``'posix'``, ``'nt'``), et *compiler* est le " +"compilateur par défaut pour cette plate-forme. Actuellement, seuls " +"``'posix'`` et ``'nt'`` sont gérés, et les compilateurs par défaut sont ceux " +"qui gèrent une \"interface Unix traditionnelle\" (:class:`UnixCCompiler`) et " +"Visual C++ (:class:`MSVCCompiler`). Notez qu'il est tout à fait possible de " +"demander un objet compilateur Unix sous Windows, et un objet compilateur " +"Microsoft sous Unix. Si vous fournissez une valeur pour *compiler*, *plat* " +"est ignoré." + +#: distutils/apiref.rst:382 +msgid "" +"Print list of available compilers (used by the :option:`!--help-compiler` " +"options to :command:`build`, :command:`build_ext`, :command:`build_clib`)." +msgstr "" +"Affiche la liste des compilateurs disponibles (utilisés par l'option :option:" +"`!--help-compiler` pour les commandes :command:`build`, :command:" +"`build_ext`, :command:`build_clib`)." + +#: distutils/apiref.rst:388 +msgid "" +"The abstract base class :class:`CCompiler` defines the interface that must " +"be implemented by real compiler classes. The class also has some utility " +"methods used by several compiler classes." +msgstr "" +"La classe de base abstraite :class:`CCompiler` définit l'interface qui doit " +"être implémentée par des classes de compilateur concrètes. La classe " +"possède également quelques méthodes utilitaires utilisées par plusieurs " +"classes de compilateurs." + +#: distutils/apiref.rst:392 +msgid "" +"The basic idea behind a compiler abstraction class is that each instance can " +"be used for all the compile/link steps in building a single project. Thus, " +"attributes common to all of those compile and link steps --- include " +"directories, macros to define, libraries to link against, etc. --- are " +"attributes of the compiler instance. To allow for variability in how " +"individual files are treated, most of those attributes may be varied on a " +"per-compilation or per-link basis." +msgstr "" +"L'idée de base derrière une classe abstraite de compilateur est que chaque " +"instance peut être utilisée pour toutes les étapes de compilation/lien dans " +"la construction d'un seul projet. Ainsi, les attributs communs à toutes ces " +"étapes de compilation et de liaison (ce qui inclut les répertoires, les " +"macros à définir, les bibliothèques à relier, etc.) sont des attributs de " +"l'instance du compilateur. Pour tenir compte des variations dans la façon " +"dont chaque fichier est traité, la plupart de ces attributs peuvent être " +"modifiés en fonction de chaque compilation ou de chaque lien." + +#: distutils/apiref.rst:400 +msgid "" +"The constructor for each subclass creates an instance of the Compiler " +"object. Flags are *verbose* (show verbose output), *dry_run* (don't actually " +"execute the steps) and *force* (rebuild everything, regardless of " +"dependencies). All of these flags default to ``0`` (off). Note that you " +"probably don't want to instantiate :class:`CCompiler` or one of its " +"subclasses directly - use the :func:`distutils.CCompiler.new_compiler` " +"factory function instead." +msgstr "" +"Le constructeur de chaque sous-classe crée une instance de l'objet " +"*Compiler*. Les paramètres optionnels sont *verbose* (affiche plus " +"d'information à l'exécution), *dry_run* (ne pas exécuter les étapes) et " +"*force* (tout reconstruire, indépendamment des dépendances). Tous ces " +"paramètres ont la valeur par défaut ``0`` (désactivé). Notez que vous ne " +"voulez probablement pas instancier directement la classe :class:`CCompiler` " +"ou une de ses sous-classes. Utilisez plutôt la fonction génératrice :func:" +"`distutils.CCompiler.new_compiler`." + +#: distutils/apiref.rst:407 +msgid "" +"The following methods allow you to manually alter compiler options for the " +"instance of the Compiler class." +msgstr "" +"Les méthodes suivantes vous permettent de modifier manuellement les options " +"du compilateur de l'instance de la classe *Compiler*." + +#: distutils/apiref.rst:413 +msgid "" +"Add *dir* to the list of directories that will be searched for header files. " +"The compiler is instructed to search directories in the order in which they " +"are supplied by successive calls to :meth:`add_include_dir`." +msgstr "" +"Ajoute *dir* à la liste des répertoires qui sont recherchés pour les " +"fichiers d'en-tête. Le compilateur est chargé de rechercher les répertoires " +"dans l'ordre dans lequel ils sont fournis par des appels successifs à :meth:" +"`add_include_dir`." + +#: distutils/apiref.rst:420 +msgid "" +"Set the list of directories that will be searched to *dirs* (a list of " +"strings). Overrides any preceding calls to :meth:`add_include_dir`; " +"subsequent calls to :meth:`add_include_dir` add to the list passed to :meth:" +"`set_include_dirs`. This does not affect any list of standard include " +"directories that the compiler may search by default." +msgstr "" +"Affecte la liste des répertoires qui seront recherchés à la valeur de *dirs* " +"(une liste de chaînes). Remplace tous les appels précédents de :meth:" +"`add_include_dir` ; les appels suivants de :meth:`add_include_dir` " +"s'ajoutent à la liste transmise par :meth:`set_include_dirs`. Ceci n'affecte " +"pas la liste des répertoires d'inclusion standard que le compilateur peut " +"rechercher par défaut." + +#: distutils/apiref.rst:429 +msgid "" +"Add *libname* to the list of libraries that will be included in all links " +"driven by this compiler object. Note that *libname* should \\*not\\* be the " +"name of a file containing a library, but the name of the library itself: the " +"actual filename will be inferred by the linker, the compiler, or the " +"compiler class (depending on the platform)." +msgstr "" +"Ajoute *libname* à la liste des bibliothèques qui seront incluses dans tous " +"les liens gérés par l'objet compilateur. Notez que *libname* ne *doit pas " +"être* le nom d'un fichier contenant une bibliothèque, mais le nom de la " +"bibliothèque elle-même : le nom du fichier sera déduit par l'éditeur de " +"liens, le compilateur ou la classe de compilation (selon la plate-forme)." + +#: distutils/apiref.rst:435 +msgid "" +"The linker will be instructed to link against libraries in the order they " +"were supplied to :meth:`add_library` and/or :meth:`set_libraries`. It is " +"perfectly valid to duplicate library names; the linker will be instructed to " +"link against libraries as many times as they are mentioned." +msgstr "" +"L'éditeur de liens est chargé de lier les bibliothèques dans l'ordre dans " +"lequel elles sont fournies à :meth:`add_library` et/ou :meth:" +"`set_libraries`. Il est parfaitement valide de dupliquer les noms de " +"bibliothèques ; l'éditeur de liens est chargé de créer des liens avec les " +"bibliothèques autant de fois que les noms sont mentionnés." + +#: distutils/apiref.rst:443 +msgid "" +"Set the list of libraries to be included in all links driven by this " +"compiler object to *libnames* (a list of strings). This does not affect any " +"standard system libraries that the linker may include by default." +msgstr "" +"Affecte la liste des bibliothèques à inclure dans tous les liens gérés par " +"l'objet compilateur avec la valeur de *libnames* (une liste des chaînes de " +"caractères). Ceci n'affecte pas les bibliothèques système standard que " +"l'éditeur de liens peut inclure par défaut." + +#: distutils/apiref.rst:450 +msgid "" +"Add *dir* to the list of directories that will be searched for libraries " +"specified to :meth:`add_library` and :meth:`set_libraries`. The linker will " +"be instructed to search for libraries in the order they are supplied to :" +"meth:`add_library_dir` and/or :meth:`set_library_dirs`." +msgstr "" +"Ajoute *dir* à la liste des répertoires qui seront recherchés pour les " +"bibliothèques spécifiées dans :meth:`add_library` et :meth:`set_libraries`. " +"L'éditeur de liens est chargé de rechercher les bibliothèques dans l'ordre " +"dans lequel elles sont fournies à :meth:`add_library_dir` et/ou :meth:" +"`set_library_dirs`." + +#: distutils/apiref.rst:458 +msgid "" +"Set the list of library search directories to *dirs* (a list of strings). " +"This does not affect any standard library search path that the linker may " +"search by default." +msgstr "" +"Affecte la liste des répertoires de recherche de bibliothèque avec la valeur " +"de *dirs* (une liste de chaînes de caractères). Cela n'affecte pas le " +"chemin de recherche standard de la bibliothèque que l'éditeur de liens peut " +"rechercher par défaut." + +#: distutils/apiref.rst:465 +msgid "" +"Add *dir* to the list of directories that will be searched for shared " +"libraries at runtime." +msgstr "" +"Ajoute *dir* à la liste des répertoires qui seront recherchés par les " +"bibliothèques partagées au moment de l'exécution." + +#: distutils/apiref.rst:471 +msgid "" +"Set the list of directories to search for shared libraries at runtime to " +"*dirs* (a list of strings). This does not affect any standard search path " +"that the runtime linker may search by default." +msgstr "" +"Affecte la liste des répertoires pour rechercher les bibliothèques partagées " +"au moment de l'exécution à la valeur de *dirs* (une liste des chaînes de " +"caractères). Ceci n'affecte aucun chemin de recherche standard que " +"l'éditeur de liens d'exécution peut rechercher par défaut." + +#: distutils/apiref.rst:478 +msgid "" +"Define a preprocessor macro for all compilations driven by this compiler " +"object. The optional parameter *value* should be a string; if it is not " +"supplied, then the macro will be defined without an explicit value and the " +"exact outcome depends on the compiler used." +msgstr "" +"Définit une macro de préprocesseur pour toutes les compilations gérées par " +"cet objet compilateur. Le paramètre optionnel *value* doit être une chaîne " +"de caractères ; s'il n'est pas fourni, alors la macro sera définie sans " +"valeur explicite et le résultat exact dépendra du compilateur utilisé." + +#: distutils/apiref.rst:488 +msgid "" +"Undefine a preprocessor macro for all compilations driven by this compiler " +"object. If the same macro is defined by :meth:`define_macro` and undefined " +"by :meth:`undefine_macro` the last call takes precedence (including multiple " +"redefinitions or undefinitions). If the macro is redefined/undefined on a " +"per-compilation basis (ie. in the call to :meth:`compile`), then that takes " +"precedence." +msgstr "" +"Désactive une macro de préprocesseur pour toutes les compilations gérées par " +"cet objet compilateur. Si la même macro est définie par :meth:" +"`define_macro` et ensuite désactivée par un appel à :meth:`undefine_macro`, " +"le dernier appel est prioritaire (y compris en cas de redéfinitions " +"multiples). Si la macro est redéfinie/désactivée par compilation (c'est-à-" +"dire dans l'appel à :meth:`compile`), alors cet appel prévaut." + +#: distutils/apiref.rst:498 +msgid "" +"Add *object* to the list of object files (or analogues, such as explicitly " +"named library files or the output of \"resource compilers\") to be included " +"in every link driven by this compiler object." +msgstr "" +"Ajoute *objet* à la liste des fichiers objets (ou analogues, tels que les " +"fichiers de bibliothèque explicitement nommés ou la sortie des " +"\"compilateurs de ressources\") à inclure dans chaque lien qui est géré par " +"ce compilateur d'objets." + +#: distutils/apiref.rst:505 +msgid "" +"Set the list of object files (or analogues) to be included in every link to " +"*objects*. This does not affect any standard object files that the linker " +"may include by default (such as system libraries)." +msgstr "" +"Définit la liste des fichiers objets (ou analogues) à inclure dans chaque " +"lien à la valeur de *objects*. Ceci n'affecte pas les fichiers d'objets " +"standard que l'éditeur de liens peut inclure par défaut (comme les " +"bibliothèques système)." + +#: distutils/apiref.rst:509 +msgid "" +"The following methods implement methods for autodetection of compiler " +"options, providing some functionality similar to GNU :program:`autoconf`." +msgstr "" +"Les méthodes suivantes offrent des services pour l'auto-détection des " +"options du compilateur. Elles offrent des fonctionnalités similaires à " +"celles du programme GNU :program:`autoconf`." + +#: distutils/apiref.rst:515 +msgid "" +"Detect the language of a given file, or list of files. Uses the instance " +"attributes :attr:`language_map` (a dictionary), and :attr:`language_order` " +"(a list) to do the job." +msgstr "" +"Détecte le langage d'un fichier donné, ou d'une liste de fichiers. Utilise " +"les attributs d'instance :attr:`language_map` (un dictionnaire) et :attr:" +"`language_order` (une liste) pour faire le travail." + +#: distutils/apiref.rst:522 +msgid "" +"Search the specified list of directories for a static or shared library file " +"*lib* and return the full path to that file. If *debug* is true, look for a " +"debugging version (if that makes sense on the current platform). Return " +"``None`` if *lib* wasn't found in any of the specified directories." +msgstr "" +"Recherche dans la liste des répertoires spécifiés un fichier de bibliothèque " +"statique ou partagée *lib* et renvoie le chemin complet vers ce fichier. Si " +"*debug* est vrai, recherche une version de débogage (si cela a du sens sur " +"la plate-forme actuelle). Renvoie ``None`` si *lib* n'a pas été trouvé dans " +"l'un des répertoires spécifiés." + +#: distutils/apiref.rst:530 +msgid "" +"Return a boolean indicating whether *funcname* is supported on the current " +"platform. The optional arguments can be used to augment the compilation " +"environment by providing additional include files and paths and libraries " +"and paths." +msgstr "" +"Renvoie un booléen indiquant si *funcname* est pris en charge sur la plate-" +"forme courante. Les arguments optionnels peuvent être utilisés pour " +"enrichir l'environnement de compilation en fournissant des fichiers, des " +"répertoires de fichiers, des bibliothèques, des répertoires de bibliothèques " +"supplémentaires" + +#: distutils/apiref.rst:538 +msgid "" +"Return the compiler option to add *dir* to the list of directories searched " +"for libraries." +msgstr "" +"Renvoie l'option de compilation pour ajouter *dir* à la liste des " +"répertoires recherchés pour les bibliothèques." + +#: distutils/apiref.rst:544 +msgid "" +"Return the compiler option to add *lib* to the list of libraries linked into " +"the shared library or executable." +msgstr "" +"Renvoie l'option de compilation pour ajouter *lib* à la liste des " +"bibliothèques liées à la bibliothèque partagée ou à l'exécutable." + +#: distutils/apiref.rst:550 +msgid "" +"Return the compiler option to add *dir* to the list of directories searched " +"for runtime libraries." +msgstr "" +"Renvoie l'option de compilation pour ajouter *dir* à la liste des " +"répertoires recherchés par les bibliothèques d'exécution." + +#: distutils/apiref.rst:556 +msgid "" +"Define the executables (and options for them) that will be run to perform " +"the various stages of compilation. The exact set of executables that may be " +"specified here depends on the compiler class (via the 'executables' class " +"attribute), but most will have:" +msgstr "" +"Définit les exécutables (et leurs options) qui seront exécutés pour " +"effectuer les différentes étapes de compilation. L'ensemble exact des " +"exécutables qui peuvent être spécifiés ici dépend de la classe du " +"compilateur (via l'attribut de classe *executables*), mais la plupart " +"utilisent :" + +#: distutils/apiref.rst:562 +msgid "attribute" +msgstr "attribut" + +#: distutils/apiref.rst:564 +msgid "*compiler*" +msgstr "*compiler*" + +#: distutils/apiref.rst:564 +msgid "the C/C++ compiler" +msgstr "Le compilateur C/C++." + +#: distutils/apiref.rst:566 +msgid "*linker_so*" +msgstr "*linker_so*" + +#: distutils/apiref.rst:566 +msgid "linker used to create shared objects and libraries" +msgstr "" +"L'éditeur de liens utilisé pour la création d'objets ou de bibliothèques " +"partagées." + +#: distutils/apiref.rst:569 +msgid "*linker_exe*" +msgstr "*linker_exe*" + +#: distutils/apiref.rst:569 +msgid "linker used to create binary executables" +msgstr "L'éditeur de lien utilisé pour créer des exécutables binaires." + +#: distutils/apiref.rst:571 +msgid "*archiver*" +msgstr "*archiver*" + +#: distutils/apiref.rst:571 +msgid "static library creator" +msgstr "Créateur de bibliothèque statique." + +#: distutils/apiref.rst:574 +msgid "" +"On platforms with a command-line (Unix, DOS/Windows), each of these is a " +"string that will be split into executable name and (optional) list of " +"arguments. (Splitting the string is done similarly to how Unix shells " +"operate: words are delimited by spaces, but quotes and backslashes can " +"override this. See :func:`distutils.util.split_quoted`.)" +msgstr "" +"Sur les plates-formes disposant d'un outil de ligne de commande (Unix, DOS/" +"Windows), chacun de ces éléments est une chaîne qui sera fractionnée en un " +"nom exécutable et, éventuellement, une liste d'arguments. Le fractionnement " +"de la chaîne est réalisé selon la même procédure que celle appliquée par les " +"*shells* Unix : les mots sont délimités par des espaces, mais les guillemets " +"et les antislashs permettent de les ignorer. Voir :func:`distutils.util." +"split_quoted`." + +#: distutils/apiref.rst:580 +msgid "The following methods invoke stages in the build process." +msgstr "" +"Les méthodes suivantes permettent d'exécuter des étapes lors de processus de " +"construction." + +#: distutils/apiref.rst:585 +msgid "" +"Compile one or more source files. Generates object files (e.g. transforms " +"a :file:`.c` file to a :file:`.o` file.)" +msgstr "" +"Compile un ou plusieurs fichiers source. Génère des fichiers objets (par " +"exemple, transforme un fichier :file:`.c` en fichier :file:`.o`)." + +#: distutils/apiref.rst:588 +msgid "" +"*sources* must be a list of filenames, most likely C/C++ files, but in " +"reality anything that can be handled by a particular compiler and compiler " +"class (eg. :class:`MSVCCompiler` can handle resource files in *sources*). " +"Return a list of object filenames, one per source filename in *sources*. " +"Depending on the implementation, not all source files will necessarily be " +"compiled, but all corresponding object filenames will be returned." +msgstr "" +"*sources* doit être une liste de noms de fichiers, généralement des fichiers " +"C/C++, mais elle pourrait contenir n'importe quel fichier géré par un " +"compilateur et une classe de compilateur (par exemple, :class:`MSVCCompiler` " +"peut gérer les fichiers de ressources dans *sources*). Renvoie une liste de " +"noms de fichiers objet : un objet par nom de fichier dans *sources*. Selon " +"les cas, tous les fichiers source ne seront pas forcément compilés, mais " +"tous les noms de fichiers objet correspondants seront renvoyés." + +#: distutils/apiref.rst:595 +msgid "" +"If *output_dir* is given, object files will be put under it, while retaining " +"their original path component. That is, :file:`foo/bar.c` normally compiles " +"to :file:`foo/bar.o` (for a Unix implementation); if *output_dir* is " +"*build*, then it would compile to :file:`build/foo/bar.o`." +msgstr "" +"Si *output_dir* est donné, les fichiers objets seront placés à l'intérieur, " +"tout en conservant leurs chemins relatifs. Par exemple, le :file:`truc/" +"machin.c` compile normalement en :file:`truc/machin.o` (pour une " +"implémentation Unix) ; si *output_dir* a la valeur *build*, alors il " +"compilera en :file:`build/truc/machin.o`." + +#: distutils/apiref.rst:600 +msgid "" +"*macros*, if given, must be a list of macro definitions. A macro definition " +"is either a ``(name, value)`` 2-tuple or a ``(name,)`` 1-tuple. The former " +"defines a macro; if the value is ``None``, the macro is defined without an " +"explicit value. The 1-tuple case undefines a macro. Later definitions/" +"redefinitions/undefinitions take precedence." +msgstr "" +"Le paramètre *macros*, s'il est donné, doit être une liste de définitions de " +"macros. Une définition de macro est soit un couple ``(nom, valeur)``, ou un " +"singleton ``(nom,)``. Le premier définit une macro ; si la valeur est " +"``None``, la macro est définie sans valeur explicite. L'utilisation d'un " +"singleton désactive la macro. Les définitions, redéfinitions ou " +"désactivations ultérieures priment." + +#: distutils/apiref.rst:606 +msgid "" +"*include_dirs*, if given, must be a list of strings, the directories to add " +"to the default include file search path for this compilation only." +msgstr "" +"*include_dirs* doit être une liste de chaînes de caractères contenant les " +"répertoires à ajouter au chemin de recherche par défaut pour cette " +"compilation uniquement." + +#: distutils/apiref.rst:609 +msgid "" +"*debug* is a boolean; if true, the compiler will be instructed to output " +"debug symbols in (or alongside) the object file(s)." +msgstr "" +"*debug* est un booléen ; si sa valeur est *vraie*, le compilateur est chargé " +"d'afficher les symboles de débogage dans (ou à côté) du ou des fichiers " +"objets." + +#: distutils/apiref.rst:612 +msgid "" +"*extra_preargs* and *extra_postargs* are implementation-dependent. On " +"platforms that have the notion of a command-line (e.g. Unix, DOS/Windows), " +"they are most likely lists of strings: extra command-line arguments to " +"prepend/append to the compiler command line. On other platforms, consult " +"the implementation class documentation. In any event, they are intended as " +"an escape hatch for those occasions when the abstract compiler framework " +"doesn't cut the mustard." +msgstr "" +"*extra_preargs* et *extra_postargs* dépendent de l'implémentation. Sur les " +"plates-formes qui ont une ligne de commande (par exemple Unix, DOS/Windows), " +"il s'agit très probablement de listes de chaînes de caractères. Ce sont des " +"arguments supplémentaires à ajouter avant (*preargs*) et après (*postargs*) " +"la ligne de commande du compilateur. Sur d'autres plates-formes, consultez " +"la documentation de la classe d'implémentation. Ces paramètres sont exposés " +"pour permettre de sortir du cadre de la classe abstraite en cas de nécessité." + +#: distutils/apiref.rst:619 +msgid "" +"*depends*, if given, is a list of filenames that all targets depend on. If " +"a source file is older than any file in depends, then the source file will " +"be recompiled. This supports dependency tracking, but only at a coarse " +"granularity." +msgstr "" +"*depends* est une liste de noms de fichiers dont dépendent toutes les " +"cibles. Si un fichier source est plus ancien qu'un fichier dans *depends*, " +"alors le fichier source sera recompilé. Cela permet un suivi des " +"dépendances à un niveau macro." + +#: distutils/apiref.rst:624 +msgid "Raises :exc:`CompileError` on failure." +msgstr "Lève :exc:`CompileError` en cas d'échec." + +#: distutils/apiref.rst:629 +msgid "" +"Link a bunch of stuff together to create a static library file. The \"bunch " +"of stuff\" consists of the list of object files supplied as *objects*, the " +"extra object files supplied to :meth:`add_link_object` and/or :meth:" +"`set_link_objects`, the libraries supplied to :meth:`add_library` and/or :" +"meth:`set_libraries`, and the libraries supplied as *libraries* (if any)." +msgstr "" +"Relie un ensemble d'éléments pour créer un fichier de bibliothèque statique. " +"L'ensemble d'éléments se compose de la liste des fichiers d'objets fournis " +"comme *objets*, des fichiers d'objets supplémentaires fournis à :meth:" +"`add_link_object` et/ou :meth:`set_link_objects`, des bibliothèques fournies " +"à :meth:`add_library` et/ou :meth:`set_libraries` et les bibliothèques " +"fournies à *libraries* (le cas échéant)." + +#: distutils/apiref.rst:635 +msgid "" +"*output_libname* should be a library name, not a filename; the filename will " +"be inferred from the library name. *output_dir* is the directory where the " +"library file will be put." +msgstr "" +"*output_libname* doit être un nom de bibliothèque et non un nom de fichier ; " +"le nom de fichier sera déduit du nom de bibliothèque. *output_dir* est le " +"répertoire dans lequel le fichier bibliothèque sera placé." + +#: distutils/apiref.rst:641 +msgid "" +"*debug* is a boolean; if true, debugging information will be included in the " +"library (note that on most platforms, it is the compile step where this " +"matters: the *debug* flag is included here just for consistency)." +msgstr "" +"*debug* est un booléen ; si sa valeur est *vraie*, les informations de " +"débogage seront incluses dans la bibliothèque (notez que sur la plupart des " +"plateformes, c'est à l'étape de compilation que ce paramètre est pris en " +"compte : le paramètre *debug* est inclus ici pour assurer une cohérence)." + +#: distutils/apiref.rst:687 +msgid "" +"*target_lang* is the target language for which the given objects are being " +"compiled. This allows specific linkage time treatment of certain languages." +msgstr "" +"*target_lang* est le langage cible pour lequel les objets donnés sont " +"compilés. Cela permet un traitement spécifique du temps de liaison dans " +"certains langages." + +#: distutils/apiref.rst:648 +msgid "Raises :exc:`LibError` on failure." +msgstr "Lève :exc:`LibError` en cas d'échec." + +#: distutils/apiref.rst:653 +msgid "" +"Link a bunch of stuff together to create an executable or shared library " +"file." +msgstr "" +"Relie un ensemble d'éléments pour créer un fichier exécutable ou une " +"bibliothèque partagée." + +#: distutils/apiref.rst:655 +msgid "" +"The \"bunch of stuff\" consists of the list of object files supplied as " +"*objects*. *output_filename* should be a filename. If *output_dir* is " +"supplied, *output_filename* is relative to it (i.e. *output_filename* can " +"provide directory components if needed)." +msgstr "" +"L'ensemble d'éléments se compose de la liste des fichiers objets fournis " +"comme *objects*. *output_filename* doit être un nom de fichier. Si " +"*output_dir* est fourni, *output_filename* lui est relatif (c'est-à-dire que " +"*output_filename* peut être un chemin relatif vers un fichier)." + +#: distutils/apiref.rst:660 +msgid "" +"*libraries* is a list of libraries to link against. These are library " +"names, not filenames, since they're translated into filenames in a platform-" +"specific way (eg. *foo* becomes :file:`libfoo.a` on Unix and :file:`foo.lib` " +"on DOS/Windows). However, they can include a directory component, which " +"means the linker will look in that specific directory rather than searching " +"all the normal locations." +msgstr "" +"*libraries* est une liste de bibliothèques avec lesquelles il est possible " +"d'établir des liens. Ce sont des noms de bibliothèques, pas des noms de " +"fichiers, puisqu'ils sont traduits en noms de fichiers d'une manière " +"spécifique à la plate-forme (par exemple *truc* devient :file:`libtruc.a` " +"sous Unix et :file:`truc.lib` sous DOS/Windows). Cependant, ils peuvent " +"inclure un chemin, ce qui signifie que l'éditeur de liens cherchera dans ce " +"chemin spécifique plutôt que de rechercher tous les emplacements standard." + +#: distutils/apiref.rst:667 +msgid "" +"*library_dirs*, if supplied, should be a list of directories to search for " +"libraries that were specified as bare library names (ie. no directory " +"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.)" +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 " +"bibliothèques pures (c'est-à-dire sans aucun répertoire). Celles-ci " +"s'ajoutent aux valeurs par défaut du système et à celles fournies à :meth:" +"`add_library_dir` et/ou :meth:`set_library_dirs`. *runtime_library_dirs* " +"est une liste de répertoires qui seront intégrés dans la bibliothèque " +"partagée et utilisés pour rechercher d'autres bibliothèques partagées dont " +"elle dépend à l'exécution. (Ceci est probablement valable uniquement sous " +"UNIX.)" + +#: distutils/apiref.rst:675 +msgid "" +"*export_symbols* is a list of symbols that the shared library will export. " +"(This appears to be relevant only on Windows.)" +msgstr "" +"*export_symbols* est une liste de symboles que la bibliothèque partagée va " +"exporter. (Ceci est probablement valable uniquement sous Windows.)" + +#: distutils/apiref.rst:678 +msgid "" +"*debug* is as for :meth:`compile` and :meth:`create_static_lib`, with the " +"slight distinction that it actually matters on most platforms (as opposed " +"to :meth:`create_static_lib`, which includes a *debug* flag mostly for " +"form's sake)." +msgstr "" +"*debug* s'utilise comme pour :meth:`compile` et :meth:`create_static_lib`, " +"avec la nuance qu'elle a ici une importance sur la plupart des plateformes " +"(par opposition à :meth:`create_static_lib` qui inclut une option *debug* " +"pour se conformer à l'interface)." + +#: distutils/apiref.rst:683 +msgid "" +"*extra_preargs* and *extra_postargs* are as for :meth:`compile` (except of " +"course that they supply command-line arguments for the particular linker " +"being used)." +msgstr "" +"*extra_preargs* et *extra_postargs* s'utilisent comme pour :meth:`compile` " +"(sauf bien sûr qu'ils fournissent des arguments à la ligne de commande pour " +"l'éditeur de liens spécifique utilisé)." + +#: distutils/apiref.rst:690 +msgid "Raises :exc:`LinkError` on failure." +msgstr "Lève :exc:`LinkError` en cas d'échec." + +#: distutils/apiref.rst:695 +msgid "" +"Link an executable. *output_progname* is the name of the file executable, " +"while *objects* are a list of object filenames to link in. Other arguments " +"are as for the :meth:`link` method." +msgstr "" +"Lie un exécutable. *output_progname* est le nom de l'exécutable du fichier, " +"tandis que *objects* est une liste de noms de fichiers objets à lier. Les " +"autres arguments sont les mêmes que pour la méthode :meth:`link`." + +#: distutils/apiref.rst:702 +msgid "" +"Link a shared library. *output_libname* is the name of the output library, " +"while *objects* is a list of object filenames to link in. Other arguments " +"are as for the :meth:`link` method." +msgstr "" +"Lie une bibliothèque partagée. *output_libname* est le nom de la " +"bibliothèque de sortie, tandis que *objects* est une liste de noms de " +"fichiers d'objets à lier. Les autres arguments sont les mêmes que pour la " +"méthode :meth:`link`." + +#: distutils/apiref.rst:709 +msgid "" +"Link a shared object. *output_filename* is the name of the shared object " +"that will be created, while *objects* is a list of object filenames to link " +"in. Other arguments are as for the :meth:`link` method." +msgstr "" +"Lie un objet partagé. *output_filename* est le nom de l'objet partagé qui " +"sera créé, tandis que *objects* est une liste de noms de fichiers d'objets à " +"lier. Les autres arguments sont les mêmes que pour la méthode :meth:`link`." + +#: distutils/apiref.rst:716 +msgid "" +"Preprocess a single C/C++ source file, named in *source*. Output will be " +"written to file named *output_file*, or *stdout* if *output_file* not " +"supplied. *macros* is a list of macro definitions as for :meth:`compile`, " +"which will augment the macros set with :meth:`define_macro` and :meth:" +"`undefine_macro`. *include_dirs* is a list of directory names that will be " +"added to the default list, in the same way as :meth:`add_include_dir`." +msgstr "" +"Prétraitement d'un seul fichier source C/C++, désigné dans *source*. La " +"sortie du traitement est écrite dans un fichier nommé *output_file*, ou dans " +"*stdout* si *output_file* n'est pas fourni. *macros* est une liste de " +"définitions de macros comme pour :meth:`compile`, qui vont s'ajouter aux " +"macros définies avec :meth:`define_macro` et :meth:`undefine_macro`. " +"*include_dirs* est une liste de noms de répertoires qui seront ajoutés à la " +"liste par défaut, de la même manière que :meth:`add_include_dir`." + +#: distutils/apiref.rst:723 +msgid "Raises :exc:`PreprocessError` on failure." +msgstr "Lève :exc:`PreprocessError` en cas d'échec." + +#: distutils/apiref.rst:725 +msgid "" +"The following utility methods are defined by the :class:`CCompiler` class, " +"for use by the various concrete subclasses." +msgstr "" +"Les méthodes utilitaires suivantes sont définies par la classe :class:" +"`CCompiler`, à l'usage des différentes sous-classes concrètes." + +#: distutils/apiref.rst:731 +msgid "" +"Returns the filename of the executable for the given *basename*. Typically " +"for non-Windows platforms this is the same as the basename, while Windows " +"will get a :file:`.exe` added." +msgstr "" +"Renvoie le nom de fichier de l'exécutable pour un *nom de base* donné. " +"Généralement, pour les plates-formes non Windows, c'est le même nom que le " +"nom de base, tandis que sur Windows l'extension :file:`.exe` sera ajouté." + +#: distutils/apiref.rst:738 +msgid "" +"Returns the filename for the given library name on the current platform. On " +"Unix a library with *lib_type* of ``'static'`` will typically be of the " +"form :file:`liblibname.a`, while a *lib_type* of ``'dynamic'`` will be of " +"the form :file:`liblibname.so`." +msgstr "" +"Renvoie le nom de fichier pour le nom de bibliothèque donné sur la plate-" +"forme actuelle. Sous Unix, une bibliothèque avec un *lib_type* de type " +"``static`` sera généralement de la forme :file:`liblibname.a`, tandis qu'un " +"*lib_type* de type ``dynamic`` sera de la forme :file:`liblibname.so`." + +#: distutils/apiref.rst:746 +msgid "" +"Returns the name of the object files for the given source files. " +"*source_filenames* should be a list of filenames." +msgstr "" +"Renvoie le nom des fichiers objets pour les fichiers sources donnés. " +"*source_filenames* doit être une liste de noms de fichiers." + +#: distutils/apiref.rst:752 +msgid "" +"Returns the name of a shared object file for the given file name *basename*." +msgstr "" +"Renvoie le nom d'un fichier objet partagé pour le nom de fichier *basename*." + +#: distutils/apiref.rst:757 +msgid "" +"Invokes :func:`distutils.util.execute`. This method invokes a Python " +"function *func* with the given arguments *args*, after logging and taking " +"into account the *dry_run* flag." +msgstr "" +"Invoque :func:`distutils.util.execute`. Cette méthode invoque une fonction " +"Python *func* avec les arguments *args*, après journalisation et prise en " +"compte de l'option *dry_run*." + +#: distutils/apiref.rst:764 +msgid "" +"Invokes :func:`distutils.util.spawn`. This invokes an external process to " +"run the given command." +msgstr "" +"Invoque :func:`distutils.util.spawn`. Invoque un processus externe pour " +"exécuter la commande donnée." + +#: distutils/apiref.rst:770 +msgid "" +"Invokes :func:`distutils.dir_util.mkpath`. This creates a directory and any " +"missing ancestor directories." +msgstr "" +"Invoque :func:`distutils.dir_util.mkpath`. Crée un répertoire et tous les " +"répertoires parents manquants." + +#: distutils/apiref.rst:776 +msgid "Invokes :meth:`distutils.file_util.move_file`. Renames *src* to *dst*." +msgstr "Invoque :meth:`distutils.file_util.move_file`. Renomme *src* en *dst*." + +#: distutils/apiref.rst:781 +msgid "Write a message using :func:`distutils.log.debug`." +msgstr "Écrit un message en utilisant :func:`distutils.log.debug`." + +#: distutils/apiref.rst:786 +msgid "Write a warning message *msg* to standard error." +msgstr "" +"Écris un message d'avertissement *msg* dans la sortie d'erreur standard." + +#: distutils/apiref.rst:791 +msgid "" +"If the *debug* flag is set on this :class:`CCompiler` instance, print *msg* " +"to standard output, otherwise do nothing." +msgstr "" +"Si l'option *debug* est activée pour cette instance de :class:`CCompiler`, " +"affiche *msg* sur la sortie standard, sinon rien ne s'affiche." + +#: distutils/apiref.rst:803 +msgid ":mod:`distutils.unixccompiler` --- Unix C Compiler" +msgstr ":mod:`distutils.unixccompiler` — Compilateur C Unix" + +#: distutils/apiref.rst:809 +msgid "" +"This module provides the :class:`UnixCCompiler` class, a subclass of :class:" +"`CCompiler` that handles the typical Unix-style command-line C compiler:" +msgstr "" +"Ce module fournit la classe :class:`UnixCCompiler`, une sous-classe de la " +"classe :class:`CCompiler` qui gère les compilateurs C ayant une interface en " +"ligne de commande conforme au standard Unix :" + +#: distutils/apiref.rst:812 +msgid "macros defined with :option:`!-Dname[=value]`" +msgstr "macros définies avec l'option :option:`!-Dname[=value]`." + +#: distutils/apiref.rst:814 +msgid "macros undefined with :option:`!-Uname`" +msgstr "macros désaffectées avec :option:`!-Uname`." + +#: distutils/apiref.rst:816 +msgid "include search directories specified with :option:`!-Idir`" +msgstr "" +"inclut les répertoires de recherche spécifiés avec l'option :option:`!-Idir`." + +#: distutils/apiref.rst:818 +msgid "libraries specified with :option:`!-llib`" +msgstr "bibliothèques spécifiées avec l'option :option:`!-llib`" + +#: distutils/apiref.rst:820 +msgid "library search directories specified with :option:`!-Ldir`" +msgstr "" +"répertoires de recherche des bibliothèques définis avec l'option :option:`!-" +"Ldir`." + +#: distutils/apiref.rst:822 +msgid "" +"compile handled by :program:`cc` (or similar) executable with :option:`!-c` " +"option: compiles :file:`.c` to :file:`.o`" +msgstr "" +"compilation gérée par :program:`cc` (ou similaire) exécutable avec l'option :" +"option:`!-c` compile :file:`.c` vers :file:`.o`." + +#: distutils/apiref.rst:825 +msgid "" +"link static library handled by :program:`ar` command (possibly with :program:" +"`ranlib`)" +msgstr "" +"édition de liens pour une bibliothèque statique gérée par le programme en " +"ligne de commande :program:`ar` (éventuellement avec le programme :program:" +"`ranlib`)." + +#: distutils/apiref.rst:828 +msgid "link shared library handled by :program:`cc` :option:`!-shared`" +msgstr "" +"édition de liens pour une bibliothèque gérée par :program:`cc` :option:`!-" +"shared`." + +#: distutils/apiref.rst:832 +msgid ":mod:`distutils.msvccompiler` --- Microsoft Compiler" +msgstr ":mod:`distutils.msvccompiler` — Compilateur Microsoft" + +#: distutils/apiref.rst:839 +msgid "" +"This module provides :class:`MSVCCompiler`, an implementation of the " +"abstract :class:`CCompiler` class for Microsoft Visual Studio. Typically, " +"extension modules need to be compiled with the same compiler that was used " +"to compile Python. For Python 2.3 and earlier, the compiler was Visual " +"Studio 6. For Python 2.4 and 2.5, the compiler is Visual Studio .NET 2003." +msgstr "" +"Ce module fournit :class:`MSVCCompiler`, une implémentation de la classe " +"abstraite :class:`CCompiler` pour Microsoft Visual Studio. Généralement, les " +"modules d'extension doivent être compilés avec le même compilateur que celui " +"utilisé pour compiler Python. Pour Python 2.3 et les versions antérieures, " +"le compilateur était Visual Studio 6. Pour Python 2.4 et 2.5, le compilateur " +"est Visual Studio .NET 2003." + +#: distutils/apiref.rst:845 +msgid "" +":class:`MSVCCompiler` will normally choose the right compiler, linker etc. " +"on its own. To override this choice, the environment variables " +"*DISTUTILS_USE_SDK* and *MSSdk* must be both set. *MSSdk* indicates that the " +"current environment has been setup by the SDK's ``SetEnv.Cmd`` script, or " +"that the environment variables had been registered when the SDK was " +"installed; *DISTUTILS_USE_SDK* indicates that the distutils user has made an " +"explicit choice to override the compiler selection by :class:`MSVCCompiler`." +msgstr "" +"La classe :class:`MSVCCompiler` sélectionnera normalement le bon " +"compilateur, éditeur de liens, etc. Pour remplacer ces choix, les variables " +"d'environnement *DISTUTILS_USE_SDK* et *MSSdk* doivent être toutes les deux " +"définies. *MSSdk* indique que l'environnement courant a été configuré par le " +"script ``SetEnv.Cmd`` du kit de développement logiciel (*SDK*), ou que les " +"variables d'environnement ont été enregistrées lorsque le kit a été " +"installé ; *DISTUTILS_USE_SDK* indique que l'utilisateur de *distutils* a " +"choisi explicitement de remplacer le compilateur utilisé par :class:" +"`MSVCCompiler`." + +#: distutils/apiref.rst:855 +msgid ":mod:`distutils.bcppcompiler` --- Borland Compiler" +msgstr ":mod:`distutils.bcppcompiler` — Compilateur Borland" + +#: distutils/apiref.rst:860 +msgid "" +"This module provides :class:`BorlandCCompiler`, a subclass of the abstract :" +"class:`CCompiler` class for the Borland C++ compiler." +msgstr "" +"Ce module fournit :class:`BorlandCCompiler`, une sous-classe de la classe " +"abstraite :class:`CCompiler` classe pour le compilateur Borland C++." + +#: distutils/apiref.rst:865 +msgid ":mod:`distutils.cygwincompiler` --- Cygwin Compiler" +msgstr ":mod:`distutils.cygwincompiler` — Compilateur Cygwin" + +#: distutils/apiref.rst:870 +msgid "" +"This module provides the :class:`CygwinCCompiler` class, a subclass of :" +"class:`UnixCCompiler` that handles the Cygwin port of the GNU C compiler to " +"Windows. It also contains the Mingw32CCompiler class which handles the " +"mingw32 port of GCC (same as cygwin in no-cygwin mode)." +msgstr "" +"Ce module fournit la classe :class:`CygwinCCompiler`, une sous-classe de la " +"classe :class:`UnixCCompiler` qui gère *Cygwin*, le portage du compilateur " +"GNU C sur Windows. Il contient également la classe Mingw32CCompiler qui " +"gère le portage *mingw32* de GCC (comme *cygwin* en mode *no-cygwin*)." + +#: distutils/apiref.rst:877 +msgid ":mod:`distutils.archive_util` --- Archiving utilities" +msgstr ":mod:`distutils.archive_util` — Utilitaires d'archivage" + +#: distutils/apiref.rst:883 +msgid "" +"This module provides a few functions for creating archive files, such as " +"tarballs or zipfiles." +msgstr "" +"Ce module fournit quelques fonctions pour créer des fichiers d'archive, tels " +"que des archives aux formats *tarballs* ou *zipfiles*." + +#: distutils/apiref.rst:889 +msgid "" +"Create an archive file (eg. ``zip`` or ``tar``). *base_name* is the name " +"of the file to create, minus any format-specific extension; *format* is the " +"archive format: one of ``zip``, ``tar``, ``gztar``, ``bztar``, ``xztar``, or " +"``ztar``. *root_dir* is a directory that will be the root directory of the " +"archive; ie. we typically ``chdir`` into *root_dir* before creating the " +"archive. *base_dir* is the directory where we start archiving from; ie. " +"*base_dir* will be the common prefix of all files and directories in the " +"archive. *root_dir* and *base_dir* both default to the current directory. " +"Returns the name of the archive file." +msgstr "" +"Crée un fichier d'archive (par exemple ``zip`` ou ``tar``). *base_name* est " +"le nom du fichier à créer, sans extension spécifique indiquant le format. " +"*format* est le format d'archive : un parmi ``zip``, ``tar``, ``gztar``, " +"``bztar``, ``xztar``, ``xztar``, ou ``ztar``. *root_dir* est un répertoire " +"qui sera le répertoire racine de l'archive ; c'est-à-dire que le programme " +"se positionne dans *root_dir* avant de créer l'archive. *base_dir* est le " +"répertoire à partir duquel se lance l'archivage ; par exemple, *base_dir* " +"est le préfixe commun à tous les fichiers et répertoires de l'archive. " +"*root_dir* et *base_dir* sont tous deux par défaut dans le répertoire " +"courant. Renvoie le nom du fichier archive." + +#: distutils/apiref.rst:899 +msgid "Added support for the ``xztar`` format." +msgstr "Ajout du support des fichiers ``xztar``." + +#: distutils/apiref.rst:905 +msgid "" +"'Create an (optional compressed) archive as a tar file from all files in and " +"under *base_dir*. *compress* must be ``'gzip'`` (the default), ``'bzip2'``, " +"``'xz'``, ``'compress'``, or ``None``. For the ``'compress'`` method the " +"compression utility named by :program:`compress` must be on the default " +"program search path, so this is probably Unix-specific. The output tar file " +"will be named :file:`base_dir.tar`, possibly plus the appropriate " +"compression extension (``.gz``, ``.bz2``, ``.xz`` or ``.Z``). Return the " +"output filename." +msgstr "" +"Crée une archive (compressée en option) sous forme de fichier au format " +"*tar* à partir de tous les fichiers dans et sous *base_dir*. *compress* doit " +"être ``'gzip'`` (par défaut), ``'bzip2'``, ``'xz'``, ``'compress'`` ou " +"``None``. Pour la méthode ``'compress'`` l'utilitaire de compression nommé " +"par :program:`compress` doit être sur le chemin de recherche par défaut, " +"donc c'est sans doute spécifique à Unix. Le fichier *tar* de sortie sera " +"nommé :file:`base_dir.tar`, avec l'extension de compression appropriée (``." +"gz``, ``.bz2``, ``.xz`` ou ``.Z``). Renvoie le nom du fichier de sortie." + +#: distutils/apiref.rst:914 +msgid "Added support for the ``xz`` compression." +msgstr "Ajout du support de la compression ``xz``." + +#: distutils/apiref.rst:920 +msgid "" +"Create a zip file from all files in and under *base_dir*. The output zip " +"file will be named *base_name* + :file:`.zip`. Uses either the :mod:" +"`zipfile` Python module (if available) or the InfoZIP :file:`zip` utility " +"(if installed and found on the default search path). If neither tool is " +"available, raises :exc:`DistutilsExecError`. Returns the name of the " +"output zip file." +msgstr "" +"Crée un fichier zip à partir de tous les fichiers dans et sous *base_dir*. " +"Le fichier zip de sortie est nommé *base_name* + :file:`.zip`. Utilise soit " +"le module Python :mod:`zipfile` (si disponible) ou l'utilitaire InfoZIP :" +"file:`zip` (s'il est installé et trouvé sur le chemin de recherche par " +"défaut). Si aucun des deux outils n'est disponible, lève :exc:" +"`DistutilsExecError`. Renvoie le nom du fichier zip de sortie." + +#: distutils/apiref.rst:928 +msgid ":mod:`distutils.dep_util` --- Dependency checking" +msgstr ":mod:`distutils.dep_util` — Vérification des dépendances" + +#: distutils/apiref.rst:934 +msgid "" +"This module provides functions for performing simple, timestamp-based " +"dependency of files and groups of files; also, functions based entirely on " +"such timestamp dependency analysis." +msgstr "" +"Ce module fournit des fonctions permettant d'effectuer des tests de " +"dépendance simples, basés sur les horodatages de fichiers et de groupes de " +"fichiers, ainsi que des fonctionnalités entièrement basées sur ces analyses " +"de dépendance par rapport aux horodatages." + +#: distutils/apiref.rst:941 +msgid "" +"Return true if *source* exists and is more recently modified than *target*, " +"or if *source* exists and *target* doesn't. Return false if both exist and " +"*target* is the same age or newer than *source*. Raise :exc:" +"`DistutilsFileError` if *source* does not exist." +msgstr "" +"Renvoie la valeur *true* si *source* existe et a été modifiée plus récemment " +"que *target*, ou si *source* existe et *target* n'existe pas. Renvoie la " +"valeur *false* si les deux existent et que *target* est aussi ou plus récent " +"que *source*. Lève :exc:`DistutilsFileError` si *source* n'existe pas." + +#: distutils/apiref.rst:949 +msgid "" +"Walk two filename lists in parallel, testing if each source is newer than " +"its corresponding target. Return a pair of lists (*sources*, *targets*) " +"where source is newer than target, according to the semantics of :func:" +"`newer`." +msgstr "" +"Parcourt en parallèle deux listes de noms de fichiers, en vérifiant si " +"chaque source est plus récente que sa cible correspondante. Renvoie une " +"paire de listes (*sources*, *cibles*) où la source est plus récente que la " +"cible, selon la sémantique de :func:`newer`." + +#: distutils/apiref.rst:958 +msgid "" +"Return true if *target* is out-of-date with respect to any file listed in " +"*sources*. In other words, if *target* exists and is newer than every file " +"in *sources*, return false; otherwise return true. *missing* controls what " +"we do when a source file is missing; the default (``'error'``) is to blow up " +"with an :exc:`OSError` from inside :func:`os.stat`; if it is ``'ignore'``, " +"we silently drop any missing source files; if it is ``'newer'``, any missing " +"source files make us assume that *target* is out-of-date (this is handy in " +"\"dry-run\" mode: it'll make you pretend to carry out commands that wouldn't " +"work because inputs are missing, but that doesn't matter because you're not " +"actually going to run the commands)." +msgstr "" +"Renvoie la valeur *True* si *target* a une date dépassée par rapport à un " +"fichier figurant dans *sources* En d'autres termes, si *target* existe et " +"est plus récente que chaque fichier dans *sources*, renvoie la valeur " +"*False* ; sinon renvoie la valeur *True*. *missing* contrôle ce qui se passe " +"lorsqu'un fichier source est manquant ; la valeur par défaut (``'error'``) " +"est de lever une exception :exc:`OSError` à l'intérieur de :func:`os.stat` ; " +"si *missing* vaut ``'ignore'``,tout fichier source manquant est ignoré. Si " +"*missing* vaut ``'newer'``, tout fichier source manquant indique que " +"*target* n'est plus à jour (ce qui est utile en mode *dry-run* : cela permet " +"d'exécuter des commandes qui ne fonctionneraient pas parce que des entrées " +"sont manquantes sans les exécuter réellement)." + +#: distutils/apiref.rst:971 +msgid ":mod:`distutils.dir_util` --- Directory tree operations" +msgstr "" +":mod:`distutils.dir_util` — Opérations sur l'arborescence des répertoires" + +#: distutils/apiref.rst:977 +msgid "" +"This module provides functions for operating on directories and trees of " +"directories." +msgstr "" +"Ce module fournit des fonctions pour travailler sur des répertoires et des " +"arborescences de répertoires." + +#: distutils/apiref.rst:983 +msgid "" +"Create a directory and any missing ancestor directories. If the directory " +"already exists (or if *name* is the empty string, which means the current " +"directory, which of course exists), then do nothing. Raise :exc:" +"`DistutilsFileError` if unable to create some directory along the way (eg. " +"some sub-path exists, but is a file rather than a directory). If *verbose* " +"is true, print a one-line summary of each mkdir to stdout. Return the list " +"of directories actually created." +msgstr "" +"Crée un répertoire et tous les répertoires parents manquants. Si le " +"répertoire existe déjà (ou si *name* est la chaîne vide, c'est-à-dire le " +"répertoire courant, qui existe bien sûr), alors ne fait rien. Lève :exc:" +"`DistutilsFileError` s'il n'est pas possible de créer un répertoire en cours " +"de route (par exemple, un sous-chemin existe, mais est un fichier plutôt " +"qu'un répertoire). Si *verbose* est vrai, affiche un résumé d'une ligne de " +"chaque *mkdir* vers *stdout*. Renvoie la liste des répertoires réellement " +"créés." + +#: distutils/apiref.rst:994 +msgid "" +"Create all the empty directories under *base_dir* needed to put *files* " +"there. *base_dir* is just the name of a directory which doesn't necessarily " +"exist yet; *files* is a list of filenames to be interpreted relative to " +"*base_dir*. *base_dir* + the directory portion of every file in *files* will " +"be created if it doesn't already exist. *mode*, *verbose* and *dry_run* " +"flags are as for :func:`mkpath`." +msgstr "" +"Crée tous les répertoires vides sous *base_dir* nécessaires pour placer " +"*files*. *base_dir* est le nom d'un répertoire qui n'existe pas encore " +"nécessairement ; *files* est une liste de noms de fichiers relatifs à " +"*base_dir*. *base_dir* + la partie répertoire de chaque fichier dans *files* " +"est créée si elle n'existe pas déjà. Les options *mode*, *verbose* et " +"*dry_run* sont les mêmes que pour :func:`mkpath`." + +#: distutils/apiref.rst:1004 +msgid "" +"Copy an entire directory tree *src* to a new location *dst*. Both *src* and " +"*dst* must be directory names. If *src* is not a directory, raise :exc:" +"`DistutilsFileError`. If *dst* does not exist, it is created with :func:" +"`mkpath`. The end result of the copy is that every file in *src* is copied " +"to *dst*, and directories under *src* are recursively copied to *dst*. " +"Return the list of files that were copied or might have been copied, using " +"their output name. The return value is unaffected by *update* or *dry_run*: " +"it is simply the list of all files under *src*, with the names changed to be " +"under *dst*." +msgstr "" +"Copie une arborescence de répertoires entière *src* vers un nouvel " +"emplacement *dst*. *src* et *dst* doivent tous deux être des noms de " +"répertoire. Si *src* n'est pas un répertoire, lève :exc:" +"`DistutilsFileError`. Si *dst* n'existe pas, il est créé avec :func:" +"`mkpath`. Le résultat final de la copie est que chaque fichier dans *src* " +"est copié dans *dst*, et les répertoires sous *src* sont récursivement " +"copiés dans *dst*. Renvoie la liste des fichiers qui ont été copiés ou qui " +"auraient pu l'être, en utilisant leur nom de sortie. La valeur renvoyée " +"n'est pas affectée par *update* ou *dry_run* : c'est tout simplement la " +"liste de tous les fichiers sous *src*, avec les noms modifiés pour être sous " +"*dst*." + +#: distutils/apiref.rst:1014 +msgid "" +"*preserve_mode* and *preserve_times* are the same as for :func:`distutils." +"file_util.copy_file`; note that they only apply to regular files, not to " +"directories. If *preserve_symlinks* is true, symlinks will be copied as " +"symlinks (on platforms that support them!); otherwise (the default), the " +"destination of the symlink will be copied. *update* and *verbose* are the " +"same as for :func:`copy_file`." +msgstr "" +"Les modes *preserve_mode* et *preserve_times* sont les mêmes que pour :func:" +"`distutils.file_util.copy_file` ; il faut savoir que cela ne concerne que " +"les fichiers réguliers, et non les dossiers. Si *preserve_symlinks* est " +"vrai, les liens symboliques seront copiés en tant que liens symboliques (sur " +"les plateformes qui les gèrent !); sinon (par défaut), la destination du " +"lien sera copiée. *update* et *verbose* sont les mêmes que pour :func:" +"`copy_file`." + +#: distutils/apiref.rst:1022 +msgid "" +"Files in *src* that begin with :file:`.nfs` are skipped (more information on " +"these files is available in answer D2 of the `NFS FAQ page `_)." +msgstr "" +"Les fichiers dans *src* qui commencent par :file:`.nfs` sont ignorés (plus " +"d'informations sur ces fichiers sont disponibles dans la réponse *D2* de la " +"page `NFS FAQ page `_)." + +#: distutils/apiref.rst:1026 +msgid "NFS files are ignored." +msgstr "Les fichiers NFS sont ignorés." + +#: distutils/apiref.rst:1031 +msgid "" +"Recursively remove *directory* and all files and directories underneath it. " +"Any errors are ignored (apart from being reported to ``sys.stdout`` if " +"*verbose* is true)." +msgstr "" +"Supprime récursivement *directory* et tous les fichiers et répertoires en " +"dessous. Toutes les erreurs sont ignorées (sauf si *verbose* est vrai, elles " +"sont affichées sur ``sys.stdout``)." + +#: distutils/apiref.rst:1037 +msgid ":mod:`distutils.file_util` --- Single file operations" +msgstr ":mod:`distutils.file_util` — Traitements mono-fichier" + +#: distutils/apiref.rst:1043 +msgid "" +"This module contains some utility functions for operating on individual " +"files." +msgstr "" +"Ce module contient quelques fonctions de service pour travailler sur des " +"fichiers individuels." + +#: distutils/apiref.rst:1048 +msgid "" +"Copy file *src* to *dst*. If *dst* is a directory, then *src* is copied " +"there with the same name; otherwise, it must be a filename. (If the file " +"exists, it will be ruthlessly clobbered.) If *preserve_mode* is true (the " +"default), the file's mode (type and permission bits, or whatever is " +"analogous on the current platform) is copied. If *preserve_times* is true " +"(the default), the last-modified and last-access times are copied as well. " +"If *update* is true, *src* will only be copied if *dst* does not exist, or " +"if *dst* does exist but is older than *src*." +msgstr "" +"Copie le fichier *src* dans *dst*. Si *dst* est un répertoire, alors *src* y " +"est copié avec le même nom ; sinon, il faut que ce soit un nom de fichier. " +"Si *preserve_mode* est vrai (par défaut), le mode du fichier (son type et " +"ses bits de permission, ou ce qui est analogue sur la plate-forme actuelle) " +"sont copiés. Si *preserve_times* est vrai (par défaut), les horodatages de " +"la dernière modification et du dernier accès sont également copiés. Si " +"*update* est vrai, *src* ne peut être copié que si *dst* n'existe pas, ou si " +"*dst* existe mais est plus ancien que *src*." + +#: distutils/apiref.rst:1057 +msgid "" +"*link* allows you to make hard links (using :func:`os.link`) or symbolic " +"links (using :func:`os.symlink`) instead of copying: set it to ``'hard'`` or " +"``'sym'``; if it is ``None`` (the default), files are copied. Don't set " +"*link* on systems that don't support it: :func:`copy_file` doesn't check if " +"hard or symbolic linking is available. It uses :func:`_copy_file_contents` " +"to copy file contents." +msgstr "" +"*link* permets de créer des liens physiques (en utilisant :func:`os.link`) " +"ou symboliques (en utilisant :func:`os.symlink`) au lieu de les copier : " +"paramétrez la valeur a ``'hard'`` ou ``'sym'`` ; si elle vaut ``None`` (par " +"défaut), les fichiers sont copiés. Ne définissez pas *link* sur les systèmes " +"qui ne les gèrent pas : :func:`copy_file` ne vérifie pas si des liens " +"symboliques ou physiques sont disponibles. La fonction :func:" +"`_copy_file_contents` est utilisée pour copier le contenu des fichiers." + +#: distutils/apiref.rst:1064 +msgid "" +"Return a tuple ``(dest_name, copied)``: *dest_name* is the actual name of " +"the output file, and *copied* is true if the file was copied (or would have " +"been copied, if *dry_run* true)." +msgstr "" +"Renvoie un couple ``(dest_name, copied)`` : *dest_name* est le nom réel du " +"fichier de sortie, et *copied* est vrai si le fichier a été copié (ou aurait " +"été copié, si *dry_run* est vrai)." + +#: distutils/apiref.rst:1078 +msgid "" +"Move file *src* to *dst*. If *dst* is a directory, the file will be moved " +"into it with the same name; otherwise, *src* is just renamed to *dst*. " +"Returns the new full name of the file." +msgstr "" +"Déplace le fichier *src* vers *dst*. Si *dst* est un répertoire, le fichier " +"y est déplacé avec le même nom ; sinon, *src* est simplement renommé *dst*. " +"Renvoie le nouveau nom complet du fichier." + +#: distutils/apiref.rst:1084 +msgid "" +"Handles cross-device moves on Unix using :func:`copy_file`. What about " +"other systems?" +msgstr "" +"Gère les déplacements inter-périphériques sous Unix en utilisant :func:" +"`copy_file`. Qu'en est-il sur les autres systèmes ?" + +#: distutils/apiref.rst:1090 +msgid "" +"Create a file called *filename* and write *contents* (a sequence of strings " +"without line terminators) to it." +msgstr "" +"Crée un fichier appelé *filename* et y écrit *contents* (une séquence de " +"chaînes sans terminaison de ligne)." + +#: distutils/apiref.rst:1095 +msgid ":mod:`distutils.util` --- Miscellaneous other utility functions" +msgstr ":mod:`distutils.util` — Autres fonctions de service" + +#: distutils/apiref.rst:1101 +msgid "" +"This module contains other assorted bits and pieces that don't fit into any " +"other utility module." +msgstr "" +"Ce module contient d'autres éléments qui ne correspondent à aucun autre " +"module de service." + +#: distutils/apiref.rst:1107 +msgid "" +"Return a string that identifies the current platform. This is used mainly " +"to distinguish platform-specific build directories and platform-specific " +"built distributions. Typically includes the OS name and version and the " +"architecture (as supplied by 'os.uname()'), although the exact information " +"included depends on the OS; e.g., on Linux, the kernel version isn't " +"particularly important." +msgstr "" +"Renvoie une chaîne qui identifie la plate-forme courante. Ceci est utilisé " +"pour distinguer les répertoires de compilation spécifiques aux plates-formes " +"et les distributions construites spécifiques aux plates-formes. Cette " +"chaîne inclut en règle générale le nom et la version de l'OS et " +"l'architecture (tels que fournis par la fonction ``os.uname()``). Bien que " +"l'information exacte dépend de l'OS, par exemple, sous Linux, la version " +"noyau ne joue pas un grand rôle." + +#: distutils/apiref.rst:1114 +msgid "Examples of returned values:" +msgstr "Exemples de valeurs renvoyées :" + +#: distutils/apiref.rst:1116 +msgid "``linux-i586``" +msgstr "``linux-i586``" + +#: distutils/apiref.rst:1117 +msgid "``linux-alpha``" +msgstr "``linux-alpha``" + +#: distutils/apiref.rst:1118 +msgid "``solaris-2.6-sun4u``" +msgstr "``solaris-2.6-sun4u``" + +#: distutils/apiref.rst:1120 +msgid "For non-POSIX platforms, currently just returns ``sys.platform``." +msgstr "" +"Pour les plates-formes qui ne sont pas POSIX, renvoie simplement ``sys." +"platform``." + +#: distutils/apiref.rst:1122 +#, fuzzy +msgid "" +"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 "" +"Pour les systèmes Mac OS X, la version du système d'exploitation correspond " +"à la version minimale sur laquelle les binaires pourront être exécutés " +"(c'est-à-dire la valeur de ``MACOSX_DEPLOYMENT_TARGET`` pendant la " +"compilation de Python), et non la version du système actuel." + +#: distutils/apiref.rst:1126 +#, fuzzy +msgid "" +"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 " +"universal binaries the architecture is ``universal``. Starting from Python " +"2.7 and Python 3.2 the architecture ``fat3`` is used for a 3-way universal " +"build (ppc, i386, x86_64) and ``intel`` is used for a universal build with " +"the i386 and x86_64 architectures" +msgstr "" +"Pour les binaires universels construits sur Mac OS X, la valeur de " +"l'architecture reflète l'état du binaire universel au lieu de celle de " +"l'architecture du processeur en cours. Pour les binaires universels 32 bits, " +"l'architecture est ``fat``, pour les binaires universels 64 bits, " +"l'architecture est ``fat64``, et pour les binaires universels 4 voies, " +"l'architecture est ``universelle``. À partir de Python 2.7 et Python 3.2, " +"l'architecture ``fat3`` est utilisée pour une compilation universelle à 3 " +"voies (*ppc*, *i386*, *x86_64*) et ``intel`` est utilisée pour une " +"compilation universelle avec les architectures *i386* et *x86_64*" + +#: distutils/apiref.rst:1135 +#, fuzzy +msgid "Examples of returned values on macOS:" +msgstr "Exemples de valeurs renvoyées sous Mac OS X :" + +#: distutils/apiref.rst:1137 +msgid "``macosx-10.3-ppc``" +msgstr "``macosx-10.3-ppc``" + +#: distutils/apiref.rst:1139 +msgid "``macosx-10.3-fat``" +msgstr "``macosx-10.3-fat``" + +#: distutils/apiref.rst:1141 +msgid "``macosx-10.5-universal``" +msgstr "``macosx-10.5-universal``" + +#: distutils/apiref.rst:1143 +msgid "``macosx-10.6-intel``" +msgstr "``macosx-10.6-intel``" + +#: distutils/apiref.rst:1145 +msgid "" +"For AIX, Python 3.9 and later return a string starting with \"aix\", " +"followed by additional fields (separated by ``'-'``) that represent the " +"combined values of AIX Version, Release and Technology Level (first field), " +"Build Date (second field), and bit-size (third field). Python 3.8 and " +"earlier returned only a single additional field with the AIX Version and " +"Release." +msgstr "" +"Pour AIX, à partir de Python 3.9, une chaîne de caractères est renvoyée " +"commençant par ``aix``, puis des champs additionnels (séparés par ``'-'``) " +"qui représentent les valeurs combinées de la version d'AIX accompagnée du " +"numéro de publication et du « niveau de technologie » (premier champ), la " +"date de la version (deuxième champ), et taille en bits (troisième champ). En " +"Python 3.8 et avant, seul un champ additionnel avec la version d'AIX et le " +"numéro de publication étaient renvoyés." + +#: distutils/apiref.rst:1151 +msgid "Examples of returned values on AIX:" +msgstr "Exemples de valeurs renvoyées sur AIX :" + +#: distutils/apiref.rst:1153 +msgid "" +"``aix-5307-0747-32`` # 32-bit build on AIX ``oslevel -s``: 5300-07-00-0000" +msgstr "" +"``aix-5307-0747-32`` # build 32-bit sur AIX ``oslevel -s``: 5300-07-00-0000" + +#: distutils/apiref.rst:1155 +msgid "" +"``aix-7105-1731-64`` # 64-bit build on AIX ``oslevel -s``: 7100-05-01-1731" +msgstr "" +"``aix-7105-1731-64`` # build 64-bit sur AIX ``oslevel -s``: 7100-05-01-1731" + +#: distutils/apiref.rst:1157 +msgid "``aix-7.2`` # Legacy form reported in Python 3.8 and earlier" +msgstr "" +"``aix-7.2`` # Ancienne forme renvoyée par Python 3.8 et version " +"précédentes" + +#: distutils/apiref.rst:1159 +msgid "" +"The AIX platform string format now also includes the technology level, build " +"date, and ABI bit-size." +msgstr "" +"Le format de chaîne de caractères de plateforme AIX inclut désormais la " +"génération, la date de construction et la taille en bits de l'architecture " +"matérielle de l'ABI." + +#: distutils/apiref.rst:1166 +msgid "" +"Return 'pathname' as a name that will work on the native filesystem, i.e. " +"split it on '/' and put it back together again using the current directory " +"separator. Needed because filenames in the setup script are always supplied " +"in Unix style, and have to be converted to the local convention before we " +"can actually use them in the filesystem. Raises :exc:`ValueError` on non-" +"Unix-ish systems if *pathname* either starts or ends with a slash." +msgstr "" +"Renvoie un chemin *pathname* qui fonctionne sur le système de fichiers " +"natif. Par exemple, il sépare le chemin sur */* et le recompose en utilisant " +"le séparateur de répertoires courant. Cela est nécessaire parce que les noms " +"de fichiers dans les scripts d'installations sont toujours fournis dans le " +"style Unix, et doivent être convertis dans la convention du système avant " +"d'être utilisé par le système de fichiers. Lève :exc:`ValueError` sur les " +"systèmes non UNIX si *pathname* commence ou se termine par une barre oblique " +"(*slash* en anglais)." + +#: distutils/apiref.rst:1176 +msgid "" +"Return *pathname* with *new_root* prepended. If *pathname* is relative, " +"this is equivalent to ``os.path.join(new_root,pathname)`` Otherwise, it " +"requires making *pathname* relative and then joining the two, which is " +"tricky on DOS/Windows." +msgstr "" +"Renvoie un chemin *pathname* préfixé avec *new_root*. Si *pathname* est " +"relatif, c`est l'équivalent de ``os.path.join(new_root,pathname)`` Sinon, il " +"faut rendre *pathname* relatif et joindre les deux, ce qui est dangereux " +"sous DOS/Windows." + +#: distutils/apiref.rst:1183 +msgid "" +"Ensure that 'os.environ' has all the environment variables we guarantee that " +"users can use in config files, command-line options, etc. Currently this " +"includes:" +msgstr "" +"Vérifie que 'os.environ' possède toutes les variables d'environnement " +"utilisables dans les fichiers de configuration, les options en ligne de " +"commande, etc. À l'heure actuelle, cela comprend :" + +#: distutils/apiref.rst:1187 +msgid ":envvar:`HOME` - user's home directory (Unix only)" +msgstr "" +":envvar:`HOME`. Répertoire d’accueil de l'utilisateur (Unix uniquement)" + +#: distutils/apiref.rst:1188 +msgid "" +":envvar:`PLAT` - description of the current platform, including hardware and " +"OS (see :func:`get_platform`)" +msgstr "" +":envvar:`PLAT`. Description de la plate-forme actuelle, y compris le " +"matériel et le l'OS (voir :func:`get_platform`)" + +#: distutils/apiref.rst:1194 +msgid "" +"Perform shell/Perl-style variable substitution on *s*. Every occurrence of " +"``$`` followed by a name is considered a variable, and variable is " +"substituted by the value found in the *local_vars* dictionary, or in ``os." +"environ`` if it's not in *local_vars*. *os.environ* is first checked/" +"augmented to guarantee that it contains certain values: see :func:" +"`check_environ`. Raise :exc:`ValueError` for any variables not found in " +"either *local_vars* or ``os.environ``." +msgstr "" +"Exécute la substitution de variable de style shell/Perl sur *s*. Chaque " +"occurrence de ``$`` suivie d'un nom est considérée comme une variable, et la " +"variable est remplacée par la valeur trouvée dans le dictionnaire " +"*local_vars*, ou dans ``os.environ`` si elle ne se trouve pas dans " +"*local_vars*. *os.environ* est d'abord vérifié/étendu pour garantir qu'elle " +"contient certaines valeurs : voir :func:`check_environ`. Lève :exc:" +"`ValueError` pour toute variable non trouvée dans *local_vars* ou ``os." +"environ``." + +#: distutils/apiref.rst:1201 +#, fuzzy +msgid "" +"Note that this is not a full-fledged string interpolation function. A valid " +"``$variable`` can consist only of upper and lower case letters, numbers and " +"an underscore. No { } or ( ) style quoting is available." +msgstr "" +"Remarquez qu'il ne s'agit pas d'une fonction d'interpolation de chaîne à " +"part entière. Une ``$variable`` valide ne peut être composée que de lettres " +"majuscules et minuscules, de chiffres et d'un tiret bas. Aucune syntaxe de " +"type {} ou () pour indiquer des variables n'est disponible." + +#: distutils/apiref.rst:1208 +msgid "" +"Split a string up according to Unix shell-like rules for quotes and " +"backslashes. In short: words are delimited by spaces, as long as those " +"spaces are not escaped by a backslash, or inside a quoted string. Single and " +"double quotes are equivalent, and the quote characters can be backslash-" +"escaped. The backslash is stripped from any two-character escape sequence, " +"leaving only the escaped character. The quote characters are stripped from " +"any quoted string. Returns a list of words." +msgstr "" +"Sépare une chaîne de caractères selon les règles de type shell Unix pour les " +"guillemets et les barres obliques inverses. En bref : les mots sont " +"délimités par des espaces, tant que ces espaces ne sont pas échappées par " +"une barre oblique inversée, ou à l'intérieur d'une chaîne guillemets. Les " +"guillemets simples et doubles sont équivalents, et les caractères entre " +"guillemets peuvent être échappés à l'aide d'une barre oblique inversée. La " +"barre oblique inversée est supprimée de toute séquence d'échappement à deux " +"caractères, ne laissant que le caractère échappé. Les caractères guillemets " +"sont supprimés de toute chaîne de caractères entre guillemets. Renvoie une " +"liste de mots." + +#: distutils/apiref.rst:1221 +msgid "" +"Perform some action that affects the outside world (for instance, writing to " +"the filesystem). Such actions are special because they are disabled by the " +"*dry_run* flag. This method takes care of all that bureaucracy for you; " +"all you have to do is supply the function to call and an argument tuple for " +"it (to embody the \"external action\" being performed), and an optional " +"message to print." +msgstr "" +"Exécute une action qui affecte le monde extérieur (par exemple, écrire dans " +"le système de fichiers). De telles actions sont spéciales car elles sont " +"désactivées par l'option *dry_run*. Cette méthode s'occupe de tout. Vous " +"devez simplement fournir la fonction à appeler avec un couple d'argument lui " +"correspondant et un message facultatif à afficher." + +#: distutils/apiref.rst:1230 +msgid "Convert a string representation of truth to true (1) or false (0)." +msgstr "" +"Convertit une chaîne de caractères représentant une valeur booléenne en " +"``1`` (si elle est évaluée comme vraie) ou ``0`` (si elle est évaluée comme " +"fausse)." + +#: distutils/apiref.rst:1232 +msgid "" +"True values are ``y``, ``yes``, ``t``, ``true``, ``on`` and ``1``; false " +"values are ``n``, ``no``, ``f``, ``false``, ``off`` and ``0``. Raises :exc:" +"`ValueError` if *val* is anything else." +msgstr "" +"Les valeurs *vraies* sont ``y``, ``yes``, ``t``, ``true``, ``on`` et ``1``. " +"Les valeurs *fausses* sont ``n``, ``no``, ``f``, ``false``, ``off`` et " +"``0``. Lève :exc:`ValueError` si *val* est autre chose." + +#: distutils/apiref.rst:1239 +msgid "" +"Byte-compile a collection of Python source files to :file:`.pyc` files in a :" +"file:`__pycache__` subdirectory (see :pep:`3147` and :pep:`488`). *py_files* " +"is a list of files to compile; any files that don't end in :file:`.py` are " +"silently skipped. *optimize* must be one of the following:" +msgstr "" +"Effectue une compilation vers du *bytecode* Python à partir d'un ensemble de " +"fichiers sources Python dans un fichier :file:`.pyc` dans un sous-" +"répertoire :file:`__pycache__` (voir :pep:`3147` et :pep:`488`). *py_files* " +"est une liste de fichiers à compiler ; tous les fichiers qui ne se terminent " +"pas par :file:`.py` sont ignorés en silence. *optimize* doit être l'un des " +"éléments suivants :" + +#: distutils/apiref.rst:1244 +msgid "``0`` - don't optimize" +msgstr "``0`` — ne pas optimiser" + +#: distutils/apiref.rst:1245 +msgid "``1`` - normal optimization (like ``python -O``)" +msgstr "``1`` — optimisation normale (comme ``python -O``)" + +#: distutils/apiref.rst:1246 +msgid "``2`` - extra optimization (like ``python -OO``)" +msgstr "``2`` — optimisation supplémentaire (comme ``python -OO``)" + +#: distutils/apiref.rst:1248 +msgid "If *force* is true, all files are recompiled regardless of timestamps." +msgstr "" +"Si *force* est vrai, tous les fichiers sont recompilés indépendamment des " +"horodatages." + +#: distutils/apiref.rst:1250 +msgid "" +"The source filename encoded in each :term:`bytecode` file defaults to the " +"filenames listed in *py_files*; you can modify these with *prefix* and " +"*basedir*. *prefix* is a string that will be stripped off of each source " +"filename, and *base_dir* is a directory name that will be prepended (after " +"*prefix* is stripped). You can supply either or both (or neither) of " +"*prefix* and *base_dir*, as you wish." +msgstr "" +"Le nom du fichier source encodé dans chaque fichier :term:`bytecode` est par " +"défaut le nom présent dans la liste des noms de fichiers source *py_files* ; " +"vous pouvez modifier dynamiquement ses noms avec *prefix* et *basedir*. " +"*prefix* est une chaîne de caractères qui sera supprimée de chaque nom de " +"fichier source, et *base_dir* est un nom de répertoire qui sera préfixé au " +"nom (après que le *prefixe* soit supprimé). Vous pouvez choisir de fournir " +"l'un ou l'autre (ou les deux) paramètres : *prefixe* et *base_dir*." + +#: distutils/apiref.rst:1257 +msgid "" +"If *dry_run* is true, doesn't actually do anything that would affect the " +"filesystem." +msgstr "" +"Si *dry_run* est vrai, ne fait rien qui puisse affecter le système de " +"fichiers." + +#: distutils/apiref.rst:1260 +msgid "" +"Byte-compilation is either done directly in this interpreter process with " +"the standard :mod:`py_compile` module, or indirectly by writing a temporary " +"script and executing it. Normally, you should let :func:`byte_compile` " +"figure out to use direct compilation or not (see the source for details). " +"The *direct* flag is used by the script generated in indirect mode; unless " +"you know what you're doing, leave it set to ``None``." +msgstr "" +"La compilation binaire se fait soit directement dans l'interpréteur courant " +"avec le module standard :mod:`py_compile`, soit indirectement en écrivant un " +"script temporaire et en l'exécutant. Normalement, vous devez laisser :func:" +"`byte_compile` choisir d'utiliser la compilation directe ou non (voir le " +"code source pour les détails). Le paramètre *direct* est utilisé par le " +"script généré en mode indirect ; à moins que vous ne sachiez ce que vous " +"faites, laissez le paramètre à ``None`` (Aucun)." + +#: distutils/apiref.rst:1267 +msgid "" +"Create ``.pyc`` files with an :func:`import magic tag ` in " +"their name, in a :file:`__pycache__` subdirectory instead of files without " +"tag in the current directory." +msgstr "" +"Crée des fichiers ``.pyc`` avec un sous-répertoire :func:`import magic tag " +"` dans leur nom, dans le sous-répertoire :file:`__pycache__` " +"plutôt que dans le répertoire courant, sans tag." + +#: distutils/apiref.rst:1272 +msgid "Create ``.pyc`` files according to :pep:`488`." +msgstr "Crée des fichiers ``.pyc`` selon la :pep:`488`." + +#: distutils/apiref.rst:1278 +msgid "" +"Return a version of *header* escaped for inclusion in an :rfc:`822` header, " +"by ensuring there are 8 spaces space after each newline. Note that it does " +"no other modification of the string." +msgstr "" +"Renvoie une version de *header* traitée avec les échappements compatibles " +"avec les en-têtes :rfc:`822`, en s'assurant qu'il y a 8 espaces après chaque " +"nouvelle ligne. Notez qu'il ne fait aucune autre modification de la chaîne " +"de caractères." + +#: distutils/apiref.rst:1288 +msgid ":mod:`distutils.dist` --- The Distribution class" +msgstr ":mod:`distutils.dist` — La classe Distribution" + +#: distutils/apiref.rst:1295 +msgid "" +"This module provides the :class:`~distutils.core.Distribution` class, which " +"represents the module distribution being built/installed/distributed." +msgstr "" +"Ce module fournit la classe :class:`~distutils.core.Distribution`, qui " +"représente le module *distribution* en cours de construction/installation/" +"distribution." + +#: distutils/apiref.rst:1300 +msgid ":mod:`distutils.extension` --- The Extension class" +msgstr ":mod:`distutils.extension` — La classe Extension" + +#: distutils/apiref.rst:1307 +msgid "" +"This module provides the :class:`Extension` class, used to describe C/C++ " +"extension modules in setup scripts." +msgstr "" +"Ce module fournit la classe :class:`Extension`, utilisée pour décrire les " +"modules d'extension C/C++ dans les scripts de configuration." + +#: distutils/apiref.rst:1315 +msgid ":mod:`distutils.debug` --- Distutils debug mode" +msgstr ":mod:`distutils.debug` — Mode de débogage du module *Distutils*" + +#: distutils/apiref.rst:1321 +msgid "This module provides the DEBUG flag." +msgstr "Ce module fournit l'option *DEBUG*." + +#: distutils/apiref.rst:1325 +msgid ":mod:`distutils.errors` --- Distutils exceptions" +msgstr ":mod:`distutils.errors` — Exceptions du module *Distutils*" + +#: distutils/apiref.rst:1331 +msgid "" +"Provides exceptions used by the Distutils modules. Note that Distutils " +"modules may raise standard exceptions; in particular, SystemExit is usually " +"raised for errors that are obviously the end-user's fault (eg. bad command-" +"line arguments)." +msgstr "" +"Fournit les exceptions utilisées par les modules de *Distutils*. Notez que " +"les modules *Distutils* peuvent soulever des exceptions standards ; en " +"particulier, ``SystemExit`` est généralement levée pour les erreurs qui sont " +"manifestement de la responsabilité de l'utilisateur final (ex : mauvais " +"argument en ligne de commande)." + +#: distutils/apiref.rst:1335 +msgid "" +"This module is safe to use in ``from ... import *`` mode; it only exports " +"symbols whose names start with ``Distutils`` and end with ``Error``." +msgstr "" +"Ce module est utilisable avec la syntaxe ``from … import *`` ; il n'exporte " +"que des symboles dont le nom commence par ``Distutils`` et se termine par " +"``Error``." + +#: distutils/apiref.rst:1340 +msgid "" +":mod:`distutils.fancy_getopt` --- Wrapper around the standard getopt module" +msgstr "" +":mod:`distutils.fancy_getopt` — Encapsulation du module *getopt* standard" + +#: distutils/apiref.rst:1346 +msgid "" +"This module provides a wrapper around the standard :mod:`getopt` module " +"that provides the following additional features:" +msgstr "" +"Ce module est une encapsulation du module standard :mod:`getopt` qui apporte " +"les fonctionnalités supplémentaires suivantes :" + +#: distutils/apiref.rst:1349 +msgid "short and long options are tied together" +msgstr "Les options *short* et *long* sont liées entre elles." + +#: distutils/apiref.rst:1351 +msgid "" +"options have help strings, so :func:`fancy_getopt` could potentially create " +"a complete usage summary" +msgstr "" +"Les options ont des pages d'aide, donc :func:`fancy_getopt` pourrait " +"potentiellement créer un résumé d'utilisation complet" + +#: distutils/apiref.rst:1354 +msgid "options set attributes of a passed-in object" +msgstr "Les options définissent les attributs à partir d'un objet fourni." + +#: distutils/apiref.rst:1356 +msgid "" +"boolean options can have \"negative aliases\" --- eg. if :option:`!--quiet` " +"is the \"negative alias\" of :option:`!--verbose`, then :option:`!--quiet` " +"on the command line sets *verbose* to false." +msgstr "" +"Les options booléennes peuvent avoir des \"alias négatifs\" — par exemple " +"l'option :option:`!-quiet` est *l'alias négatif* de :option:`!--verbose`, " +"l'option :option:`!-quiet` sur la ligne de commande met *verbose* à faux." + +#: distutils/apiref.rst:1362 +msgid "" +"Wrapper function. *options* is a list of ``(long_option, short_option, " +"help_string)`` 3-tuples as described in the constructor for :class:" +"`FancyGetopt`. *negative_opt* should be a dictionary mapping option names to " +"option names, both the key and value should be in the *options* list. " +"*object* is an object which will be used to store values (see the :meth:" +"`getopt` method of the :class:`FancyGetopt` class). *args* is the argument " +"list. Will use ``sys.argv[1:]`` if you pass ``None`` as *args*." +msgstr "" +"Encapsulation de la fonction ``getopt``. *options* est une liste de triplets " +"``(long_option, short_option, help_string)`` comme décrit dans le " +"constructeur de la classe :class:`FancyGetopt`. *negative_opt* doit être un " +"dictionnaire associant les noms des options aux noms des options, la clé et " +"la valeur doivent être dans la liste *options*. *object* est un objet qui " +"sera utilisé pour stocker des valeurs (voir la méthode :meth:`getopt` de la " +"classe :class:`FancyGetopt`). *args* est la liste des arguments. Utilise " +"``sys.argv[1 :]`` si ``None`` est passé à *args*." + +#: distutils/apiref.rst:1373 +msgid "Wraps *text* to less than *width* wide." +msgstr "" +"Ajoute des retours à la ligne à *texte* de manière à ce que la largeur soit " +"inférieure à *largeur*." + +#: distutils/apiref.rst:1378 +msgid "" +"The option_table is a list of 3-tuples: ``(long_option, short_option, " +"help_string)``" +msgstr "" +"La liste *option_table* est constituée de triplets : ``(long_option, " +"short_option, help_string*)``" + +#: distutils/apiref.rst:1381 +msgid "" +"If an option takes an argument, its *long_option* should have ``'='`` " +"appended; *short_option* should just be a single character, no ``':'`` in " +"any case. *short_option* should be ``None`` if a *long_option* doesn't have " +"a corresponding *short_option*. All option tuples must have long options." +msgstr "" +"Si une option prend un argument, sa *long_option* doit se terminer par " +"``'='``. *short_option* doit être un seul caractère, jamais ``':'``. " +"*short_option* doit être ``None`` si l'option n'a pas de forme courte " +"correspondante. Tous les triplets d'options doivent avoir des options " +"longues." + +#: distutils/apiref.rst:1386 +msgid "The :class:`FancyGetopt` class provides the following methods:" +msgstr "La classe :class:`FancyGetopt` fournit les méthodes suivantes :" + +#: distutils/apiref.rst:1391 +msgid "Parse command-line options in args. Store as attributes on *object*." +msgstr "" +"Analyse les options de ligne de commande des arguments. Les stocke en tant " +"qu'attributs de *objet*." + +#: distutils/apiref.rst:1393 +msgid "" +"If *args* is ``None`` or not supplied, uses ``sys.argv[1:]``. If *object* " +"is ``None`` or not supplied, creates a new :class:`OptionDummy` instance, " +"stores option values there, and returns a tuple ``(args, object)``. If " +"*object* is supplied, it is modified in place and :func:`getopt` just " +"returns *args*; in both cases, the returned *args* is a modified copy of the " +"passed-in *args* list, which is left untouched." +msgstr "" +"Si *args* est ``None`` ou n'est pas définie, utilise ``sys.argv[1:]``. Si " +"*object* est ``None`` ou n'est pas définie, crée une nouvelle instance de la " +"classe :class:`OptionDummy`, stocke les valeurs d'options dans l'instance et " +"renvoie un couple ``(args, object)``. Si *object* est fourni, il est modifié " +"sur place et :func:`getopt` renvoie simplement *args* ; dans les deux cas, " +"Les arguments *args* renvoyés sont une copie modifiée de la liste *args* " +"transmise, qui n'est pas elle-même modifiée." + +#: distutils/apiref.rst:1405 +msgid "" +"Returns the list of ``(option, value)`` tuples processed by the previous run " +"of :meth:`getopt` Raises :exc:`RuntimeError` if :meth:`getopt` hasn't been " +"called yet." +msgstr "" +"Renvoie la liste des couples ``(option, valeur)`` traités par l'exécution " +"précédente de :meth:`getopt`. Déclenche :exc:`RuntimeError` si :meth:" +"`getopt` n'a pas encore été appelée." + +#: distutils/apiref.rst:1412 +msgid "" +"Generate help text (a list of strings, one per suggested line of output) " +"from the option table for this :class:`FancyGetopt` object." +msgstr "" +"Génère un texte d'aide (une liste de chaînes, une par ligne de sortie " +"suggérée) de la liste d'options pour l'objet de la classe :class:" +"`FancyGetopt`." + +#: distutils/apiref.rst:1415 +msgid "If supplied, prints the supplied *header* at the top of the help." +msgstr "S'il est fourni, affiche l'en-tête *header* en haut de l'aide." + +#: distutils/apiref.rst:1419 +msgid ":mod:`distutils.filelist` --- The FileList class" +msgstr ":mod:`distutils.filelist` — La classe *FileList* liste des fichiers" + +#: distutils/apiref.rst:1426 +msgid "" +"This module provides the :class:`FileList` class, used for poking about the " +"filesystem and building lists of files." +msgstr "" +"Ce module fournit la classe :class:`FileList`, utilisée pour parcourir le " +"système de fichiers et construire des listes de fichiers." + +#: distutils/apiref.rst:1431 +msgid ":mod:`distutils.log` --- Simple :pep:`282`-style logging" +msgstr "" +":mod:`distutils.log` — Journalisation basée sur le style de la :pep:`282`" + +#: distutils/apiref.rst:1438 +msgid ":mod:`distutils.spawn` --- Spawn a sub-process" +msgstr ":mod:`distutils.spawn` — Crée un sous-processus" + +#: distutils/apiref.rst:1444 +msgid "" +"This module provides the :func:`spawn` function, a front-end to various " +"platform-specific functions for launching another program in a sub-process. " +"Also provides :func:`find_executable` to search the path for a given " +"executable name." +msgstr "" +"Ce module offre la fonction :func:`spawn`, une interface avec diverses " +"fonctions spécifiques à la plate-forme pour lancer un autre programme dans " +"un sous-processus. Inclut également :func:`find_executable` pour rechercher " +"le chemin d'accès pour un nom d'exécutable donné." + +#: distutils/apiref.rst:1451 +msgid ":mod:`distutils.sysconfig` --- System configuration information" +msgstr ":mod:`distutils.sysconfig` — Informations de configuration du système" + +#: distutils/apiref.rst:1455 +msgid ":mod:`distutils.sysconfig` has been merged into :mod:`sysconfig`." +msgstr "" + +#: distutils/apiref.rst:1462 +msgid "" +"The :mod:`distutils.sysconfig` module provides access to Python's low-level " +"configuration information. The specific configuration variables available " +"depend heavily on the platform and configuration. The specific variables " +"depend on the build process for the specific version of Python being run; " +"the variables are those found in the :file:`Makefile` and configuration " +"header that are installed with Python on Unix systems. The configuration " +"header is called :file:`pyconfig.h` for Python versions starting with 2.2, " +"and :file:`config.h` for earlier versions of Python." +msgstr "" +"Le module :mod:`distutils.sysconfig` donne accès aux informations de " +"configuration bas niveau de Python. Les variables de configuration " +"spécifiques disponibles dépendent de la plate-forme et de la configuration. " +"Les variables spécifiques dépendent du processus de compilation de la " +"version *spécifique* de Python en cours d'exécution. Les variables sont " +"celles qui se trouvent dans le fichier :file:`Makefile` et dans les entêtes " +"de configuration installés avec Python sur des systèmes Unix. Le fichier " +"des entêtes de configuration s'appelle :file:`pyconfig.h` pour les versions " +"de Python commençant par 2.2, et :file:`config.h` pour les versions " +"antérieures de Python." + +#: distutils/apiref.rst:1471 +msgid "" +"Some additional functions are provided which perform some useful " +"manipulations for other parts of the :mod:`distutils` package." +msgstr "" +"Quelques fonctions supplémentaires sont fournies pour effectuer des " +"manipulations utiles pour d'autres parties du paquet :mod:`distutils`." + +#: distutils/apiref.rst:1477 +msgid "The result of ``os.path.normpath(sys.prefix)``." +msgstr "Le résultat de ``os.path.normpath(sys.prefix)``." + +#: distutils/apiref.rst:1482 +msgid "The result of ``os.path.normpath(sys.exec_prefix)``." +msgstr "Le résultat de ``os.path.normpath(sys.exec_prefix)``." + +#: distutils/apiref.rst:1487 +msgid "" +"Return the value of a single variable. This is equivalent to " +"``get_config_vars().get(name)``." +msgstr "" +"Renvoie la valeur d'une seule variable. C'est l'équivalent de " +"``get_config_vars().get(name)``." + +#: distutils/apiref.rst:1493 +msgid "" +"Return a set of variable definitions. If there are no arguments, this " +"returns a dictionary mapping names of configuration variables to values. If " +"arguments are provided, they should be strings, and the return value will be " +"a sequence giving the associated values. If a given name does not have a " +"corresponding value, ``None`` will be included for that variable." +msgstr "" +"Retourne un ensemble de définitions de variables. S'il n'y a pas " +"d'arguments, cela renvoie un dictionnaire qui associe les noms des variables " +"de configuration aux valeurs. Si des arguments sont spécifiés, ils doivent " +"être des chaînes de caractères, et la valeur renvoyée sera une séquence " +"donnant les valeurs correspondantes. Si un nom donné n'a pas de valeur " +"correspondante, la valeur ``None`` sera utilisée pour cette variable." + +#: distutils/apiref.rst:1502 +msgid "" +"Return the full path name of the configuration header. For Unix, this will " +"be the header generated by the :program:`configure` script; for other " +"platforms the header will have been supplied directly by the Python source " +"distribution. The file is a platform-specific text file." +msgstr "" +"Renvoie le nom complet du chemin d'accès de l'en-tête de configuration. " +"Pour Unix, c'est l'en-tête généré par le script :program:`configure` ; pour " +"les autres plates-formes, l'en-tête provient directement de la distribution " +"source Python. Le fichier est un fichier texte spécifique à la plate-forme." + +#: distutils/apiref.rst:1510 +msgid "" +"Return the full path name of the :file:`Makefile` used to build Python. For " +"Unix, this will be a file generated by the :program:`configure` script; the " +"meaning for other platforms will vary. The file is a platform-specific text " +"file, if it exists. This function is only useful on POSIX platforms." +msgstr "" +"Renvoie le nom complet du chemin d'accès du fichier :file:`Makefile` utilisé " +"pour construire Python. Pour Unix, c'est le fichier généré par le script :" +"program:`configure`. La définition pour les autres plateformes varie. S'il " +"existe, il s'agit d'un fichier texte spécifique à la plate-forme. Cette " +"fonction n'est utile que sur les plates-formes POSIX." + +#: distutils/apiref.rst:1515 +msgid "" +"The following functions are deprecated together with this module and they " +"have no direct replacement." +msgstr "" + +#: distutils/apiref.rst:1521 +msgid "" +"Return the directory for either the general or platform-dependent C include " +"files. If *plat_specific* is true, the platform-dependent include directory " +"is returned; if false or omitted, the platform-independent directory is " +"returned. If *prefix* is given, it is used as either the prefix instead of :" +"const:`PREFIX`, or as the exec-prefix instead of :const:`EXEC_PREFIX` if " +"*plat_specific* is true." +msgstr "" +"Renvoie le répertoire pour les fichiers d'inclusion C standards ou " +"dépendants de la plate-forme. Si *plat_specific* est vrai, le répertoire " +"*include* dépendant de la plate-forme est renvoyé ; si la valeur est *False* " +"ou *None*, le répertoire indépendant de la plate-forme est renvoyé. Si " +"*prefix* est donné, il est utilisé soit comme préfixe au lieu de :const:" +"`PREFIX`, soit comme préfixe d'exécution au lieu de :const:`EXEC_PREFIX` si " +"*plat_specific* est vrai." + +#: distutils/apiref.rst:1531 +msgid "" +"Return the directory for either the general or platform-dependent library " +"installation. If *plat_specific* is true, the platform-dependent include " +"directory is returned; if false or omitted, the platform-independent " +"directory is returned. If *prefix* is given, it is used as either the " +"prefix instead of :const:`PREFIX`, or as the exec-prefix instead of :const:" +"`EXEC_PREFIX` if *plat_specific* is true. If *standard_lib* is true, the " +"directory for the standard library is returned rather than the directory for " +"the installation of third-party extensions." +msgstr "" +"Renvoie le répertoire pour l'installation de la bibliothèque standard ou " +"dépendante de la plate-forme. Si *plat_specific* est vrai, le répertoire " +"*include* dépendant de la plate-forme est renvoyé ; si la valeur est *False* " +"ou *None*, le répertoire indépendant de la plate-forme est renvoyé. Si " +"*prefix* est donné, il est utilisé soit comme préfixe au lieu de :const:" +"`PREFIX`, soit comme préfixe d'exécution au lieu de :const:`EXEC_PREFIX` si " +"*plat_specific* est vrai. Si *standard_lib* est vrai, le répertoire de la " +"bibliothèque standard est renvoyé plutôt que le répertoire d'installation " +"des extensions tierces." + +#: distutils/apiref.rst:1540 +msgid "" +"The following function is only intended for use within the :mod:`distutils` " +"package." +msgstr "" +"La fonction suivante est uniquement destinée à être utilisée dans le paquet :" +"mod:`distutils`." + +#: distutils/apiref.rst:1546 +msgid "" +"Do any platform-specific customization of a :class:`distutils.ccompiler." +"CCompiler` instance." +msgstr "" +"Exécute toute personnalisation spécifique à la plate-forme d'une instance :" +"class:`distutils.ccompiler.CCompiler`." + +#: distutils/apiref.rst:1549 +msgid "" +"This function is only needed on Unix at this time, but should be called " +"consistently to support forward-compatibility. It inserts the information " +"that varies across Unix flavors and is stored in Python's :file:`Makefile`. " +"This information includes the selected compiler, compiler and linker " +"options, and the extension used by the linker for shared objects." +msgstr "" +"Cette fonction n'est nécessaire que sous Unix pour le moment, mais doit être " +"appelée de manière cohérente pour supporter la compatibilité ascendante. " +"Elle insère des informations qui varient d'une version à l'autre d'Unix et " +"qui sont stockées dans le fichier Python :file:`Makefile`. Ces informations " +"comprennent le compilateur, les options du compilateur et de l'éditeur de " +"liens sélectionnés, ainsi que l'extension utilisée par l'éditeur de liens " +"pour les objets partagés." + +#: distutils/apiref.rst:1555 +msgid "" +"This function is even more special-purpose, and should only be used from " +"Python's own build procedures." +msgstr "" +"Cette fonction est encore plus spéciale, et ne devrait être utilisée que " +"dans les procédures de compilation de Python." + +#: distutils/apiref.rst:1561 +msgid "" +"Inform the :mod:`distutils.sysconfig` module that it is being used as part " +"of the build process for Python. This changes a lot of relative locations " +"for files, allowing them to be located in the build area rather than in an " +"installed Python." +msgstr "" +"Informe le module :mod:`distutils.sysconfig` qu'il est utilisé dans le cadre " +"du processus de compilation de Python. Cela change beaucoup d'emplacements " +"relatifs pour les fichiers, ce qui les place dans la zone de compilation " +"plutôt que dans un interpréteur Python installé." + +#: distutils/apiref.rst:1568 +msgid ":mod:`distutils.text_file` --- The TextFile class" +msgstr ":mod:`distutils.text_file` — La classe TextFile" + +#: distutils/apiref.rst:1574 +msgid "" +"This module provides the :class:`TextFile` class, which gives an interface " +"to text files that (optionally) takes care of stripping comments, ignoring " +"blank lines, and joining lines with backslashes." +msgstr "" +"Ce module fournit la classe :class:`TextFile`, qui donne une interface aux " +"fichiers texte qui s'occupe (optionnellement) de supprimer les commentaires, " +"d'ignorer les lignes vides et de joindre les lignes avec des antislashs." + +#: distutils/apiref.rst:1581 +msgid "" +"This class provides a file-like object that takes care of all the things " +"you commonly want to do when processing a text file that has some line-by-" +"line syntax: strip comments (as long as ``#`` is your comment character), " +"skip blank lines, join adjacent lines by escaping the newline (ie. backslash " +"at end of line), strip leading and/or trailing whitespace. All of these are " +"optional and independently controllable." +msgstr "" +"Cette classe fournit un objet de type fichier qui se charge de tout ce que " +"vous voulez généralement faire lors du traitement d'un fichier texte ayant " +"une syntaxe ligne par ligne : supprimer les commentaires (tant que ``#`` est " +"votre caractère de commentaire), passer des lignes vides, joindre les lignes " +"adjacentes (les lignes se terminant par un antislash) en une seule nouvelle " +"ligne, supprimer les blancs avant et après le texte. Toutes ces fonctions " +"sont optionnelles et peuvent être commandées indépendamment." + +#: distutils/apiref.rst:1588 +msgid "" +"The class provides a :meth:`warn` method so you can generate warning " +"messages that report physical line number, even if the logical line in " +"question spans multiple physical lines. Also provides :meth:`unreadline` " +"for implementing line-at-a-time lookahead." +msgstr "" +"La classe fournit une méthode :meth:`warn` pour pouvoir générer des messages " +"d'avertissement qui renvoie le numéro de ligne physique, même si la ligne " +"logique en question couvre plusieurs lignes physiques. Fournit également :" +"meth:`unreadline` pour implémenter un système prospectif ligne par ligne." + +#: distutils/apiref.rst:1593 +msgid "" +":class:`TextFile` instances are create with either *filename*, *file*, or " +"both. :exc:`RuntimeError` is raised if both are ``None``. *filename* should " +"be a string, and *file* a file object (or something that provides :meth:" +"`readline` and :meth:`close` methods). It is recommended that you supply " +"at least *filename*, so that :class:`TextFile` can include it in warning " +"messages. If *file* is not supplied, :class:`TextFile` creates its own " +"using the :func:`open` built-in function." +msgstr "" +"Les instances de :class:`TextFile` sont créées soit avec *filename*, soit " +"avec *file* ou bien les deux. :exc:`RuntimeError` est levé si les deux " +"valent ``None``. *filename* doit être une chaîne de caractères, et *file* un " +"objet fichier (ou quelque chose qui fournit les méthodes :meth:`readline` " +"et :meth:`close`). Il est recommandé de fournir au moins *filename*, afin " +"que :class:`TextFile` puisse l'inclure dans les messages d'avertissement. " +"Si *file* n'est pas fourni, :class:`TextFile` crée son propre fichier en " +"utilisant la fonction :func:`open`." + +#: distutils/apiref.rst:1601 +msgid "" +"The options are all boolean, and affect the values returned by :meth:" +"`readline`" +msgstr "" +"Les options sont toutes booléennes et affectent les valeurs renvoyées par :" +"meth:`readline`." + +#: distutils/apiref.rst:1606 +msgid "option name" +msgstr "Nom des options" + +#: distutils/apiref.rst:1606 +msgid "default" +msgstr "default" + +#: distutils/apiref.rst:1608 +msgid "*strip_comments*" +msgstr "*strip_comments*" + +#: distutils/apiref.rst:1608 +msgid "" +"strip from ``'#'`` to end-of-line, as well as any whitespace leading up to " +"the ``'#'``\\ ---unless it is escaped by a backslash" +msgstr "" +"Supprime les caractères à partir de ``'#'`` jusqu'à la fin de la ligne, " +"ainsi que tout espace blanc menant au premier ``'#'`` — à moins qu'il ne " +"soit échappé par un antislash" + +#: distutils/apiref.rst:1617 distutils/apiref.rst:1622 +msgid "true" +msgstr "*true*" + +#: distutils/apiref.rst:1614 +msgid "*lstrip_ws*" +msgstr "*lstrip_ws*" + +#: distutils/apiref.rst:1614 +msgid "strip leading whitespace from each line before returning it" +msgstr "" +"Efface les espaces blancs en début de chaque ligne avant de la renvoyer." + +#: distutils/apiref.rst:1632 distutils/apiref.rst:1643 +msgid "false" +msgstr "*false*" + +#: distutils/apiref.rst:1617 +msgid "*rstrip_ws*" +msgstr "*rstrip_ws*" + +#: distutils/apiref.rst:1617 +msgid "" +"strip trailing whitespace (including line terminator!) from each line before " +"returning it." +msgstr "" +"Efface les espaces blancs de fin de ligne (y compris le terminateur de " +"ligne !) de chaque ligne avant de la renvoyer." + +#: distutils/apiref.rst:1622 +msgid "*skip_blanks*" +msgstr "*skip_blanks*" + +#: distutils/apiref.rst:1622 +msgid "" +"skip lines that are empty \\*after\\* stripping comments and whitespace. " +"(If both lstrip_ws and rstrip_ws are false, then some lines may consist of " +"solely whitespace: these will \\*not\\* be skipped, even if *skip_blanks* is " +"true.)" +msgstr "" +"Ignore les lignes qui sont vides \\*après\\* la suppression des commentaires " +"et des espaces. (Si *lstrip_ws* et *rstrip_ws* sont tous les deux faux, " +"alors certaines lignes peuvent être composées uniquement d'espaces : elles " +"ne seront pas ignorées, même si *skip_blanks* est vrai." + +#: distutils/apiref.rst:1632 +msgid "*join_lines*" +msgstr "*join_lines*" + +#: distutils/apiref.rst:1632 +msgid "" +"if a backslash is the last non-newline character on a line after stripping " +"comments and whitespace, join the following line to it to form one logical " +"line; if N consecutive lines end with a backslash, then N+1 physical lines " +"will be joined to form one logical line." +msgstr "" +"Si sur la ligne, un antislash est le dernier caractère et que ce caractère " +"n'est pas le caractère de nouvelle ligne. Joint la ligne suivante pour " +"former une ligne logique. Si N lignes consécutives se terminent par un " +"antislash, alors N+1 lignes physiques seront liées pour former une seule " +"ligne logique." + +#: distutils/apiref.rst:1643 +msgid "*collapse_join*" +msgstr "*collapse_join*" + +#: distutils/apiref.rst:1643 +msgid "" +"strip leading whitespace from lines that are joined to their predecessor; " +"only matters if ``(join_lines and not lstrip_ws)``" +msgstr "" +"Supprime les espaces blancs des lignes qui sont jointes à leur " +"prédécesseur ; n'est utile que si ``(join_lines and not lstrip_ws)``." + +#: distutils/apiref.rst:1650 +msgid "" +"Note that since *rstrip_ws* can strip the trailing newline, the semantics " +"of :meth:`readline` must differ from those of the built-in file object's :" +"meth:`readline` method! In particular, :meth:`readline` returns ``None`` " +"for end-of-file: an empty string might just be a blank line (or an all-" +"whitespace line), if *rstrip_ws* is true but *skip_blanks* is not." +msgstr "" +"Notez que puisque *rstrip_ws* peut effacer la fin de la ligne, la sémantique " +"de :meth:`readline` doit être différente de celle de la méthode standard :" +"meth:`readline` des objets fichiers ! En particulier, :meth:`readline` " +"renvoie ``None`` pour indiquer la fin du fichier : une chaîne vide peut être " +"juste une ligne blanche (ou une ligne entièrement blanche), si *rstrip_ws* " +"est vrai mais pas si *skip_blanks* est faux." + +#: distutils/apiref.rst:1659 +msgid "" +"Open a new file *filename*. This overrides any *file* or *filename* " +"constructor arguments." +msgstr "" +"Ouvre un nouveau fichier *filename*. Remplace tous les arguments du " +"constructeur *file* ou *filename*." + +#: distutils/apiref.rst:1665 +msgid "" +"Close the current file and forget everything we know about it (including the " +"filename and the current line number)." +msgstr "" +"Ferme le fichier courant et oublie toutes les informations connues à son " +"sujet (y compris le nom du fichier et le numéro de la ligne courante)." + +#: distutils/apiref.rst:1671 +msgid "" +"Print (to stderr) a warning message tied to the current logical line in the " +"current file. If the current logical line in the file spans multiple " +"physical lines, the warning refers to the whole range, such as ``\"lines " +"3-5\"``. If *line* is supplied, it overrides the current line number; it " +"may be a list or tuple to indicate a range of physical lines, or an integer " +"for a single physical line." +msgstr "" +"Affiche (vers *stderr*) un message d'avertissement lié à la ligne logique " +"courante dans le fichier courant. Si la ligne logique courante dans le " +"fichier s'étend sur plusieurs lignes physiques, l'avertissement se réfère à " +"une plage de lignes physiques, telles que ``\"lignes 3-5\"``. Si *line* est " +"fourni, il remplace le numéro de la ligne courante ; il peut s'agir d'une " +"liste ou d'un couple pour indiquer une plage de lignes physiques, ou d'un " +"entier pour une seule ligne physique." + +#: distutils/apiref.rst:1681 +msgid "" +"Read and return a single logical line from the current file (or from an " +"internal buffer if lines have previously been \"unread\" with :meth:" +"`unreadline`). If the *join_lines* option is true, this may involve " +"reading multiple physical lines concatenated into a single string. Updates " +"the current line number, so calling :meth:`warn` after :meth:`readline` " +"emits a warning about the physical line(s) just read. Returns ``None`` on " +"end-of-file, since the empty string can occur if *rstrip_ws* is true but " +"*strip_blanks* is not." +msgstr "" +"Lit et renvoie une seule ligne logique à partir du fichier courant (ou à " +"partir d'un tampon interne si les lignes ont déjà été marquées comme non " +"lues avec :meth:`unreadline`). Si l'option *join_lines* est vraie, cela peut " +"impliquer la lecture de plusieurs lignes physiques concaténées en une seule " +"chaîne. Met à jour le numéro de la ligne courante. Appeler :meth:`warn` " +"après :meth:`readline` émet donc un avertissement sur la ou les lignes " +"physiques qui viennent d'être lues. Renvoie ``None`` à la fin du fichier, " +"puisque la chaîne vide peut se produire si *rstrip_ws* est vrai mais pas si " +"*strip_blanks* est faux." + +#: distutils/apiref.rst:1692 +msgid "" +"Read and return the list of all logical lines remaining in the current file. " +"This updates the current line number to the last line of the file." +msgstr "" +"Lit et renvoie la liste de toutes les lignes logiques restant dans le " +"fichier courant. Met à jour le numéro de la ligne courante à la dernière " +"ligne du fichier." + +#: distutils/apiref.rst:1698 +msgid "" +"Push *line* (a string) onto an internal buffer that will be checked by " +"future :meth:`readline` calls. Handy for implementing a parser with line-at-" +"a-time lookahead. Note that lines that are \"unread\" with :meth:" +"`unreadline` are not subsequently re-cleansed (whitespace stripped, or " +"whatever) when read with :meth:`readline`. If multiple calls are made to :" +"meth:`unreadline` before a call to :meth:`readline`, the lines will be " +"returned most in most recent first order." +msgstr "" +"Insère la ligne *line* (une chaîne de caractères) dans un tampon interne qui " +"sera vérifié par les futurs appels de :meth:`readline`. Utile pour " +"implémenter un analyseur prospectif ligne par ligne. Notez que les lignes " +"qui sont \"non lues\" avec :meth:`unreadline` ne sont ensuite pas traitées " +"de nouveau (espace blancs, ou autre) quand elles sont lues avec :meth:" +"`readline`. Si plusieurs appels sont faits à :meth:`unreadline` avant un " +"appel à :meth:`readline`, les lignes sont renvoyées dans l'ordre de la plus " +"récente première à la plus ancienne." + +#: distutils/apiref.rst:1707 +msgid ":mod:`distutils.version` --- Version number classes" +msgstr ":mod:`distutils.version` — Classes de numéros de version" + +#: distutils/apiref.rst:1722 +msgid ":mod:`distutils.cmd` --- Abstract base class for Distutils commands" +msgstr "" +":mod:`distutils.cmd` — Classe de base abstraite pour les commandes " +"*Distutils*" + +#: distutils/apiref.rst:1729 +msgid "This module supplies the abstract base class :class:`Command`." +msgstr "Ce module fournit la classe de base abstraite :class:`Command`." + +#: distutils/apiref.rst:1734 +msgid "" +"Abstract base class for defining command classes, the \"worker bees\" of the " +"Distutils. A useful analogy for command classes is to think of them as " +"subroutines with local variables called *options*. The options are declared " +"in :meth:`initialize_options` and defined (given their final values) in :" +"meth:`finalize_options`, both of which must be defined by every command " +"class. The distinction between the two is necessary because option values " +"might come from the outside world (command line, config file, ...), and any " +"options dependent on other options must be computed after these outside " +"influences have been processed --- hence :meth:`finalize_options`. The body " +"of the subroutine, where it does all its work based on the values of its " +"options, is the :meth:`run` method, which must also be implemented by every " +"command class." +msgstr "" +"Classe de base abstraite pour définir les classes de commandes, les " +"\"ouvrières\" de *Distutils*. Une analogie utile pour les classes de " +"commandes est de les considérer comme des sous-routines avec des variables " +"locales appelées *options*. Les options sont déclarées dans :meth:" +"`initialiser_options` et définies (compte tenu de leur valeur finale) dans :" +"meth:`finalize_options`, qui doivent être définies pour chaque classe de " +"commande. La distinction entre les deux est nécessaire parce que les " +"valeurs des options peuvent venir de l'extérieur (ligne de commande, fichier " +"de configuration…), et toutes les options dépendantes d'autres options " +"doivent être calculées après que ces options externes aient été traitées — " +"ce qui explique :meth:`finalize_options`. Le corps de la sous-routine, où " +"s'effectue tout le travail est basé sur les valeurs de ses options, est la " +"méthode :meth:`run`, qui doit être implémentée par chaque classe de commande." + +#: distutils/apiref.rst:1747 +msgid "" +"The class constructor takes a single argument *dist*, a :class:`~distutils." +"core.Distribution` instance." +msgstr "" +"Le constructeur prend un seul argument, *dist*, une instance de :class:" +"`~distutils.core.Distribution`." + +#: distutils/apiref.rst:1752 +msgid "Creating a new Distutils command" +msgstr "Créer une nouvelle commande *Distutils*" + +#: distutils/apiref.rst:1754 +msgid "This section outlines the steps to create a new Distutils command." +msgstr "" +"Cette section décrit les étapes pour créer une nouvelle commande *Distutils*." + +#: distutils/apiref.rst:1756 +msgid "" +"A new command lives in a module in the :mod:`distutils.command` package. " +"There is a sample template in that directory called :file:" +"`command_template`. Copy this file to a new module with the same name as " +"the new command you're implementing. This module should implement a class " +"with the same name as the module (and the command). So, for instance, to " +"create the command ``peel_banana`` (so that users can run ``setup.py " +"peel_banana``), you'd copy :file:`command_template` to :file:`distutils/" +"command/peel_banana.py`, then edit it so that it's implementing the class :" +"class:`peel_banana`, a subclass of :class:`distutils.cmd.Command`." +msgstr "" +"Une nouvelle commande doit résider dans un module du package :mod:`distutils." +"command`. Il existe un exemple de modèle dans ce répertoire nommé :file:" +"`command_template`. Copiez ce fichier dans un nouveau module portant le même " +"nom que la nouvelle commande que vous implémentez. Ce module doit " +"implémenter une classe portant le même nom que le module (et la commande). " +"Par exemple, pour créer la commande ``peel_banana`` (afin que les " +"utilisateurs puissent exécuter ``setup.py peel_banana``), vous devez copier " +"le fichier :file:`commande_template` dans :file:`distutils/command/" +"peel_banana.py`, puis l'éditer pour qu'il implémente la classe :class:" +"`peel_banana`, une sous-classe de la classe :class:`distutils.cmd.Command`." + +#: distutils/apiref.rst:1766 +msgid "Subclasses of :class:`Command` must define the following methods." +msgstr "" +"Les sous-classes de la classe :class:`Command` doivent définir les méthodes " +"suivantes." + +#: distutils/apiref.rst:1770 +msgid "" +"Set default values for all the options that this command supports. Note " +"that these defaults may be overridden by other commands, by the setup " +"script, by config files, or by the command-line. Thus, this is not the " +"place to code dependencies between options; generally, :meth:" +"`initialize_options` implementations are just a bunch of ``self.foo = None`` " +"assignments." +msgstr "" +"Définit des valeurs par défaut pour toutes les options que cette commande " +"gère. Notez que ces valeurs par défaut peuvent être remplacées par d'autres " +"commandes, par le script d'installation, par des fichiers de configuration " +"ou par la ligne de commande. Ce n'est donc pas l'endroit idéal pour " +"introduire des dépendances entre les options. En règle générale, les " +"méthodes suivantes :meth:`initialize_options` ne font que des assignations " +"de type ``self.truc = None``." + +#: distutils/apiref.rst:1779 +msgid "" +"Set final values for all the options that this command supports. This is " +"always called as late as possible, ie. after any option assignments from " +"the command-line or from other commands have been done. Thus, this is the " +"place to code option dependencies: if *foo* depends on *bar*, then it is " +"safe to set *foo* from *bar* as long as *foo* still has the same value it " +"was assigned in :meth:`initialize_options`." +msgstr "" +"Définit les valeurs finales pour toutes les options que cette commande gère. " +"Cette méthode doit toujours être appelée le plus tard possible, c'est-à-dire " +"après que toutes les affectations des options de la ligne de commande ou que " +"d'autres commandes ont été faites. C'est donc l'endroit idéal pour " +"introduire des dépendances d'options : si *truc* dépend de *machin*, alors " +"il est sûr de mettre *truc* de *machin* aussi longtemps que *truc* a " +"toujours la même valeur qui lui a été attribué par :meth:" +"`initialize_options`." + +#: distutils/apiref.rst:1789 +msgid "" +"A command's raison d'etre: carry out the action it exists to perform, " +"controlled by the options initialized in :meth:`initialize_options`, " +"customized by other commands, the setup script, the command-line, and config " +"files, and finalized in :meth:`finalize_options`. All terminal output and " +"filesystem interaction should be done by :meth:`run`." +msgstr "" +"La raison d'être d'une commande : exécuter l'action programmée en étant " +"contrôlée par les options initialisées dans :meth:`initialize_options`, " +"personnalisées par d'autres commandes, par le script de configuration, par " +"la ligne de commande et les fichiers de configuration, puis finalisée dans :" +"meth:`finalize_options`. Toutes les interactions avec le système de fichiers " +"et la sortie du terminal doivent être effectuées par :meth:`run`." + +#: distutils/apiref.rst:1798 +msgid "" +"*sub_commands* formalizes the notion of a \"family\" of commands, e.g. " +"``install`` as the parent with sub-commands ``install_lib``, " +"``install_headers``, etc. The parent of a family of commands defines " +"*sub_commands* as a class attribute; it's a list of 2-tuples " +"``(command_name, predicate)``, with *command_name* a string and *predicate* " +"a function, a string or ``None``. *predicate* is a method of the parent " +"command that determines whether the corresponding command is applicable in " +"the current situation. (E.g. ``install_headers`` is only applicable if we " +"have any C header files to install.) If *predicate* is ``None``, that " +"command is always applicable." +msgstr "" +"*sub_commands* formalise la notion de \"famille\" de commandes, par exemple. " +"``install`` est le parent des sous-commandes ``install_lib``, " +"``install_headers``, etc. Le parent d'une famille de commandes définit " +"*sub_commands* en tant qu'attribut de classe ; c'est une liste de couples " +"``(command_name, predicate)``, avec *command_name* le nom de la commande et " +"*predicate* une fonction, une chaîne ou ``None``. *predicate* est une " +"méthode de la commande parent qui détermine si la commande correspondante " +"est applicable dans la situation actuelle. Par exemple : ``install_headers`` " +"n'est applicable que s'il existe des fichiers d'en-tête C à installer. Si " +"*predicate* est ``None``, cette commande est toujours effectuée." + +#: distutils/apiref.rst:1809 +msgid "" +"*sub_commands* is usually defined at the *end* of a class, because " +"predicates can be methods of the class, so they must already have been " +"defined. The canonical example is the :command:`install` command." +msgstr "" +"*sub_commands* est généralement défini à la *fin* d'une classe, car les " +"prédicats peuvent être des méthodes de la classe, ils doivent donc déjà " +"avoir été définis. L'exemple canonique est la commande :command:`install`." + +#: distutils/apiref.rst:1815 +msgid ":mod:`distutils.command` --- Individual Distutils commands" +msgstr ":mod:`distutils.command` — Commandes *Distutils* individuelles" + +#: distutils/apiref.rst:1826 +msgid ":mod:`distutils.command.bdist` --- Build a binary installer" +msgstr ":mod:`distutils.command.bdist` — Construit un installateur binaire" + +#: distutils/apiref.rst:1836 +msgid "" +":mod:`distutils.command.bdist_packager` --- Abstract base class for packagers" +msgstr "" +":mod:`distutils.command.bdist_packager` — Classe de base abstraite pour " +"empaqueteurs" + +#: distutils/apiref.rst:1846 +msgid ":mod:`distutils.command.bdist_dumb` --- Build a \"dumb\" installer" +msgstr "" +":mod:`distutils.command.bdist_dumb` — Construit un installateur passif " +"(*dumb*)" + +#: distutils/apiref.rst:1856 +msgid "" +":mod:`distutils.command.bdist_msi` --- Build a Microsoft Installer binary " +"package" +msgstr "" +":mod:`distutils.command.bdist_msi` — Construit un installateur Microsoft" + +#: distutils/apiref.rst:1863 +msgid "Use bdist_wheel (wheel packages) instead." +msgstr "Utilisez *bdist_wheel* (paquet au format *wheel*) à la place." + +#: distutils/apiref.rst:1866 +msgid "Builds a `Windows Installer`_ (.msi) binary package." +msgstr "Construit un installateur `Windows Installeur`_ (*.msi*)" + +#: distutils/apiref.rst:1872 +msgid "" +":mod:`distutils.command.bdist_rpm` --- Build a binary distribution as a " +"Redhat RPM and SRPM" +msgstr "" +":mod:`distutils.command.bdist_rpm` — Construit une distribution binaire au " +"format Redhat RPM et SRPM" + +#: distutils/apiref.rst:1882 +msgid ":mod:`distutils.command.sdist` --- Build a source distribution" +msgstr ":mod:`distutils.command.sdist` — Construit une distribution source" + +#: distutils/apiref.rst:1892 +msgid ":mod:`distutils.command.build` --- Build all files of a package" +msgstr "" +":mod:`distutils.command.build` — Construit tous les fichiers d'un paquet" + +#: distutils/apiref.rst:1902 +msgid "" +":mod:`distutils.command.build_clib` --- Build any C libraries in a package" +msgstr "" +":mod:`distutils.command.build_clib` — Construit toutes les bibliothèques C " +"d'un paquet" + +#: distutils/apiref.rst:1912 +msgid "" +":mod:`distutils.command.build_ext` --- Build any extensions in a package" +msgstr "" +":mod:`distutils.command.build_ext` — Construit toutes les extensions d'un " +"paquet" + +#: distutils/apiref.rst:1922 +msgid "" +":mod:`distutils.command.build_py` --- Build the .py/.pyc files of a package" +msgstr "" +":mod:`distutils.command.build_py` — Construit les fichiers *.py/.pyc* d'un " +"paquet" + +#: distutils/apiref.rst:1932 +msgid "" +"Alternative implementation of build_py which also runs the 2to3 conversion " +"library on each .py file that is going to be installed. To use this in a " +"setup.py file for a distribution that is designed to run with both Python 2." +"x and 3.x, add::" +msgstr "" +"Implémentation alternative de *build_py* qui exécute également la " +"bibliothèque de conversion *2to3* sur chaque fichier *.py* qui va être " +"installé. Pour l'utiliser dans un fichier *setup.py* pour une distribution " +"conçue pour fonctionner avec *Python 2.x* et *3.x*, ajouter ::" + +#: distutils/apiref.rst:1942 +msgid "to your setup.py, and later::" +msgstr "à votre *setup.py* et, plus tard ::" + +#: distutils/apiref.rst:1946 +msgid "to the invocation of setup()." +msgstr "à l'appel de *setup()*." + +#: distutils/apiref.rst:1950 +msgid "" +":mod:`distutils.command.build_scripts` --- Build the scripts of a package" +msgstr "" +":mod:`distutils.command.build_scripts` — Construit les scripts d'un paquet" + +#: distutils/apiref.rst:1960 +msgid ":mod:`distutils.command.clean` --- Clean a package build area" +msgstr "" +":mod:`distutils.command.clean` — Nettoie un dossier de compilation d'un " +"paquet" + +#: distutils/apiref.rst:1965 +msgid "" +"This command removes the temporary files created by :command:`build` and its " +"subcommands, like intermediary compiled object files. With the ``--all`` " +"option, the complete build directory will be removed." +msgstr "" +"Cette commande supprime les fichiers temporaires créés par la commande :" +"command:`build` et ses sous-commandes, comme les fichiers objets compilés " +"intermédiaires. Avec l'option ``--all``, le répertoire de compilation sera " +"supprimé." + +#: distutils/apiref.rst:1969 +msgid "" +"Extension modules built :ref:`in place ` will " +"not be cleaned, as they are not in the build directory." +msgstr "" +"Les modules d'extension construits :ref:`sur place ` ne seront pas effacés, car ils ne sont pas dans le répertoire " +"*build*." + +#: distutils/apiref.rst:1974 +msgid ":mod:`distutils.command.config` --- Perform package configuration" +msgstr "" +":mod:`distutils.command.config` — Effectue la configuration d'un paquet" + +#: distutils/apiref.rst:1984 +msgid ":mod:`distutils.command.install` --- Install a package" +msgstr ":mod:`distutils.command.install` — Installe un paquet" + +#: distutils/apiref.rst:1994 +msgid "" +":mod:`distutils.command.install_data` --- Install data files from a package" +msgstr "" +":mod:`distutils.command.install_data` — Installe les fichiers de données " +"d'un paquet" + +#: distutils/apiref.rst:2004 +msgid "" +":mod:`distutils.command.install_headers` --- Install C/C++ header files from " +"a package" +msgstr "" +":mod:`distutils.command.install_headers` — Installe les fichiers d'en-tête C/" +"C++ d'un paquet" + +#: distutils/apiref.rst:2014 +msgid "" +":mod:`distutils.command.install_lib` --- Install library files from a package" +msgstr "" +":mod:`distutils.command.install_lib` — Installe les fichiers de bibliothèque " +"à partir d'un paquet" + +#: distutils/apiref.rst:2024 +msgid "" +":mod:`distutils.command.install_scripts` --- Install script files from a " +"package" +msgstr "" +":mod:`distutils.command.install_scripts` — Installe les fichiers de script " +"d'un paquet" + +#: distutils/apiref.rst:2034 +msgid "" +":mod:`distutils.command.register` --- Register a module with the Python " +"Package Index" +msgstr "" +":mod:`distutils.command.register` — Enregistre un module dans l'Index des " +"paquets Python (*Python Package Index* ou *PyPI* en anglais)" + +#: distutils/apiref.rst:2040 +msgid "" +"The ``register`` command registers the package with the Python Package " +"Index. This is described in more detail in :pep:`301`." +msgstr "" +"La commande ``register`` enregistre le paquet dans l'index des paquets " +"Python. Plus de détails à ce sujet dans la :pep:`301`." + +#: distutils/apiref.rst:2047 +msgid ":mod:`distutils.command.check` --- Check the meta-data of a package" +msgstr ":mod:`distutils.command.check` — Vérifie les méta-données d'un paquet" + +#: distutils/apiref.rst:2053 +msgid "" +"The ``check`` command performs some tests on the meta-data of a package. For " +"example, it verifies that all required meta-data are provided as the " +"arguments passed to the :func:`setup` function." +msgstr "" +"La commande ``check`` effectue des tests sur les méta-données d'un paquet. " +"Par exemple, elle vérifie que toutes les méta-données requises sont fournies " +"lorsque les arguments sont passés à la fonction :func:`setup`." + +#~ msgid "" +#~ "In most cases, the ``bdist_msi`` installer is a better choice than the " +#~ "``bdist_wininst`` installer, because it provides better support for Win64 " +#~ "platforms, allows administrators to perform non-interactive " +#~ "installations, and allows installation through group policies." +#~ msgstr "" +#~ "Dans la plupart des cas, l'installateur ``bdist_msi`` est un meilleur " +#~ "choix que l'installateur ``bdist_wininst``, car il gère mieux les plates-" +#~ "formes *Win64*, et permet en plus aux administrateurs d'effectuer des " +#~ "installations non interactives ainsi que des installations via des " +#~ "stratégies de groupe." + +#~ msgid ":mod:`distutils.command.bdist_wininst` --- Build a Windows installer" +#~ msgstr "" +#~ ":mod:`distutils.command.bdist_wininst` — Construit un installateur Windows" diff --git a/distutils/builtdist.po b/distutils/builtdist.po new file mode 100644 index 0000000000..83ffe935bf --- /dev/null +++ b/distutils/builtdist.po @@ -0,0 +1,1028 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-04-05 10:05+0200\n" +"PO-Revision-Date: 2021-12-11 12:33+0100\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.4.2\n" + +#: distutils/builtdist.rst:5 +msgid "Creating Built Distributions" +msgstr "Créer une distribution compilée" + +#: distutils/_setuptools_disclaimer.rst:3 +msgid "" +"This document is being retained solely until the ``setuptools`` " +"documentation at https://setuptools.readthedocs.io/en/latest/setuptools.html " +"independently covers all of the relevant information currently included here." +msgstr "" +"Cette page est conservée uniquement jusqu'à ce que la documentation " +"``setuptool`` sur https://setuptools.readthedocs.io/en/latest/setuptools." +"html couvre de manière indépendante toutes les informations pertinentes " +"actuellement incluses ici." + +#: distutils/builtdist.rst:9 +msgid "" +"A \"built distribution\" is what you're probably used to thinking of either " +"as a \"binary package\" or an \"installer\" (depending on your background). " +"It's not necessarily binary, though, because it might contain only Python " +"source code and/or byte-code; and we don't call it a package, because that " +"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 sûrement 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 "" +"A built distribution is how you make life as easy as possible for installers " +"of your module distribution: for users of RPM-based Linux systems, it's a " +"binary RPM; for Windows users, it's an executable installer; for Debian-" +"based Linux users, it's a Debian package; and so forth. Obviously, no one " +"person will be able to create built distributions for every platform under " +"the sun, so the Distutils are designed to enable module developers to " +"concentrate on their specialty---writing code and creating source " +"distributions---while an intermediary species called *packagers* springs up " +"to turn source distributions into built distributions for as many platforms " +"as there are packagers." +msgstr "" +"Une distribution compilée est une manière de rendre la vie plus facile à " +"ceux qui installent votre module : pour les utilisateurs de système Linux " +"basé sur RPM, ce sera des binaires RPM ; pour les utilisateurs de Windows, " +"c'est un installateur exécutable ; pour les utilisateurs de Linux basés sur " +"Debian, c'est un paquet Debian ; et ainsi de suite. Évidemment, personne " +"n'est capable de créer une distribution compilée pour toutes les plateformes " +"existantes, donc Distutils est fait pour permettre aux développeurs de se " +"concentrer sur leurs spécialités --- écrire du code et créer des " +"distributions source --- pendant que d'autres, appelés *packagers* " +"s'occupent de transformer les sources en paquets pour chaque plateforme." + +#: distutils/builtdist.rst:26 +msgid "" +"Of course, the module developer could be their own packager; or the packager " +"could be a volunteer \"out there\" somewhere who has access to a platform " +"which the original developer does not; or it could be software periodically " +"grabbing new source distributions and turning them into built distributions " +"for as many platforms as the software has access to. Regardless of who they " +"are, a packager uses the setup script and the :command:`bdist` command " +"family to generate built distributions." +msgstr "" +"Bien sur, le développeur du module peut être son propre *packager* ; ou le " +"*packager* peut être un volontaire \"quelque part\" qui a accès à une " +"plateforme que le développeur initial n'a pas ; ou bien un logiciel qui " +"prend les sources périodiquement et les transforme en une distribution " +"compilée pour autant de plateforme que le logiciel a accès. Peu importe qui " +"ils sont, les *packagers* utilisent ``setup.py`` et la famille de commandes :" +"command:`bdist` afin de générer une distribution compilée." + +#: distutils/builtdist.rst:34 +msgid "" +"As a simple example, if I run the following command in the Distutils source " +"tree::" +msgstr "" +"Pour prendre un exemple simple, si je lance la commande suivante dans les " +"sources de Distutils ::" + +#: distutils/builtdist.rst:39 +msgid "" +"then the Distutils builds my module distribution (the Distutils itself in " +"this case), does a \"fake\" installation (also in the :file:`build` " +"directory), and creates the default type of built distribution for my " +"platform. The default format for built distributions is a \"dumb\" tar file " +"on Unix, and a simple executable installer on Windows. (That tar file is " +"considered \"dumb\" because it has to be unpacked in a specific location to " +"work.)" +msgstr "" +"alors Distutils construit ma distribution du module (Distutils lui-même dans " +"ce cas), fait une \"fausse\" installation (aussi dans le dossier :file:" +"`build`) et crée le type de distribution compilée par défaut pour ma " +"plateforme. Le format par défaut est un \"bête\" fichier *tar* pour Unix et " +"un simple installateur exécutable pour Windows (ce fichier *tar* est " +"considéré comme \"bête\" car il doit être décompressé à un endroit précis " +"pour fonctionner)." + +#: distutils/builtdist.rst:46 +msgid "" +"Thus, the above command on a Unix system creates :file:`Distutils-1.0.{plat}." +"tar.gz`; unpacking this tarball from the right place installs the Distutils " +"just as though you had downloaded the source distribution and run ``python " +"setup.py install``. (The \"right place\" is either the root of the " +"filesystem or Python's :file:`{prefix}` directory, depending on the options " +"given to the :command:`bdist_dumb` command; the default is to make dumb " +"distributions relative to :file:`{prefix}`.)" +msgstr "" +"Par conséquent, la commande si dessus crée le fichier :file:`Distutils-1.0." +"{plat}.tar.gz` sur les systèmes Unix ; décompresser cette archive *tar* au " +"bon endroit installe Distutils exactement comme si vous aviez téléchargé la " +"distribution source et lancé ``python setup.py install`` (le \"bon endroit\" " +"est soit la racine du système de fichier, ou le dossier de Python :file:" +"`{prefix}`, tout dépend des options données à la commande :command:" +"`bdist_dumb` ; la valeur par défaut est de créer une distribution \"bête\" " +"relative à :file:`{prefix}`)." + +#: distutils/builtdist.rst:54 +msgid "" +"Obviously, for pure Python distributions, this isn't any simpler than just " +"running ``python setup.py install``\\ ---but for non-pure distributions, " +"which include extensions that would need to be compiled, it can mean the " +"difference between someone being able to use your extensions or not. And " +"creating \"smart\" built distributions, such as an RPM package or an " +"executable installer for Windows, is far more convenient for users even if " +"your distribution doesn't include any extensions." +msgstr "" +"Évidemment, pour une distribution en Python pur, ce n'est pas aussi simple " +"que de simplement lancer ``python setup.py install``\\ ---mais pour une " +"distribution non-pure qui inclut des extensions qui devraient être " +"compilées, ça peut faire la différence entre quelqu'un qui sera capable " +"d'utiliser votre extension, ou non. De plus créer une distribution compilée " +"\"intelligente\" tel qu'un paquet RPM ou un installateur exécutable Windows, " +"est bien plus pratique pour les utilisateurs, même si votre module n'inclut " +"aucune extension." + +#: distutils/builtdist.rst:62 +msgid "" +"The :command:`bdist` command has a :option:`!--formats` option, similar to " +"the :command:`sdist` command, which you can use to select the types of built " +"distribution to generate: for example, ::" +msgstr "" +"La commande :command:`bdist` a l'option :option:`!--formats`, similaire à la " +"commande :command:`sdist`, que vous pouvez utiliser pour sélectionner le " +"type de distribution compilée à générer : par exemple, ::" + +#: distutils/builtdist.rst:68 +msgid "" +"would, when run on a Unix system, create :file:`Distutils-1.0.{plat}.zip`\\ " +"---again, this archive would be unpacked from the root directory to install " +"the Distutils." +msgstr "" +"serait, lors d'une exécution sur un système Unix, crée :file:`Distutils-1.0." +"{plat}.zip`\\ ---à nouveau, cette archive devra être décompressé depuis la " +"racine pour installer Distutils." + +#: distutils/builtdist.rst:72 +msgid "The available formats for built distributions are:" +msgstr "Les formats disponibles pour les distributions compilées sont :" + +#: distutils/builtdist.rst:75 +msgid "Format" +msgstr "Format" + +#: distutils/builtdist.rst:75 +msgid "Description" +msgstr "Description" + +#: distutils/builtdist.rst:75 +msgid "Notes" +msgstr "Notes" + +#: distutils/builtdist.rst:77 +msgid "``gztar``" +msgstr "``gztar``" + +#: distutils/builtdist.rst:77 +msgid "gzipped tar file (:file:`.tar.gz`)" +msgstr "fichier *tar* *gzippé* (:file:`.tar.gz`)" + +#: distutils/builtdist.rst:77 +msgid "\\(1)" +msgstr "\\(1)" + +#: distutils/builtdist.rst:80 +msgid "``bztar``" +msgstr "``bztar``" + +#: distutils/builtdist.rst:80 +msgid "bzipped tar file (:file:`.tar.bz2`)" +msgstr "fichier *tar* de type *bzipped* (:file:`.tar.bz2`)" + +#: distutils/builtdist.rst:83 +msgid "``xztar``" +msgstr "``xztar``" + +#: distutils/builtdist.rst:83 +msgid "xzipped tar file (:file:`.tar.xz`)" +msgstr "fichier *tar* de type *xzipped* (:file:`.tar.xz`)" + +#: distutils/builtdist.rst:86 +msgid "``ztar``" +msgstr "``ztar``" + +#: distutils/builtdist.rst:86 +msgid "compressed tar file (:file:`.tar.Z`)" +msgstr "fichier *tar* compressé par *compress* (:file:`.tar.Z`)" + +#: distutils/builtdist.rst:86 +msgid "\\(3)" +msgstr "\\(3)" + +#: distutils/builtdist.rst:89 +msgid "``tar``" +msgstr "``tar``" + +#: distutils/builtdist.rst:89 +msgid "tar file (:file:`.tar`)" +msgstr "fichier *tar* (:file:`.tar`)" + +#: distutils/builtdist.rst:91 +msgid "``zip``" +msgstr "``zip``" + +#: distutils/builtdist.rst:91 +msgid "zip file (:file:`.zip`)" +msgstr "fichier *zip* (:file:`.zip`)" + +#: distutils/builtdist.rst:91 +msgid "(2),(4)" +msgstr "(2),(4)" + +#: distutils/builtdist.rst:93 +msgid "``rpm``" +msgstr "``rpm``" + +#: distutils/builtdist.rst:93 +msgid "RPM" +msgstr "RPM" + +#: distutils/builtdist.rst:93 +msgid "\\(5)" +msgstr "\\(5)" + +#: distutils/builtdist.rst:95 +msgid "``pkgtool``" +msgstr "``pkgtool``" + +#: distutils/builtdist.rst:95 +msgid "Solaris :program:`pkgtool`" +msgstr "Solaris :program:`pkgtool`" + +#: distutils/builtdist.rst:97 +msgid "``sdux``" +msgstr "``sdux``" + +#: distutils/builtdist.rst:97 +msgid "HP-UX :program:`swinstall`" +msgstr "HP-UX :program:`swinstall`" + +#: distutils/builtdist.rst:99 +msgid "``msi``" +msgstr "``msi``" + +#: distutils/builtdist.rst:99 +msgid "Microsoft Installer." +msgstr "Installateur Microsoft." + +#: distutils/builtdist.rst:102 +msgid "Added support for the ``xztar`` format." +msgstr "Ajout du support des fichiers ``xztar``." + +#: distutils/builtdist.rst:106 +msgid "Notes:" +msgstr "Notes :" + +#: distutils/builtdist.rst:109 +msgid "default on Unix" +msgstr "par défaut sur Unix" + +#: distutils/builtdist.rst:112 +msgid "default on Windows" +msgstr "par défaut sur Windows" + +#: distutils/builtdist.rst:115 +msgid "requires external :program:`compress` utility." +msgstr "nécessite un programme externe :program:`compress`." + +#: distutils/builtdist.rst:118 +msgid "" +"requires either external :program:`zip` utility or :mod:`zipfile` module " +"(part of the standard Python library since Python 1.6)" +msgstr "" +"nécessite soit un utilitaire :program:`zip` extérieur ou le module :mod:" +"`zipfile` (inclut dans la bibliothèque standard depuis Python 1.6)" + +#: distutils/builtdist.rst:122 +msgid "" +"requires external :program:`rpm` utility, version 3.0.4 or better (use ``rpm " +"--version`` to find out which version you have)" +msgstr "" +"nécessite un programme externe :program:`rpm`, version 3.0.4 ou mieux " +"(utilisez ``rpm --version`` pour connaître quelle version vous avez)" + +#: distutils/builtdist.rst:125 +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:" +msgstr "" +"Vous ne devez pas utiliser la commande :command:`bdist` avec l'option :" +"option:`!--formats` ; Vous pouvez également utiliser la commande qui " +"implémente directement le format qui vous intéresse. Certaines de ces \"sous-" +"commandes\" :command:`bdist` génèrent plusieurs formats similaires ; par " +"exemple, La commande :command:`bdist_dumb` génère les archives aux formats " +"\"bêtes\" (``tar``, ``gztar``, ``bztar``, ``xztar``, ``ztar``, et ``zip``), " +"et :command:`bdist_rpm` génère les binaires RPM et ainsi que les sources. " +"Les sous-commandes :command:`bdist`, et les formats générés par chacun, " +"sont :" + +#: distutils/builtdist.rst:135 +msgid "Command" +msgstr "Commande" + +#: distutils/builtdist.rst:135 +msgid "Formats" +msgstr "Formats" + +#: distutils/builtdist.rst:137 +msgid ":command:`bdist_dumb`" +msgstr ":command:`bdist_dumb`" + +#: distutils/builtdist.rst:137 +msgid "tar, gztar, bztar, xztar, ztar, zip" +msgstr "tar, gztar, bztar, xztar, ztar, zip" + +#: distutils/builtdist.rst:139 +msgid ":command:`bdist_rpm`" +msgstr ":command:`bdist_rpm`" + +#: distutils/builtdist.rst:139 +msgid "rpm, srpm" +msgstr "rpm, srpm" + +#: distutils/builtdist.rst:141 +msgid ":command:`bdist_msi`" +msgstr ":command:`bdist_msi`" + +#: distutils/builtdist.rst:141 +msgid "msi" +msgstr "msi" + +#: distutils/builtdist.rst:145 +msgid "bdist_msi is deprecated since Python 3.9." +msgstr "``bdist_msi`` est obsolète depuis Python 3.9." + +#: distutils/builtdist.rst:147 +msgid "" +"The following sections give details on the individual :command:`bdist_\\*` " +"commands." +msgstr "" +"Le chapitre suivant donne des détails individuel sur les commandes :command:" +"`bdist_\\*`." + +#: distutils/builtdist.rst:163 +msgid "Creating RPM packages" +msgstr "Créer un paquet RPM" + +#: distutils/builtdist.rst:165 +msgid "" +"The RPM format is used by many popular Linux distributions, including Red " +"Hat, SuSE, and Mandrake. If one of these (or any of the other RPM-based " +"Linux distributions) is your usual environment, creating RPM packages for " +"other users of that same distribution is trivial. Depending on the " +"complexity of your module distribution and differences between Linux " +"distributions, you may also be able to create RPMs that work on different " +"RPM-based distributions." +msgstr "" +"Le format RPM est utilisé par beaucoup de distributions Linux populaires, " +"incluant Red Hat, SuSE et Mandrake. Si l'une d'entre elle (ou n'importe " +"quelle autre distribution basé sur RPM) est votre environnement habituel, " +"créer un paquet pour les autres utilisateur de ces distributions est " +"trivial. Cela dépend de la complexité de votre module et des différences " +"entre les distributions Linux, vous pourrez aussi créer des RPM qui " +"fonctionneront sur des distributions RPM différentes." + +#: distutils/builtdist.rst:172 +msgid "" +"The usual way to create an RPM of your module distribution is to run the :" +"command:`bdist_rpm` command::" +msgstr "" +"La manière habituelle de créer un RPM de votre module est d'utiliser la " +"commande :command:`bdist_rpm` ::" + +#: distutils/builtdist.rst:177 +msgid "or the :command:`bdist` command with the :option:`!--format` option::" +msgstr "ou la commande :command:`bdist` avec l'option :option:`!--format` ::" + +#: distutils/builtdist.rst:181 +msgid "" +"The former allows you to specify RPM-specific options; the latter allows " +"you to easily specify multiple formats in one run. If you need to do both, " +"you can explicitly specify multiple :command:`bdist_\\*` commands and their " +"options::" +msgstr "" +"La première vous permet de spécifier des options spécifiques à RPM ; la " +"dernière vous permet de spécifier plusieurs formats d'un seul coup. Si vous " +"avez besoin d'utiliser les deux, vous pouvez explicitement spécifier " +"plusieurs commandes :command:`bdist_\\*` et leurs options ::" + +#: distutils/builtdist.rst:187 +msgid "" +"Creating RPM packages is driven by a :file:`.spec` file, much as using the " +"Distutils is driven by the setup script. To make your life easier, the :" +"command:`bdist_rpm` command normally creates a :file:`.spec` file based on " +"the information you supply in the setup script, on the command line, and in " +"any Distutils configuration files. Various options and sections in the :" +"file:`.spec` file are derived from options in the setup script as follows:" +msgstr "" +"La création de Package RPM est configurée par un fichier :file:`.spec`, un " +"peu comme Distutils est configuré par script *setup.py*. Pour vous faciliter " +"la tâche, la commande :command:`bdist_rpm` crée normalement un fichier :file:" +"`.spec` basé sur les informations que vous fournissez dans *setup.py*, dans " +"les options de la ligne de commande et dans la configuration de Distutils. " +"Beaucoup d'options du fichier :file:`.spec` sont dérivées des options du " +"script de préparation suivant :" + +#: distutils/builtdist.rst:219 +msgid "RPM :file:`.spec` file option or section" +msgstr "Option de fichier RPM :file:`.spec`" + +#: distutils/builtdist.rst:195 +msgid "Distutils setup script option" +msgstr "Options du script de préparation Distutils" + +#: distutils/builtdist.rst:197 +msgid "Name" +msgstr "Nom" + +#: distutils/builtdist.rst:197 +msgid "``name``" +msgstr "``name``" + +#: distutils/builtdist.rst:199 +msgid "Summary (in preamble)" +msgstr "*Summary* (dans le préambule)" + +#: distutils/builtdist.rst:199 +msgid "``description``" +msgstr "``description``" + +#: distutils/builtdist.rst:201 +msgid "Version" +msgstr "Version" + +#: distutils/builtdist.rst:201 +msgid "``version``" +msgstr "``version``" + +#: distutils/builtdist.rst:226 +msgid "Vendor" +msgstr "Vendor" + +#: distutils/builtdist.rst:203 +msgid "" +"``author`` and ``author_email``, or --- & ``maintainer`` and " +"``maintainer_email``" +msgstr "" +"``author`` et ``author_email``, ou --- & ``maintainer`` et " +"``maintainer_email``" + +#: distutils/builtdist.rst:207 +msgid "Copyright" +msgstr "Copyright" + +#: distutils/builtdist.rst:207 +msgid "``license``" +msgstr "``license``" + +#: distutils/builtdist.rst:209 +msgid "Url" +msgstr "Url" + +#: distutils/builtdist.rst:209 +msgid "``url``" +msgstr "``url``" + +#: distutils/builtdist.rst:211 +msgid "%description (section)" +msgstr "%description (section)" + +#: distutils/builtdist.rst:211 +msgid "``long_description``" +msgstr "``long_description``" + +#: distutils/builtdist.rst:214 +msgid "" +"Additionally, there are many options in :file:`.spec` files that don't have " +"corresponding options in the setup script. Most of these are handled " +"through options to the :command:`bdist_rpm` command as follows:" +msgstr "" +"De plus, il y a beaucoup d'options dans le fichier :file:`.spec` qui n'ont " +"aucun équivalent dans le script de préparation. La plupart de celles ci sont " +"gérées par les options de la commande :command:`bdist_rpm` suivant :" + +#: distutils/builtdist.rst:219 +msgid ":command:`bdist_rpm` option" +msgstr "Option de :command:`bdist_rpm`" + +#: distutils/builtdist.rst:219 +msgid "default value" +msgstr "valeur par défaut" + +#: distutils/builtdist.rst:222 +msgid "Release" +msgstr "Version" + +#: distutils/builtdist.rst:222 +msgid "``release``" +msgstr "``release``" + +#: distutils/builtdist.rst:222 +msgid "\"1\"" +msgstr "\"1\"" + +#: distutils/builtdist.rst:224 +msgid "Group" +msgstr "Group" + +#: distutils/builtdist.rst:224 +msgid "``group``" +msgstr "``group``" + +#: distutils/builtdist.rst:224 +msgid "\"Development/Libraries\"" +msgstr "\"Développement/Bibliothèques\"" + +#: distutils/builtdist.rst:226 +msgid "``vendor``" +msgstr "``vendor``" + +#: distutils/builtdist.rst:226 +msgid "(see above)" +msgstr "(voir au-dessus)" + +#: distutils/builtdist.rst:228 +msgid "Packager" +msgstr "Packager" + +#: distutils/builtdist.rst:228 +msgid "``packager``" +msgstr "``packager``" + +#: distutils/builtdist.rst:230 distutils/builtdist.rst:234 +#: distutils/builtdist.rst:238 distutils/builtdist.rst:242 +msgid "(none)" +msgstr "(none)" + +#: distutils/builtdist.rst:230 +msgid "Provides" +msgstr "Provides" + +#: distutils/builtdist.rst:230 +msgid "``provides``" +msgstr "``provides``" + +#: distutils/builtdist.rst:232 +msgid "Requires" +msgstr "Requires" + +#: distutils/builtdist.rst:232 +msgid "``requires``" +msgstr "``requires``" + +#: distutils/builtdist.rst:234 +msgid "Conflicts" +msgstr "Conflicts" + +#: distutils/builtdist.rst:234 +msgid "``conflicts``" +msgstr "``conflicts``" + +#: distutils/builtdist.rst:236 +msgid "Obsoletes" +msgstr "Obsoletes" + +#: distutils/builtdist.rst:236 +msgid "``obsoletes``" +msgstr "``obsoletes``" + +#: distutils/builtdist.rst:238 +msgid "Distribution" +msgstr "Distribution" + +#: distutils/builtdist.rst:238 +msgid "``distribution_name``" +msgstr "``distribution_name``" + +#: distutils/builtdist.rst:240 +msgid "BuildRequires" +msgstr "BuildRequires" + +#: distutils/builtdist.rst:240 +msgid "``build_requires``" +msgstr "``build_requires``" + +#: distutils/builtdist.rst:242 +msgid "Icon" +msgstr "Icon" + +#: distutils/builtdist.rst:242 +msgid "``icon``" +msgstr "``icon``" + +#: distutils/builtdist.rst:245 +msgid "" +"Obviously, supplying even a few of these options on the command-line would " +"be tedious and error-prone, so it's usually best to put them in the setup " +"configuration file, :file:`setup.cfg`\\ ---see section :ref:`setup-config`. " +"If you distribute or package many Python module distributions, you might " +"want to put options that apply to all of them in your personal Distutils " +"configuration file (:file:`~/.pydistutils.cfg`). If you want to temporarily " +"disable this file, you can pass the :option:`!--no-user-cfg` option to :file:" +"`setup.py`." +msgstr "" +"Fournir ces options en ligne de commande est fastidieux et sujet à des " +"erreurs, il est donc recommandé de les mettre dans un fichier de " +"configuration. :file:`setup.cfg`\\ --- voir la section :ref:`setup-config`. " +"Si vous distribuez ou empaquetez beaucoup de modules de distribution Python, " +"vous pourriez vouloir mettre les options qui s'appliquent à tous vos projets " +"dans votre fichier de configuration personnel Distutils (:file:`~/." +"pydistutils.cfg`). Si vous voulez temporairement désactiver ce fichier, vous " +"pouvez passer l'option :option:`!--no-user-cfg` à :file:`setup.py`." + +#: distutils/builtdist.rst:253 +msgid "" +"There are three steps to building a binary RPM package, all of which are " +"handled automatically by the Distutils:" +msgstr "" +"La création de binaire RPM se fait en trois étapes, chacune gérée " +"automatiquement par Distutils :" + +#: distutils/builtdist.rst:256 +msgid "" +"create a :file:`.spec` file, which describes the package (analogous to the " +"Distutils setup script; in fact, much of the information in the setup " +"script winds up in the :file:`.spec` file)" +msgstr "" +"crée un fichier :file:`.spec` qui décrit le paquet (comme le script de " +"préparation Distutils, en réalité la plupart des informations du script de " +"préparation se retrouve dans le fichier :file:`.spec`)" + +#: distutils/builtdist.rst:260 +msgid "create the source RPM" +msgstr "crée un RPM source" + +#: distutils/builtdist.rst:262 +msgid "" +"create the \"binary\" RPM (which may or may not contain binary code, " +"depending on whether your module distribution contains Python extensions)" +msgstr "" +"crée le RPM \"binaire\" (qui peut ou non contenir des binaires, tout dépend " +"de si votre module contiens des extensions)" + +#: distutils/builtdist.rst:265 +msgid "" +"Normally, RPM bundles the last two steps together; when you use the " +"Distutils, all three steps are typically bundled together." +msgstr "" +"Normalement, RPM réunit les deux dernières étapes ensemble ; quand vous " +"utilisez Distutils, les trois étapes sont regroupées." + +#: distutils/builtdist.rst:268 +msgid "" +"If you wish, you can separate these three steps. You can use the :option:" +"`!--spec-only` option to make :command:`bdist_rpm` just create the :file:`." +"spec` file and exit; in this case, the :file:`.spec` file will be written to " +"the \"distribution directory\"---normally :file:`dist/`, but customizable " +"with the :option:`!--dist-dir` option. (Normally, the :file:`.spec` file " +"winds up deep in the \"build tree,\" in a temporary directory created by :" +"command:`bdist_rpm`.)" +msgstr "" +"Si vous le souhaitez, vous pouvez séparer ces trois étapes. Vous pouvez " +"utiliser l'option :option:`!--spec-only` pour faire en sorte que la " +"commande :command:`bdist_rpm` crée juste le fichier :file:`.spec` et " +"quitte ; dans ce cas, le fichier :file:`.spec` sera écrit dans le dossier de " +"distribution (\"*distribution directory*\") --- normalement :file:`dist/`, " +"mais personnalisable avec l'option :option:`!--dist-dir`. (Normalement, le " +"fichier :file:`.spec` se retrouve profondément enfoui dans l'arborescence, " +"dans un dossier temporaire créé par la commande :command:`bdist_rpm`.)" + +#: distutils/builtdist.rst:296 +msgid "Cross-compiling on Windows" +msgstr "Compiler pour toute les plateformes Windows" + +#: distutils/builtdist.rst:298 +msgid "" +"Starting with Python 2.6, distutils is capable of cross-compiling between " +"Windows platforms. In practice, this means that with the correct tools " +"installed, you can use a 32bit version of Windows to create 64bit extensions " +"and vice-versa." +msgstr "" +"Depuis Python 2.6, *distutils* est capable de compiler pour toutes les " +"plateformes de Windows. En pratique, cela signifie qu'avec les bons outils " +"installés, vous pouvez utiliser une version 32 bits de Windows pour créer " +"une extension 64 bits et vice-versa." + +#: distutils/builtdist.rst:303 +msgid "" +"To build for an alternate platform, specify the :option:`!--plat-name` " +"option to the build command. Valid values are currently 'win32', and 'win-" +"amd64'. For example, on a 32bit version of Windows, you could execute::" +msgstr "" +"Pour construire pour une plateforme alternative, spécifiez l'option :option:" +"`!--plat-name` à la commande de **build**. Les valeurs valides sont " +"actuellement **'win32'**, et **'win-amd64'**. Par exemple, sur une version " +"*32bit* de Windows, vous pourriez exécuter ::" + +#: distutils/builtdist.rst:309 +msgid "to build a 64bit version of your extension." +msgstr "" + +#: distutils/builtdist.rst:311 +msgid "" +"would create a 64bit installation executable on your 32bit version of " +"Windows." +msgstr "" +"créera un installateur exécutable 64 bits depuis votre version 32 bits de " +"Windows." + +#: distutils/builtdist.rst:313 +msgid "" +"To cross-compile, you must download the Python source code and cross-compile " +"Python itself for the platform you are targeting - it is not possible from a " +"binary installation of Python (as the .lib etc file for other platforms are " +"not included.) In practice, this means the user of a 32 bit operating " +"system will need to use Visual Studio 2008 to open the :file:`PCbuild/" +"PCbuild.sln` solution in the Python source tree and build the \"x64\" " +"configuration of the 'pythoncore' project before cross-compiling extensions " +"is possible." +msgstr "" +"Pour effectuer une compilation croisée (*cross-compile* en anglais), vous " +"devez télécharger le code source de Python et le compiler pour la plateforme " +"cible, il est impossible de le faire depuis une installation de Python (vu " +"que les fichiers *.lib* pour les autres plateformes ne sont pas inclus). En " +"pratique, cela veut dire qu'un utilisateur de système 32 bits devra utiliser " +"Visual Studio 2008 pour ouvrir la solution :file:`PCBuild/PCbuild.sln` dans " +"l'arborescence des sources de Python et construire la version *x64* du " +"projet *pythoncore* avant de pouvoir compiler son extension." + +#: distutils/builtdist.rst:322 +msgid "" +"Note that by default, Visual Studio 2008 does not install 64bit compilers or " +"tools. You may need to reexecute the Visual Studio setup process and select " +"these tools (using Control Panel->[Add/Remove] Programs is a convenient way " +"to check or modify your existing install.)" +msgstr "" +"Remarquez que par défaut Visual Studio 2008 n'installe pas les outils et " +"compilateur 64 bits. Vous devrez peut-être ré-exécuter le processus " +"d'installation et sélectionner ces outils (utiliser le *Panneau de Contrôle -" +"> [Ajouter/Supprimer]* est un bon moyen de vérifier ou modifier votre " +"installation existante.)" + +#: distutils/builtdist.rst:330 +msgid "The Postinstallation script" +msgstr "Le script de post-installation" + +#: distutils/builtdist.rst:332 +msgid "" +"Starting with Python 2.3, a postinstallation script can be specified with " +"the :option:`!--install-script` option. The basename of the script must be " +"specified, and the script filename must also be listed in the scripts " +"argument to the setup function." +msgstr "" +"Depuis Python 2.3, un script post-installation peut être spécifié avec " +"l'option :option:`!--install-script`. Le nom du script doit être spécifié et " +"présent dans l'argument \"scripts\" de la fonction ``setup``." + +#: distutils/builtdist.rst:337 +msgid "" +"This script will be run at installation time on the target system after all " +"the files have been copied, with ``argv[1]`` set to :option:`!-install`, and " +"again at uninstallation time before the files are removed with ``argv[1]`` " +"set to :option:`!-remove`." +msgstr "" +"Ce script doit être lancé au moment de l'installation sur le système cible " +"après que tous les fichiers ont été copiés, avec la valeur de ``argv[1]`` " +"à :option:`!-install`, et une autre fois durant la désinstallation avant " +"que les fichiers soient supprimés avec la valeur de ``argv[1]`` à :option:`!-" +"remove`." + +#: distutils/builtdist.rst:342 +msgid "" +"The installation script runs embedded in the windows installer, every output " +"(``sys.stdout``, ``sys.stderr``) is redirected into a buffer and will be " +"displayed in the GUI after the script has finished." +msgstr "" +"Le script d'installation s'exécute intégré à la fenêtre d'installation, " +"chaque sortie (``sys.stdout``, ``sys.stderr``) est redirigé dans le tampon " +"et sera affiché dans le GUI après que les scripts soient finis." + +#: distutils/builtdist.rst:346 +msgid "" +"Some functions especially useful in this context are available as additional " +"built-in functions in the installation script." +msgstr "" +"Certaines fonctions spécialement utiles dans ce contexte sont disponibles " +"comme fonctions natives additionnelles dans le script d'installation." + +#: distutils/builtdist.rst:353 +msgid "" +"These functions should be called when a directory or file is created by the " +"postinstall script at installation time. It will register *path* with the " +"uninstaller, so that it will be removed when the distribution is " +"uninstalled. To be safe, directories are only removed if they are empty." +msgstr "" +"Ces fonctions peuvent être appelées lorsqu'un répertoire ou un fichier est " +"crée par le script de post installation au moment de l'installation. Cela va " +"enregistrer le *chemin* avec le des-installateur, de sorte qu'il soit retiré " +"lors de la des-installation de la distribution. pour être sûr, les " +"répertoires sont uniquement retirés s'ils sont vides." + +#: distutils/builtdist.rst:361 +msgid "" +"This function can be used to retrieve special folder locations on Windows " +"like the Start Menu or the Desktop. It returns the full path to the folder. " +"*csidl_string* must be one of the following strings::" +msgstr "" +"Cette fonction peut être utilisée pour extraire des localisations de " +"fichiers spéciaux sous Windows comme un menu démarrer ou le Bureau. Cela " +"renvoie le chemin complet pour le fichier. *csidl_string* doit être unes des " +"chaines suivantes ::" + +#: distutils/builtdist.rst:381 +msgid "If the folder cannot be retrieved, :exc:`OSError` is raised." +msgstr "Si le fichier ne peut être extrait, :exc:`OSError` est obtenu.." + +#: distutils/builtdist.rst:383 +msgid "" +"Which folders are available depends on the exact Windows version, and " +"probably also the configuration. For details refer to Microsoft's " +"documentation of the :c:func:`SHGetSpecialFolderPath` function." +msgstr "" +"Quel dossier est disponible dépend de la version exacte de Windows, et " +"probablement aussi de la configuration. pour des détails se référer à la " +"documentation Microsoft de la fonction :c:func:`SHGetSpecialFolderPath`." + +#: distutils/builtdist.rst:390 +msgid "" +"This function creates a shortcut. *target* is the path to the program to be " +"started by the shortcut. *description* is the description of the shortcut. " +"*filename* is the title of the shortcut that the user will see. *arguments* " +"specifies the command line arguments, if any. *workdir* is the working " +"directory for the program. *iconpath* is the file containing the icon for " +"the shortcut, and *iconindex* is the index of the icon in the file " +"*iconpath*. Again, for details consult the Microsoft documentation for the :" +"class:`IShellLink` interface." +msgstr "" +"Cette fonction crée un raccourci. *cible* est le chemin au programme auquel " +"mène le raccourci. *description* est la description du raccourci. " +"*nomfichier* est le titre du raccourci que verra l'utilisateur. *arguments* " +"spécifie les arguments de la ligne de commande, si existant. *cheminRep* est " +"le répertoire de travail pour le programme. *cheminIcone* est le fichier " +"contenant l’icône pour le raccourci, et *IndexIcone* est l'index pour " +"l’icône dans le fichier *cheminIcone*. Encore, pour les détails consulter la " +"documentation Microsoft pour l'interface :class:`ILienShell`." + +#~ msgid "``wininst``" +#~ msgstr "``wininst``" + +#~ msgid "self-extracting ZIP file for Windows" +#~ msgstr "fichier zip auto-extracteur Windows" + +#~ msgid "\\(4)" +#~ msgstr "\\(4)" + +#~ msgid ":command:`bdist_wininst`" +#~ msgstr ":command:`bdist_wininst`" + +#~ msgid "wininst" +#~ msgstr "`wininst`" + +#~ msgid "bdist_wininst is deprecated since Python 3.8." +#~ msgstr "`bdist_wininst` est obsolète depuis Python 3.8." + +#~ msgid "Creating Windows Installers" +#~ msgstr "Créer un installateur Windows" + +#~ msgid "" +#~ "Executable installers are the natural format for binary distributions on " +#~ "Windows. They display a nice graphical user interface, display some " +#~ "information about the module distribution to be installed taken from the " +#~ "metadata in the setup script, let the user select a few options, and " +#~ "start or cancel the installation." +#~ msgstr "" +#~ "Les installateurs exécutables sont le format naturel pour les " +#~ "distributions sur Windows. Ils affichent une jolie interface graphique, " +#~ "montrent quelques informations à propos du module qui va être installé, " +#~ "tiré des métadonnées dans le script de préparation, laisse l'utilisateur " +#~ "choisir quelques options et démarrer ou annuler l'installation." + +#~ msgid "" +#~ "Since the metadata is taken from the setup script, creating Windows " +#~ "installers is usually as easy as running::" +#~ msgstr "" +#~ "Étant donné que les métadonnées sont tirées du script de préparation, " +#~ "créer un installateur Windows est généralement facile, il suffit de " +#~ "lancer ::" + +#~ msgid "" +#~ "or the :command:`bdist` command with the :option:`!--formats` option::" +#~ msgstr "" +#~ "ou la commande :command:`bdist` avec l'option :option:`!--formats` ::" + +#~ msgid "" +#~ "If you have a pure module distribution (only containing pure Python " +#~ "modules and packages), the resulting installer will be version " +#~ "independent and have a name like :file:`foo-1.0.win32.exe`. Note that " +#~ "creating ``wininst`` binary distributions in only supported on Windows " +#~ "systems." +#~ msgstr "" +#~ "Si vous avez une distribution de modules purs (contenant seulement des " +#~ "modules et des packages en Python pur), l'installateur produit n'est lié " +#~ "à aucune version de Python et a un nom du type :file:`foo-1.0.win32.exe`. " +#~ "Notez que la création de distributions binaires ``wininst`` n'est prise " +#~ "en charge que sur les systèmes Windows." + +#~ msgid "" +#~ "If you have a non-pure distribution, the extensions can only be created " +#~ "on a Windows platform, and will be Python version dependent. The " +#~ "installer filename will reflect this and now has the form :file:`foo-1.0." +#~ "win32-py2.0.exe`. You have to create a separate installer for every " +#~ "Python version you want to support." +#~ msgstr "" +#~ "Si vous avez une distribution \"non-pure\", l'extension peut être créée " +#~ "uniquement pour les plateformes Windows et sera lié à une version de " +#~ "Python. Le nom de l'installateur reflétera ça et sera de format :file:" +#~ "`foo-1.0.win32-py2.0.exe`. Vous devrez créer un installateur pour chaque " +#~ "version de Python que vous voulez supporter." + +#~ msgid "" +#~ "The installer will try to compile pure modules into :term:`bytecode` " +#~ "after installation on the target system in normal and optimizing mode. " +#~ "If you don't want this to happen for some reason, you can run the :" +#~ "command:`bdist_wininst` command with the :option:`!--no-target-compile` " +#~ "and/or the :option:`!--no-target-optimize` option." +#~ msgstr "" +#~ "L'installeur essaiera de compiler les modules purs en :term:`bytecode` " +#~ "après installation sur le système cible dans les modes normaux et " +#~ "optimisé. Si vous ne voulez pas que ce soit fait, vous pouvez lancer la " +#~ "commande :command:`bdist_wininst` avec l'option :option:`!--no-target-" +#~ "compile` et/ou l'option :option:`!--no-target-optimize`." + +#~ msgid "" +#~ "By default the installer will display the cool \"Python Powered\" logo " +#~ "when it is run, but you can also supply your own 152x261 bitmap which " +#~ "must be a Windows :file:`.bmp` file with the :option:`!--bitmap` option." +#~ msgstr "" +#~ "Par défaut l'installateur affichera le super logo \"Python Powered\", " +#~ "mais vous pouvez aussi donnez votre propre bitmap de *152×261* qui doit " +#~ "être un fichier :file:`.bmp` Windows avec l'option :option:`!--bitmap`." + +#~ msgid "" +#~ "The installer will also display a large title on the desktop background " +#~ "window when it is run, which is constructed from the name of your " +#~ "distribution and the version number. This can be changed to another text " +#~ "by using the :option:`!--title` option." +#~ msgstr "" +#~ "L'installateur affichera aussi un grand titre en arrière plan de la " +#~ "fenêtre quand exécuté, qui est composé du nom de votre distribution et du " +#~ "numéro de version. Cela peut être changé avec un autre texte avec " +#~ "l'option :option:`!--title`." + +#~ msgid "" +#~ "The installer file will be written to the \"distribution directory\" --- " +#~ "normally :file:`dist/`, but customizable with the :option:`!--dist-dir` " +#~ "option." +#~ msgstr "" +#~ "Le fichier d'installation sera écrit dans le dossier de distribution " +#~ "(\"*distribution directory*\") --- normalement :file:`dist/`, mais " +#~ "personnalisable avec l'option :option:`!--dist-dir`." + +#~ msgid "" +#~ "to build a 64bit version of your extension. The Windows Installers also " +#~ "support this option, so the command::" +#~ msgstr "" +#~ "pour construire une version 64 bits de votre module. L'installateur " +#~ "Windows supporte aussi cette option, donc la commande ::" + +#~ msgid "Vista User Access Control (UAC)" +#~ msgstr "Contrôle d'accès utilisateur Vista (UAC)" + +#~ msgid "" +#~ "Starting with Python 2.6, bdist_wininst supports a :option:`!--user-" +#~ "access-control` option. The default is 'none' (meaning no UAC handling " +#~ "is done), and other valid values are 'auto' (meaning prompt for UAC " +#~ "elevation if Python was installed for all users) and 'force' (meaning " +#~ "always prompt for elevation)." +#~ msgstr "" +#~ "Depuis Python 2.6, *bdist_wininst* accepte une option :option:`!--user-" +#~ "access-control`. Sa valeur par défaut est 'none' (Ce qui veut dire que " +#~ "aucun UAC est fait), et les autres valeurs valides sont 'auto' (ce qui " +#~ "veut dire qu'il faut demander une élévation de privilèges UAC si Python a " +#~ "été installé pour tous les utilisateurs) et 'force' (Toujours demander " +#~ "une élévation de privilèges)." diff --git a/distutils/commandref.po b/distutils/commandref.po new file mode 100644 index 0000000000..db6bd9071a --- /dev/null +++ b/distutils/commandref.po @@ -0,0 +1,169 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +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: 2020-02-04 20:09+0100\n" +"Last-Translator: ZepmanBC \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" + +#: distutils/commandref.rst:5 +msgid "Command Reference" +msgstr "Référence des commandes" + +#: distutils/_setuptools_disclaimer.rst:3 +msgid "" +"This document is being retained solely until the ``setuptools`` " +"documentation at https://setuptools.readthedocs.io/en/latest/setuptools.html " +"independently covers all of the relevant information currently included here." +msgstr "" +"Cette page est conservée uniquement jusqu'à ce que la documentation " +"``setuptool`` sur https://setuptools.readthedocs.io/en/latest/setuptools." +"html couvre de manière indépendante toutes les informations pertinentes " +"actuellement incluses ici." + +#: distutils/commandref.rst:24 +msgid "Installing modules: the :command:`install` command family" +msgstr "Installer des modules: la famille de commande :command:`install`" + +#: distutils/commandref.rst:26 +msgid "" +"The install command ensures that the build commands have been run and then " +"runs the subcommands :command:`install_lib`, :command:`install_data` and :" +"command:`install_scripts`." +msgstr "" +"La commande d'installation s’assure que la commande de construction a bien " +"été lancé puis lance les sous-commandes :command:`install_lib`, :command:" +"`install_data` et :command:`install_scripts`." + +#: distutils/commandref.rst:37 +msgid ":command:`install_data`" +msgstr ":command:`install_data`" + +#: distutils/commandref.rst:39 +msgid "This command installs all data files provided with the distribution." +msgstr "" +"Cette commande installe tous les fichiers fournis avec la distribution." + +#: distutils/commandref.rst:45 +msgid ":command:`install_scripts`" +msgstr ":command:`install_scripts`" + +#: distutils/commandref.rst:47 +msgid "This command installs all (Python) scripts in the distribution." +msgstr "" +"Cette commande installe tout les scripts (Python) dans la distribution." + +#: distutils/commandref.rst:56 +msgid "Creating a source distribution: the :command:`sdist` command" +msgstr "Créer une distribution source: la commande :command:`sdist`" + +#: distutils/commandref.rst:60 +msgid "The manifest template commands are:" +msgstr "Les commandes du modèle manifeste sont :" + +#: distutils/commandref.rst:63 +msgid "Command" +msgstr "Commande" + +#: distutils/commandref.rst:63 +msgid "Description" +msgstr "Description" + +#: distutils/commandref.rst:65 +msgid ":command:`include pat1 pat2 ...`" +msgstr ":command:`include pat1 pat2 ...`" + +#: distutils/commandref.rst:65 +msgid "include all files matching any of the listed patterns" +msgstr "Inclut tous les fichiers ressemblant aux modèles listés" + +#: distutils/commandref.rst:68 +msgid ":command:`exclude pat1 pat2 ...`" +msgstr ":command:`exclude pat1 pat2 ...`" + +#: distutils/commandref.rst:68 +msgid "exclude all files matching any of the listed patterns" +msgstr "exclut tous les fichiers ressemblant aux modèles listés" + +#: distutils/commandref.rst:71 +msgid ":command:`recursive-include dir pat1 pat2 ...`" +msgstr ":command:`recursive-include dir pat1 pat2 ...`" + +#: distutils/commandref.rst:71 +msgid "include all files under *dir* matching any of the listed patterns" +msgstr "" +"inclut récursivement tous les fichiers sous *dir* ressemblant aux modèles " +"listés" + +#: distutils/commandref.rst:74 +msgid ":command:`recursive-exclude dir pat1 pat2 ...`" +msgstr ":command:`recursive-exclude dir pat1 pat2 ...`" + +#: distutils/commandref.rst:74 +msgid "exclude all files under *dir* matching any of the listed patterns" +msgstr "exclut tous les fichiers sous *dir* ressemblant aux modèles listés" + +#: distutils/commandref.rst:77 +msgid ":command:`global-include pat1 pat2 ...`" +msgstr ":command:`global-include pat1 pat2 ...`" + +#: distutils/commandref.rst:77 +msgid "" +"include all files anywhere in the source tree matching --- & any of the " +"listed patterns" +msgstr "" +"Inclut tous les fichiers dans l'arborescence ressemblant aux modèles listés" + +#: distutils/commandref.rst:80 +msgid ":command:`global-exclude pat1 pat2 ...`" +msgstr ":command:`global-exclude pat1 pat2 ...`" + +#: distutils/commandref.rst:80 +msgid "" +"exclude all files anywhere in the source tree matching --- & any of the " +"listed patterns" +msgstr "" +"exclut tous les fichiers dans l'arborescence ressemblant aux modèles listés" + +#: distutils/commandref.rst:83 +msgid ":command:`prune dir`" +msgstr ":command:`prune dir`" + +#: distutils/commandref.rst:83 +msgid "exclude all files under *dir*" +msgstr "exclut tous les fichiers dans *dir*" + +#: distutils/commandref.rst:85 +msgid ":command:`graft dir`" +msgstr ":command:`graft dir`" + +#: distutils/commandref.rst:85 +msgid "include all files under *dir*" +msgstr "inclut tous les fichiers dans *dir*" + +#: distutils/commandref.rst:88 +msgid "" +"The patterns here are Unix-style \"glob\" patterns: ``*`` matches any " +"sequence of regular filename characters, ``?`` matches any single regular " +"filename character, and ``[range]`` matches any of the characters in *range* " +"(e.g., ``a-z``, ``a-zA-Z``, ``a-f0-9_.``). The definition of \"regular " +"filename character\" is platform-specific: on Unix it is anything except " +"slash; on Windows anything except backslash or colon." +msgstr "" +"Les modèles sont de style Unix *glob* : ``*`` correspond à n'importe quelle " +"chaîne de caractères d'un nom de fichier valide, ``?`` correspond à un seul " +"caractère d'un nom de fichier valide et ``[range]`` correspond à n'importe " +"quel caractère dans la *range* (e.g., ``a-z``, ``a-zA-Z``, ``a-f0-9_.``). " +"La définition de \"caractère de nom de fichier valide\" est spécifique à " +"chaque plateforme: sur Unix il s'agir de n'importe quel caractère à part le " +"slash; sur Windows il s'agir de n'importe quel caractère a part l'anti-slash " +"et les deux points." diff --git a/distutils/configfile.po b/distutils/configfile.po new file mode 100644 index 0000000000..01115dd423 --- /dev/null +++ b/distutils/configfile.po @@ -0,0 +1,169 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +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: 2020-02-04 21:19+0100\n" +"Last-Translator: ZepmanBC \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" + +#: distutils/configfile.rst:5 +msgid "Writing the Setup Configuration File" +msgstr "" + +#: distutils/_setuptools_disclaimer.rst:3 +msgid "" +"This document is being retained solely until the ``setuptools`` " +"documentation at https://setuptools.readthedocs.io/en/latest/setuptools.html " +"independently covers all of the relevant information currently included here." +msgstr "" +"Cette page est conservée uniquement jusqu'à ce que la documentation " +"``setuptool`` sur https://setuptools.readthedocs.io/en/latest/setuptools." +"html couvre de manière indépendante toutes les informations pertinentes " +"actuellement incluses ici." + +#: distutils/configfile.rst:9 +msgid "" +"Often, it's not possible to write down everything needed to build a " +"distribution *a priori*: you may need to get some information from the user, " +"or from the user's system, in order to proceed. As long as that information " +"is fairly simple---a list of directories to search for C header files or " +"libraries, for example---then providing a configuration file, :file:`setup." +"cfg`, for users to edit is a cheap and easy way to solicit it. " +"Configuration files also let you provide default values for any command " +"option, which the installer can then override either on the command-line or " +"by editing the config file." +msgstr "" + +#: distutils/configfile.rst:18 +msgid "" +"The setup configuration file is a useful middle-ground between the setup " +"script---which, ideally, would be opaque to installers [#]_---and the " +"command-line to the setup script, which is outside of your control and " +"entirely up to the installer. In fact, :file:`setup.cfg` (and any other " +"Distutils configuration files present on the target system) are processed " +"after the contents of the setup script, but before the command-line. This " +"has several useful consequences:" +msgstr "" + +#: distutils/configfile.rst:32 +msgid "" +"installers can override some of what you put in :file:`setup.py` by editing :" +"file:`setup.cfg`" +msgstr "" + +#: distutils/configfile.rst:35 +msgid "" +"you can provide non-standard defaults for options that are not easily set " +"in :file:`setup.py`" +msgstr "" + +#: distutils/configfile.rst:38 +msgid "" +"installers can override anything in :file:`setup.cfg` using the command-line " +"options to :file:`setup.py`" +msgstr "" + +#: distutils/configfile.rst:41 +msgid "The basic syntax of the configuration file is simple:" +msgstr "" + +#: distutils/configfile.rst:49 +msgid "" +"where *command* is one of the Distutils commands (e.g. :command:`build_py`, :" +"command:`install`), and *option* is one of the options that command " +"supports. Any number of options can be supplied for each command, and any " +"number of command sections can be included in the file. Blank lines are " +"ignored, as are comments, which run from a ``'#'`` character until the end " +"of the line. Long option values can be split across multiple lines simply " +"by indenting the continuation lines." +msgstr "" + +#: distutils/configfile.rst:57 +msgid "" +"You can find out the list of options supported by a particular command with " +"the universal :option:`!--help` option, e.g." +msgstr "" + +#: distutils/configfile.rst:75 +msgid "" +"Note that an option spelled :option:`!--foo-bar` on the command-line is " +"spelled ``foo_bar`` in configuration files." +msgstr "" + +#: distutils/configfile.rst:80 +msgid "" +"For example, say you want your extensions to be built \"in-place\"---that " +"is, you have an extension :mod:`pkg.ext`, and you want the compiled " +"extension file (:file:`ext.so` on Unix, say) to be put in the same source " +"directory as your pure Python modules :mod:`pkg.mod1` and :mod:`pkg.mod2`. " +"You can always use the :option:`!--inplace` option on the command-line to " +"ensure this:" +msgstr "" + +#: distutils/configfile.rst:90 +msgid "" +"But this requires that you always specify the :command:`build_ext` command " +"explicitly, and remember to provide :option:`!--inplace`. An easier way is " +"to \"set and forget\" this option, by encoding it in :file:`setup.cfg`, the " +"configuration file for this distribution:" +msgstr "" + +#: distutils/configfile.rst:100 +msgid "" +"This will affect all builds of this module distribution, whether or not you " +"explicitly specify :command:`build_ext`. If you include :file:`setup.cfg` " +"in your source distribution, it will also affect end-user builds---which is " +"probably a bad idea for this option, since always building extensions in-" +"place would break installation of the module distribution. In certain " +"peculiar cases, though, modules are built right in their installation " +"directory, so this is conceivably a useful ability. (Distributing " +"extensions that expect to be built in their installation directory is almost " +"always a bad idea, though.)" +msgstr "" + +#: distutils/configfile.rst:109 +msgid "" +"Another example: certain commands take a lot of options that don't change " +"from run to run; for example, :command:`bdist_rpm` needs to know everything " +"required to generate a \"spec\" file for creating an RPM distribution. Some " +"of this information comes from the setup script, and some is automatically " +"generated by the Distutils (such as the list of files installed). But some " +"of it has to be supplied as options to :command:`bdist_rpm`, which would be " +"very tedious to do on the command-line for every run. Hence, here is a " +"snippet from the Distutils' own :file:`setup.cfg`:" +msgstr "" + +#: distutils/configfile.rst:129 +msgid "" +"Note that the ``doc_files`` option is simply a whitespace-separated string " +"split across multiple lines for readability." +msgstr "" + +#: distutils/configfile.rst:136 +msgid ":ref:`inst-config-syntax` in \"Installing Python Modules\"" +msgstr "" + +#: distutils/configfile.rst:136 +msgid "" +"More information on the configuration files is available in the manual for " +"system administrators." +msgstr "" + +#: distutils/configfile.rst:141 +msgid "Footnotes" +msgstr "Notes" + +#: distutils/configfile.rst:142 +msgid "" +"This ideal probably won't be achieved until auto-configuration is fully " +"supported by the Distutils." +msgstr "" diff --git a/distutils/examples.po b/distutils/examples.po new file mode 100644 index 0000000000..ba1fbff45e --- /dev/null +++ b/distutils/examples.po @@ -0,0 +1,289 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +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: 2020-02-04 21:20+0100\n" +"Last-Translator: ZepmanBC \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" + +#: distutils/examples.rst:5 +#, fuzzy +msgid "Distutils Examples" +msgstr "Exemples" + +#: distutils/_setuptools_disclaimer.rst:3 +msgid "" +"This document is being retained solely until the ``setuptools`` " +"documentation at https://setuptools.readthedocs.io/en/latest/setuptools.html " +"independently covers all of the relevant information currently included here." +msgstr "" +"Cette page est conservée uniquement jusqu'à ce que la documentation " +"``setuptool`` sur https://setuptools.readthedocs.io/en/latest/setuptools." +"html couvre de manière indépendante toutes les informations pertinentes " +"actuellement incluses ici." + +#: distutils/examples.rst:9 +msgid "" +"This chapter provides a number of basic examples to help get started with " +"distutils. Additional information about using distutils can be found in the " +"Distutils Cookbook." +msgstr "" + +#: distutils/examples.rst:16 +msgid "`Distutils Cookbook `_" +msgstr "" + +#: distutils/examples.rst:17 +msgid "" +"Collection of recipes showing how to achieve more control over distutils." +msgstr "" + +#: distutils/examples.rst:23 +msgid "Pure Python distribution (by module)" +msgstr "" + +#: distutils/examples.rst:25 +msgid "" +"If you're just distributing a couple of modules, especially if they don't " +"live in a particular package, you can specify them individually using the " +"``py_modules`` option in the setup script." +msgstr "" + +#: distutils/examples.rst:29 +msgid "" +"In the simplest case, you'll have two files to worry about: a setup script " +"and the single module you're distributing, :file:`foo.py` in this example::" +msgstr "" + +#: distutils/examples.rst:36 +msgid "" +"(In all diagrams in this section, ** will refer to the distribution " +"root directory.) A minimal setup script to describe this situation would " +"be::" +msgstr "" + +#: distutils/examples.rst:45 +msgid "" +"Note that the name of the distribution is specified independently with the " +"``name`` option, and there's no rule that says it has to be the same as the " +"name of the sole module in the distribution (although that's probably a good " +"convention to follow). However, the distribution name is used to generate " +"filenames, so you should stick to letters, digits, underscores, and hyphens." +msgstr "" + +#: distutils/examples.rst:51 +msgid "" +"Since ``py_modules`` is a list, you can of course specify multiple modules, " +"eg. if you're distributing modules :mod:`foo` and :mod:`bar`, your setup " +"might look like this::" +msgstr "" + +#: distutils/examples.rst:60 +msgid "and the setup script might be ::" +msgstr "" + +#: distutils/examples.rst:68 +msgid "" +"You can put module source files into another directory, but if you have " +"enough modules to do that, it's probably easier to specify modules by " +"package rather than listing them individually." +msgstr "" + +#: distutils/examples.rst:76 +msgid "Pure Python distribution (by package)" +msgstr "" + +#: distutils/examples.rst:78 +msgid "" +"If you have more than a couple of modules to distribute, especially if they " +"are in multiple packages, it's probably easier to specify whole packages " +"rather than individual modules. This works even if your modules are not in " +"a package; you can just tell the Distutils to process modules from the root " +"package, and that works the same as any other package (except that you don't " +"have to have an :file:`__init__.py` file)." +msgstr "" + +#: distutils/examples.rst:85 +msgid "The setup script from the last example could also be written as ::" +msgstr "" + +#: distutils/examples.rst:93 +msgid "(The empty string stands for the root package.)" +msgstr "" + +#: distutils/examples.rst:95 +msgid "" +"If those two files are moved into a subdirectory, but remain in the root " +"package, e.g.::" +msgstr "" + +#: distutils/examples.rst:103 +msgid "" +"then you would still specify the root package, but you have to tell the " +"Distutils where source files in the root package live::" +msgstr "" + +#: distutils/examples.rst:113 +msgid "" +"More typically, though, you will want to distribute multiple modules in the " +"same package (or in sub-packages). For example, if the :mod:`foo` and :mod:" +"`bar` modules belong in package :mod:`foobar`, one way to layout your source " +"tree is ::" +msgstr "" + +#: distutils/examples.rst:125 +msgid "" +"This is in fact the default layout expected by the Distutils, and the one " +"that requires the least work to describe in your setup script::" +msgstr "" + +#: distutils/examples.rst:134 +msgid "" +"If you want to put modules in directories not named for their package, then " +"you need to use the ``package_dir`` option again. For example, if the :file:" +"`src` directory holds modules in the :mod:`foobar` package::" +msgstr "" + +#: distutils/examples.rst:145 +msgid "an appropriate setup script would be ::" +msgstr "" + +#: distutils/examples.rst:154 +msgid "" +"Or, you might put modules from your main package right in the distribution " +"root::" +msgstr "" + +#: distutils/examples.rst:163 +msgid "in which case your setup script would be ::" +msgstr "" + +#: distutils/examples.rst:172 +msgid "(The empty string also stands for the current directory.)" +msgstr "" + +#: distutils/examples.rst:174 +msgid "" +"If you have sub-packages, they must be explicitly listed in ``packages``, " +"but any entries in ``package_dir`` automatically extend to sub-packages. (In " +"other words, the Distutils does *not* scan your source tree, trying to " +"figure out which directories correspond to Python packages by looking for :" +"file:`__init__.py` files.) Thus, if the default layout grows a sub-package::" +msgstr "" + +#: distutils/examples.rst:190 +msgid "then the corresponding setup script would be ::" +msgstr "" + +#: distutils/examples.rst:202 +msgid "Single extension module" +msgstr "" + +#: distutils/examples.rst:204 +msgid "" +"Extension modules are specified using the ``ext_modules`` option. " +"``package_dir`` has no effect on where extension source files are found; it " +"only affects the source for pure Python modules. The simplest case, a " +"single extension module in a single C source file, is::" +msgstr "" + +#: distutils/examples.rst:213 +msgid "" +"If the :mod:`foo` extension belongs in the root package, the setup script " +"for this could be ::" +msgstr "" + +#: distutils/examples.rst:223 +msgid "If the extension actually belongs in a package, say :mod:`foopkg`, then" +msgstr "" + +#: distutils/examples.rst:225 +msgid "" +"With exactly the same source tree layout, this extension can be put in the :" +"mod:`foopkg` package simply by changing the name of the extension::" +msgstr "" + +#: distutils/examples.rst:236 +msgid "Checking a package" +msgstr "" + +#: distutils/examples.rst:238 +msgid "" +"The ``check`` command allows you to verify if your package meta-data meet " +"the minimum requirements to build a distribution." +msgstr "" + +#: distutils/examples.rst:241 +msgid "" +"To run it, just call it using your :file:`setup.py` script. If something is " +"missing, ``check`` will display a warning." +msgstr "" + +#: distutils/examples.rst:244 +msgid "Let's take an example with a simple script::" +msgstr "" + +#: distutils/examples.rst:250 +msgid "Running the ``check`` command will display some warnings:" +msgstr "" + +#: distutils/examples.rst:261 +msgid "" +"If you use the reStructuredText syntax in the ``long_description`` field and " +"`docutils`_ is installed you can check if the syntax is fine with the " +"``check`` command, using the ``restructuredtext`` option." +msgstr "" + +#: distutils/examples.rst:265 +msgid "For example, if the :file:`setup.py` script is changed like this::" +msgstr "" + +#: distutils/examples.rst:280 +msgid "" +"Where the long description is broken, ``check`` will be able to detect it by " +"using the :mod:`docutils` parser:" +msgstr "" + +#: distutils/examples.rst:291 +msgid "Reading the metadata" +msgstr "" + +#: distutils/examples.rst:293 +msgid "" +"The :func:`distutils.core.setup` function provides a command-line interface " +"that allows you to query the metadata fields of a project through the " +"``setup.py`` script of a given project:" +msgstr "" + +#: distutils/examples.rst:302 +msgid "" +"This call reads the ``name`` metadata by running the :func:`distutils.core." +"setup` function. Although, when a source or binary distribution is created " +"with Distutils, the metadata fields are written in a static file called :" +"file:`PKG-INFO`. When a Distutils-based project is installed in Python, the :" +"file:`PKG-INFO` file is copied alongside the modules and packages of the " +"distribution under :file:`NAME-VERSION-pyX.X.egg-info`, where ``NAME`` is " +"the name of the project, ``VERSION`` its version as defined in the Metadata, " +"and ``pyX.X`` the major and minor version of Python like ``2.7`` or ``3.2``." +msgstr "" + +#: distutils/examples.rst:312 +msgid "" +"You can read back this static file, by using the :class:`distutils.dist." +"DistributionMetadata` class and its :func:`read_pkg_file` method::" +msgstr "" + +#: distutils/examples.rst:326 +msgid "" +"Notice that the class can also be instantiated with a metadata file path to " +"loads its values::" +msgstr "" diff --git a/distutils/extending.po b/distutils/extending.po new file mode 100644 index 0000000000..3c447134a9 --- /dev/null +++ b/distutils/extending.po @@ -0,0 +1,193 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +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: 2021-12-11 12:35+0100\n" +"Last-Translator: ZepmanBC \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" + +#: distutils/extending.rst:5 +msgid "Extending Distutils" +msgstr "Extension de Distutils" + +#: distutils/_setuptools_disclaimer.rst:3 +msgid "" +"This document is being retained solely until the ``setuptools`` " +"documentation at https://setuptools.readthedocs.io/en/latest/setuptools.html " +"independently covers all of the relevant information currently included here." +msgstr "" +"Cette page est conservée uniquement jusqu'à ce que la documentation " +"``setuptool`` sur https://setuptools.readthedocs.io/en/latest/setuptools." +"html couvre de manière indépendante toutes les informations pertinentes " +"actuellement incluses ici." + +#: distutils/extending.rst:9 +msgid "" +"Distutils can be extended in various ways. Most extensions take the form of " +"new commands or replacements for existing commands. New commands may be " +"written to support new types of platform-specific packaging, for example, " +"while replacements for existing commands may be made to modify details of " +"how the command operates on a package." +msgstr "" +"*Distutils* peut être étendu de multiples façons. La plupart des extensions " +"sont soit des nouvelles commandes soit des remplacements de commandes " +"existantes. De nouvelles commandes pourraient par exemple servir à " +"l'empaquetage pour des plateformes spécifiques tandis que des remplacements " +"peuvent modifier certains aspects des commandes existantes." + +#: distutils/extending.rst:15 +msgid "" +"Most extensions of the distutils are made within :file:`setup.py` scripts " +"that want to modify existing commands; many simply add a few file extensions " +"that should be copied into packages in addition to :file:`.py` files as a " +"convenience." +msgstr "" +"La plupart des extensions de *distutils* sont faites dans le script :file:" +"`setup.py`. La plupart ajoutent simplement quelques extensions de fichiers " +"qui devraient être copiés dans le paquet en plus des fichiers :file:`.py`." + +#: distutils/extending.rst:20 +msgid "" +"Most distutils command implementations are subclasses of the :class:" +"`distutils.cmd.Command` class. New commands may directly inherit from :" +"class:`Command`, while replacements often derive from :class:`Command` " +"indirectly, directly subclassing the command they are replacing. Commands " +"are required to derive from :class:`Command`." +msgstr "" +"La plupart des implémentations des commandes *distutils* sont des sous-" +"classes de :class:`distutils.cmd.Command`. Les nouvelles commandes peuvent " +"hériter directement de :class:`Command`, alors que les remplacements " +"dérivent souvent de :class:`Command` indirectement, directement sous-" +"classant la commande qu'ils remplacent. Les commandes doivent dériver de la " +"classe :class:`Command`." + +#: distutils/extending.rst:35 +msgid "Integrating new commands" +msgstr "Intégrer de nouvelles commandes" + +#: distutils/extending.rst:37 +msgid "" +"There are different ways to integrate new command implementations into " +"distutils. The most difficult is to lobby for the inclusion of the new " +"features in distutils itself, and wait for (and require) a version of Python " +"that provides that support. This is really hard for many reasons." +msgstr "" +"Il y a différentes façons d’intégrer de nouvelles implémentations de " +"commandes dans *distutils*. La plus difficile est de faire pression pour " +"inclure une nouvelle fonctionnalité dans *distutils* même, et d’attendre (et " +"demander) une version de Python l'implémentant. C'est très difficile pour " +"beaucoup de raisons." + +#: distutils/extending.rst:42 +msgid "" +"The most common, and possibly the most reasonable for most needs, is to " +"include the new implementations with your :file:`setup.py` script, and cause " +"the :func:`distutils.core.setup` function use them::" +msgstr "" +"La plus commune, et possiblement la plus raisonnable pour la plupart des " +"cas, est d'inclure les nouvelles implémentations dans votre fichier :file:" +"`setup.py`, et de faire en sorte que la fonction :func:`distutils.core." +"setup` les utilise ::" + +#: distutils/extending.rst:57 +msgid "" +"This approach is most valuable if the new implementations must be used to " +"use a particular package, as everyone interested in the package will need to " +"have the new command implementation." +msgstr "" +"Cette approche est la plus valable si les nouvelles implémentations doivent " +"être utilisées pour utiliser un paquet particulier, vu que toutes les " +"personnes intéressées par le paquet devront avoir ces nouvelles " +"implémentations de commandes." + +#: distutils/extending.rst:61 +msgid "" +"Beginning with Python 2.4, a third option is available, intended to allow " +"new commands to be added which can support existing :file:`setup.py` scripts " +"without requiring modifications to the Python installation. This is " +"expected to allow third-party extensions to provide support for additional " +"packaging systems, but the commands can be used for anything distutils " +"commands can be used for. A new configuration option, ``command_packages`` " +"(command-line option :option:`!--command-packages`), can be used to specify " +"additional packages to be searched for modules implementing commands. Like " +"all distutils options, this can be specified on the command line or in a " +"configuration file. This option can only be set in the ``[global]`` section " +"of a configuration file, or before any commands on the command line. If set " +"in a configuration file, it can be overridden from the command line; setting " +"it to an empty string on the command line causes the default to be used. " +"This should never be set in a configuration file provided with a package." +msgstr "" +"Depuis Python 2.4, une troisième option est disponible, prévue pour " +"permettre d'ajouter de nouvelles commandes compatibles avec le script " +"existant :file:`setup.py` sans avoir besoin de modifier l'installation " +"Python. C'est fait pour que les extensions tierces puissent rester " +"compatibles avec d'autres systèmes d'empaquetage, mais les commandes peuvent " +"être utilisées pour tout ce que les commandes de *distutils* peuvent faire. " +"Une nouvelle option de configuration, ``command_packages`` (option shell :" +"option:`!--command-packages`), peut être utilisée pour spécifier des " +"recherches de paquets additionnels pour des modules qui implémentent des " +"commandes. Comme toutes les options *distutils*, cela peut être spécifié en " +"ligne de commande ou dans un fichier de configuration. Cette option peut " +"être fixée dans la section ``[global]`` d'un fichier de configuration, ou " +"avant n'importe quelle commande dans un shell. Si définie dans un fichier de " +"configuration, elle peut être écrasée depuis la ligne de commande. Mettre " +"une chaîne de caractères vide en valeur de cette option forcera " +"l'utilisation de la valeur par défaut. Cela ne devrait jamais être fixé dans " +"un fichier de configuration donné avec un paquet." + +#: distutils/extending.rst:76 +msgid "" +"This new option can be used to add any number of packages to the list of " +"packages searched for command implementations; multiple package names should " +"be separated by commas. When not specified, the search is only performed in " +"the :mod:`distutils.command` package. When :file:`setup.py` is run with the " +"option ``--command-packages distcmds,buildcmds``, however, the packages :mod:" +"`distutils.command`, :mod:`distcmds`, and :mod:`buildcmds` will be searched " +"in that order. New commands are expected to be implemented in modules of " +"the same name as the command by classes sharing the same name. Given the " +"example command line option above, the command :command:`bdist_openpkg` " +"could be implemented by the class :class:`distcmds.bdist_openpkg." +"bdist_openpkg` or :class:`buildcmds.bdist_openpkg.bdist_openpkg`." +msgstr "" +"Cette nouvelle option peut être utilisée pour ajouter n'importe quel nombre " +"de paquet à la liste des paquets recherchés pour les implémentations de " +"commandes ; plusieurs noms de paquets doivent être séparés par des virgules. " +"Quand non spécifié, la recherche est seulement faite dans le paquet :mod:" +"`distutils.command`. Cependant, lorsque :file:`setup.py` est lancé avec " +"l'option ``--command-packages distcmds,buildcmds``, les paquets :mod:" +"`distutils.command`, :mod:`distcmds`, et :mod:`buildcmds` seront cherchés " +"dans cet ordre. Il est attendu des nouvelles commandes d’être implémentées " +"en modules du même nom que la commande en utilisant des classes partageant " +"le même nom. Comme dans l'exemple shell donné ci-dessus, la commande :" +"command:`bdist_openpkg` pourrait être implémentée avec la classe :class:" +"`distcmds.bdist_openpkg.bdist_openpkg` ou :class:`buildcmds.bdist_openpkg." +"bdist_openpkg`." + +#: distutils/extending.rst:90 +msgid "Adding new distribution types" +msgstr "Ajout de nouveaux types de distribution" + +#: distutils/extending.rst:92 +msgid "" +"Commands that create distributions (files in the :file:`dist/` directory) " +"need to add ``(command, filename)`` pairs to ``self.distribution." +"dist_files`` so that :command:`upload` can upload it to PyPI. The " +"*filename* in the pair contains no path information, only the name of the " +"file itself. In dry-run mode, pairs should still be added to represent what " +"would have been created." +msgstr "" +"Les commandes qui créent des distributions (fichiers dans le dossier :file:" +"`dist/`) doivent ajouter la paire ``(command, filename)`` à ``self." +"distribution.dist_files`` pour que :command:`upload` puisse publier sur " +"PyPI. Le nom de fichier (*filename*) dans la paire ne contiens pas de " +"chemin, juste le nom du fichier lui-même. En mode *dry-run*, les paires " +"doivent toujours être ajoutées pour représenter ce qui aurait été créé." diff --git a/distutils/index.po b/distutils/index.po new file mode 100644 index 0000000000..1e69bc4e61 --- /dev/null +++ b/distutils/index.po @@ -0,0 +1,91 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-09-23 16:16+0200\n" +"PO-Revision-Date: 2021-01-28 15:55+0100\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.4.2\n" + +#: distutils/index.rst:5 +msgid "Distributing Python Modules (Legacy version)" +msgstr "Distribuer des modules Python (Version historique)" + +#: distutils/index.rst:0 +msgid "Authors" +msgstr "Auteurs" + +#: distutils/index.rst:7 +msgid "Greg Ward, Anthony Baxter" +msgstr "Greg Ward, Anthony Baxter" + +#: distutils/index.rst:0 +msgid "Email" +msgstr "Email" + +#: distutils/index.rst:8 +msgid "distutils-sig@python.org" +msgstr "distutils-sig@python.org" + +#: distutils/index.rst:12 +msgid ":ref:`distributing-index`" +msgstr ":ref:`distributing-index`" + +#: distutils/index.rst:13 +msgid "The up to date module distribution documentations" +msgstr "La documentation actuelle de distribution de modules" + +#: distutils/index.rst:17 +msgid "" +"The entire ``distutils`` package has been deprecated and will be removed in " +"Python 3.12. This documentation is retained as a reference only, and will be " +"removed with the package. See the :ref:`What's New ` " +"entry for more information." +msgstr "" + +#: distutils/_setuptools_disclaimer.rst:3 +msgid "" +"This document is being retained solely until the ``setuptools`` " +"documentation at https://setuptools.readthedocs.io/en/latest/setuptools.html " +"independently covers all of the relevant information currently included here." +msgstr "" +"Cette page est conservée uniquement jusqu'à ce que la documentation " +"``setuptool`` sur https://setuptools.readthedocs.io/en/latest/setuptools." +"html couvre de manière indépendante toutes les informations pertinentes " +"actuellement incluses ici." + +#: distutils/index.rst:26 +msgid "" +"This guide only covers the basic tools for building and distributing " +"extensions that are provided as part of this version of Python. Third party " +"tools offer easier to use and more secure alternatives. Refer to the `quick " +"recommendations section `__ in the Python Packaging User Guide for more information." +msgstr "" +"Ce guide ne couvre que les outils de base, fournis avec cette version de " +"Python, pour construire et distribuer des extensions. D'autres outils " +"peuvent être plus sécurisés et plus simple à utiliser. Consultez `quick " +"recommendations section `__ dans le *Python Packaging User Guide* pour plus " +"d'informations." + +#: distutils/index.rst:32 +msgid "" +"This document describes the Python Distribution Utilities (\"Distutils\") " +"from the module developer's point of view, describing the underlying " +"capabilities that ``setuptools`` builds on to allow Python developers to " +"make Python modules and extensions readily available to a wider audience." +msgstr "" +"Ce document décrit les outils de distribution de Python (\"Distutils\") du " +"point de vue d'un développeur de modules. Il décrit les capacités sous-" +"jacentes sur lesquelles ``setuptools`` s'appuie pour permettre aux " +"développeurs Python de créer des modules Python et des extensions " +"disponibles à une large audience." diff --git a/distutils/introduction.po b/distutils/introduction.po new file mode 100644 index 0000000000..69e6b28596 --- /dev/null +++ b/distutils/introduction.po @@ -0,0 +1,463 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-03-18 17:06+0100\n" +"PO-Revision-Date: 2022-10-18 12:31+0200\n" +"Last-Translator: Eric Régnier \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" + +#: distutils/introduction.rst:5 +msgid "An Introduction to Distutils" +msgstr "Introduction à Distutils" + +#: distutils/_setuptools_disclaimer.rst:3 +msgid "" +"This document is being retained solely until the ``setuptools`` " +"documentation at https://setuptools.readthedocs.io/en/latest/setuptools.html " +"independently covers all of the relevant information currently included here." +msgstr "" +"Cette page est conservée uniquement jusqu'à ce que la documentation " +"``setuptool`` sur https://setuptools.readthedocs.io/en/latest/setuptools." +"html couvre de manière indépendante toutes les informations pertinentes " +"actuellement incluses ici." + +#: distutils/introduction.rst:9 +msgid "" +"This document covers using the Distutils to distribute your Python modules, " +"concentrating on the role of developer/distributor: if you're looking for " +"information on installing Python modules, you should refer to the :ref:" +"`install-index` chapter." +msgstr "" +"Ce document traite de l'utilisation de Distutils pour distribuer des modules " +"Python, en se concentrant sur le rôle de développeur/distributeur : si vous " +"cherchez des informations sur l'installation de modules Python, vous devriez " +"vous référer au chapitre :ref:`install-index`." + +#: distutils/introduction.rst:18 +msgid "Concepts & Terminology" +msgstr "Concepts et Terminologie" + +#: distutils/introduction.rst:20 +msgid "" +"Using the Distutils is quite simple, both for module developers and for " +"users/administrators installing third-party modules. As a developer, your " +"responsibilities (apart from writing solid, well-documented and well-tested " +"code, of course!) are:" +msgstr "" +"Utiliser Distuils est assez simple, à la fois pour les développeurs de " +"module et pour les utilisateurs/administrateurs qui installent des modules " +"tiers. En tant que développeur, vos responsabilités (en plus d'écrire du " +"code solide, bien documenté et bien testé, bien entendu !) sont :" + +#: distutils/introduction.rst:25 +msgid "write a setup script (:file:`setup.py` by convention)" +msgstr "écrire un script d'installation (:file:`setup.py` par convention) ;" + +#: distutils/introduction.rst:27 +msgid "(optional) write a setup configuration file" +msgstr "(optionnel) écrire un fichier de configuration pour l'installation ;" + +#: distutils/introduction.rst:29 +msgid "create a source distribution" +msgstr "créer une distribution source ;" + +#: distutils/introduction.rst:31 +msgid "(optional) create one or more built (binary) distributions" +msgstr "(optionnel) créer une ou plusieurs distributions compilées (binaires)." + +#: distutils/introduction.rst:33 +msgid "Each of these tasks is covered in this document." +msgstr "Chacune de ces tâches est couverte dans ce document." + +#: distutils/introduction.rst:35 +msgid "" +"Not all module developers have access to a multitude of platforms, so it's " +"not always feasible to expect them to create a multitude of built " +"distributions. It is hoped that a class of intermediaries, called " +"*packagers*, will arise to address this need. Packagers will take source " +"distributions released by module developers, build them on one or more " +"platforms, and release the resulting built distributions. Thus, users on " +"the most popular platforms will be able to install most popular Python " +"module distributions in the most natural way for their platform, without " +"having to run a single setup script or compile a line of code." +msgstr "" +"Tous les développeurs de modules n'ont pas accès à une multitude de " +"plateformes, donc on ne peut pas exiger d'eux qu'ils créent une multitude de " +"distributions compilées. On s'attend à ce que certains intermédiaires, " +"appelés *packagers*, prennent en charge ce besoin. Les packagers vont " +"prendre les sources des distributions publiées par les développeurs de " +"modules, les construire sur on ou plusieurs plateformes, et publier les " +"distributions compilées résultantes. Ainsi, les utilisateurs sur les " +"plateformes les plus populaires vont pouvoir installer la plupart des " +"modules Python de la façon la plus naturelle qui soit pour leur plateforme, " +"sans avoir à exécuter de script ou à compiler du code." + +#: distutils/introduction.rst:49 +msgid "A Simple Example" +msgstr "Un exemple simple" + +#: distutils/introduction.rst:51 +msgid "" +"The setup script is usually quite simple, although since it's written in " +"Python, there are no arbitrary limits to what you can do with it, though you " +"should be careful about putting arbitrarily expensive operations in your " +"setup script. Unlike, say, Autoconf-style configure scripts, the setup " +"script may be run multiple times in the course of building and installing " +"your module distribution." +msgstr "" +"Le script d'installation est habituellement assez simple, même s'il n'y a " +"pas de limite à ce qu'il peut faire (il est écrit en Python, n'est-ce " +"pas ?). Veillez d'ailleurs à ne pas surcharger ce script avec des opérations " +"coûteuses car, contrairement aux scripts de configuration façon Autoconf, le " +"script d'installation peut être amené à être exécuté plusieurs fois au cours " +"de la compilation et de l'installation du module." + +#: distutils/introduction.rst:58 +msgid "" +"If all you want to do is distribute a module called :mod:`foo`, contained in " +"a file :file:`foo.py`, then your setup script can be as simple as this::" +msgstr "" +"Si tout ce que vous voulez est de distribuer un module appelé :mod:`foo`, " +"contenu dans un fichier :file:`foo.py`, alors votre script d'installation " +"peut se résumer à :" + +#: distutils/introduction.rst:67 +msgid "Some observations:" +msgstr "Quelques observations :" + +#: distutils/introduction.rst:69 +msgid "" +"most information that you supply to the Distutils is supplied as keyword " +"arguments to the :func:`setup` function" +msgstr "" +"la plupart des informations que vous fournissez à Distutils sont fournies en " +"tant qu'arguments nommés à la fonction :func:`setup`;" + +#: distutils/introduction.rst:72 +msgid "" +"those keyword arguments fall into two categories: package metadata (name, " +"version number) and information about what's in the package (a list of pure " +"Python modules, in this case)" +msgstr "" +"ces arguments nommés tombent dans deux catégories : métadonnées du paquet " +"(nom, numéro de version) et des informations sur le contenu du paquet paquet " +"(une liste de purs modules Python, dans ce cas) ;" + +#: distutils/introduction.rst:76 +msgid "" +"modules are specified by module name, not filename (the same will hold true " +"for packages and extensions)" +msgstr "" +"les modules sont listés par nom de module, plutôt que par nom de fichier (le " +"cas est similaire pour les paquets et extensions) ;" + +#: distutils/introduction.rst:79 +msgid "" +"it's recommended that you supply a little more metadata, in particular your " +"name, email address and a URL for the project (see section :ref:`setup-" +"script` for an example)" +msgstr "" +"il est recommandé de fournir un minimum de métadonnées, en particulier votre " +"nom, une adresse de courriel et une URL pour le projet (voir section :ref:" +"`setup-script` pour un exemple)." + +#: distutils/introduction.rst:83 +msgid "" +"To create a source distribution for this module, you would create a setup " +"script, :file:`setup.py`, containing the above code, and run this command " +"from a terminal::" +msgstr "" +"Pour créer une distribution source pour ce module, il faut créer un script " +"d'installation, :file:`setup.py`, contenant le code ci-dessus, et exécuter " +"cette commande depuis un terminal :" + +#: distutils/introduction.rst:89 +msgid "" +"For Windows, open a command prompt window (:menuselection:`Start --> " +"Accessories`) and change the command to::" +msgstr "" +"Pour Windows, ouvrez une invite de commande (:menuselection:`Démarrer --> " +"Accessoires`) et changez la commande en :" + +#: distutils/introduction.rst:94 +msgid "" +":command:`sdist` will create an archive file (e.g., tarball on Unix, ZIP " +"file on Windows) containing your setup script :file:`setup.py`, and your " +"module :file:`foo.py`. The archive file will be named :file:`foo-1.0.tar.gz` " +"(or :file:`.zip`), and will unpack into a directory :file:`foo-1.0`." +msgstr "" +":command:`sdist` va créer un fichier d'archive (p. ex. une archive *tar* sur " +"Unix, un fichier ZIP sous Windows) contenant votre script d'installation :" +"file:`setup.py`, et votre module :file:`foo.py`. Le fichier d'archive va " +"être nommé :file:`foo-1.0.tar.gz` (ou :file:`.zip`), et va se décompresser " +"dans un répertoire :file:`foo-1.0`." + +#: distutils/introduction.rst:99 +msgid "" +"If an end-user wishes to install your :mod:`foo` module, all they have to do " +"is download :file:`foo-1.0.tar.gz` (or :file:`.zip`), unpack it, and---from " +"the :file:`foo-1.0` directory---run ::" +msgstr "" +"Si un utilisateur final souhaite installer votre module :mod:`foo`, tout ce " +"qu'il aura à faire est de télécharger le fichier :file:`foo-1.0.tar.gz` (ou :" +"file:`.zip`), le décompresser et ---depuis le répertoire :file:`foo-1.0`--- " +"exécuter :" + +#: distutils/introduction.rst:105 +msgid "" +"which will ultimately copy :file:`foo.py` to the appropriate directory for " +"third-party modules in their Python installation." +msgstr "" +"ce qui va finalement copier :file:`foo.py` dans le répertoire approprié pour " +"un module tiers dans son installation Python." + +#: distutils/introduction.rst:108 +msgid "" +"This simple example demonstrates some fundamental concepts of the Distutils. " +"First, both developers and installers have the same basic user interface, i." +"e. the setup script. The difference is which Distutils *commands* they use: " +"the :command:`sdist` command is almost exclusively for module developers, " +"while :command:`install` is more often for installers (although most " +"developers will want to install their own code occasionally)." +msgstr "" +"Ce simple exemple démontre des concepts fondamentaux de Distutils, " +"Premièrement, les développeurs et installeurs ont la même interface " +"utilisateur basique, p. ex. le script d'installation. La différence est " +"quelle *commande* Distutils ils utilisent : la commande :command:`sdist` est " +"quasiment exclusivement pour les développeurs de modules Python, tandis que :" +"command:`install` est plus souvent pour les installeurs (bien que la plupart " +"des développeurs vont vouloir installer leur code occasionnellement)." + +#: distutils/introduction.rst:115 +msgid "" +"Other useful built distribution formats are RPM, implemented by the :command:" +"`bdist_rpm` command, Solaris :program:`pkgtool` (:command:`bdist_pkgtool`), " +"and HP-UX :program:`swinstall` (:command:`bdist_sdux`). For example, the " +"following command will create an RPM file called :file:`foo-1.0.noarch.rpm`::" +msgstr "" +"D'autres formats de distributions compilés utiles sont RPM, implémenté par " +"la commande :command:`bdist_rpm`, Solaris :program:`pkgtool` (:command:" +"`bdist_pkgtool`), et HP-UX :program:`swinstall` (:command:`bdist_sdux`). Par " +"exemple, la commande suivante va créer un fichier RPM appelé :file:`foo-1.0." +"noarch.rpm`::" + +#: distutils/introduction.rst:123 +msgid "" +"(The :command:`bdist_rpm` command uses the :command:`rpm` executable, " +"therefore this has to be run on an RPM-based system such as Red Hat Linux, " +"SuSE Linux, or Mandrake Linux.)" +msgstr "" +"(La commande :command:`bdist_rpm` utilise l'exécutable :command:`rpm`, " +"cependant cela doit être exécuté sur un système basé sur RPM tel que Red Hat " +"Linux, SuSE Linux, or Mandrake Linux.)" + +#: distutils/introduction.rst:127 +msgid "" +"You can find out what distribution formats are available at any time by " +"running ::" +msgstr "" +"Vous pouvez trouver quelles sont les formats de distribution disponibles à " +"n'importe quel moment en exécutant :" + +#: distutils/introduction.rst:136 +msgid "General Python terminology" +msgstr "Terminologie Python générale" + +#: distutils/introduction.rst:138 +msgid "" +"If you're reading this document, you probably have a good idea of what " +"modules, extensions, and so forth are. Nevertheless, just to be sure that " +"everyone is operating from a common starting point, we offer the following " +"glossary of common Python terms:" +msgstr "" +"Si vous lisez ce document, vous avez probablement une bonne idée de ce que " +"sont les modules, extensions, etc. Néanmoins, juste pour être sur que tout " +"le monde opère depuis un point d'entrée commun, nous reprécisons le " +"glossaire suivant des termes Python communs :" + +#: distutils/introduction.rst:146 +msgid "module" +msgstr "module" + +#: distutils/introduction.rst:144 +msgid "" +"the basic unit of code reusability in Python: a block of code imported by " +"some other code. Three types of modules concern us here: pure Python " +"modules, extension modules, and packages." +msgstr "" +"unité de base de la réutilisabilité en Python : un bloc de code importé par " +"un autre code. Trois types de modules nous concernent ici : les purs modules " +"Python, les modules d'extension, et les packages." + +#: distutils/introduction.rst:151 +msgid "pure Python module" +msgstr "pur module Python" + +#: distutils/introduction.rst:149 +msgid "" +"a module written in Python and contained in a single :file:`.py` file (and " +"possibly associated :file:`.pyc` files). Sometimes referred to as a \"pure " +"module.\"" +msgstr "" +"un module écrit en Python et contenu dans un seul fichier :file:`.py` (et " +"possiblement un fichier :file:`.pyc` associé). Parfois appelé \"pur module.\"" + +#: distutils/introduction.rst:159 +msgid "extension module" +msgstr "module d'extension" + +#: distutils/introduction.rst:154 +msgid "" +"a module written in the low-level language of the Python implementation: C/C+" +"+ for Python, Java for Jython. Typically contained in a single dynamically " +"loadable pre-compiled file, e.g. a shared object (:file:`.so`) file for " +"Python extensions on Unix, a DLL (given the :file:`.pyd` extension) for " +"Python extensions on Windows, or a Java class file for Jython extensions. " +"(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++)." + +#: distutils/introduction.rst:164 +msgid "package" +msgstr "paquet" + +#: distutils/introduction.rst:162 +msgid "" +"a module that contains other modules; typically contained in a directory in " +"the filesystem and distinguished from other directories by the presence of a " +"file :file:`__init__.py`." +msgstr "" +"un module qui contient d'autres modules ; très souvent contenu dans un " +"répertoire du système de fichier et qui se distingue des autres répertoires " +"par la présence d'un fichier :file:`__init__.py`." + +#: distutils/introduction.rst:174 +msgid "root package" +msgstr "paquet racine" + +#: distutils/introduction.rst:167 +msgid "" +"the root of the hierarchy of packages. (This isn't really a package, since " +"it doesn't have an :file:`__init__.py` file. But we have to call it " +"something.) The vast majority of the standard library is in the root " +"package, as are many small, standalone third-party modules that don't belong " +"to a larger module collection. Unlike regular packages, modules in the root " +"package can be found in many directories: in fact, every directory listed in " +"``sys.path`` contributes modules to the root package." +msgstr "" +"la racine de la hiérarchie de paquets. (Ce n'est pas vraiment un paquet, " +"puisqu'il n'a pas un fichier :file:`__init__.py`. Mais nous devons bien le " +"nommer.) La grande majorité de la bibliothèque standard est dans le package " +"racine, comme le sont certains petits, des packages tiers autonomes qui " +"n'appartiennent pas à une un module plus grand. Contrairement aux packages " +"réguliers, les modules dans le package racine peuvent être trouvés dans " +"plusieurs répertoires : en effet, tous les répertoires listés ``sys.path`` " +"contribuent à faire partie du package racine." + +#: distutils/introduction.rst:179 +msgid "Distutils-specific terminology" +msgstr "Terminologie spécifique à Distutils" + +#: distutils/introduction.rst:181 +msgid "" +"The following terms apply more specifically to the domain of distributing " +"Python modules using the Distutils:" +msgstr "" +"Les termes suivant s'appliquent plus spécifiquement au domaine de la " +"distribution de modules Python en utilisant les Distutils :" + +#: distutils/introduction.rst:190 +msgid "module distribution" +msgstr "module de distribution" + +#: distutils/introduction.rst:185 +msgid "" +"a collection of Python modules distributed together as a single downloadable " +"resource and meant to be installed *en masse*. Examples of some well-known " +"module distributions are NumPy, SciPy, Pillow, or mxBase. (This would be " +"called a *package*, except that term is already taken in the Python context: " +"a single module distribution may contain zero, one, or many Python packages.)" +msgstr "" +"une collection de modules Python distribués ensemble, comme une unique " +"ressource téléchargeable et ayant pour but d'être installé *en bloc*. Des " +"exemples de modules distribués bien connus sont *NumPy*, *SciPy*, *Pillow*, " +"ou *mxBase*. (On pourrait les appeler des *packages*, malgré que le terme " +"soit déjà pris dans le contexte Python : une distribution de module simple " +"pourrait contenir zéro, on ou plusieurs packages Python" + +#: distutils/introduction.rst:194 +msgid "pure module distribution" +msgstr "distribution de modules purs" + +#: distutils/introduction.rst:193 +msgid "" +"a module distribution that contains only pure Python modules and packages. " +"Sometimes referred to as a \"pure distribution.\"" +msgstr "" +"une distribution de module qui contient seulement des modules purs et " +"packages Python. Parfois appelée « distribution pure »." + +#: distutils/introduction.rst:198 +msgid "non-pure module distribution" +msgstr "distribution de module non pur" + +#: distutils/introduction.rst:197 +msgid "" +"a module distribution that contains at least one extension module. " +"Sometimes referred to as a \"non-pure distribution.\"" +msgstr "" +"une distribution de module qui contient au moins un module d'extension. " +"Parfois appelée « distribution non-pure »." + +#: distutils/introduction.rst:202 +msgid "distribution root" +msgstr "distribution racine" + +#: distutils/introduction.rst:201 +msgid "" +"the top-level directory of your source tree (or source distribution); the " +"directory where :file:`setup.py` exists. Generally :file:`setup.py` will " +"be run from this directory." +msgstr "" +"le répertoire de plus haut niveau de votre arborescence (ou distribution " +"source) ; le répertoire ou :file:`setup.py` existe. Généralement :file:" +"`setup.py` est exécuté depuis ce répertoire." + +#~ msgid "" +#~ "If you want to make things really easy for your users, you can create one " +#~ "or more built distributions for them. For instance, if you are running " +#~ "on a Windows machine, and want to make things easy for other Windows " +#~ "users, you can create an executable installer (the most appropriate type " +#~ "of built distribution for this platform) with the :command:" +#~ "`bdist_wininst` command. For example::" +#~ msgstr "" +#~ "Si vous voulez rendre les choses vraiment faciles pour vos utilisateurs, " +#~ "vous pouvez créer on ou plusieurs distributions compilées pour eux. En " +#~ "l’occurrence, si vous tournez sous une machine Windows, et que vous " +#~ "voulez rendre les choses faciles pour les autres utilisateurs Windows, " +#~ "vous pouvez créer un installateur exécutable (le mode de distribution le " +#~ "plus approprié pour cette plateforme) avec la commande :command:" +#~ "`bdist_wininst`. Par exemple :" + +#~ msgid "" +#~ "will create an executable installer, :file:`foo-1.0.win32.exe`, in the " +#~ "current directory." +#~ msgstr "" +#~ "va créer une installeur exécutable, :file:`foo-1.0.win32.exe`, dans le " +#~ "répertoire courant." diff --git a/distutils/packageindex.po b/distutils/packageindex.po new file mode 100644 index 0000000000..6950fc534d --- /dev/null +++ b/distutils/packageindex.po @@ -0,0 +1,38 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +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-08-21 12:33+0200\n" +"Last-Translator: Zepmanbc \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" + +#: distutils/packageindex.rst:7 +msgid "The Python Package Index (PyPI)" +msgstr "L'index de paquets Python (*Python Package Index* : PyPI)" + +#: distutils/packageindex.rst:9 +msgid "" +"The `Python Package Index (PyPI)`_ stores metadata describing distributions " +"packaged with distutils and other publishing tools, as well the distribution " +"archives themselves." +msgstr "" +"Le `Python Package Index (PyPI)`_ stocke les métadonnées décrivant les " +"distributions empaquetées avec *distutils* et autres outils de publication, " +"ainsi que les archives des distributions elles-mêmes." + +#: distutils/packageindex.rst:13 +msgid "" +"References to up to date PyPI documentation can be found at :ref:`publishing-" +"python-packages`." +msgstr "" +"Des références à la documentation de PyPI à jour peuvent être trouvées sur :" +"ref:`publishing-python-packages`." diff --git a/distutils/setupscript.po b/distutils/setupscript.po new file mode 100644 index 0000000000..5bbe202dcf --- /dev/null +++ b/distutils/setupscript.po @@ -0,0 +1,1399 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-04-05 10:05+0200\n" +"PO-Revision-Date: 2022-10-18 16:06+0200\n" +"Last-Translator: Philippe GALVAN\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" + +#: distutils/setupscript.rst:5 +msgid "Writing the Setup Script" +msgstr "Rédaction du script ``setup.py``" + +#: distutils/_setuptools_disclaimer.rst:3 +msgid "" +"This document is being retained solely until the ``setuptools`` " +"documentation at https://setuptools.readthedocs.io/en/latest/setuptools.html " +"independently covers all of the relevant information currently included here." +msgstr "" +"Ce document est conservé uniquement jusqu'à ce que la documentation de " +"``setuptools``, présente à l'adresse https://setuptools.readthedocs.io/en/" +"latest/setuptools.html, couvre indépendamment toutes les informations " +"pertinentes actuellement incluses ici." + +#: distutils/setupscript.rst:9 +msgid "" +"The setup script is the centre of all activity in building, distributing, " +"and installing modules using the Distutils. The main purpose of the setup " +"script is to describe your module distribution to the Distutils, so that the " +"various commands that operate on your modules do the right thing. As we saw " +"in section :ref:`distutils-simple-example` above, the setup script consists " +"mainly of a call to :func:`setup`, and most information supplied to the " +"Distutils by the module developer is supplied as keyword arguments to :func:" +"`setup`." +msgstr "" +"Le script ``setup.py`` est au centre de toute opération de construction, de " +"distribution et d'installation des modules utilisant les *Distutils*. " +"L'objectif principal du script ``setup.py`` est de décrire le module aux " +"*Distutils*, de telle sorte que les diverses commandes qui agissent sur " +"votre module fassent les bonnes choses. Comme nous avons vu dans la section :" +"ref:`distutils-simple-example` au-dessus, le script ``setup.py`` consiste " +"principalement à un appel à :func:`setup`, et la plupart des informations " +"fournies aux *Distutils* par le développeur du module sont fournies en tant " +"qu'arguments nommés à :func:`setup.py`." + +#: distutils/setupscript.rst:17 +msgid "" +"Here's a slightly more involved example, which we'll follow for the next " +"couple of sections: the Distutils' own setup script. (Keep in mind that " +"although the Distutils are included with Python 1.6 and later, they also " +"have an independent existence so that Python 1.5.2 users can use them to " +"install other module distributions. The Distutils' own setup script, shown " +"here, is used to install the package into Python 1.5.2.) ::" +msgstr "" +"Voici un exemple un peu plus concret, que nous allons suivre pour les " +"quelques sections suivantes : le propre script ``setup.py`` des *Distutils* " +"(gardez toujours à l'esprit qu'en dépit de l'inclusion des *Distutils* dans " +"python 1.6 et ses versions successives, ils ont aussi une existence à part " +"entière de telle sorte que les utilisateurs de Python 1.5.2 puissent les " +"utiliser pour installer d'autres modules. Le propre script ``setup.py`` des " +"*Distutils* montré ici est utilisé pour installer le paquet dans Python " +"1.5.2). ::" + +#: distutils/setupscript.rst:37 +msgid "" +"There are only two differences between this and the trivial one-file " +"distribution presented in section :ref:`distutils-simple-example`: more " +"metadata, and the specification of pure Python modules by package, rather " +"than by module. This is important since the Distutils consist of a couple " +"of dozen modules split into (so far) two packages; an explicit list of every " +"module would be tedious to generate and difficult to maintain. For more " +"information on the additional meta-data, see section :ref:`meta-data`." +msgstr "" +"Il y a seulement deux différences entre cet exemple et l'exemple trivial de " +"la distribution d'un unique fichier présenté dans la partie :ref:`distutils-" +"simple-example` : plus de métadonnées, et la définition de modules purement " +"Python par paquet, plutôt que par module. C'est important car les " +"*Distutils* sont composés de quelques douzaines de modules séparés (pour le " +"moment) en deux paquets ; une liste explicite de chaque module serait " +"pénible à générer et difficile à maintenir. Pour plus d'information sur les " +"métadonnées supplémentaires, voir la partie :ref:`meta-data`." + +#: distutils/setupscript.rst:45 +msgid "" +"Note that any pathnames (files or directories) supplied in the setup script " +"should be written using the Unix convention, i.e. slash-separated. The " +"Distutils will take care of converting this platform-neutral representation " +"into whatever is appropriate on your current platform before actually using " +"the pathname. This makes your setup script portable across operating " +"systems, which of course is one of the major goals of the Distutils. In " +"this spirit, all pathnames in this document are slash-separated." +msgstr "" +"À noter que chaque chemin d'accès fourni au script ``setup.py`` doit être " +"écrit selon la convention Unix. Autrement dit, séparé par des barres " +"obliques (slash). Les *Distutils* prendront soin de convertir cette " +"représentation indépendante de la plateforme en une représentation adaptée à " +"votre plateforme actuelle avant d'effectivement utiliser le chemin d'accès. " +"Cela rend votre script ``setup.py`` portable d'un système d'exploitation à " +"l'autre, ce qui évidemment est l'un des buts majeurs des *Distutils*. Dans " +"cet esprit, tous les chemins d'accès dans ce document sont séparés par des " +"barres obliques (slash)." + +#: distutils/setupscript.rst:53 +msgid "" +"This, of course, only applies to pathnames given to Distutils functions. If " +"you, for example, use standard Python functions such as :func:`glob.glob` " +"or :func:`os.listdir` to specify files, you should be careful to write " +"portable code instead of hardcoding path separators::" +msgstr "" +"Cela, évidemment, s'applique uniquement aux chemins d'accès passés aux " +"fonctions de *Distutils*. Si vous, par exemple, vous utilisez les fonctions " +"standards de Python telles que :func:`glob.glob` or :func:`os.listdir` pour " +"définir des fichiers, vous devez prendre soin d'écrire du code portable au " +"lieu de coder en dur les séparateurs de chemin ::" + +#: distutils/setupscript.rst:65 +msgid "Listing whole packages" +msgstr "Lister l'ensemble des paquets" + +#: distutils/setupscript.rst:67 +msgid "" +"The ``packages`` option tells the Distutils to process (build, distribute, " +"install, etc.) all pure Python modules found in each package mentioned in " +"the ``packages`` list. In order to do this, of course, there has to be a " +"correspondence between package names and directories in the filesystem. The " +"default correspondence is the most obvious one, i.e. package :mod:" +"`distutils` is found in the directory :file:`distutils` relative to the " +"distribution root. Thus, when you say ``packages = ['foo']`` in your setup " +"script, you are promising that the Distutils will find a file :file:`foo/" +"__init__.py` (which might be spelled differently on your system, but you get " +"the idea) relative to the directory where your setup script lives. If you " +"break this promise, the Distutils will issue a warning but still process the " +"broken package anyway." +msgstr "" +"L'option ``packages`` dit aux *Distutils* de traiter (construire, " +"distribuer, installer, etc.) tous les modules en Python pur trouvés dans " +"chaque paquet mentionné dans la liste ``packages``. À cette fin, évidemment, " +"il faut une correspondance entre les noms des paquets et des répertoires " +"dans le système de fichiers. La correspondance par défaut est la plus " +"évidente. À savoir : le paquet :mod:`distutils` se trouve dans le " +"répertoire :file:`distutils` situé à la racine de la distribution. Ainsi, " +"quand vous écrivez ``packages = ['foo']`` dans votre script ``setup.py``, " +"vous vous engagez à ce que les *Distutils* trouvent un fichier ``foo/" +"__init__.py`` (qui peut s'épeler différemment sur votre système, mais vous " +"voyez l'idée) à un emplacement relatif au répertoire où se trouve le script " +"``setup.py``. Si ce n'est pas le cas, les *Distutils* lèvent un " +"avertissement mais traitent tout de même le paquet défectueux." + +#: distutils/setupscript.rst:79 +msgid "" +"If you use a different convention to lay out your source directory, that's " +"no problem: you just have to supply the ``package_dir`` option to tell the " +"Distutils about your convention. For example, say you keep all Python " +"source under :file:`lib`, so that modules in the \"root package\" (i.e., not " +"in any package at all) are in :file:`lib`, modules in the :mod:`foo` package " +"are in :file:`lib/foo`, and so forth. Then you would put ::" +msgstr "" +"Si vous utilisez une convention différente pour arranger votre répertoire de " +"sources, ce n'est pas un problème : vous avez seulement à fournir l'option " +"``package_dir`` pour prévenir les *Distutils* de l'usage de cette " +"convention. Par exemple, supposons que vous gardez toutes les sources Python " +"sous :file:`lib`, de telle sorte que les modules dans le « paquet " +"racine » (c'est-à-dire dans aucun paquet du tout) sont dans :file:`lib`, les " +"modules dans le paquet :mod:`foo` sont dans :file:`lib/foo`, et ainsi de " +"suite. Alors, vous pouvez mettre ::" + +#: distutils/setupscript.rst:88 +msgid "" +"in your setup script. The keys to this dictionary are package names, and an " +"empty package name stands for the root package. The values are directory " +"names relative to your distribution root. In this case, when you say " +"``packages = ['foo']``, you are promising that the file :file:`lib/foo/" +"__init__.py` exists." +msgstr "" +"dans votre script ``setup.py``. Les clés de ce dictionnaire sont les noms " +"des paquets, et un nom de paquet vide fait office de paquet racine. Les " +"valeurs sont des noms de répertoires relatifs à la racine de votre " +"distribution. Dans ce cas, lorsque vous dites ``packages = ['foo']``, vous " +"vous engagez à ce que le fichier :file:`lib/foo/__init__.py` existe." + +#: distutils/setupscript.rst:93 +msgid "" +"Another possible convention is to put the :mod:`foo` package right in :file:" +"`lib`, the :mod:`foo.bar` package in :file:`lib/bar`, etc. This would be " +"written in the setup script as ::" +msgstr "" +"Une autre convention possible est de mettre le paquet :mod:`foo` directement " +"dans :file:`lib`, le paquet :mod:`foo.bar` dans :file:`lib/bar`, etc. Cela " +"s'écrirait ainsi dans le script ``setup.py`` : ::" + +#: distutils/setupscript.rst:99 +msgid "" +"A ``package: dir`` entry in the ``package_dir`` dictionary implicitly " +"applies to all packages below *package*, so the :mod:`foo.bar` case is " +"automatically handled here. In this example, having ``packages = ['foo', " +"'foo.bar']`` tells the Distutils to look for :file:`lib/__init__.py` and :" +"file:`lib/bar/__init__.py`. (Keep in mind that although ``package_dir`` " +"applies recursively, you must explicitly list all packages in ``packages``: " +"the Distutils will *not* recursively scan your source tree looking for any " +"directory with an :file:`__init__.py` file.)" +msgstr "" + +#: distutils/setupscript.rst:112 +msgid "Listing individual modules" +msgstr "Lister chaque module indépendamment" + +#: distutils/setupscript.rst:114 +msgid "" +"For a small module distribution, you might prefer to list all modules rather " +"than listing packages---especially the case of a single module that goes in " +"the \"root package\" (i.e., no package at all). This simplest case was " +"shown in section :ref:`distutils-simple-example`; here is a slightly more " +"involved example::" +msgstr "" +"Pour un petit projet, vous pouvez préférer lister tous les modules plutôt " +"que les paquets — surtout le cas d'un module seul qui va dans le « paquet " +"racine » (à savoir, aucun paquet du tout). Le cas le plus simple a été " +"montré dans la partie :ref:`distutils-simple-example` ; voici un exemple " +"plus concret ::" + +#: distutils/setupscript.rst:121 +msgid "" +"This describes two modules, one of them in the \"root\" package, the other " +"in the :mod:`pkg` package. Again, the default package/directory layout " +"implies that these two modules can be found in :file:`mod1.py` and :file:" +"`pkg/mod2.py`, and that :file:`pkg/__init__.py` exists as well. And again, " +"you can override the package/directory correspondence using the " +"``package_dir`` option." +msgstr "" +"Deux modules sont décrits, l'un dans le paquet « racine », l'autre dans le " +"paquet :mod:`pkg`. Encore une fois, la structure paquet/répertoire par " +"défaut implique que ces deux modules peuvent être trouvés dans :file:`mod1." +"py` et :file:`pkg/mod2.py`, et que :file:`pkg/__init__.py` existe aussi. Là " +"aussi, vous pouvez redéfinir la correspondance paquet/répertoire en " +"utilisant l'option ``package_dir``." + +#: distutils/setupscript.rst:131 +msgid "Describing extension modules" +msgstr "Description des modules d'extension" + +#: distutils/setupscript.rst:133 +msgid "" +"Just as writing Python extension modules is a bit more complicated than " +"writing pure Python modules, describing them to the Distutils is a bit more " +"complicated. Unlike pure modules, it's not enough just to list modules or " +"packages and expect the Distutils to go out and find the right files; you " +"have to specify the extension name, source file(s), and any compile/link " +"requirements (include directories, libraries to link with, etc.)." +msgstr "" +"Tout comme écrire des modules d'extension Python est un peu plus compliqué " +"que d’écrire des modules purement en Python, les décrire aux *Distutils* est " +"un peu plus compliqué. Contrairement aux modules purs, il ne suffit pas de " +"simplement lister les modules ou les paquets et d'attendre que les " +"*Distutils* trouvent par eux-mêmes les bons fichiers ; vous devez définir le " +"nom de l'extension, du ou des fichiers de sources, et les prérequis de " +"compilation/lien (répertoires à inclure, bibliothèques à lier, etc.)." + +#: distutils/setupscript.rst:142 +msgid "" +"All of this is done through another keyword argument to :func:`setup`, the " +"``ext_modules`` option. ``ext_modules`` is just a list of :class:" +"`~distutils.core.Extension` instances, each of which describes a single " +"extension module. Suppose your distribution includes a single extension, " +"called :mod:`foo` and implemented by :file:`foo.c`. If no additional " +"instructions to the compiler/linker are needed, describing this extension is " +"quite simple::" +msgstr "" +"Tout ceci est fait à l'aide d'un autre argument nommé passé à :func:`setup`, " +"l'option ``ext_modules``. ``ext_modules`` est simplement une liste de " +"classes :class:`~distutils.core.Extension`, chacune décrivant une seule " +"extension de module. Supposons que votre distribution inclut une seule " +"extension appelée :mod:`foo` et implémentée par :file:`foo.c`. Si aucune " +"instruction supplémentaire au compilateur/lieur n'est requise, décrire cette " +"extension est assez simple ::" + +#: distutils/setupscript.rst:152 +msgid "" +"The :class:`Extension` class can be imported from :mod:`distutils.core` " +"along with :func:`setup`. Thus, the setup script for a module distribution " +"that contains only this one extension and nothing else might be::" +msgstr "" +"La classe :class:`Extension` peut être importée depuis :mod:`distutils.core` " +"en même temps que :func:`setup`. Ainsi, le script ``setup.py`` pour un " +"module qui ne contient que cette seule extension et rien d'autre peut être ::" + +#: distutils/setupscript.rst:162 +msgid "" +"The :class:`Extension` class (actually, the underlying extension-building " +"machinery implemented by the :command:`build_ext` command) supports a great " +"deal of flexibility in describing Python extensions, which is explained in " +"the following sections." +msgstr "" +"La classe :class:`Extension` (en réalité, la machinerie sous-jacente " +"construisant les extensions implémentées par la commande :command:" +"`build_ext`) permet une grande flexibilité dans la description des " +"extensions Python, ce qui est expliqué dans les parties suivantes." + +#: distutils/setupscript.rst:169 +msgid "Extension names and packages" +msgstr "Nom des extensions et paquets" + +#: distutils/setupscript.rst:171 +msgid "" +"The first argument to the :class:`~distutils.core.Extension` constructor is " +"always the name of the extension, including any package names. For " +"example, ::" +msgstr "" +"Le premier argument du constructeur :class:`~distutils.core.Extension` est " +"toujours le nom de l'extension, incluant tout nom de paquet. Par exemple ::" + +#: distutils/setupscript.rst:176 +msgid "describes an extension that lives in the root package, while ::" +msgstr "décrit une extension qui se situe dans le paquet racine, tandis que ::" + +#: distutils/setupscript.rst:180 +msgid "" +"describes the same extension in the :mod:`pkg` package. The source files " +"and resulting object code are identical in both cases; the only difference " +"is where in the filesystem (and therefore where in Python's namespace " +"hierarchy) the resulting extension lives." +msgstr "" +"décrit la même extension dans le paquet :mod:`pkg`. Les fichiers sources et " +"le code objet résultant sont identiques dans les deux cas ; la seule " +"différence est où, dans le système de fichier (et conséquemment dans la " +"hiérarchie de l'espace de nommage de Python), l'extension résultante se " +"situe." + +#: distutils/setupscript.rst:185 +msgid "" +"If you have a number of extensions all in the same package (or all under the " +"same base package), use the ``ext_package`` keyword argument to :func:" +"`setup`. For example, ::" +msgstr "" +"Si vous avez un certain nombre d'extensions toutes dans le même paquet (ou " +"toutes sous le même paquet de base), utilisez l'argument nommé " +"``ext_package`` de :func:`setup`. Par exemple ::" + +#: distutils/setupscript.rst:195 +msgid "" +"will compile :file:`foo.c` to the extension :mod:`pkg.foo`, and :file:`bar." +"c` to :mod:`pkg.subpkg.bar`." +msgstr "" +"compile :file:`foo.c` en l’extension :mod:`pkg.foo`, et :file:`bar.c` en :" +"mod:`pkg.subpkg.bar`." + +#: distutils/setupscript.rst:200 +msgid "Extension source files" +msgstr "Fichiers sources d'extension" + +#: distutils/setupscript.rst:202 +msgid "" +"The second argument to the :class:`~distutils.core.Extension` constructor is " +"a list of source files. Since the Distutils currently only support C, C++, " +"and Objective-C extensions, these are normally C/C++/Objective-C source " +"files. (Be sure to use appropriate extensions to distinguish C++ source " +"files: :file:`.cc` and :file:`.cpp` seem to be recognized by both Unix and " +"Windows compilers.)" +msgstr "" +"Le second argument du constructeur d'\\ :class:`~distutils.core.Extension` " +"est une liste de fichiers sources. Puisque les *Distutils* ne gèrent que les " +"extensions en C, C++ et Objective-C, ce sont normalement des fichiers " +"sources en C/C++/Objective-C (assurez vous d'utiliser les extensions " +"appropriées pour détecter les fichiers sources en C++ : :file:`.cc` et :file:" +"`.cpp` semblent être reconnus tant par les compilateurs Unix que Windows)." + +#: distutils/setupscript.rst:209 +msgid "" +"However, you can also include SWIG interface (:file:`.i`) files in the list; " +"the :command:`build_ext` command knows how to deal with SWIG extensions: it " +"will run SWIG on the interface file and compile the resulting C/C++ file " +"into your extension." +msgstr "" +"Néanmoins, vous pouvez également inclure des fichiers d'interface SWIG (:" +"file:`.i`) dans la liste ; la commande :command:`build_ext` sait comment " +"gérer les extensions SWIG : il lancera SWIG sur un fichier d'interface et " +"compilera le fichier en C/C++ en une extension." + +#: distutils/setupscript.rst:216 +msgid "" +"This warning notwithstanding, options to SWIG can be currently passed like " +"this::" +msgstr "" +"Malgré cet avertissement, les options peuvent être actuellement passées à " +"SWIG de la façon suivante ::" + +#: distutils/setupscript.rst:225 +msgid "Or on the commandline like this::" +msgstr "Ou en ligne de commande de cette façon ::" + +#: distutils/setupscript.rst:229 +msgid "" +"On some platforms, you can include non-source files that are processed by " +"the compiler and included in your extension. Currently, this just means " +"Windows message text (:file:`.mc`) files and resource definition (:file:`." +"rc`) files for Visual C++. These will be compiled to binary resource (:file:" +"`.res`) files and linked into the executable." +msgstr "" +"Sur certaines plateformes, vous pouvez inclure des fichiers autres que des " +"sources qui seront traités par le compilateur et inclus dans votre " +"extension. Pour l'instant, cela concerne seulement les fichiers de messages " +"texte Windows (:file:`.mc`) et les fichiers de définition de ressource pour " +"Visual C++ (:file:`.rc`). Ils seront compilés en fichiers de ressources " +"binaires (:file:`.res`) et liés à l'exécutable." + +#: distutils/setupscript.rst:237 +msgid "Preprocessor options" +msgstr "Options de préprocesseur" + +#: distutils/setupscript.rst:239 +msgid "" +"Three optional arguments to :class:`~distutils.core.Extension` will help if " +"you need to specify include directories to search or preprocessor macros to " +"define/undefine: ``include_dirs``, ``define_macros``, and ``undef_macros``." +msgstr "" +"Trois arguments optionnels de :class:`~distutils.core.Extension` aident si " +"vous avez besoin de préciser les dossiers d’en-têtes à chercher ou les " +"macros de préprocesseurs à charger ou ignorer : ``include_dirs``, " +"``define_macros``, et ``undef_macros``." + +#: distutils/setupscript.rst:243 +msgid "" +"For example, if your extension requires header files in the :file:`include` " +"directory under your distribution root, use the ``include_dirs`` option::" +msgstr "" +"Par exemple, si votre extension nécessite des fichiers d'en-tête dans le " +"répertoire :file:`include` à la racine de votre distribution, utilisez " +"l'option ``include_dirs`` ::" + +#: distutils/setupscript.rst:248 +msgid "" +"You can specify absolute directories there; if you know that your extension " +"will only be built on Unix systems with X11R6 installed to :file:`/usr`, you " +"can get away with ::" +msgstr "" +"Ici, vous pouvez définir le chemin absolu des répertoires ; si vous savez " +"que votre extension sera compilée sur un système Unix avec ``X11R6`` " +"installé dans :file:`/usr`, vous pouvez vous en sortir avec ::" + +#: distutils/setupscript.rst:254 +msgid "" +"You should avoid this sort of non-portable usage if you plan to distribute " +"your code: it's probably better to write C code like ::" +msgstr "" +"Il convient d'éviter ce type d'utilisation non portable si vous envisagez de " +"distribuer votre code : Il est probablement mieux d'écrire du code C comme ::" + +#: distutils/setupscript.rst:259 +msgid "" +"If you need to include header files from some other Python extension, you " +"can take advantage of the fact that header files are installed in a " +"consistent way by the Distutils :command:`install_headers` command. For " +"example, the Numerical Python header files are installed (on a standard Unix " +"installation) to :file:`/usr/local/include/python1.5/Numerical`. (The exact " +"location will differ according to your platform and Python installation.) " +"Since the Python include directory---\\ :file:`/usr/local/include/python1.5` " +"in this case---is always included in the search path when building Python " +"extensions, the best approach is to write C code like ::" +msgstr "" +"Si vous avez besoin d'inclure des fichiers d'en-tête provenant d'autres " +"extensions Python, vous pouvez profiter du fait que les fichiers d'en-têtes " +"sont installés de façon cohérente par la commande :command:`install_headers` " +"des *Distutils*. Par exemple, les fichiers d'en-têtes de *Numerical Python* " +"(NumPy) sont installés (dans le cas d'une installation Unix standard) dans :" +"file:`/usr/local/include/python1.5/Numerical` — l'emplacement exact diffère " +"selon votre plateforme et votre installation de Python. Vu que le " +"répertoire :file:`include` de Python —\\ :file:`/usr/local/include/" +"python1.5` dans ce cas-ci — est toujours inclus dans le chemin de recherche " +"quand vous construisez des extensions Python, la meilleure approche est " +"d'écrire du code C comme ::" + +#: distutils/setupscript.rst:271 +msgid "" +"If you must put the :file:`Numerical` include directory right into your " +"header search path, though, you can find that directory using the Distutils :" +"mod:`distutils.sysconfig` module::" +msgstr "" +"Si vous devez mettre le répertoire :file:`include` de :file:`Numerical` " +"directement dans l'en-tête du chemin de recherche, cependant, vous pouvez " +"trouver ce répertoire en utilisant le module :mod:`distutils.sysconfig` des " +"*Distutils* ::" + +#: distutils/setupscript.rst:281 +msgid "" +"Even though this is quite portable---it will work on any Python " +"installation, regardless of platform---it's probably easier to just write " +"your C code in the sensible way." +msgstr "" +"Même si c'est assez portable — ça marche sur la plupart des installations de " +"Python, indépendamment de la plateforme — il est probablement plus facile " +"d'écrire un code C un peu plus réfléchi." + +#: distutils/setupscript.rst:285 +msgid "" +"You can define and undefine pre-processor macros with the ``define_macros`` " +"and ``undef_macros`` options. ``define_macros`` takes a list of ``(name, " +"value)`` tuples, where ``name`` is the name of the macro to define (a " +"string) and ``value`` is its value: either a string or ``None``. (Defining " +"a macro ``FOO`` to ``None`` is the equivalent of a bare ``#define FOO`` in " +"your C source: with most compilers, this sets ``FOO`` to the string ``1``.) " +"``undef_macros`` is just a list of macros to undefine." +msgstr "" +"Vous pouvez définir ou ignorer des macros de pré-processeur avec les options " +"``define_macros`` et ``undef_macros``. ``define_macros`` prend une liste de " +"paires ``(nom, valeur)``, où ``nom`` est le nom de la macro à définir (une " +"chaîne de caractères) et ``valeur`` est sa valeur ; soit une chaîne de " +"caractères, soit ``None`` (définir une macro ``FOO`` à ``None`` est " +"équivalent à un simple ``#define FOO`` dans votre source en C ; pour la " +"majorité des compilateurs, cela définit la valeur de ``FOO`` à la chaîne de " +"caractère ``1``). ``undef_macros`` est juste une liste de macros à supprimer." + +#: distutils/setupscript.rst:293 +msgid "For example::" +msgstr "Par exemple ::" + +#: distutils/setupscript.rst:300 +msgid "is the equivalent of having this at the top of every C source file::" +msgstr "est équivalent à avoir ceci au début de chaque fichier source en C ::" + +#: distutils/setupscript.rst:309 +msgid "Library options" +msgstr "Options des bibliothèques" + +#: distutils/setupscript.rst:311 +msgid "" +"You can also specify the libraries to link against when building your " +"extension, and the directories to search for those libraries. The " +"``libraries`` option is a list of libraries to link against, " +"``library_dirs`` is a list of directories to search for libraries at link-" +"time, and ``runtime_library_dirs`` is a list of directories to search for " +"shared (dynamically loaded) libraries at run-time." +msgstr "" +"Vous pouvez aussi définir les bibliothèques à lier quand vous construisez " +"votre extension, ainsi que le répertoire de recherche pour ces " +"bibliothèques. L'option ``libraries`` est une liste de bibliothèques à lier, " +"``library_dirs`` est une liste de répertoires dans lesquels chercher des " +"bibliothèques au moment de la liaison, et ``runtime_library_dirs`` est une " +"liste de répertoires pour la recherche des bibliothèques partagées (chargées " +"dynamiquement) à l'exécution." + +#: distutils/setupscript.rst:317 +msgid "" +"For example, if you need to link against libraries known to be in the " +"standard library search path on target systems ::" +msgstr "" +"Par exemple, pour lier des bibliothèques que l'on sait dans le chemin des " +"bibliothèques standards des systèmes cibles ::" + +#: distutils/setupscript.rst:323 +msgid "" +"If you need to link with libraries in a non-standard location, you'll have " +"to include the location in ``library_dirs``::" +msgstr "" +"Pour lier une bibliothèque se trouvant à un emplacement non standard, vous " +"devez inclure son emplacement dans ``library_dirs`` ::" + +#: distutils/setupscript.rst:330 +msgid "" +"(Again, this sort of non-portable construct should be avoided if you intend " +"to distribute your code.)" +msgstr "" +"Là aussi, ce genre de construction non portable doit être évité si vous avez " +"l'intention de distribuer votre code." + +#: distutils/setupscript.rst:337 +msgid "Other options" +msgstr "Autres options" + +#: distutils/setupscript.rst:339 +msgid "" +"There are still some other options which can be used to handle special cases." +msgstr "" +"Il y a encore d'autres options qui peuvent être utilisées pour gérer des cas " +"spéciaux." + +#: distutils/setupscript.rst:341 +msgid "" +"The ``optional`` option is a boolean; if it is true, a build failure in the " +"extension will not abort the build process, but instead simply not install " +"the failing extension." +msgstr "" +"L'option ``optional`` est un booléen ; s'il est vrai, un échec de la " +"construction dans l'extension n'annule pas le processus de construction, " +"mais à la place, l'extension en échec ne sera pas installée." + +#: distutils/setupscript.rst:345 +msgid "" +"The ``extra_objects`` option is a list of object files to be passed to the " +"linker. These files must not have extensions, as the default extension for " +"the compiler is used." +msgstr "" +"L'option ``extra_objects`` est une liste d'objets fichiers à passer à " +"l'éditeur de liens. Ces fichiers ne doivent pas avoir d'extensions car " +"l'extension par défaut du compilateur est utilisée." + +#: distutils/setupscript.rst:349 +msgid "" +"``extra_compile_args`` and ``extra_link_args`` can be used to specify " +"additional command line options for the respective compiler and linker " +"command lines." +msgstr "" +"``extra_compile_args`` et ``extra_link_args`` peuvent être utilisées pour " +"définir des options additionnelles en ligne de commande propres aux lignes " +"de commandes respectives du compilateur et de l'éditeur de liens." + +#: distutils/setupscript.rst:353 +msgid "" +"``export_symbols`` is only useful on Windows. It can contain a list of " +"symbols (functions or variables) to be exported. This option is not needed " +"when building compiled extensions: Distutils will automatically add " +"``initmodule`` to the list of exported symbols." +msgstr "" +"``export_symbols`` est seulement utile sur Windows. Elle peut contenir une " +"liste de symboles (fonctions ou variables) à exporter. Cette option n'est " +"pas requise pour la construction d'extensions compilées : *Distutils* ajoute " +"automatiquement ``initmodule`` à la liste des symboles exportés." + +#: distutils/setupscript.rst:358 +msgid "" +"The ``depends`` option is a list of files that the extension depends on (for " +"example header files). The build command will call the compiler on the " +"sources to rebuild extension if any on this files has been modified since " +"the previous build." +msgstr "" +"L'option ``depends`` est une liste de fichiers dont les extensions dépendent " +"(par exemple les fichiers d'en-têtes). La commande ``build`` appelle le " +"compilateur sur les sources pour reconstruire l'extension si un de ces " +"fichiers a été modifié depuis la dernière construction." + +#: distutils/setupscript.rst:364 +msgid "Relationships between Distributions and Packages" +msgstr "Relations entre distributions et paquets" + +#: distutils/setupscript.rst:366 +msgid "A distribution may relate to packages in three specific ways:" +msgstr "" +"Une distribution peut se rapporter à des paquets de trois manières " +"spécifiques :" + +#: distutils/setupscript.rst:368 +msgid "It can require packages or modules." +msgstr "elle peut nécessiter des paquets ou des modules ;" + +#: distutils/setupscript.rst:370 +msgid "It can provide packages or modules." +msgstr "elle peut fournir des paquets ou des modules ;" + +#: distutils/setupscript.rst:372 +msgid "It can obsolete packages or modules." +msgstr "elle peut rendre obsolète des paquets ou des modules." + +#: distutils/setupscript.rst:374 +msgid "" +"These relationships can be specified using keyword arguments to the :func:" +"`distutils.core.setup` function." +msgstr "" +"Ces relations peuvent être définies en utilisant des paramètres nommés dans " +"la fonction :func:`distutils.core.setup`." + +#: distutils/setupscript.rst:377 +msgid "" +"Dependencies on other Python modules and packages can be specified by " +"supplying the *requires* keyword argument to :func:`setup`. The value must " +"be a list of strings. Each string specifies a package that is required, and " +"optionally what versions are sufficient." +msgstr "" +"Les dépendances à d'autres modules et paquets Python peuvent être définies " +"en fournissant le paramètre nommé ``requires`` à :func:`setup`. La valeur " +"doit être une liste de chaînes de caractères. Chaque chaîne de caractères " +"définit un paquet requis et, en option, les versions minimales." + +#: distutils/setupscript.rst:382 +msgid "" +"To specify that any version of a module or package is required, the string " +"should consist entirely of the module or package name. Examples include " +"``'mymodule'`` and ``'xml.parsers.expat'``." +msgstr "" +"S'il n'est pas nécessaire de préciser la version d'un module ou d'un paquet, " +"la chaîne de caractères contient simplement les noms de modules ou de " +"paquets. Par exemple ``mymodule`` et ``'xml.parsers.expat'``." + +#: distutils/setupscript.rst:386 +msgid "" +"If specific versions are required, a sequence of qualifiers can be supplied " +"in parentheses. Each qualifier may consist of a comparison operator and a " +"version number. The accepted comparison operators are::" +msgstr "" +"Si des versions spécifiques sont requises, une suite de qualificatifs peut " +"être fournie entre parenthèses. Chaque qualificatif peut contenir un " +"opérateur de comparaison et un numéro de version. Les opérateurs de " +"comparaison acceptés sont ::" + +#: distutils/setupscript.rst:393 +msgid "" +"These can be combined by using multiple qualifiers separated by commas (and " +"optional whitespace). In this case, all of the qualifiers must be matched; " +"a logical AND is used to combine the evaluations." +msgstr "" +"Ils peuvent être combinés en utilisant plusieurs qualificatifs séparés par " +"des virgules (et de façon optionnelle, des espaces). Dans ce cas, tous les " +"qualificatifs doivent être respectés ; un ET logique est utilisé pour " +"combiner les évaluations." + +#: distutils/setupscript.rst:397 +msgid "Let's look at a bunch of examples:" +msgstr "Jetons un œil à quelques exemples :" + +#: distutils/setupscript.rst:400 +msgid "Requires Expression" +msgstr "Valeur de ``requires``" + +#: distutils/setupscript.rst:418 +msgid "Explanation" +msgstr "Explication" + +#: distutils/setupscript.rst:402 +msgid "``==1.0``" +msgstr "``==1.0``" + +#: distutils/setupscript.rst:402 +msgid "Only version ``1.0`` is compatible" +msgstr "Seule la version ``1.0`` est compatible." + +#: distutils/setupscript.rst:404 +msgid "``>1.0, !=1.5.1, <2.0``" +msgstr "``>1.0, !=1.5.1, <2.0``" + +#: distutils/setupscript.rst:404 +msgid "" +"Any version after ``1.0`` and before ``2.0`` is compatible, except ``1.5.1``" +msgstr "" +"Toute version après ``1.0`` et avant ``2.0`` est compatible, à l'exception " +"de ``1.5.1``." + +#: distutils/setupscript.rst:408 +msgid "" +"Now that we can specify dependencies, we also need to be able to specify " +"what we provide that other distributions can require. This is done using " +"the *provides* keyword argument to :func:`setup`. The value for this keyword " +"is a list of strings, each of which names a Python module or package, and " +"optionally identifies the version. If the version is not specified, it is " +"assumed to match that of the distribution." +msgstr "" +"Maintenant que nous pouvons définir des dépendances, nous devons également " +"être en mesure de définir ce que d'autres distributions peuvent attendre de " +"notre part. Cela est réalisé en utilisant l'argument nommé *provides* dans :" +"func:`setup`. La valeur de cet argument est une liste de chaînes de " +"caractères, chacune d'entre elles étant un module Python ou un paquet et, de " +"façon optionnelle, identifie une version. Si la version n'est pas définie, " +"il est supposé qu'elle correspond à celle de la distribution." + +#: distutils/setupscript.rst:415 +msgid "Some examples:" +msgstr "Quelques exemples :" + +#: distutils/setupscript.rst:418 +msgid "Provides Expression" +msgstr "Valeur de ``provides``" + +#: distutils/setupscript.rst:420 +msgid "``mypkg``" +msgstr "``mypkg``" + +#: distutils/setupscript.rst:420 +msgid "Provide ``mypkg``, using the distribution version" +msgstr "Fournit ``mypkg`` en utilisant la version de la distribution." + +#: distutils/setupscript.rst:423 +msgid "``mypkg (1.1)``" +msgstr "``mypkg (1.1)``" + +#: distutils/setupscript.rst:423 +msgid "Provide ``mypkg`` version 1.1, regardless of the distribution version" +msgstr "" +"Fournit ``mypkg`` en version 1.1, indépendamment de la version de la " +"distribution." + +#: distutils/setupscript.rst:427 +msgid "" +"A package can declare that it obsoletes other packages using the *obsoletes* " +"keyword argument. The value for this is similar to that of the *requires* " +"keyword: a list of strings giving module or package specifiers. Each " +"specifier consists of a module or package name optionally followed by one or " +"more version qualifiers. Version qualifiers are given in parentheses after " +"the module or package name." +msgstr "" +"On peut déclarer d'autres paquets obsolètes dans un paquet en utilisant " +"l'argument nommé *obsoletes*. La valeur pour celui-ci est similaire à celui " +"de l'argument nommé *requires* : une liste de chaînes de caractères donnant " +"les spécifications du module ou du paquet. Chaque spécification est " +"constituée d'un nom de module ou de paquet qui peut être suivi au choix par " +"un ou plusieurs qualificateurs de versions. Les qualificateurs de versions " +"sont donnés entre parenthèses après le nom de module ou de paquet." + +#: distutils/setupscript.rst:434 +msgid "" +"The versions identified by the qualifiers are those that are obsoleted by " +"the distribution being described. If no qualifiers are given, all versions " +"of the named module or package are understood to be obsoleted." +msgstr "" +"Les versions identifiées par les qualificateurs sont celles qui sont rendues " +"obsolètes par la distribution décrite. Si aucun qualificateur n'est donné, " +"toutes les versions du module ou du paquet nommé sont considérées comme " +"obsolètes." + +#: distutils/setupscript.rst:441 +msgid "Installing Scripts" +msgstr "Installation des scripts" + +#: distutils/setupscript.rst:443 +msgid "" +"So far we have been dealing with pure and non-pure Python modules, which are " +"usually not run by themselves but imported by scripts." +msgstr "" +"Jusqu'à présent nous avons interagi avec des modules Python purs ou non, qui " +"ne sont habituellement pas lancés par eux-mêmes mais importés par des " +"scripts." + +#: distutils/setupscript.rst:446 +msgid "" +"Scripts are files containing Python source code, intended to be started from " +"the command line. Scripts don't require Distutils to do anything very " +"complicated. The only clever feature is that if the first line of the script " +"starts with ``#!`` and contains the word \"python\", the Distutils will " +"adjust the first line to refer to the current interpreter location. By " +"default, it is replaced with the current interpreter location. The :option:" +"`!--executable` (or :option:`!-e`) option will allow the interpreter path to " +"be explicitly overridden." +msgstr "" +"Les scripts sont des fichiers contenant du code source Python prévus pour " +"être lancés en ligne de commande. Les scripts n'ont pas besoin des " +"*Distutils* pour faire quoi que ce soit de très compliqué. La seule " +"fonctionnalité astucieuse est que la première ligne du script commence par " +"``#!`` et contient le mot « python », les *Distutils* ajusteront la première " +"ligne pour faire référence à l'emplacement actuel de l'interpréteur. Par " +"défaut, elle est remplacée par l'emplacement de l'interpréteur en fonction. " +"L'option :option:`!--executable` (ou :option:`!-e`) permet de définir " +"explicitement le chemin vers l'interpréteur." + +#: distutils/setupscript.rst:454 +msgid "" +"The ``scripts`` option simply is a list of files to be handled in this way. " +"From the PyXML setup script::" +msgstr "" +"L'option ``scripts`` est simplement une liste de fichiers à utiliser de " +"cette façon. Dans le script ``setup.py`` de PyML ::" + +#: distutils/setupscript.rst:461 +msgid "" +"All the scripts will also be added to the ``MANIFEST`` file if no template " +"is provided. See :ref:`manifest`." +msgstr "" +"Tous les scripts seront aussi ajoutés au fichier ``MANIFEST`` si aucun " +"modèle n'est fourni. Voir :ref:`manifest`." + +#: distutils/setupscript.rst:469 +msgid "Installing Package Data" +msgstr "Installation de paquets de données" + +#: distutils/setupscript.rst:471 +msgid "" +"Often, additional files need to be installed into a package. These files " +"are often data that's closely related to the package's implementation, or " +"text files containing documentation that might be of interest to programmers " +"using the package. These files are called :dfn:`package data`." +msgstr "" +"Souvent, des fichiers additionnels doivent être installés dans le paquet. " +"Ces fichiers sont souvent de la donnée qui est intimement liée à " +"l'implémentation du paquet, ou des fichiers textes contenant de la " +"documentation intéressant le programmeur utilisant le paquet. Ces fichiers " +"sont appelés :dfn:`paquets de données `." + +#: distutils/setupscript.rst:476 +msgid "" +"Package data can be added to packages using the ``package_data`` keyword " +"argument to the :func:`setup` function. The value must be a mapping from " +"package name to a list of relative path names that should be copied into the " +"package. The paths are interpreted as relative to the directory containing " +"the package (information from the ``package_dir`` mapping is used if " +"appropriate); that is, the files are expected to be part of the package in " +"the source directories. They may contain glob patterns as well." +msgstr "" +"Les paquets de données peuvent être ajoutés en utilisant l'argument nommé " +"``package_data`` dans la fonction :func:`setup`. La valeur doit être un " +"tableau de correspondances entre le nom du paquet et une liste de chemins " +"relatifs à copier dans le paquet. Les chemins sont interprétés relativement " +"au répertoire contenant le paquet (l'information du mappage ``package_dir`` " +"est utilisée le cas échéant) ; ceci étant, il convient que les fichiers " +"fassent partie du répertoire source du paquet. Ils peuvent également " +"contenir des motifs ``glob``." + +#: distutils/setupscript.rst:484 +msgid "" +"The path names may contain directory portions; any necessary directories " +"will be created in the installation." +msgstr "" +"Les chemins d'accès peuvent contenir une hiérarchie de répertoires ; tout " +"répertoire nécessaire sera créé dans cette installation." + +#: distutils/setupscript.rst:487 +msgid "" +"For example, if a package should contain a subdirectory with several data " +"files, the files can be arranged like this in the source tree::" +msgstr "" +"Par exemple, si un paquet doit inclure un sous-répertoire avec plusieurs " +"fichiers de donnée, les fichiers peuvent être organisés dans l'arborescence " +"de la façon suivante ::" + +#: distutils/setupscript.rst:500 +msgid "The corresponding call to :func:`setup` might be::" +msgstr "L'appel correspondant à :func:`setup` peut s'écrire ::" + +#: distutils/setupscript.rst:509 +msgid "" +"All the files that match ``package_data`` will be added to the ``MANIFEST`` " +"file if no template is provided. See :ref:`manifest`." +msgstr "" +"Tous les fichiers correspondant à ``package_data`` seront ajoutés au fichier " +"``MANIFEST`` si aucun modèle n'est fourni. Voir :ref:`manifest`." + +#: distutils/setupscript.rst:517 +msgid "Installing Additional Files" +msgstr "Installation de fichiers additionnels" + +#: distutils/setupscript.rst:519 +msgid "" +"The ``data_files`` option can be used to specify additional files needed by " +"the module distribution: configuration files, message catalogs, data files, " +"anything which doesn't fit in the previous categories." +msgstr "" +"L'option ``data_files`` peut être utilisée pour définir des fichiers " +"additionnels requis pour la distribution du module : fichiers de " +"configuration, catalogues de messages, fichiers de donnée, tout ce qui ne " +"rentre pas dans les catégories précédentes." + +#: distutils/setupscript.rst:523 +msgid "" +"``data_files`` specifies a sequence of (*directory*, *files*) pairs in the " +"following way::" +msgstr "" +"``data_files`` définit une séquence de paires (*répertoires*, *fichiers*) de " +"la façon suivante ::" + +#: distutils/setupscript.rst:531 +msgid "" +"Each (*directory*, *files*) pair in the sequence specifies the installation " +"directory and the files to install there." +msgstr "" +"Chaque paire (*répertoire*, *fichier*) dans la séquence définit le " +"répertoire d'installation et les fichiers à y installer." + +#: distutils/setupscript.rst:534 +msgid "" +"Each file name in *files* is interpreted relative to the :file:`setup.py` " +"script at the top of the package source distribution. Note that you can " +"specify the directory where the data files will be installed, but you cannot " +"rename the data files themselves." +msgstr "" +"Chaque nom de fichier dans *fichiers* est interprété relativement au script :" +"file:`setup.py` à la racine du paquet de la distribution source. Notez que " +"vous pouvez définir un répertoire où les fichiers de donnée seront " +"installés, mais vous ne pouvez pas renommer les fichiers de donnée eux-mêmes." + +#: distutils/setupscript.rst:539 +msgid "" +"The *directory* should be a relative path. It is interpreted relative to the " +"installation prefix (Python's ``sys.prefix`` for system installations; " +"``site.USER_BASE`` for user installations). Distutils allows *directory* to " +"be an absolute installation path, but this is discouraged since it is " +"incompatible with the wheel packaging format. No directory information from " +"*files* is used to determine the final location of the installed file; only " +"the name of the file is used." +msgstr "" +"Le *répertoire* doit être un chemin relatif. Il est interprété relativement " +"au préfixe d'installation (le ``sys.prefix`` de Python pour les " +"installations ``système`` ; ``site.USER_BASE`` pour les installations " +"``utilisateur``). *Distutils* permet à *répertoire* d'être un chemin " +"d'installation absolu, mais cela est déconseillé dans la mesure où c'est " +"incompatible avec la mise au format *wheel* du paquet. Aucune information de " +"répertoire provenant de *fichiers* n'est utilisée pour déterminer " +"l’emplacement final d'installation du fichier ; seul le nom du fichier est " +"utilisé." + +#: distutils/setupscript.rst:547 +msgid "" +"You can specify the ``data_files`` options as a simple sequence of files " +"without specifying a target directory, but this is not recommended, and the :" +"command:`install` command will print a warning in this case. To install data " +"files directly in the target directory, an empty string should be given as " +"the directory." +msgstr "" +"Vous pouvez définir les options ``data_files`` comme une simple succession " +"de fichiers sans définir de répertoire cible, mais cela n'est pas " +"recommandé, et la commande :command:`install` affichera un message d'alerte " +"dans ce cas. Pour installer des fichiers de donnée directement dans le " +"répertoire cible, une chaîne de caractère vide doit être donnée en tant que " +"répertoire." + +#: distutils/setupscript.rst:553 +msgid "" +"All the files that match ``data_files`` will be added to the ``MANIFEST`` " +"file if no template is provided. See :ref:`manifest`." +msgstr "" +"Tous les fichiers correspondant à ``data_files`` seront ajoutés au fichier " +"``MANIFEST`` si aucun modèle n'est fourni. Voir :ref:`manifest`." + +#: distutils/setupscript.rst:561 +msgid "Additional meta-data" +msgstr "Métadonnées additionnelles" + +#: distutils/setupscript.rst:563 +msgid "" +"The setup script may include additional meta-data beyond the name and " +"version. This information includes:" +msgstr "" +"Le script ``setup.py`` peut inclure des métadonnées additionnelles en plus " +"du nom et de la version. Cela inclut les informations suivantes :" + +#: distutils/setupscript.rst:567 +msgid "Meta-Data" +msgstr "Métadonnées" + +#: distutils/setupscript.rst:567 +msgid "Description" +msgstr "Description" + +#: distutils/setupscript.rst:567 +msgid "Value" +msgstr "Valeur" + +#: distutils/setupscript.rst:567 +msgid "Notes" +msgstr "Notes" + +#: distutils/setupscript.rst:569 +msgid "``name``" +msgstr "``name``" + +#: distutils/setupscript.rst:569 +msgid "name of the package" +msgstr "nom du paquet" + +#: distutils/setupscript.rst:571 distutils/setupscript.rst:578 +#: distutils/setupscript.rst:601 +msgid "short string" +msgstr "courte chaîne de caractères" + +#: distutils/setupscript.rst:583 +msgid "\\(1)" +msgstr "\\(1)" + +#: distutils/setupscript.rst:571 +msgid "``version``" +msgstr "``version``" + +#: distutils/setupscript.rst:571 +msgid "version of this release" +msgstr "version de la publication" + +#: distutils/setupscript.rst:571 +msgid "(1)(2)" +msgstr "(1)(2)" + +#: distutils/setupscript.rst:573 +msgid "``author``" +msgstr "``author``" + +#: distutils/setupscript.rst:573 +msgid "package author's name" +msgstr "nom de l'auteur du paquet" + +#: distutils/setupscript.rst:575 distutils/setupscript.rst:580 +msgid "\\(3)" +msgstr "\\(3)" + +#: distutils/setupscript.rst:575 +msgid "``author_email``" +msgstr "``author_email``" + +#: distutils/setupscript.rst:575 +msgid "email address of the package author" +msgstr "adresse courriel de l'auteur du paquet" + +#: distutils/setupscript.rst:580 +msgid "email address" +msgstr "adresse de courriel" + +#: distutils/setupscript.rst:578 +msgid "``maintainer``" +msgstr "``maintainer``" + +#: distutils/setupscript.rst:578 +msgid "package maintainer's name" +msgstr "nom du mainteneur du paquet" + +#: distutils/setupscript.rst:580 +msgid "``maintainer_email``" +msgstr "``maintainer_email``" + +#: distutils/setupscript.rst:580 +msgid "email address of the package maintainer" +msgstr "adresse du courriel du mainteneur du paquet" + +#: distutils/setupscript.rst:583 +msgid "``url``" +msgstr "``url``" + +#: distutils/setupscript.rst:583 +msgid "home page for the package" +msgstr "page d’accueil du paquet" + +#: distutils/setupscript.rst:592 +msgid "URL" +msgstr "URL" + +#: distutils/setupscript.rst:585 +msgid "``description``" +msgstr "``description``" + +#: distutils/setupscript.rst:585 +msgid "short, summary description of the package" +msgstr "bref résumé décrivant le paquet" + +#: distutils/setupscript.rst:589 +msgid "``long_description``" +msgstr "``long_description``" + +#: distutils/setupscript.rst:589 +msgid "longer description of the package" +msgstr "description plus complète du paquet" + +#: distutils/setupscript.rst:589 +msgid "long string" +msgstr "longue chaîne de caractères" + +#: distutils/setupscript.rst:589 +msgid "\\(4)" +msgstr "\\(4)" + +#: distutils/setupscript.rst:592 +msgid "``download_url``" +msgstr "``download_url``" + +#: distutils/setupscript.rst:592 +msgid "location where the package may be downloaded" +msgstr "endroit où le paquet peut être téléchargé" + +#: distutils/setupscript.rst:595 +msgid "``classifiers``" +msgstr "``classifiers``" + +#: distutils/setupscript.rst:595 +msgid "a list of classifiers" +msgstr "une liste de classificateurs" + +#: distutils/setupscript.rst:597 distutils/setupscript.rst:599 +msgid "list of strings" +msgstr "liste de chaînes de caractères" + +#: distutils/setupscript.rst:595 +msgid "(6)(7)" +msgstr "(6)(7)" + +#: distutils/setupscript.rst:597 +msgid "``platforms``" +msgstr "``platforms``" + +#: distutils/setupscript.rst:597 +msgid "a list of platforms" +msgstr "une liste de plateformes" + +#: distutils/setupscript.rst:599 +msgid "(6)(8)" +msgstr "(6)(8)" + +#: distutils/setupscript.rst:599 +msgid "``keywords``" +msgstr "``keywords``" + +#: distutils/setupscript.rst:599 +msgid "a list of keywords" +msgstr "une liste de mots-clés" + +#: distutils/setupscript.rst:601 +msgid "``license``" +msgstr "``license``" + +#: distutils/setupscript.rst:601 +msgid "license for the package" +msgstr "licence du paquet" + +#: distutils/setupscript.rst:601 +msgid "\\(5)" +msgstr "\\(5)" + +#: distutils/setupscript.rst:604 +msgid "Notes:" +msgstr "Notes :" + +#: distutils/setupscript.rst:607 +msgid "These fields are required." +msgstr "Ces champs sont requis." + +#: distutils/setupscript.rst:610 +msgid "" +"It is recommended that versions take the form *major.minor[.patch[.sub]]*." +msgstr "" +"Il est recommandé que les versions prennent la forme *majeure.mineure[." +"correctif[.sous-correctif]]*." + +#: distutils/setupscript.rst:613 +msgid "" +"Either the author or the maintainer must be identified. If maintainer is " +"provided, distutils lists it as the author in :file:`PKG-INFO`." +msgstr "" +"L'auteur ou un mainteneur doit être identifié. Si un mainteneur est fourni, " +"*distutils* l'indique en tant qu'auteur dans le fichier :file:`PKG-INFO`." + +#: distutils/setupscript.rst:617 +msgid "" +"The ``long_description`` field is used by PyPI when you publish a package, " +"to build its project page." +msgstr "" +"Le champ ``long_description`` est utilisé par PyPI quand vous publiez un " +"paquet pour construire sa page de projet." + +#: distutils/setupscript.rst:621 +msgid "" +"The ``license`` field is a text indicating the license covering the package " +"where the license is not a selection from the \"License\" Trove classifiers. " +"See the ``Classifier`` field. Notice that there's a ``licence`` distribution " +"option which is deprecated but still acts as an alias for ``license``." +msgstr "" +"Le champ ``license`` est un texte indiquant la licence du paquet quand la " +"licence n'est pas indiquée dans les classificateurs de type « Licence » " +"Trove. Voir le champ ``Classifier``. À noter qu'il y a une option de " +"distribution ``licence`` qui est obsolète mais agit toujours comme un alias " +"pour ``license``." + +#: distutils/setupscript.rst:628 +msgid "This field must be a list." +msgstr "Ce champ doit être une liste." + +#: distutils/setupscript.rst:631 +msgid "" +"The valid classifiers are listed on `PyPI `_." +msgstr "" +"Les classificateurs valides sont listés sur `PyPI `_." + +#: distutils/setupscript.rst:635 +msgid "" +"To preserve backward compatibility, this field also accepts a string. If you " +"pass a comma-separated string ``'foo, bar'``, it will be converted to " +"``['foo', 'bar']``, Otherwise, it will be converted to a list of one string." +msgstr "" +"Pour préserver la rétrocompatibilité, ce champ accepte aussi une chaîne de " +"caractères. Si vous passez une chaîne de caractères séparée par des virgules " +"``'truc, machin'``, elle sera convertie en ``['truc', 'machin']``, " +"Autrement, elle sera convertie en une liste d'une chaîne de caractères." + +#: distutils/setupscript.rst:641 +msgid "'short string'" +msgstr "'courte chaîne de caractères'" + +#: distutils/setupscript.rst:641 +msgid "A single line of text, not more than 200 characters." +msgstr "Une simple ligne de texte ne dépassant par 200 caractères." + +#: distutils/setupscript.rst:645 +msgid "'long string'" +msgstr "'longue chaîne de caractères'" + +#: distutils/setupscript.rst:644 +msgid "" +"Multiple lines of plain text in reStructuredText format (see http://docutils." +"sourceforge.net/)." +msgstr "" +"De multiples lignes de texte au format ReStructuredText (voir http://" +"docutils.sourceforge.net/)." + +#: distutils/setupscript.rst:648 +msgid "'list of strings'" +msgstr "'liste de chaînes de caractères'" + +#: distutils/setupscript.rst:648 +msgid "See below." +msgstr "Voir ci-dessous." + +#: distutils/setupscript.rst:650 +msgid "" +"Encoding the version information is an art in itself. Python packages " +"generally adhere to the version format *major.minor[.patch][sub]*. The major " +"number is 0 for initial, experimental releases of software. It is " +"incremented for releases that represent major milestones in a package. The " +"minor number is incremented when important new features are added to the " +"package. The patch number increments when bug-fix releases are made. " +"Additional trailing version information is sometimes used to indicate sub-" +"releases. These are \"a1,a2,...,aN\" (for alpha releases, where " +"functionality and API may change), \"b1,b2,...,bN\" (for beta releases, " +"which only fix bugs) and \"pr1,pr2,...,prN\" (for final pre-release release " +"testing). Some examples:" +msgstr "" +"Encoder les informations de version est un art en soi. Les paquets Python " +"adhèrent généralement au format de version *majeure.mineure[.correctif]" +"[sous]*. Le numéro majeur 0 est utilisé pour les publications " +"expérimentales, initiales d'un logiciel. Il est incrémenté pour les " +"publications qui représentent des étapes majeures pour le paquet. Le nombre " +"mineur est incrémenté quand d'importantes nouvelles fonctionnalités sont " +"ajoutées au paquet. Le numéro de correctif s'incrémente lors de la " +"publication d'une correction de bogue est faite. Celles-ci sont \"*a1,a2,...," +"aN*\" (pour les publications alpha, où les fonctionnalités et l'API peut " +"changer), \"*b1,b2,...,bN*\" (pour les publications *beta*, qui corrigent " +"seulement les bogues) et \"*pr1,pr2,...,prN*\" (pour les ultimes pré-" +"publication et publications de test). Quelques exemples :" + +#: distutils/setupscript.rst:662 +msgid "0.1.0" +msgstr "0.1.0" + +#: distutils/setupscript.rst:662 +msgid "the first, experimental release of a package" +msgstr "la première, publication expérimentale du paquet" + +#: distutils/setupscript.rst:665 +msgid "1.0.1a2" +msgstr "1.0.1a2" + +#: distutils/setupscript.rst:665 +msgid "the second alpha release of the first patch version of 1.0" +msgstr "la seconde publication alpha du premier correctif de la version 1.0" + +#: distutils/setupscript.rst:667 +msgid "``classifiers`` must be specified in a list::" +msgstr "les ``classifiers`` doivent être définis dans une liste ::" + +#: distutils/setupscript.rst:688 +msgid "" +":class:`~distutils.core.setup` now warns when ``classifiers``, ``keywords`` " +"or ``platforms`` fields are not specified as a list or a string." +msgstr "" +":class:`~distutils.core.setup` alerte maintenant lorsque les champs " +"``classifiers``, ``keywords`` ou ``platforms`` ne sont pas définis en tant " +"que liste ou chaîne de caractères." + +#: distutils/setupscript.rst:695 +msgid "Debugging the setup script" +msgstr "Débogage du script ``setup.py``" + +#: distutils/setupscript.rst:697 +msgid "" +"Sometimes things go wrong, and the setup script doesn't do what the " +"developer wants." +msgstr "" +"Parfois les choses tournent mal et le script ``setup.py`` ne fait pas ce que " +"le développeur veut." + +#: distutils/setupscript.rst:700 +msgid "" +"Distutils catches any exceptions when running the setup script, and print a " +"simple error message before the script is terminated. The motivation for " +"this behaviour is to not confuse administrators who don't know much about " +"Python and are trying to install a package. If they get a big long " +"traceback from deep inside the guts of Distutils, they may think the package " +"or the Python installation is broken because they don't read all the way " +"down to the bottom and see that it's a permission problem." +msgstr "" +"*Distutils* intercepte toute exception lors de l'exécution du script ``setup." +"py`` et affiche un message d'erreur simple avant d'arrêter le script. L'idée " +"est de ne pas embrouiller les administrateurs qui ne savent pas grand-chose " +"de Python et qui essayent d'installer un paquet. S'ils reçoivent une grosse " +"et longue trace d'appels provenant des entrailles de *Distutils*, ils " +"peuvent penser que le paquet ou que l'installation de Python est corrompue " +"car, ils ne lisent pas tout jusqu'en bas alors que c'est un problème de " +"droits." + +#: distutils/setupscript.rst:708 +msgid "" +"On the other hand, this doesn't help the developer to find the cause of the " +"failure. For this purpose, the :envvar:`DISTUTILS_DEBUG` environment " +"variable can be set to anything except an empty string, and distutils will " +"now print detailed information about what it is doing, dump the full " +"traceback when an exception occurs, and print the whole command line when an " +"external program (like a C compiler) fails." +msgstr "" +"D'un autre côté, cela n'aide pas le développeur à trouver la cause du " +"problème. À cette fin, la variable d'environnement :envvar:`DISTUTILS_DEBUG` " +"peut être assignée à n'importe quoi sauf une chaîne de caractères vide, et " +"*distutils* affichera maintenant une information détaillée à propos de ce " +"qu'il fait, déversera la trace d'appels complète lors d'une exception, et " +"affichera la ligne de commande complète quand un programme externe (comme un " +"compilateur C) échoue." diff --git a/distutils/sourcedist.po b/distutils/sourcedist.po new file mode 100644 index 0000000000..53dcefd230 --- /dev/null +++ b/distutils/sourcedist.po @@ -0,0 +1,582 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-04-05 10:05+0200\n" +"PO-Revision-Date: 2020-02-04 21:21+0100\n" +"Last-Translator: ZepmanBC \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" + +#: distutils/sourcedist.rst:5 +msgid "Creating a Source Distribution" +msgstr "Créer une distribution source" + +#: distutils/_setuptools_disclaimer.rst:3 +msgid "" +"This document is being retained solely until the ``setuptools`` " +"documentation at https://setuptools.readthedocs.io/en/latest/setuptools.html " +"independently covers all of the relevant information currently included here." +msgstr "" +"Cette page est conservée uniquement jusqu'à ce que la documentation " +"``setuptool`` sur https://setuptools.readthedocs.io/en/latest/setuptools." +"html couvre de manière indépendante toutes les informations pertinentes " +"actuellement incluses ici." + +#: distutils/sourcedist.rst:9 +msgid "" +"As shown in section :ref:`distutils-simple-example`, you use the :command:" +"`sdist` command to create a source distribution. In the simplest case, ::" +msgstr "" +"Comme montré dans le chapitre :ref:`distutils-simple-example`, vous pouvez " +"utiliser la commande :command:`sdist` pour créer une distribution source. " +"Dans le cas le plus simple, ::" + +#: distutils/sourcedist.rst:14 +msgid "" +"(assuming you haven't specified any :command:`sdist` options in the setup " +"script or config file), :command:`sdist` creates the archive of the default " +"format for the current platform. The default format is a gzip'ed tar file (:" +"file:`.tar.gz`) on Unix, and ZIP file on Windows." +msgstr "" +"(en supposant que vous n'avez spécifié aucune option pour la commande :" +"command:`sdist` dans le script de préparation ou le fichier de " +"configuration), :command:`sdist` crée une archive au format par défaut pour " +"la plateforme utilisée. Le format par défaut est un fichier *tar* compressé " +"(:file:`.tar.gz`) sur Unix et un fichier ZIP sur Windows." + +#: distutils/sourcedist.rst:19 +msgid "" +"You can specify as many formats as you like using the :option:`!--formats` " +"option, for example::" +msgstr "" +"Vous pouvez donner autant de formats que désiré *via* l'option :option:`!--" +"formats`, par exemple ::" + +#: distutils/sourcedist.rst:24 +msgid "to create a gzipped tarball and a zip file. The available formats are:" +msgstr "" +"pour créer un fichier *tarball* compressé et un fichier ZIP. Les formats " +"disponibles actuellement sont :" + +#: distutils/sourcedist.rst:27 +msgid "Format" +msgstr "Format" + +#: distutils/sourcedist.rst:27 +msgid "Description" +msgstr "Description" + +#: distutils/sourcedist.rst:27 +msgid "Notes" +msgstr "Notes" + +#: distutils/sourcedist.rst:29 +msgid "``zip``" +msgstr "``zip``" + +#: distutils/sourcedist.rst:29 +msgid "zip file (:file:`.zip`)" +msgstr "Fichier *zip* (:file:`.zip`)" + +#: distutils/sourcedist.rst:29 +msgid "(1),(3)" +msgstr "(1), (3)" + +#: distutils/sourcedist.rst:31 +msgid "``gztar``" +msgstr "``gztar``" + +#: distutils/sourcedist.rst:31 +msgid "gzip'ed tar file (:file:`.tar.gz`)" +msgstr "Fichier *tar* compressé par *gzip* (:file:`.tar.gz`)" + +#: distutils/sourcedist.rst:31 +msgid "\\(2)" +msgstr "\\(2)" + +#: distutils/sourcedist.rst:34 +msgid "``bztar``" +msgstr "``bztar``" + +#: distutils/sourcedist.rst:34 +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``" + +#: distutils/sourcedist.rst:37 +msgid "xz'ed tar file (:file:`.tar.xz`)" +msgstr "Fichier *tar* compressé par *xz* (:file:`.tar.xz`)" + +#: distutils/sourcedist.rst:40 +msgid "``ztar``" +msgstr "``ztar``" + +#: distutils/sourcedist.rst:40 +msgid "compressed tar file (:file:`.tar.Z`)" +msgstr "Fichier *tar* compressé par *compress* (:file:`.tar.Z`)" + +#: distutils/sourcedist.rst:40 +msgid "(4),(5)" +msgstr "" + +#: distutils/sourcedist.rst:43 +msgid "``tar``" +msgstr "``tar``" + +#: distutils/sourcedist.rst:43 +msgid "tar file (:file:`.tar`)" +msgstr "fichier *tar* (:file:`.tar`)" + +#: distutils/sourcedist.rst:46 +msgid "Added support for the ``xztar`` format." +msgstr "Ajout du support des fichiers ``xztar``." + +#: distutils/sourcedist.rst:49 +msgid "Notes:" +msgstr "Notes :" + +#: distutils/sourcedist.rst:52 +msgid "default on Windows" +msgstr "Par défaut sur Windows" + +#: distutils/sourcedist.rst:55 +msgid "default on Unix" +msgstr "Par défaut sur Unix" + +#: distutils/sourcedist.rst:58 +msgid "" +"requires either external :program:`zip` utility or :mod:`zipfile` module " +"(part of the standard Python library since Python 1.6)" +msgstr "" +"nécessite soit un utilitaire :program:`zip` extérieur ou le module :mod:" +"`zipfile` (inclut dans la bibliothèque standard depuis Python 1.6)" + +#: distutils/sourcedist.rst:62 +msgid "" +"requires the :program:`compress` program. Notice that this format is now " +"pending for deprecation and will be removed in the future versions of Python." +msgstr "" +"nécessite le programme :program:`compress`. Remarquez que ce format sera " +"bientôt obsolète et sera enlevé des prochaines version de Python." + +#: 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." +msgstr "" +"Lorsque vous utilisez n'importe quel format ``tar`` (``gztar``, ``bztar``, " +"``xztar``, ``ztar`` or ``tar``), vous pouvez spécifier sous Unix le " +"propriétaire et le groupe qui seront appliqué pour chaque fichier de " +"l'archive." + +#: 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:80 +msgid "Specifying the files to distribute" +msgstr "Spécifier les fichiers à distribuer" + +#: 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 " +"the source distribution:" +msgstr "" +"Si vous ne fournissez pas une liste explicite de fichiers (ou les " +"instructions pour la générer), la commande :command:`sdist` en met par " +"défaut le minimum dans la distribution source :" + +#: distutils/sourcedist.rst:86 +msgid "" +"all Python source files implied by the ``py_modules`` and ``packages`` " +"options" +msgstr "" +"tous les fichiers source Python sous-entendus par les options ``py_modules`` " +"et ``packages``" + +#: 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:95 +msgid "" +"scripts identified by the ``scripts`` option See :ref:`distutils-installing-" +"scripts`." +msgstr "" +"scripts identifiés par l'argument ``scripts``. Voir :ref:`distutils-" +"installing-scripts`." + +#: 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 " +"source distributions, but in the future there will be a standard for testing " +"Python module distributions)" +msgstr "" +"tout ce qui ressemble à un script de test :file:`test/test\\*.py` (pour " +"l'instant, Distutils ne fait rien avec ces scripts de test, si ce n'est les " +"inclure dans les distributions sources, mais dans le futur un standard sera " +"implémenté pour tester les distributions de module Python)" + +#: 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 " +"script), and :file:`setup.cfg`." +msgstr "" +"n'importe quel fichier README classique (:file:`README`, :file:`README.txt`, " +"ou :file:`README.rst`), ainsi que le fichier :file:`setup.py` (ou votre " +"script d'installation si vous l'avez appelé autrement) et le fichier :file:" +"`setup.cfg`." + +#: distutils/sourcedist.rst:107 +msgid "" +"all files that matches the ``package_data`` metadata. See :ref:`distutils-" +"installing-package-data`." +msgstr "" +"tous les fichiers associés aux méta-données ``package_data``. Voir :ref:" +"`distutils-installing-package-data`." + +#: distutils/sourcedist.rst:110 +msgid "" +"all files that matches the ``data_files`` metadata. See :ref:`distutils-" +"additional-files`." +msgstr "" +"tous les fichiers associés aux méta-données ``data_files``. Voir :ref:" +"`distutils-additional-files`." + +#: 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 " +"template*, called :file:`MANIFEST.in` by default. The manifest template is " +"just a list of instructions for how to generate your manifest file, :file:" +"`MANIFEST`, which is the exact list of files to include in your source " +"distribution. The :command:`sdist` command processes this template and " +"generates a manifest based on its instructions and what it finds in the " +"filesystem." +msgstr "" +"Parfois ce fonctionnement suffit, mais généralement vous voudrez spécifier " +"des fichiers supplémentaires à distribuer. La façon classique de le faire " +"est d'écrire un *manifeste modèle*, appelé :file:`MANIFEST.in` par défaut. " +"Ce manifeste modèle est juste une liste d'instructions pour générer votre " +"fichier manifeste final, :file:`MANIFEST`, qui est la liste exacte des " +"fichiers à inclure dans votre distribution source. La commande :command:" +"`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: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 " +"supply your own :file:`MANIFEST`, you must specify everything: the default " +"set of files described above does not apply in this case." +msgstr "" +"Si vous préférez créer votre propre fichier manifeste, le format est " +"simple : un nom de fichier par ligne, uniquement des fichiers normaux (ou " +"leur lien symbolique). Si vous fournissez votre propre :file:`MANIFEST`, " +"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:126 +msgid "" +"An existing generated :file:`MANIFEST` will be regenerated without :command:" +"`sdist` comparing its modification time to the one of :file:`MANIFEST.in` " +"or :file:`setup.py`." +msgstr "" +"Un :file:`MANIFEST` existant généré automatiquement sera régénéré sans que :" +"command:`sdist` ne compare son heure de modification à :file:`MANIFEST.in` " +"ou :file:`setup.py`." + +#: 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." +msgstr "" +"Les fichiers :file:`MANIFEST` commencent par un commentaire indiquant qu'ils " +"sont générés. Les fichiers sans ce commentaire ne sont pas réécrits ou " +"supprimés." + +#: distutils/sourcedist.rst:135 +msgid "" +":command:`sdist` will read a :file:`MANIFEST` file if no :file:`MANIFEST.in` " +"exists, like it used to do." +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: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: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 " +"example, again we turn to the Distutils' own manifest template:" +msgstr "" +"Le modèle de manifeste possède une commande par ligne, où chaque commande " +"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: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` " +"directory matching :file:`\\*.txt` or :file:`\\*.py`, and exclude all " +"directories matching :file:`examples/sample?/build`. All of this is done " +"*after* the standard include set, so you can exclude files from the standard " +"set with explicit instructions in the manifest template. (Or, you can use " +"the :option:`!--no-defaults` option to disable the standard set entirely.) " +"There are several other commands available in the manifest template mini-" +"language; see section :ref:`sdist-cmd`." +msgstr "" +"La signification est assez claire : inclure tous les fichiers à la racine de " +"la distribution correspondant à :file:`*.txt`, tous les fichiers n'importe " +"où dans le dossier :file:`examples` correspondant à :file:`\\*.txt` ou :file:" +"`\\*.py`, et exclure tous les dossiers correspondant à :file:`examples/" +"sample?/build`. Tout ceci est fait **après** l'ensemble d'inclusions " +"standard, vous pouvez donc exclure des fichiers précédemment inclus en " +"utilisant une instruction explicite dans le manifeste. (Vous pouvez aussi " +"utiliser l'option :option:`!--no-defaults` pour désactiver complètement les " +"inclusions standards). Il existe d'autres commandes dans le langage du " +"fichier manifeste, consultez le chapitre :ref:`sdist-cmd`." + +#: 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 " +"template adds to or removes from that list of files. Once we have fully " +"processed the manifest template, we remove files that should not be included " +"in the source distribution:" +msgstr "" +"L'ordre des commandes dans le modèle manifeste compte : nous avons, à la " +"base, la liste de fichiers par défaut telle que décrite plus haut. Ensuite, " +"chaque commande du modèle ajoute ou supprime des fichiers de cette liste. " +"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: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:171 +msgid "" +"all files in directories named :file:`RCS`, :file:`CVS`, :file:`.svn`, :file:" +"`.hg`, :file:`.git`, :file:`.bzr` or :file:`_darcs`" +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: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)." +msgstr "" +"Maintenant nous avons notre liste complète de fichiers ; elle est désormais " +"é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: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:" +"`!--no-prune`." +msgstr "" +"Vous pouvez désactiver l'ensemble des fichiers inclus par défaut en " +"utilisant l'option :option:`!--no-defaults`, ainsi que désactiver les " +"exclusions standards avec l'option :option:`!--no-prune`." + +#: 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 " +"distribution:" +msgstr "" +"Voici le manifeste modèle de Distutils, suivons comment la commande :command:" +"`sdist` construit la liste des fichiers à inclure dans la distribution " +"source de Distutils." + +#: distutils/sourcedist.rst:185 +msgid "" +"include all Python source files in the :file:`distutils` and :file:" +"`distutils/command` subdirectories (because packages corresponding to those " +"two directories were mentioned in the ``packages`` option in the setup " +"script---see section :ref:`setup-script`)" +msgstr "" +"inclure tous les fichiers source Python dans les sous-dossiers :file:" +"`distutils` et :file:`distutils/command` (parce que des paquets " +"correspondant à ces deux dossiers ont été mentionnés dans l'argument " +"``packages`` du script d'installation --- voir le chapitre :ref:`setup-" +"script`)" + +#: distutils/sourcedist.rst:190 +msgid "" +"include :file:`README.txt`, :file:`setup.py`, and :file:`setup.cfg` " +"(standard files)" +msgstr "" +"inclure :file:`README.txt`, :file:`setup.py` et :file:`setup.cfg` (fichiers " +"standards)" + +#: distutils/sourcedist.rst:193 +msgid "include :file:`test/test\\*.py` (standard files)" +msgstr "inclure :file:`test/test\\*.py` (fichiers standard)" + +#: 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)" +msgstr "" +"inclure :file:`\\*.txt` à la racine de la distribution (ceci trouve :file:" +"`README.txt` une seconde fois, mais les redondances sont supprimées plus " +"tard)" + +#: distutils/sourcedist.rst:198 +msgid "" +"include anything matching :file:`\\*.txt` or :file:`\\*.py` in the sub-tree " +"under :file:`examples`," +msgstr "" +"inclure tout fichier de la forme :file:`\\*.txt` ou :file:`\\*.py` dans la " +"sous-arborescence de :file:`examples`," + +#: 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 " +"previous two steps, so it's important that the ``prune`` command in the " +"manifest template comes after the ``recursive-include`` command" +msgstr "" +"exclure tous les fichiers dans les sous-arborescences dont les dossiers " +"racines sont de la forme :file:`examples/sample?/build`\\ --- Ceci peut " +"exclure des fichiers inclus dans les étapes précédentes, il est donc " +"important que la commande ``prune`` dans le manifeste modèle vienne après la " +"commande ``recursive-include``" + +#: 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` " +"directories" +msgstr "" +"exclure l'arborescence de :file:`build` ainsi que les dossiers :file:" +"`RCS`, :file:`CVS`, :file:`.svn`, :file:`.hg`, :file:`.git`, :file:`.bzr` " +"et :file:`_darcs`" + +#: 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 " +"converting them to the standard representation on your platform. That way, " +"the manifest template is portable across operating systems." +msgstr "" +"Comme dans le script de préparation, les chemins des fichiers et des " +"dossiers dans le manifeste modèle doivent toujours être séparés par des " +"barres obliques (*slash* en anglais) ; Distutils s'occupe de les convertir à " +"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:219 +msgid "Manifest-related options" +msgstr "Options pour le manifeste" + +#: distutils/sourcedist.rst:221 +msgid "" +"The normal course of operations for the :command:`sdist` command is as " +"follows:" +msgstr "" +"L'ordre normal des opérations pour la commande :command:`sdist` est le " +"suivant :" + +#: 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`, " +"then it is used as is, unaltered" +msgstr "" +"si le fichier manifeste (:file:`MANIFEST` par défaut) existe et que la " +"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:227 +msgid "" +"if the manifest file doesn't exist or has been previously automatically " +"generated, read :file:`MANIFEST.in` and create the manifest" +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:230 +msgid "" +"if neither :file:`MANIFEST` nor :file:`MANIFEST.in` exist, create a manifest " +"with just the default file set" +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:233 +msgid "" +"use the list of files now in :file:`MANIFEST` (either just generated or read " +"in) to create the source distribution archive(s)" +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: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 " +"\"include\" and \"exclude\" sets." +msgstr "" +"Il existe deux manières pour modifier ce comportement. D'abord utilisez les " +"options :option:`!--no-defaults` et :option:`!--no-prune` pour désactiver " +"les inclusions et exclusions standards." + +#: distutils/sourcedist.rst:240 +msgid "" +"Second, you might just want to (re)generate the manifest, but not create a " +"source distribution::" +msgstr "" +"Ensuite, si vous ne voulez que (ré)générer le manifeste, mais pas créer la " +"distribution source ::" + +#: 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/distutils/uploading.po b/distutils/uploading.po new file mode 100644 index 0000000000..bdff56372a --- /dev/null +++ b/distutils/uploading.po @@ -0,0 +1,28 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +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-08-21 12:22+0200\n" +"Last-Translator: Zepmanbc \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" + +#: distutils/uploading.rst:5 +msgid "Uploading Packages to the Package Index" +msgstr "Téléverser des paquets dans *Python Package Index*" + +#: distutils/uploading.rst:7 +msgid "" +"References to up to date PyPI documentation can be found at :ref:`publishing-" +"python-packages`." +msgstr "" +"Des références actualisées à la documentation de PyPI sont disponibles sur :" +"ref:`publishing-python-packages`." diff --git a/extending/building.po b/extending/building.po new file mode 100644 index 0000000000..2da87acee9 --- /dev/null +++ b/extending/building.po @@ -0,0 +1,244 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-18 15:46+0200\n" +"PO-Revision-Date: 2021-12-11 12:46+0100\n" +"Last-Translator: Julien Palard \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" + +#: extending/building.rst:7 +msgid "Building C and C++ Extensions" +msgstr "Construire des extensions C et C++" + +#: extending/building.rst:9 +msgid "" +"A C extension for CPython is a shared library (e.g. a ``.so`` file on Linux, " +"``.pyd`` on Windows), which exports an *initialization function*." +msgstr "" +"Une extension C pour CPython est une bibliothèque partagée (Un ``.so`` sur " +"Linux, un ``.pyd`` sur Windows), qui expose une *fonction d'initialisation*." + +#: extending/building.rst:12 +msgid "" +"To be importable, the shared library must be available on :envvar:" +"`PYTHONPATH`, and must be named after the module name, with an appropriate " +"extension. When using distutils, the correct filename is generated " +"automatically." +msgstr "" +"Pour pouvoir être importée, la bibliothèque partagée doit pourvoir être " +"trouvée dans :envvar:`PYTHONPATH`, et doit porter le nom du module, avec " +"l'extension appropriée. En utilisant *distutils*, le nom est généré " +"automatiquement." + +#: extending/building.rst:16 +msgid "The initialization function has the signature:" +msgstr "La fonction d'initialisation doit avoir le prototype :" + +#: extending/building.rst:20 +#, fuzzy +msgid "" +"It returns either a fully initialized module, or a :c:type:`PyModuleDef` " +"instance. See :ref:`initializing-modules` for details." +msgstr "" +"Elle doit donner soit un module entièrement initialisé, soit une instance " +"de :c:type:`PyModuleDef`. Voir :ref:`initializing-modules` pour plus de " +"détails." + +#: extending/building.rst:25 +msgid "" +"For modules with ASCII-only names, the function must be named " +"``PyInit_``, with ```` replaced by the name of the " +"module. When using :ref:`multi-phase-initialization`, non-ASCII module names " +"are allowed. In this case, the initialization function name is " +"``PyInitU_``, with ```` encoded using Python's " +"*punycode* encoding with hyphens replaced by underscores. In Python::" +msgstr "" +"Pour les modules dont les noms sont entièrement en ASCII, la fonction doit " +"être nommée ``PyInit_``, dont ```` est remplacé par " +"le nom du module. En utilisant :ref:`multi-phase-initialization`, il est " +"possible d'utiliser des noms de modules comptant des caractères non ASCII. " +"Dans ce cas, le nom de la fonction d'initialisation est " +"``PyInitU_``, où ``modulename`` est encodé avec l'encodage " +"*punyencode* de Python, dont les tirets sont remplacés par des tirets-bas. " +"En Python ça donne ::" + +#: extending/building.rst:39 +msgid "" +"It is possible to export multiple modules from a single shared library by " +"defining multiple initialization functions. However, importing them requires " +"using symbolic links or a custom importer, because by default only the " +"function corresponding to the filename is found. See the *\"Multiple modules " +"in one library\"* section in :pep:`489` for details." +msgstr "" +"Il est possible d'exporter plusieurs modules depuis une seule bibliothèque " +"partagée en définissant plusieurs fonctions d'initialisation. Cependant pour " +"les importer, un lien symbolique doit être créé pour chacun, ou un " +"*importer* personnalisé, puisque par défaut seule la fonction correspondant " +"au nom du fichier est cherchée. Voir le chapitre *\"Multiple modules in one " +"library\"* dans la :pep:`489` pour plus d'informations." + +#: extending/building.rst:49 +msgid "Building C and C++ Extensions with distutils" +msgstr "Construire les extensions C et C++ avec *distutils*" + +#: extending/building.rst:53 +msgid "" +"Extension modules can be built using distutils, which is included in " +"Python. Since distutils also supports creation of binary packages, users " +"don't necessarily need a compiler and distutils to install the extension." +msgstr "" +"Des modules d'extension peuvent être construits avec *distutils*, qui est " +"inclus dans Python. Puisque *distutils* gère aussi la création de paquets " +"binaires, les utilisateurs n'auront pas nécessairement besoin ni d'un " +"compilateur ni de *distutils* pour installer l'extension." + +#: extending/building.rst:57 +msgid "" +"A distutils package contains a driver script, :file:`setup.py`. This is a " +"plain Python file, which, in the most simple case, could look like this:" +msgstr "" +"Un paquet *distutils* contient un script :file:`setup.py`. C'est un simple " +"fichier Python, ressemblant dans la plupart des cas à :" + +#: extending/building.rst:73 +msgid "With this :file:`setup.py`, and a file :file:`demo.c`, running ::" +msgstr "Avec ce :file:`setup.py` et un fichier :file:`demo.c`, lancer ::" + +#: extending/building.rst:77 +msgid "" +"will compile :file:`demo.c`, and produce an extension module named ``demo`` " +"in the :file:`build` directory. Depending on the system, the module file " +"will end up in a subdirectory :file:`build/lib.system`, and may have a name " +"like :file:`demo.so` or :file:`demo.pyd`." +msgstr "" +"compilera :file:`demo.c`, et produira un module d'extension nommé ``demo`` " +"dans le dossier :file:`build`. En fonction du système, le fichier du module " +"peut se retrouver dans :file:`build/lib.system`, et son nom peut être :file:" +"`demo.py` ou :file:`demo.pyd`." + +#: extending/building.rst:82 +msgid "" +"In the :file:`setup.py`, all execution is performed by calling the ``setup`` " +"function. This takes a variable number of keyword arguments, of which the " +"example above uses only a subset. Specifically, the example specifies meta-" +"information to build packages, and it specifies the contents of the " +"package. Normally, a package will contain additional modules, like Python " +"source modules, documentation, subpackages, etc. Please refer to the " +"distutils documentation in :ref:`distutils-index` to learn more about the " +"features of distutils; this section explains building extension modules only." +msgstr "" +"Dans le fichier :file:`setup.py`, tout est exécuté en appelant la fonction " +"``setup``. Elle prend un nombre variable d'arguments nommés, dont l'exemple " +"précédent n'utilise qu'une partie. L'exemple précise des méta-informations " +"pour construire les paquets, et définir le contenu du paquet. Normalement un " +"paquet contient des modules additionnels, comme des modules sources, " +"documentation, sous paquets, etc. Référez-vous à la documentation de " +"*distutils* dans :ref:`distutils-index` pour en apprendre plus sur les " +"fonctionnalités de *distutils*. Cette section n'explique que la construction " +"de modules d'extension." + +#: extending/building.rst:91 +msgid "" +"It is common to pre-compute arguments to :func:`setup`, to better structure " +"the driver script. In the example above, the ``ext_modules`` argument to :" +"func:`~distutils.core.setup` is a list of extension modules, each of which " +"is an instance of the :class:`~distutils.extension.Extension`. In the " +"example, the instance defines an extension named ``demo`` which is build by " +"compiling a single source file, :file:`demo.c`." +msgstr "" +"Il est classique de pré-calculer les arguments à la fonction :func:`setup`, " +"pour plus de lisibilité. Dans l'exemple ci-dessus, l'argument " +"``ext_modules`` à :func:`~distutils.core.setup` est une liste de modules " +"d'extension, chacun est une instance de la classe :class:`~distutils." +"extension.Extension`. Dans l'exemple, l'instance définit une extension " +"nommée ``demo`` construite par la compilation d'un seul fichier source :file:" +"`demo.c`." + +#: extending/building.rst:99 +msgid "" +"In many cases, building an extension is more complex, since additional " +"preprocessor defines and libraries may be needed. This is demonstrated in " +"the example below." +msgstr "" +"Dans la plupart des cas, construire une extension est plus complexe à cause " +"des bibliothèques et définitions de préprocesseurs dont la compilation " +"pourrait dépendre. C'est ce qu'on remarque dans l'exemple plus bas." + +#: extending/building.rst:127 +msgid "" +"In this example, :func:`~distutils.core.setup` is called with additional " +"meta-information, which is recommended when distribution packages have to be " +"built. For the extension itself, it specifies preprocessor defines, include " +"directories, library directories, and libraries. Depending on the compiler, " +"distutils passes this information in different ways to the compiler. For " +"example, on Unix, this may result in the compilation commands ::" +msgstr "" +"Dans cet exemple, la fonction :func:`~distutils.core.setup` est appelée avec " +"quelques autres méta-informations, ce qui est recommandé pour distribuer des " +"paquets. En ce qui concerne l'extension, sont définis quelques macros " +"préprocesseur, dossiers pour les en-têtes et bibliothèques. En fonction du " +"compilateur, *distutils* peut donner ces informations de manière différente. " +"Par exemple, sur Unix, ça peut ressembler aux commandes ::" + +#: extending/building.rst:139 +msgid "" +"These lines are for demonstration purposes only; distutils users should " +"trust that distutils gets the invocations right." +msgstr "" +"Ces lignes ne sont qu'à titre d'exemple, les utilisateurs de *distutils* " +"doivent avoir confiance en *distutils* qui fera les appels correctement." + +#: extending/building.rst:146 +msgid "Distributing your extension modules" +msgstr "Distribuer vos modules d'extension" + +#: extending/building.rst:148 +msgid "" +"When an extension has been successfully built, there are three ways to use " +"it." +msgstr "" +"Lorsqu'une extension a été construite avec succès, il existe trois moyens de " +"l'utiliser." + +#: extending/building.rst:150 +msgid "" +"End-users will typically want to install the module, they do so by running ::" +msgstr "" +"Typiquement, les utilisateurs vont vouloir installer le module, ils le font " +"en exécutant ::" + +#: extending/building.rst:154 +msgid "" +"Module maintainers should produce source packages; to do so, they run ::" +msgstr "" +"Les mainteneurs de modules voudront produire des paquets source, pour ce " +"faire ils exécuteront ::" + +#: extending/building.rst:158 +msgid "" +"In some cases, additional files need to be included in a source " +"distribution; this is done through a :file:`MANIFEST.in` file; see :ref:" +"`manifest` for details." +msgstr "" +"Dans certains cas, des fichiers supplémentaires doivent être inclus dans une " +"distribution source : c'est possible via un fichier :file:`MANIFEST.in`, c." +"f. :ref:`manifest`." + +#: extending/building.rst:161 +msgid "" +"If the source distribution has been built successfully, maintainers can also " +"create binary distributions. Depending on the platform, one of the following " +"commands can be used to do so. ::" +msgstr "" +"Si la distribution source a été construite avec succès, les mainteneurs " +"peuvent aussi créer une distribution binaire. En fonction de la plateforme, " +"une des commandes suivantes peut être utilisée. ::" diff --git a/extending/embedding.po b/extending/embedding.po new file mode 100644 index 0000000000..1256471a6c --- /dev/null +++ b/extending/embedding.po @@ -0,0 +1,462 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-22 22:57+0100\n" +"PO-Revision-Date: 2019-12-25 17:24+0100\n" +"Last-Translator: Antoine \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" + +#: extending/embedding.rst:8 +msgid "Embedding Python in Another Application" +msgstr "Intégrer Python dans une autre application" + +#: extending/embedding.rst:10 +msgid "" +"The previous chapters discussed how to extend Python, that is, how to extend " +"the functionality of Python by attaching a library of C functions to it. It " +"is also possible to do it the other way around: enrich your C/C++ " +"application by embedding Python in it. Embedding provides your application " +"with the ability to implement some of the functionality of your application " +"in Python rather than C or C++. This can be used for many purposes; one " +"example would be to allow users to tailor the application to their needs by " +"writing some scripts in Python. You can also use it yourself if some of the " +"functionality can be written in Python more easily." +msgstr "" +"Les chapitres précédents couvraient l'extension de Python, c'est-à-dire, " +"comment enrichir une fonctionnalité de Python en y attachant une " +"bibliothèque de fonctions C. C'est aussi possible dans l'autre sens : " +"enrichir vos applications C/C++ en y intégrant Python. Intégrer Python vous " +"permet d'implémenter certaines fonctionnalités de vos applications en Python " +"plutôt qu'en C ou C++. C'est utile dans de nombreux cas, un exemple serait " +"de permettre aux utilisateurs d'adapter une application à leurs besoins en y " +"écrivant des scripts Python. Vous pouvez aussi l'utiliser vous même si " +"certaines fonctionnalités peuvent être rédigées plus facilement en Python." + +#: extending/embedding.rst:20 +msgid "" +"Embedding Python is similar to extending it, but not quite. The difference " +"is that when you extend Python, the main program of the application is still " +"the Python interpreter, while if you embed Python, the main program may have " +"nothing to do with Python --- instead, some parts of the application " +"occasionally call the Python interpreter to run some Python code." +msgstr "" +"Intégrer et étendre Python sont des tâches presque identiques. La différence " +"est qu'en étendant Python, le programme principal reste l'interpréteur " +"Python, alors qu'en intégrant Python le programme principal peut ne rien à " +"voir avec Python. C'est simplement quelques parties du programme qui " +"appellent l'interpréteur Python pour exécuter un peu de code Python." + +#: extending/embedding.rst:26 +msgid "" +"So if you are embedding Python, you are providing your own main program. " +"One of the things this main program has to do is initialize the Python " +"interpreter. At the very least, you have to call the function :c:func:" +"`Py_Initialize`. There are optional calls to pass command line arguments to " +"Python. Then later you can call the interpreter from any part of the " +"application." +msgstr "" +"En intégrant Python, vous fournissez le programme principal. L'une de ses " +"tâches sera d'initialiser l'interpréteur. Au minimum vous devrez appeler :c:" +"func:`Py_Initialize`. Il est possible, avec quelques appels supplémentaires, " +"de passer des options à Python. Ensuite vous pourrez appeler l'interpréteur " +"depuis n'importe quelle partie de votre programme." + +#: extending/embedding.rst:32 +msgid "" +"There are several different ways to call the interpreter: you can pass a " +"string containing Python statements to :c:func:`PyRun_SimpleString`, or you " +"can pass a stdio file pointer and a file name (for identification in error " +"messages only) to :c:func:`PyRun_SimpleFile`. You can also call the lower-" +"level operations described in the previous chapters to construct and use " +"Python objects." +msgstr "" +"Il existe différents moyens d'appeler l'interpréteur : vous pouvez donner " +"une chaîne contenant des instructions Python à :c:func:`PyRun_SimpleString`, " +"ou vous pouvez donner un pointeur de fichier *stdio* et un nom de fichier " +"(juste pour nommer les messages d'erreur) à :c:func:`PyRunSimpleFile`. Vous " +"pouvez aussi appeler les API de bas niveau décrites dans les chapitres " +"précédents pour construire et utiliser des objets Python." + +#: extending/embedding.rst:42 +msgid ":ref:`c-api-index`" +msgstr ":ref:`c-api-index`" + +#: extending/embedding.rst:42 +msgid "" +"The details of Python's C interface are given in this manual. A great deal " +"of necessary information can be found here." +msgstr "" +"Les détails sur l'interface entre Python et le C sont donnés dans ce manuel. " +"Pléthore informations s'y trouvent." + +#: extending/embedding.rst:49 +msgid "Very High Level Embedding" +msgstr "Intégration de très haut niveau" + +#: extending/embedding.rst:51 +msgid "" +"The simplest form of embedding Python is the use of the very high level " +"interface. This interface is intended to execute a Python script without " +"needing to interact with the application directly. This can for example be " +"used to perform some operation on a file. ::" +msgstr "" +"La manière la plus simple d'intégrer Python est d'utiliser une interface de " +"très haut niveau. Cette interface a pour but d'exécuter un script Python " +"sans avoir à interagir avec directement. C'est utile, par exemple, pour " +"effectuer une opération sur un fichier. ::" + +#: extending/embedding.rst:78 +msgid "" +"The :c:func:`Py_SetProgramName` function should be called before :c:func:" +"`Py_Initialize` to inform the interpreter about paths to Python run-time " +"libraries. Next, the Python interpreter is initialized with :c:func:" +"`Py_Initialize`, followed by the execution of a hard-coded Python script " +"that prints the date and time. Afterwards, the :c:func:`Py_FinalizeEx` call " +"shuts the interpreter down, followed by the end of the program. In a real " +"program, you may want to get the Python script from another source, perhaps " +"a text-editor routine, a file, or a database. Getting the Python code from " +"a file can better be done by using the :c:func:`PyRun_SimpleFile` function, " +"which saves you the trouble of allocating memory space and loading the file " +"contents." +msgstr "" +"C'est la fonction :c:func:`Py_SetProgramName` qui devrait être appelée en " +"premier, avant :c:func:`Py_Initialize`, afin d'informer l'interpréteur des " +"chemins vers ses bibliothèques. Ensuite l'interpréteur est initialisé par :c:" +"func:`Py_Initialize`, suivi de l'exécution de Python codé en dur affichant " +"la date et l'heure, puis, l'appel à :c:func:`Py_FinalizeEx` éteint " +"l'interpréteur, engendrant ainsi la fin du programme. Dans un vrai " +"programme, vous pourriez vouloir lire le script Python depuis une autre " +"source, peut être depuis un éditeur de texte, un fichier, ou une base de " +"donnée. Récupérer du code Python depuis un fichier se fait via :c:func:" +"`PyRun_SimplFile`, qui vous économise le travail d'allouer de la mémoire et " +"de charger le contenu du fichier." + +#: extending/embedding.rst:93 +msgid "Beyond Very High Level Embedding: An overview" +msgstr "Au-delà de l'intégration de haut niveau : survol" + +#: extending/embedding.rst:95 +msgid "" +"The high level interface gives you the ability to execute arbitrary pieces " +"of Python code from your application, but exchanging data values is quite " +"cumbersome to say the least. If you want that, you should use lower level " +"calls. At the cost of having to write more C code, you can achieve almost " +"anything." +msgstr "" +"L'interface de haut niveau vous permet d'exécuter n'importe quel morceau de " +"code Python depuis votre application, mais échanger des données est quelque " +"peu alambiqué. Si c'est ce dont vous avez besoin, vous devez utiliser des " +"appels de niveau plus bas. Il vous en coûtera plus de lignes de C à écrire, " +"mais vous pourrez presque tout faire." + +#: extending/embedding.rst:100 +msgid "" +"It should be noted that extending Python and embedding Python is quite the " +"same activity, despite the different intent. Most topics discussed in the " +"previous chapters are still valid. To show this, consider what the extension " +"code from Python to C really does:" +msgstr "" +"Il est à souligner qu'étendre ou intégrer Python revient à la louche au " +"même, en dépit de la différence d'intention. La plupart des sujets parcourus " +"dans les chapitres précédents sont toujours valides. Pour le prouver, " +"regardez ce qu'un code d'extension de Python vers C fait réellement :" + +#: extending/embedding.rst:105 +msgid "Convert data values from Python to C," +msgstr "Convertir des valeurs de Python vers le C," + +#: extending/embedding.rst:107 +msgid "Perform a function call to a C routine using the converted values, and" +msgstr "Appeler une fonction C en utilisant les valeurs converties, et" + +#: extending/embedding.rst:109 +msgid "Convert the data values from the call from C to Python." +msgstr "Convertir les résultats de l'appel à la fonction C pour Python." + +#: extending/embedding.rst:111 +msgid "When embedding Python, the interface code does:" +msgstr "Lors de l'intégration de Python, le code de l'interface fait :" + +#: extending/embedding.rst:113 +msgid "Convert data values from C to Python," +msgstr "Convertir les valeurs depuis le C vers Python," + +#: extending/embedding.rst:115 +msgid "" +"Perform a function call to a Python interface routine using the converted " +"values, and" +msgstr "" +"Effectuer un appel de fonction de l'interface Python en utilisant les " +"valeurs converties, et" + +#: extending/embedding.rst:118 +msgid "Convert the data values from the call from Python to C." +msgstr "Convertir les valeurs de l'appel Python pour le C." + +#: extending/embedding.rst:120 +msgid "" +"As you can see, the data conversion steps are simply swapped to accommodate " +"the different direction of the cross-language transfer. The only difference " +"is the routine that you call between both data conversions. When extending, " +"you call a C routine, when embedding, you call a Python routine." +msgstr "" +"Tel que vous le voyez, les conversions sont simplement inversées pour " +"s'adapter aux différentes directions de transfert inter-langage. La seule " +"différence est la fonction que vous appelez entre les deux conversions de " +"données. Lors de l'extension, vous appelez une fonction C, lors de " +"l'intégration vous appelez une fonction Python." + +#: extending/embedding.rst:125 +msgid "" +"This chapter will not discuss how to convert data from Python to C and vice " +"versa. Also, proper use of references and dealing with errors is assumed to " +"be understood. Since these aspects do not differ from extending the " +"interpreter, you can refer to earlier chapters for the required information." +msgstr "" +"Ce chapitre ne couvrira pas la conversion des données de Python vers le C ni " +"l'inverse. Aussi, un usage correct des références, ainsi que savoir gérer " +"les erreurs sont considérés acquis. Ces aspects étant identiques à " +"l'extension de l'interpréteur, vous pouvez vous référer aux chapitres " +"précédents." + +#: extending/embedding.rst:134 +msgid "Pure Embedding" +msgstr "Intégration pure" + +#: extending/embedding.rst:136 +msgid "" +"The first program aims to execute a function in a Python script. Like in the " +"section about the very high level interface, the Python interpreter does not " +"directly interact with the application (but that will change in the next " +"section)." +msgstr "" +"L'objectif du premier programme est d'exécuter une fonction dans un script " +"Python. Comme dans la section à propos des interfaces de haut niveau, " +"l'interpréteur n'interagit pas directement avec l'application (mais le fera " +"dans la section suivante)." + +#: extending/embedding.rst:141 +msgid "The code to run a function defined in a Python script is:" +msgstr "Le code pour appeler une fonction définie dans un script Python est :" + +#: extending/embedding.rst:146 +msgid "" +"This code loads a Python script using ``argv[1]``, and calls the function " +"named in ``argv[2]``. Its integer arguments are the other values of the " +"``argv`` array. If you :ref:`compile and link ` this program " +"(let's call the finished executable :program:`call`), and use it to execute " +"a Python script, such as:" +msgstr "" +"Ce code charge un script Python en utilisant ``argv[1]``, et appelle une " +"fonction dont le nom est dans ``argv[2]``. Ses arguments entiers sont les " +"autres valeurs de ``argv``. Si vous :ref:`compilez et liez ` ce " +"programme (appelons l'exécutable :program:`call`), et l'appelez pour " +"exécuter un script Python, tel que :" + +#: extending/embedding.rst:161 +msgid "then the result should be:" +msgstr "alors, le résultat sera :" + +#: extending/embedding.rst:169 +msgid "" +"Although the program is quite large for its functionality, most of the code " +"is for data conversion between Python and C, and for error reporting. The " +"interesting part with respect to embedding Python starts with ::" +msgstr "" +"Bien que le programme soit plutôt gros pour ses fonctionnalités, la plupart " +"du code n'est que conversion de données entre Python et C, aussi que pour " +"rapporter les erreurs. La partie intéressante, qui concerne l'intégration de " +"Python débute par ::" + +#: extending/embedding.rst:178 +msgid "" +"After initializing the interpreter, the script is loaded using :c:func:" +"`PyImport_Import`. This routine needs a Python string as its argument, " +"which is constructed using the :c:func:`PyUnicode_FromString` data " +"conversion routine. ::" +msgstr "" +"Après avoir initialisé l'interpréteur, le script est chargé en utilisant :c:" +"func:`PyImport_Import`. Cette fonction prend une chaîne Python pour " +"argument, elle-même construite en utilisant la fonction de conversion :c:" +"func:`PyUnicode_FromString`. ::" + +#: extending/embedding.rst:191 +msgid "" +"Once the script is loaded, the name we're looking for is retrieved using :c:" +"func:`PyObject_GetAttrString`. If the name exists, and the object returned " +"is callable, you can safely assume that it is a function. The program then " +"proceeds by constructing a tuple of arguments as normal. The call to the " +"Python function is then made with::" +msgstr "" +"Une fois le script chargé, le nom recherché est obtenu en utilisant :c:func:" +"`PyObject_GetAttrString`. Si le nom existe, et que l'objet récupéré peut " +"être appelé, vous pouvez présumer sans risque que c'est une fonction. Le " +"programme continue, classiquement, par la construction de *n*-uplet " +"d'arguments. L'appel à la fonction Python est alors effectué avec ::" + +#: extending/embedding.rst:199 +msgid "" +"Upon return of the function, ``pValue`` is either ``NULL`` or it contains a " +"reference to the return value of the function. Be sure to release the " +"reference after examining the value." +msgstr "" +"Après l'exécution de la fonction, ``pValue`` est soit ``NULL``, soit une " +"référence sur la valeur donnée par la fonction. Assurez-vous de libérer la " +"référence après avoir utilisé la valeur." + +#: extending/embedding.rst:207 +msgid "Extending Embedded Python" +msgstr "Étendre un Python intégré" + +#: extending/embedding.rst:209 +msgid "" +"Until now, the embedded Python interpreter had no access to functionality " +"from the application itself. The Python API allows this by extending the " +"embedded interpreter. That is, the embedded interpreter gets extended with " +"routines provided by the application. While it sounds complex, it is not so " +"bad. Simply forget for a while that the application starts the Python " +"interpreter. Instead, consider the application to be a set of subroutines, " +"and write some glue code that gives Python access to those routines, just " +"like you would write a normal Python extension. For example::" +msgstr "" +"Jusqu'à présent, l'interpréteur Python intégré n'avait pas accès aux " +"fonctionnalités de l'application elle-même. L'API Python le permet en " +"étendant l'interpréteur intégré. Autrement dit, l'interpréteur intégré est " +"étendu avec des fonctions fournies par l'application. Bien que cela puisse " +"sembler complexe, ce n'est pas si dur. Il suffit d'oublier que l'application " +"démarre l'interpréteur Python, au lieu de cela, voyez l'application comme un " +"ensemble de fonctions, et rédigez un peu de code pour exposer ces fonctions " +"à Python, tout comme vous écririez une extension Python normale. Par " +"exemple ::" + +#: extending/embedding.rst:246 +msgid "" +"Insert the above code just above the :c:func:`main` function. Also, insert " +"the following two statements before the call to :c:func:`Py_Initialize`::" +msgstr "" +"Insérez le code ci-dessus juste avant la fonction :c:func:`main`. Ajoutez " +"aussi les deux instructions suivantes avant l'appel à :c:func:" +"`Py_Initialize` ::" + +#: extending/embedding.rst:252 +msgid "" +"These two lines initialize the ``numargs`` variable, and make the :func:`emb." +"numargs` function accessible to the embedded Python interpreter. With these " +"extensions, the Python script can do things like" +msgstr "" +"Ces deux lignes initialisent la variable ``numarg``, et rend la fonction :" +"func:`emb.numargs` accessible à l'interpréteur intégré. Avec ces ajouts, le " +"script Python petit maintenant faire des choses comme" + +#: extending/embedding.rst:261 +msgid "" +"In a real application, the methods will expose an API of the application to " +"Python." +msgstr "" +"Dans un cas réel, les méthodes exposeraient une API de l'application à " +"Python." + +#: extending/embedding.rst:271 +msgid "Embedding Python in C++" +msgstr "Intégrer Python dans du C++" + +#: extending/embedding.rst:273 +msgid "" +"It is also possible to embed Python in a C++ program; precisely how this is " +"done will depend on the details of the C++ system used; in general you will " +"need to write the main program in C++, and use the C++ compiler to compile " +"and link your program. There is no need to recompile Python itself using C+" +"+." +msgstr "" +"Il est aussi possible d'intégrer Python dans un programme en C++, la manière " +"exacte dont cela se fait dépend de détails du système C++ utilisé. En " +"général vous écrirez le programme principal en C++, utiliserez un " +"compilateur C++ pour compiler et lier votre programme. Il n'y a pas besoin " +"de recompiler Python en utilisant C++." + +#: extending/embedding.rst:282 +msgid "Compiling and Linking under Unix-like systems" +msgstr "Compiler et Lier en environnement Unix ou similaire" + +#: extending/embedding.rst:284 +msgid "" +"It is not necessarily trivial to find the right flags to pass to your " +"compiler (and linker) in order to embed the Python interpreter into your " +"application, particularly because Python needs to load library modules " +"implemented as C dynamic extensions (:file:`.so` files) linked against it." +msgstr "" +"Ce n'est pas évident de trouver les bonnes options à passer au compilateur " +"(et *linker*) pour intégrer l'interpréteur Python dans une application, " +"Python ayant besoin de charger des extensions sous forme de bibliothèques " +"dynamiques en C (des :file:`.so`) pour se lier avec." + +#: extending/embedding.rst:290 +msgid "" +"To find out the required compiler and linker flags, you can execute the :" +"file:`python{X.Y}-config` script which is generated as part of the " +"installation process (a :file:`python3-config` script may also be " +"available). This script has several options, of which the following will be " +"directly useful to you:" +msgstr "" +"Pour trouver les bonnes options de compilateur et *linker*, vous pouvez " +"exécuter le script :file:`python(X.Y)-config` généré durant l'installation " +"(un script :file:`python3-config` peut aussi être disponible). Ce script a " +"quelques options, celles-ci vous seront utiles :" + +#: extending/embedding.rst:296 +msgid "" +"``pythonX.Y-config --cflags`` will give you the recommended flags when " +"compiling:" +msgstr "" +"``pythonX.Y-config --cflags`` vous donnera les options recommandées pour " +"compiler :" + +#: extending/embedding.rst:304 +msgid "" +"``pythonX.Y-config --ldflags --embed`` will give you the recommended flags " +"when linking:" +msgstr "" +"``pythonX.Y-config --ldflags --embed`` vous donnera les drapeaux recommandés " +"lors de l'édition de lien :" + +#: extending/embedding.rst:313 +msgid "" +"To avoid confusion between several Python installations (and especially " +"between the system Python and your own compiled Python), it is recommended " +"that you use the absolute path to :file:`python{X.Y}-config`, as in the " +"above example." +msgstr "" +"Pour éviter la confusion entre différentes installations de Python, (et plus " +"spécialement entre celle de votre système et votre version compilée), il est " +"recommandé d'utiliser un chemin absolu vers :file:`python{X.Y}-config`, " +"comme dans l'exemple précédent." + +#: extending/embedding.rst:318 +msgid "" +"If this procedure doesn't work for you (it is not guaranteed to work for all " +"Unix-like platforms; however, we welcome :ref:`bug reports `) you will have to read your system's documentation about dynamic " +"linking and/or examine Python's :file:`Makefile` (use :func:`sysconfig." +"get_makefile_filename` to find its location) and compilation options. In " +"this case, the :mod:`sysconfig` module is a useful tool to programmatically " +"extract the configuration values that you will want to combine together. " +"For example:" +msgstr "" +"Si cette procédure ne fonctionne pas pour vous (il n'est pas garanti qu'elle " +"fonctionne pour toutes les plateformes Unix, mais nous traiteront volontiers " +"les :ref:`rapports de bugs `), vous devrez lire la " +"documentation de votre système sur la liaison dynamique (*dynamic linking*) " +"et / ou examiner le :file:`Makefile` de Python (utilisez :func:`sysconfig." +"get_makefile_filename` pour trouver son emplacement) et les options de " +"compilation. Dans ce cas, le module :mod:`sysconfig` est un outil utile pour " +"extraire automatiquement les valeurs de configuration que vous voudrez " +"combiner ensemble. Par exemple :" diff --git a/extending/extending.po b/extending/extending.po new file mode 100644 index 0000000000..2bada8abf1 --- /dev/null +++ b/extending/extending.po @@ -0,0 +1,1840 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-18 15:46+0200\n" +"PO-Revision-Date: 2021-12-11 12:50+0100\n" +"Last-Translator: Julien Palard \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" + +#: extending/extending.rst:8 +msgid "Extending Python with C or C++" +msgstr "Étendre Python en C ou C++" + +#: extending/extending.rst:10 +msgid "" +"It is quite easy to add new built-in modules to Python, if you know how to " +"program in C. Such :dfn:`extension modules` can do two things that can't be " +"done directly in Python: they can implement new built-in object types, and " +"they can call C library functions and system calls." +msgstr "" +"Il est relativement facile d'ajouter de nouveaux modules à Python, si vous " +"savez programmer en C. Ces :dfn:` extension modules` " +"permettent deux choses qui ne sont pas possibles directement en Python : " +"Elles peuvent définir de nouveaux types natifs, et peuvent appeler des " +"fonctions de bibliothèques C ou faire des appels systèmes." + +#: extending/extending.rst:15 +msgid "" +"To support extensions, the Python API (Application Programmers Interface) " +"defines a set of functions, macros and variables that provide access to most " +"aspects of the Python run-time system. The Python API is incorporated in a " +"C source file by including the header ``\"Python.h\"``." +msgstr "" +"Pour gérer les extensions, l'API Python (*Application Programmer Interface*) " +"définit un ensemble de fonctions, macros et variables qui donnent accès à la " +"plupart des aspects du système d'exécution de Python. L'API Python est " +"incorporée dans un fichier source C en incluant l'en-tête ``\"Python.h\"``." + +#: extending/extending.rst:20 +msgid "" +"The compilation of an extension module depends on its intended use as well " +"as on your system setup; details are given in later chapters." +msgstr "" +"La compilation d'un module d'extension dépend de l'usage prévu et de la " +"configuration du système, plus de détails peuvent être trouvés dans les " +"chapitres suivants." + +#: extending/extending.rst:25 +msgid "" +"The C extension interface is specific to CPython, and extension modules do " +"not work on other Python implementations. In many cases, it is possible to " +"avoid writing C extensions and preserve portability to other " +"implementations. For example, if your use case is calling C library " +"functions or system calls, you should consider using the :mod:`ctypes` " +"module or the `cffi `_ library rather than " +"writing custom C code. These modules let you write Python code to interface " +"with C code and are more portable between implementations of Python than " +"writing and compiling a C extension module." +msgstr "" +"L'interface d'extension C est spécifique à *CPython*, et les modules " +"d'extension ne fonctionne pas sur les autres implémentations de Python. Dans " +"de nombreux cas, il est possible d'éviter la rédaction des extensions en C " +"et ainsi préserver la portabilité vers d'autres implémentations. Par " +"exemple, si vous devez appeler une fonction de la bibliothèque C ou faire un " +"appel système, vous devriez envisager d'utiliser le module :mod:`ctypes` ou " +"d'utiliser la bibliothèque `*cffi* `_ plutôt " +"que d'écrire du code C sur mesure. Ces modules vous permettent d'écrire du " +"code Python s'interfaçant avec le code C et sont plus portables entre les " +"implémentations de Python que l'écriture et la compilation d'une d'extension " +"C." + +#: extending/extending.rst:40 +msgid "A Simple Example" +msgstr "Un exemple simple" + +#: extending/extending.rst:42 +msgid "" +"Let's create an extension module called ``spam`` (the favorite food of Monty " +"Python fans...) and let's say we want to create a Python interface to the C " +"library function :c:func:`system` [#]_. This function takes a null-" +"terminated character string as argument and returns an integer. We want " +"this function to be callable from Python as follows:" +msgstr "" +"Créons un module d'extension appelé ``spam`` (la nourriture préférée de fans " +"des *Monty Python* …) et disons que nous voulons créer une interface Python " +"à la fonction de la bibliothèque C :c:func:`system` [#]_. Cette fonction " +"prend une chaîne de caractères à terminaison nulle comme argument et renvoie " +"un entier. Nous voulons que cette fonction soit appelable à partir de Python " +"comme suit :" + +#: extending/extending.rst:53 +msgid "" +"Begin by creating a file :file:`spammodule.c`. (Historically, if a module " +"is called ``spam``, the C file containing its implementation is called :file:" +"`spammodule.c`; if the module name is very long, like ``spammify``, the " +"module name can be just :file:`spammify.c`.)" +msgstr "" +"Commencez par créer un fichier :file:`spammodule.c`. (Historiquement, si un " +"module se nomme ``spam``, le fichier C contenant son implémentation est " +"appelé :file:`spammodule.c`. Si le nom du module est très long, comme " +"``spammify``, le nom du module peut être juste :file:`spammify.c`.)" + +#: extending/extending.rst:58 +msgid "The first two lines of our file can be::" +msgstr "Les deux premières lignes de notre fichier peuvent être ::" + +#: extending/extending.rst:63 +msgid "" +"which pulls in the Python API (you can add a comment describing the purpose " +"of the module and a copyright notice if you like)." +msgstr "" +"qui récupère l'API Python (vous pouvez ajouter un commentaire décrivant le " +"but du module et un avis de droit d'auteur si vous le souhaitez)." + +#: extending/extending.rst:68 +msgid "" +"Since Python may define some pre-processor definitions which affect the " +"standard headers on some systems, you *must* include :file:`Python.h` before " +"any standard headers are included." +msgstr "" +"Python pouvant définir certaines définitions pré-processeur qui affectent " +"les têtes standard sur certains systèmes, vous *devez* inclure :file:`Python." +"h` avant les en-têtes standards." + +#: extending/extending.rst:72 +msgid "" +"It is recommended to always define ``PY_SSIZE_T_CLEAN`` before including " +"``Python.h``. See :ref:`parsetuple` for a description of this macro." +msgstr "" +"Il est recommandé de toujours définir ``PY_SSIZE_T_CLEAN`` avant d'inclure " +"``Python.h``. Lisez :ref:`parsetuple` pour avoir une description de cette " +"macro." + +#: extending/extending.rst:75 +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 ````. 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." + +#: extending/extending.rst:83 +msgid "" +"The next thing we add to our module file is the C function that will be " +"called when the Python expression ``spam.system(string)`` is evaluated " +"(we'll see shortly how it ends up being called)::" +msgstr "" +"La prochaine chose que nous ajoutons à notre fichier de module est la " +"fonction C qui sera appelée lorsque l'expression Python ``spam." +"system(chaîne)`` sera évaluée (nous verrons bientôt comment elle finit par " +"être appelée) ::" + +#: extending/extending.rst:99 +msgid "" +"There is a straightforward translation from the argument list in Python (for " +"example, the single expression ``\"ls -l\"``) to the arguments passed to the " +"C function. The C function always has two arguments, conventionally named " +"*self* and *args*." +msgstr "" +"Il y a une correspondance directe de la liste des arguments en Python (par " +"exemple, l'expression ``\"ls -l\"``) aux arguments passés à la fonction C. " +"La fonction C a toujours deux arguments, appelés par convention *self* et " +"*args*." + +#: extending/extending.rst:104 +msgid "" +"The *self* argument points to the module object for module-level functions; " +"for a method it would point to the object instance." +msgstr "" +"Pour les fonctions au niveau du module, l'argument *self* pointe sur l'objet " +"module, pour une méthode, il pointe sur l'instance de l'objet." + +#: extending/extending.rst:107 +msgid "" +"The *args* argument will be a pointer to a Python tuple object containing " +"the arguments. Each item of the tuple corresponds to an argument in the " +"call's argument list. The arguments are Python objects --- in order to do " +"anything with them in our C function we have to convert them to C values. " +"The function :c:func:`PyArg_ParseTuple` in the Python API checks the " +"argument types and converts them to C values. It uses a template string to " +"determine the required types of the arguments as well as the types of the C " +"variables into which to store the converted values. More about this later." +msgstr "" +"L'argument *args* sera un pointeur vers un *n*-uplet Python contenant les " +"arguments. Chaque élément du *n*-uplet correspond à un argument dans la " +"liste des arguments de l'appel. Les arguments sont des objets Python, afin " +"d'en faire quelque chose dans notre fonction C, nous devons les convertir en " +"valeurs C. La fonction :c:func:`PyArg_ParseTuple` de l'API Python vérifie " +"les types des arguments et les convertit en valeurs C. Elle utilise un " +"modèle sous forme de chaîne pour déterminer les types requis des arguments " +"ainsi que les types de variables C dans lequel stocker les valeurs " +"converties. Nous en verront plus, plus tard." + +#: extending/extending.rst:116 +msgid "" +":c:func:`PyArg_ParseTuple` returns true (nonzero) if all arguments have the " +"right type and its components have been stored in the variables whose " +"addresses are passed. It returns false (zero) if an invalid argument list " +"was passed. In the latter case it also raises an appropriate exception so " +"the calling function can return ``NULL`` immediately (as we saw in the " +"example)." +msgstr "" +":c:func:`PyArg_ParseTuple` renvoie vrai (pas zéro) si tous les arguments ont " +"le bon type et que ses composants ont été stockés dans les variables dont " +"les adresses ont été données en entrée. Il renvoie faux (zéro) si une liste " +"d'arguments invalide a été passée. Dans ce dernier cas, elle lève également " +"une exception appropriée de sorte que la fonction d'appel puisse renvoyer " +"``NULL`` immédiatement (comme nous l'avons vu dans l'exemple)." + +#: extending/extending.rst:126 +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 ``-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 " +"valeur d'erreur (typiquement un pointeur ``NULL``). Dans l'interpréteur, les " +"exceptions sont stockées dans une variable globale statique, si cette " +"variable est ``NULL``, aucune exception n'a eu lieu. Une seconde variable " +"globale stocke la \"valeur associée\" à l'exception (le deuxième argument " +"de :keyword:`raise`). Une troisième variable contient la trace de la pile " +"dans le cas où l'erreur soit survenue dans du code Python. Ces trois " +"variables sont les équivalents C du résultat de :meth:`sys.exc_info` en " +"Python (voir la section sur le module :mod:`sys` dans *The Python Library " +"Reference*). Il est important de les connaître pour comprendre comment les " +"erreurs sont propagées." + +#: extending/extending.rst:137 +msgid "" +"The Python API defines a number of functions to set various types of " +"exceptions." +msgstr "" +"L'API Python définit un certain nombre de fonctions pour créer différents " +"types d'exceptions." + +#: 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 " +"predefined object like :c:data:`PyExc_ZeroDivisionError`. The C string " +"indicates the cause of the error and is converted to a Python string object " +"and stored as the \"associated value\" of the exception." +msgstr "" +"La plus courante est :c:func:`PyErr_SetString`. Ses arguments sont un objet " +"exception et une chaîne C. L'objet exception est généralement un objet " +"prédéfini comme :c:data:`PyExc_ZeroDivisionError`. La chaîne C indique la " +"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: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 " +"global variable :c:data:`errno`. The most general function is :c:func:" +"`PyErr_SetObject`, which takes two object arguments, the exception and its " +"associated value. You don't need to :c:func:`Py_INCREF` the objects passed " +"to any of these functions." +msgstr "" +"Une autre fonction utile est :c:func:`PyErr_SetFromErrno`, qui construit une " +"exception à partir de la valeur de la variable globale :c:data:`errno`. La " +"fonction la plus générale est :c:func:`PyErr_SetObject`, qui prend deux " +"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: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 " +"``NULL`` if no exception has occurred. You normally don't need to call :c:" +"func:`PyErr_Occurred` to see whether an error occurred in a function call, " +"since you should be able to tell from the return value." +msgstr "" +"Vous pouvez tester de manière non destructive si une exception a été levée " +"avec :c:func:`PyErr_Occurred`. Cela renvoie l'objet exception actuel, ou " +"``NULL`` si aucune exception n'a eu lieu. Cependant, vous ne devriez pas " +"avoir besoin d'appeler :c:func:`PyErr_Occurred` pour voir si une erreur est " +"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:158 +#, fuzzy +msgid "" +"When a function *f* that calls another function *g* detects that the latter " +"fails, *f* should itself return an error value (usually ``NULL`` or " +"``-1``). It should *not* call one of the ``PyErr_*`` functions --- one has " +"already been called by *g*. *f*'s caller is then supposed to also return an " +"error indication to *its* caller, again *without* calling ``PyErr_*``, and " +"so on --- the most detailed cause of the error was already reported by the " +"function that first detected it. Once the error reaches the Python " +"interpreter's main loop, this aborts the currently executing Python code and " +"tries to find an exception handler specified by the Python programmer." +msgstr "" +"Lorsqu'une fonction *f* ayant appelé une autre fonction *g* détecte que " +"cette dernière a échoué, *f* devrait donner une valeur d'erreur à son tour " +"(habituellement ``NULL`` ou ``-1``). La fonction *f* ne devrait *pas* " +"appeler l'une des fonctions :c:func:`PyErr_\\*`, l'une d'entre elles ayant " +"déjà été appelée par *g*. La fonction appelant *f* est alors censée renvoyer " +"aussi un code d'erreur à celle qui l'a appelée, toujours sans utiliser :c:" +"func:`PyErr_\\*`, et ainsi de suite. La cause la plus détaillée de l'erreur " +"a déjà été signalée par la fonction l'ayant détecté en premier. Une fois " +"l'erreur remontée à la boucle principale de l'interpréteur Python, il " +"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:168 +#, fuzzy +msgid "" +"(There are situations where a module can actually give a more detailed error " +"message by calling another ``PyErr_*`` function, and in such cases it is " +"fine to do so. As a general rule, however, this is not necessary, and can " +"cause information about the cause of the error to be lost: most operations " +"can fail for a variety of reasons.)" +msgstr "" +"(Il y a des situations où un module peut effectivement donner un message " +"d'erreur plus détaillé en appelant une autre fonction :c:func:`PyErr_\\*`, " +"dans de tels cas, il est tout à fait possible de le faire. Cependant, ce " +"n'est généralement pas nécessaire, et peut amener à perdre des informations " +"sur la cause de l'erreur : la plupart des opérations peuvent échouer pour " +"tout un tas de raisons.)" + +#: 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 " +"only time C code should call :c:func:`PyErr_Clear` is if it doesn't want to " +"pass the error on to the interpreter but wants to handle it completely by " +"itself (possibly by trying something else, or pretending nothing went wrong)." +msgstr "" +"Pour ignorer une exception qui aurait été émise lors d'un appel de fonction " +"qui aurait échoué, l'exception doit être retirée explicitement en appelant :" +"c:func:`PyErr_Clear`. Le seul cas pour lequel du code C devrait appeler :c:" +"func:`PyErr_Clear` est lorsqu'il ne veut pas passer l'erreur à " +"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: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:" +"`PyErr_NoMemory` and return a failure indicator itself. All the object-" +"creating functions (for example, :c:func:`PyLong_FromLong`) already do this, " +"so this note is only relevant to those who call :c:func:`malloc` directly." +msgstr "" +"Chaque échec de :c:func:`malloc` doit être transformé en une exception, " +"l'appelant direct de :c:func:`malloc` (ou :c:func:`realloc`) doit appeler :c:" +"func:`PyErr_NoMemory` et prendre l'initiative de renvoyer une valeur " +"d'erreur. Toutes les fonctions construisant des objets (tels que :c:func:" +"`PyLong_FromLong`) le font déjà, donc cette note ne concerne que ceux qui " +"appellent :c:func:`malloc` directement." + +#: 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 " +"positive value or zero for success and ``-1`` for failure, like Unix system " +"calls." +msgstr "" +"Notez également que, à l'exception notable de :c:func:`PyArg_ParseTuple` et " +"compagnie, les fonctions qui renvoient leur statut sous forme d'entier " +"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: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 " +"return an error indicator!" +msgstr "" +"Enfin, lorsque vous renvoyez un code d'erreur, n'oubliez pas faire un brin " +"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: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 " +"as :c:data:`PyExc_ZeroDivisionError`, which you can use directly. Of course, " +"you should choose exceptions wisely --- don't use :c:data:`PyExc_TypeError` " +"to mean that a file couldn't be opened (that should probably be :c:data:" +"`PyExc_IOError`). If something's wrong with the argument list, the :c:func:" +"`PyArg_ParseTuple` function usually raises :c:data:`PyExc_TypeError`. If " +"you have an argument whose value must be in a particular range or must " +"satisfy other conditions, :c:data:`PyExc_ValueError` is appropriate." +msgstr "" +"Le choix de l'exception à lever vous incombe. Il existe des objets C " +"correspondant à chaque exception Python, tel que :c:data:" +"`PyExc_ZeroDivisionError`, que vous pouvez utiliser directement. Choisissez " +"judicieusement vos exceptions, typiquement n'utilisez pas :c:data:" +"`PyExc_TypeError` pour indiquer qu'un fichier n'a pas pu être ouvert (qui " +"devrait probablement être :c:data:`PyExc_IOError`). Si quelque chose ne va " +"pas avec la liste des arguments, la fonction :c:func:`PyArg_ParseTuple` lève " +"habituellement une exception :c:data:`PyExc_TypeError`. Mais si vous avez un " +"argument dont la valeur doit être dans un intervalle particulier ou qui doit " +"satisfaire d'autres conditions, :c:data:`PyExc_ValueError` sera plus " +"appropriée." + +#: 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::" +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:209 +msgid "" +"and initialize it in your module's initialization function (:c:func:" +"`PyInit_spam`) with an exception object::" +msgstr "" +"et initialisez-la dans la fonction d'initialisation de votre module (:c:func:" +"`PyInit_spam`) avec un objet exception ::" + +#: 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 " +"class being :exc:`Exception` (unless another class is passed in instead of " +"``NULL``), described in :ref:`bltin-exceptions`." +msgstr "" +"Notez que le nom de l'exception en Python est :exc:`spam.error`. La " +"fonction :c:func:`PyErr_NewException` peut créer une classe héritant de :exc:" +"`Exception` (à moins qu'une autre classe ne lui soit fournie à la place de " +"``NULL``), voir :ref:`bltin-exceptions`." + +#: 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 " +"could be removed from the module by external code, an owned reference to the " +"class is needed to ensure that it will not be discarded, causing :c:data:" +"`SpamError` to become a dangling pointer. Should it become a dangling " +"pointer, C code which raises the exception could cause a core dump or other " +"unintended side effects." +msgstr "" +"Notez également que la variable :c:data:`SpamError` contient une référence à " +"la nouvelle classe créée ; ceci est intentionnel ! Comme l'exception peut " +"être retirée du module par un code externe, une référence à la classe est " +"nécessaire pour assurer qu'il ne sera pas rejeté, causant :c:data:" +"`SpamError` et devenir un pointeur défaillant. Si cela se produirait, le C " +"code qui lève cette exception peut engendrer un *core dump* ou des effets " +"secondaires inattendus." + +#: extending/extending.rst:245 +msgid "" +"We discuss the use of ``PyMODINIT_FUNC`` as a function return type later in " +"this sample." +msgstr "" +"Nous traiterons de l'utilisation de ``PyMODINIT_FUNC`` comme un type de " +"renvoi de fonction plus tard dans cette section." + +#: 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::" +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:271 +msgid "Back to the Example" +msgstr "Retour vers l'exemple" + +#: extending/extending.rst:273 +msgid "" +"Going back to our example function, you should now be able to understand " +"this statement::" +msgstr "" +"En revenant vers notre fonction exemple, vous devriez maintenant être " +"capable de comprendre cette affirmation ::" + +#: 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 " +"exception set by :c:func:`PyArg_ParseTuple`. Otherwise the string value of " +"the argument has been copied to the local variable :c:data:`command`. This " +"is a pointer assignment and you are not supposed to modify the string to " +"which it points (so in Standard C, the variable :c:data:`command` should " +"properly be declared as ``const char *command``)." +msgstr "" +"Elle renvoie ``NULL`` (l'indicateur d'erreur pour les fonctions renvoyant " +"des pointeurs d'objet) si une erreur est détectée dans la liste des " +"arguments, se fiant à l'exception définie par :c:func:`PyArg_ParseTuple`. " +"Autrement, la valeur chaîne de l'argument a été copiée dans la variable " +"locale :c:data:`command`. Il s'agit d'une attribution de pointeur et vous " +"n'êtes pas supposés modifier la chaîne vers laquelle il pointe (donc en C " +"Standard, la variable :c:data:`command` doit être clairement déclarée comme " +"``const char *command``)." + +#: 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`::" +msgstr "" +"La prochaine instruction est un appel à la fonction Unix :c:func:`system`, " +"en lui passant la chaîne que nous venons d'obtenir à partir de :c:func:" +"`PyArg_ParseTuple` ::" + +#: 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`. ::" +msgstr "" +"Notre fonction :func:`spam.system` doit renvoyer la valeur de :c:data:`sts` " +"comme un objet Python. Cela est effectué par l'utilisation de la fonction :c:" +"func:`PyLong_FromLong`. ::" + +#: extending/extending.rst:297 +msgid "" +"In this case, it will return an integer object. (Yes, even integers are " +"objects on the heap in Python!)" +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:300 +#, fuzzy +msgid "" +"If you have a C function that returns no useful argument (a function " +"returning :c:expr:`void`), the corresponding Python function must return " +"``None``. You need this idiom to do so (which is implemented by the :c:" +"macro:`Py_RETURN_NONE` macro)::" +msgstr "" +"Si vous avez une fonction C qui ne renvoie aucun argument utile (une " +"fonction renvoyant :c:type:`void`), la fonction Python correspondante doit " +"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: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 " +"\"error\" in most contexts, as we have seen." +msgstr "" +":c:data:`Py_None` est la dénomination en C pour l'objet spécial Python " +"``None``. C'est un authentique objet Python plutôt qu'un pointeur ``NULL``, " +"qui signifie qu'une erreur est survenue, dans la plupart des situations, " +"comme nous l'avons vu." + +#: 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: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\"::" +msgstr "" +"Nous avons promis de montrer comment :c:func:`spam_system` est appelée " +"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: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 " +"normally always be ``METH_VARARGS`` or ``METH_VARARGS | METH_KEYWORDS``; a " +"value of ``0`` means that an obsolete variant of :c:func:`PyArg_ParseTuple` " +"is used." +msgstr "" +"Notez la troisième entrée (``METH_VARARGS``). C'est un indicateur du type de " +"convention à utiliser pour la fonction C, à destination de l'interpréteur. " +"Il doit valoir normalement ``METH_VARARGS`` ou ``METH_VARARGS | " +"METH_KEYWORDS`` ; la valeur ``0`` indique qu'une variante obsolète de :c:" +"func:`PyArg_ParseTuple` est utilisée." + +#: 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:" +"func:`PyArg_ParseTuple`; more information on this function is provided below." +msgstr "" +"Si seulement ``METH_VARARGS`` est utilisé, la fonction s'attend à ce que les " +"paramètres Python soient passés comme un *n*-uplet que l'on peut analyser " +"*via* :c:func:`PyArg_ParseTuple` ; des informations supplémentaires sont " +"fournies plus bas." + +#: 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 " +"should accept a third ``PyObject *`` parameter which will be a dictionary of " +"keywords. Use :c:func:`PyArg_ParseTupleAndKeywords` to parse the arguments " +"to such a function." +msgstr "" +"Le bit :const:`METH_KEYWORDS` peut être mis à un dans le troisième champ si " +"des arguments par mots-clés doivent être passés à la fonction. Dans ce cas, " +"la fonction C doit accepter un troisième paramètre ``PyObject *`` qui est un " +"dictionnaire des mots-clés. Utilisez :c:func:`PyArg_ParseTupleAndKeywords` " +"pour analyser les arguments d'une telle fonction." + +#: 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: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:" +"`PyInit_name`, where *name* is the name of the module, and should be the " +"only non-\\ ``static`` item defined in the module file::" +msgstr "" +"Cette structure, à son tour, doit être transmise à l'interpréteur dans la " +"fonction d'initialisation du module. La fonction d'initialisation doit être " +"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:366 +msgid "" +"Note that PyMODINIT_FUNC declares the function as ``PyObject *`` return " +"type, declares any special linkage declarations required by the platform, " +"and for C++ declares the function as ``extern \"C\"``." +msgstr "" +"Notez que *PyMODINIT_FUNC* déclare la fonction comme renvoyant un objet de " +"type ``PyObject *``, et déclare également toute déclaration de liaison " +"spéciale requise par la plate-forme, et pour le C++ déclare la fonction " +"comme un C ``extern``." + +#: 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 " +"Python.) It calls :c:func:`PyModule_Create`, which returns a module object, " +"and inserts built-in function objects into the newly created module based " +"upon the table (an array of :c:type:`PyMethodDef` structures) found in the " +"module definition. :c:func:`PyModule_Create` returns a pointer to the module " +"object that it creates. It may abort with a fatal error for certain errors, " +"or return ``NULL`` if the module could not be initialized satisfactorily. " +"The init function must return the module object to its caller, so that it " +"then gets inserted into ``sys.modules``." +msgstr "" +"Lorsque le programme Python importe le module :mod:`spam` pour la première " +"fois, :c:func:`PyInit_spam` est appelé. (Voir ci-dessous pour les " +"commentaires sur l'intégration en Python.) Il appelle :c:func:" +"`PyModule_Create`, qui renvoie un objet module, et insère des objets " +"fonction intégrés dans le module nouvellement créé en se basant sur la table " +"(un tableau de structures :c:type:`PyMethodDef`) trouvée dans la définition " +"du module. :c:func:`PyModule_Create` renvoie un pointeur vers l'objet module " +"qu'il crée. Il peut s'interrompre avec une erreur fatale pour certaines " +"erreurs, ou renvoyer ``NULL`` si le module n'a pas pu être initialisé de " +"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: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` " +"table. To add the module to the initialization table, use :c:func:" +"`PyImport_AppendInittab`, optionally followed by an import of the module::" +msgstr "" +"Lors de l'intégration de Python, la fonction :c:func:`PyInit_spam` n'est pas " +"appelée automatiquement, sauf s'il y a une entrée dans la table :c:data:" +"`PyImport_Inittab`. Pour ajouter le module à la table d'initialisation, " +"utilisez :c:func:`PyImport_AppendInittab`, suivi éventuellement d'une " +"importation du module ::" + +#: 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` " +"without an intervening :c:func:`exec`) can create problems for some " +"extension modules. Extension module authors should exercise caution when " +"initializing internal data structures." +msgstr "" +"Supprimer des entrées de ``sys.modules`` ou importer des modules compilés " +"dans plusieurs interpréteurs au sein d'un processus (ou suivre un :c:func:" +"`fork` sans l'intervention d'un :c:func:`exec`) peut créer des problèmes " +"pour certains modules d'extension. Les auteurs de modules d'extension " +"doivent faire preuve de prudence lorsqu'ils initialisent des structures de " +"données internes." + +#: 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 " +"template or simply read as an example." +msgstr "" +"Un exemple de module plus substantiel est inclus dans la distribution des " +"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:437 +msgid "" +"Unlike our ``spam`` example, ``xxmodule`` uses *multi-phase initialization* " +"(new in Python 3.5), where a PyModuleDef structure is returned from " +"``PyInit_spam``, and creation of the module is left to the import machinery. " +"For details on multi-phase initialization, see :PEP:`489`." +msgstr "" +"Contrairement à notre exemple de ``spam``, ``xxmodule`` utilise une " +"*initialisation multi-phase* (nouveau en Python 3.5), où une structure " +"*PyModuleDef* est renvoyée à partir de ``PyInit_spam``, et la création du " +"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:446 +msgid "Compilation and Linkage" +msgstr "Compilation et liaison" + +#: 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 " +"loading, the details may depend on the style of dynamic loading your system " +"uses; see the chapters about building extension modules (chapter :ref:" +"`building`) and additional information that pertains only to building on " +"Windows (chapter :ref:`building-on-windows`) for more information about this." +msgstr "" + +#: 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 " +"configuration setup and rebuild the interpreter. Luckily, this is very " +"simple on Unix: just place your file (:file:`spammodule.c` for example) in " +"the :file:`Modules/` directory of an unpacked source distribution, add a " +"line to the file :file:`Modules/Setup.local` describing your file:" +msgstr "" + +#: 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/` " +"subdirectory, but then you must first rebuild :file:`Makefile` there by " +"running ':program:`make` Makefile'. (This is necessary each time you change " +"the :file:`Setup` file.)" +msgstr "" + +#: 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:483 +msgid "Calling Python Functions from C" +msgstr "Appeler des fonctions Python en C" + +#: 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 " +"the case for libraries that support so-called \"callback\" functions. If a " +"C interface makes use of callbacks, the equivalent Python often needs to " +"provide a callback mechanism to the Python programmer; the implementation " +"will require calling the Python callback functions from a C callback. Other " +"uses are also imaginable." +msgstr "" + +#: 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 " +"call the Python parser with a particular string as input --- if you're " +"interested, have a look at the implementation of the :option:`-c` command " +"line option in :file:`Modules/main.c` from the Python source code.)" +msgstr "" + +#: 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 " +"other interface) to do this. When this function is called, save a pointer " +"to the Python function object (be careful to :c:func:`Py_INCREF` it!) in a " +"global variable --- or wherever you see fit. For example, the following " +"function might be part of a module definition::" +msgstr "" + +#: 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 :" +"c:func:`PyArg_ParseTuple` function and its arguments are documented in " +"section :ref:`parsetuple`." +msgstr "" +"Cette fonction doit être déclarée en utilisant le drapeau :const:" +"`METH_VARARGS` ; ceci est décrit dans la section :ref:`methodtable`. La " +"fonction :c:func:`PyArg_ParseTuple` et ses arguments sont documentés dans la " +"section :ref:`parsetuple`." + +#: 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`` " +"pointers (but note that *temp* will not be ``NULL`` in this context). More " +"info on them in section :ref:`refcounts`." +msgstr "" +"Les macros :c:func:`Py_XINCREF` et :c:func:`Py_XDECREF` incrémentent/" +"décrémentent le compteur des références d'un objet et sont sûres quant à la " +"présence de pointeurs ``NULL`` (mais notez que *temp* ne sera pas ``NULL`` " +"dans ce contexte). Plus d'informations à ce sujet dans la section :ref:" +"`refcounts`." + +#: 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 " +"arbitrary Python objects: the Python function, and the argument list. The " +"argument list must always be a tuple object, whose length is the number of " +"arguments. To call the Python function with no arguments, pass in ``NULL``, " +"or an empty tuple; to call it with one argument, pass a singleton tuple. :c:" +"func:`Py_BuildValue` returns a tuple when its format string consists of zero " +"or more format codes between parentheses. For example::" +msgstr "" + +#: 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 " +"\"reference-count-neutral\" with respect to its arguments. In the example a " +"new tuple was created to serve as the argument list, which is :c:func:" +"`Py_DECREF`\\ -ed immediately after the :c:func:`PyObject_CallObject` call." +msgstr "" + +#: 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 " +"incremented. So, unless you want to save it in a global variable, you " +"should somehow :c:func:`Py_DECREF` the result, even (especially!) if you are " +"not interested in its value." +msgstr "" + +#: 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 " +"exception. If the C code that called :c:func:`PyObject_CallObject` is called " +"from Python, it should now return an error indication to its Python caller, " +"so the interpreter can print a stack trace, or the calling Python code can " +"handle the exception. If this is not possible or desirable, the exception " +"should be cleared by calling :c:func:`PyErr_Clear`. For example::" +msgstr "" +"Mais avant de le faire, il est important de vérifier que la valeur renvoyée " +"n'est pas ``NULL``. Si c'est le cas, la fonction Python s'est terminée par " +"la levée d'une exception. Si le code C qui a appelé :c:func:" +"`PyObject_CallObject` est appelé depuis Python, il devrait maintenant " +"renvoyer une indication d'erreur à son appelant Python, afin que " +"l'interpréteur puisse afficher la pile d'appels, ou que le code Python " +"appelant puisse gérer l'exception. Si cela n'est pas possible ou " +"souhaitable, l'exception doit être effacée en appelant :c:func:" +"`PyErr_Clear`. Par exemple ::" + +#: 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 " +"some cases the argument list is also provided by the Python program, through " +"the same interface that specified the callback function. It can then be " +"saved and used in the same manner as the function object. In other cases, " +"you may have to construct a new tuple to pass as the argument list. The " +"simplest way to do this is to call :c:func:`Py_BuildValue`. For example, if " +"you want to pass an integral event code, you might use the following code::" +msgstr "" +"Selon l'interface souhaitée pour la fonction de rappel Python, vous devrez " +"peut-être aussi fournir une liste d'arguments à :c:func:" +"`PyObject_CallObject`. Dans certains cas, la liste d'arguments est également " +"fournie par le programme Python, par l'intermédiaire de la même interface " +"qui a spécifié la fonction de rappel. Elle peut alors être sauvegardée et " +"utilisée de la même manière que l'objet fonction. Dans d'autres cas, vous " +"pouvez avoir à construire un nouveau n-uplet à passer comme liste " +"d'arguments. La façon la plus simple de faire cela est d'appeler :c:func:" +"`Py_BuildValue`. Par exemple, si vous voulez passer un code d'événement " +"intégral, vous pouvez utiliser le code suivant ::" + +#: 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 " +"complete: :c:func:`Py_BuildValue` may run out of memory, and this should be " +"checked." +msgstr "" + +#: 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 " +"above example, we use :c:func:`Py_BuildValue` to construct the dictionary. ::" +msgstr "" +"Vous pouvez également appeler une fonction avec des arguments nommés en " +"utilisant :c:func:`PyObject_Call`, qui accepte les arguments et les " +"arguments nommés. Comme dans l'exemple ci-dessus, nous utilisons :c:func:" +"`Py_BuildValue` pour construire le dictionnaire. ::" + +#: extending/extending.rst:628 +msgid "Extracting Parameters in Extension Functions" +msgstr "Extraire des paramètres dans des fonctions d'extension" + +#: 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: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, " +"whose syntax is explained in :ref:`arg-parsing` in the Python/C API " +"Reference Manual. The remaining arguments must be addresses of variables " +"whose type is determined by the format string." +msgstr "" + +#: 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 " +"variables passed to the call: if you make mistakes there, your code will " +"probably crash or at least overwrite random bits in memory. So be careful!" +msgstr "" + +#: 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!" +msgstr "" +"Notez que n'importe quelles références sur un objet Python qui sont données " +"à l'appelant sont des références *empruntées* ; ne décrémentez pas leur " +"compteur de références !" + +#: extending/extending.rst:650 +msgid "Some example calls::" +msgstr "Quelques exemples d'appels ::" + +#: extending/extending.rst:720 +msgid "Keyword Parameters for Extension Functions" +msgstr "Paramètres nommés pour des fonctions d'extension" + +#: 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: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 " +"keywords received as the third parameter from the Python runtime. The " +"*kwlist* parameter is a ``NULL``-terminated list of strings which identify " +"the parameters; the names are matched with the type information from " +"*format* from left to right. On success, :c:func:" +"`PyArg_ParseTupleAndKeywords` returns true, otherwise it returns false and " +"raises an appropriate exception." +msgstr "" +"Les paramètres *arg* et *format* sont identiques à ceux de la fonction :c:" +"func:`PyArg_ParseTuple`. Le paramètre *kwdict* est le dictionnaire de mots-" +"clés reçu comme troisième paramètre du *runtime* Python. Le paramètre " +"*kwlist* est une liste de chaînes de caractères terminée par ``NULL`` qui " +"identifie les paramètres ; les noms sont mis en correspondance, de gauche à " +"droite, avec les informations de type de *format*. En cas de succès du " +"processus, :c:func:`PyArg_ParseTupleAndKeywords` renvoie vrai, sinon il " +"renvoie faux et lève une exception appropriée." + +#: 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:" +"`TypeError` to be raised." +msgstr "" +"Les n-uplets imbriqués ne peuvent pas être traités lorsqu'on utilise des " +"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:745 +msgid "" +"Here is an example module which uses keywords, based on an example by Geoff " +"Philbrick (philbrick@hks.com)::" +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:800 +msgid "Building Arbitrary Values" +msgstr "Créer des valeurs arbitraires" + +#: extending/extending.rst:802 +msgid "" +"This function is the counterpart to :c:func:`PyArg_ParseTuple`. It is " +"declared as follows::" +msgstr "" +"Cette fonction est le complément de :c:func:`PyArg_ParseTuple`. Elle est " +"déclarée comme suit ::" + +#: 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, " +"not output) must not be pointers, just values. It returns a new Python " +"object, suitable for returning from a C function called from Python." +msgstr "" +"Il reconnaît un ensemble d'unités de format similaires à celles reconnues " +"par :c:func:`PyArg_ParseTuple`, mais les arguments (qui sont les données en " +"entrée de fonction, et non de la sortie) ne doivent pas être des pointeurs, " +"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:812 +#, fuzzy +msgid "" +"One difference with :c:func:`PyArg_ParseTuple`: while the latter requires " +"its first argument to be a tuple (since Python argument lists are always " +"represented as tuples internally), :c:func:`Py_BuildValue` does not always " +"build a tuple. It builds a tuple only if its format string contains two or " +"more format units. If the format string is empty, it returns ``None``; if it " +"contains exactly one format unit, it returns whatever object is described by " +"that format unit. To force it to return a tuple of size 0 or one, " +"parenthesize the format string." +msgstr "" +"Une différence par rapport à :c:func:`PyArg_ParseTuple` : alors que ce " +"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: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:846 +msgid "Reference Counts" +msgstr "Compteurs de références" + +#: 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 " +"the functions :c:func:`malloc` and :c:func:`free`. In C++, the operators " +"``new`` and ``delete`` are used with essentially the same meaning and we'll " +"restrict the following discussion to the C case." +msgstr "" +"Dans les langages comme le C ou le C++, le développeur est responsable de " +"l'allocation dynamique et de la dés-allocation de la mémoire sur le tas. En " +"C, cela se fait à l'aide des fonctions :c:func:`malloc` et :c:func:`free`. " +"En C++, les opérateurs ``new`` et ``delete`` sont utilisés avec " +"essentiellement la même signification et nous limiterons la discussion " +"suivante au cas du C." + +#: 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:" +"`free`. It is important to call :c:func:`free` at the right time. If a " +"block's address is forgotten but :c:func:`free` is not called for it, the " +"memory it occupies cannot be reused until the program terminates. This is " +"called a :dfn:`memory leak`. On the other hand, if a program calls :c:func:" +"`free` for a block and then continues to use the block, it creates a " +"conflict with re-use of the block through another :c:func:`malloc` call. " +"This is called :dfn:`using freed memory`. It has the same bad consequences " +"as referencing uninitialized data --- core dumps, wrong results, mysterious " +"crashes." +msgstr "" + +#: 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, " +"and then free the block again. Now a change in the requirements for the " +"function may add a test to the calculation that detects an error condition " +"and can return prematurely from the function. It's easy to forget to free " +"the allocated memory block when taking this premature exit, especially when " +"it is added later to the code. Such leaks, once introduced, often go " +"undetected for a long time: the error exit is taken only in a small fraction " +"of all calls, and most modern machines have plenty of virtual memory, so the " +"leak only becomes apparent in a long-running process that uses the leaking " +"function frequently. Therefore, it's important to prevent leaks from " +"happening by having a coding convention or strategy that minimizes this kind " +"of errors." +msgstr "" + +#: 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. " +"The chosen method is called :dfn:`reference counting`. The principle is " +"simple: every object contains a counter, which is incremented when a " +"reference to the object is stored somewhere, and which is decremented when a " +"reference to it is deleted. When the counter reaches zero, the last " +"reference to the object has been deleted and the object is freed." +msgstr "" +"Comme Python fait un usage intensif de :c:func:`malloc` et de :c:func:" +"`free`, il a besoin d'une stratégie pour éviter les fuites de mémoire ainsi " +"que l'utilisation de la mémoire libérée. La méthode choisie est appelée :dfn:" +"`reference counting`. Le principe est simple : chaque objet contient un " +"compteur, qui est incrémenté lorsqu'une référence à l'objet est stockée " +"quelque part, et qui est décrémenté lorsqu'une référence à celui-ci est " +"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:886 +msgid "" +"An alternative strategy is called :dfn:`automatic garbage collection`. " +"(Sometimes, reference counting is also referred to as a garbage collection " +"strategy, hence my use of \"automatic\" to distinguish the two.) The big " +"advantage of automatic garbage collection is that the user doesn't need to " +"call :c:func:`free` explicitly. (Another claimed advantage is an " +"improvement in speed or memory usage --- this is no hard fact however.) The " +"disadvantage is that for C, there is no truly portable automatic garbage " +"collector, while reference counting can be implemented portably (as long as " +"the functions :c:func:`malloc` and :c:func:`free` are available --- which " +"the C Standard guarantees). Maybe some day a sufficiently portable automatic " +"garbage collector will be available for C. Until then, we'll have to live " +"with reference counts." +msgstr "" +"Une stratégie alternative est appelée :dfn:`automatic garbage collection` " +"(ramasse-miettes). Parfois, le comptage des références est également appelé " +"stratégie de ramasse-miettes, d'où l'utilisation du terme \"automatique\" " +"pour distinguer les deux. Le grand avantage du ramasse-miettes est que " +"l'utilisateur n'a pas besoin d'appeler :c:func:`free` explicitement. (Un " +"autre avantage important est l'amélioration de la vitesse ou de " +"l'utilisation de la mémoire, ce n'est cependant pas un fait avéré). " +"L'inconvénient est que pour C, il n'y a pas de ramasse-miettes portable " +"proprement-dit, alors que le comptage des références peut être implémenté de " +"façon portable (tant que les fonctions :c:func:`malloc` et :c:func:`free` " +"soient disponibles, ce que la norme C garantit). Peut-être qu'un jour un " +"ramasse-miettes suffisamment portable sera disponible pour C. D'ici là, nous " +"devrons utiliser les compteurs des références." + +#: 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 " +"applications to not worry about creating direct or indirect circular " +"references; these are the weakness of garbage collection implemented using " +"only reference counting. Reference cycles consist of objects which contain " +"(possibly indirect) references to themselves, so that each object in the " +"cycle has a reference count which is non-zero. Typical reference counting " +"implementations are not able to reclaim the memory belonging to any objects " +"in a reference cycle, or referenced from the objects in the cycle, even " +"though there are no further references to the cycle itself." +msgstr "" +"Bien que Python utilise l'implémentation traditionnelle de comptage de " +"référence, il contient également un détecteur de cycles qui fonctionne pour " +"détecter les cycles de référence. Cela permet aux applications d'empêcher la " +"création de références circulaires directes ou indirectes ; ceci sont les " +"faiblesses du ramasse-miettes mis en œuvre en utilisant uniquement le " +"comptage de référence. Les cycles de référence sont constitués d'objets qui " +"contiennent des références (éventuellement indirectes) à eux-mêmes, de sorte " +"que chaque objet du cycle a un comptage de référence qui n'est pas nul. Les " +"implémentations typiques de comptage de référence ne sont pas capables de " +"récupérer la mémoire appartenant à des objets dans un cycle de référence, ou " +"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: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." +"collect` function), as well as configuration interfaces and the ability to " +"disable the detector at runtime." +msgstr "" + +#: extending/extending.rst:918 +msgid "Reference Counting in Python" +msgstr "Comptage de références en Python" + +#: extending/extending.rst:920 +msgid "" +"There are two macros, ``Py_INCREF(x)`` and ``Py_DECREF(x)``, which handle " +"the incrementing and decrementing of the reference count. :c:func:" +"`Py_DECREF` also frees the object when the count reaches zero. For " +"flexibility, it doesn't call :c:func:`free` directly --- rather, it makes a " +"call through a function pointer in the object's :dfn:`type object`. For " +"this purpose (and others), every object also contains a pointer to its type " +"object." +msgstr "" +"Il existe deux macros, ``Py_INCREF(x)`` et ``Py_DECREF(x)``, qui gèrent " +"l'incrémentation et la décrémentation du comptage de référence. :c:func:" +"`Py_DECREF` libère également l'objet lorsque le comptage atteint zéro. Pour " +"plus de flexibilité, il n'appelle pas :c:func:`free` directement — plutôt, " +"il fait un appel à travers un pointeur de fonction dans l'objet :dfn:`type " +"objet` de l'objet. À cette fin (et pour d'autres), chaque objet contient " +"également un pointeur vers son objet type." + +#: extending/extending.rst:927 +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 " +"object; however, you can :dfn:`own a reference` to an object. An object's " +"reference count is now defined as the number of owned references to it. The " +"owner of a reference is responsible for calling :c:func:`Py_DECREF` when the " +"reference is no longer needed. Ownership of a reference can be " +"transferred. There are three ways to dispose of an owned reference: pass it " +"on, store it, or call :c:func:`Py_DECREF`. Forgetting to dispose of an owned " +"reference creates a memory leak." +msgstr "" +"La grande question demeure maintenant : quand utiliser ``Py_INCREF(x)`` et " +"``Py_DECREF(x)`` ? Commençons par définir quelques termes. Personne ne " +"possède un objet, mais vous pouvez en :dfn:`avoir une référence`. Le " +"comptage de références d'un objet est maintenant défini comme étant le " +"nombre de références à cet objet. Le propriétaire d'une référence est " +"responsable d'appeler :c:func:`Py_DECREF` lorsque la référence n'est plus " +"nécessaire. La propriété d'une référence peut être transférée. Il y a trois " +"façons de disposer d'une référence : la transmettre, la stocker, ou appeler :" +"c:func:`Py_DECREF`. Oublier de se débarrasser d'une référence crée une fuite " +"de mémoire." + +#: extending/extending.rst:936 +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 " +"must not hold on to the object longer than the owner from which it was " +"borrowed. Using a borrowed reference after the owner has disposed of it " +"risks using freed memory and should be avoided completely [#]_." +msgstr "" + +#: extending/extending.rst:942 +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 " +"code --- in other words, with a borrowed reference you don't run the risk of " +"leaking when a premature exit is taken. The disadvantage of borrowing over " +"owning is that there are some subtle situations where in seemingly correct " +"code a borrowed reference can be used after the owner from which it was " +"borrowed has in fact disposed of it." +msgstr "" +"L'avantage d'emprunter, plutôt qu'être propriétaire d'une référence est que " +"vous n'avez pas à vous soucier de disposer de la référence sur tous les " +"chemins possibles dans le code — en d'autres termes, avec une référence " +"empruntée, vous ne courez pas le risque de fuites lors d'une sortie " +"prématurée. L'inconvénient de l'emprunt par rapport à la possession est " +"qu'il existe certaines situations subtiles où, dans un code apparemment " +"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:950 +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 " +"the reference was borrowed --- it creates a new owned reference, and gives " +"full owner responsibilities (the new owner must dispose of the reference " +"properly, as well as the previous owner)." +msgstr "" + +#: extending/extending.rst:960 +msgid "Ownership Rules" +msgstr "Règles concernant la propriété de références" + +#: extending/extending.rst:962 +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 " +"with the reference or not." +msgstr "" +"Chaque fois qu'une référence d'objet est passée à l'intérieur ou à " +"l'extérieur d'une fonction, elle fait partie de la spécification de " +"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:966 +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 " +"a new object, such as :c:func:`PyLong_FromLong` and :c:func:`Py_BuildValue`, " +"pass ownership to the receiver. Even if the object is not actually new, you " +"still receive ownership of a new reference to that object. For instance, :c:" +"func:`PyLong_FromLong` maintains a cache of popular values and can return a " +"reference to a cached item." +msgstr "" + +#: extending/extending.rst:974 +msgid "" +"Many functions that extract objects from other objects also transfer " +"ownership with the reference, for instance :c:func:" +"`PyObject_GetAttrString`. The picture is less clear, here, however, since a " +"few common routines are exceptions: :c:func:`PyTuple_GetItem`, :c:func:" +"`PyList_GetItem`, :c:func:`PyDict_GetItem`, and :c:func:" +"`PyDict_GetItemString` all return references that you borrow from the tuple, " +"list or dictionary." +msgstr "" + +#: extending/extending.rst:981 +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:985 +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 " +"use :c:func:`Py_INCREF` to become an independent owner. There are exactly " +"two important exceptions to this rule: :c:func:`PyTuple_SetItem` and :c:func:" +"`PyList_SetItem`. These functions take over ownership of the item passed to " +"them --- even if they fail! (Note that :c:func:`PyDict_SetItem` and friends " +"don't take over ownership --- they are \"normal.\")" +msgstr "" + +#: extending/extending.rst:993 +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 " +"the borrowed reference's lifetime is guaranteed until the function returns. " +"Only when such a borrowed reference must be stored or passed on, it must be " +"turned into an owned reference by calling :c:func:`Py_INCREF`." +msgstr "" + +#: extending/extending.rst:999 +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:1007 +msgid "Thin Ice" +msgstr "Terrain dangereux" + +#: extending/extending.rst:1009 +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 " +"invocations of the interpreter, which can cause the owner of a reference to " +"dispose of it." +msgstr "" +"Il existe quelques situations où l'utilisation apparemment inoffensive d'une " +"référence empruntée peut entraîner des problèmes. Tous ces problèmes sont en " +"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:1013 +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 " +"instance::" +msgstr "" +"Le premier cas, et le plus important à connaître, est celui de l'application " +"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:1025 +msgid "" +"This function first borrows a reference to ``list[0]``, then replaces " +"``list[1]`` with the value ``0``, and finally prints the borrowed reference. " +"Looks harmless, right? But it's not!" +msgstr "" +"Cette fonction emprunte d'abord une référence à ``list[0]``, puis remplace " +"``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:1029 +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 " +"of the original item 1. Now let's suppose the original item 1 was an " +"instance of a user-defined class, and let's further suppose that the class " +"defined a :meth:`__del__` method. If this class instance has a reference " +"count of 1, disposing of it will call its :meth:`__del__` method." +msgstr "" +"Suivons le flux de contrôle dans :c:func:`PyList_SetItem`. La liste possède " +"des références à tous ses éléments, donc quand l'élément 1 est remplacé, " +"elle doit se débarrasser de l'élément 1 original. Supposons maintenant que " +"l'élément 1 original était une instance d'une classe définie par " +"l'utilisateur, et supposons en outre que la classe définisse une méthode :" +"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:1036 +msgid "" +"Since it is written in Python, the :meth:`__del__` method can execute " +"arbitrary Python code. Could it perhaps do something to invalidate the " +"reference to ``item`` in :c:func:`bug`? You bet! Assuming that the list " +"passed into :c:func:`bug` is accessible to the :meth:`__del__` method, it " +"could execute a statement to the effect of ``del list[0]``, and assuming " +"this was the last reference to that object, it would free the memory " +"associated with it, thereby invalidating ``item``." +msgstr "" +"Comme elle est écrite en Python, la méthode :meth:`__del__` peut exécuter du " +"code Python arbitraire. Pourrait-elle faire quelque chose pour invalider la " +"référence à ``item`` dans :c:func:`bug` ? Bien sûr ! En supposant que la " +"liste passée dans :c:func:`bug` est accessible à la méthode :meth:`__del__`, " +"elle pourrait exécuter une instruction à l'effet de ``del list[0]``, et en " +"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:1044 +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:1058 +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:1062 +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 " +"each other's way, because there is a global lock protecting Python's entire " +"object space. However, it is possible to temporarily release this lock " +"using the macro :c:macro:`Py_BEGIN_ALLOW_THREADS`, and to re-acquire it " +"using :c:macro:`Py_END_ALLOW_THREADS`. This is common around blocking I/O " +"calls, to let other threads use the processor while waiting for the I/O to " +"complete. Obviously, the following function has the same problem as the " +"previous one::" +msgstr "" +"Le deuxième cas de problèmes liés à une référence empruntée est une variante " +"impliquant des fils de discussion. Normalement, plusieurs threads dans " +"l'interpréteur Python ne peuvent pas se gêner mutuellement, car il existe un " +"verrou global protégeant tout l'espace objet de Python. Cependant, il est " +"possible de libérer temporairement ce verrou en utilisant la macro :c:macro:" +"`Py_BEGIN_ALLOW_THREADS`, et de le ré-acquérir en utilisant :c:macro:" +"`Py_END_ALLOW_THREADS`. Ceci est un procédé courant pour bloquer les appels " +"d'entrées/sorties, afin de permettre aux autres threads d'utiliser le " +"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:1085 +msgid "NULL Pointers" +msgstr "Pointeurs ``NULL``" + +#: extending/extending.rst:1087 +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 " +"dumps) if you do so. Functions that return object references generally " +"return ``NULL`` only to indicate that an exception occurred. The reason for " +"not testing for ``NULL`` arguments is that functions often pass the objects " +"they receive on to other function --- if each function were to test for " +"``NULL``, there would be a lot of redundant tests and the code would run " +"more slowly." +msgstr "" +"En général, les fonctions qui prennent des références d'objets comme " +"arguments ne sont pas conçues pour recevoir des pointeurs ``NULL``, et si " +"vous en donnez comme arguments, elles causeront une erreur de segmentation " +"(ou provoqueront des *core dump* ultérieurs). Les fonctions qui renvoient " +"des références d'objets renvoient généralement ``NULL`` uniquement pour " +"indiquer qu'une exception s'est produite. La raison pour laquelle les " +"arguments ``NULL`` ne sont pas testés est que les fonctions passent souvent " +"les objets qu'elles reçoivent à d'autres fonctions, si chaque fonction " +"devait tester pour ``NULL``, il y aurait beaucoup de tests redondants et le " +"code s'exécuterait plus lentement." + +#: extending/extending.rst:1095 +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 " +"a function that may raise an exception." +msgstr "" +"Il est préférable de tester la présence de ``NULL`` uniquement au début : " +"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:1099 +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:" +"func:`Py_XDECREF` do." +msgstr "" +"Les macros :c:func:`Py_INCREF` et :c:func:`Py_DECREF` ne vérifient pas les " +"pointeurs ``NULL``. Cependant, leurs variantes :c:func:`Py_XINCREF` et :c:" +"func:`Py_XDECREF` le font." + +#: extending/extending.rst:1103 +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 " +"several of these in a row to test an object against various different " +"expected types, and this would generate redundant tests. There are no " +"variants with ``NULL`` checking." +msgstr "" + +#: extending/extending.rst:1109 +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 " +"guarantees that it is always a tuple [#]_." +msgstr "" +"Le mécanisme d'appel de fonctions C garantit que la liste d'arguments passée " +"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:1113 +msgid "" +"It is a severe error to ever let a ``NULL`` pointer \"escape\" to the Python " +"user." +msgstr "" +"C'est une grave erreur de laisser un pointeur ``NULL`` \"échapper\" à " +"l'utilisateur Python." + +#: extending/extending.rst:1124 +msgid "Writing Extensions in C++" +msgstr "Écrire des extensions en C++" + +#: extending/extending.rst:1126 +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 " +"compiler, global or static objects with constructors cannot be used. This " +"is not a problem if the main program is linked by the C++ compiler. " +"Functions that will be called by the Python interpreter (in particular, " +"module initialization functions) have to be declared using ``extern \"C\"``. " +"It is unnecessary to enclose the Python header files in ``extern \"C\" {...}" +"`` --- they use this form already if the symbol ``__cplusplus`` is defined " +"(all recent C++ compilers define this symbol)." +msgstr "" +"C'est possible d'écrire des modules d'extension en C++, mais sous certaines " +"conditions. Si le programme principal (l'interpréteur Python) est compilé et " +"lié par le compilateur C, les objets globaux ou statiques avec les " +"constructeurs ne peuvent pas être utilisés. Ceci n'est pas un problème si le " +"programme principal est relié par le compilateur C++. Les fonctions qui " +"seront appelées par l'interpréteur Python (en particulier, les fonctions " +"d'initialisation des modules) doivent être déclarées en utilisant ``extern " +"\"C\"``. Il n'est pas nécessaire d'inclure les fichiers d'en-tête Python " +"dans le ``extern \"C\" {…}``, car ils utilisent déjà ce format si le symbole " +"``__cplusplus`` est défini (tous les compilateurs C++ récents définissent ce " +"symbole)." + +#: extending/extending.rst:1140 +msgid "Providing a C API for an Extension Module" +msgstr "Fournir une API en langage C pour un module d'extension" + +#: extending/extending.rst:1145 +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 " +"other extension modules. For example, an extension module could implement a " +"type \"collection\" which works like lists without order. Just like the " +"standard Python list type has a C API which permits extension modules to " +"create and manipulate lists, this new collection type should have a set of C " +"functions for direct manipulation from other extension modules." +msgstr "" +"De nombreux modules d'extension fournissent simplement de nouvelles " +"fonctions et de nouveaux types à utiliser à partir de Python, mais parfois " +"le code d'un module d'extension peut être utile pour d'autres modules " +"d'extension. Par exemple, un module d'extension peut mettre en œuvre un type " +"\"collection\" qui fonctionne comme des listes sans ordre. Tout comme le " +"type de liste Python standard possède une API C qui permet aux modules " +"d'extension de créer et de manipuler des listes, ce nouveau type de " +"collection devrait posséder un ensemble de fonctions C pour une manipulation " +"directe à partir d'autres modules d'extension." + +#: extending/extending.rst:1153 +msgid "" +"At first sight this seems easy: just write the functions (without declaring " +"them ``static``, of course), provide an appropriate header file, and " +"document the C API. And in fact this would work if all extension modules " +"were always linked statically with the Python interpreter. When modules are " +"used as shared libraries, however, the symbols defined in one module may not " +"be visible to another module. The details of visibility depend on the " +"operating system; some systems use one global namespace for the Python " +"interpreter and all extension modules (Windows, for example), whereas others " +"require an explicit list of imported symbols at module link time (AIX is one " +"example), or offer a choice of different strategies (most Unices). And even " +"if symbols are globally visible, the module whose functions one wishes to " +"call might not have been loaded yet!" +msgstr "" +"À première vue, cela semble facile : il suffit d'écrire les fonctions (sans " +"les déclarer \"statiques\", bien sûr), de fournir un fichier d'en-tête " +"approprié et de documenter l'API C. Et en fait, cela fonctionnerait si tous " +"les modules d'extension étaient toujours liés statiquement avec " +"l'interpréteur Python. Cependant, lorsque les modules sont utilisés comme " +"des bibliothèques partagées, les symboles définis dans un module peuvent ne " +"pas être visibles par un autre module. Les détails de la visibilité " +"dépendent du système d'exploitation ; certains systèmes utilisent un espace " +"de noms global pour l'interpréteur Python et tous les modules d'extension " +"(Windows, par exemple), tandis que d'autres exigent une liste explicite des " +"symboles importés au moment de la liaison des modules (AIX en est un " +"exemple), ou offrent un choix de stratégies différentes (la plupart des " +"*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:1165 +msgid "" +"Portability therefore requires not to make any assumptions about symbol " +"visibility. This means that all symbols in extension modules should be " +"declared ``static``, except for the module's initialization function, in " +"order to avoid name clashes with other extension modules (as discussed in " +"section :ref:`methodtable`). And it means that symbols that *should* be " +"accessible from other extension modules must be exported in a different way." +msgstr "" +"La portabilité exige donc de ne faire aucune supposition sur la visibilité " +"des symboles. Cela signifie que tous les symboles des modules d'extension " +"doivent être déclarés ``static``, à l'exception de la fonction " +"d'initialisation du module, afin d'éviter les conflits de noms avec les " +"autres modules d'extension (comme discuté dans la section :ref:" +"`methodtable`). Et cela signifie que les symboles qui *devraient* être " +"accessibles à partir d'autres modules d'extension doivent être exportés " +"d'une manière différente." + +#: extending/extending.rst:1172 +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 " +"data type which stores a pointer (:c:expr:`void \\*`). Capsules can only be " +"created and accessed via their C API, but they can be passed around like any " +"other Python object. In particular, they can be assigned to a name in an " +"extension module's namespace. Other extension modules can then import this " +"module, retrieve the value of this name, and then retrieve the pointer from " +"the Capsule." +msgstr "" + +#: extending/extending.rst:1180 +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 " +"pointers could be stored in an array whose address is published in a " +"Capsule. And the various tasks of storing and retrieving the pointers can be " +"distributed in different ways between the module providing the code and the " +"client modules." +msgstr "" +"Il existe de nombreuses façons d'utiliser les Capsules pour exporter l'API C " +"d'un module d'extension. Chaque fonction peut obtenir sa propre Capsule, ou " +"tous les pointeurs de l'API C peuvent être stockés dans un tableau dont " +"l'adresse est inscrite dans une Capsule. Et les différentes tâches de " +"stockage et de récupération des pointeurs peuvent être réparties de " +"différentes manières entre le module fournissant le code et les modules " +"clients." + +#: extending/extending.rst:1186 +#, fuzzy +msgid "" +"Whichever method you choose, it's important to name your Capsules properly. " +"The function :c:func:`PyCapsule_New` takes a name parameter (:c:expr:`const " +"char \\*`); you're permitted to pass in a ``NULL`` name, but we strongly " +"encourage you to specify a name. Properly named Capsules provide a degree " +"of runtime type-safety; there is no feasible way to tell one unnamed Capsule " +"from another." +msgstr "" +"Quelle que soit la méthode que vous choisissez, il est important de bien " +"nommer vos Capsules. La fonction :c:func:`PyCapsule_New` prend un paramètre " +"nommé (:c:type:`const char \\*`). Vous êtes autorisé à passer un nom " +"``NULL``, mais nous vous encourageons vivement à spécifier un nom. Des " +"Capsules correctement nommées offrent un certain degré de sécurité " +"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:1193 +msgid "" +"In particular, Capsules used to expose C APIs should be given a name " +"following this convention::" +msgstr "" + +#: extending/extending.rst:1198 +#, fuzzy +msgid "" +"The convenience function :c:func:`PyCapsule_Import` makes it easy to load a " +"C API provided via a Capsule, but only if the Capsule's name matches this " +"convention. This behavior gives C API users a high degree of certainty that " +"the Capsule they load contains the correct C API." +msgstr "" +"La fonction communément utilisée :c:func:`PyCapsule_Import` permet de " +"charger facilement une API C fournie via une Capsule, mais seulement si le " +"nom de la Capsule correspond à cette convention. Ce comportement donne aux " +"utilisateurs d'API C un degré élevé de certitude que la Capsule qu'ils " +"chargent contient l'API C correcte." + +#: extending/extending.rst:1203 +#, fuzzy +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 " +"used library modules. It stores all C API pointers (just one in the " +"example!) in an array of :c:expr:`void` pointers which becomes the value of " +"a Capsule. The header file corresponding to the module provides a macro that " +"takes care of importing the module and retrieving its C API pointers; client " +"modules only have to call this macro before accessing the C API." +msgstr "" +"L'exemple suivant montre une approche qui fait peser la plus grande partie " +"de la charge sur le rédacteur du module d'exportation, ce qui est approprié " +"pour les modules de bibliothèque couramment utilisés. Il stocke tous les " +"pointeurs de l'API C (un seul dans l'exemple !) dans un tableau de " +"pointeurs :c:type:`void` qui devient la valeur d'une Capsule. Le fichier " +"d'en-tête correspondant au module fournit une macro qui se charge d'importer " +"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:1211 +msgid "" +"The exporting module is a modification of the :mod:`spam` module from " +"section :ref:`extending-simpleexample`. The function :func:`spam.system` " +"does not call the C library function :c:func:`system` directly, but a " +"function :c:func:`PySpam_System`, which would of course do something more " +"complicated in reality (such as adding \"spam\" to every command). This " +"function :c:func:`PySpam_System` is also exported to other extension modules." +msgstr "" +"Le module d'exportation est une modification du module :mod:`spam` de la " +"section :ref:`extending-simpleexample`. La fonction :func:`spam.system` " +"n'appelle pas directement la fonction de la bibliothèque C :c:func:`system`, " +"mais une fonction :c:func:`PySpam_System`, qui ferait bien sûr quelque chose " +"de plus compliqué en réalité (comme ajouter du *spam* à chaque commande). " +"Cette fonction :c:func:`PySpam_System` est également exportée vers d'autres " +"modules d'extension." + +#: extending/extending.rst:1218 +msgid "" +"The function :c:func:`PySpam_System` is a plain C function, declared " +"``static`` like everything else::" +msgstr "" + +#: extending/extending.rst:1227 +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:1241 +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:1245 +msgid "two more lines must be added::" +msgstr "on doit ajouter deux lignes supplémentaires ::" + +#: extending/extending.rst:1250 +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 " +"initialization function must take care of initializing the C API pointer " +"array::" +msgstr "" +"L'indicateur ``#define`` est utilisé pour indiquer au fichier d'en-tête " +"qu'il est inclus dans le module d'exportation, et non dans un module client. " +"Enfin, la fonction d'initialisation du module doit prendre en charge " +"l'initialisation du tableau de pointeurs de l'API C ::" + +#: extending/extending.rst:1280 +msgid "" +"Note that ``PySpam_API`` is declared ``static``; otherwise the pointer array " +"would disappear when :func:`PyInit_spam` terminates!" +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:1283 +msgid "" +"The bulk of the work is in the header file :file:`spammodule.h`, which looks " +"like this::" +msgstr "" +"L'essentiel du travail se trouve dans le fichier d'en-tête :file:`spammodule." +"h`, qui ressemble à ceci ::" + +#: extending/extending.rst:1334 +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:" +"`import_spam` in its initialization function::" +msgstr "" +"Tout ce qu'un module client doit faire pour avoir accès à la fonction :c:" +"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:1352 +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 " +"function that is exported, so it has to be learned only once." +msgstr "" +"Le principal inconvénient de cette approche est que le fichier :file:" +"`spammodule.h` est assez compliqué. Cependant, la structure de base est la " +"même pour chaque fonction exportée, ce qui fait qu'elle ne doit être apprise " +"qu'une seule fois." + +#: extending/extending.rst:1356 +msgid "" +"Finally it should be mentioned that Capsules offer additional functionality, " +"which is especially useful for memory allocation and deallocation of the " +"pointer stored in a Capsule. The details are described in the Python/C API " +"Reference Manual in the section :ref:`capsules` and in the implementation of " +"Capsules (files :file:`Include/pycapsule.h` and :file:`Objects/pycapsule.c` " +"in the Python source code distribution)." +msgstr "" +"Enfin, il convient de mentionner que Capsules offrent des fonctionnalités " +"supplémentaires, qui sont particulièrement utiles pour l'allocation de la " +"mémoire et la dés-allocation du pointeur stocké dans un objet Capsule. Les " +"détails sont décrits dans le manuel de référence de l'API Python/C dans la " +"section :ref:`capsules` et dans l'implémentation des Capsules (fichiers :" +"file:`Include/pycapsule.h` et :file:`Objects/pycapsule.c` dans la " +"distribution du code source Python)." + +#: extending/extending.rst:1364 +msgid "Footnotes" +msgstr "Notes" + +#: extending/extending.rst:1365 +msgid "" +"An interface for this function already exists in the standard module :mod:" +"`os` --- it was chosen as a simple and straightforward example." +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:1368 +msgid "" +"The metaphor of \"borrowing\" a reference is not completely correct: the " +"owner still has a copy of the reference." +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:1371 +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 " +"another object!" +msgstr "" +"Vérifier que le comptage de référence est d'au moins 1 **ne fonctionne " +"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:1375 +msgid "" +"These guarantees don't hold when you use the \"old\" style calling " +"convention --- this is still found in much existing code." +msgstr "" +"Ces garanties ne sont pas valables lorsqu'on emploie les conventions de " +"nommage anciennes, qu'on retrouve encore assez souvent dans beaucoup de code " +"existant." diff --git a/extending/index.po b/extending/index.po new file mode 100644 index 0000000000..2369e90cc8 --- /dev/null +++ b/extending/index.po @@ -0,0 +1,134 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-18 15:46+0200\n" +"PO-Revision-Date: 2018-07-04 11:38+0200\n" +"Last-Translator: Julien Palard \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.4\n" + +#: extending/index.rst:5 +msgid "Extending and Embedding the Python Interpreter" +msgstr "Extension et intégration de l'interpréteur Python" + +#: extending/index.rst:7 +msgid "" +"This document describes how to write modules in C or C++ to extend the " +"Python interpreter with new modules. Those modules can not only define new " +"functions but also new object types and their methods. The document also " +"describes how to embed the Python interpreter in another application, for " +"use as an extension language. Finally, it shows how to compile and link " +"extension modules so that they can be loaded dynamically (at run time) into " +"the interpreter, if the underlying operating system supports this feature." +msgstr "" +"Ce document décrit comment écrire des modules en C ou C++ pour étendre " +"l'interpréteur Python à de nouveaux modules. En plus de définir de nouvelles " +"fonctions, ces modules peuvent définir de nouveaux types d'objets ainsi que " +"leur méthodes. Ce document explique aussi comment intégrer l'interpréteur " +"Python dans une autre application, pour être utilisé comme langage " +"d'extension. Enfin, ce document montre comment compiler et lier les modules " +"d'extension pour qu'ils puissent être chargés dynamiquement (à l'exécution) " +"dans l'interpréteur, si le système d'exploitation sous-jacent supporte cette " +"fonctionnalité." + +#: extending/index.rst:15 +msgid "" +"This document assumes basic knowledge about Python. For an informal " +"introduction to the language, see :ref:`tutorial-index`. :ref:`reference-" +"index` gives a more formal definition of the language. :ref:`library-index` " +"documents the existing object types, functions and modules (both built-in " +"and written in Python) that give the language its wide application range." +msgstr "" +"Ce document présuppose que vous avez des connaissances de base sur Python. " +"Pour une introduction informelle du langage, voyez :ref:`tutorial-index`. :" +"ref:`reference-index` donne une définition plus formelle du langage. :ref:" +"`library-index` documente les objets types, fonctions et modules existants " +"(tous intégrés et écrits en Python) qui donnent au langage sa large gamme " +"d'applications." + +#: extending/index.rst:21 +msgid "" +"For a detailed description of the whole Python/C API, see the separate :ref:" +"`c-api-index`." +msgstr "" +"Pour une description dans sa totalité de l'API Python/C, voir :ref:`c-api-" +"index`." + +#: extending/index.rst:26 +msgid "Recommended third party tools" +msgstr "Les outils tiers recommandés" + +#: extending/index.rst:28 +#, fuzzy +msgid "" +"This guide only covers the basic tools for creating extensions provided as " +"part of this version of CPython. Third party tools like `Cython `_, `cffi `_, `SWIG `_ and `Numba `_ offer both simpler and " +"more sophisticated approaches to creating C and C++ extensions for Python." +msgstr "" +"Ce guide ne couvre que les outils basiques permettant de créer des " +"extensions fournies dans cette version de CPython. Les outils tiers tels que " +"`Cython `_, `cffi `_, `SWIG " +"`_ et `Numba `_ offrent des " +"approches plus simples et plus élaborées pour créer des extensions C et C++ " +"pour Python." + +#: extending/index.rst:40 +msgid "" +"`Python Packaging User Guide: Binary Extensions `_" +msgstr "" +"`Guide d'utilisation de l'empaquetage Python : Extensions binaires `_" + +#: extending/index.rst:38 +msgid "" +"The Python Packaging User Guide not only covers several available tools that " +"simplify the creation of binary extensions, but also discusses the various " +"reasons why creating an extension module may be desirable in the first place." +msgstr "" +"Le guide d'utilisation de l'empaquetage Python ne couvre pas uniquement " +"quelques outils disponibles qui simplifient la création d'extensions " +"binaires, mais aborde aussi les différentes raisons pour lesquelles créer un " +"module d'extension peut être souhaitable d'entrée." + +#: extending/index.rst:45 +msgid "Creating extensions without third party tools" +msgstr "Création d'extensions sans outils tiers" + +#: extending/index.rst:47 +msgid "" +"This section of the guide covers creating C and C++ extensions without " +"assistance from third party tools. It is intended primarily for creators of " +"those tools, rather than being a recommended way to create your own C " +"extensions." +msgstr "" +"Cette section du guide couvre la création d'extensions C et C++ sans " +"l'utilisation d'outils tiers. Cette section est destinée aux créateurs de " +"ces outils, plus que d'être une méthode recommandée pour créer votre propre " +"extension C." + +#: extending/index.rst:63 +msgid "Embedding the CPython runtime in a larger application" +msgstr "Intégrer l'interpréteur CPython dans une plus grande application" + +#: extending/index.rst:65 +msgid "" +"Sometimes, rather than creating an extension that runs inside the Python " +"interpreter as the main application, it is desirable to instead embed the " +"CPython runtime inside a larger application. This section covers some of the " +"details involved in doing that successfully." +msgstr "" +"Parfois, plutôt que de créer une extension qui s'exécute dans l'interpréteur " +"Python comme application principale, il est préférable d'intégrer " +"l'interpréteur Python dans une application plus large. Cette section donne " +"quelques informations nécessaires au succès de cette opération." diff --git a/extending/newtypes.po b/extending/newtypes.po new file mode 100644 index 0000000000..3d1a4ce5ad --- /dev/null +++ b/extending/newtypes.po @@ -0,0 +1,706 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-18 15:46+0200\n" +"PO-Revision-Date: 2021-02-07 20:03+0100\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.3\n" + +#: extending/newtypes.rst:7 +msgid "Defining Extension Types: Assorted Topics" +msgstr "Définir les types d'extension : divers sujets" + +#: extending/newtypes.rst:11 +msgid "" +"This section aims to give a quick fly-by on the various type methods you can " +"implement and what they do." +msgstr "" + +#: extending/newtypes.rst:14 +msgid "" +"Here is the definition of :c:type:`PyTypeObject`, with some fields only used " +"in :ref:`debug builds ` omitted:" +msgstr "" + +#: extending/newtypes.rst:20 +msgid "" +"Now that's a *lot* of methods. Don't worry too much though -- if you have a " +"type you want to define, the chances are very good that you will only " +"implement a handful of these." +msgstr "" + +#: extending/newtypes.rst:24 +msgid "" +"As you probably expect by now, we're going to go over this and give more " +"information about the various handlers. We won't go in the order they are " +"defined in the structure, because there is a lot of historical baggage that " +"impacts the ordering of the fields. It's often easiest to find an example " +"that includes the fields you need and then change the values to suit your " +"new type. ::" +msgstr "" + +#: extending/newtypes.rst:33 +msgid "" +"The name of the type -- as mentioned in the previous chapter, this will " +"appear in various places, almost entirely for diagnostic purposes. Try to " +"choose something that will be helpful in such a situation! ::" +msgstr "" + +#: extending/newtypes.rst:39 +msgid "" +"These fields tell the runtime how much memory to allocate when new objects " +"of this type are created. Python has some built-in support for variable " +"length structures (think: strings, tuples) which is where the :c:member:" +"`~PyTypeObject.tp_itemsize` field comes in. This will be dealt with " +"later. ::" +msgstr "" + +#: extending/newtypes.rst:46 +msgid "" +"Here you can put a string (or its address) that you want returned when the " +"Python script references ``obj.__doc__`` to retrieve the doc string." +msgstr "" +"Ici vous pouvez mettre une chaîne (ou son adresse) que vous voulez renvoyer " +"lorsque le script Python référence ``obj.__doc__`` pour récupérer le " +"*docstring*." + +#: extending/newtypes.rst:49 +msgid "" +"Now we come to the basic type methods -- the ones most extension types will " +"implement." +msgstr "" +"Nous en arrivons maintenant aux méthodes de type basiques -- celles que la " +"plupart des types d'extension mettront en œuvre." + +#: extending/newtypes.rst:54 +msgid "Finalization and De-allocation" +msgstr "Finalisation et de-allocation" + +#: extending/newtypes.rst:66 +msgid "" +"This function is called when the reference count of the instance of your " +"type is reduced to zero and the Python interpreter wants to reclaim it. If " +"your type has memory to free or other clean-up to perform, you can put it " +"here. The object itself needs to be freed here as well. Here is an example " +"of this function::" +msgstr "" + +#: 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 " +"frequently called as the interpreter unwinds the Python stack; when the " +"stack is unwound due to an exception (rather than normal returns), nothing " +"is done to protect the deallocators from seeing that an exception has " +"already been set. Any actions which a deallocator performs which may cause " +"additional Python code to be executed may detect that an exception has been " +"set. This can lead to misleading errors from the interpreter. The proper " +"way to protect against this is to save a pending exception before performing " +"the unsafe action, and restoring it when done. This can be done using the :" +"c:func:`PyErr_Fetch` and :c:func:`PyErr_Restore` functions::" +msgstr "" + +#: 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:" +"`~PyTypeObject.tp_traverse` and/or :c:member:`~PyTypeObject.tp_clear`), some " +"of the object's members can have been cleared or finalized by the time :c:" +"member:`~PyTypeObject.tp_dealloc` is called. Second, in :c:member:" +"`~PyTypeObject.tp_dealloc`, your object is in an unstable state: its " +"reference count is equal to zero. Any call to a non-trivial object or API " +"(as in the example above) might end up calling :c:member:`~PyTypeObject." +"tp_dealloc` again, causing a double free and a crash." +msgstr "" + +#: 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:148 +msgid ":pep:`442` explains the new finalization scheme." +msgstr ":pep:`442` explique le nouveau schéma de finalisation." + +#: extending/newtypes.rst:155 +msgid "Object Presentation" +msgstr "Présentation de l'objet" + +#: 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: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: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: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`; " +"that is, it is called when Python code calls :func:`str` on an instance of " +"your object. Its implementation is very similar to the :c:member:" +"`~PyTypeObject.tp_repr` function, but the resulting string is intended for " +"human consumption. If :c:member:`~PyTypeObject.tp_str` is not specified, " +"the :c:member:`~PyTypeObject.tp_repr` handler is used instead." +msgstr "" + +#: extending/newtypes.rst:188 +msgid "Here is a simple example::" +msgstr "Voici un exemple simple ::" + +#: extending/newtypes.rst:200 +msgid "Attribute Management" +msgstr "Gestion des attributs" + +#: 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 " +"needs to be a function which can retrieve attributes (if any are defined), " +"and another to set attributes (if setting attributes is allowed). Removing " +"an attribute is a special case, for which the new value passed to the " +"handler is ``NULL``." +msgstr "" + +#: 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 " +"difference is that one pair takes the name of the attribute as a :c:expr:" +"`char\\*`, while the other accepts a :c:expr:`PyObject*`. Each type can use " +"whichever pair makes more sense for the implementation's convenience. ::" +msgstr "" + +#: 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 " +"to provide the :c:expr:`PyObject*` version of the attribute management " +"functions. The actual need for type-specific attribute handlers almost " +"completely disappeared starting with Python 2.2, though there are many " +"examples which have not been updated to use some of the new generic " +"mechanism that is available." +msgstr "" + +#: extending/newtypes.rst:231 +msgid "Generic Attribute Management" +msgstr "Gestion des attributs génériques" + +#: 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:236 +msgid "" +"The name of the attributes must be known when :c:func:`PyType_Ready` is " +"called." +msgstr "" +"Le nom des attributs doivent être déjà connus lorsqu'on lance :c:func:" +"`PyType_Ready`." + +#: 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: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: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 " +"dictionary of the type object. Each descriptor controls access to one " +"attribute of the instance object. Each of the tables is optional; if all " +"three are ``NULL``, instances of the type will only have attributes that are " +"inherited from their base type, and should leave the :c:member:" +"`~PyTypeObject.tp_getattro` and :c:member:`~PyTypeObject.tp_setattro` fields " +"``NULL`` as well, allowing the base type to handle attributes." +msgstr "" + +#: 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: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: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 " +"needed at the end; it is a sentinel that marks the end of the array. The :" +"attr:`ml_name` field of the sentinel must be ``NULL``." +msgstr "" + +#: 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 " +"access may be read-only or read-write. The structures in the table are " +"defined as::" +msgstr "" + +#: 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 " +"structure. The :attr:`type` field should contain one of the type codes " +"defined in the :file:`structmember.h` header; the value will be used to " +"determine how to convert Python values to and from C values. The :attr:" +"`flags` field is used to store flags which control how the attribute can be " +"accessed." +msgstr "" + +#: 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:298 +msgid "Constant" +msgstr "Constante" + +#: extending/newtypes.rst:298 +msgid "Meaning" +msgstr "Signification" + +#: extending/newtypes.rst:300 +msgid ":const:`READONLY`" +msgstr ":const:`READONLY`" + +#: extending/newtypes.rst:300 +msgid "Never writable." +msgstr "Jamais disponible en écriture." + +#: extending/newtypes.rst:302 +#, fuzzy +msgid ":const:`PY_AUDIT_READ`" +msgstr ":const:`READONLY`" + +#: extending/newtypes.rst:302 +msgid "" +"Emit an ``object.__getattr__`` :ref:`audit events ` before " +"reading." +msgstr "" + +#: extending/newtypes.rst:307 +msgid "" +":const:`RESTRICTED`, :const:`READ_RESTRICTED` and :const:`WRITE_RESTRICTED` " +"are deprecated. However, :const:`READ_RESTRICTED` is an alias for :const:" +"`PY_AUDIT_READ`, so fields that specify either :const:`RESTRICTED` or :const:" +"`READ_RESTRICTED` will also raise an audit event." +msgstr "" + +#: extending/newtypes.rst:320 +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 " +"defined this way can have an associated doc string simply by providing the " +"text in the table. An application can use the introspection API to retrieve " +"the descriptor from the class object, and get the doc string using its :attr:" +"`__doc__` attribute." +msgstr "" +"Un avantage intéressant de l'utilisation de la table :c:member:" +"`~PyTypeObject.tp_members` pour construire les descripteurs qui sont " +"utilisés à l'exécution, est que à tout attribut défini de cette façon on " +"peut associer un *docstring*, en écrivant simplement le texte dans la table. " +"Une application peut utiliser l'API d'introspection pour récupérer le " +"descripteur de l'objet de classe, et utiliser son attribut :attr:`__doc__` " +"pour renvoyer le *docstring*." + +#: extending/newtypes.rst:326 +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:340 +msgid "Type-specific Attribute Management" +msgstr "Gestion des attributs de type spécifiques" + +#: extending/newtypes.rst:342 +msgid "" +"For simplicity, only the :c:expr:`char\\*` version will be demonstrated " +"here; the type of the name parameter is the only difference between the :c:" +"expr:`char\\*` and :c:expr:`PyObject*` flavors of the interface. This " +"example effectively does the same thing as the generic example above, but " +"does not use the generic support added in Python 2.2. It explains how the " +"handler functions are called, so that if you do need to extend their " +"functionality, you'll understand what needs to be done." +msgstr "" + +#: extending/newtypes.rst:350 +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:354 +msgid "Here is an example::" +msgstr "Voici un exemple ::" + +#: extending/newtypes.rst:370 +msgid "" +"The :c:member:`~PyTypeObject.tp_setattr` handler is called when the :meth:" +"`__setattr__` or :meth:`__delattr__` method of a class instance would be " +"called. When an attribute should be deleted, the third parameter will be " +"``NULL``. Here is an example that simply raises an exception; if this were " +"really all you wanted, the :c:member:`~PyTypeObject.tp_setattr` handler " +"should be set to ``NULL``. ::" +msgstr "" + +#: extending/newtypes.rst:384 +msgid "Object Comparison" +msgstr "Comparaison des objets" + +#: extending/newtypes.rst:390 +msgid "" +"The :c:member:`~PyTypeObject.tp_richcompare` handler is called when " +"comparisons are needed. It is analogous to the :ref:`rich comparison " +"methods `, like :meth:`__lt__`, and also called by :c:func:" +"`PyObject_RichCompare` and :c:func:`PyObject_RichCompareBool`." +msgstr "" + +#: extending/newtypes.rst:395 +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_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:403 +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:433 +msgid "Abstract Protocol Support" +msgstr "Support pour le protocole abstrait" + +#: extending/newtypes.rst:435 +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:439 +msgid "" +"A number of these abstract interfaces were defined early in the development " +"of the Python implementation. In particular, the number, mapping, and " +"sequence protocols have been part of Python since the beginning. Other " +"protocols have been added over time. For protocols which depend on several " +"handler routines from the type implementation, the older protocols have been " +"defined as optional blocks of handlers referenced by the type object. For " +"newer protocols there are additional slots in the main type object, with a " +"flag bit being set to indicate that the slots are present and should be " +"checked by the interpreter. (The flag bit does not indicate that the slot " +"values are non-``NULL``. The flag may be set to indicate the presence of a " +"slot, but a slot may still be unfilled.) ::" +msgstr "" + +#: extending/newtypes.rst:454 +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 " +"the C type :c:type:`PyNumberMethods`, :c:type:`PySequenceMethods`, or :c:" +"type:`PyMappingMethods`, respectively. It is up to you to fill in this " +"structure with appropriate values. You can find examples of the use of each " +"of these in the :file:`Objects` directory of the Python source " +"distribution. ::" +msgstr "" + +#: extending/newtypes.rst:463 +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:476 +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, " +"which is why you should be careful to avoid returning it when hash " +"computation is successful, as seen above." +msgstr "" + +#: extending/newtypes.rst:485 +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 " +"script contains ``obj1('hello')``, the :c:member:`~PyTypeObject.tp_call` " +"handler is invoked." +msgstr "" + +#: extending/newtypes.rst:489 +msgid "This function takes three arguments:" +msgstr "Cette fonction prend trois arguments :" + +#: extending/newtypes.rst:491 +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:494 +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:497 +msgid "" +"*kwds* is a dictionary of keyword arguments that were passed. If this is non-" +"``NULL`` and you support keyword arguments, use :c:func:" +"`PyArg_ParseTupleAndKeywords` to extract the arguments. If you do not want " +"to support keyword arguments and this is non-``NULL``, raise a :exc:" +"`TypeError` with a message saying that keyword arguments are not supported." +msgstr "" + +#: extending/newtypes.rst:503 +msgid "Here is a toy ``tp_call`` implementation::" +msgstr "Ceci est une implémentation ``tp_call`` très simple ::" + +#: extending/newtypes.rst:529 +msgid "" +"These functions provide support for the iterator protocol. Both handlers " +"take exactly one parameter, the instance for which they are being called, " +"and return a new reference. In the case of an error, they should set an " +"exception and return ``NULL``. :c:member:`~PyTypeObject.tp_iter` " +"corresponds to the Python :meth:`__iter__` method, while :c:member:" +"`~PyTypeObject.tp_iternext` corresponds to the Python :meth:`~iterator." +"__next__` method." +msgstr "" + +#: extending/newtypes.rst:536 +msgid "" +"Any :term:`iterable` object must implement the :c:member:`~PyTypeObject." +"tp_iter` handler, which must return an :term:`iterator` object. Here the " +"same guidelines apply as for Python classes:" +msgstr "" +"Tout objet :term:`iterable` doit implémenter le gestionnaire :c:member:" +"`~PyTypeObject.tp_iter`, qui doit renvoyer un objet de type :term:" +"`iterator`. Ici, les mêmes directives s'appliquent de la même façon que " +"pour les classes *Python* :" + +#: extending/newtypes.rst:540 +msgid "" +"For collections (such as lists and tuples) which can support multiple " +"independent iterators, a new iterator should be created and returned by each " +"call to :c:member:`~PyTypeObject.tp_iter`." +msgstr "" +"Pour les collections (telles que les listes et les n-uplets) qui peuvent " +"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:543 +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." +"tp_iter` by returning a new reference to themselves -- and should also " +"therefore implement the :c:member:`~PyTypeObject.tp_iternext` handler." +msgstr "" + +#: extending/newtypes.rst:548 +msgid "" +"Any :term:`iterator` object should implement both :c:member:`~PyTypeObject." +"tp_iter` and :c:member:`~PyTypeObject.tp_iternext`. An iterator's :c:member:" +"`~PyTypeObject.tp_iter` handler should return a new reference to the " +"iterator. Its :c:member:`~PyTypeObject.tp_iternext` handler should return a " +"new reference to the next object in the iteration, if there is one. If the " +"iteration has reached the end, :c:member:`~PyTypeObject.tp_iternext` may " +"return ``NULL`` without setting an exception, or it may set :exc:" +"`StopIteration` *in addition* to returning ``NULL``; avoiding the exception " +"can yield slightly better performance. If an actual error occurs, :c:member:" +"`~PyTypeObject.tp_iternext` should always set an exception and return " +"``NULL``." +msgstr "" + +#: extending/newtypes.rst:564 +msgid "Weak Reference Support" +msgstr "Prise en charge de la référence faible" + +#: extending/newtypes.rst:566 +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 " +"overhead on performance-critical objects (such as numbers)." +msgstr "" +"L'un des objectifs de l'implémentation de la référence faible de *Python* " +"est de permettre à tout type d'objet de participer au mécanisme de référence " +"faible sans avoir à supporter le surcoût de la performance critique des " +"certains objets, tels que les nombres." + +#: extending/newtypes.rst:571 +msgid "Documentation for the :mod:`weakref` module." +msgstr "Documentation pour le module :mod:`weakref`." + +#: extending/newtypes.rst:573 +msgid "" +"For an object to be weakly referencable, the extension type must do two " +"things:" +msgstr "" +"Pour qu'un objet soit faiblement référençable, le type d'extension doit " +"faire deux choses :" + +#: extending/newtypes.rst:575 +#, fuzzy +msgid "" +"Include a :c:expr:`PyObject*` field in the C object structure dedicated to " +"the weak reference mechanism. The object's constructor should leave it " +"``NULL`` (which is automatic when using the default :c:member:`~PyTypeObject." +"tp_alloc`)." +msgstr "" +"Inclure un champ :c:type:`PyObject\\*` dans la structure d'objet C dédiée au " +"mécanisme de référence faible. Le constructeur de l'objet doit le laisser à " +"la valeur ``NULL`` (ce qui est automatique lorsque l'on utilise le champ par " +"défaut :c:member:`~PyTypeObject.tp_alloc`)." + +#: extending/newtypes.rst:580 +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 " +"interpreter knows how to access and modify that field." +msgstr "" +"Définissez le membre de type :c:member:`~PyTypeObject.tp_weaklistoffset` à " +"la valeur de décalage (*offset*) du champ susmentionné dans la structure de " +"l'objet *C*, afin que l'interpréteur sache comment accéder à ce champ et le " +"modifier." + +#: extending/newtypes.rst:584 +msgid "" +"Concretely, here is how a trivial object structure would be augmented with " +"the required field::" +msgstr "" +"Concrètement, voici comment une structure d'objet simple serait complétée " +"par le champ requis ::" + +#: extending/newtypes.rst:592 +#, fuzzy +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:600 +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-" +"``NULL``::" +msgstr "" +"Le seul ajout supplémentaire est que ``tp_dealloc`` doit effacer toute " +"référence faible (en appelant :c:func:`PyObject_ClearWeakRefs`) si le champ " +"est non ``NULL`` ::" + +#: extending/newtypes.rst:616 +msgid "More Suggestions" +msgstr "Plus de suggestions" + +#: extending/newtypes.rst:618 +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` " +"directory, then search the C source files for ``tp_`` plus the function you " +"want (for example, ``tp_richcompare``). You will find examples of the " +"function you want to implement." +msgstr "" +"Pour savoir comment mettre en œuvre une méthode spécifique pour votre " +"nouveau type de données, téléchargez le code source :term:`CPython`. Allez " +"dans le répertoire :file:`Objects`, puis cherchez dans les fichiers sources " +"*C* la fonction ``tp_`` plus la fonction que vous voulez (par exemple, " +"``tp_richcompare``). Vous trouverez des exemples de la fonction que vous " +"voulez implémenter." + +#: extending/newtypes.rst:624 +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 " +"sample of its use might be something like the following::" +msgstr "" +"Lorsque vous avez besoin de vérifier qu'un objet est une instance concrète " +"du type que vous implémentez, utilisez la fonction :c:func:" +"`PyObject_TypeCheck`. Voici un exemple de son utilisation ::" + +#: extending/newtypes.rst:635 +msgid "Download CPython source releases." +msgstr "Télécharger les versions sources de *CPython*." + +#: extending/newtypes.rst:635 +msgid "https://www.python.org/downloads/source/" +msgstr "https://www.python.org/downloads/source/" + +#: extending/newtypes.rst:637 +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:638 +msgid "https://github.com/python/cpython" +msgstr "https://github.com/python/cpython" + +#~ msgid ":const:`READ_RESTRICTED`" +#~ msgstr ":const:`READ_RESTRICTED`" + +#~ msgid "Not readable in restricted mode." +#~ msgstr "Non disponible en lecture, dans le mode restreint." + +#~ msgid ":const:`WRITE_RESTRICTED`" +#~ msgstr ":const:`WRITE_RESTRICTED`" + +#~ msgid "Not writable in restricted mode." +#~ msgstr "Non disponible en écriture dans le mode restreint." + +#~ msgid ":const:`RESTRICTED`" +#~ msgstr ":const:`RESTRICTED`" + +#~ msgid "Not readable or writable in restricted mode." +#~ msgstr "Non disponible en lecture ou écriture, en mode restreint." diff --git a/extending/newtypes_tutorial.po b/extending/newtypes_tutorial.po new file mode 100644 index 0000000000..89240bf7fe --- /dev/null +++ b/extending/newtypes_tutorial.po @@ -0,0 +1,962 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-18 15:46+0200\n" +"PO-Revision-Date: 2022-10-18 12:22+0200\n" +"Last-Translator: Julien Palard \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" + +#: extending/newtypes_tutorial.rst:7 +msgid "Defining Extension Types: Tutorial" +msgstr "Tutoriel : définir des types dans des extensions" + +#: extending/newtypes_tutorial.rst:14 +msgid "" +"Python allows the writer of a C extension module to define new types that " +"can be manipulated from Python code, much like the built-in :class:`str` " +"and :class:`list` types. The code for all extension types follows a " +"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 "Les bases" + +#: extending/newtypes_tutorial.rst:26 +#, fuzzy +msgid "" +"The :term:`CPython` runtime sees all Python objects as variables of type :c:" +"expr:`PyObject*`, which serves as a \"base type\" for all Python objects. " +"The :c:type:`PyObject` structure itself only contains the object's :term:" +"`reference count` and a pointer to the object's \"type object\". This is " +"where the action is; the type object determines which (C) functions get " +"called by the interpreter when, for instance, an attribute gets looked up on " +"an object, a method called, or it is multiplied by another object. These C " +"functions are called \"type methods\"." +msgstr "" +":term:`CPython` considère que tous les objets Python sont des variables de " +"type :c:type:`PyObject\\*`, qui sert de type de base pour tous les objets " +"Python. La structure de :c:type:`PyObject` ne contient que le :term:" +"`compteur de références ` et un pointeur vers un objet de " +"type « type de l'objet ». C'est ici que tout se joue : l'objet type " +"détermine quelle fonction C doit être appelée par l'interpréteur quand, par " +"exemple, un attribut est recherché sur un objet, quand une méthode est " +"appelée, ou quand l'objet est multiplié par un autre objet. Ces fonctions C " +"sont appelées des « méthodes de type »." + +#: extending/newtypes_tutorial.rst:35 +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 "" +"This sort of thing can only be explained by example, so here's a minimal, " +"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 "" +"What we're showing here is the traditional way of defining *static* " +"extension types. It should be adequate for most uses. The C API also " +"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 "" +"How the :class:`Custom` **type** behaves: this is the ``CustomType`` struct, " +"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 "Commençons par ::" + +#: extending/newtypes_tutorial.rst:67 +#, fuzzy +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_TYPE` " +"and :c:macro:`Py_REFCNT` respectively). The reason for the macro is to " +"abstract away the layout and to enable additional fields in :ref:`debug " +"builds `." +msgstr "" +"C'est ce qu'un objet ``Custom`` contient. ``PyObject_HEAD`` est " +"obligatoirement au début de chaque structure d'objet et définit un champ " +"appelé ``ob_base`` de type :c:type:`PyObject`, contenant un pointeur vers un " +"objet type et un compteur de références (on peut y accéder en utilisant les " +"macros :c:macro:`Py_TYPE` et :c:macro:`Py_REFCNT`, respectivement). La " +"raison d'être de ces macros est d'abstraire l'agencement de la structure, et " +"ainsi de permettre l'ajout de champs en :ref:`mode débogage `." + +#: extending/newtypes_tutorial.rst:76 +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:79 +msgid "" +"Of course, objects generally store additional data besides the standard " +"``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:88 +msgid "The second bit is the definition of the type object. ::" +msgstr "La deuxième partie est la définition de l'objet type ::" + +#: extending/newtypes_tutorial.rst:101 +msgid "" +"We recommend using C99-style designated initializers as above, to avoid " +"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:105 +msgid "" +"The actual definition of :c:type:`PyTypeObject` in :file:`object.h` has many " +"more :ref:`fields ` than the definition above. The remaining " +"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:110 +msgid "We're going to pick it apart, one field at a time::" +msgstr "Regardons les champs de cette structure, un par un ::" + +#: extending/newtypes_tutorial.rst:114 +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:119 +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:129 +msgid "" +"Note that the name is a dotted name that includes both the module name and " +"the name of the type within the module. The module in this case is :mod:" +"`custom` and the type is :class:`Custom`, so we set the type name to :class:" +"`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:138 +msgid "" +"This is so that Python knows how much memory to allocate when creating new :" +"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:144 +msgid "" +"If you want your type to be subclassable from Python, and your type has the " +"same :c:member:`~PyTypeObject.tp_basicsize` as its base type, you may have " +"problems with multiple inheritance. A Python subclass of your type will " +"have to list your type first in its :attr:`~class.__bases__`, or else it " +"will not be able to call your type's :meth:`__new__` method without getting " +"an error. You can avoid this problem by ensuring that your type has a " +"larger value for :c:member:`~PyTypeObject.tp_basicsize` than its base type " +"does. Most of the time, this will be true anyway, because either your base " +"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:154 +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:158 +msgid "" +"All types should include this constant in their flags. It enables all of " +"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:162 +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:166 +msgid "" +"To enable object creation, we have to provide a :c:member:`~PyTypeObject." +"tp_new` handler. This is the equivalent of the Python method :meth:" +"`__new__`, but has to be specified explicitly. In this case, we can just " +"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:173 +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:179 +msgid "" +"This initializes the :class:`Custom` type, filling in a number of members to " +"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:190 +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:198 +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:207 +msgid "in a file called :file:`setup.py`; then typing" +msgstr "" + +#: extending/newtypes_tutorial.rst:213 +msgid "" +"at a shell should produce a file :file:`custom.so` in a subdirectory; move " +"to that directory and fire up Python --- you should be able to ``import " +"custom`` and play around with Custom objects." +msgstr "" + +#: extending/newtypes_tutorial.rst:217 +msgid "That wasn't so hard, was it?" +msgstr "" + +#: extending/newtypes_tutorial.rst:219 +msgid "" +"Of course, the current Custom type is pretty uninteresting. It has no data " +"and doesn't do anything. It can't even be subclassed." +msgstr "" + +#: extending/newtypes_tutorial.rst:223 +msgid "" +"While this documentation showcases the standard :mod:`distutils` module for " +"building C extensions, it is recommended in real-world use cases to use the " +"newer and better-maintained ``setuptools`` library. Documentation on how to " +"do this is out of scope for this document and can be found in the `Python " +"Packaging User's Guide `_." +msgstr "" + +#: extending/newtypes_tutorial.rst:231 +msgid "Adding data and methods to the Basic example" +msgstr "" + +#: extending/newtypes_tutorial.rst:233 +msgid "" +"Let's extend the basic example to add some data and methods. Let's also " +"make the type usable as a base class. We'll create a new module, :mod:" +"`custom2` that adds these capabilities:" +msgstr "" + +#: extending/newtypes_tutorial.rst:240 +msgid "This version of the module has a number of changes." +msgstr "" + +#: extending/newtypes_tutorial.rst:242 +msgid "We've added an extra include::" +msgstr "" + +#: extending/newtypes_tutorial.rst:246 +msgid "" +"This include provides declarations that we use to handle attributes, as " +"described a bit later." +msgstr "" + +#: extending/newtypes_tutorial.rst:249 +msgid "" +"The :class:`Custom` type now has three data attributes in its C struct, " +"*first*, *last*, and *number*. The *first* and *last* variables are Python " +"strings containing first and last names. The *number* attribute is a C " +"integer." +msgstr "" + +#: extending/newtypes_tutorial.rst:253 +msgid "The object structure is updated accordingly::" +msgstr "" + +#: extending/newtypes_tutorial.rst:262 +msgid "" +"Because we now have data to manage, we have to be more careful about object " +"allocation and deallocation. At a minimum, we need a deallocation method::" +msgstr "" + +#: extending/newtypes_tutorial.rst:273 +msgid "which is assigned to the :c:member:`~PyTypeObject.tp_dealloc` member::" +msgstr "" + +#: extending/newtypes_tutorial.rst:277 +msgid "" +"This method first clears the reference counts of the two Python attributes. :" +"c:func:`Py_XDECREF` correctly handles the case where its argument is " +"``NULL`` (which might happen here if ``tp_new`` failed midway). It then " +"calls the :c:member:`~PyTypeObject.tp_free` member of the object's type " +"(computed by ``Py_TYPE(self)``) to free the object's memory. Note that the " +"object's type might not be :class:`CustomType`, because the object may be an " +"instance of a subclass." +msgstr "" + +#: extending/newtypes_tutorial.rst:286 +msgid "" +"The explicit cast to ``destructor`` above is needed because we defined " +"``Custom_dealloc`` to take a ``CustomObject *`` argument, but the " +"``tp_dealloc`` function pointer expects to receive a ``PyObject *`` " +"argument. Otherwise, the compiler will emit a warning. This is object-" +"oriented polymorphism, in C!" +msgstr "" + +#: extending/newtypes_tutorial.rst:292 +msgid "" +"We want to make sure that the first and last names are initialized to empty " +"strings, so we provide a ``tp_new`` implementation::" +msgstr "" + +#: extending/newtypes_tutorial.rst:316 +msgid "and install it in the :c:member:`~PyTypeObject.tp_new` member::" +msgstr "" + +#: extending/newtypes_tutorial.rst:320 +msgid "" +"The ``tp_new`` handler is responsible for creating (as opposed to " +"initializing) objects of the type. It is exposed in Python as the :meth:" +"`__new__` method. It is not required to define a ``tp_new`` member, and " +"indeed many extension types will simply reuse :c:func:`PyType_GenericNew` as " +"done in the first version of the ``Custom`` type above. In this case, we " +"use the ``tp_new`` handler to initialize the ``first`` and ``last`` " +"attributes to non-``NULL`` default values." +msgstr "" + +#: extending/newtypes_tutorial.rst:328 +msgid "" +"``tp_new`` is passed the type being instantiated (not necessarily " +"``CustomType``, if a subclass is instantiated) and any arguments passed when " +"the type was called, and is expected to return the instance created. " +"``tp_new`` handlers always accept positional and keyword arguments, but they " +"often ignore the arguments, leaving the argument handling to initializer (a." +"k.a. ``tp_init`` in C or ``__init__`` in Python) methods." +msgstr "" + +#: extending/newtypes_tutorial.rst:336 +msgid "" +"``tp_new`` shouldn't call ``tp_init`` explicitly, as the interpreter will do " +"it itself." +msgstr "" + +#: extending/newtypes_tutorial.rst:339 +msgid "" +"The ``tp_new`` implementation calls the :c:member:`~PyTypeObject.tp_alloc` " +"slot to allocate memory::" +msgstr "" + +#: extending/newtypes_tutorial.rst:344 +msgid "" +"Since memory allocation may fail, we must check the :c:member:`~PyTypeObject." +"tp_alloc` result against ``NULL`` before proceeding." +msgstr "" + +#: extending/newtypes_tutorial.rst:348 +msgid "" +"We didn't fill the :c:member:`~PyTypeObject.tp_alloc` slot ourselves. " +"Rather :c:func:`PyType_Ready` fills it for us by inheriting it from our base " +"class, which is :class:`object` by default. Most types use the default " +"allocation strategy." +msgstr "" + +#: extending/newtypes_tutorial.rst:354 +msgid "" +"If you are creating a co-operative :c:member:`~PyTypeObject.tp_new` (one " +"that calls a base type's :c:member:`~PyTypeObject.tp_new` or :meth:" +"`__new__`), you must *not* try to determine what method to call using method " +"resolution order at runtime. Always statically determine what type you are " +"going to call, and call its :c:member:`~PyTypeObject.tp_new` directly, or " +"via ``type->tp_base->tp_new``. If you do not do this, Python subclasses of " +"your type that also inherit from other Python-defined classes may not work " +"correctly. (Specifically, you may not be able to create instances of such " +"subclasses without getting a :exc:`TypeError`.)" +msgstr "" + +#: extending/newtypes_tutorial.rst:364 +msgid "" +"We also define an initialization function which accepts arguments to provide " +"initial values for our instance::" +msgstr "" + +#: extending/newtypes_tutorial.rst:393 +msgid "by filling the :c:member:`~PyTypeObject.tp_init` slot. ::" +msgstr "" + +#: extending/newtypes_tutorial.rst:397 +msgid "" +"The :c:member:`~PyTypeObject.tp_init` slot is exposed in Python as the :meth:" +"`__init__` method. It is used to initialize an object after it's created. " +"Initializers always accept positional and keyword arguments, and they should " +"return either ``0`` on success or ``-1`` on error." +msgstr "" + +#: extending/newtypes_tutorial.rst:402 +msgid "" +"Unlike the ``tp_new`` handler, there is no guarantee that ``tp_init`` is " +"called at all (for example, the :mod:`pickle` module by default doesn't " +"call :meth:`__init__` on unpickled instances). It can also be called " +"multiple times. Anyone can call the :meth:`__init__` method on our " +"objects. For this reason, we have to be extra careful when assigning the " +"new attribute values. We might be tempted, for example to assign the " +"``first`` member like this::" +msgstr "" + +#: extending/newtypes_tutorial.rst:416 +msgid "" +"But this would be risky. Our type doesn't restrict the type of the " +"``first`` member, so it could be any kind of object. It could have a " +"destructor that causes code to be executed that tries to access the " +"``first`` member; or that destructor could release the :term:`Global " +"interpreter Lock ` and let arbitrary code run in other threads that " +"accesses and modifies our object." +msgstr "" + +#: extending/newtypes_tutorial.rst:423 +msgid "" +"To be paranoid and protect ourselves against this possibility, we almost " +"always reassign members before decrementing their reference counts. When " +"don't we have to do this?" +msgstr "" + +#: extending/newtypes_tutorial.rst:427 +msgid "when we absolutely know that the reference count is greater than 1;" +msgstr "" + +#: extending/newtypes_tutorial.rst:429 +msgid "" +"when we know that deallocation of the object [#]_ will neither release the :" +"term:`GIL` nor cause any calls back into our type's code;" +msgstr "" + +#: extending/newtypes_tutorial.rst:432 +msgid "" +"when decrementing a reference count in a :c:member:`~PyTypeObject." +"tp_dealloc` handler on a type which doesn't support cyclic garbage " +"collection [#]_." +msgstr "" + +#: extending/newtypes_tutorial.rst:435 +msgid "" +"We want to expose our instance variables as attributes. There are a number " +"of ways to do that. The simplest way is to define member definitions::" +msgstr "" + +#: extending/newtypes_tutorial.rst:448 +msgid "" +"and put the definitions in the :c:member:`~PyTypeObject.tp_members` slot::" +msgstr "" + +#: extending/newtypes_tutorial.rst:452 +msgid "" +"Each member definition has a member name, type, offset, access flags and " +"documentation string. See the :ref:`Generic-Attribute-Management` section " +"below for details." +msgstr "" + +#: extending/newtypes_tutorial.rst:456 +msgid "" +"A disadvantage of this approach is that it doesn't provide a way to restrict " +"the types of objects that can be assigned to the Python attributes. We " +"expect the first and last names to be strings, but any Python objects can be " +"assigned. Further, the attributes can be deleted, setting the C pointers to " +"``NULL``. Even though we can make sure the members are initialized to non-" +"``NULL`` values, the members can be set to ``NULL`` if the attributes are " +"deleted." +msgstr "" + +#: extending/newtypes_tutorial.rst:463 +msgid "" +"We define a single method, :meth:`Custom.name()`, that outputs the objects " +"name as the concatenation of the first and last names. ::" +msgstr "" + +#: extending/newtypes_tutorial.rst:480 +msgid "" +"The method is implemented as a C function that takes a :class:`Custom` (or :" +"class:`Custom` subclass) instance as the first argument. Methods always " +"take an instance as the first argument. Methods often take positional and " +"keyword arguments as well, but in this case we don't take any and don't need " +"to accept a positional argument tuple or keyword argument dictionary. This " +"method is equivalent to the Python method:" +msgstr "" + +#: extending/newtypes_tutorial.rst:492 +msgid "" +"Note that we have to check for the possibility that our :attr:`first` and :" +"attr:`last` members are ``NULL``. This is because they can be deleted, in " +"which case they are set to ``NULL``. It would be better to prevent deletion " +"of these attributes and to restrict the attribute values to be strings. " +"We'll see how to do that in the next section." +msgstr "" + +#: extending/newtypes_tutorial.rst:498 +msgid "" +"Now that we've defined the method, we need to create an array of method " +"definitions::" +msgstr "" + +#: extending/newtypes_tutorial.rst:508 +msgid "" +"(note that we used the :const:`METH_NOARGS` flag to indicate that the method " +"is expecting no arguments other than *self*)" +msgstr "" + +#: extending/newtypes_tutorial.rst:511 +msgid "and assign it to the :c:member:`~PyTypeObject.tp_methods` slot::" +msgstr "" + +#: extending/newtypes_tutorial.rst:515 +msgid "" +"Finally, we'll make our type usable as a base class for subclassing. We've " +"written our methods carefully so far so that they don't make any assumptions " +"about the type of the object being created or used, so all we need to do is " +"to add the :const:`Py_TPFLAGS_BASETYPE` to our class flag definition::" +msgstr "" + +#: extending/newtypes_tutorial.rst:522 +msgid "" +"We rename :c:func:`PyInit_custom` to :c:func:`PyInit_custom2`, update the " +"module name in the :c:type:`PyModuleDef` struct, and update the full class " +"name in the :c:type:`PyTypeObject` struct." +msgstr "" + +#: extending/newtypes_tutorial.rst:526 +msgid "Finally, we update our :file:`setup.py` file to build the new module:" +msgstr "" + +#: extending/newtypes_tutorial.rst:539 +msgid "Providing finer control over data attributes" +msgstr "" + +#: extending/newtypes_tutorial.rst:541 +msgid "" +"In this section, we'll provide finer control over how the :attr:`first` and :" +"attr:`last` attributes are set in the :class:`Custom` example. In the " +"previous version of our module, the instance variables :attr:`first` and :" +"attr:`last` could be set to non-string values or even deleted. We want to " +"make sure that these attributes always contain strings." +msgstr "" + +#: extending/newtypes_tutorial.rst:550 +msgid "" +"To provide greater control, over the :attr:`first` and :attr:`last` " +"attributes, we'll use custom getter and setter functions. Here are the " +"functions for getting and setting the :attr:`first` attribute::" +msgstr "" + +#: extending/newtypes_tutorial.rst:581 +msgid "" +"The getter function is passed a :class:`Custom` object and a \"closure\", " +"which is a void pointer. In this case, the closure is ignored. (The " +"closure supports an advanced usage in which definition data is passed to the " +"getter and setter. This could, for example, be used to allow a single set of " +"getter and setter functions that decide the attribute to get or set based on " +"data in the closure.)" +msgstr "" + +#: extending/newtypes_tutorial.rst:587 +msgid "" +"The setter function is passed the :class:`Custom` object, the new value, and " +"the closure. The new value may be ``NULL``, in which case the attribute is " +"being deleted. In our setter, we raise an error if the attribute is deleted " +"or if its new value is not a string." +msgstr "" + +#: extending/newtypes_tutorial.rst:592 +msgid "We create an array of :c:type:`PyGetSetDef` structures::" +msgstr "" + +#: extending/newtypes_tutorial.rst:602 +msgid "and register it in the :c:member:`~PyTypeObject.tp_getset` slot::" +msgstr "" + +#: extending/newtypes_tutorial.rst:606 +msgid "" +"The last item in a :c:type:`PyGetSetDef` structure is the \"closure\" " +"mentioned above. In this case, we aren't using a closure, so we just pass " +"``NULL``." +msgstr "" + +#: extending/newtypes_tutorial.rst:609 +msgid "We also remove the member definitions for these attributes::" +msgstr "" + +#: extending/newtypes_tutorial.rst:617 +msgid "" +"We also need to update the :c:member:`~PyTypeObject.tp_init` handler to only " +"allow strings [#]_ to be passed::" +msgstr "" + +#: extending/newtypes_tutorial.rst:646 +msgid "" +"With these changes, we can assure that the ``first`` and ``last`` members " +"are never ``NULL`` so we can remove checks for ``NULL`` values in almost all " +"cases. This means that most of the :c:func:`Py_XDECREF` calls can be " +"converted to :c:func:`Py_DECREF` calls. The only place we can't change " +"these calls is in the ``tp_dealloc`` implementation, where there is the " +"possibility that the initialization of these members failed in ``tp_new``." +msgstr "" + +#: extending/newtypes_tutorial.rst:653 +msgid "" +"We also rename the module initialization function and module name in the " +"initialization function, as we did before, and we add an extra definition to " +"the :file:`setup.py` file." +msgstr "" + +#: extending/newtypes_tutorial.rst:659 +msgid "Supporting cyclic garbage collection" +msgstr "" + +#: extending/newtypes_tutorial.rst:661 +msgid "" +"Python has a :term:`cyclic garbage collector (GC) ` that " +"can identify unneeded objects even when their reference counts are not zero. " +"This can happen when objects are involved in cycles. For example, consider:" +msgstr "" + +#: extending/newtypes_tutorial.rst:671 +msgid "" +"In this example, we create a list that contains itself. When we delete it, " +"it still has a reference from itself. Its reference count doesn't drop to " +"zero. Fortunately, Python's cyclic garbage collector will eventually figure " +"out that the list is garbage and free it." +msgstr "" + +#: extending/newtypes_tutorial.rst:676 +msgid "" +"In the second version of the :class:`Custom` example, we allowed any kind of " +"object to be stored in the :attr:`first` or :attr:`last` attributes [#]_. " +"Besides, in the second and third versions, we allowed subclassing :class:" +"`Custom`, and subclasses may add arbitrary attributes. For any of those two " +"reasons, :class:`Custom` objects can participate in cycles:" +msgstr "" + +#: extending/newtypes_tutorial.rst:690 +msgid "" +"To allow a :class:`Custom` instance participating in a reference cycle to be " +"properly detected and collected by the cyclic GC, our :class:`Custom` type " +"needs to fill two additional slots and to enable a flag that enables these " +"slots:" +msgstr "" + +#: extending/newtypes_tutorial.rst:697 +msgid "" +"First, the traversal method lets the cyclic GC know about subobjects that " +"could participate in cycles::" +msgstr "" + +#: extending/newtypes_tutorial.rst:717 +msgid "" +"For each subobject that can participate in cycles, we need to call the :c:" +"func:`visit` function, which is passed to the traversal method. The :c:func:" +"`visit` function takes as arguments the subobject and the extra argument " +"*arg* passed to the traversal method. It returns an integer value that must " +"be returned if it is non-zero." +msgstr "" + +#: extending/newtypes_tutorial.rst:723 +msgid "" +"Python provides a :c:func:`Py_VISIT` macro that automates calling visit " +"functions. With :c:func:`Py_VISIT`, we can minimize the amount of " +"boilerplate in ``Custom_traverse``::" +msgstr "" + +#: extending/newtypes_tutorial.rst:736 +msgid "" +"The :c:member:`~PyTypeObject.tp_traverse` implementation must name its " +"arguments exactly *visit* and *arg* in order to use :c:func:`Py_VISIT`." +msgstr "" + +#: extending/newtypes_tutorial.rst:739 +msgid "" +"Second, we need to provide a method for clearing any subobjects that can " +"participate in cycles::" +msgstr "" + +#: extending/newtypes_tutorial.rst:750 +msgid "" +"Notice the use of the :c:func:`Py_CLEAR` macro. It is the recommended and " +"safe way to clear data attributes of arbitrary types while decrementing " +"their reference counts. If you were to call :c:func:`Py_XDECREF` instead on " +"the attribute before setting it to ``NULL``, there is a possibility that the " +"attribute's destructor would call back into code that reads the attribute " +"again (*especially* if there is a reference cycle)." +msgstr "" + +#: extending/newtypes_tutorial.rst:758 +msgid "You could emulate :c:func:`Py_CLEAR` by writing::" +msgstr "" + +#: extending/newtypes_tutorial.rst:765 +msgid "" +"Nevertheless, it is much easier and less error-prone to always use :c:func:" +"`Py_CLEAR` when deleting an attribute. Don't try to micro-optimize at the " +"expense of robustness!" +msgstr "" + +#: extending/newtypes_tutorial.rst:769 +msgid "" +"The deallocator ``Custom_dealloc`` may call arbitrary code when clearing " +"attributes. It means the circular GC can be triggered inside the function. " +"Since the GC assumes reference count is not zero, we need to untrack the " +"object from the GC by calling :c:func:`PyObject_GC_UnTrack` before clearing " +"members. Here is our reimplemented deallocator using :c:func:" +"`PyObject_GC_UnTrack` and ``Custom_clear``::" +msgstr "" + +#: extending/newtypes_tutorial.rst:784 +msgid "" +"Finally, we add the :const:`Py_TPFLAGS_HAVE_GC` flag to the class flags::" +msgstr "" + +#: extending/newtypes_tutorial.rst:788 +msgid "" +"That's pretty much it. If we had written custom :c:member:`~PyTypeObject." +"tp_alloc` or :c:member:`~PyTypeObject.tp_free` handlers, we'd need to modify " +"them for cyclic garbage collection. Most extensions will use the versions " +"automatically provided." +msgstr "" + +#: extending/newtypes_tutorial.rst:794 +msgid "Subclassing other types" +msgstr "" + +#: extending/newtypes_tutorial.rst:796 +msgid "" +"It is possible to create new extension types that are derived from existing " +"types. It is easiest to inherit from the built in types, since an extension " +"can easily use the :c:type:`PyTypeObject` it needs. It can be difficult to " +"share these :c:type:`PyTypeObject` structures between extension modules." +msgstr "" + +#: extending/newtypes_tutorial.rst:801 +msgid "" +"In this example we will create a :class:`SubList` type that inherits from " +"the built-in :class:`list` type. The new type will be completely compatible " +"with regular lists, but will have an additional :meth:`increment` method " +"that increases an internal counter:" +msgstr "" + +#: extending/newtypes_tutorial.rst:821 +msgid "" +"As you can see, the source code closely resembles the :class:`Custom` " +"examples in previous sections. We will break down the main differences " +"between them. ::" +msgstr "" + +#: extending/newtypes_tutorial.rst:829 +msgid "" +"The primary difference for derived type objects is that the base type's " +"object structure must be the first value. The base type will already " +"include the :c:func:`PyObject_HEAD` at the beginning of its structure." +msgstr "" + +#: extending/newtypes_tutorial.rst:833 +msgid "" +"When a Python object is a :class:`SubList` instance, its ``PyObject *`` " +"pointer can be safely cast to both ``PyListObject *`` and ``SubListObject " +"*``::" +msgstr "" + +#: extending/newtypes_tutorial.rst:845 +msgid "" +"We see above how to call through to the :attr:`__init__` method of the base " +"type." +msgstr "" + +#: extending/newtypes_tutorial.rst:848 +msgid "" +"This pattern is important when writing a type with custom :c:member:" +"`~PyTypeObject.tp_new` and :c:member:`~PyTypeObject.tp_dealloc` members. " +"The :c:member:`~PyTypeObject.tp_new` handler should not actually create the " +"memory for the object with its :c:member:`~PyTypeObject.tp_alloc`, but let " +"the base class handle it by calling its own :c:member:`~PyTypeObject.tp_new`." +msgstr "" + +#: extending/newtypes_tutorial.rst:854 +msgid "" +"The :c:type:`PyTypeObject` struct supports a :c:member:`~PyTypeObject." +"tp_base` specifying the type's concrete base class. Due to cross-platform " +"compiler issues, you can't fill that field directly with a reference to :c:" +"type:`PyList_Type`; it should be done later in the module initialization " +"function::" +msgstr "" + +#: extending/newtypes_tutorial.rst:882 +msgid "" +"Before calling :c:func:`PyType_Ready`, the type structure must have the :c:" +"member:`~PyTypeObject.tp_base` slot filled in. When we are deriving an " +"existing type, it is not necessary to fill out the :c:member:`~PyTypeObject." +"tp_alloc` slot with :c:func:`PyType_GenericNew` -- the allocation function " +"from the base type will be inherited." +msgstr "" + +#: extending/newtypes_tutorial.rst:888 +msgid "" +"After that, calling :c:func:`PyType_Ready` and adding the type object to the " +"module is the same as with the basic :class:`Custom` examples." +msgstr "" + +#: extending/newtypes_tutorial.rst:893 +msgid "Footnotes" +msgstr "Notes" + +#: extending/newtypes_tutorial.rst:894 +msgid "" +"This is true when we know that the object is a basic type, like a string or " +"a float." +msgstr "" + +#: extending/newtypes_tutorial.rst:897 +msgid "" +"We relied on this in the :c:member:`~PyTypeObject.tp_dealloc` handler in " +"this example, because our type doesn't support garbage collection." +msgstr "" + +#: extending/newtypes_tutorial.rst:900 +msgid "" +"We now know that the first and last members are strings, so perhaps we could " +"be less careful about decrementing their reference counts, however, we " +"accept instances of string subclasses. Even though deallocating normal " +"strings won't call back into our objects, we can't guarantee that " +"deallocating an instance of a string subclass won't call back into our " +"objects." +msgstr "" + +#: extending/newtypes_tutorial.rst:906 +msgid "" +"Also, even with our attributes restricted to strings instances, the user " +"could pass arbitrary :class:`str` subclasses and therefore still create " +"reference cycles." +msgstr "" diff --git a/extending/windows.po b/extending/windows.po new file mode 100644 index 0000000000..4da8f03be8 --- /dev/null +++ b/extending/windows.po @@ -0,0 +1,283 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-05-21 16:37+0200\n" +"PO-Revision-Date: 2020-06-28 15:18+0200\n" +"Last-Translator: Julien Palard \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" + +#: extending/windows.rst:8 +msgid "Building C and C++ Extensions on Windows" +msgstr "Construire des extensions C et C++ sur Windows" + +#: extending/windows.rst:10 +msgid "" +"This chapter briefly explains how to create a Windows extension module for " +"Python using Microsoft Visual C++, and follows with more detailed background " +"information on how it works. The explanatory material is useful for both " +"the Windows programmer learning to build Python extensions and the Unix " +"programmer interested in producing software which can be successfully built " +"on both Unix and Windows." +msgstr "" +"Cette page explique rapidement comment créer un module d'extension Windows " +"pour Python en utilisant Microsoft Visual C++, et donne plus d'informations " +"contextuelles sur son fonctionnement. Le texte explicatif est utile tant " +"pour le développeur Windows qui apprend à construire des extensions Python " +"que pour le développeur Unix souhaitant produire des logiciels pouvant être " +"construits sur Unix et Windows." + +#: extending/windows.rst:17 +msgid "" +"Module authors are encouraged to use the distutils approach for building " +"extension modules, instead of the one described in this section. You will " +"still need the C compiler that was used to build Python; typically Microsoft " +"Visual C++." +msgstr "" +"Les auteurs de modules sont invités à utiliser l'approche *distutils* pour " +"construire des modules d'extension, au lieu de celle décrite dans cette " +"section. Vous aurez toujours besoin du compilateur C utilisé pour construire " +"Python ; typiquement Microsoft Visual C++." + +#: extending/windows.rst:24 +msgid "" +"This chapter mentions a number of filenames that include an encoded Python " +"version number. These filenames are represented with the version number " +"shown as ``XY``; in practice, ``'X'`` will be the major version number and " +"``'Y'`` will be the minor version number of the Python release you're " +"working with. For example, if you are using Python 2.2.1, ``XY`` will " +"actually be ``22``." +msgstr "" +"Cette page mentionne plusieurs noms de fichiers comprenant un numéro de " +"version Python encodé. Ces noms de fichiers sont construits sous le format " +"de version ``XY`` ; en pratique, ``'X'`` représente le numéro de version " +"majeure et ``'Y'`` représente le numéro de version mineure de la version " +"Python avec laquelle vous travaillez. Par exemple, si vous utilisez Python " +"2.2.1, ``XY`` correspond à ``22``." + +#: extending/windows.rst:34 +msgid "A Cookbook Approach" +msgstr "Une approche \"recette de cuisine\"" + +#: extending/windows.rst:36 +msgid "" +"There are two approaches to building extension modules on Windows, just as " +"there are on Unix: use the :mod:`distutils` package to control the build " +"process, or do things manually. The distutils approach works well for most " +"extensions; documentation on using :mod:`distutils` to build and package " +"extension modules is available in :ref:`distutils-index`. If you find you " +"really need to do things manually, it may be instructive to study the " +"project file for the :source:`winsound ` standard " +"library module." +msgstr "" +"Il y a deux approches lorsque l'on construit des modules d'extension sur " +"Windows, tout comme sur Unix : utiliser le paquet :mod:`distutils` pour " +"contrôler le processus de construction, ou faire les choses manuellement. " +"L'approche *distutils* fonctionne bien pour la plupart des extensions ; la " +"documentation pour utiliser :mod:`distutils` pour construire et empaqueter " +"les modules d'extension est disponible dans :ref:`distutils-index`. Si vous " +"considérez que vous avez réellement besoin de faire les choses manuellement, " +"il pourrait être enrichissant d'étudier le fichier de projet :source:" +"`winsound ` pour le module de la bibliothèque " +"standard." + +#: extending/windows.rst:48 +msgid "Differences Between Unix and Windows" +msgstr "Différences entre Unix et Windows" + +#: extending/windows.rst:53 +msgid "" +"Unix and Windows use completely different paradigms for run-time loading of " +"code. Before you try to build a module that can be dynamically loaded, be " +"aware of how your system works." +msgstr "" +"\\ Unix et Windows utilisent des paradigmes complètement différents pour le " +"chargement du code pendant l'exécution. Avant d'essayer de construire un " +"module qui puisse être chargé dynamiquement, soyez conscient du mode de " +"fonctionnement du système." + +#: extending/windows.rst:57 +msgid "" +"In Unix, a shared object (:file:`.so`) file contains code to be used by the " +"program, and also the names of functions and data that it expects to find in " +"the program. When the file is joined to the program, all references to " +"those functions and data in the file's code are changed to point to the " +"actual locations in the program where the functions and data are placed in " +"memory. This is basically a link operation." +msgstr "" +"Sur Unix, un fichier objet partagé (:file:`.so`) contient du code servant au " +"programme, ainsi que les noms des fonctions et les données que l'on " +"s'attend à trouver dans le programme. Quand le fichier est attaché au " +"programme, toutes les références à ces fonctions et données dans le code du " +"fichier sont modifiées pour pointer vers les localisations actuelles dans le " +"programme où sont désormais placées les fonctions et données dans la " +"mémoire. C'est tout simplement une opération de liaison." + +#: extending/windows.rst:64 +msgid "" +"In Windows, a dynamic-link library (:file:`.dll`) file has no dangling " +"references. Instead, an access to functions or data goes through a lookup " +"table. So the DLL code does not have to be fixed up at runtime to refer to " +"the program's memory; instead, the code already uses the DLL's lookup table, " +"and the lookup table is modified at runtime to point to the functions and " +"data." +msgstr "" +"Sur Windows, un fichier bibliothèque de liens dynamiques (:file:`.dll`) n'a " +"pas de références paresseuses. A la place, un accès aux fonctions ou données " +"passe par une table de conversion. Cela est fait pour que le code DLL ne " +"doive pas être réarrangé à l'exécution pour renvoyer à la mémoire du " +"programme ; à la place, le code utilise déjà la table de conversion DLL, et " +"cette table est modifiée à l'exécution pour pointer vers les fonctions et " +"données." + +#: extending/windows.rst:70 +msgid "" +"In Unix, there is only one type of library file (:file:`.a`) which contains " +"code from several object files (:file:`.o`). During the link step to create " +"a shared object file (:file:`.so`), the linker may find that it doesn't know " +"where an identifier is defined. The linker will look for it in the object " +"files in the libraries; if it finds it, it will include all the code from " +"that object file." +msgstr "" +"Sur Unix, il n'y a qu'un type de bibliothèque de fichier (:file:`.a`) qui " +"contient du code venant de plusieurs fichiers objets (:file:`.o`). Durant " +"l'étape de liaison pour créer un fichier objet partagé (:file:`.so`), le " +"lieur peut informer qu'il ne sait pas où un identificateur est défini. Le " +"lieur le cherchera dans les fichiers objet dans les bibliothèques ; s'il le " +"trouve, il inclura tout le code provenant de ce fichier objet." + +#: extending/windows.rst:76 +msgid "" +"In Windows, there are two types of library, a static library and an import " +"library (both called :file:`.lib`). A static library is like a Unix :file:`." +"a` file; it contains code to be included as necessary. An import library is " +"basically used only to reassure the linker that a certain identifier is " +"legal, and will be present in the program when the DLL is loaded. So the " +"linker uses the information from the import library to build the lookup " +"table for using identifiers that are not included in the DLL. When an " +"application or a DLL is linked, an import library may be generated, which " +"will need to be used for all future DLLs that depend on the symbols in the " +"application or DLL." +msgstr "" +"Sur Windows, il y a deux types de bibliothèques, une bibliothèque statique " +"et une bibliothèque d'importation (toutes deux appelées :file:`.lib`). Une " +"bibliothèque statique est comme un fichier Unix :file:`.a` ; elle contient " +"du code pouvant être inclus si nécessaire. Une bibliothèque d'importation " +"est uniquement utilisée pour rassurer le lieur qu'un certain identificateur " +"est légal, et sera présent dans le programme quand la DLL est chargée. Comme " +"ça le lieur utilise les informations provenant de la bibliothèque " +"d'importation pour construire la table de conversion pour utiliser les " +"identificateurs qui ne sont pas inclus dans la DLL. Quand une application ou " +"une DLL est liée, une bibliothèque d'importation peut être générée, qui " +"devra être utilisée pour toutes les futures DLL dépendantes aux symboles " +"provenant de l'application ou de la DLL." + +#: extending/windows.rst:86 +msgid "" +"Suppose you are building two dynamic-load modules, B and C, which should " +"share another block of code A. On Unix, you would *not* pass :file:`A.a` to " +"the linker for :file:`B.so` and :file:`C.so`; that would cause it to be " +"included twice, so that B and C would each have their own copy. In Windows, " +"building :file:`A.dll` will also build :file:`A.lib`. You *do* pass :file:" +"`A.lib` to the linker for B and C. :file:`A.lib` does not contain code; it " +"just contains information which will be used at runtime to access A's code." +msgstr "" +"Supposons que vous construisez deux modules de chargement dynamiques, B et " +"C, qui ne devraient pas partager un autre bloc de code avec A. Sur Unix, " +"vous ne transmettrez pas :file:`A.a` au lieur pour :file:`B.so` et :file:`C." +"so` ; cela le ferait être inclus deux fois, pour que B et C aient chacun " +"leur propre copie. Sur Windows, construire :file:`A.dll` construira aussi :" +"file:`A.lib`. Vous transmettez :file:`A.lib` au lieur pour B et C. :file:`A." +"lib` ne contient pas de code ; il contient uniquement des informations qui " +"seront utilisées lors de l'exécution pour accéder au code de A." + +#: extending/windows.rst:94 +msgid "" +"In Windows, using an import library is sort of like using ``import spam``; " +"it gives you access to spam's names, but does not create a separate copy. " +"On Unix, linking with a library is more like ``from spam import *``; it does " +"create a separate copy." +msgstr "" +"Sur Windows, utiliser une bibliothèque d'importation est comme utiliser " +"``import spam``; cela vous donne accès aux noms des spams, mais ne crée par " +"de copie séparée. Sur Unix, se lier à une bibliothèque est plus comme ``from " +"spam import *`` ; cela crée une copie séparée." + +#: extending/windows.rst:103 +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. 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: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 " +"spam), you could use these commands::" +msgstr "" +"Lorsque vous créez des DLL sur Windows, vous devez transmettre :file:" +"`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: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 " +"functions (such as :c:func:`PyArg_ParseTuple`), but it does know how to find " +"the Python code thanks to :file:`pythonXY.lib`." +msgstr "" +"La première commande a créé trois fichiers : :file:`spam.obj`, :file:`spam." +"dll` et :file:`spam.lib`. :file:`Spam.dll` ne contient pas de fonctions " +"Python (telles que :c:func:`PyArg_ParseTuple`), mais il sait comment trouver " +"le code Python grâce à :file:`pythonXY.lib`." + +#: 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 " +"from the Python executable." +msgstr "" +"La seconde commande a créé :file:`ni.dll` (et :file:`.obj` et :file:`.lib`), " +"qui sait comment trouver les fonctions nécessaires dans spam, ainsi qu'à " +"partir de l'exécutable Python." + +#: 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 " +"say ``_declspec(dllexport)``, as in ``void _declspec(dllexport) " +"initspam(void)`` or ``PyObject _declspec(dllexport) *NiGetSpamData(void)``." +msgstr "" +"Chaque identificateur n'est pas exporté vers la table de conversion. Si vous " +"voulez que tout autre module (y compris Python) soit capable de voir vos " +"identificateurs, vous devez préciser ``_declspec(dllexport)``, comme dans " +"``void _declspec(dllexport) initspam(void)`` ou ``PyObject " +"_declspec(dllexport) *NiGetSpamData(void)``." + +#: 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 " +"the Project Settings dialog, Link tab, to specify *ignore default " +"libraries*. Add the correct :file:`msvcrtxx.lib` to the list of libraries." +msgstr "" +"\\ Developer Studio apportera beaucoup de bibliothèques d'importation dont " +"vous n'avez pas vraiment besoin, augmentant d'environ *100ko* votre " +"exécutable. Pour s'en débarrasser, allez dans les Paramètres du Projet, " +"onglet Lien, pour préciser *ignorer les bibliothèques par défaut*. Et la :" +"file:`msvcrtxx.lib` correcte à la liste des bibliothèques." diff --git a/faq/design.po b/faq/design.po new file mode 100644 index 0000000000..8bf70eed75 --- /dev/null +++ b/faq/design.po @@ -0,0 +1,1502 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-18 15:46+0200\n" +"PO-Revision-Date: 2022-10-18 16:08+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 3.0\n" + +#: faq/design.rst:3 +msgid "Design and History FAQ" +msgstr "FAQ sur l'histoire et la conception" + +#: faq/design.rst:6 +msgid "Contents" +msgstr "Sommaire" + +#: faq/design.rst:11 +msgid "Why does Python use indentation for grouping of statements?" +msgstr "" +"Pourquoi Python utilise-t-il l'indentation pour grouper les instructions ?" + +#: faq/design.rst:13 +msgid "" +"Guido van Rossum believes that using indentation for grouping is extremely " +"elegant and contributes a lot to the clarity of the average Python program. " +"Most people learn to love this feature after a while." +msgstr "" +"Guido van Rossum considère que l'usage de l'indentation pour regrouper les " +"blocs d'instruction est élégant et contribue énormément à la clarté d'un " +"programme Python ordinaire. La plupart des gens finissent par aimer cette " +"particularité au bout d'un moment." + +#: faq/design.rst:17 +msgid "" +"Since there are no begin/end brackets there cannot be a disagreement between " +"grouping perceived by the parser and the human reader. Occasionally C " +"programmers will encounter a fragment of code like this::" +msgstr "" +"Comme il n'y a pas d'accolades de début et fin, il ne peut y avoir de " +"différence entre le bloc perçu par l'analyseur syntaxique et le lecteur " +"humain. Parfois les programmeurs C pourront trouver un morceau de code comme " +"celui-ci ::" + +#: faq/design.rst:26 +msgid "" +"Only the ``x++`` statement is executed if the condition is true, but the " +"indentation leads many to believe otherwise. Even experienced C programmers " +"will sometimes stare at it a long time wondering as to why ``y`` is being " +"decremented even for ``x > y``." +msgstr "" +"Seule l'instruction ``x++`` est exécutée si la condition est vraie, mais " +"l'indentation conduit beaucoup de gens à penser le contraire. Mêmes des " +"développeurs C expérimentés peuvent parfois rester pendant un moment à se " +"demander pourquoi ``y`` est décrémenté même si ``x > y``." + +#: faq/design.rst:31 +msgid "" +"Because there are no begin/end brackets, Python is much less prone to coding-" +"style conflicts. In C there are many different ways to place the braces. " +"After becoming used to reading and writing code using a particular style, it " +"is normal to feel somewhat uneasy when reading (or being required to write) " +"in a different one." +msgstr "" +"Comme il n'y a pas d'accolades de début et fin, Python est moins sujet aux " +"conflits de style de code. En C, on peut placer les accolades de nombreuses " +"façons. Après s'être habitué à lire et écrire selon un style particulier, il " +"est normal de se sentir perturbé en lisant (ou en devant écrire) avec un " +"autre style." + +#: faq/design.rst:38 +msgid "" +"Many coding styles place begin/end brackets on a line by themselves. This " +"makes programs considerably longer and wastes valuable screen space, making " +"it harder to get a good overview of a program. Ideally, a function should " +"fit on one screen (say, 20--30 lines). 20 lines of Python can do a lot more " +"work than 20 lines of C. This is not solely due to the lack of begin/end " +"brackets -- the lack of declarations and the high-level data types are also " +"responsible -- but the indentation-based syntax certainly helps." +msgstr "" +"Nombre de styles de programmation utilisent des accolades de début et fin " +"sur une ligne à part. Cela rend les programmes beaucoup plus longs et fait " +"perdre une bonne partie de l'espace visible sur l'écran, empêchant un peu " +"d'avoir une vue globale du programme. Idéalement, une fonction doit être " +"visible sur un écran (environ 20 ou 30 lignes). 20 lignes de Python peuvent " +"faire beaucoup plus que 20 lignes de C. Ce n'est pas seulement dû à " +"l'absence d'accolades de début et fin — l'absence de déclarations et la " +"présence de types de haut-niveau en sont également responsables — mais la " +"syntaxe basée sur l'indentation aide sûrement." + +#: faq/design.rst:48 +msgid "Why am I getting strange results with simple arithmetic operations?" +msgstr "" +"Pourquoi ai-je d'étranges résultats suite à de simples opérations " +"arithmétiques ?" + +#: faq/design.rst:50 +msgid "See the next question." +msgstr "Voir la question suivante." + +#: faq/design.rst:54 +msgid "Why are floating-point calculations so inaccurate?" +msgstr "Pourquoi les calculs à virgules flottantes sont si imprécis ?" + +#: faq/design.rst:56 +msgid "Users are often surprised by results like this::" +msgstr "Les gens sont très souvent surpris par des résultats comme celui-ci ::" + +#: faq/design.rst:61 +msgid "" +"and think it is a bug in Python. It's not. This has little to do with " +"Python, and much more to do with how the underlying platform handles " +"floating-point numbers." +msgstr "" +"et pensent que c'est un bogue dans Python. Ça n'en est pas un. Ceci n'a " +"d'ailleurs que peu à voir avec Python, mais avec la manière dont la " +"plateforme sous-jacente gère les nombres à virgule flottante." + +#: faq/design.rst:65 +msgid "" +"The :class:`float` type in CPython uses a C ``double`` for storage. A :" +"class:`float` object's value is stored in binary floating-point with a fixed " +"precision (typically 53 bits) and Python uses C operations, which in turn " +"rely on the hardware implementation in the processor, to perform floating-" +"point operations. This means that as far as floating-point operations are " +"concerned, Python behaves like many popular languages including C and Java." +msgstr "" +"La classe :class:`float` dans CPython utilise le type double du langage C " +"comme stockage. La valeur d'un objet :class:`float` est stockée dans un " +"format binaire à virgule flottante avec une précision fixe (généralement 53 " +"bits). Python utilise des opérations qui proviennent du langage C qui à leur " +"tour reposent sur l'implémentation au niveau du processeur afin d'effectuer " +"des opérations en virgule flottante. Cela signifie que, dans le cadre des " +"opérations sur les nombres à virgule flottante, Python se comporte comme " +"beaucoup de langages populaires dont C et Java." + +#: faq/design.rst:72 +msgid "" +"Many numbers that can be written easily in decimal notation cannot be " +"expressed exactly in binary floating-point. For example, after::" +msgstr "" +"Beaucoup de nombres pouvant être écrits facilement en notation décimale ne " +"peuvent pas s'exprimer de manière exacte en binaire à virgule flottante. Par " +"exemple, après ::" + +#: faq/design.rst:77 +msgid "" +"the value stored for ``x`` is a (very good) approximation to the decimal " +"value ``1.2``, but is not exactly equal to it. On a typical machine, the " +"actual stored value is::" +msgstr "" +"la valeur stockée pour ``x`` est une (très bonne) approximation de la valeur " +"décimale ``1.2``, mais cette valeur n'est pas exacte. Sur une machine " +"typique, la valeur stockée est en fait ::" + +#: faq/design.rst:83 +msgid "which is exactly::" +msgstr "qui est, exactement ::" + +#: faq/design.rst:87 +msgid "" +"The typical precision of 53 bits provides Python floats with 15--16 decimal " +"digits of accuracy." +msgstr "" +"La précision typique de 53 bits des *floats* Python permet une précision de " +"15–16 décimales." + +#: faq/design.rst:90 +msgid "" +"For a fuller explanation, please see the :ref:`floating point arithmetic " +"` chapter in the Python tutorial." +msgstr "" +"Veuillez vous référer au chapitre sur :ref:`l'arithmétique en nombres à " +"virgule flottante ` du tutoriel Python pour de plus amples " +"informations." + +#: faq/design.rst:95 +msgid "Why are Python strings immutable?" +msgstr "Pourquoi les chaînes de caractères Python sont-elles immuables ?" + +#: faq/design.rst:97 +msgid "There are several advantages." +msgstr "Il y a plusieurs avantages." + +#: faq/design.rst:99 +msgid "" +"One is performance: knowing that a string is immutable means we can allocate " +"space for it at creation time, and the storage requirements are fixed and " +"unchanging. This is also one of the reasons for the distinction between " +"tuples and lists." +msgstr "" +"La première concerne la performance : savoir qu'une chaîne de caractères est " +"immuable signifie que l'allocation mémoire allouée lors de la création de " +"cette chaîne est fixe et figée. C'est aussi l'une des raisons pour " +"lesquelles on fait la distinction entre les *n*-uplets et les listes." + +#: faq/design.rst:104 +msgid "" +"Another advantage is that strings in Python are considered as \"elemental\" " +"as numbers. No amount of activity will change the value 8 to anything else, " +"and in Python, no amount of activity will change the string \"eight\" to " +"anything else." +msgstr "" +"Un autre avantage est que les chaînes en Python sont considérées aussi " +"« élémentaires » que les nombres. Aucun processus ne changera la valeur du " +"nombre 8 en autre chose et, en Python, aucun processus ne changera la chaîne " +"de caractères \"huit\" en autre chose." + +#: faq/design.rst:112 +msgid "Why must 'self' be used explicitly in method definitions and calls?" +msgstr "" +"Pourquoi *self* doit-il être explicitement utilisé dans les définitions et " +"les appels de méthodes ?" + +#: faq/design.rst:114 +msgid "" +"The idea was borrowed from Modula-3. It turns out to be very useful, for a " +"variety of reasons." +msgstr "" +"L'idée a été empruntée à Modula-3. Cela s'avère très utile, pour diverses " +"raisons." + +#: faq/design.rst:117 +msgid "" +"First, it's more obvious that you are using a method or instance attribute " +"instead of a local variable. Reading ``self.x`` or ``self.meth()`` makes it " +"absolutely clear that an instance variable or method is used even if you " +"don't know the class definition by heart. In C++, you can sort of tell by " +"the lack of a local variable declaration (assuming globals are rare or " +"easily recognizable) -- but in Python, there are no local variable " +"declarations, so you'd have to look up the class definition to be sure. " +"Some C++ and Java coding standards call for instance attributes to have an " +"``m_`` prefix, so this explicitness is still useful in those languages, too." +msgstr "" +"Tout d'abord, il est plus évident d'utiliser une méthode ou un attribut " +"d'instance par exemple au lieu d'une variable locale. Lire ``self.x`` ou " +"``self.meth()`` est sans ambiguïté sur le fait que c'est une variable " +"d'instance ou une méthode qui est utilisée, même si vous ne connaissez pas " +"la définition de classe par cœur. En C++, vous pouvez les reconnaître par " +"l'absence d'une déclaration de variable locale (en supposant que les " +"variables globales sont rares ou facilement reconnaissables) — mais en " +"Python, il n'y a pas de déclarations de variables locales, de sorte que vous " +"devriez chercher la définition de classe pour être sûr. Certaines normes de " +"programmation C++ et Java préfixent les attributs d'instance par ``m_``. " +"Cette syntaxe explicite est ainsi utile également pour ces langages." + +#: faq/design.rst:127 +msgid "" +"Second, it means that no special syntax is necessary if you want to " +"explicitly reference or call the method from a particular class. In C++, if " +"you want to use a method from a base class which is overridden in a derived " +"class, you have to use the ``::`` operator -- in Python you can write " +"``baseclass.methodname(self, )``. This is particularly " +"useful for :meth:`__init__` methods, and in general in cases where a derived " +"class method wants to extend the base class method of the same name and thus " +"has to call the base class method somehow." +msgstr "" +"Ensuite, ça veut dire qu'aucune syntaxe spéciale n'est nécessaire si vous " +"souhaitez explicitement référencer ou appeler la méthode depuis une classe " +"en particulier. En C++, si vous utilisez la méthode d'une classe de base " +"elle-même surchargée par une classe dérivée, vous devez utiliser l'opérateur " +"``::`` — en Python vous pouvez écrire ``ClasseDeBase.nom_methode(self, " +")``. C'est particulièrement utile pour les méthodes :meth:" +"`__init__` et, de manière générale, dans les cas où une classe dérivée veut " +"étendre la méthode du même nom de la classe de base, et doit donc se " +"débrouiller pour appeler la méthode de la classe de base." + +#: faq/design.rst:136 +msgid "" +"Finally, for instance variables it solves a syntactic problem with " +"assignment: since local variables in Python are (by definition!) those " +"variables to which a value is assigned in a function body (and that aren't " +"explicitly declared global), there has to be some way to tell the " +"interpreter that an assignment was meant to assign to an instance variable " +"instead of to a local variable, and it should preferably be syntactic (for " +"efficiency reasons). C++ does this through declarations, but Python doesn't " +"have declarations and it would be a pity having to introduce them just for " +"this purpose. Using the explicit ``self.var`` solves this nicely. " +"Similarly, for using instance variables, having to write ``self.var`` means " +"that references to unqualified names inside a method don't have to search " +"the instance's directories. To put it another way, local variables and " +"instance variables live in two different namespaces, and you need to tell " +"Python which namespace to use." +msgstr "" +"Enfin, pour des variables d'instance, ça résout un problème syntactique pour " +"l'assignation : puisque les variables locales en Python sont (par " +"définition !) ces variables auxquelles les valeurs sont assignées dans le " +"corps d'une fonction (et n'étant pas déclarées explicitement globales), il " +"doit y avoir un moyen de dire à l'interpréteur qu'une assignation est censée " +"assigner une variable d'instance plutôt qu'une variable locale, et doit de " +"préférence être syntactique (pour des raisons d'efficacité). C++ fait ça au " +"travers de déclarations, mais Python n'a pas de déclarations et ça serait " +"dommage d'avoir à les introduire juste pour cette raison. Utiliser " +"explicitement ``self.var`` résout ça avec élégance. Pareillement, pour " +"utiliser des variables d'instance, avoir à écrire ``self.var`` signifie que " +"les références vers des noms non-qualifiés au sein d'une méthode n'ont pas à " +"être cherchés dans l'annuaire d'instances. En d'autres termes, les variables " +"locales et les variables d'instance vivent dans deux différents espaces de " +"nommage, et vous devez dire à Python quel espace de nommage utiliser." + +#: faq/design.rst:154 +msgid "Why can't I use an assignment in an expression?" +msgstr "Pourquoi ne puis-je pas utiliser d'assignation dans une expression ?" + +#: faq/design.rst:156 +msgid "Starting in Python 3.8, you can!" +msgstr "Depuis Python 3.8, c'est possible !" + +#: faq/design.rst:158 +#, fuzzy +msgid "" +"Assignment expressions using the walrus operator ``:=`` assign a variable in " +"an expression::" +msgstr "" +"Les expressions d'affectation qui utilisent l'opérateur morse ``:=`` " +"affectent une variable dans une expression ::" + +#: faq/design.rst:164 +msgid "See :pep:`572` for more information." +msgstr "Voir la :pep:`572` pour plus d'informations." + +#: faq/design.rst:169 +msgid "" +"Why does Python use methods for some functionality (e.g. list.index()) but " +"functions for other (e.g. len(list))?" +msgstr "" +"Pourquoi Python utilise des méthodes pour certaines fonctionnalités (ex : " +"``list.index()``) mais des fonctions pour d'autres (ex : ``len(list)``) ?" + +#: faq/design.rst:171 +msgid "As Guido said:" +msgstr "Comme l'a dit Guido :" + +#: faq/design.rst:173 +msgid "" +"(a) For some operations, prefix notation just reads better than postfix -- " +"prefix (and infix!) operations have a long tradition in mathematics which " +"likes notations where the visuals help the mathematician thinking about a " +"problem. Compare the easy with which we rewrite a formula like x*(a+b) into " +"x*a + x*b to the clumsiness of doing the same thing using a raw OO notation." +msgstr "" +"(a) Pour certaines opérations, la notation préfixe se lit mieux que celle " +"suffixe — les opérations préfixe (et infixe !) sont une longue tradition en " +"mathématique, où on apprécie les notations qui aident visuellement le " +"mathématicien à réfléchir sur un problème. Comparez la facilité avec " +"laquelle nous réécrivons une formule comme x*(a+b) en x*a + x*b à la " +"lourdeur de faire la même chose avec une notation orientée objet brute." + +#: faq/design.rst:180 +msgid "" +"(b) When I read code that says len(x) I *know* that it is asking for the " +"length of something. This tells me two things: the result is an integer, and " +"the argument is some kind of container. To the contrary, when I read x." +"len(), I have to already know that x is some kind of container implementing " +"an interface or inheriting from a class that has a standard len(). Witness " +"the confusion we occasionally have when a class that is not implementing a " +"mapping has a get() or keys() method, or something that isn't a file has a " +"write() method." +msgstr "" +"(b) Quand je lis du code qui dit ``len(x)`` *je sais* qu'il demande la " +"longueur de quelque chose. Cela me dit deux choses : le résultat est un " +"entier, et l'argument est une sorte de conteneur. Au contraire, quand je lis " +"``x.len()``, je dois déjà savoir que x est une sorte de conteneur " +"implémentant une interface ou héritant d'une classe qui a un ``len()`` " +"standard. Voyez la confusion qui arrive parfois quand une classe qui " +"n'implémente pas une interface de dictionnaire a une méthode ``get()`` ou " +"``key()``, ou quand un objet qui n'est pas un fichier implémente une méthode " +"``write()``." + +#: faq/design.rst:189 +msgid "https://mail.python.org/pipermail/python-3000/2006-November/004643.html" +msgstr "" +"https://mail.python.org/pipermail/python-3000/2006-November/004643.html" + +#: faq/design.rst:193 +msgid "Why is join() a string method instead of a list or tuple method?" +msgstr "" +"Pourquoi ``join()`` est une méthode de chaîne plutôt qu'une méthode de liste " +"ou de *n*-uplet ?" + +#: faq/design.rst:195 +msgid "" +"Strings became much more like other standard types starting in Python 1.6, " +"when methods were added which give the same functionality that has always " +"been available using the functions of the string module. Most of these new " +"methods have been widely accepted, but the one which appears to make some " +"programmers feel uncomfortable is::" +msgstr "" +"Les chaînes sont devenues bien plus comme d'autres types standards à partir " +"de Python 1.6, lorsque les méthodes ont été ajoutées fournissant ainsi les " +"mêmes fonctionnalités que celles qui étaient déjà disponibles en utilisant " +"les fonctions du module string. La plupart de ces nouvelles méthodes ont été " +"largement acceptées, mais celle qui semble rendre certains programmeurs mal " +"à l'aise est ::" + +#: faq/design.rst:203 +msgid "which gives the result::" +msgstr "qui donne le résultat ::" + +#: faq/design.rst:207 +msgid "There are two common arguments against this usage." +msgstr "Il y a deux arguments fréquents contre cet usage." + +#: faq/design.rst:209 +msgid "" +"The first runs along the lines of: \"It looks really ugly using a method of " +"a string literal (string constant)\", to which the answer is that it might, " +"but a string literal is just a fixed value. If the methods are to be allowed " +"on names bound to strings there is no logical reason to make them " +"unavailable on literals." +msgstr "" +"Le premier argument peut se résumer à : « c'est vraiment moche d'utiliser " +"une méthode de chaîne littérale (c.-à-d. constante) ». La réponse est " +"« certes, mais une chaîne littérale est une valeur comme une autre, juste " +"fixe ». Si on utilise les méthodes sur des noms de variables, il n'y a pas " +"de raison à les interdire sur des chaînes littérales." + +#: faq/design.rst:215 +msgid "" +"The second objection is typically cast as: \"I am really telling a sequence " +"to join its members together with a string constant\". Sadly, you aren't. " +"For some reason there seems to be much less difficulty with having :meth:" +"`~str.split` as a string method, since in that case it is easy to see that ::" +msgstr "" +"Le second consiste à se demander : « suis-je réellement en train de dire à " +"une séquence de joindre ses membres avec une constante de chaîne ? ». " +"Malheureusement, ce n'est pas ça. Allez savoir, il semble être bien moins " +"difficile de comprendre ce qui se passe avec :meth:`~str.split` en tant que " +"méthode de chaîne, puisque dans ce cas il est facile de voir que ::" + +#: faq/design.rst:222 +msgid "" +"is an instruction to a string literal to return the substrings delimited by " +"the given separator (or, by default, arbitrary runs of white space)." +msgstr "" +"est une instruction à une chaîne littérale de renvoyer les sous-chaînes " +"délimitées par le séparateur fourni (ou, par défaut, les espaces ou groupes " +"d'espaces)." + +#: faq/design.rst:225 +msgid "" +":meth:`~str.join` is a string method because in using it you are telling the " +"separator string to iterate over a sequence of strings and insert itself " +"between adjacent elements. This method can be used with any argument which " +"obeys the rules for sequence objects, including any new classes you might " +"define yourself. Similar methods exist for bytes and bytearray objects." +msgstr "" +":meth:`~str.join` est une méthode de chaîne parce qu'en l'utilisant vous " +"dites au séparateur de chaîne d'itérer une séquence de chaînes et de " +"s'insérer entre les éléments adjacents. Cette méthode peut être utilisée " +"avec n'importe quel argument qui obéit aux règles d'objets séquence, " +"incluant n'importe quelles nouvelles classes que vous pourriez définir vous-" +"même. Des méthodes similaires existent pour des objets ``bytes`` et " +"``bytearray``." + +#: faq/design.rst:233 +msgid "How fast are exceptions?" +msgstr "À quel point les exceptions sont-elles rapides ?" + +#: faq/design.rst:235 +msgid "" +"A try/except block is extremely efficient if no exceptions are raised. " +"Actually catching an exception is expensive. In versions of Python prior to " +"2.0 it was common to use this idiom::" +msgstr "" +"Un bloc ``try`` … ``except`` est extrêmement efficient tant qu'aucune " +"exception n'est levée. En effet, intercepter une exception s'avère coûteux. " +"Dans les versions antérieures à Python 2.0, il était courant d'écrire ceci ::" + +#: faq/design.rst:245 +msgid "" +"This only made sense when you expected the dict to have the key almost all " +"the time. If that wasn't the case, you coded it like this::" +msgstr "" +"Cela n'a de sens que si vous vous attendez à ce que le dictionnaire ait la " +"clé presque tout le temps. Si ce n'était pas le cas, vous l'auriez codé " +"comme suit ::" + +#: faq/design.rst:253 +msgid "" +"For this specific case, you could also use ``value = dict.setdefault(key, " +"getvalue(key))``, but only if the ``getvalue()`` call is cheap enough " +"because it is evaluated in all cases." +msgstr "" +"Pour ce cas, vous pouvez également utiliser ``value = dict.setdefault(key, " +"getvalue(key))``, mais seulement si l'appel à ``getvalue()`` est " +"suffisamment peu coûteux car il est évalué dans tous les cas." + +#: faq/design.rst:259 +msgid "Why isn't there a switch or case statement in Python?" +msgstr "" +"Pourquoi n'y a-t-il pas une instruction *switch* ou une structure similaire " +"à *switch / case* en Python ?" + +#: faq/design.rst:261 +msgid "" +"You can do this easily enough with a sequence of ``if... elif... elif... " +"else``. For literal values, or constants within a namespace, you can also " +"use a ``match ... case`` statement." +msgstr "" +"Il est facile de réaliser cette structure avec une suite ``if... elif... " +"elif... else``. Pour comparer à des littéraux, ou à des constantes qui sont " +"encapsulées dans un espace de nommage, on peut aussi utiliser l'instruction " +"``match ... case``." + +#: faq/design.rst:265 +msgid "" +"For cases where you need to choose from a very large number of " +"possibilities, you can create a dictionary mapping case values to functions " +"to call. For example::" +msgstr "" +"Dans les cas où vous devez choisir parmi un très grand nombre de " +"possibilités, vous pouvez créer un dictionnaire faisant correspondre des " +"valeurs à des fonctions à appeler. Par exemple ::" + +#: faq/design.rst:276 +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::" +msgstr "" +"Pour appeler les méthodes sur des objets, vous pouvez simplifier davantage " +"en utilisant la fonction native :func:`getattr` pour récupérer les méthodes " +"avec un nom donné ::" + +#: faq/design.rst:288 +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 " +"from an untrusted source, an attacker would be able to call any method on " +"your object." +msgstr "" +"Il est suggéré que vous utilisiez un préfixe pour les noms de méthodes, " +"telles que ``visit_`` dans cet exemple. Sans ce préfixe, si les valeurs " +"proviennent d'une source non fiable, un attaquant serait en mesure d'appeler " +"n'importe quelle méthode sur votre objet." + +#: faq/design.rst:294 +msgid "" +"Can't you emulate threads in the interpreter instead of relying on an OS-" +"specific thread implementation?" +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écifiques aux systèmes d'exploitation ?" + +#: faq/design.rst:296 +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 " +"almost random moments. Therefore, a complete threads implementation " +"requires thread support for C." +msgstr "" +"Réponse 1 : malheureusement, l'interpréteur pousse au moins un bloc de pile " +"C (*stack frame*) pour chaque bloc de pile de Python. Aussi, les extensions " +"peuvent rappeler dans Python à presque n'importe quel moment. Par " +"conséquent, une implémentation complète des fils d'exécution nécessiterait " +"une gestion complète pour le C." + +#: faq/design.rst:301 +msgid "" +"Answer 2: Fortunately, there is `Stackless Python `_, which has a completely redesigned " +"interpreter loop that avoids the C stack." +msgstr "" +"Réponse 2 : heureusement, il existe `Stackless Python `_, qui a complètement ré-architecturé la " +"boucle principale de l'interpréteur afin de ne pas utiliser la pile C." + +#: faq/design.rst:306 +msgid "Why can't lambda expressions contain statements?" +msgstr "" +"Pourquoi les expressions lambda ne peuvent pas contenir d'instructions ?" + +#: faq/design.rst:308 +msgid "" +"Python lambda expressions cannot contain statements because Python's " +"syntactic framework can't handle statements nested inside expressions. " +"However, in Python, this is not a serious problem. Unlike lambda forms in " +"other languages, where they add functionality, Python lambdas are only a " +"shorthand notation if you're too lazy to define a function." +msgstr "" +"Les expressions lambda de Python ne peuvent pas contenir d'instructions " +"parce que le cadre syntaxique de Python ne peut pas gérer les instructions " +"imbriquées à l'intérieur d'expressions. Cependant, en Python, ce n'est pas " +"vraiment un problème. Contrairement aux formes lambda dans d'autres " +"langages, où elles ajoutent des fonctionnalités, les expressions lambda de " +"Python sont seulement une notation concise si vous êtes trop paresseux pour " +"définir une fonction." + +#: faq/design.rst:314 +#, fuzzy +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 " +"locally defined function is that you don't need to invent a name for the " +"function -- but that's just a local variable to which the function object " +"(which is exactly the same type of object that a lambda expression yields) " +"is assigned!" +msgstr "" +"Les fonctions sont déjà des objets de première classe en Python et peuvent " +"être déclarées dans une portée locale. L'unique avantage d'utiliser une " +"fonction lambda au lieu d'une fonction définie localement est que vous " +"n'avez nullement besoin d'un nom pour la fonction — mais c'est juste une " +"variable locale à laquelle est affecté l'objet fonction (qui est exactement " +"le même type d'objet que celui renvoyé par une expression lambda) !" + +#: faq/design.rst:322 +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:324 +#, fuzzy +msgid "" +"`Cython `_ compiles a modified version of Python with " +"optional annotations into C extensions. `Nuitka `_ " +"is an up-and-coming compiler of Python into C++ code, aiming to support the " +"full Python language." +msgstr "" +"`Cython `_ compile une version modifiée de Python avec " +"des annotations optionnelles en extensions C. `Nuitka `_ est un nouveau compilateur de Python vers C++, visant à supporter le " +"langage Python entièrement. Pour compiler en Java, vous pouvez regarder `VOC " +"`_." + +#: faq/design.rst:331 +msgid "How does Python manage memory?" +msgstr "Comment Python gère la mémoire ?" + +#: faq/design.rst:333 +msgid "" +"The details of Python memory management depend on the implementation. The " +"standard implementation of Python, :term:`CPython`, uses reference counting " +"to detect inaccessible objects, and another mechanism to collect reference " +"cycles, periodically executing a cycle detection algorithm which looks for " +"inaccessible cycles and deletes the objects involved. The :mod:`gc` module " +"provides functions to perform a garbage collection, obtain debugging " +"statistics, and tune the collector's parameters." +msgstr "" +"Les détails de la gestion de la mémoire en Python dépendent de " +"l'implémentation. En effet, l'implémentation standard de Python, :term:" +"`CPython`, utilise des compteurs de références afin de détecter des objets " +"inaccessibles et un autre mécanisme pour collecter les références " +"circulaires, exécutant périodiquement un algorithme de détection de cycles " +"qui recherche les cycles inaccessibles et supprime les objets impliqués. Le " +"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:341 +#, fuzzy +msgid "" +"Other implementations (such as `Jython `_ or `PyPy " +"`_), however, can rely on a different mechanism such " +"as a full-blown garbage collector. This difference can cause some subtle " +"porting problems if your Python code depends on the behavior of the " +"reference counting implementation." +msgstr "" +"Cependant, d'autres implémentations (par exemple `Jython `_ ou `PyPy `_) peuvent compter sur un mécanisme " +"différent comme un véritable ramasse-miettes. Cette différence peut causer " +"de 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:347 +msgid "" +"In some Python implementations, the following code (which is fine in " +"CPython) will probably run out of file descriptors::" +msgstr "" +"Dans certaines implémentations de Python, le code suivant (qui fonctionne " +"parfaitement avec *CPython*) aurait probablement manqué de descripteurs de " +"fichiers ::" + +#: faq/design.rst:354 +msgid "" +"Indeed, using CPython's reference counting and destructor scheme, each new " +"assignment to *f* closes the previous file. With a traditional GC, however, " +"those file objects will only get collected (and closed) at varying and " +"possibly long intervals." +msgstr "" +"En effet, à l'aide du comptage de références et du destructeur d'objets de " +"*CPython*, chaque nouvelle affectation à *f* ferme le fichier précédent. " +"Cependant, avec un ramasse-miettes classique, ces objets sont collectés (et " +"fermés) à intervalles irréguliers, et potentiellement longs." + +#: faq/design.rst:359 +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 " +"will work regardless of memory management scheme::" +msgstr "" +"Si vous souhaitez écrire du code qui fonctionne avec n'importe quelle " +"implémentation de Python, vous devez explicitement fermer le fichier ou " +"utiliser l'instruction :keyword:`with` ; ceci fonctionne indépendamment du " +"système de gestion de la mémoire ::" + +#: faq/design.rst:369 +msgid "Why doesn't CPython use a more traditional garbage collection scheme?" +msgstr "" +"Pourquoi CPython n'utilise-t-il pas un modèle de ramasse-miettes plus " +"traditionnel ?" + +#: faq/design.rst:371 +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 " +"*most* common platforms, not for all of them, and although it is mostly " +"transparent, it isn't completely transparent; patches are required to get " +"Python to work with it.)" +msgstr "" +"D'une part, ce n'est pas une caractéristique normalisée en C et, par " +"conséquent, ce n'est pas portable. (Oui, nous connaissons la bibliothèque " +"*GC Boehm*. Elle contient du code assembleur pour la plupart des plateformes " +"classiques, mais pas toutes, et bien qu'elle soit le plus souvent " +"transparente, elle ne l'est pas complètement ; des correctifs sont " +"nécessaires afin que Python fonctionne correctement avec.)" + +#: faq/design.rst:377 +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 " +"standard malloc() and free() with versions provided by the GC library, an " +"application embedding Python may want to have its *own* substitute for " +"malloc() and free(), and may not want Python's. Right now, CPython works " +"with anything that implements malloc() and free() properly." +msgstr "" +"Un ramasse-miettes classique devient également un problème lorsque Python " +"est incorporé dans d'autres applications. Bien que dans une application " +"Python, il ne soit pas gênant de remplacer les fonctions ``malloc()`` et " +"``free()`` avec les versions fournies par la bibliothèque du ramasse-" +"miettes, une application incluant Python peut vouloir avoir ses propres " +"implémentations de ``malloc()`` et ``free()`` et peut ne pas vouloir celles " +"de Python. À l'heure actuelle, CPython fonctionne avec n'importe quelle " +"implémentation correcte de ``malloc()`` et ``free()``." + +#: faq/design.rst:386 +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:388 +msgid "" +"Objects referenced from the global namespaces of Python modules are not " +"always deallocated when Python exits. This may happen if there are circular " +"references. There are also certain bits of memory that are allocated by the " +"C library that are impossible to free (e.g. a tool like Purify will complain " +"about these). Python is, however, aggressive about cleaning up memory on " +"exit and does try to destroy every single object." +msgstr "" +"Les objets référencés depuis les espaces de nommage globaux des modules " +"Python ne sont pas toujours désalloués lorsque Python s'arrête. Cela peut se " +"produire s'il y a des références circulaires. Il y a aussi certaines parties " +"de mémoire qui sont allouées par la bibliothèque C qui sont impossibles à " +"libérer (par exemple un outil comme *Purify* s'en plaindra). Python est, " +"cependant, agressif sur le nettoyage de la mémoire en quittant et cherche à " +"détruire chaque objet." + +#: faq/design.rst:395 +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." +msgstr "" +"Si vous voulez forcer Python à désallouer certains objets en quittant, " +"utilisez le module :mod:`atexit` pour exécuter une fonction qui va forcer " +"ces destructions." + +#: faq/design.rst:400 +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:402 +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 " +"Pascal records or C structs; they're small collections of related data which " +"may be of different types which are operated on as a group. For example, a " +"Cartesian coordinate is appropriately represented as a tuple of two or three " +"numbers." +msgstr "" +"Les listes et les *n*-uplets, bien que semblables à bien des égards, sont " +"généralement utilisés de façons fondamentalement différentes. Les *n*-uplets " +"peuvent être considérés comme étant similaires au *record* en Pascal ou aux " +"structures en C ; ce sont de petites collections de données associées qui " +"peuvent être de différents types qui sont utilisées ensemble. Par exemple, " +"des coordonnées cartésiennes sont correctement représentées par un *n*-uplet " +"de deux ou trois nombres." + +#: faq/design.rst:409 +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 " +"which are operated on one-by-one. For example, ``os.listdir('.')`` returns " +"a list of strings representing the files in the current directory. " +"Functions which operate on this output would generally not break if you " +"added another file or two to the directory." +msgstr "" +"Les listes, ressemblent davantage à des tableaux dans d'autres langages. " +"Elles ont tendance à contenir un nombre variable d'objets de même type " +"manipulés individuellement. Par exemple, ``os.listdir('.')`` renvoie une " +"liste de chaînes représentant les fichiers dans le dossier courant. Les " +"fonctions travaillant sur cette sortie acceptent généralement sans aucun " +"problème que vous ajoutiez un ou deux fichiers supplémentaires dans le " +"dossier." + +#: faq/design.rst:416 +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 " +"that you can always change a list's elements. Only immutable elements can " +"be used as dictionary keys, and hence only tuples and not lists can be used " +"as keys." +msgstr "" +"Les *n*-uplets sont immuables, ce qui signifie que lorsqu'un *n*-uplet a été " +"créé, vous ne pouvez remplacer aucun de ses éléments par une nouvelle " +"valeur. Les listes sont muables, ce qui signifie que vous pouvez toujours " +"modifier les éléments d'une liste. Seuls des éléments immuables peuvent être " +"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:423 +msgid "How are lists implemented in CPython?" +msgstr "Comment les listes sont-elles implémentées dans CPython ?" + +#: faq/design.rst:425 +msgid "" +"CPython's lists are really variable-length arrays, not Lisp-style linked " +"lists. The implementation uses a contiguous array of references to other " +"objects, and keeps a pointer to this array and the array's length in a list " +"head structure." +msgstr "" +"Les listes en CPython sont de vrais tableaux de longueur variable " +"contrairement à des listes orientées *Lisp* (c.-à-d. des listes chaînées). " +"L'implémentation utilise un tableau contigu de références à d'autres objets. " +"Elle conserve également un pointeur vers ce tableau et la longueur du " +"tableau dans une structure de tête de liste." + +#: faq/design.rst:429 +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." +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:432 +msgid "" +"When items are appended or inserted, the array of references is resized. " +"Some cleverness is applied to improve the performance of appending items " +"repeatedly; when the array must be grown, some extra space is allocated so " +"the next few times don't require an actual resize." +msgstr "" +"Lorsque des éléments sont ajoutés ou insérés, le tableau de références est " +"redimensionné. Un savoir-faire ingénieux permet l'amélioration des " +"performances lors de l'ajout fréquent d'éléments ; lorsque le tableau doit " +"ê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:439 +msgid "How are dictionaries implemented in CPython?" +msgstr "Comment les dictionnaires sont-ils implémentés dans CPython ?" + +#: faq/design.rst:441 +msgid "" +"CPython's dictionaries are implemented as resizable hash tables. Compared " +"to B-trees, this gives better performance for lookup (the most common " +"operation by far) under most circumstances, and the implementation is " +"simpler." +msgstr "" +"Les dictionnaires CPython sont implémentés sous forme de tables de hachage " +"redimensionnables. Par rapport aux *B-trees*, cela donne de meilleures " +"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:445 +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 " +"widely depending on the key and a per-process seed; for example, \"Python\" " +"could hash to -539294296 while \"python\", a string that differs by a single " +"bit, could hash to 1142331976. The hash code is then used to calculate a " +"location in an internal array where the value will be stored. Assuming that " +"you're storing keys that all have different hash values, this means that " +"dictionaries take constant time -- O(1), in Big-O notation -- to retrieve a " +"key." +msgstr "" +"Les dictionnaires fonctionnent en calculant un condensat pour chaque clé " +"stockée dans le dictionnaire à l'aide de la fonction :func:`hash`. La valeur " +"du condensat varie grandement en fonction de la clé et de la graine utilisée " +"par le processus ; par exemple, la chaîne de caractère \"Python\" pourrait " +"avoir comme condensat la valeur – 539 294 296 tandis que la chaîne " +"\"python\",qui diffère de la première par un seul bit, pourrait avoir comme " +"condensat la valeur 1 142 331 976. Le condensat est ensuite utilisé pour " +"déterminer un emplacement dans le tableau interne où la valeur est stockée. " +"Dans l'hypothèse où vous stockez les clés qui ont toutes des condensats " +"différents, cela signifie que le temps pour récupérer une clé est constant — " +"O(1), en notation grand O de Landau." + +#: faq/design.rst:456 +msgid "Why must dictionary keys be immutable?" +msgstr "Pourquoi les clés du dictionnaire sont immuables ?" + +#: faq/design.rst:458 +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 " +"value could change, and thus its hash could also change. But since whoever " +"changes the key object can't tell that it was being used as a dictionary " +"key, it can't move the entry around in the dictionary. Then, when you try " +"to look up the same object in the dictionary it won't be found because its " +"hash value is different. If you tried to look up the old value it wouldn't " +"be found either, because the value of the object found in that hash bin " +"would be different." +msgstr "" +"L'implémentation de la table de hachage des dictionnaires utilise une valeur " +"de hachage calculée à partir de la valeur de la clé pour trouver la clé elle-" +"même. Si la clé était un objet muable, sa valeur peut changer, et donc son " +"hachage pourrait également changer. Mais toute personne modifiant l'objet " +"clé ne peut pas dire qu'elle a été utilisée comme une clé de dictionnaire. " +"Il ne peut déplacer l'entrée dans le dictionnaire. Ainsi, lorsque vous " +"essayez de rechercher le même objet dans le dictionnaire, il ne sera pas " +"disponible parce que sa valeur de hachage est différente. Si vous essayez de " +"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:467 +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 " +"as the list ``L``. Tuples are immutable and can therefore be used as " +"dictionary keys." +msgstr "" +"Si vous voulez un dictionnaire indexé avec une liste, il faut simplement " +"convertir la liste en un *n*-uplet ; la fonction ``tuple(L)`` crée un *n*-" +"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:471 +msgid "Some unacceptable solutions that have been proposed:" +msgstr "Certaines solutions insatisfaisantes ont été proposées :" + +#: faq/design.rst:473 +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.::" +msgstr "" +"Hacher les listes par leur adresse (*ID* de l'objet). Cela ne 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:479 +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 " +"words, dictionary keys should be compared using ``==``, not using :keyword:" +"`is`." +msgstr "" +"lèverait une exception :exc:`KeyError` car l'ID de ``[1, 2]`` utilisé dans " +"la deuxième ligne diffère de celui de la première ligne. En d'autres 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:483 +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 " +"copying code would run into an infinite loop." +msgstr "" +"Faire une copie lors de l'utilisation d'une liste en tant que clé. Cela ne " +"fonctionne pas puisque la liste, étant un objet muable, pourrait contenir " +"une référence à elle-même ou avoir une boucle infinie au niveau du code " +"copié." + +#: faq/design.rst:487 +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 " +"by accident. It also invalidates an important invariant of dictionaries: " +"every value in ``d.keys()`` is usable as a key of the dictionary." +msgstr "" +"Autoriser les listes en tant que clés, mais indiquer à l'utilisateur de ne " +"pas les modifier. Cela permettrait un ensemble de bogues difficiles à suivre " +"dans les programmes lorsque vous avez oublié ou modifié une liste par " +"accident. Cela casse également un impératif important des dictionnaires : " +"chaque valeur de ``d.keys()`` est utilisable comme clé du dictionnaire." + +#: faq/design.rst:492 +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 " +"could use a tuple containing a list as a key. Entering anything as a key " +"into a dictionary would require marking all objects reachable from there as " +"read-only -- and again, self-referential objects could cause an infinite " +"loop." +msgstr "" +"Marquer les listes comme étant en lecture seule une fois qu'elles sont " +"utilisées comme clé de dictionnaire. Le problème est que ce n'est pas " +"seulement l'objet de niveau supérieur qui pourrait changer sa valeur ; vous " +"pourriez utiliser un *n*-uplet contenant une liste comme clé. Utiliser " +"n'importe quoi comme une clé dans un dictionnaire nécessiterait de marquer " +"tous les objets accessibles à partir de là comme en lecture seule — et " +"encore une fois, les objets se faisant référence pourraient provoquer une " +"boucle infinie." + +#: faq/design.rst:498 +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 " +"both a :meth:`__eq__` and a :meth:`__hash__` method. You must then make " +"sure that the hash value for all such wrapper objects that reside in a " +"dictionary (or other hash based structure), remain fixed while the object is " +"in the dictionary (or other structure). ::" +msgstr "" +"Il y a un truc pour contourner ceci si vous en avez besoin, mais utilisez-le " +"à vos risques et périls. Vous pouvez encapsuler une structure mutable à " +"l'intérieur d'une instance de classe qui a à la fois une méthode :meth:" +"`__eq__` et :meth:`__hash__`. Vous devez ensuite vous assurer que la valeur " +"de hachage pour tous ces objets *wrapper* qui résident dans un dictionnaire " +"(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:522 +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 " +"arithmetic overflow." +msgstr "" +"Notez que le calcul de hachage peut être compliqué car il est possible que " +"certains membres de la liste soient impossibles à hacher et aussi par la " +"possibilité de débordement arithmétique." + +#: faq/design.rst:526 +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__() == " +"o2.__hash__()``), regardless of whether the object is in a dictionary or " +"not. If you fail to meet these restrictions dictionaries and other hash " +"based structures will misbehave." +msgstr "" +"De plus, il faut toujours que, si ``o1 == o2`` (par exemple ``o1.__eq__(o2) " +"vaut True``) alors ``hash(o1) == hash(o2)`` (par exemple, ``o1.__hash__() == " +"o2.__hash__()``), que l’objet se trouve dans un dictionnaire ou pas. Si vous " +"ne remplissez pas ces conditions, les dictionnaires et autres structures " +"basées sur le hachage se comporteront mal." + +#: faq/design.rst:531 +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 " +"you are prepared to think hard about the requirements and the consequences " +"of not meeting them correctly. Consider yourself warned." +msgstr "" +"Dans le cas de *ListWrapper*, chaque fois que l'objet *wrapper* est dans un " +"dictionnaire, la liste encapsulée ne doit pas changer pour éviter les " +"anomalies. Ne faites pas cela à moins que vous n’ayez pensé aux potentielles " +"conséquences de ne pas satisfaire entièrement ces conditions. Vous avez été " +"prévenus." + +#: faq/design.rst:538 +msgid "Why doesn't list.sort() return the sorted list?" +msgstr "Pourquoi ``list.sort()`` ne renvoie pas la liste triée ?" + +#: faq/design.rst:540 +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 " +"place. In order to remind you of that fact, it does not return the sorted " +"list. This way, you won't be fooled into accidentally overwriting a list " +"when you need a sorted copy but also need to keep the unsorted version " +"around." +msgstr "" +"Dans les situations où la performance est importante, faire une copie de la " +"liste juste pour la classer serait un gaspillage. Par conséquent, :meth:" +"`list.sort` classe la liste en place. Afin de vous le rappeler, elle ne " +"renvoie pas la liste classée. De cette façon, vous ne serez pas dupés en " +"écrasant accidentellement une liste lorsque vous avez besoin d’une copie " +"triée tout en gardant sous la main la version non triée." + +#: faq/design.rst:546 +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 " +"it and returns it. For example, here's how to iterate over the keys of a " +"dictionary in sorted order::" +msgstr "" +"Si vous souhaitez qu'une nouvelle liste soit renvoyée, utilisez plutôt la " +"fonction native :func:`sorted`. Cette fonction crée une nouvelle liste à " +"partir d’un itérable fourni, la classe et la renvoie. Par exemple, voici " +"comment itérer dans l’ordre sur les clés d’un dictionnaire ::" + +#: faq/design.rst:556 +msgid "How do you specify and enforce an interface spec in Python?" +msgstr "" +"Comment spécifier une interface et appliquer une spécification d’interface " +"en Python ?" + +#: faq/design.rst:558 +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 " +"module. Many feel that compile-time enforcement of interface specifications " +"helps in the construction of large programs." +msgstr "" +"Une spécification d'interface pour un module fourni par des langages tels " +"que C++ et Java décrit les prototypes pour les méthodes et les fonctions du " +"module. Beaucoup estiment que la vérification au moment de la compilation " +"des spécifications d'interface facilite la construction de grands programmes." + +#: faq/design.rst:563 +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` " +"to check whether an instance or a class implements a particular ABC. The :" +"mod:`collections.abc` module defines a set of useful ABCs such as :class:" +"`~collections.abc.Iterable`, :class:`~collections.abc.Container`, and :class:" +"`~collections.abc.MutableMapping`." +msgstr "" +"Python 2.6 ajoute un module :mod:`abc` qui vous permet de définir des " +"classes de base abstraites (ABC pour *abstract base classes* en anglais). " +"Vous pouvez ensuite utiliser :func:`isinstance` et :func:`issubclass` pour " +"vérifier si une instance ou une classe implémente une ABC particulière. Le " +"module :mod:`collections.abc` définit un ensemble d'ABC utiles telles que :" +"class:`~collections.abc.Iterable`, :class:`~collections.abc.Container` et :" +"class:`collections.abc.MutableMapping`." + +#: faq/design.rst:570 +msgid "" +"For Python, many of the advantages of interface specifications can be " +"obtained by an appropriate test discipline for components." +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:573 +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 " +"modules can be run as a script to provide a simple \"self test.\" Even " +"modules which use complex external interfaces can often be tested in " +"isolation using trivial \"stub\" emulations of the external interface. The :" +"mod:`doctest` and :mod:`unittest` modules or third-party test frameworks can " +"be used to construct exhaustive test suites that exercise every line of code " +"in a module." +msgstr "" +"Une bonne suite de tests pour un module peut à la fois fournir un test de " +"non-régression et servir de spécification d'interface de module ainsi qu'un " +"ensemble d'exemples. De nombreux modules Python peuvent être exécutés en " +"tant que script pour fournir un simple « auto-test ». Même les modules qui " +"utilisent des interfaces externes complexes peuvent souvent être testés " +"isolément à l'aide d'émulations triviales embryonnaires de l'interface " +"externe. Les modules :mod:`doctest` et :mod:`UnitTest` ou des cadriciels de " +"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:581 +msgid "" +"An appropriate testing discipline can help build large complex applications " +"in Python as well as having interface specifications would. In fact, it can " +"be better because an interface specification cannot test certain properties " +"of a program. For example, the :meth:`append` method is expected to add new " +"elements to the end of some internal list; an interface specification cannot " +"test that your :meth:`append` implementation will actually do this " +"correctly, but it's trivial to check this property in a test suite." +msgstr "" +"Une discipline de test appropriée peut aider à construire des applications " +"complexes de grande taille en Python aussi bien que le feraient des " +"spécifications d'interface. En fait, c'est peut être même mieux parce qu'une " +"spécification d'interface ne peut pas tester certaines propriétés d'un " +"programme. Par exemple, la méthode :meth:`Append` est censée ajouter de " +"nouveaux éléments à la fin d'une liste « sur place » ; une spécification " +"d'interface ne peut pas tester que votre implémentation de :meth:`append` va " +"réellement le faire correctement, mais il est trivial de vérifier cette " +"propriété dans une suite de tests." + +#: faq/design.rst:589 +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 " +"development, calls for writing parts of the test suite first, before you " +"write any of the actual code. Of course Python allows you to be sloppy and " +"not write test cases at all." +msgstr "" +"L'écriture des suites de tests est très utile, et vous voudrez peut-être " +"concevoir votre code de manière à le rendre facilement testable. Une " +"technique de plus en plus populaire, le développement dirigé par les tests, " +"requiert d'écrire d'abord des éléments de la suite de tests, avant d'écrire " +"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:597 +msgid "Why is there no goto?" +msgstr "Pourquoi n'y a-t-il pas de ``goto`` en Python ?" + +#: faq/design.rst:599 +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 " +"language, it is also unneeded as long as there are ways to branch (in " +"Python, with ``if`` statements and ``or``, ``and``, and ``if-else`` " +"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:606 +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 à 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:622 +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." +msgstr "" +"Cela ne vous permet pas de sauter au milieu d'une boucle mais, ceci est de " +"toute façon généralement considéré comme un abus de ``goto``. À Utiliser " +"avec parcimonie." + +#: faq/design.rst:627 +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:629 +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 " +"an unterminated string." +msgstr "" +"Plus précisément, elles ne peuvent pas se terminer par un nombre impair de " +"*backslashes* : le *backslash* non appairé à la fin échappe le caractère de " +"guillemet final, laissant la chaîne non terminée." + +#: faq/design.rst:633 +msgid "" +"Raw strings were designed to ease creating input for processors (chiefly " +"regular expression engines) that want to do their own backslash escape " +"processing. Such processors consider an unmatched trailing backslash to be " +"an error anyway, so raw strings disallow that. In return, they allow you to " +"pass on the string quote character by escaping it with a backslash. These " +"rules work well when r-strings are used for their intended purpose." +msgstr "" +"Les chaînes brutes ont été conçues pour faciliter la création de données " +"pour les processeurs de texte (principalement les moteurs d'expressions " +"régulières) qui veulent faire leur propre traitement d'échappement " +"d'*antislashes*. Ces processeurs considèrent un *antislash* de fin non-" +"appairé comme une erreur, alors les chaînes brutes ne le permettent pas. En " +"retour, elles vous permettent de transmettre le caractère de citation de la " +"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:640 +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 » ::" + +#: faq/design.rst:645 +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-ci ::" + +#: faq/design.rst:653 +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:655 +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 " +"construct that looks like this::" +msgstr "" +"Python a une instruction ``with`` qui encapsule l'exécution d'un bloc, en " +"appelant du code à l'entrée et la sortie du bloc. Certains langages " +"possèdent une construction qui ressemble à ceci ::" + +#: faq/design.rst:663 +msgid "In Python, such a construct would be ambiguous." +msgstr "En Python, une telle construction serait ambiguë." + +#: faq/design.rst:665 +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 " +"assigned to. This is the main point of static typing -- the compiler " +"*always* knows the scope of every variable at compile time." +msgstr "" +"Les autres langages, tels que Pascal, Delphi et C++ utilisent des types " +"statiques, il est donc possible de savoir d'une manière claire et directe ce " +"à quoi est attribué un membre. C'est le point principal du typage statique — " +"le compilateur connaît *toujours* la portée de toutes les variables au " +"moment de la compilation." + +#: faq/design.rst:670 +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 " +"removed from objects on the fly. This makes it impossible to know, from a " +"simple reading, what attribute is being referenced: a local one, a global " +"one, or a member attribute?" +msgstr "" +"Python utilise le typage dynamique. Il est impossible de savoir à l'avance " +"quel attribut sera référencé lors de l'exécution. Les attributs membres " +"peuvent être ajoutés ou retirés des objets à la volée. Il est donc " +"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:676 +msgid "For instance, take the following incomplete snippet::" +msgstr "Prenons par exemple l'extrait incomplet suivant ::" + +#: faq/design.rst:682 +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 " +"should happen if \"a\" is, let us say, an integer? If there is a global " +"variable named \"x\", will it be used inside the with block? As you see, " +"the dynamic nature of Python makes such choices much harder." +msgstr "" +"L'extrait suppose que « a » doit avoir un attribut membre appelé « x ». " +"Néanmoins, il n'y a rien en Python qui en informe l'interpréteur. Que se " +"passe-t-il si « a » est, disons, un entier ? Si une variable globale nommée " +"« x » existe, est-elle utilisée dans le bloc ``with`` ? Comme vous voyez, " +"la nature dynamique du Python rend ces choix beaucoup plus difficiles." + +#: faq/design.rst:688 +msgid "" +"The primary benefit of \"with\" and similar language features (reduction of " +"code volume) can, however, easily be achieved in Python by assignment. " +"Instead of::" +msgstr "" +"L'avantage principal de ``with`` et des fonctionnalités de langage " +"similaires (réduction du volume de code) peut, cependant, être facilement " +"réalisé en Python par assignation. Au lieu de ::" + +#: faq/design.rst:695 +msgid "write this::" +msgstr "écrivez ceci ::" + +#: faq/design.rst:702 +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 " +"needs to perform the resolution once." +msgstr "" +"Cela a également pour effet secondaire d'augmenter la vitesse d'exécution " +"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:708 +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:710 +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:717 +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:719 +msgid "" +"The colon is required primarily to enhance readability (one of the results " +"of the experimental ABC language). Consider this::" +msgstr "" +"Le deux-points est principalement nécessaire pour améliorer la lisibilité " +"(l'un des résultats du langage expérimental ABC). Considérez ceci ::" + +#: faq/design.rst:725 +msgid "versus ::" +msgstr "et cela ::" + +#: faq/design.rst:730 +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 " +"English." +msgstr "" +"Remarquez comment le deuxième est un peu plus facile à lire. Remarquez " +"aussi comment un deux-points introduit l'exemple dans cette réponse à la " +"FAQ ; c'est un usage standard en français (et en anglais)." + +#: faq/design.rst:733 +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 " +"needs to be increased instead of having to do a more elaborate parsing of " +"the program text." +msgstr "" +"Une autre raison mineure est que les deux-points facilitent la tâche des " +"éditeurs avec coloration syntaxique ; ils peuvent rechercher les deux-points " +"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:739 +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:741 +msgid "" +"Python lets you add a trailing comma at the end of lists, tuples, and " +"dictionaries::" +msgstr "" +"Python vous permet d'ajouter une virgule à la fin des listes, des *n*-uplets " +"et des dictionnaires ::" + +#: faq/design.rst:752 +msgid "There are several reasons to allow this." +msgstr "Il y a plusieurs raisons d'accepter cela." + +#: faq/design.rst:754 +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 " +"remember to add a comma to the previous line. The lines can also be " +"reordered without creating a syntax error." +msgstr "" +"Lorsque vous avez une valeur littérale pour une liste, un *n*-uplet ou un " +"dictionnaire réparti sur plusieurs lignes, il est plus facile d'ajouter plus " +"d'éléments parce que vous n'avez pas besoin de vous rappeler d'ajouter une " +"virgule à la ligne précédente. Les lignes peuvent aussi être réorganisées " +"sans créer une erreur de syntaxe." + +#: faq/design.rst:759 +msgid "" +"Accidentally omitting the comma can lead to errors that are hard to " +"diagnose. For example::" +msgstr "" +"L'omission accidentelle de la virgule peut entraîner des erreurs difficiles " +"à diagnostiquer, par exemple ::" + +#: faq/design.rst:769 +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 " +"of error." +msgstr "" +"Cette liste a l'air d'avoir quatre éléments, mais elle en contient en fait " +"trois : \"*fee*\", \"*fiefoo*\" et \"*fum*\". Toujours ajouter la virgule " +"permet d'éviter cette source d'erreur." + +#: faq/design.rst:772 +msgid "" +"Allowing the trailing comma may also make programmatic code generation " +"easier." +msgstr "" +"Permettre la virgule de fin peut également faciliter la génération de code." + +#~ msgid "" +#~ "You can do this easily enough with a sequence of ``if... elif... elif... " +#~ "else``. There have been some proposals for switch statement syntax, but " +#~ "there is no consensus (yet) on whether and how to do range tests. See :" +#~ "pep:`275` for complete details and the current status." +#~ msgstr "" +#~ "Vous pouvez le faire assez facilement avec une séquence de ``if... " +#~ "elif... elif... else``. Il y a eu quelques propositions pour la syntaxe " +#~ "de l'instruction ``switch``, mais il n'y a pas (encore) de consensus sur " +#~ "le cas des intervalles. Voir la :pep:`275` pour tous les détails et " +#~ "l'état actuel." diff --git a/faq/extending.po b/faq/extending.po new file mode 100644 index 0000000000..ae89156df3 --- /dev/null +++ b/faq/extending.po @@ -0,0 +1,549 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-18 15:46+0200\n" +"PO-Revision-Date: 2021-10-17 18:37+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 3.0\n" + +#: faq/extending.rst:3 +msgid "Extending/Embedding FAQ" +msgstr "FAQ extension/intégration" + +#: faq/extending.rst:6 +msgid "Contents" +msgstr "Sommaire" + +#: faq/extending.rst:16 +msgid "Can I create my own functions in C?" +msgstr "Puis-je créer mes propres fonctions en C ?" + +#: faq/extending.rst:18 +msgid "" +"Yes, you can create built-in modules containing functions, variables, " +"exceptions and even new types in C. This is explained in the document :ref:" +"`extending-index`." +msgstr "" +"Oui, vous pouvez créer des modules intégrés contenant des fonctions, des " +"variables, des exceptions et même de nouveaux types en C. Ceci est expliqué " +"dans le document :ref:`extending-index`." + +#: faq/extending.rst:22 +msgid "Most intermediate or advanced Python books will also cover this topic." +msgstr "" +"La plupart des livres Python intermédiaires ou avancés couvrent également ce " +"sujet." + +#: faq/extending.rst:26 +msgid "Can I create my own functions in C++?" +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." +msgstr "" +"Oui, en utilisant les fonctionnalités de compatibilité C existantes en C++. " +"Placez ``extern \"C\" { ... }`` autour des fichiers Python inclus et mettez " +"``extern \"C\"`` avant chaque fonction qui va être appelée par " +"l'interpréteur Python. Les objets C++ globaux ou statiques avec les " +"constructeurs ne sont probablement pas une bonne idée." + +#: faq/extending.rst:37 +msgid "Writing C is hard; are there any alternatives?" +msgstr "Écrire directement en C est difficile ; existe-t-il des alternatives ?" + +#: faq/extending.rst:39 +msgid "" +"There are a number of alternatives to writing your own C extensions, " +"depending on what you're trying to do." +msgstr "" +"Il y a un certain nombre de solutions existantes qui vous permettent " +"d'écrire vos propres extensions C, selon ce que vous essayez de faire." + +#: faq/extending.rst:44 +#, fuzzy +msgid "" +"`Cython `_ and its relative `Pyrex `_ are compilers that accept a " +"slightly modified form of Python and generate the corresponding C code. " +"Cython and Pyrex make it possible to write an extension without having to " +"learn Python's C API." +msgstr "" +"`Cython `_ et son cousin `Pyrex `_ sont des compilateurs qui " +"acceptent une forme légèrement modifiée de Python et produisent du code C " +"correspondant. Cython et Pyrex permettent d'écrire une extension sans avoir " +"à connaître l'API C de Python." + +#: faq/extending.rst:50 +#, fuzzy +msgid "" +"If you need to interface to some C or C++ library for which no Python " +"extension currently exists, you can try wrapping the library's data types " +"and functions with a tool such as `SWIG `_. `SIP " +"`__, `CXX `_ `Boost `_, or `Weave `_ are also alternatives " +"for wrapping C++ libraries." +msgstr "" +"Si vous avez besoin d'accéder à l'interface d'une bibliothèque C ou C++ pour " +"laquelle aucune extension Python n'existe à ce jour, vous pouvez essayer " +"d'encapsuler les types de données et fonctions de la bibliothèque avec un " +"outil tel que `SWIG `_. `SIP `__, `CXX `_, `Boost `_ ou " +"`Weave `_ sont également des alternatives " +"pour encapsuler des bibliothèques C++." + +#: faq/extending.rst:61 +msgid "How can I execute arbitrary Python statements from C?" +msgstr "" +"Comment puis-je exécuter des instructions quelconques Python à partir de C ?" + +#: faq/extending.rst:63 +msgid "" +"The highest-level function to do this is :c:func:`PyRun_SimpleString` which " +"takes a single string argument to be executed in the context of the module " +"``__main__`` and returns ``0`` for success and ``-1`` when an exception " +"occurred (including :exc:`SyntaxError`). If you want more control, use :c:" +"func:`PyRun_String`; see the source for :c:func:`PyRun_SimpleString` in " +"``Python/pythonrun.c``." +msgstr "" +"La fonction de plus haut niveau pour ce faire est :c:func:" +"`PyRun_SimpleStringString` qui prend une chaîne pour seul argument afin de " +"l'exécuter dans le contexte du module ``__main__`` et renvoie ``0`` en cas " +"de succès et ``-1`` quand une exception se produit (incluant :exc:" +"`SyntaxError`). Pour une meilleure maîtrise, utilisez :c:func:" +"`PyRun_String` ; voir le code source pour :c:func:`PyRun_SimpleString` dans " +"``Python/pythonrun.c``." + +#: faq/extending.rst:72 +msgid "How can I evaluate an arbitrary Python expression from C?" +msgstr "" +"Comment puis-je évaluer une expression quelconque de Python à partir de C ?" + +#: faq/extending.rst:74 +msgid "" +"Call the function :c:func:`PyRun_String` from the previous question with the " +"start symbol :c:data:`Py_eval_input`; it parses an expression, evaluates it " +"and returns its value." +msgstr "" +"Appelez la fonction :c:func:`PyRun_String` de la question précédente avec le " +"symbole de départ :c:data:`Py_eval_input` ; il analyse une expression, " +"l'évalue et renvoie sa valeur." + +#: faq/extending.rst:80 +msgid "How do I extract C values from a Python object?" +msgstr "Comment puis-je extraire des donnés en C d'un objet Python ?" + +#: faq/extending.rst:82 +msgid "" +"That depends on the object's type. If it's a tuple, :c:func:`PyTuple_Size` " +"returns its length and :c:func:`PyTuple_GetItem` returns the item at a " +"specified index. Lists have similar functions, :c:func:`PyListSize` and :c:" +"func:`PyList_GetItem`." +msgstr "" +"Cela dépend du type d'objet. Si c'est un *n*-uplet, :c:func:`PyTuple_Size` " +"renvoie sa longueur et :c:func:`PyTuple_GetItem` renvoie l'élément à l'index " +"spécifié. Les listes ont des fonctions similaires, :c:func:`PyListSize` et :" +"c:func:`PyList_GetItem`." + +#: faq/extending.rst:87 +msgid "" +"For bytes, :c:func:`PyBytes_Size` returns its length and :c:func:" +"`PyBytes_AsStringAndSize` provides a pointer to its value and its length. " +"Note that Python bytes objects may contain null bytes so C's :c:func:" +"`strlen` should not be used." +msgstr "" +"Pour les bytes, :c:func:`PyBytes_Size` renvoie sa longueur et :c:func:" +"`PyBytes_AsStringAndSize` fournit un pointeur vers sa valeur et sa longueur. " +"Notez que les objets bytes en Python peuvent contenir des valeurs nulles, " +"c'est pourquoi il ne faut pas utiliser la fonction C :c:func:`strlen`." + +#: faq/extending.rst:92 +msgid "" +"To test the type of an object, first make sure it isn't ``NULL``, and then " +"use :c:func:`PyBytes_Check`, :c:func:`PyTuple_Check`, :c:func:" +"`PyList_Check`, etc." +msgstr "" +"Pour tester le type d'un objet, assurez-vous d'abord qu'il ne soit pas " +"``NULL``, puis utilisez :c:func:`PyBytes_Check`, :c:func:`PyTuple_Check`, :c:" +"func:`PyList_Check`, etc." + +#: faq/extending.rst:95 +msgid "" +"There is also a high-level API to Python objects which is provided by the so-" +"called 'abstract' interface -- read ``Include/abstract.h`` for further " +"details. It allows interfacing with any kind of Python sequence using calls " +"like :c:func:`PySequence_Length`, :c:func:`PySequence_GetItem`, etc. as well " +"as many other useful protocols such as numbers (:c:func:`PyNumber_Index` et " +"al.) and mappings in the PyMapping APIs." +msgstr "" +"Il y a aussi une API de haut niveau pour les objets Python qui est fournie " +"par l'interface dite « abstraite » — voir ``Include/abstract.h`` pour plus " +"de détails. Elle permet l'interfaçage avec tout type de séquence Python en " +"utilisant des appels tels que :c:func:`PySequence_Length`, :c:func:" +"`PySequence_GetItem`, etc. ainsi que de nombreux autres protocoles utiles " +"tels que les nombres (:c:func:`PyNumber_Index` et autres) et les " +"correspondances dans les APIs PyMapping." + +#: faq/extending.rst:104 +msgid "How do I use Py_BuildValue() to create a tuple of arbitrary length?" +msgstr "" +"Comment utiliser Py_BuildValue() pour créer un *n*-uplet de longueur " +"définie ?" + +#: faq/extending.rst:106 +msgid "You can't. Use :c:func:`PyTuple_Pack` instead." +msgstr "Vous ne pouvez pas. Utilisez :c:func:`PyTuple_Pack` à la place." + +#: faq/extending.rst:110 +msgid "How do I call an object's method from C?" +msgstr "Comment puis-je appeler la méthode d'un objet à partir de C ?" + +#: faq/extending.rst:112 +msgid "" +"The :c:func:`PyObject_CallMethod` function can be used to call an arbitrary " +"method of an object. The parameters are the object, the name of the method " +"to call, a format string like that used with :c:func:`Py_BuildValue`, and " +"the argument values::" +msgstr "" +"La fonction :c:func:`PyObject_CallMethod` peut être utilisée pour appeler la " +"méthode d'un objet. Les paramètres sont l'objet, le nom de la méthode à " +"appeler, une chaîne de caractères comme celle utilisée pour :c:func:" +"`Py_BuildValue` et les valeurs des arguments ::" + +#: faq/extending.rst:121 +msgid "" +"This works for any object that has methods -- whether built-in or user-" +"defined. You are responsible for eventually :c:func:`Py_DECREF`\\ 'ing the " +"return value." +msgstr "" +"Cela fonctionne pour tous les objets qui ont des méthodes — qu'elles soient " +"intégrées ou définies par l'utilisateur. Vous êtes responsable de « :c:func:" +"`Py_DECREF`\\ *er* » la valeur de retour à la fin." + +#: faq/extending.rst:124 +msgid "" +"To call, e.g., a file object's \"seek\" method with arguments 10, 0 " +"(assuming the file object pointer is \"f\")::" +msgstr "" +"Pour appeler, p. ex., la méthode *seek* d'un objet *file* avec les arguments " +"10, 0 (en supposant que le pointeur de l'objet fichier est *f*) ::" + +#: faq/extending.rst:135 +msgid "" +"Note that since :c:func:`PyObject_CallObject` *always* wants a tuple for the " +"argument list, to call a function without arguments, pass \"()\" for the " +"format, and to call a function with one argument, surround the argument in " +"parentheses, e.g. \"(i)\"." +msgstr "" +"Notez que :c:func:`PyObject_CallObject` veut *toujours* un *n*-uplet comme " +"liste d'arguments. Aussi, pour appeler une fonction sans arguments, utilisez " +"\"()\" pour être conforme au type et, pour appeler une fonction avec un " +"paramètre, entourez-le de parenthèses, p. ex. \"(i)\"." + +#: faq/extending.rst:142 +msgid "" +"How do I catch the output from PyErr_Print() (or anything that prints to " +"stdout/stderr)?" +msgstr "" +"Comment puis-je récupérer la sortie de ``PyErr_Print()`` (ou tout ce qui " +"s'affiche sur *stdout*/*stderr*) ?" + +#: faq/extending.rst:144 +msgid "" +"In Python code, define an object that supports the ``write()`` method. " +"Assign this object to :data:`sys.stdout` and :data:`sys.stderr`. Call " +"print_error, or just allow the standard traceback mechanism to work. Then, " +"the output will go wherever your ``write()`` method sends it." +msgstr "" +"Dans le code Python, définissez un objet qui possède la méthode ``write()``. " +"Affectez cet objet à :data:`sys.stdout` et :data:`sys.stderr`. Appelez " +"*print_error* ou faites simplement en sorte que le mécanisme standard de " +"remontée des erreurs fonctionne. Ensuite, la sortie sera dirigée vers " +"l'endroit où votre méthode ``write()`` écrit." + +#: faq/extending.rst:149 +msgid "The easiest way to do this is to use the :class:`io.StringIO` class:" +msgstr "" +"La façon la plus simple consiste à utiliser la classe :class:`io.StringIO` :" + +#: faq/extending.rst:161 +msgid "A custom object to do the same would look like this:" +msgstr "" +"Le code d'un objet à la fonctionnalité similaire ressemblerait à ceci :" + +#: faq/extending.rst:182 +msgid "How do I access a module written in Python from C?" +msgstr "Comment accéder à un module écrit en Python à partir de C ?" + +#: faq/extending.rst:184 +msgid "You can get a pointer to the module object as follows::" +msgstr "Vous pouvez obtenir un pointeur sur l'objet module comme suit ::" + +#: faq/extending.rst:188 +msgid "" +"If the module hasn't been imported yet (i.e. it is not yet present in :data:" +"`sys.modules`), this initializes the module; otherwise it simply returns the " +"value of ``sys.modules[\"\"]``. Note that it doesn't enter the " +"module into any namespace -- it only ensures it has been initialized and is " +"stored in :data:`sys.modules`." +msgstr "" +"Si le module n'a pas encore été importé (c.-à-d. qu'il n'est pas encore " +"présent dans :data:`sys.modules`), cela initialise le module ; sinon il " +"renvoie simplement la valeur de ``sys.modules[\"\"]``. Notez " +"qu'il n'inscrit le module dans aucun espace de nommage — il s'assure " +"seulement qu'il a été initialisé et qu'il est stocké dans :data:`sys." +"modules`." + +#: faq/extending.rst:194 +msgid "" +"You can then access the module's attributes (i.e. any name defined in the " +"module) as follows::" +msgstr "" +"Vous pouvez alors accéder aux attributs du module (c.-à-d. à tout nom défini " +"dans le module) comme suit ::" + +#: faq/extending.rst:199 +msgid "" +"Calling :c:func:`PyObject_SetAttrString` to assign to variables in the " +"module also works." +msgstr "" +"Appeler :c:func:`PyObject_SetAttrString` pour assigner des valeurs aux " +"variables du module fonctionne également." + +#: faq/extending.rst:204 +msgid "How do I interface to C++ objects from Python?" +msgstr "Comment s'interfacer avec les objets C++ depuis Python ?" + +#: faq/extending.rst:206 +msgid "" +"Depending on your requirements, there are many approaches. To do this " +"manually, begin by reading :ref:`the \"Extending and Embedding\" document " +"`. Realize that for the Python run-time system, there " +"isn't a whole lot of difference between C and C++ -- so the strategy of " +"building a new Python type around a C structure (pointer) type will also " +"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) " +"fonctionne également avec des objets en C++." + +#: faq/extending.rst:212 +msgid "For C++ libraries, see :ref:`c-wrapper-software`." +msgstr "Pour les bibliothèques C++, voir :ref:`c-wrapper-software`." + +#: faq/extending.rst:216 +msgid "I added a module using the Setup file and the make fails; why?" +msgstr "" +"J'ai ajouté un module en utilisant le fichier *Setup* et la compilation " +"échoue ; pourquoi ?" + +#: faq/extending.rst:218 +msgid "" +"Setup must end in a newline, if there is no newline there, the build process " +"fails. (Fixing this requires some ugly shell script hackery, and this bug " +"is so minor that it doesn't seem worth the effort.)" +msgstr "" +"Le fichier *Setup* doit se terminer par une ligne vide, s'il n'y a pas de " +"ligne vide, le processus de compilation échoue (ce problème peut se régler " +"en bidouillant un script shell, et ce bogue est si mineur qu'il ne mérite " +"pas qu'on s'y attarde)." + +#: faq/extending.rst:224 +msgid "How do I debug an extension?" +msgstr "Comment déboguer une extension ?" + +#: faq/extending.rst:226 +msgid "" +"When using GDB with dynamically loaded extensions, you can't set a " +"breakpoint in your extension until your extension is loaded." +msgstr "" +"Lorsque vous utilisez GDB avec des extensions chargées dynamiquement, vous " +"ne pouvez pas placer de point d'arrêt dans votre extension tant que celle-ci " +"n'est pas chargée." + +#: faq/extending.rst:229 +msgid "In your ``.gdbinit`` file (or interactively), add the command:" +msgstr "" +"Dans votre fichier ``.gdbinit`` (ou manuellement), ajoutez la commande :" + +#: faq/extending.rst:235 +msgid "Then, when you run GDB:" +msgstr "Ensuite, lorsque vous exécutez GDB :" + +#: faq/extending.rst:247 +msgid "" +"I want to compile a Python module on my Linux system, but some files are " +"missing. Why?" +msgstr "" +"Je veux compiler un module Python sur mon système Linux, mais il manque " +"certains fichiers. Pourquoi ?" + +#: faq/extending.rst:249 +msgid "" +"Most packaged versions of Python don't include the :file:`/usr/lib/python2." +"{x}/config/` directory, which contains various files required for compiling " +"Python extensions." +msgstr "" +"La plupart des versions pré-compilées de Python n'incluent pas le " +"répertoire :file:`/usr/lib/python2.{x}/config/`, qui contient les différents " +"fichiers nécessaires à la compilation des extensions Python." + +#: faq/extending.rst:253 +msgid "For Red Hat, install the python-devel RPM to get the necessary files." +msgstr "" +"Pour Red Hat, installez le RPM *python-devel* pour obtenir les fichiers " +"nécessaires." + +#: faq/extending.rst:255 +msgid "For Debian, run ``apt-get install python-dev``." +msgstr "Pour Debian, exécutez ``apt-get install python-dev``." + +#: 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: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. " +"you typed the start of an \"if\" statement or you didn't close your " +"parentheses or triple string quotes), but it gives you a syntax error " +"message immediately when the input is invalid." +msgstr "" +"Parfois vous souhaitez émuler le comportement de l'interpréteur interactif " +"Python, quand il vous donne une invite de continuation lorsque l'entrée est " +"incomplète (par exemple, vous avez tapé le début d'une instruction \"if\" ou " +"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:266 +msgid "" +"In Python you can use the :mod:`codeop` module, which approximates the " +"parser's behavior sufficiently. IDLE uses this, for example." +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: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 " +"input for you. You can also set the :c:func:`PyOS_ReadlineFunctionPointer` " +"to point at your custom input function. See ``Modules/readline.c`` and " +"``Parser/myreadline.c`` for more hints." +msgstr "" +"La façon la plus simple de le faire en C est d'appeler :c:func:" +"`PyRun_InteractiveLoop` (peut-être dans un autre fil d'exécution) et laisser " +"l'interpréteur Python gérer l'entrée pour vous. Vous pouvez également " +"définir :c:func:`PyOS_ReadlineFunctionPointer` pour pointer vers votre " +"fonction d'entrée personnalisée. Voir ``Modules/readline.c`` et ``Parser/" +"myreadline.c`` pour plus de conseils." + +#: faq/extending.rst:276 +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: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 " +"extension module using g++ (e.g., ``g++ -shared -o mymodule.so mymodule.o``)." +msgstr "" +"Pour charger dynamiquement les modules d'extension g++, vous devez " +"recompiler Python, effectuer l'édition de liens en utilisant g++ (modifiez " +"*LINKCC* dans le *Python Modules Makefile*), et effectuer l'édition de liens " +"de votre module d'extension avec g++ (par exemple, ``g++ -shared -o mymodule." +"so mymodule.o``)." + +#: 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)?" +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:286 +msgid "" +"Yes, you can inherit from built-in classes such as :class:`int`, :class:" +"`list`, :class:`dict`, etc." +msgstr "" +"Oui, vous pouvez hériter de classes intégrées telles que :class:`int`, :" +"class:`list`, :class:`dict`, etc." + +#: faq/extending.rst:289 +#, fuzzy +msgid "" +"The Boost Python Library (BPL, https://www.boost.org/libs/python/doc/index." +"html) provides a way of doing this from C++ (i.e. you can inherit from an " +"extension class written in C++ using the BPL)." +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. A 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 "" +#~ "Cependant, il arrive qu'il soit nécessaire d'exécuter l'interpréteur " +#~ "Python embarqué dans le même fil d'exécution que le reste de " +#~ "l'application, et que :c:func:`PyRun_InteractiveLoop` ne puisse pas être " +#~ "utilisée car elle bloque le fil en attendant l'entrée de l'utilisateur. " +#~ "Une 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 " +#~ "peut être préférable d'ignorer **SIGINT** lors de l'appel à " +#~ "``readline()``) ::" + +#~ 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 ::" diff --git a/faq/general.po b/faq/general.po new file mode 100644 index 0000000000..53f779e312 --- /dev/null +++ b/faq/general.po @@ -0,0 +1,992 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-22 22:57+0100\n" +"PO-Revision-Date: 2021-12-16 02:40+0100\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 3.0\n" + +#: faq/general.rst:5 +msgid "General Python FAQ" +msgstr "FAQ générale sur Python" + +#: faq/general.rst:8 +msgid "Contents" +msgstr "Sommaire" + +#: faq/general.rst:13 +msgid "General Information" +msgstr "Informations générales" + +#: faq/general.rst:16 +msgid "What is Python?" +msgstr "Qu'est-ce que Python ?" + +#: faq/general.rst:18 +msgid "" +"Python is an interpreted, interactive, object-oriented programming " +"language. It incorporates modules, exceptions, dynamic typing, very high " +"level dynamic data types, and classes. It supports multiple programming " +"paradigms beyond object-oriented programming, such as procedural and " +"functional programming. Python combines remarkable power with very clear " +"syntax. It has interfaces to many system calls and libraries, as well as to " +"various window systems, and is extensible in C or C++. It is also usable as " +"an extension language for applications that need a programmable interface. " +"Finally, Python is portable: it runs on many Unix variants including Linux " +"and macOS, and on Windows." +msgstr "" +"Python est un langage de programmation interprété, interactif et orienté " +"objet. Il intègre des modules, des exceptions, un typage dynamique, des " +"types de données dynamiques de très haut niveau et des classes. Il gère de " +"multiples paradigmes de programmation au-delà de la programmation orientée " +"objet, tels que la programmation procédurale et fonctionnelle. Python " +"combine une puissance remarquable avec une syntaxe très claire. Il possède " +"des interfaces avec de nombreux appels système et bibliothèques, ainsi " +"qu'avec divers systèmes d'interfaces graphiques, et il peut être étendu avec " +"du C ou du C++. Il est également utilisable comme langage d'extension pour " +"les applications qui nécessitent une interface de programmation. Enfin, " +"Python est portable : il fonctionne sur de nombreuses variantes d'Unix, y " +"compris Linux et macOS, et sur Windows." + +#: faq/general.rst:28 +msgid "" +"To find out more, start with :ref:`tutorial-index`. The `Beginner's Guide " +"to Python `_ links to other " +"introductory tutorials and resources for learning Python." +msgstr "" +"Pour en savoir plus, commencez par :ref:`tutorial-index`. Le « `Guide des " +"Débutants pour Python `_ » " +"renvoie vers d'autres tutoriels et ressources d'initiation pour apprendre " +"Python." + +#: faq/general.rst:34 +msgid "What is the Python Software Foundation?" +msgstr "Qu'est ce que la Python Software Foundation ?" + +#: faq/general.rst:36 +msgid "" +"The Python Software Foundation is an independent non-profit organization " +"that holds the copyright on Python versions 2.1 and newer. The PSF's " +"mission is to advance open source technology related to the Python " +"programming language and to publicize the use of Python. The PSF's home " +"page is at https://www.python.org/psf/." +msgstr "" +"La Python Software Foundation (PSF) est une organisation indépendante à but " +"non lucratif qui détient les droits d'auteur sur les versions Python 2.1 et " +"plus récentes. La mission de la PSF est de faire progresser les technologies " +"ouvertes (*open source*) relatives au langage de programmation Python et de " +"promouvoir son utilisation. Le page d'accueil de la PSF se trouve à " +"l'adresse suivante : https://www.python.org/psf/." + +#: faq/general.rst:42 +msgid "" +"Donations to the PSF are tax-exempt in the US. If you use Python and find " +"it helpful, please contribute via `the PSF donation page `_." +msgstr "" +"Si vous utilisez Python et que vous le trouvez utile, merci de contribuer " +"par le biais de `la page de donation de la PSF `_." + +#: faq/general.rst:48 +msgid "Are there copyright restrictions on the use of Python?" +msgstr "" +"Existe-t-il des restrictions liées à la propriété intellectuelle quant à " +"l'utilisation de Python ?" + +#: faq/general.rst:50 +msgid "" +"You can do anything you want with the source, as long as you leave the " +"copyrights in and display those copyrights in any documentation about Python " +"that you produce. If you honor the copyright rules, it's OK to use Python " +"for commercial use, to sell copies of Python in source or binary form " +"(modified or unmodified), or to sell products that incorporate Python in " +"some form. We would still like to know about all commercial use of Python, " +"of course." +msgstr "" +"Vous pouvez faire ce que vous souhaitez avec la source, tant que vous " +"respecterez la licence d'utilisation et que vous l'afficherez dans toute " +"documentation que vous produirez au sujet de Python. Si vous respectez ces " +"règles, vous pouvez utiliser Python dans un cadre commercial, vendre le code " +"source ou la forme binaire (modifiée ou non), ou vendre des produits qui " +"incorporent Python sous une forme quelconque. Bien entendu, nous " +"souhaiterions avoir connaissance de tous les projets commerciaux utilisant " +"Python." + +#: faq/general.rst:57 +msgid "" +"See `the PSF license page `_ to find " +"further explanations and a link to the full text of the license." +msgstr "" +"Voir `la page de licence d'utilisation de la PSF `_ pour trouver davantage d'informations et un lien vers la version " +"intégrale de la licence d'utilisation." + +#: faq/general.rst:60 +msgid "" +"The Python logo is trademarked, and in certain cases permission is required " +"to use it. Consult `the Trademark Usage Policy `__ for more information." +msgstr "" +"Le logo de Python est une marque déposée, et dans certains cas une " +"autorisation est nécessaire pour l'utiliser. Consultez `la politique " +"d'utilisation de la marque `__ pour " +"plus d'informations." + +#: faq/general.rst:66 +msgid "Why was Python created in the first place?" +msgstr "Pourquoi Python a été créé ?" + +#: faq/general.rst:68 +msgid "" +"Here's a *very* brief summary of what started it all, written by Guido van " +"Rossum:" +msgstr "" +"Voici un *très* bref résumé de comment tout a commencé, écrit par Guido van " +"Rossum (puis traduit en français) :" + +#: faq/general.rst:71 +msgid "" +"I had extensive experience with implementing an interpreted language in the " +"ABC group at CWI, and from working with this group I had learned a lot about " +"language design. This is the origin of many Python features, including the " +"use of indentation for statement grouping and the inclusion of very-high-" +"level data types (although the details are all different in Python)." +msgstr "" +"J'avais une expérience complète avec la mise en œuvre du langage interprété " +"ABC au sein du CWI, et en travaillant dans ce groupe j'ai appris beaucoup à " +"propos de la conception de langage. C'est l'origine de nombreuses " +"fonctionnalités de Python, notamment l'utilisation de l'indentation pour le " +"groupement et l'inclusion de types de très haut niveau (bien que dans les " +"détails ils soient tous différents dans Python)." + +#: faq/general.rst:78 +msgid "" +"I had a number of gripes about the ABC language, but also liked many of its " +"features. It was impossible to extend the ABC language (or its " +"implementation) to remedy my complaints -- in fact its lack of extensibility " +"was one of its biggest problems. I had some experience with using Modula-2+ " +"and talked with the designers of Modula-3 and read the Modula-3 report. " +"Modula-3 is the origin of the syntax and semantics used for exceptions, and " +"some other Python features." +msgstr "" +"J'avais un certain nombre de différends avec le langage ABC, mais j'aimais " +"aussi beaucoup de ses fonctionnalités. Il était impossible d'étendre le " +"langage ABC (ou ses implémentations) pour remédier à mes réclamations -- en " +"vérité le manque d'extensibilité était l'un des plus gros problème. J'avais " +"un peu d'expérience avec l'utilisation de Modula-2+ et j'en ai parlé avec " +"les concepteurs de Modula-3 et j'ai lu le rapport sur Modula-3. Modula-3 est " +"à l'origine de la syntaxe et de la sémantique utilisée pour les exceptions, " +"et quelques autres fonctionnalités en Python." + +#: faq/general.rst:86 +msgid "" +"I was working in the Amoeba distributed operating system group at CWI. We " +"needed a better way to do system administration than by writing either C " +"programs or Bourne shell scripts, since Amoeba had its own system call " +"interface which wasn't easily accessible from the Bourne shell. My " +"experience with error handling in Amoeba made me acutely aware of the " +"importance of exceptions as a programming language feature." +msgstr "" +"Je travaillais sur un groupe de systèmes d'exploitation distribués Amoeba au " +"CWI. Nous avions besoin d'un meilleur moyen pour gérer l'administration " +"système qu'écrire un programme en C ou en script Bourne shell, puisque " +"l'Amoeba avait sa propre interface d'appels système qui n'était pas " +"facilement accessible depuis les scripts Bourne shell. Mon expérience avec " +"le traitement des erreurs dans l'Amoeba m'a vraiment fait prendre conscience " +"de l'importance des exceptions en tant que fonctionnalité d'un langage de " +"programmation." + +#: faq/general.rst:93 +msgid "" +"It occurred to me that a scripting language with a syntax like ABC but with " +"access to the Amoeba system calls would fill the need. I realized that it " +"would be foolish to write an Amoeba-specific language, so I decided that I " +"needed a language that was generally extensible." +msgstr "" +"Il m'est venu à l'esprit qu'un langage de script avec une syntaxe comme ABC " +"mais avec un accès aux appels systèmes d'Amoeba remplirait les besoins. J'ai " +"réalisé que ce serait idiot d'écrire un langage spécifique à Amoeba, donc " +"j'ai décidé que j'avais besoin d'un langage qui serait généralement " +"extensible." + +#: faq/general.rst:98 +msgid "" +"During the 1989 Christmas holidays, I had a lot of time on my hand, so I " +"decided to give it a try. During the next year, while still mostly working " +"on it in my own time, Python was used in the Amoeba project with increasing " +"success, and the feedback from colleagues made me add many early " +"improvements." +msgstr "" +"Pendant les vacances de Noël 1989, j'avais beaucoup de temps à disposition, " +"donc j'ai décidé de faire un essai. Durant l'année suivante, j'ai encore " +"beaucoup travaillé dessus sur mon propre temps. Python a été utilisé dans le " +"projet Amoeba avec un succès croissant, et les retours de mes collègues " +"m'ont permis d'ajouter beaucoup des premières améliorations." + +#: faq/general.rst:104 +msgid "" +"In February 1991, after just over a year of development, I decided to post " +"to USENET. The rest is in the ``Misc/HISTORY`` file." +msgstr "" +"En Février 1991, juste après un peu plus d'un an de développement, j'ai " +"décidé de le poster sur USENET. Le reste se trouve dans le fichier « Misc/" +"HISTORY »." + +#: faq/general.rst:109 +msgid "What is Python good for?" +msgstr "Pour quoi Python est-il fait ?" + +#: faq/general.rst:111 +msgid "" +"Python is a high-level general-purpose programming language that can be " +"applied to many different classes of problems." +msgstr "" +"Python est un langage de programmation haut niveau généraliste qui peut être " +"utilisé pour pallier à différents problèmes." + +#: faq/general.rst:114 +msgid "" +"The language comes with a large standard library that covers areas such as " +"string processing (regular expressions, Unicode, calculating differences " +"between files), internet protocols (HTTP, FTP, SMTP, XML-RPC, POP, IMAP, CGI " +"programming), software engineering (unit testing, logging, profiling, " +"parsing Python code), and operating system interfaces (system calls, " +"filesystems, TCP/IP sockets). Look at the table of contents for :ref:" +"`library-index` to get an idea of what's available. A wide variety of third-" +"party extensions are also available. Consult `the Python Package Index " +"`_ to find packages of interest to you." +msgstr "" +"Le langage vient avec une bibliothèque standard importante qui couvre des " +"domaines tels que le traitement des chaînes de caractères (expressions " +"régulières, Unicode, calcul de différences entre les fichiers), les " +"protocoles Internet (HTTP, FTP, SMTP, XML-RPC, POP, IMAP, script CGI), " +"ingénierie logicielle (tests unitaires, enregistrement, analyse de code " +"Python), et interfaces pour systèmes d'exploitation (appels système, système " +"de fichiers, connecteurs TCP/IP). Regardez la table des matières :ref:" +"`library-index` pour avoir une idée de ce qui est disponible. Une grande " +"variété de greffons tiers existent aussi. Consultez `le sommaire des paquets " +"Python `_ pour trouver les paquets qui pourraient vous " +"intéresser." + +#: faq/general.rst:126 +msgid "How does the Python version numbering scheme work?" +msgstr "Comment fonctionne le numérotage des versions de Python ?" + +#: faq/general.rst:128 +msgid "Python versions are numbered \"A.B.C\" or \"A.B\":" +msgstr "" + +#: faq/general.rst:130 +msgid "" +"*A* is the major version number -- it is only incremented for really major " +"changes in the language." +msgstr "" + +#: faq/general.rst:132 +msgid "" +"*B* is the minor version number -- it is incremented for less earth-" +"shattering changes." +msgstr "" + +#: faq/general.rst:134 +msgid "" +"*C* is the micro version number -- it is incremented for each bugfix release." +msgstr "" + +#: faq/general.rst:136 +msgid "See :pep:`6` for more information about bugfix releases." +msgstr "" + +#: faq/general.rst:138 +msgid "" +"Not all releases are bugfix releases. In the run-up to a new major release, " +"a series of development releases are made, denoted as alpha, beta, or " +"release candidate. Alphas are early releases in which interfaces aren't yet " +"finalized; it's not unexpected to see an interface change between two alpha " +"releases. Betas are more stable, preserving existing interfaces but possibly " +"adding new modules, and release candidates are frozen, making no changes " +"except as needed to fix critical bugs." +msgstr "" +"Toutes les sorties ne concernent pas la correction de bogues. A l'approche " +"de la sortie d'une nouvelle version majeure, une série de versions de " +"développement sont créées, dénommées *alpha*, *beta*, *release candidate*. " +"Les alphas sont des versions primaires dans lesquelles les interfaces ne " +"sont pas encore finalisées; ce n'est pas inattendu de voir des changements " +"d'interface entre deux versions alpha. Les *betas* sont plus stables, " +"préservent les interfaces existantes mais peuvent ajouter de nouveaux " +"modules, les *release candidate* sont figées, elles ne font aucun changement " +"à l'exception de ceux nécessaires pour corriger des bogues critiques." + +#: faq/general.rst:146 +msgid "Alpha, beta and release candidate versions have an additional suffix:" +msgstr "" + +#: faq/general.rst:148 +msgid "The suffix for an alpha version is \"aN\" for some small number *N*." +msgstr "" + +#: faq/general.rst:149 +msgid "The suffix for a beta version is \"bN\" for some small number *N*." +msgstr "" + +#: faq/general.rst:150 +msgid "" +"The suffix for a release candidate version is \"rcN\" for some small number " +"*N*." +msgstr "" + +#: faq/general.rst:152 +msgid "" +"In other words, all versions labeled *2.0aN* precede the versions labeled " +"*2.0bN*, which precede versions labeled *2.0rcN*, and *those* precede 2.0." +msgstr "" + +#: faq/general.rst:155 +msgid "" +"You may also find version numbers with a \"+\" suffix, e.g. \"2.2+\". These " +"are unreleased versions, built directly from the CPython development " +"repository. In practice, after a final minor release is made, the version " +"is incremented to the next minor version, which becomes the \"a0\" version, " +"e.g. \"2.4a0\"." +msgstr "" +"Vous pouvez aussi trouver des versions avec un signe « + » en suffixe, par " +"exemple « 2.2+ ». Ces versions sont non distribuées, construites directement " +"depuis le dépôt de développement de CPython. En pratique, après la sortie " +"finale d'une version mineure, la version est augmentée à la prochaine " +"version mineure, qui devient la version *a0*, c'est-à-dire *2.4a0*." + +#: faq/general.rst:160 +msgid "" +"See also the documentation for :data:`sys.version`, :data:`sys.hexversion`, " +"and :data:`sys.version_info`." +msgstr "" +"Voir aussi la documentation pour for :data:`sys.version`, :data:`sys." +"hexversion`, et :data:`sys.version_info`." + +#: faq/general.rst:165 +msgid "How do I obtain a copy of the Python source?" +msgstr "Comment obtenir une copie du code source de Python ?" + +#: faq/general.rst:167 +msgid "" +"The latest Python source distribution is always available from python.org, " +"at https://www.python.org/downloads/. The latest development sources can be " +"obtained at https://github.com/python/cpython/." +msgstr "" +"La dernière version du code source déployée est toujours disponible sur " +"python.org, à https://www.python.org/downloads/. Le code source de la " +"dernière version en développement peut être obtenue à https://github.com/" +"python/cpython/." + +#: faq/general.rst:171 +msgid "" +"The source distribution is a gzipped tar file containing the complete C " +"source, Sphinx-formatted documentation, Python library modules, example " +"programs, and several useful pieces of freely distributable software. The " +"source will compile and run out of the box on most UNIX platforms." +msgstr "" +"Le code source est dans une archive *gzippée* au format *tar*, elle contient " +"le code source C complet, la documentation formatée avec Sphinx, les " +"libraires Python, des exemples de programmes, et plusieurs morceaux de code " +"utiles distribuables librement. Le code source sera compilé et prêt à " +"fonctionner immédiatement sur la plupart des plateformes UNIX." + +#: faq/general.rst:176 +msgid "" +"Consult the `Getting Started section of the Python Developer's Guide " +"`__ for more information on getting the " +"source code and compiling it." +msgstr "" +"Consultez `la section Premiers pas du Guide des Développeurs Python `__ pour plus d'informations sur comment obtenir " +"le code source et le compiler." + +#: faq/general.rst:182 +msgid "How do I get documentation on Python?" +msgstr "Comment obtenir la documentation de Python ?" + +#: faq/general.rst:186 +msgid "" +"The standard documentation for the current stable version of Python is " +"available at https://docs.python.org/3/. PDF, plain text, and downloadable " +"HTML versions are also available at https://docs.python.org/3/download.html." +msgstr "" +"La documentation standard pour la version stable actuelle est disponible à " +"https://docs.python.org/3/.%20%20Des%20versions%20aux%20formats%20PDF,%20texte%20et%20HTML" +"sont aussi disponibles à https://docs.python.org/3/download.html." + +#: faq/general.rst:190 +#, fuzzy +msgid "" +"The documentation is written in reStructuredText and processed by `the " +"Sphinx documentation tool `__. The " +"reStructuredText source for the documentation is part of the Python source " +"distribution." +msgstr "" +"La documentation est écrite au format *reStructuredText* et traitée par " +"l'outil de documentation `Sphinx `__. La source du " +"*reStructuredText* pour la documentation constitue une partie des sources de " +"Python." + +#: faq/general.rst:196 +msgid "I've never programmed before. Is there a Python tutorial?" +msgstr "Je n'ai jamais programmé avant. Existe-t-il un tutoriel Python ?" + +#: faq/general.rst:198 +msgid "" +"There are numerous tutorials and books available. The standard " +"documentation includes :ref:`tutorial-index`." +msgstr "" +"Il y a de nombreux tutoriels et livres disponibles. La documentation " +"standard inclut :ref:`tutorial-index`." + +#: faq/general.rst:201 +msgid "" +"Consult `the Beginner's Guide `_ to find information for beginning Python programmers, " +"including lists of tutorials." +msgstr "" +"Consultez le `Guide du Débutant `_ afin de trouver des informations pour les développeurs " +"Python débutants, incluant une liste de tutoriels." + +#: faq/general.rst:206 +msgid "Is there a newsgroup or mailing list devoted to Python?" +msgstr "Y a-t-il un forum ou une liste de diffusion dédié à Python ?" + +#: faq/general.rst:208 +msgid "" +"There is a newsgroup, :newsgroup:`comp.lang.python`, and a mailing list, " +"`python-list `_. The " +"newsgroup and mailing list are gatewayed into each other -- if you can read " +"news it's unnecessary to subscribe to the mailing list. :newsgroup:`comp." +"lang.python` is high-traffic, receiving hundreds of postings every day, and " +"Usenet readers are often more able to cope with this volume." +msgstr "" +"Il y a un forum, :newsgroup:`comp.lang.python` et une liste de diffusion, " +"`python-list `_. Le " +"forum et la liste de diffusion sont des passerelles l'un vers l'autre -- si " +"vous pouvez lire les *news* ce n'est pas inutile de souscrire à la liste de " +"diffusion. :newsgroup:`comp.lang.python` a beaucoup d'activité, il reçoit " +"des centaines de messages chaque jour, et les lecteurs du réseau Usenet sont " +"souvent plus capables de faire face à ce volume." + +#: faq/general.rst:215 +msgid "" +"Announcements of new software releases and events can be found in comp.lang." +"python.announce, a low-traffic moderated list that receives about five " +"postings per day. It's available as `the python-announce mailing list " +"`_." +msgstr "" +"Les annonces pour les nouvelles versions et événements peuvent êtres " +"trouvées dans *comp.lang.python.announce*, une liste diminuée peu active qui " +"reçoit environ 5 messages par jour. C'est disponible à `liste de diffusion " +"des annonces Python `_." + +#: faq/general.rst:220 +msgid "" +"More info about other mailing lists and newsgroups can be found at https://" +"www.python.org/community/lists/." +msgstr "" +"Plus d'informations à propos des autres listes de diffusion et forums " +"peuvent être trouvées à https://www.python.org/community/lists/." + +#: faq/general.rst:225 +msgid "How do I get a beta test version of Python?" +msgstr "Comment obtenir une version bêta test de Python ?" + +#: faq/general.rst:227 +msgid "" +"Alpha and beta releases are available from https://www.python.org/" +"downloads/. All releases are announced on the comp.lang.python and comp." +"lang.python.announce newsgroups and on the Python home page at https://www." +"python.org/; an RSS feed of news is available." +msgstr "" +"Les versions alpha et bêta sont disponibles depuis https://www.python.org/" +"downloads/. Toutes les versions sont annoncées sur les *newsgroups* *comp." +"lang.python* et *comp.lang.python.announce* ainsi que sur la page d'accueil " +"de Python à https://www.python.org/; un flux RSS d'actualités y est aussi " +"disponible." + +#: faq/general.rst:232 +msgid "" +"You can also access the development version of Python through Git. See `The " +"Python Developer's Guide `_ for details." +msgstr "" +"Vous pouvez aussi accéder aux de Python en développement grâce à Git. Voir " +"`Le Guide du Développeur Python `_ pour plus " +"de détails." + +#: faq/general.rst:237 +msgid "How do I submit bug reports and patches for Python?" +msgstr "Comment soumettre un rapport de bogues ou un correctif pour Python ?" + +#: faq/general.rst:239 +msgid "" +"To report a bug or submit a patch, please use the Roundup installation at " +"https://bugs.python.org/" +msgstr "" +"Pour reporter un bogue ou soumettre un correctif, merci d'utiliser https://" +"bugs.python.org/." + +#: faq/general.rst:242 +msgid "" +"You must have a Roundup account to report bugs; this makes it possible for " +"us to contact you if we have follow-up questions. It will also enable " +"Roundup to send you updates as we act on your bug. If you had previously " +"used SourceForge to report bugs to Python, you can obtain your Roundup " +"password through Roundup's `password reset procedure `_." +msgstr "" +"Vous devez avoir un compte Roundup pour reporter des bogues; cela nous " +"permet de vous contacter si nous avons des questions complémentaires. Cela " +"permettra aussi le suivi de traitement de votre bogue. Si vous avez " +"auparavant utilisé SourceForge pour reporter des bogues sur Python, vous " +"pouvez obtenir un mot de passe Roundup grâce à la `procédure de " +"réinitialisation de mot de passe de Roundup `_." + +#: faq/general.rst:248 +msgid "" +"For more information on how Python is developed, consult `the Python " +"Developer's Guide `_." +msgstr "" +"Pour davantage d'informations sur comment Python est développé, consultez " +"`le Guide du Développeur Python `_." + +#: faq/general.rst:253 +msgid "Are there any published articles about Python that I can reference?" +msgstr "" +"Existe-t-il des articles publiés au sujet de Python auxquels je peux me " +"référer ?" + +#: faq/general.rst:255 +msgid "It's probably best to cite your favorite book about Python." +msgstr "" +"C'est probablement mieux de vous référer à votre livre favori à propos de " +"Python." + +#: faq/general.rst:257 +#, fuzzy +msgid "" +"The `very first article `_ about Python was " +"written in 1991 and is now quite outdated." +msgstr "" +"Le tout premier article à propos de Python a été écrit en 1991 et est " +"maintenant obsolète." + +#: faq/general.rst:260 +msgid "" +"Guido van Rossum and Jelke de Boer, \"Interactively Testing Remote Servers " +"Using the Python Programming Language\", CWI Quarterly, Volume 4, Issue 4 " +"(December 1991), Amsterdam, pp 283--303." +msgstr "" +"Guido van Rossum et Jelke de Boer, « *Interactively Testing Remote Servers " +"Using the Python Programming Language* », CWI Quarterly, Volume 4, Issue 4 " +"(December 1991), Amsterdam, pp 283--303." + +#: faq/general.rst:266 +msgid "Are there any books on Python?" +msgstr "Y a-t-il des livres au sujet de Python ?" + +#: faq/general.rst:268 +msgid "" +"Yes, there are many, and more are being published. See the python.org wiki " +"at https://wiki.python.org/moin/PythonBooks for a list." +msgstr "" +"Oui, il y en a beaucoup, et d'autres sont en cours de publication. Voir le " +"wiki python à https://wiki.python.org/moin/PythonBooks pour avoir une liste." + +#: faq/general.rst:271 +msgid "" +"You can also search online bookstores for \"Python\" and filter out the " +"Monty Python references; or perhaps search for \"Python\" and \"language\"." +msgstr "" +"Vous pouvez aussi chercher chez les revendeurs de livres en ligne avec le " +"terme « Python » et éliminer les références concernant les Monty Python, ou " +"peut-être faire une recherche avec les termes « langage » et « Python »." + +#: faq/general.rst:276 +msgid "Where in the world is www.python.org located?" +msgstr "Où www.python.org est-il localisé dans le monde ?" + +#: faq/general.rst:278 +#, fuzzy +msgid "" +"The Python project's infrastructure is located all over the world and is " +"managed by the Python Infrastructure Team. Details `here `__." +msgstr "" +"L'infrastructure du projet Python est située dans le monde entier et est " +"gérée par l'équipe de l'infrastructure Python. Plus de détails `ici `__." + +#: faq/general.rst:283 +msgid "Why is it called Python?" +msgstr "Pourquoi le nom Python ?" + +#: faq/general.rst:285 +msgid "" +"When he began implementing Python, Guido van Rossum was also reading the " +"published scripts from `\"Monty Python's Flying Circus\" `__, a BBC comedy series from the 1970s. " +"Van Rossum thought he needed a name that was short, unique, and slightly " +"mysterious, so he decided to call the language Python." +msgstr "" +"Quand il a commencé à implémenter Python, Guido van Rossum a aussi lu le " +"script publié par `\"Monty Python's Flying Circus\" `__, une série comique des années 1970 diffusée par la " +"BBC. Van Rossum a pensé qu'il avait besoin d'un nom court, unique, et un peu " +"mystérieux, donc il a décidé de l'appeler le langage Python." + +#: faq/general.rst:293 +msgid "Do I have to like \"Monty Python's Flying Circus\"?" +msgstr "Dois-je aimer \"Monty Python's Flying Circus\" ?" + +#: faq/general.rst:295 +msgid "No, but it helps. :)" +msgstr "Non, mais ça peut aider. :)" + +#: faq/general.rst:299 +msgid "Python in the real world" +msgstr "Python c'est le monde réel" + +#: faq/general.rst:302 +msgid "How stable is Python?" +msgstr "Quel est le niveau de stabilité de Python ?" + +#: faq/general.rst:304 +msgid "" +"Very stable. New, stable releases have been coming out roughly every 6 to " +"18 months since 1991, and this seems likely to continue. As of version 3.9, " +"Python will have a major new release every 12 months (:pep:`602`)." +msgstr "" +"Très stable. Les versions stables sont sorties environ tous les 6 à 18 mois " +"depuis 1991, et il semble probable que ça continue. À partir de la version " +"3.9, Python aura une nouvelle version majeure tous les 12 mois (:pep:`602`)." + +#: faq/general.rst:308 +msgid "" +"The developers issue \"bugfix\" releases of older versions, so the stability " +"of existing releases gradually improves. Bugfix releases, indicated by a " +"third component of the version number (e.g. 3.5.3, 3.6.2), are managed for " +"stability; only fixes for known problems are included in a bugfix release, " +"and it's guaranteed that interfaces will remain the same throughout a series " +"of bugfix releases." +msgstr "" +"Les développeurs fournissent des versions correctives d'anciennes versions, " +"ainsi la stabilité des versions existantes s'améliore. Les versions " +"correctives, indiquées par le troisième chiffre du numéro de version (ex. " +"2.5.2, 2.6.2), sont gérées pour la stabilité, seules les corrections pour " +"les problèmes connus sont inclus dans les versions correctives, et il est " +"garanti que les interfaces resteront les mêmes tout au long de la série de " +"versions correctives." + +#: faq/general.rst:315 +msgid "" +"The latest stable releases can always be found on the `Python download page " +"`_. There are two production-ready " +"versions of Python: 2.x and 3.x. The recommended version is 3.x, which is " +"supported by most widely used libraries. Although 2.x is still widely used, " +"`it is not maintained anymore `_." +msgstr "" +"Les dernières versions stables peuvent toujours être trouvées sur la `page " +"de téléchargement Python `_. Il existe " +"deux versions stables de Python : 2.x et 3.x, mais seule la version 3 est " +"recommandée, c'est celle qui est compatible avec les bibliothèques les plus " +"largement utilisées. Bien que Python 2 soit encore utilisé, `il n'est " +"désormais plus maintenu `_." + +#: faq/general.rst:322 +msgid "How many people are using Python?" +msgstr "Combien de personnes utilisent Python ?" + +#: faq/general.rst:324 +msgid "" +"There are probably millions of users, though it's difficult to obtain an " +"exact count." +msgstr "" +"Il y a probablement des millions d'utilisateurs, bien qu'il soit difficile " +"d'en déterminer le nombre exact." + +#: faq/general.rst:327 +msgid "" +"Python is available for free download, so there are no sales figures, and " +"it's available from many different sites and packaged with many Linux " +"distributions, so download statistics don't tell the whole story either." +msgstr "" +"Python est disponible en téléchargement gratuit, donc il n'y a pas de " +"chiffres de ventes, il est disponible depuis de nombreux sites différents et " +"il est inclus avec de beaucoup de distributions Linux, donc les statistiques " +"de téléchargement ne donnent pas la totalité non plus." + +#: faq/general.rst:331 +msgid "" +"The comp.lang.python newsgroup is very active, but not all Python users post " +"to the group or even read it." +msgstr "" +"Le forum *comp.lang.python* est très actif, mais tous les utilisateurs de " +"Python ne laissent pas de messages dessus ou même ne le lisent pas." + +#: faq/general.rst:336 +msgid "Have any significant projects been done in Python?" +msgstr "Y a-t-il un nombre de projets significatif réalisés en Python ?" + +#: faq/general.rst:338 +msgid "" +"See https://www.python.org/about/success for a list of projects that use " +"Python. Consulting the proceedings for `past Python conferences `_ will reveal contributions from many " +"different companies and organizations." +msgstr "" +"Voir https://www.python.org/about/success pour avoir une liste des projets " +"qui utilisent Python. En consultant les comptes-rendus des `conférences " +"Python précédentes `_ il " +"s'avère que les contributions proviennent de nombreux organismes et " +"entreprises divers." + +#: faq/general.rst:343 +#, fuzzy +msgid "" +"High-profile Python projects include `the Mailman mailing list manager " +"`_ and `the Zope application server `_. Several Linux distributions, most notably `Red Hat `_, have written part or all of their installer and system " +"administration software in Python. Companies that use Python internally " +"include Google, Yahoo, and Lucasfilm Ltd." +msgstr "" +"Les projets Python à grande visibilité incluent `Mailman mailing list " +"manager `_ et `l'application serveur Zope `_. Plusieurs distributions Linux, notamment `Red Hat `_, qui a écrit tout ou partie de son installateur et de son " +"logiciel d'administration système en Python. Les entreprises qui utilisent " +"Python en interne comprennent Google, Yahoo, et Lucasfilm Ltd." + +#: faq/general.rst:352 +msgid "What new developments are expected for Python in the future?" +msgstr "Quelles sont les nouveautés en développement attendues pour Python ?" + +#: faq/general.rst:354 +msgid "" +"See https://www.python.org/dev/peps/ for the Python Enhancement Proposals " +"(PEPs). PEPs are design documents describing a suggested new feature for " +"Python, providing a concise technical specification and a rationale. Look " +"for a PEP titled \"Python X.Y Release Schedule\", where X.Y is a version " +"that hasn't been publicly released yet." +msgstr "" +"Regardez les propositions d'amélioration de Python (« *Python Enhancement " +"Proposals* », ou *PEP*) sur https://www.python.org/dev/peps/. Les PEP sont " +"des documents techniques qui décrivent une nouvelle fonctionnalité qui a été " +"suggérée pour Python, en fournissant une spécification technique concise et " +"logique. Recherchez une PEP intitulée \"Python X.Y Release Schedule\", où X." +"Y est la version qui n'a pas encore été publiée." + +#: faq/general.rst:360 +msgid "" +"New development is discussed on `the python-dev mailing list `_." +msgstr "" +"Le nouveau développement est discuté sur `la liste de diffusion python-dev " +"`_." + +#: faq/general.rst:365 +msgid "Is it reasonable to propose incompatible changes to Python?" +msgstr "" +"Est-il raisonnable de proposer des changements incompatibles dans Python ?" + +#: faq/general.rst:367 +msgid "" +"In general, no. There are already millions of lines of Python code around " +"the world, so any change in the language that invalidates more than a very " +"small fraction of existing programs has to be frowned upon. Even if you can " +"provide a conversion program, there's still the problem of updating all " +"documentation; many books have been written about Python, and we don't want " +"to invalidate them all at a single stroke." +msgstr "" +"En général, non. Il y a déjà des millions de lignes de code de Python tout " +"autour du monde, donc n'importe quel changement dans le langage qui rend " +"invalide ne serait-ce qu'une très petite fraction du code de programmes " +"existants doit être désapprouvé. Même si vous pouvez fournir un programme de " +"conversion, il y a toujours des problèmes de mise à jour dans toutes les " +"documentations, beaucoup de livres ont été écrits au sujet de Python, et " +"nous ne voulons pas les rendre invalides soudainement." + +#: faq/general.rst:374 +msgid "" +"Providing a gradual upgrade path is necessary if a feature has to be " +"changed. :pep:`5` describes the procedure followed for introducing backward-" +"incompatible changes while minimizing disruption for users." +msgstr "" +"En fournissant un rythme de mise à jour progressif qui est obligatoire si " +"une fonctionnalité doit être changée." + +#: faq/general.rst:380 +msgid "Is Python a good language for beginning programmers?" +msgstr "" +"Existe-t-il un meilleur langage de programmation pour les programmeurs " +"débutants ?" + +#: faq/general.rst:382 +msgid "Yes." +msgstr "Oui." + +#: faq/general.rst:384 +msgid "" +"It is still common to start students with a procedural and statically typed " +"language such as Pascal, C, or a subset of C++ or Java. Students may be " +"better served by learning Python as their first language. Python has a very " +"simple and consistent syntax and a large standard library and, most " +"importantly, using Python in a beginning programming course lets students " +"concentrate on important programming skills such as problem decomposition " +"and data type design. With Python, students can be quickly introduced to " +"basic concepts such as loops and procedures. They can probably even work " +"with user-defined objects in their very first course." +msgstr "" +"Il reste commun pour les étudiants de commencer avec un langage procédural " +"et à typage statique comme le Pascal, le C, ou un sous-ensemble du C++ ou " +"Java. Les étudiants pourraient être mieux servis en apprenant Python comme " +"premier langage. Python a une syntaxe très simple et cohérente ainsi qu'une " +"vaste libraire standard, plus important encore, utiliser Python dans les " +"cours d'initiation à la programmation permet aux étudiants de se concentrer " +"sur les compétences de programmation les cruciales comme les problèmes de " +"découpage et d'architecture. Avec Python, les étudiants peuvent rapidement " +"aborder des concepts fondamentaux comme les boucles et les procédures. Ils " +"peuvent même probablement travailler avec des objets définis dans leurs " +"premiers cours." + +#: faq/general.rst:394 +msgid "" +"For a student who has never programmed before, using a statically typed " +"language seems unnatural. It presents additional complexity that the " +"student must master and slows the pace of the course. The students are " +"trying to learn to think like a computer, decompose problems, design " +"consistent interfaces, and encapsulate data. While learning to use a " +"statically typed language is important in the long term, it is not " +"necessarily the best topic to address in the students' first programming " +"course." +msgstr "" +"Pour un étudiant qui n'a jamais programmé avant, utiliser un langage à " +"typage statique peut sembler contre-nature. Cela représente une complexité " +"additionnelle que l'étudiant doit maîtriser ce qui ralentit le cours. Les " +"étudiants essaient d'apprendre à penser comme un ordinateur, décomposer les " +"problèmes, établir une architecture propre, et résumer les données. " +"Apprendre à utiliser un langage typé statiquement est important sur le long " +"terme, ce n'est pas nécessairement la meilleure idée pour s'adresser aux " +"étudiants durant leur tout premier cours." + +#: faq/general.rst:402 +msgid "" +"Many other aspects of Python make it a good first language. Like Java, " +"Python has a large standard library so that students can be assigned " +"programming projects very early in the course that *do* something. " +"Assignments aren't restricted to the standard four-function calculator and " +"check balancing programs. By using the standard library, students can gain " +"the satisfaction of working on realistic applications as they learn the " +"fundamentals of programming. Using the standard library also teaches " +"students about code reuse. Third-party modules such as PyGame are also " +"helpful in extending the students' reach." +msgstr "" +"De nombreux autres aspects de Python en font un bon premier langage. Comme " +"Java, Python a une large bibliothèque standard donc les étudiants peuvent " +"être assigner à la programmation de projets très tôt dans leur apprentissage " +"qui *fait* quelque chose. Les missions ne sont pas restreintes aux quatre " +"fonction standards. En utilisant la bibliothèque standard, les étudiants " +"peuvent ressentir de la satisfaction en travaillant sur des applications " +"réalistes alors qu'ils apprennent les fondamentaux de la programmation. " +"Utiliser la bibliothèque standard apprend aussi aux étudiants la " +"réutilisation de code. Les modules tiers tels que PyGame sont aussi très " +"utiles pour étendre les compétences des étudiants." + +#: faq/general.rst:411 +msgid "" +"Python's interactive interpreter enables students to test language features " +"while they're programming. They can keep a window with the interpreter " +"running while they enter their program's source in another window. If they " +"can't remember the methods for a list, they can do something like this::" +msgstr "" +"L'interpréteur interactif de Python permet aux étudiants de tester les " +"fonctionnalités du langage pendant qu'ils programment. Ils peuvent garder " +"une fenêtre avec l'interpréteur en fonctionnement pendant qu'ils rentrent la " +"source de leur programme dans une autre fenêtre. S'ils ne peuvent pas se " +"souvenir des méthodes pour une liste, ils peuvent faire quelque chose comme " +"ça ::" + +#: faq/general.rst:440 +msgid "" +"With the interpreter, documentation is never far from the student as they " +"are programming." +msgstr "" +"Avec l'interpréteur, la documentation n'est jamais loin des étudiants quand " +"ils travaillent." + +#: faq/general.rst:443 +#, fuzzy +msgid "" +"There are also good IDEs for Python. IDLE is a cross-platform IDE for " +"Python that is written in Python using Tkinter. Emacs users will be happy to " +"know that there is a very good Python mode for Emacs. All of these " +"programming environments provide syntax highlighting, auto-indenting, and " +"access to the interactive interpreter while coding. Consult `the Python " +"wiki `_ for a full list of " +"Python editing environments." +msgstr "" +"Il y a aussi de bons environnements de développement intégrés (EDIs) pour " +"Python. IDLE est un EDI multiplateformes pour Python qui est écrit en Python " +"en utilisant Tkinter. *PythonWin* est un IDE spécifique à Windows. Les " +"utilisateurs d'Emacs seront heureux d'apprendre qu'il y a un très bon mode " +"Python pour Emacs. Tous ces environnements de développement intégrés " +"fournissent la coloration syntaxique, l'auto-indentation, et l'accès à " +"l'interpréteur interactif durant le codage. Consultez `le wiki Python " +"`_ pour une liste complète des " +"environnements de développement intégrés." + +#: faq/general.rst:451 +msgid "" +"If you want to discuss Python's use in education, you may be interested in " +"joining `the edu-sig mailing list `_." +msgstr "" +"Si vous voulez discuter de l'usage de Python dans l'éducation, vous devriez " +"intéressé pour rejoindre `la liste de diffusion pour l'enseignement `_." + +#~ msgid "" +#~ "Python versions are numbered A.B.C or A.B. A is the major version number " +#~ "-- it is only incremented for really major changes in the language. B is " +#~ "the minor version number, incremented for less earth-shattering changes. " +#~ "C is the micro-level -- it is incremented for each bugfix release. See :" +#~ "pep:`6` for more information about bugfix releases." +#~ msgstr "" +#~ "Les versions de Python sont numérotées A.B.C ou A.B. A est une version " +#~ "majeure -- elle est augmentée seulement lorsqu'il y a des changements " +#~ "conséquents dans le langage. B est une version mineure, elle est " +#~ "augmentée lors de changements de moindre importance. C est un micro-" +#~ "niveau -- elle est augmentée à chaque sortie de correctifs de bogue." + +#~ msgid "" +#~ "Alpha, beta and release candidate versions have an additional suffix. " +#~ "The suffix for an alpha version is \"aN\" for some small number N, the " +#~ "suffix for a beta version is \"bN\" for some small number N, and the " +#~ "suffix for a release candidate version is \"rcN\" for some small number " +#~ "N. In other words, all versions labeled 2.0aN precede the versions " +#~ "labeled 2.0bN, which precede versions labeled 2.0rcN, and *those* precede " +#~ "2.0." +#~ msgstr "" +#~ "Les versions *alpha*, *beta* et *release candidate* ont un suffixe " +#~ "supplémentaire. Le suffixe pour une version alpha est « aN » où N est un " +#~ "petit nombre, le suffixe pour une version *beta* est *bN* où N est un " +#~ "petit nombre, et le suffixe pour une *release candidate* est *rcN* où N " +#~ "est un petit nombre. En d'autres mots, toutes les versions nommées *2.0." +#~ "aN* précèdent les versions *2.0.bN*, qui elles-mêmes précèdent 2.0rcN, et " +#~ "*celles-ci* précèdent la version 2.0." diff --git a/faq/gui.po b/faq/gui.po new file mode 100644 index 0000000000..46fe9ed9e5 --- /dev/null +++ b/faq/gui.po @@ -0,0 +1,333 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-18 15:46+0200\n" +"PO-Revision-Date: 2021-12-16 02:34+0100\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 3.0\n" + +#: faq/gui.rst:5 +msgid "Graphic User Interface FAQ" +msgstr "FAQ interface graphique" + +#: faq/gui.rst:8 +msgid "Contents" +msgstr "Sommaire" + +#: faq/gui.rst:15 +msgid "General GUI Questions" +msgstr "Questions générales sur l'interface graphique" + +#: faq/gui.rst:18 +msgid "What GUI toolkits exist for Python?" +msgstr "Quelles boîtes à outils IUG existent pour Python ?" + +#: faq/gui.rst:20 +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 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 `. " +"C'est probablement la plus facile à installer (puisqu'elle est incluse avec " +"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 macOS, " +"Windows et Unix." + +#: faq/gui.rst:28 +msgid "" +"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 "" +"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:36 +msgid "Tkinter questions" +msgstr "Questions à propos de *Tkinter*" + +#: faq/gui.rst:39 +msgid "How do I freeze Tkinter applications?" +msgstr "Comment puis-je geler (*freezer*) les applications *Tkinter* ?" + +#: 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 " +"application will still need the Tcl and Tk libraries." +msgstr "" +"*Freeze* est un outil pour créer des applications autonomes. Lors du " +"*freezage* des applications Tkinter, les applications ne seront pas vraiment " +"autonomes, car l'application aura toujours besoin des bibliothèques Tcl et " +"Tk." + +#: 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:" +"`TK_LIBRARY` environment variables." +msgstr "" +"Une solution consiste à empaqueter les bibliothèques *Tcl* et *Tk* dans " +"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:49 +#, fuzzy +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 " +"is SAM (stand-alone modules), which is part of the Tix distribution (https://" +"tix.sourceforge.net/)." +msgstr "" +"Pour obtenir des applications vraiment autonomes, les scripts *Tcl* qui " +"forment la bibliothèque doivent également être intégrés dans l'application. " +"Un outil supportant cela est *SAM* (modules autonomes), qui fait partie de " +"la distribution *Tix* (http://tix.sourceforge.net/)." + +#: 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 " +"with libtclsam and libtksam (you might include the Tix libraries as well)." +msgstr "" +"Compilez Tix avec SAM activé, exécutez l'appel approprié à :c:func:" +"`Tclsam_init`, etc. dans le fichier :file:`Modules/tkappinit.c` de Python, " +"et liez avec *libtclsam* et *libtksam* (il est également possible d'inclure " +"les bibliothèques *Tix*)." + +#: 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: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 " +"Xt's :c:func:`XtAddInput()` call, which allows you to register a callback " +"function which will be called from the Tk mainloop when I/O is possible on a " +"file descriptor. See :ref:`tkinter-file-handlers`." +msgstr "" +"Sur d'autres plates-formes que Windows, oui, et vous n'avez même pas besoin " +"de fils d'exécution multiples ! Mais vous devrez restructurer un peu votre " +"code *E/S*. *Tk* possède l'équivalent de l'appel :c:func:`XtAddInput()` de " +"*Xt*, qui vous permet d'enregistrer une fonction de *callback* qui sera " +"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: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: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 " +"pressed." +msgstr "" +"Une raison récurrente est que les gestionnaires d’évènements liés à des " +"é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: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 " +"focus command. Usually a widget is given the keyboard focus by clicking in " +"it (but not for labels; see the takefocus option)." +msgstr "" +"La cause la plus fréquente est que l'objet graphique auquel s'applique la " +"liaison n'a pas de « focus clavier ». Consultez la documentation *Tk* pour " +"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/index.po b/faq/index.po new file mode 100644 index 0000000000..9c52b2a26f --- /dev/null +++ b/faq/index.po @@ -0,0 +1,19 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +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: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \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" + +#: faq/index.rst:5 +msgid "Python Frequently Asked Questions" +msgstr "Questions fréquemment posées sur Python" diff --git a/faq/installed.po b/faq/installed.po new file mode 100644 index 0000000000..c3e180b561 --- /dev/null +++ b/faq/installed.po @@ -0,0 +1,144 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-09-23 16:16+0200\n" +"PO-Revision-Date: 2021-10-17 18:51+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 3.0\n" + +#: faq/installed.rst:3 +msgid "\"Why is Python Installed on my Computer?\" FAQ" +msgstr "FAQ \"Pourquoi Python est installé sur mon ordinateur ?\"" + +#: faq/installed.rst:6 +msgid "What is Python?" +msgstr "Qu'est-ce que Python ?" + +#: faq/installed.rst:8 +msgid "" +"Python is a programming language. It's used for many different " +"applications. It's used in some high schools and colleges as an introductory " +"programming language because Python is easy to learn, but it's also used by " +"professional software developers at places such as Google, NASA, and " +"Lucasfilm Ltd." +msgstr "" +"Python est un langage de programmation. Il est utilisé dans de nombreuses " +"applications. Souvent utilisé dans les lycées et universités comme langage " +"d'introduction à la programmation pour sa simplicité d'apprentissage, il est " +"aussi utilisé par des développeurs professionnels appartenant à des grands " +"groupes comme Google, la NASA, Lucasfilm etc." + +#: faq/installed.rst:13 +msgid "" +"If you wish to learn more about Python, start with the `Beginner's Guide to " +"Python `_." +msgstr "" +"Si vous voulez en apprendre plus sur Python, vous pouvez commencer par le " +"`Guide des Débutants pour Python `_." + +#: faq/installed.rst:18 +msgid "Why is Python installed on my machine?" +msgstr "Pourquoi Python est installé sur ma machine ?" + +#: faq/installed.rst:20 +msgid "" +"If you find Python installed on your system but don't remember installing " +"it, there are several possible ways it could have gotten there." +msgstr "" +"Si Python est installé sur votre système mais que vous ne vous rappelez pas " +"l'avoir installé, il y a plusieurs raisons possibles à sa présence." + +#: faq/installed.rst:23 +msgid "" +"Perhaps another user on the computer wanted to learn programming and " +"installed it; you'll have to figure out who's been using the machine and " +"might have installed it." +msgstr "" +"Peut être qu'un autre utilisateur de l'ordinateur voulait apprendre la " +"programmation et l'a installé, dans ce cas vous allez devoir trouver qui a " +"utilisé votre machine et aurait pu l'installer." + +#: faq/installed.rst:26 +msgid "" +"A third-party application installed on the machine might have been written " +"in Python and included a Python installation. There are many such " +"applications, from GUI programs to network servers and administrative " +"scripts." +msgstr "" +"Une application tierce installée sur votre machine écrite en Python " +"installera Python. Il existe de nombreuses applications de ce type, allant " +"de programme avec interface graphique, jusqu'aux scripts d'administration, " +"en passant par les serveurs." + +#: faq/installed.rst:29 +msgid "" +"Some Windows machines also have Python installed. At this writing we're " +"aware of computers from Hewlett-Packard and Compaq that include Python. " +"Apparently some of HP/Compaq's administrative tools are written in Python." +msgstr "" +"Certaines machines fonctionnant avec le système d'exploitation Windows " +"possèdent une installation de Python. À ce jour, les ordinateurs des marques " +"Hewlett-Packard et Compaq incluent nativement Python. Certains outils " +"d'administration de ces marques sont écrits en Python." + +#: faq/installed.rst:32 +msgid "" +"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 sur de nombreux systèmes compatibles Unix, " +"comme macOS et certaines distributions Linux." + +#: faq/installed.rst:38 +msgid "Can I delete Python?" +msgstr "Puis-je supprimer Python ?" + +#: faq/installed.rst:40 +msgid "That depends on where Python came from." +msgstr "Cela dépend de l'origine de Python." + +#: faq/installed.rst:42 +msgid "" +"If someone installed it deliberately, you can remove it without hurting " +"anything. On Windows, use the Add/Remove Programs icon in the Control Panel." +msgstr "" +"Si Python a été installé délibérément par une personne tierce ou vous même, " +"vous pouvez le supprimer sans causer de dommage. Sous Windows, vous pouvez " +"simplement utiliser l'icône d'Ajout / Suppression de programmes du Panneau " +"de configuration." + +#: faq/installed.rst:45 +msgid "" +"If Python was installed by a third-party application, you can also remove " +"it, but that application will no longer work. You should use that " +"application's uninstaller rather than removing Python directly." +msgstr "" +"Si Python a été installé par une application tierce, Python peut être " +"désinstallé, l'application l'ayant installé cessera alors de fonctionner. " +"Dans ce cas, désinstallez l'application en utilisant son outil de " +"désinstallation est plus indiqué que supprimer Python." + +#: faq/installed.rst:49 +msgid "" +"If Python came with your operating system, removing it is not recommended. " +"If you remove it, whatever tools were written in Python will no longer run, " +"and some of them might be important to you. Reinstalling the whole system " +"would then be required to fix things again." +msgstr "" +"Si Python a été installé avec votre système d'exploitation, le supprimer " +"n'est pas recommandé. Si vous choisissez tout de même de le supprimer, tous " +"les outils écrits en python cesseront alors de fonctionner, certains outils " +"pouvant être importants. La réinstallation intégrale du système pourrait " +"être nécessaire pour résoudre les problèmes suite à la désinstallation de " +"Python." diff --git a/faq/library.po b/faq/library.po new file mode 100644 index 0000000000..ac5dab11ec --- /dev/null +++ b/faq/library.po @@ -0,0 +1,1195 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-18 15:46+0200\n" +"PO-Revision-Date: 2021-12-06 20:15+0100\n" +"Last-Translator: Fipaddict \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 3.0\n" + +#: faq/library.rst:5 +msgid "Library and Extension FAQ" +msgstr "FAQ sur la bibliothèque et les extensions" + +#: faq/library.rst:8 +msgid "Contents" +msgstr "Sommaire" + +#: faq/library.rst:12 +msgid "General Library Questions" +msgstr "Questions générales sur la bibliothèque" + +#: faq/library.rst:15 +msgid "How do I find a module or application to perform task X?" +msgstr "" +"Comment trouver un module ou une application pour effectuer la tâche X ?" + +#: faq/library.rst:17 +msgid "" +"Check :ref:`the Library Reference ` to see if there's a " +"relevant standard library module. (Eventually you'll learn what's in the " +"standard library and will be able to skip this step.)" +msgstr "" +"Regardez si la :ref:`bibliothèque standard ` contient un " +"module approprié (avec l'expérience, vous connaîtrez le contenu de la " +"bibliothèque standard et pourrez sauter cette étape)." + +#: faq/library.rst:21 +msgid "" +"For third-party packages, search the `Python Package Index `_ or try `Google `_ or another web search " +"engine. Searching for \"Python\" plus a keyword or two for your topic of " +"interest will usually find something helpful." +msgstr "" +"Pour des paquets tiers, regardez dans `l'index des paquets Python `_ ou essayez `Google `_ ou un autre moteur " +"de recherche (NDT : comme le moteur français `Qwant `_). Rechercher « Python » accompagné d'un ou deux mots-clés se " +"rapportant à ce qui vous intéresse donne souvent de bons résultats." + +#: faq/library.rst:28 +msgid "Where is the math.py (socket.py, regex.py, etc.) source file?" +msgstr "" +"Où sont stockés les fichiers sources *math.py*, *socket.py*, *regex.py*, " +"etc ?" + +#: faq/library.rst:30 +msgid "" +"If you can't find a source file for a module it may be a built-in or " +"dynamically loaded module implemented in C, C++ or other compiled language. " +"In this case you may not have the source file or it may be something like :" +"file:`mathmodule.c`, somewhere in a C source directory (not on the Python " +"Path)." +msgstr "" +"Si vous ne parvenez pas à trouver le fichier source d'un module, c'est peut-" +"être parce que celui-ci est un module natif ou bien un module implémenté en " +"C, C++, ou autre langage compilé, qui est chargé dynamiquement. Dans ce cas, " +"vous ne possédez peut-être pas le fichier source ou celui-ci est en réalité " +"stocké quelque part dans un dossier de fichiers source C (qui ne sera pas " +"dans le chemin Python), comme par exemple :file:`mathmodule.c`." + +#: faq/library.rst:35 +msgid "There are (at least) three kinds of modules in Python:" +msgstr "Il y a (au moins) trois types de modules dans Python :" + +#: faq/library.rst:37 +msgid "modules written in Python (.py);" +msgstr "les modules écrits en Python (*.py*) ;" + +#: faq/library.rst:38 +msgid "" +"modules written in C and dynamically loaded (.dll, .pyd, .so, .sl, etc);" +msgstr "" +"les modules écrits en C et chargés dynamiquement (*.dll*, *.pyd*, *.so*, *." +"sl*, *etc.*) ;" + +#: faq/library.rst:39 +msgid "" +"modules written in C and linked with the interpreter; to get a list of " +"these, type::" +msgstr "" +"les modules écrits en C et liés à l'interpréteur ; pour obtenir leur liste, " +"entrez ::" + +#: faq/library.rst:47 +msgid "How do I make a Python script executable on Unix?" +msgstr "Comment rendre un script Python exécutable sous Unix ?" + +#: faq/library.rst:49 +msgid "" +"You need to do two things: the script file's mode must be executable and the " +"first line must begin with ``#!`` followed by the path of the Python " +"interpreter." +msgstr "" +"Deux conditions doivent être remplies : les droits d'accès au fichier " +"doivent permettre son exécution et la première ligne du script doit " +"commencer par ``#!`` suivi du chemin vers l'interpréteur Python." + +#: faq/library.rst:53 +msgid "" +"The first is done by executing ``chmod +x scriptfile`` or perhaps ``chmod " +"755 scriptfile``." +msgstr "" +"La première condition est remplie en exécutant ``chmod +x scriptfile`` ou " +"``chmod 755 scriptfile``." + +#: faq/library.rst:56 +msgid "" +"The second can be done in a number of ways. The most straightforward way is " +"to write ::" +msgstr "" +"Il y a plusieurs façons de remplir la seconde. La plus simple consiste à " +"écrire au tout début du fichier ::" + +#: faq/library.rst:61 +msgid "" +"as the very first line of your file, using the pathname for where the Python " +"interpreter is installed on your platform." +msgstr "en utilisant le chemin de l'interpréteur Python sur votre machine." + +#: faq/library.rst:64 +msgid "" +"If you would like the script to be independent of where the Python " +"interpreter lives, you can use the :program:`env` program. Almost all Unix " +"variants support the following, assuming the Python interpreter is in a " +"directory on the user's :envvar:`PATH`::" +msgstr "" +"Pour rendre ce script indépendant de la localisation de l'interpréteur " +"Python, il faut utiliser le programme :program:`env`. La ligne ci-dessous " +"fonctionne sur la quasi-totalité des dérivés de Unix, à condition que " +"l'interpréteur Python soit dans un dossier référencé dans la variable :" +"envvar:`PATH` de l'utilisateur ::" + +#: faq/library.rst:71 +msgid "" +"*Don't* do this for CGI scripts. The :envvar:`PATH` variable for CGI " +"scripts is often very minimal, so you need to use the actual absolute " +"pathname of the interpreter." +msgstr "" +"Ne faites *pas* ceci pour des scripts CGI. La variable :envvar:`PATH` des " +"scripts CGI est souvent très succincte, il faut par conséquent préciser le " +"chemin absolu réel de l'interpréteur." + +#: faq/library.rst:75 +msgid "" +"Occasionally, a user's environment is so full that the :program:`/usr/bin/" +"env` program fails; or there's no env program at all. In that case, you can " +"try the following hack (due to Alex Rezinsky):" +msgstr "" +"Il peut arriver que l'environnement d'un utilisateur soit si chargé que le " +"programme :program:`/usr/bin/env` échoue ; ou que le programme *env* " +"n'existe pas du tout. Dans ce cas, vous pouvez utiliser l'astuce suivante, " +"élaborée par Alex Rezinsky :" + +#: faq/library.rst:86 +msgid "" +"The minor disadvantage is that this defines the script's __doc__ string. " +"However, you can fix that by adding ::" +msgstr "" +"Le léger inconvénient est que cela définit la variable *__doc__* du script. " +"Cependant, il est possible de corriger cela en ajoutant ::" + +#: faq/library.rst:94 +msgid "Is there a curses/termcap package for Python?" +msgstr "Existe-t-il un module *curses* ou *termcap* en Python ?" + +#: faq/library.rst:98 +msgid "" +"For Unix variants: The standard Python source distribution comes with a " +"curses module in the :source:`Modules` subdirectory, though it's not " +"compiled by default. (Note that this is not available in the Windows " +"distribution -- there is no curses module for Windows.)" +msgstr "" +"Pour les dérivés d'Unix : la distribution standard de Python contient un " +"module *curses* dans le sous-dossier :source:`Modules`, bien qu'il ne soit " +"pas compilé par défaut. Il n'est pas disponible en Windows — le module " +"*curses* n'existant pas en Windows." + +#: faq/library.rst:103 +msgid "" +"The :mod:`curses` module supports basic curses features as well as many " +"additional functions from ncurses and SYSV curses such as colour, " +"alternative character set support, pads, and mouse support. This means the " +"module isn't compatible with operating systems that only have BSD curses, " +"but there don't seem to be any currently maintained OSes that fall into this " +"category." +msgstr "" +"Le module :mod:`curses` comprend les fonctionnalités de base de *curses* et " +"beaucoup de fonctionnalités supplémentaires provenant de *ncurses* et de " +"*SYSV curses* comme la couleur, la gestion des ensembles de caractères " +"alternatifs, la prise en charge du pavé tactile et de la souris. Cela " +"implique que le module n'est pas compatible avec des systèmes d'exploitation " +"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: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:113 +msgid "" +"The :mod:`atexit` module provides a register function that is similar to " +"C's :c:func:`onexit`." +msgstr "" +"Le module :mod:`atexit` fournit une fonction d'enregistrement similaire à la " +"fonction C :c:func:`onexit`." + +#: faq/library.rst:118 +msgid "Why don't my signal handlers work?" +msgstr "Pourquoi mes gestionnaires de signaux ne fonctionnent-ils pas ?" + +#: 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 ::" +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:125 +msgid "so it should be declared with two parameters::" +msgstr "donc il doit être déclaré avec deux paramètres ::" + +#: faq/library.rst:132 +msgid "Common tasks" +msgstr "Tâches fréquentes" + +#: 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: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 " +"with the expected output given in the docstring." +msgstr "" +"Python fournit deux cadriciels de test. Le module :mod:`doctest` cherche des " +"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:141 +msgid "" +"The :mod:`unittest` module is a fancier testing framework modelled on Java " +"and Smalltalk testing frameworks." +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: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 " +"functions or class methods -- and this sometimes has the surprising and " +"delightful effect of making the program run faster (because local variable " +"accesses are faster than global accesses). Furthermore the program should " +"avoid depending on mutating global variables, since this makes testing much " +"more difficult to do." +msgstr "" +"Pour rendre le test plus aisé, il est nécessaire de bien découper le code " +"d'un programme. Votre programme doit avoir la quasi-totalité des " +"fonctionnalités dans des fonctions ou des classes — et ceci a parfois " +"l'avantage aussi plaisant qu'inattendu de rendre le programme plus rapide, " +"les accès aux variables locales étant en effet plus rapides que les accès " +"aux variables globales. De plus le programme doit éviter au maximum de " +"manipuler des variables globales, car ceci rend le test beaucoup plus " +"difficile." + +#: 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:157 +msgid "at the bottom of the main module of your program." +msgstr "à la fin du module principal du programme." + +#: 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 " +"behaviours. A test suite that automates a sequence of tests can be " +"associated with each module. This sounds like a lot of work, but since " +"Python is so terse and flexible it's surprisingly easy. You can make coding " +"much more pleasant and fun by writing your test functions in parallel with " +"the \"production code\", since this makes it easy to find bugs and even " +"design flaws earlier." +msgstr "" +"Une fois que la logique du programme est implémentée par un ensemble de " +"fonctions et de comportements de classes, il faut écrire des fonctions de " +"test qui vont éprouver cette logique. À chaque module, il est possible " +"d'associer une suite de tests qui joue de manière automatique un ensemble de " +"tests. Au premier abord, il semble qu'il faille fournir un effort " +"conséquent, mais comme Python est un langage concis et flexible, c'est " +"surprenamment aisé. Écrire simultanément le code « de production » et les " +"fonctions de test associées rend le développement plus agréable et plus " +"amusant, car ceci permet de trouver des bogues, voire des défauts de " +"conception, plus facilement." + +#: 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. ::" +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:173 +msgid "" +"Even programs that interact with complex external interfaces may be tested " +"when the external interfaces are unavailable by using \"fake\" interfaces " +"implemented in Python." +msgstr "" +"Les programmes qui interagissent avec des interfaces externes complexes " +"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:179 +msgid "How do I create documentation from doc strings?" +msgstr "Comment générer la documentation à partir des *docstrings* ?" + +#: faq/library.rst:181 +#, fuzzy +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 " +"docstrings is `epydoc `_. `Sphinx `_ can also include docstring content." +msgstr "" +"Le module :mod:`pydoc` peut générer du HTML à partir des *docstrings* du " +"code source Python. Il est aussi possible de documenter une API uniquement à " +"partir des *docstrings* à l'aide de `epydoc `_. `Sphinx `_ peut également inclure du contenu " +"provenant de *docstrings*." + +#: 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: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." +msgstr "" +"Pour les dérivés d'Unix, plusieurs solutions s'offrent à vous. C'est facile " +"en utilisant le module *curses*, mais *curses* est un module assez " +"conséquent à apprendre." + +#: faq/library.rst:234 +msgid "Threads" +msgstr "Fils d'exécution" + +#: faq/library.rst:237 +msgid "How do I program using threads?" +msgstr "Comment programmer avec des fils d'exécution ?" + +#: 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 " +"the low-level primitives provided by the :mod:`_thread` module." +msgstr "" +"Veillez à bien utiliser le module :mod:`threading` et non le module :mod:" +"`_thread`. Le module :mod:`threading` fournit une abstraction plus facile à " +"manipuler que les primitives de bas-niveau du module :mod:`_thread`." + +#: 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: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." +msgstr "" +"Dès que le fil d'exécution principal se termine, tous les fils sont tués. Le " +"fil principal s'exécute trop rapidement, sans laisser le temps aux autres " +"fils de faire quoi que ce soit." + +#: 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::" +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: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 " +"doesn't start a new thread until the previous thread is blocked." +msgstr "" +"Mais à présent, sur beaucoup de plates-formes, les fils ne s'exécutent pas " +"en parallèle, mais semblent s'exécuter de manière séquentielle, l'un après " +"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: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: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:" +"`queue` module to create a queue object, let each thread append a token to " +"the queue when it finishes, and let the main thread read as many tokens from " +"the queue as there are threads." +msgstr "" +"Au lieu d'essayer de trouver une bonne valeur d'attente pour la fonction :" +"func:`time.sleep`, il vaut mieux utiliser un mécanisme basé sur les " +"sémaphores. Une solution consiste à utiliser le module :mod:`queue` pour " +"créer un objet file, faire en sorte que chaque fil ajoute un jeton à la file " +"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: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:292 +msgid "" +"The easiest way is to use the :mod:`concurrent.futures` module, especially " +"the :mod:`~concurrent.futures.ThreadPoolExecutor` class." +msgstr "" +"La manière la plus simple est d'utiliser le module :mod:`concurrent." +"futures`, en particulier la classe :mod:`~concurrent.futures." +"ThreadPoolExecutor`." + +#: 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 " +"containing a list of jobs. The :class:`~queue.Queue` class maintains a list " +"of objects and has a ``.put(obj)`` method that adds items to the queue and a " +"``.get()`` method to return them. The class will take care of the locking " +"necessary to ensure that each job is handed out exactly once." +msgstr "" +"Ou bien, si vous désirez contrôler plus finement l'algorithme de " +"distribution, vous pouvez écrire votre propre logique « à la main ». " +"Utilisez le module :mod:`queue` pour créer une file de tâches ; la classe :" +"class:`~queue.Queue` gère une liste d'objets et a une méthode ``." +"put(objet)`` pour ajouter un élément à la file, et une méthode ``.get()`` " +"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:302 +msgid "Here's a trivial example::" +msgstr "Voici un exemple trivial ::" + +#: 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:358 +msgid "" +"Consult the module's documentation for more details; the :class:`~queue." +"Queue` class provides a featureful interface." +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: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: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 " +"to switch among threads only between bytecode instructions; how frequently " +"it switches can be set via :func:`sys.setswitchinterval`. Each bytecode " +"instruction and therefore all the C implementation code reached from each " +"instruction is therefore atomic from the point of view of a Python program." +msgstr "" +"Le :term:`verrou global de l'interpréteur ` (GIL " +"pour *global interpreter lock*) est utilisé en interne pour s'assurer que la " +"machine virtuelle Python (MVP) n'exécute qu'un seul fil à la fois. De " +"manière générale, Python ne change de fil qu'entre les instructions du code " +"intermédiaire ; :func:`sys.setswitchinterval` permet de contrôler la " +"fréquence de bascule entre les fils. Chaque instruction du code " +"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: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 " +"shared variables of built-in data types (ints, lists, dicts, etc) that " +"\"look atomic\" really are." +msgstr "" +"En théorie, cela veut dire qu'un décompte exact nécessite une connaissance " +"parfaite de l'implémentation de la MVP. En pratique, cela veut dire que les " +"opérations sur des variables partagées de type natif (les entier, les " +"listes, les dictionnaires, etc.) qui « semblent atomiques » le sont " +"réellement." + +#: 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)::" +msgstr "" +"Par exemple, les opérations suivantes sont toutes atomiques (*L*, *L1* et " +"*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:392 +msgid "These aren't::" +msgstr "Les suivantes ne le sont pas ::" + +#: 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 " +"affect things. This is especially true for the mass updates to dictionaries " +"and lists. When in doubt, use a mutex!" +msgstr "" +"Les opérations qui remplacent d'autres objets peuvent invoquer la méthode :" +"meth:`__del__` de ces objets quand leur compteur de référence passe à zéro, " +"et cela peut avoir de l'impact. C'est tout particulièrement vrai pour les " +"changements massifs sur des dictionnaires ou des listes. En cas de doute, il " +"vaut mieux utiliser un mutex !" + +#: 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: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 " +"multi-threaded Python program effectively only uses one CPU, due to the " +"insistence that (almost) all Python code can only run while the GIL is held." +msgstr "" +"Le :term:`verrou global de l'interpréteur ` (GIL) " +"est souvent vu comme un obstacle au déploiement de code Python sur des " +"serveurs puissants avec de nombreux processeurs, car un programme Python à " +"fils d'exécutions multiples n'utilise en réalité qu'un seul processeur. " +"Presque tout le code Python ne peut en effet être exécuté qu'avec le GIL " +"acquis." + +#: 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 " +"GIL and replaced it with fine-grained locking. Adam Olsen recently did a " +"similar experiment in his `python-safethread `_ project. Unfortunately, both experiments " +"exhibited a sharp drop in single-thread performance (at least 30% slower), " +"due to the amount of fine-grained locking necessary to compensate for the " +"removal of the GIL." +msgstr "" +"À l'époque de Python 1.5, Greg Stein a bien implémenté un ensemble complet " +"de correctifs (les correctifs « fils d'exécution libres ») qui remplaçaient " +"le GIL par des verrous plus granulaires. Adam Olsen a conduit une expérience " +"similaire dans son projet `python-safethread `_. Malheureusement, ces deux tentatives ont " +"induit une baisse significative (d'au moins 30 %) des performances du code à " +"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: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 " +"multiple *processes* rather than multiple *threads*. The :class:" +"`~concurrent.futures.ProcessPoolExecutor` class in the new :mod:`concurrent." +"futures` module provides an easy way of doing so; the :mod:`multiprocessing` " +"module provides a lower-level API in case you want more control over " +"dispatching of tasks." +msgstr "" +"Cela ne signifie pas qu'il est impossible de tirer profit de Python sur des " +"machines à plusieurs cœurs ! Il faut seulement être malin et diviser le " +"travail à faire entre plusieurs *processus* plutôt qu'entre plusieurs *fils " +"d'exécution*. La classe :class:`~concurrent.futures.ProcessPoolExecutor` du " +"nouveau module :mod:`concurrent.futures` permet de faire cela facilement ; " +"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: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 " +"thread of execution is in the C code and allow other threads to get some " +"work done. Some standard library modules such as :mod:`zlib` and :mod:" +"`hashlib` already do this." +msgstr "" +"Des extensions C appropriées peuvent aussi aider ; en utilisant une " +"extension C pour effectuer une tâche longue, l'extension peut relâcher le " +"GIL pendant que le fil est en train d'exécuter ce code et laisser les autres " +"fils travailler. Des modules de la bibliothèque standard comme :mod:`zlib` " +"ou :mod:`hashlib` utilisent cette technique." + +#: 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 " +"objects. Unfortunately, this isn't likely to happen either. It would be a " +"tremendous amount of work, because many object implementations currently " +"have global state. For example, small integers and short strings are cached; " +"these caches would have to be moved to the interpreter state. Other object " +"types have their own free list; these free lists would have to be moved to " +"the interpreter state. And so on." +msgstr "" +"On a déjà proposé de restreindre le GIL par interpréteur, et non plus d'être " +"complètement global ; les interpréteurs ne seraient plus en mesure de " +"partager des objets. Malheureusement, cela n'a pas beaucoup de chance non " +"plus d'arriver. Cela nécessiterait un travail considérable, car la façon " +"dont beaucoup d'objets sont implémentés rend leur état global. Par exemple, " +"les entiers et les chaînes de caractères courts sont mis en cache ; ces " +"caches devraient être déplacés au niveau de l'interpréteur. D'autres objets " +"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: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 " +"extensions are being written at a faster rate than you can convert them to " +"store all their global state in the interpreter state." +msgstr "" +"C'est une tâche sans fin, car les extensions tierces ont le même problème, " +"et il est probable que les extensions tierces soient développées plus vite " +"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: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?" +msgstr "" +"Et enfin, quel intérêt y a-t-il à avoir plusieurs interpréteurs qui ne " +"partagent pas d'état, par rapport à faire tourner chaque interpréteur dans " +"un processus différent ?" + +#: faq/library.rst:456 +msgid "Input and Output" +msgstr "Les entrées/sorties" + +#: 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:461 +msgid "" +"Use ``os.remove(filename)`` or ``os.unlink(filename)``; for documentation, " +"see the :mod:`os` module. The two functions are identical; :func:`~os." +"unlink` is simply the name of the Unix system call for this function." +msgstr "" +"Utilisez ``os.remove(filename)`` ou ``os.unlink(filename)`` ; pour la " +"documentation, référez-vous au module :mod:`os`. Ces deux fonctions sont " +"identiques, :func:`~os.unlink` n'est tout simplement que le nom de l'appel " +"système à cette fonction sous Unix." + +#: 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 " +"``path`` that don't exist. ``os.removedirs(path)`` will remove intermediate " +"directories as long as they're empty; if you want to delete an entire " +"directory tree and its contents, use :func:`shutil.rmtree`." +msgstr "" +"Utilisez :func:`os.rmdir` pour supprimer un dossier et :func:`os.mkdir` pour " +"en créer un nouveau. ``os.makedirs(chemin)`` crée les dossiers " +"intermédiaires de ``chemin`` qui n'existent pas et ``os.removedirs(chemin)`` " +"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: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: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. " +"There's also ``os.ftruncate(fd, offset)`` for files opened with :func:`os." +"open`, where *fd* is the file descriptor (a small integer)." +msgstr "" +"Pour supprimer le contenu d'un fichier, ouvrez celui-ci avec ``f = " +"open(nom_du_fichier, \"rb+\")``, puis exécutez ``f.truncate(décalage)`` où " +"*décalage* est par défaut la position actuelle de la tête de lecture. Il " +"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:478 +msgid "" +"The :mod:`shutil` module also contains a number of functions to work on " +"files including :func:`~shutil.copyfile`, :func:`~shutil.copytree`, and :" +"func:`~shutil.rmtree`." +msgstr "" +"Le module :mod:`shutil` propose aussi un grand nombre de fonctions pour " +"effectuer des opérations sur des fichiers comme :func:`~shutil.copyfile`, :" +"func:`~shutil.copytree` et :func:`~shutil.rmtree`." + +#: faq/library.rst:484 +msgid "How do I copy a file?" +msgstr "Comment copier un fichier ?" + +#: faq/library.rst:486 +msgid "" +"The :mod:`shutil` module contains a :func:`~shutil.copyfile` function. Note " +"that on Windows NTFS volumes, it does not copy `alternate data streams " +"`_ nor " +"`resource forks `__ on macOS " +"HFS+ volumes, though both are now rarely used. It also doesn't copy file " +"permissions and metadata, though using :func:`shutil.copy2` instead will " +"preserve most (though not all) of it." +msgstr "" + +#: faq/library.rst:497 +msgid "How do I read (or write) binary data?" +msgstr "Comment lire (ou écrire) des données binaires ?" + +#: faq/library.rst:499 +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 " +"(usually numbers) and convert it to Python objects; and vice versa." +msgstr "" +"Pour lire ou écrire des formats de données complexes en binaire, il est " +"recommandé d'utiliser le module :mod:`struct`. Celui-ci permet de convertir " +"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 +msgid "" +"For example, the following code reads two 2-byte integers and one 4-byte " +"integer in big-endian format from a file::" +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 +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 " +"bytes) from the string." +msgstr "" +"« > » dans la chaîne de formatage indique que la donnée doit être lue en " +"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 +msgid "" +"For data that is more regular (e.g. a homogeneous list of ints or floats), " +"you can also use the :mod:`array` module." +msgstr "" +"Pour une donnée plus régulière (p. ex. une liste homogène d'entiers ou de " +"nombres à virgule flottante), il est possible d'utiliser le module :mod:" +"`array`." + +#: faq/library.rst:521 +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\"`` " +"instead (the default), the file will be open in text mode and ``f.read()`` " +"will return :class:`str` objects rather than :class:`bytes` objects." +msgstr "" +"Pour lire et écrire de la donnée binaire, il est obligatoire d'ouvrir le " +"fichier en mode binaire également (ici, en passant ``\"rb\"`` à :func:" +"`open`). En utilisant ``\"r\"`` (valeur par défaut), le fichier est ouvert " +"en mode textuel et ``f.read()`` renvoie des objets :class:`str` au lieu " +"d'objets :class:`bytes`." + +#: faq/library.rst:529 +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 +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-" +"level file object, the same type returned by the built-in :func:`open` " +"function. Thus, to read *n* bytes from a pipe *p* created with :func:`os." +"popen`, you need to use ``p.read(n)``." +msgstr "" +":func:`os.read` est une fonction de bas niveau qui prend en paramètre un " +"descripteur de fichier — un entier court qui représente le fichier ouvert. :" +"func:`os.popen` crée un objet fichier de haut niveau, du même type que celui " +"renvoyé par la fonction native :func:`open`. Par conséquent, pour lire *n* " +"octets d'un tube *p* créé avec :func:`os.popen`, il faut utiliser ``p." +"read(n)``." + +#: faq/library.rst:618 +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, OSX, Linux, BSD, Jython, IronPython:" +msgstr "Pour Win32, OSX, Linux, BSD, Jython et IronPython :" + +#: faq/library.rst:622 +msgid "https://pypi.org/project/pyserial/" +msgstr "https://pypi.org/project/pyserial/" + +#: faq/library.rst:624 +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 +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 +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 +msgid "" +"Python :term:`file objects ` are a high-level layer of " +"abstraction on low-level C file descriptors." +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 +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 " +"Python's point of view, and also arranges to close the underlying C file " +"descriptor. This also happens automatically in ``f``'s destructor, when " +"``f`` becomes garbage." +msgstr "" +"Pour la plupart des objets fichiers créés en Python avec la fonction native :" +"func:`open`, ``f.close()`` marque le fichier comme fermé du point de vue de " +"Python et ferme aussi le descripteur C sous-jacent. Le même mécanisme est " +"enclenché automatiquement dans le destructeur de ``f``, lorsque ``f`` est " +"recyclé." + +#: faq/library.rst:641 +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()`` " +"marks the Python-level file object as being closed, but does *not* close the " +"associated C file descriptor." +msgstr "" +"Mais *stdin*, *stdout* et *stderr* ont droit à un traitement spécial en " +"Python, car leur statut en C est lui aussi spécial. Exécuter ``sys.stdout." +"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 +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 " +"extension modules trying to do I/O). If it is, use :func:`os.close`::" +msgstr "" +"Pour fermer le descripteur de fichier sous-jacent C de l'une de ces trois " +"sorties, demandez-vous avant tout si vous êtes sûr de vous (cela peut, par " +"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 +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 +msgid "Network/Internet Programming" +msgstr "Programmation réseau et Internet" + +#: faq/library.rst:661 +msgid "What WWW tools are there for Python?" +msgstr "Quels sont les outils Python dédiés à la Toile ?" + +#: faq/library.rst:663 +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-" +"side and client-side web systems." +msgstr "" +"Référez-vous aux chapitres intitulés :ref:`internet` et :ref:`netdata` dans " +"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 +msgid "" +"A summary of available frameworks is maintained by Paul Boddie at https://" +"wiki.python.org/moin/WebProgramming\\ ." +msgstr "" +"Un résumé des cadriciels disponibles est maintenu par Paul Boddie à " +"l'adresse https://wiki.python.org/moin/WebProgramming\\ ." + +#: faq/library.rst:672 +#, fuzzy +msgid "" +"Cameron Laird maintains a useful set of pages about Python web technologies " +"at https://web.archive.org/web/20210224183619/http://phaseit.net/claird/comp." +"lang.python/web_python." +msgstr "" +"Cameron Laird maintient un ensemble intéressant d'articles sur les " +"technologies Python dédiées à la Toile à l'adresse http://phaseit.net/claird/" +"comp.lang.python/web_python." + +#: faq/library.rst:677 +msgid "How can I mimic CGI form submission (METHOD=POST)?" +msgstr "Comment reproduire un envoi de formulaire CGI (``METHOD=POST``) ?" + +#: faq/library.rst:679 +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?" +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 +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 +msgid "" +"Note that in general for percent-encoded POST operations, query strings must " +"be quoted using :func:`urllib.parse.urlencode`. For example, to send " +"``name=Guy Steele, Jr.``::" +msgstr "" +"Remarquez qu'en général, la chaîne de caractères d'une requête POST encodée " +"avec des signes « % » doit être mise entre guillemets à l'aide de :func:" +"`urllib.parse.urlencode`. Par exemple pour envoyer ``name=Guy Steele, Jr." +"`` ::" + +#: faq/library.rst:705 +msgid ":ref:`urllib-howto` for extensive examples." +msgstr ":ref:`urllib-howto` pour des exemples complets." + +#: faq/library.rst:709 +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 +msgid "" +"You can find a collection of useful links on the `Web Programming wiki page " +"`_." +msgstr "" +"La `page wiki de la programmation Toile `_ (en anglais) répertorie un ensemble de liens pertinents." + +#: faq/library.rst:718 +msgid "How do I send mail from a Python script?" +msgstr "Comment envoyer un courriel avec un script Python ?" + +#: faq/library.rst:720 +msgid "Use the standard library module :mod:`smtplib`." +msgstr "Utilisez le module :mod:`smtplib` de la bibliothèque standard." + +#: faq/library.rst:722 +msgid "" +"Here's a very simple interactive mail sender that uses it. This method will " +"work on any host that supports an SMTP listener. ::" +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 +msgid "" +"A Unix-only alternative uses sendmail. The location of the sendmail program " +"varies between systems; sometimes it is ``/usr/lib/sendmail``, sometimes ``/" +"usr/sbin/sendmail``. The sendmail manual page will help you out. Here's " +"some sample code::" +msgstr "" +"Sous Unix, il est possible d'utiliser *sendmail*. La localisation de " +"l'exécutable *sendmail* dépend du système ; cela peut-être ``/usr/lib/" +"sendmail`` ou ``/usr/sbin/sendmail``, la page de manuel de *sendmail* peut " +"vous aider. Par exemple ::" + +#: faq/library.rst:762 +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 +msgid "" +"The :mod:`select` module is commonly used to help with asynchronous I/O on " +"sockets." +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 +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 " +"connect immediately (unlikely) or get an exception that contains the error " +"number as ``.errno``. ``errno.EINPROGRESS`` indicates that the connection is " +"in progress, but hasn't finished yet. Different OSes will return different " +"values, so you're going to have to check what's returned on your system." +msgstr "" +"Pour empêcher une connexion TCP de se bloquer, il est possible de mettre le " +"connecteur en mode lecture seule. Avec cela, au moment du :meth:`socket." +"connect`, la connexion pourra être immédiate (peu probable) ou bien vous " +"obtiendrez une exception qui contient le numéro d'erreur dans ``.errno``. " +"``errno.EINPROGRESS`` indique que la connexion est en cours, mais qu'elle " +"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 +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 :" +"meth:`socket.connect_ex` again later -- ``0`` or ``errno.EISCONN`` indicate " +"that you're connected -- or you can pass this socket to :meth:`select." +"select` to check if it's writable." +msgstr "" +":meth:`socket.connect_ex` permet d'éviter la création de l'exception, et de " +"ne renvoyer que la valeur de *errno*. Pour vérifier l'état de la connexion, " +"utilisez encore une fois :meth:`socket.connect_ex` — ``0`` ou ``errno." +"EISCONN`` indiquent que la connexion est active — ou passez le connecteur en " +"argument de :meth:`select.select` pour vérifier si le connecteur est prêt à " +"recevoir des entrées." + +#: faq/library.rst:780 +msgid "" +"The :mod:`asyncio` module provides a general purpose single-threaded and " +"concurrent asynchronous library, which can be used for writing non-blocking " +"network code. The third-party `Twisted `_ " +"library is a popular and feature-rich alternative." +msgstr "" +"Le module :mod:`asyncore` propose une approche générique mono-processus " +"asynchrone pour écrire du code réseau non-bloquant. La bibliothèque tierce " +"`Twisted `_ en est une alternative " +"plébiscitée, avec un grand nombre de fonctionnalités." + +#: faq/library.rst:788 +msgid "Databases" +msgstr "Bases de données" + +#: faq/library.rst:791 +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 +msgid "Yes." +msgstr "Oui." + +#: faq/library.rst:795 +msgid "" +"Interfaces to disk-based hashes such as :mod:`DBM ` and :mod:`GDBM " +"` are also included with standard Python. There is also the :mod:" +"`sqlite3` module, which provides a lightweight disk-based relational " +"database." +msgstr "" +"La distribution standard de Python fournit aussi des interfaces à des bases " +"de données comme :mod:`DBM ` ou :mod:`GDBM `. Il existe " +"aussi le module :mod:`sqlite3` qui implémente une base de données " +"relationnelle légère sur disque." + +#: faq/library.rst:800 +msgid "" +"Support for most relational databases is available. See the " +"`DatabaseProgramming wiki page `_ for details." +msgstr "" +"La gestion de la plupart des bases de données relationnelles est assurée. " +"Voir la page wiki `DatabaseProgramming `_ pour plus de détails." + +#: faq/library.rst:806 +msgid "How do you implement persistent objects in Python?" +msgstr "Comment implémenter la persistance d'objets en Python ?" + +#: faq/library.rst:808 +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 :" +"mod:`shelve` library module uses pickle and (g)dbm to create persistent " +"mappings containing arbitrary Python objects." +msgstr "" +"Le module :mod:`pickle` répond à cela de manière large (bien qu'il ne soit " +"pas possible de stocker des fichiers ouverts, des connecteurs ou des " +"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 +msgid "Mathematics and Numerics" +msgstr "Mathématiques et calcul numérique" + +#: faq/library.rst:818 +msgid "How do I generate random numbers in Python?" +msgstr "Comment générer des nombres aléatoires en Python ?" + +#: faq/library.rst:820 +msgid "" +"The standard module :mod:`random` implements a random number generator. " +"Usage is simple::" +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 +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 +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 +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 +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 +msgid "" +"``normalvariate(mean, sdev)`` samples the normal (Gaussian) distribution." +msgstr "``normalvariate(mean, sdev)`` simule la loi normale (Gaussienne)." + +#: faq/library.rst:834 +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 +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 +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 +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 "" +#~ "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." +#~ msgstr "" +#~ "Le module :mod:`shutil` fournit la fonction :func:`~shutil.copyfile`. " +#~ "Sous MacOS 9, celle-ci ne copie pas le clonage de ressources ni les " +#~ "informations du chercheur." + +#~ 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 new file mode 100644 index 0000000000..a088858926 --- /dev/null +++ b/faq/programming.po @@ -0,0 +1,3464 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-22 22:57+0100\n" +"PO-Revision-Date: 2022-05-27 12:15+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 3.0.1\n" + +#: faq/programming.rst:5 +msgid "Programming FAQ" +msgstr "FAQ de programmation" + +#: faq/programming.rst:8 +msgid "Contents" +msgstr "Sommaire" + +#: faq/programming.rst:12 +msgid "General Questions" +msgstr "Questions générales" + +#: faq/programming.rst:15 +msgid "" +"Is there a source code level debugger with breakpoints, single-stepping, " +"etc.?" +msgstr "" +"Existe-t-il un débogueur de code source avec points d'arrêts, exécution pas-" +"à-pas, etc. ?" + +#: faq/programming.rst:58 +msgid "Yes." +msgstr "Oui." + +#: faq/programming.rst:19 +msgid "" +"Several debuggers for Python are described below, and the built-in function :" +"func:`breakpoint` allows you to drop into any of them." +msgstr "" +"Plusieurs débogueurs sont décrits ci-dessous et la fonction native :func:" +"`breakpoint` permet d'utiliser n'importe lequel d'entre eux." + +#: faq/programming.rst:22 +msgid "" +"The pdb module is a simple but adequate console-mode debugger for Python. It " +"is part of the standard Python library, and is :mod:`documented in the " +"Library Reference Manual `. You can also write your own debugger by " +"using the code for pdb as an example." +msgstr "" +"Le module ``pdb`` est un débogueur console simple, mais parfaitement adapté " +"à Python. Il fait partie de la bibliothèque standard de Python, sa " +"documentation se trouve dans le :mod:`manuel de référence `. Vous " +"pouvez vous inspirer du code de ``pdb`` pour écrire votre propre débogueur." + +#: faq/programming.rst:27 +#, fuzzy +msgid "" +"The IDLE interactive development environment, which is part of the standard " +"Python distribution (normally available as `Tools/scripts/idle3 `_), includes a " +"graphical debugger." +msgstr "" +"L'environnement de développement interactif IDLE, qui est fourni avec la " +"distribution standard de Python (normalement disponible dans ``Tools/scripts/" +"idle``) contient un débogueur graphique." + +#: faq/programming.rst:32 +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 " +"`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 `pywin32 `_ et fait partie de la distribution " +"`ActivePython `_." + +#: faq/programming.rst:39 +#, fuzzy +msgid "" +"`Eric `_ is an IDE built on PyQt and " +"the Scintilla editing component." +msgstr "" +"`Eric `_ est un EDI basé sur PyQt et " +"l'outil d'édition Scintilla." + +#: faq/programming.rst:42 +msgid "" +"`trepan3k `_ is a gdb-like " +"debugger." +msgstr "" +"`trepan3k `_ est un débogueur " +"semblable à GDB." + +#: faq/programming.rst:44 +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:47 +msgid "" +"There are a number of commercial Python IDEs that include graphical " +"debuggers. They include:" +msgstr "" +"Il existe de nombreux EDI Python propriétaires qui embarquent un débogueur " +"graphique, notamment :" + +#: faq/programming.rst:50 +msgid "`Wing IDE `_" +msgstr "`Wing IDE `_ ;" + +#: faq/programming.rst:51 +msgid "`Komodo IDE `_" +msgstr "`Komodo IDE `_ ;" + +#: faq/programming.rst:52 +msgid "`PyCharm `_" +msgstr "`PyCharm `_ ;" + +#: faq/programming.rst:56 +msgid "Are there tools to help find bugs or perform static analysis?" +msgstr "" +"Existe-t-il des outils pour aider à trouver des bogues ou faire de l'analyse " +"statique de code ?" + +#: faq/programming.rst:60 +#, fuzzy +msgid "" +"`Pylint `_ and `Pyflakes " +"`_ do basic checking that will help you " +"catch bugs sooner." +msgstr "" +"`Pylint `_ et `Pyflakes `_ font des vérifications de base et vous aideront à trouver des " +"bogues plus tôt." + +#: faq/programming.rst:64 +msgid "" +"Static type checkers such as `Mypy `_, `Pyre `_, and `Pytype `_ can " +"check type hints in Python source code." +msgstr "" +"Les vérificateurs statiques de typage comme `Mypy `_, " +"`Pyre `_, et `Pytype `_ peuvent vérifier les indications de type dans du code source " +"Python." + +#: faq/programming.rst:73 +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:75 +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 " +"install the Python distribution first. There are a number of tools that " +"determine the set of modules required by a program and bind these modules " +"together with a Python binary to produce a single executable." +msgstr "" +"Pour créer un programme autonome, c'est-à-dire un programme que n'importe " +"qui peut télécharger et exécuter sans avoir à installer une distribution " +"Python au préalable, il n'est pas nécessaire de compiler du code Python en " +"code C. Il existe en effet plusieurs outils qui déterminent les modules " +"requis par un programme et lient ces modules avec un binaire Python pour " +"produire un seul exécutable." + +#: faq/programming.rst:81 +#, 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; 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 " +"l'arborescence des sources de Python. Il convertit le code intermédiaire " +"(*bytecode*) Python en tableaux C ; avec un compilateur C, vous pouvez " +"intégrer tous vos modules dans un nouveau programme, qui est ensuite lié aux " +"modules standards Python." + +#: faq/programming.rst:87 +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 " +"the source directory (for built-in modules). It then turns the bytecode for " +"modules written in Python into C code (array initializers that can be turned " +"into code objects using the marshal module) and creates a custom-made config " +"file that only contains those built-in modules which are actually used in " +"the program. It then compiles the generated C code and links it with the " +"rest of the Python interpreter to form a self-contained binary which acts " +"exactly like your script." +msgstr "" +"Il fonctionne en cherchant de manière récursive les instructions " +"d'importation (sous les deux formes) dans le code source et en recherchant " +"ces modules dans le chemin Python standard ainsi que dans le répertoire " +"source (pour les modules natifs). Il transforme ensuite le code " +"intermédiaire des modules écrits en Python en code C (des tableaux pré-" +"remplis qui peuvent être transformés en objets code à l'aide du module " +"*marshal*) et crée un fichier de configuration personnalisé qui contient " +"uniquement les modules natifs qui sont réellement utilisés dans le " +"programme. Il compile ensuite le code C 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:96 +msgid "" +"The following packages can help with the creation of console and GUI " +"executables:" +msgstr "" +"Voici quelques paquets qui permettent de créer des exécutables en ligne de " +"commande comme graphiques :" + +#: faq/programming.rst:99 +msgid "`Nuitka `_ (Cross-platform)" +msgstr "`Nuitka `_ (multiplateformes) ;" + +#: faq/programming.rst:100 +#, fuzzy +msgid "`PyInstaller `_ (Cross-platform)" +msgstr "`PyInstaller `_ (multiplateformes) ;" + +#: faq/programming.rst:101 +msgid "" +"`PyOxidizer `_ (Cross-platform)" +msgstr "" +"`PyOxidizer `_ (multi-" +"plateforme) ;" + +#: faq/programming.rst:102 +msgid "" +"`cx_Freeze `_ (Cross-platform)" +msgstr "" +"`cx_Freeze `_ (multi-" +"plateforme) ;" + +#: faq/programming.rst:103 +msgid "`py2app `_ (macOS only)" +msgstr "" +"`py2app `_ (uniquement pour " +"macOS) ;" + +#: faq/programming.rst:104 +#, fuzzy +msgid "`py2exe `_ (Windows only)" +msgstr "`py2exe `_ (uniquement pour Windows)." + +#: faq/programming.rst:107 +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:109 +msgid "" +"Yes. The coding style required for standard library modules is documented " +"as :pep:`8`." +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:114 +msgid "Core Language" +msgstr "Fondamentaux" + +#: faq/programming.rst:119 +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:121 +#, fuzzy +msgid "" +"It can be a surprise to get the :exc:`UnboundLocalError` in previously " +"working code when it is modified by adding an assignment statement somewhere " +"in the body of a function." +msgstr "" +"Il est parfois surprenant d'obtenir une UnboundLocalError dans du code " +"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:125 +msgid "This code:" +msgstr "Le code suivant :" + +#: faq/programming.rst:134 +msgid "works, but this code:" +msgstr "fonctionne, mais le suivant :" + +#: faq/programming.rst:141 +#, fuzzy +msgid "results in an :exc:`!UnboundLocalError`:" +msgstr "lève une UnboundLocalError :" + +#: faq/programming.rst:148 +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 " +"variable in the outer scope. Since the last statement in foo assigns a new " +"value to ``x``, the compiler recognizes it as a local variable. " +"Consequently when the earlier ``print(x)`` attempts to print the " +"uninitialized local variable and an error results." +msgstr "" +"Cela est dû au fait que, quand une variable est affectée dans un contexte, " +"cette variable devient locale à ce contexte et remplace toute variable du " +"même nom du contexte appelant. Vu que la dernière instruction dans *foo* " +"affecte une nouvelle valeur à ``x``, le compilateur la traite comme une " +"nouvelle variable. Par conséquent, quand le ``print(x)`` essaye d'afficher " +"la variable non initialisée, une erreur se produit." + +#: faq/programming.rst:155 +msgid "" +"In the example above you can access the outer scope variable by declaring it " +"global:" +msgstr "" +"Dans l'exemple ci-dessus, la variable du contexte appelant reste accessible " +"en la déclarant globale :" + +#: faq/programming.rst:167 +msgid "" +"This explicit declaration is required in order to remind you that (unlike " +"the superficially analogous situation with class and instance variables) you " +"are actually modifying the value of the variable in the outer scope:" +msgstr "" +"Cette déclaration explicite est obligatoire pour se rappeler que " +"(contrairement au cas à peu près similaire avec des variables de classe et " +"d'instance), c'est la valeur de la variable du contexte appelant qui est " +"modifiée :" + +#: faq/programming.rst:174 +msgid "" +"You can do a similar thing in a nested scope using the :keyword:`nonlocal` " +"keyword:" +msgstr "" +"Une alternative dans un contexte imbriqué consiste à utiliser le mot-clé :" +"keyword:`nonlocal` :" + +#: faq/programming.rst:192 +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:194 +msgid "" +"In Python, variables that are only referenced inside a function are " +"implicitly global. If a variable is assigned a value anywhere within the " +"function's body, it's assumed to be a local unless explicitly declared as " +"global." +msgstr "" +"En Python, si une variable n'est pas modifiée dans une fonction mais " +"seulement lue, elle est implicitement considérée comme globale. Si une " +"valeur lui est affectée, elle est considérée locale (sauf si elle est " +"explicitement déclarée globale)." + +#: faq/programming.rst:198 +msgid "" +"Though a bit surprising at first, a moment's consideration explains this. " +"On one hand, requiring :keyword:`global` for assigned variables provides a " +"bar against unintended side-effects. On the other hand, if ``global`` was " +"required for all global references, you'd be using ``global`` all the time. " +"You'd have to declare as global every reference to a built-in function or to " +"a component of an imported module. This clutter would defeat the usefulness " +"of the ``global`` declaration for identifying side-effects." +msgstr "" +"Bien que surprenant au premier abord, ce choix s'explique facilement. D'une " +"part, exiger :keyword:`global` pour des variables affectées est une " +"protection contre des effets de bord inattendus. D'autre part, si ``global`` " +"était obligatoire pour toutes les références à des objets globaux, il " +"faudrait mettre ``global`` partout, car il faudrait dans ce cas déclarer " +"globale chaque référence à une fonction native ou à un composant d'un module " +"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:208 +msgid "" +"Why do lambdas defined in a loop with different values all return the same " +"result?" +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:210 +msgid "" +"Assume you use a for loop to define a few different lambdas (or even plain " +"functions), e.g.::" +msgstr "" +"Supposons que l'on utilise une boucle itérative pour définir des expressions " +"lambda (voire des fonctions) différentes, par exemple ::" + +#: faq/programming.rst:217 +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``, " +"``1``, ``4``, ``9``, and ``16``. However, when you actually try you will " +"see that they all return ``16``::" +msgstr "" +"Le code précédent crée une liste de 5 expressions lambda qui calculent " +"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:227 +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 " +"it is defined. At the end of the loop, the value of ``x`` is ``4``, so all " +"the functions now return ``4**2``, i.e. ``16``. You can also verify this by " +"changing the value of ``x`` and see how the results of the lambdas change::" +msgstr "" +"Ceci s'explique par le fait que ``x`` n'est pas une variable locale aux " +"expressions, mais est définie dans le contexte appelant. Elle est lue à " +"l'appel de l'expression lambda – et non au moment où cette expression est " +"définie. À la fin de la boucle, ``x`` vaut ``4``, donc toutes les fonctions " +"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:237 +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``::" +msgstr "" +"Pour éviter ce phénomène, les valeurs doivent être stockées dans des " +"variables locales aux expressions lambda pour que celles-ci ne se basent " +"plus sur la variable globale ``x`` ::" + +#: faq/programming.rst:244 +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 " +"that point in the loop. This means that the value of ``n`` will be ``0`` in " +"the first lambda, ``1`` in the second, ``2`` in the third, and so on. " +"Therefore each lambda will now return the correct result::" +msgstr "" +"Dans ce code, ``n=x`` crée une nouvelle variable ``n``, locale à " +"l'expression. Cette variable est évaluée quand l'expression est définie donc " +"``n`` a la même valeur que ``x`` à ce moment. La valeur de ``n`` est donc " +"``0`` dans la première lambda, ``1`` dans la deuxième, ``2`` dans la " +"troisième et ainsi de suite. Chaque expression lambda renvoie donc le " +"résultat correct ::" + +#: faq/programming.rst:255 +msgid "" +"Note that this behaviour is not peculiar to lambdas, but applies to regular " +"functions too." +msgstr "" +"Ce comportement n'est pas propre aux expressions lambda, mais s'applique " +"aussi aux fonctions normales." + +#: faq/programming.rst:260 +msgid "How do I share global variables across modules?" +msgstr "Comment partager des variables globales entre modules ?" + +#: faq/programming.rst:262 +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 " +"import the config module in all modules of your application; the module then " +"becomes available as a global name. Because there is only one instance of " +"each module, any changes made to the module object get reflected " +"everywhere. For example:" +msgstr "" +"La manière standard de partager des informations entre modules d'un même " +"programme est de créer un module spécial (souvent appelé *config* ou *cfg*) " +"et de l'importer dans tous les modules de l'application ; le module devient " +"accessible depuis l'espace de nommage global. Vu qu'il n'y a qu'une instance " +"de chaque module, tout changement dans l'instance est propagé partout. Par " +"exemple :" + +#: faq/programming.rst:268 +msgid "config.py::" +msgstr "*config.py* ::" + +#: faq/programming.rst:272 +msgid "mod.py::" +msgstr "*mod.py* ::" + +#: faq/programming.rst:277 +msgid "main.py::" +msgstr "*main.py* ::" + +#: faq/programming.rst:283 +#, fuzzy +msgid "" +"Note that using a module is also the basis for implementing the singleton " +"design pattern, for the same reason." +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:288 +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:290 +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 " +"undefined names." +msgstr "" +"De manière générale, il ne faut pas faire ``from modulename import *``. Ceci " +"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:294 +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 " +"is in scope. Using one import per line makes it easy to add and delete " +"module imports, but using multiple imports per line uses less screen space." +msgstr "" +"Les modules doivent être importés au début d'un fichier. Ceci permet " +"d'afficher clairement de quels modules le code à besoin et évite de se " +"demander si le module est dans le contexte. Faire un seul ``import`` par " +"ligne 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:299 +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:301 +#, fuzzy +msgid "" +"standard library modules -- e.g. :mod:`sys`, :mod:`os`, :mod:`argparse`, :" +"mod:`re`" +msgstr "" +"les modules de la bibliothèque standard — p. ex. ``sys``, ``os``, " +"``getopt``, ``re``" + +#: faq/programming.rst:302 +#, fuzzy +msgid "" +"third-party library modules (anything installed in Python's site-packages " +"directory) -- e.g. :mod:`!dateutil`, :mod:`!requests`, :mod:`!PIL.Image`" +msgstr "" +"les modules externes (tout ce qui est installé dans le dossier *site-" +"packages* de Python) — p. ex. *mx.DateTime, ZODB, PIL.Image*, etc." + +#: faq/programming.rst:304 +#, fuzzy +msgid "locally developed modules" +msgstr "les modules développés en local" + +#: faq/programming.rst:306 +msgid "" +"It is sometimes necessary to move imports to a function or class to avoid " +"problems with circular imports. Gordon McMillan says:" +msgstr "" +"Il est parfois nécessaire de déplacer des importations dans une fonction ou " +"une classe pour éviter les problèmes d'importations circulaires. Comme le " +"souligne Gordon McMillan :" + +#: faq/programming.rst:309 +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 " +"the first (\"from module import name\") and the import is at the top level. " +"That's because names in the 1st are not yet available, because the first " +"module is busy importing the 2nd." +msgstr "" +"Il n'y a aucun souci à faire des importations circulaires tant que les deux " +"modules utilisent la forme ``import ``. Ça ne pose problème que si " +"le second module cherche à récupérer un nom du premier module (*\"from " +"module import name\"*) et que l'importation est dans l'espace de nommage du " +"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:315 +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 " +"called, the first module will have finished initializing, and the second " +"module can do its import." +msgstr "" +"Dans ce cas, si le second module n'est utilisé que dans une fonction, " +"l'importation peut facilement être déplacée dans cette fonction. Au moment " +"où l'importation sera appelée, le premier module aura fini de s'initialiser " +"et le second pourra faire son importation." + +#: faq/programming.rst:320 +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 " +"possible to import all of the modules at the top of the file. In this case, " +"importing the correct modules in the corresponding platform-specific code is " +"a good option." +msgstr "" +"Il peut parfois être nécessaire de déplacer des importations de modules hors " +"de l'espace de plus haut niveau du code si certains de ces modules dépendent " +"de la machine utilisée. Dans ce cas de figure, il est parfois impossible " +"d'importer tous les modules au début du fichier. Dans ce cas, il est " +"recommandé d'importer les modules adéquats dans le code spécifique à la " +"machine." + +#: faq/programming.rst:325 +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 " +"are trying to reduce the initialization time of a module. This technique is " +"especially helpful if many of the imports are unnecessary depending on how " +"the program executes. You may also want to move imports into a function if " +"the modules are only ever used in that function. Note that loading a module " +"the first time may be expensive because of the one time initialization of " +"the module, but loading a module multiple times is virtually free, costing " +"only a couple of dictionary lookups. Even if the module name has gone out " +"of scope, the module is probably available in :data:`sys.modules`." +msgstr "" +"Les importations ne devraient être déplacées dans un espace de nommage " +"local, comme dans la définition d'une fonction, que si cela est nécessaire " +"pour résoudre un problème comme éviter des dépendances circulaires ou " +"réduire le temps d'initialisation d'un module. Cette technique est " +"particulièrement utile si la majorité des importations est superflue selon " +"le flux d'exécution du programme. Il est également pertinent de déplacer des " +"importations dans une fonction si le module n'est utilisé qu'au sein de " +"cette fonction. Le premier chargement d'un module peut être coûteux à cause " +"du coût fixe d'initialisation d'un module, mais charger un module plusieurs " +"fois est quasiment gratuit, cela ne coûte que quelques indirections dans un " +"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:338 +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:340 +msgid "" +"This type of bug commonly bites neophyte programmers. Consider this " +"function::" +msgstr "" +"C'est un problème que rencontrent souvent les programmeurs débutants. " +"Examinons la fonction suivante ::" + +#: faq/programming.rst:347 +msgid "" +"The first time you call this function, ``mydict`` contains a single item. " +"The second time, ``mydict`` contains two items because when ``foo()`` begins " +"executing, ``mydict`` starts out with an item already in it." +msgstr "" +"Au premier appel de cette fonction, ``mydict`` ne contient qu'un seul " +"é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:351 +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, " +"when the function is defined. If that object is changed, like the " +"dictionary in this example, subsequent calls to the function will refer to " +"this changed object." +msgstr "" +"On est souvent amené à croire qu'un appel de fonction créé des nouveaux " +"objets pour les valeurs par défaut. Ce n'est pas le cas. Les valeurs par " +"défaut ne sont créées qu'une et une seule fois, au moment où la fonction est " +"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:356 +msgid "" +"By definition, immutable objects such as numbers, strings, tuples, and " +"``None``, are safe from change. Changes to mutable objects such as " +"dictionaries, lists, and class instances can lead to confusion." +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 modifiables comme les dictionnaires, les listes et les " +"instances de classe peuvent porter à confusion." + +#: faq/programming.rst:360 +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 " +"inside the function, check if the parameter is ``None`` and create a new " +"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 " +"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:368 +msgid "but::" +msgstr "mais plutôt ::" + +#: faq/programming.rst:374 +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 " +"value of each call to the function, and return the cached value if the same " +"value is requested again. This is called \"memoizing\", and can be " +"implemented like this::" +msgstr "" +"Cette fonctionnalité a une utilité. Il est courant de mettre en cache les " +"paramètres et la valeur de retour de chacun des appels d'une fonction " +"coûteuse à exécuter, et de renvoyer la valeur stockée en cache si le même " +"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:389 +msgid "" +"You could use a global variable containing a dictionary instead of the " +"default value; it's a matter of taste." +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:394 +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:396 +msgid "" +"Collect the arguments using the ``*`` and ``**`` specifiers in the " +"function's parameter list; this gives you the positional arguments as a " +"tuple and the keyword arguments as a dictionary. You can then pass these " +"arguments when calling another function by using ``*`` and ``**``::" +msgstr "" +"Il faut récupérer les arguments en utilisant les sélecteurs ``*`` et ``**`` " +"dans la liste des paramètres de la fonction ; ceci donne les arguments " +"positionnels sous la forme d'un *n*-uplet et les arguments nommés sous forme " +"de dictionnaire. Ces arguments peuvent être passés à une autre fonction en " +"utilisant ``*`` et ``**`` ::" + +#: faq/programming.rst:415 +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:417 +#, fuzzy +msgid "" +":term:`Parameters ` are defined by the names that appear in a " +"function definition, whereas :term:`arguments ` are the values " +"actually passed to a function when calling it. Parameters define what :term:" +"`kind of arguments ` a function can accept. For example, given " +"the function definition::" +msgstr "" +"Les :term:`paramètres ` sont les noms qui apparaissent dans une " +"définition de fonction, alors que les :term:`arguments ` sont les " +"valeurs qui sont réellement passées à une fonction lors de l'appel de celle-" +"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:426 +msgid "" +"*foo*, *bar* and *kwargs* are parameters of ``func``. However, when calling " +"``func``, for example::" +msgstr "" +"*foo*, *bar* et *kwargs* sont des paramètres de ``func``. Mais à l'appel de " +"``func`` avec, par exemple ::" + +#: faq/programming.rst:431 +msgid "the values ``42``, ``314``, and ``somevar`` are arguments." +msgstr "les valeurs ``42``, ``314``, et ``somevar`` sont des arguments." + +#: faq/programming.rst:435 +msgid "Why did changing list 'y' also change list 'x'?" +msgstr "Pourquoi modifier la liste 'y' modifie aussi la liste 'x' ?" + +#: faq/programming.rst:437 +msgid "If you wrote code like::" +msgstr "Si vous avez écrit du code comme ::" + +#: faq/programming.rst:447 +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:449 +msgid "There are two factors that produce this result:" +msgstr "Il y a deux raisons qui conduisent à ce comportement :" + +#: faq/programming.rst:451 +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 " +"the same object ``x`` refers to. This means that there is only one object " +"(the list), and both ``x`` and ``y`` refer to it." +msgstr "" +"Les variables ne sont que des noms qui font référence à des objets. La ligne " +"``y = x`` ne crée pas une copie de la liste — elle crée une nouvelle " +"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:455 +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:457 +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 " +"same object, using either name accesses the modified value ``[10]``." +msgstr "" +"Après l'appel de :meth:`~list.append`, le contenu de l'objet muable est " +"passé de ``[]`` à ``[10]``. Vu que les deux variables font référence au même " +"objet, il est possible d'accéder à la valeur modifiée ``[10]`` avec chacun " +"des noms." + +#: faq/programming.rst:461 +msgid "If we instead assign an immutable object to ``x``::" +msgstr "Si au contraire, on affecte un objet immuable à ``x`` ::" + +#: faq/programming.rst:471 +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 " +"not mutating the int ``5`` by incrementing its value; instead, we are " +"creating a new object (the int ``6``) and assigning it to ``x`` (that is, " +"changing which object ``x`` refers to). After this assignment we have two " +"objects (the ints ``6`` and ``5``) and two variables that refer to them " +"(``x`` now refers to ``6`` but ``y`` still refers to ``5``)." +msgstr "" +"on observe que ``x`` et ``y`` ne sont ici plus égales. Les entiers sont des " +"immuables (:term:`immutable`), et ``x = x + 1`` ne change pas l'entier ``5`` " +"en incrémentant sa valeur. Au contraire, un nouvel objet est créé (l'entier " +"``6``) et affecté à ``x`` (c'est-à-dire qu'on change l'objet auquel fait " +"référence ``x``). Après cette affectation on a deux objets (les entiers " +"``6`` et ``5``) et deux variables qui font référence à ces deux objets " +"(``x`` fait désormais référence à ``6`` mais ``y`` fait toujours référence à " +"``5``)." + +#: faq/programming.rst:479 +#, fuzzy +msgid "" +"Some operations (for example ``y.append(10)`` and ``y.sort()``) mutate the " +"object, whereas superficially similar operations (for example ``y = y + " +"[10]`` and :func:`sorted(y) `) create a new object. In general in " +"Python (and in all cases in the standard library) a method that mutates an " +"object will return ``None`` to help avoid getting the two types of " +"operations confused. So if you mistakenly write ``y.sort()`` thinking it " +"will give you a sorted copy of ``y``, you'll instead end up with ``None``, " +"which will likely cause your program to generate an easily diagnosed error." +msgstr "" +"Certaines opérations (par exemple, ``y.append(10)`` et ``y.sort()``) " +"modifient l'objet, alors que des opérations identiques en apparence (par " +"exemple ``y = y + [10]`` et ``sorted(y)``) créent un nouvel objet. En " +"général, en Python, une méthode qui modifie un objet renvoie ``None`` (c'est " +"même systématique dans la bibliothèque standard) pour éviter la confusion " +"entre les deux opérations. Donc écrire par erreur ``y.sort()`` en pensant " +"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:488 +msgid "" +"However, there is one class of operations where the same operation sometimes " +"has different behaviors with different types: the augmented assignment " +"operators. For example, ``+=`` mutates lists but not tuples or ints " +"(``a_list += [1, 2, 3]`` is equivalent to ``a_list.extend([1, 2, 3])`` and " +"mutates ``a_list``, whereas ``some_tuple += (1, 2, 3)`` and ``some_int += " +"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)." + +#: faq/programming.rst:495 +msgid "In other words:" +msgstr "En d'autres termes :" + +#: faq/programming.rst:497 +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 " +"variables that refer to it will see the change." +msgstr "" +"Il est possible d'appliquer des opérations qui modifient un objet muable (:" +"class:`list`, :class:`dict`, :class:`set`, etc.) et toutes les variables qui " +"y font référence verront le changement." + +#: faq/programming.rst:500 +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, " +"but operations that transform that value into a new value always return a " +"new object." +msgstr "" +"Toutes les variables qui font référence à un objet immuable (:class:`str`, :" +"class:`int`, :class:`tuple`, etc.) renvoient la même valeur, mais les " +"opérations qui transforment cette valeur en une nouvelle valeur renvoient " +"toujours un nouvel objet." + +#: faq/programming.rst:505 +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`." +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:510 +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:512 +msgid "" +"Remember that arguments are passed by assignment in Python. Since " +"assignment just creates references to objects, there's no alias between an " +"argument name in the caller and callee, and so no call-by-reference per se. " +"You can achieve the desired effect in a number of ways." +msgstr "" +"En Python, les arguments sont passés comme des affectations de variables. Vu " +"qu'une affectation crée des références à des objets, il n'y a pas de lien " +"entre un argument dans l'appel de la fonction et sa définition, et donc pas " +"de passage par référence en soi. Il y a cependant plusieurs façons d'en " +"émuler un." + +#: faq/programming.rst:517 +msgid "By returning a tuple of the results::" +msgstr "En renvoyant un *n*-uplet de résultats ::" + +#: faq/programming.rst:528 +msgid "This is almost always the clearest solution." +msgstr "C'est presque toujours la meilleure solution." + +#: faq/programming.rst:530 +msgid "" +"By using global variables. This isn't thread-safe, and is not recommended." +msgstr "" +"En utilisant des variables globales. Cette approche ne fonctionne pas dans " +"des contextes à plusieurs fils d'exécution (elle n'est pas *thread-safe*), " +"et n'est donc pas recommandée." + +#: faq/programming.rst:532 +msgid "By passing a mutable (changeable in-place) object::" +msgstr "En passant un objet muable (modifiable sur place) ::" + +#: faq/programming.rst:543 +msgid "By passing in a dictionary that gets mutated::" +msgstr "En passant un dictionnaire, qui sera modifié ::" + +#: faq/programming.rst:554 +msgid "Or bundle up values in a class instance::" +msgstr "Ou regrouper les valeurs dans une instance de classe ::" + +#: faq/programming.rst:571 +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:573 +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:577 +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:579 +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 " +"returns a function ``f(x)`` that computes the value ``a*x+b``. Using nested " +"scopes::" +msgstr "" +"Deux possibilités : on peut utiliser des portées imbriquées ou bien des " +"objets appelables. Par exemple, supposons que l'on souhaite définir " +"``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:588 +msgid "Or using a callable object::" +msgstr "Ou en utilisant un objet appelable ::" + +#: faq/programming.rst:598 +msgid "In both cases, ::" +msgstr "Dans les deux cas ::" + +#: faq/programming.rst:602 +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:604 +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 " +"callables can share their signature via inheritance::" +msgstr "" +"L'approche par objet appelable a le désavantage d'être légèrement plus lente " +"et de produire un code légèrement plus long. Cependant, il faut noter qu'une " +"collection d'objet appelables peuvent partager leurs signatures par " +"héritage ::" + +#: faq/programming.rst:613 +msgid "Object can encapsulate state for several methods::" +msgstr "Les objets peuvent encapsuler un état pour plusieurs méthodes ::" + +#: faq/programming.rst:631 +msgid "" +"Here ``inc()``, ``dec()`` and ``reset()`` act like functions which share the " +"same counting variable." +msgstr "" +"Ici ``inc()``, ``dec()`` et ``reset()`` agissent comme des fonctions " +"partageant une même variable compteur." + +#: faq/programming.rst:636 +msgid "How do I copy an object in Python?" +msgstr "Comment copier un objet en Python ?" + +#: faq/programming.rst:638 +msgid "" +"In general, try :func:`copy.copy` or :func:`copy.deepcopy` for the general " +"case. Not all objects can be copied, but most can." +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:641 +msgid "" +"Some objects can be copied more easily. Dictionaries have a :meth:`~dict." +"copy` method::" +msgstr "" +"Certains objets peuvent être copiés plus facilement que d'autres. Les " +"dictionnaires ont une méthode :meth:`~dict.copy` ::" + +#: faq/programming.rst:646 +msgid "Sequences can be copied by slicing::" +msgstr "Les séquences peuvent être copiées via la syntaxe des tranches ::" + +#: faq/programming.rst:652 +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:654 +#, fuzzy +msgid "" +"For an instance ``x`` of a user-defined class, :func:`dir(x) ` returns " +"an alphabetized list of the names containing the instance attributes and " +"methods and attributes defined by its class." +msgstr "" +"Pour une instance x d'une classe définie par un utilisateur, ``dir(x)`` " +"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:660 +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:662 +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 " +"``def`` and ``class`` statements, but in that case the value is a callable. " +"Consider the following code::" +msgstr "" +"C'est impossible en général, parce qu'un objet n'a pas de nom à proprement " +"parler. Schématiquement, l'affectation fait correspondre un nom à une " +"valeur ; c'est vrai aussi pour les instructions ``def`` et ``class``, à la " +"différence près que, dans ce cas, la valeur est un appelable. Par exemple, " +"dans le code suivant ::" + +#: faq/programming.rst:678 +#, fuzzy +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 " +"instance of class ``A``. However, it is impossible to say whether the " +"instance's name is ``a`` or ``b``, since both names are bound to the same " +"value." +msgstr "" +"Affirmer que la classe a un nom est discutable. Bien qu'elle soit liée à " +"deux noms, et qu'elle soit appelée via le nom B, l'instance créée déclare " +"tout de même être une instance de la classe A. De même, il est impossible de " +"dire si le nom de l'instance est a ou b, les deux noms étant attachés à la " +"même valeur." + +#: faq/programming.rst:683 +msgid "" +"Generally speaking it should not be necessary for your code to \"know the " +"names\" of particular values. Unless you are deliberately writing " +"introspective programs, this is usually an indication that a change of " +"approach might be beneficial." +msgstr "" +"De façon générale, une application ne devrait pas avoir besoin de " +"« connaître le nom » d'une valeur particulière. À moins d'être délibérément " +"en train d'écrire un programme introspectif, c'est souvent l'indication " +"qu'un changement d'approche serait bénéfique." + +#: faq/programming.rst:688 +msgid "" +"In comp.lang.python, Fredrik Lundh once gave an excellent analogy in answer " +"to this question:" +msgstr "" +"Sur *comp.lang.python*, Fredrik Lundh a donné un jour une excellente " +"analogie pour répondre à cette question :" + +#: faq/programming.rst:691 +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 -- " +"so the only way to find out what it's called is to ask all your neighbours " +"(namespaces) if it's their cat (object)..." +msgstr "" +"C'est pareil que trouver le nom du chat qui traîne devant votre porte : le " +"chat (objet) ne peut pas vous dire lui-même son nom, et il s'en moque un peu " +"­– 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:696 +msgid "" +"....and don't be surprised if you'll find that it's known by many names, or " +"no name at all!" +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:701 +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:703 +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:708 +msgid "" +"Since the comma is not an operator, but a separator between expressions the " +"above is evaluated as if you had entered::" +msgstr "" +"Comme la virgule n'est pas un opérateur, mais un séparateur entre deux " +"expressions, l'expression ci-dessus est évaluée de la même façon que si vous " +"aviez écrit ::" + +#: faq/programming.rst:713 +msgid "not::" +msgstr "et non ::" + +#: faq/programming.rst:717 +msgid "" +"The same is true of the various assignment operators (``=``, ``+=`` etc). " +"They are not truly operators but syntactic delimiters in assignment " +"statements." +msgstr "" +"Ceci est vrai pour tous les opérateurs d'affectation (``=``, ``+=`` etc). Ce " +"ne sont pas vraiment des opérateurs mais plutôt des délimiteurs syntaxiques " +"dans les instructions d'affectation." + +#: faq/programming.rst:722 +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:724 +msgid "Yes, there is. The syntax is as follows::" +msgstr "Oui. Sa syntaxe est la suivante ::" + +#: faq/programming.rst:731 +msgid "" +"Before this syntax was introduced in Python 2.5, a common idiom was to use " +"logical operators::" +msgstr "" +"Avant l'introduction de cette syntaxe dans Python 2.5, il était courant " +"d'utiliser les opérateurs de logique ::" + +#: faq/programming.rst:736 +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 ``... " +"if ... else ...`` form." +msgstr "" +"Cet idiome est dangereux, car il donne un résultat erroné quand *on_true* a " +"la valeur booléenne fausse. Il faut donc toujours utiliser la forme ``... " +"if ... else ...``." + +#: faq/programming.rst:742 +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:744 +#, fuzzy +msgid "" +"Yes. Usually this is done by nesting :keyword:`lambda` within :keyword:`!" +"lambda`. See the following three examples, slightly adapted from Ulf " +"Bartelt::" +msgstr "" +"Oui. C'est souvent le cas en imbriquant des :keyword:`lambda` dans des :" +"keyword:`!lambda`. Par exemple les trois morceaux de code suivants, créés " +"par Ulf Bartelt ::" + +#: faq/programming.rst:771 +msgid "Don't try this at home, kids!" +msgstr "Les enfants, ne faites pas ça chez vous !" + +#: faq/programming.rst:777 +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:779 +#, fuzzy +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 " +"an externally usable name. Upon calling a function that accepts positional-" +"only parameters, arguments are mapped to parameters based solely on their " +"position. For example, :func:`divmod` is a function that accepts positional-" +"only parameters. Its documentation looks like this::" +msgstr "" +"Une barre oblique dans la liste des arguments d'une fonction indique que les " +"paramètres la précédant sont uniquement positionnels. Les paramètres " +"uniquement positionnels ne peuvent pas être référencés par leur nom depuis " +"l'extérieur. Lors de l'appel d'une fonction qui accepte des paramètres " +"uniquement positionnels, les arguments sont affectés aux paramètres en " +"fonction de leur position. Par exemple, la fonction :func:`divmod` n'accepte " +"que des paramètres uniquement positionnels. Sa documentation est la " +"suivante ::" + +#: faq/programming.rst:792 +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 " +"lead to an error::" +msgstr "" +"La barre oblique à la fin de la liste des paramètres signifie que les trois " +"paramètres sont uniquement positionnels. Et donc, appeler :func:`divmod` " +"avec des arguments nommés provoque une erreur ::" + +#: faq/programming.rst:803 +msgid "Numbers and strings" +msgstr "Nombres et chaînes de caractères" + +#: faq/programming.rst:806 +msgid "How do I specify hexadecimal and octal integers?" +msgstr "Comment écrire des entiers hexadécimaux ou octaux ?" + +#: faq/programming.rst:808 +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 " +"octal value \"10\" (8 in decimal), type::" +msgstr "" +"Pour écrire un entier octal, faites précéder la valeur octale par un zéro, " +"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:816 +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 " +"specified in lower or uppercase. For example, in the Python interpreter::" +msgstr "" +"L'hexadécimal est tout aussi simple, faites précéder le nombre hexadécimal " +"par un zéro, puis un \"x\" majuscule ou minuscule. Les nombres hexadécimaux " +"peuvent être écrits en majuscules ou en minuscules. Par exemple, dans " +"l'interpréteur Python ::" + +#: faq/programming.rst:829 +msgid "Why does -22 // 10 return -3?" +msgstr "Pourquoi ``-22 // 10`` donne-t-il ``-3`` ?" + +#: faq/programming.rst:831 +msgid "" +"It's primarily driven by the desire that ``i % j`` have the same sign as " +"``j``. If you want that, and also want::" +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:836 +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 " +"``i % j`` have the same sign as ``i``." +msgstr "" +"alors la division entière doit renvoyer l'entier inférieur. Le C impose " +"é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:840 +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 " +"useful for ``i % j`` to be ``>= 0``. If the clock says 10 now, what did it " +"say 200 hours ago? ``-190 % 12 == 2`` is useful; ``-190 % 12 == -10`` is a " +"bug waiting to bite." +msgstr "" +"Il y a peu de cas d'utilisation réels pour ``i % j`` quand ``j`` est " +"négatif. Quand ``j`` est positif, il y en a beaucoup, et dans pratiquement " +"tous, il est plus utile que ``i % j`` soit ``>=0``. Si l'horloge affiche " +"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:848 +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:850 +#, fuzzy +msgid "" +"Trying to lookup an ``int`` literal attribute in the normal manner gives a :" +"exc:`SyntaxError` because the period is seen as a decimal point::" +msgstr "" +"Essayer d'utiliser l'opérateur d'accès à un attribut sur un entier littéral " +"conduit à une erreur de syntaxe car le point est compris comme un séparateur " +"décimal en notation anglo-saxonne :" + +#: faq/programming.rst:859 +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:869 +msgid "How do I convert a string to a number?" +msgstr "Comment convertir une chaîne de caractères en nombre ?" + +#: faq/programming.rst:871 +msgid "" +"For integers, use the built-in :func:`int` type constructor, e.g. " +"``int('144') == 144``. Similarly, :func:`float` converts to floating-point, " +"e.g. ``float('144') == 144.0``." +msgstr "" +"Pour les entiers, utilisez le constructeur natif de :func:`int`, par exemple " +"``int('144') == 144``. De façon similaire, :func:`float` donne la valeur " +"flottante, par exemple ``float('144') == 144.0``." + +#: faq/programming.rst:875 +msgid "" +"By default, these interpret the number as decimal, so that ``int('0144') == " +"144`` holds true, and ``int('0x144')`` raises :exc:`ValueError`. " +"``int(string, base)`` takes the base to convert from as a second optional " +"argument, so ``int( '0x144', 16) == 324``. If the base is specified as 0, " +"the number is interpreted using Python's rules: a leading '0o' indicates " +"octal, and '0x' indicates a hex number." +msgstr "" +"Par défaut, ces fonctions interprètent les nombres comme des décimaux, de " +"telle façon que ``int('0144') == 144`` et ``int('0x144')`` lève une :exc:" +"`ValueError`. Le second argument (optionnel) de ``int(string, base)`` est la " +"base dans laquelle convertir, donc ``int('0x144', 16) == 324``. Si la base " +"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:882 +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 " +"presents a security risk: someone could pass you a Python expression that " +"might have unwanted side effects. For example, someone could pass " +"``__import__('os').system(\"rm -rf $HOME\")`` which would erase your home " +"directory." +msgstr "" +"N'utilisez pas la fonction native :func:`eval` pour convertir des chaînes de " +"caractères en nombres. :func:`eval` est beaucoup plus lente et pose des " +"problèmes de sécurité : quelqu'un pourrait vous envoyer une expression " +"Python pouvant avoir des effets de bord indésirables. Par exemple, quelqu'un " +"pourrait passer ``__import__('os').system(\"rm -rf $HOME\")`` ce qui " +"effacerait votre répertoire personnel." + +#: faq/programming.rst:889 +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 " +"does not allow leading '0' in a decimal number (except '0')." +msgstr "" +":func:`eval` a aussi pour effet d'interpréter les nombres comme des " +"expressions Python. Ainsi ``eval('09')`` produit une erreur de syntaxe, " +"parce que Python ne permet pas les '0' en tête d'un nombre décimal (à " +"l'exception du nombre '0')." + +#: faq/programming.rst:895 +msgid "How do I convert a number to a string?" +msgstr "Comment convertir un nombre en chaîne de caractères ?" + +#: faq/programming.rst:897 +#, fuzzy +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, use the built-in functions :func:`hex` or :func:`oct`. For " +"fancy formatting, see the :ref:`f-strings` and :ref:`formatstrings` " +"sections, e.g. ``\"{:04d}\".format(144)`` yields ``'0144'`` and ``\"{:.3f}\"." +"format(1.0/3.0)`` yields ``'0.333'``." +msgstr "" +"Pour transformer, par exemple, le nombre 144 en la chaîne de caractères " +"'144', il faut utiliser la fonction native :func:`str`. Pour obtenir la " +"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`, par exemple ``\"{:04d}\".format(144)`` produit ``'0144'`` " +"et ``\"{:.3f}\".format(1.0/3.0)`` produit ``'0.333'``." + +#: faq/programming.rst:906 +msgid "How do I modify a string in place?" +msgstr "Comment modifier une chaîne de caractères « sur place » ?" + +#: faq/programming.rst:908 +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 " +"from. However, if you need an object with the ability to modify in-place " +"unicode data, try using an :class:`io.StringIO` object or the :mod:`array` " +"module::" +msgstr "" +"C'est impossible car les chaînes de caractères sont immuables. Dans la " +"plupart des cas, il faut tout simplement construire une nouvelle chaîne à " +"partir des morceaux de l'ancienne. Si toutefois vous avez besoin d'un objet " +"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:938 +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:940 +msgid "There are various techniques." +msgstr "Il y a plusieurs façons de faire." + +#: faq/programming.rst:942 +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 " +"names of the functions. This is also the primary technique used to emulate " +"a case construct::" +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\" ::" + +#: faq/programming.rst:957 +msgid "Use the built-in function :func:`getattr`::" +msgstr "Utiliser la fonction :func:`getattr` ::" + +#: faq/programming.rst:962 +msgid "" +"Note that :func:`getattr` works on any object, including classes, class " +"instances, modules, and so on." +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:965 +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:978 +msgid "Use :func:`locals` to resolve the function name::" +msgstr "Utilisez :func:`locals` pour résoudre le nom de la fonction ::" + +#: faq/programming.rst:990 +msgid "" +"Is there an equivalent to Perl's chomp() for removing trailing newlines from " +"strings?" +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:992 +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 " +"whitespace. If the string ``S`` represents more than one line, with several " +"empty lines at the end, the line terminators for all the blank lines will be " +"removed::" +msgstr "" +"Vous pouvez utiliser ``S.rstrip(\"\\r\\n\")`` pour retirer toutes les " +"occurrences de tout marqueur de fin de ligne à la fin d'une chaîne de " +"caractère ``S``, sans en enlever aucune espace. Si la chaîne ``S`` " +"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:1004 +msgid "" +"Since this is typically only desired when reading text one line at a time, " +"using ``S.rstrip()`` this way works well." +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:1009 +msgid "Is there a scanf() or sscanf() equivalent?" +msgstr "Existe-t-il un équivalent à ``scanf()`` ou ``sscanf()`` ?" + +#: faq/programming.rst:1011 +msgid "Not as such." +msgstr "Pas exactement." + +#: faq/programming.rst:1013 +#, fuzzy +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 " +"string objects and then convert decimal strings to numeric values using :" +"func:`int` or :func:`float`. :meth:`!split()` supports an optional \"sep\" " +"parameter which is useful if the line uses something other than whitespace " +"as a separator." +msgstr "" +"Pour une simple analyse de chaîne, l'approche la plus simple est " +"généralement de découper la ligne en mots délimités par des espaces, en " +"utilisant la méthode :meth:`~str.split` des objets chaîne de caractères, et " +"ensuite de convertir les chaînes de décimaux en valeurs numériques en " +"utilisant la fonction :func:`int` ou :func:`float`. ``split()`` possède un " +"paramètre optionnel \"sep\" qui est utile si la ligne utilise autre chose " +"que des espaces comme séparateurs." + +#: faq/programming.rst:1019 +#, fuzzy +msgid "" +"For more complicated input parsing, regular expressions are more powerful " +"than C's ``sscanf`` and better suited for the task." +msgstr "" +"Pour des analyses plus compliquées, les expressions rationnelles sont plus " +"puissantes que la fonction :c:func:`sscanf` de C et mieux adaptées à la " +"tâche." + +#: faq/programming.rst:1024 +msgid "What does 'UnicodeDecodeError' or 'UnicodeEncodeError' error mean?" +msgstr "" +"Que signifient les erreurs ``UnicodeDecodeError`` ou ``UnicodeEncodeError`` ?" + +#: faq/programming.rst:1026 +msgid "See the :ref:`unicode-howto`." +msgstr "Voir :ref:`unicode-howto`." + +#: faq/programming.rst:1032 +msgid "Can I end a raw string with an odd number of backslashes?" +msgstr "" + +#: faq/programming.rst:1034 +msgid "" +"A raw string ending with an odd number of backslashes will escape the " +"string's quote::" +msgstr "" + +#: faq/programming.rst:1042 +msgid "" +"There are several workarounds for this. One is to use regular strings and " +"double the backslashes::" +msgstr "" + +#: faq/programming.rst:1048 +msgid "" +"Another is to concatenate a regular string containing an escaped backslash " +"to the raw string::" +msgstr "" + +#: faq/programming.rst:1054 +msgid "" +"It is also possible to use :func:`os.path.join` to append a backslash on " +"Windows::" +msgstr "" + +#: faq/programming.rst:1059 +msgid "" +"Note that while a backslash will \"escape\" a quote for the purposes of " +"determining where the raw string ends, no escaping occurs when interpreting " +"the value of the raw string. That is, the backslash remains present in the " +"value of the raw string::" +msgstr "" + +#: faq/programming.rst:1067 +msgid "Also see the specification in the :ref:`language reference `." +msgstr "" + +#: faq/programming.rst:1070 +msgid "Performance" +msgstr "Performances" + +#: faq/programming.rst:1073 +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:1075 +msgid "" +"That's a tough one, in general. First, here are a list of things to " +"remember before diving further:" +msgstr "" +"Question difficile en général. Il faut garder en tête les points suivants " +"avant d'aller plus loin :" + +#: faq/programming.rst:1078 +msgid "" +"Performance characteristics vary across Python implementations. This FAQ " +"focuses on :term:`CPython`." +msgstr "" +"Les performances varient en fonction des implémentations de Python. Cette " +"FAQ ne traite que de :term:`CPython`." + +#: faq/programming.rst:1080 +msgid "" +"Behaviour can vary across operating systems, especially when talking about I/" +"O or multi-threading." +msgstr "" +"Les comportements peuvent différer d'un système d'exploitation à l'autre, " +"tout particulièrement quand il s'agit d'entrée/sortie ou de fils d'exécution " +"multiples." + +#: faq/programming.rst:1082 +msgid "" +"You should always find the hot spots in your program *before* attempting to " +"optimize any code (see the :mod:`profile` module)." +msgstr "" +"Il faut toujours essayer de trouver où sont les points de contention d'un " +"programme *avant* d'essayer d'optimiser du code (voir le module :mod:" +"`profile`)." + +#: faq/programming.rst:1084 +msgid "" +"Writing benchmark scripts will allow you to iterate quickly when searching " +"for improvements (see the :mod:`timeit` module)." +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:1086 +msgid "" +"It is highly recommended to have good code coverage (through unit testing or " +"any other technique) before potentially introducing regressions hidden in " +"sophisticated optimizations." +msgstr "" +"Il est très fortement recommandé d'avoir une bonne couverture de code (avec " +"des tests unitaires ou autre) avant d'ajouter des erreurs dans des " +"optimisations sophistiquées." + +#: faq/programming.rst:1090 +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 " +"performance levels:" +msgstr "" +"Ceci étant dit, il y a beaucoup d'astuces pour accélérer du code Python. " +"Voici quelques principes généraux qui peuvent aider à atteindre des niveaux " +"de performance satisfaisants :" + +#: faq/programming.rst:1094 +msgid "" +"Making your algorithms faster (or changing to faster ones) can yield much " +"larger benefits than trying to sprinkle micro-optimization tricks all over " +"your code." +msgstr "" +"Améliorer les algorithmes (ou en changer pour des plus performants) peut " +"produire de bien meilleurs résultats que d'optimiser çà et là de petites " +"portions du code." + +#: faq/programming.rst:1098 +msgid "" +"Use the right data structures. Study documentation for the :ref:`bltin-" +"types` and the :mod:`collections` module." +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:1101 +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 " +"come up with. This is doubly true for primitives written in C, such as " +"builtins and some extension types. For example, be sure to use either the :" +"meth:`list.sort` built-in method or the related :func:`sorted` function to " +"do sorting (and see the :ref:`sortinghowto` for examples of moderately " +"advanced usage)." +msgstr "" +"Quand la bibliothèque standard fournit une implémentation pour quelque " +"chose, il y a de fortes chances (même si ce n'est pas systématique) que " +"cette implémentation soit plus rapide que la vôtre. C'est d'autant plus vrai " +"pour les routines écrites en C, comme les routines natives et certaines " +"extensions de types. Par exemple, il faut utiliser la méthode native :meth:" +"`list.sort` ou la fonction :func:`sorted` similaire pour classer (et se " +"référer à la section :ref:`sortinghowto` pour des exemples d'utilisation " +"courante)." + +#: faq/programming.rst:1109 +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, " +"your program will be slower. You should avoid excessive abstraction, " +"especially under the form of tiny functions or methods (which are also often " +"detrimental to readability)." +msgstr "" +"Les abstractions ont tendance à créer des indirections et obligent " +"l'interpréteur à faire plus d'efforts. Si le niveau d'indirection dépasse la " +"quantité de travail effectif, le programme sera ralenti. Il faut toujours " +"é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:1115 +#, fuzzy +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 " +"compile a slightly modified version of Python code into a C extension, and " +"can be used on many different platforms. Cython can take advantage of " +"compilation (and optional type annotations) to make your code significantly " +"faster than when interpreted. If you are confident in your C programming " +"skills, you can also :ref:`write a C extension module ` " +"yourself." +msgstr "" +"Si vous atteignez les limites de ce que du Python « pur » permet de faire, " +"il y a des outils qui permettent d'aller plus loin. Par exemple, `Cython " +"`_ peut compiler une version légèrement modifiée de code " +"Python en une extension C et est disponible sur de nombreuses plate-formes. " +"Cython peut bénéficier de la compilation (et de l'annotation, optionnelle, " +"des types) pour rendre votre code beaucoup plus rapide que s'il était " +"interprété. Si vous avez confiance en vos capacités de programmation en C, " +"vous pouvez aussi :ref:`écrire un module d'extension en C` " +"vous-même." + +#: faq/programming.rst:1125 +msgid "" +"The wiki page devoted to `performance tips `_." +msgstr "" +"La page wiki dédiée aux `astuces de performance `_." + +#: faq/programming.rst:1131 +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:1133 +msgid "" +":class:`str` and :class:`bytes` objects are immutable, therefore " +"concatenating many strings together is inefficient as each concatenation " +"creates a new object. In the general case, the total runtime cost is " +"quadratic in the total string length." +msgstr "" +"Les objets :class:`str` et :class:`bytes` sont immuables, par conséquent " +"concaténer un grand nombre de chaînes de caractères entre elles n'est pas " +"très efficace car chaque concaténation crée un nouvel objet. Dans le cas " +"général, la complexité est quadratique par rapport à la taille totale de la " +"chaîne." + +#: faq/programming.rst:1138 +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::" +msgstr "" +"Pour mettre bout à bout un grand nombre d'objets :class:`str`, la technique " +"recommandée consiste à toutes les mettre dans une liste et appeler la " +"méthode :meth:`str.join` à la fin ::" + +#: faq/programming.rst:1146 +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:1148 +msgid "" +"To accumulate many :class:`bytes` objects, the recommended idiom is to " +"extend a :class:`bytearray` object using in-place concatenation (the ``+=`` " +"operator)::" +msgstr "" +"Pour concaténer un grand nombre d'objets :class:`bytes`, la technique " +"recommandée consiste à étendre un objet :class:`bytearray` en utilisant la " +"concaténation en-place (l'opérateur ``+=``) ::" + +#: faq/programming.rst:1157 +msgid "Sequences (Tuples/Lists)" +msgstr "Séquences (*n*-uplets / listes)" + +#: faq/programming.rst:1160 +msgid "How do I convert between tuples and lists?" +msgstr "Comment convertir les listes en *n*-uplets et inversement ?" + +#: faq/programming.rst:1162 +msgid "" +"The type constructor ``tuple(seq)`` converts any sequence (actually, any " +"iterable) into a tuple with the same items in the same order." +msgstr "" +"Le constructeur de type ``tuple(seq)`` convertit toute séquence (plus " +"précisément, tout itérable) en un *n*-uplet avec les mêmes éléments dans le " +"même ordre." + +#: faq/programming.rst:1165 +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 " +"copy but returns the same object, so it is cheap to call :func:`tuple` when " +"you aren't sure that an object is already a tuple." +msgstr "" +"Par exemple ``tuple([1, 2, 3])`` renvoie ``(1, 2, 3)`` et ``tuple('abc')`` " +"renvoie ``('a', 'b', 'c')``. Si l'argument est un *n*-uplet, cela ne crée " +"pas de copie, mais renvoie le même objet, ce qui fait de :func:`tuple` une " +"fonction économique à appeler quand vous ne savez pas si votre objet est " +"déjà un *n*-uplet." + +#: faq/programming.rst:1170 +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, " +"3))`` yields ``[1, 2, 3]`` and ``list('abc')`` yields ``['a', 'b', 'c']``. " +"If the argument is a list, it makes a copy just like ``seq[:]`` would." +msgstr "" +"Le constructeur de type ``list(seq)`` convertit toute séquence ou itérable " +"en liste contenant les mêmes éléments dans le même ordre. Par exemple, " +"``list((1,2,3))`` renvoie ``[1,2,3]`` et ``list('abc')`` renvoie " +"``['a','b','c']``. Si l'argument est une liste, il renvoie une copie, de la " +"même façon que ``seq[:]``." + +#: faq/programming.rst:1177 +msgid "What's a negative index?" +msgstr "Qu'est-ce qu'un indice négatif ?" + +#: faq/programming.rst:1179 +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 " +"forth. For negative indices -1 is the last index and -2 is the penultimate " +"(next to last) index and so forth. Think of ``seq[-n]`` as the same as " +"``seq[len(seq)-n]``." +msgstr "" +"Les séquences Python sont indicées avec des nombres positifs aussi bien que " +"négatifs. Pour les nombres positifs, 0 est le premier indice, 1 est le " +"deuxième, et ainsi de suite. Pour les indices négatifs, ``-1`` est le " +"dernier indice, ``-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:1184 +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 " +"removing the trailing newline from a string." +msgstr "" +"Utiliser des indices négatifs peut être très pratique. Par exemple " +"``S[:-1]`` représente la chaîne tout entière à l'exception du dernier " +"caractère, ce qui est pratique pour retirer un caractère de fin de ligne à " +"la fin d'une chaîne." + +#: faq/programming.rst:1190 +msgid "How do I iterate over a sequence in reverse order?" +msgstr "Comment itérer à rebours sur une séquence ?" + +#: faq/programming.rst:1192 +msgid "Use the :func:`reversed` built-in function::" +msgstr "Utilisez la fonction native :func:`reversed` ::" + +#: faq/programming.rst:1197 +msgid "" +"This won't touch your original sequence, but build a new copy with reversed " +"order to iterate over." +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:1202 +msgid "How do you remove duplicates from a list?" +msgstr "Comment retirer les doublons d'une liste ?" + +#: faq/programming.rst:1204 +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:1206 +msgid "https://code.activestate.com/recipes/52560/" +msgstr "https://code.activestate.com/recipes/52560/" + +#: faq/programming.rst:1208 +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::" +msgstr "" +"Si changer l'ordre de la liste ne vous dérange pas, commencez par ordonner " +"celle-ci, puis parcourez-la d'un bout à l'autre, en supprimant les doublons " +"trouvés en chemin ::" + +#: faq/programming.rst:1220 +msgid "" +"If all elements of the list may be used as set keys (i.e. they are all :term:" +"`hashable`) this is often faster ::" +msgstr "" +"Si tous les éléments de la liste peuvent être utilisés comme des clés de " +"dictionnaire (c'est-à-dire, qu'elles sont toutes :term:`hachables " +"`) ceci est souvent plus rapide ::" + +#: faq/programming.rst:1225 +msgid "" +"This converts the list into a set, thereby removing duplicates, and then " +"back into a list." +msgstr "" +"Ceci convertit la liste en un ensemble, ce qui supprime automatiquement les " +"doublons, puis la transforme à nouveau en liste." + +#: faq/programming.rst:1230 +msgid "How do you remove multiple items from a list" +msgstr "Comment retirer les doublons d'une liste" + +#: faq/programming.rst:1232 +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 " +"replacement with an implicit or explicit forward iteration. Here are three " +"variations.::" +msgstr "" +"Comme pour supprimer les doublons, il est possible d’itérer explicitement à " +"l’envers avec une condition de suppression. Cependant, il est plus facile et " +"plus rapide d’utiliser le remplacement des tranches par une itération avant, " +"implicite ou explicite. Voici trois variantes. ::" + +#: faq/programming.rst:1241 +msgid "The list comprehension may be fastest." +msgstr "La liste en compréhension est peut-être la plus rapide ::" + +#: faq/programming.rst:1245 +msgid "How do you make an array in Python?" +msgstr "Comment construire un tableau en Python ?" + +#: faq/programming.rst:1247 +msgid "Use a list::" +msgstr "Utilisez une liste ::" + +#: faq/programming.rst:1251 +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 " +"different types." +msgstr "" +"Les listes ont un coût équivalent à celui des tableaux C ou Pascal ; la " +"principale différence est qu'une liste Python peut contenir des objets de " +"différents types." + +#: faq/programming.rst:1254 +#, 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 `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 " +"que les listes. Notez aussi que NumPy (et d'autres) fournissent différentes " +"structures de type tableaux, avec des caractéristiques différentes." + +#: faq/programming.rst:1260 +#, fuzzy +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:1264 +#, fuzzy +msgid "" +"If mutability is desired, you could use lists instead of tuples. Here the " +"analogue of a Lisp *car* is ``lisp_list[0]`` and the analogue of *cdr* is " +"``lisp_list[1]``. Only do this if you're sure you really need to, because " +"it's usually a lot slower than using Python lists." +msgstr "" +"Si vous voulez pouvoir modifier les éléments, utilisez une liste plutôt " +"qu'un *n*-uplet. Ici la version équivalente du *car* de Lisp est " +"``lisp_list[0]`` et l'équivalent de *cdr* est ``lisp_list[1]``. Ne faites " +"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:1273 +msgid "How do I create a multidimensional list?" +msgstr "Comment créer une liste à plusieurs dimensions ?" + +#: faq/programming.rst:1275 +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:1279 +msgid "This looks correct if you print it:" +msgstr "Elle semble correcte si on l'affiche :" + +#: faq/programming.rst:1290 +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:1302 +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 " +"containing 3 references to the same list of length two. Changes to one row " +"will show in all rows, which is almost certainly not what you want." +msgstr "" +"Dupliquer une liste en utilisant ``*`` ne crée en réalité pas de copie mais " +"seulement des références aux objets existants. Le ``*3`` crée une liste " +"contenant trois références à la même liste de longueur deux. Un changement " +"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:1307 +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::" +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:1314 +msgid "" +"This generates a list containing 3 different lists of length two. You can " +"also use a list comprehension::" +msgstr "" +"Cela génère une liste contenant elle-même trois listes distinctes, de " +"longueur deux. Vous pouvez aussi utiliser la syntaxe des listes en " +"compréhension ::" + +#: faq/programming.rst:1320 +#, fuzzy +msgid "" +"Or, you can use an extension that provides a matrix datatype; `NumPy " +"`_ is the best known." +msgstr "" +"Vous pouvez aussi utiliser une extension qui fournit un type matriciel " +"natif ; `NumPy `_ est la plus répandue." + +#: faq/programming.rst:1325 +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:1327 +msgid "Use a list comprehension::" +msgstr "Utilisez une liste en compréhension ::" + +#: faq/programming.rst:1334 +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:1336 +msgid "" +"This is because of a combination of the fact that augmented assignment " +"operators are *assignment* operators, and the difference between mutable and " +"immutable objects in Python." +msgstr "" +"Ceci est dû à la combinaison de deux facteurs : le fait que les opérateurs " +"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:1340 +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 " +"a ``list`` and ``+=`` as our exemplar." +msgstr "" +"Cette discussion est valable, en général, quand des opérateurs d'affectation " +"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:1344 +msgid "If you wrote::" +msgstr "Si vous écrivez ::" + +#: faq/programming.rst:1352 +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, " +"``2``, but when we attempt to assign the result of the computation, ``2``, " +"to element ``0`` of the tuple, we get an error because we can't change what " +"an element of a tuple points to." +msgstr "" +"La cause de l'exception est claire : ``1`` est ajouté à l'objet " +"``a_tuple[0]`` qui pointe sur (``1``), ce qui produit l'objet résultant " +"``2``, mais, lorsque l'on tente d'affecter le résultat du calcul, ``2``, à " +"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:1358 +msgid "" +"Under the covers, what this augmented assignment statement is doing is " +"approximately this::" +msgstr "" +"Sous le capot, une instruction d'affectation incrémentale fait à peu près " +"ceci ::" + +#: faq/programming.rst:1367 +msgid "" +"It is the assignment part of the operation that produces the error, since a " +"tuple is immutable." +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:1370 +msgid "When you write something like::" +msgstr "Quand vous écrivez un code du style ::" + +#: faq/programming.rst:1378 +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::" +msgstr "" +"L'exception est un peu plus surprenante et, chose encore plus étrange, " +"malgré l'erreur, l'ajout a fonctionné ::" + +#: faq/programming.rst:1384 +#, fuzzy +msgid "" +"To see why this happens, you need to know that (a) if an object implements " +"an :meth:`~object.__iadd__` magic method, it gets called when the ``+=`` " +"augmented assignment is executed, and its return value is what gets used in " +"the assignment statement; and (b) for lists, :meth:`!__iadd__` is equivalent " +"to calling :meth:`~list.extend` on the list and returning the list. That's " +"why we say that for lists, ``+=`` is a \"shorthand\" for :meth:`!list." +"extend`::" +msgstr "" +"Pour comprendre ce qui se passe, il faut savoir que, premièrement, si un " +"objet implémente la méthode magique c, celle-ci est appelée quand " +"l'affectation incrémentale ``+=`` est exécutée et sa valeur de retour est " +"utilisée dans l'instruction d'affectation ; et que, deuxièmement, pour les " +"listes, ``__iadd__`` équivaut à appeler ``extend`` sur la liste et à " +"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:1397 +msgid "This is equivalent to::" +msgstr "C’est équivalent à ::" + +#: faq/programming.rst:1402 +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 " +"assignment is a no-op, since it is a pointer to the same object that " +"``a_list`` was previously pointing to, but the assignment still happens." +msgstr "" +"L'objet sur lequel pointe ``a_list`` a été modifié et le pointeur vers " +"l'objet modifié est réaffecté à ``a_list``. *In fine*, l'affectation ne " +"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:1407 +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:1415 +#, fuzzy +msgid "" +"The :meth:`!__iadd__` succeeds, and thus the list is extended, but even " +"though ``result`` points to the same object that ``a_tuple[0]`` already " +"points to, that final assignment still results in an error, because tuples " +"are immutable." +msgstr "" +"L'appel à ``__iadd__`` réussit et la liste est étendue, mais bien que " +"``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:1421 +msgid "" +"I want to do a complicated sort: can you do a Schwartzian Transform in " +"Python?" +msgstr "" +"Je souhaite faire un classement compliqué : peut-on faire une transformation " +"de Schwartz en Python ?" + +#: faq/programming.rst:1423 +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 " +"value\". In Python, use the ``key`` argument for the :meth:`list.sort` " +"method::" +msgstr "" +"Cette technique, attribuée à Randal Schwartz de la communauté Perl, ordonne " +"les éléments d'une liste à l'aide une transformation qui fait correspondre " +"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:1432 +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:1434 +msgid "" +"Merge them into an iterator of tuples, sort the resulting list, and then " +"pick out the element you want. ::" +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:1449 +msgid "Objects" +msgstr "Objets" + +#: faq/programming.rst:1452 +msgid "What is a class?" +msgstr "Qu'est-ce qu'une classe ?" + +#: faq/programming.rst:1454 +msgid "" +"A class is the particular object type created by executing a class " +"statement. Class objects are used as templates to create instance objects, " +"which embody both the data (attributes) and code (methods) specific to a " +"datatype." +msgstr "" +"Une classe est le type d'objet particulier créé par l'exécution d'une " +"déclaration de classe. Les objets de classe sont utilisés comme modèles pour " +"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:1458 +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. " +"This allows an object model to be successively refined by inheritance. You " +"might have a generic ``Mailbox`` class that provides basic accessor methods " +"for a mailbox, and subclasses such as ``MboxMailbox``, ``MaildirMailbox``, " +"``OutlookMailbox`` that handle various specific mailbox formats." +msgstr "" +"Une classe peut être fondée sur une ou plusieurs autres classes, appelée sa " +"(ou ses) classe(s) de base. Elle hérite alors des attributs et des méthodes " +"de ses classes de base. Cela permet à un modèle d'objet d'être " +"successivement raffiné par héritage. Vous pourriez avoir une classe " +"générique ``Mailbox``, qui fournit des méthodes d'accès de base pour une " +"boîte aux lettres, et des sous-classes telles que ``MboxMailbox``, " +"``MaildirMailbox``, ``OutlookMailbox`` qui gèrent les plusieurs formats " +"spécifiques de boîtes aux lettres." + +#: faq/programming.rst:1467 +msgid "What is a method?" +msgstr "Qu'est-ce qu'une méthode ?" + +#: faq/programming.rst:1469 +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 " +"definition::" +msgstr "" +"Une méthode est une fonction sur un objet ``x`` qu'on appelle de manière " +"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:1479 +msgid "What is self?" +msgstr "Qu'est-ce que self ?" + +#: faq/programming.rst:1481 +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, " +"c)`` for some instance ``x`` of the class in which the definition occurs; " +"the called method will think it is called as ``meth(x, a, b, c)``." +msgstr "" +"Par convention, le premier argument d'une méthode est appelé self. Une " +"méthode ``meth(self, a, b, c)`` doit être appelée sous la forme ``x.meth(a, " +"b, c)`` où ``x`` est une instance de la classe dans laquelle cette méthode " +"est définie ; tout se passe comme si la méthode était appelée comme " +"``meth(x, a, b, c)``." + +#: faq/programming.rst:1486 +msgid "See also :ref:`why-self`." +msgstr "Voir aussi :ref:`why-self`." + +#: faq/programming.rst:1490 +msgid "" +"How do I check if an object is an instance of a given class or of a subclass " +"of it?" +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:1492 +#, fuzzy +msgid "" +"Use the built-in function :func:`isinstance(obj, cls) `. You " +"can check if an object is an instance of any of a number of classes by " +"providing a tuple instead of a single class, e.g. ``isinstance(obj, (class1, " +"class2, ...))``, and can also check whether an object is one of Python's " +"built-in types, e.g. ``isinstance(obj, str)`` or ``isinstance(obj, (int, " +"float, complex))``." +msgstr "" +"Utilisez la fonction native ``isinstance(obj, cls)``. Vous pouvez vérifier " +"qu'un objet est une instance de plusieurs classes à la fois en fournissant " +"un *n*-uplet à la place d'une seule classe, par exemple, ``isinstance(obj, " +"(class1, class2, ...))``. Vous pouvez également vérifier qu'un objet est " +"l'un des types natifs de Python, par exemple ``isinstance(obj, str)`` ou " +"``isinstance(obj, (int, float, complex))``." + +#: faq/programming.rst:1499 +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 de base abstraite `, c'est à dire qu'elle " +"renvoie ``True`` pour une classe A enregistrée auprès d'une classe de base " +"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:1534 +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 " +"proper object-oriented style is to define methods on the classes that " +"encapsulate a particular behaviour, instead of checking the object's class " +"and doing a different thing based on what class it is. For example, if you " +"have a function that does something::" +msgstr "" +"Notez que la plupart des programmes n'utilisent que rarement :func:" +"`isInstance` sur les classes définies par l'utilisateur. Si vous développez " +"vous-même des classes, une approche plus orientée-objet consiste définir des " +"méthodes sur les classes qui sont porteuses d'un comportement particulier, " +"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:1548 +msgid "" +"A better approach is to define a ``search()`` method on all the classes and " +"just call it::" +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:1563 +msgid "What is delegation?" +msgstr "Qu'est-ce que la délégation ?" + +#: faq/programming.rst:1565 +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 " +"one of its methods. You can create a new class that provides a new " +"implementation of the method you're interested in changing and delegates all " +"other methods to the corresponding method of ``x``." +msgstr "" +"La délégation est une technique orientée objet (aussi appelée « patron de " +"conception). Prenons un objet ``x`` dont on souhaite modifier le " +"comportement d'une seule de ses méthodes. On peut créer une nouvelle classe " +"qui fournit une nouvelle implémentation de la méthode qui nous intéresse " +"dans l'évolution et qui délègue toute autre méthode à la méthode " +"correspondante de ``x``." + +#: faq/programming.rst:1571 +msgid "" +"Python programmers can easily implement delegation. For example, the " +"following class implements a class that behaves like a file but converts all " +"written data to uppercase::" +msgstr "" +"Les programmeurs Python peuvent facilement mettre en œuvre la délégation. " +"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:1586 +#, fuzzy +msgid "" +"Here the ``UpperOut`` class redefines the ``write()`` method to convert the " +"argument string to uppercase before calling the underlying ``self._outfile." +"write()`` method. All other methods are delegated to the underlying ``self." +"_outfile`` object. The delegation is accomplished via the :meth:`~object." +"__getattr__` method; consult :ref:`the language reference ` for more information about controlling attribute access." +msgstr "" +"Ici, la classe ``UpperOut`` redéfinit la méthode ``write()`` pour convertir " +"la chaîne de caractères donnée en argument en majuscules avant d'appeler la " +"méthode sous-jacente ``self._outfile.write()``. Toutes les autres méthodes " +"sont déléguées à l'objet sous-jacent ``self._outfile``. La délégation se " +"fait par la méthode ``__getattr__``, consulter :ref:`the language reference " +"` pour plus d'informations sur la personnalisation de " +"l’accès aux attributs." + +#: faq/programming.rst:1593 +#, fuzzy +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:" +"`~object.__setattr__` method too, and it must do so carefully. The basic " +"implementation of :meth:`!__setattr__` is roughly equivalent to the " +"following::" +msgstr "" +"Notez que pour une utilisation plus générale de la délégation, les choses " +"peuvent se compliquer. Lorsque les attributs doivent être définis aussi bien " +"que récupérés, la classe doit définir une méthode :meth:`__setattr__` aussi, " +"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:1604 +#, fuzzy +msgid "" +"Most :meth:`!__setattr__` implementations must modify :meth:`self.__dict__ " +"` to store local state for self without causing an infinite " +"recursion." +msgstr "" +"La plupart des implémentations de :meth:`__setattr__` doivent modifier " +"``self.__dict__`` pour stocker l'état local de self sans provoquer une " +"récursion infinie." + +#: faq/programming.rst:1610 +msgid "" +"How do I call a method defined in a base class from a derived class that " +"extends it?" +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:1612 +msgid "Use the built-in :func:`super` function::" +msgstr "Utilisez la fonction native :func:`super` ::" + +#: faq/programming.rst:1618 +msgid "" +"In the example, :func:`super` will automatically determine the instance from " +"which it was called (the ``self`` value), look up the :term:`method " +"resolution order` (MRO) with ``type(self).__mro__``, and return the next in " +"line after ``Derived`` in the MRO: ``Base``." +msgstr "" +"Dans cet exemple, :func:`super` détermine automatiquement l'instance dont " +"une méthode l'appelle (l'objet ``self``), observe l'\\ :term:`ordre de " +"résolution des méthodes ` obtenu avec ``type(self)." +"__mro__``, et renvoie la classe qui suit ``Derived`` dans cet ordre, donc " +"``Base``." + +#: faq/programming.rst:1625 +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:1627 +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, " +"this trick is also handy if you want to decide dynamically (e.g. depending " +"on availability of resources) which base class to use. Example::" +msgstr "" +"Vous pouvez définir un alias pour la classe de base et dériver depuis " +"l'alias. Ensuite, tout ce que vous devez changer est la valeur attribuée à " +"cet alias. Accessoirement, cette astuce est également utile pour déterminer " +"dynamiquement (par exemple en fonction de la disponibilité de certaines " +"ressources) la classe de base à utiliser. Exemple ::" + +#: faq/programming.rst:1642 +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:1644 +msgid "" +"Both static data and static methods (in the sense of C++ or Java) are " +"supported in Python." +msgstr "" +"Les données statiques et les méthodes statiques (au sens C++ ou Java) sont " +"prises en charge en Python." + +#: faq/programming.rst:1647 +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::" +msgstr "" +"Pour les données statiques, il suffit de définir un attribut de classe. Pour " +"attribuer une nouvelle valeur à l'attribut, vous devez explicitement " +"utiliser le nom de classe dans l'affectation ::" + +#: faq/programming.rst:1659 +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 " +"class on the base-class search path from ``c.__class__`` back to ``C``." +msgstr "" +"``c.count`` se réfère également à ``C.count`` pour tout ``c`` tel que " +"``isInstance (c, C)`` est vrai, sauf remplacement par ``c`` lui-même ou par " +"une classe sur le chemin de recherche de classe de base de ``c.__class__`` " +"jusqu'à ``C``." + +#: faq/programming.rst:1663 +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 " +"dict. Rebinding of a class-static data name must always specify the class " +"whether inside a method or not::" +msgstr "" +"Attention : dans une méthode de C, une affectation comme ``self.count = 42`` " +"crée une nouvelle instance sans rapport avec le nom ``count`` dans le " +"dictionnaire de données de ``self``. La redéfinition d'une donnée statique " +"de classe doit toujours spécifier la classe, que l'on soit à l'intérieur " +"d'une méthode ou non ::" + +#: faq/programming.rst:1670 +msgid "Static methods are possible::" +msgstr "Il est possible d'utiliser des méthodes statiques ::" + +#: faq/programming.rst:1678 +msgid "" +"However, a far more straightforward way to get the effect of a static method " +"is via a simple module-level function::" +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:1684 +msgid "" +"If your code is structured so as to define one class (or tightly related " +"class hierarchy) per module, this supplies the desired encapsulation." +msgstr "" +"Si votre code est structuré de manière à définir une classe (ou bien la " +"hiérarchie des classes connexes) par module, ceci fournira l'encapsulation " +"souhaitée." + +#: faq/programming.rst:1689 +msgid "How can I overload constructors (or methods) in Python?" +msgstr "Comment surcharger les constructeurs (ou méthodes) en Python ?" + +#: faq/programming.rst:1691 +msgid "" +"This answer actually applies to all methods, but the question usually comes " +"up first in the context of constructors." +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:1694 +msgid "In C++ you'd write" +msgstr "En C++, on écrirait" + +#: faq/programming.rst:1703 +msgid "" +"In Python you have to write a single constructor that catches all cases " +"using default arguments. For example::" +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:1713 +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:1715 +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:1720 +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:1724 +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:1726 +msgid "" +"Variable names with double leading underscores are \"mangled\" to provide a " +"simple but effective way to define class private variables. Any identifier " +"of the form ``__spam`` (at least two leading underscores, at most one " +"trailing underscore) is textually replaced with ``_classname__spam``, where " +"``classname`` is the current class name with any leading underscores " +"stripped." +msgstr "" +"Les noms de variables commençant avec deux tirets bas sont « déformés », " +"c'est un moyen simple mais efficace de définir des variables privées à une " +"classe. Tout identifiant de la forme ``__spam`` (commençant par au moins " +"deux tirets bas et se terminant par au plus un tiret bas) est textuellement " +"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:1732 +msgid "" +"This doesn't guarantee privacy: an outside user can still deliberately " +"access the \"_classname__spam\" attribute, and private values are visible in " +"the object's ``__dict__``. Many Python programmers never bother to use " +"private variable names at all." +msgstr "" +"Cela ne garantit aucune protection : un utilisateur extérieur peut encore " +"délibérément accéder à l'attribut ``_classname__spam`` et les valeurs " +"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:1739 +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:1741 +msgid "There are several possible reasons for this." +msgstr "Il y a plusieurs explications possibles." + +#: faq/programming.rst:1743 +#, fuzzy +msgid "" +"The :keyword:`del` statement does not necessarily call :meth:`~object." +"__del__` -- it simply decrements the object's reference count, and if this " +"reaches zero :meth:`!__del__` is called." +msgstr "" +"La commande *del* n'appelle pas forcément :meth:`__del__` — elle décrémente " +"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:1747 +#, fuzzy +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 " +"counts will never go back to zero. Once in a while Python runs an algorithm " +"to detect such cycles, but the garbage collector might run some time after " +"the last reference to your data structure vanishes, so your :meth:`!__del__` " +"method may be called at an inconvenient and random time. This is " +"inconvenient if you're trying to reproduce a problem. Worse, the order in " +"which object's :meth:`!__del__` methods are executed is arbitrary. You can " +"run :func:`gc.collect` to force a collection, but there *are* pathological " +"cases where objects will never be collected." +msgstr "" +"Si la structure de données contient des références circulaires (par exemple " +"un arbre dans lequel chaque fils référence son père, et chaque père garde " +"une liste de ses fils), le compteur de références n'arrivera jamais à zéro. " +"Python exécute périodiquement un algorithme pour détecter ce genre de " +"cycles, mais il peut se passer un certain temps entre le moment où la " +"structure est référencée pour la dernière fois et l'appel du ramasse-" +"miettes, donc la méthode :meth:`__del__` peut être appelée à un moment " +"aléatoire et pas opportun. C'est gênant pour essayer reproduire un problème. " +"Pire, l'ordre dans lequel les méthodes :meth:`__del__` des objets sont " +"appelées est arbitraire. Il est possible de forcer l'appel du ramasse-" +"miettes avec la fonction :func:`gc.collect`, mais il existe certains cas où " +"les objets ne seront jamais nettoyés." + +#: faq/programming.rst:1758 +#, fuzzy +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. " +"The ``close()`` method can then remove attributes that refer to subobjects. " +"Don't call :meth:`!__del__` directly -- :meth:`!__del__` should call " +"``close()`` and ``close()`` should make sure that it can be called more than " +"once for the same object." +msgstr "" +"Bien que le ramasse-miette de cycles existe, il est tout de même recommandé " +"de définir une méthode ``close()`` explicite sur des objets, et de l'appeler " +"quand leur cycle de vie s'achève. Cette méthode ``close()`` peut alors " +"supprimer les attributs qui référencent des sous-objets. Il vaut mieux ne " +"pas appeler la méthode :meth:`__del__` directement, mais la méthode :meth:" +"`__del__` devrait appeler la méthode ``close()`` et ``close()`` doit pouvoir " +"être appelée plusieurs fois sur le même objet." + +#: faq/programming.rst:1765 +msgid "" +"Another way to avoid cyclical references is to use the :mod:`weakref` " +"module, which allows you to point to objects without incrementing their " +"reference count. Tree data structures, for instance, should use weak " +"references for their parent and sibling references (if they need them!)." +msgstr "" +"Une alternative pour éviter les références cycliques consiste à utiliser le " +"module :mod:`weakref`, qui permet de faire référence à des objets sans " +"incrémenter leur compteur de références. Par exemple, les structures " +"d'arbres devraient utiliser des références faibles entre pères et fils (si " +"nécessaire !)." + +#: faq/programming.rst:1778 +#, fuzzy +msgid "" +"Finally, if your :meth:`!__del__` method raises an exception, a warning " +"message is printed to :data:`sys.stderr`." +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:1783 +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:1785 +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 " +"instances by keeping a list of weak references to each instance." +msgstr "" +"Python ne tient pas de registre de toutes les instances d'une classe (ni de " +"n'importe quel type natif). Il est cependant possible de programmer le " +"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:1791 +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:1793 +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 " +"memory address, it happens frequently that after an object is deleted from " +"memory, the next freshly created object is allocated at the same position in " +"memory. This is illustrated by this example:" +msgstr "" +"La fonction native :func:`id` renvoie un entier dont l'unicité est garantie " +"durant toute la vie de l'objet. Vu qu'en CPython cet entier est en réalité " +"l'adresse mémoire de l'objet, il est fréquent qu'un nouvel objet soit alloué " +"à une adresse mémoire identique à celle d'un objet venant d'être supprimé. " +"Comme l'illustre le code suivant :" + +#: faq/programming.rst:1804 +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 " +"objects whose id you want to examine are still alive, create another " +"reference to the object:" +msgstr "" +"Les deux identifiants appartiennent à des objets entiers créés juste avant " +"l'appel à ``id()`` et détruits immédiatement après. Pour s'assurer que les " +"objets dont on veut examiner les identifiants sont toujours en vie, créons " +"une nouvelle référence à l'objet :" + +#: faq/programming.rst:1817 +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:1819 +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:1822 +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:1827 +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:1831 +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:1834 +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:1838 +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:1842 +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:1859 +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:1866 +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:1869 +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:1873 +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:1889 +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:1893 +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:1904 +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:1906 +#, fuzzy +msgid "" +"When subclassing an immutable type, override the :meth:`~object.__new__` " +"method instead of the :meth:`~object.__init__` method. The latter only runs " +"*after* an instance is created, which is too late to alter data in an " +"immutable instance." +msgstr "" +"Lorsque l'on crée une classe héritant d'une classe d'objets immuables, il " +"faut remplacer la méthode :meth:`__new__`, et non pas la méthode :meth:" +"`__init__`. En effet, cette dernière est exécutée seulement après que " +"l'instance soit créée, donc il y est trop tard pour modifier le contenu " +"d'une instance si elle est immuable." + +#: faq/programming.rst:1911 +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:1937 +msgid "The classes can be used like this:" +msgstr "Ces classes s'utilisent comme ceci :" + +#: faq/programming.rst:1952 +msgid "How do I cache method calls?" +msgstr "Comment mettre en cache le résultat d'une méthode ?" + +#: faq/programming.rst:1954 +msgid "" +"The two principal tools for caching methods are :func:`functools." +"cached_property` and :func:`functools.lru_cache`. The former stores results " +"at the instance level and the latter at the class level." +msgstr "" +"Il existe deux outils principaux pour mettre en cache la valeur de retour " +"d'une méthode, à savoir :func:`functools.cached_property`, qui stocke les " +"valeurs au niveau de l'instance, et :func:`functools.lru_cache`, qui le fait " +"au niveau de la classe." + +#: faq/programming.rst:1959 +msgid "" +"The *cached_property* approach only works with methods that do not take any " +"arguments. It does not create a reference to the instance. The cached " +"method result will be kept only as long as the instance is alive." +msgstr "" +"La fonction ``cached_property`` n'est applicable qu'aux méthodes sans " +"argument. Elle n'induit aucune référence vers l'instance. Le cache est " +"simplement conservé aussi longtemps que l'instance elle-même." + +#: faq/programming.rst:1963 +msgid "" +"The advantage is that when an instance is no longer used, the cached method " +"result will be released right away. The disadvantage is that if instances " +"accumulate, so too will the accumulated method results. They can grow " +"without bound." +msgstr "" +"L'avantage est que le cache est supprimé aussitôt que l'instance est " +"détruite. L'inconvénient est que les caches peuvent s'accumuler avec les " +"instances, sans limite de nombre." + +#: faq/programming.rst:1968 +#, fuzzy +msgid "" +"The *lru_cache* approach works with methods that have :term:`hashable` " +"arguments. It creates a reference to the instance unless special efforts " +"are made to pass in weak references." +msgstr "" +"La fonction ``lru_cache`` s'applique quant à elle aux méthodes dont les " +"arguments sont hachables. Elle crée une référence forte à l'instance, sauf à " +"passer par des circonvolutions pour que la référence soit faible." + +#: faq/programming.rst:1972 +msgid "" +"The advantage of the least recently used algorithm is that the cache is " +"bounded by the specified *maxsize*. The disadvantage is that instances are " +"kept alive until they age out of the cache or until the cache is cleared." +msgstr "" +"L'avantage de l'algorithme LRU est d'offrir une limitation sur la taille du " +"cache, que l'on peut régler avec le paramètre *maxsize* (NdT : LRU signifie " +"*Least Recently Used* en anglais, les entrées du cache les plus anciennes " +"sont évincées pour conserver la taille). L'inconvénient est qu'une référence " +"forte vers l'instance est conservée dans le cache, ce qui maintient " +"l'instance hors de portée du ramasse-miettes jusqu'à ce que l'entrée soit " +"effacée du cache ou que le cache soit remis à zéro." + +#: faq/programming.rst:1977 +msgid "This example shows the various techniques::" +msgstr "Voici une démonstration des différentes techniques ::" + +#: faq/programming.rst:2001 +msgid "" +"The above example assumes that the *station_id* never changes. If the " +"relevant instance attributes are mutable, the *cached_property* approach " +"can't be made to work because it cannot detect changes to the attributes." +msgstr "" +"Cet exemple suppose que l'attribut *station_id* n'est jamais changé. Si les " +"attributs utilisés par la méthode sont susceptibles d'être modifiés, " +"``cached_property`` ne peut pas fonctionner car elle ne peut pas détecter " +"les mutations pour invalider le cache." + +#: faq/programming.rst:2006 +msgid "" +"The *lru_cache* approach can be made to work, but the class needs to define " +"the *__eq__* and *__hash__* methods so the cache can detect relevant " +"attribute updates::" +msgstr "" +"En revanche, ``lru_cache`` est utilisable à condition de définir les " +"méthodes ``__eq__`` et ``__hash__`` pour que le cache soit à même de " +"détecter toute modification des attributs ::" + +#: faq/programming.rst:2032 +msgid "Modules" +msgstr "Modules" + +#: faq/programming.rst:2035 +msgid "How do I create a .pyc file?" +msgstr "Comment créer des fichiers ``.pyc`` ?" + +#: faq/programming.rst:2037 +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 " +"containing the compiled code should be created in a ``__pycache__`` " +"subdirectory of the directory containing the ``.py`` file. The ``.pyc`` " +"file will have a filename that starts with the same name as the ``.py`` " +"file, and ends with ``.pyc``, with a middle component that depends on the " +"particular ``python`` binary that created it. (See :pep:`3147` for details.)" +msgstr "" +"Quand un module est importé pour la première fois (ou si le fichier source a " +"été modifié depuis la création du fichier compilé), un fichier ``.pyc`` " +"contenant le code précompilé est créé dans un sous-dossier ``__pycache__`` " +"du dossier contentant le fichier ``.py``. Le nom du fichier ``.pyc`` est " +"identique au fichier ``.py`` et se termine par ``.pyc``, avec une partie " +"centrale qui dépend du binaire ``python`` qui l'a créé (voir la :pep:`3147` " +"pour de plus amples précisions)." + +#: faq/programming.rst:2045 +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 " +"``__pycache__`` subdirectory cannot be created. This can happen, for " +"example, if you develop as one user but run as another, such as if you are " +"testing with a web server." +msgstr "" +"Une des raisons pour lesquelles un fichier ``.pyc`` peut ne pas être créé " +"est un problème de droits sur le dossier qui contient le fichier source, ce " +"qui veut dire qu'il est impossible de créer le sous-dossier ``__pycache__``. " +"Ceci peut arriver, par exemple, si vous développez en tant qu'un certain " +"utilisateur, mais que le code est exécuté en tant qu'un autre utilisateur, " +"par exemple pour tester un serveur Web." + +#: faq/programming.rst:2050 +msgid "" +"Unless the :envvar:`PYTHONDONTWRITEBYTECODE` environment variable is set, " +"creation of a .pyc file is automatic if you're importing a module and Python " +"has the ability (permissions, free space, etc...) to create a " +"``__pycache__`` subdirectory and write the compiled module to that " +"subdirectory." +msgstr "" +"La création du fichier ``.pyc`` est automatique durant l'importation d'un " +"module si Python est capable (en termes de droits, d'espace disque, etc) de " +"créer un sous-dossier ``__pycache__`` et d'écrire le module ainsi compilé " +"dans ce sous-répertoire, à moins que la variable d'environnement :envvar:" +"`PYTHONDONTWRITEBYTECODE` soit définie." + +#: faq/programming.rst:2055 +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." +"py`` that imports another module ``xyz.py``, when you run ``foo`` (by typing " +"``python foo.py`` as a shell command), a ``.pyc`` will be created for " +"``xyz`` because ``xyz`` is imported, but no ``.pyc`` file will be created " +"for ``foo`` since ``foo.py`` isn't being imported." +msgstr "" +"Exécuter du Python dans un script de plus haut niveau n'est pas considéré " +"comme une importation et le fichier ``.pyc`` n'est pas créé. Par exemple, si " +"un module de plus haut niveau ``foo.py`` importe un autre module ``xyz.py``, " +"alors à l'exécution de ``foo`` (en tapant ``python foo.py`` dans la " +"console), un fichier ``.pyc`` est créé pour ``xyz`` mais pas pour ``foo`` " +"car ``foo.py`` n'est pas importé." + +#: faq/programming.rst:2062 +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:" +"`py_compile` and :mod:`compileall` modules." +msgstr "" +"Pour créer un fichier ``.pyc`` pour ``foo`` — c'est-à-dire créer un fichier " +"``.pyc`` pour un module qui n'est pas importé — il existe les modules :mod:" +"`py_compile` et :mod:`compileall`." + +#: faq/programming.rst:2066 +msgid "" +"The :mod:`py_compile` module can manually compile any module. One way is to " +"use the ``compile()`` function in that module interactively::" +msgstr "" +"Le module :mod:`py_compile` peut compiler n'importe quel module " +"manuellement. Il est ainsi possible d'appeler la fonction ``compile()`` de " +"manière interactive ::" + +#: faq/programming.rst:2072 +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 " +"``cfile``)." +msgstr "" +"Ces lignes écrivent le ``.pyc`` dans un sous-dossier ``__pycache__`` à côté " +"de ``foo.py`` (le paramètre optionnel ``cfile`` permet de changer ce " +"comportement)." + +#: faq/programming.rst:2076 +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 " +"running ``compileall.py`` and providing the path of a directory containing " +"Python files to compile::" +msgstr "" +"Tous les fichiers d'un ou plusieurs dossiers peuvent aussi être compilés " +"avec le module :mod:`compileall`. C'est possible depuis l'invite de commande " +"en exécutant ``compileall.py`` avec le chemin du dossier contenant les " +"fichiers Python à compiler ::" + +#: faq/programming.rst:2085 +msgid "How do I find the current module name?" +msgstr "Comment obtenir le nom du module actuel ?" + +#: faq/programming.rst:2087 +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 " +"program is running as a script. Many modules that are usually used by " +"importing them also provide a command-line interface or a self-test, and " +"only execute this code after checking ``__name__``::" +msgstr "" +"Un module peut déterminer son propre nom en examinant la variable globale " +"prédéfinie ``__name__``. Si celle-ci vaut ``'__main__'``, c'est que le " +"programme est exécuté comme un script. Beaucoup de modules qui doivent " +"normalement être importés pour pouvoir être utilisés fournissent aussi une " +"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:2102 +msgid "How can I have modules that mutually import each other?" +msgstr "Comment avoir des modules qui s'importent mutuellement ?" + +#: faq/programming.rst:2104 +msgid "Suppose you have the following modules:" +msgstr "Considérons les modules suivants :" + +#: faq/programming.rst:2106 +msgid ":file:`foo.py`::" +msgstr ":file:`foo.py` ::" + +#: faq/programming.rst:2111 +msgid ":file:`bar.py`::" +msgstr ":file:`bar.py` ::" + +#: faq/programming.rst:2116 +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:2118 +msgid "main imports ``foo``" +msgstr "*main* importe *foo* ;" + +#: faq/programming.rst:2119 +msgid "Empty globals for ``foo`` are created" +msgstr "Les variables globales (vides) de *foo* sont créées ;" + +#: faq/programming.rst:2120 +msgid "``foo`` is compiled and starts executing" +msgstr "*foo* est compilé et commence à s'exécuter ;" + +#: faq/programming.rst:2121 +msgid "``foo`` imports ``bar``" +msgstr "*foo* importe *bar* ;" + +#: faq/programming.rst:2122 +msgid "Empty globals for ``bar`` are created" +msgstr "Les variables globales (vides) de *bar* sont créées ;" + +#: faq/programming.rst:2123 +msgid "``bar`` is compiled and starts executing" +msgstr "*bar* est compilé et commence à s'exécuter ;" + +#: faq/programming.rst:2124 +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:2125 +msgid "" +"The import mechanism tries to read ``foo_var`` from ``foo`` globals, to set " +"``bar.foo_var = foo.foo_var``" +msgstr "" +"La mécanique des importations tente de lire *foo_var* dans les variables " +"globales de *foo* pour procéder à l'affectation ``bar.foo_var = foo." +"foo_var``." + +#: faq/programming.rst:2127 +msgid "" +"The last step fails, because Python isn't done with interpreting ``foo`` yet " +"and the global symbol dictionary for ``foo`` is still empty." +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:2130 +msgid "" +"The same thing happens when you use ``import foo``, and then try to access " +"``foo.foo_var`` in global code." +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:2133 +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:2135 +msgid "" +"Guido van Rossum recommends avoiding all uses of ``from import ..." +"``, and placing all code inside functions. Initializations of global " +"variables and class variables should use constants or built-in functions " +"only. This means everything from an imported module is referenced as " +"``.``." +msgstr "" +"Guido van Rossum déconseille d'utiliser ``from import ...`` et de " +"mettre tout le code dans des fonctions. L'initialisation des variables " +"globales et des variables de classe ne doit utiliser que des constantes ou " +"des fonctions natives. Ceci implique que tout ce qui est fourni par un " +"module soit référencé par ``.``." + +#: faq/programming.rst:2140 +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:2142 +msgid "" +"exports (globals, functions, and classes that don't need imported base " +"classes)" +msgstr "" +"les exportations (variables globales, fonctions et les classes qui ne " +"nécessitent d'importer des classes de base)" + +#: faq/programming.rst:2144 +msgid "``import`` statements" +msgstr "les instructions ``import``" + +#: faq/programming.rst:2145 +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:2147 +msgid "" +"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:2150 +msgid "" +"Matthias Urlichs recommends restructuring your code so that the recursive " +"import is not necessary in the first place." +msgstr "" +"Matthias Urlichs conseille de restructurer le code pour éviter les " +"importations récursives." + +#: faq/programming.rst:2153 +msgid "These solutions are not mutually exclusive." +msgstr "Ces solutions peuvent être combinées." + +#: faq/programming.rst:2157 +msgid "__import__('x.y.z') returns ; how do I get z?" +msgstr "" +"``__import__('x.y.z')`` renvoie ```` ; comment accéder à ``z`` ?" + +#: faq/programming.rst:2159 +msgid "" +"Consider using the convenience function :func:`~importlib.import_module` " +"from :mod:`importlib` instead::" +msgstr "" +"Utilisez plutôt la fonction :func:`~importlib.import_module` de :mod:" +"`importlib` ::" + +#: faq/programming.rst:2166 +msgid "" +"When I edit an imported module and reimport it, the changes don't show up. " +"Why does this happen?" +msgstr "" +"Quand j'édite un module et que je le réimporte, je ne vois pas les " +"changements. Pourquoi ?" + +#: faq/programming.rst:2168 +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 " +"program consisting of many modules where each one imports the same basic " +"module, the basic module would be parsed and re-parsed many times. To force " +"re-reading of a changed module, do this::" +msgstr "" +"Pour des raisons de performance et de cohérence, Python ne lit le fichier " +"d'un module que la première fois où celui-ci est importé. Si ce n'était pas " +"le cas, dans un programme composé d'un très grand nombre de modules qui " +"importent tous le même module de base, ce module de base serait analysé et " +"ré-analysé un très grand nombre de fois. Pour forcer la relecture d'un " +"module, il faut faire ::" + +#: faq/programming.rst:2178 +msgid "" +"Warning: this technique is not 100% fool-proof. In particular, modules " +"containing statements like ::" +msgstr "" +"Attention, cette technique ne marche pas systématiquement. En particulier, " +"les modules qui contiennent des instructions comme ::" + +#: faq/programming.rst:2183 +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 " +"updated to use the new class definition. This can result in the following " +"paradoxical behaviour::" +msgstr "" +"continuent de fonctionner avec l'ancienne version des objets importés. Si le " +"module contient une définition de classe, les instances déjà existantes de " +"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:2196 +msgid "" +"The nature of the problem is made clear if you print out the \"identity\" of " +"the class objects::" +msgstr "" +"La nature du problème apparaît clairement en affichant « l'identité » des " +"objets de la classe ::" + +#~ 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 " +#~ "``meth()`` defined in ``Base`` (or one of ``Base``'s base classes) as " +#~ "``Base.meth(self, arguments...)``. Here, ``Base.meth`` is an unbound " +#~ "method, so you need to provide the ``self`` argument." +#~ msgstr "" +#~ "Pour les versions antérieures à 3.0, vous pouvez utiliser des classes " +#~ "classiques : pour une définition de classe comme ``class " +#~ "Derived(Base): ...`` vous pouvez appeler la méthode ``meth()`` définie " +#~ "dans ``Base`` (ou l'une des classes de base de ``Base``) en faisant " +#~ "``Base.meth(self, arguments...)``. Ici, ``Base.meth`` est une méthode non " +#~ "liée, il faut donc fournir l'argument ``self``." + +#~ msgid "bar.foo_var = foo.foo_var" +#~ msgstr "bar.foo_var = foo.foo_var" + +#, 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 " +#~ "string that resulted in an arbitrary function being executed." +#~ msgstr "" +#~ "Note : utiliser :func:`eval` est lent est dangereux. Si vous n'avez pas " +#~ "un contrôle absolu sur le contenu de la chaîne de caractères, quelqu'un " +#~ "pourrait passer une chaîne de caractères pouvant appeler n'importe quelle " +#~ "fonction." + +#~ msgid "With Python 2.3, you can use an extended slice syntax::" +#~ msgstr "" +#~ "Avec Python 2.3 vous pouvez utiliser la syntaxe étendue de tranches ::" + +#~ msgid "An alternative for the last step is::" +#~ msgstr "Vous pouvez remplacer la dernière étape par ::" + +#~ msgid "" +#~ "If you find this more legible, you might prefer to use this instead of " +#~ "the final list comprehension. However, it is almost twice as slow for " +#~ "long lists. Why? First, the ``append()`` operation has to reallocate " +#~ "memory, and while it uses some tricks to avoid doing that each time, it " +#~ "still has to do it occasionally, and that costs quite a bit. Second, the " +#~ "expression \"result.append\" requires an extra attribute lookup, and " +#~ "third, there's a speed reduction from having to make all those function " +#~ "calls." +#~ msgstr "" +#~ "Si cela vous semble plus lisible, vous pouvez utiliser cette forme plutôt " +#~ "qu'une liste en compréhension. Toutefois, ce code est presque deux fois " +#~ "plus lent pour une liste de grande taille. Pourquoi ? Tout d'abord, parce " +#~ "que ``append()`` doit ré-allouer de la mémoire et, même si elle utilise " +#~ "quelques astuces pour éviter d'effectuer la ré-allocation à chaque appel, " +#~ "elle doit tout de même le faire de temps en temps, ce qui coûte assez " +#~ "cher. Deuxièmement, parce que l'expression ``result.append`` fait un " +#~ "accès supplémentaire à un attribut et, enfin, parce que tous ces appels " +#~ "de fonctions réduisent la vitesse d'exécution." + +#~ msgid "" +#~ "`Boa Constructor `_ is an IDE " +#~ "and GUI builder that uses wxWidgets. It offers visual frame creation and " +#~ "manipulation, an object inspector, many views on the source like object " +#~ "browsers, inheritance hierarchies, doc string generated html " +#~ "documentation, an advanced debugger, integrated help, and Zope support." +#~ msgstr "" +#~ "`Boa Constructor `_ est un EDI " +#~ "et un constructeur d'interface homme-machine basé sur *wxWidgets*. Il " +#~ "propose la création et la manipulation de fenêtres, un inspecteur " +#~ "d'objets, de nombreuses façons de visualiser des sources comme un " +#~ "navigateur d'objets, les hiérarchies d'héritage, la documentation html " +#~ "générée par les docstrings, un débogueur avancé, une aide intégrée et la " +#~ "prise en charge de Zope." + +#~ msgid "" +#~ "PyChecker is a static analysis tool that finds bugs in Python source code " +#~ "and warns about code complexity and style. You can get PyChecker from " +#~ "http://pychecker.sourceforge.net/" +#~ msgstr "" +#~ "*PyChecker* est un outil d'analyse statique qui trouve les bogues dans le " +#~ "code source Python et émet des avertissements relatifs à la complexité et " +#~ "au style du code. *PyChecker* est disponible sur http://pychecker." +#~ "sourceforge.net/." + +#~ msgid "" +#~ "`Pylint `_ is another tool that checks if a " +#~ "module satisfies a coding standard, and also makes it possible to write " +#~ "plug-ins to add a custom feature. In addition to the bug checking that " +#~ "PyChecker performs, Pylint offers some additional features such as " +#~ "checking line length, whether variable names are well-formed according to " +#~ "your coding standard, whether declared interfaces are fully implemented, " +#~ "and more. https://docs.pylint.org/ provides a full list of Pylint's " +#~ "features." +#~ msgstr "" +#~ "Pylint `_ est un autre outil qui vérifie si un " +#~ "module satisfait aux normes de développement, et qui permet en plus " +#~ "d'écrire des greffons pour ajouter des fonctionnalités personnalisées. " +#~ "En plus de la vérification des bogues effectuée par PyChecker, Pylint " +#~ "effectue quelques vérifications supplémentaires comme la longueur des " +#~ "lignes, les conventions de nommage des variables, que les interfaces " +#~ "déclarées sont implémentées en totalité, et plus encore. https://docs." +#~ "pylint.org/ fournit la liste complète des fonctionnalités de Pylint." diff --git a/faq/windows.po b/faq/windows.po new file mode 100644 index 0000000000..3a7b71674e --- /dev/null +++ b/faq/windows.po @@ -0,0 +1,553 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-22 22:57+0100\n" +"PO-Revision-Date: 2022-05-27 12:17+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 3.0.1\n" + +#: faq/windows.rst:9 +msgid "Python on Windows FAQ" +msgstr "FAQ : Python et Windows" + +#: faq/windows.rst:12 +msgid "Contents" +msgstr "Sommaire" + +#: faq/windows.rst:22 +msgid "How do I run a Python program under Windows?" +msgstr "Comment exécuter un programme Python sous Windows ?" + +#: faq/windows.rst:24 +msgid "" +"This is not necessarily a straightforward question. If you are already " +"familiar with running programs from the Windows command line then everything " +"will seem obvious; otherwise, you might need a little more guidance." +msgstr "" +"Ce n'est pas forcément une question simple. Si vous êtes déjà familier avec " +"le lancement de programmes depuis la ligne de commande de Windows alors tout " +"semblera évident ; sinon, vous pourriez avoir besoin d'être un peu guidé." + +#: faq/windows.rst:28 +msgid "" +"Unless you use some sort of integrated development environment, you will end " +"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 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 "" +"The letter may be different, and there might be other things after it, so " +"you might just as easily see something like:" +msgstr "" +"La lettre peut être différente, et il peut y avoir d'autres choses à la " +"suite, alors il se peut que ça ressemble également à ça :" + +#: faq/windows.rst:46 +msgid "" +"depending on how your computer has been set up and what else you have " +"recently done with it. Once you have started such a window, you are well on " +"the way to running Python programs." +msgstr "" +"selon la configuration de votre ordinateur et ce que vous avez récemment " +"fait avec. Une fois que vous avez ouvert cette fenêtre, vous êtes bien " +"partis pour pouvoir lancer des programmes Python." + +#: faq/windows.rst:50 +msgid "" +"You need to realize that your Python scripts have to be processed by another " +"program called the Python *interpreter*. The interpreter reads your script, " +"compiles it into bytecodes, and then executes the bytecodes to run your " +"program. So, how do you arrange for the interpreter to handle your Python?" +msgstr "" +"Retenez que vos scripts Python doivent être traités par un autre programme " +"appelé \"l’interpréteur\" Python. L’interpréteur lit votre script, le " +"compile en *bytecode*, et exécute le *bytecode* pour faire tourner votre " +"programme. Alors, comment faire pour donner votre code Python à " +"l'interpréteur ?" + +#: faq/windows.rst:55 +msgid "" +"First, you need to make sure that your command window recognises the word " +"\"py\" as an instruction to start the interpreter. If you have opened a " +"command window, you should try entering the command ``py`` and hitting " +"return:" +msgstr "" +"Tout d'abord, vous devez vous assurer que votre fenêtre d'invite de commande " +"reconnaît le mot \"python\" comme une instruction pour démarrer " +"l'interpréteur. Si vous avez ouvert une invite de commande, entrez la " +"commande ``py``, puis appuyez sur entrée :" + +#: faq/windows.rst:64 +msgid "You should then see something like:" +msgstr "Vous devez voir quelque chose comme ça :" + +#: faq/windows.rst:72 +msgid "" +"You have started the interpreter in \"interactive mode\". That means you can " +"enter Python statements or expressions interactively and have them executed " +"or evaluated while you wait. This is one of Python's strongest features. " +"Check it by entering a few expressions of your choice and seeing the results:" +msgstr "" +"Vous avez lancé l'interpréteur dans son \"mode interactif\". Cela signifie " +"que vous pouvez entrer des instructions ou des expressions Python de manière " +"interactive pour qu'elles soient exécutées. Il s'agit là d'une des plus " +"puissantes fonctionnalités de Python. Vous pouvez le vérifier en entrant " +"quelques commandes de votre choix et en regardant le résultat :" + +#: faq/windows.rst:84 +msgid "" +"Many people use the interactive mode as a convenient yet highly programmable " +"calculator. When you want to end your interactive Python session, call the :" +"func:`exit` function or hold the :kbd:`Ctrl` key down while you enter a :kbd:" +"`Z`, then hit the \":kbd:`Enter`\" key to get back to your Windows command " +"prompt." +msgstr "" +"Beaucoup de gens utilisent le mode interactif comme une calculatrice " +"pratique mais néanmoins hautement programmable. Lorsque vous souhaitez " +"mettre fin à votre session Python interactive, appelez la fonction :func:" +"`exit` ou maintenez la touche :kbd:`Ctrl` enfoncée pendant que vous entrez " +"un :kbd:`Z`, puis appuyez sur la touche \":kbd:`Enter`\" pour revenir à " +"votre invite de commande Windows." + +#: faq/windows.rst:90 +msgid "" +"You may also find that you have a Start-menu entry such as :menuselection:" +"`Start --> Programs --> Python 3.x --> Python (command line)` that results " +"in you seeing the ``>>>`` prompt in a new window. If so, the window will " +"disappear after you call the :func:`exit` function or enter the :kbd:`Ctrl-" +"Z` character; Windows is running a single \"python\" command in the window, " +"and closes it when you terminate the interpreter." +msgstr "" +"Peut-être avez-vous remarqué une nouvelle entrée dans votre menu Démarrer " +"telle que :menuselection:`Démarrer --> Programmes --> Python 3.x --> Python " +"(ligne de commande)` qui a pour résultat que vous voyez l'invite ``>>>`` " +"dans une nouvelle fenêtre. Si oui, la fenêtre va disparaître quand vous " +"appellerez la fonction :func:`exit` ou entrez le caractère :kbd:`Ctrl-Z` ; " +"Windows exécute une commande \"python\" dans la fenêtre et ferme celle-ci " +"lorsque vous fermez l'interpréteur." + +#: faq/windows.rst:97 +msgid "" +"Now that we know the ``py`` command is recognized, you can give your Python " +"script to it. You'll have to give either an absolute or a relative path to " +"the Python script. Let's say your Python script is located in your desktop " +"and is named ``hello.py``, and your command prompt is nicely opened in your " +"home directory so you're seeing something similar to::" +msgstr "" +"Maintenant que nous savons que la commande ``py`` est reconnue, vous pouvez " +"lui donner votre script Python. Vous devez donner le chemin absolu ou " +"relatif du script Python. Disons que votre script Python est situé sur votre " +"bureau et est nommé ``hello.py``, et votre invite de commande est bien " +"ouvert dans votre répertoire d’accueil, alors vous voyez quelque chose " +"comme ::" + +#: faq/windows.rst:106 +msgid "" +"So now you'll ask the ``py`` command to give your script to Python by typing " +"``py`` followed by your script path::" +msgstr "" +"Alors maintenant, vous demanderez à la commande ``py`` de donner votre " +"script à Python en tapant ``py`` suivi de votre chemin de script ::" + +#: faq/windows.rst:114 +msgid "How do I make Python scripts executable?" +msgstr "Comment rendre des scripts Python exécutables ?" + +#: faq/windows.rst:116 +msgid "" +"On Windows, the standard Python installer already associates the .py " +"extension with a file type (Python.File) and gives that file type an open " +"command that runs the interpreter (``D:\\Program Files\\Python\\python.exe " +"\"%1\" %*``). This is enough to make scripts executable from the command " +"prompt as 'foo.py'. If you'd rather be able to execute the script by simple " +"typing 'foo' with no extension you need to add .py to the PATHEXT " +"environment variable." +msgstr "" +"Sous Windows, l'installateur Python associe l'extension *.py* avec un type " +"de fichier (Python.File) et une commande qui lance l’interpréteur (``D:" +"\\Program Files\\Python\\python.exe \"%1\" %*``). Cela suffit pour pouvoir " +"exécuter les scripts Python depuis la ligne de commande en saisissant *foo." +"py*. Si vous souhaitez pouvoir exécuter les scripts en saisissant simplement " +"*foo* sans l’extension, vous devez ajouter *.py* au paramètre " +"d’environnement PATHEXT." + +#: faq/windows.rst:124 +msgid "Why does Python sometimes take so long to start?" +msgstr "Pourquoi Python met-il du temps à démarrer ?" + +#: faq/windows.rst:126 +msgid "" +"Usually Python starts very quickly on Windows, but occasionally there are " +"bug reports that Python suddenly begins to take a long time to start up. " +"This is made even more puzzling because Python will work fine on other " +"Windows systems which appear to be configured identically." +msgstr "" +"Normalement, sous Windows, Python se lance très rapidement, mais parfois des " +"rapports d'erreurs indiquent que Python commence soudain à prendre beaucoup " +"de temps pour démarrer. C'est d'autant plus intrigant que Python fonctionne " +"correctement avec d'autres Windows configurés de façon similaire." + +#: faq/windows.rst:131 +msgid "" +"The problem may be caused by a misconfiguration of virus checking software " +"on the problem machine. Some virus scanners have been known to introduce " +"startup overhead of two orders of magnitude when the scanner is configured " +"to monitor all reads from the filesystem. Try checking the configuration of " +"virus scanning software on your systems to ensure that they are indeed " +"configured identically. McAfee, when configured to scan all file system read " +"activity, is a particular offender." +msgstr "" +"Le problème peut venir d'un antivirus mal configuré. Certains antivirus sont " +"connus pour doubler le temps de démarrage lorsqu'ils sont configurés pour " +"surveiller toutes les lectures du système de fichiers. Essayez de regarder " +"si les antivirus des deux machines sont bien paramétrés à l'identique. " +"*McAfee* est particulièrement problématique lorsqu'il est paramétré pour " +"surveiller toutes les lectures du système de fichiers." + +#: faq/windows.rst:141 +msgid "How do I make an executable from a Python script?" +msgstr "Comment construire un exécutable depuis un script Python ?" + +#: faq/windows.rst:143 +msgid "" +"See :ref:`faq-create-standalone-binary` for a list of tools that can be used " +"to make executables." +msgstr "" +"Voir :ref:`faq-create-standalone-binary` pour une liste d'outils qui créent " +"des exécutables." + +#: 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: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 " +"can then write Python \"import foo\", and Python will search for foo.pyd (as " +"well as foo.py, foo.pyc) and if it finds it, will attempt to call " +"``PyInit_foo()`` to initialize it. You do not link your .exe with foo.lib, " +"as that would cause Windows to require the DLL to be present." +msgstr "" +"Oui, les fichiers *.pyd* sont des fichiers *dll*, mais il y a quelques " +"différences. Si vous avez une *DLL* ``foo.pyd``, celle-ci doit posséder une " +"fonction ``PyInit_foo()``. Vous pouvez alors écrire en Python « *import " +"foo* » et Python recherchera le fichier *foo.pyd* (ainsi que *foo.py* et " +"*foo.pyc*); s'il le trouve, il tentera d'appeler ``PyInit_foo()`` pour " +"l'initialiser. Ne liez pas votre *.exe* avec *foo.lib* car dans ce cas " +"Windows aura besoin de la DLL." + +#: 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 " +"present to run your program, whereas if you linked your program with a dll, " +"the dll is required. Of course, foo.pyd is required if you want to say " +"``import foo``. In a DLL, linkage is declared in the source code with " +"``__declspec(dllexport)``. In a .pyd, linkage is defined in a list of " +"available functions." +msgstr "" +"Notez que le chemin de recherche pour *foo.pyd* est *PYTHONPATH*, il est " +"différent de celui qu'utilise Windows pour rechercher *foo.dll*. De plus, " +"*foo.pyd* n'a pas besoin d'être présent pour que votre programme s'exécute " +"alors que si vous avez lié votre programme avec une *dll* celle-ci est " +"requise. Bien sûr *foo.pyd* est nécessaire si vous écrivez ``import foo``. " +"Dans une *DLL* le lien est déclaré dans le code source avec " +"``__declspec(dllexport)``. Dans un *.pyd* la liaison est définie dans une " +"liste de fonctions disponibles." + +#: 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:168 +msgid "" +"Embedding the Python interpreter in a Windows app can be summarized as " +"follows:" +msgstr "" +"L'intégration de l'interpréteur Python dans une application Windows peut se " +"résumer comme suit :" + +#: faq/windows.rst:170 +#, fuzzy +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 the first key undocumented fact.) Instead, link to :file:`python{NN}." +"dll`; it is typically installed in ``C:\\Windows\\System``. *NN* is the " +"Python version, a number such as \"33\" for Python 3.3." +msgstr "" +"Ne compilez **pas** Python directement dans votre fichier *.exe*. Sous " +"Windows, Python doit être une DLL pour pouvoir importer des modules qui sont " +"eux-mêmes des DLL (ceci constitue une information de première importance non " +"documentée). Au lieu de cela faites un lien vers :file:`python{NN}.dll` qui " +"est généralement placé dans ``C:\\Windows\\System``. *NN* étant la version " +"Python, par exemple « 33 » pour Python 3.3." + +#: 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 " +"against :file:`python{NN}.dll`. (General note: :file:`python{NN}.lib` is " +"the so-called \"import lib\" corresponding to :file:`python{NN}.dll`. It " +"merely defines symbols for the linker.)" +msgstr "" +"Vous pouvez créer un lien vers Python de deux manières différentes. Un lien " +"au moment du chargement signifie pointer vers :file:`python{NN}.lib`, tandis " +"qu'un lien au moment de l'exécution signifie pointer vers :file:`python{NN}." +"dll`. (Note générale : :file:`python{NN}.lib` est le soi-disant « *import " +"lib* » correspondant à :file:`python{NN}.dll`. Il définit simplement des " +"liens symboliques pour l'éditeur de liens.)" + +#: 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 " +"``LoadLibraryEx()`` routine. The code must also use access routines and " +"data in :file:`python{NN}.dll` (that is, Python's C API's) using pointers " +"obtained by the Windows ``GetProcAddress()`` routine. Macros can make using " +"these pointers transparent to any C code that calls routines in Python's C " +"API." +msgstr "" +"La liaison en temps réel simplifie grandement les options de liaison ; tout " +"se passe au moment de l'exécution. Votre code doit charger :file:" +"`python{NN}.dll` en utilisant la routine Windows ``LoadLibraryEx()``. Le " +"code doit aussi utiliser des routines d'accès et des données dans :file:" +"`python{NN}.dll` (c'est-à-dire les API C de Python) en utilisant des " +"pointeurs obtenus par la routine Windows ``GetProcAddress()``. Les macros " +"peuvent rendre l'utilisation de ces pointeurs transparente à tout code C qui " +"appelle des routines dans l'API C de Python." + +#: faq/windows.rst:191 +#, fuzzy +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 " +"just about all the grungy details for you. The result is C code that you " +"link *into* your .exe file (!) You do **not** have to create a DLL file, " +"and this also simplifies linking." +msgstr "" +"Si vous utilisez SWIG, il est facile de créer un « module d'extension » " +"Python qui rendra les données et les méthodes de l'application disponibles " +"pour Python. SWIG s'occupera de tous les détails ennuyeux pour vous. Le " +"résultat est du code C que vous liez *dans* votre *fichier.exe* (!) Vous " +"n'avez **pas** besoin de créer un fichier DLL, et cela simplifie également " +"la liaison." + +#: 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 " +"leo, the init function will be called initleo(). If you use SWIG shadow " +"classes, as you should, the init function will be called initleoc(). This " +"initializes a mostly hidden helper class used by the shadow class." +msgstr "" +"SWIG va créer une fonction d'initialisation (fonction en C) dont le nom " +"dépend du nom du module d'extension. Par exemple, si le nom du module est " +"*leo*, la fonction *init* sera appelée *initleo()*. Si vous utilisez des " +"classes *shadow* SWIG, comme vous le devriez, la fonction *init* sera " +"appelée *initleoc()*. Ceci initialise une classe auxiliaire invisible " +"utilisée par la classe *shadow*." + +#: 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 " +"into Python! (This is the second key undocumented fact.)" +msgstr "" +"La raison pour laquelle vous pouvez lier le code C à l'étape 2 dans votre " +"*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:207 +msgid "" +"In short, you can use the following code to initialize the Python " +"interpreter with your extension module." +msgstr "" +"En bref, vous pouvez utiliser le code suivant pour initialiser " +"l'interpréteur Python avec votre module d'extension." + +#: 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." +msgstr "" +"Il y a deux problèmes avec l'API C de Python qui apparaîtront si vous " +"utilisez un compilateur autre que MSVC, le compilateur utilisé pour " +"construire *pythonNN.dll*." + +#: faq/windows.rst:221 +#, fuzzy +msgid "" +"Problem 1: The so-called \"Very High Level\" functions that take ``FILE *`` " +"arguments will not work in a multi-compiler environment because each " +"compiler's notion of a ``struct FILE`` will be different. From an " +"implementation standpoint these are very low level functions." +msgstr "" +"Problème 1 : Les fonctions dites de \"Très Haut Niveau\" qui prennent les " +"arguments FILE * ne fonctionneront pas dans un environnement multi-" +"compilateur car chaque compilateur aura une notion différente de la " +"structure de FILE. Du point de vue de l'implémentation, il s'agit de " +"fonctions de très bas niveau." + +#: faq/windows.rst:226 +msgid "" +"Problem 2: SWIG generates the following code when generating wrappers to " +"void functions:" +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: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 " +"fail in a mult-compiler environment. Replace such code by:" +msgstr "" +"Hélas, *Py_None* est une macro qui se développe en référence à une structure " +"de données complexe appelée *_Py_NoneStruct* dans *pythonNN.dll*. Encore " +"une fois, ce code échouera dans un environnement multi-compilateur. " +"Remplacez ce code par :" + +#: 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 " +"complete SWIG newbie)." +msgstr "" +"Il est possible d'utiliser la commande ``%typemap`` de SWIG pour effectuer " +"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: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 " +"independent of your app's windowing system. Rather, you (or the " +"wxPythonWindow class) should create a \"native\" interpreter window. It is " +"easy to connect that window to the Python interpreter. You can redirect " +"Python's i/o to _any_ object that supports read and write, so all you need " +"is a Python object (defined in your extension module) that contains read() " +"and write() methods." +msgstr "" +"Utiliser un script shell Python pour créer une fenêtre d'interpréteur Python " +"depuis votre application Windows n'est pas une bonne idée ; la fenêtre " +"résultante sera indépendante du système de fenêtrage de votre application. " +"Vous (ou la classe *wxPythonWindow*) devriez plutôt créer une fenêtre " +"d'interpréteur « native ». Il est facile de connecter cette fenêtre à " +"l'interpréteur Python. Vous pouvez rediriger l'entrée/sortie de Python vers " +"*n'importe quel* objet qui supporte la lecture et l'écriture, donc tout ce " +"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: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: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 " +"python-mode default." +msgstr "" +"La FAQ ne recommande pas l'utilisation des indentations et le guide " +"stylistique de Python, la :pep:`8`, recommande l'utilisation de 4 espaces " +"dans les codes Python. C'est aussi le comportement par défaut d'Emacs avec " +"Python." + +#: 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 :" +"menuselection:`Tools --> Options --> Tabs`, and for file type \"Default\" " +"set \"Tab size\" and \"Indent size\" to 4, and select the \"Insert spaces\" " +"radio button." +msgstr "" +"Quel que soit votre éditeur, mélanger des tabulations et des espaces est une " +"mauvaise idée. *Visual C++*, par exemple, peut être facilement configuré " +"pour utiliser des espaces : allez dans :menuselection:`Tools --> Options --> " +"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: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:" +"`tabnanny` module to check a directory tree in batch mode." +msgstr "" +"Python va lever :exc:`IndentationError` ou :exc:`TabError` si un mélange de " +"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: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: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 " +"hit is present, and ``getch()`` which gets one character without echoing it." +msgstr "" +"Utilisez le module :mod:`msvcrt`. C'est une extension standard spécifique à " +"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." + +#: faq/windows.rst:281 +msgid "How do I solve the missing api-ms-win-crt-runtime-l1-1-0.dll error?" +msgstr "" + +#: faq/windows.rst:283 +msgid "" +"This can occur on Python 3.5 and later when using Windows 8.1 or earlier " +"without all updates having been installed. First ensure your operating " +"system is supported and is up to date, and if that does not resolve the " +"issue, visit the `Microsoft support page `_ for guidance on manually installing the C Runtime update." +msgstr "" + +#~ 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 new file mode 100644 index 0000000000..5d364a966f --- /dev/null +++ b/glossary.po @@ -0,0 +1,3005 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-22 22:57+0100\n" +"PO-Revision-Date: 2022-05-18 13:31+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 3.0.1\n" + +#: glossary.rst:5 +msgid "Glossary" +msgstr "Glossaire" + +#: glossary.rst:10 +msgid "``>>>``" +msgstr "``>>>``" + +#: glossary.rst:12 +msgid "" +"The default Python prompt of the interactive shell. Often seen for code " +"examples which can be executed interactively in the interpreter." +msgstr "" +"L'invite de commande utilisée par défaut dans l'interpréteur interactif. On " +"la voit souvent dans des exemples de code qui peuvent être exécutés " +"interactivement dans l'interpréteur." + +#: glossary.rst:14 +msgid "``...``" +msgstr "``...``" + +#: glossary.rst:16 +msgid "Can refer to:" +msgstr "Peut faire référence à :" + +#: glossary.rst:18 +msgid "" +"The default Python prompt of the interactive shell when entering the code " +"for an indented code block, when within a pair of matching left and right " +"delimiters (parentheses, square brackets, curly braces or triple quotes), or " +"after specifying a decorator." +msgstr "" +"L'invite de commande utilisée par défaut dans l'interpréteur interactif " +"lorsqu'on entre un bloc de code indenté, dans des délimiteurs fonctionnant " +"par paires (parenthèses, crochets, accolades, triple guillemets), ou après " +"un avoir spécifié un décorateur." + +#: glossary.rst:23 +msgid "The :const:`Ellipsis` built-in constant." +msgstr "La constante :const:`Ellipsis`." + +#: glossary.rst:24 +msgid "2to3" +msgstr "2to3" + +#: glossary.rst:26 +msgid "" +"A tool that tries to convert Python 2.x code to Python 3.x code by handling " +"most of the incompatibilities which can be detected by parsing the source " +"and traversing the parse tree." +msgstr "" +"Outil qui essaie de convertir du code pour Python 2.x en code pour Python 3." +"x en gérant la plupart des incompatibilités qui peuvent être détectées en " +"analysant la source et parcourant son arbre syntaxique." + +#: glossary.rst:30 +msgid "" +"2to3 is available in the standard library as :mod:`lib2to3`; a standalone " +"entry point is provided as :file:`Tools/scripts/2to3`. See :ref:`2to3-" +"reference`." +msgstr "" +"*2to3* est disponible dans la bibliothèque standard sous le nom de :mod:" +"`lib2to3` ; un point d’entrée indépendant est fourni via :file:`Tools/" +"scripts/2to3`. Cf. :ref:`2to3-reference`." + +#: glossary.rst:33 +msgid "abstract base class" +msgstr "classe de base abstraite" + +#: glossary.rst:35 +msgid "" +"Abstract base classes complement :term:`duck-typing` by providing a way to " +"define interfaces when other techniques like :func:`hasattr` would be clumsy " +"or subtly wrong (for example with :ref:`magic methods `). " +"ABCs introduce virtual subclasses, which are classes that don't inherit from " +"a class but are still recognized by :func:`isinstance` and :func:" +"`issubclass`; see the :mod:`abc` module documentation. Python comes with " +"many built-in ABCs for data structures (in the :mod:`collections.abc` " +"module), numbers (in the :mod:`numbers` module), streams (in the :mod:`io` " +"module), import finders and loaders (in the :mod:`importlib.abc` module). " +"You can create your own ABCs with the :mod:`abc` module." +msgstr "" +"Les classes de base abstraites (ABC, suivant l'abréviation anglaise " +"*Abstract Base Class*) complètent le :term:`duck-typing` en fournissant un " +"moyen de définir des interfaces pour les cas où d'autres techniques comme :" +"func:`hasattr` seraient inélégantes ou subtilement fausses (par exemple avec " +"les :ref:`méthodes magiques `). Les ABC introduisent des " +"sous-classes virtuelles qui n'héritent pas d'une classe mais qui sont quand " +"même reconnues par :func:`isinstance` ou :func:`issubclass` (voir la " +"documentation du module :mod:`abc`). Python contient de nombreuses ABC pour " +"les structures de données (dans le module :mod:`collections.abc`), les " +"nombres (dans le module :mod:`numbers`), les flux (dans le module :mod:`io`) " +"et les chercheurs-chargeurs du système d'importation (dans le module :mod:" +"`importlib.abc`). Vous pouvez créer vos propres ABC avec le module :mod:" +"`abc`." + +#: glossary.rst:46 +msgid "annotation" +msgstr "annotation" + +#: glossary.rst:48 +msgid "" +"A label associated with a variable, a class attribute or a function " +"parameter or return value, used by convention as a :term:`type hint`." +msgstr "" +"Étiquette associée à une variable, un attribut de classe, un paramètre de " +"fonction ou une valeur de retour. Elle est utilisée par convention comme :" +"term:`type hint`." + +#: glossary.rst:52 +msgid "" +"Annotations of local variables cannot be accessed at runtime, but " +"annotations of global variables, class attributes, and functions are stored " +"in the :attr:`__annotations__` special attribute of modules, classes, and " +"functions, respectively." +msgstr "" +"Les annotations de variables locales ne sont pas accessibles au moment de " +"l'exécution, mais les annotations de variables globales, d'attributs de " +"classe et de fonctions sont stockées dans l'attribut spécial :attr:" +"`__annotations__` des modules, classes et fonctions, respectivement." + +#: glossary.rst:58 +msgid "" +"See :term:`variable annotation`, :term:`function annotation`, :pep:`484` " +"and :pep:`526`, which describe this functionality. Also see :ref:" +"`annotations-howto` for best practices on working with annotations." +msgstr "" +"Voir :term:`annotation de variable`, :term:`annotation " +"de fonction`, :pep:`484` et :pep:`526`, qui décrivent " +"cette fonctionnalité. Voir aussi :ref:`annotations-howto` sur les bonnes " +"pratiques concernant les annotations." + +#: glossary.rst:62 +msgid "argument" +msgstr "argument" + +#: glossary.rst:64 +msgid "" +"A value passed to a :term:`function` (or :term:`method`) when calling the " +"function. There are two kinds of argument:" +msgstr "" +"Valeur, donnée à une :term:`fonction` ou à une :term:`méthode` lors de son " +"appel. Il existe deux types d'arguments :" + +#: glossary.rst:67 +msgid "" +":dfn:`keyword argument`: an argument preceded by an identifier (e.g. " +"``name=``) in a function call or passed as a value in a dictionary preceded " +"by ``**``. For example, ``3`` and ``5`` are both keyword arguments in the " +"following calls to :func:`complex`::" +msgstr "" +":dfn:`argument nommé` : un argument précédé d'un identifiant (comme " +"``name=``) ou un dictionnaire précédé de ``**``, lors d'un appel de " +"fonction. Par exemple, ``3`` et ``5`` sont tous les deux des arguments " +"nommés dans l'appel à :func:`complex` ici ::" + +#: glossary.rst:75 +msgid "" +":dfn:`positional argument`: an argument that is not a keyword argument. " +"Positional arguments can appear at the beginning of an argument list and/or " +"be passed as elements of an :term:`iterable` preceded by ``*``. For example, " +"``3`` and ``5`` are both positional arguments in the following calls::" +msgstr "" +":dfn:`argument positionnel` : un argument qui n'est pas nommé. Les arguments " +"positionnels apparaissent au début de la liste des arguments, ou donnés sous " +"forme d'un :term:`itérable` précédé par ``*``. Par exemple, ``3`` et ``5`` " +"sont tous les deux des arguments positionnels dans les appels suivants ::" + +#: glossary.rst:84 +msgid "" +"Arguments are assigned to the named local variables in a function body. See " +"the :ref:`calls` section for the rules governing this assignment. " +"Syntactically, any expression can be used to represent an argument; the " +"evaluated value is assigned to the local variable." +msgstr "" +"Les arguments se retrouvent dans le corps de la fonction appelée parmi les " +"variables locales. Voir la section :ref:`calls` à propos des règles dictant " +"cette affectation. Syntaxiquement, toute expression est acceptée comme " +"argument, et c'est la valeur résultante de l'expression qui sera affectée à " +"la variable locale." + +#: glossary.rst:89 +msgid "" +"See also the :term:`parameter` glossary entry, the FAQ question on :ref:`the " +"difference between arguments and parameters `, " +"and :pep:`362`." +msgstr "" +"Voir aussi :term:`paramètre` dans le glossaire, la question :ref:" +"`Différence entre argument et paramètre ` de la " +"FAQ et la :pep:`362`." + +#: glossary.rst:92 +msgid "asynchronous context manager" +msgstr "gestionnaire de contexte asynchrone" + +#: glossary.rst:94 +msgid "" +"An object which controls the environment seen in an :keyword:`async with` " +"statement by defining :meth:`__aenter__` and :meth:`__aexit__` methods. " +"Introduced by :pep:`492`." +msgstr "" +"(*asynchronous context manager* en anglais) Objet contrôlant l'environnement " +"à l'intérieur d'une instruction :keyword:`with` en définissant les méthodes :" +"meth:`__aenter__` et :meth:`__aexit__`. A été Introduit par la :pep:`492`." + +#: glossary.rst:97 +msgid "asynchronous generator" +msgstr "générateur asynchrone" + +#: glossary.rst:99 +msgid "" +"A function which returns an :term:`asynchronous generator iterator`. It " +"looks like a coroutine function defined with :keyword:`async def` except " +"that it contains :keyword:`yield` expressions for producing a series of " +"values usable in an :keyword:`async for` loop." +msgstr "" +"Fonction qui renvoie un :term:`asynchronous generator iterator`. Cela " +"ressemble à une coroutine définie par :keyword:`async def`, sauf qu'elle " +"contient une ou des expressions :keyword:`yield` produisant ainsi uns série " +"de valeurs utilisables dans une boucle :keyword:`async for`." + +#: glossary.rst:104 +msgid "" +"Usually refers to an asynchronous generator function, but may refer to an " +"*asynchronous generator iterator* in some contexts. In cases where the " +"intended meaning isn't clear, using the full terms avoids ambiguity." +msgstr "" +"Générateur asynchrone fait généralement référence à une fonction, mais peut " +"faire référence à un *itérateur de générateur asynchrone* dans certains " +"contextes. Dans les cas où le sens voulu n'est pas clair, utiliser " +"l'ensemble des termes lève l’ambiguïté." + +#: glossary.rst:108 +msgid "" +"An asynchronous generator function may contain :keyword:`await` expressions " +"as well as :keyword:`async for`, and :keyword:`async with` statements." +msgstr "" +"Un générateur asynchrone peut contenir des expressions :keyword:`await` " +"ainsi que des instructions :keyword:`async for`, et :keyword:`async with`." + +#: glossary.rst:111 +msgid "asynchronous generator iterator" +msgstr "itérateur de générateur asynchrone" + +#: glossary.rst:113 +msgid "An object created by a :term:`asynchronous generator` function." +msgstr "Objet créé par une fonction :term:`asynchronous generator`." + +#: glossary.rst:115 +msgid "" +"This is an :term:`asynchronous iterator` which when called using the :meth:" +"`__anext__` method returns an awaitable object which will execute the body " +"of the asynchronous generator function until the next :keyword:`yield` " +"expression." +msgstr "" +"C'est un :term:`asynchronous iterator` qui, lorsqu'il est appelé via la " +"méthode :meth:`__anext__` renvoie un objet *awaitable* qui exécute le corps " +"de la fonction du générateur asynchrone jusqu'au prochain :keyword:`yield`." + +#: glossary.rst:120 +msgid "" +"Each :keyword:`yield` temporarily suspends processing, remembering the " +"location execution state (including local variables and pending try-" +"statements). When the *asynchronous generator iterator* effectively resumes " +"with another awaitable returned by :meth:`__anext__`, it picks up where it " +"left off. See :pep:`492` and :pep:`525`." +msgstr "" +"Chaque :keyword:`yield` suspend temporairement l'exécution, en gardant en " +"mémoire l'endroit et l'état de l'exécution (ce qui inclut les variables " +"locales et les *try* en cours). Lorsque l'exécution de l'itérateur de " +"générateur asynchrone reprend avec un nouvel *awaitable* renvoyé par :meth:" +"`__anext__`, elle repart de là où elle s'était arrêtée. Voir la :pep:`492` " +"et la :pep:`525`." + +#: glossary.rst:125 +msgid "asynchronous iterable" +msgstr "itérable asynchrone" + +#: glossary.rst:127 +msgid "" +"An object, that can be used in an :keyword:`async for` statement. Must " +"return an :term:`asynchronous iterator` from its :meth:`__aiter__` method. " +"Introduced by :pep:`492`." +msgstr "" +"Objet qui peut être utilisé dans une instruction :keyword:`async for`. Sa " +"méthode :meth:`__aiter__` doit renvoyer un :term:`asynchronous iterator`. A " +"été introduit par la :pep:`492`." + +#: glossary.rst:130 +msgid "asynchronous iterator" +msgstr "itérateur asynchrone" + +#: glossary.rst:132 +msgid "" +"An object that implements the :meth:`__aiter__` and :meth:`__anext__` " +"methods. ``__anext__`` must return an :term:`awaitable` object. :keyword:" +"`async for` resolves the awaitables returned by an asynchronous iterator's :" +"meth:`__anext__` method until it raises a :exc:`StopAsyncIteration` " +"exception. Introduced by :pep:`492`." +msgstr "" +"Objet qui implémente les méthodes :meth:`__aiter__` et :meth:`__anext__`. " +"``__anext__`` doit renvoyer un objet :term:`awaitable`. Tant que la méthode :" +"meth:`__anext__` produit des objets *awaitable*, le :keyword:`async for` " +"appelant les consomme. L'itérateur asynchrone lève une exception :exc:" +"`StopAsyncIteration` pour signifier la fin de l'itération. A été introduit " +"par la :pep:`492`." + +#: glossary.rst:137 +msgid "attribute" +msgstr "attribut" + +#: glossary.rst:139 +msgid "" +"A value associated with an object which is usually referenced by name using " +"dotted expressions. For example, if an object *o* has an attribute *a* it " +"would be referenced as *o.a*." +msgstr "" +"Valeur associée à un objet et habituellement désignée par son nom *via* une " +"notation utilisant des points. Par exemple, si un objet *o* possède un " +"attribut *a*, cet attribut est référencé par *o.a*." + +#: glossary.rst:144 +msgid "" +"It is possible to give an object an attribute whose name is not an " +"identifier as defined by :ref:`identifiers`, for example using :func:" +"`setattr`, if the object allows it. Such an attribute will not be accessible " +"using a dotted expression, and would instead need to be retrieved with :func:" +"`getattr`." +msgstr "" +"Il est possible de donner à un objet un attribut dont le nom n'est pas un " +"identifiant tel que défini pour les :ref:`identifiers`, par exemple en " +"utilisant :func:`setattr`, si l'objet le permet. Un tel attribut ne sera pas " +"accessible à l'aide d'une expression pointée et on devra y accéder avec :" +"func:`getattr`." + +#: glossary.rst:149 +msgid "awaitable" +msgstr "awaitable" + +#: glossary.rst:151 +msgid "" +"An object that can be used in an :keyword:`await` expression. Can be a :" +"term:`coroutine` or an object with an :meth:`__await__` method. See also :" +"pep:`492`." +msgstr "" +"Objet pouvant être utilisé dans une expression :keyword:`await`. Ce peut " +"être une :term:`coroutine` ou un objet avec une méthode :meth:`__await__`. " +"Voir aussi la :pep:`492`." + +#: glossary.rst:154 +msgid "BDFL" +msgstr "BDFL" + +#: glossary.rst:156 +msgid "" +"Benevolent Dictator For Life, a.k.a. `Guido van Rossum `_, Python's creator." +msgstr "" +"Dictateur bienveillant à vie (*Benevolent Dictator For Life* en anglais). " +"Pseudonyme de `Guido van Rossum `_, le " +"créateur de Python." + +#: glossary.rst:158 +msgid "binary file" +msgstr "fichier binaire" + +#: glossary.rst:160 +msgid "" +"A :term:`file object` able to read and write :term:`bytes-like objects " +"`. Examples of binary files are files opened in binary " +"mode (``'rb'``, ``'wb'`` or ``'rb+'``), :data:`sys.stdin.buffer`, :data:`sys." +"stdout.buffer`, and instances of :class:`io.BytesIO` and :class:`gzip." +"GzipFile`." +msgstr "" +"Un :term:`file object` capable de lire et d'écrire des :term:`bytes-like " +"objects `. Des fichiers binaires sont, par exemple, les " +"fichiers ouverts en mode binaire (``'rb'``, ``'wb'``, ou ``'rb+'``), :data:" +"`sys.stdin.buffer`, :data:`sys.stdout.buffer`, les instances de :class:`io." +"BytesIO` ou de :class:`gzip.GzipFile`." + +#: glossary.rst:167 +msgid "" +"See also :term:`text file` for a file object able to read and write :class:" +"`str` objects." +msgstr "" +"Consultez :term:`fichier texte`, un objet fichier capable de lire et " +"d'écrire des objets :class:`str`." + +#: glossary.rst:169 +msgid "borrowed reference" +msgstr "référence empruntée" + +#: glossary.rst:171 +msgid "" +"In Python's C API, a borrowed reference is a reference to an object. It does " +"not modify the object reference count. It becomes a dangling pointer if the " +"object is destroyed. For example, a garbage collection can remove the last :" +"term:`strong reference` to the object and so destroy it." +msgstr "" +"Dans l'API C de Python, une référence empruntée est une référence vers un " +"objet qui n'affecte pas son compteur de référence. Elle devient invalide si " +"l'objet est supprimé, par exemple au cours d'un passage du ramasse-miettes " +"qui conduit à la disparition de la dernière :term:`référence forte` vers " +"l'objet." + +#: glossary.rst:176 +msgid "" +"Calling :c:func:`Py_INCREF` on the :term:`borrowed reference` is recommended " +"to convert it to a :term:`strong reference` in-place, except when the object " +"cannot be destroyed before the last usage of the borrowed reference. The :c:" +"func:`Py_NewRef` function can be used to create a new :term:`strong " +"reference`." +msgstr "" +"Il est recommandé d'appeler :c:func:`Py_INCREF` sur la :term:`référence " +"empruntée`, ce qui la transforme *in situ* en une :term:`référence forte`. " +"Vous pouvez faire une exception si vous êtes certain que l'objet ne peut pas " +"être supprimé avant la dernière utilisation de la référence empruntée. Voir " +"aussi la fonction :c:func:`Py_NewRef`, qui crée une nouvelle :term:" +"`référence forte`." + +#: glossary.rst:181 +msgid "bytes-like object" +msgstr "objet octet-compatible" + +#: glossary.rst:183 +msgid "" +"An object that supports the :ref:`bufferobjects` and can export a C-:term:" +"`contiguous` buffer. This includes all :class:`bytes`, :class:`bytearray`, " +"and :class:`array.array` objects, as well as many common :class:`memoryview` " +"objects. Bytes-like objects can be used for various operations that work " +"with binary data; these include compression, saving to a binary file, and " +"sending over a socket." +msgstr "" +"Un objet gérant les :ref:`bufferobjects` et pouvant exporter un tampon " +"(*buffer* en anglais) C-:term:`contiguous`. Cela inclut les objets :class:" +"`bytes`, :class:`bytearray` et :class:`array.array`, ainsi que beaucoup " +"d'objets :class:`memoryview`. Les objets bytes-compatibles peuvent être " +"utilisés pour diverses opérations sur des données binaires, comme la " +"compression, la sauvegarde dans un fichier binaire ou l'envoi sur le réseau." + +#: glossary.rst:190 +msgid "" +"Some operations need the binary data to be mutable. The documentation often " +"refers to these as \"read-write bytes-like objects\". Example mutable " +"buffer objects include :class:`bytearray` and a :class:`memoryview` of a :" +"class:`bytearray`. Other operations require the binary data to be stored in " +"immutable objects (\"read-only bytes-like objects\"); examples of these " +"include :class:`bytes` and a :class:`memoryview` of a :class:`bytes` object." +msgstr "" +"Certaines opérations nécessitent de travailler sur des données binaires " +"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 exemple :class:`bytes` ou :class:" +"`memoryview` d'un objet :class:`byte`." + +#: glossary.rst:198 +msgid "bytecode" +msgstr "code intermédiaire (*bytecode*)" + +#: glossary.rst:200 +msgid "" +"Python source code is compiled into bytecode, the internal representation of " +"a Python program in the CPython interpreter. The bytecode is also cached in " +"``.pyc`` files so that executing the same file is faster the second time " +"(recompilation from source to bytecode can be avoided). This \"intermediate " +"language\" is said to run on a :term:`virtual machine` that executes the " +"machine code corresponding to each bytecode. Do note that bytecodes are not " +"expected to work between different Python virtual machines, nor to be stable " +"between Python releases." +msgstr "" +"Le code source, en Python, est compilé en un code intermédiaire (*bytecode* " +"en anglais), la représentation interne à CPython d'un programme Python. Le " +"code intermédiaire est mis en cache dans un fichier ``.pyc`` de manière à ce " +"qu'une seconde exécution soit plus rapide (la compilation en code " +"intermédiaire a déjà été faite). On dit que ce *langage intermédiaire* est " +"exécuté sur une :term:`virtual machine` qui exécute des instructions machine " +"pour chaque instruction du code intermédiaire. Notez que le code " +"intermédiaire n'a pas vocation à fonctionner sur différentes machines " +"virtuelles Python ou à être stable entre différentes versions de Python." + +#: glossary.rst:210 +msgid "" +"A list of bytecode instructions can be found in the documentation for :ref:" +"`the dis module `." +msgstr "" +"La documentation du :ref:`module dis ` fournit une liste des " +"instructions du code intermédiaire." + +#: glossary.rst:212 +msgid "callable" +msgstr "appelable (*callable*)" + +#: glossary.rst:214 +msgid "" +"A callable is an object that can be called, possibly with a set of arguments " +"(see :term:`argument`), with the following syntax::" +msgstr "" +"Un appelable est un objet qui peut être appelé, éventuellement avec un " +"ensemble d'arguments (voir :term:`argument`), avec la syntaxe suivante ::" + +#: glossary.rst:219 +msgid "" +"A :term:`function`, and by extension a :term:`method`, is a callable. An " +"instance of a class that implements the :meth:`~object.__call__` method is " +"also a callable." +msgstr "" +"Une :term:`fonction `, et par extension une :term:`méthode " +"`, est un appelable. Une instance d'une classe qui implémente la " +"méthode :meth:`~object.__call__` est également un appelable." + +#: glossary.rst:222 +msgid "callback" +msgstr "fonction de rappel" + +#: glossary.rst:224 +msgid "" +"A subroutine function which is passed as an argument to be executed at some " +"point in the future." +msgstr "Une sous-fonction passée en argument pour être exécutée plus tard." + +#: glossary.rst:226 +msgid "class" +msgstr "classe" + +#: glossary.rst:228 +msgid "" +"A template for creating user-defined objects. Class definitions normally " +"contain method definitions which operate on instances of the class." +msgstr "" +"Modèle pour créer des objets définis par l'utilisateur. Une définition de " +"classe (*class*) contient normalement des définitions de méthodes qui " +"agissent sur les instances de la classe." + +#: glossary.rst:231 +msgid "class variable" +msgstr "variable de classe" + +#: glossary.rst:233 +msgid "" +"A variable defined in a class and intended to be modified only at class " +"level (i.e., not in an instance of the class)." +msgstr "" +"Une variable définie dans une classe et destinée à être modifiée uniquement " +"au niveau de la classe (c'est-à-dire, pas dans une instance de la classe)." + +#: glossary.rst:235 +msgid "coercion" +msgstr "coercition" + +#: glossary.rst:237 +msgid "" +"The implicit conversion of an instance of one type to another during an " +"operation which involves two arguments of the same type. For example, " +"``int(3.15)`` converts the floating point number to the integer ``3``, but " +"in ``3+4.5``, each argument is of a different type (one int, one float), and " +"both must be converted to the same type before they can be added or it will " +"raise a :exc:`TypeError`. Without coercion, all arguments of even " +"compatible types would have to be normalized to the same value by the " +"programmer, e.g., ``float(3)+4.5`` rather than just ``3+4.5``." +msgstr "" +"Conversion implicite d'une instance d'un type vers un autre lors d'une " +"opération dont les deux opérandes doivent être de même type. Par exemple " +"``int(3.15)`` convertit explicitement le nombre à virgule flottante en " +"nombre entier ``3``. Mais dans l'opération ``3 + 4.5``, les deux opérandes " +"sont d'un type différent (un entier et un nombre à virgule flottante), alors " +"qu'ils doivent avoir le même type pour être additionnés (sinon une " +"exception :exc:`TypeError` serait levée). Sans coercition, tous les " +"opérandes, même de types compatibles, devraient être convertis (on parle " +"aussi de *cast*) explicitement par le développeur, par exemple : ``float(3) " +"+ 4.5`` au lieu du simple ``3 + 4.5``." + +#: glossary.rst:245 +msgid "complex number" +msgstr "nombre complexe" + +#: glossary.rst:247 +msgid "" +"An extension of the familiar real number system in which all numbers are " +"expressed as a sum of a real part and an imaginary part. Imaginary numbers " +"are real multiples of the imaginary unit (the square root of ``-1``), often " +"written ``i`` in mathematics or ``j`` in engineering. Python has built-in " +"support for complex numbers, which are written with this latter notation; " +"the imaginary part is written with a ``j`` suffix, e.g., ``3+1j``. To get " +"access to complex equivalents of the :mod:`math` module, use :mod:`cmath`. " +"Use of complex numbers is a fairly advanced mathematical feature. If you're " +"not aware of a need for them, it's almost certain you can safely ignore them." +msgstr "" +"Extension des nombres réels familiers, dans laquelle tous les nombres sont " +"exprimés sous la forme d'une somme d'une partie réelle et d'une partie " +"imaginaire. Les nombres imaginaires sont les nombres réels multipliés par " +"l'unité imaginaire (la racine carrée de ``-1``, souvent écrite ``i`` en " +"mathématiques ou ``j`` par les ingénieurs). Python comprend nativement les " +"nombres complexes, écrits avec cette dernière notation : la partie " +"imaginaire est écrite avec un suffixe ``j``, exemple, ``3+1j``. Pour " +"utiliser les équivalents complexes de :mod:`math`, utilisez :mod:`cmath`. " +"Les nombres complexes sont un concept assez avancé en mathématiques. Si vous " +"ne connaissez pas ce concept, vous pouvez tranquillement les ignorer." + +#: glossary.rst:257 +msgid "context manager" +msgstr "gestionnaire de contexte" + +#: glossary.rst:259 +msgid "" +"An object which controls the environment seen in a :keyword:`with` statement " +"by defining :meth:`__enter__` and :meth:`__exit__` methods. See :pep:`343`." +msgstr "" +"Objet contrôlant l'environnement à l'intérieur d'un bloc :keyword:`with` en " +"définissant les méthodes :meth:`__enter__` et :meth:`__exit__`. Consultez " +"la :pep:`343`." + +#: glossary.rst:262 +msgid "context variable" +msgstr "variable de contexte" + +#: glossary.rst:264 +msgid "" +"A variable which can have different values depending on its context. This is " +"similar to Thread-Local Storage in which each execution thread may have a " +"different value for a variable. However, with context variables, there may " +"be several contexts in one execution thread and the main usage for context " +"variables is to keep track of variables in concurrent asynchronous tasks. " +"See :mod:`contextvars`." +msgstr "" +"Une variable qui peut avoir des valeurs différentes en fonction de son " +"contexte. Cela est similaire au stockage par fil d’exécution (*Thread Local " +"Storage* en anglais) dans lequel chaque fil d’exécution peut avoir une " +"valeur différente pour une variable. Toutefois, avec les variables de " +"contexte, il peut y avoir plusieurs contextes dans un fil d’exécution et " +"l’utilisation principale pour les variables de contexte est de garder une " +"trace des variables dans les tâches asynchrones concourantes. Voir :mod:" +"`contextvars`." + +#: glossary.rst:271 +msgid "contiguous" +msgstr "contigu" + +#: glossary.rst:275 +msgid "" +"A buffer is considered contiguous exactly if it is either *C-contiguous* or " +"*Fortran contiguous*. Zero-dimensional buffers are C and Fortran " +"contiguous. In one-dimensional arrays, the items must be laid out in memory " +"next to each other, in order of increasing indexes starting from zero. In " +"multidimensional C-contiguous arrays, the last index varies the fastest when " +"visiting items in order of memory address. However, in Fortran contiguous " +"arrays, the first index varies the fastest." +msgstr "" +"Un tampon (*buffer* en anglais) est considéré comme contigu s’il est soit *C-" +"contigu* soit *Fortran-contigu*. Les tampons de dimension zéro sont C-" +"contigus et Fortran-contigus. Pour un tableau à une dimension, ses éléments " +"doivent être placés en mémoire l’un à côté de l’autre, dans l’ordre " +"croissant de leur indice, en commençant à zéro. Pour qu’un tableau " +"multidimensionnel soit C-contigu, le dernier indice doit être celui qui " +"varie le plus rapidement lors du parcours de ses éléments dans l’ordre de " +"leur adresse mémoire. À l'inverse, dans les tableaux Fortran-contigu, c’est " +"le premier indice qui doit varier le plus rapidement." + +#: glossary.rst:283 +msgid "coroutine" +msgstr "coroutine" + +#: glossary.rst:285 +msgid "" +"Coroutines are a more generalized form of subroutines. Subroutines are " +"entered at one point and exited at another point. Coroutines can be " +"entered, exited, and resumed at many different points. They can be " +"implemented with the :keyword:`async def` statement. See also :pep:`492`." +msgstr "" +"Les coroutines sont une forme généralisée des fonctions. On entre dans une " +"fonction en un point et on en sort en un autre point. On peut entrer, sortir " +"et reprendre l'exécution d'une coroutine en plusieurs points. Elles peuvent " +"être implémentées en utilisant l'instruction :keyword:`async def`. Voir " +"aussi la :pep:`492`." + +#: glossary.rst:290 +msgid "coroutine function" +msgstr "fonction coroutine" + +#: glossary.rst:292 +msgid "" +"A function which returns a :term:`coroutine` object. A coroutine function " +"may be defined with the :keyword:`async def` statement, and may contain :" +"keyword:`await`, :keyword:`async for`, and :keyword:`async with` keywords. " +"These were introduced by :pep:`492`." +msgstr "" +"Fonction qui renvoie un objet :term:`coroutine`. Une fonction coroutine peut " +"être définie par l'instruction :keyword:`async def` et peut contenir les " +"mots clés :keyword:`await`, :keyword:`async for` ainsi que :keyword:`async " +"with`. A été introduit par la :pep:`492`." + +#: glossary.rst:297 +msgid "CPython" +msgstr "CPython" + +#: glossary.rst:299 +msgid "" +"The canonical implementation of the Python programming language, as " +"distributed on `python.org `_. The term \"CPython\" " +"is used when necessary to distinguish this implementation from others such " +"as Jython or IronPython." +msgstr "" +"L'implémentation canonique du langage de programmation Python, tel que " +"distribué sur `python.org `_. Le terme \"CPython\" " +"est utilisé dans certains contextes lorsqu'il est nécessaire de distinguer " +"cette implémentation des autres comme *Jython* ou *IronPython*." + +#: glossary.rst:303 +msgid "decorator" +msgstr "décorateur" + +#: glossary.rst:305 +msgid "" +"A function returning another function, usually applied as a function " +"transformation using the ``@wrapper`` syntax. Common examples for " +"decorators are :func:`classmethod` and :func:`staticmethod`." +msgstr "" +"Fonction dont la valeur de retour est une autre fonction. Un décorateur est " +"habituellement utilisé pour transformer une fonction via la syntaxe " +"``@wrapper``, dont les exemples typiques sont : :func:`classmethod` et :func:" +"`staticmethod`." + +#: glossary.rst:309 +msgid "" +"The decorator syntax is merely syntactic sugar, the following two function " +"definitions are semantically equivalent::" +msgstr "" +"La syntaxe des décorateurs est simplement du sucre syntaxique, les " +"définitions des deux fonctions suivantes sont sémantiquement équivalentes ::" + +#: glossary.rst:320 +msgid "" +"The same concept exists for classes, but is less commonly used there. See " +"the documentation for :ref:`function definitions ` and :ref:`class " +"definitions ` for more about decorators." +msgstr "" +"Quoique moins fréquemment utilisé, le même concept existe pour les classes. " +"Consultez la documentation :ref:`définitions de fonctions ` et :" +"ref:`définitions de classes ` pour en savoir plus sur les décorateurs." + +#: glossary.rst:323 +msgid "descriptor" +msgstr "descripteur" + +#: glossary.rst:325 +msgid "" +"Any object which defines the methods :meth:`__get__`, :meth:`__set__`, or :" +"meth:`__delete__`. When a class attribute is a descriptor, its special " +"binding behavior is triggered upon attribute lookup. Normally, using *a.b* " +"to get, set or delete an attribute looks up the object named *b* in the " +"class dictionary for *a*, but if *b* is a descriptor, the respective " +"descriptor method gets called. Understanding descriptors is a key to a deep " +"understanding of Python because they are the basis for many features " +"including functions, methods, properties, class methods, static methods, and " +"reference to super classes." +msgstr "" +"N'importe quel objet définissant les méthodes :meth:`__get__`, :meth:" +"`__set__`, ou :meth:`__delete__`. Lorsque l'attribut d'une classe est un " +"descripteur, son comportement spécial est déclenché lors de la recherche des " +"attributs. Normalement, lorsque vous écrivez *a.b* pour obtenir, affecter ou " +"effacer un attribut, Python recherche l'objet nommé *b* dans le dictionnaire " +"de la classe de *a*. Mais si *b* est un descripteur, c'est la méthode de ce " +"descripteur qui est alors appelée. Comprendre les descripteurs est requis " +"pour avoir une compréhension approfondie de Python, ils sont la base de " +"nombre de ses caractéristiques notamment les fonctions, méthodes, " +"propriétés, méthodes de classes, méthodes statiques et les références aux " +"classes parentes." + +#: glossary.rst:335 +msgid "" +"For more information about descriptors' methods, see :ref:`descriptors` or " +"the :ref:`Descriptor How To Guide `." +msgstr "" +"Pour plus d'informations sur les méthodes des descripteurs, consultez :ref:" +"`descriptors` ou le :ref:`guide pour l'utilisation des descripteurs " +"`." + +#: glossary.rst:337 +msgid "dictionary" +msgstr "dictionnaire" + +#: glossary.rst:339 +msgid "" +"An associative array, where arbitrary keys are mapped to values. The keys " +"can be any object with :meth:`__hash__` and :meth:`__eq__` methods. Called a " +"hash in Perl." +msgstr "" +"Structure de donnée associant des clés à des valeurs. Les clés peuvent être " +"n'importe quel objet possédant les méthodes :meth:`__hash__` et :meth:" +"`__eq__`. En Perl, les dictionnaires sont appelés \"*hash*\"." + +#: glossary.rst:342 +msgid "dictionary comprehension" +msgstr "dictionnaire en compréhension (ou dictionnaire en intension)" + +#: glossary.rst:344 +msgid "" +"A compact way to process all or part of the elements in an iterable and " +"return a dictionary with the results. ``results = {n: n ** 2 for n in " +"range(10)}`` generates a dictionary containing key ``n`` mapped to value ``n " +"** 2``. See :ref:`comprehensions`." +msgstr "" +"Écriture concise pour traiter tout ou partie des éléments d'un itérable et " +"renvoyer un dictionnaire contenant les résultats. ``results = {n: n ** 2 for " +"n in range(10)}`` génère un dictionnaire contenant des clés ``n`` liée à " +"leur valeurs ``n ** 2``. Voir :ref:`comprehensions`." + +#: glossary.rst:348 +msgid "dictionary view" +msgstr "vue de dictionnaire" + +#: glossary.rst:350 +msgid "" +"The objects returned from :meth:`dict.keys`, :meth:`dict.values`, and :meth:" +"`dict.items` are called dictionary views. They provide a dynamic view on the " +"dictionary’s entries, which means that when the dictionary changes, the view " +"reflects these changes. To force the dictionary view to become a full list " +"use ``list(dictview)``. See :ref:`dict-views`." +msgstr "" +"Objets retournés par les méthodes :meth:`dict.keys`, :meth:`dict.values` et :" +"meth:`dict.items`. Ils fournissent des vues dynamiques des entrées du " +"dictionnaire, ce qui signifie que lorsque le dictionnaire change, la vue " +"change. Pour transformer une vue en vraie liste, utilisez " +"``list(dictview)``. Voir :ref:`dict-views`." + +#: glossary.rst:356 +msgid "docstring" +msgstr "*docstring* (chaîne de documentation)" + +#: glossary.rst:358 +msgid "" +"A string literal which appears as the first expression in a class, function " +"or module. While ignored when the suite is executed, it is recognized by " +"the compiler and put into the :attr:`__doc__` attribute of the enclosing " +"class, function or module. Since it is available via introspection, it is " +"the canonical place for documentation of the object." +msgstr "" +"Première chaîne littérale qui apparaît dans l'expression d'une classe, " +"fonction, ou module. Bien qu'ignorée à l'exécution, elle est reconnue par le " +"compilateur et placée dans l'attribut :attr:`__doc__` de la classe, de la " +"fonction ou du module. Comme cette chaîne est disponible par introspection, " +"c'est l'endroit idéal pour documenter l'objet." + +#: glossary.rst:364 +msgid "duck-typing" +msgstr "duck-typing" + +#: glossary.rst:366 +msgid "" +"A programming style which does not look at an object's type to determine if " +"it has the right interface; instead, the method or attribute is simply " +"called or used (\"If it looks like a duck and quacks like a duck, it must be " +"a duck.\") By emphasizing interfaces rather than specific types, well-" +"designed code improves its flexibility by allowing polymorphic " +"substitution. Duck-typing avoids tests using :func:`type` or :func:" +"`isinstance`. (Note, however, that duck-typing can be complemented with :" +"term:`abstract base classes `.) Instead, it typically " +"employs :func:`hasattr` tests or :term:`EAFP` programming." +msgstr "" +"Style de programmation qui ne prend pas en compte le type d'un objet pour " +"déterminer s'il respecte une interface, mais qui appelle simplement la " +"méthode ou l'attribut (*Si ça a un bec et que ça cancane, ça doit être un " +"canard*, *duck* signifie canard en anglais). En se concentrant sur les " +"interfaces plutôt que les types, du code bien construit améliore sa " +"flexibilité en autorisant des substitutions polymorphiques. Le *duck-typing* " +"évite de vérifier les types via :func:`type` ou :func:`isinstance`, Notez " +"cependant que le *duck-typing* peut travailler de pair avec les :term:" +"`classes de base abstraites `. À la place, le " +"*duck-typing* utilise plutôt :func:`hasattr` ou la programmation :term:" +"`EAFP`." + +#: glossary.rst:375 +msgid "EAFP" +msgstr "EAFP" + +#: glossary.rst:377 +msgid "" +"Easier to ask for forgiveness than permission. This common Python coding " +"style assumes the existence of valid keys or attributes and catches " +"exceptions if the assumption proves false. This clean and fast style is " +"characterized by the presence of many :keyword:`try` and :keyword:`except` " +"statements. The technique contrasts with the :term:`LBYL` style common to " +"many other languages such as C." +msgstr "" +"Il est plus simple de demander pardon que demander la permission (*Easier to " +"Ask for Forgiveness than Permission* en anglais). Ce style de développement " +"Python fait l'hypothèse que le code est valide et traite les exceptions si " +"cette hypothèse s'avère fausse. Ce style, propre et efficace, est " +"caractérisé par la présence de beaucoup de mots clés :keyword:`try` et :" +"keyword:`except`. Cette technique de programmation contraste avec le style :" +"term:`LBYL` utilisé couramment dans les langages tels que C." + +#: glossary.rst:383 +msgid "expression" +msgstr "expression" + +#: glossary.rst:385 +msgid "" +"A piece of syntax which can be evaluated to some value. In other words, an " +"expression is an accumulation of expression elements like literals, names, " +"attribute access, operators or function calls which all return a value. In " +"contrast to many other languages, not all language constructs are " +"expressions. There are also :term:`statement`\\s which cannot be used as " +"expressions, such as :keyword:`while`. Assignments are also statements, not " +"expressions." +msgstr "" +"Suite logique de termes et chiffres conformes à la syntaxe Python dont " +"l'évaluation fournit une valeur. En d'autres termes, une expression est une " +"suite d'éléments tels que des noms, opérateurs, littéraux, accès " +"d'attributs, méthodes ou fonctions qui aboutissent à une valeur. " +"Contrairement à beaucoup d'autres langages, les différentes constructions du " +"langage ne sont pas toutes des expressions. On trouve également des :term:" +"`instructions ` qui ne peuvent pas être utilisées comme " +"expressions, tel que :keyword:`while`. Les affectations sont également des " +"instructions et non des expressions." + +#: glossary.rst:392 +msgid "extension module" +msgstr "module d'extension" + +#: glossary.rst:394 +msgid "" +"A module written in C or C++, using Python's C API to interact with the core " +"and with user code." +msgstr "" +"Module écrit en C ou C++, utilisant l'API C de Python pour interagir avec " +"Python et le code de l'utilisateur." + +#: glossary.rst:396 +msgid "f-string" +msgstr "f-string" + +#: glossary.rst:398 +msgid "" +"String literals prefixed with ``'f'`` or ``'F'`` are commonly called \"f-" +"strings\" which is short for :ref:`formatted string literals `. " +"See also :pep:`498`." +msgstr "" +"Chaîne littérale préfixée de ``'f'`` ou ``'F'``. Les \"f-strings\" sont un " +"raccourci pour :ref:`formatted string literals `. Voir la :pep:" +"`498`." + +#: glossary.rst:401 +msgid "file object" +msgstr "objet fichier" + +#: glossary.rst:403 +msgid "" +"An object exposing a file-oriented API (with methods such as :meth:`read()` " +"or :meth:`write()`) to an underlying resource. Depending on the way it was " +"created, a file object can mediate access to a real on-disk file or to " +"another type of storage or communication device (for example standard input/" +"output, in-memory buffers, sockets, pipes, etc.). File objects are also " +"called :dfn:`file-like objects` or :dfn:`streams`." +msgstr "" +"Objet exposant une ressource via une API orientée fichier (avec les " +"méthodes :meth:`read()` ou :meth:`write()`). En fonction de la manière dont " +"il a été créé, un objet fichier peut interfacer l'accès à un fichier sur le " +"disque ou à un autre type de stockage ou de communication (typiquement " +"l'entrée standard, la sortie standard, un tampon en mémoire, un connecteur " +"réseau…). Les objets fichiers sont aussi appelés :dfn:`file-like-objects` " +"ou :dfn:`streams`." + +#: glossary.rst:411 +msgid "" +"There are actually three categories of file objects: raw :term:`binary files " +"`, buffered :term:`binary files ` and :term:`text " +"files `. Their interfaces are defined in the :mod:`io` module. " +"The canonical way to create a file object is by using the :func:`open` " +"function." +msgstr "" +"Il existe en réalité trois catégories de fichiers objets : les :term:" +"`fichiers binaires ` bruts, les :term:`fichiers binaires " +"` avec tampon (*buffer*) et les :term:`fichiers textes " +"`. Leurs interfaces sont définies dans le module :mod:`io`. " +"Le moyen le plus simple et direct de créer un objet fichier est d'utiliser " +"la fonction :func:`open`." + +#: glossary.rst:416 +msgid "file-like object" +msgstr "objet fichier-compatible" + +#: glossary.rst:418 +msgid "A synonym for :term:`file object`." +msgstr "Synonyme de :term:`objet fichier`." + +#: glossary.rst:419 +msgid "filesystem encoding and error handler" +msgstr "encodage du système de fichier et gestionnaire d'erreur" + +#: glossary.rst:421 +msgid "" +"Encoding and error handler used by Python to decode bytes from the operating " +"system and encode Unicode to the operating system." +msgstr "" +"Encodage et gestionnaire d'erreur utilisés par Python pour décoder les " +"octets fournis par le système d'exploitation et encoder les chaînes de " +"caractères Unicode afin de les passer au système." + +#: glossary.rst:424 +msgid "" +"The filesystem encoding must guarantee to successfully decode all bytes " +"below 128. If the file system encoding fails to provide this guarantee, API " +"functions can raise :exc:`UnicodeError`." +msgstr "" +"L'encodage du système de fichiers doit impérativement pouvoir décoder tous " +"les octets jusqu'à 128. Si ce n'est pas le cas, certaines fonctions de l'API " +"lèvent :exc:`UnicodeError`." + +#: glossary.rst:428 +msgid "" +"The :func:`sys.getfilesystemencoding` and :func:`sys." +"getfilesystemencodeerrors` functions can be used to get the filesystem " +"encoding and error handler." +msgstr "" +"Cet encodage et son gestionnaire d'erreur peuvent être obtenus à l'aide des " +"fonctions :func:`sys.getfilesystemencoding` et :func:" +"`getfilesystemencodeerrors`." + +#: glossary.rst:432 +msgid "" +"The :term:`filesystem encoding and error handler` are configured at Python " +"startup by the :c:func:`PyConfig_Read` function: see :c:member:`~PyConfig." +"filesystem_encoding` and :c:member:`~PyConfig.filesystem_errors` members of :" +"c:type:`PyConfig`." +msgstr "" +"L':term:`encodage du système de fichiers et gestionnaire d'erreurs associé " +"` sont configurés au démarrage de " +"Python par la fonction :c:func:`PyConfig_Read` : regardez :c:member:" +"`~PyConfig.filesystem_encoding` et :c:member:`~PyConfig.filesystem_errors` " +"dans les membres de :c:type:`PyConfig`." + +#: glossary.rst:437 +msgid "See also the :term:`locale encoding`." +msgstr "Voir aussi :term:`encodage régional`." + +#: glossary.rst:438 +msgid "finder" +msgstr "chercheur" + +#: glossary.rst:440 +msgid "" +"An object that tries to find the :term:`loader` for a module that is being " +"imported." +msgstr "" +"Objet qui essaie de trouver un :term:`chargeur ` pour le module en " +"cours d'importation." + +#: glossary.rst:443 +msgid "" +"Since Python 3.3, there are two types of finder: :term:`meta path finders " +"` for use with :data:`sys.meta_path`, and :term:`path " +"entry finders ` for use with :data:`sys.path_hooks`." +msgstr "" +"Depuis Python 3.3, il existe deux types de chercheurs : les :term:" +"`chercheurs dans les méta-chemins ` à utiliser avec :data:" +"`sys.meta_path` ; les :term:`chercheurs d'entrée dans path ` à utiliser avec :data:`sys.path_hooks`." + +#: glossary.rst:447 +msgid "See :pep:`302`, :pep:`420` and :pep:`451` for much more detail." +msgstr "Voir les :pep:`302`, :pep:`420` et :pep:`451` pour plus de détails." + +#: glossary.rst:448 +msgid "floor division" +msgstr "division entière" + +#: glossary.rst:450 +msgid "" +"Mathematical division that rounds down to nearest integer. The floor " +"division operator is ``//``. For example, the expression ``11 // 4`` " +"evaluates to ``2`` in contrast to the ``2.75`` returned by float true " +"division. Note that ``(-11) // 4`` is ``-3`` because that is ``-2.75`` " +"rounded *downward*. See :pep:`238`." +msgstr "" +"Division mathématique arrondissant à l'entier inférieur. L'opérateur de la " +"division entière est ``//``. Par exemple l'expression ``11 // 4`` vaut " +"``2``, contrairement à ``11 / 4`` qui vaut ``2.75``. Notez que ``(-11) // " +"4`` vaut ``-3`` car l'arrondi se fait à l'entier inférieur. Voir la :pep:" +"`328`." + +#: glossary.rst:455 +msgid "function" +msgstr "fonction" + +#: glossary.rst:457 +msgid "" +"A series of statements which returns some value to a caller. It can also be " +"passed zero or more :term:`arguments ` which may be used in the " +"execution of the body. See also :term:`parameter`, :term:`method`, and the :" +"ref:`function` section." +msgstr "" +"Suite d'instructions qui renvoie une valeur à son appelant. On peut lui " +"passer des :term:`arguments ` qui pourront être utilisés dans le " +"corps de la fonction. Voir aussi :term:`paramètre`, :term:`méthode` et :ref:" +"`function`." + +#: glossary.rst:461 +msgid "function annotation" +msgstr "annotation de fonction" + +#: glossary.rst:463 +msgid "An :term:`annotation` of a function parameter or return value." +msgstr ":term:`annotation` d'un paramètre de fonction ou valeur de retour." + +#: glossary.rst:465 +msgid "" +"Function annotations are usually used for :term:`type hints `: " +"for example, this function is expected to take two :class:`int` arguments " +"and is also expected to have an :class:`int` return value::" +msgstr "" +"Les annotations de fonctions sont généralement utilisées pour des :term:" +"`indications de types ` : par exemple, cette fonction devrait " +"prendre deux arguments :class:`int` et devrait également avoir une valeur de " +"retour de type :class:`int` ::" + +#: glossary.rst:473 +msgid "Function annotation syntax is explained in section :ref:`function`." +msgstr "" +"L'annotation syntaxique de la fonction est expliquée dans la section :ref:" +"`function`." + +#: glossary.rst:475 +msgid "" +"See :term:`variable annotation` and :pep:`484`, which describe this " +"functionality. Also see :ref:`annotations-howto` for best practices on " +"working with annotations." +msgstr "" +"Voir :term:`annotation de variable` et :pep:`484`, qui " +"décrivent cette fonctionnalité. Voir aussi :ref:`annotations-howto` sur les " +"bonnes pratiques concernant les annotations." + +#: glossary.rst:479 +msgid "__future__" +msgstr "__future__" + +#: glossary.rst:481 +msgid "" +"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:492 +msgid "garbage collection" +msgstr "ramasse-miettes" + +#: glossary.rst:494 +msgid "" +"The process of freeing memory when it is not used anymore. Python performs " +"garbage collection via reference counting and a cyclic garbage collector " +"that is able to detect and break reference cycles. The garbage collector " +"can be controlled using the :mod:`gc` module." +msgstr "" +"(*garbage collection* en anglais) Mécanisme permettant de libérer de la " +"mémoire lorsqu'elle n'est plus utilisée. Python utilise un ramasse-miettes " +"par comptage de référence et un ramasse-miettes cyclique capable de détecter " +"et casser les références circulaires. Le ramasse-miettes peut être contrôlé " +"en utilisant le module :mod:`gc`." + +#: glossary.rst:500 +msgid "generator" +msgstr "générateur" + +#: glossary.rst:502 +msgid "" +"A function which returns a :term:`generator iterator`. It looks like a " +"normal function except that it contains :keyword:`yield` expressions for " +"producing a series of values usable in a for-loop or that can be retrieved " +"one at a time with the :func:`next` function." +msgstr "" +"Fonction qui renvoie un :term:`itérateur de générateur`. Cela ressemble à " +"une fonction normale, en dehors du fait qu'elle contient une ou des " +"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:507 +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 " +"clear, using the full terms avoids ambiguity." +msgstr "" +"Fait généralement référence à une fonction générateur mais peut faire " +"référence à un *itérateur de générateur* dans certains contextes. Dans les " +"cas où le sens voulu n'est pas clair, utiliser les termes complets lève " +"l’ambiguïté." + +#: glossary.rst:510 +msgid "generator iterator" +msgstr "itérateur de générateur" + +#: glossary.rst:512 +msgid "An object created by a :term:`generator` function." +msgstr "Objet créé par une fonction :term:`générateur`." + +#: glossary.rst:514 +msgid "" +"Each :keyword:`yield` temporarily suspends processing, remembering the " +"location execution state (including local variables and pending try-" +"statements). When the *generator iterator* resumes, it picks up where it " +"left off (in contrast to functions which start fresh on every invocation)." +msgstr "" +"Chaque :keyword:`yield` suspend temporairement l'exécution, en se rappelant " +"l'endroit et l'état de l'exécution (y compris les variables locales et les " +"*try* en cours). Lorsque l'itérateur de générateur reprend, il repart là où " +"il en était (contrairement à une fonction qui prendrait un nouveau départ à " +"chaque invocation)." + +#: glossary.rst:521 +msgid "generator expression" +msgstr "expression génératrice" + +#: glossary.rst:523 +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 " +"optional :keyword:`!if` clause. The combined expression generates values " +"for an enclosing function::" +msgstr "" +"Expression qui donne un itérateur. Elle ressemble à une expression normale, " +"suivie d'une clause :keyword:`!for` définissant une variable de boucle, un " +"intervalle et une clause :keyword:`!if` optionnelle. Toute cette expression " +"génère des valeurs pour la fonction qui l'entoure ::" + +#: glossary.rst:530 +msgid "generic function" +msgstr "fonction générique" + +#: glossary.rst:532 +msgid "" +"A function composed of multiple functions implementing the same operation " +"for different types. Which implementation should be used during a call is " +"determined by the dispatch algorithm." +msgstr "" +"Fonction composée de plusieurs fonctions implémentant les mêmes opérations " +"pour différents types. L'implémentation à utiliser est déterminée lors de " +"l'appel par l'algorithme de répartition." + +#: glossary.rst:536 +msgid "" +"See also the :term:`single dispatch` glossary entry, the :func:`functools." +"singledispatch` decorator, and :pep:`443`." +msgstr "" +"Voir aussi :term:`single dispatch`, le décorateur :func:`functools." +"singledispatch` et la :pep:`443`." + +#: glossary.rst:538 +msgid "generic type" +msgstr "type générique" + +#: glossary.rst:540 +msgid "" +"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é ; 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:545 +msgid "" +"For more details, see :ref:`generic alias types`, :pep:" +"`483`, :pep:`484`, :pep:`585`, and the :mod:`typing` module." +msgstr "" +"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 la :pep:`483`, la :pep:`484` et la :pep:`585`." + +#: glossary.rst:547 +msgid "GIL" +msgstr "GIL" + +#: glossary.rst:549 +msgid "See :term:`global interpreter lock`." +msgstr "Voir :term:`global interpreter lock`." + +#: glossary.rst:550 +msgid "global interpreter lock" +msgstr "verrou global de l'interpréteur" + +#: glossary.rst:552 +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 " +"CPython implementation by making the object model (including critical built-" +"in types such as :class:`dict`) implicitly safe against concurrent access. " +"Locking the entire interpreter makes it easier for the interpreter to be " +"multi-threaded, at the expense of much of the parallelism afforded by multi-" +"processor machines." +msgstr "" +"(*global interpreter lock* en anglais) Mécanisme utilisé par l'interpréteur :" +"term:`CPython` pour s'assurer qu'un seul fil d'exécution (*thread* en " +"anglais) n'exécute le :term:`bytecode` à la fois. Cela simplifie " +"l'implémentation de CPython en rendant le modèle objet (incluant des parties " +"critiques comme la classe native :class:`dict`) implicitement protégé contre " +"les accès concourants. Verrouiller l'interpréteur entier rend plus facile " +"l'implémentation de multiples fils d'exécution (*multi-thread* en anglais), " +"au détriment malheureusement de beaucoup du parallélisme possible sur les " +"machines ayant plusieurs processeurs." + +#: glossary.rst:561 +msgid "" +"However, some extension modules, either standard or third-party, are " +"designed so as to release the GIL when doing computationally intensive tasks " +"such as compression or hashing. Also, the GIL is always released when doing " +"I/O." +msgstr "" +"Cependant, certains modules d'extension, standards ou non, sont conçus de " +"manière à libérer le GIL lorsqu'ils effectuent des tâches lourdes tel que la " +"compression ou le hachage. De la même manière, le GIL est toujours libéré " +"lors des entrées-sorties." + +#: glossary.rst:566 +msgid "" +"Past efforts to create a \"free-threaded\" interpreter (one which locks " +"shared data at a much finer granularity) have not been successful because " +"performance suffered in the common single-processor case. It is believed " +"that overcoming this performance issue would make the implementation much " +"more complicated and therefore costlier to maintain." +msgstr "" +"Les tentatives précédentes d'implémenter un interpréteur Python avec une " +"granularité de verrouillage plus fine ont toutes échouées, à cause de leurs " +"mauvaises performances dans le cas d'un processeur unique. Il est admis que " +"corriger ce problème de performance induit mènerait à une implémentation " +"beaucoup plus compliquée et donc plus coûteuse à maintenir." + +#: glossary.rst:572 +msgid "hash-based pyc" +msgstr "*pyc* utilisant le hachage" + +#: glossary.rst:574 +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-" +"invalidation`." +msgstr "" +"Un fichier de cache de code intermédiaire (*bytecode* en anglais) qui " +"utilise le hachage plutôt que l'heure de dernière modification du fichier " +"source correspondant pour déterminer sa validité. Voir :ref:`pyc-" +"invalidation`." + +#: glossary.rst:577 +msgid "hashable" +msgstr "hachable" + +#: glossary.rst:579 +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 " +"other objects (it needs an :meth:`__eq__` method). Hashable objects which " +"compare equal must have the same hash value." +msgstr "" +"Un objet est *hachable* s'il a une empreinte (*hash*) qui ne change jamais " +"(il doit donc implémenter une méthode :meth:`__hash__`) et s'il peut être " +"comparé à d'autres objets (avec la méthode :meth:`__eq__`). Les objets " +"hachables dont la comparaison par ``__eq__`` est vraie doivent avoir la même " +"empreinte." + +#: glossary.rst:584 +msgid "" +"Hashability makes an object usable as a dictionary key and a set member, " +"because these data structures use the hash value internally." +msgstr "" +"La hachabilité permet à un objet d'être utilisé comme clé de dictionnaire ou " +"en tant que membre d'un ensemble (type *set*), car ces structures de données " +"utilisent ce *hash*." + +#: glossary.rst:587 +msgid "" +"Most of Python's immutable built-in objects are hashable; mutable containers " +"(such as lists or dictionaries) are not; immutable containers (such as " +"tuples and frozensets) are only hashable if their elements are hashable. " +"Objects which are instances of user-defined classes are hashable by " +"default. They all compare unequal (except with themselves), and their hash " +"value is derived from their :func:`id`." +msgstr "" +"La plupart des types immuables natifs de Python sont hachables, mais les " +"conteneurs muables (comme les listes ou les dictionnaires) ne le sont pas ; " +"les conteneurs immuables (comme les n-uplets ou les ensembles figés) ne sont " +"hachables que si leurs éléments sont hachables. Les instances de classes " +"définies par les utilisateurs sont hachables par défaut. Elles sont toutes " +"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:594 +msgid "IDLE" +msgstr "IDLE" + +#: glossary.rst:596 +msgid "" +"An Integrated Development and Learning Environment for Python. :ref:`idle` " +"is a basic editor and interpreter environment which ships with the standard " +"distribution of Python." +msgstr "" +"Environnement d'apprentissage et de développement intégré pour Python. :ref:" +"`IDLE ` est un éditeur basique et un interpréteur livré avec la " +"distribution standard de Python." + +#: glossary.rst:599 +msgid "immutable" +msgstr "immuable" + +#: glossary.rst:601 +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 " +"created if a different value has to be stored. They play an important role " +"in places where a constant hash value is needed, for example as a key in a " +"dictionary." +msgstr "" +"Objet dont la valeur ne change pas. Les nombres, les chaînes et les n-uplets " +"sont immuables. Ils ne peuvent être modifiés. Un nouvel objet doit être créé " +"si une valeur différente doit être stockée. Ils jouent un rôle important " +"quand une valeur de *hash* constante est requise, typiquement en clé de " +"dictionnaire." + +#: glossary.rst:606 +msgid "import path" +msgstr "chemin des importations" + +#: glossary.rst:608 +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 " +"list of locations usually comes from :data:`sys.path`, but for subpackages " +"it may also come from the parent package's ``__path__`` attribute." +msgstr "" +"Liste de :term:`entrées ` dans lesquelles le :term:`chercheur " +"basé sur les chemins ` cherche les modules à importer. " +"Typiquement, lors d'une importation, cette liste vient de :data:`sys.path` ; " +"pour les sous-paquets, elle peut aussi venir de l'attribut ``__path__`` du " +"paquet parent." + +#: glossary.rst:613 +msgid "importing" +msgstr "importing" + +#: glossary.rst:615 +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:617 +msgid "importer" +msgstr "importateur" + +#: glossary.rst:619 +msgid "" +"An object that both finds and loads a module; both a :term:`finder` and :" +"term:`loader` object." +msgstr "" +"Objet qui trouve et charge un module, en même temps un :term:`chercheur " +"` et un :term:`chargeur `." + +#: glossary.rst:621 +msgid "interactive" +msgstr "interactif" + +#: glossary.rst:623 +msgid "" +"Python has an interactive interpreter which means you can enter statements " +"and expressions at the interpreter prompt, immediately execute them and see " +"their results. Just launch ``python`` with no arguments (possibly by " +"selecting it from your computer's main menu). It is a very powerful way to " +"test out new ideas or inspect modules and packages (remember ``help(x)``)." +msgstr "" +"Python a un interpréteur interactif, ce qui signifie que vous pouvez écrire " +"des expressions et des instructions à l'invite de l'interpréteur. " +"L'interpréteur Python va les exécuter immédiatement et vous en présenter le " +"résultat. Démarrez juste ``python`` (probablement depuis le menu principal " +"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:629 +msgid "interpreted" +msgstr "interprété" + +#: glossary.rst:631 +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. " +"This means that source files can be run directly without explicitly creating " +"an executable which is then run. Interpreted languages typically have a " +"shorter development/debug cycle than compiled ones, though their programs " +"generally also run more slowly. See also :term:`interactive`." +msgstr "" +"Python est un langage interprété, en opposition aux langages compilés, bien " +"que la frontière soit floue en raison de la présence d'un compilateur en " +"code intermédiaire. Cela signifie que les fichiers sources peuvent être " +"exécutés directement, sans avoir à compiler un fichier exécutable " +"intermédiaire. Les langages interprétés ont généralement un cycle de " +"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:638 +msgid "interpreter shutdown" +msgstr "arrêt de l'interpréteur" + +#: glossary.rst:640 +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 " +"critical internal structures. It also makes several calls to the :term:" +"`garbage collector `. This can trigger the execution of " +"code in user-defined destructors or weakref callbacks. Code executed during " +"the shutdown phase can encounter various exceptions as the resources it " +"relies on may not function anymore (common examples are library modules or " +"the warnings machinery)." +msgstr "" +"Lorsqu'on lui demande de s'arrêter, l'interpréteur Python entre dans une " +"phase spéciale où il libère graduellement les ressources allouées, comme les " +"modules ou quelques structures de données internes. Il fait aussi quelques " +"appels au :term:`ramasse-miettes`. Cela peut déclencher l'exécution de code " +"dans des destructeurs ou des fonctions de rappels de *weakrefs*. Le code " +"exécuté lors de l'arrêt peut rencontrer des exceptions puisque les " +"ressources auxquelles il fait appel sont susceptibles de ne plus " +"fonctionner, (typiquement les modules des bibliothèques ou le mécanisme de " +"*warning*)." + +#: glossary.rst:649 +msgid "" +"The main reason for interpreter shutdown is that the ``__main__`` module or " +"the script being run has finished executing." +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:651 +msgid "iterable" +msgstr "itérable" + +#: glossary.rst:653 +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`, " +"and :class:`tuple`) and some non-sequence types like :class:`dict`, :term:" +"`file objects `, and objects of any classes you define with an :" +"meth:`__iter__` method or with a :meth:`__getitem__` method that implements :" +"term:`Sequence ` semantics." +msgstr "" +"Objet capable de renvoyer ses éléments un à un. Par exemple, tous les types " +"séquence (comme :class:`list`, :class:`str`, et :class:`tuple`), quelques " +"autres types comme :class:`dict`, :term:`objets fichiers ` ou " +"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:660 +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 " +"iterable object is passed as an argument to the built-in function :func:" +"`iter`, it returns an iterator for the object. This iterator is good for " +"one pass over the set of values. When using iterables, it is usually not " +"necessary to call :func:`iter` or deal with iterator objects yourself. The " +"``for`` statement does that automatically for you, creating a temporary " +"unnamed variable to hold the iterator for the duration of the loop. See " +"also :term:`iterator`, :term:`sequence`, and :term:`generator`." +msgstr "" +"Les itérables peuvent être utilisés dans des boucles :keyword:`for` et à " +"beaucoup d'autres endroits où une séquence est requise (:func:`zip`, :func:" +"`map`…). Lorsqu'un itérable est passé comme argument à la fonction native :" +"func:`iter`, celle-ci fournit en retour un itérateur sur cet itérable. Cet " +"itérateur n'est valable que pour une seule passe sur le jeu de valeurs. Lors " +"de l'utilisation d'itérables, il n'est habituellement pas nécessaire " +"d'appeler :func:`iter` ou de s'occuper soi-même des objets itérateurs. " +"L'instruction ``for`` le fait automatiquement pour vous, créant une variable " +"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:670 +msgid "iterator" +msgstr "itérateur" + +#: glossary.rst:672 +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 :" +"func:`next`) return successive items in the stream. When no more data are " +"available a :exc:`StopIteration` exception is raised instead. At this " +"point, the iterator object is exhausted and any further calls to its :meth:" +"`__next__` method just raise :exc:`StopIteration` again. Iterators are " +"required to have an :meth:`__iter__` method that returns the iterator object " +"itself so every iterator is also iterable and may be used in most places " +"where other iterables are accepted. One notable exception is code which " +"attempts multiple iteration passes. A container object (such as a :class:" +"`list`) produces a fresh new iterator each time you pass it to the :func:" +"`iter` function or use it in a :keyword:`for` loop. Attempting this with an " +"iterator will just return the same exhausted iterator object used in the " +"previous iteration pass, making it appear like an empty container." +msgstr "" +"Objet représentant un flux de donnée. Des appels successifs à la méthode :" +"meth:`~iterator.__next__` de l'itérateur (ou le passer à la fonction native :" +"func:`next`) donne successivement les objets du flux. Lorsque plus aucune " +"donnée n'est disponible, une exception :exc:`StopIteration` est levée. À ce " +"point, l'itérateur est épuisé et tous les appels suivants à sa méthode :meth:" +"`__next__` lèveront encore une exception :exc:`StopIteration`. Les " +"itérateurs doivent avoir une méthode :meth:`__iter__` qui renvoie l'objet " +"itérateur lui-même, de façon à ce que chaque itérateur soit aussi itérable " +"et puisse être utilisé dans la plupart des endroits où d'autres itérables " +"sont attendus. Une exception notable est un code qui tente plusieurs " +"itérations complètes. Un objet conteneur, (tel que :class:`list`) produit un " +"nouvel itérateur neuf à chaque fois qu'il est passé à la fonction :func:" +"`iter` ou s'il est utilisé dans une boucle :keyword:`for`. Faire ceci sur un " +"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:687 +msgid "More information can be found in :ref:`typeiter`." +msgstr "Vous trouverez davantage d'informations dans :ref:`typeiter`." + +#: glossary.rst:691 +msgid "" +"CPython does not consistently apply the requirement that an iterator define :" +"meth:`__iter__`." +msgstr "" +"CPython n'est pas toujours cohérent sur le fait de demander ou non à un " +"itérateur de définir :meth:`__iter__`." + +#: glossary.rst:693 +msgid "key function" +msgstr "fonction clé" + +#: glossary.rst:695 +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 " +"produce a sort key that is aware of locale specific sort conventions." +msgstr "" +"Une fonction clé est un objet appelable qui renvoie une valeur à fins de tri " +"ou de classement. Par exemple, la fonction :func:`locale.strxfrm` est " +"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:700 +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`, :" +"meth:`list.sort`, :func:`heapq.merge`, :func:`heapq.nsmallest`, :func:`heapq." +"nlargest`, and :func:`itertools.groupby`." +msgstr "" +"Plusieurs outils dans Python acceptent des fonctions clés pour déterminer " +"comment les éléments sont classés ou groupés. On peut citer les fonctions :" +"func:`min`, :func:`max`, :func:`sorted`, :meth:`list.sort`, :func:`heapq." +"merge`, :func:`heapq.nsmallest`, :func:`heapq.nlargest` et :func:`itertools." +"groupby`." + +#: glossary.rst:706 +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. " +"Alternatively, a key function can be built from a :keyword:`lambda` " +"expression such as ``lambda r: (r[0], r[2])``. Also, the :mod:`operator` " +"module provides three key function constructors: :func:`~operator." +"attrgetter`, :func:`~operator.itemgetter`, and :func:`~operator." +"methodcaller`. See the :ref:`Sorting HOW TO ` for examples of " +"how to create and use key functions." +msgstr "" +"Il existe plusieurs moyens de créer une fonction clé. Par exemple, la " +"méthode :meth:`str.lower` peut servir de fonction clé pour effectuer des " +"recherches insensibles à la casse. Aussi, il est possible de créer des " +"fonctions clés avec des expressions :keyword:`lambda`, comme ``lambda r: " +"(r[0], r[2])``. Vous noterez que le module :mod:`operator` propose des " +"constructeurs de fonctions clefs : :func:`~operator.attrgetter`, :func:" +"`~operator.itemgetter` et :func:`~operator.methodcaller`. Voir :ref:`Comment " +"Trier ` pour des exemples de création et d'utilisation de " +"fonctions clefs." + +#: glossary.rst:714 +msgid "keyword argument" +msgstr "argument nommé" + +#: glossary.rst:1005 +msgid "See :term:`argument`." +msgstr "Voir :term:`argument`." + +#: glossary.rst:717 +msgid "lambda" +msgstr "lambda" + +#: glossary.rst:719 +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 " +"function is ``lambda [parameters]: expression``" +msgstr "" +"Fonction anonyme sous la forme d'une :term:`expression` et ne contenant " +"qu'une seule expression, exécutée lorsque la fonction est appelée. La " +"syntaxe pour créer des fonctions lambda est : ``lambda [parameters]: " +"expression``" + +#: glossary.rst:722 +msgid "LBYL" +msgstr "LBYL" + +#: glossary.rst:724 +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` " +"approach and is characterized by the presence of many :keyword:`if` " +"statements." +msgstr "" +"Regarde avant de sauter, (*Look before you leap* en anglais). Ce style de " +"programmation consiste à vérifier des conditions avant d'effectuer des " +"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:729 +msgid "" +"In a multi-threaded environment, the LBYL approach can risk introducing a " +"race condition between \"the looking\" and \"the leaping\". For example, " +"the code, ``if key in mapping: return mapping[key]`` can fail if another " +"thread removes *key* from *mapping* after the test, but before the lookup. " +"This issue can be solved with locks or by using the EAFP approach." +msgstr "" +"Dans un environnement avec plusieurs fils d'exécution (*multi-threaded* en " +"anglais), le style *LBYL* peut engendrer un séquencement critique (*race " +"condition* en anglais) entre le \"regarde\" et le \"sauter\". Par exemple, " +"le code ``if key in mapping: return mapping[key]`` peut échouer si un autre " +"fil d'exécution supprime la clé *key* du *mapping* après le test mais avant " +"l'accès. Ce problème peut être résolu avec des verrous (*locks*) ou avec " +"l'approche EAFP." + +#: glossary.rst:734 +msgid "locale encoding" +msgstr "encodage régional" + +#: glossary.rst:736 +msgid "" +"On Unix, it is the encoding of the LC_CTYPE locale. It can be set with " +"``locale.setlocale(locale.LC_CTYPE, new_locale)``." +msgstr "" +"Sous Unix, il est défini par la variable régionale LC_CTYPE. Il peut être " +"modifié par ``locale.setlocale(locale.LC_CTYPE, new_locale)``." + +#: glossary.rst:739 +msgid "On Windows, it is the ANSI code page (ex: ``cp1252``)." +msgstr "Sous Windows, c'est un encodage ANSI (ex. : ``cp1252``)." + +#: glossary.rst:741 +msgid "" +"``locale.getpreferredencoding(False)`` can be used to get the locale " +"encoding." +msgstr "" +"``locale.getpreferredencoding(False)`` permet de récupérer l'encodage " +"régional." + +#: glossary.rst:744 +msgid "" +"Python uses the :term:`filesystem encoding and error handler` to convert " +"between Unicode filenames and bytes filenames." +msgstr "" +"Python utilise l':term:`encodage du système de fichier et gestionnaire " +"d'erreur` pour les conversions de " +"noms de fichier entre Unicode et octets." + +#: glossary.rst:746 +msgid "list" +msgstr "list" + +#: glossary.rst:748 +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 " +"O(1)." +msgstr "" +"Un type natif de :term:`sequence` dans Python. En dépit de son nom, une " +"``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:751 +msgid "list comprehension" +msgstr "liste en compréhension (ou liste en intension)" + +#: glossary.rst:753 +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 " +"range(256) if x % 2 == 0]`` generates a list of strings containing even hex " +"numbers (0x..) in the range from 0 to 255. The :keyword:`if` clause is " +"optional. If omitted, all elements in ``range(256)`` are processed." +msgstr "" +"Écriture concise pour manipuler tout ou partie des éléments d'une séquence " +"et renvoyer une liste contenant les résultats. ``result = ['{:#04x}'." +"format(x) for x in range(256) if x % 2 == 0]`` génère la liste composée des " +"nombres pairs de 0 à 255 écrits sous formes de chaînes de caractères et en " +"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:759 +msgid "loader" +msgstr "chargeur" + +#: glossary.rst:761 +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:" +"`302` for details and :class:`importlib.abc.Loader` for an :term:`abstract " +"base class`." +msgstr "" +"Objet qui charge un module. Il doit définir une méthode nommée :meth:" +"`load_module`. Un chargeur est typiquement donné par un :term:`chercheur " +"`. Voir la :pep:`302` pour plus de détails et :class:`importlib.ABC." +"Loader` pour sa :term:`classe de base abstraite`." + +#: glossary.rst:765 +msgid "magic method" +msgstr "méthode magique" + +#: glossary.rst:769 +msgid "An informal synonym for :term:`special method`." +msgstr "Un synonyme informel de :term:`special method`." + +#: glossary.rst:770 +msgid "mapping" +msgstr "tableau de correspondances" + +#: glossary.rst:772 +msgid "" +"A container object that supports arbitrary key lookups and implements the " +"methods specified in the :class:`~collections.abc.Mapping` or :class:" +"`~collections.abc.MutableMapping` :ref:`abstract base classes `. Examples include :class:`dict`, :class:" +"`collections.defaultdict`, :class:`collections.OrderedDict` and :class:" +"`collections.Counter`." +msgstr "" +"(*mapping* en anglais) Conteneur permettant de rechercher des éléments à " +"partir de clés et implémentant les méthodes spécifiées dans les :ref:" +"`classes de base abstraites ` :class:" +"`collections.abc.Mapping` ou :class:`collections.abc.MutableMapping`. Les " +"classes suivantes sont des exemples de tableaux de correspondances : :class:" +"`dict`, :class:`collections.defaultdict`, :class:`collections.OrderedDict` " +"et :class:`collections.Counter`." + +#: glossary.rst:778 +msgid "meta path finder" +msgstr "chercheur dans les méta-chemins" + +#: glossary.rst:780 +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 `." +msgstr "" +"Un :term:`chercheur ` renvoyé par une recherche dans :data:`sys." +"meta_path`. Les chercheurs dans les méta-chemins ressemblent, mais sont " +"différents des :term:`chercheurs d'entrée dans path `." + +#: glossary.rst:784 +msgid "" +"See :class:`importlib.abc.MetaPathFinder` for the methods that meta path " +"finders implement." +msgstr "" +"Voir :class:`importlib.abc.MetaPathFinder` pour les méthodes que les " +"chercheurs dans les méta-chemins doivent implémenter." + +#: glossary.rst:786 +msgid "metaclass" +msgstr "métaclasse" + +#: glossary.rst:788 +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 " +"taking those three arguments and creating the class. Most object oriented " +"programming languages provide a default implementation. What makes Python " +"special is that it is possible to create custom metaclasses. Most users " +"never need this tool, but when the need arises, metaclasses can provide " +"powerful, elegant solutions. They have been used for logging attribute " +"access, adding thread-safety, tracking object creation, implementing " +"singletons, and many other tasks." +msgstr "" +"Classe d'une classe. Les définitions de classe créent un nom pour la classe, " +"un dictionnaire de classe et une liste de classes parentes. La métaclasse a " +"pour rôle de réunir ces trois paramètres pour construire la classe. La " +"plupart des langages orientés objet fournissent une implémentation par " +"défaut. La particularité de Python est la possibilité de créer des " +"métaclasses personnalisées. La plupart des utilisateurs n'auront jamais " +"besoin de cet outil, mais lorsque le besoin survient, les métaclasses " +"offrent des solutions élégantes et puissantes. Elles sont utilisées pour " +"journaliser les accès à des propriétés, rendre sûrs les environnements " +"*multi-threads*, suivre la création d'objets, implémenter des singletons et " +"bien d'autres tâches." + +#: glossary.rst:798 +msgid "More information can be found in :ref:`metaclasses`." +msgstr "Plus d'informations sont disponibles dans : :ref:`metaclasses`." + +#: glossary.rst:799 +msgid "method" +msgstr "méthode" + +#: glossary.rst:801 +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 " +"first :term:`argument` (which is usually called ``self``). See :term:" +"`function` and :term:`nested scope`." +msgstr "" +"Fonction définie à l'intérieur d'une classe. Lorsqu'elle est appelée comme " +"un attribut d'une instance de cette classe, la méthode reçoit l'instance en " +"premier :term:`argument` (qui, par convention, est habituellement nommé " +"``self``). Voir :term:`function` et :term:`nested scope`." + +#: glossary.rst:805 +msgid "method resolution order" +msgstr "ordre de résolution des méthodes" + +#: glossary.rst:807 +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 `_ for details of the algorithm " +"used by the Python interpreter since the 2.3 release." +msgstr "" +"L'ordre de résolution des méthodes (*MRO* pour *Method Resolution Order* en " +"anglais) est, lors de la recherche d'un attribut dans les classes parentes, " +"la façon dont l'interpréteur Python classe ces classes parentes. Voir `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:811 +msgid "module" +msgstr "module" + +#: glossary.rst:813 +msgid "" +"An object that serves as an organizational unit of Python code. Modules " +"have a namespace containing arbitrary Python objects. Modules are loaded " +"into Python by the process of :term:`importing`." +msgstr "" +"Objet utilisé pour organiser une portion unitaire de code en Python. Les " +"modules ont un espace de nommage et peuvent contenir n'importe quels objets " +"Python. Charger des modules est appelé :term:`importer `." + +#: glossary.rst:817 +msgid "See also :term:`package`." +msgstr "Voir aussi :term:`paquet`." + +#: glossary.rst:818 +msgid "module spec" +msgstr "spécificateur de module" + +#: glossary.rst:820 +msgid "" +"A namespace containing the import-related information used to load a module. " +"An instance of :class:`importlib.machinery.ModuleSpec`." +msgstr "" +"Espace de nommage contenant les informations, relatives à l'importation, " +"utilisées pour charger un module. C'est une instance de la classe :class:" +"`importlib.machinery.ModuleSpec`." + +#: glossary.rst:822 +msgid "MRO" +msgstr "MRO" + +#: glossary.rst:824 +msgid "See :term:`method resolution order`." +msgstr "Voir :term:`ordre de résolution des méthodes`." + +#: glossary.rst:825 +msgid "mutable" +msgstr "muable" + +#: glossary.rst:827 +msgid "" +"Mutable objects can change their value but keep their :func:`id`. See also :" +"term:`immutable`." +msgstr "" +"Un objet muable peut changer de valeur tout en gardant le même :func:`id`. " +"Voir aussi :term:`immuable`." + +#: glossary.rst:829 +msgid "named tuple" +msgstr "n-uplet nommé" + +#: glossary.rst:831 +msgid "" +"The term \"named tuple\" applies to any type or class that inherits from " +"tuple and whose indexable elements are also accessible using named " +"attributes. The type or class may have other features as well." +msgstr "" +"Le terme \"n-uplet nommé\" s'applique à tous les types ou classes qui " +"héritent de la classe ``tuple`` et dont les éléments indexables sont aussi " +"accessibles en utilisant des attributs nommés. Les types et classes peuvent " +"avoir aussi d'autres caractéristiques." + +#: glossary.rst:835 +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." +"float_info`::" +msgstr "" +"Plusieurs types natifs sont appelés n-uplets, y compris les valeurs " +"retournées par :func:`time.localtime` et :func:`os.stat`. Un autre exemple " +"est :data:`sys.float_info` ::" + +#: glossary.rst:846 +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 " +"that inherits from :class:`tuple` and that defines named fields. Such a " +"class can be written by hand or it can be created with the factory function :" +"func:`collections.namedtuple`. The latter technique also adds some extra " +"methods that may not be found in hand-written or built-in named tuples." +msgstr "" +"Certains *n-uplets nommés* sont des types natifs (comme les exemples ci-" +"dessus). Sinon, un *n-uplet nommé* peut être créé à partir d'une définition " +"de classe habituelle qui hérite de :class:`tuple` et qui définit les champs " +"nommés. Une telle classe peut être écrite à la main ou être créée avec la " +"fonction :func:`collections.namedtuple`. Cette dernière méthode ajoute des " +"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:853 +msgid "namespace" +msgstr "espace de nommage" + +#: glossary.rst:855 +msgid "" +"The place where a variable is stored. Namespaces are implemented as " +"dictionaries. There are the local, global and built-in namespaces as well " +"as nested namespaces in objects (in methods). Namespaces support modularity " +"by preventing naming conflicts. For instance, the functions :func:`builtins." +"open <.open>` and :func:`os.open` are distinguished by their namespaces. " +"Namespaces also aid readability and maintainability by making it clear which " +"module implements a function. For instance, writing :func:`random.seed` or :" +"func:`itertools.islice` makes it clear that those functions are implemented " +"by the :mod:`random` and :mod:`itertools` modules, respectively." +msgstr "" +"L'endroit où une variable est stockée. Les espaces de nommage sont " +"implémentés avec des dictionnaires. Il existe des espaces de nommage " +"globaux, natifs ou imbriqués dans les objets (dans les méthodes). Les " +"espaces de nommage favorisent la modularité car ils permettent d'éviter les " +"conflits de noms. Par exemple, les fonctions :func:`builtins.open <.open>` " +"et :func:`os.open` sont différenciées par leurs espaces de nom. Les espaces " +"de nommage aident aussi à la lisibilité et la maintenabilité en rendant " +"clair quel module implémente une fonction. Par exemple, écrire :func:`random." +"seed` ou :func:`itertools.islice` affiche clairement que ces fonctions sont " +"implémentées respectivement dans les modules :mod:`random` et :mod:" +"`itertools`." + +#: glossary.rst:865 +msgid "namespace package" +msgstr "paquet-espace de nommage" + +#: glossary.rst:867 +msgid "" +"A :pep:`420` :term:`package` which serves only as a container for " +"subpackages. Namespace packages may have no physical representation, and " +"specifically are not like a :term:`regular package` because they have no " +"``__init__.py`` file." +msgstr "" +"Un :term:`paquet` tel que défini dans la :pep:`421` qui ne sert qu'à " +"contenir des sous-paquets. Les paquets-espace de nommage peuvent n'avoir " +"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:872 +msgid "See also :term:`module`." +msgstr "Voir aussi :term:`module`." + +#: glossary.rst:873 +msgid "nested scope" +msgstr "portée imbriquée" + +#: glossary.rst:875 +msgid "" +"The ability to refer to a variable in an enclosing definition. For " +"instance, a function defined inside another function can refer to variables " +"in the outer function. Note that nested scopes by default work only for " +"reference and not for assignment. Local variables both read and write in " +"the innermost scope. Likewise, global variables read and write to the " +"global namespace. The :keyword:`nonlocal` allows writing to outer scopes." +msgstr "" +"Possibilité de faire référence à une variable déclarée dans une définition " +"englobante. Typiquement, une fonction définie à l'intérieur d'une autre " +"fonction a accès aux variables de cette dernière. Souvenez-vous cependant " +"que cela ne fonctionne que pour accéder à des variables, pas pour les " +"assigner. Les variables locales sont lues et assignées dans l'espace de " +"nommage le plus proche. Tout comme les variables globales qui sont stockés " +"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:882 +msgid "new-style class" +msgstr "nouvelle classe" + +#: glossary.rst:884 +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, " +"versatile features like :attr:`~object.__slots__`, descriptors, properties, :" +"meth:`__getattribute__`, class methods, and static methods." +msgstr "" +"Ancien nom pour l'implémentation actuelle des classes, pour tous les objets. " +"Dans les anciennes versions de Python, seules les nouvelles classes " +"pouvaient utiliser les nouvelles fonctionnalités telles que :attr:`~object." +"__slots__`, les descripteurs, les propriétés, :meth:`__getattribute__`, les " +"méthodes de classe et les méthodes statiques." + +#: glossary.rst:888 +msgid "object" +msgstr "objet" + +#: glossary.rst:890 +msgid "" +"Any data with state (attributes or value) and defined behavior (methods). " +"Also the ultimate base class of any :term:`new-style class`." +msgstr "" +"N'importe quelle donnée comportant des états (sous forme d'attributs ou " +"d'une valeur) et un comportement (des méthodes). C'est aussi (``object``) " +"l'ancêtre commun à absolument toutes les :term:`nouvelles classes `." + +#: glossary.rst:893 +msgid "package" +msgstr "paquet" + +#: glossary.rst:895 +#, fuzzy +msgid "" +"A Python :term:`module` which can contain submodules or recursively, " +"subpackages. Technically, a package is a Python module with a ``__path__`` " +"attribute." +msgstr "" +":term:`module` Python qui peut contenir des sous-modules ou des sous-" +"paquets. Techniquement, un paquet est un module qui possède un attribut " +"``__path__``." + +#: glossary.rst:899 +msgid "See also :term:`regular package` and :term:`namespace package`." +msgstr "Voir aussi :term:`paquet classique` et :term:`namespace package`." + +#: glossary.rst:900 +msgid "parameter" +msgstr "paramètre" + +#: glossary.rst:902 +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 " +"accept. There are five kinds of parameter:" +msgstr "" +"Entité nommée dans la définition d'une :term:`fonction` (ou méthode), " +"décrivant un :term:`argument` (ou dans certains cas des arguments) que la " +"fonction accepte. Il existe cinq sortes de paramètres :" + +#: glossary.rst:906 +msgid "" +":dfn:`positional-or-keyword`: specifies an argument that can be passed " +"either :term:`positionally ` or as a :term:`keyword argument " +"`. This is the default kind of parameter, for example *foo* and " +"*bar* in the following::" +msgstr "" +":dfn:`positional-or-keyword` : l'argument peut être passé soit par sa :term:" +"`position `, soit en tant que :term:`argument nommé `. " +"C'est le type de paramètre par défaut. Par exemple, *foo* et *bar* dans " +"l'exemple suivant ::" + +#: glossary.rst:915 +msgid "" +":dfn:`positional-only`: specifies an argument that can be supplied only by " +"position. Positional-only parameters can be defined by including a ``/`` " +"character in the parameter list of the function definition after them, for " +"example *posonly1* and *posonly2* in the following::" +msgstr "" +":dfn:`positional-only` : définit un argument qui ne peut être fourni que par " +"position. Les paramètres *positional-only* peuvent être définis en insérant " +"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:924 +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-" +"positional parameter or bare ``*`` in the parameter list of the function " +"definition before them, for example *kw_only1* and *kw_only2* in the " +"following::" +msgstr "" +":dfn:`keyword-only` : l'argument ne peut être fourni que nommé. Les " +"paramètres *keyword-only* peuvent être définis en utilisant un seul " +"paramètre *var-positional*, ou en ajoutant une étoile (``*``) seule dans la " +"liste des paramètres avant eux. Par exemple, *kw_only1* et *kw_only2* dans " +"le code suivant ::" + +#: glossary.rst:932 +msgid "" +":dfn:`var-positional`: specifies that an arbitrary sequence of positional " +"arguments can be provided (in addition to any positional arguments already " +"accepted by other parameters). Such a parameter can be defined by " +"prepending the parameter name with ``*``, for example *args* in the " +"following::" +msgstr "" +":dfn:`var-positional` : une séquence d'arguments positionnels peut être " +"fournie (en plus de tous les arguments positionnels déjà acceptés par " +"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:940 +msgid "" +":dfn:`var-keyword`: specifies that arbitrarily many keyword arguments can be " +"provided (in addition to any keyword arguments already accepted by other " +"parameters). Such a parameter can be defined by prepending the parameter " +"name with ``**``, for example *kwargs* in the example above." +msgstr "" +":dfn:`var-keyword` : une quantité arbitraire d'arguments peut être passée, " +"chacun étant nommé (en plus de tous les arguments nommés déjà acceptés par " +"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:946 +msgid "" +"Parameters can specify both optional and required arguments, as well as " +"default values for some optional arguments." +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:949 +msgid "" +"See also the :term:`argument` glossary entry, the FAQ question on :ref:`the " +"difference between arguments and parameters `, " +"the :class:`inspect.Parameter` class, the :ref:`function` section, and :pep:" +"`362`." +msgstr "" +"Voir aussi :term:`argument` dans le glossaire, la question sur :ref:`la " +"différence entre les arguments et les paramètres ` dans la FAQ, la classe :class:`inspect.Parameter`, la section :" +"ref:`function` et la :pep:`362`." + +#: glossary.rst:953 +msgid "path entry" +msgstr "entrée de chemin" + +#: glossary.rst:955 +msgid "" +"A single location on the :term:`import path` which the :term:`path based " +"finder` consults to find modules for importing." +msgstr "" +"Emplacement dans le :term:`chemin des importations ` (*import " +"path* en anglais, d'où le *path*) que le :term:`chercheur basé sur les " +"chemins ` consulte pour trouver des modules à importer." + +#: glossary.rst:957 +msgid "path entry finder" +msgstr "chercheur de chemins" + +#: glossary.rst:959 +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:" +"`path entry`." +msgstr "" +":term:`chercheur ` renvoyé par un appelable sur un :data:`sys." +"path_hooks` (c'est-à-dire un :term:`point d'entrée pour la recherche dans " +"path `) qui sait où trouver des modules lorsqu'on lui donne " +"une :term:`entrée de path `." + +#: glossary.rst:963 +msgid "" +"See :class:`importlib.abc.PathEntryFinder` for the methods that path entry " +"finders implement." +msgstr "" +"Voir :class:`importlib.abc.PathEntryFinder` pour les méthodes qu'un " +"chercheur d'entrée dans *path* doit implémenter." + +#: glossary.rst:965 +msgid "path entry hook" +msgstr "point d'entrée pour la recherche dans *path*" + +#: glossary.rst:967 +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 " +"entry`." +msgstr "" +"Appelable dans la liste :data:`sys.path_hook` qui donne un :term:`chercheur " +"d'entrée dans path ` s'il sait où trouver des modules " +"pour une :term:`entrée dans path ` donnée." + +#: glossary.rst:970 +msgid "path based finder" +msgstr "chercheur basé sur les chemins" + +#: glossary.rst:972 +msgid "" +"One of the default :term:`meta path finders ` which " +"searches an :term:`import path` for modules." +msgstr "" +"L'un des :term:`chercheurs dans les méta-chemins ` par " +"défaut qui cherche des modules dans un :term:`chemin des importations " +"`." + +#: glossary.rst:974 +msgid "path-like object" +msgstr "objet simili-chemin" + +#: glossary.rst:976 +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 " +"implementing the :class:`os.PathLike` protocol. An object that supports the :" +"class:`os.PathLike` protocol can be converted to a :class:`str` or :class:" +"`bytes` file system path by calling the :func:`os.fspath` function; :func:" +"`os.fsdecode` and :func:`os.fsencode` can be used to guarantee a :class:" +"`str` or :class:`bytes` result instead, respectively. Introduced by :pep:" +"`519`." +msgstr "" +"Objet représentant un chemin du système de fichiers. Un objet simili-chemin " +"est un objet :class:`str` ou un objet :class:`bytes` représentant un chemin " +"ou un objet implémentant le protocole :class:`os.PathLike`. Un objet qui " +"accepte le protocole :class:`os.PathLike` peut être converti en un chemin :" +"class:`str` ou :class:`bytes` du système de fichiers en appelant la " +"fonction :func:`os.fspath`. :func:`os.fsdecode` et :func:`os.fsencode` " +"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:984 +msgid "PEP" +msgstr "PEP" + +#: glossary.rst:986 +msgid "" +"Python Enhancement Proposal. A PEP is a design document providing " +"information to the Python community, or describing a new feature for Python " +"or its processes or environment. PEPs should provide a concise technical " +"specification and a rationale for proposed features." +msgstr "" +"*Python Enhancement Proposal* (Proposition d'amélioration Python). Un PEP " +"est un document de conception fournissant des informations à la communauté " +"Python ou décrivant une nouvelle fonctionnalité pour Python, ses processus " +"ou son environnement. Les PEP doivent fournir une spécification technique " +"concise et une justification des fonctionnalités proposées." + +#: glossary.rst:992 +msgid "" +"PEPs are intended to be the primary mechanisms for proposing major new " +"features, for collecting community input on an issue, and for documenting " +"the design decisions that have gone into Python. The PEP author is " +"responsible for building consensus within the community and documenting " +"dissenting opinions." +msgstr "" +"Les PEPs sont censés être les principaux mécanismes pour proposer de " +"nouvelles fonctionnalités majeures, pour recueillir les commentaires de la " +"communauté sur une question et pour documenter les décisions de conception " +"qui sont intégrées en Python. L’auteur du PEP est responsable de " +"l’établissement d’un consensus au sein de la communauté et de documenter les " +"opinions contradictoires." + +#: glossary.rst:998 +msgid "See :pep:`1`." +msgstr "Voir :pep:`1`." + +#: glossary.rst:999 +msgid "portion" +msgstr "portion" + +#: glossary.rst:1001 +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`." +msgstr "" +"Jeu de fichiers dans un seul dossier (pouvant être stocké sous forme de " +"fichier zip) qui contribue à l'espace de nommage d'un paquet, tel que défini " +"dans la :pep:`420`." + +#: glossary.rst:1003 +msgid "positional argument" +msgstr "argument positionnel" + +#: glossary.rst:1006 +msgid "provisional API" +msgstr "API provisoire" + +#: glossary.rst:1008 +msgid "" +"A provisional API is one which has been deliberately excluded from the " +"standard library's backwards compatibility guarantees. While major changes " +"to such interfaces are not expected, as long as they are marked provisional, " +"backwards incompatible changes (up to and including removal of the " +"interface) may occur if deemed necessary by core developers. Such changes " +"will not be made gratuitously -- they will occur only if serious fundamental " +"flaws are uncovered that were missed prior to the inclusion of the API." +msgstr "" +"Une API provisoire est une API qui n'offre aucune garantie de " +"rétrocompatibilité (la bibliothèque standard exige la rétrocompatibilité). " +"Bien que des changements majeurs d'une telle interface ne soient pas " +"attendus, tant qu'elle est étiquetée provisoire, des changements cassant la " +"rétrocompatibilité (y compris sa suppression complète) peuvent survenir si " +"les développeurs principaux le jugent nécessaire. Ces modifications ne " +"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:1017 +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 " +"backwards compatible resolution to any identified problems." +msgstr "" +"Même pour les API provisoires, les changements cassant la rétrocompatibilité " +"sont considérés comme des \"solutions de dernier recours\". Tout ce qui est " +"possible sera fait pour tenter de résoudre les problèmes en conservant la " +"rétrocompatibilité." + +#: glossary.rst:1021 +msgid "" +"This process allows the standard library to continue to evolve over time, " +"without locking in problematic design errors for extended periods of time. " +"See :pep:`411` for more details." +msgstr "" +"Ce processus permet à la bibliothèque standard de continuer à évoluer avec " +"le temps, sans se bloquer longtemps sur des erreurs d'architecture. Voir la :" +"pep:`411` pour plus de détails." + +#: glossary.rst:1024 +msgid "provisional package" +msgstr "paquet provisoire" + +#: glossary.rst:1026 +msgid "See :term:`provisional API`." +msgstr "Voir :term:`provisional API`." + +#: glossary.rst:1027 +msgid "Python 3000" +msgstr "Python 3000" + +#: glossary.rst:1029 +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 " +"\"Py3k\"." +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:1032 +msgid "Pythonic" +msgstr "*Pythonique*" + +#: glossary.rst:1034 +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 " +"other languages. For example, a common idiom in Python is to loop over all " +"elements of an iterable using a :keyword:`for` statement. Many other " +"languages don't have this type of construct, so people unfamiliar with " +"Python sometimes use a numerical counter instead::" +msgstr "" +"Idée, ou bout de code, qui colle aux idiomes de Python plutôt qu'aux " +"concepts communs rencontrés dans d'autres langages. Par exemple, il est " +"idiomatique en Python de parcourir les éléments d'un itérable en utilisant :" +"keyword:`for`. Beaucoup d'autres langages n'ont pas cette possibilité, donc " +"les gens qui ne sont pas habitués à Python utilisent parfois un compteur " +"numérique à la place ::" + +#: glossary.rst:1044 +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:1048 +msgid "qualified name" +msgstr "nom qualifié" + +#: glossary.rst:1050 +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 " +"top-level functions and classes, the qualified name is the same as the " +"object's name::" +msgstr "" +"Nom, comprenant des points, montrant le \"chemin\" de l'espace de nommage " +"global d'un module vers une classe, fonction ou méthode définie dans ce " +"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:1067 +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." +"text``::" +msgstr "" +"Lorsqu'il est utilisé pour nommer des modules, le *nom qualifié complet* " +"(*fully qualified name - FQN* en anglais) signifie le chemin complet (séparé " +"par des points) vers le module, incluant tous les paquets parents. Par " +"exemple : ``email.mime.text`` ::" + +#: glossary.rst:1074 +msgid "reference count" +msgstr "nombre de références" + +#: glossary.rst:1076 +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 " +"not visible to Python code, but it is a key element of the :term:`CPython` " +"implementation. The :mod:`sys` module defines a :func:`~sys.getrefcount` " +"function that programmers can call to return the reference count for a " +"particular object." +msgstr "" +"Nombre de références à un objet. Lorsque le nombre de références à un objet " +"descend à zéro, l'objet est désalloué. Le comptage de référence n'est " +"généralement pas visible dans le code Python, mais c'est un élément clé de " +"l'implémentation :term:`CPython`. Le module :mod:`sys` définit une fonction :" +"func:`~sys.getrefcount` que les développeurs peuvent utiliser pour obtenir " +"le nombre de références à un objet donné." + +#: glossary.rst:1082 +msgid "regular package" +msgstr "paquet classique" + +#: glossary.rst:1084 +msgid "" +"A traditional :term:`package`, such as a directory containing an ``__init__." +"py`` file." +msgstr "" +":term:`paquet` traditionnel, tel qu'un dossier contenant un fichier " +"``__init__.py``." + +#: glossary.rst:1087 +msgid "See also :term:`namespace package`." +msgstr "Voir aussi :term:`paquet-espace de nommage `." + +#: glossary.rst:1088 +msgid "__slots__" +msgstr "__slots__" + +#: glossary.rst:1090 +msgid "" +"A declaration inside a class that saves memory by pre-declaring space for " +"instance attributes and eliminating instance dictionaries. Though popular, " +"the technique is somewhat tricky to get right and is best reserved for rare " +"cases where there are large numbers of instances in a memory-critical " +"application." +msgstr "" +"Déclaration dans une classe qui économise de la mémoire en pré-allouant de " +"l'espace pour les attributs des instances et qui élimine le dictionnaire " +"(des attributs) des instances. Bien que populaire, cette technique est " +"difficile à maîtriser et devrait être réservée à de rares cas où un grand " +"nombre d'instances dans une application devient un sujet critique pour la " +"mémoire." + +#: glossary.rst:1095 +msgid "sequence" +msgstr "séquence" + +#: glossary.rst:1097 +msgid "" +"An :term:`iterable` which supports efficient element access using integer " +"indices via the :meth:`__getitem__` special method and defines a :meth:" +"`__len__` method that returns the length of the sequence. Some built-in " +"sequence types are :class:`list`, :class:`str`, :class:`tuple`, and :class:" +"`bytes`. Note that :class:`dict` also supports :meth:`__getitem__` and :meth:" +"`__len__`, but is considered a mapping rather than a sequence because the " +"lookups use arbitrary :term:`immutable` keys rather than integers." +msgstr "" +":term:`itérable` qui offre un accès efficace à ses éléments par un indice " +"sous forme de nombre entier via la méthode spéciale :meth:`__getitem__` et " +"qui définit une méthode :meth:`__len__` donnant sa taille. Voici quelques " +"séquences natives : :class:`list`, :class:`str`, :class:`tuple`, et :class:" +"`bytes`. Notez que :class:`dict` possède aussi une méthode :meth:" +"`__getitem__` et une méthode :meth:`__len__`, mais il est considéré comme un " +"*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:1106 +msgid "" +"The :class:`collections.abc.Sequence` abstract base class defines a much " +"richer interface that goes beyond just :meth:`__getitem__` and :meth:" +"`__len__`, adding :meth:`count`, :meth:`index`, :meth:`__contains__`, and :" +"meth:`__reversed__`. Types that implement this expanded interface can be " +"registered explicitly using :func:`~abc.ABCMeta.register`." +msgstr "" +"La classe abstraite de base :class:`collections.abc.Sequence` définit une " +"interface plus riche qui va au-delà des simples :meth:`__getitem__` et :meth:" +"`__len__`, en ajoutant :meth:`count`, :meth:`index`, :meth:`__contains__` " +"et :meth:`__reversed__`. Les types qui implémentent cette interface étendue " +"peuvent s'enregistrer explicitement en utilisant :func:`~abc.register`." + +#: glossary.rst:1113 +msgid "set comprehension" +msgstr "ensemble en compréhension (ou ensemble en intension)" + +#: glossary.rst:1115 +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 " +"not in 'abc'}`` generates the set of strings ``{'r', 'd'}``. See :ref:" +"`comprehensions`." +msgstr "" +"Une façon compacte de traiter tout ou partie des éléments d'un itérable et " +"de renvoyer un *set* avec les résultats. ``results = {c for c in " +"'abracadabra' if c not in 'abc'}`` génère l'ensemble contenant les lettres " +"« r » et « d » ``{'r', 'd'}``. Voir :ref:`comprehensions`." + +#: glossary.rst:1119 +msgid "single dispatch" +msgstr "distribution simple" + +#: glossary.rst:1121 +msgid "" +"A form of :term:`generic function` dispatch where the implementation is " +"chosen based on the type of a single argument." +msgstr "" +"Forme de distribution, comme les :term:`fonction génériques `, où l'implémentation est choisie en fonction du type d'un seul " +"argument." + +#: glossary.rst:1123 +msgid "slice" +msgstr "tranche" + +#: glossary.rst:1125 +msgid "" +"An object usually containing a portion of a :term:`sequence`. A slice is " +"created using the subscript notation, ``[]`` with colons between numbers " +"when several are given, such as in ``variable_name[1:3:5]``. The bracket " +"(subscript) notation uses :class:`slice` objects internally." +msgstr "" +"(*slice* en anglais), un objet contenant habituellement une portion de :term:" +"`séquence`. Une tranche est créée en utilisant la notation ``[]`` avec des " +"``:`` entre les nombres lorsque plusieurs sont fournis, comme dans " +"``variable_name[1:3:5]``. Cette notation utilise des objets :class:`slice` " +"en interne." + +#: glossary.rst:1129 +msgid "special method" +msgstr "méthode spéciale" + +#: glossary.rst:1133 +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 " +"with double underscores. Special methods are documented in :ref:" +"`specialnames`." +msgstr "" +"(*special method* en anglais) Méthode appelée implicitement par Python pour " +"exécuter une opération sur un type, comme une addition. De telles méthodes " +"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:1137 +msgid "statement" +msgstr "instruction" + +#: glossary.rst:1139 +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 :" +"keyword:`if`, :keyword:`while` or :keyword:`for`." +msgstr "" +"Une instruction (*statement* en anglais) est un composant d'un \"bloc\" de " +"code. Une instruction est soit une :term:`expression`, soit une ou plusieurs " +"constructions basées sur un mot-clé, comme :keyword:`if`, :keyword:`while` " +"ou :keyword:`for`." + +#: glossary.rst:1142 +msgid "strong reference" +msgstr "référence forte" + +#: glossary.rst:1144 +msgid "" +"In Python's C API, a strong reference is a reference to an object which " +"increments the object's reference count when it is created and decrements " +"the object's reference count when it is deleted." +msgstr "" +"Dans l'API C de Python, une référence forte est une référence vers un objet " +"qui incrémente son compteur de références lorsqu'elle est créée et le " +"décrémente lorsqu'elle est effacée." + +#: glossary.rst:1148 +msgid "" +"The :c:func:`Py_NewRef` function can be used to create a strong reference to " +"an object. Usually, the :c:func:`Py_DECREF` function must be called on the " +"strong reference before exiting the scope of the strong reference, to avoid " +"leaking one reference." +msgstr "" +"Une référence forte est créée à l'aide de la fonction :c:func:`Py_NewRef`. " +"Il faut normalement appeler :c:func:`Py_DECREF` dessus avant de sortir de sa " +"portée lexicale, sans quoi il y a une fuite de référence." + +#: glossary.rst:1153 +msgid "See also :term:`borrowed reference`." +msgstr "Voir aussi :term:`référence empruntée`." + +#: glossary.rst:1154 +msgid "text encoding" +msgstr "encodage de texte" + +#: glossary.rst:1156 +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:1160 +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:1163 +msgid "" +"There are a variety of different text serialization :ref:`codecs `, which are collectively referred to as \"text encodings\"." +msgstr "" +"Il existe de multiples :ref:`codecs ` pour la " +"sérialisation de texte, que l'on regroupe sous l'expression « encodages de " +"texte »." + +#: glossary.rst:1166 +msgid "text file" +msgstr "fichier texte" + +#: glossary.rst:1168 +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:" +"`text encoding` automatically. Examples of text files are files opened in " +"text mode (``'r'`` or ``'w'``), :data:`sys.stdin`, :data:`sys.stdout`, and " +"instances of :class:`io.StringIO`." +msgstr "" +":term:`file object` capable de lire et d'écrire des objets :class:`str`. " +"Souvent, un fichier texte (*text file* en anglais) accède en fait à un flux " +"de donnée en octets et gère l':term:`text encoding` automatiquement. Des " +"exemples de fichiers textes sont les fichiers ouverts en mode texte (``'r'`` " +"ou ``'w'``), :data:`sys.stdin`, :data:`sys.stdout` et les instances de :" +"class:`io.StringIO`." + +#: glossary.rst:1175 +msgid "" +"See also :term:`binary file` for a file object able to read and write :term:" +"`bytes-like objects `." +msgstr "" +"Voir aussi :term:`binary file` pour un objet fichier capable de lire et " +"d'écrire :term:`bytes-like objects `." + +#: glossary.rst:1177 +msgid "triple-quoted string" +msgstr "chaîne entre triple guillemets" + +#: glossary.rst:1179 +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 " +"available with single-quoted strings, they are useful for a number of " +"reasons. They allow you to include unescaped single and double quotes " +"within a string and they can span multiple lines without the use of the " +"continuation character, making them especially useful when writing " +"docstrings." +msgstr "" +"Chaîne qui est délimitée par trois guillemets simples (``'``) ou trois " +"guillemets doubles (``\"``). Bien qu'elle ne fournisse aucune fonctionnalité " +"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 " +"documentation (*docstrings*)." + +#: glossary.rst:1186 +msgid "type" +msgstr "type" + +#: glossary.rst:1188 +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." +"__class__` attribute or can be retrieved with ``type(obj)``." +msgstr "" +"Le type d'un objet Python détermine quel genre d'objet c'est. Tous les " +"objets ont un type. Le type d'un objet peut être obtenu via son attribut :" +"attr:`~instance.__class__` ou via ``type(obj)``." + +#: glossary.rst:1192 +msgid "type alias" +msgstr "alias de type" + +#: glossary.rst:1194 +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:1196 +msgid "" +"Type aliases are useful for simplifying :term:`type hints `. For " +"example::" +msgstr "" +"Les alias de types sont utiles pour simplifier les :term:`indications de " +"types `. Par exemple ::" + +#: glossary.rst:1203 +msgid "could be made more readable like this::" +msgstr "pourrait être rendu plus lisible comme ceci ::" + +#: glossary.rst:1224 +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:1211 +msgid "type hint" +msgstr "indication de type" + +#: glossary.rst:1213 +msgid "" +"An :term:`annotation` that specifies the expected type for a variable, a " +"class attribute, or a function parameter or return value." +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:1216 +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 " +"refactoring." +msgstr "" +"Les indications de type sont facultatives et ne sont pas indispensables à " +"l'interpréteur Python, mais elles sont utiles aux outils d'analyse de type " +"statique et aident les IDE à compléter et à réusiner (*code refactoring* en " +"anglais) le code." + +#: glossary.rst:1220 +msgid "" +"Type hints of global variables, class attributes, and functions, but not " +"local variables, can be accessed using :func:`typing.get_type_hints`." +msgstr "" +"Les indicateurs de type de variables globales, d'attributs de classe et de " +"fonctions, mais pas de variables locales, peuvent être consultés en " +"utilisant :func:`typing.get_type_hints`." + +#: glossary.rst:1225 +msgid "universal newlines" +msgstr "retours à la ligne universels" + +#: glossary.rst:1227 +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 " +"Windows convention ``'\\r\\n'``, and the old Macintosh convention " +"``'\\r'``. See :pep:`278` and :pep:`3116`, as well as :func:`bytes." +"splitlines` for an additional use." +msgstr "" +"Une manière d'interpréter des flux de texte dans lesquels sont reconnues " +"toutes les fins de ligne suivantes : la convention Unix ``'\\n'``, la " +"convention Windows ``'\\r\\n'`` et l'ancienne convention Macintosh " +"``'\\r'``. Voir la :pep:`278` et la :pep:`3116`, ainsi que la fonction :func:" +"`bytes.splitlines` pour d'autres usages." + +#: glossary.rst:1232 +msgid "variable annotation" +msgstr "annotation de variable" + +#: glossary.rst:1234 +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:1236 +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:1241 +msgid "" +"Variable annotations are usually used for :term:`type hints `: " +"for example this variable is expected to take :class:`int` values::" +msgstr "" +"Les annotations de variables sont généralement utilisées pour des :term:" +"`indications de types ` : par exemple, cette variable devrait " +"prendre des valeurs de type :class:`int` ::" + +#: glossary.rst:1247 +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:1249 +msgid "" +"See :term:`function annotation`, :pep:`484` and :pep:`526`, which describe " +"this functionality. Also see :ref:`annotations-howto` for best practices on " +"working with annotations." +msgstr "" +"Reportez-vous à :term:`annotation de fonction`, à la :" +"pep:`484` et à la :pep:`526` qui décrivent cette fonctionnalité. Voir aussi :" +"ref:`annotations-howto` sur les bonnes pratiques concernant les annotations." + +#: glossary.rst:1253 +msgid "virtual environment" +msgstr "environnement virtuel" + +#: glossary.rst:1255 +msgid "" +"A cooperatively isolated runtime environment that allows Python users and " +"applications to install and upgrade Python distribution packages without " +"interfering with the behaviour of other Python applications running on the " +"same system." +msgstr "" +"Environnement d'exécution isolé (en mode coopératif) qui permet aux " +"utilisateurs de Python et aux applications d'installer et de mettre à jour " +"des paquets sans interférer avec d'autres applications Python fonctionnant " +"sur le même système." + +#: glossary.rst:1260 +msgid "See also :mod:`venv`." +msgstr "Voir aussi :mod:`venv`." + +#: glossary.rst:1261 +msgid "virtual machine" +msgstr "machine virtuelle" + +#: glossary.rst:1263 +msgid "" +"A computer defined entirely in software. Python's virtual machine executes " +"the :term:`bytecode` emitted by the bytecode compiler." +msgstr "" +"Ordinateur défini entièrement par du logiciel. La machine virtuelle " +"(*virtual machine*) de Python exécute le :term:`bytecode` produit par le " +"compilateur de *bytecode*." + +#: glossary.rst:1265 +msgid "Zen of Python" +msgstr "Le zen de Python" + +#: glossary.rst:1267 +msgid "" +"Listing of Python design principles and philosophies that are helpful in " +"understanding and using the language. The listing can be found by typing " +"\"``import this``\" at the interactive prompt." +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 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*)." + +#~ 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 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 ::" diff --git a/howto/annotations.po b/howto/annotations.po new file mode 100644 index 0000000000..c0adc085fb --- /dev/null +++ b/howto/annotations.po @@ -0,0 +1,470 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-22 22:57+0100\n" +"PO-Revision-Date: 2022-05-12 09:43+0200\n" +"Last-Translator: ZepmanBC \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 3.0.1\n" + +#: howto/annotations.rst:5 +msgid "Annotations Best Practices" +msgstr "Bonnes pratiques concernant les annotations" + +#: howto/annotations.rst:0 +msgid "author" +msgstr "auteur" + +#: howto/annotations.rst:7 +msgid "Larry Hastings" +msgstr "Larry Hastings" + +#: howto/annotations.rst:None +msgid "Abstract" +msgstr "Résumé" + +#: howto/annotations.rst:11 +msgid "" +"This document is designed to encapsulate the best practices for working with " +"annotations dicts. If you write Python code that examines " +"``__annotations__`` on Python objects, we encourage you to follow the " +"guidelines described below." +msgstr "" +"Ce document a pour but de regrouper les bonnes pratiques de travail avec le " +"dictionnaire d'annotations. Si vous écrivez du code Python qui examine les " +"``__annotations__`` des objets, nous vous encourageons à suivre les " +"recommandations décrites dans la suite." + +#: howto/annotations.rst:16 +msgid "" +"The document is organized into four sections: best practices for accessing " +"the annotations of an object in Python versions 3.10 and newer, best " +"practices for accessing the annotations of an object in Python versions 3.9 " +"and older, other best practices for ``__annotations__`` that apply to any " +"Python version, and quirks of ``__annotations__``." +msgstr "" +"Ce document est organisé en quatre sections : bonnes pratiques pour accéder " +"aux annotations d'un objet en Python 3.10 et plus récent, bonnes pratiques " +"pour accéder aux annotations d'un objet en Python 3.9 et antérieur, autres " +"bonnes pratiques pour ``__annotations__`` à appliquer quelle que soit la " +"version de Python, et enfin les curiosités concernant ``__annotations__``." + +#: howto/annotations.rst:26 +msgid "" +"Note that this document is specifically about working with " +"``__annotations__``, not uses *for* annotations. If you're looking for " +"information on how to use \"type hints\" in your code, please see the :mod:" +"`typing` module." +msgstr "" +"Notez que ce document traite spécifiquement du traitement des " +"``__annotations__``, et non de l'*utilisation* des annotations. Si vous " +"cherchez des informations sur la façon d'utiliser les « indications de " +"type » dans votre code, veuillez consulter le module :mod:`typing`." + +#: howto/annotations.rst:33 +msgid "Accessing The Annotations Dict Of An Object In Python 3.10 And Newer" +msgstr "" +"Accès au dictionnaire des annotations d'un objet dans Python 3.10 et plus " +"récent" + +#: howto/annotations.rst:35 +msgid "" +"Python 3.10 adds a new function to the standard library: :func:`inspect." +"get_annotations`. In Python versions 3.10 and newer, calling this function " +"is the best practice for accessing the annotations dict of any object that " +"supports annotations. This function can also \"un-stringize\" stringized " +"annotations for you." +msgstr "" +"Python 3.10 ajoute une nouvelle fonction à la bibliothèque standard : :func:" +"`inspect.get_annotations`. Dans les versions Python 3.10 et plus récentes, " +"l'appel à cette fonction est la meilleure pratique pour accéder au " +"dictionnaire d'annotations de tout objet qui prend en charge les " +"annotations. Cette fonction peut également convertir pour vous les " +"annotations contenues dans des chaînes de caractères en objets." + +#: howto/annotations.rst:42 +msgid "" +"If for some reason :func:`inspect.get_annotations` isn't viable for your use " +"case, you may access the ``__annotations__`` data member manually. Best " +"practice for this changed in Python 3.10 as well: as of Python 3.10, ``o." +"__annotations__`` is guaranteed to *always* work on Python functions, " +"classes, and modules. If you're certain the object you're examining is one " +"of these three *specific* objects, you may simply use ``o.__annotations__`` " +"to get at the object's annotations dict." +msgstr "" +"Si pour une raison quelconque, :func:`inspect.get_annotations` n'est pas " +"viable pour votre cas d'utilisation, vous pouvez accéder à l'attribut de " +"données ``__annotations__`` manuellement. La bonne pratique pour cela a " +"également changé en Python 3.10 : à partir de Python 3.10, le fonctionnement " +"de ``o.__annotations__`` est *toujours* garanti sur les fonctions, classes " +"et modules Python. Si vous êtes certain que l'objet que vous examinez est " +"l'un de ces trois objets *spécifiques*, vous pouvez simplement utiliser ``o." +"__annotations__`` pour accéder au dictionnaire d'annotations de l'objet." + +#: howto/annotations.rst:52 +msgid "" +"However, other types of callables--for example, callables created by :func:" +"`functools.partial`--may not have an ``__annotations__`` attribute defined. " +"When accessing the ``__annotations__`` of a possibly unknown object, best " +"practice in Python versions 3.10 and newer is to call :func:`getattr` with " +"three arguments, for example ``getattr(o, '__annotations__', None)``." +msgstr "" +"Cependant, d'autres types d'objets appelables – par exemple, les objets " +"appelables créés par :func:`functools.partial` – peuvent ne pas avoir " +"d'attribut ``__annotations__`` défini. Pour accéder à l'attribut " +"``__annotations__`` d'un objet éventuellement inconnu, la meilleure " +"pratique, à partir de la version 3.10 de Python, est d'appeler :func:" +"`getattr` avec trois arguments, par exemple ``getattr(o, '__annotations__', " +"None)``." + +#: howto/annotations.rst:60 +msgid "" +"Before Python 3.10, accessing ``__annotations__`` on a class that defines no " +"annotations but that has a parent class with annotations would return the " +"parent's ``__annotations__``. In Python 3.10 and newer, the child class's " +"annotations will be an empty dict instead." +msgstr "" +"Dans les versions antérieures à Python 3.10, l'accès aux ``__annotations__`` " +"d'une classe qui n'a pas d'annotation mais dont un parent de cette classe en " +"a, aurait renvoyé les ``__annotations__`` de la classe parent. Dans les " +"versions 3.10 et plus récentes, le résultat d'annotations de la classe " +"enfant est un dictionnaire vide." + +#: howto/annotations.rst:68 +msgid "Accessing The Annotations Dict Of An Object In Python 3.9 And Older" +msgstr "" +"Accès au dictionnaire des annotations d'un objet en Python 3.9 et antérieur" + +#: howto/annotations.rst:70 +msgid "" +"In Python 3.9 and older, accessing the annotations dict of an object is much " +"more complicated than in newer versions. The problem is a design flaw in " +"these older versions of Python, specifically to do with class annotations." +msgstr "" +"En Python 3.9 et antérieur, l'accès au dictionnaire des annotations d'un " +"objet est beaucoup plus compliqué que dans les versions plus récentes. Le " +"problème est dû à un défaut de conception de ces anciennes versions de " +"Python, notamment en ce qui concerne les annotations de classe." + +#: howto/annotations.rst:75 +msgid "" +"Best practice for accessing the annotations dict of other objects--" +"functions, other callables, and modules--is the same as best practice for " +"3.10, assuming you aren't calling :func:`inspect.get_annotations`: you " +"should use three-argument :func:`getattr` to access the object's " +"``__annotations__`` attribute." +msgstr "" +"La bonne pratique pour accéder au dictionnaire d'annotations d'autres objets " +"– fonctions, autres objets appelables et modules – est la même que pour la " +"3.10, en supposant que vous n'appelez pas :func:`inspect.get_annotations` : " +"vous devez utiliser la forme à trois arguments de :func:`getattr` pour " +"accéder à l'attribut ``__annotations__`` de l'objet." + +#: howto/annotations.rst:82 +msgid "" +"Unfortunately, this isn't best practice for classes. The problem is that, " +"since ``__annotations__`` is optional on classes, and because classes can " +"inherit attributes from their base classes, accessing the " +"``__annotations__`` attribute of a class may inadvertently return the " +"annotations dict of a *base class.* As an example::" +msgstr "" +"Malheureusement, ce n'est pas la bonne pratique pour les classes. Le " +"problème est que, puisque ``__annotations__`` est optionnel sur les classes " +"et que les classes peuvent hériter des attributs de leurs classes de base, " +"accéder à l'attribut ``__annotations__`` d'une classe peut par inadvertance " +"renvoyer le dictionnaire d'annotations d'une *classe de base.* Par " +"exemple : ::" + +#: howto/annotations.rst:98 +msgid "This will print the annotations dict from ``Base``, not ``Derived``." +msgstr "" +"Ceci affiche le dictionnaire d'annotations de ``Base``, pas de ``Derived``." + +#: howto/annotations.rst:101 +msgid "" +"Your code will have to have a separate code path if the object you're " +"examining is a class (``isinstance(o, type)``). In that case, best practice " +"relies on an implementation detail of Python 3.9 and before: if a class has " +"annotations defined, they are stored in the class's ``__dict__`` " +"dictionary. Since the class may or may not have annotations defined, best " +"practice is to call the ``get`` method on the class dict." +msgstr "" +"Votre code doit gérer les différentes options si l'objet que vous examinez " +"est une classe (``isinstance(o, type)``). Dans ce cas, la bonne pratique " +"repose sur un détail d'implémentation de Python 3.9 et antérieur : si une " +"classe a des annotations définies, elles sont stockées dans le dictionnaire " +"``__dict__`` de la classe. Puisque la classe peut avoir ou non des " +"annotations définies, la bonne pratique est d'appeler la méthode ``get`` sur " +"le dictionnaire de la classe." + +#: howto/annotations.rst:109 +msgid "" +"To put it all together, here is some sample code that safely accesses the " +"``__annotations__`` attribute on an arbitrary object in Python 3.9 and " +"before::" +msgstr "" +"Pour résumer, voici un exemple de code qui accède en toute sécurité à " +"l'attribut ``__annotations__`` d'un objet quelconque en Python 3.9 et " +"antérieur : ::" + +#: howto/annotations.rst:118 +msgid "" +"After running this code, ``ann`` should be either a dictionary or ``None``. " +"You're encouraged to double-check the type of ``ann`` using :func:" +"`isinstance` before further examination." +msgstr "" +"Après avoir exécuté ce code, ``ann`` pourra être soit un dictionnaire, soit " +"``None``. Nous vous conseillons de vérifier le type de ``ann`` en " +"utilisant :func:`isinstance` avant de poursuivre l'analyse." + +#: howto/annotations.rst:123 +msgid "" +"Note that some exotic or malformed type objects may not have a ``__dict__`` " +"attribute, so for extra safety you may also wish to use :func:`getattr` to " +"access ``__dict__``." +msgstr "" +"Notez que certains objets de type exotique ou malformé peuvent ne pas avoir " +"d'attribut ``__dict__`` donc, pour plus de sécurité, vous pouvez également " +"utiliser :func:`getattr` pour accéder à ``__dict__``." + +#: howto/annotations.rst:129 +msgid "Manually Un-Stringizing Stringized Annotations" +msgstr "" +"Conversion manuelle des annotations contenues dans une chaîne de caractères" + +#: howto/annotations.rst:131 +msgid "" +"In situations where some annotations may be \"stringized\", and you wish to " +"evaluate those strings to produce the Python values they represent, it " +"really is best to call :func:`inspect.get_annotations` to do this work for " +"you." +msgstr "" +"Dans les situations où certaines annotations peuvent se présenter sous forme " +"de chaînes de caractères brutes, et que vous souhaitez évaluer ces chaînes " +"pour trouver les valeurs Python qu'elles représentent, il est vraiment " +"préférable d'appeler :func:`inspect.get_annotations` pour faire ce travail à " +"votre place." + +#: howto/annotations.rst:137 +msgid "" +"If you're using Python 3.9 or older, or if for some reason you can't use :" +"func:`inspect.get_annotations`, you'll need to duplicate its logic. You're " +"encouraged to examine the implementation of :func:`inspect.get_annotations` " +"in the current Python version and follow a similar approach." +msgstr "" +"Si vous utilisez Python 3.9 ou antérieur ou, si pour une raison quelconque, " +"vous ne pouvez pas utiliser :func:`inspect.get_annotations`, vous devrez " +"dupliquer son principe de fonctionnement. Nous vous encourageons à examiner " +"l'implémentation de :func:`inspect.get_annotations` dans la version actuelle " +"de Python et à suivre une approche similaire." + +#: howto/annotations.rst:143 +msgid "" +"In a nutshell, if you wish to evaluate a stringized annotation on an " +"arbitrary object ``o``:" +msgstr "" +"En bref, si vous souhaitez évaluer une annotation empaquetée en chaîne de " +"caractères sur un objet arbitraire ``o`` :" + +#: howto/annotations.rst:146 +msgid "" +"If ``o`` is a module, use ``o.__dict__`` as the ``globals`` when calling :" +"func:`eval`." +msgstr "" +"Si ``o`` est un module, utilisez ``o.__dict__`` pour accéder aux noms " +"``globals`` lors de l'appel à :func:`eval`." + +#: howto/annotations.rst:148 +msgid "" +"If ``o`` is a class, use ``sys.modules[o.__module__].__dict__`` as the " +"``globals``, and ``dict(vars(o))`` as the ``locals``, when calling :func:" +"`eval`." +msgstr "" +"Si ``o`` est une classe, utilisez ``sys.modules[o.__module__].__dict__`` " +"pour désigner les noms ``globals``, et ``dict(vars(o))`` pour désigner les " +"``locals``, lorsque vous appelez :func:`eval`." + +#: howto/annotations.rst:151 +msgid "" +"If ``o`` is a wrapped callable using :func:`functools.update_wrapper`, :func:" +"`functools.wraps`, or :func:`functools.partial`, iteratively unwrap it by " +"accessing either ``o.__wrapped__`` or ``o.func`` as appropriate, until you " +"have found the root unwrapped function." +msgstr "" +"Si ``o`` est un appelable encapsulé à l'aide de :func:`functools." +"update_wrapper`, :func:`functools.wraps`, ou :func:`functools.partial`, dés-" +"encapsulez-le itérativement en accédant à ``o.__wrapped__`` ou ``o.func`` " +"selon le cas, jusqu'à ce que vous ayez trouvé la fonction racine." + +#: howto/annotations.rst:155 +msgid "" +"If ``o`` is a callable (but not a class), use ``o.__globals__`` as the " +"globals when calling :func:`eval`." +msgstr "" +"Si ``o`` est un objet appelable (mais pas une classe), utilisez ``o." +"__globals__`` pour désigner les globales lors de l'appel de :func:`eval`." + +#: howto/annotations.rst:158 +msgid "" +"However, not all string values used as annotations can be successfully " +"turned into Python values by :func:`eval`. String values could theoretically " +"contain any valid string, and in practice there are valid use cases for type " +"hints that require annotating with string values that specifically *can't* " +"be evaluated. For example:" +msgstr "" +"Cependant, toutes les valeurs de chaîne utilisées comme annotations ne " +"peuvent pas être transformées avec succès en valeurs Python par :func:" +"`eval`. Les valeurs de chaîne peuvent théoriquement contenir des chaînes " +"valides et, en pratique, il existe des cas d'utilisation valables pour les " +"indications de type qui nécessitent d'annoter avec des valeurs de chaîne qui " +"*ne peuvent pas* être évaluées. Par exemple :" + +#: howto/annotations.rst:165 +msgid "" +":pep:`604` union types using ``|``, before support for this was added to " +"Python 3.10." +msgstr "" +"Les types d'union de style :pep:`604` avec ``|``, avant que cette prise en " +"charge ne soit ajoutée à Python 3.10." + +#: howto/annotations.rst:167 +msgid "" +"Definitions that aren't needed at runtime, only imported when :const:`typing." +"TYPE_CHECKING` is true." +msgstr "" +"Les définitions qui ne sont pas nécessaires à l'exécution, importées " +"uniquement lorsque :const:`typing.TYPE_CHECKING` est vrai." + +#: howto/annotations.rst:170 +msgid "" +"If :func:`eval` attempts to evaluate such values, it will fail and raise an " +"exception. So, when designing a library API that works with annotations, " +"it's recommended to only attempt to evaluate string values when explicitly " +"requested to by the caller." +msgstr "" +"Si :func:`eval` tente d'évaluer de telles valeurs, elle échoue et lève une " +"exception. Ainsi, lors de la conception d'une API de bibliothèque " +"fonctionnant avec des annotations, il est recommandé de ne tenter d'évaluer " +"des valeurs de type chaîne que si l'appelant le demande explicitement." + +#: howto/annotations.rst:178 +msgid "Best Practices For ``__annotations__`` In Any Python Version" +msgstr "" +"Bonnes pratiques pour ``__annotations__`` dans toutes les versions de Python" + +#: howto/annotations.rst:180 +msgid "" +"You should avoid assigning to the ``__annotations__`` member of objects " +"directly. Let Python manage setting ``__annotations__``." +msgstr "" +"Évitez d'assigner directement des objets à l'élément ``__annotations__``. " +"Laissez Python gérer le paramétrage de ``__annotations__``." + +#: howto/annotations.rst:183 +msgid "" +"If you do assign directly to the ``__annotations__`` member of an object, " +"you should always set it to a ``dict`` object." +msgstr "" +"Si vous assignez directement à l'élément ``__annotations__`` d'un objet, " +"vous devez toujours le définir comme un ``dict``." + +#: howto/annotations.rst:186 +msgid "" +"If you directly access the ``__annotations__`` member of an object, you " +"should ensure that it's a dictionary before attempting to examine its " +"contents." +msgstr "" +"Si vous accédez directement à l'élément ``__annotations__`` d'un objet, vous " +"devez vous assurer qu'il s'agit d'un dictionnaire avant de tenter d'examiner " +"son contenu." + +#: howto/annotations.rst:190 +msgid "You should avoid modifying ``__annotations__`` dicts." +msgstr "Évitez de modifier les dictionnaires ``__annotations__``." + +#: howto/annotations.rst:192 +msgid "" +"You should avoid deleting the ``__annotations__`` attribute of an object." +msgstr "Évitez de supprimer l'attribut ``__annotations__`` d'un objet." + +#: howto/annotations.rst:197 +msgid "``__annotations__`` Quirks" +msgstr "Les curiosités concernant ``__annotations__``" + +#: howto/annotations.rst:199 +msgid "" +"In all versions of Python 3, function objects lazy-create an annotations " +"dict if no annotations are defined on that object. You can delete the " +"``__annotations__`` attribute using ``del fn.__annotations__``, but if you " +"then access ``fn.__annotations__`` the object will create a new empty dict " +"that it will store and return as its annotations. Deleting the annotations " +"on a function before it has lazily created its annotations dict will throw " +"an ``AttributeError``; using ``del fn.__annotations__`` twice in a row is " +"guaranteed to always throw an ``AttributeError``." +msgstr "" +"Dans toutes les versions de Python 3, les fonctions créent paresseusement un " +"dictionnaire d'annotations si aucune annotation n'est définie sur cet " +"objet. Vous pouvez supprimer l'attribut ``__annotations__`` en utilisant " +"``del fn.__annotations__``, mais si vous accédez ensuite à ``fn." +"__annotations__``, l'objet créera un nouveau dictionnaire vide qu'il " +"stockera et renverra quand on lui demande ses annotations. Si vous " +"supprimez les annotations d'une fonction avant qu'elle n'ait créé " +"paresseusement son dictionnaire d'annotations, vous obtiendrez une exception " +"``AttributeError`` ; si vous utilisez ``del fn.__annotations__`` deux fois " +"de suite, vous êtes sûr de toujours obtenir ``AttributeError``." + +#: howto/annotations.rst:209 +msgid "" +"Everything in the above paragraph also applies to class and module objects " +"in Python 3.10 and newer." +msgstr "" +"Tout ce qui est dit dans le paragraphe précédent s'applique également aux " +"objets de type classe et module en Python 3.10 et suivants." + +#: howto/annotations.rst:212 +msgid "" +"In all versions of Python 3, you can set ``__annotations__`` on a function " +"object to ``None``. However, subsequently accessing the annotations on that " +"object using ``fn.__annotations__`` will lazy-create an empty dictionary as " +"per the first paragraph of this section. This is *not* true of modules and " +"classes, in any Python version; those objects permit setting " +"``__annotations__`` to any Python value, and will retain whatever value is " +"set." +msgstr "" +"Dans toutes les versions de Python 3, vous pouvez définir à ``None`` " +"l'élément ``__annotations__`` sur un objet fonction. Cependant, si vous " +"accédez ensuite aux annotations de cet objet en utilisant ``fn." +"__annotations__``, un dictionnaire vide sera créé paresseusement, comme " +"indiqué dans le premier paragraphe de cette section. Ce *n'est pas* le cas " +"des modules et des classes, quelle que soit la version de Python ; ces " +"objets permettent de définir ``__annotations__`` à n'importe quelle valeur " +"Python, et conserveront la valeur définie." + +#: howto/annotations.rst:220 +msgid "" +"If Python stringizes your annotations for you (using ``from __future__ " +"import annotations``), and you specify a string as an annotation, the string " +"will itself be quoted. In effect the annotation is quoted *twice.* For " +"example::" +msgstr "" +"Si Python convertit vos annotations en chaînes de caractères (en utilisant " +"``from __future__ import annotations``), et que vous spécifiez une chaîne de " +"caractères comme annotation, la chaîne sera elle-même entre guillemets. En " +"fait, l'annotation est mise entre guillemets *deux fois*. Par exemple : ::" + +#: howto/annotations.rst:231 +msgid "" +"This prints ``{'a': \"'str'\"}``. This shouldn't really be considered a " +"\"quirk\"; it's mentioned here simply because it might be surprising." +msgstr "" +"Ceci renvoie : ``{'a': \"'str'\"}``. Cela ne devrait pas vraiment être " +"considéré comme une « bizarrerie » ; nous le mentionnons ici simplement " +"parce que cela peut être surprenant." diff --git a/howto/argparse.po b/howto/argparse.po new file mode 100644 index 0000000000..59e2857499 --- /dev/null +++ b/howto/argparse.po @@ -0,0 +1,630 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-04-05 10:05+0200\n" +"PO-Revision-Date: 2022-10-18 12:22+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 3.0\n" + +#: howto/argparse.rst:3 +msgid "Argparse Tutorial" +msgstr "Tutoriel *argparse*" + +#: howto/argparse.rst:0 +msgid "author" +msgstr "auteur" + +#: howto/argparse.rst:5 +msgid "Tshepang Lekhonkhobe" +msgstr "Tshepang Lekhonkhobe" + +#: howto/argparse.rst:9 +msgid "" +"This tutorial is intended to be a gentle introduction to :mod:`argparse`, " +"the recommended command-line parsing module in the Python standard library." +msgstr "" +"Ce tutoriel est destiné à être une introduction en douceur à :mod:" +"`argparse`, le module d'analyse de ligne de commande recommandé dans la " +"bibliothèque standard de Python." + +#: howto/argparse.rst:14 +msgid "" +"There are two other modules that fulfill the same task, namely :mod:`getopt` " +"(an equivalent for :c:func:`getopt` from the C language) and the deprecated :" +"mod:`optparse`. Note also that :mod:`argparse` is based on :mod:`optparse`, " +"and therefore very similar in terms of usage." +msgstr "" +"Il y a deux autres modules qui remplissent le même rôle : :mod:`getopt` (un " +"équivalent de :c:func:`getopt` du langage C) et :mod:`optparse` qui est " +"obsolète. Il faut noter que :mod:`argparse` est basé sur :mod:`optparse` et " +"donc s'utilise de manière très similaire." + +#: howto/argparse.rst:22 +msgid "Concepts" +msgstr "Concepts" + +#: howto/argparse.rst:24 +msgid "" +"Let's show the sort of functionality that we are going to explore in this " +"introductory tutorial by making use of the :command:`ls` command:" +msgstr "" +"Commençons par l'utilisation de la commande :command:`ls` pour voir le type " +"de fonctionnalité que nous allons étudier dans ce tutoriel d'introduction :" + +#: howto/argparse.rst:46 +msgid "A few concepts we can learn from the four commands:" +msgstr "Quelques concepts que l'on peut apprendre avec les quatre commandes :" + +#: howto/argparse.rst:48 +msgid "" +"The :command:`ls` command is useful when run without any options at all. It " +"defaults to displaying the contents of the current directory." +msgstr "" +"La commande :command:`ls` est utile quand elle est exécutée sans aucun " +"paramètre. Elle affiche par défaut le contenu du dossier courant." + +#: howto/argparse.rst:51 +msgid "" +"If we want beyond what it provides by default, we tell it a bit more. In " +"this case, we want it to display a different directory, ``pypy``. What we " +"did is specify what is known as a positional argument. It's named so because " +"the program should know what to do with the value, solely based on where it " +"appears on the command line. This concept is more relevant to a command " +"like :command:`cp`, whose most basic usage is ``cp SRC DEST``. The first " +"position is *what you want copied,* and the second position is *where you " +"want it copied to*." +msgstr "" +"Si l'on veut plus que ce qui est proposé par défaut, il faut l'indiquer. " +"Dans le cas présent, on veut afficher un dossier différent : ``pypy``. Ce " +"que l'on a fait c'est spécifier un argument positionnel. C'est appelé ainsi " +"car cela permet au programme de savoir quoi faire avec la valeur en se " +"basant seulement sur sa position dans la ligne de commande. Ce concept est " +"plus pertinent pour une commande comme :command:`cp` dont l'usage de base " +"est ``cp SRC DEST``. Le premier argument est *ce que vous voulez copier* et " +"le second est *où vous voulez le copier*." + +#: howto/argparse.rst:60 +msgid "" +"Now, say we want to change behaviour of the program. In our example, we " +"display more info for each file instead of just showing the file names. The " +"``-l`` in that case is known as an optional argument." +msgstr "" +"Maintenant, supposons que l'on veuille changer la façon dont le programme " +"agit. Dans notre exemple, on affiche plus d'information pour chaque ficher " +"que simplement leur nom. Dans ce cas, ``-l`` est un argument facultatif." + +#: howto/argparse.rst:64 +msgid "" +"That's a snippet of the help text. It's very useful in that you can come " +"across a program you have never used before, and can figure out how it works " +"simply by reading its help text." +msgstr "" +"C'est un fragment du texte d'aide. Cela peut être très utile quand on tombe " +"sur un programme que l'on à jamais utilisé auparavant car on peut comprendre " +"son fonctionnement simplement en lisant l'aide associée." + +#: howto/argparse.rst:70 +msgid "The basics" +msgstr "Les bases" + +#: howto/argparse.rst:72 +msgid "Let us start with a very simple example which does (almost) nothing::" +msgstr "Commençons par un exemple très simple qui ne fait (quasiment) rien ::" + +#: howto/argparse.rst:186 howto/argparse.rst:207 +msgid "Following is a result of running the code:" +msgstr "Ce qui suit est le résultat de l'exécution du code :" + +#: howto/argparse.rst:252 howto/argparse.rst:296 +msgid "Here is what is happening:" +msgstr "Voilà ce qu'il se passe :" + +#: howto/argparse.rst:97 +msgid "" +"Running the script without any options results in nothing displayed to " +"stdout. Not so useful." +msgstr "" +"Exécuter le script sans aucun paramètre a pour effet de ne rien afficher sur " +"la sortie d'erreur. Ce n'est pas très utile." + +#: howto/argparse.rst:100 +msgid "" +"The second one starts to display the usefulness of the :mod:`argparse` " +"module. We have done almost nothing, but already we get a nice help message." +msgstr "" +"Le deuxième commence à montrer l'intérêt du module :mod:`argparse`. On n'a " +"quasiment rien fait mais on a déjà un beau message d'aide." + +#: howto/argparse.rst:103 +msgid "" +"The ``--help`` option, which can also be shortened to ``-h``, is the only " +"option we get for free (i.e. no need to specify it). Specifying anything " +"else results in an error. But even then, we do get a useful usage message, " +"also for free." +msgstr "" +"L'option ``--help``, que l'on peut aussi raccourcir en ``-h``, est la seule " +"option que l'on a gratuitement (pas besoin de la préciser). Préciser quoi " +"que ce soit d'autre entraîne une erreur. Mais même dans ce cas, on reçoit " +"aussi un message utile, toujours gratuitement." + +#: howto/argparse.rst:110 +msgid "Introducing Positional arguments" +msgstr "Introduction aux arguments positionnels" + +#: howto/argparse.rst:112 +msgid "An example::" +msgstr "Un exemple ::" + +#: howto/argparse.rst:120 +msgid "And running the code:" +msgstr "On exécute le code :" + +#: howto/argparse.rst:138 +msgid "Here is what's happening:" +msgstr "Voilà ce qu'il se passe :" + +#: howto/argparse.rst:140 +msgid "" +"We've added the :meth:`add_argument` method, which is what we use to specify " +"which command-line options the program is willing to accept. In this case, " +"I've named it ``echo`` so that it's in line with its function." +msgstr "" +"On a ajouté la méthode :meth:`add_argument` que l'on utilise pour préciser " +"quels paramètre de lignes de commandes le programme peut accepter. Dans le " +"cas présent, je l'ai appelé ``echo`` pour que cela corresponde à sa fonction." + +#: howto/argparse.rst:144 +msgid "Calling our program now requires us to specify an option." +msgstr "" +"Utiliser le programme nécessite maintenant que l'on précise un paramètre." + +#: howto/argparse.rst:146 +msgid "" +"The :meth:`parse_args` method actually returns some data from the options " +"specified, in this case, ``echo``." +msgstr "" +"La méthode :meth:`parse_args` renvoie en réalité certaines données des " +"paramètres précisés, dans le cas présent : ``echo``." + +#: howto/argparse.rst:149 +msgid "" +"The variable is some form of 'magic' that :mod:`argparse` performs for free " +"(i.e. no need to specify which variable that value is stored in). You will " +"also notice that its name matches the string argument given to the method, " +"``echo``." +msgstr "" +"La variable est comme une forme de 'magie' que :mod:`argparse` effectue " +"gratuitement (c.-à-d. pas besoin de préciser dans quelle variable la valeur " +"est stockée). Vous aurez aussi remarqué que le nom est le même que " +"l'argument en chaîne de caractères donné à la méthode : ``echo``." + +#: howto/argparse.rst:154 +msgid "" +"Note however that, although the help display looks nice and all, it " +"currently is not as helpful as it can be. For example we see that we got " +"``echo`` as a positional argument, but we don't know what it does, other " +"than by guessing or by reading the source code. So, let's make it a bit more " +"useful::" +msgstr "" +"Notez cependant que, même si l'affichage d'aide paraît bien , il n'est pas " +"aussi utile qu'il pourrait l'être. Par exemple, on peut lire que ``echo`` " +"est un argument positionnel mais on ne peut pas savoir ce que cela fait " +"autrement qu'en le devinant ou en lisant le code source. Donc, rendons-le un " +"peu plus utile ::" + +#: howto/argparse.rst:165 +msgid "And we get:" +msgstr "Et on obtient :" + +#: howto/argparse.rst:178 +msgid "Now, how about doing something even more useful::" +msgstr "" +"À présent, que diriez-vous de faire quelque chose d'encore plus utile ::" + +#: howto/argparse.rst:196 +msgid "" +"That didn't go so well. That's because :mod:`argparse` treats the options we " +"give it as strings, unless we tell it otherwise. So, let's tell :mod:" +"`argparse` to treat that input as an integer::" +msgstr "" +"Cela n'a pas très bien fonctionné. C'est parce que :mod:`argparse` traite " +"les paramètres que l'on donne comme des chaînes de caractères à moins qu'on " +"ne lui indique de faire autrement. Donc, disons à :mod:`argparse` de traiter " +"cette entrée comme un entier ::" + +#: howto/argparse.rst:217 +msgid "" +"That went well. The program now even helpfully quits on bad illegal input " +"before proceeding." +msgstr "" +"Cela a bien fonctionné. Maintenant le programme va même s'arrêter si " +"l'entrée n'est pas légale avant de procéder à l'exécution." + +#: howto/argparse.rst:222 +msgid "Introducing Optional arguments" +msgstr "Introduction aux arguments optionnels" + +#: howto/argparse.rst:224 +msgid "" +"So far we have been playing with positional arguments. Let us have a look on " +"how to add optional ones::" +msgstr "" +"Jusqu'à maintenant, on a joué avec les arguments positionnels. Regardons " +"comment ajouter des paramètres optionnels ::" + +#: howto/argparse.rst:280 howto/argparse.rst:430 +msgid "And the output:" +msgstr "Et le résultat :" + +#: howto/argparse.rst:254 +msgid "" +"The program is written so as to display something when ``--verbosity`` is " +"specified and display nothing when not." +msgstr "" +"Le programme est écrit de sorte qu'il n'affiche rien sauf si l'option ``--" +"verbosity`` est précisée." + +#: howto/argparse.rst:257 +msgid "" +"To show that the option is actually optional, there is no error when running " +"the program without it. Note that by default, if an optional argument isn't " +"used, the relevant variable, in this case :attr:`args.verbosity`, is given " +"``None`` as a value, which is the reason it fails the truth test of the :" +"keyword:`if` statement." +msgstr "" +"Pour montrer que l'option est bien optionnelle il n'y aura pas d'erreur s'il " +"on exécute le programme sans celle-ci. Notez que par défaut, si une option " +"n'est pas utilisée, la variable associée, dans le cas présent : :attr:`args." +"verbosity`, prend la valeur ``None`` c'est pourquoi elle échoue le test de " +"vérité de l'assertion :keyword:`if`." + +#: howto/argparse.rst:263 +msgid "The help message is a bit different." +msgstr "Le message d'aide est quelque peu différent." + +#: howto/argparse.rst:265 +msgid "" +"When using the ``--verbosity`` option, one must also specify some value, any " +"value." +msgstr "" +"Quand on utilise l'option ``--verbosity`` on doit aussi préciser une valeur, " +"n'importe laquelle." + +#: howto/argparse.rst:268 +msgid "" +"The above example accepts arbitrary integer values for ``--verbosity``, but " +"for our simple program, only two values are actually useful, ``True`` or " +"``False``. Let's modify the code accordingly::" +msgstr "" +"L'exemple ci-dessus accepte des valeurs entières arbitraires pour ``--" +"verbosity`` mais pour notre programme simple seule deux valeurs sont " +"réellement utiles : ``True`` et ``False``. Modifions le code en accord avec " +"cela ::" + +#: howto/argparse.rst:298 +msgid "" +"The option is now more of a flag than something that requires a value. We " +"even changed the name of the option to match that idea. Note that we now " +"specify a new keyword, ``action``, and give it the value ``\"store_true\"``. " +"This means that, if the option is specified, assign the value ``True`` to :" +"data:`args.verbose`. Not specifying it implies ``False``." +msgstr "" +"Maintenant le paramètre est plus une option que quelque chose qui nécessite " +"une valeur. On a même changé le nom du paramètre pour qu'il corresponde à " +"cette idée. Notez que maintenant on précise une nouvelle ``action`` clavier " +"et qu'on lui donne la valeur ``\"store_true\"``. Cela signifie que si " +"l'option est précisée la valeur ``True`` est assignée à :data:`args." +"verbose`. Ne rien préciser implique la valeur ``False``." + +#: howto/argparse.rst:305 +msgid "" +"It complains when you specify a value, in true spirit of what flags actually " +"are." +msgstr "" +"Dans l'esprit de ce que sont vraiment les options, pas des paramètres, il se " +"plaint quand vous tentez de préciser une valeur." + +#: howto/argparse.rst:308 +msgid "Notice the different help text." +msgstr "Notez que l'aide est différente." + +#: howto/argparse.rst:312 +msgid "Short options" +msgstr "Les paramètres raccourcis" + +#: howto/argparse.rst:314 +msgid "" +"If you are familiar with command line usage, you will notice that I haven't " +"yet touched on the topic of short versions of the options. It's quite " +"simple::" +msgstr "" +"Si vous êtes familier avec l'utilisation de la ligne de commande, vous avez " +"dû remarquer que je n'ai pour l'instant rien dit au sujet des versions " +"raccourcies des paramètres. C'est très simple ::" + +#: howto/argparse.rst:326 +msgid "And here goes:" +msgstr "Et voilà :" + +#: howto/argparse.rst:339 +msgid "Note that the new ability is also reflected in the help text." +msgstr "Notez que la nouvelle option est aussi indiquée dans l'aide." + +#: howto/argparse.rst:343 +msgid "Combining Positional and Optional arguments" +msgstr "Combinaison d'arguments positionnels et optionnels" + +#: howto/argparse.rst:345 +msgid "Our program keeps growing in complexity::" +msgstr "Notre programme continue de croître en complexité ::" + +#: howto/argparse.rst:360 +msgid "And now the output:" +msgstr "Et voilà le résultat :" + +#: howto/argparse.rst:374 +msgid "We've brought back a positional argument, hence the complaint." +msgstr "Nous avons ajouté un argument nommé, d'où le message d'erreur." + +#: howto/argparse.rst:376 +msgid "Note that the order does not matter." +msgstr "Notez que l'ordre importe peu." + +#: howto/argparse.rst:378 +msgid "" +"How about we give this program of ours back the ability to have multiple " +"verbosity values, and actually get to use them::" +msgstr "" +"Qu'en est-il si nous donnons à ce programme la possibilité d'avoir plusieurs " +"niveaux de verbosité, et que celui-ci les prend en compte ::" + +#: howto/argparse.rst:412 +msgid "" +"These all look good except the last one, which exposes a bug in our program. " +"Let's fix it by restricting the values the ``--verbosity`` option can " +"accept::" +msgstr "" +"Tout semble bon sauf le dernier, qui montre que notre programme contient un " +"bogue. Corrigeons cela en restreignant les valeurs que ``--verbosity`` " +"accepte ::" + +#: howto/argparse.rst:448 +msgid "" +"Note that the change also reflects both in the error message as well as the " +"help string." +msgstr "" +"Notez que ce changement est pris en compte à la fois dans le message " +"d'erreur et dans le texte d'aide." + +#: howto/argparse.rst:451 +msgid "" +"Now, let's use a different approach of playing with verbosity, which is " +"pretty common. It also matches the way the CPython executable handles its " +"own verbosity argument (check the output of ``python --help``)::" +msgstr "" +"Essayons maintenant une approche différente pour jouer sur la verbosité, ce " +"qui arrive fréquemment. Cela correspond également à comment le programme " +"CPython gère ses propres paramètres de verbosité (jetez un œil sur la sortie " +"de la commande ``python --help``) ::" + +#: howto/argparse.rst:470 +msgid "" +"We have introduced another action, \"count\", to count the number of " +"occurrences of specific options." +msgstr "" +"Nous avons introduit une autre action, ``\"count\"``, pour compter le nombre " +"d’occurrences d'une option en particulier :" + +#: howto/argparse.rst:499 +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." + +#: howto/argparse.rst:502 +msgid "It also behaves similar to \"store_true\" action." +msgstr "Cela se comporte de la même manière que l'action ``\"store_true\"``." + +#: howto/argparse.rst:504 +msgid "" +"Now here's a demonstration of what the \"count\" action gives. You've " +"probably seen this sort of usage before." +msgstr "" +"Maintenant voici une démonstration de ce que l'action ``\"count\"`` fait. " +"Vous avez sûrement vu ce genre d'utilisation auparavant." + +#: howto/argparse.rst:507 +msgid "" +"And if you don't specify the ``-v`` flag, that flag is considered to have " +"``None`` value." +msgstr "" +"Et si vous ne spécifiez pas l'option ``-v``, cette option prendra la valeur " +"``None``." + +#: howto/argparse.rst:510 +msgid "" +"As should be expected, specifying the long form of the flag, we should get " +"the same output." +msgstr "" +"Comme on s'y attend, en spécifiant l'option dans sa forme longue, on devrait " +"obtenir la même sortie." + +#: howto/argparse.rst:513 +msgid "" +"Sadly, our help output isn't very informative on the new ability our script " +"has acquired, but that can always be fixed by improving the documentation " +"for our script (e.g. via the ``help`` keyword argument)." +msgstr "" +"Malheureusement, notre sortie d'aide n'est pas très informative à propos des " +"nouvelles possibilités de notre programme, mais cela peut toujours être " +"corrigé en améliorant sa documentation (en utilisant l'argument ``help``)." + +#: howto/argparse.rst:517 +msgid "That last output exposes a bug in our program." +msgstr "La dernière sortie du programme montre que celui-ci contient un bogue." + +#: howto/argparse.rst:520 +msgid "Let's fix::" +msgstr "Corrigeons ::" + +#: howto/argparse.rst:539 +msgid "And this is what it gives:" +msgstr "Et c'est ce que ça donne :" + +#: howto/argparse.rst:554 +msgid "" +"First output went well, and fixes the bug we had before. That is, we want " +"any value >= 2 to be as verbose as possible." +msgstr "" +"Les premières exécutions du programme sont correctes, et le bogue que nous " +"avons eu est corrigé. Cela dit, nous voulons que n'importe quelle valeur >= " +"2 rende le programme aussi verbeux que possible." + +#: howto/argparse.rst:557 +msgid "Third output not so good." +msgstr "La troisième sortie de programme n'est pas si bien que ça." + +#: howto/argparse.rst:559 +msgid "Let's fix that bug::" +msgstr "Corrigeons ce bogue ::" + +#: howto/argparse.rst:576 +msgid "" +"We've just introduced yet another keyword, ``default``. We've set it to " +"``0`` in order to make it comparable to the other int values. Remember that " +"by default, if an optional argument isn't specified, it gets the ``None`` " +"value, and that cannot be compared to an int value (hence the :exc:" +"`TypeError` exception)." +msgstr "" +"Nous venons juste d'introduire un nouveau mot clef, ``default``. Nous " +"l'avons définit à ``0`` pour le rendre comparable aux autres valeurs. " +"Rappelez-vous que par défaut, si un argument optionnel n'est pas spécifié, " +"il sera définit à ``None``, et ne pourra pas être comparé à une valeur de " +"type entier (une erreur :exc:`TypeError` serait alors levée)." + +#: howto/argparse.rst:583 +msgid "And:" +msgstr "Et :" + +#: howto/argparse.rst:590 +msgid "" +"You can go quite far just with what we've learned so far, and we have only " +"scratched the surface. The :mod:`argparse` module is very powerful, and " +"we'll explore a bit more of it before we end this tutorial." +msgstr "" +"Vous pouvez aller assez loin seulement avec ce que nous avons appris jusqu'à " +"maintenant, et nous n'avons qu’aperçu la surface. Le module :mod:`argparse` " +"est très puissant, et nous allons l'explorer un peu plus avant la fin de ce " +"tutoriel." + +#: howto/argparse.rst:597 +msgid "Getting a little more advanced" +msgstr "Aller un peu plus loin" + +#: howto/argparse.rst:599 +msgid "" +"What if we wanted to expand our tiny program to perform other powers, not " +"just squares::" +msgstr "" +"Qu'en est-il si nous souhaitons étendre notre mini programme pour le rendre " +"capable de calculer d'autres puissances, et pas seulement des carrés ::" + +#: howto/argparse.rst:654 +msgid "Output:" +msgstr "Sortie :" + +#: howto/argparse.rst:637 +msgid "" +"Notice that so far we've been using verbosity level to *change* the text " +"that gets displayed. The following example instead uses verbosity level to " +"display *more* text instead::" +msgstr "" +"Il est à noter que jusqu'à présent nous avons utilisé le niveau de verbosité " +"pour *changer* le texte qui est affiché. L'exemple suivant au contraire " +"utilise le niveau de verbosité pour afficher *plus* de texte à la place ::" + +#: howto/argparse.rst:668 +msgid "Conflicting options" +msgstr "Paramètres en conflit" + +#: howto/argparse.rst:670 +msgid "" +"So far, we have been working with two methods of an :class:`argparse." +"ArgumentParser` instance. Let's introduce a third one, :meth:" +"`add_mutually_exclusive_group`. It allows for us to specify options that " +"conflict with each other. Let's also change the rest of the program so that " +"the new functionality makes more sense: we'll introduce the ``--quiet`` " +"option, which will be the opposite of the ``--verbose`` one::" +msgstr "" +"Jusque là, nous avons travaillé avec deux méthodes d'une instance de :class:" +"`argparse.ArgumentParser`. En voici une troisième, :meth:" +"`add_mutually_exclusive_group`. Elle nous permet de spécifier des paramètres " +"qui sont en conflit entre eux. Changeons aussi le reste du programme de " +"telle sorte que la nouvelle fonctionnalité fasse sens : nous allons " +"introduire l'option ``--quiet``, qui va avoir l'effet opposé de l'option ``--" +"verbose`` ::" + +#: howto/argparse.rst:696 +msgid "" +"Our program is now simpler, and we've lost some functionality for the sake " +"of demonstration. Anyways, here's the output:" +msgstr "" +"Notre programme est maintenant plus simple, et nous avons perdu des " +"fonctionnalités pour faire cette démonstration. Peu importe, voici la sortie " +"du programme :" + +#: howto/argparse.rst:714 +msgid "" +"That should be easy to follow. I've added that last output so you can see " +"the sort of flexibility you get, i.e. mixing long form options with short " +"form ones." +msgstr "" +"Cela devrait être facile à suivre. J'ai ajouté cette dernière sortie pour " +"que vous puissiez voir le genre de flexibilité que vous pouvez avoir, par " +"exemple pour faire un mélange entre des paramètres courts et longs." + +#: howto/argparse.rst:718 +msgid "" +"Before we conclude, you probably want to tell your users the main purpose of " +"your program, just in case they don't know::" +msgstr "" +"Avant d'en finir, vous voudrez certainement dire à vos utilisateurs quel est " +"le but principal de votre programme, juste dans le cas ou ils ne le " +"sauraient pas ::" + +#: howto/argparse.rst:739 +msgid "" +"Note that slight difference in the usage text. Note the ``[-v | -q]``, which " +"tells us that we can either use ``-v`` or ``-q``, but not both at the same " +"time:" +msgstr "" +"Notez cette nuance dans le texte d'utilisation. Les options ``[-v | -q]`` " +"nous disent que nous pouvons utiliser au choix ``-v`` ou ``-q``, mais pas " +"les deux ensemble :" + +#: howto/argparse.rst:761 +msgid "Conclusion" +msgstr "Conclusion" + +#: howto/argparse.rst:763 +msgid "" +"The :mod:`argparse` module offers a lot more than shown here. Its docs are " +"quite detailed and thorough, and full of examples. Having gone through this " +"tutorial, you should easily digest them without feeling overwhelmed." +msgstr "" +"Le module :mod:`argparse` offre bien plus que ce qui est montré ici. Sa " +"documentation est assez détaillée, complète et pleine d'exemples. En ayant " +"accompli ce tutoriel, vous pourrez facilement comprendre cette documentation " +"sans vous sentir dépassé." diff --git a/howto/clinic.po b/howto/clinic.po new file mode 100644 index 0000000000..43ec50242a --- /dev/null +++ b/howto/clinic.po @@ -0,0 +1,2977 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-18 15:46+0200\n" +"PO-Revision-Date: 2022-10-18 12:29+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" + +#: howto/clinic.rst:5 +msgid "Argument Clinic How-To" +msgstr "Guide Argument Clinic" + +#: howto/clinic.rst:0 +msgid "author" +msgstr "auteur" + +#: howto/clinic.rst:7 +msgid "Larry Hastings" +msgstr "Larry Hastings" + +#: howto/clinic.rst:None +msgid "Abstract" +msgstr "Résumé" + +#: howto/clinic.rst:12 +msgid "" +"Argument Clinic is a preprocessor for CPython C files. Its purpose is to " +"automate all the boilerplate involved with writing argument parsing code for " +"\"builtins\". This document shows you how to convert your first C function " +"to work with Argument Clinic, and then introduces some advanced topics on " +"Argument Clinic usage." +msgstr "" +"Argument Clinic est un préprocesseur pour les fichiers C de CPython. Il " +"permet d'automatiser les tâches répétitives lors de la rédaction du code " +"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." + +#: howto/clinic.rst:19 +msgid "" +"Currently Argument Clinic is considered internal-only for CPython. Its use " +"is not supported for files outside CPython, and no guarantees are made " +"regarding backwards compatibility for future versions. In other words: if " +"you maintain an external C extension for CPython, you're welcome to " +"experiment with Argument Clinic in your own code. But the version of " +"Argument Clinic that ships with the next version of CPython *could* be " +"totally incompatible and break all your code." +msgstr "" +"Argument Clinic est pour le moment considéré comme un outil interne à " +"CPython. Il n'est pas conçu pour gérer des fichiers à l'extérieur de " +"CPython, et sa compatibilité ascendante n'est pas garantie pour les versions " +"futures. En d'autres termes, si vous êtes mainteneur d'une extension C pour " +"CPython, vous pouvez bien sûr expérimenter avec Argument Clinic sur votre " +"propre code. Mais la version d'Argument Clinic livrée avec la prochaine " +"version de CPython *pourrait* être totalement incompatible et casser tout " +"votre code." + +#: howto/clinic.rst:29 +msgid "The Goals Of Argument Clinic" +msgstr "Les objectifs d'Argument Clinic" + +#: howto/clinic.rst:31 +msgid "" +"Argument Clinic's primary goal is to take over responsibility for all " +"argument parsing code inside CPython. This means that, when you convert a " +"function to work with Argument Clinic, that function should no longer do any " +"of its own argument parsing—the code generated by Argument Clinic should be " +"a \"black box\" to you, where CPython calls in at the top, and your code " +"gets called at the bottom, with ``PyObject *args`` (and maybe ``PyObject " +"*kwargs``) magically converted into the C variables and types you need." +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 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 "" +"In order for Argument Clinic to accomplish its primary goal, it must be easy " +"to use. Currently, working with CPython's argument parsing library is a " +"chore, requiring maintaining redundant information in a surprising number of " +"places. When you use Argument Clinic, you don't have to repeat yourself." +msgstr "" +"Pour que le premier objectif d'Argument Clinic soit atteint, il faut qu'il " +"soit facile à utiliser. Actuellement, travailler avec la bibliothèque " +"d'analyse d'arguments de CPython est une corvée. Il faut maintenir une " +"quantité surprenante d'informations redondantes. En utilisant Argument " +"Clinic, il n'est plus nécessaire de se répéter." + +#: howto/clinic.rst:47 +msgid "" +"Obviously, no one would want to use Argument Clinic unless it's solving " +"their problem—and without creating new problems of its own. So it's " +"paramount that Argument Clinic generate correct code. It'd be nice if the " +"code was faster, too, but at the very least it should not introduce a major " +"speed regression. (Eventually Argument Clinic *should* make a major speedup " +"possible—we could rewrite its code generator to produce tailor-made argument " +"parsing code, rather than calling the general-purpose CPython argument " +"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 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'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 "" +"Additionally, Argument Clinic must be flexible enough to work with any " +"approach to argument parsing. Python has some functions with some very " +"strange parsing behaviors; Argument Clinic's goal is to support all of them." +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." + +#: howto/clinic.rst:64 +msgid "" +"Finally, the original motivation for Argument Clinic was to provide " +"introspection \"signatures\" for CPython builtins. It used to be, the " +"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. " +"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é !" + +#: howto/clinic.rst:70 +msgid "" +"One idea you should keep in mind, as you work with Argument Clinic: the more " +"information you give it, the better job it'll be able to do. Argument Clinic " +"is admittedly relatively simple right now. But as it evolves it will get " +"more sophisticated, and it should be able to do many interesting and smart " +"things with all the information you give it." +msgstr "" +"En travaillant avec Argument Clinic, il faut garder à l'esprit que plus vous " +"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 à sa disposition." + +#: howto/clinic.rst:80 +msgid "Basic Concepts And Usage" +msgstr "Concepts de base et utilisation" + +#: howto/clinic.rst:82 +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/" +"clinic/clinic.py``. Si vous exécutez ce script, en spécifiant un fichier C " +"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 :" + +#: 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 :" + +#: howto/clinic.rst:103 +msgid "" +"Everything in between these two lines is input for Argument Clinic. All of " +"these lines, including the beginning and ending comment lines, are " +"collectively called an Argument Clinic \"block\"." +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." + +#: howto/clinic.rst:107 +msgid "" +"When Argument Clinic parses one of these blocks, it generates output. This " +"output is rewritten into the C file immediately after the block, followed by " +"a comment containing a checksum. The Argument Clinic block now looks like " +"this:" +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 :" + +#: howto/clinic.rst:120 +msgid "" +"If you run Argument Clinic on the same file a second time, Argument Clinic " +"will discard the old output and write out the new output with a fresh " +"checksum line. However, if the input hasn't changed, the output won't " +"change either." +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." + +#: howto/clinic.rst:124 +msgid "" +"You should never modify the output portion of an Argument Clinic block. " +"Instead, change the input until it produces the output you want. (That's " +"the purpose of the checksum—to detect if someone changed the output, as " +"these edits would be lost the next time Argument Clinic writes out fresh " +"output.)" +msgstr "" +"Vous ne devez jamais modifier la sortie d'un bloc Argument Clinic. Changez " +"plutôt l'entrée jusqu'à obtenir la sortie souhaitée (c'est précisément le " +"but de la somme de contrôle, détecter si la sortie a été changée. En effet, " +"ces modifications seront perdues après que Argument Clinic a écrit une " +"nouvelle sortie)." + +#: howto/clinic.rst:129 +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 :" + +#: howto/clinic.rst:131 +msgid "" +"The first line of the comment (``/*[clinic input]``) is the *start line*." +msgstr "" +"La première ligne du commentaire (``/*[clinic input]``) est la *ligne de " +"début*." + +#: howto/clinic.rst:132 +msgid "" +"The last line of the initial comment (``[clinic start generated code]*/``) " +"is the *end line*." +msgstr "" +"La dernière ligne du commentaire initial (``[clinic start generated code]*/" +"``) est la *ligne de fin*." + +#: howto/clinic.rst:133 +msgid "" +"The last line (``/*[clinic end generated code: checksum=...]*/``) is the " +"*checksum line*." +msgstr "" +"La dernière ligne (``/*[clinic end generated code: checksum=...]*/``) est la " +"*ligne de contrôle*." + +#: howto/clinic.rst:134 +msgid "In between the start line and the end line is the *input*." +msgstr "" +"On appelle *entrée* ce qui se trouve entre la ligne de début et la ligne de " +"fin." + +#: howto/clinic.rst:135 +msgid "In between the end line and the checksum line is the *output*." +msgstr "" +"Et on appelle *sortie* ce qui se trouve entre la ligne de fin et la ligne de " +"contrôle." + +#: howto/clinic.rst:136 +msgid "" +"All the text collectively, from the start line to the checksum line " +"inclusively, is the *block*. (A block that hasn't been successfully " +"processed by Argument Clinic yet doesn't have output or a checksum line, but " +"it's still considered a block.)" +msgstr "" +"L'ensemble du texte, depuis la ligne de début jusqu'à la ligne de contrôle " +"incluse s'appelle le *bloc*. (Un bloc qui n'a pas encore été traité avec " +"succès par Argument Clinic n'a pas encore de sortie ni de ligne de contrôle " +"mais est quand même considéré comme un bloc)" + +#: howto/clinic.rst:143 +msgid "Converting Your First Function" +msgstr "Convertissez votre première fonction" + +#: howto/clinic.rst:145 +msgid "" +"The best way to get a sense of how Argument Clinic works is to convert a " +"function to work with it. Here, then, are the bare minimum steps you'd need " +"to follow to convert a function to work with Argument Clinic. Note that for " +"code you plan to check in to CPython, you really should take the conversion " +"farther, using some of the advanced concepts you'll see later on in the " +"document (like \"return converters\" and \"self converters\"). But we'll " +"keep it simple for this walkthrough so you can learn." +msgstr "" +"La meilleure manière de comprendre le fonctionnement d'Argument Clinic est " +"de convertir une fonction. Voici donc les étapes minimales que vous devez " +"suivre pour convertir une fonction de manière à ce qu'elle fonctionne avec " +"Argument Clinic. Remarquez que pour du code que vous comptez inclure dans " +"CPython, vous devrez certainement pousser plus loin la conversion, en " +"utilisant les concepts avancés que nous verrons plus loin dans ce document " +"(comme ``return converters`` et ``self converters``). Mais concentrons nous " +"pour le moment sur les choses simples." + +#: howto/clinic.rst:154 +msgid "Let's dive in!" +msgstr "En route !" + +#: howto/clinic.rst:156 +msgid "" +"Make sure you're working with a freshly updated checkout of the CPython " +"trunk." +msgstr "" +"Assurez-vous que vous travaillez sur une copie récemment mise à jour du code " +"de CPython." + +#: howto/clinic.rst:159 +msgid "" +"Find a Python builtin that calls either :c:func:`PyArg_ParseTuple` or :c:" +"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 " +"encore été convertie par Argument Clinic. Pour cet exemple, j'utilise " +"``_pickle.Pickler.dump()``." + +#: howto/clinic.rst:164 +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 :" + +#: howto/clinic.rst:176 +msgid "" +"or if it has multiple calls to :c:func:`PyArg_ParseTuple`, you should choose " +"a different function. Argument Clinic *does* support all of these " +"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 ce sont " +"des sujets trop avancés pour notre première fonction." + +#: howto/clinic.rst:181 +msgid "" +"Also, if the function has multiple calls to :c:func:`PyArg_ParseTuple` or :c:" +"func:`PyArg_ParseTupleAndKeywords` where it supports different types for the " +"same argument, or if the function uses something besides PyArg_Parse " +"functions to parse its arguments, it probably isn't suitable for conversion " +"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 " +"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." + +#: howto/clinic.rst:188 +msgid "Add the following boilerplate above the function, creating our block::" +msgstr "" +"Ajoutez les lignes standard suivantes au-dessus de votre fonction pour créer " +"notre bloc ::" + +#: howto/clinic.rst:193 +msgid "" +"Cut the docstring and paste it in between the ``[clinic]`` lines, removing " +"all the junk that makes it a properly quoted C string. When you're done you " +"should have just the text, based at the left margin, with no line wider than " +"80 characters. (Argument Clinic will preserve indents inside the docstring.)" +msgstr "" +"Coupez la *docstring* et collez-la entre les lignes commençant par " +"``[clinic]``, en enlevant tout le bazar qui en fait une chaîne de caractères " +"correcte en C. Une fois que c'est fait, vous devez avoir seulement le texte, " +"aligné à gauche, sans ligne plus longue que 80 caractères (Argument Clinic " +"préserve l'indentation à l'intérieur de la *docstring*)." + +#: howto/clinic.rst:199 +msgid "" +"If the old docstring had a first line that looked like a function signature, " +"throw that line away. (The docstring doesn't need it anymore—when you use " +"``help()`` on your builtin in the future, the first line will be built " +"automatically based on the function's signature.)" +msgstr "" +"Si l'ancienne *docstring* commençait par une ligne qui ressemble à une " +"signature de fonction, supprimez cette ligne. (Elle n'est plus nécessaire " +"pour la *docstring*. Dans le futur, quand vous utiliserez ``help()`` pour " +"une fonction native, la première ligne sera construite automatiquement à " +"partir de la signature de la fonction.)" + +#: howto/clinic.rst:226 howto/clinic.rst:308 howto/clinic.rst:375 +#: howto/clinic.rst:533 +msgid "Sample::" +msgstr "Échantillon ::" + +#: howto/clinic.rst:211 +msgid "" +"If your docstring doesn't have a \"summary\" line, Argument Clinic will " +"complain. So let's make sure it has one. The \"summary\" line should be a " +"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 " +"être un paragraphe consistant en une seule ligne de 80 colonnes au début de " +"la *docstring*." + +#: howto/clinic.rst:216 +msgid "" +"(Our example docstring consists solely of a summary line, so the sample code " +"doesn't have to change for this step.)" +msgstr "" +"Dans notre exemple, la *docstring* est seulement composée d'une ligne de " +"résumé, donc le code ne change pas à cette étape." + +#: howto/clinic.rst:219 +msgid "" +"Above the docstring, enter the name of the function, followed by a blank " +"line. This should be the Python name of the function, and should be the " +"full dotted path to the function—it should start with the name of the " +"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 " +"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 " +"aussi le nom de la classe." + +#: howto/clinic.rst:234 +msgid "" +"If this is the first time that module or class has been used with Argument " +"Clinic in this C file, you must declare the module and/or class. Proper " +"Argument Clinic hygiene prefers declaring these in a separate block " +"somewhere near the top of the C file, in the same way that include files and " +"statics go at the top. (In our sample code we'll just show the two blocks " +"next to each other.)" +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é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)." + +#: howto/clinic.rst:242 +msgid "" +"The name of the class and module should be the same as the one seen by " +"Python. Check the name defined in the :c:type:`PyModuleDef` or :c:type:" +"`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:" +"`PyTypeObject`" + +#: howto/clinic.rst:246 +msgid "" +"When you declare a class, you must also specify two aspects of its type in " +"C: the type declaration you'd use for a pointer to an instance of this " +"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:" +"`PyTypeObject` de cette classe." + +#: howto/clinic.rst:266 +msgid "" +"Declare each of the parameters to the function. Each parameter should get " +"its own line. All the parameter lines should be indented from the function " +"name and the docstring." +msgstr "" +"Déclarez chacun des paramètres de la fonction. Chaque paramètre doit être " +"sur une ligne séparée. Tous les paramètres doivent être indentés par rapport " +"au nom de la fonction et à la *docstring*." + +#: 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 :" + +#: 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 :" + +#: howto/clinic.rst:283 +msgid "" +"Argument Clinic's support for \"default values\" is quite sophisticated; " +"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 " +"` pour plus de détails." + +#: howto/clinic.rst:287 +msgid "Add a blank line below the parameters." +msgstr "Ajoutez une ligne vide sous les paramètres." + +#: howto/clinic.rst:289 +msgid "" +"What's a \"converter\"? It establishes both the type of the variable used " +"in C, and the method to convert the Python value into a C value at runtime. " +"For now you're going to use what's called a \"legacy converter\"—a " +"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 " +"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 vieux code dans Argument Clinic." + +#: howto/clinic.rst:296 +msgid "" +"For each parameter, copy the \"format unit\" for that parameter from the " +"``PyArg_Parse()`` format argument and specify *that* as its converter, as a " +"quoted string. (\"format unit\" is the formal name for the one-to-three " +"character substring of the ``format`` parameter that tells the argument " +"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 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 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 "" +"If your function has ``|`` in the format string, meaning some parameters " +"have default values, you can ignore it. Argument Clinic infers which " +"parameters are optional based on whether or not they have default values." +msgstr "" +"Si votre fonction a le caractère ``|`` dans son format, parce que certains " +"paramètres ont des valeurs par défaut, vous pouvez l'ignorer. Argument " +"Clinic infère quels paramètres sont optionnels selon s'ils ont ou non une " +"valeur par défaut." + +#: howto/clinic.rst:328 +msgid "" +"If your function has ``$`` in the format string, meaning it takes keyword-" +"only arguments, specify ``*`` on a line by itself before the first keyword-" +"only argument, indented the same as the parameter lines." +msgstr "" +"Si votre fonction a le caractère ``$`` dans son format, parce qu'elle " +"n'accepte que des arguments nommés, spécifiez ``*`` sur une ligne à part, " +"avant le premier argument nommé, avec la même indentation que les lignes de " +"paramètres." + +#: howto/clinic.rst:333 +msgid "(``_pickle.Pickler.dump`` has neither, so our sample is unchanged.)" +msgstr "" +"(``_pickle.Pickler.dump`` n'a ni l'un ni l'autre, donc notre exemple est " +"inchangé.)" + +#: howto/clinic.rst:336 +msgid "" +"If the existing C function calls :c:func:`PyArg_ParseTuple` (as opposed to :" +"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:" +"func:`PyArg_ParseTupleAndKeywords`), alors tous ses arguments sont " +"uniquement positionnels." + +#: howto/clinic.rst:340 +msgid "" +"To mark all parameters as positional-only in Argument Clinic, add a ``/`` on " +"a line by itself after the last parameter, indented the same as the " +"parameter lines." +msgstr "" +"Pour marquer tous les paramètres comme uniquement positionnels dans Argument " +"Clinic, ajoutez ``/`` sur une ligne à part après le dernier paramètre, avec " +"la même indentation que les lignes de paramètres." + +#: howto/clinic.rst:344 +msgid "" +"Currently this is all-or-nothing; either all parameters are positional-only, " +"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 " +"uniquement positionnels, ou aucun ne l'est. (Dans le futur, Argument Clinic " +"supprimera peut-être cette restriction.)" + +#: howto/clinic.rst:364 +msgid "" +"It's helpful to write a per-parameter docstring for each parameter. But per-" +"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." + +#: howto/clinic.rst:368 +msgid "" +"Here's how to add a per-parameter docstring. The first line of the per-" +"parameter docstring must be indented further than the parameter definition. " +"The left margin of this first line establishes the left margin for the whole " +"per-parameter docstring; all the text you write will be outdented by this " +"amount. You can write as much text as you like, across multiple lines if " +"you wish." +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." + +#: howto/clinic.rst:392 +msgid "" +"Save and close the file, then run ``Tools/clinic/clinic.py`` on it. With " +"luck everything worked---your block now has output, and a ``.c.h`` file has " +"been generated! Reopen the file in your text editor to see::" +msgstr "" +"Enregistrez puis fermez le fichier, puis exécutez ``Tools/clinic/clinic.py`` " +"dessus. Avec un peu de chance tout a fonctionné, votre bloc a maintenant une " +"sortie, et un fichier ``.c.h`` a été généré ! Ré-ouvrez le fichier dans " +"votre éditeur pour voir ::" + +#: howto/clinic.rst:411 +msgid "" +"Obviously, if Argument Clinic didn't produce any output, it's because it " +"found an error in your input. Keep fixing your errors and retrying until " +"Argument Clinic processes your file without complaint." +msgstr "" +"Bien sûr, si Argument Clinic n'a pas produit de sortie, c'est qu'il a " +"rencontré une erreur dans votre entrée. Corrigez vos erreurs et réessayez " +"jusqu'à ce qu'Argument Clinic traite votre fichier sans problème." + +#: howto/clinic.rst:415 +msgid "" +"For readability, most of the glue code has been generated to a ``.c.h`` " +"file. You'll need to include that in your original ``.c`` file, typically " +"right after the clinic module block::" +msgstr "" +"Pour plus de visibilité, la plupart du code a été écrit dans un fichier ``.c." +"h``. Vous devez l'inclure dans votre fichier ``.c`` original, typiquement " +"juste après le bloc du module *clinic* ::" + +#: howto/clinic.rst:421 +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'arguments généré par Argument Clinic " +"ressemble bien au code existant." + +#: howto/clinic.rst:424 +msgid "" +"First, ensure both places use the same argument-parsing function. The " +"existing code must call either :c:func:`PyArg_ParseTuple` or :c:func:" +"`PyArg_ParseTupleAndKeywords`; ensure that the code generated by Argument " +"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 " +"que le code généré par Argument Clinic appelle *exactement* la même fonction." + +#: howto/clinic.rst:430 +msgid "" +"Second, the format string passed in to :c:func:`PyArg_ParseTuple` or :c:func:" +"`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 " +"*exactement* la même que celle écrite à la main, jusqu'aux deux points ou au " +"point virgule." + +#: howto/clinic.rst:435 +msgid "" +"(Argument Clinic always generates its format strings with a ``:`` followed " +"by the name of the function. If the existing code's format string ends with " +"``;``, 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 ``;" +"``, pour fournir une aide sur l'utilisation, ce changement n'a aucun effet, " +"ne vous en souciez pas.)" + +#: howto/clinic.rst:440 +msgid "" +"Third, for parameters whose format units require two arguments (like a " +"length variable, or an encoding string, or a pointer to a conversion " +"function), ensure that the second argument is *exactly* the same between the " +"two invocations." +msgstr "" +"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 +msgid "" +"Fourth, inside the output portion of the block you'll find a preprocessor " +"macro defining the appropriate static :c:type:`PyMethodDef` structure for " +"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:" +"`PyMethodDef` appropriées pour ce module natif ::" + +#: howto/clinic.rst:452 +msgid "" +"This static structure should be *exactly* the same as the existing static :c:" +"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." + +#: howto/clinic.rst:455 +msgid "" +"If any of these items differ in *any way*, adjust your Argument Clinic " +"function specification and rerun ``Tools/clinic/clinic.py`` until they *are* " +"the same." +msgstr "" +"Si l'un de ces éléments diffère *de quelque façon que se soit*, ajustez la " +"spécification de fonction d'Argument Clinic et exécutez de nouveau ``Tools/" +"clinic/clinic.py`` jusqu'à ce qu'elles soient identiques." + +#: howto/clinic.rst:460 +msgid "" +"Notice that the last line of its output is the declaration of your \"impl\" " +"function. This is where the builtin's implementation goes. Delete the " +"existing prototype of the function you're modifying, but leave the opening " +"curly brace. Now delete its argument parsing code and the declarations of " +"all the variables it dumps the arguments into. Notice how the Python " +"arguments are now arguments to this impl function; if the implementation " +"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 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 "" +"Let's reiterate, just because it's kind of weird. Your code should now look " +"like this::" +msgstr "" +"Comme c'est un peu bizarre, ça vaut la peine de répéter. Votre fonction doit " +"ressembler à ça ::" + +#: howto/clinic.rst:477 +msgid "" +"Argument Clinic generated the checksum line and the function prototype just " +"above it. You should write the opening (and closing) curly braces for the " +"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) " +"pour la fonction, et l’implémentation à l'intérieur." + +#: howto/clinic.rst:522 +msgid "" +"Remember the macro with the :c:type:`PyMethodDef` structure for this " +"function? Find the existing :c:type:`PyMethodDef` structure for this " +"function and replace it with a reference to the macro. (If the builtin is " +"at module scope, this will probably be very near the end of the file; if the " +"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 " +"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'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 "" +"Note that the body of the macro contains a trailing comma. So when you " +"replace the existing static :c:type:`PyMethodDef` structure with the macro, " +"*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, " +"*n'ajoutez pas* de virgule à la fin." + +#: howto/clinic.rst:542 +#, fuzzy +msgid "" +"Compile, then run the relevant portions of the regression-test suite. This " +"change should not introduce any new compile-time warnings or errors, and " +"there should be no externally visible change to Python's behavior." +msgstr "" +"Compilez, puis faites tourner les portions idoines de la suite de tests de " +"régressions. Ce changement ne doit introduire aucun nouveau message d'erreur " +"ou avertissement à la compilation, et il ne devrait y avoir aucun changement " +"visible de l'extérieur au comportement de Python." + +#: howto/clinic.rst:546 +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 !" + +#: howto/clinic.rst:549 +msgid "" +"Congratulations, you've ported your first function to work with Argument " +"Clinic!" +msgstr "" +"Félicitations, vous avez adapté votre première fonction pour qu'elle utilise " +"Argument Clinic !" + +#: howto/clinic.rst:552 +msgid "Advanced Topics" +msgstr "Sujets avancés" + +#: howto/clinic.rst:554 +msgid "" +"Now that you've had some experience working with Argument Clinic, it's time " +"for some advanced topics." +msgstr "" +"Maintenant que vous avez un peu d'expérience avec Argument Clinic, c'est le " +"moment pour des sujets avancés." + +#: howto/clinic.rst:559 +msgid "Symbolic default values" +msgstr "Valeurs par défaut" + +#: howto/clinic.rst:561 +msgid "" +"The default value you provide for a parameter can't be any arbitrary " +"expression. Currently the following are explicitly supported:" +msgstr "" +"La valeur par défaut que vous fournissez pour un paramètre ne peut pas être " +"n'importe quelle expression. Actuellement, ce qui est géré :" + +#: howto/clinic.rst:564 +msgid "Numeric constants (integer and float)" +msgstr "Constantes numériques (entier ou nombre flottant)" + +#: howto/clinic.rst:565 +msgid "String constants" +msgstr "Chaînes constantes" + +#: howto/clinic.rst:566 +msgid "``True``, ``False``, and ``None``" +msgstr "``True``, ``False`` et ``None``" + +#: howto/clinic.rst:567 +msgid "" +"Simple symbolic constants like ``sys.maxsize``, which must start with the " +"name of the module" +msgstr "" +"Constantes symboliques simples comme ``sys.maxsize``, qui doivent commencer " +"par le nom du module" + +#: howto/clinic.rst:570 +msgid "" +"In case you're curious, this is implemented in ``from_builtin()`` in ``Lib/" +"inspect.py``." +msgstr "" +"Si par curiosité vous voulez lire l'implémentation, c'est ``from_builtin()`` " +"dans ``Lib/inspect.py``." + +#: howto/clinic.rst:573 +msgid "" +"(In the future, this may need to get even more elaborate, to allow full " +"expressions like ``CONSTANT - 1``.)" +msgstr "" +"(Dans le futur, il est possible que l'on ait besoin de l'améliorer, pour " +"autoriser les expressions complètes comme ``CONSTANT - 1``.)" + +#: howto/clinic.rst:578 +msgid "Renaming the C functions and variables generated by Argument Clinic" +msgstr "Renommer les fonctions et variables C générées par Argument Clinic" + +#: howto/clinic.rst:580 +msgid "" +"Argument Clinic automatically names the functions it generates for you. " +"Occasionally this may cause a problem, if the generated name collides with " +"the name of an existing C function. There's an easy solution: override the " +"names used for the C functions. Just add the keyword ``\"as\"`` to your " +"function declaration line, followed by the function name you wish to use. " +"Argument Clinic will use that function name for the base (generated) " +"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 "" +"For example, if we wanted to rename the C function names generated for " +"``pickle.Pickler.dump``, it'd look like this::" +msgstr "" +"Par exemple, si nous voulons renommer les noms de fonction C générés pour " +"``pickle.Pickler.dump``, ça ressemblerait à ça ::" + +#: howto/clinic.rst:596 +msgid "" +"The base function would now be named ``pickler_dumper()``, and the impl " +"function would now be named ``pickler_dumper_impl()``." +msgstr "" +"La fonction de base sera maintenant nommée ``pickler_dumper()``, et la " +"fonction ``impl`` sera maintenant nommée ``pickler_dumper_impl()``." + +#: howto/clinic.rst:600 +msgid "" +"Similarly, you may have a problem where you want to give a parameter a " +"specific Python name, but that name may be inconvenient in C. Argument " +"Clinic allows you to give a parameter different names in Python and in C, " +"using the same ``\"as\"`` syntax::" +msgstr "" +"De même, vous pouvez avoir un problème quand vous souhaiterez donner à un " +"paramètre un nom spécifique à Python, mais ce nom peut être gênant en C. " +"Argument Clinic vous permet de donner à un paramètre des noms différents en " +"Python et en C ::" + +#: howto/clinic.rst:614 +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!" +msgstr "Vous pouvez utiliser ceci pour renommer aussi le paramètre ``self``" + +#: howto/clinic.rst:621 +msgid "Converting functions using PyArg_UnpackTuple" +msgstr "Conversion des fonctions en utilisant *PyArg_UnpackTuple*" + +#: howto/clinic.rst:623 +msgid "" +"To convert a function parsing its arguments with :c:func:" +"`PyArg_UnpackTuple`, simply write out all the arguments, specifying each as " +"an ``object``. You may specify the ``type`` argument to cast the type as " +"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 " +"va bientôt changer." + +#: howto/clinic.rst:633 +msgid "Optional Groups" +msgstr "Groupes optionnels" + +#: howto/clinic.rst:635 +msgid "" +"Some legacy functions have a tricky approach to parsing their arguments: " +"they count the number of positional arguments, then use a ``switch`` " +"statement to call one of several different :c:func:`PyArg_ParseTuple` calls " +"depending on how many positional arguments there are. (These functions " +"cannot accept keyword-only arguments.) This approach was used to simulate " +"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 "" +"While functions using this approach can often be converted to use :c:func:" +"`PyArg_ParseTupleAndKeywords`, optional arguments, and default values, it's " +"not always possible. Some of these legacy functions have behaviors :c:func:" +"`PyArg_ParseTupleAndKeywords` doesn't directly support. The most obvious " +"example is the builtin function ``range()``, which has an optional argument " +"on the *left* side of its required argument! Another example is ``curses." +"window.addch()``, which has a group of two arguments that must always be " +"specified together. (The arguments are called ``x`` and ``y``; if you call " +"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 "" +"In any case, the goal of Argument Clinic is to support argument parsing for " +"all existing CPython builtins without changing their semantics. Therefore " +"Argument Clinic supports this alternate approach to parsing, using what are " +"called *optional groups*. Optional groups are groups of arguments that must " +"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 "" +"Optional groups are *only* intended for use when converting functions that " +"make multiple calls to :c:func:`PyArg_ParseTuple`! Functions that use *any* " +"other approach for parsing arguments should *almost never* be converted to " +"Argument Clinic using optional groups. Functions using optional groups " +"currently cannot have accurate signatures in Python, because Python just " +"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 "" +"To specify an optional group, add a ``[`` on a line by itself before the " +"parameters you wish to group together, and a ``]`` on a line by itself after " +"these parameters. As an example, here's how ``curses.window.addch`` uses " +"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:" +msgstr "Notes :" + +#: howto/clinic.rst:702 +msgid "" +"For every optional group, one additional parameter will be passed into the " +"impl function representing the group. The parameter will be an int named " +"``group_{direction}_{number}``, where ``{direction}`` is either ``right`` or " +"``left`` depending on whether the group is before or after the required " +"parameters, and ``{number}`` is a monotonically increasing number (starting " +"at 1) indicating how far away the group is from the required parameters. " +"When the impl is called, this parameter will be set to zero if this group " +"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 "" +"If there are no required arguments, the optional groups will behave as if " +"they're to the right of the required arguments." +msgstr "" +"S'il n'y a pas d'arguments requis, les groupes optionnels se comportent " +"comme s'ils étaient à droite des arguments requis." + +#: howto/clinic.rst:716 +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 "" +"Optional groups are *only* intended for legacy code. Please do not use " +"optional groups for new code." +msgstr "" +"Les groupes optionnels sont *seulement* destinés au code hérité. Ne les " +"utilisez pas dans du nouveau code." + +#: 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 "" +"To save time, and to minimize how much you need to learn to achieve your " +"first port to Argument Clinic, the walkthrough above tells you to use " +"\"legacy converters\". \"Legacy converters\" are a convenience, designed " +"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 "Les adaptateurs sont plus simples et plus clairs." + +#: howto/clinic.rst:740 +msgid "" +"There are some format units that are unsupported as \"legacy converters\", " +"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 "" +"In the future we may have a new argument parsing library that isn't " +"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 "" +"In a nutshell, the syntax for Argument Clinic (non-legacy) converters looks " +"like a Python function call. However, if there are no explicit arguments to " +"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:1314 +msgid "``c_default``" +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." +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 "``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 "``accept``" + +#: howto/clinic.rst:775 +msgid "" +"A set of Python types (and possibly pseudo-types); this restricts the " +"allowable Python argument to values of these types. (This is not a general-" +"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 "Pour accepter ``None``, ajouter ``NoneType`` à cet ensemble." + +#: howto/clinic.rst:785 +msgid "``bitwise``" +msgstr "``bitwise``" + +#: howto/clinic.rst:783 +msgid "" +"Only supported for unsigned integers. The native integer value of this " +"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:1328 +msgid "``converter``" +msgstr "``converter``" + +#: howto/clinic.rst:788 +msgid "" +"Only supported by the ``object`` converter. Specifies the name of a :ref:`C " +"\"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``" +msgstr "``encoding``" + +#: howto/clinic.rst:793 +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 "``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:1300 +msgid "``type``" +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 *\"``." +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 "``zeroes``" + +#: howto/clinic.rst:807 +msgid "" +"Only supported for strings. If true, embedded NUL bytes (``'\\\\0'``) are " +"permitted inside the value. The length of the string will be passed in to " +"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 "" +"Please note, not every possible combination of arguments will work. Usually " +"these arguments are implemented by specific ``PyArg_ParseTuple`` *format " +"units*, with specific behavior. For example, currently you cannot call " +"``unsigned_short`` without also specifying ``bitwise=True``. Although it's " +"perfectly reasonable to think this would work, these semantics don't map to " +"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 "" +"Below is a table showing the mapping of legacy converters into real Argument " +"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'``" +msgstr "``'B'``" + +#: howto/clinic.rst:825 +msgid "``unsigned_char(bitwise=True)``" +msgstr "``unsigned_char(bitwise=True)``" + +#: howto/clinic.rst:826 +msgid "``'b'``" +msgstr "``'b'``" + +#: howto/clinic.rst:826 +msgid "``unsigned_char``" +msgstr "``unsigned_char``" + +#: howto/clinic.rst:827 +msgid "``'c'``" +msgstr "``'c'``" + +#: howto/clinic.rst:827 +msgid "``char``" +msgstr "``char``" + +#: howto/clinic.rst:828 +msgid "``'C'``" +msgstr "``'C'``" + +#: howto/clinic.rst:828 +msgid "``int(accept={str})``" +msgstr "``int(accept={str})``" + +#: howto/clinic.rst:829 +msgid "``'d'``" +msgstr "``'d'``" + +#: howto/clinic.rst:829 +msgid "``double``" +msgstr "``double``" + +#: howto/clinic.rst:830 +msgid "``'D'``" +msgstr "``'D'``" + +#: howto/clinic.rst:830 +msgid "``Py_complex``" +msgstr "``Py_complex``" + +#: howto/clinic.rst:831 +msgid "``'es'``" +msgstr "``'es'``" + +#: howto/clinic.rst:831 +msgid "``str(encoding='name_of_encoding')``" +msgstr "``str(encoding='name_of_encoding')``" + +#: howto/clinic.rst:832 +msgid "``'es#'``" +msgstr "``'es#'``" + +#: howto/clinic.rst:832 +msgid "``str(encoding='name_of_encoding', zeroes=True)``" +msgstr "``str(encoding='name_of_encoding', zeroes=True)``" + +#: howto/clinic.rst:833 +msgid "``'et'``" +msgstr "``'et'``" + +#: howto/clinic.rst:833 +msgid "``str(encoding='name_of_encoding', accept={bytes, bytearray, str})``" +msgstr "``str(encoding='name_of_encoding', accept={bytes, bytearray, str})``" + +#: howto/clinic.rst:834 +msgid "``'et#'``" +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'``" +msgstr "``'f'``" + +#: howto/clinic.rst:835 +msgid "``float``" +msgstr "``float``" + +#: howto/clinic.rst:836 +msgid "``'h'``" +msgstr "``'h'``" + +#: howto/clinic.rst:836 +msgid "``short``" +msgstr "``short``" + +#: howto/clinic.rst:837 +msgid "``'H'``" +msgstr "``'H'``" + +#: howto/clinic.rst:837 +msgid "``unsigned_short(bitwise=True)``" +msgstr "``unsigned_short(bitwise=True)``" + +#: howto/clinic.rst:838 +msgid "``'i'``" +msgstr "``'i'``" + +#: howto/clinic.rst:838 +msgid "``int``" +msgstr "``int``" + +#: howto/clinic.rst:839 +msgid "``'I'``" +msgstr "``'I'``" + +#: howto/clinic.rst:839 +msgid "``unsigned_int(bitwise=True)``" +msgstr "``unsigned_int(bitwise=True)``" + +#: howto/clinic.rst:840 +msgid "``'k'``" +msgstr "``'k'``" + +#: howto/clinic.rst:840 +msgid "``unsigned_long(bitwise=True)``" +msgstr "``unsigned_long(bitwise=True)``" + +#: howto/clinic.rst:841 +msgid "``'K'``" +msgstr "``'K'``" + +#: howto/clinic.rst:841 +msgid "``unsigned_long_long(bitwise=True)``" +msgstr "``unsigned_long_long(bitwise=True)``" + +#: howto/clinic.rst:842 +msgid "``'l'``" +msgstr "``'l'``" + +#: howto/clinic.rst:842 +msgid "``long``" +msgstr "``long``" + +#: howto/clinic.rst:843 +msgid "``'L'``" +msgstr "``'L'``" + +#: howto/clinic.rst:843 +msgid "``long long``" +msgstr "``long long``" + +#: howto/clinic.rst:844 +msgid "``'n'``" +msgstr "``'n'``" + +#: howto/clinic.rst:844 +msgid "``Py_ssize_t``" +msgstr "``Py_ssize_t``" + +#: howto/clinic.rst:845 +msgid "``'O'``" +msgstr "``'O'``" + +#: howto/clinic.rst:845 +msgid "``object``" +msgstr "``object``" + +#: howto/clinic.rst:846 +msgid "``'O!'``" +msgstr "``'O!'``" + +#: howto/clinic.rst:846 +msgid "``object(subclass_of='&PySomething_Type')``" +msgstr "``object(subclass_of='&PySomething_Type')``" + +#: howto/clinic.rst:847 +msgid "``'O&'``" +msgstr "``'O&'``" + +#: howto/clinic.rst:847 +msgid "``object(converter='name_of_c_function')``" +msgstr "``object(converter='name_of_c_function')``" + +#: howto/clinic.rst:848 +msgid "``'p'``" +msgstr "``'p'``" + +#: howto/clinic.rst:848 +msgid "``bool``" +msgstr "``bool``" + +#: howto/clinic.rst:849 +msgid "``'S'``" +msgstr "``'S'``" + +#: howto/clinic.rst:849 +msgid "``PyBytesObject``" +msgstr "``PyBytesObject``" + +#: howto/clinic.rst:850 +msgid "``'s'``" +msgstr "``'s'``" + +#: howto/clinic.rst:850 +msgid "``str``" +msgstr "``str``" + +#: howto/clinic.rst:851 +msgid "``'s#'``" +msgstr "``'s#'``" + +#: howto/clinic.rst:851 +msgid "``str(zeroes=True)``" +msgstr "``str(zeroes=True)``" + +#: howto/clinic.rst:852 +msgid "``'s*'``" +msgstr "``'s*'``" + +#: howto/clinic.rst:852 +msgid "``Py_buffer(accept={buffer, str})``" +msgstr "``Py_buffer(accept={buffer, str})``" + +#: howto/clinic.rst:853 +msgid "``'U'``" +msgstr "``'U'``" + +#: howto/clinic.rst:853 +msgid "``unicode``" +msgstr "``unicode``" + +#: howto/clinic.rst:854 +msgid "``'u'``" +msgstr "``'u'``" + +#: howto/clinic.rst:854 +msgid "``Py_UNICODE``" +msgstr "``Py_UNICODE``" + +#: howto/clinic.rst:855 +msgid "``'u#'``" +msgstr "``'u#'``" + +#: howto/clinic.rst:855 +msgid "``Py_UNICODE(zeroes=True)``" +msgstr "``Py_UNICODE(zeroes=True)``" + +#: howto/clinic.rst:856 +msgid "``'w*'``" +msgstr "``'w*'``" + +#: howto/clinic.rst:856 +msgid "``Py_buffer(accept={rwbuffer})``" +msgstr "``Py_buffer(accept={rwbuffer})``" + +#: howto/clinic.rst:857 +msgid "``'Y'``" +msgstr "``'Y'``" + +#: howto/clinic.rst:857 +msgid "``PyByteArrayObject``" +msgstr "``PyByteArrayObject``" + +#: howto/clinic.rst:858 +msgid "``'y'``" +msgstr "``'y'``" + +#: howto/clinic.rst:858 +msgid "``str(accept={bytes})``" +msgstr "``str(accept={bytes})``" + +#: howto/clinic.rst:859 +msgid "``'y#'``" +msgstr "``'y#'``" + +#: howto/clinic.rst:859 +msgid "``str(accept={robuffer}, zeroes=True)``" +msgstr "``str(accept={robuffer}, zeroes=True)``" + +#: howto/clinic.rst:860 +msgid "``'y*'``" +msgstr "``'y*'``" + +#: howto/clinic.rst:860 +msgid "``Py_buffer``" +msgstr "``Py_buffer``" + +#: howto/clinic.rst:861 +msgid "``'Z'``" +msgstr "``'Z'``" + +#: howto/clinic.rst:861 +msgid "``Py_UNICODE(accept={str, NoneType})``" +msgstr "``Py_UNICODE(accept={str, NoneType})``" + +#: howto/clinic.rst:862 +msgid "``'Z#'``" +msgstr "``'Z#'``" + +#: howto/clinic.rst:862 +msgid "``Py_UNICODE(accept={str, NoneType}, zeroes=True)``" +msgstr "``Py_UNICODE(accept={str, NoneType}, zeroes=True)``" + +#: howto/clinic.rst:863 +msgid "``'z'``" +msgstr "``'z'``" + +#: howto/clinic.rst:863 +msgid "``str(accept={str, NoneType})``" +msgstr "``str(accept={str, NoneType})``" + +#: howto/clinic.rst:864 +msgid "``'z#'``" +msgstr "``'z#'``" + +#: howto/clinic.rst:864 +msgid "``str(accept={str, NoneType}, zeroes=True)``" +msgstr "``str(accept={str, NoneType}, zeroes=True)``" + +#: howto/clinic.rst:865 +msgid "``'z*'``" +msgstr "``'z*'``" + +#: howto/clinic.rst:865 +msgid "``Py_buffer(accept={buffer, str, NoneType})``" +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 "" +"One advantage of real converters is that they're more flexible than legacy " +"converters. For example, the ``unsigned_int`` converter (and all the " +"``unsigned_`` converters) can be specified without ``bitwise=True``. Their " +"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 "" +"Argument Clinic will show you all the converters it has available. For each " +"converter it'll show you all the parameters it accepts, along with the " +"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 "Py_buffer" + +#: howto/clinic.rst:895 +msgid "" +"When using the ``Py_buffer`` converter (or the ``'s*'``, ``'w*'``, ``'*y'``, " +"or ``'z*'`` legacy converters), you *must* not call :c:func:" +"`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 "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 "" +"The trick is, all those format units take arguments—either conversion " +"functions, or types, or strings specifying an encoding. (But \"legacy " +"converters\" don't support arguments. That's why we skipped them for your " +"first function.) The argument you specified to the format unit is now an " +"argument to the converter; this argument is either ``converter`` (for " +"``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 "" +"When using ``subclass_of``, you may also want to use the other custom " +"argument for ``object()``: ``type``, which lets you set the type actually " +"used for the parameter. For example, if you want to ensure that the object " +"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 "" +"One possible problem with using Argument Clinic: it takes away some possible " +"flexibility for the format units starting with ``e``. When writing a " +"``PyArg_Parse`` call by hand, you could theoretically decide at runtime what " +"encoding string to pass in to :c:func:`PyArg_ParseTuple`. But now this " +"string must be hard-coded at Argument-Clinic-preprocessing-time. This " +"limitation is deliberate; it made supporting this format unit much easier, " +"and may allow for future optimizations. This restriction doesn't seem " +"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 "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 "La valeur par défaut ``NULL``" + +#: howto/clinic.rst:961 +msgid "" +"For string and object parameters, you can set them to ``None`` to indicate " +"that there's no default. However, that means the C variable will be " +"initialized to ``Py_None``. For convenience's sakes, there's a special " +"value called ``NULL`` for just this reason: from Python's perspective it " +"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 "Expressions spécifiées comme valeurs par défaut" + +#: howto/clinic.rst:971 +msgid "" +"The default value for a parameter can be more than just a literal value. It " +"can be an entire expression, using math operators and looking up attributes " +"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:" +msgstr "Examinons l'exemple suivant :" + +#: howto/clinic.rst:982 +msgid "" +"``sys.maxsize`` can have different values on different platforms. Therefore " +"Argument Clinic can't simply evaluate that expression locally and hard-code " +"it in C. So it stores the default in such a way that it will get evaluated " +"at runtime, when the user asks for the function's signature." +msgstr "" + +#: howto/clinic.rst:987 +msgid "" +"What namespace is available when the expression is evaluated? It's " +"evaluated in the context of the module the builtin came from. So, if your " +"module has an attribute called \"``max_widgets``\", you may simply use it:" +msgstr "" + +#: howto/clinic.rst:995 +msgid "" +"If the symbol isn't found in the current module, it fails over to looking in " +"``sys.modules``. That's how it can find ``sys.maxsize`` for example. " +"(Since you don't know in advance what modules the user will load into their " +"interpreter, it's best to restrict yourself to modules that are preloaded by " +"Python itself.)" +msgstr "" + +#: howto/clinic.rst:1000 +msgid "" +"Evaluating default values only at runtime means Argument Clinic can't " +"compute the correct equivalent C default value. So you need to tell it " +"explicitly. When you use an expression, you must also specify the equivalent " +"expression in C, using the ``c_default`` parameter to the converter:" +msgstr "" + +#: howto/clinic.rst:1009 +msgid "" +"Another complication: Argument Clinic can't know in advance whether or not " +"the expression you supply is valid. It parses it to make sure it looks " +"legal, but it can't *actually* know. You must be very careful when using " +"expressions to specify values that are guaranteed to be valid at runtime!" +msgstr "" + +#: howto/clinic.rst:1014 +msgid "" +"Finally, because expressions must be representable as static C values, there " +"are many restrictions on legal expressions. Here's a list of Python " +"features you're not permitted to use:" +msgstr "" + +#: howto/clinic.rst:1018 +msgid "Function calls." +msgstr "des appels de fonction." + +#: howto/clinic.rst:1019 +msgid "Inline if statements (``3 if foo else 5``)." +msgstr "des instructions *if* en ligne (``3 if foo else 5``) ;" + +#: howto/clinic.rst:1020 +msgid "Automatic sequence unpacking (``*[1, 2, 3]``)." +msgstr "" + +#: howto/clinic.rst:1021 +msgid "List/set/dict comprehensions and generator expressions." +msgstr "" + +#: howto/clinic.rst:1022 +msgid "Tuple/list/set/dict literals." +msgstr "" + +#: howto/clinic.rst:1027 +msgid "Using a return converter" +msgstr "" + +#: howto/clinic.rst:1029 +msgid "" +"By default the impl function Argument Clinic generates for you returns " +"``PyObject *``. But your C function often computes some C type, then " +"converts it into the ``PyObject *`` at the last moment. Argument Clinic " +"handles converting your inputs from Python types into native C types—why not " +"have it convert your return value from a native C type into a Python type " +"too?" +msgstr "" + +#: howto/clinic.rst:1035 +msgid "" +"That's what a \"return converter\" does. It changes your impl function to " +"return some C type, then adds code to the generated (non-impl) function to " +"handle converting that value into the appropriate ``PyObject *``." +msgstr "" + +#: howto/clinic.rst:1039 +msgid "" +"The syntax for return converters is similar to that of parameter converters. " +"You specify the return converter like it was a return annotation on the " +"function itself. Return converters behave much the same as parameter " +"converters; they take arguments, the arguments are all keyword-only, and if " +"you're not changing any of the default arguments you can omit the " +"parentheses." +msgstr "" + +#: howto/clinic.rst:1045 +msgid "" +"(If you use both ``\"as\"`` *and* a return converter for your function, the " +"``\"as\"`` should come before the return converter.)" +msgstr "" + +#: howto/clinic.rst:1048 +msgid "" +"There's one additional complication when using return converters: how do you " +"indicate an error has occurred? Normally, a function returns a valid (non-" +"``NULL``) pointer for success, and ``NULL`` for failure. But if you use an " +"integer return converter, all integers are valid. How can Argument Clinic " +"detect an error? Its solution: each return converter implicitly looks for a " +"special value that indicates an error. If you return that value, and an " +"error has been set (``PyErr_Occurred()`` returns a true value), then the " +"generated code will propagate the error. Otherwise it will encode the value " +"you return like normal." +msgstr "" + +#: howto/clinic.rst:1057 +msgid "Currently Argument Clinic supports only a few return converters:" +msgstr "" + +#: howto/clinic.rst:1072 +msgid "" +"None of these take parameters. For the first three, return -1 to indicate " +"error. For ``DecodeFSDefault``, the return type is ``const char *``; return " +"a ``NULL`` pointer to indicate an error." +msgstr "" + +#: howto/clinic.rst:1076 +msgid "" +"(There's also an experimental ``NoneType`` converter, which lets you return " +"``Py_None`` on success or ``NULL`` on failure, without having to increment " +"the reference count on ``Py_None``. I'm not sure it adds enough clarity to " +"be worth using.)" +msgstr "" + +#: howto/clinic.rst:1081 +msgid "" +"To see all the return converters Argument Clinic supports, along with their " +"parameters (if any), just run ``Tools/clinic/clinic.py --converters`` for " +"the full list." +msgstr "" + +#: howto/clinic.rst:1087 +msgid "Cloning existing functions" +msgstr "" + +#: howto/clinic.rst:1089 +msgid "" +"If you have a number of functions that look similar, you may be able to use " +"Clinic's \"clone\" feature. When you clone an existing function, you reuse:" +msgstr "" + +#: howto/clinic.rst:1093 +msgid "its parameters, including" +msgstr "" + +#: howto/clinic.rst:1095 +msgid "their names," +msgstr "" + +#: howto/clinic.rst:1097 +msgid "their converters, with all parameters," +msgstr "" + +#: howto/clinic.rst:1099 +msgid "their default values," +msgstr "" + +#: howto/clinic.rst:1101 +msgid "their per-parameter docstrings," +msgstr "" + +#: howto/clinic.rst:1103 +msgid "" +"their *kind* (whether they're positional only, positional or keyword, or " +"keyword only), and" +msgstr "" + +#: howto/clinic.rst:1106 +msgid "its return converter." +msgstr "" + +#: howto/clinic.rst:1108 +msgid "" +"The only thing not copied from the original function is its docstring; the " +"syntax allows you to specify a new docstring." +msgstr "" + +#: howto/clinic.rst:1111 +msgid "Here's the syntax for cloning a function::" +msgstr "" + +#: howto/clinic.rst:1119 +msgid "" +"(The functions can be in different modules or classes. I wrote ``module." +"class`` in the sample just to illustrate that you must use the full path to " +"*both* functions.)" +msgstr "" + +#: howto/clinic.rst:1123 +msgid "" +"Sorry, there's no syntax for partially cloning a function, or cloning a " +"function then modifying it. Cloning is an all-or nothing proposition." +msgstr "" + +#: howto/clinic.rst:1126 +msgid "" +"Also, the function you are cloning from must have been previously defined in " +"the current file." +msgstr "" + +#: howto/clinic.rst:1130 +msgid "Calling Python code" +msgstr "" + +#: howto/clinic.rst:1132 +msgid "" +"The rest of the advanced topics require you to write Python code which lives " +"inside your C file and modifies Argument Clinic's runtime state. This is " +"simple: you simply define a Python block." +msgstr "" + +#: howto/clinic.rst:1136 +msgid "" +"A Python block uses different delimiter lines than an Argument Clinic " +"function block. It looks like this::" +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." +msgstr "" + +#: howto/clinic.rst:1147 +msgid "" +"As an example, here's a Python block that adds a static integer variable to " +"the C code::" +msgstr "" + +#: howto/clinic.rst:1158 +msgid "Using a \"self converter\"" +msgstr "" + +#: howto/clinic.rst:1160 +msgid "" +"Argument Clinic automatically adds a \"self\" parameter for you using a " +"default converter. It automatically sets the ``type`` of this parameter to " +"the \"pointer to an instance\" you specified when you declared the type. " +"However, you can override Argument Clinic's converter and specify one " +"yourself. Just add your own ``self`` parameter as the first parameter in a " +"block, and ensure that its converter is an instance of ``self_converter`` or " +"a subclass thereof." +msgstr "" + +#: howto/clinic.rst:1169 +msgid "" +"What's the point? This lets you override the type of ``self``, or give it a " +"different default name." +msgstr "" + +#: howto/clinic.rst:1172 +msgid "" +"How do you specify the custom type you want to cast ``self`` to? If you only " +"have one or two functions with the same type for ``self``, you can directly " +"use Argument Clinic's existing ``self`` converter, passing in the type you " +"want to use as the ``type`` parameter::" +msgstr "" + +#: howto/clinic.rst:1188 +msgid "" +"On the other hand, if you have a lot of functions that will use the same " +"type for ``self``, it's best to create your own converter, subclassing " +"``self_converter`` but overwriting the ``type`` member::" +msgstr "" + +#: howto/clinic.rst:1210 +msgid "Using a \"defining class\" converter" +msgstr "" + +#: howto/clinic.rst:1212 +msgid "" +"Argument Clinic facilitates gaining access to the defining class of a " +"method. This is useful for :ref:`heap type ` methods that need " +"to fetch module level state. Use :c:func:`PyType_FromModuleAndSpec` to " +"associate a new heap type with a module. You can now use :c:func:" +"`PyType_GetModuleState` on the defining class to fetch the module state, for " +"example from a module method." +msgstr "" + +#: howto/clinic.rst:1218 +msgid "" +"Example from ``Modules/zlibmodule.c``. First, ``defining_class`` is added " +"to the clinic input::" +msgstr "" + +#: howto/clinic.rst:1230 +msgid "" +"After running the Argument Clinic tool, the following function signature is " +"generated::" +msgstr "" + +#: howto/clinic.rst:1240 +msgid "" +"The following code can now use ``PyType_GetModuleState(cls)`` to fetch the " +"module state::" +msgstr "" + +#: howto/clinic.rst:1246 +msgid "" +"Each method may only have one argument using this converter, and it must " +"appear after ``self``, or, if ``self`` is not used, as the first argument. " +"The argument will be of type ``PyTypeObject *``. The argument will not " +"appear in the ``__text_signature__``." +msgstr "" + +#: howto/clinic.rst:1251 +msgid "" +"The ``defining_class`` converter is not compatible with ``__init__`` and " +"``__new__`` methods, which cannot use the ``METH_METHOD`` convention." +msgstr "" + +#: howto/clinic.rst:1254 +msgid "" +"It is not possible to use ``defining_class`` with slot methods. In order to " +"fetch the module state from such methods, use ``_PyType_GetModuleByDef`` to " +"look up the module and then :c:func:`PyModule_GetState` to fetch the module " +"state. Example from the ``setattro`` slot method in ``Modules/_threadmodule." +"c``::" +msgstr "" + +#: howto/clinic.rst:1269 +msgid "See also :pep:`573`." +msgstr "" + +#: howto/clinic.rst:1273 +msgid "Writing a custom converter" +msgstr "" + +#: howto/clinic.rst:1275 +msgid "" +"As we hinted at in the previous section... you can write your own " +"converters! A converter is simply a Python class that inherits from " +"``CConverter``. The main purpose of a custom converter is if you have a " +"parameter using the ``O&`` format unit—parsing this parameter means calling " +"a :c:func:`PyArg_ParseTuple` \"converter function\"." +msgstr "" + +#: howto/clinic.rst:1281 +msgid "" +"Your converter class should be named ``*something*_converter``. If the name " +"follows this convention, then your converter class will be automatically " +"registered with Argument Clinic; its name will be the name of your class " +"with the ``_converter`` suffix stripped off. (This is accomplished with a " +"metaclass.)" +msgstr "" + +#: howto/clinic.rst:1287 +msgid "" +"You shouldn't subclass ``CConverter.__init__``. Instead, you should write a " +"``converter_init()`` function. ``converter_init()`` always accepts a " +"``self`` parameter; after that, all additional parameters *must* be keyword-" +"only. Any arguments passed in to the converter in Argument Clinic will be " +"passed along to your ``converter_init()``." +msgstr "" + +#: howto/clinic.rst:1294 +msgid "" +"There are some additional members of ``CConverter`` you may wish to specify " +"in your subclass. Here's the current list:" +msgstr "" + +#: howto/clinic.rst:1298 +msgid "" +"The C type to use for this variable. ``type`` should be a Python string " +"specifying the type, e.g. ``int``. If this is a pointer type, the type " +"string should end with ``' *'``." +msgstr "" + +#: howto/clinic.rst:1304 +msgid "``default``" +msgstr "" + +#: howto/clinic.rst:1303 +msgid "" +"The Python default value for this parameter, as a Python value. Or the magic " +"value ``unspecified`` if there is no default." +msgstr "" + +#: howto/clinic.rst:1309 +msgid "``py_default``" +msgstr "" + +#: howto/clinic.rst:1307 +msgid "" +"``default`` as it should appear in Python code, as a string. Or ``None`` if " +"there is no default." +msgstr "" + +#: howto/clinic.rst:1312 +msgid "" +"``default`` as it should appear in C code, as a string. Or ``None`` if there " +"is no default." +msgstr "" + +#: howto/clinic.rst:1325 +msgid "``c_ignored_default``" +msgstr "" + +#: howto/clinic.rst:1317 +msgid "" +"The default value used to initialize the C variable when there is no " +"default, but not specifying a default may result in an \"uninitialized " +"variable\" warning. This can easily happen when using option groups—" +"although properly written code will never actually use this value, the " +"variable does get passed in to the impl, and the C compiler will complain " +"about the \"use\" of the uninitialized value. This value should always be a " +"non-empty string." +msgstr "" + +#: howto/clinic.rst:1328 +msgid "The name of the C converter function, as a string." +msgstr "" + +#: howto/clinic.rst:1333 +msgid "``impl_by_reference``" +msgstr "" + +#: howto/clinic.rst:1331 +msgid "" +"A boolean value. If true, Argument Clinic will add a ``&`` in front of the " +"name of the variable when passing it into the impl function." +msgstr "" + +#: howto/clinic.rst:1339 +msgid "``parse_by_reference``" +msgstr "" + +#: howto/clinic.rst:1336 +msgid "" +"A boolean value. If true, Argument Clinic will add a ``&`` in front of the " +"name of the variable when passing it into :c:func:`PyArg_ParseTuple`." +msgstr "" + +#: howto/clinic.rst:1341 +msgid "" +"Here's the simplest example of a custom converter, from ``Modules/zlibmodule." +"c``::" +msgstr "" + +#: howto/clinic.rst:1352 +msgid "" +"This block adds a converter to Argument Clinic named ``ssize_t``. " +"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 "" + +#: howto/clinic.rst:1358 +msgid "" +"More sophisticated custom converters can insert custom C code to handle " +"initialization and cleanup. You can see more examples of custom converters " +"in the CPython source tree; grep the C files for the string ``CConverter``." +msgstr "" + +#: howto/clinic.rst:1364 +msgid "Writing a custom return converter" +msgstr "" + +#: howto/clinic.rst:1366 +msgid "" +"Writing a custom return converter is much like writing a custom converter. " +"Except it's somewhat simpler, because return converters are themselves much " +"simpler." +msgstr "" + +#: howto/clinic.rst:1370 +msgid "" +"Return converters must subclass ``CReturnConverter``. There are no examples " +"yet of custom return converters, because they are not widely used yet. If " +"you wish to write your own return converter, please read ``Tools/clinic/" +"clinic.py``, specifically the implementation of ``CReturnConverter`` and all " +"its subclasses." +msgstr "" + +#: howto/clinic.rst:1378 +msgid "METH_O and METH_NOARGS" +msgstr "" + +#: howto/clinic.rst:1380 +msgid "" +"To convert a function using ``METH_O``, make sure the function's single " +"argument is using the ``object`` converter, and mark the arguments as " +"positional-only::" +msgstr "" + +#: howto/clinic.rst:1392 +msgid "" +"To convert a function using ``METH_NOARGS``, just don't specify any " +"arguments." +msgstr "" + +#: howto/clinic.rst:1395 +msgid "" +"You can still use a self converter, a return converter, and specify a " +"``type`` argument to the object converter for ``METH_O``." +msgstr "" + +#: howto/clinic.rst:1399 +msgid "tp_new and tp_init functions" +msgstr "" + +#: howto/clinic.rst:1401 +msgid "" +"You can convert ``tp_new`` and ``tp_init`` functions. Just name them " +"``__new__`` or ``__init__`` as appropriate. Notes:" +msgstr "" + +#: howto/clinic.rst:1404 +msgid "" +"The function name generated for ``__new__`` doesn't end in ``__new__`` like " +"it would by default. It's just the name of the class, converted into a " +"valid C identifier." +msgstr "" + +#: howto/clinic.rst:1408 +msgid "No ``PyMethodDef`` ``#define`` is generated for these functions." +msgstr "" + +#: howto/clinic.rst:1410 +msgid "``__init__`` functions return ``int``, not ``PyObject *``." +msgstr "" + +#: howto/clinic.rst:1412 +msgid "Use the docstring as the class docstring." +msgstr "" + +#: howto/clinic.rst:1414 +msgid "" +"Although ``__new__`` and ``__init__`` functions must always accept both the " +"``args`` and ``kwargs`` objects, when converting you may specify any " +"signature for these functions that you like. (If your function doesn't " +"support keywords, the parsing function generated will throw an exception if " +"it receives any.)" +msgstr "" + +#: howto/clinic.rst:1421 +msgid "Changing and redirecting Clinic's output" +msgstr "" + +#: howto/clinic.rst:1423 +msgid "" +"It can be inconvenient to have Clinic's output interspersed with your " +"conventional hand-edited C code. Luckily, Clinic is configurable: you can " +"buffer up its output for printing later (or earlier!), or write its output " +"to a separate file. You can also add a prefix or suffix to every line of " +"Clinic's generated output." +msgstr "" + +#: howto/clinic.rst:1429 +msgid "" +"While changing Clinic's output in this manner can be a boon to readability, " +"it may result in Clinic code using types before they are defined, or your " +"code attempting to use Clinic-generated code before it is defined. These " +"problems can be easily solved by rearranging the declarations in your file, " +"or moving where Clinic's generated code goes. (This is why the default " +"behavior of Clinic is to output everything into the current block; while " +"many people consider this hampers readability, it will never require " +"rearranging your code to fix definition-before-use problems.)" +msgstr "" + +#: howto/clinic.rst:1438 +msgid "Let's start with defining some terminology:" +msgstr "" + +#: howto/clinic.rst:1465 +msgid "*field*" +msgstr "" + +#: howto/clinic.rst:1441 +msgid "" +"A field, in this context, is a subsection of Clinic's output. For example, " +"the ``#define`` for the ``PyMethodDef`` structure is a field, called " +"``methoddef_define``. Clinic has seven different fields it can output per " +"function definition:" +msgstr "" + +#: howto/clinic.rst:1456 +msgid "" +"All the names are of the form ``\"_\"``, where ``\"\"`` is the " +"semantic object represented (the parsing function, the impl function, the " +"docstring, or the methoddef structure) and ``\"\"`` represents what kind " +"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.)" +msgstr "" + +#: howto/clinic.rst:1499 +msgid "*destination*" +msgstr "" + +#: howto/clinic.rst:1468 +msgid "" +"A destination is a place Clinic can write output to. There are five built-" +"in destinations:" +msgstr "" + +#: howto/clinic.rst:1548 howto/clinic.rst:1626 +msgid "``block``" +msgstr "" + +#: howto/clinic.rst:1472 +msgid "" +"The default destination: printed in the output section of the current Clinic " +"block." +msgstr "" + +#: howto/clinic.rst:1575 howto/clinic.rst:1629 +msgid "``buffer``" +msgstr "" + +#: howto/clinic.rst:1476 +msgid "" +"A text buffer where you can save text for later. Text sent here is appended " +"to the end of any existing text. It's an error to have any text left in the " +"buffer when Clinic finishes processing a file." +msgstr "" + +#: howto/clinic.rst:1561 howto/clinic.rst:1655 +msgid "``file``" +msgstr "" + +#: howto/clinic.rst:1482 +msgid "" +"A separate \"clinic file\" that will be created automatically by Clinic. The " +"filename chosen for the file is ``{basename}.clinic{extension}``, where " +"``basename`` and ``extension`` were assigned the output from ``os.path." +"splitext()`` run on the current file. (Example: the ``file`` destination " +"for ``_pickle.c`` would be written to ``_pickle.clinic.c``.)" +msgstr "" + +#: howto/clinic.rst:1489 +msgid "" +"**Important: When using a** ``file`` **destination, you** *must check in* " +"**the generated file!**" +msgstr "" + +#: howto/clinic.rst:1588 howto/clinic.rst:1659 +msgid "``two-pass``" +msgstr "" + +#: howto/clinic.rst:1493 +msgid "" +"A buffer like ``buffer``. However, a two-pass buffer can only be dumped " +"once, and it prints out all text sent to it during all processing, even from " +"Clinic blocks *after* the dumping point." +msgstr "" + +#: howto/clinic.rst:1622 +msgid "``suppress``" +msgstr "" + +#: howto/clinic.rst:1498 +msgid "The text is suppressed—thrown away." +msgstr "" + +#: howto/clinic.rst:1501 +msgid "Clinic defines five new directives that let you reconfigure its output." +msgstr "" + +#: howto/clinic.rst:1503 +msgid "The first new directive is ``dump``:" +msgstr "" + +#: howto/clinic.rst:1509 +msgid "" +"This dumps the current contents of the named destination into the output of " +"the current block, and empties it. This only works with ``buffer`` and " +"``two-pass`` destinations." +msgstr "" + +#: howto/clinic.rst:1513 +msgid "" +"The second new directive is ``output``. The most basic form of ``output`` " +"is like this:" +msgstr "" + +#: howto/clinic.rst:1520 +msgid "" +"This tells Clinic to output *field* to *destination*. ``output`` also " +"supports a special meta-destination, called ``everything``, which tells " +"Clinic to output *all* fields to that *destination*." +msgstr "" + +#: howto/clinic.rst:1524 +msgid "``output`` has a number of other functions:" +msgstr "" + +#: howto/clinic.rst:1533 +msgid "" +"``output push`` and ``output pop`` allow you to push and pop configurations " +"on an internal configuration stack, so that you can temporarily modify the " +"output configuration, then easily restore the previous configuration. " +"Simply push before your change to save the current configuration, then pop " +"when you wish to restore the previous configuration." +msgstr "" + +#: howto/clinic.rst:1540 +msgid "" +"``output preset`` sets Clinic's output to one of several built-in preset " +"configurations, as follows:" +msgstr "" + +#: howto/clinic.rst:1544 +msgid "" +"Clinic's original starting configuration. Writes everything immediately " +"after the input block." +msgstr "" + +#: howto/clinic.rst:1547 +msgid "" +"Suppress the ``parser_prototype`` and ``docstring_prototype``, write " +"everything else to ``block``." +msgstr "" + +#: howto/clinic.rst:1551 +msgid "" +"Designed to write everything to the \"clinic file\" that it can. You then " +"``#include`` this file near the top of your file. You may need to rearrange " +"your file to make this work, though usually this just means creating forward " +"declarations for various ``typedef`` and ``PyTypeObject`` definitions." +msgstr "" + +#: howto/clinic.rst:1557 +msgid "" +"Suppress the ``parser_prototype`` and ``docstring_prototype``, write the " +"``impl_definition`` to ``block``, and write everything else to ``file``." +msgstr "" + +#: howto/clinic.rst:1561 +msgid "The default filename is ``\"{dirname}/clinic/{basename}.h\"``." +msgstr "" + +#: howto/clinic.rst:1564 +msgid "" +"Save up most of the output from Clinic, to be written into your file near " +"the end. For Python files implementing modules or builtin types, it's " +"recommended that you dump the buffer just above the static structures for " +"your module or builtin type; these are normally very near the end. Using " +"``buffer`` may require even more editing than ``file``, if your file has " +"static ``PyMethodDef`` arrays defined in the middle of the file." +msgstr "" + +#: howto/clinic.rst:1573 +msgid "" +"Suppress the ``parser_prototype``, ``impl_prototype``, and " +"``docstring_prototype``, write the ``impl_definition`` to ``block``, and " +"write everything else to ``file``." +msgstr "" + +#: howto/clinic.rst:1578 +msgid "" +"Similar to the ``buffer`` preset, but writes forward declarations to the " +"``two-pass`` buffer, and definitions to the ``buffer``. This is similar to " +"the ``buffer`` preset, but may require less editing than ``buffer``. Dump " +"the ``two-pass`` buffer near the top of your file, and dump the ``buffer`` " +"near the end just like you would when using the ``buffer`` preset." +msgstr "" + +#: howto/clinic.rst:1585 +msgid "" +"Suppresses the ``impl_prototype``, write the ``impl_definition`` to " +"``block``, write ``docstring_prototype``, ``methoddef_define``, and " +"``parser_prototype`` to ``two-pass``, write everything else to ``buffer``." +msgstr "" + +#: howto/clinic.rst:1599 +msgid "``partial-buffer``" +msgstr "" + +#: howto/clinic.rst:1591 +msgid "" +"Similar to the ``buffer`` preset, but writes more things to ``block``, only " +"writing the really big chunks of generated code to ``buffer``. This avoids " +"the definition-before-use problem of ``buffer`` completely, at the small " +"cost of having slightly more stuff in the block's output. Dump the " +"``buffer`` near the end, just like you would when using the ``buffer`` " +"preset." +msgstr "" + +#: howto/clinic.rst:1598 +msgid "" +"Suppresses the ``impl_prototype``, write the ``docstring_definition`` and " +"``parser_definition`` to ``buffer``, write everything else to ``block``." +msgstr "" + +#: howto/clinic.rst:1601 +msgid "The third new directive is ``destination``:" +msgstr "" + +#: howto/clinic.rst:1607 +msgid "This performs an operation on the destination named ``name``." +msgstr "" + +#: howto/clinic.rst:1609 +msgid "There are two defined subcommands: ``new`` and ``clear``." +msgstr "" + +#: howto/clinic.rst:1611 +msgid "The ``new`` subcommand works like this:" +msgstr "" + +#: howto/clinic.rst:1617 +msgid "" +"This creates a new destination with name ```` and type ````." +msgstr "" + +#: howto/clinic.rst:1619 +msgid "There are five destination types:" +msgstr "" + +#: howto/clinic.rst:1622 +msgid "Throws the text away." +msgstr "" + +#: howto/clinic.rst:1625 +msgid "" +"Writes the text to the current block. This is what Clinic originally did." +msgstr "" + +#: howto/clinic.rst:1629 +msgid "A simple text buffer, like the \"buffer\" builtin destination above." +msgstr "" + +#: howto/clinic.rst:1632 +msgid "" +"A text file. The file destination takes an extra argument, a template to " +"use for building the filename, like so:" +msgstr "" + +#: howto/clinic.rst:1635 +msgid "destination new " +msgstr "" + +#: howto/clinic.rst:1637 +msgid "" +"The template can use three strings internally that will be replaced by bits " +"of the filename:" +msgstr "" + +#: howto/clinic.rst:1640 +msgid "{path}" +msgstr "" + +#: howto/clinic.rst:1641 +msgid "The full path to the file, including directory and full filename." +msgstr "" + +#: howto/clinic.rst:1642 +msgid "{dirname}" +msgstr "" + +#: howto/clinic.rst:1643 +msgid "The name of the directory the file is in." +msgstr "" + +#: howto/clinic.rst:1644 +msgid "{basename}" +msgstr "" + +#: howto/clinic.rst:1645 +msgid "Just the name of the file, not including the directory." +msgstr "" + +#: howto/clinic.rst:1647 +msgid "{basename_root}" +msgstr "" + +#: howto/clinic.rst:1647 +msgid "" +"Basename with the extension clipped off (everything up to but not including " +"the last '.')." +msgstr "" + +#: howto/clinic.rst:1651 +msgid "{basename_extension}" +msgstr "" + +#: howto/clinic.rst:1650 +msgid "" +"The last '.' and everything after it. If the basename does not contain a " +"period, this will be the empty string." +msgstr "" + +#: howto/clinic.rst:1653 +msgid "" +"If there are no periods in the filename, {basename} and {filename} are the " +"same, and {extension} is empty. \"{basename}{extension}\" is always exactly " +"the same as \"{filename}\".\"" +msgstr "" + +#: howto/clinic.rst:1658 +msgid "A two-pass buffer, like the \"two-pass\" builtin destination above." +msgstr "" + +#: howto/clinic.rst:1661 +msgid "The ``clear`` subcommand works like this:" +msgstr "" + +#: howto/clinic.rst:1667 +msgid "" +"It removes all the accumulated text up to this point in the destination. (I " +"don't know what you'd need this for, but I thought maybe it'd be useful " +"while someone's experimenting.)" +msgstr "" + +#: howto/clinic.rst:1671 +msgid "The fourth new directive is ``set``:" +msgstr "" + +#: howto/clinic.rst:1678 +msgid "" +"``set`` lets you set two internal variables in Clinic. ``line_prefix`` is a " +"string that will be prepended to every line of Clinic's output; " +"``line_suffix`` is a string that will be appended to every line of Clinic's " +"output." +msgstr "" + +#: howto/clinic.rst:1682 +msgid "Both of these support two format strings:" +msgstr "" + +#: howto/clinic.rst:1685 +msgid "``{block comment start}``" +msgstr "" + +#: howto/clinic.rst:1685 +msgid "" +"Turns into the string ``/*``, the start-comment text sequence for C files." +msgstr "" + +#: howto/clinic.rst:1688 +msgid "``{block comment end}``" +msgstr "" + +#: howto/clinic.rst:1688 +msgid "" +"Turns into the string ``*/``, the end-comment text sequence for C files." +msgstr "" + +#: howto/clinic.rst:1690 +msgid "" +"The final new directive is one you shouldn't need to use directly, called " +"``preserve``:" +msgstr "" + +#: howto/clinic.rst:1697 +msgid "" +"This tells Clinic that the current contents of the output should be kept, " +"unmodified. This is used internally by Clinic when dumping output into " +"``file`` files; wrapping it in a Clinic block lets Clinic use its existing " +"checksum functionality to ensure the file was not modified by hand before it " +"gets overwritten." +msgstr "" + +#: howto/clinic.rst:1704 +msgid "The #ifdef trick" +msgstr "" + +#: howto/clinic.rst:1706 +msgid "" +"If you're converting a function that isn't available on all platforms, " +"there's a trick you can use to make life a little easier. The existing code " +"probably looks like this::" +msgstr "" + +#: howto/clinic.rst:1717 +msgid "" +"And then in the ``PyMethodDef`` structure at the bottom the existing code " +"will have:" +msgstr "" + +#: howto/clinic.rst:1726 +msgid "" +"In this scenario, you should enclose the body of your impl function inside " +"the ``#ifdef``, like so::" +msgstr "" + +#: howto/clinic.rst:1740 +msgid "" +"Then, remove those three lines from the ``PyMethodDef`` structure, replacing " +"them with the macro Argument Clinic generated:" +msgstr "" + +#: howto/clinic.rst:1747 +msgid "" +"(You can find the real name for this macro inside the generated code. Or you " +"can calculate it yourself: it's the name of your function as defined on the " +"first line of your block, but with periods changed to underscores, " +"uppercased, and ``\"_METHODDEF\"`` added to the end.)" +msgstr "" + +#: howto/clinic.rst:1752 +msgid "" +"Perhaps you're wondering: what if ``HAVE_FUNCTIONNAME`` isn't defined? The " +"``MODULE_FUNCTIONNAME_METHODDEF`` macro won't be defined either!" +msgstr "" + +#: howto/clinic.rst:1755 +msgid "" +"Here's where Argument Clinic gets very clever. It actually detects that the " +"Argument Clinic block might be deactivated by the ``#ifdef``. When that " +"happens, it generates a little extra code that looks like this::" +msgstr "" + +#: howto/clinic.rst:1763 +msgid "" +"That means the macro always works. If the function is defined, this turns " +"into the correct structure, including the trailing comma. If the function " +"is undefined, this turns into nothing." +msgstr "" + +#: howto/clinic.rst:1767 +msgid "" +"However, this causes one ticklish problem: where should Argument Clinic put " +"this extra code when using the \"block\" output preset? It can't go in the " +"output block, because that could be deactivated by the ``#ifdef``. (That's " +"the whole point!)" +msgstr "" + +#: howto/clinic.rst:1771 +msgid "" +"In this situation, Argument Clinic writes the extra code to the \"buffer\" " +"destination. This may mean that you get a complaint from Argument Clinic:" +msgstr "" + +#: howto/clinic.rst:1779 +msgid "" +"When this happens, just open your file, find the ``dump buffer`` block that " +"Argument Clinic added to your file (it'll be at the very bottom), then move " +"it above the ``PyMethodDef`` structure where that macro is used." +msgstr "" + +#: howto/clinic.rst:1786 +msgid "Using Argument Clinic in Python files" +msgstr "" + +#: howto/clinic.rst:1788 +msgid "" +"It's actually possible to use Argument Clinic to preprocess Python files. " +"There's no point to using Argument Clinic blocks, of course, as the output " +"wouldn't make any sense to the Python interpreter. But using Argument " +"Clinic to run Python blocks lets you use Python as a Python preprocessor!" +msgstr "" + +#: howto/clinic.rst:1793 +msgid "" +"Since Python comments are different from C comments, Argument Clinic blocks " +"embedded in Python files look slightly different. They look like this:" +msgstr "" diff --git a/howto/cporting.po b/howto/cporting.po new file mode 100644 index 0000000000..071aec715a --- /dev/null +++ b/howto/cporting.po @@ -0,0 +1,57 @@ +# For licence information, see README file. +# +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: 2021-04-27 15:29+0200\n" +"Last-Translator: Julien Palard \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" + +#: howto/cporting.rst:7 +msgid "Porting Extension Modules to Python 3" +msgstr "Portage des modules d'extension vers Python 3" + +#: howto/cporting.rst:9 +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 "" +"The `Migrating C extensions`_ chapter from *Supporting Python 3: An in-depth " +"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 "" +"The `Cython`_ and `CFFI`_ libraries offer abstractions over Python's C API. " +"Extensions generally need to be re-written to use one of them, but the " +"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 new file mode 100644 index 0000000000..19f6013c54 --- /dev/null +++ b/howto/curses.po @@ -0,0 +1,1101 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-18 15:46+0200\n" +"PO-Revision-Date: 2020-09-04 23:34+0200\n" +"Last-Translator: Khaïs COLIN \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" + +#: howto/curses.rst:5 +msgid "Curses Programming with Python" +msgstr "Programmation *Curses* avec Python" + +#: howto/curses.rst:0 +msgid "Author" +msgstr "Auteur" + +#: howto/curses.rst:7 +msgid "A.M. Kuchling, Eric S. Raymond" +msgstr "A.M. Kuchling, Eric S. Raymond" + +#: howto/curses.rst:0 +msgid "Release" +msgstr "Version" + +#: howto/curses.rst:8 +msgid "2.04" +msgstr "2.04" + +#: howto/curses.rst:None +msgid "Abstract" +msgstr "Résumé" + +#: howto/curses.rst:13 +msgid "" +"This document describes how to use the :mod:`curses` extension module to " +"control text-mode displays." +msgstr "" +"Ce document décrit comment utiliser le module d'extension :mod:`curses` pour " +"contrôler l'affichage en mode texte." + +#: howto/curses.rst:18 +msgid "What is curses?" +msgstr "Qu'est-ce que *curses* ?" + +#: howto/curses.rst:20 +msgid "" +"The curses library supplies a terminal-independent screen-painting and " +"keyboard-handling facility for text-based terminals; such terminals include " +"VT100s, the Linux console, and the simulated terminal provided by various " +"programs. Display terminals support various control codes to perform common " +"operations such as moving the cursor, scrolling the screen, and erasing " +"areas. Different terminals use widely differing codes, and often have their " +"own minor quirks." +msgstr "" +"La bibliothèque *curses* fournit une capacité de dessin à l'écran et de " +"gestion du clavier indépendante du terminal pour les terminaux textuels ; " +"ces terminaux comprennent les *VT100*, la console Linux et le terminal " +"simulé fourni par divers programmes. Les terminaux d'affichage prennent en " +"charge divers codes de commande pour effectuer des opérations courantes " +"telles que déplacer le curseur, faire défiler l'écran et effacer des zones. " +"Différents terminaux utilisent des codes très différents et ont souvent " +"leurs propres bizarreries mineures." + +#: howto/curses.rst:28 +msgid "" +"In a world of graphical displays, one might ask \"why bother\"? It's true " +"that character-cell display terminals are an obsolete technology, but there " +"are niches in which being able to do fancy things with them are still " +"valuable. One niche is on small-footprint or embedded Unixes that don't run " +"an X server. Another is tools such as OS installers and kernel " +"configurators that may have to run before any graphical support is available." +msgstr "" +"Dans un monde d'affichages graphiques, on pourrait se demander « pourquoi " +"s'embêter ? ». Il est vrai que les terminaux d'affichage caractère par " +"caractère sont une technologie obsolète, mais il existe des niches pour " +"lesquelles la possibilité de faire des choses fantaisistes est encore " +"précieuse. En exemple de niche, on peut citer les systèmes de type Unix de " +"petite taille ou embarqués qui n'utilisent pas de serveur X. Il y a aussi " +"les outils tels que les installateurs d'OS et les outils de configuration du " +"noyau qui doivent être exécutés avant qu'un support graphique ne soit " +"disponible." + +#: howto/curses.rst:36 +msgid "" +"The curses library provides fairly basic functionality, providing the " +"programmer with an abstraction of a display containing multiple non-" +"overlapping windows of text. The contents of a window can be changed in " +"various ways---adding text, erasing it, changing its appearance---and the " +"curses library will figure out what control codes need to be sent to the " +"terminal to produce the right output. curses doesn't provide many user-" +"interface concepts such as buttons, checkboxes, or dialogs; if you need such " +"features, consider a user interface library such as `Urwid `_." +msgstr "" +"La bibliothèque *curses* propose des fonctionnalités assez basiques, " +"fournissant au programmeur une abstraction d'affichage contenant plusieurs " +"fenêtres de texte qui ne se chevauchent pas. Le contenu d'une fenêtre peut " +"être modifié de différentes manières — en ajoutant du texte, en l'effaçant " +"ou en changeant son apparence — et la bibliothèque *curses* trouve quels " +"codes de contrôle doivent être envoyés au terminal pour produire le bon " +"résultat. *curses* ne fournit pas beaucoup de concepts d'interface " +"utilisateur tels que boutons, cases à cocher ou dialogues ; si vous avez " +"besoin de telles fonctionnalités, pensez à une bibliothèque d'interface " +"utilisateur comme `Urwid `_." + +#: howto/curses.rst:46 +msgid "" +"The curses library was originally written for BSD Unix; the later System V " +"versions of Unix from AT&T added many enhancements and new functions. BSD " +"curses is no longer maintained, having been replaced by ncurses, which is an " +"open-source implementation of the AT&T interface. If you're using an open-" +"source Unix such as Linux or FreeBSD, your system almost certainly uses " +"ncurses. Since most current commercial Unix versions are based on System V " +"code, all the functions described here will probably be available. The " +"older versions of curses carried by some proprietary Unixes may not support " +"everything, though." +msgstr "" +"La bibliothèque *curses* a été écrite à l'origine pour BSD Unix ; les " +"dernières versions *System V* d'Unix d'AT&T ont ajouté de nombreuses " +"améliorations et de nouvelles fonctions. BSD *curses* n'est plus maintenu, " +"ayant été remplacé par *ncurses*, qui est une implémentation open-source de " +"l'interface AT&T. Si vous utilisez un Unix open-source comme Linux ou " +"FreeBSD, votre système utilise presque certainement *ncurses*. Comme la " +"plupart des versions commerciales actuelles d'Unix sont basées sur le code " +"*System V*, toutes les fonctions décrites ici seront probablement " +"disponibles. Les anciennes versions de *curses* portées par certains Unix " +"propriétaires pourraient ne pas gérer toutes les fonctions." + +#: howto/curses.rst:56 +msgid "" +"The Windows version of Python doesn't include the :mod:`curses` module. A " +"ported version called `UniCurses `_ is " +"available." +msgstr "" +"La version Windows de Python n'inclut pas le module :mod:`curses`. Une " +"version portée appelée `UniCurses `_ est " +"disponible." + +#: howto/curses.rst:62 +msgid "The Python curses module" +msgstr "Le module *curses* de Python" + +#: 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 " +"really easy to transfer that knowledge to Python. The biggest difference is " +"that the Python interface makes things simpler by merging different C " +"functions such as :c:func:`addstr`, :c:func:`mvaddstr`, and :c:func:" +"`mvwaddstr` into a single :meth:`~curses.window.addstr` method. You'll see " +"this covered in more detail later." +msgstr "" +"Le module Python est une surcouche assez simple enrobant les fonctions C " +"fournies par *curses* ; si vous êtes déjà familier avec la programmation " +"*curses* en C, il est très facile de transférer cette connaissance à Python. " +"La plus grande différence est que l'interface Python simplifie les choses en " +"fusionnant différentes fonctions C telles que :c:func:`addstr`, :c:func:" +"`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: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 " +"that, see the Python library guide's section on ncurses, and the C manual " +"pages for ncurses. It will, however, give you the basic ideas." +msgstr "" +"Ce guide pratique est une introduction à l'écriture de programmes en mode " +"texte avec *curses* et Python. Il n'essaie pas d'être un guide complet de " +"l'API *curses* ; pour cela, consultez la section du guide de la bibliothèque " +"Python sur *ncurses* et les pages du manuel C pour *ncurses*. Il vous donne " +"cependant les idées de base." + +#: howto/curses.rst:79 +msgid "Starting and ending a curses application" +msgstr "Lancement et arrêt une application *curses*" + +#: 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 " +"type, send any required setup codes to the terminal, and create various " +"internal data structures. If successful, :func:`initscr` returns a window " +"object representing the entire screen; this is usually called ``stdscr`` " +"after the name of the corresponding C variable. ::" +msgstr "" +"Avant de faire quoi que ce soit, *curses* doit être initialisé. Appelez pour " +"cela la fonction :func:`~curses.initscr`, elle détermine le type de " +"terminal, envoie tous les codes de configuration requis au terminal et crée " +"diverses structures de données internes. En cas de succès, :func:`initscr` " +"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: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 " +"circumstances. This requires calling the :func:`~curses.noecho` function. ::" +msgstr "" +"Habituellement, les applications *curses* désactivent l'écho automatique des " +"touches à l'écran, afin de pouvoir lire les touches et ne les afficher que " +"dans certaines circonstances. Cela nécessite d'appeler la fonction :func:" +"`~curses.noecho`. ::" + +#: 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 " +"opposed to the usual buffered input mode. ::" +msgstr "" +"Également, les applications réagissent généralement instantanément aux " +"touches sans qu'il soit nécessaire d'appuyer sur la touche Entrée ; c'est ce " +"qu'on appelle le mode *cbreak*, par opposition au mode d'entrée habituel " +"avec un tampon. ::" + +#: 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 " +"could write your application to expect such sequences and process them " +"accordingly, curses can do it for you, returning a special value such as :" +"const:`curses.KEY_LEFT`. To get curses to do the job, you'll have to enable " +"keypad mode. ::" +msgstr "" +"Les terminaux renvoient généralement les touches spéciales, telles que les " +"touches de curseur ou les touches de navigation (Page précédente et Accueil " +"par exemple), comme une séquence d'échappement sur plusieurs octets. Bien " +"que vous puissiez écrire votre application pour vous attendre à de telles " +"séquences et les traiter en conséquence, *curses* peut le faire pour vous, " +"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:114 +msgid "" +"Terminating a curses application is much easier than starting one. You'll " +"need to call::" +msgstr "" +"Arrêter une application *curses* est beaucoup plus facile que d'en démarrer " +"une. Appelez ::" + +#: 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 " +"mode. ::" +msgstr "" +"pour inverser les réglages du terminal mis en place pour *curses*. Ensuite, " +"appelez la fonction :func:`~curses.enddwin` pour restaurer le terminal dans " +"son mode de fonctionnement original. ::" + +#: 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 " +"previous state. In Python this commonly happens when your code is buggy and " +"raises an uncaught exception. Keys are no longer echoed to the screen when " +"you type them, for example, which makes using the shell difficult." +msgstr "" +"Un problème courant lors du débogage d'une application *curses* est de se " +"retrouver avec un terminal sans queue ni tête lorsque l'application meurt " +"sans restaurer le terminal à son état précédent. Avec Python, cela arrive " +"souvent lorsque votre code est bogué et lève une exception non interceptée. " +"Les touches ne sont plus répétées à l'écran lorsque vous les tapez, par " +"exemple, ce qui rend l'utilisation de l'interface de commande du *shell* " +"difficile." + +#: 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::" +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:152 +msgid "" +"The :func:`~curses.wrapper` function takes a callable object and does the " +"initializations described above, also initializing colors if color support " +"is present. :func:`wrapper` then runs your provided callable. Once the " +"callable returns, :func:`wrapper` will restore the original state of the " +"terminal. The callable is called inside a :keyword:`try`...\\ :keyword:" +"`except` that catches exceptions, restores the state of the terminal, and " +"then re-raises the exception. Therefore your terminal won't be left in a " +"funny state on exception and you'll be able to read the exception's message " +"and traceback." +msgstr "" +"La fonction :func:`~curses.wrapper` prend un objet appelable et fait les " +"initialisations décrites ci-dessus, initialisant également les couleurs si " +"la gestion des couleurs est possible. :func:`wrapper` lance l'appelable " +"fourni. Une fois que l'appelable termine, :func:`wrapper` restaure l'état " +"d'origine du terminal. L'appelable est appelé à l'intérieur d'un :keyword:" +"`try`...\\ :keyword:`except` qui capture les exceptions, restaure l'état du " +"terminal, puis relève l'exception. Par conséquent, votre terminal ne reste " +"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:164 +msgid "Windows and Pads" +msgstr "Fenêtres et tampons (*pads* en anglais)" + +#: 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 " +"it, allow the user to input strings, and so forth." +msgstr "" +"Les fenêtres sont l'abstraction de base de *curses*. Un objet fenêtre " +"représente une zone rectangulaire de l'écran qui gère des méthodes pour " +"afficher du texte, l'effacer, permettre à l'utilisateur de saisir des " +"chaînes, etc." + +#: 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 " +"this single window, but you might wish to divide the screen into smaller " +"windows, in order to redraw or clear them separately. The :func:`~curses." +"newwin` function creates a new window of a given size, returning the new " +"window object. ::" +msgstr "" +"L'objet ``stdscr`` renvoyé par la fonction :func:`~curses.initscr` est un " +"objet fenêtre qui couvre l'écran entier. De nombreux programmes peuvent " +"n'avoir besoin que de cette fenêtre unique, mais vous pouvez diviser l'écran " +"en fenêtres plus petites, afin de les redessiner ou de les effacer " +"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: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 " +"coordinate (0,0). This breaks the normal convention for handling " +"coordinates where the *x* coordinate comes first. This is an unfortunate " +"difference from most other computer applications, but it's been part of " +"curses since it was first written, and it's too late to change things now." +msgstr "" +"Notez que le système de coordonnées utilisé dans *curses* est inhabituel. " +"Les coordonnées sont toujours passées dans l'ordre *y,x* et le coin " +"supérieur gauche d'une fenêtre a pour coordonnées (0,0). Ceci rompt la " +"convention normale des coordonnées où la coordonnée *x* vient en premier. " +"C'est une différence malheureuse par rapport à la plupart des autres " +"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: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* " +"sizes. Legal coordinates will then extend from ``(0,0)`` to ``(curses.LINES " +"- 1, curses.COLS - 1)``." +msgstr "" +"Votre application peut déterminer la taille de l'écran en utilisant les " +"variables :data:`curses.LINES` et :data:`curses.COLS` pour obtenir les " +"tailles *y* et *x*. Les coordonnées licites s'étendent alors de ``(0,0)`` à " +"``(curses.LINES - 1, curses.COLS - 1)``." + +#: 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:" +"`~curses.window.refresh` method of window objects to update the screen." +msgstr "" +"Quand vous appelez une méthode pour afficher ou effacer du texte, " +"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: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 " +"redraw the screen was very important. Instead curses accumulates changes to " +"the screen and displays them in the most efficient manner when you call :" +"meth:`refresh`. For example, if your program displays some text in a window " +"and then clears the window, there's no need to send the original text " +"because they're never visible." +msgstr "" +"C'est parce que *curses* a été écrit du temps des terminaux avec une " +"connexion à 300 bauds seulement ; avec ces terminaux, il était important de " +"minimiser le temps passé à redessiner l'écran. *curses* calcule donc les " +"modifications à apporter à l'écran pour les afficher de la manière la plus " +"efficace au moment où la méthode :meth:`refresh` est appelée. Par exemple, " +"si votre programme affiche du texte dans une fenêtre puis efface cette " +"fenêtre, il n'est pas nécessaire de l'afficher puisqu'il ne sera jamais " +"visible." + +#: 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 " +"activity, and then pause waiting for a keypress or some other action on the " +"part of the user. All you have to do is to be sure that the screen has been " +"redrawn before pausing to wait for user input, by first calling ``stdscr." +"refresh()`` or the :meth:`refresh` method of some other relevant window." +msgstr "" +"Pratiquement, le fait de devoir indiquer explicitement à *curses* de " +"redessiner une fenêtre ne rend pas la programmation plus compliquée. La " +"plupart des programmes effectuent une rafale de traitements puis attendent " +"qu'une touche soit pressée ou toute autre action de la part de " +"l'utilisateur. Tout ce que vous avez à faire consiste à vous assurer que " +"l'écran a bien été redessiné avant d'attendre une entrée utilisateur, en " +"appelant d'abord ``stdscr.refresh()`` ou la méthode :meth:`refresh` de la " +"fenêtre adéquate." + +#: 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 " +"a pad requires the pad's height and width, while refreshing a pad requires " +"giving the coordinates of the on-screen area where a subsection of the pad " +"will be displayed. ::" +msgstr "" +"Un tampon (*pad* en anglais) est une forme spéciale de fenêtre ; il peut " +"être plus grand que l'écran effectif et il est possible de n'afficher qu'une " +"partie du tampon à la fois. La création d'un tampon nécessite de fournir sa " +"hauteur et sa largeur, tandis que pour le rafraîchissement du tampon, vous " +"devez fournir les coordonnées de la zone de l'écran où une partie du tampon " +"sera affichée." + +#: 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 " +"upper left corner of the displayed section is coordinate (0,0) on the pad. " +"Beyond that difference, pads are exactly like ordinary windows and support " +"the same methods." +msgstr "" +"L'appel à :meth:`refresh` affiche une partie du tampon dans le rectangle " +"formé par les coins de coordonnées (5,5) et (20,75) de l'écran ; le coin " +"supérieur gauche de la partie affichée a pour coordonnées (0,0) dans le " +"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: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 " +"the screen gets updated. :meth:`refresh` actually does two things:" +msgstr "" +"Si vous avez plusieurs fenêtres et tampons sur l'écran, il existe un moyen " +"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: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." +msgstr "" +"elle appelle la méthode :meth:`~curses.window.noutrefresh` de chaque fenêtre " +"pour mettre à jour les données sous-jacentes qui permettent d'obtenir " +"l'affichage voulu ;" + +#: 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." +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: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." +msgstr "" +"Vous pouvez ainsi appeler :meth:`noutrefresh` sur les fenêtres dont vous " +"voulez mettre à jour des données, puis :func:`doupdate` pour mettre à jour " +"l'écran." + +#: howto/curses.rst:260 +msgid "Displaying Text" +msgstr "Affichage de texte" + +#: 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` " +"displays a string at the current cursor location in the ``stdscr`` window, " +"while :c:func:`mvaddstr` moves to a given y,x coordinate first before " +"displaying the string. :c:func:`waddstr` is just like :c:func:`addstr`, but " +"allows specifying a window to use instead of using ``stdscr`` by default. :c:" +"func:`mvwaddstr` allows specifying both a window and a coordinate." +msgstr "" +"D'un point de vue de programmeur C, *curses* peut parfois ressembler à un " +"enchevêtrement de fonctions, chacune ayant sa subtilité. Par exemple, :c:" +"func:`addstr` affiche une chaîne à la position actuelle du curseur de la " +"fenêtre ``stdscr``, alors que :c:func:`mvaddstr` se déplace d'abord " +"jusqu'aux coordonnées (y,x) avant d'afficher la chaîne. :c:func:`waddstr` " +"est comme :c:func:`addstr`, mais permet de spécifier la fenêtre au lieu " +"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: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." +"addstr` accept multiple argument forms. Usually there are four different " +"forms." +msgstr "" +"Heureusement, l'interface Python masque tous ces détails. ``stdscr`` est un " +"objet fenêtre comme les autres et les méthodes telles que :meth:`~curses." +"window.addstr` acceptent leurs arguments sous de multiples formes, " +"habituellement quatre." + +#: howto/curses.rst:277 +msgid "Form" +msgstr "Forme" + +#: howto/curses.rst:346 +msgid "Description" +msgstr "Description" + +#: howto/curses.rst:279 +msgid "*str* or *ch*" +msgstr "*str* ou *ch*" + +#: 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:282 +msgid "*str* or *ch*, *attr*" +msgstr "*str* ou *ch*, *attr*" + +#: howto/curses.rst:282 +msgid "" +"Display the string *str* or character *ch*, using attribute *attr* at the " +"current position" +msgstr "" +"Affiche la chaîne *str* ou le caractère *ch*, en utilisant l'attribut *attr* " +"à la position actuelle" + +#: howto/curses.rst:286 +msgid "*y*, *x*, *str* or *ch*" +msgstr "*y*, *x*, *str* ou *ch*" + +#: 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:289 +msgid "*y*, *x*, *str* or *ch*, *attr*" +msgstr "*y*, *x*, *str* ou *ch*, *attr*" + +#: howto/curses.rst:289 +msgid "" +"Move to position *y,x* within the window, and display *str* or *ch*, using " +"attribute *attr*" +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: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 " +"in the next subsection." +msgstr "" +"Les attributs permettent de mettre en valeur du texte : gras, souligné, mode " +"vidéo inversé ou en couleur. Nous les voyons plus en détail dans la section " +"suivante." + +#: 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 " +"terminal as-is. Strings are encoded to bytes using the value of the " +"window's :attr:`encoding` attribute; this defaults to the default system " +"encoding as returned by :func:`locale.getpreferredencoding`." +msgstr "" +"La méthode :meth:`~curses.window.addstr` prend en argument une chaîne ou une " +"suite d'octets Python. Le contenu des chaînes d'octets est envoyé vers le " +"terminal tel quel. Les chaînes sont encodées en octets en utilisant la " +"valeur de l'attribut :attr:`encoding` de la fenêtre ; c'est par défaut " +"l'encodage du système tel que renvoyé par :func:`locale." +"getpreferredencoding`." + +#: 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." +msgstr "" +"Les méthodes :meth:`~curses.window.addch` prennent un caractère, soit sous " +"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:308 +msgid "" +"Constants are provided for extension characters; these constants are " +"integers greater than 255. For example, :const:`ACS_PLMINUS` is a +/- " +"symbol, and :const:`ACS_ULCORNER` is the upper left corner of a box (handy " +"for drawing borders). You can also use the appropriate Unicode character." +msgstr "" +"Des constantes sont disponibles pour étendre les caractères ; ces constantes " +"sont des entiers supérieurs à 255. Par exemple, :const:`ACS_PLMINUS` " +"correspond au symbole +/- et :const:`ACS_ULCORNER` correspond au coin en " +"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: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 " +"displayed wherever the last operation left off. You can also move the " +"cursor with the ``move(y,x)`` method. Because some terminals always display " +"a flashing cursor, you may want to ensure that the cursor is positioned in " +"some location where it won't be distracting; it can be confusing to have the " +"cursor blinking at some apparently random location." +msgstr "" +"Windows se souvient de l'endroit où le curseur était positionné lors de la " +"dernière opération, de manière à ce que si vous n'utilisez pas les " +"coordonnées *y,x*, l'affichage se produit au dernier endroit utilisé. Vous " +"pouvez aussi déplacer le curseur avec la méthode ``move(y,x)``. Comme " +"certains terminaux affichent un curseur clignotant, vous pouvez ainsi vous " +"assurer que celui-ci est positionné à un endroit où il ne distrait pas " +"l'utilisateur (il peut être déroutant d'avoir un curseur qui clignote à des " +"endroits apparemment aléatoires)." + +#: 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 " +"curses versions, there's a ``leaveok(bool)`` function that's a synonym for :" +"func:`~curses.curs_set`. When *bool* is true, the curses library will " +"attempt to suppress the flashing cursor, and you won't need to worry about " +"leaving it in odd locations." +msgstr "" +"Si votre application n'a pas besoin d'un curseur clignotant, vous pouvez " +"appeler ``curs_set(False)`` pour le rendre invisible. Par souci de " +"compatibilité avec les anciennes versions de *curses*, il existe la fonction " +"``leaveok(bool)`` qui est un synonyme de :func:`~curses.curs_set`. Quand " +"*bool* vaut ``True``, la bibliothèque *curses* essaie de supprimer le " +"curseur clignotant et vous n'avez plus besoin de vous soucier de le laisser " +"trainer à des endroits bizarres." + +#: howto/curses.rst:331 +msgid "Attributes and Color" +msgstr "Attributs et couleurs" + +#: 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 " +"to highlight certain words. curses supports this by allowing you to specify " +"an attribute for each cell on the screen." +msgstr "" +"Les caractères peuvent être affichés de différentes façons. Les lignes de " +"statut des applications en mode texte sont généralement affichées en mode " +"vidéo inversé ; vous pouvez avoir besoin de mettre en valeur certains mots. " +"À ces fins, *curses* vous permet de spécifier un attribut pour chaque " +"caractère à l'écran." + +#: 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 " +"doesn't guarantee that all the possible combinations are available, or that " +"they're all visually distinct. That depends on the ability of the terminal " +"being used, so it's safest to stick to the most commonly available " +"attributes, listed here." +msgstr "" +"Un attribut est un entier dont chaque bit représente un attribut différent. " +"Vous pouvez essayer d'afficher du texte avec plusieurs attributs définis " +"simultanément mais *curses* ne garantit pas que toutes les combinaisons " +"soient prises en compte ou que le résultat soit visuellement différent. Cela " +"dépend de la capacité de chaque terminal utilisé, il est donc plus sage de " +"se cantonner aux attributs les plus communément utilisés, dont la liste est " +"fournie ci-dessous." + +#: howto/curses.rst:346 +msgid "Attribute" +msgstr "Attribut" + +#: howto/curses.rst:348 +msgid ":const:`A_BLINK`" +msgstr ":const:`A_BLINK`" + +#: howto/curses.rst:348 +msgid "Blinking text" +msgstr "Texte clignotant" + +#: howto/curses.rst:350 +msgid ":const:`A_BOLD`" +msgstr ":const:`A_BOLD`" + +#: howto/curses.rst:350 +msgid "Extra bright or bold text" +msgstr "Texte en surbrillance ou en gras" + +#: howto/curses.rst:352 +msgid ":const:`A_DIM`" +msgstr ":const:`A_DIM`" + +#: howto/curses.rst:352 +msgid "Half bright text" +msgstr "Texte en demi-ton" + +#: howto/curses.rst:354 +msgid ":const:`A_REVERSE`" +msgstr ":const:`A_REVERSE`" + +#: howto/curses.rst:354 +msgid "Reverse-video text" +msgstr "Texte en mode vidéo inversé" + +#: howto/curses.rst:356 +msgid ":const:`A_STANDOUT`" +msgstr ":const:`A_STANDOUT`" + +#: howto/curses.rst:356 +msgid "The best highlighting mode available" +msgstr "Le meilleur mode de mis en valeur pour le texte" + +#: howto/curses.rst:358 +msgid ":const:`A_UNDERLINE`" +msgstr ":const:`A_UNDERLINE`" + +#: howto/curses.rst:358 +msgid "Underlined text" +msgstr "Texte souligné" + +#: howto/curses.rst:361 +msgid "" +"So, to display a reverse-video status line on the top line of the screen, " +"you could code::" +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: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 " +"color xterms." +msgstr "" +"La bibliothèque *curses* gère également les couleurs pour les terminaux " +"compatibles. Le plus répandu de ces terminaux est sûrement la console Linux, " +"suivie par *xterm* en couleurs." + +#: 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 " +"(the :func:`curses.wrapper` function does this automatically). Once that's " +"done, the :func:`~curses.has_colors` function returns TRUE if the terminal " +"in use can actually display color. (Note: curses uses the American spelling " +"'color', instead of the Canadian/British spelling 'colour'. If you're used " +"to the British spelling, you'll have to resign yourself to misspelling it " +"for the sake of these functions.)" +msgstr "" +"Pour utiliser les couleurs, vous devez d'abord appeler la fonction :func:" +"`~curses.start_color` juste après avoir appelé :func:`~curses.initscr` afin " +"d'initialiser (la fonction :func:`curses.wrapper` le fait automatiquement). " +"Ensuite, la fonction :func:`~curses.has_colors` renvoie ``True`` si le " +"terminal utilisé gère les couleurs (note : *curses* utilise l'orthographe " +"américaine *color* et non pas l'orthographe britannique ou canadienne " +"*colour* ; si vous êtes habitué à l'orthographe britannique, vous devrez " +"vous résigner à mal l'orthographier tant que vous utilisez *curses*)." + +#: 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 " +"attribute value corresponding to a color pair with the :func:`~curses." +"color_pair` function; this can be bitwise-OR'ed with other attributes such " +"as :const:`A_REVERSE`, but again, such combinations are not guaranteed to " +"work on all terminals." +msgstr "" +"La bibliothèque *curses* maintient un nombre restreint de paires de " +"couleurs, constituées d'une couleur de texte (*foreground*) et de fond " +"(*background*). Vous pouvez obtenir la valeur des attributs correspondant à " +"une paire de couleur avec la fonction :func:`~curses.color_pair` ; cette " +"valeur peut être combinée bit par bit (avec la fonction *OR*) avec les " +"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: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: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 " +"pair *n*, to foreground color f and background color b. Color pair 0 is " +"hard-wired to white on black, and cannot be changed." +msgstr "" +"Comme indiqué auparavant, une paire de couleurs est constituée d'une couleur " +"de texte et d'une couleur de fond. La fonction ``init_pair(n, f, b)`` change " +"la définition de la paire de couleurs *n*, en définissant la couleur de " +"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: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:" +"blue, 5:magenta, 6:cyan, and 7:white. The :mod:`curses` module defines " +"named constants for each of these colors: :const:`curses.COLOR_BLACK`, :" +"const:`curses.COLOR_RED`, and so forth." +msgstr "" +"Les couleurs sont numérotées et :func:`start_color` initialise 8 couleurs " +"basiques lors de l'activation du mode en couleurs. Ce sont : 0 pour noir " +"(*black*), 1 pour rouge (*red*), 2 pour vert (*green*), 3 pour jaune " +"(*yellow*), 4 pour bleu *(blue*), 5 pour magenta, 6 pour cyan et 7 pour " +"blanc (*white*). Le module :mod:`curses` définit des constantes nommées pour " +"chacune de ces couleurs : :const:`curses.COLOR_BLACK`, :const:`curses." +"COLOR_RED` et ainsi de suite." + +#: 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: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 " +"color with::" +msgstr "" +"Quand vous modifiez une paire de couleurs, tout le texte déjà affiché qui " +"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: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 " +"purple or blue or any other color you like. Unfortunately, the Linux " +"console doesn't support this, so I'm unable to try it out, and can't provide " +"any examples. You can check if your terminal can do this by calling :func:" +"`~curses.can_change_color`, which returns ``True`` if the capability is " +"there. If you're lucky enough to have such a talented terminal, consult " +"your system's man pages for more information." +msgstr "" +"Les terminaux « de luxe » peuvent définir les couleurs avec des valeurs " +"*RGB*. Cela vous permet de modifier la couleur 1, habituellement rouge, en " +"violet ou bleu voire toute autre couleur selon votre goût. Malheureusement, " +"la console Linux ne gère pas cette fonctionnalité, je suis donc bien " +"incapable de la tester et de vous en fournir un exemple. Vous pouvez " +"vérifier si votre terminal la prend en charge en appelant :func:`~curses." +"can_change_color`, qui renvoie ``True`` en cas de succès. Si vous avez la " +"chance d'avoir un terminal aussi perfectionné, consultez les pages du manuel " +"de votre système pour obtenir plus d'informations." + +#: howto/curses.rst:427 +msgid "User Input" +msgstr "Entrées de l'utilisateur" + +#: 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 " +"`Urwid `_ have more extensive collections " +"of widgets.)" +msgstr "" +"La bibliothèque C *curses* ne propose que quelques mécanismes très simples " +"pour les entrées. Le module :mod:`curses` y ajoute un *widget* basique " +"d'entrée de texte (d'autres bibliothèques telles que `Urwid `_ ont un ensemble de *widgets* plus conséquent)." + +#: 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: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 " +"called earlier. You can optionally specify a coordinate to which the cursor " +"should be moved before pausing." +msgstr "" +":meth:`~curses.window.getch` rafraîchit l'écran et attend que l'utilisateur " +"appuie sur une touche, affichant cette touche si :func:`~curses.echo` a été " +"appelé auparavant. Vous pouvez en option spécifier des coordonnées où " +"positionner le curseur avant la mise en pause ;" + +#: 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 " +"special keys such as function keys return longer strings containing a key " +"name such as ``KEY_UP`` or ``^G``." +msgstr "" +":meth:`~curses.window.getkey` effectue la même chose mais convertit l'entier " +"en chaîne. Les caractères individuels sont renvoyés en chaînes de longueur 1 " +"alors que les touches spéciales (telles que les touches de fonction) " +"renvoient des chaînes plus longues contenant le nom de la touche (tel que " +"``KEY_UP`` ou ``^G``)." + +#: 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:" +"`getkey` for the window become non-blocking. To signal that no input is " +"ready, :meth:`getch` returns ``curses.ERR`` (a value of -1) and :meth:" +"`getkey` raises an exception. There's also a :func:`~curses.halfdelay` " +"function, which can be used to (in effect) set a timer on each :meth:" +"`getch`; if no input becomes available within a specified delay (measured in " +"tenths of a second), curses raises an exception." +msgstr "" +"Il est possible de ne pas attendre l'utilisateur en utilisant la méthode de " +"fenêtre :meth:`~curses.window.nodelay`. Après ``nodelay(True)``, les " +"méthodes de fenêtre :meth:`getch` et :meth:`getkey` deviennent non " +"bloquantes. Pour indiquer qu'aucune entrée n'a eu lieu, :meth:`getch` " +"renvoie ``curses.ERR`` (ayant pour valeur −1) et :meth:`getkey` lève une " +"exception. Il existe aussi la fonction :func:`~curses.halfdelay`, qui peut " +"être utilisée pour définir un délai maximal pour chaque :meth:`getch` ; si " +"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: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 " +"special keys such as Page Up, Home, or the cursor keys. You can compare the " +"value returned to constants such as :const:`curses.KEY_PPAGE`, :const:" +"`curses.KEY_HOME`, or :const:`curses.KEY_LEFT`. The main loop of your " +"program may look something like this::" +msgstr "" +"La méthode :meth:`getch` renvoie un entier ; s'il est entre 0 et 255, c'est " +"le code ASCII de la touche pressée. Les valeurs supérieures à 255 sont des " +"touches spéciales telles que Page Précédente, Accueil ou les touches du " +"curseur. Vous pouvez comparer la valeur renvoyée aux constantes :const:" +"`curses.KEY_PPAGE`, :const:`curses.KEY_HOME`, :const:`curses.KEY_LEFT`, etc. " +"La boucle principale de votre programme pourrait ressembler à quelque chose " +"comme ::" + +#: 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 " +"useful in writing more readable tests for such loops. It also supplies " +"conversion functions that take either integer or 1-character-string " +"arguments and return the same type. For example, :func:`curses.ascii.ctrl` " +"returns the control character corresponding to its argument." +msgstr "" +"Le module :mod:`curses.ascii` fournit des fonctions pour déterminer si " +"l'entier ou la chaîne de longueur 1 passés en arguments font partie de la " +"classe ASCII ; elles peuvent s'avérer utile pour écrire du code plus lisible " +"dans ce genre de boucles. Il fournit également des fonctions de conversion " +"qui prennent un entier ou une chaîne de longueur 1 en entrée et renvoient le " +"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: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 " +"limited; the only editing keys available are the backspace key and the Enter " +"key, which terminates the string. It can optionally be limited to a fixed " +"number of characters. ::" +msgstr "" +"Il existe aussi une méthode pour récupérer une chaîne entière, :meth:" +"`~curses.window.getstr`. Elle n'est pas beaucoup utilisée car son utilité " +"est limitée : les seules touches d'édition disponibles sont le retour " +"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: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." +"Textbox` class support editing with input validation and gathering the edit " +"results either with or without trailing spaces. Here's an example::" +msgstr "" +"Le module :mod:`curses.textpad` fournit un type de boîte texte qui gère des " +"touches de fonctions à la façon d'\\ *Emacs*. Plusieurs méthodes de la " +"classe :class:`~curses.textpad.Textbox` gèrent l'édition avec la validation " +"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: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:518 +msgid "For More Information" +msgstr "Pour aller plus loin" + +#: 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 " +"Python library page for the :mod:`curses` module is now reasonably " +"complete. You should browse it next." +msgstr "" +"Ce guide pratique ne couvre pas certains sujets avancés, tels que la lecture " +"du contenu de l'écran ou la capture des événements relatifs à la souris dans " +"une instance *xterm*, mais la page de la bibliothèque Python du module :mod:" +"`curses` est maintenant suffisamment complète. Nous vous encourageons à la " +"parcourir." + +#: 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 " +"ncurses or a proprietary Unix vendor's. The manual pages will document any " +"quirks, and provide complete lists of all the functions, attributes, and :" +"const:`ACS_\\*` characters available to you." +msgstr "" +"Si vous vous posez des questions sur le fonctionnement précis de fonctions " +"*curses*, consultez les pages de manuel de l'implémentation *curses* de " +"votre système, que ce soit *ncurses* ou une version propriétaire Unix. Les " +"pages de manuel documentent toutes les bizarreries et vous donneront les " +"listes complètes des fonctions, attributs et codes :const:`ACS_\\*` des " +"caractères disponibles." + +#: 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, " +"but because no one has needed them yet. Also, Python doesn't yet support " +"the menu library associated with ncurses. Patches adding support for these " +"would be welcome; see `the Python Developer's Guide `_ to learn more about submitting patches to Python." +msgstr "" +"Étant donné que l'API *curses* est si volumineuse, certaines fonctions ne " +"sont pas prises en charge dans l'interface Python. Souvent, ce n'est pas " +"parce qu'elles sont difficiles à implémenter, mais parce que personne n'en a " +"eu encore besoin. De plus, Python ne prend pas encore en charge la " +"bibliothèque de gestion des menus associée à *ncurses*. Les correctifs " +"ajoutant cette prise en charge seraient bienvenus ; reportez-vous au `guide " +"du développeur Python `_ pour apprendre " +"comment soumettre des améliorations à Python." + +#: howto/curses.rst:540 +#, fuzzy +msgid "" +"`Writing Programs with NCURSES `_: a lengthy tutorial for C programmers." +msgstr "" +"`Writing Programs with NCURSES `_ : un long tutoriel pour les programmeurs C (ressource en " +"anglais)." + +#: howto/curses.rst:542 +msgid "`The ncurses man page `_" +msgstr "`La page de manuel ncurses `_" + +#: howto/curses.rst:543 +#, fuzzy +msgid "" +"`The ncurses FAQ `_" +msgstr "" +"`La FAQ ncurses `_ " +"(ressource en anglais)" + +#: howto/curses.rst:544 +msgid "" +"`\"Use curses... don't swear\" `_: video of a PyCon 2013 talk on controlling terminals using " +"curses or Urwid." +msgstr "" +"`\"Use curses... don't swear\" `_ : 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:546 +#, fuzzy +msgid "" +"`\"Console Applications with Urwid\" `_: video of a PyCon CA 2012 talk demonstrating some " +"applications written using Urwid." +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 new file mode 100644 index 0000000000..07dbea9a40 --- /dev/null +++ b/howto/descriptor.po @@ -0,0 +1,1523 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-18 15:46+0200\n" +"PO-Revision-Date: 2021-12-16 17:28+0100\n" +"Last-Translator: Mathieu Dupuy \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" + +#: howto/descriptor.rst:5 +msgid "Descriptor HowTo Guide" +msgstr "Guide pour l'utilisation des descripteurs" + +#: howto/descriptor.rst:0 +msgid "Author" +msgstr "Auteur" + +#: howto/descriptor.rst:7 +msgid "Raymond Hettinger" +msgstr "Raymond Hettinger" + +#: howto/descriptor.rst:0 +msgid "Contact" +msgstr "Contact" + +#: howto/descriptor.rst:8 +msgid "" +msgstr "" + +#: howto/descriptor.rst:11 +msgid "Contents" +msgstr "Sommaire" + +#: howto/descriptor.rst:13 +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 "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 "" +"The third section provides a more technical tutorial that goes into the " +"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 "" +"The last section has pure Python equivalents for built-in descriptors that " +"are written in C. Read this if you're curious about how functions turn into " +"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 "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 "Un exemple simple : un descripteur qui renvoie une constante" + +#: howto/descriptor.rst:45 +msgid "" +"The :class:`Ten` class is a descriptor whose :meth:`__get__` method always " +"returns the constant ``10``:" +msgstr "" +"La classe :class:`Ten` est un descripteur dont la méthode :meth:`__get__` " +"renvoie toujours la constante ``10`` :" + +#: howto/descriptor.rst:54 +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 "" +"In the ``a.x`` attribute lookup, the dot operator finds ``'x': 5`` in the " +"class dictionary. In the ``a.y`` lookup, the dot operator finds a " +"descriptor instance, recognized by its ``__get__`` method. Calling that " +"method returns ``10``." +msgstr "" +"Dans la recherche d'attribut ``a.x``, l'opérateur « point » trouve ``'x': " +"5`` dans le dictionnaire de classe. Dans la recherche ``a.y``, l'opérateur " +"« point » trouve une instance de descripteur, reconnue par sa méthode " +"``__get__``. L'appel de cette méthode renvoie ``10``." + +#: howto/descriptor.rst:78 +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 "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 "" +"Besides showing how descriptors can run computations, this example also " +"reveals the purpose of the parameters to :meth:`__get__`. The *self* " +"parameter is *size*, an instance of *DirectorySize*. The *obj* parameter is " +"either *g* or *s*, an instance of *Directory*. It is the *obj* parameter " +"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 "Attributs gérés" + +#: howto/descriptor.rst:133 +msgid "" +"A popular use for descriptors is managing access to instance data. The " +"descriptor is assigned to a public attribute in the class dictionary while " +"the actual data is stored as a private attribute in the instance " +"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 "" +"In the following example, *age* is the public attribute and *_age* is the " +"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 "" +"One major issue with this example is that the private name *_age* is " +"hardwired in the *LoggedAgeAccess* class. That means that each instance can " +"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 "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 "" +"In this example, the :class:`Person` class has two descriptor instances, " +"*name* and *age*. When the :class:`Person` class is defined, it makes a " +"callback to :meth:`__set_name__` in *LoggedAccess* so that the field names " +"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 "" +"An interactive session shows that the :class:`Person` class has called :meth:" +"`__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 "Les deux instances de *Person* ne contiennent que les noms privés :" + +#: howto/descriptor.rst:295 +msgid "Closing thoughts" +msgstr "Réflexions finales" + +#: 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: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: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 "" +"Les descripteurs sont invoqués par l'opérateur « point » lors de la " +"recherche d'attribut. Si on accède indirectement au descripteur avec " +"``vars(some_class)[descriptor_name]``, l'instance du descripteur est " +"renvoyée sans l'invoquer." + +#: 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: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: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: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:326 +msgid "Complete Practical Example" +msgstr "Exemple complet pratique" + +#: 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:333 +msgid "Validator class" +msgstr "Classe « validateur »" + +#: 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: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: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:368 +msgid "Custom validators" +msgstr "Validateurs personnalisés" + +#: howto/descriptor.rst:370 +msgid "Here are three practical data validation utilities:" +msgstr "Voici trois utilitaires concrets de validation de données :" + +#: 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: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: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:437 +msgid "Practical application" +msgstr "Application pratique" + +#: 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:454 +msgid "The descriptors prevent invalid instances from being created:" +msgstr "Les descripteurs empêchent la création d'instances non valides :" + +#: howto/descriptor.rst:481 +msgid "Technical Tutorial" +msgstr "Tutoriel technique" + +#: 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:488 +msgid "Abstract" +msgstr "Résumé" + +#: 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: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." + +#: howto/descriptor.rst:498 +#, fuzzy +msgid "Definition and introduction" +msgstr "Définition et introduction" + +#: 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 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: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 " +"chain starting with ``a.__dict__['x']``, then ``type(a).__dict__['x']``, and " +"continuing through the method resolution order of ``type(a)``. If the looked-" +"up value is an object defining one of the descriptor methods, then Python " +"may override the default behavior and invoke the descriptor method instead. " +"Where this occurs in the precedence chain depends on which descriptor " +"methods were defined." +msgstr "" +"Le comportement par défaut pour l'accès aux attributs consiste à obtenir, " +"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 :" +"func:`super()`. They are used throughout Python itself. Descriptors " +"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 " +"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:522 +#, fuzzy +msgid "Descriptor protocol" +msgstr "Protocole descripteur" + +#: howto/descriptor.rst:524 +msgid "``descr.__get__(self, obj, type=None) -> value``" +msgstr "``descr.__get__(self, obj, type=None) -> value``" + +#: howto/descriptor.rst:526 +msgid "``descr.__set__(self, obj, value) -> None``" +msgstr "``descr.__set__(self, obj, value) -> None``" + +#: howto/descriptor.rst:528 +msgid "``descr.__delete__(self, obj) -> None``" +msgstr "``descr.__delete__(self, obj) -> None``" + +#: 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 " +"up as an attribute." +msgstr "" +"C'est tout ce qu'il y a à faire. Définissez n'importe laquelle de ces " +"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: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 " +"non-data descriptors (they are often used for methods but other uses are " +"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 hors-données (ils sont généralement " +"utilisés pour des méthodes mais d'autres utilisations sont possibles)." + +#: 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 " +"has an entry with the same name as a data descriptor, the data descriptor " +"takes precedence. If an instance's dictionary has an entry with the same " +"name as a non-data descriptor, the dictionary entry takes precedence." +msgstr "" +"Les descripteurs de données et les descripteurs *non-data* diffèrent dans la " +"façon dont les dérogations sont calculées en ce qui concerne les entrées du " +"dictionnaire d'une instance. Si le dictionnaire d'une instance comporte une " +"entrée portant le même nom qu'un descripteur de données, le descripteur de " +"données est prioritaire. Si le dictionnaire d'une instance comporte une " +"entrée portant le même nom qu'un descripteur *non-data*, l'entrée du " +"dictionnaire a la priorité." + +#: 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 " +"called. Defining the :meth:`__set__` method with an exception raising " +"placeholder is enough to make it a data descriptor." +msgstr "" +"Pour faire un descripteur de données en lecture seule, définissez à la fois :" +"meth:`__get__` et :meth:`__set__` avec :meth:`__set__` levant une erreur :" +"exc:`AttributeError` quand il est appelé. Définir la méthode :meth:" +"`__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:552 +msgid "Overview of descriptor invocation" +msgstr "Présentation de l'appel de descripteur" + +#: 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 ``desc.__get__(obj)`` ou " +"``desc.__get__(None, cls)``." + +#: 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: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:565 +msgid "" +"The details of invocation depend on whether ``obj`` is an object, class, or " +"instance of super." +msgstr "" +"Les détails de l'appel varient selon que ``obj`` est un objet, une classe ou " +"une instance de *super*." + +#: howto/descriptor.rst:570 +msgid "Invocation from an instance" +msgstr "Appel depuis une instance" + +#: 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: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: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:719 +msgid "" +"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:723 +msgid "" +"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:773 +msgid "Invocation from a class" +msgstr "Appel depuis une classe" + +#: howto/descriptor.rst:775 +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:780 +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:782 +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:787 +msgid "Invocation from super" +msgstr "Appel depuis super" + +#: howto/descriptor.rst:789 +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:792 +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 "" +"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:797 +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 "" +"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:804 +msgid "Summary of invocation logic" +msgstr "Résumé de la logique d'appel" + +#: howto/descriptor.rst:806 +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:809 +msgid "The important points to remember are:" +msgstr "Les points importants à retenir sont :" + +#: howto/descriptor.rst:811 +msgid "Descriptors are invoked by the :meth:`__getattribute__` method." +msgstr "" +"les descripteurs sont appelés par la méthode :meth:`__getattribute__` ;" + +#: howto/descriptor.rst:813 +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:816 +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 " +"descripteur car toute la logique des descripteurs est dans cette méthode ;" + +#: howto/descriptor.rst:819 +msgid "" +":meth:`object.__getattribute__` and :meth:`type.__getattribute__` make " +"different calls to :meth:`__get__`. The first includes the instance and may " +"include the class. The second puts in ``None`` for the instance and always " +"includes the class." +msgstr "" +":meth:`objet.__getattribute__` et :meth:`type.__getattribute__` font " +"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:824 +msgid "Data descriptors always override instance dictionaries." +msgstr "" +"les descripteurs de données sont toujours prioritaires sur les dictionnaires " +"d'instances." + +#: howto/descriptor.rst:826 +msgid "Non-data descriptors may be overridden by instance dictionaries." +msgstr "" +"les descripteurs hors-données peuvent céder la priorité aux dictionnaires " +"d'instance." + +#: howto/descriptor.rst:830 +msgid "Automatic name notification" +msgstr "Notification automatique des noms" + +#: howto/descriptor.rst:832 +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` " +"metaclass scans the dictionary of the new class. If any of the entries are " +"descriptors and if they define :meth:`__set_name__`, that method is called " +"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:839 +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:`type_new()` et :c:func:" +"`set_names()` dans :source:`Objects/typeobject.c`." + +#: howto/descriptor.rst:842 +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:848 +msgid "ORM example" +msgstr "Exemple d'ORM" + +#: howto/descriptor.rst:850 +msgid "" +"The following code is a simplified skeleton showing how data descriptors " +"could be used to implement an `object relational mapping `_." +msgstr "" + +#: howto/descriptor.rst:854 +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:873 +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:898 +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:903 +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:948 +msgid "Pure Python Equivalents" +msgstr "Équivalents en Python pur" + +#: howto/descriptor.rst:950 +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." +msgstr "" +"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:957 +msgid "Properties" +msgstr "Propriétés" + +#: howto/descriptor.rst:959 +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` 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:964 +msgid "" +"The documentation shows a typical use to define a managed attribute ``x``:" +msgstr "" +"La documentation montre une utilisation caractéristique pour définir un " +"attribut géré ``x`` ::" + +#: howto/descriptor.rst:988 +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ée dans le protocole du " +"descripteur, voici un équivalent en Python pur ::" + +#: howto/descriptor.rst:1091 +msgid "" +"The :func:`property` builtin helps whenever a user interface has granted " +"attribute access and then subsequent changes require the intervention of a " +"method." +msgstr "" +"La fonction native :func:`property` aide chaque fois qu'une interface " +"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:1095 +msgid "" +"For instance, a spreadsheet class may grant access to a cell value through " +"``Cell('b10').value``. Subsequent improvements to the program require the " +"cell to be recalculated on every access; however, the programmer does not " +"want to affect existing client code accessing the attribute directly. The " +"solution is to wrap access to the value attribute in a property data " +"descriptor:" +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 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:1112 +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:1117 +#, fuzzy +msgid "Functions and methods" +msgstr "Fonctions et méthodes" + +#: howto/descriptor.rst:1119 +msgid "" +"Python's object oriented features are built upon a function based " +"environment. Using non-data descriptors, the two are merged seamlessly." +msgstr "" +"Les fonctionnalités orientées objet de Python sont construites sur un " +"environnement basé sur des fonctions. À l'aide de descripteurs *non-data*, " +"les deux sont fusionnés de façon transparente." + +#: howto/descriptor.rst:1122 +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 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:1127 +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:1144 +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 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:1160 +msgid "" +"Running the following class in the interpreter shows how the function " +"descriptor works in practice:" +msgstr "" +"L'exécution de la classe suivante dans l'interpréteur montre comment le " +"descripteur de fonction se comporte en pratique ::" + +#: howto/descriptor.rst:1169 +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:1176 +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:1182 +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:1188 +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:1195 +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:1204 +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:1209 +msgid "Kinds of methods" +msgstr "Types de méthodes" + +#: howto/descriptor.rst:1211 +msgid "" +"Non-data descriptors provide a simple mechanism for variations on the usual " +"patterns of binding functions into methods." +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:1214 +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 " +"transforms an ``obj.f(*args)`` call into ``f(obj, *args)``. Calling ``cls." +"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é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:1219 +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:1222 +msgid "Transformation" +msgstr "Transformation" + +#: howto/descriptor.rst:1222 +msgid "Called from an object" +msgstr "Appelée depuis un objet" + +#: howto/descriptor.rst:1222 +msgid "Called from a class" +msgstr "Appelée depuis une classe" + +#: howto/descriptor.rst:1225 +msgid "function" +msgstr "fonction" + +#: howto/descriptor.rst:1225 +msgid "f(obj, \\*args)" +msgstr "f(obj, \\*args)" + +#: howto/descriptor.rst:1227 +msgid "f(\\*args)" +msgstr "f(\\*args)" + +#: howto/descriptor.rst:1227 +msgid "staticmethod" +msgstr "méthode statique" + +#: howto/descriptor.rst:1229 +msgid "classmethod" +msgstr "méthode de classe" + +#: howto/descriptor.rst:1229 +msgid "f(type(obj), \\*args)" +msgstr "f(type(obj), \\*args)" + +#: howto/descriptor.rst:1229 +msgid "f(cls, \\*args)" +msgstr "f(cls, \\*args)" + +#: howto/descriptor.rst:1234 +msgid "Static methods" +msgstr "Méthodes statiques" + +#: howto/descriptor.rst:1236 +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." +"__getattribute__(c, \"f\")`` or ``object.__getattribute__(C, \"f\")``. As a " +"result, the function becomes identically accessible from either an object or " +"a class." +msgstr "" +"Les méthodes statiques renvoient la fonction sous-jacente sans " +"modifications. Appeler ``c.f`` ou ``C.f`` est l'équivalent d'une recherche " +"directe dans ``objet.__getattribute__(c, \"f\")`` ou ``objet." +"__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:1242 +msgid "" +"Good candidates for static methods are methods that do not reference the " +"``self`` variable." +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:1245 +msgid "" +"For instance, a statistics package may include a container class for " +"experimental data. The class provides normal methods for computing the " +"average, mean, median, and other descriptive statistics that depend on the " +"data. However, there may be useful functions which are conceptually related " +"but do not depend on the data. For instance, ``erf(x)`` is handy conversion " +"routine that comes up in statistical work but does not directly depend on a " +"particular dataset. It can be called either from an object or the class: " +"``s.erf(1.5) --> .9332`` or ``Sample.erf(1.5) --> .9332``." +msgstr "" +"Par exemple, un paquet traitant de statistiques peut inclure une classe qui " +"est un conteneur pour des données expérimentales. La classe fournit les " +"méthodes normales pour calculer la moyenne, la moyenne, la médiane et " +"d'autres statistiques descriptives qui dépendent des données. Cependant, il " +"peut y avoir des fonctions utiles qui sont conceptuellement liées mais qui " +"ne dépendent pas des données. Par exemple, ``erf(x)`` est une routine de " +"conversion pratique qui apparaît dans le travail statistique mais qui ne " +"dépend pas directement d'un ensemble de données particulier. Elle peut être " +"appelée à partir d'un objet ou de la classe : ``s.erf(1.5) --> .9332`` ou " +"``Sample.erf(1.5) --> .9332``." + +#: howto/descriptor.rst:1254 +msgid "" +"Since static methods return the underlying function with no changes, the " +"example calls are unexciting:" +msgstr "" +"Puisque les méthodes statiques renvoient la fonction sous-jacente sans " +"changement, les exemples d’appels sont d'une grande banalité ::" + +#: howto/descriptor.rst:1271 +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 hors-données, une version Python " +"pure de :func:`staticmethod` ressemblerait à ceci ::" + +#: howto/descriptor.rst:1310 +msgid "Class methods" +msgstr "Méthodes de classe" + +#: howto/descriptor.rst:1312 +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 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:1330 +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 " +"for class methods is to create alternate class constructors. For example, " +"the classmethod :func:`dict.fromkeys` creates a new dictionary from a list " +"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 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:1347 +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 :" + +#: howto/descriptor.rst:1357 +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 hors-données, une version Python " +"pure de :func:`classmethod` ressemblerait à ceci :" + +#: howto/descriptor.rst:1406 +msgid "" +"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:1426 +msgid "Member objects and __slots__" +msgstr "Objets membres et *__slots__*" + +#: howto/descriptor.rst:1428 +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:1432 +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:1448 +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:1483 +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:1488 +msgid "" +"4. Improves speed. Reading instance variables is 35% faster with " +"``__slots__`` (as measured with Python 3.10 on an Apple M1 processor)." +msgstr "" +"4/ améliore la vitesse. La lecture des variables d'instance est 35 % plus " +"rapide avec ``__slots__`` (mesure effectuée avec Python 3.10 sur un " +"processeur Apple M1) ;" + +#: howto/descriptor.rst:1491 +msgid "" +"5. Blocks tools like :func:`functools.cached_property` which require an " +"instance dictionary to function correctly:" +msgstr "" +"5/ bloque les outils comme :func:`functools.cached_property` qui nécessitent " +"un dictionnaire d'instance pour fonctionner correctement :" + +#: howto/descriptor.rst:1513 +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 " +"over object memory allocation. However, we can build a mostly faithful " +"simulation where the actual C structure for slots is emulated by a private " +"``_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:1558 +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:1574 +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:1609 +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:1623 +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:1644 +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:1656 +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 " +#~ "are called. Examines a custom descriptor and several built-in Python " +#~ "descriptors including functions, properties, static methods, and class " +#~ "methods. Shows how each works by giving a pure Python equivalent and a " +#~ "sample application." +#~ msgstr "" +#~ "Définit les descripteurs, résume le protocole et montre comment les " +#~ "descripteurs sont appelés. Examine un descripteur personnalisé et " +#~ "plusieurs descripteurs Python intégrés, y compris les fonctions, les " +#~ "propriétés, les méthodes statiques et les méthodes de classe. Montre " +#~ "comment chacun fonctionne en donnant un équivalent Python pur et un " +#~ "exemple d'application." + +#~ msgid "Invoking Descriptors" +#~ msgstr "Invocation des descripteurs" + +#~ msgid "" +#~ "Alternatively, it is more common for a descriptor to be invoked " +#~ "automatically upon attribute access. For example, ``obj.d`` looks up " +#~ "``d`` in the dictionary of ``obj``. If ``d`` defines the method :meth:" +#~ "`__get__`, then ``d.__get__(obj)`` is invoked according to the precedence " +#~ "rules listed below." +#~ msgstr "" +#~ "Alternativement, il est plus courant qu'un descripteur soit invoqué " +#~ "automatiquement lors de l'accès aux attributs. Par exemple, ``obj.d`` " +#~ "recherche ``d`` dans le dictionnaire de ``obj.d``. Si ``d`` définit la " +#~ "méthode :meth:`__get__`, alors ``d.__get__(obj)`` est invoqué selon les " +#~ "règles de priorité énumérées ci-dessous." + +#~ msgid "" +#~ "For objects, the machinery is in :meth:`object.__getattribute__` which " +#~ "transforms ``b.x`` into ``type(b).__dict__['x'].__get__(b, type(b))``. " +#~ "The implementation works through a precedence chain that gives data " +#~ "descriptors priority over instance variables, instance variables priority " +#~ "over non-data descriptors, and assigns lowest priority to :meth:" +#~ "`__getattr__` if provided. The full C implementation can be found in :c:" +#~ "func:`PyObject_GenericGetAttr()` in :source:`Objects/object.c`." +#~ msgstr "" +#~ "Pour les objets, la machinerie est dans :meth:`object.__getattribute__` " +#~ "qui transforme ``b.x`` en ``type(b).__dict__['x'].__get__(b, type(b)]``. " +#~ "L'implémentation fonctionne à travers une chaîne de priorité qui donne la " +#~ "priorité aux descripteurs de données sur les variables d'instance, la " +#~ "priorité aux variables d'instance sur les descripteurs *non-data*, et " +#~ "attribue la priorité la plus faible à :meth:`__getattr__` si fourni. " +#~ "L'implémentation complète en C peut être trouvée dans :c:func:" +#~ "`PyObject_GenericGetAttr()` dans :source:`Objects/object.c`." + +#~ msgid "" +#~ "For classes, the machinery is in :meth:`type.__getattribute__` which " +#~ "transforms ``B.x`` into ``B.__dict__['x'].__get__(None, B)``. In pure " +#~ "Python, it looks like::" +#~ msgstr "" +#~ "Pour les classes, la machinerie est dans :meth:`type.__getattribute__` " +#~ "qui transforme ``B.x`` en ``B.__dict__['x'].__get__(None, B)``. En " +#~ "Python pur, cela ressemble à ::" + +#~ msgid "" +#~ "The details above show that the mechanism for descriptors is embedded in " +#~ "the :meth:`__getattribute__()` methods for :class:`object`, :class:" +#~ "`type`, and :func:`super`. Classes inherit this machinery when they " +#~ "derive from :class:`object` or if they have a meta-class providing " +#~ "similar functionality. Likewise, classes can turn-off descriptor " +#~ "invocation by overriding :meth:`__getattribute__()`." +#~ msgstr "" +#~ "Les détails ci-dessus montrent que le mécanisme des descripteurs est " +#~ "intégré dans les méthodes :meth:`__getattribute__()` pour :class:" +#~ "`object`, :class:`type` et :func:`super`. Les classes héritent de cette " +#~ "machinerie lorsqu'elles dérivent de :class:`object` ou si elles ont une " +#~ "méta-classe fournissant des fonctionnalités similaires. De même, les " +#~ "classes peuvent désactiver l'appel de descripteurs en remplaçant :meth:" +#~ "`__getattribute__()`." + +#~ msgid "Descriptor Example" +#~ msgstr "Exemple de descripteur" + +#~ msgid "" +#~ "The following code creates a class whose objects are data descriptors " +#~ "which print a message for each get or set. Overriding :meth:" +#~ "`__getattribute__` is alternate approach that could do this for every " +#~ "attribute. However, this descriptor is useful for monitoring just a few " +#~ "chosen attributes::" +#~ msgstr "" +#~ "Le code suivant crée une classe dont les objets sont des descripteurs de " +#~ "données qui affichent un message pour chaque lecture ou écriture. " +#~ "Redéfinir :meth:`__getattribute__` est une approche alternative qui " +#~ "pourrait le faire pour chaque attribut. Cependant, ce descripteur n'est " +#~ "utile que pour le suivi de quelques attributs choisis ::" + +#~ msgid "Static Methods and Class Methods" +#~ msgstr "Méthodes statiques et méthodes de classe" diff --git a/howto/functional.po b/howto/functional.po new file mode 100644 index 0000000000..161ac12dcd --- /dev/null +++ b/howto/functional.po @@ -0,0 +1,2018 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-18 15:46+0200\n" +"PO-Revision-Date: 2022-05-12 09:39+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 3.0.1\n" + +#: howto/functional.rst:3 +msgid "Functional Programming HOWTO" +msgstr "Guide pratique : programmation fonctionnelle" + +#: howto/functional.rst:0 +msgid "Author" +msgstr "Auteur" + +#: howto/functional.rst:5 +msgid "A. M. Kuchling" +msgstr "A. M. Kuchling" + +#: howto/functional.rst:0 +msgid "Release" +msgstr "Version" + +#: howto/functional.rst:6 +msgid "0.32" +msgstr "0.32" + +#: howto/functional.rst:8 +msgid "" +"In this document, we'll take a tour of Python's features suitable for " +"implementing programs in a functional style. After an introduction to the " +"concepts of functional programming, we'll look at language features such as :" +"term:`iterator`\\s and :term:`generator`\\s and relevant library modules " +"such as :mod:`itertools` and :mod:`functools`." +msgstr "" +"Dans ce document, nous allons faire un tour des fonctionnalités de Python " +"adaptées à la réalisation d'un programme dans un style fonctionnel. Après " +"une introduction à la programmation fonctionnelle, nous aborderons des " +"outils tels que les :term:`iterator`\\s et les :term:`generator`\\s ainsi " +"que les modules :mod:`itertools` et :mod:`functools`." + +#: howto/functional.rst:16 +msgid "Introduction" +msgstr "Introduction" + +#: howto/functional.rst:18 +msgid "" +"This section explains the basic concept of functional programming; if you're " +"just interested in learning about Python language features, skip to the next " +"section on :ref:`functional-howto-iterators`." +msgstr "" +"Cette section détaille les fondamentaux de la programmation fonctionnelle. " +"Si seules les fonctionnalités de Python vous intéressent, vous pouvez sauter " +"cette partie et lire la section suivante sur les :ref:`functional-howto-" +"iterators`." + +#: howto/functional.rst:22 +msgid "" +"Programming languages support decomposing problems in several different ways:" +msgstr "" +"Les langages de programmation permettent de traiter des problèmes selon " +"différentes approches :" + +# Énumération +#: howto/functional.rst:24 +msgid "" +"Most programming languages are **procedural**: programs are lists of " +"instructions that tell the computer what to do with the program's input. C, " +"Pascal, and even Unix shells are procedural languages." +msgstr "" +"la plupart des langages de programmation suivent une logique " +"**procédurale** : les programmes sont constitués de listes d'instructions " +"qui détaillent les opérations que l'ordinateur doit appliquer aux entrées du " +"programme. C, Pascal ou encore les interpréteurs de commandes Unix sont des " +"langages procéduraux ;" + +# Énumération +#: howto/functional.rst:28 +msgid "" +"In **declarative** languages, you write a specification that describes the " +"problem to be solved, and the language implementation figures out how to " +"perform the computation efficiently. SQL is the declarative language you're " +"most likely to be familiar with; a SQL query describes the data set you want " +"to retrieve, and the SQL engine decides whether to scan tables or use " +"indexes, which subclauses should be performed first, etc." +msgstr "" +"les langages **déclaratifs** permettent d'écrire la spécification du " +"problème et laissent l'implémentation du langage trouver une façon efficace " +"de réaliser les calculs nécessaires à sa résolution. SQL est un langage " +"déclaratif que vous êtes susceptible de connaître ; une requête SQL décrit " +"le jeu de données que vous souhaitez récupérer et le moteur SQL choisit de " +"parcourir les tables ou d'utiliser les index, l'ordre de résolution des sous-" +"clauses, etc. ;" + +# Énumération +#: howto/functional.rst:35 +msgid "" +"**Object-oriented** programs manipulate collections of objects. Objects " +"have internal state and support methods that query or modify this internal " +"state in some way. Smalltalk and Java are object-oriented languages. C++ " +"and Python are languages that support object-oriented programming, but don't " +"force the use of object-oriented features." +msgstr "" +"les programmes **orientés objet** manipulent des ensembles d'objets. Ceux-ci " +"possèdent un état interne et des méthodes qui interrogent ou modifient cet " +"état d'une façon ou d'une autre. Smalltalk et Java sont deux langages " +"orientés objet. C++ et Python gèrent la programmation orientée objet mais " +"n'imposent pas l'utilisation de telles fonctionnalités ;" + +# Énumération +#: howto/functional.rst:41 +msgid "" +"**Functional** programming decomposes a problem into a set of functions. " +"Ideally, functions only take inputs and produce outputs, and don't have any " +"internal state that affects the output produced for a given input. Well-" +"known functional languages include the ML family (Standard ML, OCaml, and " +"other variants) and Haskell." +msgstr "" +"la programmation **fonctionnelle** implique de décomposer un problème en un " +"ensemble de fonctions. Dans l'idéal, les fonctions produisent des sorties à " +"partir d'entrées et ne possède pas d'état interne qui soit susceptible de " +"modifier la sortie pour une entrée donnée. Les langages fonctionnels les " +"plus connus sont ceux de la famille ML (Standard ML, OCaml et autres) et " +"Haskell ;" + +#: howto/functional.rst:47 +msgid "" +"The designers of some computer languages choose to emphasize one particular " +"approach to programming. This often makes it difficult to write programs " +"that use a different approach. Other languages are multi-paradigm languages " +"that support several different approaches. Lisp, C++, and Python are multi-" +"paradigm; you can write programs or libraries that are largely procedural, " +"object-oriented, or functional in all of these languages. In a large " +"program, different sections might be written using different approaches; the " +"GUI might be object-oriented while the processing logic is procedural or " +"functional, for example." +msgstr "" +"Les personnes qui conçoivent des langages de programmation peuvent choisir " +"de privilégier une approche par rapport à une autre. Cela complexifie " +"l'écriture de programmes appliquant un paradigme différent de celui " +"considéré. Certains langages sont multi-paradigmes et gère plusieurs " +"approches différentes. Lisp, C++ et Python sont de tels langages ; vous " +"pouvez écrire des programmes ou des bibliothèques dans un style procédural, " +"orienté objet ou fonctionnel dans chacun d'entre eux. Différentes parties " +"d'une application peuvent être écrites selon des approches différentes ; par " +"exemple, l'interface graphique peut suivre le paradigme orienté objet tandis " +"que la logique de traitement est procédurale ou fonctionnelle." + +#: howto/functional.rst:58 +msgid "" +"In a functional program, input flows through a set of functions. Each " +"function operates on its input and produces some output. Functional style " +"discourages functions with side effects that modify internal state or make " +"other changes that aren't visible in the function's return value. Functions " +"that have no side effects at all are called **purely functional**. Avoiding " +"side effects means not using data structures that get updated as a program " +"runs; every function's output must only depend on its input." +msgstr "" +"Dans un programme fonctionnel, l'entrée traverse un ensemble de fonctions. " +"Chaque fonction opère sur son entrée et produit une sortie. Le style " +"fonctionnel préconise de ne pas écrire de fonctions ayant des effets de " +"bord, c'est-à-dire qui modifient un état interne ou réalisent d'autres " +"changements qui ne sont pas visibles dans la valeur de sortie de la " +"fonction. Les fonctions qui ne présentent aucun effet de bord sont dites " +"**purement fonctionnelles**. L'interdiction des effets de bord signifie " +"qu'aucune structure de données n'est mise à jour lors de l'exécution du " +"programme ; chaque sortie d'une fonction ne dépend que de son entrée." + +#: howto/functional.rst:66 +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, 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. 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: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 " +"functional-appearing interface but will use non-functional features " +"internally. For example, the implementation of a function will still use " +"assignments to local variables, but won't modify global variables or have " +"other side effects." +msgstr "" +"Les programmes Python écrits dans un style fonctionnel ne poussent " +"généralement pas le curseur de la pureté à l'extrême en interdisant toute " +"entrée-sortie ou les assignations ; ils exhibent une interface fonctionnelle " +"en apparence mais utilisent des fonctionnalités impures en interne. Par " +"exemple, l'implémentation d'une fonction peut assigner dans des variables " +"locales mais ne modifiera pas de variable globale et n'aura pas d'autre " +"effet de bord." + +#: howto/functional.rst:79 +msgid "" +"Functional programming can be considered the opposite of object-oriented " +"programming. Objects are little capsules containing some internal state " +"along with a collection of method calls that let you modify this state, and " +"programs consist of making the right set of state changes. Functional " +"programming wants to avoid state changes as much as possible and works with " +"data flowing between functions. In Python you might combine the two " +"approaches by writing functions that take and return instances representing " +"objects in your application (e-mail messages, transactions, etc.)." +msgstr "" +"La programmation fonctionnelle peut être considérée comme l'opposé de la " +"programmation orientée objet. Les objets encapsulent un état interne ainsi " +"qu'une collection de méthodes qui permettent de modifier cet état. Les " +"programmes consistent à appliquer les bons changements à ces états. La " +"programmation fonctionnelle vous impose d'éviter au maximum ces changements " +"d'états en travaillant sur des données qui traversent un flux de fonctions. " +"En Python, vous pouvez combiner ces deux approches en écrivant des fonctions " +"qui prennent en argument et renvoient des instances représentants des objets " +"de votre application (courriers électroniques, transactions, etc.)." + +#: 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 " +"advantages to the functional style:" +msgstr "" +"Programmer sous la contrainte du paradigme fonctionnel peut sembler étrange. " +"Pourquoi vouloir éviter les objets et les effets de bord ? Il existe des " +"avantages théoriques et pratiques au style fonctionnel :" + +# Énumération +#: howto/functional.rst:92 +msgid "Formal provability." +msgstr "preuves formelles ;" + +# Énumération +#: howto/functional.rst:93 +msgid "Modularity." +msgstr "modularité ;" + +# Énumération +#: howto/functional.rst:94 +msgid "Composability." +msgstr "composabilité ;" + +# Énumération +#: howto/functional.rst:95 +msgid "Ease of debugging and testing." +msgstr "facilité de débogage et de test." + +#: howto/functional.rst:99 +msgid "Formal provability" +msgstr "Preuves formelles" + +#: howto/functional.rst:101 +msgid "" +"A theoretical benefit is that it's easier to construct a mathematical proof " +"that a functional program is correct." +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:104 +msgid "" +"For a long time researchers have been interested in finding ways to " +"mathematically prove programs correct. This is different from testing a " +"program on numerous inputs and concluding that its output is usually " +"correct, or reading a program's source code and concluding that the code " +"looks right; the goal is instead a rigorous proof that a program produces " +"the right result for all possible inputs." +msgstr "" +"Les chercheurs ont longtemps souhaité trouver des façons de prouver " +"mathématiquement qu'un programme est correct. Cela ne se borne pas à tester " +"si la sortie d'un programme est correcte sur de nombreuses entrées ou lire " +"le code source et en conclure que le celui-ci semble juste. L'objectif est " +"d'établir une preuve rigoureuse que le programme produit le bon résultat " +"pour toutes les entrées possibles." + +#: 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 " +"that are always true. For each line of code, you then show that if " +"invariants X and Y are true **before** the line is executed, the slightly " +"different invariants X' and Y' are true **after** the line is executed. " +"This continues until you reach the end of the program, at which point the " +"invariants should match the desired conditions on the program's output." +msgstr "" +"La technique utilisée pour prouver l'exactitude d'un programme est d'écrire " +"des **invariants**, c'est-à-dire des propriétés de l'entrée et des variables " +"du programme qui sont toujours vérifiées. Pour chaque ligne de code, il " +"suffit de montrer que si les invariants X et Y sont vrais **avant** " +"l'exécution de cette ligne, les invariants légèrement modifiés X' et Y' sont " +"vérifiés **après** son exécution. Ceci se répète jusqu'à atteindre la fin du " +"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:119 +msgid "" +"Functional programming's avoidance of assignments arose because assignments " +"are difficult to handle with this technique; assignments can break " +"invariants that were true before the assignment without producing any new " +"invariants that can be propagated onward." +msgstr "" +"L'aversion du style fonctionnel envers les assignations de variable est " +"apparue car celles-ci sont difficiles à gérer avec cette méthode. Les " +"assignations peuvent rompre des invariants qui étaient vrais auparavant sans " +"pour autant produire de nouveaux invariants qui pourraient être propagés." + +#: 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 " +"several pages long; the proof of correctness for a moderately complicated " +"program would be enormous, and few or none of the programs you use daily " +"(the Python interpreter, your XML parser, your web browser) could be proven " +"correct. Even if you wrote down or generated a proof, there would then be " +"the question of verifying the proof; maybe there's an error in it, and you " +"wrongly believe you've proved the program correct." +msgstr "" +"Malheureusement, prouver l'exactitude d'un programme est très peu commode et " +"ne concerne que rarement des logiciels en Python. Même des programmes " +"triviaux nécessitent souvent des preuves s'étalant sur plusieurs pages ; la " +"preuve de l'exactitude d'un programme relativement gros serait gigantesque. " +"Peu, voire aucun, des programmes que vous utilisez quotidiennement " +"(l'interpréteur Python, votre analyseur syntaxique XML, votre navigateur " +"web) ne peuvent être prouvés exacts. Même si vous écriviez ou généreriez une " +"preuve, il faudrait encore vérifier celle-ci. Peut-être qu'elle contient une " +"erreur et que vous pensez désormais, à tort, que vous avez prouvé que votre " +"programme est correct." + +#: howto/functional.rst:135 +msgid "Modularity" +msgstr "Modularité" + +#: 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 " +"result. It's easier to specify and write a small function that does one " +"thing than a large function that performs a complicated transformation. " +"Small functions are also easier to read and to check for errors." +msgstr "" +"Un intérêt plus pratique de la programmation fonctionnelle est qu'elle " +"impose de décomposer le problème en petits morceaux. Les programmes qui en " +"résultent sont souvent plus modulaires. Il est plus simple de spécifier et " +"d'écrire une petite fonction qui ne fait qu'une seule tâche plutôt qu'une " +"grosse fonction qui réalise une transformation complexe. Les petites " +"fonctions sont plus faciles à lire et à vérifier." + +#: howto/functional.rst:145 +msgid "Ease of debugging and testing" +msgstr "Facilité de débogage et de test" + +#: 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: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 " +"where you can check that the data are correct. You can look at the " +"intermediate inputs and outputs to quickly isolate the function that's " +"responsible for a bug." +msgstr "" +"Déboguer est plus simple car les fonctions sont généralement petites et bien " +"spécifiées. Lorsqu'un programme ne fonctionne pas, chaque fonction constitue " +"une étape intermédiaire au niveau de laquelle vous pouvez vérifier que les " +"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: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 " +"before running a test; instead you only have to synthesize the right input " +"and then check that the output matches expectations." +msgstr "" +"Les tests sont plus faciles car chaque fonction est désormais un sujet " +"potentiel pour un test unitaire. Les fonctions ne dépendent pas d'un état " +"particulier du système qui devrait être répliqué avant d'exécuter un test ; " +"à 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:161 +msgid "Composability" +msgstr "Composabilité" + +#: 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 " +"unavoidably specialized to a particular application, but others will be " +"useful in a wide variety of programs. For example, a function that takes a " +"directory path and returns all the XML files in the directory, or a function " +"that takes a filename and returns its contents, can be applied to many " +"different situations." +msgstr "" +"En travaillant sur un programme dans le style fonctionnel, vous écrivez un " +"certain nombre de fonctions avec des entrées et des sorties variables. " +"Certaines de ces fonctions sont inévitablement spécifiques à une application " +"en particulier, mais d'autres peuvent s'appliquer à de nombreux cas d'usage. " +"Par exemple, une fonction qui liste l'ensemble des fichiers XML d'un " +"répertoire à partir du chemin de celui-ci ou une fonction qui renvoie le " +"contenu d'un fichier à partir de son nom peuvent être utiles dans de " +"nombreuses situations." + +#: 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 " +"and writing a few functions specialized for the current task." +msgstr "" +"Au fur et à mesure, vous constituez ainsi une bibliothèque personnelle " +"d'utilitaires. Souvent, vous pourrez construire de nouveaux programmes en " +"agençant des fonctions existantes dans une nouvelle configuration et en " +"écrivant quelques fonctions spécifiques à votre objectif en cours." + +#: howto/functional.rst:178 +msgid "Iterators" +msgstr "Itérateurs" + +#: 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." +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: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 " +"called :meth:`~iterator.__next__` that takes no arguments and always returns " +"the next element of the stream. If there are no more elements in the " +"stream, :meth:`~iterator.__next__` must raise the :exc:`StopIteration` " +"exception. Iterators don't have to be finite, though; it's perfectly " +"reasonable to write an iterator that produces an infinite stream of data." +msgstr "" +"Un itérateur est un objet qui représente un flux de données ; cet objet " +"renvoie les données un élément à la fois. Un itérateur Python doit posséder " +"une méthode :meth:`~iterator.__next__` qui ne prend pas d'argument et " +"renvoie toujours l'élément suivant du flux. S'il n'y plus d'élément dans le " +"flux, :meth:`~iterator.__next__` doit lever une exception :exc:" +"`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: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, " +"raising :exc:`TypeError` if the object doesn't support iteration. Several " +"of Python's built-in data types support iteration, the most common being " +"lists and dictionaries. An object is called :term:`iterable` if you can get " +"an iterator for it." +msgstr "" +"La fonction native :func:`iter` prend un objet arbitraire et tente de " +"construire un itérateur qui renvoie le contenu de l'objet (ou ses éléments) " +"en levant une exception :exc:`TypeError` si l'objet ne gère pas l'itération. " +"Plusieurs types de données natifs à Python gèrent l'itération, notamment les " +"listes et les dictionnaires. On appelle :term:`iterable` un objet pour " +"lequel il est possible de construire un itérateur." + +#: 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:216 +msgid "" +"Python expects iterable objects in several different contexts, the most " +"important being the :keyword:`for` statement. In the statement ``for X in " +"Y``, Y must be an iterator or some object for which :func:`iter` can create " +"an iterator. These two statements are equivalent::" +msgstr "" +"Python s'attend à travailler sur des objets itérables dans divers contextes " +"et tout particulièrement dans une boucle :keyword:`for`. Dans l'expression " +"``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:228 +msgid "" +"Iterators can be materialized as lists or tuples by using the :func:`list` " +"or :func:`tuple` constructor functions:" +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:237 +msgid "" +"Sequence unpacking also supports iterators: if you know an iterator will " +"return N elements, you can unpack them into an N-tuple:" +msgstr "" +"Le dépaquetage de séquences fonctionne également sur les itérateurs : si " +"vous savez qu'un itérateur renvoie N éléments, vous pouvez les dépaqueter " +"dans un *n*-uplet :" + +#: 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`` 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 " +"stream, the ``\"in\"`` and ``\"not in\"`` operators won't return either." +msgstr "" +"Certaines fonctions natives telles que :func:`max` et :func:`min` prennent " +"un itérateur en argument et en renvoie le plus grand ou le plus petit " +"élément. Les opérateurs ``\"in\"`` et ``\"not in\"`` gèrent également les " +"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." + +#: 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 " +"objects can optionally provide these additional capabilities, but the " +"iterator protocol only specifies the :meth:`~iterator.__next__` method. " +"Functions may therefore consume all of the iterator's output, and if you " +"need to do something different with the same stream, you'll have to create a " +"new iterator." +msgstr "" +"Notez qu'il n'est possible de parcourir un itérateur que vers l'avant et " +"qu'il est impossible de récupérer l'élément précédent, de réinitialiser " +"l'itérateur ou d'en créer une copie. Des objets itérateurs peuvent offrir " +"ces possibilités de façon facultative, mais le protocole d'itération ne " +"spécifie que la méthode :meth:`~iterator.__next__`. Certaines fonctions " +"peuvent ainsi consommer l'entièreté de la sortie d'un itérateur et, si vous " +"devez utiliser le même flux pour autre chose, vous devrez en créer un " +"nouveau." + +#: howto/functional.rst:264 +msgid "Data Types That Support Iterators" +msgstr "Types de données itérables" + +#: 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 " +"of an iterator." +msgstr "" +"Nous avons vu précédemment comment les listes et les *n*-uplets gèrent les " +"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:270 +msgid "" +"Calling :func:`iter` on a dictionary returns an iterator that will loop over " +"the dictionary's keys::" +msgstr "" +"Appeler :func:`iter` sur un dictionnaire renvoie un itérateur qui parcourt " +"l'ensemble de ses clés ::" + +#: 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 " +"was unspecified and could vary between implementations." +msgstr "" +"Notez qu'à partir de la version 3.7, Python garantit que l'ordre de " +"l'itération sur un dictionnaire est identique à l'ordre d'insertion des " +"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: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 " +"iterate over values or key/value pairs, you can explicitly call the :meth:" +"`~dict.values` or :meth:`~dict.items` methods to get an appropriate iterator." +msgstr "" +"Appliquer :func:`iter` sur un dictionnaire produit un itérateur sur ses clés " +"mais il est possible d'obtenir d'autres itérateurs par d'autres méthodes. Si " +"vous souhaitez itérer sur les valeurs ou les paires clé/valeur du " +"dictionnaire, vous pouvez explicitement appeler les méthodes :meth:`~dict." +"values` ou :meth:`~dict.items` pour obtenir l'itérateur idoine." + +#: howto/functional.rst:300 +msgid "" +"The :func:`dict` constructor can accept an iterator that returns a finite " +"stream of ``(key, value)`` tuples:" +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: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 " +"each line of a file like this::" +msgstr "" +"Les fichiers gèrent aussi l'itération en appelant la méthode :meth:`~io." +"TextIOBase.readline` jusqu'à ce qu'il n'y ait plus d'autre ligne dans le " +"fichier. Cela signifie que vous pouvez lire l'intégralité d'un fichier de la " +"façon suivante ::" + +#: howto/functional.rst:315 +msgid "" +"Sets can take their contents from an iterable and let you iterate over the " +"set's elements::" +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:331 +msgid "Generator expressions and list comprehensions" +msgstr "Expressions génératrices et compréhension de listes" + +#: howto/functional.rst:333 +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 " +"some condition. For example, given a list of strings, you might want to " +"strip off trailing whitespace from each line or extract all the strings " +"containing a given substring." +msgstr "" +"Deux opérations courantes réalisables sur la sortie d'un itérateur sont 1) " +"effectuer une opération pour chaque élément, 2) extraire le sous-ensemble " +"des éléments qui vérifient une certaine condition. Par exemple, pour une " +"liste de chaînes de caractères, vous pouvez choisir de retirer tous les " +"caractères blancs à la fin de chaque ligne ou extraire toutes les chaînes " +"contenant une sous-chaîne précise." + +#: howto/functional.rst:339 +msgid "" +"List comprehensions and generator expressions (short form: \"listcomps\" and " +"\"genexps\") are a concise notation for such operations, borrowed from the " +"functional programming language Haskell (https://www.haskell.org/). You can " +"strip all the whitespace from a stream of strings with the following code::" +msgstr "" +"Les compréhensions de listes et les expressions génératrices sont des façons " +"concises d'exprimer de telles opérations, inspirées du langage de " +"programmation fonctionnel Haskell (https://www.haskell.org/). Vous pouvez " +"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:352 +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:357 +msgid "" +"With a list comprehension, you get back a Python list; ``stripped_list`` is " +"a list containing the resulting lines, not an iterator. Generator " +"expressions return an iterator that computes the values as necessary, not " +"needing to materialize all the values at once. This means that list " +"comprehensions aren't useful if you're working with iterators that return an " +"infinite stream or a very large amount of data. Generator expressions are " +"preferable in these situations." +msgstr "" +"La compréhension de liste renvoie une liste Python ; ``stripped_list`` est " +"une liste contenant les lignes après transformation, pas un itérateur. Les " +"expressions génératrices renvoient un itérateur qui calcule les valeurs au " +"fur et à mesure sans toutes les matérialiser d'un seul coup. Cela signifie " +"que les compréhensions de listes ne sont pas très utiles si vous travaillez " +"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:364 +msgid "" +"Generator expressions are surrounded by parentheses (\"()\") and list " +"comprehensions are surrounded by square brackets (\"[]\"). Generator " +"expressions have the form::" +msgstr "" +"Les expressions génératrices sont écrites entre parenthèses (« () ») et les " +"compréhensions de listes entre crochets (« [] »). Les expressions " +"génératrices sont de la forme ::" + +#: howto/functional.rst:378 +msgid "" +"Again, for a list comprehension only the outside brackets are different " +"(square brackets instead of parentheses)." +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:381 +msgid "" +"The elements of the generated output will be the successive values of " +"``expression``. The ``if`` clauses are all optional; if present, " +"``expression`` is only evaluated and added to the result when ``condition`` " +"is true." +msgstr "" +"Les éléments de la sortie sont les valeurs successives de ``expression``. La " +"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:385 +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 " +"iterator that will be immediately passed to a function you can write::" +msgstr "" +"Les expressions génératrices doivent toujours être écrites entre " +"parenthèses, mais les parenthèses qui encadrent un appel de fonction " +"comptent aussi. Si vous souhaitez créer un itérateur qui soit immédiatement " +"passé à une fonction, vous pouvez écrire ::" + +#: howto/functional.rst:391 +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 " +"from left to right, **not** in parallel. For each element in ``sequence1``, " +"``sequence2`` is looped over from the beginning. ``sequence3`` is then " +"looped over for each resulting pair of elements from ``sequence1`` and " +"``sequence2``." +msgstr "" +"Les clauses ``for ... in`` indiquent les séquences sur lesquelles itérer. " +"Celles-ci peuvent être de longueurs différentes car l'itération est réalisée " +"de gauche à droite et non en parallèle. ``sequence2`` est parcourue " +"entièrement pour chaque élément de ``sequence1``. ``sequence3`` est ensuite " +"parcourue dans son intégralité pour chaque paire d'éléments de ``sequence1`` " +"et ``sequence2``." + +#: howto/functional.rst:397 +msgid "" +"To put it another way, a list comprehension or generator expression is " +"equivalent to the following Python code::" +msgstr "" +"Autrement dit, une compréhension de liste ou une expression génératrice est " +"équivalente au code Python ci-dessous ::" + +#: howto/functional.rst:414 +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 " +"the lengths of all the sequences. If you have two lists of length 3, the " +"output list is 9 elements long:" +msgstr "" +"Ainsi lorsque plusieurs clauses ``for ... in`` sont présentes mais sans " +"condition ``if``, la longueur totale de la nouvelle séquence est égale au " +"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:426 +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 " +"comprehension below is a syntax error, while the second one is correct::" +msgstr "" +"Afin de ne pas créer une ambiguïté dans la grammaire de Python, " +"``expression`` doit être encadrée par des parenthèses si elle produit un n-" +"uplet. La première compréhension de liste ci-dessous n'est pas valide " +"syntaxiquement, tandis que la seconde l'est ::" + +#: howto/functional.rst:437 +msgid "Generators" +msgstr "Générateurs" + +#: howto/functional.rst:439 +msgid "" +"Generators are a special class of functions that simplify the task of " +"writing iterators. Regular functions compute a value and return it, but " +"generators return an iterator that returns a stream of values." +msgstr "" +"Les générateurs forment une classe spéciale de fonctions qui simplifie la " +"création d'itérateurs. Les fonctions habituelles calculent une valeur et la " +"renvoie, tandis que les générateurs renvoient un itérateur qui produit un " +"flux de valeurs." + +#: howto/functional.rst:443 +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 " +"variables are created. When the function reaches a ``return`` statement, " +"the local variables are destroyed and the value is returned to the caller. " +"A later call to the same function creates a new private namespace and a " +"fresh set of local variables. But, what if the local variables weren't " +"thrown away on exiting a function? What if you could later resume the " +"function where it left off? This is what generators provide; they can be " +"thought of as resumable functions." +msgstr "" +"Vous connaissez sans doute le fonctionnement des appels de fonctions en " +"Python ou en C. Lorsqu'une fonction est appelée, un espace de nommage privé " +"lui est associé pour ses variables locales. Lorsque le programme atteint une " +"instruction ``return``, les variables locales sont détruites et la valeur " +"est renvoyée à l'appelant. Les appels postérieurs à la même fonction créent " +"un nouvel espace de nommage privé et de nouvelles variables locales. " +"Cependant, que se passerait-il si les variables locales n'étaient pas " +"détruites lors de la sortie d'une fonction ? Et s'il était possible de " +"reprendre l'exécution de la fonction là où elle s'était arrêtée ? Les " +"générateurs sont une réponse à ces questions ; vous pouvez considérer qu'il " +"s'agit de fonctions qu'il est possible d'interrompre, puis de relancer sans " +"perdre leur progression." + +#: howto/functional.rst:452 +msgid "Here's the simplest example of a generator function:" +msgstr "Voici un exemple simple de fonction génératrice :" + +#: howto/functional.rst:458 +msgid "" +"Any function containing a :keyword:`yield` keyword is a generator function; " +"this is detected by Python's :term:`bytecode` compiler which compiles the " +"function specially as a result." +msgstr "" +"N'importe quelle fonction contenant le mot-clé :keyword:`yield` est un " +"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:462 +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. " +"On executing the ``yield`` expression, the generator outputs the value of " +"``i``, similar to a ``return`` statement. The big difference between " +"``yield`` and a ``return`` statement is that on reaching a ``yield`` the " +"generator's state of execution is suspended and local variables are " +"preserved. On the next call to the generator's :meth:`~generator.__next__` " +"method, the function will resume executing." +msgstr "" +"Lorsque vous appelez une fonction génératrice, celle-ci ne renvoie pas une " +"unique valeur ; elle renvoie un objet générateur qui implémente le protocole " +"d'itération. Lorsque l'expression ``yield`` est exécutée, le générateur " +"renvoie la valeur de ``i``, d'une façon similaire à un ``return``. La " +"différence principale entre ``yield`` et ``return`` est qu'en atteignant " +"l'instruction ``yield``, l'état du générateur est suspendu et les variables " +"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:471 +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:488 +msgid "" +"You could equally write ``for i in generate_ints(5)``, or ``a, b, c = " +"generate_ints(3)``." +msgstr "" +"Vous pourriez de façon équivalente écrire ``for i in generate_ints(5)`` ou " +"``a, b, c = generate_ints(3)``." + +#: howto/functional.rst:491 +msgid "" +"Inside a generator function, ``return value`` causes " +"``StopIteration(value)`` to be raised from the :meth:`~generator.__next__` " +"method. Once this happens, or the bottom of the function is reached, the " +"procession of values ends and the generator cannot yield any further values." +msgstr "" +"Dans une fonction génératrice, une instruction ``return value`` entraîne la " +"levée d'une exception ``StopIteration(value)`` dans la méthode :meth:" +"`~generator.__next__`. Lorsque cela se produit (ou que la fin de la fonction " +"est atteinte), le flot de nouvelles valeurs s'arrête et le générateur ne " +"peut plus rien produire." + +#: howto/functional.rst:496 +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 " +"variables. For example, returning a list of integers could be done by " +"setting ``self.count`` to 0, and having the :meth:`~iterator.__next__` " +"method increment ``self.count`` and return it. However, for a moderately " +"complicated generator, writing a corresponding class can be much messier." +msgstr "" +"Vous pouvez obtenir le même comportement que celui des générateurs en " +"écrivant votre propre classe qui stocke les variables locales du générateur " +"comme variables d'instance. Pour renvoyer une liste d'entiers, par exemple, " +"vous pouvez initialiser ``self.count`` à 0 et écrire la méthode :meth:" +"`~iterator.__next__` de telle sorte qu'elle incrémente ``self.count`` puis " +"le renvoie. Cependant, cela devient beaucoup plus complexe pour des " +"générateurs relativement sophistiqués." + +#: howto/functional.rst:504 +msgid "" +"The test suite included with Python's library, :source:`Lib/test/" +"test_generators.py`, contains a number of more interesting examples. Here's " +"one generator that implements an in-order traversal of a tree using " +"generators recursively. ::" +msgstr "" +":source:`Lib/test/test_generators.py`, la suite de test de la bibliothèque " +"Python, contient de nombreux exemples intéressants. Voici un générateur qui " +"implémente le parcours d'un arbre dans l'ordre en utilisant des générateurs " +"de façon récursive. ::" + +#: howto/functional.rst:520 +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 " +"threatens another) and the Knight's Tour (finding a route that takes a " +"knight to every square of an NxN chessboard without visiting any square " +"twice)." +msgstr "" +"Deux autres exemples de ``test_generators.py`` permettent de résoudre le " +"problème des N Reines (placer *N* reines sur un échiquier de dimensions " +"*NxN* de telle sorte qu'aucune reine ne soit en position d'en prendre une " +"autre) et le problème du cavalier (trouver un chemin permettant au cavalier " +"de visiter toutes les cases d'un échiquier *NxN* sans jamais visiter la même " +"case deux fois)." + +#: howto/functional.rst:528 +msgid "Passing values into a generator" +msgstr "Transmettre des valeurs au générateur" + +#: howto/functional.rst:530 +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 " +"any new information into the function when its execution is resumed. You " +"could hack together this ability by making the generator look at a global " +"variable or by passing in some mutable object that callers then modify, but " +"these approaches are messy." +msgstr "" +"Avant Python 2.5, les générateurs ne pouvaient que produire des sorties. Une " +"fois le code du générateur exécuté pour créer un itérateur, il était " +"impossible d'introduire de l'information nouvelle dans la fonction mise en " +"pause. Une astuce consistait à obtenir cette fonctionnalité en autorisant le " +"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:537 +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 " +"variable or otherwise operated on::" +msgstr "" +"À partir de Python 2.5, il existe une méthode simple pour transmettre des " +"valeurs à un générateur. Le mot-clé :keyword:`yield` est devenu une " +"expression qui renvoie une valeur sur laquelle il est possible d'opérer et " +"que vous pouvez assigner à une variable ::" + +#: howto/functional.rst:543 +msgid "" +"I recommend that you **always** put parentheses around a ``yield`` " +"expression when you're doing something with the returned value, as in the " +"above example. The parentheses aren't always necessary, but it's easier to " +"always add them instead of having to remember when they're needed." +msgstr "" +"Comme dans l'exemple ci-dessus, nous vous recommandons de **toujours** " +"encadrer les expressions ``yield`` par des parenthèses lorsque vous utilisez " +"leur valeur de retour. Elles ne sont pas toujours indispensables mais mieux " +"vaut prévenir que guérir : il est plus facile de les ajouter " +"systématiquement que de prendre le risque de les oublier là où elles sont " +"requises." + +#: howto/functional.rst:548 +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 " +"expression on the right-hand side of an assignment. This means you can " +"write ``val = yield i`` but have to use parentheses when there's an " +"operation, as in ``val = (yield i) + 12``.)" +msgstr "" +"(Les règles exactes de parenthésage sont spécifies dans la :pep:`342` : une " +"expression ``yield`` doit toujours être parenthésée sauf s'il s'agit de " +"l'expression la plus externe du côté droit d'une assignation. Cela signifie " +"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:554 +msgid "" +"Values are sent into a generator by calling its :meth:`send(value) " +"` method. This method resumes the generator's code and the " +"``yield`` expression returns the specified value. If the regular :meth:" +"`~generator.__next__` method is called, the ``yield`` returns ``None``." +msgstr "" +"Des valeurs peuvent être transmises à un générateur en appelant sa méthode :" +"meth:`send(value) `. Celle-ci reprend l'exécution du " +"générateur et l'expression ``yield`` renvoie la valeur spécifiée. Si c'est " +"la méthode :meth:`~generator.__next__` habituelle qui est appelée, alors " +"``yield`` renvoie ``None``." + +#: howto/functional.rst:559 +msgid "" +"Here's a simple counter that increments by 1 and allows changing the value " +"of the internal counter." +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:574 +msgid "And here's an example of changing the counter:" +msgstr "Et voici comment il est possible de modifier le compteur :" + +#: howto/functional.rst:591 +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 " +"that the :meth:`~generator.send` method will be the only method used to " +"resume your generator function." +msgstr "" +"Puisque ``yield`` renvoie souvent ``None``, vous devez toujours vérifier si " +"c'est le cas. N'utilisez pas la valeur de retour à moins d'être certain que " +"seule la méthode :meth:`~generator.send` sera utilisée pour reprendre " +"l'exécution de la fonction génératrice." + +#: howto/functional.rst:596 +msgid "" +"In addition to :meth:`~generator.send`, there are two other methods on " +"generators:" +msgstr "" +"En plus de :meth:`~generator.send`, il existe deux autres méthodes " +"s'appliquant aux générateurs :" + +# Énumération +#: howto/functional.rst:599 +msgid "" +":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(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:603 +msgid "" +":meth:`~generator.close` raises a :exc:`GeneratorExit` exception inside the " +"generator to terminate the iteration. On receiving this exception, the " +"generator's code must either raise :exc:`GeneratorExit` or :exc:" +"`StopIteration`; catching the exception and doing anything else is illegal " +"and will trigger a :exc:`RuntimeError`. :meth:`~generator.close` will also " +"be called by Python's garbage collector when the generator is garbage-" +"collected." +msgstr "" +":meth:`~generator.close` lève une exception :exc:`GeneratorExit` dans le " +"générateur afin de terminer l'itération. Le code du générateur qui reçoit " +"cette exception doit lever à son tour :exc:`GeneratorExit` ou :exc:" +"`StopIteration`. Il est illégal d'attraper cette exception et de faire quoi " +"que ce soit d'autre, ceci déclenche une erreur :exc:`RuntimeError`. Lorsque " +"le ramasse-miette de Python collecte le générateur, il appelle sa méthode :" +"meth:`~generator.close`." + +#: howto/functional.rst:611 +msgid "" +"If you need to run cleanup code when a :exc:`GeneratorExit` occurs, I " +"suggest using a ``try: ... finally:`` suite instead of catching :exc:" +"`GeneratorExit`." +msgstr "" +"Si vous devez exécuter du code pour faire le ménage lors d'une :exc:" +"`GeneratorExit`, nous vous suggérons d'utiliser une structure ``try: ... " +"finally`` plutôt que d'attraper :exc:`GeneratorExit`." + +#: howto/functional.rst:614 +msgid "" +"The cumulative effect of these changes is to turn generators from one-way " +"producers of information into both producers and consumers." +msgstr "" +"Ces changements cumulés transforment les générateurs de producteurs " +"unidirectionnels d'information vers un statut hybride à la fois producteur " +"et consommateur." + +#: howto/functional.rst:617 +msgid "" +"Generators also become **coroutines**, a more generalized form of " +"subroutines. Subroutines are entered at one point and exited at another " +"point (the top of the function, and a ``return`` statement), but coroutines " +"can be entered, exited, and resumed at many different points (the ``yield`` " +"statements)." +msgstr "" +"Les générateurs sont également devenus des **coroutines**, une forme " +"généralisée de sous-routine. L'exécution des sous-routines démarre à un " +"endroit et se termine à un autre (au début de la fonction et au niveau de " +"l'instruction ``return``), tandis qu'il est possible d'entrer, de sortir ou " +"de reprendre une coroutine à différents endroits (les instructions " +"``yield``)." + +#: howto/functional.rst:624 +msgid "Built-in functions" +msgstr "Fonctions natives" + +#: howto/functional.rst:626 +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:628 +msgid "" +"Two of Python's built-in functions, :func:`map` and :func:`filter` duplicate " +"the features of generator expressions:" +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:640 +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:632 +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:642 +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:644 +msgid "" +":func:`filter(predicate, iter) ` returns an iterator over all the " +"sequence elements that meet a certain condition, and is similarly duplicated " +"by list comprehensions. A **predicate** is a function that returns the " +"truth value of some condition; for use with :func:`filter`, the predicate " +"must take a single value." +msgstr "" +":func:`filter(predicate, iter) ` renvoie un itérateur sur l'ensemble " +"des éléments de la séquence qui vérifient une certaine condition. Son " +"comportement peut également être reproduit par une compréhension de liste. " +"Un **prédicat** est une fonction qui renvoie vrai ou faux en fonction d'une " +"certaine condition. Dans le cas de :func:`filter`, le prédicat ne doit " +"prendre qu'un seul argument." + +#: howto/functional.rst:657 +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:663 +msgid "" +":func:`enumerate(iter, start=0) ` counts off the elements in the " +"iterable returning 2-tuples containing the count (from *start*) and each " +"element. ::" +msgstr "" +":func:`enumerate(iter, start=0) ` énumère les éléments de " +"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:673 +msgid "" +":func:`enumerate` is often used when looping through a list and recording " +"the indexes at which certain conditions are met::" +msgstr "" +":func:`enumerate` est souvent utilisée lorsque l'on souhaite boucler sur une " +"liste tout en listant les indices pour lesquels une certaine condition est " +"vérifiée ::" + +#: howto/functional.rst:681 +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 " +"result. The *key* and *reverse* arguments are passed through to the " +"constructed list's :meth:`~list.sort` method. ::" +msgstr "" +":func:`sorted(iterable, key=None, reverse=False) ` rassemble tous " +"les éléments de l'itérable dans une liste, les classe et renvoie le résultat " +"classé. Les arguments *key* et *reverse* sont passés à la méthode :meth:" +"`~list.sort` de la liste ainsi construite. ::" + +#: howto/functional.rst:696 +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:699 +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 " +"any element in the iterable is a true value, and :func:`all` returns " +"``True`` if all of the elements are true values:" +msgstr "" +"Les fonctions natives :func:`any(iter) ` et :func:`all(iter) ` " +"permettent d'observer les valeurs de vérité des éléments d'un itérable. :" +"func:`any` renvoie ``True`` si au moins un élément de l'itérable s'évalue " +"comme vrai et :func:`all` renvoie ``True`` si tous les éléments s'évaluent " +"comme vrai :" + +#: howto/functional.rst:718 +msgid "" +":func:`zip(iterA, iterB, ...) ` takes one element from each iterable " +"and returns them in a tuple::" +msgstr "" +":func:`zip(iterA, iterB, ...) ` rassemble un élément de chaque itérable " +"dans un *n*-uplet ::" + +#: howto/functional.rst:724 +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 " +"they're requested. (The technical term for this behaviour is `lazy " +"evaluation `__.)" +msgstr "" +"Cela ne construit pas de liste stockée en mémoire, ni ne vide les itérateurs " +"d'entrée avant de renvoyer sa valeur ; en réalité les *n*-uplets sont " +"construits et renvoyés au fur et à mesure (il s'agit techniquement parlant " +"d'un comportement d'`évaluation paresseuse `__)." + +#: howto/functional.rst:729 +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 " +"will be the same length as the shortest iterable. ::" +msgstr "" +"Cet itérateur suppose qu'il opère sur des itérables de même longueur. Si la " +"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:736 +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 " +"iterators further because you risk skipping a discarded element." +msgstr "" +"Toutefois, vous devez éviter de dépendre de ce comportement. En effet un " +"élément d'un des itérables les plus longs peut être retiré puis jeté (car " +"l'autre itérable est trop court). Cela signifie que vous ne pouvez alors " +"plus utiliser cet itérable car vous allez sauter l'élément qui vient d'être " +"jeté." + +#: howto/functional.rst:742 +msgid "The itertools module" +msgstr "Le module *itertools*" + +#: howto/functional.rst:744 +#, fuzzy +msgid "" +"The :mod:`itertools` module contains a number of commonly used iterators as " +"well as functions for combining several iterators. This section will " +"introduce the module's contents by showing small examples." +msgstr "" +"Le module :mod:`itertools` contient de nombreux itérateurs très utilisés, " +"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:748 +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:750 +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:751 +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:752 +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:753 +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:756 +msgid "Creating new iterators" +msgstr "Créer de nouveaux itérateurs" + +#: howto/functional.rst:758 +msgid "" +":func:`itertools.count(start, step) ` returns an infinite " +"stream of evenly spaced values. You can optionally supply the starting " +"number, which defaults to 0, and the interval between numbers, which " +"defaults to 1::" +msgstr "" +":func:`itertools.count(start, step) ` renvoie un flux " +"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:769 +msgid "" +":func:`itertools.cycle(iter) ` saves a copy of the contents " +"of a provided iterable and returns a new iterator that returns its elements " +"from first to last. The new iterator will repeat these elements " +"infinitely. ::" +msgstr "" +":func:`itertools.cycle(iter) ` sauvegarde une copie du " +"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:776 +msgid "" +":func:`itertools.repeat(elem, [n]) ` returns the provided " +"element *n* times, or returns the element endlessly if *n* is not " +"provided. ::" +msgstr "" +":func:`itertools.repeat(elem, [n]) ` renvoie l'élément " +"passé en argument *n* fois ou répète l'élément à l'infini si *n* n'est pas " +"spécifié. ::" + +#: howto/functional.rst:784 +msgid "" +":func:`itertools.chain(iterA, iterB, ...) ` takes an " +"arbitrary number of iterables as input, and returns all the elements of the " +"first iterator, then all the elements of the second, and so on, until all of " +"the iterables have been exhausted. ::" +msgstr "" +":func:`itertools.chain(iterA, iterB, ...) ` reçoit un " +"nombre arbitraire d'itérables en entrée et les concatène, renvoyant tous les " +"é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:792 +msgid "" +":func:`itertools.islice(iter, [start], stop, [step]) ` " +"returns a stream that's a slice of the iterator. With a single *stop* " +"argument, it will return the first *stop* elements. If you supply a " +"starting index, you'll get *stop-start* elements, and if you supply a value " +"for *step*, elements will be skipped accordingly. Unlike Python's string " +"and list slicing, you can't use negative values for *start*, *stop*, or " +"*step*. ::" +msgstr "" +":func:`itertools.islice(iter, [start], stop, [step]) ` " +"renvoie une portion de l'itérateur. En passant seulement l'argument *stop*, " +"il renvoie les *stop* premiers éléments. En spécifiant un indice de début, " +"vous récupérez *stop - start* éléments ; utilisez *step* pour spécifier une " +"valeur de pas. Cependant vous ne pouvez pas utiliser de valeurs négatives " +"pour *start*, *stop* ou *step* (contrairement aux listes et chaînes de " +"caractères de Python). ::" + +#: howto/functional.rst:806 +msgid "" +":func:`itertools.tee(iter, [n]) ` replicates an iterator; it " +"returns *n* independent iterators that will all return the contents of the " +"source iterator. If you don't supply a value for *n*, the default is 2. " +"Replicating iterators requires saving some of the contents of the source " +"iterator, so this can consume significant memory if the iterator is large " +"and one of the new iterators is consumed more than the others. ::" +msgstr "" +":func:`itertools.tee(iter, [n]) ` duplique un itérateur et " +"renvoie *n* itérateurs indépendants, chacun copiant le contenu de " +"l'itérateur source. La valeur par défaut pour *n* est 2. La réplication des " +"itérateurs nécessite la sauvegarde d'une partie du contenu de l'itérateur " +"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:825 +msgid "Calling functions on elements" +msgstr "Appliquer des fonctions au contenu des itérateurs" + +#: howto/functional.rst:827 +msgid "" +"The :mod:`operator` module contains a set of functions corresponding to " +"Python's operators. Some examples are :func:`operator.add(a, b) ` (adds two values), :func:`operator.ne(a, b) ` (same as " +"``a != b``), and :func:`operator.attrgetter('id') ` " +"(returns a callable that fetches the ``.id`` attribute)." +msgstr "" +"Le module :mod:`operator` rassemble des fonctions équivalentes aux " +"opérateurs Python. Par exemple, :func:`operator.add(a,b) ` " +"additionne deux valeurs, :func:`operator.ne(a, b) ` est " +"équivalent à ``a != b`` et :func:`operator.attrgetter('id') ` renvoie un objet appelable qui récupère l'attribut ``.id``." + +#: howto/functional.rst:833 +msgid "" +":func:`itertools.starmap(func, iter) ` assumes that the " +"iterable will return a stream of tuples, and calls *func* using these tuples " +"as the arguments::" +msgstr "" +":func:`itertools.starmap(func, iter) ` suppose que " +"l'itérable renvoie une séquence de *n*-uplets et appelle *func* en utilisant " +"tous les *n*-uplets comme arguments ::" + +#: howto/functional.rst:845 +msgid "Selecting elements" +msgstr "Sélectionner des éléments" + +#: howto/functional.rst:847 +msgid "" +"Another group of functions chooses a subset of an iterator's elements based " +"on a predicate." +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:850 +msgid "" +":func:`itertools.filterfalse(predicate, iter) ` is " +"the opposite of :func:`filter`, returning all elements for which the " +"predicate returns false::" +msgstr "" +":func:`itertools.filterfalse(predicate, iter) ` est " +"l'opposé de :func:`filter` et renvoie tous les éléments pour lesquels le " +"prédicat est faux ::" + +#: howto/functional.rst:857 +msgid "" +":func:`itertools.takewhile(predicate, iter) ` returns " +"elements for as long as the predicate returns true. Once the predicate " +"returns false, the iterator will signal the end of its results. ::" +msgstr "" +":func:`itertools.takewhile(predicate, iter) ` renvoie " +"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:870 +msgid "" +":func:`itertools.dropwhile(predicate, iter) ` discards " +"elements while the predicate returns true, and then returns the rest of the " +"iterable's results. ::" +msgstr "" +":func:`itertools.dropwhile(predicate, iter) ` supprime " +"des éléments tant que le prédicat renvoie vrai puis renvoie le reste des " +"éléments de l'itérable. ::" + +#: howto/functional.rst:880 +msgid "" +":func:`itertools.compress(data, selectors) ` takes two " +"iterators and returns only those elements of *data* for which the " +"corresponding element of *selectors* is true, stopping whenever either one " +"is exhausted::" +msgstr "" +":func:`itertools.compress(data, selectors) ` prend un " +"itérateur *data* et un itérateur *selectors* et renvoie les éléments de " +"*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:889 +msgid "Combinatoric functions" +msgstr "Fonctions combinatoires" + +#: howto/functional.rst:891 +msgid "" +"The :func:`itertools.combinations(iterable, r) ` " +"returns an iterator giving all possible *r*-tuple combinations of the " +"elements contained in *iterable*. ::" +msgstr "" +":func:`itertools.combinations(iterable, r) ` renvoie " +"un itérateur qui produit toutes les combinaisons possibles de *r*-uplets des " +"éléments de *iterable*. ::" + +#: howto/functional.rst:906 +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 " +"the examples above. A similar function, :func:`itertools." +"permutations(iterable, r=None) `, removes this " +"constraint on the order, returning all possible arrangements of length *r*::" +msgstr "" +"Les éléments de chaque *n*-uplet sont ordonnés dans le même ordre que leur " +"apparition dans *iterable*. Ainsi, dans les exemples ci-dessus, le nombre 1 " +"se trouve toujours avant 2, 3, 4 ou 5. La fonction :func:`itertools." +"permutations(iterable, r=None) ` supprime la " +"contrainte sur l'ordre et renvoie tous les arrangements possibles de " +"longueur *r* ::" + +#: howto/functional.rst:925 +msgid "" +"If you don't supply a value for *r* the length of the iterable is used, " +"meaning that all the elements are permuted." +msgstr "" +"Si vous ne spécifiez pas de valeur pour *r*, la longueur de l'itérable est " +"utilisée par défaut, c'est-à-dire que toutes les permutations de la séquence " +"sont renvoyées." + +#: howto/functional.rst:928 +msgid "" +"Note that these functions produce all of the possible combinations by " +"position and don't require that the contents of *iterable* are unique::" +msgstr "" +"Notez que ces fonctions génèrent toutes les combinaisons possibles en se " +"basant sur la position des éléments et ne requièrent pas que les éléments de " +"*iterable* soient uniques ::" + +#: howto/functional.rst:935 +msgid "" +"The identical tuple ``('a', 'a', 'b')`` occurs twice, but the two 'a' " +"strings came from different positions." +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:938 +msgid "" +"The :func:`itertools.combinations_with_replacement(iterable, r) ` function relaxes a different constraint: " +"elements can be repeated within a single tuple. Conceptually an element is " +"selected for the first position of each tuple and then is replaced before " +"the second element is selected. ::" +msgstr "" +"La fonction :func:`itertools.combinations_with_replacement(iterable, r) " +"` assouplit une autre contrainte : " +"les éléments peuvent être répétés au sein du même *n*-uplet. Il s'agit d'un " +"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:953 +msgid "Grouping elements" +msgstr "Grouper les éléments" + +#: howto/functional.rst:955 +msgid "" +"The last function I'll discuss, :func:`itertools.groupby(iter, " +"key_func=None) `, is the most complicated. " +"``key_func(elem)`` is a function that can compute a key value for each " +"element returned by the iterable. If you don't supply a key function, the " +"key is simply each element itself." +msgstr "" +"La dernière fonction que allons voir, :func:`itertools.groupby(iter, " +"key_func=None) ` est la plus complexe. ``key_func(elem)`` " +"est une fonction qui produit une clé pour chaque élément renvoyé par " +"l'itérable. Si vous ne spécifiez pas de fonction *key*, alors celle-ci est " +"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:960 +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-" +"tuples containing a key value and an iterator for the elements with that key." +msgstr "" +":func:`~itertools.groupby` rassemble tous éléments consécutifs de l'itérable " +"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:988 +msgid "" +":func:`~itertools.groupby` assumes that the underlying iterable's contents " +"will already be sorted based on the key. Note that the returned iterators " +"also use the underlying iterable, so you have to consume the results of " +"iterator-1 before requesting iterator-2 and its corresponding key." +msgstr "" +":func:`~itertools.groupby` fait l'hypothèse que le contenu de l'itérable " +"sous-jacent est d'ores et déjà ordonné en fonction de la clé. Notez que les " +"itérateurs générés utilisent également l'itérable sous-jacent. Vous devez " +"donc consommer l'intégralité des résultats du premier itérateur renvoyé " +"(*iterator-1* dans l'exemple ci-dessus) avant de récupérer le deuxième " +"itérateur (*iterator-2* dans l'exemple ci-dessus) et la clé à laquelle il " +"est associé." + +#: howto/functional.rst:995 +msgid "The functools module" +msgstr "Le module *functools*" + +#: howto/functional.rst:997 +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 " +"and returns a new function. The most useful tool in this module is the :" +"func:`functools.partial` function." +msgstr "" +"Le module :mod:`functools` introduit par Python 2.5 contient diverses " +"fonctions d'ordre supérieur. Une **fonction d'ordre supérieur** prend une ou " +"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:1002 +msgid "" +"For programs written in a functional style, you'll sometimes want to " +"construct variants of existing functions that have some of the parameters " +"filled in. Consider a Python function ``f(a, b, c)``; you may wish to create " +"a new function ``g(b, c)`` that's equivalent to ``f(1, b, c)``; you're " +"filling in a value for one of ``f()``'s parameters. This is called " +"\"partial function application\"." +msgstr "" +"En programmant dans un style fonctionnel, il est courant de vouloir " +"construire des variantes de fonctions existantes dont certains paramètres " +"sont prédéfinis. Par exemple, considérons une fonction Python ``f(a, b, " +"c)``. Si vous voulez une nouvelle fonction ``g(b, c)`` équivalente à ``f(1, " +"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:1008 +msgid "" +"The constructor for :func:`~functools.partial` takes the arguments " +"``(function, arg1, arg2, ..., kwarg1=value1, kwarg2=value2)``. The " +"resulting object is callable, so you can just call it to invoke ``function`` " +"with the filled-in arguments." +msgstr "" +"Le constructeur de :func:`~functools.partial` prend en argument ``(fonction, " +"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:1013 +msgid "Here's a small but realistic example::" +msgstr "Voici un exemple court mais réaliste ::" + +#: howto/functional.rst:1025 +msgid "" +":func:`functools.reduce(func, iter, [initial_value]) ` " +"cumulatively performs an operation on all the iterable's elements and, " +"therefore, can't be applied to infinite iterables. *func* must be a function " +"that takes two elements and returns a single value. :func:`functools." +"reduce` takes the first two elements A and B returned by the iterator and " +"calculates ``func(A, B)``. It then requests the third element, C, " +"calculates ``func(func(A, B), C)``, combines this result with the fourth " +"element returned, and continues until the iterable is exhausted. If the " +"iterable returns no values at all, a :exc:`TypeError` exception is raised. " +"If the initial value is supplied, it's used as a starting point and " +"``func(initial_value, A)`` is the first calculation. ::" +msgstr "" +":func:`functools.reduce(func, iter, [initial_value]) ` " +"applique une opération cumulative à tous les éléments d'un itérable et ne " +"peut donc être appliquée à des itérables infinis. *func* doit être une " +"fonction qui prend deux éléments et renvoie une seule valeur. :func:" +"`functools.reduce` prend les deux premiers éléments A et B renvoyés par " +"l'itérateur et calcule ``func(A, B)``. Elle extrait ensuite le troisième " +"élément C et calcule ``func(func(A, B), C)`` puis combine ce résultat avec " +"le quatrième élément renvoyé etc. jusqu'à épuisement de l'itérable. Une " +"exception :exc:`TypeError` est levée si l'itérable ne renvoie aucune valeur. " +"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:1049 +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 " +"special built-in called :func:`sum` to compute it:" +msgstr "" +"Si vous combinez :func:`operator.add` avec :func:`functools.reduce`, vous " +"allez additionner tous les éléments de l'itérable. Ce cas est suffisamment " +"courant pour qu'il existe une fonction native :func:`sum` qui lui est " +"équivalent :" + +#: howto/functional.rst:1061 +msgid "" +"For many uses of :func:`functools.reduce`, though, it can be clearer to just " +"write the obvious :keyword:`for` loop::" +msgstr "" +"Cependant, il peut être plus lisible dans de nombreuses situations " +"impliquant :func:`functools.reduce` de simplement écrire la boucle :keyword:" +"`for` ::" + +#: howto/functional.rst:1073 +msgid "" +"A related function is :func:`itertools.accumulate(iterable, func=operator." +"add) `. It performs the same calculation, but instead " +"of returning only the final result, :func:`accumulate` returns an iterator " +"that also yields each partial result::" +msgstr "" +":func:`itertools.accumulate(iterable, func=operator.add) ` est une fonction similaire qui réalise le même calcul mais, " +"plutôt que de renvoyer seulement le résultat final, :func:`accumulate` " +"renvoie un itérateur qui génère la séquence de tous les résultats " +"intermédiaires ::" + +#: howto/functional.rst:1086 +msgid "The operator module" +msgstr "Le module *operator*" + +#: howto/functional.rst:1088 +msgid "" +"The :mod:`operator` module was mentioned earlier. It contains a set of " +"functions corresponding to Python's operators. These functions are often " +"useful in functional-style code because they save you from writing trivial " +"functions that perform a single operation." +msgstr "" +"Le module :mod:`operator` mentionné précédemment contient un ensemble de " +"fonctions reproduisant les opérateurs de Python. Ces fonctions sont souvent " +"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:1093 +msgid "Some of the functions in this module are:" +msgstr "Voici quelques fonctions de ce module :" + +# Énumération +#: howto/functional.rst:1095 +msgid "" +"Math operations: ``add()``, ``sub()``, ``mul()``, ``floordiv()``, " +"``abs()``, ..." +msgstr "" +"les opérations mathématiques : ``add()``, ``sub()``, ``mul()``, " +"``floordiv()``, ``abs()``… ;" + +# Énumération +#: howto/functional.rst:1096 +msgid "Logical operations: ``not_()``, ``truth()``." +msgstr "les opérations logiques : ``not_()``, ``truth()`` ;" + +# Énumération +#: howto/functional.rst:1097 +msgid "Bitwise operations: ``and_()``, ``or_()``, ``invert()``." +msgstr "les opérations bit à bit : ``and_()``, ``or_()``, ``invert()`` ;" + +# Énumération +#: howto/functional.rst:1098 +msgid "" +"Comparisons: ``eq()``, ``ne()``, ``lt()``, ``le()``, ``gt()``, and ``ge()``." +msgstr "" +"les comparaisons : ``eq()``, ``ne()``, ``lt()``, ``le()``, ``gt()``, et " +"``ge()`` ;" + +# Énumération +#: howto/functional.rst:1099 +msgid "Object identity: ``is_()``, ``is_not()``." +msgstr "l'identification des objets : ``is_()``, ``is_not()``." + +#: howto/functional.rst:1101 +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:1105 +msgid "Small functions and the lambda expression" +msgstr "Expressions lambda et fonctions courtes" + +#: howto/functional.rst:1107 +msgid "" +"When writing functional-style programs, you'll often need little functions " +"that act as predicates or that combine elements in some way." +msgstr "" +"Dans un style de programmation fonctionnel, il est courant d'avoir besoin de " +"petites fonctions utilisées comme prédicats ou pour combiner des éléments " +"d'une façon ou d'une autre." + +#: howto/functional.rst:1110 +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::" +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:1116 +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. " +"``lambda`` takes a number of parameters and an expression combining these " +"parameters, and creates an anonymous function that returns the value of the " +"expression::" +msgstr "" +"Si la fonction dont vous avez besoin n'existe pas, vous devez l'écrire. Une " +"façon d'écrire des fonctions courtes consiste à utiliser les expressions :" +"keyword:`lambda`. ``lambda`` prend plusieurs paramètres et une expression " +"combinant ces derniers afin de créer une fonction anonyme qui renvoie la " +"valeur de cette expression ::" + +#: howto/functional.rst:1125 +msgid "" +"An alternative is to just use the ``def`` statement and define a function in " +"the usual way::" +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:1134 +msgid "" +"Which alternative is preferable? That's a style question; my usual course " +"is to avoid using ``lambda``." +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:1137 +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 " +"expression, which means you can't have multiway ``if... elif... else`` " +"comparisons or ``try... except`` statements. If you try to do too much in a " +"``lambda`` statement, you'll end up with an overly complicated expression " +"that's hard to read. Quick, what's the following code doing? ::" +msgstr "" +"Une des raisons est que ``lambda`` ne peut pas définir toutes les fonctions. " +"Le résultat doit pouvoir se calculer en une seule expression, ce qui " +"signifie qu'il est impossible d'avoir des comparaisons ``if ... elif ... " +"else`` à plusieurs branches ou des structures ``try ... except``. Si vous " +"essayez de trop en faire dans une expression ``lambda``, vous finirez avec " +"une expression illisible. Par exemple, pouvez-vous dire du premier coup " +"d’œil ce que fait le code ci-dessous ? ::" + +#: howto/functional.rst:1147 +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 " +"things a little bit better::" +msgstr "" +"Vous pouvez sûrement comprendre ce que fait ce code mais cela prend du temps " +"de démêler l'expression pour y voir plus clair. Une clause ``def`` concise " +"améliore la situation ::" + +#: howto/functional.rst:1157 +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:1163 +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:1167 +msgid "" +"Many uses of :func:`functools.reduce` are clearer when written as ``for`` " +"loops." +msgstr "" +"Les boucles ``for`` sont souvent plus lisibles que la fonction :func:" +"`functools.reduce`." + +#: howto/functional.rst:1169 +msgid "" +"Fredrik Lundh once suggested the following set of rules for refactoring uses " +"of ``lambda``:" +msgstr "" +"Frederik Lundh a suggéré quelques règles pour le réusinage de code " +"impliquant les expressions ``lambda`` :" + +#: howto/functional.rst:1172 +msgid "Write a lambda function." +msgstr "Écrire une fonction lambda." + +#: howto/functional.rst:1173 +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:1174 +msgid "" +"Study the comment for a while, and think of a name that captures the essence " +"of the comment." +msgstr "" +"Scruter le commentaire pendant quelques temps et réfléchir à un nom qui " +"synthétise son essence." + +#: howto/functional.rst:1176 +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:1177 +msgid "Remove the comment." +msgstr "Effacer le commentaire." + +#: howto/functional.rst:1179 +msgid "" +"I really like these rules, but you're free to disagree about whether this " +"lambda-free style is better." +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:1184 +msgid "Revision History and Acknowledgements" +msgstr "Historique des modifications et remerciements" + +#: howto/functional.rst:1186 +msgid "" +"The author would like to thank the following people for offering " +"suggestions, corrections and assistance with various drafts of this article: " +"Ian Bicking, Nick Coghlan, Nick Efford, Raymond Hettinger, Jim Jewett, Mike " +"Krell, Leandro Lameiro, Jussi Salmela, Collin Winter, Blake Winton." +msgstr "" +"L'auteur souhaiterait remercier les personnes suivantes pour leurs " +"suggestions, leurs corrections et leur aide sur les premières versions de " +"cet article : Ian Bicking, Nick Coghlan, Nick Efford, Raymond Hettinger, Jim " +"Jewett, Mike Krell, Leandro Lameiro, Jussi Salmela, Collin Winter, Blake " +"Winton." + +#: howto/functional.rst:1191 +msgid "Version 0.1: posted June 30 2006." +msgstr "Version 0.1 : publiée le 30 juin 2006." + +#: howto/functional.rst:1193 +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:1195 +msgid "" +"Version 0.2: posted July 10 2006. Merged genexp and listcomp sections into " +"one. Typo fixes." +msgstr "" +"Version 0.2 : publiée le 10 juillet 2006. Fusion des sections *genexp* et " +"*listcomp*. Correction orthographique." + +#: howto/functional.rst:1198 +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:1200 +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." +msgstr "" +"Version 0.30 : ajout d'une section sur le module ``functional`` écrite par " +"Collin Winter ; ajout d'une courte section sur le module ``operator`` ; " +"quelques autres modifications." + +#: howto/functional.rst:1205 +msgid "References" +msgstr "Références" + +#: howto/functional.rst:1208 +msgid "General" +msgstr "Général" + +#: howto/functional.rst:1210 +msgid "" +"**Structure and Interpretation of Computer Programs**, by Harold Abelson and " +"Gerald Jay Sussman with Julie Sussman. Full text at https://mitpress.mit." +"edu/sicp/. In this classic textbook of computer science, chapters 2 and 3 " +"discuss the use of sequences and streams to organize the data flow inside a " +"program. The book uses Scheme for its examples, but many of the design " +"approaches described in these chapters are applicable to functional-style " +"Python code." +msgstr "" +"**Structure and Interpretation of Computer Programs** par Harold Abelson et " +"Gerald Jay Sussman avec Julie Sussman. Disponible à l'adresse https://" +"mitpress.mit.edu/sicp/. Ce livre est un classique en informatique. Les " +"chapitres 2 et 3 présentent l'utilisation des séquences et des flux pour " +"organiser le flot de données dans un programme. Les exemples du livre " +"utilisent le langage Scheme mais la plupart des approches décrites dans ces " +"chapitres s'appliquent au style fonctionnel de Python." + +#: howto/functional.rst:1218 +#, fuzzy +msgid "" +"https://www.defmacro.org/ramblings/fp.html:%20A%20general%20introduction%20to" +"functional programming that uses Java examples and has a lengthy historical " +"introduction." +msgstr "" +"http://www.defmacro.org/ramblings/fp.html%20:%20une%20pr%C3%A9sentation%20g%C3%A9n%C3%A9rale%20%C3%A0%20la" +"programmation fonctionnelle avec une longue introduction historique et des " +"exemples en Java." + +#: howto/functional.rst:1221 +msgid "" +"https://en.wikipedia.org/wiki/Functional_programming:%20General%20Wikipedia" +"entry describing functional programming." +msgstr "" +"https://fr.wikipedia.org/wiki/Programmation_fonctionnelle%20:%20l'entrée " +"Wikipédia qui décrit la programmation fonctionnelle." + +#: howto/functional.rst:1224 +msgid "https://en.wikipedia.org/wiki/Coroutine:%20Entry%20for%20coroutines." +msgstr "" +"https://fr.wikipedia.org/wiki/Coroutine%20:%20l'entrée pour les coroutines." + +#: howto/functional.rst:1226 +msgid "" +"https://en.wikipedia.org/wiki/Currying:%20Entry%20for%20the%20concept%20of%20currying." +msgstr "" +"https://fr.wikipedia.org/wiki/Curryfication%20:%20l'entrée pour le concept de " +"curryfication (création d'applications partielles)." + +#: howto/functional.rst:1229 +msgid "Python-specific" +msgstr "Spécifique à Python" + +#: howto/functional.rst:1231 +#, fuzzy +msgid "" +"https://gnosis.cx/TPiP/:%20The%20first%20chapter%20of%20David%20Mertz's book :title-" +"reference:`Text Processing in Python` discusses functional programming for " +"text processing, in the section titled \"Utilizing Higher-Order Functions in " +"Text Processing\"." +msgstr "" +"http://gnosis.cx/TPiP/%20:%20le%20premier%20chapitre%20du%20livre%20de%20David%20Mertz%20:title-" +"reference:`Text Processing in Python` présente l'utilisation de la " +"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:1236 +msgid "" +"Mertz also wrote a 3-part series of articles on functional programming for " +"IBM's DeveloperWorks site; see `part 1 `__, `part 2 `__, and " +"`part 3 `__," +msgstr "" +"Mertz a également écrit une série de 3 articles (en anglais) sur la " +"programmation fonctionnelle pour le site DeveloperWorks d'IBM. Voir `partie " +"1 `__, `partie 2 `__ et `partie 3 `__," + +#: howto/functional.rst:1244 +msgid "Python documentation" +msgstr "Documentation Python" + +#: howto/functional.rst:1246 +msgid "Documentation for the :mod:`itertools` module." +msgstr "Documentation du module :mod:`itertools`." + +#: howto/functional.rst:1248 +msgid "Documentation for the :mod:`functools` module." +msgstr "Documentation du module :mod:`functools`." + +#: howto/functional.rst:1250 +msgid "Documentation for the :mod:`operator` module." +msgstr "Documentation du module :mod:`operator`." + +#: howto/functional.rst:1252 +msgid ":pep:`289`: \"Generator Expressions\"" +msgstr ":pep:`289`: *\"Generator Expressions\"*" + +#: howto/functional.rst:1254 +msgid "" +":pep:`342`: \"Coroutines via Enhanced Generators\" describes the new " +"generator features in Python 2.5." +msgstr "" +":pep:`342`: *\"Coroutines via Enhanced Generators\"* décrit les nouvelles " +"fonctionnalités des générateurs en Python 2.5." diff --git a/howto/index.po b/howto/index.po new file mode 100644 index 0000000000..6c6e127ac7 --- /dev/null +++ b/howto/index.po @@ -0,0 +1,36 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +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: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \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" + +#: howto/index.rst:3 +msgid "Python HOWTOs" +msgstr "Les HOWTOs de Python" + +#: howto/index.rst:5 +msgid "" +"Python HOWTOs are documents that cover a single, specific topic, and attempt " +"to cover it fairly completely. Modelled on the Linux Documentation Project's " +"HOWTO collection, this collection is an effort to foster documentation " +"that's more detailed than the Python Library Reference." +msgstr "" +"les Guides Pratique Python sont des documents couvrant chacun un sujet " +"unique et spécifique de la manière la plus complète possible. Créés à partir " +"de la suite Documentation Project's HOWTO Linux, cette suite essaie de " +"promouvoir les documentations plus détaillées que la Python Library " +"Reference." + +#: howto/index.rst:11 +msgid "Currently, the HOWTOs are:" +msgstr "Actuellement, les HOWTOs sont :" diff --git a/howto/instrumentation.po b/howto/instrumentation.po new file mode 100644 index 0000000000..b13774144a --- /dev/null +++ b/howto/instrumentation.po @@ -0,0 +1,434 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-18 15:46+0200\n" +"PO-Revision-Date: 2021-11-06 19:31+0100\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 3.0\n" + +#: howto/instrumentation.rst:7 +msgid "Instrumenting CPython with DTrace and SystemTap" +msgstr "Instrumenter CPython avec DTrace et SystemTap" + +#: howto/instrumentation.rst:0 +msgid "author" +msgstr "auteur" + +#: howto/instrumentation.rst:9 +msgid "David Malcolm" +msgstr "David Malcolm" + +#: howto/instrumentation.rst:10 +msgid "Łukasz Langa" +msgstr "Łukasz Langa" + +#: howto/instrumentation.rst:12 +msgid "" +"DTrace and SystemTap are monitoring tools, each providing a way to inspect " +"what the processes on a computer system are doing. They both use domain-" +"specific languages allowing a user to write scripts which:" +msgstr "" +"*DTrace* et *SystemTap* sont des outils de surveillance, chacun fournissant " +"un moyen de d'inspecter ce que font les processus d'un système informatique. " +"Ils utilisent tous les deux des langages dédiés permettant à un utilisateur " +"d'écrire des scripts qui permettent de ::" + +#: howto/instrumentation.rst:16 +msgid "filter which processes are to be observed" +msgstr "Filtrer les processus à observer." + +#: howto/instrumentation.rst:17 +msgid "gather data from the processes of interest" +msgstr "Recueillir des données sur le processus choisi." + +#: howto/instrumentation.rst:18 +msgid "generate reports on the data" +msgstr "Générer des rapports sur les données." + +#: howto/instrumentation.rst:20 +msgid "" +"As of Python 3.6, CPython can be built with embedded \"markers\", also known " +"as \"probes\", that can be observed by a DTrace or SystemTap script, making " +"it easier to monitor what the CPython processes on a system are doing." +msgstr "" +"À partir de Python 3.6, CPython peut être compilé avec des « marqueurs » " +"intégrés, aussi appelés « sondes », qui peuvent être observés par un script " +"*DTrace* ou *SystemTap*, ce qui facilite le suivi des processus CPython." + +#: howto/instrumentation.rst:27 +msgid "" +"DTrace markers are implementation details of the CPython interpreter. No " +"guarantees are made about probe compatibility between versions of CPython. " +"DTrace scripts can stop working or work incorrectly without warning when " +"changing CPython versions." +msgstr "" +"Les marqueurs DTrace sont des détails d'implémentation de l'interpréteur " +"CPython. Aucune garantie n'est donnée quant à la compatibilité des sondes " +"entre les versions de CPython. Les scripts DTrace peuvent s'arrêter de " +"fonctionner ou fonctionner incorrectement sans avertissement lors du " +"changement de version de CPython." + +#: howto/instrumentation.rst:34 +msgid "Enabling the static markers" +msgstr "Activer les marqueurs statiques" + +#: howto/instrumentation.rst:36 +msgid "" +"macOS comes with built-in support for DTrace. On Linux, in order to build " +"CPython with the embedded markers for SystemTap, the SystemTap development " +"tools must be installed." +msgstr "" +"macOS est livré avec un support intégré pour *DTrace*. Sous Linux, pour " +"construire CPython avec les marqueurs embarqués pour *SystemTap*, les outils " +"de développement *SystemTap* doivent être installés." + +#: howto/instrumentation.rst:40 +msgid "On a Linux machine, this can be done via::" +msgstr "Sur une machine Linux, cela se fait via ::" + +#: howto/instrumentation.rst:44 +msgid "or::" +msgstr "ou ::" + +#: howto/instrumentation.rst:49 +msgid "" +"CPython must then be :option:`configured with the --with-dtrace option <--" +"with-dtrace>`:" +msgstr "CPython doit être configuré avec l'option :option:`--with-dtrace` ::" + +#: howto/instrumentation.rst:56 +msgid "" +"On macOS, you can list available DTrace probes by running a Python process " +"in the background and listing all probes made available by the Python " +"provider::" +msgstr "" +"Sous macOS, vous pouvez lister les sondes *DTrace* disponibles en exécutant " +"un processus Python en arrière-plan et en listant toutes les sondes mises à " +"disposition par le fournisseur Python ::" + +#: howto/instrumentation.rst:73 +msgid "" +"On Linux, you can verify if the SystemTap static markers are present in the " +"built binary by seeing if it contains a \".note.stapsdt\" section." +msgstr "" +"Sous Linux, pour vérifier que les marqueurs statiques *SystemTap* sont " +"présents dans le binaire compilé, il suffit de regarder s'il contient une " +"section ``.note.stapsdt``." + +#: howto/instrumentation.rst:81 +msgid "" +"If you've built Python as a shared library (with the :option:`--enable-" +"shared` configure option), you need to look instead within the shared " +"library. For example::" +msgstr "" +"Si vous avez compilé Python en tant que bibliothèque partagée (avec " +"l'option :option:`--enable-shared` du script ``configure``), vous devez " +"plutôt regarder dans la bibliothèque partagée. Par exemple ::" + +#: howto/instrumentation.rst:88 +msgid "Sufficiently modern readelf can print the metadata::" +msgstr "" +"Une version suffisamment moderne de *readelf* peut afficher les " +"métadonnées ::" + +#: howto/instrumentation.rst:125 +#, fuzzy +msgid "" +"The above metadata contains information for SystemTap describing how it can " +"patch strategically placed machine code instructions to enable the tracing " +"hooks used by a SystemTap script." +msgstr "" +"Les métadonnées ci-dessus contiennent des informations pour *SystemTap* " +"décrivant comment il peut mettre à jour des instructions de code machine " +"stratégiquement placées pour activer les crochets de traçage utilisés par un " +"script *SystemTap*." + +#: howto/instrumentation.rst:131 +msgid "Static DTrace probes" +msgstr "Sondes DTrace statiques" + +#: howto/instrumentation.rst:133 +msgid "" +"The following example DTrace script can be used to show the call/return " +"hierarchy of a Python script, only tracing within the invocation of a " +"function called \"start\". In other words, import-time function invocations " +"are not going to be listed:" +msgstr "" +"L'exemple suivant de script *DTrace* montre la hiérarchie d'appel/retour " +"d'un script Python, en ne traçant que l'invocation d'une fonction ``start``. " +"En d'autres termes, les appels de fonctions lors de la phase d'import ne " +"seront pas répertoriées ::" + +#: howto/instrumentation.rst:230 +msgid "It can be invoked like this::" +msgstr "Il peut être utilisé de cette manière ::" + +#: howto/instrumentation.rst:236 +msgid "The output looks like this:" +msgstr "La sortie ressemble à ceci ::" + +#: howto/instrumentation.rst:201 +msgid "Static SystemTap markers" +msgstr "Marqueurs statiques *SystemTap*" + +#: howto/instrumentation.rst:203 +msgid "" +"The low-level way to use the SystemTap integration is to use the static " +"markers directly. This requires you to explicitly state the binary file " +"containing them." +msgstr "" +"La façon la plus simple d'utiliser l'intégration *SystemTap* est d'utiliser " +"directement les marqueurs statiques. Pour cela vous devez pointer " +"explicitement le fichier binaire qui les contient." + +#: howto/instrumentation.rst:207 +msgid "" +"For example, this SystemTap script can be used to show the call/return " +"hierarchy of a Python script:" +msgstr "" +"Par exemple, ce script *SystemTap* peut être utilisé pour afficher la " +"hiérarchie d'appel/retour d'un script Python ::" + +#: howto/instrumentation.rst:247 +msgid "where the columns are:" +msgstr "où les colonnes sont ::" + +#: howto/instrumentation.rst:249 +msgid "time in microseconds since start of script" +msgstr "temps en microsecondes depuis le début du script" + +#: howto/instrumentation.rst:251 +msgid "name of executable" +msgstr "nom de l'exécutable" + +#: howto/instrumentation.rst:253 +msgid "PID of process" +msgstr "PID du processus" + +#: howto/instrumentation.rst:255 +msgid "" +"and the remainder indicates the call/return hierarchy as the script executes." +msgstr "" +"et le reste indique la hiérarchie d'appel/retour lorsque le script s'exécute." + +#: howto/instrumentation.rst:257 +msgid "" +"For a :option:`--enable-shared` build of CPython, the markers are contained " +"within the libpython shared library, and the probe's dotted path needs to " +"reflect this. For example, this line from the above example:" +msgstr "" +"Pour une compilation :option:`--enable-shared` de CPython, les marqueurs " +"sont contenus dans la bibliothèque partagée *libpython*, et le chemin du " +"module de la sonde doit le refléter. Par exemple, la ligne de l'exemple ci-" +"dessus :" + +#: howto/instrumentation.rst:265 +msgid "should instead read:" +msgstr "doit plutôt se lire comme ::" + +#: howto/instrumentation.rst:271 +msgid "(assuming a :ref:`debug build ` of CPython 3.6)" +msgstr "" +"(en supposant une version de CPython 3.6 compilée avec le :ref:`débogage " +"` activé)" + +#: howto/instrumentation.rst:275 +msgid "Available static markers" +msgstr "Marqueurs statiques disponibles" + +#: howto/instrumentation.rst:279 +msgid "" +"This marker indicates that execution of a Python function has begun. It is " +"only triggered for pure-Python (bytecode) functions." +msgstr "" +"Ce marqueur indique que l'exécution d'une fonction Python a commencé. Il " +"n'est déclenché que pour les fonctions en Python pur (code intermédiaire)." + +#: howto/instrumentation.rst:282 +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``:" +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 " +"accéder en utilisant ``$arg1``, ``$arg2``, ``$arg3`` :" + +#: howto/instrumentation.rst:286 +msgid "" +"``$arg1`` : ``(const char *)`` filename, accessible using " +"``user_string($arg1)``" +msgstr "" +"``$arg1`` : ``(const char *)`` nom de fichier, accessible via " +"``user_string($arg1)``" + +#: howto/instrumentation.rst:288 +msgid "" +"``$arg2`` : ``(const char *)`` function name, accessible using " +"``user_string($arg2)``" +msgstr "" +"``$arg2`` : ``(const char *)`` nom de la fonction, accessible via " +"``user_string($arg2)``" + +#: howto/instrumentation.rst:291 +msgid "``$arg3`` : ``int`` line number" +msgstr "``$arg3`` : numéro de ligne ``int``" + +#: howto/instrumentation.rst:295 +msgid "" +"This marker is the converse of :c:func:`function__entry`, and indicates that " +"execution of a Python function has ended (either via ``return``, or via an " +"exception). It is only triggered for pure-Python (bytecode) functions." +msgstr "" +"Ce marqueur est l'inverse de :c:func:`function__entry`, et indique que " +"l'exécution d'une fonction Python est terminée (soit via ``return``, soit " +"via une exception). Il n'est déclenché que pour les fonctions en Python pur " +"(code intermédiaire)." + +#: howto/instrumentation.rst:299 +msgid "The arguments are the same as for :c:func:`function__entry`" +msgstr "Les arguments sont les mêmes que pour :c:func:`function__entry`" + +#: howto/instrumentation.rst:303 +msgid "" +"This marker indicates a Python line is about to be executed. It is the " +"equivalent of line-by-line tracing with a Python profiler. It is not " +"triggered within C functions." +msgstr "" +"Ce marqueur indique qu'une ligne Python est sur le point d'être exécutée. " +"C'est l'équivalent du traçage ligne par ligne avec un profileur Python. Il " +"n'est pas déclenché dans les fonctions C." + +#: howto/instrumentation.rst:307 +msgid "The arguments are the same as for :c:func:`function__entry`." +msgstr "Les arguments sont les mêmes que pour :c:func:`function__entry`." + +#: howto/instrumentation.rst:311 +msgid "" +"Fires when the Python interpreter starts a garbage collection cycle. " +"``arg0`` is the generation to scan, like :func:`gc.collect()`." +msgstr "" +"Fonction appelée lorsque l'interpréteur Python lance un cycle de collecte du " +"ramasse-miettes. ``arg0`` est la génération à scanner, comme :func:`gc." +"collect()`." + +#: howto/instrumentation.rst:316 +msgid "" +"Fires when the Python interpreter finishes a garbage collection cycle. " +"``arg0`` is the number of collected objects." +msgstr "" +"Fonction appelée lorsque l'interpréteur Python termine un cycle de collecte " +"du ramasse-miettes. ``Arg0`` est le nombre d'objets collectés." + +#: howto/instrumentation.rst:321 +msgid "" +"Fires before :mod:`importlib` attempts to find and load the module. ``arg0`` " +"is the module name." +msgstr "" +"Fonction appelée avant que :mod:`importlib` essaye de trouver et de charger " +"le module. ``arg0`` est le nom du module." + +#: howto/instrumentation.rst:328 +msgid "" +"Fires after :mod:`importlib`'s find_and_load function is called. ``arg0`` is " +"the module name, ``arg1`` indicates if module was successfully loaded." +msgstr "" +"Fonction appelée après que la fonction ``find_and_load`` du module :mod:" +"`importlib` soit appelée. ``arg0`` est le nom du module, ``arg1`` indique si " +"le module a été chargé avec succès." + +#: howto/instrumentation.rst:337 +msgid "" +"Fires when :func:`sys.audit` or :c:func:`PySys_Audit` is called. ``arg0`` is " +"the event name as C string, ``arg1`` is a :c:type:`PyObject` pointer to a " +"tuple object." +msgstr "" +"Fonction appelée quand les fonctions :func:`sys.audit` ou :c:func:" +"`PySys_Audit` sont appelées. ``arg0`` est le nom de l'évènement de type " +"chaîne de caractère C. ``arg1`` est un pointeur sur un *n*-uplet d'objet de " +"type :c:type:`PyObject`." + +#: howto/instrumentation.rst:345 +msgid "SystemTap Tapsets" +msgstr "*Tapsets* de *SystemTap*" + +#: howto/instrumentation.rst:347 +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." +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 " +"permet de masquer les détails de niveau inférieur des marqueurs statiques." + +#: howto/instrumentation.rst:351 +msgid "Here is a tapset file, based on a non-shared build of CPython:" +msgstr "" +"Voici un fichier *tapset*, basé sur une version non partagée compilée de " +"CPython ::" + +#: howto/instrumentation.rst:374 +msgid "" +"If this file is installed in SystemTap's tapset directory (e.g. ``/usr/share/" +"systemtap/tapset``), then these additional probepoints become available:" +msgstr "" +"Si ce fichier est installé dans le répertoire *tapset* de *SystemTap* (par " +"exemple ``/usr/share/systemtap/tapset``), alors ces sondes supplémentaires " +"deviennent disponibles ::" + +#: howto/instrumentation.rst:380 +msgid "" +"This probe point indicates that execution of a Python function has begun. It " +"is only triggered for pure-Python (bytecode) functions." +msgstr "" +"Cette sonde indique que l'exécution d'une fonction Python a commencé. Elle " +"n'est déclenchée que pour les fonctions en Python pur (code intermédiaire)." + +#: howto/instrumentation.rst:385 +msgid "" +"This probe point is the converse of ``python.function.return``, and " +"indicates that execution of a Python function has ended (either via " +"``return``, or via an exception). It is only triggered for pure-Python " +"(bytecode) functions." +msgstr "" +"Cette sonde est l'inverse de ``python.function.return``, et indique que " +"l'exécution d'une fonction Python est terminée (soit via ``return``, soit " +"via une exception). Elle est uniquement déclenchée pour les fonctions en " +"Python pur (code intermédiaire ou *bytecode*)." + +#: howto/instrumentation.rst:392 +msgid "Examples" +msgstr "Exemples" + +#: howto/instrumentation.rst:393 +msgid "" +"This SystemTap script uses the tapset above to more cleanly implement the " +"example given above of tracing the Python function-call hierarchy, without " +"needing to directly name the static markers:" +msgstr "" +"Ce script *SystemTap* utilise le *tapset* ci-dessus pour implémenter plus " +"proprement l'exemple précédent de traçage de la hiérarchie des appels de " +"fonctions Python, sans avoir besoin de nommer directement les marqueurs " +"statiques ::" + +#: howto/instrumentation.rst:412 +#, fuzzy +msgid "" +"The following script uses the tapset above to provide a top-like view of all " +"running CPython code, showing the top 20 most frequently entered bytecode " +"frames, each second, across the whole system:" +msgstr "" +"Le script suivant utilise le *tapset* ci-dessus pour fournir une vue de " +"l'ensemble du code CPython en cours d'exécution, montrant les 20 cadres de " +"la pile d'appel (*stack frames*) les plus fréquemment utilisées du code " +"intermédiaire, chaque seconde, sur l'ensemble du système ::" diff --git a/howto/ipaddress.po b/howto/ipaddress.po new file mode 100644 index 0000000000..96116fd5d9 --- /dev/null +++ b/howto/ipaddress.po @@ -0,0 +1,425 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-09-23 16:16+0200\n" +"PO-Revision-Date: 2022-05-12 09:42+0200\n" +"Last-Translator: BAILLY Geoffroy \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 3.0.1\n" + +#: howto/ipaddress.rst:9 +msgid "An introduction to the ipaddress module" +msgstr "Introduction au module ``ipaddress``" + +#: howto/ipaddress.rst:0 +msgid "author" +msgstr "auteur" + +#: howto/ipaddress.rst:11 +msgid "Peter Moody" +msgstr "Peter Moody" + +#: howto/ipaddress.rst:12 +msgid "Nick Coghlan" +msgstr "Nick Coghlan" + +#: howto/ipaddress.rst:None +msgid "Overview" +msgstr "Aperçu" + +#: howto/ipaddress.rst:16 +msgid "" +"This document aims to provide a gentle introduction to the :mod:`ipaddress` " +"module. It is aimed primarily at users that aren't already familiar with IP " +"networking terminology, but may also be useful to network engineers wanting " +"an overview of how :mod:`ipaddress` represents IP network addressing " +"concepts." +msgstr "" +"Ce document vise à fournir une introduction rapide au module :mod:" +"`ipaddress`. Il est destiné aux utilisateurs qui ne sont pas familiers avec " +"la terminologie des réseaux IP, mais il peut aussi être utile aux ingénieurs " +"réseaux qui cherchent un aperçu de la représentation des concepts " +"d'adressage IP avec le module :mod:`ipaddress`." + +#: howto/ipaddress.rst:24 +msgid "Creating Address/Network/Interface objects" +msgstr "Créer un objet Adresse/Réseau/Interface" + +#: howto/ipaddress.rst:26 +msgid "" +"Since :mod:`ipaddress` is a module for inspecting and manipulating IP " +"addresses, the first thing you'll want to do is create some objects. You " +"can use :mod:`ipaddress` to create objects from strings and integers." +msgstr "" +"Vu que :mod:`ipaddress` est un module pour inspecter et manipuler des " +"adresses IP, la première chose que vous voudrez faire est de créer quelques " +"objets. Vous pouvez utiliser :mod:`ipaddress` pour créer des objets à partir " +"de chaînes de caractères et d'entiers." + +#: howto/ipaddress.rst:32 +msgid "A Note on IP Versions" +msgstr "Note sur les versions d'IP" + +#: howto/ipaddress.rst:34 +msgid "" +"For readers that aren't particularly familiar with IP addressing, it's " +"important to know that the Internet Protocol (IP) is currently in the " +"process of moving from version 4 of the protocol to version 6. This " +"transition is occurring largely because version 4 of the protocol doesn't " +"provide enough addresses to handle the needs of the whole world, especially " +"given the increasing number of devices with direct connections to the " +"internet." +msgstr "" +"Pour les lecteurs qui ne sont pas particulièrement familiers avec " +"l'adressage IP il est important de savoir que le *protocole Internet* (IP) " +"est actuellement en évolution de la version 4 du protocole vers la version " +"6. Cette transition est largement due au fait que la version 4 du protocole " +"ne fournit pas assez d'adresses pour gérer les besoins du monde entier, " +"particulièrement à cause de la croissance des périphériques directement " +"connectés à Internet." + +#: howto/ipaddress.rst:41 +msgid "" +"Explaining the details of the differences between the two versions of the " +"protocol is beyond the scope of this introduction, but readers need to at " +"least be aware that these two versions exist, and it will sometimes be " +"necessary to force the use of one version or the other." +msgstr "" +"Expliquer les détails des différences entre les deux versions du protocole " +"est au-delà du périmètre de cette introduction, mais les lecteurs doivent au " +"moins être avertis de l'existence de ces deux versions et qu'il sera " +"nécessaire de forcer l'utilisation d'une version ou de l'autre." + +#: howto/ipaddress.rst:48 +msgid "IP Host Addresses" +msgstr "Adresses IP des hôtes" + +#: howto/ipaddress.rst:50 +msgid "" +"Addresses, often referred to as \"host addresses\" are the most basic unit " +"when working with IP addressing. The simplest way to create addresses is to " +"use the :func:`ipaddress.ip_address` factory function, which automatically " +"determines whether to create an IPv4 or IPv6 address based on the passed in " +"value:" +msgstr "" +"Les adresses, souvent dénommées \"adresses hôtes\" sont les unités les plus " +"basiques quand on travaille avec l'adressage IP. Le moyen le plus simple de " +"créer des adresses est d'utiliser la fonction de fabrication :func:" +"`ipaddress.ip_address` qui va automatiquement déterminer quoi créer entre " +"une adresse IPv4 ou une adresse IPv6 en fonction de la valeur qui est " +"transmise :" + +#: howto/ipaddress.rst:61 +msgid "" +"Addresses can also be created directly from integers. Values that will fit " +"within 32 bits are assumed to be IPv4 addresses::" +msgstr "" +"Les adresses peuvent être créées directement depuis des entiers. Les valeurs " +"qui correspondent à des entiers 32 bits sont assimilées à des adresses " +"IPv4 ::" + +#: howto/ipaddress.rst:69 +msgid "" +"To force the use of IPv4 or IPv6 addresses, the relevant classes can be " +"invoked directly. This is particularly useful to force creation of IPv6 " +"addresses for small integers::" +msgstr "" +"Pour forcer l'utilisation d'IPv4 ou d'IPv6, la classe appropriée peut être " +"invoquée directement. C'est particulièrement utile pour forcer la création " +"d'adresse IPv6 pour de petits entiers ::" + +#: howto/ipaddress.rst:82 +msgid "Defining Networks" +msgstr "Définir des réseaux" + +#: howto/ipaddress.rst:84 +msgid "" +"Host addresses are usually grouped together into IP networks, so :mod:" +"`ipaddress` provides a way to create, inspect and manipulate network " +"definitions. IP network objects are constructed from strings that define the " +"range of host addresses that are part of that network. The simplest form for " +"that information is a \"network address/network prefix\" pair, where the " +"prefix defines the number of leading bits that are compared to determine " +"whether or not an address is part of the network and the network address " +"defines the expected value of those bits." +msgstr "" +"Les adresses hôtes sont souvent regroupées dans des réseaux IP, donc :mod:" +"`ipaddress` fournit un moyen de créer, d'inspecter et de manipuler les " +"définitions des réseaux. Les objets correspondants aux réseaux IP sont " +"construits à partir de chaînes de caractères qui définissent le périmètre " +"des adresses hôtes qui font partie de ce réseau. La forme la plus simple de " +"cette information est un couple \"adresse réseau/préfixe réseau\" , où le " +"préfixe définit le nombre de bits de tête qui sont comparés pour déterminer " +"si l'adresse fait ou ne fait pas partie de ce réseau et l'adresse réseau " +"définit la valeur attendue pour ces bits." + +#: howto/ipaddress.rst:93 +msgid "" +"As for addresses, a factory function is provided that determines the correct " +"IP version automatically::" +msgstr "" +"Tout comme pour les adresses, une fonction de fabrication est disponible et " +"détermine automatiquement la version correcte d'IP ::" + +#: howto/ipaddress.rst:101 +msgid "" +"Network objects cannot have any host bits set. The practical effect of this " +"is that ``192.0.2.1/24`` does not describe a network. Such definitions are " +"referred to as interface objects since the ip-on-a-network notation is " +"commonly used to describe network interfaces of a computer on a given " +"network and are described further in the next section." +msgstr "" +"Il est interdit pour des objets réseaux d'avoir des bits affectés à leurs " +"hôtes mis à 1. Ainsi la chaîne de caractères ``192.0.2.1/24`` ne peut " +"définir un réseau. Ces objets réseaux sont aussi appelés objets d'interfaces " +"car la notation ``adresse ip / réseau`` est couramment utilisée pour décrire " +"les interfaces réseau d'un ordinateur sur un réseau donné (nous les " +"détaillons plus loin dans cette section)." + +#: howto/ipaddress.rst:107 +msgid "" +"By default, attempting to create a network object with host bits set will " +"result in :exc:`ValueError` being raised. To request that the additional " +"bits instead be coerced to zero, the flag ``strict=False`` can be passed to " +"the constructor::" +msgstr "" +"Par défaut, tenter de créer un objet réseau avec des bits d'hôtes mis à 1 " +"lève une :exc:`ValueError`. Pour demander que les bits supplémentaires " +"soient plutôt forcés à zéro, l'attribut ``strict=False`` peut être passé au " +"constructeur ::" + +#: howto/ipaddress.rst:119 +msgid "" +"While the string form offers significantly more flexibility, networks can " +"also be defined with integers, just like host addresses. In this case, the " +"network is considered to contain only the single address identified by the " +"integer, so the network prefix includes the entire network address::" +msgstr "" +"Alors que la forme textuelle offre davantage de flexibilité les réseaux " +"peuvent aussi être définis avec des entiers, tout comme les adresses hôtes. " +"Dans ce cas le réseau est considéré comme contenant uniquement l'adresse " +"identifiée par l'entier, donc le préfixe réseau inclut l'adresse du réseau " +"complet ::" + +#: howto/ipaddress.rst:129 +msgid "" +"As with addresses, creation of a particular kind of network can be forced by " +"calling the class constructor directly instead of using the factory function." +msgstr "" +"Comme avec les adresses, la création d'un type de réseau particulier peut " +"être forcée en appelant directement le constructeur de la classe plutôt que " +"d'utiliser la fonction de fabrication." + +#: howto/ipaddress.rst:135 +msgid "Host Interfaces" +msgstr "Interfaces des hôtes" + +#: howto/ipaddress.rst:137 +msgid "" +"As mentioned just above, if you need to describe an address on a particular " +"network, neither the address nor the network classes are sufficient. " +"Notation like ``192.0.2.1/24`` is commonly used by network engineers and the " +"people who write tools for firewalls and routers as shorthand for \"the host " +"``192.0.2.1`` on the network ``192.0.2.0/24``\", Accordingly, :mod:" +"`ipaddress` provides a set of hybrid classes that associate an address with " +"a particular network. The interface for creation is identical to that for " +"defining network objects, except that the address portion isn't constrained " +"to being a network address." +msgstr "" +"Comme mentionné ci-dessus, si vous avez besoin de décrire une adresse sur un " +"réseau particulier, ni l'adresse ni les classes réseaux ne sont suffisantes. " +"Les notations comme ``192.0.2.1/24`` sont généralement utilisées par les " +"ingénieurs réseaux et les personnes qui écrivent des outils pour les pare-" +"feu et les routeurs comme raccourci pour \" l'hôte ``192.0.2.1`` sur le " +"réseau ``192.0.2.0/24``\", par conséquent, :mod:`ipaddress` fournit un " +"ensemble de classes hybrides qui associent une adresse à un réseau " +"particulier. L'interface pour la création est identique à celle pour la " +"définition des objets réseaux, excepté que la partie adresse n'est pas " +"contrainte d'être une adresse réseau." + +#: howto/ipaddress.rst:152 +msgid "" +"Integer inputs are accepted (as with networks), and use of a particular IP " +"version can be forced by calling the relevant constructor directly." +msgstr "" +"Les entiers sont acceptés en entrée (comme avec les réseaux) et " +"l'utilisation d'une version d'IP peut être forcée en appelant directement le " +"constructeur adapté." + +#: howto/ipaddress.rst:157 +msgid "Inspecting Address/Network/Interface Objects" +msgstr "Inspecter les objets Address/Network/Interface" + +#: howto/ipaddress.rst:159 +msgid "" +"You've gone to the trouble of creating an IPv(4|6)(Address|Network|" +"Interface) object, so you probably want to get information about it. :mod:" +"`ipaddress` tries to make doing this easy and intuitive." +msgstr "" +"Vous vous êtes donné la peine de créer un objet (adresse|réseau|" +"interface)IPv(4|6), donc vous voudrez probablement des informations sur " +"celui-ci. :mod:`ipaddress` essaie de rendre ceci facile et intuitif." + +#: howto/ipaddress.rst:163 +msgid "Extracting the IP version::" +msgstr "Extraire la version du protocole IP ::" + +#: howto/ipaddress.rst:172 +msgid "Obtaining the network from an interface::" +msgstr "Obtenir le réseau à partir de l'interface ::" + +#: howto/ipaddress.rst:181 +msgid "Finding out how many individual addresses are in a network::" +msgstr "Trouver combien d'adresses individuelles sont dans un réseau ::" + +#: howto/ipaddress.rst:190 +msgid "Iterating through the \"usable\" addresses on a network::" +msgstr "Itération sur chacune des adresses \"utilisables\" d'un réseau ::" + +#: howto/ipaddress.rst:205 +msgid "" +"Obtaining the netmask (i.e. set bits corresponding to the network prefix) or " +"the hostmask (any bits that are not part of the netmask):" +msgstr "" +"Obtenir le masque réseau (définit les bits correspondant au préfixe du " +"réseau) ou le masque de l'hôte (tous les bits qui ne sont pas dans le masque " +"du réseau) :" + +#: howto/ipaddress.rst:220 +msgid "Exploding or compressing the address::" +msgstr "Éclater ou compresser l'adresse ::" + +#: howto/ipaddress.rst:231 +msgid "" +"While IPv4 doesn't support explosion or compression, the associated objects " +"still provide the relevant properties so that version neutral code can " +"easily ensure the most concise or most verbose form is used for IPv6 " +"addresses while still correctly handling IPv4 addresses." +msgstr "" +"Alors que IPv4 ne gère pas l'éclatement ou la compression, les objets " +"associés fournissent toujours les propriétés adaptées pour que du code, le " +"plus neutre possible vis-à-vis de la version, puisse facilement s'assurer " +"que la forme la plus concise ou la plus verbeuse utilisée pour des adresses " +"IPv6 va aussi fonctionner pour gérer des adresses IPv4." + +#: howto/ipaddress.rst:238 +msgid "Networks as lists of Addresses" +msgstr "Réseaux en tant que listes d'adresses" + +#: howto/ipaddress.rst:240 +msgid "" +"It's sometimes useful to treat networks as lists. This means it is possible " +"to index them like this::" +msgstr "" +"Il est parfois utile de traiter les réseaux en tant que listes. Cela " +"signifie qu'il est possible de les indexer comme ça ::" + +#: howto/ipaddress.rst:253 +msgid "" +"It also means that network objects lend themselves to using the list " +"membership test syntax like this::" +msgstr "" +"Cela signifie aussi que les objets réseaux se prêtent bien à l'utilisation " +"de la syntaxe suivante pour le test d'appartenance à la liste ::" + +#: howto/ipaddress.rst:259 +msgid "Containment testing is done efficiently based on the network prefix::" +msgstr "" +"En se basant sur le préfixe réseau on peut efficacement tester " +"l'appartenance ::" + +#: howto/ipaddress.rst:269 +msgid "Comparisons" +msgstr "Comparaisons" + +#: howto/ipaddress.rst:271 +msgid "" +":mod:`ipaddress` provides some simple, hopefully intuitive ways to compare " +"objects, where it makes sense::" +msgstr "" +":mod:`ipaddress` fournit des moyens simples et intuitifs (du moins nous " +"l'espérons) pour comparer les objets, quand cela fait sens ::" + +#: howto/ipaddress.rst:277 +msgid "" +"A :exc:`TypeError` exception is raised if you try to compare objects of " +"different versions or different types." +msgstr "" +"Une exception :exc:`TypeError` est levée si vous tentez de comparer des " +"objets de différentes versions ou de types différents." + +#: howto/ipaddress.rst:282 +msgid "Using IP Addresses with other modules" +msgstr "Utiliser des adresse IP avec d'autre modules" + +#: howto/ipaddress.rst:284 +msgid "" +"Other modules that use IP addresses (such as :mod:`socket`) usually won't " +"accept objects from this module directly. Instead, they must be coerced to " +"an integer or string that the other module will accept::" +msgstr "" +"Les autres modules qui utilisent des adresses IP (comme :mod:`socket`) " +"n'acceptent généralement pas les objets de ce module directement. Au lieu de " +"cela, ils doivent être convertis en entiers ou en chaînes de caractères que " +"l'autre module va accepter ::" + +#: howto/ipaddress.rst:296 +msgid "Getting more detail when instance creation fails" +msgstr "Obtenir plus de détails lors de l'échec de la création de l'instance" + +#: howto/ipaddress.rst:298 +msgid "" +"When creating address/network/interface objects using the version-agnostic " +"factory functions, any errors will be reported as :exc:`ValueError` with a " +"generic error message that simply says the passed in value was not " +"recognized as an object of that type. The lack of a specific error is " +"because it's necessary to know whether the value is *supposed* to be IPv4 or " +"IPv6 in order to provide more detail on why it has been rejected." +msgstr "" +"Lors de la création des objets Adresse/Réseau/Interface en utilisant les " +"fonctions de fabrication agnostiques à la version, n'importe quelle erreur " +"va être signalée en tant que :exc:`ValueError` avec un message d'erreur " +"générique qui dit simplement que la valeur entrée n'a pas été reconnue en " +"tant qu'objet de ce type. Pour fournir plus de détails sur la cause du " +"rejet, il faudrait reconnaître si la valeur est *supposée* être une adresse " +"IPv4 ou IPv6." + +#: howto/ipaddress.rst:305 +msgid "" +"To support use cases where it is useful to have access to this additional " +"detail, the individual class constructors actually raise the :exc:" +"`ValueError` subclasses :exc:`ipaddress.AddressValueError` and :exc:" +"`ipaddress.NetmaskValueError` to indicate exactly which part of the " +"definition failed to parse correctly." +msgstr "" +"Pour gérer les cas d'usage où il est utile d'avoir accès à ces détails, les " +"constructeurs individuels des classes lèvent actuellement les sous-classes " +"de :exc:`ValueError`, :exc:`ipaddress.AddressValueError` et :exc:`ipaddress." +"NetmaskValueError` pour indiquer précisément quelle partie de la définition " +"n'a pas pu être correctement traitée." + +#: howto/ipaddress.rst:311 +msgid "" +"The error messages are significantly more detailed when using the class " +"constructors directly. For example::" +msgstr "" +"Les messages d'erreur sont particulièrement plus détaillés lors de " +"l'utilisation directe du constructeur. Par exemple ::" + +#: howto/ipaddress.rst:332 +msgid "" +"However, both of the module specific exceptions have :exc:`ValueError` as " +"their parent class, so if you're not concerned with the particular type of " +"error, you can still write code like the following::" +msgstr "" +"Cependant, les exceptions spécifiques des deux modules ont :exc:`ValueError` " +"comme classe parent ; donc si vous n'êtes pas intéressé par le type " +"particulier d'erreur remontée, vous pouvez écrire votre code comme suit ::" diff --git a/howto/logging-cookbook.po b/howto/logging-cookbook.po new file mode 100644 index 0000000000..e9399c8f91 --- /dev/null +++ b/howto/logging-cookbook.po @@ -0,0 +1,2707 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-22 22:57+0100\n" +"PO-Revision-Date: 2022-10-18 16:15+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.4.2\n" + +#: howto/logging-cookbook.rst:5 +msgid "Logging Cookbook" +msgstr "Recettes pour la journalisation" + +#: howto/logging-cookbook.rst:0 +msgid "Author" +msgstr "Auteur" + +#: howto/logging-cookbook.rst:7 +msgid "Vinay Sajip " +msgstr "Vinay Sajip " + +#: howto/logging-cookbook.rst:9 +msgid "" +"This page contains a number of recipes related to logging, which have been " +"found useful in the past. For links to tutorial and reference information, " +"please see :ref:`cookbook-ref-links`." +msgstr "" +"Cette page contient des recettes relatives à la journalisation qui se sont " +"avérées utiles par le passé. Pour des liens vers le tutoriel et des " +"informations de référence, consultez :ref:`ces autres ressources `." + +#: howto/logging-cookbook.rst:16 +msgid "Using logging in multiple modules" +msgstr "Journalisation dans plusieurs modules" + +#: howto/logging-cookbook.rst:18 +msgid "" +"Multiple calls to ``logging.getLogger('someLogger')`` return a reference to " +"the same logger object. This is true not only within the same module, but " +"also across modules as long as it is in the same Python interpreter " +"process. It is true for references to the same object; additionally, " +"application code can define and configure a parent logger in one module and " +"create (but not configure) a child logger in a separate module, and all " +"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:56 +msgid "Here is the auxiliary module::" +msgstr "Voici un module auxiliaire ::" + +#: howto/logging-cookbook.rst:76 +msgid "The output looks like this:" +msgstr "La sortie ressemble à ceci ::" + +#: howto/logging-cookbook.rst:102 +msgid "Logging from multiple threads" +msgstr "Journalisation avec des fils d'exécution multiples" + +#: howto/logging-cookbook.rst:104 +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:133 +msgid "When run, the script should print something like the following:" +msgstr "À l'exécution, le script doit afficher quelque chose comme ça ::" + +#: howto/logging-cookbook.rst:155 +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:159 +msgid "Multiple handlers and formatters" +msgstr "Plusieurs gestionnaires et formateurs" + +#: howto/logging-cookbook.rst:161 +msgid "" +"Loggers are plain Python objects. The :meth:`~Logger.addHandler` method has " +"no minimum or maximum quota for the number of handlers you may add. " +"Sometimes it will be beneficial for an application to log all messages of " +"all severities to a text file while simultaneously logging errors or above " +"to the console. To set this up, simply configure the appropriate handlers. " +"The logging calls in the application code will remain unchanged. Here is a " +"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:194 +msgid "" +"Notice that the 'application' code does not care about multiple handlers. " +"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:197 +msgid "" +"The ability to create new handlers with higher- or lower-severity filters " +"can be very helpful when writing and testing an application. Instead of " +"using many ``print`` statements for debugging, use ``logger.debug``: Unlike " +"the print statements, which you will have to delete or comment out later, " +"the logger.debug statements can remain intact in the source code and remain " +"dormant until you need them again. At that time, the only change that needs " +"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:208 +msgid "Logging to multiple destinations" +msgstr "Journalisation vers plusieurs destinations" + +#: howto/logging-cookbook.rst:210 +msgid "" +"Let's say you want to log to console and file with different message formats " +"and in differing circumstances. Say you want to log messages with levels of " +"DEBUG and higher to file, and those messages at level INFO and higher to the " +"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:248 +msgid "When you run this, on the console you will see" +msgstr "Quand vous le lancez, vous devez voir" + +#: howto/logging-cookbook.rst:257 +msgid "and in the file you will see something like" +msgstr "et, dans le fichier, vous devez trouver" + +#: howto/logging-cookbook.rst:267 +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:270 +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:273 +msgid "" +"Note that the above choice of log filename ``/tmp/myapp.log`` implies use of " +"a standard location for temporary files on POSIX systems. On Windows, you " +"may need to choose a different directory name for the log - just ensure that " +"the directory exists and that you have the permissions to create and update " +"files in it." +msgstr "" +"Notez que le choix du nom de fichier journal ``/tmp/myapp.log`` ci-dessus " +"implique l'utilisation d'un emplacement standard pour les fichiers " +"temporaires sur les systèmes POSIX. Sous Windows, vous devrez peut-être " +"choisir un nom de répertoire différent pour le journal – assurez-vous " +"simplement que le répertoire existe et que vous disposez des autorisations " +"nécessaires pour créer et mettre à jour des fichiers dans celui-ci." + +#: howto/logging-cookbook.rst:282 +msgid "Custom handling of levels" +msgstr "Personnalisation du niveau de journalisation" + +#: howto/logging-cookbook.rst:284 +msgid "" +"Sometimes, you might want to do something slightly different from the " +"standard handling of levels in handlers, where all levels above a threshold " +"get processed by a handler. To do this, you need to use filters. Let's look " +"at a scenario where you want to arrange things as follows:" +msgstr "" +"Il peut arriver que vous souhaitiez que vos gestionnaires journalisent " +"légèrement différemment de la gestion standard des niveaux, où tous les " +"niveaux au-dessus d'un seuil sont traités par un gestionnaire. Pour ce " +"faire, vous devez utiliser des filtres. Examinons un scénario dans lequel " +"vous souhaitez organiser les choses comme suit :" + +#: howto/logging-cookbook.rst:289 +msgid "Send messages of severity ``INFO`` and ``WARNING`` to ``sys.stdout``" +msgstr "" +"envoyer les messages de niveau ``INFO`` et ``WARNING`` à ``sys.stdout`` ;" + +#: howto/logging-cookbook.rst:290 +msgid "Send messages of severity ``ERROR`` and above to ``sys.stderr``" +msgstr "" +"envoyer les messages de niveau ``ERROR`` et au-dessus à ``sys.stderr`` ;" + +#: howto/logging-cookbook.rst:291 +msgid "Send messages of severity ``DEBUG`` and above to file ``app.log``" +msgstr "" +"envoyer les messages de niveau ``DEBUG`` et au-dessus vers le fichier ``app." +"log``." + +#: howto/logging-cookbook.rst:293 +msgid "Suppose you configure logging with the following JSON:" +msgstr "" +"Supposons que vous configurez la journalisation avec le contenu au format " +"JSON suivant :" + +#: howto/logging-cookbook.rst:335 +msgid "" +"This configuration does *almost* what we want, except that ``sys.stdout`` " +"would show messages of severity ``ERROR`` and above as well as ``INFO`` and " +"``WARNING`` messages. To prevent this, we can set up a filter which excludes " +"those messages and add it to the relevant handler. This can be configured by " +"adding a ``filters`` section parallel to ``formatters`` and ``handlers``:" +msgstr "" +"Cette configuration fait *presque* ce que nous voulons, sauf que ``sys." +"stdout`` affiche les messages de gravité ``ERROR`` et supérieurs ainsi que " +"les messages ``INFO`` et ``WARNING``. Pour éviter cela, nous pouvons " +"configurer un filtre qui exclut ces messages et l'ajouter au gestionnaire " +"approprié. Effectuons la configuration en ajoutant une section ``filters`` " +"parallèle à ``formatters`` et ``handlers`` :" + +#: howto/logging-cookbook.rst:350 +msgid "and changing the section on the ``stdout`` handler to add it:" +msgstr "" +"et en changeant la section du gestionnaire ``stdout`` pour ajouter le " +"filtre :" + +#: howto/logging-cookbook.rst:362 +msgid "" +"A filter is just a function, so we can define the ``filter_maker`` (a " +"factory function) as follows:" +msgstr "" +"Un filtre n'est qu'une fonction, nous pouvons donc définir un " +"``filter_maker`` (une fonction fabrique) comme suit :" + +#: howto/logging-cookbook.rst:375 +msgid "" +"This converts the string argument passed in to a numeric level, and returns " +"a function which only returns ``True`` if the level of the passed in record " +"is at or below the specified level. Note that in this example I have defined " +"the ``filter_maker`` in a test script ``main.py`` that I run from the " +"command line, so its module will be ``__main__`` - hence the ``__main__." +"filter_maker`` in the filter configuration. You will need to change that if " +"you define it in a different module." +msgstr "" +"Elle convertit la chaîne transmise en argument vers un niveau numérique puis " +"renvoie une fonction qui ne renvoie ``True`` que si le niveau de " +"l'enregistrement transmis est inférieur ou égal au niveau spécifié. Notez " +"que dans cet exemple, nous avons défini ``filter_maker`` dans un script de " +"test ``main.py`` qui est exécuté depuis la ligne de commande, donc son " +"module est ``__main__`` – d'où le ``__main__.filter_maker`` dans la " +"configuration du filtre. Vous devez le changer si vous la définissez dans un " +"module différent." + +#: howto/logging-cookbook.rst:383 +msgid "With the filter added, we can run ``main.py``, which in full is:" +msgstr "" +"Avec le filtre, nous pouvons exécuter ``main.py`` dont voici la version " +"complète :" + +#: howto/logging-cookbook.rst:453 +msgid "And after running it like this:" +msgstr "Et après l'avoir exécuté comme ceci :" + +#: howto/logging-cookbook.rst:459 +msgid "We can see the results are as expected:" +msgstr "Nous obtenons le résultat attendu :" + +#: howto/logging-cookbook.rst:485 +msgid "Configuration server example" +msgstr "Exemple d'un serveur de configuration" + +#: howto/logging-cookbook.rst:487 +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:518 +msgid "" +"And here is a script that takes a filename and sends that file to the " +"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:543 +msgid "Dealing with handlers that block" +msgstr "Utilisation de gestionnaires bloquants" + +#: howto/logging-cookbook.rst:547 +msgid "" +"Sometimes you have to get your logging handlers to do their work without " +"blocking the thread you're logging from. This is common in web applications, " +"though of course it also occurs in other scenarios." +msgstr "" +"Parfois, il est nécessaire que les gestionnaires de journalisation fassent " +"leur travail sans bloquer le fil d'exécution qui émet des événements. C'est " +"généralement le cas dans les applications Web, mais aussi bien sûr dans " +"d'autres scénarios." + +#: howto/logging-cookbook.rst:551 +msgid "" +"A common culprit which demonstrates sluggish behaviour is the :class:" +"`SMTPHandler`: sending emails can take a long time, for a number of reasons " +"outside the developer's control (for example, a poorly performing mail or " +"network infrastructure). But almost any network-based handler can block: " +"Even a :class:`SocketHandler` operation may do a DNS query under the hood " +"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:559 +msgid "" +"One solution is to use a two-part approach. For the first part, attach only " +"a :class:`QueueHandler` to those loggers which are accessed from performance-" +"critical threads. They simply write to their queue, which can be sized to a " +"large enough capacity or initialized with no upper bound to their size. The " +"write to the queue will typically be accepted quickly, though you will " +"probably need to catch the :exc:`queue.Full` exception as a precaution in " +"your code. If you are a library developer who has performance-critical " +"threads in their code, be sure to document this (together with a suggestion " +"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:570 +msgid "" +"The second part of the solution is :class:`QueueListener`, which has been " +"designed as the counterpart to :class:`QueueHandler`. A :class:" +"`QueueListener` is very simple: it's passed a queue and some handlers, and " +"it fires up an internal thread which listens to its queue for LogRecords " +"sent from ``QueueHandlers`` (or any other source of ``LogRecords``, for that " +"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:578 +msgid "" +"The advantage of having a separate :class:`QueueListener` class is that you " +"can use the same instance to service multiple ``QueueHandlers``. This is " +"more resource-friendly than, say, having threaded versions of the existing " +"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:583 +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:601 +msgid "which, when run, will produce:" +msgstr "ce qui produit ceci à l'exécution :" + +#: howto/logging-cookbook.rst:607 +msgid "" +"Although the earlier discussion wasn't specifically talking about async " +"code, but rather about slow logging handlers, it should be noted that when " +"logging from async code, network and even file handlers could lead to " +"problems (blocking the event loop) because some logging is done from :mod:" +"`asyncio` internals. It might be best, if any async code is used in an " +"application, to use the above approach for logging, so that any blocking " +"code runs only in the ``QueueListener`` thread." +msgstr "" +"bien que la discussion précédente n'aborde pas spécifiquement l'utilisation " +"de code asynchrone, mais concerne les gestionnaires de journalisation lents, " +"notez que lors de la journalisation à partir de code asynchrone, les " +"gestionnaires qui écrivent vers le réseau ou même dans des fichiers peuvent " +"entraîner des problèmes (blocage de la boucle d'événements) car une certaine " +"journalisation est faite à partir du code natif de :mod:`asyncio`. Il peut " +"être préférable, si un code asynchrone est utilisé dans une application, " +"d'utiliser l'approche ci-dessus pour la journalisation, de sorte que tout ce " +"qui utilise du code bloquant ne s'exécute que dans le thread " +"``QueueListener``." + +#: howto/logging-cookbook.rst:615 +msgid "" +"Prior to Python 3.5, the :class:`QueueListener` always passed every message " +"received from the queue to every handler it was initialized with. (This was " +"because it was assumed that level filtering was all done on the other side, " +"where the queue is filled.) From 3.5 onwards, this behaviour can be changed " +"by passing a keyword argument ``respect_handler_level=True`` to the " +"listener's constructor. When this is done, the listener compares the level " +"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:628 +msgid "Sending and receiving logging events across a network" +msgstr "Envoi et réception d'événements de journalisation à travers le réseau" + +#: howto/logging-cookbook.rst:630 +msgid "" +"Let's say you want to send logging events across a network, and handle them " +"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:658 +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:746 +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:758 +msgid "" +"Note that there are some security issues with pickle in some scenarios. If " +"these affect you, you can use an alternative serialization scheme by " +"overriding the :meth:`~handlers.SocketHandler.makePickle` method and " +"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:766 +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:770 +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. It consists of the following files:" +msgstr "" +"Pour de la journalisation en production *via* un connecteur réseau en " +"écoute, il est probable que vous ayez besoin d’utiliser un outil de " +"surveillance tel que `Supervisor `_. Vous trouverez " +"dans ce `Gist `__ des gabarits pour assurer cette " +"fonction avec *Supervisor*. Il est composé des fichiers suivants :" + +#: howto/logging-cookbook.rst:777 +msgid "File" +msgstr "Fichier" + +#: howto/logging-cookbook.rst:777 +msgid "Purpose" +msgstr "Objectif" + +#: howto/logging-cookbook.rst:779 +msgid ":file:`prepare.sh`" +msgstr ":file:`prepare.sh`" + +#: howto/logging-cookbook.rst:779 +msgid "A Bash script to prepare the environment for testing" +msgstr "Script Bash pour préparer l'environnement de test" + +#: howto/logging-cookbook.rst:782 +msgid ":file:`supervisor.conf`" +msgstr ":file:`supervisor.conf`" + +#: howto/logging-cookbook.rst:782 +msgid "" +"The Supervisor configuration file, which has entries for the listener and a " +"multi-process web application" +msgstr "" +"Fichier de configuration de *Supervisor*, avec les entrées pour le " +"connecteur en écoute et l'application web multi-processus" + +#: howto/logging-cookbook.rst:786 +msgid ":file:`ensure_app.sh`" +msgstr ":file:`ensure_app.sh`" + +#: howto/logging-cookbook.rst:786 +msgid "" +"A Bash script to ensure that Supervisor is running with the above " +"configuration" +msgstr "" +"Script Bash pour s'assurer que *Supervisor* fonctionne bien avec la " +"configuration ci-dessus" + +#: howto/logging-cookbook.rst:789 +msgid ":file:`log_listener.py`" +msgstr ":file:`log_listener.py`" + +#: howto/logging-cookbook.rst:789 +msgid "" +"The socket listener program which receives log events and records them to a " +"file" +msgstr "" +"Programme en écoute sur le réseau qui reçoit les événements de " +"journalisation et les enregistre dans un fichier" + +#: howto/logging-cookbook.rst:792 +msgid ":file:`main.py`" +msgstr ":file:`main.py`" + +#: howto/logging-cookbook.rst:792 +msgid "" +"A simple web application which performs logging via a socket connected to " +"the listener" +msgstr "Application web simple qui journalise *via* un connecteur réseau" + +#: howto/logging-cookbook.rst:795 +msgid ":file:`webapp.json`" +msgstr ":file:`webapp.json`" + +#: howto/logging-cookbook.rst:795 +msgid "A JSON configuration file for the web application" +msgstr "Fichier JSON de configuration de l'application web" + +#: howto/logging-cookbook.rst:797 +msgid ":file:`client.py`" +msgstr ":file:`client.py`" + +#: howto/logging-cookbook.rst:797 +msgid "A Python script to exercise the web application" +msgstr "" +"Script Python qui interagit avec l'application web pour effectuer des appels " +"à la journalisation" + +#: howto/logging-cookbook.rst:800 +msgid "" +"The web application uses `Gunicorn `_, which is a " +"popular web application server that starts multiple worker processes to " +"handle requests. This example setup shows how the workers can write to the " +"same log file without conflicting with one another --- they all go through " +"the socket listener." +msgstr "" +"L'application Web utilise `Gunicorn `_, qui est un " +"serveur d'applications Web populaire qui démarre plusieurs processus de " +"travail pour gérer les demandes. Cet exemple de configuration montre comment " +"les processus peuvent écrire dans le même fichier journal sans entrer en " +"conflit les uns avec les autres — ils passent tous par le connecteur en " +"écoute." + +#: howto/logging-cookbook.rst:805 +msgid "To test these files, do the following in a POSIX environment:" +msgstr "" +"Pour tester ces fichiers, suivez cette procédure dans un environnement " +"POSIX :" + +#: howto/logging-cookbook.rst:807 +msgid "" +"Download `the Gist `__ as a ZIP archive using the :" +"guilabel:`Download ZIP` button." +msgstr "" +"Téléchargez l'archive ZIP du `Gist `__ à l'aide du " +"bouton :guilabel:`Download ZIP`." + +#: howto/logging-cookbook.rst:810 +msgid "Unzip the above files from the archive into a scratch directory." +msgstr "Décompressez les fichiers de l'archive dans un répertoire de travail." + +#: howto/logging-cookbook.rst:812 +msgid "" +"In the scratch directory, run ``bash prepare.sh`` to get things ready. This " +"creates a :file:`run` subdirectory to contain Supervisor-related and log " +"files, and a :file:`venv` subdirectory to contain a virtual environment into " +"which ``bottle``, ``gunicorn`` and ``supervisor`` are installed." +msgstr "" +"Dans le répertoire de travail, exécutez le script de préparation par ``bash " +"prepare.sh``. Cela crée un sous-répertoire :file:`run` pour contenir les " +"fichiers journaux et ceux relatifs à *Supervisor*, ainsi qu'un sous-" +"répertoire :file:`venv` pour contenir un environnement virtuel dans lequel " +"``bottle``, ``gunicorn`` et ``supervisor`` sont installés." + +#: howto/logging-cookbook.rst:817 +msgid "" +"Run ``bash ensure_app.sh`` to ensure that Supervisor is running with the " +"above configuration." +msgstr "" +"Exécutez ``bash ensure_app.sh`` pour vous assurer que *Supervisor* s'exécute " +"avec la configuration ci-dessus." + +#: howto/logging-cookbook.rst:820 +msgid "" +"Run ``venv/bin/python client.py`` to exercise the web application, which " +"will lead to records being written to the log." +msgstr "" +"Exécutez ``venv/bin/python client.py`` pour tester l'application Web, ce qui " +"entraîne l'écriture d'enregistrements dans le journal." + +#: howto/logging-cookbook.rst:823 +msgid "" +"Inspect the log files in the :file:`run` subdirectory. You should see the " +"most recent log lines in files matching the pattern :file:`app.log*`. They " +"won't be in any particular order, since they have been handled concurrently " +"by different worker processes in a non-deterministic way." +msgstr "" +"Inspectez les fichiers journaux dans le sous-répertoire :file:`run`. Vous " +"devriez voir les lignes de journal les plus récentes dans les fichiers de " +"type :file:`app.log*`. Ils ne seront pas dans un ordre particulier, car ils " +"ont été traités par les différents processus de travail de manière non " +"déterministe." + +#: howto/logging-cookbook.rst:828 +msgid "" +"You can shut down the listener and the web application by running ``venv/bin/" +"supervisorctl -c supervisor.conf shutdown``." +msgstr "" +"Vous pouvez arrêter le connecteur en écoute et l'application Web en " +"exécutant ``venv/bin/supervisorctl -c supervisor.conf shutdown``." + +#: howto/logging-cookbook.rst:831 +msgid "" +"You may need to tweak the configuration files in the unlikely event that the " +"configured ports clash with something else in your test environment." +msgstr "" +"Vous devrez peut-être modifier les fichiers de configuration dans le cas peu " +"probable où les ports configurés entrent en conflit avec autre chose dans " +"votre environnement de test." + +#: howto/logging-cookbook.rst:837 +msgid "Adding contextual information to your logging output" +msgstr "Ajout d'informations contextuelles dans la journalisation" + +# #no-qa +#: howto/logging-cookbook.rst:839 +msgid "" +"Sometimes you want logging output to contain contextual information in " +"addition to the parameters passed to the logging call. For example, in a " +"networked application, it may be desirable to log client-specific " +"information in the log (e.g. remote client's username, or IP address). " +"Although you could use the *extra* parameter to achieve this, it's not " +"always convenient to pass the information in this way. While it might be " +"tempting to create :class:`Logger` instances on a per-connection basis, this " +"is not a good idea because these instances are not garbage collected. While " +"this is not a problem in practice, when the number of :class:`Logger` " +"instances is dependent on the level of granularity you want to use in " +"logging an application, it could be hard to manage if the number of :class:" +"`Logger` instances becomes effectively unbounded." +msgstr "" +"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:854 +msgid "Using LoggerAdapters to impart contextual information" +msgstr "" +"Utilisation d'adaptateurs de journalisation pour transmettre des " +"informations contextuelles" + +#: howto/logging-cookbook.rst:856 +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. " +"This class is designed to look like a :class:`Logger`, so that you can call :" +"meth:`debug`, :meth:`info`, :meth:`warning`, :meth:`error`, :meth:" +"`exception`, :meth:`critical` and :meth:`log`. These methods have the same " +"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:864 +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 " +"information. When you call one of the logging methods on an instance of :" +"class:`LoggerAdapter`, it delegates the call to the underlying instance of :" +"class:`Logger` passed to its constructor, and arranges to pass the " +"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:880 +msgid "" +"The :meth:`~LoggerAdapter.process` method of :class:`LoggerAdapter` is where " +"the contextual information is added to the logging output. It's passed the " +"message and keyword arguments of the logging call, and it passes back " +"(potentially) modified versions of these to use in the call to the " +"underlying logger. The default implementation of this method leaves the " +"message alone, but inserts an 'extra' key in the keyword argument whose " +"value is the dict-like object passed to the constructor. Of course, if you " +"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:889 +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 " +"use customized strings with your :class:`Formatter` instances which know " +"about the keys of the dict-like object. If you need a different method, e.g. " +"if you want to prepend or append the contextual information to the message " +"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:905 +msgid "which you can use like this::" +msgstr "que vous pouvez utiliser comme ceci ::" + +#: howto/logging-cookbook.rst:910 +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:914 +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:916 +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 " +"``__iter__`` so that it looks like a dict to logging. This would be useful " +"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:925 +msgid "Using Filters to impart contextual information" +msgstr "Utilisation de filtres pour transmettre des informations contextuelles" + +#: howto/logging-cookbook.rst:927 +msgid "" +"You can also add contextual information to log output using a user-defined :" +"class:`Filter`. ``Filter`` instances are allowed to modify the " +"``LogRecords`` passed to them, including adding additional attributes which " +"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:932 +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:" +"`threading.local`) variable, and then accessed from a ``Filter`` to add, " +"say, information from the request - say, the remote IP address and remote " +"user's username - to the ``LogRecord``, using the attribute names 'ip' and " +"'user' as in the ``LoggerAdapter`` example above. In that case, the same " +"format string can be used to get similar output to that shown above. Here's " +"an example script::" +msgstr "" +"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:978 +msgid "which, when run, produces something like:" +msgstr "qui, à l'exécution, produit quelque chose comme ça ::" + +#: howto/logging-cookbook.rst:996 +msgid "Use of ``contextvars``" +msgstr "" + +#: howto/logging-cookbook.rst:998 +msgid "" +"Since Python 3.7, the :mod:`contextvars` module has provided context-local " +"storage which works for both :mod:`threading` and :mod:`asyncio` processing " +"needs. This type of storage may thus be generally preferable to thread-" +"locals. The following example shows how, in a multi-threaded environment, " +"logs can populated with contextual information such as, for example, request " +"attributes handled by web applications." +msgstr "" + +#: howto/logging-cookbook.rst:1004 +msgid "" +"For the purposes of illustration, say that you have different web " +"applications, each independent of the other but running in the same Python " +"process and using a library common to them. How can each of these " +"applications have their own log, where all logging messages from the library " +"(and other request processing code) are directed to the appropriate " +"application's log file, while including in the log additional contextual " +"information such as client IP, HTTP request method and client username?" +msgstr "" + +#: howto/logging-cookbook.rst:1011 +msgid "Let's assume that the library can be simulated by the following code:" +msgstr "" + +#: howto/logging-cookbook.rst:1027 +msgid "" +"We can simulate the multiple web applications by means of two simple " +"classes, ``Request`` and ``WebApp``. These simulate how real threaded web " +"applications work - each request is handled by a thread:" +msgstr "" + +#: howto/logging-cookbook.rst:1171 +msgid "" +"If you run the above, you should find that roughly half the requests go " +"into :file:`app1.log` and the rest into :file:`app2.log`, and the all the " +"requests are logged to :file:`app.log`. Each webapp-specific log will " +"contain only log entries for only that webapp, and the request information " +"will be displayed consistently in the log (i.e. the information in each " +"dummy request will always appear together in a log line). This is " +"illustrated by the following shell output:" +msgstr "" + +#: howto/logging-cookbook.rst:1218 +#, fuzzy +msgid "Imparting contextual information in handlers" +msgstr "Ajout d'informations contextuelles dans la journalisation" + +#: howto/logging-cookbook.rst:1220 +msgid "" +"Each :class:`~Handler` has its own chain of filters. If you want to add " +"contextual information to a :class:`LogRecord` without leaking it to other " +"handlers, you can use a filter that returns a new :class:`~LogRecord` " +"instead of modifying it in-place, as shown in the following script::" +msgstr "" +"Chaque :class:`~Handler` possède sa propre chaîne de filtres. Si vous " +"souhaitez ajouter des informations contextuelles à un :class:`LogRecord` " +"sans impacter d'autres gestionnaires, vous pouvez utiliser un filtre qui " +"renvoie un nouveau :class:`~LogRecord` au lieu de le modifier sur place, " +"comme dans le script suivant ::" + +#: howto/logging-cookbook.rst:1247 +msgid "Logging to a single file from multiple processes" +msgstr "Journalisation vers un fichier unique à partir de plusieurs processus" + +#: howto/logging-cookbook.rst:1249 +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 " +"*multiple processes* is *not* supported, because there is no standard way to " +"serialize access to a single file across multiple processes in Python. If " +"you need to log to a single file from multiple processes, one way of doing " +"this is to have all the processes log to a :class:`~handlers.SocketHandler`, " +"and have a separate process which implements a socket server which reads " +"from the socket and logs to file. (If you prefer, you can dedicate one " +"thread in one of the existing processes to perform this function.) :ref:" +"`This section ` documents this approach in more detail and " +"includes a working socket receiver which can be used as a starting point for " +"you to adapt in your own applications." +msgstr "" +"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:1262 +msgid "" +"You could also write your own handler which uses the :class:" +"`~multiprocessing.Lock` class from the :mod:`multiprocessing` module to " +"serialize access to the file from your processes. The existing :class:" +"`FileHandler` and subclasses do not make use of :mod:`multiprocessing` at " +"present, though they may do so in the future. Note that at present, the :mod:" +"`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:1272 +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 " +"application. The following example script demonstrates how you can do this; " +"in the example a separate listener process listens for events sent by other " +"processes and logs them according to its own logging configuration. Although " +"the example only demonstrates one way of doing it (for example, you may want " +"to use a listener thread rather than a separate listener process -- the " +"implementation would be analogous) it does allow for completely different " +"logging configurations for the listener and the other processes in your " +"application, and can be used as the basis for code meeting your own specific " +"requirements::" +msgstr "" +"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:1388 +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:1483 +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 " +"events in the ``foo`` subsystem in a file ``mplog-foo.log``. This will be " +"used by the logging machinery in the main process (even though the logging " +"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:1490 +msgid "Using concurrent.futures.ProcessPoolExecutor" +msgstr "Utilisation de concurrent.futures.ProcessPoolExecutor" + +#: howto/logging-cookbook.rst:1492 +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:1500 +msgid "you should use" +msgstr "vous devez écrire" + +#: howto/logging-cookbook.rst:1506 +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:1517 +msgid "to this (remembering to first import :mod:`concurrent.futures`)::" +msgstr "" +"par celle-ci (souvenez-vous d'importer au préalable :mod:`concurrent." +"futures`) ::" + +#: howto/logging-cookbook.rst:1524 +msgid "Deploying Web applications using Gunicorn and uWSGI" +msgstr "Déploiement d'applications Web avec *Gunicorn* et *uWSGI*" + +#: howto/logging-cookbook.rst:1526 +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:1536 +msgid "Using file rotation" +msgstr "Utilisation du roulement de fichiers" + +#: howto/logging-cookbook.rst:1541 +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, " +"and when that many files have been created, rotate the files so that the " +"number of files and the size of the files both remain bounded. For this " +"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:1573 +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:1585 +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:1590 +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:1596 +msgid "Use of alternative formatting styles" +msgstr "Utilisation d'autres styles de formatage" + +#: howto/logging-cookbook.rst:1598 +msgid "" +"When logging was added to the Python standard library, the only way of " +"formatting messages with variable content was to use the %-formatting " +"method. Since then, Python has gained two new formatting approaches: :class:" +"`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:1604 +msgid "" +"Logging (as of 3.2) provides improved support for these two additional " +"formatting styles. The :class:`Formatter` class been enhanced to take an " +"additional, optional keyword parameter named ``style``. This defaults to " +"``'%'``, but other possible values are ``'{'`` and ``'$'``, which correspond " +"to the other two formatting styles. Backwards compatibility is maintained by " +"default (as you would expect), but by explicitly specifying a style " +"parameter, you get the ability to specify format strings which work with :" +"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:1638 +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:1646 +msgid "" +"Logging calls (``logger.debug()``, ``logger.info()`` etc.) only take " +"positional parameters for the actual logging message itself, with keyword " +"parameters used only for determining options for how to handle the actual " +"logging call (e.g. the ``exc_info`` keyword parameter to indicate that " +"traceback information should be logged, or the ``extra`` keyword parameter " +"to indicate additional contextual information to be added to the log). So " +"you cannot directly make logging calls using :meth:`str.format` or :class:" +"`string.Template` syntax, because internally the logging package uses %-" +"formatting to merge the format string and the variable arguments. There " +"would be no changing this while preserving backward compatibility, since all " +"logging calls which are out there in existing code will be using %-format " +"strings." +msgstr "" +"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:1659 +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 " +"arbitrary object as a message format string, and that the logging package " +"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:1683 +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 " +"the formatted log output in place of \"%(message)s\" or \"{message}\" or " +"\"$message\". It's a little unwieldy to use the class names whenever you " +"want to log something, but it's quite palatable if you use an alias such as " +"__ (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:1691 +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:1713 +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:1717 +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 " +"call, but when (and if) the logged message is actually about to be output to " +"a log by a handler. So the only slightly unusual thing which might trip you " +"up is that the parentheses go around the format string and the arguments, " +"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:1725 +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:1756 +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:1765 +msgid "Customizing ``LogRecord``" +msgstr "Personnalisation de ``LogRecord``" + +#: howto/logging-cookbook.rst:1767 +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:" +"`LogRecord` is created, populated with information about the event and then " +"passed to the handlers for that logger (and its ancestors, up to and " +"including the logger where further propagation up the hierarchy is " +"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:1774 +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:1777 +msgid "" +":func:`makeLogRecord`, which is called with a dictionary containing " +"attributes to be added to the LogRecord. This is typically invoked when a " +"suitable dictionary has been received over the network (e.g. in pickle form " +"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:1783 +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:1786 +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:1789 +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:1793 +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:1798 +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 " +"developers can set a suitable filter on their loggers, but they would have " +"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:1806 +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` " +"attached to their top-level logger, but this would not be invoked if an " +"application developer attached a handler to a lower-level library logger --- " +"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:1812 +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 " +"can set with :func:`~logging.setLogRecordFactory`, and interrogate with :" +"func:`~logging.getLogRecordFactory`. The factory is invoked with the same " +"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:1819 +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:1832 +msgid "" +"This pattern allows different libraries to chain factories together, and as " +"long as they don't overwrite each other's attributes or unintentionally " +"overwrite the attributes provided as standard, there should be no surprises. " +"However, it should be borne in mind that each link in the chain adds run-" +"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:1843 +msgid "Subclassing QueueHandler - a ZeroMQ example" +msgstr "Dérivation de *QueueHandler* – un exemple de *ZeroMQ*" + +#: howto/logging-cookbook.rst:1845 +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:1864 +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:1882 +msgid "Subclassing QueueListener - a ZeroMQ example" +msgstr "Dérivation de *QueueListener* – un exemple de *ZeroMQ*" + +#: howto/logging-cookbook.rst:1884 +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:1903 howto/logging-cookbook.rst:3947 +msgid "Module :mod:`logging`" +msgstr "Module :mod:`logging`" + +#: howto/logging-cookbook.rst:1903 howto/logging-cookbook.rst:3947 +msgid "API reference for the logging module." +msgstr "Référence d'API pour le module de journalisation." + +#: howto/logging-cookbook.rst:1906 howto/logging-cookbook.rst:3950 +msgid "Module :mod:`logging.config`" +msgstr "Module :mod:`logging.config`" + +#: howto/logging-cookbook.rst:1906 howto/logging-cookbook.rst:3950 +msgid "Configuration API for the logging module." +msgstr "API de configuration pour le module de journalisation." + +#: howto/logging-cookbook.rst:1909 howto/logging-cookbook.rst:3953 +msgid "Module :mod:`logging.handlers`" +msgstr "Module :mod:`logging.handlers`" + +#: howto/logging-cookbook.rst:1909 howto/logging-cookbook.rst:3953 +msgid "Useful handlers included with the logging module." +msgstr "Gestionnaires utiles inclus avec le module de journalisation." + +#: howto/logging-cookbook.rst:1911 +msgid ":ref:`A basic logging tutorial `" +msgstr "" +":ref:`Les bases de l’utilisation du module de journalisation `" + +#: howto/logging-cookbook.rst:1913 +msgid ":ref:`A more advanced logging tutorial `" +msgstr "" +":ref:`Utilisation avancée du module de journalisation `" + +#: howto/logging-cookbook.rst:1917 +msgid "An example dictionary-based configuration" +msgstr "Exemple de configuration basée sur un dictionnaire" + +#: howto/logging-cookbook.rst:1919 +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:1975 +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:1982 +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:1984 +msgid "" +"An example of how you can define a namer and rotator is given in the " +"following runnable script, which shows gzip compression of the log file::" +msgstr "" +"L’extrait de code suivant fournit un exemple de la façon dont vous pouvez " +"définir un nom et un rotateur, avec la compression par *zlib* du journal ::" + +#: howto/logging-cookbook.rst:2015 +msgid "" +"After running this, you will see six new files, five of which are compressed:" +msgstr "" +"Après l'avoir exécuté, vous verrez six nouveaux fichiers, dont cinq sont " +"compressés :" + +#: howto/logging-cookbook.rst:2028 +msgid "A more elaborate multiprocessing example" +msgstr "Exemple plus élaboré avec traitement en parallèle" + +#: howto/logging-cookbook.rst:2030 +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:2035 +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 " +"separate configurations (the workers all share the same configuration). We " +"can see logging in the main process, how the workers log to a QueueHandler " +"and how the listener implements a QueueListener and a more complex logging " +"configuration, and arranges to dispatch events received via the queue to the " +"handlers specified in the configuration. Note that these configurations are " +"purely illustrative, but you should be able to adapt this example to your " +"own scenario." +msgstr "" +"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:2045 +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:2257 +msgid "Inserting a BOM into messages sent to a SysLogHandler" +msgstr "Insertion d’une *BOM* dans les messages envoyés à un *SysLogHandler*" + +#: howto/logging-cookbook.rst:2259 +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 " +"component, followed by a UTF-8 Byte Order Mark (BOM), followed by Unicode " +"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:2265 +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:2271 +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 " +"if you want to produce :rfc:`5424`-compliant messages which include a BOM, " +"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:2277 +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:2283 +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:2286 +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:2290 +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:2294 +msgid "" +"The formatted message *will* be encoded using UTF-8 encoding by " +"``SysLogHandler``. If you follow the above rules, you should be able to " +"produce :rfc:`5424`-compliant messages. If you don't, logging may not " +"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:2301 +msgid "Implementing structured logging" +msgstr "Journalisation structurée" + +#: howto/logging-cookbook.rst:2303 +msgid "" +"Although most logging messages are intended for reading by humans, and thus " +"not readily machine-parseable, there might be circumstances where you want " +"to output messages in a structured format which *is* capable of being parsed " +"by a program (without needing complex regular expressions to parse the log " +"message). This is straightforward to achieve using the logging package. " +"There are a number of ways in which this could be achieved, but the " +"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:2327 +msgid "If the above script is run, it prints:" +msgstr "Si vous lancez le script ci-dessus, il imprime :" + +#: howto/logging-cookbook.rst:2333 howto/logging-cookbook.rst:2375 +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:2336 +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:2369 +msgid "When the above script is run, it prints:" +msgstr "Quand vous exécutez le script ci-dessus, il imprime :" + +#: howto/logging-cookbook.rst:2384 +msgid "Customizing handlers with :func:`dictConfig`" +msgstr "Personnalisation des gestionnaires avec :func:`dictConfig`" + +#: howto/logging-cookbook.rst:2386 +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 " +"subclassing. As an example, consider that you may want to set the ownership " +"of a log file. On POSIX, this is easily done using :func:`shutil.chown`, but " +"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:2400 +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:2433 +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:2480 +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:2490 +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 " +"version that supports :func:`dictConfig` - namely, Python 2.7, 3.2 or later. " +"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:2496 +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:2501 +msgid "you could use e.g.::" +msgstr "vous pouvez écrire par exemple ::" + +#: howto/logging-cookbook.rst:2505 +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:2510 +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:2514 +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:2524 +msgid "Using particular formatting styles throughout your application" +msgstr "" + +#: howto/logging-cookbook.rst:2526 +msgid "" +"In Python 3.2, the :class:`~logging.Formatter` gained a ``style`` keyword " +"parameter which, while defaulting to ``%`` for backward compatibility, " +"allowed the specification of ``{`` or ``$`` to support the formatting " +"approaches supported by :meth:`str.format` and :class:`string.Template`. " +"Note that this governs the formatting of logging messages for final output " +"to logs, and is completely orthogonal to how an individual logging message " +"is constructed." +msgstr "" + +#: howto/logging-cookbook.rst:2533 +#, fuzzy +msgid "" +"Logging calls (:meth:`~Logger.debug`, :meth:`~Logger.info` etc.) only take " +"positional parameters for the actual logging message itself, with keyword " +"parameters used only for determining options for how to handle the logging " +"call (e.g. the ``exc_info`` keyword parameter to indicate that traceback " +"information should be logged, or the ``extra`` keyword parameter to indicate " +"additional contextual information to be added to the log). So you cannot " +"directly make logging calls using :meth:`str.format` or :class:`string." +"Template` syntax, because internally the logging package uses %-formatting " +"to merge the format string and the variable arguments. There would be no " +"changing this while preserving backward compatibility, since all logging " +"calls which are out there in existing code will be using %-format strings." +msgstr "" +"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:2545 +msgid "" +"There have been suggestions to associate format styles with specific " +"loggers, but that approach also runs into backward compatibility problems " +"because any existing code could be using a given logger name and using %-" +"formatting." +msgstr "" + +#: howto/logging-cookbook.rst:2549 +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 " +"individual logging call. This opens up a couple of ways in which alternative " +"formatting styles can be accommodated." +msgstr "" + +#: howto/logging-cookbook.rst:2556 +msgid "Using LogRecord factories" +msgstr "" + +#: howto/logging-cookbook.rst:2558 +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 " +"own :class:`LogRecord` subclasses, using the :func:`setLogRecordFactory` " +"function. You can use this to set your own subclass of :class:`LogRecord`, " +"which does the Right Thing by overriding the :meth:`~LogRecord.getMessage` " +"method. The base class implementation of this method is where the ``msg % " +"args`` formatting happens, and where you can substitute your alternate " +"formatting; however, you should be careful to support all formatting styles " +"and allow %-formatting as the default, to ensure interoperability with other " +"code. Care should also be taken to call ``str(self.msg)``, just as the base " +"implementation does." +msgstr "" + +#: howto/logging-cookbook.rst:2569 +msgid "" +"Refer to the reference documentation on :func:`setLogRecordFactory` and :" +"class:`LogRecord` for more information." +msgstr "" + +#: howto/logging-cookbook.rst:2574 +msgid "Using custom message objects" +msgstr "" + +#: howto/logging-cookbook.rst:2576 +msgid "" +"There is another, perhaps simpler way that you can use {}- and $- formatting " +"to construct your individual log messages. You may recall (from :ref:" +"`arbitrary-object-messages`) that when logging you can use an arbitrary " +"object as a message format string, and that the logging package will call :" +"func:`str` on that object to get the actual format string. Consider the " +"following two classes::" +msgstr "" + +#: howto/logging-cookbook.rst:2601 +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 " +"the formatted log output in place of “%(message)s” or “{message}” or " +"“$message”. If you find it a little unwieldy to use the class names whenever " +"you want to log something, you can make it more palatable if you use an " +"alias such as ``M`` or ``_`` for the message (or perhaps ``__``, if you are " +"using ``_`` for localization)." +msgstr "" + +#: howto/logging-cookbook.rst:2609 +msgid "" +"Examples of this approach are given below. Firstly, formatting with :meth:" +"`str.format`::" +msgstr "" + +#: howto/logging-cookbook.rst:2623 +msgid "Secondly, formatting with :class:`string.Template`::" +msgstr "" + +#: howto/logging-cookbook.rst:2630 +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 " +"call, but when (and if) the logged message is actually about to be output to " +"a log by a handler. So the only slightly unusual thing which might trip you " +"up is that the parentheses go around the format string and the arguments, " +"not just the format string. That’s because the __ notation is just syntax " +"sugar for a constructor call to one of the ``XXXMessage`` classes shown " +"above." +msgstr "" + +#: howto/logging-cookbook.rst:2644 +msgid "Configuring filters with :func:`dictConfig`" +msgstr "" + +#: howto/logging-cookbook.rst:2646 +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). " +"Since :class:`~logging.Filter` is the only filter class included in the " +"standard library, and it is unlikely to cater to many requirements (it's " +"only there as a base class), you will typically need to define your own :" +"class:`~logging.Filter` subclass with an overridden :meth:`~logging.Filter." +"filter` method. To do this, specify the ``()`` key in the configuration " +"dictionary for the filter, specifying a callable which will be used to " +"create the filter (a class is the most obvious, but you can provide any " +"callable which returns a :class:`~logging.Filter` instance). Here is a " +"complete example::" +msgstr "" + +#: howto/logging-cookbook.rst:2699 +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:2707 +msgid "which shows that the filter is working as configured." +msgstr "" + +#: howto/logging-cookbook.rst:2709 +msgid "A couple of extra points to note:" +msgstr "" + +#: howto/logging-cookbook.rst:2711 +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 " +"configuration dictionary is), you can use the form ``ext://...`` as " +"described in :ref:`logging-config-dict-externalobj`. For example, you could " +"have used the text ``'ext://__main__.MyFilter'`` instead of ``MyFilter`` in " +"the above example." +msgstr "" + +#: howto/logging-cookbook.rst:2718 +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 " +"information on how logging supports using user-defined objects in its " +"configuration, and see the other cookbook recipe :ref:`custom-handlers` " +"above." +msgstr "" + +#: howto/logging-cookbook.rst:2727 +msgid "Customized exception formatting" +msgstr "" + +#: howto/logging-cookbook.rst:2729 +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, " +"even when exception information is present. You can do this with a custom " +"formatter class, as shown in the following example::" +msgstr "" + +#: howto/logging-cookbook.rst:2770 +msgid "When run, this produces a file with exactly two lines:" +msgstr "" + +#: howto/logging-cookbook.rst:2777 +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:2784 +msgid "Speaking logging messages" +msgstr "" + +#: howto/logging-cookbook.rst:2786 +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 " +"you have text-to-speech (TTS) functionality available in your system, even " +"if it doesn't have a Python binding. Most TTS systems have a command line " +"program you can run, and this can be invoked from a handler using :mod:" +"`subprocess`. It's assumed here that TTS command line programs won't expect " +"to interact with users or take a long time to complete, and that the " +"frequency of logged messages will be not so high as to swamp the user with " +"messages, and that it's acceptable to have the messages spoken one at a time " +"rather than concurrently, The example implementation below waits for one " +"message to be spoken before the next is processed, and this might cause " +"other handlers to be kept waiting. Here is a short example showing the " +"approach, which assumes that the ``espeak`` TTS package is available::" +msgstr "" + +#: howto/logging-cookbook.rst:2828 +msgid "" +"When run, this script should say \"Hello\" and then \"Goodbye\" in a female " +"voice." +msgstr "" + +#: howto/logging-cookbook.rst:2830 +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:2838 +msgid "Buffering logging messages and outputting them conditionally" +msgstr "" + +#: howto/logging-cookbook.rst:2840 +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 " +"want to start logging debug events in a function, and if the function " +"completes without errors, you don't want to clutter the log with the " +"collected debug information, but if there is an error, you want all the " +"debug information to be output as well as the error." +msgstr "" + +#: howto/logging-cookbook.rst:2847 +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 " +"the :class:`logging.handlers.MemoryHandler`, which allows buffering of " +"logged events until some condition occurs, at which point the buffered " +"events are ``flushed`` - passed to another handler (the ``target`` handler) " +"for processing. By default, the ``MemoryHandler`` flushed when its buffer " +"gets filled up or an event whose level is greater than or equal to a " +"specified threshold is seen. You can use this recipe with a more specialised " +"subclass of ``MemoryHandler`` if you want custom flushing behavior." +msgstr "" + +#: howto/logging-cookbook.rst:2857 +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 " +"about to log at, and then actually logging a message at that level. You can " +"pass a parameter to ``foo`` which, if true, will log at ERROR and CRITICAL " +"levels - otherwise, it only logs at DEBUG, INFO and WARNING levels." +msgstr "" + +#: howto/logging-cookbook.rst:2863 +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 " +"parameter and attaches a memory handler for the duration of the call to the " +"decorated function. The decorator can be additionally parameterised using a " +"target handler, a level at which flushing should occur, and a capacity for " +"the buffer (number of records buffered). These default to a :class:`~logging." +"StreamHandler` which writes to ``sys.stderr``, ``logging.ERROR`` and ``100`` " +"respectively." +msgstr "" + +#: howto/logging-cookbook.rst:2871 +msgid "Here's the script::" +msgstr "" + +#: howto/logging-cookbook.rst:2934 +msgid "When this script is run, the following output should be observed:" +msgstr "" + +#: howto/logging-cookbook.rst:2964 +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:2968 +msgid "You can of course use the conventional means of decoration::" +msgstr "" + +#: howto/logging-cookbook.rst:2978 +msgid "Sending logging messages to email, with buffering" +msgstr "" + +#: howto/logging-cookbook.rst:2980 +msgid "" +"To illustrate how you can send log messages via email, so that a set number " +"of messages are sent per email, you can subclass :class:`~logging.handlers." +"BufferingHandler`. In the following example, which you can adapt to suit " +"your specific needs, a simple test harness is provided which allows you to " +"run the script with command line arguments specifying what you typically " +"need to send things via SMTP. (Run the downloaded script with the ``-h`` " +"argument to see the required and optional arguments.)" +msgstr "" + +#: howto/logging-cookbook.rst:3052 +msgid "" +"If you run this script and your SMTP server is correctly set up, you should " +"find that it sends eleven emails to the addressee you specify. The first ten " +"emails will each have ten log messages, and the eleventh will have two " +"messages. That makes up 102 messages as specified in the script." +msgstr "" + +#: howto/logging-cookbook.rst:3060 +msgid "Formatting times using UTC (GMT) via configuration" +msgstr "" + +#: howto/logging-cookbook.rst:3062 +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:3071 +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 " +"the :func:`~logging.config.dictConfig` API with an approach illustrated by " +"the following complete example::" +msgstr "" + +#: howto/logging-cookbook.rst:3114 +msgid "When this script is run, it should print something like:" +msgstr "" + +#: howto/logging-cookbook.rst:3121 +msgid "" +"showing how the time is formatted both as local time and UTC, one for each " +"handler." +msgstr "" + +#: howto/logging-cookbook.rst:3128 +msgid "Using a context manager for selective logging" +msgstr "" + +#: howto/logging-cookbook.rst:3130 +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 " +"manager is the most obvious way of saving and restoring the logging context. " +"Here is a simple example of such a context manager, which allows you to " +"optionally change the logging level and add a logging handler purely in the " +"scope of the context manager::" +msgstr "" + +#: howto/logging-cookbook.rst:3163 +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 " +"handler, it is added to the logger on entry to the block and removed on exit " +"from the block. You can also ask the manager to close the handler for you on " +"block exit - you could do this if you don't need the handler any more." +msgstr "" + +#: howto/logging-cookbook.rst:3169 +msgid "" +"To illustrate how it works, we can add the following block of code to the " +"above::" +msgstr "" + +#: howto/logging-cookbook.rst:3187 +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 " +"following ``with`` block, and so message #3 appears. After the block exits, " +"the logger's level is restored to ``INFO`` and so message #4 doesn't appear. " +"In the next ``with`` block, we set the level to ``DEBUG`` again but also add " +"a handler writing to ``sys.stdout``. Thus, message #5 appears twice on the " +"console (once via ``stderr`` and once via ``stdout``). After the ``with`` " +"statement's completion, the status is as it was before so message #6 appears " +"(like message #1) whereas message #7 doesn't (just like message #2)." +msgstr "" + +#: howto/logging-cookbook.rst:3197 +msgid "If we run the resulting script, the result is as follows:" +msgstr "" + +#: howto/logging-cookbook.rst:3208 +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:3216 +msgid "Once again, but piping ``stdout`` to ``/dev/null``, we get:" +msgstr "" + +#: howto/logging-cookbook.rst:3226 +msgid "" +"In this case, the message #5 printed to ``stdout`` doesn't appear, as " +"expected." +msgstr "" + +#: howto/logging-cookbook.rst:3228 +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:3236 +msgid "A CLI application starter template" +msgstr "" + +#: howto/logging-cookbook.rst:3238 +msgid "Here's an example which shows how you can:" +msgstr "" + +#: howto/logging-cookbook.rst:3240 +msgid "Use a logging level based on command-line arguments" +msgstr "" + +#: howto/logging-cookbook.rst:3241 +msgid "" +"Dispatch to multiple subcommands in separate files, all logging at the same " +"level in a consistent way" +msgstr "" + +#: howto/logging-cookbook.rst:3243 +msgid "Make use of simple, minimal configuration" +msgstr "" + +#: howto/logging-cookbook.rst:3245 +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 " +"illustration as a file ``app.py`` that is the main script for the " +"application, with individual commands implemented in ``start.py``, ``stop." +"py`` and ``restart.py``. Suppose further that we want to control the " +"verbosity of the application via a command-line argument, defaulting to " +"``logging.INFO``. Here's one way that ``app.py`` could be written::" +msgstr "" + +#: howto/logging-cookbook.rst:3294 +msgid "" +"And the ``start``, ``stop`` and ``restart`` commands can be implemented in " +"separate modules, like so for starting::" +msgstr "" + +#: howto/logging-cookbook.rst:3307 +msgid "and thus for stopping::" +msgstr "" + +#: howto/logging-cookbook.rst:3328 +msgid "and similarly for restarting::" +msgstr "" + +#: howto/logging-cookbook.rst:3349 +msgid "" +"If we run this application with the default log level, we get output like " +"this:" +msgstr "" + +#: howto/logging-cookbook.rst:3362 +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:3365 +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:3382 +msgid "And if we want less:" +msgstr "" + +#: howto/logging-cookbook.rst:3390 +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:3396 +msgid "A Qt GUI for logging" +msgstr "" + +#: howto/logging-cookbook.rst:3398 +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-" +"platform UI framework with Python bindings using `PySide2 `_ or `PyQt5 `_ libraries." +msgstr "" + +#: howto/logging-cookbook.rst:3404 +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 " +"main thread that does GUI updates. A worker thread is also created to show " +"how you can log to the GUI from both the UI itself (via a button for manual " +"logging) as well as a worker thread doing work in the background (here, just " +"logging messages at random levels with random short delays in between)." +msgstr "" + +#: howto/logging-cookbook.rst:3411 +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:3415 +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:3629 +msgid "Logging to syslog with RFC5424 support" +msgstr "" + +#: howto/logging-cookbook.rst:3631 +msgid "" +"Although :rfc:`5424` dates from 2009, most syslog servers are configured by " +"detault to use the older :rfc:`3164`, which hails from 2001. When " +"``logging`` was added to Python in 2003, it supported the earlier (and only " +"existing) protocol at the time. Since RFC5424 came out, as there has not " +"been widespread deployment of it in syslog servers, the :class:`~logging." +"handlers.SysLogHandler` functionality has not been updated." +msgstr "" + +#: howto/logging-cookbook.rst:3638 +msgid "" +"RFC 5424 contains some useful features such as support for structured data, " +"and if you need to be able to log to a syslog server with support for it, " +"you can do so with a subclassed handler which looks something like this::" +msgstr "" + +#: howto/logging-cookbook.rst:3704 +msgid "" +"You'll need to be familiar with RFC 5424 to fully understand the above code, " +"and it may be that you have slightly different needs (e.g. for how you pass " +"structural data to the log). Nevertheless, the above should be adaptable to " +"your speciric needs. With the above handler, you'd pass structured data " +"using something like this::" +msgstr "" + +#: howto/logging-cookbook.rst:3718 +msgid "How to treat a logger like an output stream" +msgstr "" + +#: howto/logging-cookbook.rst:3720 +msgid "" +"Sometimes, you need to interface to a third-party API which expects a file-" +"like object to write to, but you want to direct the API's output to a " +"logger. You can do this using a class which wraps a logger with a file-like " +"API. Here's a short script illustrating such a class:" +msgstr "" + +#: howto/logging-cookbook.rst:3760 +msgid "When this script is run, it prints" +msgstr "" + +#: howto/logging-cookbook.rst:3767 +msgid "" +"You could also use ``LoggerWriter`` to redirect ``sys.stdout`` and ``sys." +"stderr`` by doing something like this:" +msgstr "" + +#: howto/logging-cookbook.rst:3777 +msgid "" +"You should do this *after* configuring logging for your needs. In the above " +"example, the :func:`~logging.basicConfig` call does this (using the ``sys." +"stderr`` value *before* it is overwritten by a ``LoggerWriter`` instance). " +"Then, you'd get this kind of result:" +msgstr "" + +#: howto/logging-cookbook.rst:3790 +msgid "" +"Of course, these above examples show output according to the format used by :" +"func:`~logging.basicConfig`, but you can use a different formatter when you " +"configure logging." +msgstr "" + +#: howto/logging-cookbook.rst:3794 +msgid "" +"Note that with the above scheme, you are somewhat at the mercy of buffering " +"and the sequence of write calls which you are intercepting. For example, " +"with the definition of ``LoggerWriter`` above, if you have the snippet" +msgstr "" + +#: howto/logging-cookbook.rst:3803 +msgid "then running the script results in" +msgstr "" + +#: howto/logging-cookbook.rst:3821 +msgid "" +"As you can see, this output isn't ideal. That's because the underlying code " +"which writes to ``sys.stderr`` makes mutiple writes, each of which results " +"in a separate logged line (for example, the last three lines above). To get " +"around this problem, you need to buffer things and only output log lines " +"when newlines are seen. Let's use a slghtly better implementation of " +"``LoggerWriter``:" +msgstr "" + +#: howto/logging-cookbook.rst:3846 +msgid "" +"This just buffers up stuff until a newline is seen, and then logs complete " +"lines. With this approach, you get better output:" +msgstr "" + +#: howto/logging-cookbook.rst:3862 +msgid "Patterns to avoid" +msgstr "" + +#: howto/logging-cookbook.rst:3864 +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:3871 +msgid "Opening the same log file multiple times" +msgstr "" + +#: howto/logging-cookbook.rst:3873 +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:3878 +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:3881 +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:3884 +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:3888 +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:3891 +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:3897 +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. Or a file that was supposed to be moved " +"remains in place, and grows in size unexpectedly despite size-based rotation " +"being supposedly in place." +msgstr "" + +#: howto/logging-cookbook.rst:3904 +msgid "" +"Use the techniques outlined in :ref:`multiple-processes` to circumvent such " +"issues." +msgstr "" + +#: howto/logging-cookbook.rst:3908 +msgid "Using loggers as attributes in a class or passing them as parameters" +msgstr "" + +#: howto/logging-cookbook.rst:3910 +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:3920 +msgid "" +"Adding handlers other than :class:`NullHandler` to a logger in a library" +msgstr "" + +#: howto/logging-cookbook.rst:3922 +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:3929 +msgid "Creating a lot of loggers" +msgstr "" + +#: howto/logging-cookbook.rst:3931 +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 "" + +#: howto/logging-cookbook.rst:3942 +msgid "Other resources" +msgstr "Autres ressources" + +#: howto/logging-cookbook.rst:3955 +msgid ":ref:`Basic Tutorial `" +msgstr ":ref:`Tutoriel de découverte `" + +#: howto/logging-cookbook.rst:3957 +msgid ":ref:`Advanced Tutorial `" +msgstr ":ref:`Tutoriel avancé `" diff --git a/howto/logging.po b/howto/logging.po new file mode 100644 index 0000000000..22f0b270c7 --- /dev/null +++ b/howto/logging.po @@ -0,0 +1,2086 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-18 15:46+0200\n" +"PO-Revision-Date: 2022-10-18 16:01+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 3.0\n" + +#: howto/logging.rst:3 +msgid "Logging HOWTO" +msgstr "Tutoriel sur la journalisation" + +#: howto/logging.rst:0 +msgid "Author" +msgstr "Auteur" + +#: howto/logging.rst:5 +msgid "Vinay Sajip " +msgstr "Vinay Sajip " + +#: howto/logging.rst:12 +msgid "Basic Logging Tutorial" +msgstr "Les bases de l'utilisation du module ``logging``" + +#: howto/logging.rst:14 +msgid "" +"Logging is a means of tracking events that happen when some software runs. " +"The software's developer adds logging calls to their code to indicate that " +"certain events have occurred. An event is described by a descriptive message " +"which can optionally contain variable data (i.e. data that is potentially " +"different for each occurrence of the event). Events also have an importance " +"which the developer ascribes to the event; the importance can also be called " +"the *level* or *severity*." +msgstr "" +"La journalisation (*logging* en anglais) est une façon de suivre les " +"événements qui ont lieu durant le fonctionnement d'un logiciel. Le " +"développeur du logiciel ajoute des appels à l'outil de journalisation dans " +"son code pour indiquer que certains événements ont eu lieu. Un événement est " +"décrit par un message descriptif, qui peut éventuellement contenir des " +"données variables (c'est-à-dire qui peuvent être différentes pour chaque " +"occurrence de l'événement). Un événement a aussi une importance que le " +"développeur lui attribue ; cette importance peut aussi être appelée *niveau* " +"ou *sévérité*." + +#: howto/logging.rst:23 +msgid "When to use logging" +msgstr "Quand utiliser ``logging``" + +#: howto/logging.rst:25 +msgid "" +"Logging provides a set of convenience functions for simple logging usage. " +"These are :func:`debug`, :func:`info`, :func:`warning`, :func:`error` and :" +"func:`critical`. To determine when to use logging, see the table below, " +"which states, for each of a set of common tasks, the best tool to use for it." +msgstr "" +"Le module *logging* fournit un ensemble de fonctions de commodités pour une " +"utilisation simple du module. Ce sont les fonctions :func:`debug`, :func:" +"`info`, :func:`warning`, :func:`error` et :func:`critical`. Pour déterminer " +"quand employer la journalisation, voyez la table ci-dessous, qui vous " +"indique, pour chaque tâche parmi les plus communes, l'outil approprié." + +#: howto/logging.rst:31 +msgid "Task you want to perform" +msgstr "Tâche que vous souhaitez mener" + +#: howto/logging.rst:31 +msgid "The best tool for the task" +msgstr "Le meilleur outil pour cette tâche" + +#: howto/logging.rst:33 +msgid "" +"Display console output for ordinary usage of a command line script or program" +msgstr "" +"Affiche la sortie console d'un script en ligne de commande ou d'un programme " +"lors de son utilisation ordinaire" + +#: howto/logging.rst:33 +msgid ":func:`print`" +msgstr ":func:`print`" + +#: howto/logging.rst:37 +msgid "" +"Report events that occur during normal operation of a program (e.g. for " +"status monitoring or fault investigation)" +msgstr "" +"Rapporter des évènements qui ont lieu au cours du fonctionnement normal d'un " +"programme (par exemple pour suivre un statut ou examiner des " +"dysfonctionnements)" + +#: howto/logging.rst:37 +msgid "" +":func:`logging.info` (or :func:`logging.debug` for very detailed output for " +"diagnostic purposes)" +msgstr "" +":func:`logging.info` (ou :func:`logging.debug` pour une sortie très " +"détaillée à visée diagnostique)" + +#: howto/logging.rst:42 +msgid "Issue a warning regarding a particular runtime event" +msgstr "" +"Émettre un avertissement (*warning* en anglais) en relation avec un " +"évènement particulier au cours du fonctionnement d’un programme" + +#: howto/logging.rst:42 +msgid "" +":func:`warnings.warn` in library code if the issue is avoidable and the " +"client application should be modified to eliminate the warning" +msgstr "" +":func:`warnings.warn` dans le code de la bibliothèque si le problème est " +"évitable et l'application cliente doit être modifiée pour éliminer cet " +"avertissement" + +#: howto/logging.rst:47 +msgid "" +":func:`logging.warning` if there is nothing the client application can do " +"about the situation, but the event should still be noted" +msgstr "" +":func:`logging.warning` si l'application cliente ne peut rien faire pour " +"corriger la situation mais l'évènement devrait quand même être noté" + +#: howto/logging.rst:52 +msgid "Report an error regarding a particular runtime event" +msgstr "" +"Rapporter une erreur lors d'un évènement particulier en cours d'exécution" + +#: howto/logging.rst:52 +msgid "Raise an exception" +msgstr "Lever une exception" + +#: howto/logging.rst:55 +msgid "" +"Report suppression of an error without raising an exception (e.g. error " +"handler in a long-running server process)" +msgstr "" +"Rapporter la suppression d'une erreur sans lever d'exception (par exemple " +"pour la gestion d'erreur d'un processus de long terme sur un serveur)" + +#: howto/logging.rst:55 +msgid "" +":func:`logging.error`, :func:`logging.exception` or :func:`logging.critical` " +"as appropriate for the specific error and application domain" +msgstr "" +":func:`logging.error`, :func:`logging.exception` ou :func:`logging." +"critical`, au mieux, selon l'erreur spécifique et le domaine d'application" + +#: howto/logging.rst:62 +msgid "" +"The logging functions are named after the level or severity of the events " +"they are used to track. The standard levels and their applicability are " +"described below (in increasing order of severity):" +msgstr "" +"Les fonctions de journalisation sont nommées d'après le niveau ou la " +"sévérité des évènements qu'elles suivent. Les niveaux standards et leurs " +"applications sont décrits ci-dessous (par ordre croissant de sévérité) :" + +#: howto/logging.rst:855 +msgid "Level" +msgstr "Niveau" + +#: howto/logging.rst:69 +msgid "When it's used" +msgstr "Quand il est utilisé" + +#: howto/logging.rst:865 +msgid "``DEBUG``" +msgstr "``DEBUG``" + +#: howto/logging.rst:71 +msgid "" +"Detailed information, typically of interest only when diagnosing problems." +msgstr "" +"Information détaillée, intéressante seulement lorsqu'on diagnostique un " +"problème." + +#: howto/logging.rst:863 +msgid "``INFO``" +msgstr "``INFO``" + +#: howto/logging.rst:74 +msgid "Confirmation that things are working as expected." +msgstr "Confirmation que tout fonctionne comme prévu." + +#: howto/logging.rst:861 +msgid "``WARNING``" +msgstr "``WARNING``" + +#: howto/logging.rst:77 +msgid "" +"An indication that something unexpected happened, or indicative of some " +"problem in the near future (e.g. 'disk space low'). The software is still " +"working as expected." +msgstr "" +"L'indication que quelque chose d'inattendu a eu lieu, ou de la possibilité " +"d'un problème dans un futur proche (par exemple « espace disque faible »). " +"Le logiciel fonctionne encore normalement." + +#: howto/logging.rst:859 +msgid "``ERROR``" +msgstr "``ERROR``" + +#: howto/logging.rst:82 +msgid "" +"Due to a more serious problem, the software has not been able to perform " +"some function." +msgstr "" +"Du fait d'un problème plus sérieux, le logiciel n'a pas été capable de " +"réaliser une tâche." + +#: howto/logging.rst:857 +msgid "``CRITICAL``" +msgstr "``CRITICAL``" + +#: howto/logging.rst:85 +msgid "" +"A serious error, indicating that the program itself may be unable to " +"continue running." +msgstr "" +"Une erreur sérieuse, indiquant que le programme lui-même pourrait être " +"incapable de continuer à fonctionner." + +#: howto/logging.rst:89 +msgid "" +"The default level is ``WARNING``, which means that only events of this level " +"and above will be tracked, unless the logging package is configured to do " +"otherwise." +msgstr "" +"Le niveau par défaut est ``WARNING``, ce qui signifie que seuls les " +"évènements de ce niveau et au-dessus sont suivis, sauf si le paquet " +"*logging* est configuré pour faire autrement." + +#: howto/logging.rst:93 +msgid "" +"Events that are tracked can be handled in different ways. The simplest way " +"of handling tracked events is to print them to the console. Another common " +"way is to write them to a disk file." +msgstr "" +"Les évènements suivis peuvent être gérés de différentes façons. La manière " +"la plus simple est de les afficher dans la console. Une autre méthode " +"commune est de les écrire dans un fichier." + +#: howto/logging.rst:101 +msgid "A simple example" +msgstr "Un exemple simple" + +#: howto/logging.rst:103 +msgid "A very simple example is::" +msgstr "Un exemple très simple est ::" + +#: howto/logging.rst:109 +msgid "If you type these lines into a script and run it, you'll see:" +msgstr "" +"Si vous entrez ces lignes dans un script que vous exécutez, vous verrez :" + +#: howto/logging.rst:115 +msgid "" +"printed out on the console. The ``INFO`` message doesn't appear because the " +"default level is ``WARNING``. The printed message includes the indication of " +"the level and the description of the event provided in the logging call, i." +"e. 'Watch out!'. Don't worry about the 'root' part for now: it will be " +"explained later. The actual output can be formatted quite flexibly if you " +"need that; formatting options will also be explained later." +msgstr "" +"affiché dans la console. Le message ``INFO`` n'apparaît pas parce que le " +"niveau par défaut est ``WARNING``. Le message affiché inclut l'indication du " +"niveau et la description de l'évènement fournie dans l'appel à *logging*, " +"ici « Watch out! ». Ne vous préoccupez pas de la partie « *root* » pour le " +"moment : nous détaillerons ce point plus bas. La sortie elle-même peut être " +"formatée de multiples manières si besoin. Les options de formatage seront " +"aussi expliquées plus bas." + +#: howto/logging.rst:124 +msgid "Logging to a file" +msgstr "Enregistrer les évènements dans un fichier" + +#: howto/logging.rst:126 +#, fuzzy +msgid "" +"A very common situation is that of recording logging events in a file, so " +"let's look at that next. Be sure to try the following in a newly started " +"Python interpreter, and don't just continue from the session described " +"above::" +msgstr "" +"Il est très commun d'enregistrer les évènements dans un fichier, c'est donc " +"ce que nous allons regarder maintenant. Il faut essayer ce qui suit avec un " +"interpréteur Python nouvellement démarré, ne poursuivez pas la session " +"commencée ci-dessus ::" + +#: howto/logging.rst:137 +msgid "" +"The *encoding* argument was added. In earlier Python versions, or if not " +"specified, the encoding used is the default value used by :func:`open`. " +"While not shown in the above example, an *errors* argument can also now be " +"passed, which determines how encoding errors are handled. For available " +"values and the default, see the documentation for :func:`open`." +msgstr "" +"L'argument *encoding* à été rajouté. Dans les versions précédentes de " +"Python, ou si non spécifié, l'encodage utilisé est la valeur par défaut " +"utilisée par :func:`open`. Bien que non montré dans l'exemple au dessus, un " +"argument **errors** peut aussi être passé, qui détermine comment les erreurs " +"d'encodage sont gérées. Pour voir les valeurs disponibles et par défaut, " +"consultez la documentation de :func:`open`." + +#: howto/logging.rst:144 +msgid "" +"And now if we open the file and look at what we have, we should find the log " +"messages:" +msgstr "" +"Maintenant, si nous ouvrons le fichier et lisons ce qui s'y trouve, on " +"trouvera les messages de log :" + +#: howto/logging.rst:154 +msgid "" +"This example also shows how you can set the logging level which acts as the " +"threshold for tracking. In this case, because we set the threshold to " +"``DEBUG``, all of the messages were printed." +msgstr "" +"Cet exemple montre aussi comment on peut régler le niveau de journalisation " +"qui sert de seuil pour le suivi. Dans ce cas, comme nous avons réglé le " +"seuil à ``DEBUG``, tous les messages ont été écrits." + +#: howto/logging.rst:158 +msgid "" +"If you want to set the logging level from a command-line option such as:" +msgstr "" +"Si vous souhaitez régler le niveau de journalisation à partir d'une option " +"de la ligne de commande comme :" + +#: howto/logging.rst:164 +msgid "" +"and you have the value of the parameter passed for ``--log`` in some " +"variable *loglevel*, you can use::" +msgstr "" +"et que vous passez ensuite la valeur du paramètre donné à l'option ``--log`` " +"dans une variable *loglevel*, vous pouvez utiliser ::" + +#: howto/logging.rst:169 +msgid "" +"to get the value which you'll pass to :func:`basicConfig` via the *level* " +"argument. You may want to error check any user input value, perhaps as in " +"the following example::" +msgstr "" +"de manière à obtenir la valeur à passer à :func:`basicConfig` à travers " +"l'argument *level*. Vous pouvez vérifier que l'utilisateur n'a fait aucune " +"erreur pour la valeur de ce paramètre, comme dans l'exemple ci-dessous ::" + +#: howto/logging.rst:181 +#, fuzzy +msgid "" +"The call to :func:`basicConfig` should come *before* any calls to :func:" +"`debug`, :func:`info`, etc. Otherwise, those functions will call :func:" +"`basicConfig` for you with the default options. As it's intended as a one-" +"off simple configuration facility, only the first call will actually do " +"anything: subsequent calls are effectively no-ops." +msgstr "" +"L'appel à :func:`basicConfig` doit être fait *avant* un appel à :func:" +"`debug`, :func:`info`, etc. Comme l'objectif est d'avoir un outil de " +"configuration simple et d'usage unique, seul le premier appel aura un effet, " +"les appels suivants ne font rien." + +#: howto/logging.rst:187 +msgid "" +"If you run the above script several times, the messages from successive runs " +"are appended to the file *example.log*. If you want each run to start " +"afresh, not remembering the messages from earlier runs, you can specify the " +"*filemode* argument, by changing the call in the above example to::" +msgstr "" +"Si vous exécutez le script plusieurs fois, les messages des exécutions " +"successives sont ajoutés au fichier *example.log*. Si vous voulez que chaque " +"exécution reprenne un fichier vierge, sans conserver les messages des " +"exécutions précédentes, vous pouvez spécifier l'argument *filemode*, en " +"changeant l'appel à l'exemple précédent par ::" + +#: howto/logging.rst:194 +msgid "" +"The output will be the same as before, but the log file is no longer " +"appended to, so the messages from earlier runs are lost." +msgstr "" +"La sortie est identique à la précédente, mais le texte n'est plus ajouté au " +"fichier de log, donc les messages des exécutions précédentes sont perdus." + +#: howto/logging.rst:199 +msgid "Logging from multiple modules" +msgstr "Employer *logging* à partir de différents modules" + +#: howto/logging.rst:201 +msgid "" +"If your program consists of multiple modules, here's an example of how you " +"could organize logging in it::" +msgstr "" +"Si votre programme est composé de plusieurs modules, voici une façon " +"d'organiser\n" +"l'outil de journalisation ::" + +#: howto/logging.rst:225 +msgid "If you run *myapp.py*, you should see this in *myapp.log*:" +msgstr "Si vous exécutez *myapp.py*, vous verrez ceci dans *myapp.log* :" + +#: howto/logging.rst:233 +msgid "" +"which is hopefully what you were expecting to see. You can generalize this " +"to multiple modules, using the pattern in *mylib.py*. Note that for this " +"simple usage pattern, you won't know, by looking in the log file, *where* in " +"your application your messages came from, apart from looking at the event " +"description. If you want to track the location of your messages, you'll need " +"to refer to the documentation beyond the tutorial level -- see :ref:`logging-" +"advanced-tutorial`." +msgstr "" +"ce qui est normalement ce à quoi vous vous attendiez. Vous pouvez " +"généraliser cela à plusieurs modules, en employant le motif de *mylib.py*. " +"Remarquez qu'avec cette méthode simple, vous ne pourrez pas savoir, en " +"lisant le fichier de log, *d'où* viennent les messages dans votre " +"application, sauf dans la description de l'évènement. Si vous voulez suivre " +"la localisation des messages, référez-vous à la documentation avancée :ref:" +"`logging-advanced-tutorial`." + +#: howto/logging.rst:243 +msgid "Logging variable data" +msgstr "Journalisation de données variables" + +#: howto/logging.rst:245 +msgid "" +"To log variable data, use a format string for the event description message " +"and append the variable data as arguments. For example::" +msgstr "" +"Pour enregistrer des données variables, utilisez une chaîne formatée dans le " +"message de description de l'évènement et ajoutez les données variables comme " +"argument. Par exemple ::" + +#: howto/logging.rst:251 +msgid "will display:" +msgstr "affichera :" + +#: howto/logging.rst:257 +msgid "" +"As you can see, merging of variable data into the event description message " +"uses the old, %-style of string formatting. This is for backwards " +"compatibility: the logging package pre-dates newer formatting options such " +"as :meth:`str.format` and :class:`string.Template`. These newer formatting " +"options *are* supported, but exploring them is outside the scope of this " +"tutorial: see :ref:`formatting-styles` for more information." +msgstr "" +"Comme vous pouvez le voir, l'inclusion des données variables dans le message " +"de description de l'évènement emploie le vieux style de formatage avec %. " +"C'est pour assurer la rétrocompatibilité : le module ``logging`` est " +"antérieur aux nouvelles options de formatage comme :meth:`str.format` ou :" +"class:`string.Template`. Ces nouvelles options de formatage *sont* gérées, " +"mais leur exploration sort du cadre de ce tutoriel, voyez :ref:`formatting-" +"styles` pour plus d'information." + +#: howto/logging.rst:266 +msgid "Changing the format of displayed messages" +msgstr "Modifier le format du message affiché" + +#: howto/logging.rst:268 +msgid "" +"To change the format which is used to display messages, you need to specify " +"the format you want to use::" +msgstr "" +"Pour changer le format utilisé pour afficher le message, vous devez préciser " +"le format que vous souhaitez employer ::" + +#: howto/logging.rst:277 +msgid "which would print:" +msgstr "ce qui affiche :" + +#: howto/logging.rst:285 +msgid "" +"Notice that the 'root' which appeared in earlier examples has disappeared. " +"For a full set of things that can appear in format strings, you can refer to " +"the documentation for :ref:`logrecord-attributes`, but for simple usage, you " +"just need the *levelname* (severity), *message* (event description, " +"including variable data) and perhaps to display when the event occurred. " +"This is described in the next section." +msgstr "" +"Notez que le ``root`` qui apparaissait dans les exemples précédents a " +"disparu. Pour voir l'ensemble des éléments qui peuvent apparaître dans la " +"chaîne de format, référez-vous à la documentation pour :ref:`logrecord-" +"attributes`. Pour une utilisation simple, vous avez seulement besoin du " +"*levelname* (la sévérité), du *message* (la description de l'évènement, avec " +"les données variables) et peut-être du moment auquel l'évènement a eu lieu. " +"Nous décrivons ces points dans la prochaine section." + +#: howto/logging.rst:294 +msgid "Displaying the date/time in messages" +msgstr "Afficher l'horodatage dans les messages" + +#: howto/logging.rst:296 +msgid "" +"To display the date and time of an event, you would place '%(asctime)s' in " +"your format string::" +msgstr "" +"Pour afficher la date ou le temps d'un évènement, ajoutez ``'%(asctime)'`` " +"dans votre chaîne de formatage ::" + +#: howto/logging.rst:303 +msgid "which should print something like this:" +msgstr "ce qui affichera quelque chose comme :" + +#: howto/logging.rst:309 +msgid "" +"The default format for date/time display (shown above) is like ISO8601 or :" +"rfc:`3339`. If you need more control over the formatting of the date/time, " +"provide a *datefmt* argument to ``basicConfig``, as in this example::" +msgstr "" +"Le format par défaut de l'horodatage (comme ci-dessus) est donné par la " +"norme ISO8601 ou :rfc:`3339`. Pour plus de contrôle sur le formatage de " +"l'horodatage, vous pouvez fournir à ``basicConfig`` un argument *datefmt*, " +"comme dans l'exemple suivant ::" + +#: howto/logging.rst:317 +msgid "which would display something like this:" +msgstr "ce qui affichera quelque chose comme :" + +#: howto/logging.rst:323 +msgid "" +"The format of the *datefmt* argument is the same as supported by :func:`time." +"strftime`." +msgstr "Le format de *datefmt* est le même que celui de :func:`time.strftime`." + +#: howto/logging.rst:328 +msgid "Next Steps" +msgstr "Étapes suivantes" + +#: howto/logging.rst:330 +msgid "" +"That concludes the basic tutorial. It should be enough to get you up and " +"running with logging. There's a lot more that the logging package offers, " +"but to get the best out of it, you'll need to invest a little more of your " +"time in reading the following sections. If you're ready for that, grab some " +"of your favourite beverage and carry on." +msgstr "" +"Nous concluons ainsi le tutoriel basique. Il devrait suffire à vous mettre " +"le pied à l'étrier pour utiliser ``logging``. Le module ``logging`` a " +"beaucoup d'autre cordes à son arc, mais pour en profiter au maximum, vous " +"devez prendre le temps de lire les sections suivantes. Si vous êtes prêt, " +"servez-vous votre boisson préférée et poursuivons." + +#: howto/logging.rst:336 +msgid "" +"If your logging needs are simple, then use the above examples to incorporate " +"logging into your own scripts, and if you run into problems or don't " +"understand something, please post a question on the comp.lang.python Usenet " +"group (available at https://groups.google.com/forum/#!forum/comp.lang." +"python) and you should receive help before too long." +msgstr "" +"Si vos besoins avec ``logging`` sont simples, vous pouvez incorporer les " +"exemples ci-dessus dans vos scripts. Si vous rencontrez des difficultés ou " +"s'il y a quelque chose que vous ne comprenez pas, vous pouvez poser une " +"question sur le groupe Usenet ``comp.lang.python`` (accessible à https://" +"groups.google.com/forum/#!forum/comp.lang.python), on vous répondra " +"rapidement." + +#: howto/logging.rst:342 +msgid "" +"Still here? You can carry on reading the next few sections, which provide a " +"slightly more advanced/in-depth tutorial than the basic one above. After " +"that, you can take a look at the :ref:`logging-cookbook`." +msgstr "" +"Vous êtes encore là ? Vous pouvez lire les prochaines sections, qui donnent " +"un peu plus de détails que l'introduction ci-dessus. Après ça, vous pouvez " +"jeter un œil à :ref:`logging-cookbook`." + +#: howto/logging.rst:350 +msgid "Advanced Logging Tutorial" +msgstr "Usage avancé de Logging" + +#: howto/logging.rst:352 +msgid "" +"The logging library takes a modular approach and offers several categories " +"of components: loggers, handlers, filters, and formatters." +msgstr "" +"La bibliothèque de journalisation adopte une approche modulaire et offre " +"différentes catégories de composants : *loggers*, *handlers*, *filters* et " +"*formatters*." + +#: howto/logging.rst:355 +msgid "Loggers expose the interface that application code directly uses." +msgstr "" +"Les enregistreurs (*loggers* en anglais) exposent l'interface que le code de " +"l'application utilise directement." + +#: howto/logging.rst:356 +msgid "" +"Handlers send the log records (created by loggers) to the appropriate " +"destination." +msgstr "" +"Les gestionnaires (*handlers*) envoient les entrées de journal (créés par " +"les *loggers*) vers les destinations voulues." + +#: howto/logging.rst:358 +msgid "" +"Filters provide a finer grained facility for determining which log records " +"to output." +msgstr "" +"Les filtres (*filters*) fournissent un moyen de choisir finement quelles " +"entrées de journal doivent être sorties." + +#: howto/logging.rst:360 +msgid "Formatters specify the layout of log records in the final output." +msgstr "" +"Les formateurs (*formatters*) spécifient la structure de l'entrée de journal " +"dans la sortie finale." + +#: howto/logging.rst:362 +msgid "" +"Log event information is passed between loggers, handlers, filters and " +"formatters in a :class:`LogRecord` instance." +msgstr "" +"L'information relative à un événement est passée entre *loggers*, *handlers* " +"et *formatters* dans une instance de la classe :class:`LogRecord`." + +#: howto/logging.rst:365 +msgid "" +"Logging is performed by calling methods on instances of the :class:`Logger` " +"class (hereafter called :dfn:`loggers`). Each instance has a name, and they " +"are conceptually arranged in a namespace hierarchy using dots (periods) as " +"separators. For example, a logger named 'scan' is the parent of loggers " +"'scan.text', 'scan.html' and 'scan.pdf'. Logger names can be anything you " +"want, and indicate the area of an application in which a logged message " +"originates." +msgstr "" +"La journalisation est réalisée en appelant les méthodes d'instance de la " +"classe :class:`Logger` (que l'on appelle ci-dessous :dfn:`loggers`). Chaque " +"instance a un nom et les instances sont organisées conceptuellement comme " +"des hiérarchies dans l'espace de nommage, en utilisant un point comme " +"séparateur. Par exemple, un *logger* appelé ``scan`` est le parent des " +"*loggers* ``scan.text``, ``scan.html`` et ``scan.pdf``. Les noms des " +"*loggers* peuvent être ce que vous voulez et indiquent le sous-domaine d'une " +"application depuis lequel le message enregistré a été émis." + +#: howto/logging.rst:372 +msgid "" +"A good convention to use when naming loggers is to use a module-level " +"logger, in each module which uses logging, named as follows::" +msgstr "" +"Une bonne convention lorsqu'on nomme les *loggers* est d'utiliser un " +"*logger* au niveau du module, dans chaque module qui emploie ``logging``, " +"nommé de la façon suivante ::" + +#: howto/logging.rst:377 +msgid "" +"This means that logger names track the package/module hierarchy, and it's " +"intuitively obvious where events are logged just from the logger name." +msgstr "" +"Cela signifie que le nom d'un *logger* se rapporte à la hiérarchie du paquet " +"et des modules, et il est évident de voir où un événement a été enregistré " +"simplement en regardant le nom du *logger*." + +#: howto/logging.rst:380 +msgid "" +"The root of the hierarchy of loggers is called the root logger. That's the " +"logger used by the functions :func:`debug`, :func:`info`, :func:`warning`, :" +"func:`error` and :func:`critical`, which just call the same-named method of " +"the root logger. The functions and the methods have the same signatures. The " +"root logger's name is printed as 'root' in the logged output." +msgstr "" +"La racine de la hiérarchie des enregistreurs est appelée le *root logger*. " +"C'est le *logger* utilisé par les fonctions :func:`debug`, :func:`info`, :" +"func:`warning`, :func:`error` et :func:`critical`, qui appelle en fait les " +"méthodes du même nom de l'objet *root logger*. Les fonctions et les méthodes " +"ont la même signature. Le nom du *root logger* est affiché comme " +"« ``'root'`` » dans la sortie." + +#: howto/logging.rst:386 +msgid "" +"It is, of course, possible to log messages to different destinations. " +"Support is included in the package for writing log messages to files, HTTP " +"GET/POST locations, email via SMTP, generic sockets, queues, or OS-specific " +"logging mechanisms such as syslog or the Windows NT event log. Destinations " +"are served by :dfn:`handler` classes. You can create your own log " +"destination class if you have special requirements not met by any of the " +"built-in handler classes." +msgstr "" +"Il est bien sûr possible d'enregistrer des messages pour des destinations " +"différentes. Ce paquet permet d'écrire des entrées de journal dans des " +"fichiers, des ressources HTTP GET/POST, par courriel via SMTP, des " +"connecteurs (*socket* en anglais) génériques, des files d'attente, ou des " +"mécanismes d'enregistrement spécifiques au système d'exploitation, comme " +"*syslog* ou le journal d'événements de Windows NT. Les destinations sont " +"servies par des classes :dfn:`handler`. Vous pouvez créer votre propre " +"classe de destination si vous avez des besoins spéciaux qui ne sont couverts " +"par aucune classe *handler* prédéfinie." + +#: howto/logging.rst:393 +msgid "" +"By default, no destination is set for any logging messages. You can specify " +"a destination (such as console or file) by using :func:`basicConfig` as in " +"the tutorial examples. If you call the functions :func:`debug`, :func:" +"`info`, :func:`warning`, :func:`error` and :func:`critical`, they will check " +"to see if no destination is set; and if one is not set, they will set a " +"destination of the console (``sys.stderr``) and a default format for the " +"displayed message before delegating to the root logger to do the actual " +"message output." +msgstr "" +"Par défaut, aucune destination n'est prédéfinie pour les messages de " +"journalisation. Vous pouvez définir une destination (comme la console ou un " +"fichier) en utilisant :func:`basicConfig` comme dans les exemples donnés " +"dans le tutoriel. Si vous appelez les fonctions :func:`debug`, :func:" +"`info`, :func:`warning`, :func:`error` et :func:`critical`, celles-ci " +"vérifient si une destination a été définie ; si ce n'est pas le cas, la " +"destination est assignée à la console (``sys.stderr``) avec un format par " +"défaut pour le message affiché, avant d'être déléguée au *logger* racine, " +"qui sort le message." + +#: howto/logging.rst:401 +msgid "The default format set by :func:`basicConfig` for messages is:" +msgstr "" +"Le format par défaut des messages est défini par :func:`basicConfig` comme " +"suit ::" + +#: howto/logging.rst:407 +msgid "" +"You can change this by passing a format string to :func:`basicConfig` with " +"the *format* keyword argument. For all options regarding how a format string " +"is constructed, see :ref:`formatter-objects`." +msgstr "" +"Vous pouvez modifier ce comportement en passant une chaîne de formatage à :" +"func:`basicConfig` par l'argument nommé *format*. Consultez :ref:`formatter-" +"objects` pour toutes les options de construction de cette chaîne de " +"formatage." + +#: howto/logging.rst:412 +msgid "Logging Flow" +msgstr "Flux du processus de journalisation" + +#: howto/logging.rst:414 +msgid "" +"The flow of log event information in loggers and handlers is illustrated in " +"the following diagram." +msgstr "" +"Le flux des informations associées à un évènement dans les *loggers* et les " +"*handlers* est illustré dans le diagramme suivant." + +#: howto/logging.rst:420 +msgid "Loggers" +msgstr "Loggers" + +#: howto/logging.rst:422 +msgid "" +":class:`Logger` objects have a threefold job. First, they expose several " +"methods to application code so that applications can log messages at " +"runtime. Second, logger objects determine which log messages to act upon " +"based upon severity (the default filtering facility) or filter objects. " +"Third, logger objects pass along relevant log messages to all interested log " +"handlers." +msgstr "" +"Les objets de classe :class:`Logger` ont un rôle triple. Premièrement, ils " +"exposent plusieurs méthodes au code de l'application, de manière à ce " +"qu'elle puisse enregistrer des messages en cours d'exécution. Deuxièmement, " +"les objets *logger* déterminent sur quel message agir selon leur sévérité (à " +"partir des filtres par défaut) ou selon les objets *filter* associés. " +"Troisièmement, les objets *logger* transmettent les messages pertinents à " +"tous les *handlers* concernés." + +#: howto/logging.rst:428 +msgid "" +"The most widely used methods on logger objects fall into two categories: " +"configuration and message sending." +msgstr "" +"Les méthodes des objets *logger* les plus utilisées appartiennent à deux " +"catégories : la configuration et l'envoi de messages." + +#: howto/logging.rst:431 +msgid "These are the most common configuration methods:" +msgstr "Voici les méthodes de configuration les plus communes :" + +#: howto/logging.rst:433 +msgid "" +":meth:`Logger.setLevel` specifies the lowest-severity log message a logger " +"will handle, where debug is the lowest built-in severity level and critical " +"is the highest built-in severity. For example, if the severity level is " +"INFO, the logger will handle only INFO, WARNING, ERROR, and CRITICAL " +"messages and will ignore DEBUG messages." +msgstr "" +":meth:`Logger.setLevel` spécifie le plus bas niveau de sévérité qu'un " +"*logger* traitera. Ainsi, ``DEBUG`` est le niveau de sévérité défini par " +"défaut le plus bas et ``CRITICAL`` est le plus haut. Par exemple, si le " +"niveau de sévérité est ``INFO``, le *logger* ne traite que les messages de " +"niveau ``INFO``, ``WARNING``, ``ERROR`` et ``CRITICAL`` ; il ignore les " +"messages de niveau DEBUG." + +#: howto/logging.rst:439 +msgid "" +":meth:`Logger.addHandler` and :meth:`Logger.removeHandler` add and remove " +"handler objects from the logger object. Handlers are covered in more detail " +"in :ref:`handler-basic`." +msgstr "" +":meth:`Logger.addHandler` et :meth:`Logger.removeHandler` ajoutent ou " +"enlèvent des objets *handlers* au *logger*. Les objets *handlers* sont " +"expliqués plus en détail dans :ref:`handler-basic`." + +#: howto/logging.rst:443 +msgid "" +":meth:`Logger.addFilter` and :meth:`Logger.removeFilter` add and remove " +"filter objects from the logger object. Filters are covered in more detail " +"in :ref:`filter`." +msgstr "" +":meth:`Logger.addFilter` et :meth:`Logger.removeFilter` ajoutent ou enlèvent " +"des objets *filter* au *logger*. Les objets *filters* sont expliqués plus en " +"détail dans :ref:`filter`." + +#: howto/logging.rst:447 +msgid "" +"You don't need to always call these methods on every logger you create. See " +"the last two paragraphs in this section." +msgstr "" +"Comme nous l'expliquons aux deux derniers paragraphes de cette section, vous " +"n'avez pas besoin de faire appel à ces méthodes à chaque fois que vous créez " +"un *logger*." + +#: howto/logging.rst:450 +msgid "" +"With the logger object configured, the following methods create log messages:" +msgstr "" +"Une fois que l'objet *logger* est correctement configuré, les méthodes " +"suivantes permettent de créer un message :" + +#: howto/logging.rst:452 +msgid "" +":meth:`Logger.debug`, :meth:`Logger.info`, :meth:`Logger.warning`, :meth:" +"`Logger.error`, and :meth:`Logger.critical` all create log records with a " +"message and a level that corresponds to their respective method names. The " +"message is actually a format string, which may contain the standard string " +"substitution syntax of ``%s``, ``%d``, ``%f``, and so on. The rest of their " +"arguments is a list of objects that correspond with the substitution fields " +"in the message. With regard to ``**kwargs``, the logging methods care only " +"about a keyword of ``exc_info`` and use it to determine whether to log " +"exception information." +msgstr "" +"Les méthodes :meth:`Logger.debug`, :meth:`Logger.info`, :meth:`Logger." +"warning`, :meth:`Logger.error` et :meth:`Logger.critical` créent des entrées " +"de journal avec un message et un niveau correspondant à leur nom. Le message " +"est en fait une chaîne de caractères qui peut contenir la syntaxe standard " +"de substitution de chaînes de caractères : ``%s``, ``%d``, ``%f``, etc. " +"L'argument suivant est une liste des objets correspondant aux champs à " +"substituer dans le message. En ce qui concerne ``**kwargs``, les méthodes de " +"``logging`` ne tiennent compte que du mot clef ``exc_info`` et l'utilisent " +"pour déterminer s'il faut enregistrer les informations associées à une " +"exception." + +#: howto/logging.rst:462 +msgid "" +":meth:`Logger.exception` creates a log message similar to :meth:`Logger." +"error`. The difference is that :meth:`Logger.exception` dumps a stack trace " +"along with it. Call this method only from an exception handler." +msgstr "" +":meth:`Logger.exception` crée un message similaire à :meth:`Logger.error`. " +"La différence est que :meth:`Logger.exception` ajoute la trace de la pile " +"d'exécution au message. On ne peut appeler cette méthode qu'à l'intérieur " +"d'un bloc de gestion d'exception." + +#: howto/logging.rst:466 +msgid "" +":meth:`Logger.log` takes a log level as an explicit argument. This is a " +"little more verbose for logging messages than using the log level " +"convenience methods listed above, but this is how to log at custom log " +"levels." +msgstr "" +":meth:`Logger.log` prend le niveau de sévérité comme argument explicite. " +"C'est un peu plus verbeux pour enregistrer des messages que d'utiliser les " +"méthodes plus pratiques décrites si dessus, mais c'est ce qui permet " +"d'enregistrer des messages pour des niveaux de sévérité définis par " +"l'utilisateur." + +#: howto/logging.rst:470 +msgid "" +":func:`getLogger` returns a reference to a logger instance with the " +"specified name if it is provided, or ``root`` if not. The names are period-" +"separated hierarchical structures. Multiple calls to :func:`getLogger` with " +"the same name will return a reference to the same logger object. Loggers " +"that are further down in the hierarchical list are children of loggers " +"higher up in the list. For example, given a logger with a name of ``foo``, " +"loggers with names of ``foo.bar``, ``foo.bar.baz``, and ``foo.bam`` are all " +"descendants of ``foo``." +msgstr "" +":func:`getLogger` renvoie une référence à un objet *logger* du nom spécifié " +"si celui-ci est donné en argument. Dans le cas contraire, se sera le *logger " +"root*. Ces noms sont des structures hiérarchiques séparées par des points. " +"Des appels répétés à :func:`getLogger` avec le même nom renvoient une " +"référence au même objet *logger*. Les *loggers* qui sont plus bas dans cette " +"liste hiérarchique sont des enfants des *loggers* plus haut dans la liste. " +"Par exemple, si un *logger* a le nom ``foo``, les *loggers* avec les noms " +"``foo.bar``, ``foo.bar.baz``, et ``foo.bam`` sont tous des descendants de " +"``foo``." + +#: howto/logging.rst:478 +msgid "" +"Loggers have a concept of *effective level*. If a level is not explicitly " +"set on a logger, the level of its parent is used instead as its effective " +"level. If the parent has no explicit level set, *its* parent is examined, " +"and so on - all ancestors are searched until an explicitly set level is " +"found. The root logger always has an explicit level set (``WARNING`` by " +"default). When deciding whether to process an event, the effective level of " +"the logger is used to determine whether the event is passed to the logger's " +"handlers." +msgstr "" +"On associe aux *loggers* un concept de *niveau effectif*. Si aucun niveau " +"n'est explicitement défini pour un *logger*, c'est le niveau du parent qui " +"est utilisé comme niveau effectif. Si le parent n'a pas de niveau défini, " +"c'est celui de *son* parent qui est considéré, et ainsi de suite ; on " +"examine tous les ancêtres jusqu'à ce qu'un niveau explicite soit trouvé. Le " +"*logger root* a toujours un niveau explicite (``WARNING`` par défaut). Quand " +"le *logger* traite un événement, c'est ce niveau effectif qui est utilisé " +"pour déterminer si cet événement est transmis à ses *handlers*." + +#: howto/logging.rst:486 +msgid "" +"Child loggers propagate messages up to the handlers associated with their " +"ancestor loggers. Because of this, it is unnecessary to define and configure " +"handlers for all the loggers an application uses. It is sufficient to " +"configure handlers for a top-level logger and create child loggers as " +"needed. (You can, however, turn off propagation by setting the *propagate* " +"attribute of a logger to ``False``.)" +msgstr "" +"Les *loggers* fils font remonter leurs messages aux *handlers* associés à " +"leurs *loggers* parents. De ce fait, il n'est pas nécessaire de définir et " +"configurer des *handlers* pour tous les *loggers* employés par une " +"application. Il suffit de configurer les *handlers* pour un *logger* de haut " +"niveau et de créer des *loggers* fils quand c'est nécessaire (on peut " +"cependant empêcher la propagation aux ancêtres des messages en donnant la " +"valeur ``False`` à l'attribut *propagate* d'un *logger*)." + +#: howto/logging.rst:497 +msgid "Handlers" +msgstr "Handlers" + +#: howto/logging.rst:499 +msgid "" +":class:`~logging.Handler` objects are responsible for dispatching the " +"appropriate log messages (based on the log messages' severity) to the " +"handler's specified destination. :class:`Logger` objects can add zero or " +"more handler objects to themselves with an :meth:`~Logger.addHandler` " +"method. As an example scenario, an application may want to send all log " +"messages to a log file, all log messages of error or higher to stdout, and " +"all messages of critical to an email address. This scenario requires three " +"individual handlers where each handler is responsible for sending messages " +"of a specific severity to a specific location." +msgstr "" +"Les objets de type :class:`~logging.Handler` sont responsables de la " +"distribution des messages (selon leur niveau de sévérité) vers les " +"destinations spécifiées pour ce *handler*. Les objets :class:`Logger` " +"peuvent ajouter des objets *handler* à eux-mêmes en appelant :meth:`~Logger." +"addHandler`. Pour donner un exemple, une application peut envoyer tous les " +"messages dans un fichier journal, tous les messages de niveau ``ERROR`` ou " +"supérieur vers la sortie standard, et tous les messages de niveau " +"``CRITICAL`` vers une adresse de courriel. Dans ce scénario, nous avons " +"besoin de trois *handlers*, responsable chacun d'envoyer des messages d'une " +"sévérité donnée vers une destination donnée." + +#: howto/logging.rst:509 +msgid "" +"The standard library includes quite a few handler types (see :ref:`useful-" +"handlers`); the tutorials use mainly :class:`StreamHandler` and :class:" +"`FileHandler` in its examples." +msgstr "" +"La bibliothèque standard inclut déjà un bon nombre de types de gestionnaires " +"(voir :ref:`useful-handlers`) ; le tutoriel utilise surtout :class:" +"`StreamHandler` et :class:`FileHandler` dans ses exemples." + +#: howto/logging.rst:513 +msgid "" +"There are very few methods in a handler for application developers to " +"concern themselves with. The only handler methods that seem relevant for " +"application developers who are using the built-in handler objects (that is, " +"not creating custom handlers) are the following configuration methods:" +msgstr "" +"Peu de méthodes des objets *handlers* sont intéressantes pour les " +"développeurs. Les seules méthodes intéressantes lorsqu'on utilise les objets " +"*handlers* natifs (c'est à dire si l'on ne crée pas de *handler* " +"personnalisé) sont les méthodes de configuration suivantes :" + +#: howto/logging.rst:518 +msgid "" +"The :meth:`~Handler.setLevel` method, just as in logger objects, specifies " +"the lowest severity that will be dispatched to the appropriate destination. " +"Why are there two :func:`setLevel` methods? The level set in the logger " +"determines which severity of messages it will pass to its handlers. The " +"level set in each handler determines which messages that handler will send " +"on." +msgstr "" +"La méthode :meth:`~Handler.setLevel`, comme celle des objets *logger* permet " +"de spécifier le plus bas niveau de sévérité qui sera distribué à la " +"destination appropriée. Pourquoi y a-t-il deux méthodes :func:`setLevel` ? " +"Le niveau défini dans le *logger* détermine quelle sévérité doit avoir un " +"message pour être transmis à ses *handlers*. Le niveau mis pour chaque " +"*handler* détermine quels messages seront envoyés aux destinations." + +#: howto/logging.rst:524 +msgid "" +":meth:`~Handler.setFormatter` selects a Formatter object for this handler to " +"use." +msgstr "" +":meth:`~Handler.setFormatter` sélectionne l'objet ``Formatter`` utilisé par " +"ce ``handler``." + +#: howto/logging.rst:527 +msgid "" +":meth:`~Handler.addFilter` and :meth:`~Handler.removeFilter` respectively " +"configure and deconfigure filter objects on handlers." +msgstr "" +":meth:`~Handler.addFilter` et :meth:`~Handler.removeFilter` configurent et " +"respectivement dé-configurent des objets *filter* sur les *handlers*." + +#: howto/logging.rst:530 +msgid "" +"Application code should not directly instantiate and use instances of :class:" +"`Handler`. Instead, the :class:`Handler` class is a base class that defines " +"the interface that all handlers should have and establishes some default " +"behavior that child classes can use (or override)." +msgstr "" +"Le code d'une application ne devrait ni instancier, ni utiliser d'instances " +"de la classe :class:`Handler`. La classe :class:`Handler` est plutôt d'une " +"classe de base qui définit l'interface que tous les gestionnaires doivent " +"avoir et établit les comportements par défaut que les classes filles peuvent " +"employer (ou redéfinir)." + +#: howto/logging.rst:537 +msgid "Formatters" +msgstr "Formatters" + +#: howto/logging.rst:539 +msgid "" +"Formatter objects configure the final order, structure, and contents of the " +"log message. Unlike the base :class:`logging.Handler` class, application " +"code may instantiate formatter classes, although you could likely subclass " +"the formatter if your application needs special behavior. The constructor " +"takes three optional arguments -- a message format string, a date format " +"string and a style indicator." +msgstr "" +"Les objets *formatter* configurent l'ordre final, la structure et le contenu " +"du message. Contrairement à la classe de base :class:`logging.Handler`, le " +"code d'une application peut instancier un objet de classe *formatter*, même " +"si vous pouvez toujours sous-classer *formatter* si vous avez besoin d'un " +"comportement spécial dans votre application. Le constructeur a trois " +"arguments optionnels : une chaîne de formatage du message, un chaîne de " +"formatage de la date et un indicateur de style." + +#: howto/logging.rst:548 +msgid "" +"If there is no message format string, the default is to use the raw " +"message. If there is no date format string, the default date format is:" +msgstr "" +"S'il n'y a pas de chaîne de formatage, la chaîne brute est utilisée par " +"défaut. S'il n'y a pas de chaîne de formatage de date, le format de date par " +"défaut est :" + +#: howto/logging.rst:555 +#, fuzzy +msgid "" +"with the milliseconds tacked on at the end. The ``style`` is one of ``'%'``, " +"``'{'``, or ``'$'``. If one of these is not specified, then ``'%'`` will be " +"used." +msgstr "" +"avec les millisecondes en suffixe. Le ``style`` est ``%``, ``{`` ou ``$``. " +"Si aucun n'est spécifié, ``%`` sera utilisé." + +#: howto/logging.rst:558 +#, fuzzy +msgid "" +"If the ``style`` is ``'%'``, the message format string uses ``%()s`` styled string substitution; the possible keys are documented in :" +"ref:`logrecord-attributes`. If the style is ``'{'``, the message format " +"string is assumed to be compatible with :meth:`str.format` (using keyword " +"arguments), while if the style is ``'$'`` then the message format string " +"should conform to what is expected by :meth:`string.Template.substitute`." +msgstr "" +"Si l'argument ``style`` est ``%``, la chaîne de formatage utilise ``%()s`` comme style de substitution de chaîne de caractères ; " +"les clefs possibles sont documentées dans :ref:`logrecord-attributes`. Si le " +"style est ``{``, le message de la chaîne de formatage est compatible avec :" +"meth:`str.format` (en employant des arguments à mots clefs). Enfin si le " +"style est ``$`` alors la chaîne de formatage du message doit être conforme à " +"ce qui est attendu de :meth:`string.Template.substitute`." + +#: howto/logging.rst:565 +msgid "Added the ``style`` parameter." +msgstr "Ajout du paramètre ``style``." + +#: howto/logging.rst:568 +msgid "" +"The following message format string will log the time in a human-readable " +"format, the severity of the message, and the contents of the message, in " +"that order::" +msgstr "" +"La chaîne de formatage de message suivante enregistrera le temps dans un " +"format lisible par les humains, la sévérité du message et son contenu, dans " +"cet ordre ::" + +#: howto/logging.rst:574 +msgid "" +"Formatters use a user-configurable function to convert the creation time of " +"a record to a tuple. By default, :func:`time.localtime` is used; to change " +"this for a particular formatter instance, set the ``converter`` attribute of " +"the instance to a function with the same signature as :func:`time.localtime` " +"or :func:`time.gmtime`. To change it for all formatters, for example if you " +"want all logging times to be shown in GMT, set the ``converter`` attribute " +"in the Formatter class (to ``time.gmtime`` for GMT display)." +msgstr "" +"Les *formatters* emploient une fonction configurable par l'utilisateur pour " +"convertir le temps de création d'une entrée de journal en un *n*-uplet. Par " +"défaut, :func:`time.localtime` est employé ; pour changer cela pour une " +"instance particulière de *formatter*, assignez une fonction avec la même " +"signature que :func:`time.localtime` ou :func:`time.gmtime` à l'attribut " +"``converter`` de cette instance. Pour changer cela pour tous les " +"*formatters*, par exemple si vous voulez que tous votre horodatage soit " +"affiché en GMT, changez l'attribut ``converter`` de la classe ``Formatter`` " +"en ``time.gmtime``." + +#: howto/logging.rst:584 +msgid "Configuring Logging" +msgstr "Configuration de ``logging``" + +#: howto/logging.rst:588 +msgid "Programmers can configure logging in three ways:" +msgstr "On peut configurer ``logging`` de trois façons :" + +#: howto/logging.rst:590 +msgid "" +"Creating loggers, handlers, and formatters explicitly using Python code that " +"calls the configuration methods listed above." +msgstr "" +"Créer des *loggers*, *handlers* et *formatters* explicitement en utilisant " +"du code Python qui appelle les méthodes de configuration listées ci-dessus." + +#: howto/logging.rst:592 +msgid "" +"Creating a logging config file and reading it using the :func:`fileConfig` " +"function." +msgstr "" +"Créer un fichier de configuration de ``logging`` et le lire en employant la " +"fonction :func:`fileConfig`." + +#: howto/logging.rst:594 +msgid "" +"Creating a dictionary of configuration information and passing it to the :" +"func:`dictConfig` function." +msgstr "" +"Créer un dictionnaire d'informations de configuration et le passer à la " +"fonction :func:`dictConfig`." + +#: howto/logging.rst:597 +msgid "" +"For the reference documentation on the last two options, see :ref:`logging-" +"config-api`. The following example configures a very simple logger, a " +"console handler, and a simple formatter using Python code::" +msgstr "" +"Pour la documentation de référence de ces deux dernières options, voyez :ref:" +"`logging-config-api`. L'exemple suivant configure un *logger* très simple, " +"un *handler* employant la console, et un *formatter* simple en utilisant du " +"code Python ::" + +#: howto/logging.rst:627 +msgid "" +"Running this module from the command line produces the following output:" +msgstr "" +"L'exécution de ce module via la ligne de commande produit la sortie " +"suivante :" + +#: howto/logging.rst:638 +msgid "" +"The following Python module creates a logger, handler, and formatter nearly " +"identical to those in the example listed above, with the only difference " +"being the names of the objects::" +msgstr "" +"Le module Python suivant crée un *logger*, un *handler* et un *formatter* " +"identiques à ceux de l'exemple détaillé au-dessus, au nom des objets près ::" + +#: howto/logging.rst:657 +msgid "Here is the logging.conf file:" +msgstr "Voici le fichier *logging.conf* :" + +#: howto/logging.rst:689 +msgid "" +"The output is nearly identical to that of the non-config-file-based example:" +msgstr "" +"La sortie est presque identique à celle de l'exemple qui n'est pas basé sur " +"un fichier de configuration :" + +#: howto/logging.rst:700 +msgid "" +"You can see that the config file approach has a few advantages over the " +"Python code approach, mainly separation of configuration and code and the " +"ability of noncoders to easily modify the logging properties." +msgstr "" +"Vous pouvez constatez les avantages de l'approche par fichier de " +"configuration par rapport à celle du code Python, principalement la " +"séparation de la configuration et du code, et la possibilité pour une " +"personne qui ne code pas de modifier facilement les propriétés de " +"``logging``." + +#: howto/logging.rst:704 +msgid "" +"The :func:`fileConfig` function takes a default parameter, " +"``disable_existing_loggers``, which defaults to ``True`` for reasons of " +"backward compatibility. This may or may not be what you want, since it will " +"cause any non-root loggers existing before the :func:`fileConfig` call to be " +"disabled unless they (or an ancestor) are explicitly named in the " +"configuration. Please refer to the reference documentation for more " +"information, and specify ``False`` for this parameter if you wish." +msgstr "" +"La fonction :func:`fileConfig` accepte un paramètre par défaut " +"``disable_existing_loggers``, qui vaut ``True`` par défaut pour des raisons " +"de compatibilité ascendante. Ce n'est pas forcément ce que vous souhaitez : " +"en effet, tous les *loggers* créés avant l'appel à :func:`fileConfig` seront " +"désactivés sauf si eux-mêmes (ou l'un de leurs parents) sont explicitement " +"nommés dans le fichier de configuration. Veuillez vous rapporter à la " +"documentation pour plus de détails, et donner la valeur ``False`` à ce " +"paramètre si vous le souhaitez." + +#: howto/logging.rst:712 +msgid "" +"The dictionary passed to :func:`dictConfig` can also specify a Boolean value " +"with key ``disable_existing_loggers``, which if not specified explicitly in " +"the dictionary also defaults to being interpreted as ``True``. This leads to " +"the logger-disabling behaviour described above, which may not be what you " +"want - in which case, provide the key explicitly with a value of ``False``." +msgstr "" +"Le dictionnaire passé à :func:`dictConfig` peut aussi spécifier une valeur " +"Booléenne pour la clef ``disable_existing_loggers``. Si cette valeur n'est " +"pas donnée, elle est interprétée comme vraie par défaut. Cela conduit au " +"comportement de désactivation des *loggers* décrit ci-dessus, qui n'est pas " +"forcément celui que vous souhaitez ; dans ce cas, donnez explicitement la " +"valeur ``False`` à cette clef." + +#: howto/logging.rst:722 +msgid "" +"Note that the class names referenced in config files need to be either " +"relative to the logging module, or absolute values which can be resolved " +"using normal import mechanisms. Thus, you could use either :class:`~logging." +"handlers.WatchedFileHandler` (relative to the logging module) or ``mypackage." +"mymodule.MyHandler`` (for a class defined in package ``mypackage`` and " +"module ``mymodule``, where ``mypackage`` is available on the Python import " +"path)." +msgstr "" +"Notez que les noms de classe référencés dans le fichier de configuration " +"doivent être relatifs au module ``logging``, ou des valeurs absolues qui " +"peuvent être résolues à travers les mécanismes d'importation habituels. " +"Ainsi, on peut soit utiliser :class:`~logging.handlers.WatchedFileHandler` " +"(relativement au module ``logging``) ou ``mypackage.mymodule.MyHandler`` " +"(pour une classe définie dans le paquet ``mypackage`` et le module " +"``mymodule``, si ``mypackage`` est disponible dans les chemins d'importation " +"de Python)." + +#: howto/logging.rst:730 +msgid "" +"In Python 3.2, a new means of configuring logging has been introduced, using " +"dictionaries to hold configuration information. This provides a superset of " +"the functionality of the config-file-based approach outlined above, and is " +"the recommended configuration method for new applications and deployments. " +"Because a Python dictionary is used to hold configuration information, and " +"since you can populate that dictionary using different means, you have more " +"options for configuration. For example, you can use a configuration file in " +"JSON format, or, if you have access to YAML processing functionality, a file " +"in YAML format, to populate the configuration dictionary. Or, of course, you " +"can construct the dictionary in Python code, receive it in pickled form over " +"a socket, or use whatever approach makes sense for your application." +msgstr "" +"Dans Python 3.2, un nouveau moyen de configuration de la journalisation a " +"été introduit, à l'aide de dictionnaires pour contenir les informations de " +"configuration. Cela fournit un sur-ensemble de la fonctionnalité décrite ci-" +"dessus basée sur un fichier de configuration et c’est la méthode recommandée " +"pour les nouvelles applications et les déploiements. Étant donné qu'un " +"dictionnaire Python est utilisé pour contenir des informations de " +"configuration et que vous pouvez remplir ce dictionnaire à l'aide de " +"différents moyens, vous avez plus d'options pour la configuration. Par " +"exemple, vous pouvez utiliser un fichier de configuration au format JSON ou, " +"si vous avez accès à la fonctionnalité de traitement YAML, un fichier au " +"format YAML, pour remplir le dictionnaire de configuration. Ou bien sûr, " +"vous pouvez construire le dictionnaire dans le code Python, le recevoir sous " +"forme de *pickle* sur un connecteur, ou utiliser n'importe quelle approche " +"suivant la logique de votre application." + +#: howto/logging.rst:742 +msgid "" +"Here's an example of the same configuration as above, in YAML format for the " +"new dictionary-based approach:" +msgstr "" +"Voici un exemple définissant la même configuration que ci-dessus, au format " +"YAML pour le dictionnaire correspondant à cette nouvelle approche :" + +#: howto/logging.rst:766 +msgid "" +"For more information about logging using a dictionary, see :ref:`logging-" +"config-api`." +msgstr "" +"Pour plus d'informations sur la journalisation à l'aide d'un dictionnaire, " +"consultez :ref:`logging-config-api`." + +#: howto/logging.rst:770 +msgid "What happens if no configuration is provided" +msgstr "Comportement par défaut (si aucune configuration n'est fournie)" + +#: howto/logging.rst:772 +msgid "" +"If no logging configuration is provided, it is possible to have a situation " +"where a logging event needs to be output, but no handlers can be found to " +"output the event. The behaviour of the logging package in these " +"circumstances is dependent on the Python version." +msgstr "" +"Si aucune configuration de journalisation n'est fournie, il est possible " +"d'avoir une situation où un événement doit faire l'objet d'une " +"journalisation, mais où aucun gestionnaire ne peut être trouvé pour tracer " +"l'événement. Le comportement du paquet ```logging``` dans ces circonstances " +"dépend de la version Python." + +#: howto/logging.rst:777 +msgid "For versions of Python prior to 3.2, the behaviour is as follows:" +msgstr "" +"Pour les versions de Python antérieures à 3.2, le comportement est le " +"suivant :" + +#: howto/logging.rst:779 +msgid "" +"If *logging.raiseExceptions* is ``False`` (production mode), the event is " +"silently dropped." +msgstr "" +"Si *logging.raiseExceptions* vaut ``False`` (mode production), l’événement " +"est silencieusement abandonné." + +#: howto/logging.rst:782 +msgid "" +"If *logging.raiseExceptions* is ``True`` (development mode), a message 'No " +"handlers could be found for logger X.Y.Z' is printed once." +msgstr "" +"Si *logging.raiseExceptions* vaut ``True`` (mode de développement), un " +"message *No handlers could be found for logger X.Y.Z* est écrit sur la " +"sortie standard une fois." + +#: howto/logging.rst:785 +msgid "In Python 3.2 and later, the behaviour is as follows:" +msgstr "Dans Python 3.2 et ultérieur, le comportement est le suivant :" + +#: howto/logging.rst:787 +msgid "" +"The event is output using a 'handler of last resort', stored in ``logging." +"lastResort``. This internal handler is not associated with any logger, and " +"acts like a :class:`~logging.StreamHandler` which writes the event " +"description message to the current value of ``sys.stderr`` (therefore " +"respecting any redirections which may be in effect). No formatting is done " +"on the message - just the bare event description message is printed. The " +"handler's level is set to ``WARNING``, so all events at this and greater " +"severities will be output." +msgstr "" +"L'événement est sorti à l'aide d'un « gestionnaire de dernier recours », " +"stocké dans ``logging.lastResort``. Ce gestionnaire interne n'est associé à " +"aucun enregistreur et agit comme un :class:`~logging.StreamHandler` qui " +"écrit le message de description de l'événement vers la valeur actuelle de " +"``sys.stderr`` (par conséquent, en respectant les redirections qui peuvent " +"être en vigueur). Aucun formatage n'est fait sur le message – juste le " +"message de description de l'événement nu est affiché. Le niveau du " +"gestionnaire est défini sur ``WARNING``, de sorte que tous les événements de " +"cette sévérité et plus seront écrits." + +#: howto/logging.rst:796 +msgid "" +"To obtain the pre-3.2 behaviour, ``logging.lastResort`` can be set to " +"``None``." +msgstr "" +"Pour obtenir un comportement antérieur à 3.2, ``logging.lastResort`` peut " +"être mis à ``None``." + +#: howto/logging.rst:801 +msgid "Configuring Logging for a Library" +msgstr "Configuration de la journalisation pour une bibliothèque" + +#: howto/logging.rst:803 +msgid "" +"When developing a library which uses logging, you should take care to " +"document how the library uses logging - for example, the names of loggers " +"used. Some consideration also needs to be given to its logging " +"configuration. If the using application does not use logging, and library " +"code makes logging calls, then (as described in the previous section) events " +"of severity ``WARNING`` and greater will be printed to ``sys.stderr``. This " +"is regarded as the best default behaviour." +msgstr "" +"Lors du développement d'une bibliothèque qui utilise la journalisation, vous " +"devez prendre soin de documenter la façon dont la bibliothèque utilise la " +"journalisation (par exemple, les noms des enregistreurs utilisés). Consacrez " +"aussi un peu de temps à la configuration de la journalisation. Si " +"l'application utilisant votre bibliothèque n'utilise pas la journalisation " +"et que le code de la bibliothèque effectue des appels de journalisation, " +"alors (comme décrit dans la section précédente), les événements de gravité " +"``WARNING`` et au-dessus seront écrits sur ``sys.stderr``. Cela est " +"considéré comme le meilleur comportement par défaut." + +#: howto/logging.rst:811 +msgid "" +"If for some reason you *don't* want these messages printed in the absence of " +"any logging configuration, you can attach a do-nothing handler to the top-" +"level logger for your library. This avoids the message being printed, since " +"a handler will always be found for the library's events: it just doesn't " +"produce any output. If the library user configures logging for application " +"use, presumably that configuration will add some handlers, and if levels are " +"suitably configured then logging calls made in library code will send output " +"to those handlers, as normal." +msgstr "" +"Si, pour une raison quelconque, vous ne voulez *pas* que ces messages soient " +"affichés en l'absence de toute configuration de journalisation, vous pouvez " +"attacher un gestionnaire *ne-fait-rien* à l'enregistreur de niveau supérieur " +"de votre bibliothèque. Cela évite qu’un message ne soit écrit, puisqu’un " +"gestionnaire sera toujours trouvé pour les événements de la bibliothèque, il " +"ne produit tout simplement pas de sortie. Si celui qui utilise la " +"bibliothèque configure la journalisation pour son application, il est " +"vraisemblable que la configuration ajoutera certains gestionnaires et, si " +"les niveaux sont convenablement configurés, alors la journalisation des " +"appels effectués dans le code de bibliothèque enverra la sortie à ces " +"gestionnaires, comme d'habitude." + +#: howto/logging.rst:820 +msgid "" +"A do-nothing handler is included in the logging package: :class:`~logging." +"NullHandler` (since Python 3.1). An instance of this handler could be added " +"to the top-level logger of the logging namespace used by the library (*if* " +"you want to prevent your library's logged events being output to ``sys." +"stderr`` in the absence of logging configuration). If all logging by a " +"library *foo* is done using loggers with names matching 'foo.x', 'foo.x.y', " +"etc. then the code::" +msgstr "" +"Un gestionnaire *ne-fait-rien* est inclus dans le paquet de " +"journalisation : :class:`~logging.NullHandler` (depuis Python 3.1). Une " +"instance de ce gestionnaire peut être ajoutée à l'enregistreur de niveau " +"supérieur de l'espace de nommage de journalisation utilisé par la " +"bibliothèque (*si* vous souhaitez empêcher la copie de la journalisation de " +"votre bibliothèque dans ``sys.stderr`` en l'absence de configuration de " +"journalisation). Si toute la journalisation par une bibliothèque *foo* est " +"effectuée en utilisant des enregistreurs avec des noms correspondant à *foo." +"x*, *foo.x.y*, etc., alors le code ::" + +#: howto/logging.rst:831 +msgid "" +"should have the desired effect. If an organisation produces a number of " +"libraries, then the logger name specified can be 'orgname.foo' rather than " +"just 'foo'." +msgstr "" +"doit avoir l'effet désiré. Si une organisation produit un certain nombre de " +"bibliothèques, le nom de l'enregistreur spécifié peut être ``orgname.foo`` " +"plutôt que simplement ``foo``." + +#: howto/logging.rst:835 +msgid "" +"It is strongly advised that you *do not add any handlers other than* :class:" +"`~logging.NullHandler` *to your library's loggers*. This is because the " +"configuration of handlers is the prerogative of the application developer " +"who uses your library. The application developer knows their target audience " +"and what handlers are most appropriate for their application: if you add " +"handlers 'under the hood', you might well interfere with their ability to " +"carry out unit tests and deliver logs which suit their requirements." +msgstr "" +"Il est vivement conseillé de ne *pas ajouter de gestionnaires autres que* :" +"class:`~logging.NullHandler` *aux enregistreurs de votre bibliothèque*. Cela " +"est dû au fait que la configuration des gestionnaires est la prérogative du " +"développeur d'applications qui utilise votre bibliothèque. Le développeur " +"d'applications connaît le public cible et les gestionnaires les plus " +"appropriés pour ses applications : si vous ajoutez des gestionnaires « sous " +"le manteau », vous pourriez bien interférer avec les tests unitaires et la " +"journalisation qui convient à ses exigences." + +#: howto/logging.rst:846 +msgid "Logging Levels" +msgstr "Niveaux de journalisation" + +#: howto/logging.rst:848 +msgid "" +"The numeric values of logging levels are given in the following table. These " +"are primarily of interest if you want to define your own levels, and need " +"them to have specific values relative to the predefined levels. If you " +"define a level with the same numeric value, it overwrites the predefined " +"value; the predefined name is lost." +msgstr "" +"Les valeurs numériques des niveaux de journalisation sont données dans le " +"tableau suivant. Celles-ci n'ont d'intérêt que si vous voulez définir vos " +"propres niveaux, avec des valeurs spécifiques par rapport aux niveaux " +"prédéfinis. Si vous définissez un niveau avec la même valeur numérique, il " +"écrase la valeur prédéfinie ; le nom prédéfini est perdu." + +#: howto/logging.rst:855 +msgid "Numeric value" +msgstr "Valeur numérique" + +#: howto/logging.rst:857 +msgid "50" +msgstr "50" + +#: howto/logging.rst:859 +msgid "40" +msgstr "40" + +#: howto/logging.rst:861 +msgid "30" +msgstr "30" + +#: howto/logging.rst:863 +msgid "20" +msgstr "20" + +#: howto/logging.rst:865 +msgid "10" +msgstr "10" + +#: howto/logging.rst:867 +msgid "``NOTSET``" +msgstr "``NOTSET``" + +#: howto/logging.rst:867 +msgid "0" +msgstr "0" + +#: howto/logging.rst:870 +msgid "" +"Levels can also be associated with loggers, being set either by the " +"developer or through loading a saved logging configuration. When a logging " +"method is called on a logger, the logger compares its own level with the " +"level associated with the method call. If the logger's level is higher than " +"the method call's, no logging message is actually generated. This is the " +"basic mechanism controlling the verbosity of logging output." +msgstr "" +"Les niveaux peuvent également être associés à des enregistreurs, étant " +"définis soit par le développeur, soit par le chargement d'une configuration " +"de journalisation enregistrée. Lorsqu'une méthode de journalisation est " +"appelée sur un enregistreur, l'enregistreur compare son propre niveau avec " +"le niveau associé à l'appel de méthode. Si le niveau de l'enregistreur est " +"supérieur à l'appel de méthode, aucun message de journalisation n'est " +"réellement généré. C'est le mécanisme de base contrôlant la verbosité de la " +"sortie de journalisation." + +#: howto/logging.rst:877 +msgid "" +"Logging messages are encoded as instances of the :class:`~logging.LogRecord` " +"class. When a logger decides to actually log an event, a :class:`~logging." +"LogRecord` instance is created from the logging message." +msgstr "" +"Les messages de journalisation sont codés en tant qu'instances de :class:" +"`~logging.LogRecord`. Lorsqu'un enregistreur décide de réellement " +"enregistrer un événement, une instance de :class:`~logging.LogRecord` est " +"créée à partir du message de journalisation." + +#: howto/logging.rst:881 +msgid "" +"Logging messages are subjected to a dispatch mechanism through the use of :" +"dfn:`handlers`, which are instances of subclasses of the :class:`Handler` " +"class. Handlers are responsible for ensuring that a logged message (in the " +"form of a :class:`LogRecord`) ends up in a particular location (or set of " +"locations) which is useful for the target audience for that message (such as " +"end users, support desk staff, system administrators, developers). Handlers " +"are passed :class:`LogRecord` instances intended for particular " +"destinations. Each logger can have zero, one or more handlers associated " +"with it (via the :meth:`~Logger.addHandler` method of :class:`Logger`). In " +"addition to any handlers directly associated with a logger, *all handlers " +"associated with all ancestors of the logger* are called to dispatch the " +"message (unless the *propagate* flag for a logger is set to a false value, " +"at which point the passing to ancestor handlers stops)." +msgstr "" +"Les messages de journalisation sont soumis à un mécanisme d'expédition via " +"l'utilisation de :dfn:`handlers`, qui sont des instances de sous-classes de " +"la classe :class:`Handler`. Les gestionnaires sont chargés de s'assurer " +"qu'un message journalisé (sous la forme d'un :class:`LogRecord`) atterrit " +"dans un emplacement particulier (ou un ensemble d'emplacements) qui est " +"utile pour le public cible pour ce message (tels que les utilisateurs " +"finaux, le personnel chargé de l'assistance aux utilisateurs, les " +"administrateurs système ou les développeurs). Des instances de :class:" +"`LogRecord` adaptées à leur destination finale sont passées aux " +"gestionnaires destinées à des destinations particulières. Chaque " +"enregistreur peut avoir zéro, un ou plusieurs gestionnaires associés à celui-" +"ci (via la méthode :meth:`~Logger.addHandler` de :class:`Logger`). En plus " +"de tous les gestionnaires directement associés à un enregistreur, *tous les " +"gestionnaires associés à tous les ancêtres de l'enregistreur* sont appelés " +"pour envoyer le message (à moins que l'indicateur *propager* pour un " +"enregistreur soit défini sur la valeur ``False``, auquel cas le passage à " +"l'ancêtre gestionnaires s'arrête)." + +#: howto/logging.rst:895 +msgid "" +"Just as for loggers, handlers can have levels associated with them. A " +"handler's level acts as a filter in the same way as a logger's level does. " +"If a handler decides to actually dispatch an event, the :meth:`~Handler." +"emit` method is used to send the message to its destination. Most user-" +"defined subclasses of :class:`Handler` will need to override this :meth:" +"`~Handler.emit`." +msgstr "" +"Tout comme pour les enregistreurs, les gestionnaires peuvent avoir des " +"niveaux associés. Le niveau d'un gestionnaire agit comme un filtre de la " +"même manière que le niveau d'un enregistreur. Si un gestionnaire décide de " +"réellement distribuer un événement, la méthode :meth:`~Handler.emit` est " +"utilisée pour envoyer le message à sa destination. La plupart des sous-" +"classes définies par l'utilisateur de :class:`Handler` devront remplacer ce :" +"meth:`~Handler.emit`." + +#: howto/logging.rst:904 +msgid "Custom Levels" +msgstr "Niveaux personnalisés" + +#: howto/logging.rst:906 +msgid "" +"Defining your own levels is possible, but should not be necessary, as the " +"existing levels have been chosen on the basis of practical experience. " +"However, if you are convinced that you need custom levels, great care should " +"be exercised when doing this, and it is possibly *a very bad idea to define " +"custom levels if you are developing a library*. That's because if multiple " +"library authors all define their own custom levels, there is a chance that " +"the logging output from such multiple libraries used together will be " +"difficult for the using developer to control and/or interpret, because a " +"given numeric value might mean different things for different libraries." +msgstr "" +"La définition de vos propres niveaux est possible, mais ne devrait pas être " +"nécessaire, car les niveaux existants ont été choisis par expérience. " +"Cependant, si vous êtes convaincu que vous avez besoin de niveaux " +"personnalisés, prenez grand soin à leur réalisation et il est pratiquement " +"certain que c’est *une très mauvaise idée de définir des niveaux " +"personnalisés si vous développez une bibliothèque*. Car si plusieurs auteurs " +"de bibliothèque définissent tous leurs propres niveaux personnalisés, il y a " +"une chance que la sortie de journalisation de ces multiples bibliothèques " +"utilisées ensemble sera difficile pour le développeur à utiliser pour " +"contrôler et/ou interpréter, car une valeur numérique donnée peut signifier " +"des choses différentes pour différentes bibliothèques." + +#: howto/logging.rst:919 +msgid "Useful Handlers" +msgstr "Gestionnaires utiles" + +#: howto/logging.rst:921 +msgid "" +"In addition to the base :class:`Handler` class, many useful subclasses are " +"provided:" +msgstr "" +"En plus de la classe de base :class:`Handler`, de nombreuses sous-classes " +"utiles sont fournies :" + +#: howto/logging.rst:924 +msgid "" +":class:`StreamHandler` instances send messages to streams (file-like " +"objects)." +msgstr "" +"Les instances :class:`StreamHandler` envoient des messages aux flux (objets " +"de type fichier)." + +#: howto/logging.rst:927 +msgid ":class:`FileHandler` instances send messages to disk files." +msgstr "" +"Les instances :class:`FileHandler` envoient des messages à des fichiers sur " +"le disque." + +#: howto/logging.rst:929 +msgid "" +":class:`~handlers.BaseRotatingHandler` is the base class for handlers that " +"rotate log files at a certain point. It is not meant to be instantiated " +"directly. Instead, use :class:`~handlers.RotatingFileHandler` or :class:" +"`~handlers.TimedRotatingFileHandler`." +msgstr "" +":class:`~handlers.BaseRotatingHandler` est la classe de base pour les " +"gestionnaires qui assurent la rotation des fichiers de journalisation à " +"partir d’un certain point. Elle n'est pas destinée à être instanciée " +"directement. Utilisez plutôt :class:`~handlers.RotatingFileHandler` ou :" +"class:`~handlers.TimedRotatingFileHandler`." + +#: howto/logging.rst:934 +msgid "" +":class:`~handlers.RotatingFileHandler` instances send messages to disk " +"files, with support for maximum log file sizes and log file rotation." +msgstr "" +"Les instances :class:`~handlers.RotatingFileHandler` envoient des messages à " +"des fichiers sur le disque, avec la prise en charge des tailles maximales de " +"fichiers de journalisation et de la rotation des fichiers de journalisation." + +#: howto/logging.rst:937 +msgid "" +":class:`~handlers.TimedRotatingFileHandler` instances send messages to disk " +"files, rotating the log file at certain timed intervals." +msgstr "" +"Les instances de :class:`~handlers.TimedRotatingFileHandler` envoient des " +"messages aux fichiers de disque, en permutant le fichier journal à " +"intervalles réguliers." + +#: howto/logging.rst:940 +msgid "" +":class:`~handlers.SocketHandler` instances send messages to TCP/IP sockets. " +"Since 3.4, Unix domain sockets are also supported." +msgstr "" +"Les instances de :class:`~handlers.SocketHandler` envoient des messages aux " +"connecteurs TCP/IP. Depuis 3.4, les connecteurs UNIX sont également pris en " +"charge." + +#: howto/logging.rst:943 +msgid "" +":class:`~handlers.DatagramHandler` instances send messages to UDP sockets. " +"Since 3.4, Unix domain sockets are also supported." +msgstr "" +"Les instances de :class:`~handlers.DatagramHandler` envoient des messages " +"aux connecteurs UDP. Depuis 3.4, les connecteurs UNIX sont également pris en " +"charge." + +#: howto/logging.rst:946 +msgid "" +":class:`~handlers.SMTPHandler` instances send messages to a designated email " +"address." +msgstr "" +"Les instances de :class:`~handlers.SMTPHandler` envoient des messages à une " +"adresse e-mail désignée." + +#: howto/logging.rst:949 +msgid "" +":class:`~handlers.SysLogHandler` instances send messages to a Unix syslog " +"daemon, possibly on a remote machine." +msgstr "" +"Les instances de :class:`~handlers.SysLogHandler` envoient des messages à un " +"*daemon* *syslog* UNIX, éventuellement sur un ordinateur distant." + +#: howto/logging.rst:952 +msgid "" +":class:`~handlers.NTEventLogHandler` instances send messages to a Windows " +"NT/2000/XP event log." +msgstr "" +"Les instances de :class:`~handlers.NTEventLogHandler` envoient des messages " +"à un journal des événements Windows NT/2000/XP." + +#: howto/logging.rst:955 +msgid "" +":class:`~handlers.MemoryHandler` instances send messages to a buffer in " +"memory, which is flushed whenever specific criteria are met." +msgstr "" +"Les instances de :class:`~handlers.MemoryHandler` envoient des messages à un " +"tampon en mémoire, qui est vidé chaque fois que des critères spécifiques " +"sont remplis." + +#: howto/logging.rst:958 +msgid "" +":class:`~handlers.HTTPHandler` instances send messages to an HTTP server " +"using either ``GET`` or ``POST`` semantics." +msgstr "" +"Les instances de :class:`~handlers.HTTPHandler` envoient des messages à un " +"serveur HTTP à l'aide de la sémantique ``GET`` ou ``POST``." + +#: howto/logging.rst:961 +msgid "" +":class:`~handlers.WatchedFileHandler` instances watch the file they are " +"logging to. If the file changes, it is closed and reopened using the file " +"name. This handler is only useful on Unix-like systems; Windows does not " +"support the underlying mechanism used." +msgstr "" +"Les instances de :class:`~handlers.WatchedFileHandler` surveillent le " +"fichier sur lequel elles se connectent. Si le fichier change, il est fermé " +"et rouvert à l'aide du nom de fichier. Ce gestionnaire n'est utile que sur " +"les systèmes de type UNIX ; Windows ne prend pas en charge le mécanisme sous-" +"jacent utilisé." + +#: howto/logging.rst:966 +msgid "" +":class:`~handlers.QueueHandler` instances send messages to a queue, such as " +"those implemented in the :mod:`queue` or :mod:`multiprocessing` modules." +msgstr "" +"Les instances de :class:`~handlers.QueueHandler` envoient des messages à une " +"file d'attente, telles que celles implémentées dans les modules :mod:`queue` " +"ou :mod:`multiprocessing`." + +#: howto/logging.rst:969 +msgid "" +":class:`NullHandler` instances do nothing with error messages. They are used " +"by library developers who want to use logging, but want to avoid the 'No " +"handlers could be found for logger XXX' message which can be displayed if " +"the library user has not configured logging. See :ref:`library-config` for " +"more information." +msgstr "" +"Les instances :class:`NullHandler` ne font rien avec les messages d'erreur. " +"Ils sont utilisés par les développeurs de bibliothèques qui veulent utiliser " +"la journalisation, mais qui veulent éviter les messages de type *No handlers " +"could be found for logger XXX*, affiché si celui qui utilise la bibliothèque " +"n'a pas configuré la journalisation. Voir :ref:`library-config` pour plus " +"d'informations." + +#: howto/logging.rst:975 +msgid "The :class:`NullHandler` class." +msgstr "La classe :class:`NullHandler`." + +#: howto/logging.rst:978 +msgid "The :class:`~handlers.QueueHandler` class." +msgstr "La classe :class:`~handlers.QueueHandler`." + +#: howto/logging.rst:981 +msgid "" +"The :class:`NullHandler`, :class:`StreamHandler` and :class:`FileHandler` " +"classes are defined in the core logging package. The other handlers are " +"defined in a sub-module, :mod:`logging.handlers`. (There is also another sub-" +"module, :mod:`logging.config`, for configuration functionality.)" +msgstr "" +"Les classes :class:`NullHandler`, :class:`StreamHandler` et :class:" +"`FileHandler` sont définies dans le module de journalisation de base. Les " +"autres gestionnaires sont définis dans un sous-module, :mod:`logging." +"handlers` (il existe également un autre sous-module, :mod:`logging.config`, " +"pour la fonctionnalité de configuration)." + +#: howto/logging.rst:986 +msgid "" +"Logged messages are formatted for presentation through instances of the :" +"class:`Formatter` class. They are initialized with a format string suitable " +"for use with the % operator and a dictionary." +msgstr "" +"Les messages journalisés sont mis en forme pour la présentation via des " +"instances de la classe :class:`Formatter`. Ils sont initialisés avec une " +"chaîne de format appropriée pour une utilisation avec l'opérateur % et un " +"dictionnaire." + +#: howto/logging.rst:990 +msgid "" +"For formatting multiple messages in a batch, instances of :class:`~handlers." +"BufferingFormatter` can be used. In addition to the format string (which is " +"applied to each message in the batch), there is provision for header and " +"trailer format strings." +msgstr "" +"Pour formater plusieurs messages dans un lot, des instances de :class:" +"`~handlers.BufferingFormatter` peuvent être utilisées. En plus de la chaîne " +"de format (qui est appliquée à chaque message dans le lot), il existe des " +"dispositions pour les chaînes de format d'en-tête et de fin." + +#: howto/logging.rst:995 +msgid "" +"When filtering based on logger level and/or handler level is not enough, " +"instances of :class:`Filter` can be added to both :class:`Logger` and :class:" +"`Handler` instances (through their :meth:`~Handler.addFilter` method). " +"Before deciding to process a message further, both loggers and handlers " +"consult all their filters for permission. If any filter returns a false " +"value, the message is not processed further." +msgstr "" +"Lorsque le filtrage basé sur le niveau de l'enregistreur et/ou le niveau du " +"gestionnaire ne suffit pas, les instances de :class:`Filter` peuvent être " +"ajoutées aux deux instances de :class:`Logger` et :class:`Handler` (par le " +"biais de leur méthode :meth:`~Handler.addFilter`). Avant de décider de " +"traiter un message plus loin, les enregistreurs et les gestionnaires " +"consultent tous leurs filtres pour obtenir l'autorisation. Si un filtre " +"renvoie une valeur ``False``, le traitement du message est arrêté." + +#: howto/logging.rst:1002 +msgid "" +"The basic :class:`Filter` functionality allows filtering by specific logger " +"name. If this feature is used, messages sent to the named logger and its " +"children are allowed through the filter, and all others dropped." +msgstr "" +"La fonctionnalité de base :class:`Filter` permet de filtrer par nom de " +"*logger* spécifique. Si cette fonctionnalité est utilisée, les messages " +"envoyés à l'enregistreur nommé et à ses enfants sont autorisés via le filtre " +"et tous les autres sont abandonnés." + +#: howto/logging.rst:1010 +msgid "Exceptions raised during logging" +msgstr "Exceptions levées par la journalisation" + +#: howto/logging.rst:1012 +msgid "" +"The logging package is designed to swallow exceptions which occur while " +"logging in production. This is so that errors which occur while handling " +"logging events - such as logging misconfiguration, network or other similar " +"errors - do not cause the application using logging to terminate prematurely." +msgstr "" +"Le paquet de journalisation est conçu pour ne pas faire apparaître les " +"exceptions qui se produisent lors de la journalisation en production. Il " +"s'agit de sorte que les erreurs qui se produisent lors de la gestion des " +"événements de journalisation (telles qu'une mauvaise configuration de la " +"journalisation, une erreur réseau ou d'autres erreurs similaires) ne " +"provoquent pas l'arrêt de l'application utilisant la journalisation." + +#: howto/logging.rst:1017 +msgid "" +":class:`SystemExit` and :class:`KeyboardInterrupt` exceptions are never " +"swallowed. Other exceptions which occur during the :meth:`~Handler.emit` " +"method of a :class:`Handler` subclass are passed to its :meth:`~Handler." +"handleError` method." +msgstr "" +"Les exceptions :class:`SystemExit` et :class:`KeyboardInterrupt` ne sont " +"jamais passées sous silence. Les autres exceptions qui se produisent pendant " +"la méthode :meth:`~Handler.emit` d'une sous classe :class:`Handler` sont " +"passées à sa méthode :meth:`~Handler.handleError`." + +#: howto/logging.rst:1022 +msgid "" +"The default implementation of :meth:`~Handler.handleError` in :class:" +"`Handler` checks to see if a module-level variable, :data:`raiseExceptions`, " +"is set. If set, a traceback is printed to :data:`sys.stderr`. If not set, " +"the exception is swallowed." +msgstr "" +"L'implémentation par défaut de :meth:`~Handler.handleError` dans la classe :" +"class:`Handler` vérifie si une variable au niveau du module, :data:" +"`raiseExceptions`, est définie. Si cette valeur est définie, la trace de la " +"pile d'appels est affichée sur :data:`sys.stderr`. Si elle n'est pas " +"définie, l'exception est passée sous silence." + +#: howto/logging.rst:1027 +msgid "" +"The default value of :data:`raiseExceptions` is ``True``. This is because " +"during development, you typically want to be notified of any exceptions that " +"occur. It's advised that you set :data:`raiseExceptions` to ``False`` for " +"production usage." +msgstr "" +"La valeur par défaut de :data:`raiseExceptions` est ``True``. C'est parce " +"que pendant le développement, vous voulez généralement être notifié de " +"toutes les exceptions qui se produisent. Il est conseillé de définir :data:" +"`raiseExceptions` à ``False`` pour une utilisation en production." + +#: howto/logging.rst:1037 +msgid "Using arbitrary objects as messages" +msgstr "Utilisation d'objets arbitraires comme messages" + +#: howto/logging.rst:1039 +msgid "" +"In the preceding sections and examples, it has been assumed that the message " +"passed when logging the event is a string. However, this is not the only " +"possibility. You can pass an arbitrary object as a message, and its :meth:" +"`~object.__str__` method will be called when the logging system needs to " +"convert it to a string representation. In fact, if you want to, you can " +"avoid computing a string representation altogether - for example, the :class:" +"`~handlers.SocketHandler` emits an event by pickling it and sending it over " +"the wire." +msgstr "" +"Dans les sections et exemples précédents, il a été supposé que le message " +"passé lors de la journalisation de l'événement est une chaîne. Cependant, ce " +"n'est pas la seule possibilité. Vous pouvez passer un objet arbitraire en " +"tant que message et sa méthode :meth:`~object.__str__` est appelée lorsque " +"le système de journalisation doit le convertir en une représentation sous " +"forme de chaîne. En fait, si vous le souhaitez, vous pouvez complètement " +"éviter de calculer une représentation sous forme de chaîne. Par exemple, les " +"gestionnaires :class:`~handlers.SocketHandler` émettent un événement en lui " +"appliquant *pickle* et en l'envoyant sur le réseau." + +#: howto/logging.rst:1050 +msgid "Optimization" +msgstr "Optimisation" + +#: howto/logging.rst:1052 +msgid "" +"Formatting of message arguments is deferred until it cannot be avoided. " +"However, computing the arguments passed to the logging method can also be " +"expensive, and you may want to avoid doing it if the logger will just throw " +"away your event. To decide what to do, you can call the :meth:`~Logger." +"isEnabledFor` method which takes a level argument and returns true if the " +"event would be created by the Logger for that level of call. You can write " +"code like this::" +msgstr "" +"La mise en forme des arguments de message est différée jusqu'à ce qu'elle ne " +"puisse pas être évitée. Toutefois, le calcul des arguments passés à la " +"méthode de journalisation peut également être coûteux et vous voudrez peut-" +"être éviter de le faire si l'enregistreur va simplement jeter votre " +"événement. Pour décider de ce qu'il faut faire, vous pouvez appeler la " +"méthode :meth:`~Logger.isEnabledFor` qui prend en argument le niveau et " +"renvoie ``True`` si un événement est créé par l'enregistreur pour ce niveau " +"d'appel. Vous pouvez écrire un code qui ressemble à ça ::" + +#: howto/logging.rst:1064 +msgid "" +"so that if the logger's threshold is set above ``DEBUG``, the calls to :func:" +"`expensive_func1` and :func:`expensive_func2` are never made." +msgstr "" +"de sorte que si le seuil du journaliseur est défini au-dessus de ``DEBUG``, " +"les appels à :func:`expensive_func1` et :func:`expensive_func2` ne sont " +"jamais faits." + +#: howto/logging.rst:1067 +msgid "" +"In some cases, :meth:`~Logger.isEnabledFor` can itself be more expensive " +"than you'd like (e.g. for deeply nested loggers where an explicit level is " +"only set high up in the logger hierarchy). In such cases (or if you want to " +"avoid calling a method in tight loops), you can cache the result of a call " +"to :meth:`~Logger.isEnabledFor` in a local or instance variable, and use " +"that instead of calling the method each time. Such a cached value would only " +"need to be recomputed when the logging configuration changes dynamically " +"while the application is running (which is not all that common)." +msgstr "" +"Dans certains cas, :meth:`~Logger.isEnabledFor` peut être plus coûteux que " +"vous le souhaitez (par exemple pour les enregistreurs profondément imbriqués " +"où un niveau explicite n'est défini que dans la hiérarchie des " +"enregistreurs). Dans de tels cas (ou si vous souhaitez éviter d'appeler une " +"méthode dans des boucles optimisées), vous pouvez mettre en cache le " +"résultat d'un appel à :meth:`~Logger.isEnabledFor` dans une variable locale " +"ou d'instance, et l'utiliser au lieu d'appeler la méthode à chaque fois. Une " +"telle valeur mise en cache ne doit être recalculée que lorsque la " +"configuration de journalisation change dynamiquement pendant l'exécution de " +"l'application (ce qui est rarement le cas)." + +#: howto/logging.rst:1076 +msgid "" +"There are other optimizations which can be made for specific applications " +"which need more precise control over what logging information is collected. " +"Here's a list of things you can do to avoid processing during logging which " +"you don't need:" +msgstr "" +"Il existe d'autres optimisations qui peuvent être faites pour des " +"applications spécifiques qui nécessitent un contrôle plus précis sur les " +"informations de journalisation collectées. Voici une liste de choses que " +"vous pouvez faire pour éviter le traitement pendant la journalisation dont " +"vous n'avez pas besoin :" + +#: howto/logging.rst:1082 +msgid "What you don't want to collect" +msgstr "Ce que vous ne voulez pas collecter" + +#: howto/logging.rst:1082 +msgid "How to avoid collecting it" +msgstr "Comment éviter de le collecter" + +#: howto/logging.rst:1084 +msgid "Information about where calls were made from." +msgstr "Informations sur l'endroit où les appels ont été faits." + +#: howto/logging.rst:1084 +msgid "" +"Set ``logging._srcfile`` to ``None``. This avoids calling :func:`sys." +"_getframe`, which may help to speed up your code in environments like PyPy " +"(which can't speed up code that uses :func:`sys._getframe`)." +msgstr "" +"Définissez ``logging._srcfile`` à ``None``. Cela évite d'appeler :func:`sys." +"_getframe`, qui peut aider à accélérer votre code dans des environnements " +"comme PyPy (qui ne peut pas accélérer le code qui utilise :func:`sys." +"_getframe`)." + +#: howto/logging.rst:1090 +msgid "Threading information." +msgstr "Informations de *threading*." + +#: howto/logging.rst:1090 +msgid "Set ``logging.logThreads`` to ``False``." +msgstr "Mettez ``logging.logThreads`` à ``False``." + +#: howto/logging.rst:1092 +msgid "Current process ID (:func:`os.getpid`)" +msgstr "Identifiant du processus courant (résultat de :func:`os.getpid`)" + +#: howto/logging.rst:1092 +msgid "Set ``logging.logProcesses`` to ``False``." +msgstr "Mettez ``logging.logProcesses`` à ``False``." + +#: howto/logging.rst:1094 +msgid "" +"Current process name when using ``multiprocessing`` to manage multiple " +"processes." +msgstr "" +"Nom du processus actuel, si vous vous servez de ``multiprocessing`` pour " +"gérer plusieurs processus à la fois" + +#: howto/logging.rst:1094 +msgid "Set ``logging.logMultiprocessing`` to ``False``." +msgstr "Mettez ``logging.logMultiProcessing`` à ``False``." + +#: howto/logging.rst:1098 +msgid "" +"Also note that the core logging module only includes the basic handlers. If " +"you don't import :mod:`logging.handlers` and :mod:`logging.config`, they " +"won't take up any memory." +msgstr "" +"Notez également que le module de journalisation principale inclut uniquement " +"les gestionnaires de base. Si vous n'importez pas :mod:`logging.handlers` " +"et :mod:`logging.config`, ils ne prendront pas de mémoire." + +#: howto/logging.rst:1105 +msgid "Module :mod:`logging`" +msgstr "Module :mod:`logging`" + +#: howto/logging.rst:1105 +msgid "API reference for the logging module." +msgstr "Référence d'API pour le module de journalisation." + +#: howto/logging.rst:1108 +msgid "Module :mod:`logging.config`" +msgstr "Module :mod:`logging.config`" + +#: howto/logging.rst:1108 +msgid "Configuration API for the logging module." +msgstr "API de configuration pour le module de journalisation." + +#: howto/logging.rst:1111 +msgid "Module :mod:`logging.handlers`" +msgstr "Module :mod:`logging.handlers`" + +#: howto/logging.rst:1111 +msgid "Useful handlers included with the logging module." +msgstr "Gestionnaires utiles inclus avec le module de journalisation." + +#: howto/logging.rst:1113 +msgid ":ref:`A logging cookbook `" +msgstr ":ref:`A logging cookbook `" + +#~ msgid "Process information." +#~ msgstr "Informations sur le processus." diff --git a/howto/pyporting.po b/howto/pyporting.po new file mode 100644 index 0000000000..35dc7d0a07 --- /dev/null +++ b/howto/pyporting.po @@ -0,0 +1,983 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-09-23 16:16+0200\n" +"PO-Revision-Date: 2021-12-11 16:27+0100\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 3.0\n" + +#: howto/pyporting.rst:5 +msgid "Porting Python 2 Code to Python 3" +msgstr "Portage de code Python 2 vers Python 3" + +#: howto/pyporting.rst:0 +msgid "author" +msgstr "auteur" + +#: howto/pyporting.rst:7 +msgid "Brett Cannon" +msgstr "Brett Cannon" + +#: howto/pyporting.rst:None +msgid "Abstract" +msgstr "Résumé" + +#: howto/pyporting.rst:11 +msgid "" +"With Python 3 being the future of Python while Python 2 is still in active " +"use, it is good to have your project available for both major releases of " +"Python. This guide is meant to help you figure out how best to support both " +"Python 2 & 3 simultaneously." +msgstr "" +"Python 3 étant le futur de Python tandis que Python 2 est encore activement " +"utilisé, il est préférable de faire en sorte que votre projet soit " +"disponible pour les deux versions majeures de Python. Ce guide est destiné à " +"vous aider à comprendre comment gérer simultanément Python 2 & 3." + +#: howto/pyporting.rst:16 +msgid "" +"If you are looking to port an extension module instead of pure Python code, " +"please see :ref:`cporting-howto`." +msgstr "" +"Si vous cherchez à porter un module d'extension plutôt que du pur Python, " +"veuillez consulter :ref:`cporting-howto`." + +#: howto/pyporting.rst:19 +msgid "" +"If you would like to read one core Python developer's take on why Python 3 " +"came into existence, you can read Nick Coghlan's `Python 3 Q & A`_ or Brett " +"Cannon's `Why Python 3 exists`_." +msgstr "" +"Si vous souhaitez lire l'avis d'un développeur principal de Python sur ce " +"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:24 +msgid "" +"For help with porting, you can view the archived python-porting_ mailing " +"list." +msgstr "" +"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" +msgstr "La version courte" + +#: howto/pyporting.rst:29 +msgid "" +"To make your project be single-source Python 2/3 compatible, the basic steps " +"are:" +msgstr "" +"Afin de rendre votre projet compatible Python 2/3 avec le même code source, " +"les étapes de base sont :" + +#: howto/pyporting.rst:32 +msgid "Only worry about supporting Python 2.7" +msgstr "Ne se préoccuper que du support de Python 2.7" + +#: howto/pyporting.rst:33 +msgid "" +"Make sure you have good test coverage (coverage.py_ can help; ``python -m " +"pip install coverage``)" +msgstr "" +"S'assurer d'une bonne couverture des tests (coverage.py_ peut aider ; " +"``python -m pip install coverage``)" + +#: howto/pyporting.rst:122 +msgid "Learn the differences between Python 2 & 3" +msgstr "Apprendre les différences entre Python 2 et 3" + +#: howto/pyporting.rst:36 +msgid "" +"Use Futurize_ (or Modernize_) to update your code (e.g. ``python -m pip " +"install future``)" +msgstr "" +"Utiliser Futurize_ (ou Modernize_) pour mettre à jour votre code (par " +"exemple ``python -m pip install future``)" + +#: howto/pyporting.rst:37 +msgid "" +"Use Pylint_ to help make sure you don't regress on your Python 3 support " +"(``python -m pip install pylint``)" +msgstr "" +"Utilisez Pylint_ pour vous assurer que vous ne régressez pas sur votre prise " +"en charge de Python 3 (``python -m pip install pylint``)" + +#: howto/pyporting.rst:39 +msgid "" +"Use caniusepython3_ to find out which of your dependencies are blocking your " +"use of Python 3 (``python -m pip install caniusepython3``)" +msgstr "" +"Utiliser `caniusepython3`_ pour déterminer quelles sont, parmi les " +"dépendances que vous utilisez, celles qui bloquent votre utilisation de " +"Python 3 (``python -m pip install caniusepython3``)" + +#: howto/pyporting.rst:41 +msgid "" +"Once your dependencies are no longer blocking you, use continuous " +"integration to make sure you stay compatible with Python 2 & 3 (tox_ can " +"help test against multiple versions of Python; ``python -m pip install tox``)" +msgstr "" +"Une fois que vos dépendances ne sont plus un obstacle, utiliser " +"l'intégration continue pour s'assurer que votre code demeure compatible " +"Python 2 & 3 (tox_ peut aider à tester la comptabilité de sources avec " +"plusieurs versions de Python; ``python -m pip install tox``)" + +#: howto/pyporting.rst:44 +msgid "" +"Consider using optional static type checking to make sure your type usage " +"works in both Python 2 & 3 (e.g. use mypy_ to check your typing under both " +"Python 2 & Python 3; ``python -m pip install mypy``)." +msgstr "" +"Envisager l'utilisation d'un vérifieur de type statique afin de vous assurer " +"que votre façon d'utiliser les types est compatible avec Python 2 et 3 (par " +"exemple en utilisant mypy_ pour vérifier votre typage sous Python 2 et 3 ; " +"``python -m pip install mypy``)." + +#: howto/pyporting.rst:50 +msgid "" +"Note: Using ``python -m pip install`` guarantees that the ``pip`` you invoke " +"is the one installed for the Python currently in use, whether it be a system-" +"wide ``pip`` or one installed within a :ref:`virtual environment `." +msgstr "" +"Note : L'utilisation de ``python -m pip install`` garantit que le ``pip`` " +"invoqué est bien celui installé avec la version de Python que vous utilisez, " +"que ce soit un ``pip`` du système ou un ``pip`` installé dans un :ref:" +"`environnement virtuel `." + +#: howto/pyporting.rst:56 +msgid "Details" +msgstr "Détails" + +#: howto/pyporting.rst:58 +msgid "" +"A key point about supporting Python 2 & 3 simultaneously is that you can " +"start **today**! Even if your dependencies are not supporting Python 3 yet " +"that does not mean you can't modernize your code **now** to support Python " +"3. Most changes required to support Python 3 lead to cleaner code using " +"newer practices even in Python 2 code." +msgstr "" +"Un point clé du support simultané de Python 2 et 3 est qu'il vous est " +"possible de commencer **dès aujourd'hui** ! Même si vos dépendances ne sont " +"pas encore compatibles Python 3, vous pouvez moderniser votre code **dès " +"maintenant** pour gérer Python 3. La plupart des modifications nécessaires à " +"la compatibilité Python 3 donnent un code plus propre utilisant une syntaxe " +"plus récente, même dans du code Python 2." + +#: howto/pyporting.rst:64 +msgid "" +"Another key point is that modernizing your Python 2 code to also support " +"Python 3 is largely automated for you. While you might have to make some API " +"decisions thanks to Python 3 clarifying text data versus binary data, the " +"lower-level work is now mostly done for you and thus can at least benefit " +"from the automated changes immediately." +msgstr "" +"Un autre point important est que la modernisation de votre code Python 2 " +"pour le rendre compatible Python 3 est pratiquement automatique. Bien qu'il " +"soit possible d'avoir à effectuer des changements d'API compte-tenu de la " +"clarification de la gestion des données textuelles et binaires dans Python " +"3, le travail de bas niveau est en grande partie fait pour vous et vous " +"pouvez ainsi bénéficiez de ces modifications automatiques immédiatement." + +#: howto/pyporting.rst:70 +msgid "" +"Keep those key points in mind while you read on about the details of porting " +"your code to support Python 2 & 3 simultaneously." +msgstr "" +"Gardez ces points clés en tête pendant que vous lisez les détails ci-dessous " +"concernant le portage de votre code vers une compatibilité simultanée Python " +"2 et 3." + +#: howto/pyporting.rst:75 +msgid "Drop support for Python 2.6 and older" +msgstr "Abandon de la compatibilité Python 2.6 et antérieures" + +#: howto/pyporting.rst:77 +msgid "" +"While you can make Python 2.5 work with Python 3, it is **much** easier if " +"you only have to work with Python 2.7. If dropping Python 2.5 is not an " +"option then the six_ project can help you support Python 2.5 & 3 " +"simultaneously (``python -m pip install six``). Do realize, though, that " +"nearly all the projects listed in this HOWTO will not be available to you." +msgstr "" +"Bien qu'il soit possible de rendre Python 2.5 compatible avec Python 3, il " +"est **beaucoup** plus simple de n'avoir qu'à travailler avec Python 2.7. Si " +"abandonner Python 2.5 n'est pas une option, alors le projet six_ peut vous " +"aider à gérer simultanément Python 2.5 et 3 (``python -m pip install six``). " +"Néanmoins, soyez conscient que la quasi-totalité des projets listés dans ce " +"guide pratique ne seront pas applicables à votre situation." + +#: howto/pyporting.rst:83 +msgid "" +"If you are able to skip Python 2.5 and older, then the required changes to " +"your code should continue to look and feel like idiomatic Python code. At " +"worst you will have to use a function instead of a method in some instances " +"or have to import a function instead of using a built-in one, but otherwise " +"the overall transformation should not feel foreign to you." +msgstr "" +"Si vous pouvez ignorer Python 2.5 et antérieur, les changements nécessaires " +"à appliquer à votre code devraient encore ressembler à vos yeux à du code " +"Python idiomatique. Dans le pire cas, vous devrez utiliser une fonction " +"plutôt qu'une méthode dans certains cas, ou bien vous devrez importer une " +"fonction plutôt qu'utiliser une fonction native, mais le reste du temps le " +"code transformé devrait vous rester familier." + +#: howto/pyporting.rst:89 +msgid "" +"But you should aim for only supporting Python 2.7. Python 2.6 is no longer " +"freely supported and thus is not receiving bugfixes. This means **you** will " +"have to work around any issues you come across with Python 2.6. There are " +"also some tools mentioned in this HOWTO which do not support Python 2.6 (e." +"g., Pylint_), and this will become more commonplace as time goes on. It will " +"simply be easier for you if you only support the versions of Python that you " +"have to support." +msgstr "" +"Mais nous vous conseillons de viser seulement un support de Python 2.7. " +"Python 2.6 n'est plus supporté gratuitement et par conséquent ne reçoit plus " +"aucun correctif. Cela signifie que **vous** devrez trouver des solutions de " +"contournement aux problèmes que vous rencontrez avec Python 2.6. Il existe " +"en outre des outils mentionnés dans ce guide pratique qui ne supportent pas " +"Python 2.6 (par exemple Pylint_), ce qui sera de plus en plus courant au fil " +"du temps. Il est simplement plus facile pour vous de n'assurer une " +"compatibilité qu'avec les versions de Python que vous avez l'obligation de " +"gérer." + +#: howto/pyporting.rst:98 +msgid "" +"Make sure you specify the proper version support in your ``setup.py`` file" +msgstr "" +"Assurez vous de spécifier la bonne version supportée dans le fichier ``setup." +"py``" + +#: howto/pyporting.rst:100 +msgid "" +"In your ``setup.py`` file you should have the proper `trove classifier`_ " +"specifying what versions of Python you support. As your project does not " +"support Python 3 yet you should at least have ``Programming Language :: " +"Python :: 2 :: Only`` specified. Ideally you should also specify each major/" +"minor version of Python that you do support, e.g. ``Programming Language :: " +"Python :: 2.7``." +msgstr "" +"Votre fichier ``setup.py`` devrait contenir le bon `trove classifier`_ " +"spécifiant les versions de Python avec lesquelles vous êtes compatible. " +"Comme votre projet ne supporte pas encore Python 3, vous devriez au moins " +"spécifier ``Programming Language :: Python :: 2 :: Only``. Dans l'idéal vous " +"devriez indiquer chaque version majeure/mineure de Python que vous gérez, " +"par exemple ``Programming Language :: Python :: 2.7``." + +#: howto/pyporting.rst:109 +msgid "Have good test coverage" +msgstr "Obtenir une bonne couverture de code" + +#: howto/pyporting.rst:111 +msgid "" +"Once you have your code supporting the oldest version of Python 2 you want " +"it to, you will want to make sure your test suite has good coverage. A good " +"rule of thumb is that if you want to be confident enough in your test suite " +"that any failures that appear after having tools rewrite your code are " +"actual bugs in the tools and not in your code. If you want a number to aim " +"for, try to get over 80% coverage (and don't feel bad if you find it hard to " +"get better than 90% coverage). If you don't already have a tool to measure " +"test coverage then coverage.py_ is recommended." +msgstr "" +"Une fois que votre code est compatible avec la plus ancienne version de " +"Python 2 que vous souhaitez, vous devez vous assurer que votre suite de test " +"a une couverture suffisante. Une bonne règle empirique consiste à avoir " +"suffisamment confiance en la suite de test pour qu'une erreur apparaissant " +"après la réécriture du code par les outils automatiques résulte de bogues de " +"ces derniers et non de votre code. Si vous souhaitez une valeur cible, " +"essayez de dépasser les 80 % de couverture (et ne vous sentez pas coupable " +"si vous trouvez difficile de faire mieux que 90 % de couverture). Si vous ne " +"disposez pas encore d'un outil pour mesurer la couverture de code, coverage." +"py_ est recommandé." + +#: howto/pyporting.rst:124 +msgid "" +"Once you have your code well-tested you are ready to begin porting your code " +"to Python 3! But to fully understand how your code is going to change and " +"what you want to look out for while you code, you will want to learn what " +"changes Python 3 makes in terms of Python 2. Typically the two best ways of " +"doing that is reading the :ref:`\"What's New\" ` doc for " +"each release of Python 3 and the `Porting to Python 3`_ book (which is free " +"online). There is also a handy `cheat sheet`_ from the Python-Future project." +msgstr "" +"Une fois que votre code est bien testé, vous êtes prêt à démarrer votre " +"portage vers Python 3 ! Mais afin de comprendre comment votre code va " +"changer et à quoi s'intéresser spécifiquement pendant que vous codez, vous " +"aurez sûrement envie de découvrir quels sont les changements introduits par " +"Python 3 par rapport à Python 2. Pour atteindre cet objectif, les deux " +"meilleurs moyens sont de lire le document :ref:`whatsnew-index` de chaque " +"version de Python 3 et le livre `Porting to Python 3`_ (gratuit en ligne, en " +"anglais). Il y a également une « antisèche » (`cheat sheet`_, ressource en " +"anglais) très pratique du projet Python-Future." + +#: howto/pyporting.rst:134 +msgid "Update your code" +msgstr "Mettre à jour votre code" + +#: howto/pyporting.rst:136 +msgid "" +"Once you feel like you know what is different in Python 3 compared to Python " +"2, it's time to update your code! You have a choice between two tools in " +"porting your code automatically: Futurize_ and Modernize_. Which tool you " +"choose will depend on how much like Python 3 you want your code to be. " +"Futurize_ does its best to make Python 3 idioms and practices exist in " +"Python 2, e.g. backporting the ``bytes`` type from Python 3 so that you have " +"semantic parity between the major versions of Python. Modernize_, on the " +"other hand, is more conservative and targets a Python 2/3 subset of Python, " +"directly relying on six_ to help provide compatibility. As Python 3 is the " +"future, it might be best to consider Futurize to begin adjusting to any new " +"practices that Python 3 introduces which you are not accustomed to yet." +msgstr "" +"Une fois que vous pensez en savoir suffisamment sur les différences entre " +"Python 3 et Python 2, il est temps de mettre à jour votre code ! Vous avez " +"le choix entre deux outils pour porter votre code automatiquement : " +"Futurize_ et Modernize_. Le choix de l'outil dépend de la dose de Python 3 " +"que vous souhaitez introduire dans votre code. Futurize_ s'efforce " +"d'introduire les idiomes et pratiques de Python 3 dans Python 2, par exemple " +"en réintroduisant le type ``bytes`` de Python 3 de telle sorte que la " +"sémantique soit identique entre les deux versions majeures de Python. En " +"revanche, Modernize_ est plus conservateur et vise un sous-ensemble " +"d'instructions Python 2/3, en s'appuyant directement sur six_ pour la " +"compatibilité. Python 3 étant le futur de Python, il pourrait être " +"préférable d'utiliser *Futurize* afin de commencer à s'ajuster aux nouvelles " +"pratiques introduites par Python 3 avec lesquelles vous n'êtes pas encore " +"habitué." + +#: howto/pyporting.rst:148 +msgid "" +"Regardless of which tool you choose, they will update your code to run under " +"Python 3 while staying compatible with the version of Python 2 you started " +"with. Depending on how conservative you want to be, you may want to run the " +"tool over your test suite first and visually inspect the diff to make sure " +"the transformation is accurate. After you have transformed your test suite " +"and verified that all the tests still pass as expected, then you can " +"transform your application code knowing that any tests which fail is a " +"translation failure." +msgstr "" +"Indépendamment de l'outil sur lequel se porte votre choix, celui-ci mettra à " +"jour votre code afin qu'il puisse être exécuté par Python 3 tout en " +"maintenant sa compatibilité avec la version de Python 2 dont vous êtes " +"parti. En fonction du niveau de prudence que vous visez, vous pouvez " +"exécuter l'outil sur votre suite de test d'abord puis inspecter visuellement " +"la différence afin de vous assurer que la transformation est exacte. Après " +"avoir transformé votre suite de test et vérifié que tous les tests " +"s'exécutent comme attendu, vous pouvez transformer le code de votre " +"application avec l'assurance que chaque test qui échoue correspond à un " +"échec de traduction." + +#: howto/pyporting.rst:156 +msgid "" +"Unfortunately the tools can't automate everything to make your code work " +"under Python 3 and so there are a handful of things you will need to update " +"manually to get full Python 3 support (which of these steps are necessary " +"vary between the tools). Read the documentation for the tool you choose to " +"use to see what it fixes by default and what it can do optionally to know " +"what will (not) be fixed for you and what you may have to fix on your own (e." +"g. using ``io.open()`` over the built-in ``open()`` function is off by " +"default in Modernize). Luckily, though, there are only a couple of things to " +"watch out for which can be considered large issues that may be hard to debug " +"if not watched for." +msgstr "" +"Malheureusement les outils ne peuvent pas automatiser tous les changements " +"requis pour permettre à votre code de s'exécuter sous Python 3 et il y a " +"donc quelques points sur lesquels vous devrez travailler manuellement afin " +"d'atteindre la compatibilité totale Python 3 (les étapes nécessaires peuvent " +"varier en fonction de l'outil utilisé). Lisez la documentation de l'outil " +"que vous avez choisi afin d'identifier ce qu'il corrige par défaut et ce qui " +"peut être appliqué de façon optionnelle afin de savoir ce qui sera (ou non) " +"corrigé pour vous ou ce que vous devrez modifier vous-même (par exemple, le " +"remplacement ``io.open()`` plutôt que la fonction native ``open()`` est " +"inactif par défaut dans *Modernize*). Heureusement, il n'y a que quelques " +"points à surveiller qui peuvent réellement être considérés comme des " +"problèmes difficiles à déboguer si vous n'y prêtez pas attention." + +#: howto/pyporting.rst:168 +msgid "Division" +msgstr "Division" + +#: howto/pyporting.rst:170 +msgid "" +"In Python 3, ``5 / 2 == 2.5`` and not ``2``; all division between ``int`` " +"values result in a ``float``. This change has actually been planned since " +"Python 2.2 which was released in 2002. Since then users have been encouraged " +"to add ``from __future__ import division`` to any and all files which use " +"the ``/`` and ``//`` operators or to be running the interpreter with the ``-" +"Q`` flag. If you have not been doing this then you will need to go through " +"your code and do two things:" +msgstr "" +"Dans Python 3, ``5 / 2 == 2.5`` et non ``2``; toutes les divisions entre des " +"valeurs ``int`` renvoient un ``float``. Ce changement était en réalité " +"planifié depuis Python 2.2, publié en 2002. Depuis cette date, les " +"utilisateurs ont été encouragés à ajouter ``from __future__ import " +"division`` à tous les fichiers utilisant les opérateurs ``/`` et ``//`` ou à " +"exécuter l'interpréteur avec l'option ``-Q``. Si vous n'avez pas suivi cette " +"recommandation, vous devrez manuellement modifier votre code et effectuer " +"deux changements :" + +#: howto/pyporting.rst:178 +msgid "Add ``from __future__ import division`` to your files" +msgstr "Ajouter ``from __future__ import division`` à vos fichiers" + +#: howto/pyporting.rst:179 +msgid "" +"Update any division operator as necessary to either use ``//`` to use floor " +"division or continue using ``/`` and expect a float" +msgstr "" +"Remplacer tous les opérateurs de division par ``//`` pour la division " +"entière, le cas échéant, ou utiliser ``/`` et vous attendre à un résultat " +"flottant" + +#: howto/pyporting.rst:182 +msgid "" +"The reason that ``/`` isn't simply translated to ``//`` automatically is " +"that if an object defines a ``__truediv__`` method but not ``__floordiv__`` " +"then your code would begin to fail (e.g. a user-defined class that uses ``/" +"`` to signify some operation but not ``//`` for the same thing or at all)." +msgstr "" +"La raison pour laquelle ``/`` n'est pas simplement remplacé par ``//`` " +"automatiquement est que si un objet définit une méthode ``__truediv__`` mais " +"pas de méthode ``__floordiv__``, alors votre code pourrait produire une " +"erreur (par exemple, une classe définie par l'utilisateur qui utilise ``/`` " +"pour définir une opération quelconque mais pour laquelle ``//`` n'a pas du " +"tout la même signification, voire n'est pas utilisé du tout)." + +#: howto/pyporting.rst:189 +msgid "Text versus binary data" +msgstr "Texte et données binaires" + +#: howto/pyporting.rst:191 +msgid "" +"In Python 2 you could use the ``str`` type for both text and binary data. " +"Unfortunately this confluence of two different concepts could lead to " +"brittle code which sometimes worked for either kind of data, sometimes not. " +"It also could lead to confusing APIs if people didn't explicitly state that " +"something that accepted ``str`` accepted either text or binary data instead " +"of one specific type. This complicated the situation especially for anyone " +"supporting multiple languages as APIs wouldn't bother explicitly supporting " +"``unicode`` when they claimed text data support." +msgstr "" +"Dans Python 2, il était possible d'utiliser le type ``str`` pour du texte et " +"pour des données binaires. Malheureusement cet amalgame entre deux concepts " +"différents peut conduire à du code fragile pouvant parfois fonctionner pour " +"les deux types de données et parfois non. Cela a également conduit à des API " +"confuses si les auteurs ne déclaraient pas explicitement que quelque chose " +"qui acceptait ``str`` était compatible avec du texte ou des données binaires " +"et pas un seul des deux types. Cela a compliqué la situation pour les " +"personnes devant gérer plusieurs langages avec des API qui ne se " +"préoccupaient pas de la gestion de ``unicode`` lorsqu'elles affirmaient être " +"compatibles avec des données au format texte." + +#: howto/pyporting.rst:200 +msgid "" +"To make the distinction between text and binary data clearer and more " +"pronounced, Python 3 did what most languages created in the age of the " +"internet have done and made text and binary data distinct types that cannot " +"blindly be mixed together (Python predates widespread access to the " +"internet). For any code that deals only with text or only binary data, this " +"separation doesn't pose an issue. But for code that has to deal with both, " +"it does mean you might have to now care about when you are using text " +"compared to binary data, which is why this cannot be entirely automated." +msgstr "" +"Afin de rendre la distinction entre texte et données binaires claire et " +"prononcée, Python 3 a suivi la voie pavée par la plupart des langages créés " +"à l'ère d'Internet et a séparé les types texte et données binaires de telle " +"sorte qu'il ne soit plus possible de les confondre (Python est antérieur à " +"la démocratisation de l'accès à Internet). Cette séparation ne pose pas de " +"problème pour du code ne gérant soit que du texte, soit que des données " +"binaires. Cependant un code source devant gérer les deux doit désormais se " +"préoccuper du type des données manipulées, ce qui explique que ce processus " +"ne peut pas être entièrement automatisé." + +#: howto/pyporting.rst:209 +msgid "" +"To start, you will need to decide which APIs take text and which take binary " +"(it is **highly** recommended you don't design APIs that can take both due " +"to the difficulty of keeping the code working; as stated earlier it is " +"difficult to do well). In Python 2 this means making sure the APIs that take " +"text can work with ``unicode`` and those that work with binary data work " +"with the ``bytes`` type from Python 3 (which is a subset of ``str`` in " +"Python 2 and acts as an alias for ``bytes`` type in Python 2). Usually the " +"biggest issue is realizing which methods exist on which types in Python 2 & " +"3 simultaneously (for text that's ``unicode`` in Python 2 and ``str`` in " +"Python 3, for binary that's ``str``/``bytes`` in Python 2 and ``bytes`` in " +"Python 3). The following table lists the **unique** methods of each data " +"type across Python 2 & 3 (e.g., the ``decode()`` method is usable on the " +"equivalent binary data type in either Python 2 or 3, but it can't be used by " +"the textual data type consistently between Python 2 and 3 because ``str`` in " +"Python 3 doesn't have the method). Do note that as of Python 3.5 the " +"``__mod__`` method was added to the bytes type." +msgstr "" +"Pour commencer, vous devrez choisir quelles API travaillent sur du texte et " +"lesquelles travaillent avec des données binaires (il est **fortement** " +"recommandé de ne pas concevoir d'API qui gèrent les deux types compte-tenu " +"de la difficulté supplémentaire que cela induit). Dans Python 2, cela " +"signifie s'assurer que les API recevant du texte en entrée peuvent gérer " +"``unicode`` et celles qui reçoivent des données binaires fonctionnent avec " +"le type ``bytes`` de Python 3 (qui est un sous-ensemble de ``str`` dans " +"Python 2 et opère comme un alias du type ``bytes`` de Python 2). En général, " +"le principal problème consiste à inventorier quelles méthodes existent et " +"opèrent sur quel type dans Python & 3 simultanément (pour le texte, il " +"s'agit de ``unicode`` dans Python 2 et ``str`` dans Python 3, pour le " +"binaire il s'agit de ``str``/``bytes`` dans Python 2 et ``bytes`` dans " +"Python 3). Le tableau ci-dessous liste les méthodes **spécifiques** à chaque " +"type de données dans Python 2 et 3 (par exemple, la méthode ``decode()`` " +"peut être utilisée sur des données binaires équivalentes en Python 2 et 3, " +"mais ne peut pas être utilisée de la même façon sur le type texte en Python " +"2 et 3 car le type ``str`` de Python 3 ne possède pas de telle méthode). " +"Notez que depuis Python 3.5, la méthode ``__mod__`` a été ajoutée au type " +"*bytes*." + +#: howto/pyporting.rst:226 +msgid "**Text data**" +msgstr "**Format texte**" + +#: howto/pyporting.rst:226 +msgid "**Binary data**" +msgstr "**Format binaire**" + +#: howto/pyporting.rst:228 +msgid "\\" +msgstr "\\" + +#: howto/pyporting.rst:228 +msgid "decode" +msgstr "decode" + +#: howto/pyporting.rst:230 +msgid "encode" +msgstr "encode" + +#: howto/pyporting.rst:232 +msgid "format" +msgstr "format" + +#: howto/pyporting.rst:234 +msgid "isdecimal" +msgstr "isdecimal" + +#: howto/pyporting.rst:236 +msgid "isnumeric" +msgstr "isnumeric" + +#: howto/pyporting.rst:239 +msgid "" +"Making the distinction easier to handle can be accomplished by encoding and " +"decoding between binary data and text at the edge of your code. This means " +"that when you receive text in binary data, you should immediately decode it. " +"And if your code needs to send text as binary data then encode it as late as " +"possible. This allows your code to work with only text internally and thus " +"eliminates having to keep track of what type of data you are working with." +msgstr "" +"Vous pouvez rendre le problème plus simple à gérer en réalisant les " +"opérations d'encodage et de décodage entre données binaires et texte aux " +"extrémités de votre code. Cela signifie que lorsque vous recevez du texte " +"dans un format binaire, vous devez immédiatement le décoder. À l'inverse si " +"votre code doit transmettre du texte sous forme binaire, encodez-le le plus " +"tard possible. Cela vous permet de ne manipuler que du texte à l'intérieur " +"de votre code et permet de ne pas se préoccuper du type des données sur " +"lesquelles vous travaillez." + +#: howto/pyporting.rst:246 +msgid "" +"The next issue is making sure you know whether the string literals in your " +"code represent text or binary data. You should add a ``b`` prefix to any " +"literal that presents binary data. For text you should add a ``u`` prefix to " +"the text literal. (there is a :mod:`__future__` import to force all " +"unspecified literals to be Unicode, but usage has shown it isn't as " +"effective as adding a ``b`` or ``u`` prefix to all literals explicitly)" +msgstr "" +"Le point suivant est de s'assurer que vous savez quelles chaînes de " +"caractères littérales de votre code correspondent à du texte ou à du " +"binaire. Vous devez préfixer par ``b`` tous les littéraux qui représentent " +"des données binaires et par ``u`` les littéraux qui représentent du texte " +"(il existe une importation du module :mod:`__future__` permettant de forcer " +"l'encodage de toutes les chaînes de caractères littérales non spécifiées en " +"Unicode, mais cette pratique s'est avérée moins efficace que l'ajout " +"explicite des préfixe ``b`` et ``u``)." + +#: howto/pyporting.rst:253 +msgid "" +"As part of this dichotomy you also need to be careful about opening files. " +"Unless you have been working on Windows, there is a chance you have not " +"always bothered to add the ``b`` mode when opening a binary file (e.g., " +"``rb`` for binary reading). Under Python 3, binary files and text files are " +"clearly distinct and mutually incompatible; see the :mod:`io` module for " +"details. Therefore, you **must** make a decision of whether a file will be " +"used for binary access (allowing binary data to be read and/or written) or " +"textual access (allowing text data to be read and/or written). You should " +"also use :func:`io.open` for opening files instead of the built-in :func:" +"`open` function as the :mod:`io` module is consistent from Python 2 to 3 " +"while the built-in :func:`open` function is not (in Python 3 it's actually :" +"func:`io.open`). Do not bother with the outdated practice of using :func:" +"`codecs.open` as that's only necessary for keeping compatibility with Python " +"2.5." +msgstr "" +"Une conséquence de cette dichotomie est que vous devez être prudents lors de " +"l'ouverture d'un fichier. À moins que vous travailliez sous Windows, il y a " +"des chances pour que vous ne vous soyez jamais préoccupé de spécifier le " +"mode ``b`` lorsque vous ouvrez des fichiers binaires (par exemple ``rb`` " +"pour lire un fichier binaire). Sous Python 3, les fichiers binaire et texte " +"sont distincts et mutuellement incompatibles ; se référer au module :mod:" +"`io` pour plus de détails. Ainsi vous **devez** décider lorsque vous ouvrez " +"un fichier si vous y accéderez en mode binaire (ce qui permet de lire et " +"écrire des données binaires) ou en mode texte (ce qui permet de lire et " +"écrire du texte). Vous devez également utiliser :func:`io.open` pour ouvrir " +"des fichiers plutôt que la fonction native :func:`open` étant donné que le " +"module :mod:`io` est cohérent de Python 2 à 3, ce qui n'est pas vrai pour la " +"fonction :func:`open` (en Python 3, il s'agit en réalité de :func:`io." +"open`). Ne cherchez pas à appliquer l'ancienne pratique consistant à " +"utiliser :func:`codecs.open` qui n'est nécessaire que pour préserver une " +"compatibilité avec Python 2.5." + +#: howto/pyporting.rst:267 +msgid "" +"The constructors of both ``str`` and ``bytes`` have different semantics for " +"the same arguments between Python 2 & 3. Passing an integer to ``bytes`` in " +"Python 2 will give you the string representation of the integer: ``bytes(3) " +"== '3'``. But in Python 3, an integer argument to ``bytes`` will give you a " +"bytes object as long as the integer specified, filled with null bytes: " +"``bytes(3) == b'\\x00\\x00\\x00'``. A similar worry is necessary when " +"passing a bytes object to ``str``. In Python 2 you just get the bytes object " +"back: ``str(b'3') == b'3'``. But in Python 3 you get the string " +"representation of the bytes object: ``str(b'3') == \"b'3'\"``." +msgstr "" +"Les constructeurs des types ``str`` et ``bytes`` possèdent une sémantique " +"différente pour les mêmes arguments sous Python 2 et 3. Passer un entier à " +"``bytes`` sous Python 2 produit une représentation de cet entier en chaîne " +"de caractères : ``bytes(3) == '3'``. Mais sous Python 3, fournir un argument " +"entier à ``bytes`` produit un objet *bytes* de la longueur de l'entier " +"spécifié, rempli par des octets nuls : ``bytes(3) == b'\\x00\\x00\\x00'``. " +"La même prudence est nécessaire lorsque vous passez un objet *bytes* à " +"``str``. En Python 2, vous récupérez simplement l'objet *bytes* initial : " +"``str(b'3') == b'3'``. Mais en Python 3, vous récupérez la représentation en " +"chaîne de caractères de l'objet *bytes* : ``str(b'3') == \"b'3'\"``." + +#: howto/pyporting.rst:277 +msgid "" +"Finally, the indexing of binary data requires careful handling (slicing does " +"**not** require any special handling). In Python 2, ``b'123'[1] == b'2'`` " +"while in Python 3 ``b'123'[1] == 50``. Because binary data is simply a " +"collection of binary numbers, Python 3 returns the integer value for the " +"byte you index on. But in Python 2 because ``bytes == str``, indexing " +"returns a one-item slice of bytes. The six_ project has a function named " +"``six.indexbytes()`` which will return an integer like in Python 3: ``six." +"indexbytes(b'123', 1)``." +msgstr "" +"Enfin, l'indiçage des données binaires exige une manipulation prudente (bien " +"que le découpage, ou *slicing* en anglais, ne nécessite pas d'attention " +"particulière). En Python 2, ``b'123'[1] == b'2'`` tandis qu'en Python 3 " +"``b'123'[1] == 50``. Puisque les données binaires ne sont simplement qu'une " +"collection de nombres en binaire, Python 3 renvoie la valeur entière de " +"l'octet indicé. Mais en Python 2, étant donné que ``bytes == str``, " +"l'indiçage renvoie une tranche de longueur 1 de *bytes*. Le projet six_ " +"dispose d'une fonction appelée ``six.indexbytes()`` qui renvoie un entier " +"comme en Python 3 : ``six.indexbytes(b'123', 1)``." + +#: howto/pyporting.rst:286 +msgid "To summarize:" +msgstr "Pour résumer :" + +#: howto/pyporting.rst:288 +msgid "Decide which of your APIs take text and which take binary data" +msgstr "" +"Décidez lesquelles de vos API travaillent sur du texte et lesquelles " +"travaillent sur des données binaires" + +#: howto/pyporting.rst:289 +msgid "" +"Make sure that your code that works with text also works with ``unicode`` " +"and code for binary data works with ``bytes`` in Python 2 (see the table " +"above for what methods you cannot use for each type)" +msgstr "" +"Assurez vous que votre code travaillant sur du texte fonctionne aussi avec " +"le type ``unicode`` et que le code travaillant sur du binaire fonctionne " +"avec le type ``bytes`` en Python 2 (voir le tableau ci-dessus pour la liste " +"des méthodes utilisables par chaque type)" + +#: howto/pyporting.rst:292 +msgid "" +"Mark all binary literals with a ``b`` prefix, textual literals with a ``u`` " +"prefix" +msgstr "" +"Préfixez tous vos littéraux binaires par ``b`` et toutes vos chaînes de " +"caractères littérales par ``u``" + +#: howto/pyporting.rst:294 +msgid "" +"Decode binary data to text as soon as possible, encode text as binary data " +"as late as possible" +msgstr "" +"Décodez les données binaires en texte dès que possible, encodez votre texte " +"au format binaire le plus tard possible" + +#: howto/pyporting.rst:296 +msgid "" +"Open files using :func:`io.open` and make sure to specify the ``b`` mode " +"when appropriate" +msgstr "" +"Ouvrez les fichiers avec la fonction :func:`io.open` et assurez-vous de " +"spécifier le mode ``b`` le cas échéant" + +#: howto/pyporting.rst:298 +msgid "Be careful when indexing into binary data" +msgstr "Utilisez avec prudence l'indiçage sur des données binaires" + +#: howto/pyporting.rst:302 +msgid "Use feature detection instead of version detection" +msgstr "" +"Utilisez la détection de fonctionnalités plutôt que la détection de version" + +#: howto/pyporting.rst:304 +msgid "" +"Inevitably you will have code that has to choose what to do based on what " +"version of Python is running. The best way to do this is with feature " +"detection of whether the version of Python you're running under supports " +"what you need. If for some reason that doesn't work then you should make the " +"version check be against Python 2 and not Python 3. To help explain this, " +"let's look at an example." +msgstr "" +"Vous rencontrerez inévitablement du code devant décider quoi faire en " +"fonction de la version de Python qui s'exécute. La meilleure façon de gérer " +"ce cas est de détecter si les fonctionnalités dont vous avez besoin sont " +"gérées par la version de Python sous laquelle le code s'exécute. Si pour " +"certaines raisons cela ne fonctionne pas, alors vous devez tester si votre " +"version est Python 2 et non Python 3. Afin de clarifier cette pratique, " +"voici un exemple." + +#: howto/pyporting.rst:311 +msgid "" +"Let's pretend that you need access to a feature of :mod:`importlib` that is " +"available in Python's standard library since Python 3.3 and available for " +"Python 2 through importlib2_ on PyPI. You might be tempted to write code to " +"access e.g. the :mod:`importlib.abc` module by doing the following::" +msgstr "" +"Supposons que vous avez besoin d'accéder à une fonctionnalité de :mod:" +"`importlib` qui est disponible dans la bibliothèque standard de Python " +"depuis la version 3.3, dans celle de Python 2 via le module importlib2_ sur " +"*PyPI*. Vous pourriez être tenté d'écrire un code qui accède, par exemple, " +"au module :mod:`importlib.abc` avec l'approche suivante ::" + +#: howto/pyporting.rst:323 +msgid "" +"The problem with this code is what happens when Python 4 comes out? It would " +"be better to treat Python 2 as the exceptional case instead of Python 3 and " +"assume that future Python versions will be more compatible with Python 3 " +"than Python 2::" +msgstr "" +"Le problème est le suivant : que se passe-t-il lorsque Python 4 est publié ? " +"Il serait préférable de traiter le cas Python 2 comme l'exception plutôt que " +"Python 3 et de supposer que les versions futures de Python 2 seront plus " +"compatibles avec Python 3 qu'avec Python 2 ::" + +#: howto/pyporting.rst:335 +msgid "" +"The best solution, though, is to do no version detection at all and instead " +"rely on feature detection. That avoids any potential issues of getting the " +"version detection wrong and helps keep you future-compatible::" +msgstr "" +"Néanmoins la meilleure solution est de ne pas chercher à déterminer la " +"version de Python mais plutôt à détecter les fonctionnalités disponibles. " +"Cela évite les problèmes potentiels liés aux erreurs de détection de version " +"et facilite la compatibilité future ::" + +#: howto/pyporting.rst:346 +msgid "Prevent compatibility regressions" +msgstr "Prévenir les régressions de compatibilité" + +#: howto/pyporting.rst:348 +msgid "" +"Once you have fully translated your code to be compatible with Python 3, you " +"will want to make sure your code doesn't regress and stop working under " +"Python 3. This is especially true if you have a dependency which is blocking " +"you from actually running under Python 3 at the moment." +msgstr "" +"Une fois votre code traduit pour être compatible avec Python 3, vous devez " +"vous assurer que votre code n'a pas régressé ou qu'il ne fonctionne pas sous " +"Python 3. Ceci est particulièrement important si une de vos dépendances vous " +"empêche de réellement exécuter le code sous Python 3 pour le moment." + +#: howto/pyporting.rst:353 +msgid "" +"To help with staying compatible, any new modules you create should have at " +"least the following block of code at the top of it::" +msgstr "" +"Afin de vous aider à maintenir la compatibilité, nous préconisons que tous " +"les nouveaux modules que vous créez aient au moins le bloc de code suivant " +"en en-tête ::" + +#: howto/pyporting.rst:360 +msgid "" +"You can also run Python 2 with the ``-3`` flag to be warned about various " +"compatibility issues your code triggers during execution. If you turn " +"warnings into errors with ``-Werror`` then you can make sure that you don't " +"accidentally miss a warning." +msgstr "" +"Vous pouvez également lancer Python 2 avec le paramètre ``-3`` afin d'être " +"alerté en cas de divers problèmes de compatibilité que votre code déclenche " +"durant son exécution. Si vous transformez les avertissements en erreur avec " +"``-Werror``, vous pouvez être certain que ne passez pas accidentellement à " +"côté d'un avertissement." + +#: howto/pyporting.rst:365 +msgid "" +"You can also use the Pylint_ project and its ``--py3k`` flag to lint your " +"code to receive warnings when your code begins to deviate from Python 3 " +"compatibility. This also prevents you from having to run Modernize_ or " +"Futurize_ over your code regularly to catch compatibility regressions. This " +"does require you only support Python 2.7 and Python 3.4 or newer as that is " +"Pylint's minimum Python version support." +msgstr "" +"Vous pouvez également utiliser le projet Pylint_ et son option ``--py3k`` " +"afin de modifier votre code pour recevoir des avertissements lorsque celui-" +"ci dévie de la compatibilité Python 3. Cela vous évite par ailleurs " +"d'appliquer Modernize_ ou Futurize_ sur votre code régulièrement pour " +"détecter des régressions liées à la compatibilité. Cependant cela nécessite " +"de votre part le support de Python 2.7 et Python 3.4 ou ultérieur étant " +"donné qu'il s'agit de la version minimale gérée par Pylint." + +#: howto/pyporting.rst:374 +msgid "Check which dependencies block your transition" +msgstr "Vérifier quelles dépendances empêchent la migration" + +#: howto/pyporting.rst:376 +msgid "" +"**After** you have made your code compatible with Python 3 you should begin " +"to care about whether your dependencies have also been ported. The " +"caniusepython3_ project was created to help you determine which projects -- " +"directly or indirectly -- are blocking you from supporting Python 3. There " +"is both a command-line tool as well as a web interface at https://" +"caniusepython3.com." +msgstr "" +"**Après** avoir rendu votre code compatible avec Python 3, vous devez " +"commencer à vous intéresser au portage de vos dépendances. Le projet " +"`caniusepython3`_ a été créé afin de vous aider à déterminer quels projets " +"sont bloquants dans votre support de Python 3, directement ou indirectement. " +"Il existe un outil en ligne de commande ainsi qu'une interface web : https://" +"caniusepython3.com." + +#: howto/pyporting.rst:383 +msgid "" +"The project also provides code which you can integrate into your test suite " +"so that you will have a failing test when you no longer have dependencies " +"blocking you from using Python 3. This allows you to avoid having to " +"manually check your dependencies and to be notified quickly when you can " +"start running on Python 3." +msgstr "" +"Le projet fournit également du code intégrable dans votre suite de test qui " +"déclenchera un échec de test lorsque plus aucune de vos dépendances n'est " +"bloquante pour l'utilisation de Python 3. Cela vous permet de ne pas avoir à " +"vérifier manuellement vos dépendances et d'être notifié rapidement quand " +"vous pouvez exécuter votre application avec Python 3." + +#: howto/pyporting.rst:390 +msgid "Update your ``setup.py`` file to denote Python 3 compatibility" +msgstr "" +"Mettre à jour votre fichier ``setup.py`` pour spécifier la compatibilité " +"avec Python 3" + +#: howto/pyporting.rst:392 +msgid "" +"Once your code works under Python 3, you should update the classifiers in " +"your ``setup.py`` to contain ``Programming Language :: Python :: 3`` and to " +"not specify sole Python 2 support. This will tell anyone using your code " +"that you support Python 2 **and** 3. Ideally you will also want to add " +"classifiers for each major/minor version of Python you now support." +msgstr "" +"Une fois que votre code fonctionne sous Python 3, vous devez mettre à jour " +"vos classeurs dans votre ``setup.py`` pour inclure ``Programming Language :: " +"Python :: 3`` et non seulement le support de Python 2. Cela signifiera à " +"quiconque utilise votre code que vous gérez Python 2 **et** 3. Dans l'idéal " +"vous devrez aussi ajouter une mention pour chaque version majeure/mineure de " +"Python que vous supportez désormais." + +#: howto/pyporting.rst:400 +msgid "Use continuous integration to stay compatible" +msgstr "Utiliser l'intégration continue pour maintenir la compatibilité" + +#: howto/pyporting.rst:402 +msgid "" +"Once you are able to fully run under Python 3 you will want to make sure " +"your code always works under both Python 2 & 3. Probably the best tool for " +"running your tests under multiple Python interpreters is tox_. You can then " +"integrate tox with your continuous integration system so that you never " +"accidentally break Python 2 or 3 support." +msgstr "" +"Une fois que vous êtes en mesure d'exécuter votre code sous Python 3, vous " +"devrez vous assurer que celui-ci fonctionne toujours pour Python 2 & 3. tox_ " +"est vraisemblablement le meilleur outil pour exécuter vos tests avec " +"plusieurs interpréteurs Python. Vous pouvez alors intégrer *tox* à votre " +"système d'intégration continue afin de ne jamais accidentellement casser " +"votre gestion de Python 2 ou 3." + +#: howto/pyporting.rst:408 +msgid "" +"You may also want to use the ``-bb`` flag with the Python 3 interpreter to " +"trigger an exception when you are comparing bytes to strings or bytes to an " +"int (the latter is available starting in Python 3.5). By default type-" +"differing comparisons simply return ``False``, but if you made a mistake in " +"your separation of text/binary data handling or indexing on bytes you " +"wouldn't easily find the mistake. This flag will raise an exception when " +"these kinds of comparisons occur, making the mistake much easier to track " +"down." +msgstr "" +"Vous pouvez également utiliser l'option ``-bb`` de l'interpréteur Python 3 " +"afin de déclencher une exception lorsque vous comparez des *bytes* à des " +"chaînes de caractères ou à un entier (cette deuxième possibilité est " +"disponible à partir de Python 3.5). Par défaut, des comparaisons entre types " +"différents renvoient simplement ``False`` mais si vous avez fait une erreur " +"dans votre séparation de la gestion texte/données binaires ou votre indiçage " +"des *bytes*, vous ne trouverez pas facilement le bogue. Ce drapeau lève une " +"exception lorsque ce genre de comparaison apparaît, facilitant ainsi son " +"identification et sa localisation." + +#: howto/pyporting.rst:416 +msgid "" +"And that's mostly it! At this point your code base is compatible with both " +"Python 2 and 3 simultaneously. Your testing will also be set up so that you " +"don't accidentally break Python 2 or 3 compatibility regardless of which " +"version you typically run your tests under while developing." +msgstr "" +"Et c'est à peu près tout ! Une fois ceci fait, votre code source est " +"compatible avec Python 2 et 3 simultanément. Votre suite de test est " +"également en place de telle sorte que vous ne cassiez pas la compatibilité " +"Python 2 ou 3 indépendamment de la version que vous utilisez pendant le " +"développement." + +#: howto/pyporting.rst:423 +msgid "Consider using optional static type checking" +msgstr "Envisager l'utilisation d'un vérificateur de type statique optionnel" + +#: howto/pyporting.rst:425 +msgid "" +"Another way to help port your code is to use a static type checker like " +"mypy_ or pytype_ on your code. These tools can be used to analyze your code " +"as if it's being run under Python 2, then you can run the tool a second time " +"as if your code is running under Python 3. By running a static type checker " +"twice like this you can discover if you're e.g. misusing binary data type in " +"one version of Python compared to another. If you add optional type hints to " +"your code you can also explicitly state whether your APIs use textual or " +"binary data, helping to make sure everything functions as expected in both " +"versions of Python." +msgstr "" +"Une autre façon de faciliter le portage de votre code est d'utiliser un " +"vérificateur de type statique comme mypy_ ou pytype_. Ces outils peuvent " +"être utilisés pour analyser votre code comme s'il était exécuté sous Python " +"2, puis une seconde fois comme s'il était exécuté sous Python 3. " +"L'utilisation double d'un vérificateur de type statique de cette façon " +"permet de détecter si, par exemple, vous faites une utilisation inappropriée " +"des types de données binaires dans une version de Python par rapport à " +"l'autre. Si vous ajoutez les indices optionnels de typage à votre code, vous " +"pouvez alors explicitement déclarer que vos API attendent des données " +"binaires ou du texte, ce qui facilite alors la vérification du comportement " +"de votre code dans les deux versions de Python." diff --git a/howto/regex.po b/howto/regex.po new file mode 100644 index 0000000000..4f32574eee --- /dev/null +++ b/howto/regex.po @@ -0,0 +1,2702 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-18 15:46+0200\n" +"PO-Revision-Date: 2022-10-18 12:27+0200\n" +"Last-Translator: Nabil Bendafi \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 3.0.1\n" + +#: howto/regex.rst:5 +msgid "Regular Expression HOWTO" +msgstr "Guide des expressions régulières" + +#: howto/regex.rst:0 +msgid "Author" +msgstr "Auteur" + +#: howto/regex.rst:7 +msgid "A.M. Kuchling " +msgstr "A.M. Kuchling " + +#: howto/regex.rst:None +msgid "Abstract" +msgstr "Résumé" + +#: howto/regex.rst:18 +msgid "" +"This document is an introductory tutorial to using regular expressions in " +"Python with the :mod:`re` module. It provides a gentler introduction than " +"the corresponding section in the Library Reference." +msgstr "" +"Ce document constitue un guide d'introduction à l'utilisation des " +"expressions régulières en Python avec le module :mod:`re`. Il fournit une " +"introduction plus abordable que la section correspondante dans le guide de " +"référence de la bibliothèque." + +#: howto/regex.rst:24 +msgid "Introduction" +msgstr "Introduction" + +#: howto/regex.rst:26 +msgid "" +"Regular expressions (called REs, or regexes, or regex patterns) are " +"essentially a tiny, highly specialized programming language embedded inside " +"Python and made available through the :mod:`re` module. Using this little " +"language, you specify the rules for the set of possible strings that you " +"want to match; this set might contain English sentences, or e-mail " +"addresses, or TeX commands, or anything you like. You can then ask " +"questions such as \"Does this string match the pattern?\", or \"Is there a " +"match for the pattern anywhere in this string?\". You can also use REs to " +"modify a string or to split it apart in various ways." +msgstr "" +"Les expressions régulières (notées RE ou motifs *regex* dans ce document) " +"sont essentiellement un petit langage de programmation hautement spécialisé " +"embarqué dans Python et dont la manipulation est rendue possible par " +"l'utilisation du module :mod:`re`. En utilisant ce petit langage, vous " +"définissez des règles pour spécifier une correspondance avec un ensemble " +"souhaité de chaînes de caractères ; ces chaînes peuvent être des phrases, " +"des adresses de courriel, des commandes *TeX* ou tout ce que vous voulez. " +"Vous pouvez ensuite poser des questions telles que « Est-ce que cette chaîne " +"de caractères correspond au motif ? » ou « Y a-t-il une correspondance pour " +"ce motif à l'intérieur de la chaîne de caractères ? ». Vous pouvez aussi " +"utiliser les RE pour modifier une chaîne de caractères ou la découper de " +"différentes façons." + +#: howto/regex.rst:35 +msgid "" +"Regular expression patterns are compiled into a series of bytecodes which " +"are then executed by a matching engine written in C. For advanced use, it " +"may be necessary to pay careful attention to how the engine will execute a " +"given RE, and write the RE in a certain way in order to produce bytecode " +"that runs faster. Optimization isn't covered in this document, because it " +"requires that you have a good understanding of the matching engine's " +"internals." +msgstr "" +"Un motif d'expression régulière est compilé en code intermédiaire " +"(*bytecode* en anglais) qui est ensuite exécuté par un moteur de " +"correspondance écrit en C. Pour une utilisation plus poussée, il peut " +"s'avérer nécessaire de s'intéresser à la manière dont le moteur exécute la " +"RE afin d'écrire une expression dont le code intermédiaire est plus rapide. " +"L'optimisation n'est pas traitée dans ce document, parce qu'elle nécessite " +"d'avoir une bonne compréhension des mécanismes internes du moteur de " +"correspondance." + +#: howto/regex.rst:42 +msgid "" +"The regular expression language is relatively small and restricted, so not " +"all possible string processing tasks can be done using regular expressions. " +"There are also tasks that *can* be done with regular expressions, but the " +"expressions turn out to be very complicated. In these cases, you may be " +"better off writing Python code to do the processing; while Python code will " +"be slower than an elaborate regular expression, it will also probably be " +"more understandable." +msgstr "" +"Le langage des expressions régulières est relativement petit et restreint, " +"donc toutes les tâches de manipulation de chaînes de caractères ne peuvent " +"pas être réalisées à l'aide d'expressions régulières. Il existe aussi des " +"tâches qui *peuvent* être réalisées à l'aide d'expressions régulières mais " +"qui ont tendance à produire des expressions régulières très compliquées. " +"Dans ces cas, il est plus utile d'écrire du code Python pour réaliser le " +"traitement ; même si le code Python est plus lent qu'une expression " +"régulière élaborée, il sera probablement plus compréhensible." + +#: howto/regex.rst:51 +msgid "Simple Patterns" +msgstr "Motifs simples" + +#: howto/regex.rst:53 +msgid "" +"We'll start by learning about the simplest possible regular expressions. " +"Since regular expressions are used to operate on strings, we'll begin with " +"the most common task: matching characters." +msgstr "" +"Nous commençons par étudier les expressions régulières les plus simples. " +"Dans la mesure où les expressions régulières sont utilisées pour manipuler " +"des chaînes de caractères, nous commençons par l'action la plus courante : " +"la correspondance de caractères." + +#: howto/regex.rst:57 +msgid "" +"For a detailed explanation of the computer science underlying regular " +"expressions (deterministic and non-deterministic finite automata), you can " +"refer to almost any textbook on writing compilers." +msgstr "" +"Pour une explication détaillée sur le concept informatique sous-jacent aux " +"expressions régulières (automate à états déterministe ou non-déterministe), " +"vous pouvez vous référer à n'importe quel manuel sur l'écriture de " +"compilateurs." + +#: howto/regex.rst:63 +msgid "Matching Characters" +msgstr "Correspondance de caractères" + +#: howto/regex.rst:65 +msgid "" +"Most letters and characters will simply match themselves. For example, the " +"regular expression ``test`` will match the string ``test`` exactly. (You " +"can enable a case-insensitive mode that would let this RE match ``Test`` or " +"``TEST`` as well; more about this later.)" +msgstr "" +"La plupart des lettres ou caractères correspondent simplement à eux-mêmes. " +"Par exemple, l'expression régulière ``test`` correspond à la chaîne de " +"caractères ``test``, précisément. Vous pouvez activer le mode non-sensible à " +"la casse qui permet à cette RE de correspondre également à ``Test`` ou " +"``TEST`` (ce sujet est traité par la suite)." + +#: howto/regex.rst:70 +msgid "" +"There are exceptions to this rule; some characters are special :dfn:" +"`metacharacters`, and don't match themselves. Instead, they signal that " +"some out-of-the-ordinary thing should be matched, or they affect other " +"portions of the RE by repeating them or changing their meaning. Much of " +"this document is devoted to discussing various metacharacters and what they " +"do." +msgstr "" +"Il existe des exceptions à cette règle ; certains caractères sont des :dfn:" +"`métacaractères` spéciaux et ne correspondent pas à eux-mêmes. Au lieu de " +"cela, ils signalent que certaines choses non ordinaires doivent " +"correspondre, ou ils affectent d'autre portions de la RE en les répétant ou " +"en changeant leur sens. Une grande partie de ce document est consacrée au " +"fonctionnement de ces métacaractères." + +#: howto/regex.rst:76 +msgid "" +"Here's a complete list of the metacharacters; their meanings will be " +"discussed in the rest of this HOWTO." +msgstr "" +"Voici une liste complète des métacaractères ; leur sens est décrit dans la " +"suite de ce guide." + +#: howto/regex.rst:83 +msgid "" +"The first metacharacters we'll look at are ``[`` and ``]``. They're used for " +"specifying a character class, which is a set of characters that you wish to " +"match. Characters can be listed individually, or a range of characters can " +"be indicated by giving two characters and separating them by a ``'-'``. For " +"example, ``[abc]`` will match any of the characters ``a``, ``b``, or ``c``; " +"this is the same as ``[a-c]``, which uses a range to express the same set of " +"characters. If you wanted to match only lowercase letters, your RE would be " +"``[a-z]``." +msgstr "" +"Les premiers métacaractères que nous étudions sont ``[`` et ``]``. Ils sont " +"utilisés pour spécifier une classe de caractères, qui forme un ensemble de " +"caractères dont vous souhaitez trouver la correspondance. Les caractères " +"peuvent être listés individuellement, ou une plage de caractères peut être " +"indiquée en fournissant deux caractères séparés par un ``'-'``. Par exemple, " +"``[abc]`` correspond à n'importe quel caractère parmi ``a``, ``b`` ou " +"``c`` ; c'est équivalent à ``[a-c]``, qui utilise une plage pour exprimer le " +"même ensemble de caractères. Si vous voulez trouver une chaîne qui ne " +"contient que des lettres en minuscules, la RE est ``[a-z]``." + +#: howto/regex.rst:92 +msgid "" +"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 (à 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 "" +"You can match the characters not listed within the class by :dfn:" +"`complementing` the set. This is indicated by including a ``'^'`` as the " +"first character of the class. For example, ``[^5]`` will match any character " +"except ``'5'``. If the caret appears elsewhere in a character class, it " +"does not have special meaning. For example: ``[5^]`` will match either a " +"``'5'`` or a ``'^'``." +msgstr "" +"Vous pouvez trouver une correspondance avec les caractères non listés dans " +"une classe en spécifiant le :dfn:`complément` de l'ensemble. Ceci est " +"indiqué en plaçant un ``'^'`` en tant que premier caractère de la classe. " +"Par exemple, ``[^5]`` correspond à tous les caractères, sauf ``'5'``. Si le " +"caret se trouve ailleurs dans la classe de caractères, il ne possède pas de " +"signification spéciale. Ainsi, ``[5^]`` correspond au ``'5'`` ou au " +"caractère ``'^'``." + +#: howto/regex.rst:103 +msgid "" +"Perhaps the most important metacharacter is the backslash, ``\\``. As in " +"Python string literals, the backslash can be followed by various characters " +"to signal various special sequences. It's also used to escape all the " +"metacharacters so you can still match them in patterns; for example, if you " +"need to match a ``[`` or ``\\``, you can precede them with a backslash to " +"remove their special meaning: ``\\[`` or ``\\\\``." +msgstr "" +"Le métacaractère le plus important est probablement la barre oblique inverse " +"(*backslash* en anglais), ``\\``. Comme dans les chaînes de caractères en " +"Python, la barre oblique inverse peut être suivie par différents caractères " +"pour signaler différentes séquences spéciales. Elle est aussi utilisée pour " +"échapper tous les métacaractères afin d'en trouver les correspondances dans " +"les motifs ; par exemple, si vous devez trouver une correspondance pour " +"``[`` ou ``\\``, vous pouvez les précéder avec une barre oblique inverse " +"pour annuler leur signification spéciale : ``\\[`` ou ``\\\\``." + +#: howto/regex.rst:110 +msgid "" +"Some of the special sequences beginning with ``'\\'`` represent predefined " +"sets of characters that are often useful, such as the set of digits, the set " +"of letters, or the set of anything that isn't whitespace." +msgstr "" +"Certaines séquences spéciales commençant par ``'\\'`` représentent des " +"ensembles de caractères prédéfinis qui sont souvent utiles, tels que " +"l'ensemble des chiffres, l'ensemble des lettres ou l'ensemble des caractères " +"qui ne sont pas des « blancs »." + +#: howto/regex.rst:115 +msgid "" +"Let's take an example: ``\\w`` matches any alphanumeric character. If the " +"regex pattern is expressed in bytes, this is equivalent to the class ``[a-zA-" +"Z0-9_]``. If the regex pattern is a string, ``\\w`` will match all the " +"characters marked as letters in the Unicode database provided by the :mod:" +"`unicodedata` module. You can use the more restricted definition of ``\\w`` " +"in a string pattern by supplying the :const:`re.ASCII` flag when compiling " +"the regular expression." +msgstr "" +"Prenons un exemple : ``\\w`` correspond à n'importe quel caractère " +"alphanumérique. Si l'expression régulière est exprimée en *bytes*, c'est " +"é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." + +#: howto/regex.rst:123 +msgid "" +"The following list of special sequences isn't complete. For a complete list " +"of sequences and expanded class definitions for Unicode string patterns, see " +"the last part of :ref:`Regular Expression Syntax ` in the " +"Standard Library reference. In general, the Unicode versions match any " +"character that's in the appropriate category in the Unicode database." +msgstr "" +"La liste de séquences spéciales suivante est incomplète. Pour une liste " +"complète des séquences et définitions de classes étendues relatives aux " +"motifs de chaînes de caractères Unicode, reportez-vous à la dernière partie " +"de la référence :ref:`Syntaxe d'Expressions Régulières ` de la " +"bibliothèque standard. En général, les versions Unicode trouvent une " +"correspondance avec n'importe quel caractère présent dans la catégorie " +"appropriée de la base de données Unicode." + +#: howto/regex.rst:131 +msgid "``\\d``" +msgstr "``\\d``" + +#: howto/regex.rst:131 +msgid "Matches any decimal digit; this is equivalent to the class ``[0-9]``." +msgstr "" +"Correspond à n'importe quel caractère numérique ; équivalent à la classe " +"``[0-9]``." + +#: howto/regex.rst:134 +msgid "``\\D``" +msgstr "``\\D``" + +#: howto/regex.rst:134 +msgid "" +"Matches any non-digit character; this is equivalent to the class ``[^0-9]``." +msgstr "" +"Correspond à n'importe quel caractère non numérique ; équivalent à la classe " +"``[^0-9]``." + +#: howto/regex.rst:138 +msgid "``\\s``" +msgstr "``\\s``" + +#: howto/regex.rst:137 +msgid "" +"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]``." + +#: howto/regex.rst:142 +msgid "``\\S``" +msgstr "``\\S``" + +#: howto/regex.rst:141 +msgid "" +"Matches any non-whitespace character; this is equivalent to the class ``[^ " +"\\t\\n\\r\\f\\v]``." +msgstr "" +"Correspond à n'importe quel caractère autre que « blanc » ; équivalent à la " +"classe ``[^ \\t\\n\\r\\f\\v]``." + +#: howto/regex.rst:146 +msgid "``\\w``" +msgstr "``\\w``" + +#: howto/regex.rst:145 +msgid "" +"Matches any alphanumeric character; this is equivalent to the class ``[a-zA-" +"Z0-9_]``." +msgstr "" +"Correspond à n'importe quel caractère alphanumérique ; équivalent à la " +"classe ``[a-zA-Z0-9_]``." + +#: howto/regex.rst:150 +msgid "``\\W``" +msgstr "``\\W``" + +#: howto/regex.rst:149 +msgid "" +"Matches any non-alphanumeric character; this is equivalent to the class " +"``[^a-zA-Z0-9_]``." +msgstr "" +"Correspond à n'importe quel caractère non-alphanumérique ; équivalent à la " +"classe ``[^a-zA-Z0-9_]``." + +#: howto/regex.rst:152 +msgid "" +"These sequences can be included inside a character class. For example, " +"``[\\s,.]`` is a character class that will match any whitespace character, " +"or ``','`` or ``'.'``." +msgstr "" +"Ces séquences peuvent être incluses dans une classe de caractères. Par " +"exemple, ``[\\s,.]`` est une classe de caractères qui correspond à tous les " +"caractères « blanc » ou ``','`` ou ``'.'``." + +#: howto/regex.rst:156 +msgid "" +"The final metacharacter in this section is ``.``. It matches anything " +"except a newline character, and there's an alternate mode (:const:`re." +"DOTALL`) where it will match even a newline. ``.`` is often used where you " +"want to match \"any character\"." +msgstr "" +"Le dernier métacaractère de cette section est ``.``. Il correspond à tous " +"les caractères, à l'exception du caractère de retour à la ligne ; il existe " +"un mode alternatif (:const:`re.DOTALL`) dans lequel il correspond également " +"au caractère de retour à la ligne. ``.`` est souvent utilisé lorsque l'on " +"veut trouver une correspondance avec « n'importe quel caractère »." + +#: howto/regex.rst:163 +msgid "Repeating Things" +msgstr "Répétitions" + +#: howto/regex.rst:165 +msgid "" +"Being able to match varying sets of characters is the first thing regular " +"expressions can do that isn't already possible with the methods available on " +"strings. However, if that was the only additional capability of regexes, " +"they wouldn't be much of an advance. Another capability is that you can " +"specify that portions of the RE must be repeated a certain number of times." +msgstr "" +"Trouver des correspondances de divers ensembles de caractères est la " +"première utilisation des expressions régulières, ce que l'on ne peut pas " +"faire avec les méthodes des chaînes. Cependant, si c'était la seule " +"possibilité des expressions régulières, le gain ne serait pas significatif. " +"Une autre utilisation consiste à spécifier des portions d'une RE qui peuvent " +"être répétées un certain nombre de fois." + +#: howto/regex.rst:171 +msgid "" +"The first metacharacter for repeating things that we'll look at is ``*``. " +"``*`` doesn't match the literal character ``'*'``; instead, it specifies " +"that the previous character can be matched zero or more times, instead of " +"exactly once." +msgstr "" +"Le premier métacaractère pour la répétition que nous abordons est ``*``. " +"``*`` ne correspond pas au caractère littéral ``'*'`` ; à la place, il " +"spécifie que le caractère précédent peut correspondre zéro, une ou plusieurs " +"fois (au lieu d'une seule fois)." + +#: howto/regex.rst:175 +msgid "" +"For example, ``ca*t`` will match ``'ct'`` (0 ``'a'`` characters), ``'cat'`` " +"(1 ``'a'``), ``'caaat'`` (3 ``'a'`` characters), and so forth." +msgstr "" +"Par exemple, ``cha*t`` correspond à ``'cht'`` (0 caractère ``'a'``), " +"``'chat'`` (1 ``'a'``), ``'chaaat'`` (3 caractères ``'a'``) et ainsi de " +"suite." + +#: howto/regex.rst:178 +msgid "" +"Repetitions such as ``*`` are :dfn:`greedy`; when repeating a RE, the " +"matching engine will try to repeat it as many times as possible. If later " +"portions of the pattern don't match, the matching engine will then back up " +"and try again with fewer repetitions." +msgstr "" +"Les répétitions telles que ``*`` sont :dfn:`gloutonnes` ; quand vous répétez " +"une RE, le moteur de correspondance essaie de trouver la correspondance la " +"plus longue en répétant le motif tant qu'il le peut. Si la suite du motif ne " +"correspond pas, le moteur de correspondance revient en arrière et essaie " +"avec moins de répétitions." + +#: howto/regex.rst:183 +msgid "" +"A step-by-step example will make this more obvious. Let's consider the " +"expression ``a[bcd]*b``. This matches the letter ``'a'``, zero or more " +"letters from the class ``[bcd]``, and finally ends with a ``'b'``. Now " +"imagine matching this RE against the string ``'abcbd'``." +msgstr "" +"Un exemple étape par étape mettra les choses au clair. Considérons " +"l'expression ``a[bcd]*b``. Elle correspond à la lettre ``'a'``, suivi " +"d'aucune ou plusieurs lettres de la classe ``[bcd]`` et finit par un " +"``'b'``. Maintenant, supposons que nous cherchons une correspondance de " +"cette RE avec la chaîne de caractères ``'abcbd'``." + +#: howto/regex.rst:189 +msgid "Step" +msgstr "Étape" + +#: howto/regex.rst:189 +msgid "Matched" +msgstr "Correspond" + +#: howto/regex.rst:189 +msgid "Explanation" +msgstr "Explication" + +#: howto/regex.rst:191 +msgid "1" +msgstr "1" + +#: howto/regex.rst:191 +msgid "``a``" +msgstr "``a``" + +#: howto/regex.rst:191 +msgid "The ``a`` in the RE matches." +msgstr "Le ``a`` correspond dans la RE." + +#: howto/regex.rst:193 +msgid "2" +msgstr "2" + +#: howto/regex.rst:193 +msgid "``abcbd``" +msgstr "``abcbd``" + +#: howto/regex.rst:193 +msgid "" +"The engine matches ``[bcd]*``, going as far as it can, which is to the end " +"of the string." +msgstr "" +"Le moteur de correspondance trouve ``[bcd]*``, va aussi loin qu'il le peut, " +"c.-à-d. la fin de la chaîne." + +#: howto/regex.rst:197 +msgid "3" +msgstr "3" + +#: howto/regex.rst:205 +msgid "*Failure*" +msgstr "*échec*" + +#: howto/regex.rst:197 +msgid "" +"The engine tries to match ``b``, but the current position is at the end of " +"the string, so it fails." +msgstr "" +"Le moteur essaie de trouver une correspondance avec ``b`` mais la position " +"courante est à la fin de la chaîne de caractères, donc il échoue." + +#: howto/regex.rst:202 +msgid "4" +msgstr "4" + +#: howto/regex.rst:213 +msgid "``abcb``" +msgstr "``abcb``" + +#: howto/regex.rst:202 +msgid "Back up, so that ``[bcd]*`` matches one less character." +msgstr "" +"Retour en arrière, de manière à ce que ``[bcd]*`` corresponde avec un " +"caractère de moins." + +#: howto/regex.rst:205 +msgid "5" +msgstr "5" + +#: howto/regex.rst:205 +msgid "" +"Try ``b`` again, but the current position is at the last character, which is " +"a ``'d'``." +msgstr "" +"Essaie encore ``b``, mais la position courante est le dernier caractère, qui " +"est ``'d'``." + +#: howto/regex.rst:213 +msgid "6" +msgstr "6" + +#: howto/regex.rst:209 +msgid "``abc``" +msgstr "``abc``" + +#: howto/regex.rst:209 +msgid "Back up again, so that ``[bcd]*`` is only matching ``bc``." +msgstr "" +"Encore un retour en arrière, de manière à ce que ``[bcd]*`` ne corresponde " +"qu'à ``bc``." + +#: howto/regex.rst:213 +msgid "" +"Try ``b`` again. This time the character at the current position is " +"``'b'``, so it succeeds." +msgstr "" +"Essaie ``b`` encore une fois. Cette fois, le caractère à la position " +"courante est ``'b'``, donc cela fonctionne." + +#: howto/regex.rst:219 +msgid "" +"The end of the RE has now been reached, and it has matched ``'abcb'``. This " +"demonstrates how the matching engine goes as far as it can at first, and if " +"no match is found it will then progressively back up and retry the rest of " +"the RE again and again. It will back up until it has tried zero matches for " +"``[bcd]*``, and if that subsequently fails, the engine will conclude that " +"the string doesn't match the RE at all." +msgstr "" +"La fin de la RE est maintenant atteinte et la correspondance trouvée est " +"``'abcb'``. Ceci démontre comment le moteur de correspondance essaie d'aller " +"le plus loin possible en premier et, si la correspondance échoue, il revient " +"progressivement en arrière et ré-essaie avec le reste de la RE encore et " +"encore. Il revient en arrière jusqu'à qu'il n'y ait aucune correspondance " +"pour ``[bcd]*`` et, si cela échoue toujours, le moteur conclut que la chaîne " +"de caractères et la RE ne correspondent pas du tout." + +#: howto/regex.rst:226 +msgid "" +"Another repeating metacharacter is ``+``, which matches one or more times. " +"Pay careful attention to the difference between ``*`` and ``+``; ``*`` " +"matches *zero* or more times, so whatever's being repeated may not be " +"present at all, while ``+`` requires at least *one* occurrence. To use a " +"similar example, ``ca+t`` will match ``'cat'`` (1 ``'a'``), ``'caaat'`` (3 " +"``'a'``\\ s), but won't match ``'ct'``." +msgstr "" +"Un autre métacaractère de répétition est ``+``, qui fait correspondre une ou " +"plusieurs fois. Faites bien attention à la différence entre ``*`` et ``+`` ; " +"``*`` fait correspondre *zéro* fois ou plus, ainsi ce qui doit être répété " +"peut ne pas être présent du tout, alors que ``+`` requiert au moins *une* " +"occurrence. Pour continuer avec le même exemple, ``cha+t`` correspond avec " +"``'chat'`` (1 ``'a'``), ``'chaaat'`` (3 ``'a'``) mais ne correspond pas avec " +"``'cht'``." + +#: howto/regex.rst:233 +msgid "" +"There are two more repeating qualifiers. The question mark character, ``?" +"``, matches either once or zero times; you can think of it as marking " +"something as being optional. For example, ``home-?brew`` matches either " +"``'homebrew'`` or ``'home-brew'``." +msgstr "" +"Il existe deux autres quantificateurs pour les répétitions. Le point " +"d'interrogation, ``?``, fait correspondre zéro ou une fois ; vous pouvez " +"vous le représenter comme indiquant une option. Par exemple, ``méta-?" +"caractère`` fait correspondre soit ``métacaractère``, soit ``méta-" +"caractère``." + +#: howto/regex.rst:238 +msgid "" +"The most complicated repeated qualifier is ``{m,n}``, where *m* and *n* are " +"decimal integers. This qualifier means there must be at least *m* " +"repetitions, and at most *n*. For example, ``a/{1,3}b`` will match ``'a/" +"b'``, ``'a//b'``, and ``'a///b'``. It won't match ``'ab'``, which has no " +"slashes, or ``'a////b'``, which has four." +msgstr "" +"Le plus compliqué des quantificateurs est ``{m,n}`` où *m* et *n* sont des " +"entiers décimaux. Ce quantificateur indique qu'il faut au moins *m* " +"répétitions et au plus *n*. Par exemple, ``a/{1,3}b`` fait correspondre ``'a/" +"b'``, ``'a//b'`` et ``'a///b'``. Elle ne fait pas correspondre ``'ab'`` (pas " +"de barre oblique) ni ``'a////b'`` (quatre barres obliques)." + +#: howto/regex.rst:244 +msgid "" +"You can omit either *m* or *n*; in that case, a reasonable value is assumed " +"for the missing value. Omitting *m* is interpreted as a lower limit of 0, " +"while omitting *n* results in an upper bound of infinity." +msgstr "" +"Vous pouvez omettre soit *m*, soit *n* ; dans ce cas, une valeur raisonnable " +"est prise pour la valeur manquante. Omettre *m* considère que la borne basse " +"est 0 alors qu'omettre *n* signifie qu'il n'y a pas de borne supérieure." + +#: howto/regex.rst:248 +msgid "" +"Readers of a reductionist bent may notice that the three other qualifiers " +"can all be expressed using this notation. ``{0,}`` is the same as ``*``, " +"``{1,}`` is equivalent to ``+``, and ``{0,1}`` is the same as ``?``. It's " +"better to use ``*``, ``+``, or ``?`` when you can, simply because they're " +"shorter and easier to read." +msgstr "" +"Le lecteur attentif aura noté que les trois premiers quantificateurs peuvent " +"être exprimés en utilisant cette notation. ``{0,}`` est la même chose que " +"``*``, ``{1,}`` est équivalent à ``+`` et ``{0,1}`` se comporte comme ``?``. " +"Il est préférable d'utiliser ``*``, ``+`` ou ``?`` quand vous le pouvez, " +"simplement parce qu'ils sont plus courts et plus faciles à lire." + +#: howto/regex.rst:256 +msgid "Using Regular Expressions" +msgstr "Utilisation des expressions régulières" + +#: howto/regex.rst:258 +msgid "" +"Now that we've looked at some simple regular expressions, how do we actually " +"use them in Python? The :mod:`re` module provides an interface to the " +"regular expression engine, allowing you to compile REs into objects and then " +"perform matches with them." +msgstr "" +"Maintenant que nous avons vu quelques expressions régulières simples, " +"utilisons-les concrètement. Le module :mod:`re` fournit une interface pour " +"le moteur de correspondance, ce qui permet de compiler les RE en objets et " +"d'effectuer des correspondances avec." + +#: howto/regex.rst:265 +msgid "Compiling Regular Expressions" +msgstr "Compilation des expressions régulières" + +#: howto/regex.rst:267 +msgid "" +"Regular expressions are compiled into pattern objects, which have methods " +"for various operations such as searching for pattern matches or performing " +"string substitutions. ::" +msgstr "" +"Les expressions régulières sont compilées en objets motifs, qui possèdent " +"des méthodes pour diverses opérations telles que la recherche de " +"correspondances ou les substitutions dans les chaînes. ::" + +#: howto/regex.rst:276 +msgid "" +":func:`re.compile` also accepts an optional *flags* argument, used to enable " +"various special features and syntax variations. We'll go over the available " +"settings later, but for now a single example will do::" +msgstr "" +":func:`re.compile` accepte aussi une option *flags*, utilisée pour activer " +"des fonctionnalités particulières et des variations de syntaxe. Nous " +"étudierons les options disponibles plus tard et, pour l'instant, un petit " +"exemple suffit ::" + +#: howto/regex.rst:282 +msgid "" +"The RE is passed to :func:`re.compile` as a string. REs are handled as " +"strings because regular expressions aren't part of the core Python language, " +"and no special syntax was created for expressing them. (There are " +"applications that don't need REs at all, so there's no need to bloat the " +"language specification by including them.) Instead, the :mod:`re` module is " +"simply a C extension module included with Python, just like the :mod:" +"`socket` or :mod:`zlib` modules." +msgstr "" +"La RE passée à :func:`re.compile` est une chaîne. Les RE sont des chaînes " +"car les expressions régulières ne font pas partie intrinsèque du langage " +"Python et aucune syntaxe particulière n'a été créée pour les exprimer (il " +"existe des applications qui ne nécessitent aucune RE et il n'a donc aucune " +"raison de grossir les spécifications du langage en incluant les RE). Ainsi, " +"le module :mod:`re` est simplement un module d'extension en C inclus dans " +"Python, tout comme les modules :mod:`socket` ou :mod:`zlib`." + +#: howto/regex.rst:289 +msgid "" +"Putting REs in strings keeps the Python language simpler, but has one " +"disadvantage which is the topic of the next section." +msgstr "" +"Exprimer les RE comme des chaînes de caractères garde le langage Python plus " +"simple mais introduit un inconvénient qui fait l'objet de la section " +"suivante." + +#: howto/regex.rst:296 +msgid "The Backslash Plague" +msgstr "La maudite barre oblique inverse" + +#: howto/regex.rst:298 +msgid "" +"As stated earlier, regular expressions use the backslash character " +"(``'\\'``) to indicate special forms or to allow special characters to be " +"used without invoking their special meaning. This conflicts with Python's " +"usage of the same character for the same purpose in string literals." +msgstr "" +"Comme indiqué précédemment, les expressions régulières utilisent la barre " +"oblique inverse (*backslash* en anglais) pour indiquer des constructions " +"particulières ou pour autoriser des caractères spéciaux sans que leur " +"signification spéciale ne soit invoquée. C'est en contradiction avec l'usage " +"de Python qui est qu'un caractère doit avoir la même signification dans les " +"littéraux de chaînes de caractères." + +#: howto/regex.rst:303 +msgid "" +"Let's say you want to write a RE that matches the string ``\\section``, " +"which might be found in a LaTeX file. To figure out what to write in the " +"program code, start with the desired string to be matched. Next, you must " +"escape any backslashes and other metacharacters by preceding them with a " +"backslash, resulting in the string ``\\\\section``. The resulting string " +"that must be passed to :func:`re.compile` must be ``\\\\section``. However, " +"to express this as a Python string literal, both backslashes must be escaped " +"*again*." +msgstr "" +"Considérons que vous voulez écrire une RE qui fait correspondre la chaîne de " +"caractères ``\\section`` (on en trouve dans un fichier *LaTeX*). Pour savoir " +"ce qu'il faut coder dans votre programme, commençons par la chaîne de " +"caractères cherchée. Ensuite, nous devons échapper chaque barre oblique " +"inverse et tout autre métacaractère en les précédant d'une barre oblique " +"inverse, ce qui donne la chaîne de caractères ``\\\\section``. La chaîne " +"résultante qui doit être passée à :func:`re.compile` est donc ``\\" +"\\section``. Comme nous devons l'exprimer sous la forme d'une chaîne " +"littérale Python, nous devons échapper les deux barres obliques inverses " +"*encore une fois*." + +#: howto/regex.rst:312 +msgid "Characters" +msgstr "Caractères" + +#: howto/regex.rst:312 +msgid "Stage" +msgstr "Niveau" + +#: howto/regex.rst:314 +msgid "``\\section``" +msgstr "``\\section``" + +#: howto/regex.rst:314 +msgid "Text string to be matched" +msgstr "Chaîne de caractère à chercher" + +#: howto/regex.rst:316 +msgid "``\\\\section``" +msgstr "``\\\\section``" + +#: howto/regex.rst:316 +msgid "Escaped backslash for :func:`re.compile`" +msgstr "Barre oblique inverse échappée pour :func:`re.compile`" + +#: howto/regex.rst:345 +msgid "``\"\\\\\\\\section\"``" +msgstr "``\"\\\\\\\\section\"``" + +#: howto/regex.rst:318 +msgid "Escaped backslashes for a string literal" +msgstr "" +"Barres obliques inverses échappées pour un littéral de chaîne de caractères" + +#: howto/regex.rst:321 +msgid "" +"In short, to match a literal backslash, one has to write ``'\\\\\\\\'`` as " +"the RE string, because the regular expression must be ``\\\\``, and each " +"backslash must be expressed as ``\\\\`` inside a regular Python string " +"literal. In REs that feature backslashes repeatedly, this leads to lots of " +"repeated backslashes and makes the resulting strings difficult to understand." +msgstr "" +"Pour faire court, si vous cherchez une correspondance pour une barre oblique " +"inverse littérale, écrivez ``'\\\\\\\\'`` dans votre chaîne RE, car " +"l'expression régulière doit être ``\\\\`` et que chaque barre oblique " +"inverse doit être exprimée comme ``\\\\`` dans un littéral chaîne de " +"caractères Python. Dans les RE qui comportent plusieurs barres obliques " +"inverses, cela conduit à beaucoup de barres obliques inverses et rend la " +"chaîne résultante difficile à comprendre." + +#: howto/regex.rst:327 +msgid "" +"The solution is to use Python's raw string notation for regular expressions; " +"backslashes are not handled in any special way in a string literal prefixed " +"with ``'r'``, so ``r\"\\n\"`` is a two-character string containing ``'\\'`` " +"and ``'n'``, while ``\"\\n\"`` is a one-character string containing a " +"newline. Regular expressions will often be written in Python code using this " +"raw string notation." +msgstr "" +"La solution consiste à utiliser les chaînes brutes Python pour les " +"expressions régulières ; les barres obliques inverses ne sont pas gérées " +"d'une manière particulière dans les chaînes littérales préfixées avec " +"``'r'``. Ainsi, ``r\"\\n\"`` est la chaîne de deux caractères contenant " +"``'\\'`` et ``'n'`` alors que ``\"\\n\"`` est la chaîne contenant uniquement " +"le caractère retour à la ligne. Les expressions régulières sont souvent " +"écrites dans le code Python en utilisant la notation « chaînes brutes »." + +#: howto/regex.rst:333 +msgid "" +"In addition, special escape sequences that are valid in regular expressions, " +"but not valid as Python string literals, now result in a :exc:" +"`DeprecationWarning` and will eventually become a :exc:`SyntaxError`, which " +"means the sequences will be invalid if raw string notation or escaping the " +"backslashes isn't used." +msgstr "" +"En complément, les séquences d'échappement valides dans les expressions " +"régulières, mais non valides dans les littéraux chaînes classiques, " +"produisent dorénavant un :exc:`DeprecationWarning` et, possiblement, " +"deviendront une :exc:`SyntaxError`, ce qui signifie que les séquences seront " +"invalides si la notation « chaîne brute » ou l'échappement des barres " +"obliques inverses ne sont pas utilisés." + +#: howto/regex.rst:341 +msgid "Regular String" +msgstr "Chaîne normale" + +#: howto/regex.rst:341 +msgid "Raw string" +msgstr "Chaîne de caractères brute" + +#: howto/regex.rst:343 +msgid "``\"ab*\"``" +msgstr "``\"ab*\"``" + +#: howto/regex.rst:343 +msgid "``r\"ab*\"``" +msgstr "``r\"ab*\"``" + +#: howto/regex.rst:345 +msgid "``r\"\\\\section\"``" +msgstr "``r\"\\\\section\"``" + +#: howto/regex.rst:347 +msgid "``\"\\\\w+\\\\s+\\\\1\"``" +msgstr "``\"\\\\w+\\\\s+\\\\1\"``" + +#: howto/regex.rst:347 +msgid "``r\"\\w+\\s+\\1\"``" +msgstr "``r\"\\w+\\s+\\1\"``" + +#: howto/regex.rst:352 +msgid "Performing Matches" +msgstr "Recherche de correspondances" + +#: howto/regex.rst:354 +msgid "" +"Once you have an object representing a compiled regular expression, what do " +"you do with it? Pattern objects have several methods and attributes. Only " +"the most significant ones will be covered here; consult the :mod:`re` docs " +"for a complete listing." +msgstr "" +"Une fois que nous avons un objet représentant une expression régulière " +"compilée, qu'en faisons-nous ? Les objets motifs ont plusieurs méthodes et " +"attributs. Seuls les plus significatifs seront couverts ici ; consultez la " +"documentation :mod:`re` pour la liste complète." + +#: howto/regex.rst:418 howto/regex.rst:1064 +msgid "Method/Attribute" +msgstr "Méthode/Attribut" + +#: howto/regex.rst:418 howto/regex.rst:1064 +msgid "Purpose" +msgstr "Objectif" + +#: howto/regex.rst:362 +msgid "``match()``" +msgstr "``match()``" + +#: howto/regex.rst:362 +msgid "Determine if the RE matches at the beginning of the string." +msgstr "Détermine si la RE fait correspond dès le début de la chaîne." + +#: howto/regex.rst:365 +msgid "``search()``" +msgstr "``search()``" + +#: howto/regex.rst:365 +msgid "Scan through a string, looking for any location where this RE matches." +msgstr "Analyse la chaîne à la recherche d'une position où la RE correspond." + +#: howto/regex.rst:368 +msgid "``findall()``" +msgstr "``findall()``" + +#: howto/regex.rst:368 +msgid "Find all substrings where the RE matches, and returns them as a list." +msgstr "" +"Trouve toutes les sous-chaînes qui correspondent à la RE et les renvoie sous " +"la forme d'une liste." + +#: howto/regex.rst:371 +msgid "``finditer()``" +msgstr "``finditer()``" + +#: howto/regex.rst:371 +msgid "" +"Find all substrings where the RE matches, and returns them as an :term:" +"`iterator`." +msgstr "" +"Trouve toutes les sous-chaînes qui correspondent à la RE et les renvoie sous " +"la forme d'un :term:`itérateur `." + +#: howto/regex.rst:375 +msgid "" +":meth:`~re.Pattern.match` and :meth:`~re.Pattern.search` return ``None`` if " +"no match can be found. If they're successful, a :ref:`match object ` instance is returned, containing information about the match: " +"where it starts and ends, the substring it matched, and more." +msgstr "" +":meth:`~re.Pattern.match` et :meth:`~re.Pattern.search` renvoient ``None`` " +"si aucune correspondance ne peut être trouvée. Si elles trouvent une " +"correspondance, une instance d'\\ :ref:`objet correspondance ` est renvoyée, contenant les informations relatives à la " +"correspondance : position de départ et de fin, la sous-chaîne qui correspond " +"et d'autres informations." + +#: howto/regex.rst:380 +msgid "" +"You can learn about this by interactively experimenting with the :mod:`re` " +"module. If you have :mod:`tkinter` available, you may also want to look at :" +"source:`Tools/demo/redemo.py`, a demonstration program included with the " +"Python distribution. It allows you to enter REs and strings, and displays " +"whether the RE matches or fails. :file:`redemo.py` can be quite useful when " +"trying to debug a complicated RE." +msgstr "" +"Vous pouvez apprendre leur fonctionnement en expérimentant de manière " +"interactive avec le module :mod:`re`. Si vous disposez de :mod:`tkinter`, " +"vous pouvez aussi regarder les sources de :source:`Tools/demo/redemo.py`, un " +"programme de démonstration inclus dans la distribution Python. Ce programme " +"vous permet de rentrer des RE et des chaînes, affichant si la RE correspond " +"ou pas. :file:`redemo.py` peut s'avérer particulièrement utile quand vous " +"devez déboguer une RE compliquée." + +#: howto/regex.rst:387 +msgid "" +"This HOWTO uses the standard Python interpreter for its examples. First, run " +"the Python interpreter, import the :mod:`re` module, and compile a RE::" +msgstr "" +"Ce guide utilise l'interpréteur standard de Python pour ses exemples. " +"Commencez par lancer l'interpréteur Python, importez le module :mod:`re` et " +"compilez une RE ::" + +#: howto/regex.rst:395 +msgid "" +"Now, you can try matching various strings against the RE ``[a-z]+``. An " +"empty string shouldn't match at all, since ``+`` means 'one or more " +"repetitions'. :meth:`~re.Pattern.match` should return ``None`` in this case, " +"which will cause the interpreter to print no output. You can explicitly " +"print the result of :meth:`!match` to make this clear. ::" +msgstr "" +"Maintenant, vous pouvez tester des correspondances de la RE ``[a-z]+`` avec " +"différentes chaînes. Une chaîne vide ne doit pas correspondre, puisque ``+`` " +"indique « une ou plusieurs occurrences ». :meth:`~re.Pattern.match` doit " +"renvoyer ``None`` dans ce cas, ce qui fait que l'interpréteur n'affiche " +"rien. Vous pouvez afficher le résultat de :meth:`!match` explicitement pour " +"que ce soit clair. ::" + +#: howto/regex.rst:405 +msgid "" +"Now, let's try it on a string that it should match, such as ``tempo``. In " +"this case, :meth:`~re.Pattern.match` will return a :ref:`match object `, so you should store the result in a variable for later use. ::" +msgstr "" +"Maintenant, essayons sur une chaîne qui doit correspondre, par exemple " +"``tempo``. Dans ce cas, :meth:`~re.Pattern.match` renvoie un :ref:`objet " +"correspondance `, vous pouvez ainsi stocker le résultat dans " +"une variable pour une utilisation ultérieure. ::" + +#: howto/regex.rst:413 +msgid "" +"Now you can query the :ref:`match object ` for information " +"about the matching string. Match object instances also have several methods " +"and attributes; the most important ones are:" +msgstr "" +"Maintenant, vous pouvez interroger l'\\ :ref:`objet correspondance ` pour obtenir des informations sur la chaîne qui correspond. Les " +"instances d'objets correspondances possèdent plusieurs méthodes et " +"attributs ; les plus importants sont :" + +#: howto/regex.rst:420 +msgid "``group()``" +msgstr "``group()``" + +#: howto/regex.rst:420 +msgid "Return the string matched by the RE" +msgstr "Renvoie la chaîne de caractères correspondant à la RE" + +#: howto/regex.rst:422 +msgid "``start()``" +msgstr "``start()``" + +#: howto/regex.rst:422 +msgid "Return the starting position of the match" +msgstr "Renvoie la position de début de la correspondance" + +#: howto/regex.rst:424 +msgid "``end()``" +msgstr "``end()``" + +#: howto/regex.rst:424 +msgid "Return the ending position of the match" +msgstr "Renvoie la position de fin de la correspondance" + +#: howto/regex.rst:426 +msgid "``span()``" +msgstr "``span()``" + +#: howto/regex.rst:426 +msgid "Return a tuple containing the (start, end) positions of the match" +msgstr "" +"Renvoie un *n*-uplet contenant les positions (début, fin) de la " +"correspondance" + +#: howto/regex.rst:430 +msgid "Trying these methods will soon clarify their meaning::" +msgstr "Essayons ces méthodes pour clarifier leur signification ::" + +#: howto/regex.rst:439 +msgid "" +":meth:`~re.Match.group` returns the substring that was matched by the RE. :" +"meth:`~re.Match.start` and :meth:`~re.Match.end` return the starting and " +"ending index of the match. :meth:`~re.Match.span` returns both start and end " +"indexes in a single tuple. Since the :meth:`~re.Pattern.match` method only " +"checks if the RE matches at the start of a string, :meth:`!start` will " +"always be zero. However, the :meth:`~re.Pattern.search` method of patterns " +"scans through the string, so the match may not start at zero in that " +"case. ::" +msgstr "" +":meth:`~re.Match.group` renvoie la sous-chaîne qui correspond à la RE. :meth:" +"`~re.Match.start` et :meth:`~re.Match.end` renvoient les indices de début et " +"de fin de la correspondance. :meth:`~re.Match.span` renvoie les indices de " +"début et de fin dans un seul couple. Comme la méthode :meth:`~re.Pattern." +"match` ne fait que vérifier si la RE correspond au début de la chaîne, :meth:" +"`!start` vaut toujours zéro. Cependant, la méthode :meth:`~re.Pattern." +"search` d'un motif analyse toute la chaîne, afin de trouver une " +"correspondance potentielle qui ne commence pas à zéro. ::" + +#: howto/regex.rst:456 +msgid "" +"In actual programs, the most common style is to store the :ref:`match object " +"` in a variable, and then check if it was ``None``. This " +"usually looks like::" +msgstr "" +"Dans les programmes réels, la façon de faire la plus courante consiste à " +"stocker l'\\ :ref:`objet correspondance ` dans une variable, " +"puis à vérifier s'il vaut ``None``. Généralement, cela ressemble à ceci ::" + +#: howto/regex.rst:467 +msgid "" +"Two pattern methods return all of the matches for a pattern. :meth:`~re." +"Pattern.findall` returns a list of matching strings::" +msgstr "" +"Deux méthodes de motifs renvoient toutes les correspondances pour un motif. :" +"meth:`~re.Pattern.findall` renvoie une liste des chaînes qui correspondent ::" + +#: howto/regex.rst:474 +msgid "" +"The ``r`` prefix, making the literal a raw string literal, is needed in this " +"example because escape sequences in a normal \"cooked\" string literal that " +"are not recognized by Python, as opposed to regular expressions, now result " +"in a :exc:`DeprecationWarning` and will eventually become a :exc:" +"`SyntaxError`. See :ref:`the-backslash-plague`." +msgstr "" +"Le préfixe ``r``, qui indique une chaîne brute littérale, est nécessaire " +"dans cet exemple car les séquences d'échappement dans une chaîne littérale " +"qui ne sont pas reconnues par Python, alors qu'elles le sont par les " +"expressions régulières, produisent maintenant un :exc:`DeprecationWarning` " +"et deviendront possiblement des :exc:`SyntaxError`. Reportez-vous à :ref:" +"`the-backslash-plague`." + +#: howto/regex.rst:480 +msgid "" +":meth:`~re.Pattern.findall` has to create the entire list before it can be " +"returned as the result. The :meth:`~re.Pattern.finditer` method returns a " +"sequence of :ref:`match object ` instances as an :term:" +"`iterator`::" +msgstr "" +":meth:`~re.Pattern.findall` doit créer la liste entière avant de la renvoyer " +"comme résultat. La méthode :meth:`~re.Pattern.finditer` renvoie une séquence " +"d'instances d'\\ :ref:`objets correspondances ` en tant :term:" +"`qu'itérateur ` ::" + +#: howto/regex.rst:496 +msgid "Module-Level Functions" +msgstr "Fonctions de niveau module" + +#: howto/regex.rst:498 +msgid "" +"You don't have to create a pattern object and call its methods; the :mod:" +"`re` module also provides top-level functions called :func:`~re.match`, :" +"func:`~re.search`, :func:`~re.findall`, :func:`~re.sub`, and so forth. " +"These functions take the same arguments as the corresponding pattern method " +"with the RE string added as the first argument, and still return either " +"``None`` or a :ref:`match object ` instance. ::" +msgstr "" +"Vous n'avez pas besoin de créer un objet motif et d'appeler ses méthodes ; " +"le module :mod:`re` fournit des fonctions à son niveau, ce sont :func:`~re." +"match`, :func:`~re.search`, :func:`~re.findall`, :func:`~re.sub` et ainsi de " +"suite. Ces fonctions prennent les mêmes arguments que les méthodes " +"correspondantes des objets motifs, avec la chaîne RE ajoutée en tant que " +"premier argument. Elles renvoient toujours ``None`` ou une instance d'\\ :" +"ref:`objet correspondance `. ::" + +#: howto/regex.rst:510 +msgid "" +"Under the hood, these functions simply create a pattern object for you and " +"call the appropriate method on it. They also store the compiled object in a " +"cache, so future calls using the same RE won't need to parse the pattern " +"again and again." +msgstr "" +"En interne, ces fonctions créent simplement un objet motif pour vous et " +"appellent la méthode appropriée de cet objet. Elles stockent également " +"l'objet compilé dans un cache afin que les appels suivants qui utilisent la " +"même RE n'aient pas besoin d'analyser le motif une nouvelle fois." + +#: howto/regex.rst:515 +msgid "" +"Should you use these module-level functions, or should you get the pattern " +"and call its methods yourself? If you're accessing a regex within a loop, " +"pre-compiling it will save a few function calls. Outside of loops, there's " +"not much difference thanks to the internal cache." +msgstr "" +"Devez-vous utiliser ces fonctions au niveau des modules ou devez-vous " +"calculer le motif et appeler vous-même ses méthodes ? Si vous utilisez " +"l'expression régulière à l'intérieur d'une boucle, la pré-compilation permet " +"d'économiser quelques appels de fonctions. En dehors des boucles, il n'y a " +"pas beaucoup de différence grâce au cache interne." + +#: howto/regex.rst:523 +msgid "Compilation Flags" +msgstr "Options de compilation" + +#: howto/regex.rst:525 +msgid "" +"Compilation flags let you modify some aspects of how regular expressions " +"work. Flags are available in the :mod:`re` module under two names, a long " +"name such as :const:`IGNORECASE` and a short, one-letter form such as :const:" +"`I`. (If you're familiar with Perl's pattern modifiers, the one-letter " +"forms use the same letters; the short form of :const:`re.VERBOSE` is :const:" +"`re.X`, for example.) Multiple flags can be specified by bitwise OR-ing " +"them; ``re.I | re.M`` sets both the :const:`I` and :const:`M` flags, for " +"example." +msgstr "" +"Les options de compilation vous permettent de modifier le comportement des " +"expressions régulières. Ces options sont accessibles dans le module :mod:" +"`re` par deux noms, un long du type :const:`IGNORECASE` et un court (une " +"seule lettre) tel que :const:`I` (si vous êtes habitués aux modificateurs de " +"motifs Perl, la version courte utilise les mêmes lettres que Perl, par " +"exemple la version courte de :const:`re.VERBOSE` est :const:`re.X`). " +"Plusieurs options peuvent être spécifiées en appliquant l'opérateur bit-à-" +"bit *OR* ; par exemple, ``re.I | re.M`` active à la fois les options :const:" +"`I` et :const:`M`." + +#: howto/regex.rst:533 +msgid "" +"Here's a table of the available flags, followed by a more detailed " +"explanation of each one." +msgstr "" +"Vous trouvez ci-dessous le tableau des options disponibles, suivies " +"d'explications détaillées." + +#: howto/regex.rst:537 +msgid "Flag" +msgstr "Option" + +#: howto/regex.rst:537 +msgid "Meaning" +msgstr "Signification" + +#: howto/regex.rst:539 +msgid ":const:`ASCII`, :const:`A`" +msgstr ":const:`ASCII`, :const:`A`" + +#: howto/regex.rst:539 +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 " +"ayant la propriété demandée." + +#: howto/regex.rst:543 +msgid ":const:`DOTALL`, :const:`S`" +msgstr ":const:`DOTALL`, :const:`S`" + +#: howto/regex.rst:543 +msgid "Make ``.`` match any character, including newlines." +msgstr "" +"Fait en sorte que ``.`` corresponde à n'importe quel caractère, caractère de " +"retour à la ligne inclus." + +#: howto/regex.rst:546 +msgid ":const:`IGNORECASE`, :const:`I`" +msgstr ":const:`IGNORECASE`, :const:`I`" + +#: howto/regex.rst:546 +msgid "Do case-insensitive matches." +msgstr "Recherche une correspondance sans tenir compte de la casse." + +#: howto/regex.rst:548 +msgid ":const:`LOCALE`, :const:`L`" +msgstr ":const:`LOCALE`, :const:`L`" + +#: howto/regex.rst:548 +msgid "Do a locale-aware match." +msgstr "" +"Recherche une correspondance en tenant compte de la configuration de la " +"région." + +#: howto/regex.rst:550 +msgid ":const:`MULTILINE`, :const:`M`" +msgstr ":const:`MULTILINE`, :const:`M`" + +#: howto/regex.rst:550 +msgid "Multi-line matching, affecting ``^`` and ``$``." +msgstr "Correspondance multi-lignes, affecte ``^`` et ``$``." + +#: howto/regex.rst:553 +msgid ":const:`VERBOSE`, :const:`X` (for 'extended')" +msgstr "" +":const:`VERBOSE`, :const:`X` (pour *extended*, c.-à-d. étendu en anglais)" + +#: howto/regex.rst:553 +msgid "" +"Enable verbose REs, which can be organized more cleanly and understandably." +msgstr "" +"Active les RE verbeuses, qui peuvent être organisées de manière plus propre " +"et compréhensible." + +#: howto/regex.rst:562 +msgid "" +"Perform case-insensitive matching; character class and literal strings will " +"match letters by ignoring case. For example, ``[A-Z]`` will match lowercase " +"letters, too. Full Unicode matching also works unless the :const:`ASCII` " +"flag is used to disable non-ASCII matches. When the Unicode patterns ``[a-" +"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'``, " +"``'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." +msgstr "" +"Effectue une correspondance insensible à la casse ; les classes de " +"caractères et les littéraux de chaînes de caractères ignorent la casse pour " +"la correspondance. Par exemple, ``[A-Z]`` correspond aussi aux lettres " +"minuscules. La correspondance Unicode complète fonctionne également, sauf si " +"l'option :const:`ASCII` est utilisée pour désactiver les correspondances non " +"ASCII. Lorsque les motifs Unicode ``[a-z]`` ou ``[A-Z]`` sont utilisés en " +"combinaison avec l'option :const:`IGNORECASE`, ils correspondent avec les 52 " +"lettres ASCII et 4 lettres non ASCII supplémentaires : 'İ' (U+0130, lettre I " +"en majuscule latine avec un point au-dessus), 'ı' (U+0131, lettre minuscule " +"latine i sans point au-dessus), 'ſ' (U+017F, lettre minuscule latine longue " +"s) et 'K' (U+212A, signe du Kelvin). ``Spam`` correspond ainsi à ``'Spam'``, " +"``'spam'``, ``'spAM'`` ou ``'ſpam'`` (ce dernier ne correspond qu'en mode " +"Unicode). Le passage en minuscules ne prend pas en compte la configuration " +"de région courante ; elle le fait si vous mettez aussi l'option :const:" +"`LOCALE`." + +#: howto/regex.rst:580 +msgid "" +"Make ``\\w``, ``\\W``, ``\\b``, ``\\B`` and case-insensitive matching " +"dependent on the current locale instead of the Unicode database." +msgstr "" +"Rend ``\\w``, ``\\W``, ``\\b``, ``\\B`` et les correspondances non sensibles " +"à la casse dépendants de la configuration de la région courante au lieu de " +"la base de données Unicode." + +#: howto/regex.rst:583 +msgid "" +"Locales are a feature of the C library intended to help in writing programs " +"that take account of language differences. For example, if you're " +"processing encoded French text, you'd want to be able to write ``\\w+`` to " +"match words, but ``\\w`` only matches the character class ``[A-Za-z]`` in " +"bytes patterns; it won't match bytes corresponding to ``é`` or ``ç``. If " +"your system is configured properly and a French locale is selected, certain " +"C functions will tell the program that the byte corresponding to ``é`` " +"should also be considered a letter. Setting the :const:`LOCALE` flag when " +"compiling a regular expression will cause the resulting compiled object to " +"use these C functions for ``\\w``; this is slower, but also enables ``\\w+`` " +"to match French words as you'd expect. The use of this flag is discouraged " +"in Python 3 as the locale mechanism is very unreliable, it only handles one " +"\"culture\" at a time, and it only works with 8-bit locales. Unicode " +"matching is already enabled by default in Python 3 for Unicode (str) " +"patterns, and it is able to handle different locales/languages." +msgstr "" +"Les *locales* sont une caractéristique de la bibliothèque C destinées à " +"favoriser une programmation qui tient compte des différences linguistiques " +"(NdT : nous utilisons *configuration de région* dans cette page pour " +"désigner ce concept de la bibliothèque C). Par exemple, si vous traitez du " +"texte français, vous souhaitez pouvoir écrire ``\\w+`` pour faire " +"correspondre les mots, mais ``\\w`` ne correspond qu'à la classe de " +"caractères ``[A-Za-za-z]`` en octets ; cette classe ne correspond pas avec " +"les octets codant ``é`` ou ``ç``. Si votre système est configuré " +"correctement et que la configuration de région est définie sur 'français', " +"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." + +#: howto/regex.rst:605 +msgid "" +"(``^`` and ``$`` haven't been explained yet; they'll be introduced in " +"section :ref:`more-metacharacters`.)" +msgstr "" +"Nota : ``^`` et ``$`` n'ont pas encore été expliqués ; ils sont introduits " +"dans la section :ref:`more-metacharacters`." + +#: howto/regex.rst:608 +msgid "" +"Usually ``^`` matches only at the beginning of the string, and ``$`` matches " +"only at the end of the string and immediately before the newline (if any) at " +"the end of the string. When this flag is specified, ``^`` matches at the " +"beginning of the string and at the beginning of each line within the string, " +"immediately following each newline. Similarly, the ``$`` metacharacter " +"matches either at the end of the string and at the end of each line " +"(immediately preceding each newline)." +msgstr "" +"Normalement, ``^`` correspond uniquement au début de la chaîne, et ``$`` " +"correspond uniquement à la fin de la chaîne et immédiatement avant la " +"nouvelle ligne (s'il y en a une) à la fin de la chaîne. Lorsque cette option " +"est spécifiée, ``^`` correspond au début de la chaîne de caractères et au " +"début de chaque ligne de la chaîne de caractères, immédiatement après le " +"début de la nouvelle ligne. De même, le métacaractère ``$`` correspond à la " +"fin de la chaîne de caractères ou à la fin de chaque ligne (précédant " +"immédiatement chaque nouvelle ligne)." + +#: howto/regex.rst:621 +msgid "" +"Makes the ``'.'`` special character match any character at all, including a " +"newline; without this flag, ``'.'`` will match anything *except* a newline." +msgstr "" +"Fait que le caractère spécial ``'.'`` corresponde avec n'importe quel " +"caractère, y compris le retour à la ligne ; sans cette option, ``'.'`` " +"correspond avec tout, *sauf* le retour à la ligne." + +#: howto/regex.rst:629 +msgid "" +"Make ``\\w``, ``\\W``, ``\\b``, ``\\B``, ``\\s`` and ``\\S`` perform ASCII-" +"only matching instead of full Unicode matching. This is only meaningful for " +"Unicode patterns, and is ignored for byte patterns." +msgstr "" +"Fait que ``\\w``, ``\\W``, ``\\b``, ``\\B``, ``\\s`` et ``\\S`` ne " +"correspondent qu'avec des caractères ASCII au lieu de l'ensemble des " +"caractères Unicode. Cette option n'a de sens que pour des motifs Unicode, " +"elle est ignorée pour les motifs *bytes*." + +#: howto/regex.rst:638 +msgid "" +"This flag allows you to write regular expressions that are more readable by " +"granting you more flexibility in how you can format them. When this flag " +"has been specified, whitespace within the RE string is ignored, except when " +"the whitespace is in a character class or preceded by an unescaped " +"backslash; this lets you organize and indent the RE more clearly. This flag " +"also lets you put comments within a RE that will be ignored by the engine; " +"comments are marked by a ``'#'`` that's neither in a character class or " +"preceded by an unescaped backslash." +msgstr "" +"Cette option vous permet d'écrire des expressions régulières plus lisibles " +"en vous permettant plus de flexibilité pour le formatage. Lorsque cette " +"option est activée, les « blancs » dans la chaîne RE sont ignorés, sauf " +"lorsque le « blancs » se trouve dans une classe de caractères ou est précédé " +"d'une barre oblique inverse ; ceci vous permet d'organiser et d'indenter vos " +"RE plus clairement. Cette option vous permet également de placer des " +"commentaires dans une RE, ils seront ignorés par le moteur ; les " +"commentaires commencent par un ``'#'`` qui n'est ni dans une classe de " +"caractères, ni précédé d'une barre oblique inverse." + +#: howto/regex.rst:647 +msgid "" +"For example, here's a RE that uses :const:`re.VERBOSE`; see how much easier " +"it is to read? ::" +msgstr "" +"Par exemple, voici une RE qui utilise :const:`re.VERBOSE` ; vous pouvez " +"constater qu'elle est beaucoup plus facile à lire ::" + +#: howto/regex.rst:660 +msgid "Without the verbose setting, the RE would look like this::" +msgstr "Sans l'option verbeuse, cette RE ressemble à ceci ::" + +#: howto/regex.rst:666 +msgid "" +"In the above example, Python's automatic concatenation of string literals " +"has been used to break up the RE into smaller pieces, but it's still more " +"difficult to understand than the version using :const:`re.VERBOSE`." +msgstr "" +"Dans l'exemple ci-dessus, Python concatène automatiquement les littéraux " +"chaînes de caractères qui ont été utilisés pour séparer la RE en petits " +"morceaux, mais la RE reste plus difficile à comprendre que sa version " +"utilisant :const:`re.VERBOSE`." + +#: howto/regex.rst:672 +msgid "More Pattern Power" +msgstr "Des motifs plus puissants" + +#: howto/regex.rst:674 +msgid "" +"So far we've only covered a part of the features of regular expressions. In " +"this section, we'll cover some new metacharacters, and how to use groups to " +"retrieve portions of the text that was matched." +msgstr "" +"Jusqu'à présent nous avons seulement couvert une partie des fonctionnalités " +"des expressions régulières. Dans cette section, nous couvrirons quelques " +"nouveaux métacaractères et l'utilisation des groupes pour récupérer des " +"portions de textes correspondantes." + +#: howto/regex.rst:682 +msgid "More Metacharacters" +msgstr "Plus de métacaractères" + +#: howto/regex.rst:684 +msgid "" +"There are some metacharacters that we haven't covered yet. Most of them " +"will be covered in this section." +msgstr "" +"Nous n'avons pas encore couvert tous les métacaractères. Cette section " +"traite de la plupart de ceux que nous n'avons pas abordés." + +#: howto/regex.rst:687 +msgid "" +"Some of the remaining metacharacters to be discussed are :dfn:`zero-width " +"assertions`. They don't cause the engine to advance through the string; " +"instead, they consume no characters at all, and simply succeed or fail. For " +"example, ``\\b`` is an assertion that the current position is located at a " +"word boundary; the position isn't changed by the ``\\b`` at all. This means " +"that zero-width assertions should never be repeated, because if they match " +"once at a given location, they can obviously be matched an infinite number " +"of times." +msgstr "" +"Certains métacaractères restants sont des :dfn:`assertions de largeur zéro` " +"(*zero-width assertions* en anglais). Ils ne font pas avancer le moteur dans " +"la chaîne de caractères ; ils ne consomment aucun caractère et ils " +"réussissent ou échouent tout simplement. Par exemple, ``\\b`` est une " +"assertion selon laquelle la position actuelle est située à la limite d'un " +"mot ; la position n'est pas modifiée par le \" \\b \". Cela signifie que les " +"assertions de largeur zéro ne doivent pas être répétées car, si elles " +"correspondent à un endroit donné, elles correspondent automatiquement un " +"nombre infini de fois." + +#: howto/regex.rst:703 +msgid "``|``" +msgstr "``|``" + +#: howto/regex.rst:696 +msgid "" +"Alternation, or the \"or\" operator. If *A* and *B* are regular " +"expressions, ``A|B`` will match any string that matches either *A* or *B*. " +"``|`` has very low precedence in order to make it work reasonably when " +"you're alternating multi-character strings. ``Crow|Servo`` will match either " +"``'Crow'`` or ``'Servo'``, not ``'Cro'``, a ``'w'`` or an ``'S'``, and " +"``'ervo'``." +msgstr "" +"Union ensembliste ou opérateur « ou ». Si *A* et *B* sont des expressions " +"régulières, ``A|B`` correspond à toute chaîne qui correspond à A ou à B. La " +"priorité de ``|`` est très faible afin de pouvoir effectuer simplement des " +"unions de chaînes de plusieurs caractères. ``Crow|Servo`` correspond avec " +"``'Crow'`` ou ``'Servo'``, mais pas avec ``'Cro'``, un ``'w'`` ou un " +"``'S'``, ou encore ``'ervo'``." + +#: howto/regex.rst:702 +msgid "" +"To match a literal ``'|'``, use ``\\|``, or enclose it inside a character " +"class, as in ``[|]``." +msgstr "" +"Pour correspondre avec un ``'|'`` littéral, utilisez ``\\|`` ou placez-le " +"dans une classe de caractères, comme ceci ``[|]``." + +#: howto/regex.rst:718 +msgid "``^``" +msgstr "``^``" + +#: howto/regex.rst:706 +msgid "" +"Matches at the beginning of lines. Unless the :const:`MULTILINE` flag has " +"been set, this will only match at the beginning of the string. In :const:" +"`MULTILINE` mode, this also matches immediately after each newline within " +"the string." +msgstr "" +"Correspond à un début de ligne. À moins que l'option :const:`MULTILINE` ne " +"soit activée, cela ne fait correspondre que le début de la chaîne. Dans le " +"mode :const:`MULTILINE`, cela fait aussi correspondre immédiatement après " +"chaque nouvelle ligne à l'intérieur de la chaîne." + +#: howto/regex.rst:710 +msgid "" +"For example, if you wish to match the word ``From`` only at the beginning of " +"a line, the RE to use is ``^From``. ::" +msgstr "" +"Par exemple, si vous voulez trouver le mot ``From`` uniquement quand il est " +"en début de ligne, la RE à utiliser est ``^From``. ::" + +#: howto/regex.rst:718 +msgid "To match a literal ``'^'``, use ``\\^``." +msgstr "Pour trouver un ``'^'`` littéral, utilisez ``\\^``." + +#: howto/regex.rst:732 +msgid "``$``" +msgstr "``$``" + +#: howto/regex.rst:721 +msgid "" +"Matches at the end of a line, which is defined as either the end of the " +"string, or any location followed by a newline character. ::" +msgstr "" +"Correspond à une fin de ligne, ce qui veut dire soit la fin de la chaîne, " +"soit tout emplacement qui est suivi du caractère de nouvelle ligne. ::" + +#: howto/regex.rst:731 +msgid "" +"To match a literal ``'$'``, use ``\\$`` or enclose it inside a character " +"class, as in ``[$]``." +msgstr "" +"Pour trouver un ``'$'`` littéral, utilisez ``\\$`` ou placez-le à " +"l'intérieur d'une classe de caractères, comme ceci ``[$]``." + +#: howto/regex.rst:738 +msgid "``\\A``" +msgstr "``\\A``" + +#: howto/regex.rst:735 +msgid "" +"Matches only at the start of the string. When not in :const:`MULTILINE` " +"mode, ``\\A`` and ``^`` are effectively the same. In :const:`MULTILINE` " +"mode, they're different: ``\\A`` still matches only at the beginning of the " +"string, but ``^`` may match at any location inside the string that follows a " +"newline character." +msgstr "" +"Correspond au début de la chaîne de caractères, uniquement. Si l'option :" +"const:`MULTILINE` n'est pas activée, ``\\A`` et ``^`` sont équivalents. Dans " +"le mode :const:`MULTILINE`, ils sont différents : ``\\A`` ne correspond " +"toujours qu'au début de la chaîne alors que ``^`` correspond aussi aux " +"emplacements situés immédiatement après une nouvelle ligne à l'intérieur de " +"la chaîne." + +#: howto/regex.rst:741 +msgid "``\\Z``" +msgstr "``\\Z``" + +#: howto/regex.rst:741 +msgid "Matches only at the end of the string." +msgstr "Correspond uniquement à la fin d'une chaîne de caractères." + +#: howto/regex.rst:776 +msgid "``\\b``" +msgstr "``\\b``" + +#: howto/regex.rst:744 +msgid "" +"Word boundary. This is a zero-width assertion that matches only at the " +"beginning or end of a word. A word is defined as a sequence of alphanumeric " +"characters, so the end of a word is indicated by whitespace or a non-" +"alphanumeric character." +msgstr "" +"Limite de mot. C'est une assertion de largeur zéro qui correspond uniquement " +"aux positions de début et de fin de mot. Un mot est défini comme une " +"séquence de caractères alphanumériques ; ainsi, la fin d'un mot est indiquée " +"par un « blanc » ou un caractère non-alphanumérique." + +#: howto/regex.rst:749 +msgid "" +"The following example matches ``class`` only when it's a complete word; it " +"won't match when it's contained inside another word. ::" +msgstr "" +"L'exemple suivant fait correspondre ``class`` seulement si c'est un mot " +"complet ; il n'y a pas de correspondance quand il est à l'intérieur d'un " +"autre mot. ::" + +#: howto/regex.rst:760 +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 " +"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. ::" +msgstr "" +"Quand vous utilisez cette séquence spéciale, gardez deux choses à l'esprit. " +"Tout d'abord, c'est la pire collision entre les littéraux des chaînes Python " +"et les séquences d'expressions régulières. Dans les littéraux de chaîne de " +"caractères Python, ``\\b`` est le caractère de retour-arrière (*backspace* " +"en anglais), dont la valeur ASCII est 8. Si vous n'utilisez pas les chaînes " +"de caractères brutes, alors Python convertit le ``\\b`` en retour-arrière, " +"et votre RE ne correspond pas à ce que vous attendez. L'exemple suivant " +"ressemble à notre RE précédente, mais nous avons omis le ``'r'`` devant la " +"chaîne RE. ::" + +#: 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 " +"string literals." +msgstr "" +"Ensuite, dans une classe de caractères, où cette assertion n'a pas lieu " +"d'être, ``\\b`` représente le caractère retour-arrière, afin d'être " +"compatible avec les littéraux de chaînes de caractères." + +#: howto/regex.rst:781 +msgid "``\\B``" +msgstr "``\\B``" + +#: howto/regex.rst:779 +msgid "" +"Another zero-width assertion, this is the opposite of ``\\b``, only matching " +"when the current position is not at a word boundary." +msgstr "" +"Encore une assertion de largeur zéro, qui est l'opposée de ``\\b``, c'est-à-" +"dire qu'elle fait correspondre uniquement les emplacements qui ne sont pas à " +"la limite d'un mot." + +#: howto/regex.rst:784 +msgid "Grouping" +msgstr "Regroupement" + +#: howto/regex.rst:786 +msgid "" +"Frequently you need to obtain more information than just whether the RE " +"matched or not. Regular expressions are often used to dissect strings by " +"writing a RE divided into several subgroups which match different components " +"of interest. For example, an RFC-822 header line is divided into a header " +"name and a value, separated by a ``':'``, like this:" +msgstr "" +"Souvent, vous avez besoin d'obtenir plus d'informations que le simple fait " +"que la RE corresponde ou non. Ainsi, les expressions régulières sont souvent " +"utilisées pour analyser des chaînes de caractères en écrivant une RE qui " +"divise une chaîne en plusieurs sous-groupes, correspondant chacun à une " +"information particulière. Par exemple, une ligne d'en-tête RFC-822 peut se " +"diviser en un nom d'en-tête et une valeur associée, séparés par un ``':'``, " +"comme ceci :" + +#: howto/regex.rst:799 +msgid "" +"This can be handled by writing a regular expression which matches an entire " +"header line, and has one group which matches the header name, and another " +"group which matches the header's value." +msgstr "" +"Vous pouvez alors écrire une expression régulière qui fait correspondre une " +"ligne d'en-tête entière et qui comporte un groupe correspondant au nom de " +"l'en-tête, et un autre groupe correspondant à la valeur de l'en-tête." + +#: howto/regex.rst:803 +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 " +"repetitions of ``ab``. ::" +msgstr "" +"Les groupes sont délimités par les métacaractères marqueurs ``'('`` et " +"``')'``. ``'('`` et ``')'`` ont à peu près le même sens que dans les " +"expressions mathématiques ; ils forment un groupe à partir des expressions " +"qu'ils encadrent ; vous pouvez répéter le contenu d'un groupe à l'aide d'un " +"quantificateur, comme ``*``, ``+``, ``?`` ou ``{m,n}``. Par exemple, " +"``(ab)*`` correspond à zéro, une ou plusieurs fois ``ab``. ::" + +#: howto/regex.rst:814 +msgid "" +"Groups indicated with ``'('``, ``')'`` also capture the starting and ending " +"index of the text that they match; this can be retrieved by passing an " +"argument to :meth:`~re.Match.group`, :meth:`~re.Match.start`, :meth:`~re." +"Match.end`, and :meth:`~re.Match.span`. Groups are numbered starting with " +"0. Group 0 is always present; it's the whole RE, so :ref:`match object " +"` methods all have group 0 as their default argument. Later " +"we'll see how to express groups that don't capture the span of text that " +"they match. ::" +msgstr "" +"Les groupes délimités par ``'('`` et ``')'`` capturent également les indices " +"de début et de fin du texte avec lequel ils correspondent ; ces indices " +"peuvent être récupérés en passant un argument à :meth:`~re.Match.group`, :" +"meth:`~re.Match.start`, :meth:`~re.Match.end` ou :meth:`~re.Match.span`. Les " +"groupes sont numérotés à partir de 0, le groupe 0 étant toujours présent ; " +"c'est l'ensemble de la RE, donc les méthodes de l'\\ :ref:`objet " +"correspondance ` ont le groupe 0 comme argument par défaut. " +"Plus loin, nous voyons comment exprimer les groupes qui ne capturent pas " +"l'étendue du texte avec lequel ils correspondent. ::" + +#: howto/regex.rst:830 +msgid "" +"Subgroups are numbered from left to right, from 1 upward. Groups can be " +"nested; to determine the number, just count the opening parenthesis " +"characters, going from left to right. ::" +msgstr "" +"Les sous-groupes sont numérotés de la gauche vers la droite, à partir de 1. " +"Les groupes peuvent être imbriqués ; pour déterminer le numéro, il vous " +"suffit de compter le nombre de parenthèses ouvrantes de la gauche vers la " +"droite. ::" + +#: howto/regex.rst:843 +msgid "" +":meth:`~re.Match.group` can be passed multiple group numbers at a time, in " +"which case it will return a tuple containing the corresponding values for " +"those groups. ::" +msgstr "" +"Vous pouvez passer plusieurs numéros de groupes à :meth:`~re.Match.group` en " +"même temps, elle vous renvoie alors un *n*-uplet contenant les valeurs " +"correspondantes pour ces groupes. ::" + +#: howto/regex.rst:849 +msgid "" +"The :meth:`~re.Match.groups` method returns a tuple containing the strings " +"for all the subgroups, from 1 up to however many there are. ::" +msgstr "" +"La méthode :meth:`~re.Match.groups` renvoie un *n*-uplet contenant les " +"chaînes pour tous les sous-groupes, en commençant par le numéro 1 jusqu'au " +"dernier. ::" + +#: howto/regex.rst:855 +msgid "" +"Backreferences in a pattern allow you to specify that the contents of an " +"earlier capturing group must also be found at the current location in the " +"string. For example, ``\\1`` will succeed if the exact contents of group 1 " +"can be found at the current position, and fails otherwise. Remember that " +"Python's string literals also use a backslash followed by numbers to allow " +"including arbitrary characters in a string, so be sure to use a raw string " +"when incorporating backreferences in a RE." +msgstr "" +"Les renvois dans un motif vous permettent de spécifier que le contenu d'un " +"groupe précédent doit aussi être trouvé à l'emplacement actuel dans la " +"chaîne. Par exemple, ``\\1`` réussit si le contenu du premier groupe se " +"trouve aussi à la position courante, sinon il échoue. Rappelez-vous que les " +"littéraux de chaînes Python utilisent aussi la barre oblique inverse suivie " +"d'un nombre pour insérer des caractères arbitraires dans une chaîne ; soyez " +"sûr d'utiliser une chaîne brute quand vous faites des renvois dans une RE." + +#: howto/regex.rst:863 +msgid "For example, the following RE detects doubled words in a string. ::" +msgstr "" +"Par exemple, la RE suivante détecte les mots doublés dans une chaîne. ::" + +#: howto/regex.rst:869 +msgid "" +"Backreferences like this aren't often useful for just searching through a " +"string --- there are few text formats which repeat data in this way --- but " +"you'll soon find out that they're *very* useful when performing string " +"substitutions." +msgstr "" +"Les renvois tels que celui-ci ne sont pas très utiles pour effectuer une " +"simple recherche dans une chaîne —­ il n'y a que peu de formats de textes qui " +"répètent des données ainsi — mais vous verrez bientôt qu'ils sont *très* " +"utiles pour effectuer des substitutions dans les chaînes." + +#: howto/regex.rst:875 +msgid "Non-capturing and Named Groups" +msgstr "Groupes non de capture et groupes nommés" + +#: howto/regex.rst:877 +msgid "" +"Elaborate REs may use many groups, both to capture substrings of interest, " +"and to group and structure the RE itself. In complex REs, it becomes " +"difficult to keep track of the group numbers. There are two features which " +"help with this problem. Both of them use a common syntax for regular " +"expression extensions, so we'll look at that first." +msgstr "" +"Les RE élaborées peuvent utiliser de nombreux groupes, à la fois pour " +"capturer des sous-chaînes intéressantes ainsi que pour regrouper et " +"structurer la RE elle-même. Dans les RE complexes, il devient difficile de " +"garder la trace des numéros de groupes. Deux caractéristiques aident à " +"résoudre ce problème, toutes deux utilisant la même syntaxe d'extension des " +"expressions régulières. Nous allons donc commencer en examinant cette " +"syntaxe." + +#: howto/regex.rst:883 +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 " +"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 ``[&]``." +msgstr "" +"Les puissantes extensions des expressions régulières de Perl 5 sont " +"réputées. Pour les mettre en œuvre, les développeurs Perl ne pouvaient pas " +"utiliser de nouveaux métacaractères simples ou de nouvelles séquences " +"commençant par ``\\`` sans que les RE Perl ne deviennent trop différentes " +"des RE standards au point de créer de la confusion. S'ils avaient choisi " +"``&`` comme nouveau métacaractère, par exemple, les expressions déjà écrites " +"auraient considéré que ``&`` était un caractère standard et ne l'aurait pas " +"échappé en écrivant ``\\&`` ou ``[&]``." + +#: howto/regex.rst:890 +msgid "" +"The solution chosen by the Perl developers was to use ``(?...)`` as the " +"extension syntax. ``?`` immediately after a parenthesis was a syntax error " +"because the ``?`` would have nothing to repeat, so this didn't introduce any " +"compatibility problems. The characters immediately after the ``?`` " +"indicate what extension is being used, so ``(?=foo)`` is one thing (a " +"positive lookahead assertion) and ``(?:foo)`` is something else (a non-" +"capturing group containing the subexpression ``foo``)." +msgstr "" +"La solution adoptée par les développeurs Perl a été d'utiliser ``(?...)`` " +"comme syntaxe d'extension. Placer ``?`` immédiatement après une parenthèse " +"était une erreur de syntaxe, parce que le ``?`` n'a alors rien à répéter. " +"Ainsi, cela n'a pas introduit de problème de compatibilité. Les caractères " +"qui suivent immédiatement le ``?`` indiquent quelle extension est utilisée, " +"donc ``(?=truc)`` est une chose (une assertion positive anticipée) et ``(?:" +"truc)`` est une autre chose (la sous-expression ``truc`` que l'on groupe)." + +#: howto/regex.rst:898 +msgid "" +"Python supports several of Perl's extensions and adds an extension syntax to " +"Perl's extension syntax. If the first character after the question mark is " +"a ``P``, you know that it's an extension that's specific to Python." +msgstr "" +"Python gère plusieurs des extensions Perl et rajoute une extension à la " +"syntaxe des extensions Perl. Si le premier caractère après le point " +"d'interrogation est ``P``, cela signifie que c'est une extension spécifique " +"à Python." + +#: howto/regex.rst:903 +msgid "" +"Now that we've looked at the general extension syntax, we can return to the " +"features that simplify working with groups in complex REs." +msgstr "" +"Après avoir vu la syntaxe générale d'extension des RE, nous pouvons revenir " +"aux fonctionnalités qui simplifient le travail avec les groupes dans des RE " +"complexes." + +#: howto/regex.rst:906 +msgid "" +"Sometimes you'll want to use a group to denote a part of a regular " +"expression, but aren't interested in retrieving the group's contents. You " +"can make this fact explicit by using a non-capturing group: ``(?:...)``, " +"where you can replace the ``...`` with any other regular expression. ::" +msgstr "" +"Parfois, vous souhaitez utiliser un groupe pour marquer une partie de " +"l'expression régulière mais le contenu de ce groupe ne vous intéresse pas " +"vraiment. Vous pouvez l'indiquer explicitement en utilisant la syntaxe de " +"groupe, mais sans indiquer que vous voulez en capturer le contenu : " +"``(?:...)``, où vous remplacez les ``...`` par n'importe quelle expression " +"régulière. ::" + +#: howto/regex.rst:918 +msgid "" +"Except for the fact that you can't retrieve the contents of what the group " +"matched, a non-capturing group behaves exactly the same as a capturing " +"group; you can put anything inside it, repeat it with a repetition " +"metacharacter such as ``*``, and nest it within other groups (capturing or " +"non-capturing). ``(?:...)`` is particularly useful when modifying an " +"existing pattern, since you can add new groups without changing how all the " +"other groups are numbered. It should be mentioned that there's no " +"performance difference in searching between capturing and non-capturing " +"groups; neither form is any faster than the other." +msgstr "" +"À part le fait que vous n'avez pas accès au contenu du groupe, un groupe se " +"comporte exactement de la même manière qu'un groupe de capture ; vous pouvez " +"placer n'importe quoi dedans, spécifier une répétition avec un métacaractère " +"tel que ``*`` et l'imbriquer dans un autre groupe (de capture ou pas). " +"``(?:...)`` est particulièrement utile quand vous modifiez des motifs " +"existants, puisque vous pouvez ajouter de nouveaux groupes sans changer la " +"façon dont les autres groupes sont numérotés. Nous devons mentionner ici " +"qu'il n'y a aucune différence de performance dans la recherche de groupes, " +"de capture ou non ; les deux formes travaillent à la même vitesse." + +#: howto/regex.rst:927 +msgid "" +"A more significant feature is named groups: instead of referring to them by " +"numbers, groups can be referenced by a name." +msgstr "" +"Une fonctionnalité plus importante est le nommage des groupes : au lieu d'y " +"faire référence par des nombres, vous pouvez référencer des groupes par leur " +"nom." + +#: howto/regex.rst:930 +msgid "" +"The syntax for a named group is one of the Python-specific extensions: ``(?" +"P...)``. *name* is, obviously, the name of the group. Named groups " +"behave exactly like capturing groups, and additionally associate a name with " +"a group. The :ref:`match object ` methods that deal with " +"capturing groups all accept either integers that refer to the group by " +"number or strings that contain the desired group's name. Named groups are " +"still given numbers, so you can retrieve information about a group in two " +"ways::" +msgstr "" +"La syntaxe pour nommer les groupes est l'une des extensions spécifiques à " +"Python : ``(?P....)``. *nom* est, vous vous en doutez, le nom du " +"groupe. Les groupes nommés se comportent exactement comme des groupes de " +"capture, sauf qu'ils associent en plus un nom à un groupe. Les méthodes des :" +"ref:`objets correspondances ` qui gèrent les groupes de " +"capture acceptent soit des entiers qui font référence aux numéros des " +"groupes, soit des chaînes de caractères qui désignent les noms des groupes " +"désirés. Les groupes nommés se voient toujours attribuer un numéro, vous " +"pouvez ainsi récupérer les informations d'un groupe de deux façons ::" + +#: howto/regex.rst:945 +msgid "" +"Additionally, you can retrieve named groups as a dictionary with :meth:`~re." +"Match.groupdict`::" +msgstr "" +"De plus, vous pouvez récupérer les groupes nommés comme dictionnaire avec :" +"meth:`~re.Match.groupdict` ::" + +#: howto/regex.rst:952 +#, fuzzy +msgid "" +"Named groups are handy because they let you use easily remembered names, " +"instead of having to remember numbers. Here's an example RE from the :mod:" +"`imaplib` module::" +msgstr "" +"Les groupes nommés sont pratiques car il est plus facile de se rappeler un " +"nom qu'un numéro. Voici un exemple de RE tirée du module :mod:`imaplib` ::" + +#: howto/regex.rst:963 +msgid "" +"It's obviously much easier to retrieve ``m.group('zonem')``, instead of " +"having to remember to retrieve group 9." +msgstr "" +"Il est évidemment plus facile de récupérer ``m.group('zonem')`` que de se " +"rappeler de récupérer le groupe 9." + +#: howto/regex.rst:966 +msgid "" +"The syntax for backreferences in an expression such as ``(...)\\1`` refers " +"to the number of the group. There's naturally a variant that uses the group " +"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``::" +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 " +"le nom du groupe au lieu du numéro. C'est une autre extension Python : ``(?" +"P=nom)`` indique que le contenu du groupe appelé *nom* doit correspondre à " +"nouveau avec l'emplacement courant. L'expression régulière pour trouver des " +"mots doublés, ``\\b(\\w+)\\s+\\1\\b`` peut ainsi être ré-écrite en ``\\b(?" +"P\\w+)\\s+(?P=mot)\\b`` ::" + +#: howto/regex.rst:979 +msgid "Lookahead Assertions" +msgstr "Assertions prédictives" + +#: howto/regex.rst:981 +msgid "" +"Another zero-width assertion is the lookahead assertion. Lookahead " +"assertions are available in both positive and negative form, and look like " +"this:" +msgstr "" +"Une autre assertion de largeur zéro est l'assertion prédictive. Une " +"assertion prédictive peut s'exprimer sous deux formes, la positive et la " +"négative, comme ceci :" + +#: howto/regex.rst:989 +msgid "``(?=...)``" +msgstr "``(?=...)``" + +#: howto/regex.rst:985 +msgid "" +"Positive lookahead assertion. This succeeds if the contained regular " +"expression, represented here by ``...``, successfully matches at the current " +"location, and fails otherwise. But, once the contained expression has been " +"tried, the matching engine doesn't advance at all; the rest of the pattern " +"is tried right where the assertion started." +msgstr "" +"Assertion prédictive positive. Elle réussit si l'expression régulière " +"contenue, représentée ici par ``...``, correspond effectivement à " +"l'emplacement courant ; dans le cas contraire, elle échoue. Mais, une fois " +"que l'expression contenue a été essayée, le moteur de correspondance " +"n'avance pas ; le reste du motif est testé à l'endroit même où l'assertion a " +"commencé." + +#: howto/regex.rst:994 +msgid "``(?!...)``" +msgstr "``(?!...)``" + +#: howto/regex.rst:992 +msgid "" +"Negative lookahead assertion. This is the opposite of the positive " +"assertion; it succeeds if the contained expression *doesn't* match at the " +"current position in the string." +msgstr "" +"Assertion prédictive négative. C'est l'opposée de l'assertion positive ; " +"elle réussit si l'expression régulière contenue *ne* correspond *pas* à " +"l'emplacement courant dans la chaîne." + +#: howto/regex.rst:996 +msgid "" +"To make this concrete, let's look at a case where a lookahead is useful. " +"Consider a simple pattern to match a filename and split it apart into a base " +"name and an extension, separated by a ``.``. For example, in ``news.rc``, " +"``news`` is the base name, and ``rc`` is the filename's extension." +msgstr "" +"Pour rendre ceci plus concret, regardons le cas où une prédiction est utile. " +"Considérons un motif simple qui doit faire correspondre un nom de fichier et " +"le diviser en un nom de base et une extension, séparés par un ``.``. Par " +"exemple, dans ``news.rc``, ``news`` est le nom de base et ``rc`` est " +"l'extension du nom de fichier." + +#: howto/regex.rst:1001 +msgid "The pattern to match this is quite simple:" +msgstr "Le motif de correspondance est plutôt simple :" + +#: howto/regex.rst:1003 +msgid "``.*[.].*$``" +msgstr "``.*[.].*$``" + +#: howto/regex.rst:1005 +msgid "" +"Notice that the ``.`` needs to be treated specially because it's a " +"metacharacter, so it's inside a character class to only match that specific " +"character. Also notice the trailing ``$``; this is added to ensure that all " +"the rest of the string must be included in the extension. This regular " +"expression matches ``foo.bar`` and ``autoexec.bat`` and ``sendmail.cf`` and " +"``printers.conf``." +msgstr "" +"Notez que le ``.`` doit être traité spécialement car c'est un métacaractère, " +"nous le plaçons donc à l'intérieur d'une classe de caractères pour ne faire " +"correspondre que ce caractère spécifique. Notez également le ``$`` en fin ; " +"nous l'avons ajouté pour nous assurer que tout le reste de la chaîne est " +"bien inclus dans l'extension. Cette expression régulière fait correspondre " +"``truc.bar``, ``autoexec.bat``, ``sendmail.cf`` et ``printers.conf``." + +#: howto/regex.rst:1012 +msgid "" +"Now, consider complicating the problem a bit; what if you want to match " +"filenames where the extension is not ``bat``? Some incorrect attempts:" +msgstr "" +"Maintenant, compliquons un peu le problème ; si nous voulons faire " +"correspondre les noms de fichiers dont l'extension n'est pas ``bat`` ? voici " +"quelques tentatives incorrectes :" + +#: howto/regex.rst:1015 +msgid "" +"``.*[.][^b].*$`` The first attempt above tries to exclude ``bat`` by " +"requiring that the first character of the extension is not a ``b``. This is " +"wrong, because the pattern also doesn't match ``foo.bar``." +msgstr "" +"``.*[.][^b].*$`` Le premier essai ci-dessus tente d'exclure ``bat`` en " +"spécifiant que le premier caractère de l'extension ne doit pas être ``b``. " +"Cela ne fonctionne pas, car le motif n'accepte pas ``truc.bar``." + +#: howto/regex.rst:1019 +msgid "``.*[.]([^b]..|.[^a].|..[^t])$``" +msgstr "``.*[.]([^b]..|.[^a].|..[^t])$``" + +#: howto/regex.rst:1021 +msgid "" +"The expression gets messier when you try to patch up the first solution by " +"requiring one of the following cases to match: the first character of the " +"extension isn't ``b``; the second character isn't ``a``; or the third " +"character isn't ``t``. This accepts ``foo.bar`` and rejects ``autoexec." +"bat``, but it requires a three-letter extension and won't accept a filename " +"with a two-letter extension such as ``sendmail.cf``. We'll complicate the " +"pattern again in an effort to fix it." +msgstr "" +"L'expression devient plus confuse si nous essayons de réparer la première " +"solution en spécifiant l'un des cas suivants : le premier caractère de " +"l'extension n'est pas ``b`` ; le deuxième caractère n'est pas ``a`` ; ou le " +"troisième caractère n'est pas ``t``. Ce motif accepte ``truc.bar`` et " +"rejette ``autoexec.bat``, mais elle nécessite une extension de trois lettres " +"et n'accepte pas un nom de fichier avec une extension de deux lettres comme " +"``sendmail.cf``. Compliquons encore une fois le motif pour essayer de le " +"réparer." + +#: howto/regex.rst:1029 +msgid "``.*[.]([^b].?.?|.[^a]?.?|..?[^t]?)$``" +msgstr "``.*[.]([^b].?.?|.[^a]?.?|..?[^t]?)$``" + +#: howto/regex.rst:1031 +msgid "" +"In the third attempt, the second and third letters are all made optional in " +"order to allow matching extensions shorter than three characters, such as " +"``sendmail.cf``." +msgstr "" +"Pour cette troisième tentative, les deuxième et troisième lettres sont " +"devenues facultatives afin de permettre la correspondance avec des " +"extensions plus courtes que trois caractères, comme ``sendmail.cf``." + +#: howto/regex.rst:1035 +msgid "" +"The pattern's getting really complicated now, which makes it hard to read " +"and understand. Worse, if the problem changes and you want to exclude both " +"``bat`` and ``exe`` as extensions, the pattern would get even more " +"complicated and confusing." +msgstr "" +"Le motif devient vraiment compliqué maintenant, ce qui le rend difficile à " +"lire et à comprendre. Pire, si le problème change et que vous voulez exclure " +"à la fois ``bat`` et ``exe`` en tant qu'extensions, le modèle deviendra " +"encore plus compliqué et confus." + +#: howto/regex.rst:1040 +msgid "A negative lookahead cuts through all this confusion:" +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." +msgstr "" +"``.*[.](?!bat$)[^.]*$`` Cette assertion prédictive négative signifie : si " +"l'expression ``bat`` ne correspond pas à cet emplacement, essaie le reste du " +"motif ; si ``bat$`` correspond, tout le motif échoue. Le ``$`` est " +"nécessaire pour s'assurer que quelque chose comme ``sample.batch``, où c'est " +"seulement le début de l'extension qui vaut ``bat``, est autorisé. Le " +"``[^...]*`` s'assure que le motif fonctionne lorsqu'il y a plusieurs points " +"dans le nom de fichier." + +#: howto/regex.rst:1049 +msgid "" +"Excluding another filename extension is now easy; simply add it as an " +"alternative inside the assertion. The following pattern excludes filenames " +"that end in either ``bat`` or ``exe``:" +msgstr "" +"Exclure une autre extension de nom de fichier est maintenant facile ; il " +"suffit de l'ajouter comme alternative à l'intérieur de l'assertion. Le motif " +"suivant exclut les noms de fichiers qui se terminent par ``bat`` ou ``exe`` :" + +#: howto/regex.rst:1053 +msgid "``.*[.](?!bat$|exe$)[^.]*$``" +msgstr "``.*[.](?!bat$|exe$)[^.]*$``" + +#: howto/regex.rst:1057 +msgid "Modifying Strings" +msgstr "Modification de chaînes" + +#: howto/regex.rst:1059 +msgid "" +"Up to this point, we've simply performed searches against a static string. " +"Regular expressions are also commonly used to modify strings in various " +"ways, using the following pattern methods:" +msgstr "" +"Jusqu'à présent, nous avons simplement effectué des recherches dans une " +"chaîne statique. Les expressions régulières sont aussi couramment utilisées " +"pour modifier les chaînes de caractères de diverses manières, en utilisant " +"les méthodes suivantes des motifs :" + +#: howto/regex.rst:1066 +msgid "``split()``" +msgstr "``split()``" + +#: howto/regex.rst:1066 +msgid "Split the string into a list, splitting it wherever the RE matches" +msgstr "" +"Découpe la chaîne de caractère en liste, la découpant partout où la RE " +"correspond" + +#: howto/regex.rst:1069 +msgid "``sub()``" +msgstr "``sub()``" + +#: howto/regex.rst:1069 +msgid "" +"Find all substrings where the RE matches, and replace them with a different " +"string" +msgstr "" +"Recherche toutes les sous-chaînes de caractères où la RE correspond et les " +"substitue par une chaîne de caractères différente" + +#: howto/regex.rst:1072 +msgid "``subn()``" +msgstr "``subn()``" + +#: howto/regex.rst:1072 +msgid "" +"Does the same thing as :meth:`!sub`, but returns the new string and the " +"number of replacements" +msgstr "" +"Fait la même chose que :meth:`!sub`, mais renvoie la nouvelle chaîne et le " +"nombre de remplacements effectués" + +#: howto/regex.rst:1079 +msgid "Splitting Strings" +msgstr "Découpage de chaînes" + +#: howto/regex.rst:1081 +msgid "" +"The :meth:`~re.Pattern.split` method of a pattern splits a string apart " +"wherever the RE matches, returning a list of the pieces. It's similar to " +"the :meth:`~str.split` method of strings but provides much more generality " +"in the delimiters that you can split by; string :meth:`!split` only supports " +"splitting by whitespace or by a fixed string. As you'd expect, there's a " +"module-level :func:`re.split` function, too." +msgstr "" +"La méthode :meth:`~re.Pattern.Pattern.split` d'un motif divise une chaîne de " +"caractères à chaque fois que la RE correspond, retournant la liste des " +"morceaux. C'est similaire à la méthode :meth:`~str.split` mais est beaucoup " +"plus générale par les délimiteurs que vous pouvez spécifier ; la méthode :" +"meth:`!split` du type *string* ne gère que les découpages en suivant les " +"« blancs » ou suivant une chaîne définie. Comme vous pouvez vous y attendre, " +"il y a aussi une fonction :func:`re.split` de niveau module." + +#: howto/regex.rst:1092 +msgid "" +"Split *string* by the matches of the regular expression. If capturing " +"parentheses are used in the RE, then their contents will also be returned as " +"part of the resulting list. If *maxsplit* is nonzero, at most *maxsplit* " +"splits are performed." +msgstr "" +"Découpe *string* en suivant les correspondances de l'expression régulière. " +"Si des parenthèses de capture sont utilisées dans la RE, leur contenu est " +"également renvoyé dans la liste résultante. Si *maxsplit* n'est pas nul, au " +"plus *maxsplit* découpages sont effectués." + +#: howto/regex.rst:1097 +msgid "" +"You can limit the number of splits made, by passing a value for *maxsplit*. " +"When *maxsplit* is nonzero, at most *maxsplit* splits will be made, and the " +"remainder of the string is returned as the final element of the list. In " +"the following example, the delimiter is any sequence of non-alphanumeric " +"characters. ::" +msgstr "" +"Vous pouvez limiter le nombre de découpages effectués en passant une valeur " +"pour *maxsplit*. Quand *maxsplit* n'est pas nul, au plus *maxsplit* " +"découpages sont effectués et le reste de la chaîne est renvoyé comme dernier " +"élément de la liste. Dans l'exemple suivant, le délimiteur est toute " +"séquence de caractères non alphanumériques. ::" + +#: howto/regex.rst:1109 +msgid "" +"Sometimes you're not only interested in what the text between delimiters is, " +"but also need to know what the delimiter was. If capturing parentheses are " +"used in the RE, then their values are also returned as part of the list. " +"Compare the following calls::" +msgstr "" +"Parfois, vous voulez récupérer le texte entre les délimiteurs mais aussi " +"quel était le délimiteur. Si des parenthèses de capture sont utilisées dans " +"la RE, leurs valeurs sont également renvoyées dans la liste. Comparons les " +"appels suivants ::" + +#: howto/regex.rst:1121 +msgid "" +"The module-level function :func:`re.split` adds the RE to be used as the " +"first argument, but is otherwise the same. ::" +msgstr "" +"La fonction de niveau module :func:`re.split` ajoute la RE à utiliser comme " +"premier argument, mais est par ailleurs identique. ::" + +#: howto/regex.rst:1133 +msgid "Search and Replace" +msgstr "Recherche et substitution" + +#: howto/regex.rst:1135 +msgid "" +"Another common task is to find all the matches for a pattern, and replace " +"them with a different string. The :meth:`~re.Pattern.sub` method takes a " +"replacement value, which can be either a string or a function, and the " +"string to be processed." +msgstr "" +"Une autre tâche classique est de trouver toutes les correspondances d'un " +"motif et de les remplacer par une autre chaîne. La méthode :meth:`~re." +"Pattern.sub` prend une valeur de substitution, qui peut être une chaîne de " +"caractères ou une fonction, et la chaîne à traiter." + +#: howto/regex.rst:1142 +msgid "" +"Returns the string obtained by replacing the leftmost non-overlapping " +"occurrences of the RE in *string* by the replacement *replacement*. If the " +"pattern isn't found, *string* is returned unchanged." +msgstr "" +"Renvoie la chaîne obtenue en remplaçant les occurrences sans chevauchement " +"les plus à gauche de la RE dans *string* par la substitution *replacement*. " +"Si le motif n'est pas trouvé, *string* est renvoyée inchangée." + +#: howto/regex.rst:1146 +msgid "" +"The optional argument *count* is the maximum number of pattern occurrences " +"to be replaced; *count* must be a non-negative integer. The default value " +"of 0 means to replace all occurrences." +msgstr "" +"L'argument optionnel *count* est le nombre maximum d'occurrences du motif à " +"remplacer ; *count* doit être un entier positif ou nul. La valeur par défaut " +"de 0 signifie qu'il faut remplacer toutes les occurrences." + +#: howto/regex.rst:1150 +msgid "" +"Here's a simple example of using the :meth:`~re.Pattern.sub` method. It " +"replaces colour names with the word ``colour``::" +msgstr "" +"Voici un exemple simple utilisant la méthode :meth:`~re.Pattern.sub`. Nous " +"remplaçons les noms des couleurs par le mot ``colour`` ::" + +#: howto/regex.rst:1159 +msgid "" +"The :meth:`~re.Pattern.subn` method does the same work, but returns a 2-" +"tuple containing the new string value and the number of replacements that " +"were performed::" +msgstr "" +"La méthode :meth:`~re.Pattern.subn.subn` fait la même chose mais renvoie un " +"couple contenant la nouvelle valeur de la chaîne de caractères et le nombre " +"de remplacements effectués ::" + +#: howto/regex.rst:1168 +msgid "" +"Empty matches are replaced only when they're not adjacent to a previous " +"empty match. ::" +msgstr "" +"Les correspondances vides ne sont remplacées que lorsqu'elles ne sont pas " +"adjacentes à une correspondance vide précédente. ::" + +#: howto/regex.rst:1175 +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 " +"incorporate portions of the original text in the resulting replacement " +"string." +msgstr "" +"Si *replacement* est une chaîne de caractères, toute barre oblique inverse " +"d'échappement est traitée. C'est-à-dire que ``\\n`` est converti en " +"caractère de nouvelle ligne, ``\\r`` est converti en retour chariot, et " +"ainsi de suite. Les échappements inconnus comme ``\\&`` sont laissés tels " +"quels. Les renvois, tels que ``\\6``, sont remplacés par la sous-chaîne " +"correspondante au groupe dans le RE. Ceci vous permet d'incorporer des " +"parties du texte original dans la chaîne de remplacement résultante." + +#: howto/regex.rst:1182 +msgid "" +"This example matches the word ``section`` followed by a string enclosed in " +"``{``, ``}``, and changes ``section`` to ``subsection``::" +msgstr "" +"Cet exemple fait correspondre le mot ``section`` suivi par une chaîne " +"encadrée par ``{`` et ``}``, et modifie ``section`` en ``subsection`` ::" + +#: howto/regex.rst:1189 +msgid "" +"There's also a syntax for referring to named groups as defined by the ``(?" +"P...)`` syntax. ``\\g`` will use the substring matched by the " +"group named ``name``, and ``\\g`` uses the corresponding group " +"number. ``\\g<2>`` is therefore equivalent to ``\\2``, but isn't ambiguous " +"in a replacement string such as ``\\g<2>0``. (``\\20`` would be interpreted " +"as a reference to group 20, not a reference to group 2 followed by the " +"literal character ``'0'``.) The following substitutions are all equivalent, " +"but use all three variations of the replacement string. ::" +msgstr "" +"Il existe aussi une syntaxe pour faire référence aux groupes nommés définis " +"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 " +"substitutions suivantes sont toutes équivalentes mais utilisent les trois " +"variantes de la chaîne de remplacement. ::" + +#: howto/regex.rst:1206 +msgid "" +"*replacement* can also be a function, which gives you even more control. If " +"*replacement* is a function, the function is called for every non-" +"overlapping occurrence of *pattern*. On each call, the function is passed " +"a :ref:`match object ` argument for the match and can use " +"this information to compute the desired replacement string and return it." +msgstr "" +"*replacement* peut aussi être une fonction, ce qui vous donne encore plus de " +"contrôle. Si *replacement* est une fonction, la fonction est appelée pour " +"chaque occurrence non chevauchante de *pattern*. À chaque appel, un " +"argument :ref:`objet correspondance ` est passé à la " +"fonction, qui peut utiliser cette information pour calculer la chaîne de " +"remplacement désirée et la renvoyer." + +#: howto/regex.rst:1212 +msgid "" +"In the following example, the replacement function translates decimals into " +"hexadecimal::" +msgstr "" +"Dans l'exemple suivant, la fonction de substitution convertit un nombre " +"décimal en hexadécimal ::" + +#: howto/regex.rst:1224 +msgid "" +"When using the module-level :func:`re.sub` function, the pattern is passed " +"as the first argument. The pattern may be provided as an object or as a " +"string; if you need to specify regular expression flags, you must either use " +"a pattern object as the first parameter, or use embedded modifiers in the " +"pattern string, e.g. ``sub(\"(?i)b+\", \"x\", \"bbbb BBBB\")`` returns ``'x " +"x'``." +msgstr "" +"Quand vous utilisez la fonction de niveau module :func:`re.sub`, le motif " +"est passé comme premier argument. Vous pouvez fournir le motif sous forme " +"d'objet ou de chaîne de caractères ; si vous avez besoin de spécifier des " +"options pour l'expression régulière, vous devez soit utiliser un objet motif " +"comme premier paramètre, soit utiliser des modificateurs intégrés dans la " +"chaîne de caractères, par exemple ``sub(\"(?i)b+\", \"x\", \"bbbb BBBBB\")`` " +"renvoie ``'x x'``." + +#: howto/regex.rst:1232 +msgid "Common Problems" +msgstr "Problèmes classiques" + +#: howto/regex.rst:1234 +msgid "" +"Regular expressions are a powerful tool for some applications, but in some " +"ways their behaviour isn't intuitive and at times they don't behave the way " +"you may expect them to. This section will point out some of the most common " +"pitfalls." +msgstr "" +"Les expressions régulières constituent un outil puissant pour certaines " +"applications mais, à certains égards, leur comportement n'est pas intuitif " +"et, parfois, elles ne se comportent pas comme vous pouvez vous y attendre. " +"Cette section met en évidence certains des pièges les plus courants." + +#: howto/regex.rst:1240 +msgid "Use String Methods" +msgstr "Utilisez les méthodes du type *string*" + +#: howto/regex.rst:1242 +msgid "" +"Sometimes using the :mod:`re` module is a mistake. If you're matching a " +"fixed string, or a single character class, and you're not using any :mod:" +"`re` features such as the :const:`~re.IGNORECASE` flag, then the full power " +"of regular expressions may not be required. Strings have several methods for " +"performing operations with fixed strings and they're usually much faster, " +"because the implementation is a single small C loop that's been optimized " +"for the purpose, instead of the large, more generalized regular expression " +"engine." +msgstr "" +"Parfois, il ne faut pas utiliser le module :mod:`re`. Si vous faites " +"correspondre une chaîne fixe, ou une classe à un seul caractère, et que vous " +"n'utilisez pas les fonctionnalités de :mod:`re` telles que l'option :const:" +"`~re.IGNORECASE`, alors la puissance des expressions régulières n'est pas " +"nécessaire. Les chaînes de caractères ont plusieurs méthodes pour opérer sur " +"des chaînes fixes et elles sont généralement beaucoup plus rapides, parce " +"que l'implémentation est une seule petite boucle C qui a été optimisée, au " +"lieu du gros moteur d'expressions régulières plus généraliste." + +#: howto/regex.rst:1250 +msgid "" +"One example might be replacing a single fixed string with another one; for " +"example, you might replace ``word`` with ``deed``. :func:`re.sub` seems " +"like the function to use for this, but consider the :meth:`~str.replace` " +"method. Note that :meth:`!replace` will also replace ``word`` inside words, " +"turning ``swordfish`` into ``sdeedfish``, but the naive RE ``word`` would " +"have done that, too. (To avoid performing the substitution on parts of " +"words, the pattern would have to be ``\\bword\\b``, in order to require that " +"``word`` have a word boundary on either side. This takes the job beyond :" +"meth:`!replace`'s abilities.)" +msgstr "" +"Nous pouvons prendre l'exemple du remplacement d'une seule chaîne fixe par " +"une autre ; vous souhaitez remplacer ``mot`` par ``acte``. :func:`re.sub` " +"semble être faite pour cela, mais regardons la méthode :meth:`~str.replace`. " +"Notons que :meth:`!replace` remplace aussi ``mot`` à l'intérieur des mots, " +"transformant ``moteur`` en ``acteeur``, mais la RE naïve ``mot`` aurait " +"aussi fait cela (pour éviter d'effectuer la substitution sur des parties de " +"mots, le motif doit être ``\\bmot\\b``, qui exige que ``mot`` soit en limite " +"de mot d'un côté et de l'autre ; c'est au-delà des capacités de la méthode :" +"meth:`!replace`)." + +#: howto/regex.rst:1259 +msgid "" +"Another common task is deleting every occurrence of a single character from " +"a string or replacing it with another single character. You might do this " +"with something like ``re.sub('\\n', ' ', S)``, but :meth:`~str.translate` is " +"capable of doing both tasks and will be faster than any regular expression " +"operation can be." +msgstr "" +"Une autre tâche classique est de supprimer chaque occurrence d'un seul " +"caractère d'une chaîne de caractères ou de le remplacer par un autre " +"caractère unique. Vous pouvez le faire avec quelque chose comme ``re." +"sub('\\n', ' ', S)``, mais :meth:`~str.translate` en est capable et est plus " +"rapide que n'importe quelle opération d'expression régulière." + +#: howto/regex.rst:1265 +msgid "" +"In short, before turning to the :mod:`re` module, consider whether your " +"problem can be solved with a faster and simpler string method." +msgstr "" +"Bref, avant de passer au module :mod:`re`, évaluez d'abord si votre problème " +"peut être résolu avec une méthode de chaîne plus rapide et plus simple." + +#: howto/regex.rst:1270 +msgid "match() versus search()" +msgstr "*match()* contre *search()*" + +#: howto/regex.rst:1272 +msgid "" +"The :func:`~re.match` function only checks if the RE matches at the " +"beginning of the string while :func:`~re.search` will scan forward through " +"the string for a match. It's important to keep this distinction in mind. " +"Remember, :func:`!match` will only report a successful match which will " +"start at 0; if the match wouldn't start at zero, :func:`!match` will *not* " +"report it. ::" +msgstr "" +"La fonction :func:`~re.match` vérifie seulement si la RE correspond au début " +"de la chaîne de caractères tandis que :func:`~re.search` parcourt la chaîne " +"de caractères pour trouver une correspondance. Il est important de garder " +"cette distinction à l'esprit. Rappelez-vous, :func:`!match` ne trouve qu'une " +"correspondance qui commence à 0 ; si la correspondance commence plus loin, :" +"func:`!match` *ne la trouve pas*. ::" + +#: howto/regex.rst:1283 +msgid "" +"On the other hand, :func:`~re.search` will scan forward through the string, " +"reporting the first match it finds. ::" +msgstr "" +"D'un autre côté, :func:`~re.search` balaie la chaîne de caractères, " +"rapportant la première correspondance qu'elle trouve. ::" + +#: howto/regex.rst:1291 +msgid "" +"Sometimes you'll be tempted to keep using :func:`re.match`, and just add ``." +"*`` to the front of your RE. Resist this temptation and use :func:`re." +"search` instead. The regular expression compiler does some analysis of REs " +"in order to speed up the process of looking for a match. One such analysis " +"figures out what the first character of a match must be; for example, a " +"pattern starting with ``Crow`` must match starting with a ``'C'``. The " +"analysis lets the engine quickly scan through the string looking for the " +"starting character, only trying the full match if a ``'C'`` is found." +msgstr "" +"Vous pouvez être tenté d'utiliser :func:`re.match` en ajoutant simplement ``." +"*`` au début de votre RE. Ce n'est pas une bonne idée, utilisez plutôt :func:" +"`re.search`. Le compilateur d'expressions régulières analyse les RE pour " +"optimiser le processus de recherche d'une correspondance. Cette analyse " +"permet de déterminer ce que doit être le premier caractère d'une " +"correspondance ; par exemple, un motif commençant par ``Corbeau`` doit faire " +"correspondre un ``'C'`` en tête. L'analyse permet au moteur de parcourir " +"rapidement la chaîne de caractères à la recherche du caractère de départ, " +"n'essayant la correspondance complète que si un ``'C'`` a déjà été trouvé." + +#: howto/regex.rst:1300 +msgid "" +"Adding ``.*`` defeats this optimization, requiring scanning to the end of " +"the string and then backtracking to find a match for the rest of the RE. " +"Use :func:`re.search` instead." +msgstr "" +"Ajouter ``.*`` annihile cette optimisation, nécessitant un balayage jusqu'à " +"la fin de la chaîne de caractères, puis un retour en arrière pour trouver " +"une correspondance pour le reste de la RE. Préférez l'utilisation :func:`re." +"search`." + +#: howto/regex.rst:1306 +msgid "Greedy versus Non-Greedy" +msgstr "Glouton contre non-glouton" + +#: howto/regex.rst:1308 +msgid "" +"When repeating a regular expression, as in ``a*``, the resulting action is " +"to consume as much of the pattern as possible. This fact often bites you " +"when you're trying to match a pair of balanced delimiters, such as the angle " +"brackets surrounding an HTML tag. The naive pattern for matching a single " +"HTML tag doesn't work because of the greedy nature of ``.*``. ::" +msgstr "" +"Si vous répétez un motif dans une expression régulière, comme ``a*``, " +"l'action résultante est de consommer autant de motifs que possible. C'est un " +"problème lorsque vous essayez de faire correspondre une paire de " +"délimiteurs, comme des chevrons encadrant une balise HTML. Le motif naïf " +"pour faire correspondre une seule balise HTML ne fonctionne pas en raison de " +"la nature gloutonne de ``.*``. ::" + +#: howto/regex.rst:1322 +msgid "" +"The RE matches the ``'<'`` in ``''``, and the ``.*`` consumes the rest " +"of the string. There's still more left in the RE, though, and the ``>`` " +"can't match at the end of the string, so the regular expression engine has " +"to backtrack character by character until it finds a match for the ``>``. " +"The final match extends from the ``'<'`` in ``''`` to the ``'>'`` in " +"``''``, which isn't what you want." +msgstr "" +"La RE correspond au ``'<'`` de ``''`` et le ``.*`` consomme le reste " +"de la chaîne. Mais, comme il reste des éléments du motif dans la RE et que " +"le ``>`` ne peut pas correspondre à la fin de la chaîne de caractères, le " +"moteur d'expression régulière doit faire marche arrière caractère par " +"caractère jusqu'à ce qu'il trouve une correspondance pour le ``>``. La " +"correspondance finale s'étend du ``'<'`` de ``''`` au ``'>'`` de ``''``, ce qui n'est pas ce que vous voulez." + +#: howto/regex.rst:1329 +msgid "" +"In this case, the solution is to use the non-greedy qualifiers ``*?``, ``+?" +"``, ``??``, or ``{m,n}?``, which match as *little* text as possible. In the " +"above example, the ``'>'`` is tried immediately after the first ``'<'`` " +"matches, and when it fails, the engine advances a character at a time, " +"retrying the ``'>'`` at every step. This produces just the right result::" +msgstr "" +"Dans ce cas, la solution consiste à utiliser des quantificateurs non " +"gloutons tels que ``*?``, ``+?``, ``??`` ou ``{m,n}?``, qui effectuent une " +"correspondance aussi *petite* que possible. Dans l'exemple ci-dessus, le " +"``'>'`` est essayé immédiatement après que le ``'<'`` corresponde et, s'il " +"échoue, le moteur avance caractère par caractère, ré-essayant ``'>'`` à " +"chaque pas. Nous obtenons alors le bon résultat ::" + +#: howto/regex.rst:1338 +msgid "" +"(Note that parsing HTML or XML with regular expressions is painful. Quick-" +"and-dirty patterns will handle common cases, but HTML and XML have special " +"cases that will break the obvious regular expression; by the time you've " +"written a regular expression that handles all of the possible cases, the " +"patterns will be *very* complicated. Use an HTML or XML parser module for " +"such tasks.)" +msgstr "" +"Note : l'analyse du HTML ou du XML avec des expressions régulières est tout " +"sauf une sinécure. Les motifs écrits à la va-vite traiteront les cas " +"communs, mais HTML et XML ont des cas spéciaux qui font planter l'expression " +"régulière évidente ; quand vous aurez écrit une expression régulière qui " +"traite tous les cas possibles, les motifs seront *très* compliqués. " +"Utilisez un module d'analyse HTML ou XML pour de telles tâches." + +#: howto/regex.rst:1346 +msgid "Using re.VERBOSE" +msgstr "Utilisez *re.VERBOSE*" + +#: howto/regex.rst:1348 +msgid "" +"By now you've probably noticed that regular expressions are a very compact " +"notation, but they're not terribly readable. REs of moderate complexity can " +"become lengthy collections of backslashes, parentheses, and metacharacters, " +"making them difficult to read and understand." +msgstr "" +"À présent, vous vous êtes rendu compte que les expressions régulières sont " +"une notation très compacte, mais qu'elles ne sont pas très lisibles. Une RE " +"modérément complexe peut rapidement devenir une longue collection de barres " +"obliques inverses, de parenthèses et de métacaractères, ce qui la rend " +"difficile à lire et à comprendre." + +#: howto/regex.rst:1353 +msgid "" +"For such REs, specifying the :const:`re.VERBOSE` flag when compiling the " +"regular expression can be helpful, because it allows you to format the " +"regular expression more clearly." +msgstr "" +"Pour de telles RE, activer l'option :const:`re.VERBOSE` à la compilation de " +"l'expression régulière peut être utile ; cela vous permet de formater " +"l'expression régulière de manière plus claire." + +#: howto/regex.rst:1357 +msgid "" +"The ``re.VERBOSE`` flag has several effects. Whitespace in the regular " +"expression that *isn't* inside a character class is ignored. This means " +"that an expression such as ``dog | cat`` is equivalent to the less readable " +"``dog|cat``, but ``[a b]`` will still match the characters ``'a'``, ``'b'``, " +"or a space. In addition, you can also put comments inside a RE; comments " +"extend from a ``#`` character to the next newline. When used with triple-" +"quoted strings, this enables REs to be formatted more neatly::" +msgstr "" +"L'option ``re.VERBOSE`` a plusieurs effets. Les espaces dans l'expression " +"régulière qui *ne sont pas* à l'intérieur d'une classe de caractères sont " +"ignorées. Cela signifie qu'une expression comme ``chien | chat`` est " +"équivalente à ``chien|chat`` qui est moins lisible, mais ``[a b]`` " +"correspond toujours aux caractères ``'a'``, ``'b'`` ou à une espace. En " +"outre, vous avez la possibilité de mettre des commentaires à l'intérieur " +"d'une RE ; les commentaires s'étendent du caractère ``#`` à la nouvelle " +"ligne suivante. Lorsque vous l'utilisez avec des chaînes à triple " +"guillemets, cela permet aux RE d'être formatées plus proprement ::" + +#: howto/regex.rst:1374 +msgid "This is far more readable than::" +msgstr "Ceci est beaucoup plus lisible que ::" + +#: howto/regex.rst:1380 +msgid "Feedback" +msgstr "Vos commentaires" + +#: howto/regex.rst:1382 +msgid "" +"Regular expressions are a complicated topic. Did this document help you " +"understand them? Were there parts that were unclear, or Problems you " +"encountered that weren't covered here? If so, please send suggestions for " +"improvements to the author." +msgstr "" +"Les expressions régulières sont un sujet compliqué. Est-ce que ce document " +"vous a aidé à les comprendre ? Des parties ne sont pas claires, ou des " +"problèmes que vous avez rencontrés ne sont pas traités ici ? Si tel est le " +"cas, merci d'envoyer vos suggestions d'améliorations à l'auteur." + +#: howto/regex.rst:1387 +msgid "" +"The most complete book on regular expressions is almost certainly Jeffrey " +"Friedl's Mastering Regular Expressions, published by O'Reilly. " +"Unfortunately, it exclusively concentrates on Perl and Java's flavours of " +"regular expressions, and doesn't contain any Python material at all, so it " +"won't be useful as a reference for programming in Python. (The first " +"edition covered Python's now-removed :mod:`!regex` module, which won't help " +"you much.) Consider checking it out from your library." +msgstr "" +"Le livre le plus complet sur les expressions régulières est certainement " +"*Mastering Regular Expressions* de Jeffrey Friedl, publié par O'Reilly. " +"Malheureusement, il se concentre sur les déclinaisons Perl et Java des " +"expressions régulières et ne contient aucun contenu pour Python ; il n'est " +"donc pas utile d'en faire référence pour la programmation Python. (La " +"première édition traitait du module Python :mod:`!regex`, maintenant " +"supprimé, ce qui ne vous aidera pas beaucoup.) Pensez à le retirer de votre " +"bibliothèque." diff --git a/howto/sockets.po b/howto/sockets.po new file mode 100644 index 0000000000..277c89c71b --- /dev/null +++ b/howto/sockets.po @@ -0,0 +1,763 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-18 15:46+0200\n" +"PO-Revision-Date: 2022-10-18 12:27+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 3.0\n" + +#: howto/sockets.rst:5 +msgid "Socket Programming HOWTO" +msgstr "Guide pratique : programmation avec les *sockets*" + +#: howto/sockets.rst:0 +msgid "Author" +msgstr "Auteur" + +#: howto/sockets.rst:7 +msgid "Gordon McMillan" +msgstr "Gordon McMillan" + +#: howto/sockets.rst:None +msgid "Abstract" +msgstr "Résumé" + +#: howto/sockets.rst:12 +msgid "" +"Sockets are used nearly everywhere, but are one of the most severely " +"misunderstood technologies around. This is a 10,000 foot overview of " +"sockets. It's not really a tutorial - you'll still have work to do in " +"getting things operational. It doesn't cover the fine points (and there are " +"a lot of them), but I hope it will give you enough background to begin using " +"them decently." +msgstr "" +"Les connecteurs (*sockets*, en anglais) sont utilisés presque partout, mais " +"ils sont l'une des technologies les plus méconnues. En voici un aperçu très " +"général. Ce n'est pas vraiment un tutoriel — vous aurez encore du travail à " +"faire pour avoir un résultat opérationnel. Il ne couvre pas les détails (et " +"il y en a beaucoup), mais j'espère qu'il vous donnera suffisamment " +"d'informations pour commencer à les utiliser correctement." + +#: howto/sockets.rst:20 +msgid "Sockets" +msgstr "Connecteurs (*sockets*)" + +#: howto/sockets.rst:22 +msgid "" +"I'm only going to talk about INET (i.e. IPv4) sockets, but they account for " +"at least 99% of the sockets in use. And I'll only talk about STREAM (i.e. " +"TCP) sockets - unless you really know what you're doing (in which case this " +"HOWTO isn't for you!), you'll get better behavior and performance from a " +"STREAM socket than anything else. I will try to clear up the mystery of what " +"a socket is, as well as some hints on how to work with blocking and non-" +"blocking sockets. But I'll start by talking about blocking sockets. You'll " +"need to know how they work before dealing with non-blocking sockets." +msgstr "" +"Je ne parlerai que des connecteurs *INET* (c'est-à-dire IPv4), mais ils " +"représentent au moins 99 % des connecteurs utilisés. Et je ne parlerai que " +"des connecteurs *STREAM* (c.-à-d. *TCP*) — à moins que vous ne sachiez " +"vraiment ce que vous faites (auquel cas ce guide n'est pas pour vous), vous " +"obtiendrez un meilleur comportement et de meilleures performances avec un " +"connecteur *STREAM* qu'avec n'importe quel autre. Je vais essayer " +"d'éclaircir le mystère de ce qu'est un connecteur, ainsi que quelques " +"conseils sur la façon de travailler avec des connecteurs bloquants et non " +"bloquants. Mais je commencerai par parler des connecteurs bloquants. Vous " +"devez savoir comment ils fonctionnent avant de vous intéresser aux " +"connecteurs non bloquants." + +#: howto/sockets.rst:31 +msgid "" +"Part of the trouble with understanding these things is that \"socket\" can " +"mean a number of subtly different things, depending on context. So first, " +"let's make a distinction between a \"client\" socket - an endpoint of a " +"conversation, and a \"server\" socket, which is more like a switchboard " +"operator. The client application (your browser, for example) uses \"client\" " +"sockets exclusively; the web server it's talking to uses both \"server\" " +"sockets and \"client\" sockets." +msgstr "" +"Une partie de la difficulté à comprendre ces choses est que « connecteur » " +"peut désigner plusieurs choses très légèrement différentes, selon le " +"contexte. Faisons donc d'abord une distinction entre un connecteur " +"« client » — point final d'une conversation — et un connecteur « serveur », " +"qui ressemble davantage à un standardiste. L'application cliente (votre " +"navigateur par exemple) utilise exclusivement des connecteurs « client » ; " +"le serveur web avec lequel elle parle utilise à la fois des connecteurs " +"« serveur » et des connecteurs « client »." + +#: howto/sockets.rst:40 +msgid "History" +msgstr "Historique" + +#: howto/sockets.rst:42 +msgid "" +"Of the various forms of :abbr:`IPC (Inter Process Communication)`, sockets " +"are by far the most popular. On any given platform, there are likely to be " +"other forms of IPC that are faster, but for cross-platform communication, " +"sockets are about the only game in town." +msgstr "" +"Parmi les différentes formes d’:abbr:`IPC (Inter Process Communication)`, " +"les connecteurs sont de loin les plus populaires. Sur une plate-forme " +"donnée, il est probable que d'autres formes d'\\ *IPC* soient plus rapides, " +"mais pour la communication entre plates-formes, les connecteurs sont à peu " +"près la seule solution valable." + +#: howto/sockets.rst:47 +msgid "" +"They were invented in Berkeley as part of the BSD flavor of Unix. They " +"spread like wildfire with the internet. With good reason --- the combination " +"of sockets with INET makes talking to arbitrary machines around the world " +"unbelievably easy (at least compared to other schemes)." +msgstr "" +"Ils ont été inventés à Berkeley dans le cadre de la déclinaison *BSD* " +"d'Unix. Ils se sont répandus comme une traînée de poudre avec Internet. Et " +"pour cause : la combinaison des connecteurs avec *INET* rend le dialogue " +"avec n’importe quelle machine dans le monde entier incroyablement facile (du " +"moins par rapport à d'autres systèmes)." + +#: howto/sockets.rst:54 +msgid "Creating a Socket" +msgstr "Création d'un connecteur" + +#: howto/sockets.rst:56 +msgid "" +"Roughly speaking, when you clicked on the link that brought you to this " +"page, your browser did something like the following::" +msgstr "" +"Grosso modo, lorsque vous avez cliqué sur le lien qui vous a amené à cette " +"page, votre navigateur a fait quelque chose comme ceci ::" + +#: howto/sockets.rst:64 +msgid "" +"When the ``connect`` completes, the socket ``s`` can be used to send in a " +"request for the text of the page. The same socket will read the reply, and " +"then be destroyed. That's right, destroyed. Client sockets are normally only " +"used for one exchange (or a small set of sequential exchanges)." +msgstr "" +"Lorsque l’appel à ``connect`` est terminé, le connecteur ``s`` peut être " +"utilisé pour envoyer une requête demandant le texte de la page. Le même " +"connecteur lira la réponse, puis sera mis au rebut. C'est exact, mis au " +"rebut. Les connecteurs clients ne sont normalement utilisés que pour un seul " +"échange (ou un petit ensemble d'échanges séquentiels)." + +#: howto/sockets.rst:70 +msgid "" +"What happens in the web server is a bit more complex. First, the web server " +"creates a \"server socket\"::" +msgstr "" +"Ce qui se passe dans le serveur web est un peu plus complexe. Tout d'abord, " +"le serveur web crée un « connecteur serveur » ::" + +#: howto/sockets.rst:80 +msgid "" +"A couple things to notice: we used ``socket.gethostname()`` so that the " +"socket would be visible to the outside world. If we had used ``s." +"bind(('localhost', 80))`` or ``s.bind(('127.0.0.1', 80))`` we would still " +"have a \"server\" socket, but one that was only visible within the same " +"machine. ``s.bind(('', 80))`` specifies that the socket is reachable by any " +"address the machine happens to have." +msgstr "" +"Quelques remarques : nous avons utilisé ``socket.gethostname()`` pour que le " +"connecteur soit visible par le monde extérieur. Si nous avions utilisé ``s." +"bind(('localhost', 80))`` ou ``s.bind(('127.0.0.1', 80))``, nous aurions " +"toujours un connecteur « serveur », mais qui ne serait visible qu'à " +"l'intérieur de la même machine. ``s.bind(('', 80))`` précise que le " +"connecteur est accessible par n'importe quelle adresse que la machine " +"possède." + +#: howto/sockets.rst:87 +msgid "" +"A second thing to note: low number ports are usually reserved for \"well " +"known\" services (HTTP, SNMP etc). If you're playing around, use a nice high " +"number (4 digits)." +msgstr "" +"Une deuxième chose à noter : les ports dont le numéro est petit sont " +"généralement réservés aux services « bien connus » (HTTP, SNMP, etc.). Si " +"vous expérimentez, utilisez un nombre suffisamment élevé (4 chiffres)." + +#: howto/sockets.rst:91 +msgid "" +"Finally, the argument to ``listen`` tells the socket library that we want it " +"to queue up as many as 5 connect requests (the normal max) before refusing " +"outside connections. If the rest of the code is written properly, that " +"should be plenty." +msgstr "" +"Enfin, l'argument passé à ``listen`` indique à la bibliothèque de " +"connecteurs que nous voulons mettre en file d'attente jusqu'à 5 requêtes de " +"connexion (le maximum normal) avant de refuser les connexions externes. Si " +"le reste du code est écrit correctement, cela devrait suffire." + +#: howto/sockets.rst:95 +msgid "" +"Now that we have a \"server\" socket, listening on port 80, we can enter the " +"mainloop of the web server::" +msgstr "" +"Maintenant que nous avons un connecteur « serveur », en écoute sur le port " +"80, nous pouvons entrer dans la boucle principale du serveur web ::" + +#: howto/sockets.rst:106 +msgid "" +"There's actually 3 general ways in which this loop could work - dispatching " +"a thread to handle ``clientsocket``, create a new process to handle " +"``clientsocket``, or restructure this app to use non-blocking sockets, and " +"multiplex between our \"server\" socket and any active ``clientsocket``\\ s " +"using ``select``. More about that later. The important thing to understand " +"now is this: this is *all* a \"server\" socket does. It doesn't send any " +"data. It doesn't receive any data. It just produces \"client\" sockets. Each " +"``clientsocket`` is created in response to some *other* \"client\" socket " +"doing a ``connect()`` to the host and port we're bound to. As soon as we've " +"created that ``clientsocket``, we go back to listening for more connections. " +"The two \"clients\" are free to chat it up - they are using some dynamically " +"allocated port which will be recycled when the conversation ends." +msgstr "" +"Il y a en fait trois façons générales de faire fonctionner cette boucle : " +"mobiliser un fil d'exécution pour gérer les ``clientsocket``\\s, créer un " +"nouveau processus pour gérer les ``clientsocket``\\s, ou restructurer cette " +"application pour utiliser des connecteurs non bloquants, et multiplexer " +"entre notre connecteur « serveur » et n'importe quel ``clientsocket`` actif " +"en utilisant ``select``. Plus d'informations à ce sujet plus tard. La chose " +"importante à comprendre maintenant est la suivante : c'est *tout* ce que " +"fait un connecteur « serveur ». Il n'envoie aucune donnée. Il ne reçoit " +"aucune donnée. Il ne fait que produire des connecteurs « clients ». Chaque " +"``clientsocket`` est créé en réponse à un *autre* connecteur « client » qui " +"se connecte à l'hôte et au port auxquels nous sommes liés. Dès que nous " +"avons créé ce ``clientsocket``, nous retournons à l'écoute pour d'autres " +"connexions. Les deux « clients » sont libres de discuter — ils utilisent un " +"port alloué dynamiquement qui sera recyclé à la fin de la conversation." + +#: howto/sockets.rst:121 +msgid "IPC" +msgstr "*IPC* (Communication Entre Processus)" + +#: howto/sockets.rst:123 +msgid "" +"If you need fast IPC between two processes on one machine, you should look " +"into pipes or shared memory. If you do decide to use AF_INET sockets, bind " +"the \"server\" socket to ``'localhost'``. On most platforms, this will take " +"a shortcut around a couple of layers of network code and be quite a bit " +"faster." +msgstr "" +"Si vous avez besoin d'une communication rapide entre deux processus sur une " +"même machine, vous devriez regarder comment utiliser les tubes (*pipe*, en " +"anglais) ou la mémoire partagée. Si vous décidez d'utiliser les connecteurs " +"*AF_INET*, liez le connecteur « serveur » à ``'localhost'``. Sur la plupart " +"des plates-formes, cela contourne quelques couches réseau et est un peu plus " +"rapide." + +#: howto/sockets.rst:129 +msgid "" +"The :mod:`multiprocessing` integrates cross-platform IPC into a higher-level " +"API." +msgstr "" +"Le :mod:`multiprocessing` intègre de l’IPC multiplateformes dans une API de " +"plus haut niveau." + +#: howto/sockets.rst:134 +msgid "Using a Socket" +msgstr "Utilisation d'un connecteur" + +#: howto/sockets.rst:136 +msgid "" +"The first thing to note, is that the web browser's \"client\" socket and the " +"web server's \"client\" socket are identical beasts. That is, this is a " +"\"peer to peer\" conversation. Or to put it another way, *as the designer, " +"you will have to decide what the rules of etiquette are for a conversation*. " +"Normally, the ``connect``\\ ing socket starts the conversation, by sending " +"in a request, or perhaps a signon. But that's a design decision - it's not a " +"rule of sockets." +msgstr "" +"La première chose à noter, c'est que la prise « client » du navigateur web " +"et la prise « client » du serveur web sont des bêtes identiques. C'est-à-" +"dire qu'il s'agit d'une conversation « pair à pair ». Ou pour le dire " +"autrement, *en tant que concepteur, vous devrez décider quelles sont les " +"règles d'étiquette pour une conversation*. Normalement, la connexion via " +"``connect`` lance la conversation en envoyant une demande, ou peut-être un " +"signe. Mais c'est une décision de conception — ce n'est pas une règle des " +"connecteurs." + +#: howto/sockets.rst:143 +msgid "" +"Now there are two sets of verbs to use for communication. You can use " +"``send`` and ``recv``, or you can transform your client socket into a file-" +"like beast and use ``read`` and ``write``. The latter is the way Java " +"presents its sockets. I'm not going to talk about it here, except to warn " +"you that you need to use ``flush`` on sockets. These are buffered \"files\", " +"and a common mistake is to ``write`` something, and then ``read`` for a " +"reply. Without a ``flush`` in there, you may wait forever for the reply, " +"because the request may still be in your output buffer." +msgstr "" +"Il y a maintenant deux ensembles de verbes à utiliser pour la communication. " +"Vous pouvez utiliser ``send`` et ``recv``, ou vous pouvez transformer votre " +"connecteur client en une bête imitant un fichier et utiliser ``read`` et " +"``write``. C'est la façon dont Java présente ses connecteurs. Je ne vais pas " +"en parler ici, sauf pour vous avertir que vous devez utiliser ``flush`` sur " +"les connecteurs. Ce sont des « fichiers », mis en mémoire tampon, et une " +"erreur courante est d'« écrire » via ``write`` quelque chose, puis de " +"« lire » via ``read`` pour obtenir une réponse. Sans un ``flush``, vous " +"pouvez attendre la réponse pour toujours, parce que la requête peut encore " +"être dans votre mémoire tampon de sortie." + +#: howto/sockets.rst:152 +msgid "" +"Now we come to the major stumbling block of sockets - ``send`` and ``recv`` " +"operate on the network buffers. They do not necessarily handle all the bytes " +"you hand them (or expect from them), because their major focus is handling " +"the network buffers. In general, they return when the associated network " +"buffers have been filled (``send``) or emptied (``recv``). They then tell " +"you how many bytes they handled. It is *your* responsibility to call them " +"again until your message has been completely dealt with." +msgstr "" +"Nous arrivons maintenant au principal écueil des connecteurs — ``send`` et " +"``recv`` fonctionnent sur les mémoires tampons du réseau. Ils ne traitent " +"pas nécessairement tous les octets que vous leur passez (ou que vous " +"attendez d'eux), car leur principal objectif est de gérer les tampons " +"réseau. En général, leur exécution se termine lorsque les tampons réseau " +"associés ont été remplis (``send``) ou vidés (``recv``). Ils vous indiquent " +"alors combien d'octets ils ont traité. Il est de *votre* responsabilité de " +"les rappeler jusqu'à ce que votre message ait été complètement traité." + +#: howto/sockets.rst:160 +msgid "" +"When a ``recv`` returns 0 bytes, it means the other side has closed (or is " +"in the process of closing) the connection. You will not receive any more " +"data on this connection. Ever. You may be able to send data successfully; " +"I'll talk more about this later." +msgstr "" +"Lorsqu'un ``recv`` renvoie 0 octet, cela signifie que l'autre partie a fermé " +"(ou est en train de fermer) la connexion. Vous ne recevrez plus de données " +"sur cette connexion. Jamais. Vous pouvez peut-être envoyer des données avec " +"succès. J’en parlerai plus tard." + +#: howto/sockets.rst:165 +msgid "" +"A protocol like HTTP uses a socket for only one transfer. The client sends a " +"request, then reads a reply. That's it. The socket is discarded. This means " +"that a client can detect the end of the reply by receiving 0 bytes." +msgstr "" +"Un protocole comme HTTP utilise un connecteur pour un seul transfert. Le " +"client envoie une demande, puis lit une réponse. C'est tout. Le connecteur " +"est mis au rebut. Cela signifie qu'un client peut détecter la fin de la " +"réponse en recevant 0 octet." + +#: howto/sockets.rst:169 +msgid "" +"But if you plan to reuse your socket for further transfers, you need to " +"realize that *there is no* :abbr:`EOT (End of Transfer)` *on a socket.* I " +"repeat: if a socket ``send`` or ``recv`` returns after handling 0 bytes, the " +"connection has been broken. If the connection has *not* been broken, you " +"may wait on a ``recv`` forever, because the socket will *not* tell you that " +"there's nothing more to read (for now). Now if you think about that a bit, " +"you'll come to realize a fundamental truth of sockets: *messages must either " +"be fixed length* (yuck), *or be delimited* (shrug), *or indicate how long " +"they are* (much better), *or end by shutting down the connection*. The " +"choice is entirely yours, (but some ways are righter than others)." +msgstr "" +"Mais si vous prévoyez de réutiliser votre connecteur pour d'autres " +"transferts, vous devez réaliser qu'\\ *il n'y a pas* d':abbr:`EOT (End of " +"Transfer)` *sur un connecteur*. Je répète : si un appel à ``send`` ou " +"``recv`` se termine après avoir traité 0 octet, la connexion a été " +"interrompue. Si la connexion n'a *pas* été interrompue, vous pouvez attendre " +"sur un ``recv`` pour toujours, car le connecteur ne vous dira pas qu'il n'y " +"a plus rien à lire (pour le moment). Maintenant, si vous y réfléchissez un " +"peu, vous allez vous rendre compte d'une vérité fondamentale sur les " +"connecteurs : *les messages doivent être de longueur fixe* (beurk), *ou être " +"délimités* (bof), *ou indiquer de quelle longueur ils sont* (beaucoup " +"mieux), *ou terminer en coupant la connexion*. Le choix est entièrement de " +"votre côté (mais certaines façons sont meilleurs que d'autres)." + +#: howto/sockets.rst:180 +msgid "" +"Assuming you don't want to end the connection, the simplest solution is a " +"fixed length message::" +msgstr "" +"En supposant que vous ne vouliez pas terminer la connexion, la solution la " +"plus simple est un message de longueur fixe ::" + +#: howto/sockets.rst:217 +msgid "" +"The sending code here is usable for almost any messaging scheme - in Python " +"you send strings, and you can use ``len()`` to determine its length (even if " +"it has embedded ``\\0`` characters). It's mostly the receiving code that " +"gets more complex. (And in C, it's not much worse, except you can't use " +"``strlen`` if the message has embedded ``\\0``\\ s.)" +msgstr "" +"Le code d'envoi ici est utilisable pour presque tous les systèmes de " +"messagerie — en Python, vous envoyez des chaînes de caractères, et vous " +"pouvez utiliser ``len()`` pour en déterminer la longueur (même si elle " +"contient des caractères ``\\0``). C'est surtout le code de réception qui " +"devient plus complexe. (Et en C, ce n'est pas bien pire, sauf que vous ne " +"pouvez pas utiliser ``strlen`` si le message contient des ``\\0``\\ s)." + +#: howto/sockets.rst:223 +msgid "" +"The easiest enhancement is to make the first character of the message an " +"indicator of message type, and have the type determine the length. Now you " +"have two ``recv``\\ s - the first to get (at least) that first character so " +"you can look up the length, and the second in a loop to get the rest. If you " +"decide to go the delimited route, you'll be receiving in some arbitrary " +"chunk size, (4096 or 8192 is frequently a good match for network buffer " +"sizes), and scanning what you've received for a delimiter." +msgstr "" +"Le plus simple est de faire du premier caractère du message un indicateur du " +"type de message, et de faire en sorte que le type détermine la longueur. " +"Vous avez maintenant deux ``recv``\\ s — le premier pour obtenir (au moins) " +"ce premier caractère afin de pouvoir déterminer la longueur, et le second " +"dans une boucle pour obtenir le reste. Si vous décidez de suivre la route " +"délimitée, vous recevrez un morceau de taille arbitraire (4096 ou 8192 est " +"fréquemment une bonne valeur pour correspondre à la taille de la mémoire " +"tampon du réseau), et vous analyserez ce que vous avez reçu pour trouver un " +"délimiteur." + +#: howto/sockets.rst:231 +msgid "" +"One complication to be aware of: if your conversational protocol allows " +"multiple messages to be sent back to back (without some kind of reply), and " +"you pass ``recv`` an arbitrary chunk size, you may end up reading the start " +"of a following message. You'll need to put that aside and hold onto it, " +"until it's needed." +msgstr "" +"Une subtilité dont il faut être conscient : si votre protocole de " +"conversation permet de renvoyer plusieurs messages les uns à la suite des " +"autres (sans aucune sorte de réponse), et que vous passez à ``recv`` une " +"taille de morceau arbitraire, vous pouvez en arriver à lire le début du " +"message suivant. Vous devrez alors le mettre de côté et le conserver, " +"jusqu'à ce que vous en ayez besoin." + +#: howto/sockets.rst:237 +msgid "" +"Prefixing the message with its length (say, as 5 numeric characters) gets " +"more complex, because (believe it or not), you may not get all 5 characters " +"in one ``recv``. In playing around, you'll get away with it; but in high " +"network loads, your code will very quickly break unless you use two ``recv`` " +"loops - the first to determine the length, the second to get the data part " +"of the message. Nasty. This is also when you'll discover that ``send`` does " +"not always manage to get rid of everything in one pass. And despite having " +"read this, you will eventually get bit by it!" +msgstr "" +"Préfixer le message avec sa longueur (disons, sous la forme de 5 caractères " +"numériques) devient plus complexe, parce que (croyez-le ou non), vous pouvez " +"ne pas recevoir les 5 caractères en un seul ``recv``. Pour une utilisation " +"triviale, vous vous en tirerez à bon compte ; mais en cas de forte charge " +"réseau, votre code se cassera très rapidement, à moins que vous n’utilisiez " +"deux boucles ``recv`` — la première pour déterminer la longueur, la deuxième " +"pour obtenir la partie « données » du message. Vilain. C’est aussi à ce " +"moment que vous découvrirez que « l’envoi » via ``send`` ne parvient pas " +"toujours à tout évacuer en un seul passage. Et bien que vous ayez lu cet " +"avertissement, vous finirez par vous faire avoir par cette subtilité !" + +#: howto/sockets.rst:246 +msgid "" +"In the interests of space, building your character, (and preserving my " +"competitive position), these enhancements are left as an exercise for the " +"reader. Lets move on to cleaning up." +msgstr "" +"Pour garder une longueur raisonnable à cette page, pour forger votre " +"caractère (et afin de garder l’avantage concurrentiel que j’ai sur vous), " +"ces améliorations ne seront pas abordées et sont laissées en exercice au " +"lecteur. Passons maintenant au nettoyage." + +#: howto/sockets.rst:252 +msgid "Binary Data" +msgstr "Données binaires" + +#: howto/sockets.rst:254 +msgid "" +"It is perfectly possible to send binary data over a socket. The major " +"problem is that not all machines use the same formats for binary data. For " +"example, `network byte order `_ is big-endian, with the most significant byte " +"first, so a 16 bit integer with the value ``1`` would be the two hex bytes " +"``00 01``. However, most common processors (x86/AMD64, ARM, RISC-V), are " +"little-endian, with the least significant byte first - that same ``1`` would " +"be ``01 00``." +msgstr "" + +#: howto/sockets.rst:262 +msgid "" +"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-reversed, these swap " +"the bytes around appropriately." +msgstr "" +"Les bibliothèques de sockets ont des appels pour convertir les entiers 16 et " +"32 bits - ``ntohl, htonl, ntohs, htons`` où « n » signifie *network* " +"(réseau) et « h » signifie *host* (hôte), « s » signifie *short* (court) et " +"« l » signifie *long*. Lorsque l’ordre du réseau est l’ordre de l’hôte, ils " +"ne font rien, mais lorsque la machine fonctionne en ordre inversé, ils " +"échangent les octets de manière appropriée." + +#: howto/sockets.rst:268 +msgid "" +"In these days of 64-bit machines, the ASCII representation of binary data is " +"frequently smaller than the binary representation. That's because a " +"surprising amount of the time, most integers have the value 0, or maybe 1. " +"The string ``\"0\"`` would be two bytes, while a full 64-bit integer would " +"be 8. Of course, this doesn't fit well with fixed-length messages. " +"Decisions, decisions." +msgstr "" +"De nos jours, avec les machines 64 bits, la représentation *ASCII* des " +"données binaires est souvent plus compacte que la représentation binaire. " +"C’est parce que dans un nombre surprenant de cas, tous ces *entiers* ont la " +"valeur 0 et parfois 1. La chaîne « 0 » serait codée sur deux octets, alors " +"qu'elle le serait sur 8 en tant que binaire 64 bits. Bien sûr, cela ne " +"fonctionne pas très bien avec les messages de longueur fixe. C’est une " +"affaire de choix." + +#: howto/sockets.rst:277 +msgid "Disconnecting" +msgstr "Déconnexion" + +#: howto/sockets.rst:279 +msgid "" +"Strictly speaking, you're supposed to use ``shutdown`` on a socket before " +"you ``close`` it. The ``shutdown`` is an advisory to the socket at the " +"other end. Depending on the argument you pass it, it can mean \"I'm not " +"going to send anymore, but I'll still listen\", or \"I'm not listening, good " +"riddance!\". Most socket libraries, however, are so used to programmers " +"neglecting to use this piece of etiquette that normally a ``close`` is the " +"same as ``shutdown(); close()``. So in most situations, an explicit " +"``shutdown`` is not needed." +msgstr "" +"À proprement parler, vous êtes censé utiliser ``shutdown`` sur un connecteur " +"pour l’arrêter avant de le fermer via ``close``. Le ``shutdown`` est un " +"avertissement au connecteur de l’autre côté. Selon l’argument que vous lui " +"passez, cela peut signifier « Je ne vais plus envoyer, mais je vais quand " +"même écouter », ou « Je n’écoute pas, bon débarras ! ». La plupart des " +"bibliothèques de connecteurs, cependant, sont tellement habituées à ce que " +"les programmeurs négligent d’utiliser ce morceau d’étiquette que normalement " +"un ``close`` est équivalent à ``shutdown() ; close()``. Ainsi, dans la " +"plupart des situations, un ``shutdown`` explicite n’est pas nécessaire." + +#: howto/sockets.rst:287 +msgid "" +"One way to use ``shutdown`` effectively is in an HTTP-like exchange. The " +"client sends a request and then does a ``shutdown(1)``. This tells the " +"server \"This client is done sending, but can still receive.\" The server " +"can detect \"EOF\" by a receive of 0 bytes. It can assume it has the " +"complete request. The server sends a reply. If the ``send`` completes " +"successfully then, indeed, the client was still receiving." +msgstr "" +"Une façon d’utiliser efficacement le ``shutdown`` est d’utiliser un échange " +"de type HTTP. Le client envoie une requête et effectue ensuite un " +"``shutdown(1)``. Cela indique au serveur que « ce client a fini d’envoyer, " +"mais peut encore recevoir ». Le serveur peut détecter *EOF* par une " +"réception de 0 octet. Il peut supposer qu’il a la requête complète. Le " +"serveur envoie une réponse. Si le ``send`` se termine avec succès, alors, en " +"effet, le client était encore en train de recevoir." + +#: howto/sockets.rst:294 +msgid "" +"Python takes the automatic shutdown a step further, and says that when a " +"socket is garbage collected, it will automatically do a ``close`` if it's " +"needed. But relying on this is a very bad habit. If your socket just " +"disappears without doing a ``close``, the socket at the other end may hang " +"indefinitely, thinking you're just being slow. *Please* ``close`` your " +"sockets when you're done." +msgstr "" +"Python pousse l’arrêt automatique un peu plus loin, et dit que lorsqu’un " +"connecteur est collecté par le ramasse-miette, il effectue automatiquement " +"une fermeture via ``close`` si elle est nécessaire. Mais c’est une très " +"mauvaise habitude de s’appuyer sur ce système. Si votre connecteur disparaît " +"sans avoir fait un ``close``, le connecteur à l’autre bout peut rester " +"suspendu indéfiniment, pensant que vous êtes juste lent. Fermez vos " +"connecteurs quand vous avez terminé *s’il vous plaît*." + +#: howto/sockets.rst:302 +msgid "When Sockets Die" +msgstr "Quand les connecteurs meurent" + +#: howto/sockets.rst:304 +msgid "" +"Probably the worst thing about using blocking sockets is what happens when " +"the other side comes down hard (without doing a ``close``). Your socket is " +"likely to hang. TCP is a reliable protocol, and it will wait a long, long " +"time before giving up on a connection. If you're using threads, the entire " +"thread is essentially dead. There's not much you can do about it. As long as " +"you aren't doing something dumb, like holding a lock while doing a blocking " +"read, the thread isn't really consuming much in the way of resources. Do " +"*not* try to kill the thread - part of the reason that threads are more " +"efficient than processes is that they avoid the overhead associated with the " +"automatic recycling of resources. In other words, if you do manage to kill " +"the thread, your whole process is likely to be screwed up." +msgstr "" +"Le pire dans l'utilisation de connecteurs bloquants est probablement ce qui " +"se passe lorsque l'autre côté s'interrompt brutalement (sans faire de " +"fermeture via ``close``). Votre connecteur risque d’attendre infiniment. TCP " +"est un protocole fiable, et il attendra très, très longtemps avant " +"d'abandonner une connexion. Si vous utilisez des fils d’exécution, le fil " +"entier est pratiquement mort. Il n'y a pas grand-chose que vous puissiez " +"faire à ce sujet. Du moment que vous ne faites rien de stupide, comme tenir " +"un verrou verrouillé pendant une lecture bloquante, le fil ne consomme pas " +"vraiment beaucoup de ressources. N'essayez *pas* de tuer le fil — si les " +"fils sont plus efficients que les processus, c'est en partie parce qu'ils " +"évitent les coûts significatifs liés au recyclage automatique des " +"ressources. En d'autres termes, si vous parvenez à tuer le fil, tout votre " +"processus risque d'être foutu." + +#: howto/sockets.rst:318 +msgid "Non-blocking Sockets" +msgstr "Connecteurs non bloquants" + +#: howto/sockets.rst:320 +msgid "" +"If you've understood the preceding, you already know most of what you need " +"to know about the mechanics of using sockets. You'll still use the same " +"calls, in much the same ways. It's just that, if you do it right, your app " +"will be almost inside-out." +msgstr "" +"Si vous avez compris ce qui précède, vous savez déjà tout ce que vous devez " +"savoir sur la mécanique de l’utilisation des connecteurs. Vous utiliserez " +"toujours les mêmes appels, de la même façon. Il n’y que ça. Si vous le " +"faites bien, c’est presque dans la poche." + +#: howto/sockets.rst:325 +msgid "" +"In Python, you use ``socket.setblocking(False)`` to make it non-blocking. In " +"C, it's more complex, (for one thing, you'll need to choose between the BSD " +"flavor ``O_NONBLOCK`` and the almost indistinguishable POSIX flavor " +"``O_NDELAY``, which is completely different from ``TCP_NODELAY``), but it's " +"the exact same idea. You do this after creating the socket, but before using " +"it. (Actually, if you're nuts, you can switch back and forth.)" +msgstr "" +"En Python, vous utilisez ``socket.setblocking(0)`` pour rendre non-bloquant. " +"En C, c’est plus complexe (pour commencer, vous devez choisir entre la " +"version BSD ``O_NONBLOCK`` et la version POSIX presque impossible à " +"distinguer ``O_NDELAY``, qui est complètement différente de " +"``TCP_NODELAY``), mais c’est exactement la même idée. Vous le faites après " +"avoir créé le connecteur mais avant de l’utiliser (en fait, si vous êtes " +"fou, vous pouvez alterner)." + +#: howto/sockets.rst:332 +msgid "" +"The major mechanical difference is that ``send``, ``recv``, ``connect`` and " +"``accept`` can return without having done anything. You have (of course) a " +"number of choices. You can check return code and error codes and generally " +"drive yourself crazy. If you don't believe me, try it sometime. Your app " +"will grow large, buggy and suck CPU. So let's skip the brain-dead solutions " +"and do it right." +msgstr "" +"La différence majeure de fonctionnement est que ``send``, ``recv``, " +"``connect`` et ``accept`` peuvent rendre la main sans avoir rien fait. Vous " +"avez (bien sûr) un certain nombre de choix. Vous pouvez vérifier le code de " +"retour et les codes d'erreur et, en général, devenir fou. Si vous ne me " +"croyez pas, essayez un jour. Votre application va grossir, boguer et " +"vampiriser le processeur. Alors, évitons les solutions vouées à l’échec dès " +"le départ et faisons les choses correctement." + +#: howto/sockets.rst:339 +msgid "Use ``select``." +msgstr "Utilisation de ``select``." + +#: howto/sockets.rst:341 +msgid "" +"In C, coding ``select`` is fairly complex. In Python, it's a piece of cake, " +"but it's close enough to the C version that if you understand ``select`` in " +"Python, you'll have little trouble with it in C::" +msgstr "" +"En C, implémenter ``select`` est assez complexe. En Python, c'est du gâteau, " +"mais c'est assez proche de la version C ; aussi, si vous comprenez " +"``select`` en Python, vous aurez peu de problèmes en C ::" + +#: howto/sockets.rst:352 +msgid "" +"You pass ``select`` three lists: the first contains all sockets that you " +"might want to try reading; the second all the sockets you might want to try " +"writing to, and the last (normally left empty) those that you want to check " +"for errors. You should note that a socket can go into more than one list. " +"The ``select`` call is blocking, but you can give it a timeout. This is " +"generally a sensible thing to do - give it a nice long timeout (say a " +"minute) unless you have good reason to do otherwise." +msgstr "" +"Vous passez à ``select`` trois listes : la première contient tous les " +"connecteurs dont vous souhaiter lire le contenu ; la deuxième tous les " +"connecteurs sur lesquels vous voudriez écrire, et la dernière (normalement " +"laissée vide) ceux sur lesquels vous voudriez vérifier s’il y a des erreurs. " +"Prenez note qu'un connecteur peut figurer dans plus d'une liste. L'appel à " +"``select`` est bloquant, mais vous pouvez lui donner un délai d'attente. " +"C'est généralement une bonne chose à faire — donnez-lui un bon gros délai " +"d'attente (disons une minute), à moins que vous n'ayez une bonne raison de " +"ne pas le faire." + +#: howto/sockets.rst:360 +msgid "" +"In return, you will get three lists. They contain the sockets that are " +"actually readable, writable and in error. Each of these lists is a subset " +"(possibly empty) of the corresponding list you passed in." +msgstr "" +"En retour, vous recevrez trois listes. Elles contiennent les connecteurs qui " +"sont réellement lisibles, inscriptibles et en erreur. Chacune de ces listes " +"est un sous-ensemble (éventuellement vide) de la liste correspondante que " +"vous avez transmise." + +#: howto/sockets.rst:364 +msgid "" +"If a socket is in the output readable list, you can be as-close-to-certain-" +"as-we-ever-get-in-this-business that a ``recv`` on that socket will return " +"*something*. Same idea for the writable list. You'll be able to send " +"*something*. Maybe not all you want to, but *something* is better than " +"nothing. (Actually, any reasonably healthy socket will return as writable - " +"it just means outbound network buffer space is available.)" +msgstr "" +"Si un connecteur se trouve dans la liste renvoyée des connecteurs lisibles, " +"vous pouvez être pratiquement certain qu'un ``recv`` sur ce connecteur " +"renvoie *quelque chose*. Même chose pour la liste renvoyée des connecteurs " +"inscriptibles. Vous pourrez envoyer *quelque chose*. Peut-être pas tout ce " +"que vous voudrez, mais *quelque chose* est mieux que rien (en fait, " +"n'importe quel connecteur raisonnablement sain sera présent dans la liste " +"des connecteurs inscriptibles — cela signifie simplement que l'espace tampon " +"réseau sortant est disponible)." + +#: howto/sockets.rst:371 +msgid "" +"If you have a \"server\" socket, put it in the potential_readers list. If it " +"comes out in the readable list, your ``accept`` will (almost certainly) " +"work. If you have created a new socket to ``connect`` to someone else, put " +"it in the potential_writers list. If it shows up in the writable list, you " +"have a decent chance that it has connected." +msgstr "" +"Si vous avez un connecteur « serveur », mettez-le dans la liste des " +"connecteurs potentiellement lisibles ``potential_readers``. S’il apparaît " +"dans la liste renvoyée des connecteurs que vous pouvez lire, votre " +"``accept`` fonctionnera (presque certainement). Si vous avez créé un nouveau " +"connecteur pour se connecter via ``connect`` à quelqu'un d'autre, mettez-le " +"dans la liste des connecteurs potentiellement inscriptibles. S’il apparaît " +"dans la liste renvoyée des connecteurs sur lesquels vous pouvez écrire, vous " +"avez une bonne chance qu'il se soit connecté." + +#: howto/sockets.rst:377 +msgid "" +"Actually, ``select`` can be handy even with blocking sockets. It's one way " +"of determining whether you will block - the socket returns as readable when " +"there's something in the buffers. However, this still doesn't help with the " +"problem of determining whether the other end is done, or just busy with " +"something else." +msgstr "" +"En fait, ``select`` peut être pratique même avec des connecteurs bloquants. " +"C'est une façon de déterminer si vous allez bloquer — le connecteur est " +"renvoyé comme lisible lorsqu'il y a quelque chose dans les mémoires tampons. " +"Cependant, cela n'aide pas encore à déterminer si l'autre extrémité a " +"terminé, ou si elle est simplement occupée par autre chose." + +#: howto/sockets.rst:382 +msgid "" +"**Portability alert**: On Unix, ``select`` works both with the sockets and " +"files. Don't try this on Windows. On Windows, ``select`` works with sockets " +"only. Also note that in C, many of the more advanced socket options are done " +"differently on Windows. In fact, on Windows I usually use threads (which " +"work very, very well) with my sockets." +msgstr "" +"**Alerte de portabilité** : Sous Unix, ``select`` fonctionne aussi bien avec " +"les connecteurs qu'avec les fichiers. N'essayez pas cela sous Windows. Sous " +"Windows, ``select`` ne fonctionne qu'avec les connecteurs. Notez également " +"qu'en C, la plupart des options de connecteurs les plus avancées se font " +"différemment sous Windows. En fait, sous Windows, j'utilise habituellement " +"des fils d'exécution (qui fonctionnent très, très bien) avec mes connecteurs." diff --git a/howto/sorting.po b/howto/sorting.po new file mode 100644 index 0000000000..c38f72ce59 --- /dev/null +++ b/howto/sorting.po @@ -0,0 +1,449 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-05-21 16:37+0200\n" +"PO-Revision-Date: 2022-07-08 17:51+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 3.0.1\n" + +#: howto/sorting.rst:4 +msgid "Sorting HOW TO" +msgstr "Guide pour le tri" + +#: howto/sorting.rst:0 +msgid "Author" +msgstr "Auteur" + +#: howto/sorting.rst:6 +msgid "Andrew Dalke and Raymond Hettinger" +msgstr "Andrew Dalke et Raymond Hettinger" + +#: howto/sorting.rst:0 +msgid "Release" +msgstr "Version" + +#: howto/sorting.rst:7 +msgid "0.1" +msgstr "0.1" + +#: howto/sorting.rst:10 +msgid "" +"Python lists have a built-in :meth:`list.sort` method that modifies the list " +"in-place. There is also a :func:`sorted` built-in function that builds a " +"new sorted list from an iterable." +msgstr "" +"Les listes Python ont une méthode native :meth:`list.sort` qui modifie les " +"listes elles-mêmes. Il y a également une fonction native :func:`sorted` qui " +"construit une nouvelle liste triée depuis un itérable." + +#: howto/sorting.rst:14 +msgid "" +"In this document, we explore the various techniques for sorting data using " +"Python." +msgstr "" +"Dans ce document, nous explorons différentes techniques pour trier les " +"données en Python." + +#: howto/sorting.rst:18 +msgid "Sorting Basics" +msgstr "Les bases du tri" + +#: howto/sorting.rst:20 +msgid "" +"A simple ascending sort is very easy: just call the :func:`sorted` function. " +"It returns a new sorted list:" +msgstr "" +"Un tri ascendant simple est très facile : il suffit d'appeler la fonction :" +"func:`sorted`. Elle renvoie une nouvelle liste triée :" + +#: howto/sorting.rst:28 +msgid "" +"You can also use the :meth:`list.sort` method. It modifies the list in-place " +"(and returns ``None`` to avoid confusion). Usually it's less convenient " +"than :func:`sorted` - but if you don't need the original list, it's slightly " +"more efficient." +msgstr "" +"Vous pouvez aussi utiliser la méthode :meth:`list.sort`. Elle modifie la " +"liste elle-même (et renvoie ``None`` pour éviter les confusions). " +"Habituellement, cette méthode est moins pratique que la fonction :func:" +"`sorted` -- mais si vous n'avez pas besoin de la liste originale, cette " +"technique est légèrement plus efficace." + +#: howto/sorting.rst:40 +msgid "" +"Another difference is that the :meth:`list.sort` method is only defined for " +"lists. In contrast, the :func:`sorted` function accepts any iterable." +msgstr "" +"Une autre différence est que la méthode :meth:`list.sort` est seulement " +"définie pour les listes. Au contraire, la fonction :func:`sorted` accepte " +"n'importe quel itérable." + +#: howto/sorting.rst:49 +msgid "Key Functions" +msgstr "Fonctions clef" + +#: howto/sorting.rst:51 +msgid "" +"Both :meth:`list.sort` and :func:`sorted` have a *key* parameter to specify " +"a function (or other callable) to be called on each list element prior to " +"making comparisons." +msgstr "" +":meth:`list.sort` et :func:`sorted` ont un paramètre *key* afin de spécifier " +"une fonction (ou autre appelable) qui peut être appelée sur chaque élément " +"de la liste avant d'effectuer des comparaisons." + +#: howto/sorting.rst:55 +msgid "For example, here's a case-insensitive string comparison:" +msgstr "Par exemple, voici une comparaison de texte insensible à la casse:" + +#: howto/sorting.rst:62 +msgid "" +"The value of the *key* parameter should be a function (or other callable) " +"that takes a single argument and returns a key to use for sorting purposes. " +"This technique is fast because the key function is called exactly once for " +"each input record." +msgstr "" +"La valeur du paramètre *key* doit être une fonction (ou autre appelable) qui " +"prend un seul argument et renvoie une clef à utiliser à des fins de tri. " +"Cette technique est rapide car la fonction clef est appelée exactement une " +"seule fois pour chaque enregistrement en entrée." + +#: howto/sorting.rst:67 +msgid "" +"A common pattern is to sort complex objects using some of the object's " +"indices as keys. For example:" +msgstr "" +"Un usage fréquent est de faire un tri sur des objets complexes en utilisant " +"les indices des objets en tant que clef. Par exemple :" + +#: howto/sorting.rst:80 +msgid "" +"The same technique works for objects with named attributes. For example:" +msgstr "" +"La même technique marche pour des objets avec des attributs nommés. Par " +"exemple :" + +#: howto/sorting.rst:101 +msgid "Operator Module Functions" +msgstr "Fonctions du module *operator*" + +#: howto/sorting.rst:103 +msgid "" +"The key-function patterns shown above are very common, so Python provides " +"convenience functions to make accessor functions easier and faster. The :mod:" +"`operator` module has :func:`~operator.itemgetter`, :func:`~operator." +"attrgetter`, and a :func:`~operator.methodcaller` function." +msgstr "" +"Les fonctions clef utilisées ci-dessus sont courantes, donc Python fournit " +"des fonctions permettant de rendre plus simple et plus rapide l'usage des " +"fonctions d'accesseur. Le module :mod:`operator` contient les fonctions :" +"func:`~operator.itemgetter`, :func:`~operator.attrgetter`, et :func:" +"`~operator.methodcaller`." + +#: howto/sorting.rst:108 +msgid "Using those functions, the above examples become simpler and faster:" +msgstr "" +"En utilisant ces fonctions, les exemples au dessus deviennent plus simples " +"et plus rapides :" + +#: howto/sorting.rst:120 +msgid "" +"The operator module functions allow multiple levels of sorting. For example, " +"to sort by *grade* then by *age*:" +msgstr "" +"Les fonctions du module *operator* permettent plusieurs niveaux de tri. Par " +"exemple, pour trier par *grade* puis par *age* :" + +#: howto/sorting.rst:132 +msgid "Ascending and Descending" +msgstr "Ascendant et descendant" + +#: howto/sorting.rst:134 +msgid "" +"Both :meth:`list.sort` and :func:`sorted` accept a *reverse* parameter with " +"a boolean value. This is used to flag descending sorts. For example, to get " +"the student data in reverse *age* order:" +msgstr "" +":meth:`list.sort` et :func:`sorted` acceptent un paramètre nommé *reverse* " +"avec une valeur booléenne. C'est utilisé pour déterminer l'ordre descendant " +"des tris. Par exemple, pour avoir les données des étudiants dans l'ordre " +"inverse par *age* :" + +#: howto/sorting.rst:147 +msgid "Sort Stability and Complex Sorts" +msgstr "Stabilité des tris et tris complexes" + +#: howto/sorting.rst:149 +msgid "" +"Sorts are guaranteed to be `stable `_\\. That means that when multiple records have " +"the same key, their original order is preserved." +msgstr "" +"Les tris sont garantis `stables `_\\. Cela signifie que lorsque " +"plusieurs enregistrements on la même clef, leur ordre original est préservé." + +#: howto/sorting.rst:159 +msgid "" +"Notice how the two records for *blue* retain their original order so that " +"``('blue', 1)`` is guaranteed to precede ``('blue', 2)``." +msgstr "" +"Notez comme les deux enregistrements pour *blue* gardent leur ordre original " +"et que par conséquent il est garanti que ``('blue', 1)`` précède ``('blue', " +"2)``." + +#: howto/sorting.rst:162 +msgid "" +"This wonderful property lets you build complex sorts in a series of sorting " +"steps. For example, to sort the student data by descending *grade* and then " +"ascending *age*, do the *age* sort first and then sort again using *grade*:" +msgstr "" +"Cette propriété fantastique vous permet de construire des tris complexes " +"dans des tris en plusieurs étapes. Par exemple, afin de sortir les données " +"des étudiants en ordre descendant par *grade* puis en ordre ascendant par " +"*age*, effectuez un tri par *age* en premier puis un second tri par *grade* :" + +#: howto/sorting.rst:172 +msgid "" +"This can be abstracted out into a wrapper function that can take a list and " +"tuples of field and order to sort them on multiple passes." +msgstr "" +"Ceci peut être encapsulé dans une fonction qui prend une liste et des n-" +"uplets (attribut, ordre) pour les trier en plusieurs passes." + +#: howto/sorting.rst:185 +msgid "" +"The `Timsort `_ algorithm used in " +"Python does multiple sorts efficiently because it can take advantage of any " +"ordering already present in a dataset." +msgstr "" +"L'algorithme `Timsort `_ utilisé dans " +"Python effectue de multiples tris efficacement parce qu'il peut tirer " +"avantage de l'ordre existant dans un jeu de données." + +#: howto/sorting.rst:190 +msgid "The Old Way Using Decorate-Sort-Undecorate" +msgstr "La méthode traditionnelle utilisant Decorate-Sort-Undecorate" + +#: howto/sorting.rst:192 +msgid "This idiom is called Decorate-Sort-Undecorate after its three steps:" +msgstr "" +"Cette technique est appelée Decorate-Sort-Undecorate et se base sur trois " +"étapes :" + +#: howto/sorting.rst:194 +msgid "" +"First, the initial list is decorated with new values that control the sort " +"order." +msgstr "" +"Premièrement, la liste de départ est décorée avec les nouvelles valeurs qui " +"contrôlent l'ordre du tri." + +#: howto/sorting.rst:196 +msgid "Second, the decorated list is sorted." +msgstr "En second lieu, la liste décorée est triée." + +#: howto/sorting.rst:198 +msgid "" +"Finally, the decorations are removed, creating a list that contains only the " +"initial values in the new order." +msgstr "" +"Enfin, la décoration est supprimée, créant ainsi une liste qui contient " +"seulement la valeur initiale dans le nouvel ordre." + +#: howto/sorting.rst:201 +msgid "" +"For example, to sort the student data by *grade* using the DSU approach:" +msgstr "" +"Par exemple, pour trier les données étudiant par *grade* en utilisant " +"l'approche DSU :" + +#: howto/sorting.rst:208 +msgid "" +"This idiom works because tuples are compared lexicographically; the first " +"items are compared; if they are the same then the second items are compared, " +"and so on." +msgstr "" +"Cette technique marche parce que les *n*-uplets sont comparés par ordre " +"lexicographique; les premiers objets sont comparés; si il y a des objets " +"identiques, alors l'objet suivant est comparé, et ainsi de suite." + +#: howto/sorting.rst:212 +msgid "" +"It is not strictly necessary in all cases to include the index *i* in the " +"decorated list, but including it gives two benefits:" +msgstr "" +"Il n'est pas strictement nécessaire dans tous les cas d’inclure l'indice *i* " +"dans la liste décorée, mais l'inclure donne deux avantages :" + +#: howto/sorting.rst:215 +msgid "" +"The sort is stable -- if two items have the same key, their order will be " +"preserved in the sorted list." +msgstr "" +"Le tri est stable -- si deux objets on la même clef, leur ordre sera " +"préservé dans la liste triée." + +#: howto/sorting.rst:218 +msgid "" +"The original items do not have to be comparable because the ordering of the " +"decorated tuples will be determined by at most the first two items. So for " +"example the original list could contain complex numbers which cannot be " +"sorted directly." +msgstr "" +"Les objets d'origine ne sont pas nécessairement comparables car l'ordre des " +"*n*-uplets décorés sera déterminé par au plus les deux premiers objets. Donc " +"par exemple la liste originale pourrait contenir des nombres complexes qui " +"pourraient ne pas être triés directement." + +#: howto/sorting.rst:223 +msgid "" +"Another name for this idiom is `Schwartzian transform `_\\, after Randal L. Schwartz, who " +"popularized it among Perl programmers." +msgstr "" +"Un autre nom pour cette technique est `Schwartzian transform `_\\, après que Randal L. Schwartz " +"l'ait popularisé chez les développeurs Perl." + +#: howto/sorting.rst:227 +msgid "" +"Now that Python sorting provides key-functions, this technique is not often " +"needed." +msgstr "" +"Maintenant que le tri Python fournit des fonctions-clef, cette technique " +"n'est plus souvent utilisée." + +#: howto/sorting.rst:231 +msgid "The Old Way Using the *cmp* Parameter" +msgstr "La méthode traditionnelle d'utiliser le paramètre *cmp*" + +#: howto/sorting.rst:233 +msgid "" +"Many constructs given in this HOWTO assume Python 2.4 or later. Before that, " +"there was no :func:`sorted` builtin and :meth:`list.sort` took no keyword " +"arguments. Instead, all of the Py2.x versions supported a *cmp* parameter to " +"handle user specified comparison functions." +msgstr "" +"Plusieurs construction données dans ce guide se basent sur Python 2.4 ou " +"plus. Avant cela, il n'y avait pas la fonction :func:`sorted` et la méthode :" +"meth:`list.sort` ne prenait pas d'arguments nommés. À la place, toutes les " +"versions Python 2.x utilisaient un paramètre *cmp* pour prendre en charge " +"les fonctions de comparaisons définies par les utilisateurs." + +#: howto/sorting.rst:238 +msgid "" +"In Py3.0, the *cmp* parameter was removed entirely (as part of a larger " +"effort to simplify and unify the language, eliminating the conflict between " +"rich comparisons and the :meth:`__cmp__` magic method)." +msgstr "" +"En Py3.0, le paramètre *cmp* à été supprimé complètement (dans le cadre d'un " +"effort plus général pour simplifier et unifier le langage, en éliminant le " +"conflit entre les comparaisons riches et la méthode magique :meth:`__cmp__`)." + +#: howto/sorting.rst:242 +msgid "" +"In Py2.x, sort allowed an optional function which can be called for doing " +"the comparisons. That function should take two arguments to be compared and " +"then return a negative value for less-than, return zero if they are equal, " +"or return a positive value for greater-than. For example, we can do:" +msgstr "" +"En Python 2.x, le tri permettait en paramètre une fonction optionnelle qui " +"peut être appelée pour faire des comparaisons. Cette fonction devrait " +"prendre deux arguments à comparer pour renvoyer une valeur négative pour " +"inférieur-à, renvoyer zéro si ils sont égaux, ou renvoyer une valeur " +"positive pour supérieur-à. Par exemple, nous pouvons faire :" + +#: howto/sorting.rst:254 +msgid "Or you can reverse the order of comparison with:" +msgstr "Ou nous pouvons inverser l'ordre de comparaison avec :" + +#: howto/sorting.rst:263 +msgid "" +"When porting code from Python 2.x to 3.x, the situation can arise when you " +"have the user supplying a comparison function and you need to convert that " +"to a key function. The following wrapper makes that easy to do:" +msgstr "" +"En portant du code depuis Python 2.X vers 3.x, des problèmes peuvent " +"survenir quand des utilisateurs fournissent une fonction de comparaison et " +"qu'il faut convertir cette fonction en une fonction-clef. La fonction " +"d'encapsulation suivante rend cela plus facile à faire ::" + +#: howto/sorting.rst:294 +msgid "To convert to a key function, just wrap the old comparison function:" +msgstr "" +"Pour convertir une fonction clef, ils suffit d'encapsuler l'ancienne " +"fonction de comparaison :" + +#: howto/sorting.rst:305 +msgid "" +"In Python 3.2, the :func:`functools.cmp_to_key` function was added to the :" +"mod:`functools` module in the standard library." +msgstr "" +"En Python 3.2, la fonction :func:`functools.cmp_to_key` à été ajoutée au " +"module :mod:`functools` dans la librairie standard." + +#: howto/sorting.rst:309 +msgid "Odd and Ends" +msgstr "Curiosités et conclusion" + +#: howto/sorting.rst:311 +msgid "" +"For locale aware sorting, use :func:`locale.strxfrm` for a key function or :" +"func:`locale.strcoll` for a comparison function." +msgstr "" +"Pour du tri de texte localisé, utilisez :func:`locale.strxfrm` en tant que " +"fonction clef ou :func:`locale.strcoll` comme fonction de comparaison." + +#: howto/sorting.rst:314 +msgid "" +"The *reverse* parameter still maintains sort stability (so that records with " +"equal keys retain the original order). Interestingly, that effect can be " +"simulated without the parameter by using the builtin :func:`reversed` " +"function twice:" +msgstr "" +"Le paramètre *reverse* maintient toujours un tri stable (de telle sorte que " +"les enregistrements avec des clef égales gardent le même ordre). Notez que " +"cet effet peut être simulé sans le paramètre en utilisant la fonction " +"native :func:`reversed` deux fois :" + +#: howto/sorting.rst:328 +msgid "" +"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 "" +"Pour effectuer les comparaisons entre deux objets, les routines de tri " +"utilisent l'opérateur ``<``. Il est donc facile d'ajouter un ordre de tri " +"standard à une classe en définissant sa méthode :meth:`__lt__` ::" + +#: howto/sorting.rst:338 +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:341 +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 " +"of student names:" +msgstr "" +"Les fonctions clef n'ont pas besoin de dépendre directement des objets " +"triés. Une fonction clef peut aussi accéder à des ressources externes. En " +"l'occurrence, si les grades des étudiants sont stockés dans un dictionnaire, " +"ils peuvent être utilisés pour trier une liste différentes de noms " +"d'étudiants :" diff --git a/howto/unicode.po b/howto/unicode.po new file mode 100644 index 0000000000..b53b59b17a --- /dev/null +++ b/howto/unicode.po @@ -0,0 +1,1306 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-18 15:46+0200\n" +"PO-Revision-Date: 2021-12-11 17:16+0100\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 3.0\n" + +#: howto/unicode.rst:5 +msgid "Unicode HOWTO" +msgstr "Guide Unicode" + +#: howto/unicode.rst:0 +msgid "Release" +msgstr "Version" + +#: howto/unicode.rst:7 +msgid "1.12" +msgstr "1.12" + +#: howto/unicode.rst:9 +msgid "" +"This HOWTO discusses Python's support for the Unicode specification for " +"representing textual data, and explains various problems that people " +"commonly encounter when trying to work with Unicode." +msgstr "" +"Ce guide décrit la gestion de la spécification Unicode par Python pour les " +"données textuelles et explique les différents problèmes généralement " +"rencontrés par les utilisateurs qui travaillent avec Unicode." + +#: howto/unicode.rst:15 +msgid "Introduction to Unicode" +msgstr "Introduction à Unicode" + +#: howto/unicode.rst:18 +msgid "Definitions" +msgstr "Définitions" + +#: howto/unicode.rst:20 +msgid "" +"Today's programs need to be able to handle a wide variety of characters. " +"Applications are often internationalized to display messages and output in a " +"variety of user-selectable languages; the same program might need to output " +"an error message in English, French, Japanese, Hebrew, or Russian. Web " +"content can be written in any of these languages and can also include a " +"variety of emoji symbols. Python's string type uses the Unicode Standard for " +"representing characters, which lets Python programs work with all these " +"different possible characters." +msgstr "" +"Les programmes d'aujourd'hui doivent être capables de traiter une grande " +"variété de caractères. Les applications sont souvent internationalisées pour " +"afficher les messages et les résultats dans une variété de langues " +"sélectionnables par l'utilisateur ; le même programme peut avoir besoin " +"d'afficher un message d'erreur en anglais, français, japonais, hébreu ou " +"russe. Le contenu Web peut être écrit dans n'importe laquelle de ces langues " +"et peut également inclure une variété de symboles émoji. Le type de chaîne " +"de caractères de Python utilise le standard Unicode pour représenter les " +"caractères, ce qui permet aux programmes Python de travailler avec tous ces " +"différents caractères possibles." + +#: howto/unicode.rst:30 +msgid "" +"Unicode (https://www.unicode.org/) is a specification that aims to list " +"every character used by human languages and give each character its own " +"unique code. The Unicode specifications are continually revised and updated " +"to add new languages and symbols." +msgstr "" +"Unicode (https://www.unicode.org/) est une spécification qui vise à lister " +"tous les caractères utilisés par les langues humaines et à donner à chaque " +"caractère son propre code unique. Les spécifications Unicode sont " +"continuellement révisées et mises à jour pour ajouter de nouvelles langues " +"et de nouveaux symboles." + +#: howto/unicode.rst:35 +msgid "" +"A **character** is the smallest possible component of a text. 'A', 'B', " +"'C', etc., are all different characters. So are 'È' and 'Í'. Characters " +"vary depending on the language or context you're talking about. For " +"example, there's a character for \"Roman Numeral One\", 'Ⅰ', that's separate " +"from the uppercase letter 'I'. They'll usually look the same, but these are " +"two different characters that have different meanings." +msgstr "" +"Un **caractère** est le plus petit composant possible d'un texte. « A », " +"« B », « C », etc. sont tous des caractères différents. Il en va de même " +"pour « È » et « Í ». Les caractères varient selon la langue ou le contexte " +"dont vous parlez. Par exemple, il y a un caractère pour « Chiffre Romain " +"Un » (*Roman Numeral One*), « Ⅰ », qui est séparé de la lettre majuscule " +"« I ». Ils se ressemblent généralement, mais ce sont deux caractères " +"différents qui ont des significations différentes." + +#: howto/unicode.rst:42 +msgid "" +"The Unicode standard describes how characters are represented by **code " +"points**. A code point value is an integer in the range 0 to 0x10FFFF " +"(about 1.1 million values, the `actual number assigned `_ is less than that). In the standard and in " +"this document, a code point is written using the notation ``U+265E`` to mean " +"the character with value ``0x265e`` (9,822 in decimal)." +msgstr "" +"Le standard Unicode décrit comment les caractères sont représentés par les " +"**points de code**. Une valeur de point de code est un nombre entier compris " +"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 " +"décimal)." + +#: howto/unicode.rst:50 +msgid "" +"The Unicode standard contains a lot of tables listing characters and their " +"corresponding code points:" +msgstr "" +"La standard Unicode contient de nombreux tableaux contenant la liste des " +"caractères et des points de code correspondants :" + +#: howto/unicode.rst:71 +msgid "" +"Strictly, these definitions imply that it's meaningless to say 'this is " +"character ``U+265E``'. ``U+265E`` is a code point, which represents some " +"particular character; in this case, it represents the character 'BLACK CHESS " +"KNIGHT', '♞'. In informal contexts, this distinction between code points " +"and characters will sometimes be forgotten." +msgstr "" +"À proprement parler, ces définitions laissent entendre qu'il est inutile de " +"dire « c'est le caractère ``U+265E`` ». ``U+265E`` est un point de code, qui " +"représente un caractère particulier ; dans ce cas, il représente le " +"caractère « BLACK CHESS KNIGHT », « ♞ ». Dans des contextes informels, cette " +"distinction entre les points de code et les caractères sera parfois oubliée." + +#: howto/unicode.rst:78 +msgid "" +"A character is represented on a screen or on paper by a set of graphical " +"elements that's called a **glyph**. The glyph for an uppercase A, for " +"example, is two diagonal strokes and a horizontal stroke, though the exact " +"details will depend on the font being used. Most Python code doesn't need " +"to worry about glyphs; figuring out the correct glyph to display is " +"generally the job of a GUI toolkit or a terminal's font renderer." +msgstr "" +"Un caractère est représenté sur un écran ou sur papier par un ensemble " +"d’éléments graphiques appelé **glyphe**. Le glyphe d’un A majuscule, par " +"exemple, est deux traits diagonaux et un trait horizontal, bien que les " +"détails exacts dépendent de la police utilisée. La plupart du code Python " +"n’a pas besoin de s’inquiéter des glyphes ; trouver le bon glyphe à afficher " +"est généralement le travail d’une boîte à outils GUI ou du moteur de rendu " +"des polices d’un terminal." + +#: howto/unicode.rst:87 +msgid "Encodings" +msgstr "Encodages" + +#: howto/unicode.rst:89 +msgid "" +"To summarize the previous section: a Unicode string is a sequence of code " +"points, which are numbers from 0 through ``0x10FFFF`` (1,114,111 decimal). " +"This sequence of code points needs to be represented in memory as a set of " +"**code units**, and **code units** are then mapped to 8-bit bytes. The " +"rules for translating a Unicode string into a sequence of bytes are called a " +"**character encoding**, or just an **encoding**." +msgstr "" +"Pour résumer la section précédente : une chaîne Unicode est une séquence de " +"points de code, qui sont des nombres de ``0`` à ``0x10FFFF`` (1 114 111 en " +"décimal). Cette séquence de points de code doit être stockée en mémoire sous " +"la forme d'un ensemble de **unités de code**, et les **unités de code** sont " +"ensuite transposées en octets de 8 bits. Les règles de traduction d'une " +"chaîne Unicode en une séquence d'octets sont appelées un **encodage de " +"caractères** ou simplement un **encodage**." + +#: howto/unicode.rst:97 +msgid "" +"The first encoding you might think of is using 32-bit integers as the code " +"unit, and then using the CPU's representation of 32-bit integers. In this " +"representation, the string \"Python\" might look like this:" +msgstr "" +"Le premier encodage auquel vous pouvez penser est l'utilisation d'entiers 32 " +"bits comme unité de code, puis l'utilisation de la représentation des " +"entiers 32 bits par le CPU. Dans cette représentation, la chaîne « Python » " +"ressemblerait à ceci :" + +#: howto/unicode.rst:107 +msgid "" +"This representation is straightforward but using it presents a number of " +"problems." +msgstr "" +"Cette représentation est simple mais son utilisation pose un certain nombre " +"de problèmes." + +#: howto/unicode.rst:110 +msgid "It's not portable; different processors order the bytes differently." +msgstr "" +"Elle n’est pas portable ; des processeurs différents ordonnent les octets " +"différemment." + +#: howto/unicode.rst:112 +msgid "" +"It's very wasteful of space. In most texts, the majority of the code points " +"are less than 127, or less than 255, so a lot of space is occupied by " +"``0x00`` bytes. The above string takes 24 bytes compared to the 6 bytes " +"needed for an ASCII representation. Increased RAM usage doesn't matter too " +"much (desktop computers have gigabytes of RAM, and strings aren't usually " +"that large), but expanding our usage of disk and network bandwidth by a " +"factor of 4 is intolerable." +msgstr "" +"Elle gâche beaucoup d'espace. Dans la plupart des textes, la majorité des " +"points de code sont inférieurs à 127, ou à 255, donc beaucoup d'espace est " +"occupé par des octets ``0x00``. La chaîne ci-dessus occupe 24 octets, à " +"comparer aux 6 octets nécessaires pour une représentation en ASCII. " +"L'utilisation supplémentaire de RAM n'a pas trop d'importance (les " +"ordinateurs de bureau ont des gigaoctets de RAM et les chaînes ne sont " +"généralement pas si grandes que ça), mais l'accroissement de notre " +"utilisation du disque et de la bande passante réseau par un facteur de 4 est " +"intolérable." + +#: howto/unicode.rst:120 +msgid "" +"It's not compatible with existing C functions such as ``strlen()``, so a new " +"family of wide string functions would need to be used." +msgstr "" +"Elle n’est pas compatible avec les fonctions C existantes telles que " +"``strlen()``, il faudrait donc utiliser une nouvelle famille de fonctions, " +"celle des chaînes larges (*wide strings*)." + +#: howto/unicode.rst:123 +msgid "" +"Therefore this encoding isn't used very much, and people instead choose " +"other encodings that are more efficient and convenient, such as UTF-8." +msgstr "" +"Par conséquent, cet encodage n'est pas très utilisé et d'autres encodages, " +"plus efficaces et pratiques comme UTF-8, sont plutôt choisis." + +#: howto/unicode.rst:126 +msgid "" +"UTF-8 is one of the most commonly used encodings, and Python often defaults " +"to using it. UTF stands for \"Unicode Transformation Format\", and the '8' " +"means that 8-bit values are used in the encoding. (There are also UTF-16 " +"and UTF-32 encodings, but they are less frequently used than UTF-8.) UTF-8 " +"uses the following rules:" +msgstr "" +"UTF-8 est l’un des encodages les plus couramment utilisés et Python " +"l’utilise souvent par défaut. UTF signifie « Unicode Transformation " +"Format » (format de transformation Unicode) et « 8 » signifie que des " +"nombres à 8 bits sont utilisés dans l'encodage (il existe également des " +"codages UTF-16 et UTF-32, mais ils sont moins souvent utilisés que UTF-8). " +"UTF-8 utilise les règles suivantes :" + +#: howto/unicode.rst:132 +msgid "" +"If the code point is < 128, it's represented by the corresponding byte value." +msgstr "" +"Si le point de code est < 128, il est représenté par la valeur de l'octet " +"correspondant." + +#: howto/unicode.rst:133 +msgid "" +"If the code point is >= 128, it's turned into a sequence of two, three, or " +"four bytes, where each byte of the sequence is between 128 and 255." +msgstr "" +"Si le point de code est ≥ 128, il est transformé en une séquence de deux, " +"trois ou quatre octets, où chaque octet de la séquence est compris entre 128 " +"et 255." + +#: howto/unicode.rst:136 +msgid "UTF-8 has several convenient properties:" +msgstr "UTF-8 a plusieurs propriétés intéressantes :" + +#: howto/unicode.rst:138 +msgid "It can handle any Unicode code point." +msgstr "Il peut gérer n'importe quel point de code Unicode." + +#: howto/unicode.rst:139 +msgid "" +"A Unicode string is turned into a sequence of bytes that contains embedded " +"zero bytes only where they represent the null character (U+0000). This means " +"that UTF-8 strings can be processed by C functions such as ``strcpy()`` and " +"sent through protocols that can't handle zero bytes for anything other than " +"end-of-string markers." +msgstr "" +"Une chaîne Unicode est transformée en une séquence d’octets qui contient des " +"octets zéro uniquement lorsqu’ils représentent le caractère nul (U+0000). " +"Cela signifie que les chaînes UTF-8 peuvent être traitées par des fonctions " +"C telles que ``strcpy()`` et envoyées par des protocoles pour qui les octets " +"zéro signifient forcément la fin de chaîne." + +#: howto/unicode.rst:144 +msgid "A string of ASCII text is also valid UTF-8 text." +msgstr "Une chaîne de texte ASCII est également un texte UTF-8 valide." + +#: howto/unicode.rst:145 +msgid "" +"UTF-8 is fairly compact; the majority of commonly used characters can be " +"represented with one or two bytes." +msgstr "" +"UTF-8 est assez compact. La majorité des caractères couramment utilisés " +"peuvent être représentés avec un ou deux octets." + +#: howto/unicode.rst:147 +msgid "" +"If bytes are corrupted or lost, it's possible to determine the start of the " +"next UTF-8-encoded code point and resynchronize. It's also unlikely that " +"random 8-bit data will look like valid UTF-8." +msgstr "" +"Si des octets sont corrompus ou perdus, il est possible de déterminer le " +"début du prochain point de code encodé en UTF-8 et de se resynchroniser. Il " +"est également improbable que des données 8-bits aléatoires ressemblent à du " +"UTF-8 valide." + +#: howto/unicode.rst:150 +msgid "" +"UTF-8 is a byte oriented encoding. The encoding specifies that each " +"character is represented by a specific sequence of one or more bytes. This " +"avoids the byte-ordering issues that can occur with integer and word " +"oriented encodings, like UTF-16 and UTF-32, where the sequence of bytes " +"varies depending on the hardware on which the string was encoded." +msgstr "" +"UTF-8 est un encodage orienté octet. L'encodage spécifie que chaque " +"caractère est représenté par une séquence spécifique d'un ou plusieurs " +"octets. Ceci permet d'éviter les problèmes d'ordre des octets qui peuvent " +"survenir avec les encodages orientés entiers (*integer*) ou orientés mots " +"processeurs (*words*), comme UTF-16 et UTF-32, où la séquence des octets " +"varie en fonction du matériel sur lequel la chaîne a été encodée." + +#: howto/unicode.rst:514 howto/unicode.rst:735 +msgid "References" +msgstr "Références" + +#: howto/unicode.rst:160 +msgid "" +"The `Unicode Consortium site `_ has character " +"charts, a glossary, and PDF versions of the Unicode specification. Be " +"prepared for some difficult reading. `A chronology `_ of the origin and development of Unicode is also available on " +"the site." +msgstr "" +"Le site du `Consortium Unicode `_, en anglais, a " +"des diagrammes de caractères, un glossaire et des versions PDF de la " +"spécification Unicode. Préparez-vous à une lecture difficile. Une " +"`chronologie `_ de l’origine et du " +"développement de l’Unicode est également disponible sur le site." + +#: howto/unicode.rst:165 +msgid "" +"On the Computerphile Youtube channel, Tom Scott briefly `discusses the " +"history of Unicode and UTF-8 `_ " +"(9 minutes 36 seconds)." +msgstr "" +"Sur la chaîne Youtube *Computerphile*, Tom Scott parle brièvement de " +"`l’histoire d’Unicode et d’UTF-8 `_ (9 minutes et 36 secondes)." + +#: howto/unicode.rst:169 +#, fuzzy +msgid "" +"To help understand the standard, Jukka Korpela has written `an introductory " +"guide `_ to reading the Unicode " +"character tables." +msgstr "" +"Pour aider à comprendre le standard, Jukka Korpela a écrit `un guide " +"d’introduction `_ à la lecture des " +"tables de caractères Unicode (ressource en anglais)." + +#: howto/unicode.rst:173 +msgid "" +"Another `good introductory article `_ was " +"written by Joel Spolsky. If this introduction didn't make things clear to " +"you, you should try reading this alternate article before continuing." +msgstr "" +"Un autre `bon article d'introduction `_ a été " +"écrit par Joel Spolsky. Si cette présente introduction ne vous a pas " +"clarifié les choses, vous devriez essayer de lire cet article-là avant de " +"continuer." + +#: howto/unicode.rst:178 +msgid "" +"Wikipedia entries are often helpful; see the entries for \"`character " +"encoding `_\" and `UTF-8 " +"`_, for example." +msgstr "" +"Les pages Wikipédia sont souvent utiles ; voir les pages pour « `Codage des " +"caractères `_ » et " +"`UTF-8 `_, par exemple." + +#: howto/unicode.rst:184 +msgid "Python's Unicode Support" +msgstr "Prise en charge Unicode de Python" + +#: howto/unicode.rst:186 +msgid "" +"Now that you've learned the rudiments of Unicode, we can look at Python's " +"Unicode features." +msgstr "" +"Maintenant que vous avez appris les rudiments de l'Unicode, nous pouvons " +"regarder les fonctionnalités Unicode de Python." + +#: howto/unicode.rst:190 +msgid "The String Type" +msgstr "Le type *String*" + +#: howto/unicode.rst:192 +msgid "" +"Since Python 3.0, the language's :class:`str` type contains Unicode " +"characters, meaning any string created using ``\"unicode rocks!\"``, " +"``'unicode rocks!'``, or the triple-quoted string syntax is stored as " +"Unicode." +msgstr "" +"Depuis Python 3.0, le type :class:`str` du langage contient des caractères " +"Unicode, c'est-à-dire n'importe quelle chaîne créée à l'aide de ``\"unicode " +"déchire !\"``, ``'unicode déchire !'`` ou la syntaxe à triples guillemets " +"est enregistrée comme Unicode." + +#: howto/unicode.rst:196 +msgid "" +"The default encoding for Python source code is UTF-8, so you can simply " +"include a Unicode character in a string literal::" +msgstr "" +"L'encodage par défaut pour le code source Python est UTF-8, il est donc " +"facile d'inclure des caractères Unicode dans une chaîne littérale ::" + +#: howto/unicode.rst:206 +msgid "" +"Side note: Python 3 also supports using Unicode characters in identifiers::" +msgstr "" +"Note : Python 3 sait gérer les caractères Unicode dans les identifiants ::" + +#: howto/unicode.rst:212 +msgid "" +"If you can't enter a particular character in your editor or want to keep the " +"source code ASCII-only for some reason, you can also use escape sequences in " +"string literals. (Depending on your system, you may see the actual capital-" +"delta glyph instead of a \\u escape.) ::" +msgstr "" +"Si vous ne pouvez pas entrer un caractère particulier dans votre éditeur ou " +"si vous voulez garder le code source uniquement en ASCII pour une raison " +"quelconque, vous pouvez également utiliser des séquences d'échappement dans " +"les littéraux de chaîne (en fonction de votre système, il se peut que vous " +"voyiez le glyphe réel du *delta majuscule* au lieu d'une séquence " +"d'échappement ``\\u...``) ::" + +#: howto/unicode.rst:224 +msgid "" +"In addition, one can create a string using the :func:`~bytes.decode` method " +"of :class:`bytes`. This method takes an *encoding* argument, such as " +"``UTF-8``, and optionally an *errors* argument." +msgstr "" +"De plus, une chaîne de caractères peut être créée en utilisant la méthode :" +"func:`~bytes.decode` de la classe :class:`bytes`. Cette méthode prend un " +"argument *encoding*, ``UTF-8`` par exemple, et optionnellement un argument " +"*errors*." + +#: howto/unicode.rst:228 +msgid "" +"The *errors* argument specifies the response when the input string can't be " +"converted according to the encoding's rules. Legal values for this argument " +"are ``'strict'`` (raise a :exc:`UnicodeDecodeError` exception), " +"``'replace'`` (use ``U+FFFD``, ``REPLACEMENT CHARACTER``), ``'ignore'`` " +"(just leave the character out of the Unicode result), or " +"``'backslashreplace'`` (inserts a ``\\xNN`` escape sequence). The following " +"examples show the differences::" +msgstr "" +"L'argument *errors* détermine la réponse lorsque la chaîne en entrée ne peut " +"pas être convertie selon les règles de l'encodage. Les valeurs autorisées " +"pour cet argument sont ``'strict'`` (« strict » : lève une exception :exc:" +"`UnicodeDecodeError`), ``'replace'`` (« remplacer » : utilise ``U+FFFD``, " +"``REPLACEMENT CARACTER``), ``'ignore'`` (« ignorer » : n'inclut pas le " +"caractère dans le résultat Unicode) ou ``'backslashreplace'`` (« remplacer " +"avec antislash » : insère une séquence d’échappement ``\\xNN``). Les " +"exemples suivants illustrent les différences ::" + +#: howto/unicode.rst:248 +msgid "" +"Encodings are specified as strings containing the encoding's name. Python " +"comes with roughly 100 different encodings; see the Python Library Reference " +"at :ref:`standard-encodings` for a list. Some encodings have multiple " +"names; for example, ``'latin-1'``, ``'iso_8859_1'`` and ``'8859``' are all " +"synonyms for the same encoding." +msgstr "" +"Les encodages sont spécifiés sous forme de chaînes de caractères contenant " +"le nom de l'encodage. Python est livré avec une centaine d'encodages " +"différents ; voir la référence de la bibliothèque Python sur les :ref:" +"`encodages standards ` pour une liste. Certains " +"encodages ont plusieurs noms ; par exemple, ``'latin-1'``, ``'iso_8859_1'`` " +"et ``'8859'`` sont tous synonymes du même encodage." + +#: howto/unicode.rst:254 +msgid "" +"One-character Unicode strings can also be created with the :func:`chr` built-" +"in function, which takes integers and returns a Unicode string of length 1 " +"that contains the corresponding code point. The reverse operation is the " +"built-in :func:`ord` function that takes a one-character Unicode string and " +"returns the code point value::" +msgstr "" +"Des chaînes Unicode à un caractère peuvent également être créées avec la " +"fonction native :func:`chr`, qui prend des entiers et renvoie une chaîne " +"Unicode de longueur 1 qui contient le point de code correspondant. " +"L'opération inverse est la fonction native :func:`ord` qui prend une chaîne " +"Unicode d'un caractère et renvoie la valeur du point de code ::" + +#: howto/unicode.rst:266 +msgid "Converting to Bytes" +msgstr "Conversion en octets" + +#: howto/unicode.rst:268 +msgid "" +"The opposite method of :meth:`bytes.decode` is :meth:`str.encode`, which " +"returns a :class:`bytes` representation of the Unicode string, encoded in " +"the requested *encoding*." +msgstr "" +"La méthode inverse de :meth:`bytes.decode` est :meth:`str.encode`, qui " +"renvoie une représentation :class:`bytes` de la chaîne Unicode, codée dans " +"l’encodage *encoding* demandé." + +#: howto/unicode.rst:272 +msgid "" +"The *errors* parameter is the same as the parameter of the :meth:`~bytes." +"decode` method but supports a few more possible handlers. As well as " +"``'strict'``, ``'ignore'``, and ``'replace'`` (which in this case inserts a " +"question mark instead of the unencodable character), there is also " +"``'xmlcharrefreplace'`` (inserts an XML character reference), " +"``backslashreplace`` (inserts a ``\\uNNNN`` escape sequence) and " +"``namereplace`` (inserts a ``\\N{...}`` escape sequence)." +msgstr "" +"Le paramètre *errors* est le même que le paramètre de la méthode :meth:" +"`~bytes.decode` mais possède quelques gestionnaires supplémentaires. En plus " +"de ``'strict'``, ``'ignore'`` et ``'remplace'`` (qui dans ce cas insère un " +"point d'interrogation au lieu du caractère non encodable), 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{...}``)." + +#: howto/unicode.rst:280 +msgid "The following example shows the different results::" +msgstr "L'exemple suivant montre les différents résultats ::" + +#: howto/unicode.rst:301 +msgid "" +"The low-level routines for registering and accessing the available encodings " +"are found in the :mod:`codecs` module. Implementing new encodings also " +"requires understanding the :mod:`codecs` module. However, the encoding and " +"decoding functions returned by this module are usually more low-level than " +"is comfortable, and writing new encodings is a specialized task, so the " +"module won't be covered in this HOWTO." +msgstr "" +"Les routines de bas niveau pour enregistrer et accéder aux encodages " +"disponibles se trouvent dans le module :mod:`codecs`. L'implémentation de " +"nouveaux encodages nécessite également de comprendre le module :mod:" +"`codecs`. Cependant, les fonctions d'encodage et de décodage renvoyées par " +"ce module sont généralement de bas-niveau pour être facilement utilisées et " +"l'écriture de nouveaux encodages est une tâche très spécialisée, donc le " +"module ne sera pas couvert dans ce guide." + +#: howto/unicode.rst:310 +msgid "Unicode Literals in Python Source Code" +msgstr "Littéraux Unicode dans le code source Python" + +#: howto/unicode.rst:312 +msgid "" +"In Python source code, specific Unicode code points can be written using the " +"``\\u`` escape sequence, which is followed by four hex digits giving the " +"code point. The ``\\U`` escape sequence is similar, but expects eight hex " +"digits, not four::" +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 ::" + +#: howto/unicode.rst:324 +msgid "" +"Using escape sequences for code points greater than 127 is fine in small " +"doses, but becomes an annoyance if you're using many accented characters, as " +"you would in a program with messages in French or some other accent-using " +"language. You can also assemble strings using the :func:`chr` built-in " +"function, but this is even more tedious." +msgstr "" +"L'utilisation de séquences d'échappement pour des points de code supérieurs " +"à 127 est acceptable à faible dose, mais devient gênante si vous utilisez " +"beaucoup de caractères accentués, comme c'est le cas dans un programme avec " +"des messages en français ou dans une autre langue utilisant des lettres " +"accentuées. Vous pouvez également assembler des chaînes de caractères à " +"l'aide de la fonction native :func:`chr`, mais c'est encore plus fastidieux." + +#: howto/unicode.rst:330 +msgid "" +"Ideally, you'd want to be able to write literals in your language's natural " +"encoding. You could then edit Python source code with your favorite editor " +"which would display the accented characters naturally, and have the right " +"characters used at runtime." +msgstr "" +"Idéalement, vous devriez être capable d'écrire des littéraux dans l'encodage " +"naturel de votre langue. Vous pourriez alors éditer le code source de Python " +"avec votre éditeur favori qui affiche les caractères accentués " +"naturellement, et a les bons caractères utilisés au moment de l'exécution." + +#: howto/unicode.rst:335 +msgid "" +"Python supports writing source code in UTF-8 by default, but you can use " +"almost any encoding if you declare the encoding being used. This is done by " +"including a special comment as either the first or second line of the source " +"file::" +msgstr "" +"Python considère que le code source est écrit en UTF-8 par défaut, mais vous " +"pouvez utiliser presque n'importe quel encodage si vous déclarez l'encodage " +"utilisé. Cela se fait en incluant un commentaire spécial sur la première ou " +"la deuxième ligne du fichier source ::" + +#: howto/unicode.rst:345 +msgid "" +"The syntax is inspired by Emacs's notation for specifying variables local to " +"a file. Emacs supports many different variables, but Python only supports " +"'coding'. The ``-*-`` symbols indicate to Emacs that the comment is " +"special; they have no significance to Python but are a convention. Python " +"looks for ``coding: name`` or ``coding=name`` in the comment." +msgstr "" +"La syntaxe s'inspire de la notation d'*Emacs* pour spécifier les variables " +"locales à un fichier. *Emacs* supporte de nombreuses variables différentes, " +"mais Python ne gère que *coding*. Les symboles ``-*-`` indiquent à *Emacs* " +"que le commentaire est spécial ; ils n'ont aucune signification pour Python " +"mais sont une convention. Python cherche ``coding: name`` ou ``coding=name`` " +"dans le commentaire." + +#: howto/unicode.rst:351 +msgid "" +"If you don't include such a comment, the default encoding used will be UTF-8 " +"as already mentioned. See also :pep:`263` for more information." +msgstr "" +"Si vous n'incluez pas un tel commentaire, l'encodage par défaut est UTF-8 " +"comme déjà mentionné. Voir aussi la :pep:`263` pour plus d'informations." + +#: howto/unicode.rst:356 +msgid "Unicode Properties" +msgstr "Propriétés Unicode" + +#: howto/unicode.rst:358 +msgid "" +"The Unicode specification includes a database of information about code " +"points. For each defined code point, the information includes the " +"character's name, its category, the numeric value if applicable (for " +"characters representing numeric concepts such as the Roman numerals, " +"fractions such as one-third and four-fifths, etc.). There are also display-" +"related properties, such as how to use the code point in bidirectional text." +msgstr "" +"La spécification Unicode inclut une base de données d'informations sur les " +"points de code. Pour chaque point de code défini, l'information comprend le " +"nom du caractère, sa catégorie, la valeur numérique s'il y a lieu (pour les " +"caractères représentant des concepts numériques tels que les chiffres " +"romains, les fractions telles qu'un tiers et quatre cinquièmes, etc.). Il " +"existe également des propriétés liées à l'affichage, telles que " +"l'utilisation du point de code dans un texte bidirectionnel." + +#: howto/unicode.rst:366 +msgid "" +"The following program displays some information about several characters, " +"and prints the numeric value of one particular character::" +msgstr "" +"Le programme suivant affiche des informations sur plusieurs caractères et " +"affiche la valeur numérique d'un caractère particulier ::" + +#: howto/unicode.rst:380 +msgid "When run, this prints:" +msgstr "Si vous l'exécutez, cela affiche :" + +#: howto/unicode.rst:391 +msgid "" +"The category codes are abbreviations describing the nature of the character. " +"These are grouped into categories such as \"Letter\", \"Number\", " +"\"Punctuation\", or \"Symbol\", which in turn are broken up into " +"subcategories. To take the codes from the above output, ``'Ll'`` means " +"'Letter, lowercase', ``'No'`` means \"Number, other\", ``'Mn'`` is \"Mark, " +"nonspacing\", and ``'So'`` is \"Symbol, other\". See `the General Category " +"Values section of the Unicode Character Database documentation `_ for a list of category " +"codes." +msgstr "" +"Les codes de catégorie sont des abréviations décrivant la nature du " +"caractère. Celles-ci sont regroupées en catégories telles que « Lettre », " +"« Nombre », « Ponctuation » ou « Symbole », qui sont à leur tour divisées en " +"sous-catégories. Pour prendre par exemple les codes de la sortie ci-dessus, " +"``'Ll'`` signifie « Lettre, minuscules », ``'No'`` signifie « Nombre, " +"autre », ``'Mn'`` est « Marque, non-espaçant », et ``'So'`` est « Symbole, " +"autre ». Voir la section `Valeurs générales des catégories de la " +"documentation de la base de données de caractères Unicode `_ (ressource en anglais) " +"pour une liste de codes de catégories." + +#: howto/unicode.rst:402 +msgid "Comparing Strings" +msgstr "Comparaison de chaînes de caractères" + +#: howto/unicode.rst:404 +msgid "" +"Unicode adds some complication to comparing strings, because the same set of " +"characters can be represented by different sequences of code points. For " +"example, a letter like 'ê' can be represented as a single code point U+00EA, " +"or as U+0065 U+0302, which is the code point for 'e' followed by a code " +"point for 'COMBINING CIRCUMFLEX ACCENT'. These will produce the same output " +"when printed, but one is a string of length 1 and the other is of length 2." +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." + +#: howto/unicode.rst:412 +msgid "" +"One tool for a case-insensitive comparison is the :meth:`~str.casefold` " +"string method that converts a string to a case-insensitive form following an " +"algorithm described by the Unicode Standard. This algorithm has special " +"handling for characters such as the German letter 'ß' (code point U+00DF), " +"which becomes the pair of lowercase letters 'ss'." +msgstr "" +"Un outil pour une comparaison insensible à la casse est la méthode :meth:" +"`~str.casefold` qui convertit une chaîne en une forme insensible à la casse " +"suivant un algorithme décrit par le standard Unicode. Cet algorithme a un " +"traitement spécial pour les caractères tels que la lettre allemande " +"« *ß* » (point de code ``U+00DF``), qui devient la paire de lettres " +"minuscules « *ss* »." + +#: howto/unicode.rst:425 +msgid "" +"A second tool is the :mod:`unicodedata` module's :func:`~unicodedata." +"normalize` function that converts strings to one of several normal forms, " +"where letters followed by a combining character are replaced with single " +"characters. :func:`normalize` can be used to perform string comparisons " +"that won't falsely report inequality if two strings use combining characters " +"differently:" +msgstr "" +"Un deuxième outil est la fonction :mod:`unicodedata` du module :func:" +"`~unicodedata.normalize` qui convertit les chaînes de caractères en l'une de " +"plusieurs formes normales, où les lettres suivies d'un caractère de " +"combinaison sont remplacées par des caractères simples. :func:`normalize` " +"peut être utilisée pour effectuer des comparaisons qui ne rapportent pas " +"faussement les inégalités si deux chaînes utilisent différents caractères de " +"combinaison :" + +#: howto/unicode.rst:448 +msgid "When run, this outputs:" +msgstr "Si vous l'exécutez, cela affiche :" + +#: howto/unicode.rst:457 +msgid "" +"The first argument to the :func:`~unicodedata.normalize` function is a " +"string giving the desired normalization form, which can be one of 'NFC', " +"'NFKC', 'NFD', and 'NFKD'." +msgstr "" +"Le premier argument de la fonction :func:`~unicodedata.normalize` est une " +"chaîne de caractères donnant la forme de normalisation désirée, qui peut " +"être une de celles-ci : ``'NFC'``, ``'NFKC'``, ``'NFD'`` et ``'NFKD'``." + +#: howto/unicode.rst:461 +msgid "The Unicode Standard also specifies how to do caseless comparisons::" +msgstr "" +"La norme Unicode spécifie également comment faire des comparaisons " +"insensibles à la casse ::" + +#: howto/unicode.rst:477 +msgid "" +"This will print ``True``. (Why is :func:`NFD` invoked twice? Because there " +"are a few characters that make :meth:`casefold` return a non-normalized " +"string, so the result needs to be normalized again. See section 3.13 of the " +"Unicode Standard for a discussion and an example.)" +msgstr "" +"Ceci affiche ``True``. (Pourquoi :func:`NFD` est-il invoqué deux fois ? " +"Parce qu'il y a quelques caractères qui font que :meth:`casefold` renvoie " +"une chaîne non normalisée, donc le résultat doit être normalisé à nouveau. " +"Voir la section 3.13 du standard Unicode pour une discussion et un exemple)." + +#: howto/unicode.rst:484 +msgid "Unicode Regular Expressions" +msgstr "Expressions régulières Unicode" + +#: howto/unicode.rst:486 +msgid "" +"The regular expressions supported by the :mod:`re` module can be provided " +"either as bytes or strings. Some of the special character sequences such as " +"``\\d`` and ``\\w`` have different meanings depending on whether the pattern " +"is supplied as bytes or a string. For example, ``\\d`` will match the " +"characters ``[0-9]`` in bytes but in strings will match any character that's " +"in the ``'Nd'`` category." +msgstr "" +"Les expressions régulières gérées par le module :mod:`re` peuvent être " +"fournies sous forme de chaîne d'octets ou de texte. Certaines séquences de " +"caractères spéciaux telles que ``\\d`` et ``\\w`` ont des significations " +"différentes selon que le motif est fourni en octets ou en texte. Par " +"exemple, ``\\d`` correspond aux caractères ``[0-9]`` en octets mais dans les " +"chaînes de caractères correspond à tout caractère de la catégorie ``'Nd'``." + +#: howto/unicode.rst:493 +msgid "" +"The string in this example has the number 57 written in both Thai and Arabic " +"numerals::" +msgstr "" +"Dans cet exemple, la chaîne contient le nombre 57 écrit en chiffres arabes " +"et thaïlandais ::" + +#: howto/unicode.rst:503 +msgid "" +"When executed, ``\\d+`` will match the Thai numerals and print them out. If " +"you supply the :const:`re.ASCII` flag to :func:`~re.compile`, ``\\d+`` will " +"match the substring \"57\" instead." +msgstr "" +"Une fois exécuté, ``\\d+`` correspond aux chiffres thaïlandais et les " +"affiche. Si vous fournissez le drapeau :const:`re.ASCII` à :func:`~re." +"compile`, ``\\d+`` correspond cette fois à la chaîne \"57\"." + +#: howto/unicode.rst:507 +msgid "" +"Similarly, ``\\w`` matches a wide variety of Unicode characters but only " +"``[a-zA-Z0-9_]`` in bytes or if :const:`re.ASCII` is supplied, and ``\\s`` " +"will match either Unicode whitespace characters or ``[ \\t\\n\\r\\f\\v]``." +msgstr "" +"De même, ``\\w`` correspond à une grande variété de caractères Unicode mais " +"seulement ``[a-zA-Z0-9_]`` en octets (ou si :const:`re.ASCII` est fourni) et " +"``\\s`` correspond soit aux caractères blancs Unicode soit aux caractères " +"``[ \\t\\n\\r\\f\\v]``." + +#: howto/unicode.rst:518 +msgid "Some good alternative discussions of Python's Unicode support are:" +msgstr "" +"Quelques bonnes discussions alternatives sur la gestion d'Unicode par Python " +"sont :" + +#: howto/unicode.rst:520 +#, fuzzy +msgid "" +"`Processing Text Files in Python 3 `_, by Nick Coghlan." +msgstr "" +"`Processing Text Files in Python 3 `_, par Nick Coghlan." + +#: howto/unicode.rst:521 +msgid "" +"`Pragmatic Unicode `_, a PyCon " +"2012 presentation by Ned Batchelder." +msgstr "" +"`Pragmatic Unicode `_, une " +"présentation *PyCon* 2012 par Ned Batchelder." + +#: howto/unicode.rst:523 +msgid "" +"The :class:`str` type is described in the Python library reference at :ref:" +"`textseq`." +msgstr "" +"Le type :class:`str` est décrit dans la référence de la bibliothèque Python " +"à :ref:`textseq`." + +#: howto/unicode.rst:526 +msgid "The documentation for the :mod:`unicodedata` module." +msgstr "La documentation du module :mod:`unicodedata`." + +#: howto/unicode.rst:528 +msgid "The documentation for the :mod:`codecs` module." +msgstr "La documentation du module :mod:`codecs`." + +#: howto/unicode.rst:530 +msgid "" +"Marc-André Lemburg gave `a presentation titled \"Python and Unicode\" (PDF " +"slides) `_ at " +"EuroPython 2002. The slides are an excellent overview of the design of " +"Python 2's Unicode features (where the Unicode string type is called " +"``unicode`` and literals start with ``u``)." +msgstr "" +"Marc-André Lemburg a donné une présentation intitulée `« Python et " +"Unicode » (diapositives PDF) `_ à *EuroPython* 2002. Les diapositives sont un excellent " +"aperçu de la conception des fonctionnalités Unicode de Python 2 (où le type " +"de chaîne Unicode est appelé ``unicode`` et les littéraux commencent par " +"``u``)." + +#: howto/unicode.rst:538 +msgid "Reading and Writing Unicode Data" +msgstr "Lecture et écriture de données Unicode" + +#: howto/unicode.rst:540 +msgid "" +"Once you've written some code that works with Unicode data, the next problem " +"is input/output. How do you get Unicode strings into your program, and how " +"do you convert Unicode into a form suitable for storage or transmission?" +msgstr "" +"Une fois que vous avez écrit du code qui fonctionne avec des données " +"Unicode, le problème suivant concerne les entrées/sorties. Comment obtenir " +"des chaînes Unicode dans votre programme et comment convertir les chaînes " +"Unicode dans une forme appropriée pour le stockage ou la transmission ?" + +#: howto/unicode.rst:544 +msgid "" +"It's possible that you may not need to do anything depending on your input " +"sources and output destinations; you should check whether the libraries used " +"in your application support Unicode natively. XML parsers often return " +"Unicode data, for example. Many relational databases also support Unicode-" +"valued columns and can return Unicode values from an SQL query." +msgstr "" +"Il est possible que vous n'ayez rien à faire en fonction de vos sources " +"d'entrée et des destinations de vos données de sortie ; il convient de " +"vérifier si les bibliothèques utilisées dans votre application gèrent " +"l'Unicode nativement. Par exemple, les analyseurs XML renvoient souvent des " +"données Unicode. De nombreuses bases de données relationnelles prennent " +"également en charge les colonnes encodées en Unicode et peuvent renvoyer des " +"valeurs Unicode à partir d'une requête SQL." + +#: howto/unicode.rst:550 +msgid "" +"Unicode data is usually converted to a particular encoding before it gets " +"written to disk or sent over a socket. It's possible to do all the work " +"yourself: open a file, read an 8-bit bytes object from it, and convert the " +"bytes with ``bytes.decode(encoding)``. However, the manual approach is not " +"recommended." +msgstr "" +"Les données Unicode sont généralement converties en un encodage particulier " +"avant d'être écrites sur le disque ou envoyées sur un connecteur réseau. Il " +"est possible de faire tout le travail vous-même : ouvrir un fichier, lire un " +"élément 8-bits, puis convertir les octets avec ``bytes.decode(encoding)``. " +"Cependant, l'approche manuelle n'est pas recommandée." + +#: howto/unicode.rst:555 +msgid "" +"One problem is the multi-byte nature of encodings; one Unicode character can " +"be represented by several bytes. If you want to read the file in arbitrary-" +"sized chunks (say, 1024 or 4096 bytes), you need to write error-handling " +"code to catch the case where only part of the bytes encoding a single " +"Unicode character are read at the end of a chunk. One solution would be to " +"read the entire file into memory and then perform the decoding, but that " +"prevents you from working with files that are extremely large; if you need " +"to read a 2 GiB file, you need 2 GiB of RAM. (More, really, since for at " +"least a moment you'd need to have both the encoded string and its Unicode " +"version in memory.)" +msgstr "" +"La nature multi-octets des encodages pose problème ; un caractère Unicode " +"peut être représenté par plusieurs octets. Si vous voulez lire le fichier " +"par morceaux de taille arbitraire (disons 1024 ou 4096 octets), vous devez " +"écrire un code de gestion des erreurs pour détecter le cas où une partie " +"seulement des octets codant un seul caractère Unicode est lue à la fin d'un " +"morceau. Une solution serait de lire le fichier entier en mémoire et " +"d'effectuer le décodage, mais cela vous empêche de travailler avec des " +"fichiers extrêmement volumineux ; si vous avez besoin de lire un fichier de " +"2 Gio, vous avez besoin de 2 Gio de RAM (plus que ça, en fait, puisque " +"pendant un moment, vous aurez besoin d'avoir à la fois la chaîne encodée et " +"sa version Unicode en mémoire)." + +#: howto/unicode.rst:565 +msgid "" +"The solution would be to use the low-level decoding interface to catch the " +"case of partial coding sequences. The work of implementing this has already " +"been done for you: the built-in :func:`open` function can return a file-like " +"object that assumes the file's contents are in a specified encoding and " +"accepts Unicode parameters for methods such as :meth:`~io.TextIOBase.read` " +"and :meth:`~io.TextIOBase.write`. This works through :func:`open`\\'s " +"*encoding* and *errors* parameters which are interpreted just like those in :" +"meth:`str.encode` and :meth:`bytes.decode`." +msgstr "" +"La solution serait d'utiliser l'interface de décodage de bas-niveau pour " +"intercepter le cas des séquences d'encodage incomplètes. Ce travail " +"d'implémentation a déjà été fait pour vous : la fonction native :func:`open` " +"peut renvoyer un objet de type fichier qui suppose que le contenu du fichier " +"est dans un encodage spécifié et accepte les paramètres Unicode pour des " +"méthodes telles que :meth:`~io.TextIOBase.read` et :meth:`~io.TextIOBase." +"write`. Ceci fonctionne grâce aux paramètres *encoding* et *errors* de :func:" +"`open` qui sont interprétés comme ceux de :meth:`str.encode` et :meth:`bytes." +"decode`." + +#: howto/unicode.rst:574 +msgid "Reading Unicode from a file is therefore simple::" +msgstr "Lire de l'Unicode à partir d'un fichier est donc simple ::" + +#: howto/unicode.rst:580 +msgid "" +"It's also possible to open files in update mode, allowing both reading and " +"writing::" +msgstr "" +"Il est également possible d'ouvrir des fichiers en mode « mise à jour », " +"permettant à la fois la lecture et l'écriture ::" + +#: howto/unicode.rst:588 +msgid "" +"The Unicode character ``U+FEFF`` is used as a byte-order mark (BOM), and is " +"often written as the first character of a file in order to assist with " +"autodetection of the file's byte ordering. Some encodings, such as UTF-16, " +"expect a BOM to be present at the start of a file; when such an encoding is " +"used, the BOM will be automatically written as the first character and will " +"be silently dropped when the file is read. There are variants of these " +"encodings, such as 'utf-16-le' and 'utf-16-be' for little-endian and big-" +"endian encodings, that specify one particular byte ordering and don't skip " +"the BOM." +msgstr "" +"Le caractère Unicode ``U+FEFFF`` est utilisé comme marque pour indiquer le " +"boutisme (c'est-à-dire l'ordre dans lequel les octets sont placés pour " +"indiquer une valeur sur plusieurs octets, *byte-order mark* en anglais ou " +"*BOM*), et est souvent écrit en tête (premier caractère) d'un fichier afin " +"d'aider à l'auto-détection du boutisme du fichier. Certains encodages, comme " +"UTF-16, s'attendent à ce qu'une *BOM* soit présente au début d'un fichier ; " +"lorsqu'un tel encodage est utilisé, la *BOM* sera automatiquement écrite " +"comme premier caractère et sera silencieusement retirée lorsque le fichier " +"sera lu. Il existe des variantes de ces encodages, comme ``utf-16-le`` et " +"``utf-16-be`` pour les encodages petit-boutiste et gros-boutiste, qui " +"spécifient un ordre d'octets donné et ne sautent pas la *BOM*." + +#: howto/unicode.rst:597 +msgid "" +"In some areas, it is also convention to use a \"BOM\" at the start of UTF-8 " +"encoded files; the name is misleading since UTF-8 is not byte-order " +"dependent. The mark simply announces that the file is encoded in UTF-8. For " +"reading such files, use the 'utf-8-sig' codec to automatically skip the mark " +"if present." +msgstr "" +"Dans certains cas, il est également d'usage d'utiliser une *BOM* au début " +"des fichiers encodés en UTF-8 ; le nom est trompeur puisque l'UTF-8 ne " +"dépend pas de l'ordre des octets. La marque annonce simplement que le " +"fichier est encodé en UTF-8. Pour lire ces fichiers, utilisez le codec " +"``utf-8-sig`` pour sauter automatiquement la marque si elle est présente." + +#: howto/unicode.rst:604 +msgid "Unicode filenames" +msgstr "Noms de fichiers Unicode" + +#: howto/unicode.rst:606 +msgid "" +"Most of the operating systems in common use today support filenames that " +"contain arbitrary Unicode characters. Usually this is implemented by " +"converting the Unicode string into some encoding that varies depending on " +"the system. Today Python is converging on using UTF-8: Python on MacOS has " +"used UTF-8 for several versions, and Python 3.6 switched to using UTF-8 on " +"Windows as well. On Unix systems, there will only be a :term:`filesystem " +"encoding `. if you've set the " +"``LANG`` or ``LC_CTYPE`` environment variables; if you haven't, the default " +"encoding is again UTF-8." +msgstr "" +"La plupart des systèmes d'exploitation couramment utilisés aujourd'hui " +"prennent en charge les noms de fichiers qui contiennent des caractères " +"Unicode arbitraires. Habituellement, ceci est implémenté en convertissant la " +"chaîne Unicode en un encodage qui varie en fonction du système. Aujourd'hui, " +"Python converge vers l'utilisation d'UTF-8 : Python sous MacOS utilise UTF-8 " +"depuis plusieurs versions et Python 3.6 sous Windows est passé à UTF-8 " +"également. Sur les systèmes Unix, il n'y aura un :term:`encodage pour le " +"système de fichiers ` que si vous " +"avez défini les variables d'environnement ``LANG`` ou ``LC_CTYPE`` ; sinon, " +"l'encodage par défaut est UTF-8." + +#: howto/unicode.rst:616 +msgid "" +"The :func:`sys.getfilesystemencoding` function returns the encoding to use " +"on your current system, in case you want to do the encoding manually, but " +"there's not much reason to bother. When opening a file for reading or " +"writing, you can usually just provide the Unicode string as the filename, " +"and it will be automatically converted to the right encoding for you::" +msgstr "" +"La fonction :func:`sys.getfilesystemencoding` renvoie l'encodage à utiliser " +"sur votre système actuel, au cas où vous voudriez faire l'encodage " +"manuellement, mais il n'y a pas vraiment de raisons de s'embêter avec ça. " +"Lors de l'ouverture d'un fichier pour la lecture ou l'écriture, vous pouvez " +"généralement simplement fournir la chaîne Unicode comme nom de fichier et " +"elle est automatiquement convertie à l'encodage qui convient ::" + +#: howto/unicode.rst:626 +msgid "" +"Functions in the :mod:`os` module such as :func:`os.stat` will also accept " +"Unicode filenames." +msgstr "" +"Les fonctions du module :mod:`os` telles que :func:`os.stat` acceptent " +"également les noms de fichiers Unicode." + +#: howto/unicode.rst:629 +msgid "" +"The :func:`os.listdir` function returns filenames, which raises an issue: " +"should it return the Unicode version of filenames, or should it return bytes " +"containing the encoded versions? :func:`os.listdir` can do both, depending " +"on whether you provided the directory path as bytes or a Unicode string. If " +"you pass a Unicode string as the path, filenames will be decoded using the " +"filesystem's encoding and a list of Unicode strings will be returned, while " +"passing a byte path will return the filenames as bytes. For example, " +"assuming the default :term:`filesystem encoding ` is UTF-8, running the following program::" +msgstr "" +"La fonction :func:`os.listdir` renvoie des noms de fichiers, ce qui soulève " +"un problème : doit-elle renvoyer la version Unicode des noms de fichiers ou " +"doit-elle renvoyer des chaînes d'octets contenant les versions encodées ? :" +"func:`os.listdir` peut faire les deux, selon que vous fournissez le chemin " +"du répertoire en chaîne d'octets ou en chaîne Unicode. Si vous passez une " +"chaîne Unicode comme chemin d'accès, les noms de fichiers sont décodés en " +"utilisant l'encodage du système de fichiers et une liste de chaînes Unicode " +"est renvoyée, tandis que passer un chemin d'accès en chaîne d'octets renvoie " +"les noms de fichiers comme chaîne d'octets. Par exemple, en supposant que l':" +"term:`encodage par défaut du système de fichiers ` est UTF-8, exécuter le programme suivant ::" + +#: howto/unicode.rst:647 +msgid "will produce the following output:" +msgstr "produit la sortie suivante :" + +#: howto/unicode.rst:655 +msgid "" +"The first list contains UTF-8-encoded filenames, and the second list " +"contains the Unicode versions." +msgstr "" +"La première liste contient les noms de fichiers encodés en UTF-8 et la " +"seconde contient les versions Unicode." + +#: howto/unicode.rst:658 +msgid "" +"Note that on most occasions, you should can just stick with using Unicode " +"with these APIs. The bytes APIs should only be used on systems where " +"undecodable file names can be present; that's pretty much only Unix systems " +"now." +msgstr "" +"Notez que, dans la plupart des cas, il convient de vous en tenir à " +"l'utilisation d'Unicode avec ces *APIs*. Les *API* d'octets ne devraient " +"être utilisées que sur les systèmes où des noms de fichiers non décodables " +"peuvent être présents. Cela ne concerne pratiquement que des systèmes Unix " +"maintenant." + +#: howto/unicode.rst:665 +msgid "Tips for Writing Unicode-aware Programs" +msgstr "Conseils pour écrire des programmes compatibles Unicode" + +#: howto/unicode.rst:667 +msgid "" +"This section provides some suggestions on writing software that deals with " +"Unicode." +msgstr "" +"Cette section fournit quelques suggestions sur l'écriture de logiciels qui " +"traitent de l'Unicode." + +#: howto/unicode.rst:670 +msgid "The most important tip is:" +msgstr "Le conseil le plus important est :" + +#: howto/unicode.rst:672 +msgid "" +"Software should only work with Unicode strings internally, decoding the " +"input data as soon as possible and encoding the output only at the end." +msgstr "" +"Il convient que le logiciel ne traite que des chaînes Unicode en interne, " +"décodant les données d'entrée dès que possible et encodant la sortie " +"uniquement à la fin." + +#: howto/unicode.rst:675 +msgid "" +"If you attempt to write processing functions that accept both Unicode and " +"byte strings, you will find your program vulnerable to bugs wherever you " +"combine the two different kinds of strings. There is no automatic encoding " +"or decoding: if you do e.g. ``str + bytes``, a :exc:`TypeError` will be " +"raised." +msgstr "" +"Si vous essayez d'écrire des fonctions de traitement qui acceptent à la fois " +"les chaînes Unicode et les chaînes d'octets, les possibilités d'occurrences " +"de bogues dans votre programme augmentent partout où vous combinez les deux " +"différents types de chaînes. Il n'y a pas d'encodage ou de décodage " +"automatique : si vous faites par exemple ``str + octets``, une :exc:" +"`TypeError` est levée." + +#: howto/unicode.rst:680 +msgid "" +"When using data coming from a web browser or some other untrusted source, a " +"common technique is to check for illegal characters in a string before using " +"the string in a generated command line or storing it in a database. If " +"you're doing this, be careful to check the decoded string, not the encoded " +"bytes data; some encodings may have interesting properties, such as not " +"being bijective or not being fully ASCII-compatible. This is especially " +"true if the input data also specifies the encoding, since the attacker can " +"then choose a clever way to hide malicious text in the encoded bytestream." +msgstr "" +"Lors de l'utilisation de données provenant d'un navigateur Web ou d'une " +"autre source non fiable, une technique courante consiste à vérifier la " +"présence de caractères illégaux dans une chaîne de caractères avant de " +"l'utiliser pour générer une ligne de commande ou de la stocker dans une base " +"de données. Si vous le faites, vérifiez bien la chaîne décodée, pas les " +"données d'octets codés ; certains encodages peuvent avoir des propriétés " +"intéressantes, comme ne pas être bijectifs ou ne pas être entièrement " +"compatibles avec l'ASCII. C'est particulièrement vrai si l'encodage est " +"spécifié explicitement dans vos données d'entrée, car l'attaquant peut alors " +"choisir un moyen intelligent de cacher du texte malveillant dans le flux de " +"données encodé." + +#: howto/unicode.rst:691 +msgid "Converting Between File Encodings" +msgstr "Conversion entre les encodages de fichiers" + +#: howto/unicode.rst:693 +msgid "" +"The :class:`~codecs.StreamRecoder` class can transparently convert between " +"encodings, taking a stream that returns data in encoding #1 and behaving " +"like a stream returning data in encoding #2." +msgstr "" +"La classe :class:`~codecs.StreamRecoder` peut convertir de manière " +"transparente entre les encodages : prenant un flux qui renvoie des données " +"dans l'encodage #1, elle se comporte comme un flux qui renvoie des données " +"dans l'encodage #2." + +#: howto/unicode.rst:697 +msgid "" +"For example, if you have an input file *f* that's in Latin-1, you can wrap " +"it with a :class:`~codecs.StreamRecoder` to return bytes encoded in UTF-8::" +msgstr "" +"Par exemple, si vous avez un fichier d'entrée *f* qui est en Latin-1, vous " +"pouvez l'encapsuler dans un :class:`~codecs.StreamRecoder` pour qu'il " +"renvoie des octets encodés en UTF-8 ::" + +#: howto/unicode.rst:711 +msgid "Files in an Unknown Encoding" +msgstr "Fichiers dans un encodage inconnu" + +#: howto/unicode.rst:713 +msgid "" +"What can you do if you need to make a change to a file, but don't know the " +"file's encoding? If you know the encoding is ASCII-compatible and only want " +"to examine or modify the ASCII parts, you can open the file with the " +"``surrogateescape`` error handler::" +msgstr "" +"Vous avez besoin de modifier un fichier, mais vous ne connaissez pas son " +"encodage ? Si vous savez que l'encodage est compatible ASCII et que vous " +"voulez seulement examiner ou modifier les parties ASCII, vous pouvez ouvrir " +"le fichier avec le gestionnaire d'erreurs ``surrogateescape`` ::" + +#: howto/unicode.rst:727 +msgid "" +"The ``surrogateescape`` error handler will decode any non-ASCII bytes as " +"code points in a special range running from U+DC80 to U+DCFF. These code " +"points will then turn back into the same bytes when the ``surrogateescape`` " +"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 " +"données et les réécrire." + +#: howto/unicode.rst:737 +#, fuzzy +msgid "" +"One section of `Mastering Python 3 Input/Output `_, a PyCon 2010 talk by David " +"Beazley, discusses text processing and binary data handling." +msgstr "" +"Une partie de la conférence `Mastering Python 3 Input/Output `_ (ressource en anglais), " +"donnée lors de *PyCon* 2010 de David Beazley, parle du traitement de texte " +"et du traitement des données binaires." + +#: howto/unicode.rst:741 +msgid "" +"The `PDF slides for Marc-André Lemburg's presentation \"Writing Unicode-" +"aware Applications in Python\" `_ discuss questions of " +"character encodings as well as how to internationalize and localize an " +"application. These slides cover Python 2.x only." +msgstr "" +"Le `PDF du diaporama de la présentation de Marc-André Lemburg \"Writing " +"Unicodeaware Applications in Python\" `_ (ressource en " +"anglais) traite des questions d'encodage de caractères ainsi que de " +"l'internationalisation et de la localisation d'une application. Ces " +"diapositives ne couvrent que Python 2.x." + +#: howto/unicode.rst:747 +#, fuzzy +msgid "" +"`The Guts of Unicode in Python `_ is a PyCon 2013 talk by Benjamin Peterson that " +"discusses the internal Unicode representation in Python 3.3." +msgstr "" +"`The Guts of Unicode in Python `_ (ressource en anglais) est une conférence *PyCon* 2013 " +"donnée par Benjamin Peterson qui traite de la représentation interne Unicode " +"en Python 3.3." + +#: howto/unicode.rst:754 +msgid "Acknowledgements" +msgstr "Remerciements" + +#: howto/unicode.rst:756 +msgid "" +"The initial draft of this document was written by Andrew Kuchling. It has " +"since been revised further by Alexander Belopolsky, Georg Brandl, Andrew " +"Kuchling, and Ezio Melotti." +msgstr "" +"La première ébauche de ce document a été rédigée par Andrew Kuchling. Il a " +"depuis été révisé par Alexander Belopolsky, Georg Brandl, Andrew Kuchling et " +"Ezio Melotti." + +#: howto/unicode.rst:760 +msgid "" +"Thanks to the following people who have noted errors or offered suggestions " +"on this article: Éric Araujo, Nicholas Bastin, Nick Coghlan, Marius " +"Gedminas, Kent Johnson, Ken Krugler, Marc-André Lemburg, Martin von Löwis, " +"Terry J. Reedy, Serhiy Storchaka, Eryk Sun, Chad Whitacre, Graham Wideman." +msgstr "" +"Merci aux personnes suivantes qui ont noté des erreurs ou qui ont fait des " +"suggestions sur cet article : Éric Araujo, Nicholas Bastin, Nick Coghlan, " +"Marius Gedminas, Kent Johnson, Ken Krugler, Marc-André Lemburg, Martin von " +"Löwis, Terry J. Reedy, Serhiy Storchaka, Eryk Sun, Chad Whitacre, Graham " +"Wideman." diff --git a/howto/urllib2.po b/howto/urllib2.po new file mode 100644 index 0000000000..4be438a1de --- /dev/null +++ b/howto/urllib2.po @@ -0,0 +1,583 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-18 15:46+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \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" + +#: 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" +msgstr "Auteur" + +#: howto/urllib2.rst:7 +msgid "`Michael Foord `_" +msgstr "" + +#: howto/urllib2.rst:11 +msgid "" +"There is a French translation of an earlier revision of this HOWTO, " +"available at `urllib2 - Le Manuel manquant `_." +msgstr "" + +#: howto/urllib2.rst:18 +msgid "Introduction" +msgstr "Introduction" + +#: howto/urllib2.rst:22 +msgid "" +"You may also find useful the following article on fetching web resources " +"with Python:" +msgstr "" + +#: howto/urllib2.rst:25 +msgid "" +"`Basic Authentication `_" +msgstr "" + +#: howto/urllib2.rst:27 +msgid "A tutorial on *Basic Authentication*, with examples in Python." +msgstr "" + +#: howto/urllib2.rst:29 +msgid "" +"**urllib.request** is a Python module for fetching URLs (Uniform Resource " +"Locators). It offers a very simple interface, in the form of the *urlopen* " +"function. This is capable of fetching URLs using a variety of different " +"protocols. It also offers a slightly more complex interface for handling " +"common situations - like basic authentication, cookies, proxies and so on. " +"These are provided by objects called handlers and openers." +msgstr "" + +#: howto/urllib2.rst:36 +msgid "" +"urllib.request supports fetching URLs for many \"URL schemes\" (identified " +"by the string before the ``\":\"`` in URL - for example ``\"ftp\"`` is the " +"URL scheme of ``\"ftp://python.org/\"``) using their associated network " +"protocols (e.g. FTP, HTTP). This tutorial focuses on the most common case, " +"HTTP." +msgstr "" + +#: howto/urllib2.rst:41 +msgid "" +"For straightforward situations *urlopen* is very easy to use. But as soon as " +"you encounter errors or non-trivial cases when opening HTTP URLs, you will " +"need some understanding of the HyperText Transfer Protocol. The most " +"comprehensive and authoritative reference to HTTP is :rfc:`2616`. This is a " +"technical document and not intended to be easy to read. This HOWTO aims to " +"illustrate using *urllib*, with enough detail about HTTP to help you " +"through. It is not intended to replace the :mod:`urllib.request` docs, but " +"is supplementary to them." +msgstr "" + +#: howto/urllib2.rst:51 +msgid "Fetching URLs" +msgstr "" + +#: howto/urllib2.rst:53 +msgid "The simplest way to use urllib.request is as follows::" +msgstr "" + +#: howto/urllib2.rst:59 +msgid "" +"If you wish to retrieve a resource via URL and store it in a temporary " +"location, you can do so via the :func:`shutil.copyfileobj` and :func:" +"`tempfile.NamedTemporaryFile` functions::" +msgstr "" + +#: howto/urllib2.rst:74 +msgid "" +"Many uses of urllib will be that simple (note that instead of an 'http:' URL " +"we could have used a URL starting with 'ftp:', 'file:', etc.). However, " +"it's the purpose of this tutorial to explain the more complicated cases, " +"concentrating on HTTP." +msgstr "" + +#: howto/urllib2.rst:79 +msgid "" +"HTTP is based on requests and responses - the client makes requests and " +"servers send responses. urllib.request mirrors this with a ``Request`` " +"object which represents the HTTP request you are making. In its simplest " +"form you create a Request object that specifies the URL you want to fetch. " +"Calling ``urlopen`` with this Request object returns a response object for " +"the URL requested. This response is a file-like object, which means you can " +"for example call ``.read()`` on the response::" +msgstr "" + +#: howto/urllib2.rst:93 +msgid "" +"Note that urllib.request makes use of the same Request interface to handle " +"all URL schemes. For example, you can make an FTP request like so::" +msgstr "" + +#: howto/urllib2.rst:98 +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." +msgstr "" + +#: howto/urllib2.rst:105 +msgid "Data" +msgstr "" + +#: howto/urllib2.rst:107 +msgid "" +"Sometimes you want to send data to a URL (often the URL will refer to a CGI " +"(Common Gateway Interface) script or other web application). With HTTP, this " +"is often done using what's known as a **POST** request. This is often what " +"your browser does when you submit a HTML form that you filled in on the web. " +"Not all POSTs have to come from forms: you can use a POST to transmit " +"arbitrary data to your own application. In the common case of HTML forms, " +"the data needs to be encoded in a standard way, and then passed to the " +"Request object as the ``data`` argument. The encoding is done using a " +"function from the :mod:`urllib.parse` library. ::" +msgstr "" + +#: howto/urllib2.rst:131 +msgid "" +"Note that other encodings are sometimes required (e.g. for file upload from " +"HTML forms - see `HTML Specification, Form Submission `_ for more details)." +msgstr "" + +#: howto/urllib2.rst:136 +msgid "" +"If you do not pass the ``data`` argument, urllib uses a **GET** request. One " +"way in which GET and POST requests differ is that POST requests often have " +"\"side-effects\": they change the state of the system in some way (for " +"example by placing an order with the website for a hundredweight of tinned " +"spam to be delivered to your door). Though the HTTP standard makes it clear " +"that POSTs are intended to *always* cause side-effects, and GET requests " +"*never* to cause side-effects, nothing prevents a GET request from having " +"side-effects, nor a POST requests from having no side-effects. Data can also " +"be passed in an HTTP GET request by encoding it in the URL itself." +msgstr "" + +#: howto/urllib2.rst:146 +msgid "This is done as follows::" +msgstr "" + +#: howto/urllib2.rst:161 +msgid "" +"Notice that the full URL is created by adding a ``?`` to the URL, followed " +"by the encoded values." +msgstr "" + +#: howto/urllib2.rst:165 +msgid "Headers" +msgstr "" + +#: howto/urllib2.rst:167 +msgid "" +"We'll discuss here one particular HTTP header, to illustrate how to add " +"headers to your HTTP request." +msgstr "" + +#: howto/urllib2.rst:170 +msgid "" +"Some websites [#]_ dislike being browsed by programs, or send different " +"versions to different browsers [#]_. By default urllib identifies itself as " +"``Python-urllib/x.y`` (where ``x`` and ``y`` are the major and minor version " +"numbers of the Python release, e.g. ``Python-urllib/2.5``), which may " +"confuse the site, or just plain not work. The way a browser identifies " +"itself is through the ``User-Agent`` header [#]_. When you create a Request " +"object you can pass a dictionary of headers in. The following example makes " +"the same request as above, but identifies itself as a version of Internet " +"Explorer [#]_. ::" +msgstr "" + +#: howto/urllib2.rst:197 +msgid "" +"The response also has two useful methods. See the section on `info and " +"geturl`_ which comes after we have a look at what happens when things go " +"wrong." +msgstr "" + +#: howto/urllib2.rst:202 +msgid "Handling Exceptions" +msgstr "Gestion des exceptions" + +#: howto/urllib2.rst:204 +msgid "" +"*urlopen* raises :exc:`URLError` when it cannot handle a response (though as " +"usual with Python APIs, built-in exceptions such as :exc:`ValueError`, :exc:" +"`TypeError` etc. may also be raised)." +msgstr "" + +#: howto/urllib2.rst:208 +msgid "" +":exc:`HTTPError` is the subclass of :exc:`URLError` raised in the specific " +"case of HTTP URLs." +msgstr "" + +#: howto/urllib2.rst:211 +msgid "The exception classes are exported from the :mod:`urllib.error` module." +msgstr "" + +#: howto/urllib2.rst:214 +msgid "URLError" +msgstr "" + +#: howto/urllib2.rst:216 +msgid "" +"Often, URLError is raised because there is no network connection (no route " +"to the specified server), or the specified server doesn't exist. In this " +"case, the exception raised will have a 'reason' attribute, which is a tuple " +"containing an error code and a text error message." +msgstr "" + +#: howto/urllib2.rst:221 +msgid "e.g. ::" +msgstr "" + +#: howto/urllib2.rst:232 +msgid "HTTPError" +msgstr "" + +#: howto/urllib2.rst:234 +msgid "" +"Every HTTP response from the server contains a numeric \"status code\". " +"Sometimes the status code indicates that the server is unable to fulfil the " +"request. The default handlers will handle some of these responses for you " +"(for example, if the response is a \"redirection\" that requests the client " +"fetch the document from a different URL, urllib will handle that for you). " +"For those it can't handle, urlopen will raise an :exc:`HTTPError`. Typical " +"errors include '404' (page not found), '403' (request forbidden), and " +"'401' (authentication required)." +msgstr "" + +#: howto/urllib2.rst:242 +msgid "" +"See section 10 of :rfc:`2616` for a reference on all the HTTP error codes." +msgstr "" + +#: howto/urllib2.rst:244 +msgid "" +"The :exc:`HTTPError` instance raised will have an integer 'code' attribute, " +"which corresponds to the error sent by the server." +msgstr "" + +#: howto/urllib2.rst:248 +msgid "Error Codes" +msgstr "" + +#: howto/urllib2.rst:250 +msgid "" +"Because the default handlers handle redirects (codes in the 300 range), and " +"codes in the 100--299 range indicate success, you will usually only see " +"error codes in the 400--599 range." +msgstr "" + +#: howto/urllib2.rst:254 +msgid "" +":attr:`http.server.BaseHTTPRequestHandler.responses` is a useful dictionary " +"of response codes in that shows all the response codes used by :rfc:`2616`. " +"The dictionary is reproduced here for convenience ::" +msgstr "" + +#: howto/urllib2.rst:326 +msgid "" +"When an error is raised the server responds by returning an HTTP error code " +"*and* an error page. You can use the :exc:`HTTPError` instance as a response " +"on the page returned. This means that as well as the code attribute, it also " +"has read, geturl, and info, methods as returned by the ``urllib.response`` " +"module::" +msgstr "" + +#: howto/urllib2.rst:346 +msgid "Wrapping it Up" +msgstr "" + +#: howto/urllib2.rst:348 +msgid "" +"So if you want to be prepared for :exc:`HTTPError` *or* :exc:`URLError` " +"there are two basic approaches. I prefer the second approach." +msgstr "" + +#: howto/urllib2.rst:352 +msgid "Number 1" +msgstr "" + +#: howto/urllib2.rst:374 +msgid "" +"The ``except HTTPError`` *must* come first, otherwise ``except URLError`` " +"will *also* catch an :exc:`HTTPError`." +msgstr "" + +#: howto/urllib2.rst:378 +msgid "Number 2" +msgstr "" + +#: howto/urllib2.rst:399 +msgid "info and geturl" +msgstr "" + +#: howto/urllib2.rst:401 +msgid "" +"The response returned by urlopen (or the :exc:`HTTPError` instance) has two " +"useful methods :meth:`info` and :meth:`geturl` and is defined in the module :" +"mod:`urllib.response`.." +msgstr "" + +#: howto/urllib2.rst:405 +msgid "" +"**geturl** - this returns the real URL of the page fetched. This is useful " +"because ``urlopen`` (or the opener object used) may have followed a " +"redirect. The URL of the page fetched may not be the same as the URL " +"requested." +msgstr "" + +#: howto/urllib2.rst:409 +msgid "" +"**info** - this returns a dictionary-like object that describes the page " +"fetched, particularly the headers sent by the server. It is currently an :" +"class:`http.client.HTTPMessage` instance." +msgstr "" + +#: howto/urllib2.rst:413 +msgid "" +"Typical headers include 'Content-length', 'Content-type', and so on. See the " +"`Quick Reference to HTTP Headers `_ for a " +"useful listing of HTTP headers with brief explanations of their meaning and " +"use." +msgstr "" + +#: howto/urllib2.rst:420 +msgid "Openers and Handlers" +msgstr "" + +#: howto/urllib2.rst:422 +msgid "" +"When you fetch a URL you use an opener (an instance of the perhaps " +"confusingly named :class:`urllib.request.OpenerDirector`). Normally we have " +"been using the default opener - via ``urlopen`` - but you can create custom " +"openers. Openers use handlers. All the \"heavy lifting\" is done by the " +"handlers. Each handler knows how to open URLs for a particular URL scheme " +"(http, ftp, etc.), or how to handle an aspect of URL opening, for example " +"HTTP redirections or HTTP cookies." +msgstr "" + +#: howto/urllib2.rst:430 +msgid "" +"You will want to create openers if you want to fetch URLs with specific " +"handlers installed, for example to get an opener that handles cookies, or to " +"get an opener that does not handle redirections." +msgstr "" + +#: howto/urllib2.rst:434 +msgid "" +"To create an opener, instantiate an ``OpenerDirector``, and then call ``." +"add_handler(some_handler_instance)`` repeatedly." +msgstr "" + +#: howto/urllib2.rst:437 +msgid "" +"Alternatively, you can use ``build_opener``, which is a convenience function " +"for creating opener objects with a single function call. ``build_opener`` " +"adds several handlers by default, but provides a quick way to add more and/" +"or override the default handlers." +msgstr "" + +#: howto/urllib2.rst:442 +msgid "" +"Other sorts of handlers you might want to can handle proxies, " +"authentication, and other common but slightly specialised situations." +msgstr "" + +#: howto/urllib2.rst:445 +msgid "" +"``install_opener`` can be used to make an ``opener`` object the (global) " +"default opener. This means that calls to ``urlopen`` will use the opener you " +"have installed." +msgstr "" + +#: howto/urllib2.rst:449 +msgid "" +"Opener objects have an ``open`` method, which can be called directly to " +"fetch urls in the same way as the ``urlopen`` function: there's no need to " +"call ``install_opener``, except as a convenience." +msgstr "" + +#: howto/urllib2.rst:455 +msgid "Basic Authentication" +msgstr "" + +#: howto/urllib2.rst:457 +msgid "" +"To illustrate creating and installing a handler we will use the " +"``HTTPBasicAuthHandler``. For a more detailed discussion of this subject -- " +"including an explanation of how Basic Authentication works - see the `Basic " +"Authentication Tutorial `_." +msgstr "" + +#: howto/urllib2.rst:463 +msgid "" +"When authentication is required, the server sends a header (as well as the " +"401 error code) requesting authentication. This specifies the " +"authentication scheme and a 'realm'. The header looks like: ``WWW-" +"Authenticate: SCHEME realm=\"REALM\"``." +msgstr "" + +#: howto/urllib2.rst:468 +msgid "e.g." +msgstr "" + +#: howto/urllib2.rst:475 +msgid "" +"The client should then retry the request with the appropriate name and " +"password for the realm included as a header in the request. This is 'basic " +"authentication'. In order to simplify this process we can create an instance " +"of ``HTTPBasicAuthHandler`` and an opener to use this handler." +msgstr "" + +#: howto/urllib2.rst:480 +msgid "" +"The ``HTTPBasicAuthHandler`` uses an object called a password manager to " +"handle the mapping of URLs and realms to passwords and usernames. If you " +"know what the realm is (from the authentication header sent by the server), " +"then you can use a ``HTTPPasswordMgr``. Frequently one doesn't care what the " +"realm is. In that case, it is convenient to use " +"``HTTPPasswordMgrWithDefaultRealm``. This allows you to specify a default " +"username and password for a URL. This will be supplied in the absence of you " +"providing an alternative combination for a specific realm. We indicate this " +"by providing ``None`` as the realm argument to the ``add_password`` method." +msgstr "" + +#: howto/urllib2.rst:490 +msgid "" +"The top-level URL is the first URL that requires authentication. URLs " +"\"deeper\" than the URL you pass to .add_password() will also match. ::" +msgstr "" + +#: howto/urllib2.rst:515 +msgid "" +"In the above example we only supplied our ``HTTPBasicAuthHandler`` to " +"``build_opener``. By default openers have the handlers for normal situations " +"-- ``ProxyHandler`` (if a proxy setting such as an :envvar:`http_proxy` " +"environment variable is set), ``UnknownHandler``, ``HTTPHandler``, " +"``HTTPDefaultErrorHandler``, ``HTTPRedirectHandler``, ``FTPHandler``, " +"``FileHandler``, ``DataHandler``, ``HTTPErrorProcessor``." +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 " +"authority, if present, must NOT contain the \"userinfo\" component - for " +"example ``\"joe:password@example.com\"`` is not correct." +msgstr "" + +#: howto/urllib2.rst:532 +msgid "Proxies" +msgstr "" + +#: howto/urllib2.rst:534 +msgid "" +"**urllib** will auto-detect your proxy settings and use those. This is " +"through the ``ProxyHandler``, which is part of the normal handler chain when " +"a proxy setting is detected. Normally that's a good thing, but there are " +"occasions when it may not be helpful [#]_. One way to do this is to setup " +"our own ``ProxyHandler``, with no proxies defined. This is done using " +"similar steps to setting up a `Basic Authentication`_ handler: ::" +msgstr "" + +#: howto/urllib2.rst:547 +msgid "" +"Currently ``urllib.request`` *does not* support fetching of ``https`` " +"locations through a proxy. However, this can be enabled by extending urllib." +"request as shown in the recipe [#]_." +msgstr "" + +#: howto/urllib2.rst:553 +msgid "" +"``HTTP_PROXY`` will be ignored if a variable ``REQUEST_METHOD`` is set; see " +"the documentation on :func:`~urllib.request.getproxies`." +msgstr "" + +#: howto/urllib2.rst:558 +msgid "Sockets and Layers" +msgstr "" + +#: howto/urllib2.rst:560 +msgid "" +"The Python support for fetching resources from the web is layered. urllib " +"uses the :mod:`http.client` library, which in turn uses the socket library." +msgstr "" + +#: howto/urllib2.rst:563 +msgid "" +"As of Python 2.3 you can specify how long a socket should wait for a " +"response before timing out. This can be useful in applications which have to " +"fetch web pages. By default the socket module has *no timeout* and can hang. " +"Currently, the socket timeout is not exposed at the http.client or urllib." +"request levels. However, you can set the default timeout globally for all " +"sockets using ::" +msgstr "" + +#: howto/urllib2.rst:586 +msgid "Footnotes" +msgstr "Notes" + +#: howto/urllib2.rst:588 +msgid "This document was reviewed and revised by John Lee." +msgstr "" + +#: howto/urllib2.rst:590 +msgid "Google for example." +msgstr "" + +#: howto/urllib2.rst:591 +msgid "" +"Browser sniffing is a very bad practice for website design - building sites " +"using web standards is much more sensible. Unfortunately a lot of sites " +"still send different versions to different browsers." +msgstr "" + +#: howto/urllib2.rst:594 +msgid "" +"The user agent for MSIE 6 is *'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT " +"5.1; SV1; .NET CLR 1.1.4322)'*" +msgstr "" + +#: howto/urllib2.rst:596 +msgid "" +"For details of more HTTP request headers, see `Quick Reference to HTTP " +"Headers`_." +msgstr "" + +#: howto/urllib2.rst:598 +msgid "" +"In my case I have to use a proxy to access the internet at work. If you " +"attempt to fetch *localhost* URLs through this proxy it blocks them. IE is " +"set to use the proxy, which urllib picks up on. In order to test scripts " +"with a localhost server, I have to prevent urllib from using the proxy." +msgstr "" + +#: howto/urllib2.rst:603 +msgid "" +"urllib opener for SSL proxy (CONNECT method): `ASPN Cookbook Recipe `_." +msgstr "" diff --git a/install/index.po b/install/index.po new file mode 100644 index 0000000000..f7772cf921 --- /dev/null +++ b/install/index.po @@ -0,0 +1,1752 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-18 15:46+0200\n" +"PO-Revision-Date: 2022-10-18 15:59+0200\n" +"Last-Translator: Julien Palard \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" + +#: install/index.rst:7 +msgid "Installing Python Modules (Legacy version)" +msgstr "Installation des modules python (Version historique)" + +#: install/index.rst:0 +msgid "Author" +msgstr "Auteur" + +#: install/index.rst:9 +msgid "Greg Ward" +msgstr "Greg Ward" + +#: install/index.rst:15 +msgid "" +"The entire ``distutils`` package has been deprecated and will be removed in " +"Python 3.12. This documentation is retained as a reference only, and will be " +"removed with the package. See the :ref:`What's New ` " +"entry for more information." +msgstr "" + +#: install/index.rst:23 +msgid ":ref:`installing-index`" +msgstr ":ref:`installing-index`" + +#: install/index.rst:23 +msgid "" +"The up to date module installation documentation. For regular Python usage, " +"you almost certainly want that document rather than this one." +msgstr "" +"le document à jour pour l'installation des modules. Pour une utilisation " +"normale de Python, c'est ce document que vous cherchez plutôt que celui-ci." + +#: distutils/_setuptools_disclaimer.rst:3 +msgid "" +"This document is being retained solely until the ``setuptools`` " +"documentation at https://setuptools.readthedocs.io/en/latest/setuptools.html " +"independently covers all of the relevant information currently included here." +msgstr "" +"Cette page est conservée uniquement jusqu'à ce que la documentation " +"``setuptool`` sur https://setuptools.readthedocs.io/en/latest/setuptools." +"html couvre de manière indépendante toutes les informations pertinentes " +"actuellement incluses ici." + +#: install/index.rst:30 +msgid "" +"This guide only covers the basic tools for building and distributing " +"extensions that are provided as part of this version of Python. Third party " +"tools offer easier to use and more secure alternatives. Refer to the `quick " +"recommendations section `__ in the Python Packaging User Guide for more information." +msgstr "" +"Ce guide ne couvre que les outils de base, fournis avec cette version de " +"Python, pour construire et distribuer des extensions. D'autres outils " +"peuvent être plus sécurisés et plus simple à utiliser. Consultez `quick " +"recommendations section `__ dans le *Python Packaging User Guide* pour plus " +"d'informations." + +#: install/index.rst:41 +msgid "Introduction" +msgstr "Introduction" + +#: install/index.rst:43 +msgid "" +"In Python 2.0, the ``distutils`` API was first added to the standard " +"library. This provided Linux distro maintainers with a standard way of " +"converting Python projects into Linux distro packages, and system " +"administrators with a standard way of installing them directly onto target " +"systems." +msgstr "" +"Dans Python 2.0, l'API ``distutils`` a d'abord été ajoutée à la bibliothèque " +"standard. Elle a donné aux mainteneurs de distributions Linux une façon " +"standard d'intégrer des projets Python dans les paquets Linux, et aux " +"administrateurs système une façon standard de les installer directement sur " +"les systèmes cibles." + +#: install/index.rst:48 +msgid "" +"In the many years since Python 2.0 was released, tightly coupling the build " +"system and package installer to the language runtime release cycle has " +"turned out to be problematic, and it is now recommended that projects use " +"the ``pip`` package installer and the ``setuptools`` build system, rather " +"than using ``distutils`` directly." +msgstr "" +"À l'époque où Python 2.0 a été publié, le fort couplage entre le système " +"d'intégration et le gestionnaire de paquets avec le cycle de publication du " +"langage était problématique, et il est désormais recommandé d'utiliser le " +"gestionnaire de paquets ``pip`` ainsi que le système d'intégration " +"``setuptools`` plutôt que d'utiliser ``distutils`` directement." + +#: install/index.rst:54 +msgid "" +"See :ref:`installing-index` and :ref:`distributing-index` for more details." +msgstr "" +"Voir :ref:`installing-index` et :ref:`distributing-index` pour plus de " +"détails." + +#: install/index.rst:56 +msgid "" +"This legacy documentation is being retained only until we're confident that " +"the ``setuptools`` documentation covers everything needed." +msgstr "" +"Cette ancienne documentation sera conservée jusqu'à ce que nous soyons " +"certains que la documentation sur ``setuptools`` couvre tout ce qui est " +"nécessaire." + +#: install/index.rst:62 +msgid "Distutils based source distributions" +msgstr "Distributions basées sur *distutils*" + +#: install/index.rst:64 +#, fuzzy +msgid "" +"If you download a module source distribution, you can tell pretty quickly if " +"it was packaged and distributed in the standard way, i.e. using the " +"Distutils. First, the distribution's name and version number will be " +"featured prominently in the name of the downloaded archive, e.g. :file:" +"`foo-1.0.tar.gz` or :file:`widget-0.9.7.zip`. Next, the archive will unpack " +"into a similarly named directory: :file:`foo-1.0` or :file:`widget-0.9.7`. " +"Additionally, the distribution will contain a setup script :file:`setup.py`, " +"and a file named :file:`README.txt` or possibly just :file:`README`, which " +"should explain that building and installing the module distribution is a " +"simple matter of running one command from a terminal::" +msgstr "" +"Si vous téléchargez une distribution source du module, vous pouvez dire " +"assez rapidement s'il a été empaqueté et distribué de la façon standard, " +"c'est-à-dire en utilisant Distutils. Premièrement, le nom et le numéro de " +"version de la distribution sont affichés en bonne place dans le nom de " +"l'archive téléchargée, par exemple :file:`foo-1.0.tar.gz` ou :file:" +"`widget-0.9.7.zip`. Ensuite, l'archive se décompresse dans un répertoire du " +"même nom : :file:`foo-1.0` ou :file:`widget-0.9.7`. En outre, la " +"distribution contient un script d'installation :file:`setup.py` et un " +"fichier nommé :file:`README.txt` ou éventuellement juste :file:`README`, qui " +"doit expliquer que la construction et l'installation de la distribution du " +"module se fait simplement en exécutant ceci ::" + +#: install/index.rst:77 +msgid "" +"For Windows, this command should be run from a command prompt window (:" +"menuselection:`Start --> Accessories`)::" +msgstr "" +"Sous Windows, cette commande doit être lancée depuis une invite de commande " +"(:menuselection:`Démarrer --> Accessoires`) ::" + +#: install/index.rst:82 +msgid "" +"If all these things are true, then you already know how to build and install " +"the modules you've just downloaded: Run the command above. Unless you need " +"to install things in a non-standard way or customize the build process, you " +"don't really need this manual. Or rather, the above command is everything " +"you need to get out of this manual." +msgstr "" +"Si toutes ces choses sont vérifiées, alors vous savez déjà comment " +"construire et installer le module que vous venez de télécharger : en " +"exécutant la commande ci-dessus. Sauf si vous avez besoin d'installer les " +"choses d'une manière non standard ou de personnaliser le processus de " +"construction, vous n'avez pas vraiment besoin de ce manuel. Ou plutôt, la " +"commande ci-dessus est tout ce dont vous avez besoin de retenir de ce manuel." + +#: install/index.rst:92 +msgid "Standard Build and Install" +msgstr "Construction standard et installation" + +#: install/index.rst:94 +msgid "" +"As described in section :ref:`inst-new-standard`, building and installing a " +"module distribution using the Distutils is usually one simple command to run " +"from a terminal::" +msgstr "" +"Comme décrit dans la section :ref:`inst-new-standard`, construire et " +"installer une distribution de modules en utilisant les Distutils consiste " +"généralement à exécuter une simple commande dans un terminal ::" + +#: install/index.rst:104 +msgid "Platform variations" +msgstr "Différences selon les plateformes" + +#: install/index.rst:106 +msgid "" +"You should always run the setup command from the distribution root " +"directory, i.e. the top-level subdirectory that the module source " +"distribution unpacks into. For example, if you've just downloaded a module " +"source distribution :file:`foo-1.0.tar.gz` onto a Unix system, the normal " +"thing to do is::" +msgstr "" +"Vous devez toujours exécuter la commande *setup* à partir du répertoire " +"racine de la distribution, à savoir le sous-répertoire de plus haut niveau " +"dans l'arborescence où se sont décompressées les sources de la distribution " +"du module. Par exemple, si vous venez de télécharger les sources d'une " +"distribution du module :file:`foo-1.0.tar.gz` sous un système UNIX, la " +"méthode normale consiste à faire ::" + +#: install/index.rst:115 +msgid "" +"On Windows, you'd probably download :file:`foo-1.0.zip`. If you downloaded " +"the archive file to :file:`C:\\\\Temp`, then it would unpack into :file:`C:\\" +"\\Temp\\\\foo-1.0`; you can use either an archive manipulator with a " +"graphical user interface (such as WinZip) or a command-line tool (such as :" +"program:`unzip` or :program:`pkunzip`) to unpack the archive. Then, open a " +"command prompt window and run::" +msgstr "" +"Sous Windows, vous avez probablement téléchargé :file:`foo-1.0.zip`. Si vous " +"avez téléchargé le fichier d'archive dans :file:`C:\\\\Temp`, il se " +"décompressera alors dans :file:`C:\\\\Temp\\\\foo-1.0` ; vous pouvez " +"utiliser soit un gestionnaire d'archives graphique (comme WinZip), soit un " +"outil de ligne de commande (tels que :program:`unzip` ou :program:`pkunzip`) " +"pour décompresser l'archive. Ensuite, ouvrez une fenêtre d'invite de " +"commandes et exécutez ::" + +#: install/index.rst:129 +msgid "Splitting the job up" +msgstr "Fractionnement du travail" + +#: install/index.rst:131 +msgid "" +"Running ``setup.py install`` builds and installs all modules in one run. If " +"you prefer to work incrementally---especially useful if you want to " +"customize the build process, or if things are going wrong---you can use the " +"setup script to do one thing at a time. This is particularly helpful when " +"the build and install will be done by different users---for example, you " +"might want to build a module distribution and hand it off to a system " +"administrator for installation (or do it yourself, with super-user " +"privileges)." +msgstr "" +"Exécuter ``setup.py install`` construit et installe tous les modules en un " +"seul coup. Si vous préférez travailler progressivement — ce qui est " +"particulièrement utile si vous souhaitez personnaliser le processus de " +"construction ou si les choses vont mal — vous pouvez utiliser le script de " +"configuration pour faire une chose à la fois. Cela est particulièrement " +"utile lorsque la construction et l'installation doit être faite par " +"différents utilisateurs — par exemple, vous pouvez vouloir construire une " +"distribution d'un module et la transférer à un administrateur système pour " +"l'installation (ou le faire vous-même, avec les privilèges de super-" +"utilisateur)." + +#: install/index.rst:139 +msgid "" +"For example, you can build everything in one step, and then install " +"everything in a second step, by invoking the setup script twice::" +msgstr "" +"Par exemple, vous pouvez construire tout en une seule étape et ensuite " +"installer le tout dans une deuxième étape, en invoquant le script " +"d'installation deux fois ::" + +#: install/index.rst:145 +msgid "" +"If you do this, you will notice that running the :command:`install` command " +"first runs the :command:`build` command, which---in this case---quickly " +"notices that it has nothing to do, since everything in the :file:`build` " +"directory is up-to-date." +msgstr "" +"Si vous faites cela, vous remarquerez que l'exécution de la commande :" +"command:`install` lance d'abord la commande :command:`build`, qui, dans ce " +"cas, s'aperçoit vite qu'il n'a rien à faire, puisque tout dans le dossier :" +"file:`build` est à jour." + +#: install/index.rst:150 +msgid "" +"You may not need this ability to break things down often if all you do is " +"install modules downloaded off the 'net, but it's very handy for more " +"advanced tasks. If you get into distributing your own Python modules and " +"extensions, you'll run lots of individual Distutils commands on their own." +msgstr "" +"Il se peut que vous n'ayez pas souvent besoin de cette capacité à séparer " +"les étapes si tout ce que vous faites est d'installer les modules " +"téléchargés sur le Net, mais c'est très pratique pour des tâches plus " +"avancées. Si vous en venez à distribuer vos propres modules et extensions " +"Python, vous allez exécuter beaucoup de commandes individuelles de " +"Distutils, indépendamment les unes des autres." + +#: install/index.rst:159 +msgid "How building works" +msgstr "Comment fonctionne une construction" + +#: install/index.rst:161 +msgid "" +"As implied above, the :command:`build` command is responsible for putting " +"the files to install into a *build directory*. By default, this is :file:" +"`build` under the distribution root; if you're excessively concerned with " +"speed, or want to keep the source tree pristine, you can change the build " +"directory with the :option:`!--build-base` option. For example::" +msgstr "" +"Comme sous-entendu ci-dessus, la commande :command:`build` est chargée de " +"mettre les fichiers à installer dans un *répertoire de travail*. Par défaut, " +"c'est :file:`build` à la racine de la distribution ; si vous êtes très " +"préoccupés par la vitesse, ou si vous voulez conserver l'arborescence des " +"sources d'origine, vous pouvez changer le répertoire de construction avec " +"l'option :option:`!--build-base`. Par exemple ::" + +#: install/index.rst:169 +msgid "" +"(Or you could do this permanently with a directive in your system or " +"personal Distutils configuration file; see section :ref:`inst-config-" +"files`.) Normally, this isn't necessary." +msgstr "" +"(Ou vous pourriez le faire de façon permanente avec une directive dans votre " +"système ou dans le fichier de configuration personnelle de Distutils ; voir " +"la section :ref:`inst-config-files`.) Normalement, ce n'est pas nécessaire." + +#: install/index.rst:173 +msgid "The default layout for the build tree is as follows::" +msgstr "" +"L'arborescence par défaut produite par la compilation se présente comme " +"suit ::" + +#: install/index.rst:180 +msgid "" +"where ```` expands to a brief description of the current OS/hardware " +"platform and Python version. The first form, with just a :file:`lib` " +"directory, is used for \"pure module distributions\"---that is, module " +"distributions that include only pure Python modules. If a module " +"distribution contains any extensions (modules written in C/C++), then the " +"second form, with two ```` directories, is used. In that case, the :" +"file:`temp.{plat}` directory holds temporary files generated by the compile/" +"link process that don't actually get installed. In either case, the :file:" +"`lib` (or :file:`lib.{plat}`) directory contains all Python modules (pure " +"Python and extensions) that will be installed." +msgstr "" +"où ```` représente une brève description de l'actuel système " +"d'exploitation / plateforme matérielle et la version Python. La première " +"forme, avec juste un dossier :file:`lib` est utilisée pour les " +"« distributions de modules purs » — c'est-à-dire des distributions de module " +"qui n'incorporent que des modules en Python. Si un module de la distribution " +"contient au moins une extension (modules écrits en C/C++), alors il faut " +"utiliser la deuxième forme, avec deux dossiers ````. Dans ce cas, le " +"répertoire :file:`temp.{plat}` contient les fichiers temporaires générés par " +"le processus de compilation et de génération de liens (ils ne seront pas " +"installés). Dans les deux cas, le dossier :file:`lib` (ou :file:`lib.{plat}" +"`) contient tous les modules Python (Python pur et extensions) qui seront " +"installés." + +#: install/index.rst:190 +msgid "" +"In the future, more directories will be added to handle Python scripts, " +"documentation, binary executables, and whatever else is needed to handle the " +"job of installing Python modules and applications." +msgstr "" +"Dans l'avenir, d'autres répertoires seront ajoutés pour gérer les scripts " +"Python, de la documentation, des exécutables binaires et tout ce qui est " +"nécessaire pour gérer le travail de l'installation de modules et " +"d'applications Python." + +#: install/index.rst:198 +msgid "How installation works" +msgstr "Comment fonctionne l'installation" + +#: install/index.rst:200 +msgid "" +"After the :command:`build` command runs (whether you run it explicitly, or " +"the :command:`install` command does it for you), the work of the :command:" +"`install` command is relatively simple: all it has to do is copy everything " +"under :file:`build/lib` (or :file:`build/lib.{plat}`) to your chosen " +"installation directory." +msgstr "" +"Après l'exécution de la commande :command:`build` (que vous l'ayez exécutée " +"explicitement ou que la commande :command:`install` l'ait fait pour vous), " +"le travail de la commande :command:`install` est relativement simple : tout " +"ce qu'il a à faire est de copier tout ce qui est sous :file:`build/lib` (ou :" +"file:`build/lib.{plat}`) dans le répertoire que vous avez choisi pour " +"l'installation." + +#: install/index.rst:206 +#, 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 " +"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 "" +"Si vous ne choisissez aucun répertoire d'installation — c'est-à-dire, si " +"vous lancez simplement ``setup.py install`` — alors la commande :command:" +"`install` installe le module dans l'emplacement standard pour les modules " +"tiers de Python. Cet emplacement varie selon la plateforme et selon la façon " +"dont vous avez construit ou installé Python lui-même. Sous UNIX (et Mac OS " +"X, qui est également basé sur Unix), cela dépend aussi du module de la " +"distribution en cours d'installation, suivant qu'il est en pur Python ou " +"s'il contient des extensions (« non-pur ») :" + +#: install/index.rst:216 +msgid "Platform" +msgstr "Plateforme" + +#: install/index.rst:216 +msgid "Standard installation location" +msgstr "Emplacement standard de l'installation" + +#: install/index.rst:216 +msgid "Default value" +msgstr "Valeur par défaut" + +#: install/index.rst:742 install/index.rst:754 +msgid "Notes" +msgstr "Notes" + +#: install/index.rst:218 +msgid "Unix (pure)" +msgstr "UNIX (pur)" + +#: install/index.rst:431 +msgid ":file:`{prefix}/lib/python{X.Y}/site-packages`" +msgstr ":file:`{prefix}/lib/python{X.Y}/site-packages`" + +#: install/index.rst:220 +msgid ":file:`/usr/local/lib/python{X.Y}/site-packages`" +msgstr ":file:`/usr/local/lib/python{X.Y}/site-packages`" + +#: install/index.rst:220 install/index.rst:744 +msgid "\\(1)" +msgstr "\\(1)" + +#: install/index.rst:220 +msgid "Unix (non-pure)" +msgstr "UNIX (non-pur)" + +#: install/index.rst:432 +msgid ":file:`{exec-prefix}/lib/python{X.Y}/site-packages`" +msgstr ":file:`{exec-prefix}/lib/python{X.Y}/site-packages`" + +#: install/index.rst:222 +msgid "Windows" +msgstr "Windows" + +#: install/index.rst:483 +msgid ":file:`{prefix}\\\\Lib\\\\site-packages`" +msgstr ":file:`{prefix}\\\\Lib\\\\site-packages`" + +#: install/index.rst:222 +msgid ":file:`C:\\\\Python{XY}\\\\Lib\\\\site-packages`" +msgstr ":file:`C:\\\\Python{XY}\\\\Lib\\\\site-packages`" + +#: install/index.rst:746 +msgid "\\(2)" +msgstr "\\(2)" + +#: install/index.rst:766 +msgid "Notes:" +msgstr "Notes :" + +#: install/index.rst:228 +msgid "" +"Most Linux distributions include Python as a standard part of the system, " +"so :file:`{prefix}` and :file:`{exec-prefix}` are usually both :file:`/usr` " +"on Linux. If you build Python yourself on Linux (or any Unix-like system), " +"the default :file:`{prefix}` and :file:`{exec-prefix}` are :file:`/usr/" +"local`." +msgstr "" +"La plupart des distributions Linux incluent Python comme un élément de base " +"du système, donc :file:`{prefix}` et :file:`{exec-prefix}` sont généralement " +"tous les deux :file:`/usr` sous Linux. Si vous construisez vous-même Python " +"sous Linux (ou tout autre système de type Unix), les valeurs par défaut de :" +"file:`{prefix}` et :file:`{exec-prefix}` sont souvent :file:`/usr/local`." + +#: install/index.rst:234 +msgid "" +"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:237 +#, 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 " +"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 --> " +"Python X.Y --> Python (command line)`. Once the interpreter is started, " +"you type Python code at the prompt. For example, on my Linux system, I type " +"the three Python statements shown below, and get the output as shown, to " +"find out my :file:`{prefix}` and :file:`{exec-prefix}`:" +msgstr "" +":file:`{prefix}` et :file:`{exec-prefix}` désignent les répertoires dans " +"lesquels Python est installé et où il trouve ses bibliothèques lors de " +"l'exécution. Ils sont toujours identiques sous Windows et très souvent les " +"mêmes sous Unix et Mac OS X. Vous pouvez trouver ce que votre installation " +"de Python utilise pour :file:`{prefix}` et :file:`{exec-prefix}` en " +"exécutant Python en mode interactif et en tapant quelques commandes simples. " +"Sous Unix, tapez simplement ``python`` à l'invite du *shell*. Sous Windows, " +"sélectionnez :menuselection:`Démarrer --> Programmes --> Python X.Y --> " +"Python (ligne de commande)`. Une fois l'interpréteur démarré, vous tapez du " +"code Python à l'invite de commande. Par exemple, sur mon système Linux, je " +"tape les trois instructions ci-dessous et obtiens la sortie suivante pour " +"trouver mes :file:`{prefix}` et :file:`{exec-prefix}` :" + +#: install/index.rst:259 +msgid "" +"A few other placeholders are used in this document: :file:`{X.Y}` stands for " +"the version of Python, for example ``3.2``; :file:`{abiflags}` will be " +"replaced by the value of :data:`sys.abiflags` or the empty string for " +"platforms which don't define ABI flags; :file:`{distname}` will be replaced " +"by the name of the module distribution being installed. Dots and " +"capitalization are important in the paths; for example, a value that uses " +"``python3.2`` on UNIX will typically use ``Python32`` on Windows." +msgstr "" +"Quelques autres remplacements utilisés dans ce document : :file:`{X.Y}` " +"représente la version de Python, par exemple ``3.2`` ; :file:`{abiflags}` " +"sera remplacé par la valeur de :data:`sys.abiflags` ou la chaîne vide pour " +"les plateformes qui ne définissent pas d’indicateurs d’ABI ; :file:" +"`{distname}` sera remplacé par le nom de la distribution de modules en train " +"d’être installée. Les points et la capitalisation sont importantes dans les " +"chemins ; par exemple, une valeur qui utilise ``python3.2`` sur Unix " +"utilisera typiquement ``Python32`` sur Windows." + +#: install/index.rst:267 +msgid "" +"If you don't want to install modules to the standard location, or if you " +"don't have permission to write there, then you need to read about alternate " +"installations in section :ref:`inst-alt-install`. If you want to customize " +"your installation directories more heavily, see section :ref:`inst-custom-" +"install` on custom installations." +msgstr "" +"Si vous ne voulez pas installer des modules à l'emplacement standard, ou si " +"vous n'avez pas la permission d'écrire à cet endroit, alors lisez la " +"section :ref:`inst-alt-install` relative aux installations alternatives. Si " +"vous souhaitez personnaliser encore plus vos répertoires d'installation, " +"lisez la section :ref:`inst-custom-install` sur les installations " +"personnalisées." + +#: install/index.rst:277 +msgid "Alternate Installation" +msgstr "Installation alternative" + +#: install/index.rst:279 +msgid "" +"Often, it is necessary or desirable to install modules to a location other " +"than the standard location for third-party Python modules. For example, on " +"a Unix system you might not have permission to write to the standard third-" +"party module directory. Or you might wish to try out a module before making " +"it a standard part of your local Python installation. This is especially " +"true when upgrading a distribution already present: you want to make sure " +"your existing base of scripts still works with the new version before " +"actually upgrading." +msgstr "" +"Il est souvent nécessaire ou désirable d’installer des modules à un " +"emplacement autre que l’emplacement standard pour les modules Python tiers. " +"Par exemple, sur un système Unix il est possible que vous n’ayez pas la " +"permission d’écrire dans le dossier standard pour les modules tiers. Ou vous " +"pouvez vouloir essayer un module avant d’en faire une partie standard de " +"votre installation locale de Python. C’est surtout vrai lors d’une mise à " +"jour d’une distribution déjà présente : vous voulez vous assurer que votre " +"base de scripts fonctionne encore avec la nouvelle version avant de faire la " +"mise à jour pour de bon." + +#: install/index.rst:287 +msgid "" +"The Distutils :command:`install` command is designed to make installing " +"module distributions to an alternate location simple and painless. The " +"basic idea is that you supply a base directory for the installation, and " +"the :command:`install` command picks a set of directories (called an " +"*installation scheme*) under this base directory in which to install files. " +"The details differ across platforms, so read whichever of the following " +"sections applies to you." +msgstr "" +"La commande :command:`install` de Distutils est conçue pour rendre " +"l’installation de distributions de modules à un emplacement alternatif " +"simple et sans douleur. L’idée de base est que vous lui fournissez un " +"dossier de base pour l’installation, et la commande :command:`install` " +"choisit un ensemble de dossiers (appelé le *schéma d’installation*) dans " +"lequel elle installe les fichiers. Les détails diffèrent d’une plateforme à " +"une autre, donc lisez les sections ci-dessous qui s’appliquent à vous." + +#: install/index.rst:295 +msgid "" +"Note that the various alternate installation schemes are mutually exclusive: " +"you can pass ``--user``, or ``--home``, or ``--prefix`` and ``--exec-" +"prefix``, or ``--install-base`` and ``--install-platbase``, but you can't " +"mix from these groups." +msgstr "" +"Notez que les différents schémas d’installation alternative sont " +"mutuellement exclusifs : vous pouvez passer ``--user``, ou ``--home``, ou " +"``--prefix`` et ``--exc-prefix``, ou ``--install-base`` et ``--install-" +"platbase``, mais vous ne pouvez pas mélanger ces groupes." + +#: install/index.rst:304 +msgid "Alternate installation: the user scheme" +msgstr "Installation alternative : le schéma *user*" + +#: install/index.rst:306 +msgid "" +"This scheme is designed to be the most convenient solution for users that " +"don't have write permission to the global site-packages directory or don't " +"want to install into it. It is enabled with a simple option::" +msgstr "" +"Ce schéma est conçu pour être la solution la plus pratique pour les " +"utilisateurs qui n’ont pas la permission d’écrire dans le dossier site-" +"packages global, ou qui ne veulent pas y écrire. Il est activé avec une " +"simple option ::" + +#: install/index.rst:312 +#, 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 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 " +"modules Python purs et les modules d’extension au même endroit (aussi connu " +"sous le nom de :data:`site.USER_SITE`).Voici les valeurs pour UNIX, y " +"compris Mac OS X ::" + +#: install/index.rst:329 install/index.rst:429 install/index.rst:506 +#: install/index.rst:754 +msgid "Type of file" +msgstr "Type de fichier" + +#: install/index.rst:329 install/index.rst:429 install/index.rst:481 +msgid "Installation directory" +msgstr "Dossier d'installation" + +#: install/index.rst:331 install/index.rst:483 +msgid "modules" +msgstr "modules" + +#: install/index.rst:320 +msgid ":file:`{userbase}/lib/python{X.Y}/site-packages`" +msgstr ":file:`{userbase}/lib/python{X.Y}/site-packages`" + +#: install/index.rst:332 install/index.rst:433 install/index.rst:511 +msgid "scripts" +msgstr "scripts" + +#: install/index.rst:321 +msgid ":file:`{userbase}/bin`" +msgstr ":file:`{userbase}/bin`" + +#: install/index.rst:333 install/index.rst:434 install/index.rst:512 +msgid "data" +msgstr "données" + +#: install/index.rst:333 +msgid ":file:`{userbase}`" +msgstr ":file:`{userbase}`" + +#: install/index.rst:334 install/index.rst:435 install/index.rst:513 +msgid "C headers" +msgstr "en-têtes C" + +#: install/index.rst:323 +msgid ":file:`{userbase}/include/python{X.Y}{abiflags}/{distname}`" +msgstr ":file:`{userbase}/include/python{X.Y}{abiflags}/{distname}`" + +#: install/index.rst:326 +msgid "And here are the values used on Windows:" +msgstr "Et voici les valeurs utilisées sur Windows ::" + +#: install/index.rst:331 +msgid ":file:`{userbase}\\\\Python{XY}\\\\site-packages`" +msgstr ":file:`{userbase}\\\\Python{XY}\\\\site-packages`" + +#: install/index.rst:332 +msgid ":file:`{userbase}\\\\Python{XY}\\\\Scripts`" +msgstr ":file:`{userbase}\\\\Python{XY}\\\\Scripts`" + +#: install/index.rst:334 +msgid ":file:`{userbase}\\\\Python{XY}\\\\Include\\\\{distname}`" +msgstr ":file:`{userbase}\\\\Python{XY}\\\\Include\\\\{distname}`" + +#: install/index.rst:337 +msgid "" +"The advantage of using this scheme compared to the other ones described " +"below is that the user site-packages directory is under normal conditions " +"always included in :data:`sys.path` (see :mod:`site` for more information), " +"which means that there is no additional step to perform after running the :" +"file:`setup.py` script to finalize the installation." +msgstr "" +"L’avantage d’utiliser ce schéma plutôt que les autres décrits plus bas est " +"que le dossier site-package du schéma *user* est en temps normal toujours " +"inclus dans :data:`sys.path` (voir :mod:`site` pour plus d’informations), ce " +"qui signifie qu’il n’y a rien d’autre à faire après avoir exécuté le script :" +"file:`setup.py` pour finaliser l’installation." + +#: install/index.rst:343 +msgid "" +"The :command:`build_ext` command also has a ``--user`` option to add :file:" +"`{userbase}/include` to the compiler search path for header files and :file:" +"`{userbase}/lib` to the compiler search path for libraries as well as to the " +"runtime search path for shared C libraries (rpath)." +msgstr "" +"La commande :command:`build_ext` possède aussi une option ``--user`` pour " +"ajouter :file:`{userbase}/include` dans les chemins où le compilateur " +"recherche les fichiers d'en-têtes et :file:`{userbase}/lib` dans les chemins " +"où le compilateur recherche les bibliothèques ainsi que les bibliothèques C " +"partagées chargeables à l'exécution (``rpath``)." + +#: install/index.rst:352 +msgid "Alternate installation: the home scheme" +msgstr "Installation alternative : le schéma *home*" + +#: install/index.rst:354 +msgid "" +"The idea behind the \"home scheme\" is that you build and maintain a " +"personal stash of Python modules. This scheme's name is derived from the " +"idea of a \"home\" directory on Unix, since it's not unusual for a Unix user " +"to make their home directory have a layout similar to :file:`/usr/` or :file:" +"`/usr/local/`. This scheme can be used by anyone, regardless of the " +"operating system they are installing for." +msgstr "" +"L’idée derrière le « schéma home » est que vous compilez et maintenez un " +"espace personnel de modules Python. Le nom de ce schéma vient de l’idée du " +"dossier « home » sur Unix, vu qu’il n’est pas rare pour un utilisateur UNIX " +"d'agencer son dossier *home* avec la même disposition que :file:`/usr/` ou :" +"file:`/usr/local/`. Ce schéma peut être utilisé par n’importe qui, quel que " +"soit le système d’exploitation." + +#: install/index.rst:361 +msgid "Installing a new module distribution is as simple as ::" +msgstr "Installer une nouvelle distribution de module est aussi simple que ::" + +#: install/index.rst:365 +msgid "" +"where you can supply any directory you like for the :option:`!--home` " +"option. On Unix, lazy typists can just type a tilde (``~``); the :command:" +"`install` command will expand this to your home directory::" +msgstr "" +"où vous pouvez fournir le dossier de votre choix à l’option :option:`!--" +"home`. Sur Unix, les paresseux peuvent mettre un simple tilde (``~``) ; la " +"commande :command:`install` le remplacera par le chemin vers votre dossier " +"personnel ::" + +#: install/index.rst:371 +msgid "" +"To make Python find the distributions installed with this scheme, you may " +"have to :ref:`modify Python's search path ` or edit :mod:" +"`sitecustomize` (see :mod:`site`) to call :func:`site.addsitedir` or edit :" +"data:`sys.path`." +msgstr "" +"Pour que Python puisse trouver les distributions installées avec ce schéma, " +"vous devez :ref:`modifier le chemin de recherche de Python ` ou modifier :mod:`sitecustomize` (voir :mod:`site`) pour appeler :" +"func:`site.addsitedir` ou modifier :data:`sys.path`." + +#: install/index.rst:376 +msgid "" +"The :option:`!--home` option defines the installation base directory. Files " +"are installed to the following directories under the installation base as " +"follows:" +msgstr "" +"L’option :option:`!--home` définit le dossier de base de l’installation. Les " +"fichiers sont installés dans les dossiers suivants sous la base de " +"l'installation de la façon suivante ::" + +#: install/index.rst:382 +msgid ":file:`{home}/lib/python`" +msgstr ":file:`{home}/lib/python`" + +#: install/index.rst:383 +msgid ":file:`{home}/bin`" +msgstr ":file:`{home}/bin`" + +#: install/index.rst:384 +msgid ":file:`{home}`" +msgstr ":file:`{home}`" + +#: install/index.rst:385 +msgid ":file:`{home}/include/python/{distname}`" +msgstr ":file:`{home}/include/python/{distname}`" + +#: install/index.rst:388 +msgid "(Mentally replace slashes with backslashes if you're on Windows.)" +msgstr "" +"(Remplacez mentalement les slashs avec des antislashs si vous êtes sur " +"Windows.)" + +#: install/index.rst:394 +msgid "Alternate installation: Unix (the prefix scheme)" +msgstr "Installation alternative : Unix (le schéma de préfixe)" + +#: install/index.rst:396 +msgid "" +"The \"prefix scheme\" is useful when you wish to use one Python installation " +"to perform the build/install (i.e., to run the setup script), but install " +"modules into the third-party module directory of a different Python " +"installation (or something that looks like a different Python " +"installation). If this sounds a trifle unusual, it is---that's why the user " +"and home schemes come before. However, there are at least two known cases " +"where the prefix scheme will be useful." +msgstr "" +"Le schéma de préfixe est utile quand vous voulez une installation de Python " +"pour faire la compilation/l’installation (c.-à-d. exécuter le script " +"*setup*), mais utiliser les modules tiers d’une installation Python " +"différente (ou quelque chose qui ressemble à une installation Python " +"différente). Si cela vous semble inhabituel, ça l’est — c’est pourquoi les " +"schémas *user* et *home* viennent avant. Cependant, il y a au moins deux cas " +"connus où le schéma *prefix* est utile." + +#: install/index.rst:403 +msgid "" +"First, consider that many Linux distributions put Python in :file:`/usr`, " +"rather than the more traditional :file:`/usr/local`. This is entirely " +"appropriate, since in those cases Python is part of \"the system\" rather " +"than a local add-on. However, if you are installing Python modules from " +"source, you probably want them to go in :file:`/usr/local/lib/python2.{X}` " +"rather than :file:`/usr/lib/python2.{X}`. This can be done with ::" +msgstr "" +"Premièrement, considérez que beaucoup de distributions Linux mettent Python " +"dans :file:`/usr`, plutôt que le traditionnel :file:`/usr/local`. C’est tout " +"à fait approprié, puisque dans ces cas Python fait partie du « système » " +"plutôt que d’une addition locale. Cependant, si vous installez des modules " +"Python depuis leur source, vous voulez probablement qu’ils aillent dans :" +"file:`/usr/local/lib/python2.{X}` plutôt que dans :file:`/usr/lib/python2.{X}" +"`. Ça peut être fait avec ::" + +#: install/index.rst:412 +msgid "" +"Another possibility is a network filesystem where the name used to write to " +"a remote directory is different from the name used to read it: for example, " +"the Python interpreter accessed as :file:`/usr/local/bin/python` might " +"search for modules in :file:`/usr/local/lib/python2.{X}`, but those modules " +"would have to be installed to, say, :file:`/mnt/{@server}/export/lib/python2." +"{X}`. This could be done with ::" +msgstr "" +"Une autre possibilité est un système de fichiers réseau où le nom utilisé " +"pour écrire dans un dossier distant est différent du nom utilisé pour le " +"lire : par exemple, l’interpréteur Python auquel on accède par :file:`/usr/" +"local/bin/python` peut chercher les modules dans :file:`/usr/local/lib/" +"python2.{X}`, mais ces modules doivent être installés dans, par exemple, :" +"file:`/mnt/{@server}/export/lib/python2.{X}`. Ça peut être fait avec ::" + +#: install/index.rst:421 +msgid "" +"In either case, the :option:`!--prefix` option defines the installation " +"base, and the :option:`!--exec-prefix` option defines the platform-specific " +"installation base, which is used for platform-specific files. (Currently, " +"this just means non-pure module distributions, but could be expanded to C " +"libraries, binary executables, etc.) If :option:`!--exec-prefix` is not " +"supplied, it defaults to :option:`!--prefix`. Files are installed as " +"follows:" +msgstr "" +"Dans les deux cas, l’option :option:`!--prefix` définit la base de " +"l’installation et l’option :option:`!--exec-prefix` définit la base " +"d’installation spécifique à la plateforme, qui est utilisée pour des " +"fichiers spécifiques à la plateforme (actuellement, ça ne concerne que les " +"distributions de modules non-purs, mais cela pourrait être étendu aux " +"bibliothèques C, exécutables, etc.). Si l'option :option:`!--exec-prefix` " +"n’est pas fournie, elle vaut par défaut :option:`!--prefix`. Les fichiers " +"sont installés ainsi :" + +#: install/index.rst:508 +msgid "Python modules" +msgstr "Modules Python" + +#: install/index.rst:509 +msgid "extension modules" +msgstr "modules d'extension" + +#: install/index.rst:433 +msgid ":file:`{prefix}/bin`" +msgstr ":file:`{prefix}/bin`" + +#: install/index.rst:485 +msgid ":file:`{prefix}`" +msgstr ":file:`{prefix}`" + +#: install/index.rst:435 +msgid ":file:`{prefix}/include/python{X.Y}{abiflags}/{distname}`" +msgstr ":file:`{prefix}/include/python{X.Y}{abiflags}/{distname}`" + +#: install/index.rst:438 +msgid "" +"There is no requirement that :option:`!--prefix` or :option:`!--exec-prefix` " +"actually point to an alternate Python installation; if the directories " +"listed above do not already exist, they are created at installation time." +msgstr "" +"Il n'est pas obligatoire que :option:`!--prefix` ou :option:`!--exec-prefix` " +"pointent vers une installation alternative de Python. Si les dossiers listés " +"ci-dessus n’existent pas, ils sont créés au moment de l’installation." + +#: install/index.rst:442 +msgid "" +"Incidentally, the real reason the prefix scheme is important is simply that " +"a standard Unix installation uses the prefix scheme, but with :option:`!--" +"prefix` and :option:`!--exec-prefix` supplied by Python itself as ``sys." +"prefix`` and ``sys.exec_prefix``. Thus, you might think you'll never use " +"the prefix scheme, but every time you run ``python setup.py install`` " +"without any other options, you're using it." +msgstr "" +"Accessoirement, la vraie raison pour laquelle le schéma *prefix* est " +"important est simplement qu’une installation Unix standard utilise le schéma " +"*prefix*, mais avec les options :option:`!--prefix` et :option:`!--exec-" +"prefix` fournies par Python lui-même en tant que ``sys.prefix`` et ``sys." +"exec_prefix``. Vous pouvez donc penser que vous n’utiliserez jamais le " +"schéma *prefix*, mais à chaque fois que vous lancez ``python setup.py " +"install`` sans autre option, vous l’utilisez." + +#: install/index.rst:449 +msgid "" +"Note that installing extensions to an alternate Python installation has no " +"effect on how those extensions are built: in particular, the Python header " +"files (:file:`Python.h` and friends) installed with the Python interpreter " +"used to run the setup script will be used in compiling extensions. It is " +"your responsibility to ensure that the interpreter used to run extensions " +"installed in this way is compatible with the interpreter used to build " +"them. The best way to do this is to ensure that the two interpreters are " +"the same version of Python (possibly different builds, or possibly copies of " +"the same build). (Of course, if your :option:`!--prefix` and :option:`!--" +"exec-prefix` don't even point to an alternate Python installation, this is " +"immaterial.)" +msgstr "" +"Notez qu’installer des extensions à une installation Python alternative n’a " +"aucun effet sur la façon dont ces extensions sont construites. En " +"particulier, les fichiers en-têtes de Python (:file:`Python.h` et ses amis) " +"installés avec l’interpréteur Python utilisé pour exécuter le script *setup* " +"seront utilisés pour compiler les extensions. Il est de votre responsabilité " +"de vous assurer que l’interpréteur utilisé pour exécuter les extensions " +"installées de cette façon est compatible avec celui utilisé pour les " +"compiler. La meilleure façon pour cela est de s’assurer qu’ils sont " +"exactement la même version de Python (possiblement des compilations " +"différentes, ou différentes copies de la même). (Évidemment, si vos :option:" +"`!--prefix` et :option:`!--exec-prefix` ne pointent pas vers une " +"installation alternative de Python, cela n’a pas de sens.)" + +#: install/index.rst:464 +msgid "Alternate installation: Windows (the prefix scheme)" +msgstr "Installation alternative : Windows (le schéma de préfixe)" + +#: install/index.rst:466 +msgid "" +"Windows has no concept of a user's home directory, and since the standard " +"Python installation under Windows is simpler than under Unix, the :option:" +"`!--prefix` option has traditionally been used to install additional " +"packages in separate locations on Windows. ::" +msgstr "" +"Windows n'a pas de concept de répertoire utilisateur, et comme " +"l'installation standard de Python sur Windows est plus simple que sur Unix, " +"l':option:`!--prefix` option a traditionnellement été utilisée pour " +"installer des paquets supplémentaires à des endroits séparés sur Windows. ::" + +#: install/index.rst:473 +msgid "" +"to install modules to the :file:`\\\\Temp\\\\Python` directory on the " +"current drive." +msgstr "" +"pour installer des modules dans le dossier :file:`\\\\Temp\\\\Python` du " +"disque courant." + +#: install/index.rst:475 +msgid "" +"The installation base is defined by the :option:`!--prefix` option; the :" +"option:`!--exec-prefix` option is not supported under Windows, which means " +"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:484 +msgid ":file:`{prefix}\\\\Scripts`" +msgstr ":file:`{prefix}\\\\Scripts`" + +#: install/index.rst:486 +msgid ":file:`{prefix}\\\\Include\\\\{distname}`" +msgstr ":file:`{prefix}\\\\Include\\\\{distname}`" + +#: install/index.rst:493 +msgid "Custom Installation" +msgstr "Installation personnalisée" + +#: install/index.rst:495 +msgid "" +"Sometimes, the alternate installation schemes described in section :ref:" +"`inst-alt-install` just don't do what you want. You might want to tweak " +"just one or two directories while keeping everything under the same base " +"directory, or you might want to completely redefine the installation " +"scheme. In either case, you're creating a *custom installation scheme*." +msgstr "" +"Parfois, les procédés d'installation alternatifs décrits dans la section :" +"ref:`inst-alt-install` ne font pas ce que vous attendiez. Vous pourriez " +"vouloir modifier seulement un ou deux répertoires en conservant tout le " +"reste sous la même racine, ou vouloir redéfinir l'ensemble du procédé " +"d'installation. Quel que soit le cas, vous créez ainsi un *procédé " +"d'installation personnalisé*." + +#: install/index.rst:501 +msgid "" +"To create a custom installation scheme, you start with one of the alternate " +"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:506 +msgid "Override option" +msgstr "Option" + +#: install/index.rst:508 +msgid "``--install-purelib``" +msgstr "``--install-purelib``" + +#: install/index.rst:509 +msgid "``--install-platlib``" +msgstr "``--install-platlib``" + +#: install/index.rst:510 +msgid "all modules" +msgstr "tous les modules" + +#: install/index.rst:510 +msgid "``--install-lib``" +msgstr "``--install-lib``" + +#: install/index.rst:511 +msgid "``--install-scripts``" +msgstr "``--install-scripts``" + +#: install/index.rst:512 +msgid "``--install-data``" +msgstr "``--install-data``" + +#: install/index.rst:513 +msgid "``--install-headers``" +msgstr "``--install-headers``" + +#: install/index.rst:516 +msgid "" +"These override options can be relative, absolute, or explicitly defined in " +"terms of one of the installation base directories. (There are two " +"installation base directories, and they are normally the same---they only " +"differ when you use the Unix \"prefix scheme\" and supply different ``--" +"prefix`` and ``--exec-prefix`` options; using ``--install-lib`` will " +"override values computed or given for ``--install-purelib`` and ``--install-" +"platlib``, and is recommended for schemes that don't make a difference " +"between Python and extension modules.)" +msgstr "" + +#: install/index.rst:525 +msgid "" +"For example, say you're installing a module distribution to your home " +"directory under Unix---but you want scripts to go in :file:`~/scripts` " +"rather than :file:`~/bin`. As you might expect, you can override this " +"directory with the :option:`!--install-scripts` option; in this case, it " +"makes most sense to supply a relative path, which will be interpreted " +"relative to the installation base directory (your home directory, in this " +"case)::" +msgstr "" + +#: install/index.rst:534 +msgid "" +"Another Unix example: suppose your Python installation was built and " +"installed with a prefix of :file:`/usr/local/python`, so under a standard " +"installation scripts will wind up in :file:`/usr/local/python/bin`. If you " +"want them in :file:`/usr/local/bin` instead, you would supply this absolute " +"directory for the :option:`!--install-scripts` option::" +msgstr "" + +#: install/index.rst:542 +msgid "" +"(This performs an installation using the \"prefix scheme\", where the prefix " +"is whatever your Python interpreter was installed with--- :file:`/usr/local/" +"python` in this case.)" +msgstr "" + +#: install/index.rst:546 +msgid "" +"If you maintain Python on Windows, you might want third-party modules to " +"live in a subdirectory of :file:`{prefix}`, rather than right in :file:" +"`{prefix}` itself. This is almost as easy as customizing the script " +"installation directory---you just have to remember that there are two types " +"of modules to worry about, Python and extension modules, which can " +"conveniently be both controlled by one option::" +msgstr "" + +#: install/index.rst:555 +msgid "" +"The specified installation directory is relative to :file:`{prefix}`. Of " +"course, you also have to ensure that this directory is in Python's module " +"search path, such as by putting a :file:`.pth` file in a site directory " +"(see :mod:`site`). See section :ref:`inst-search-path` to find out how to " +"modify Python's search path." +msgstr "" + +#: install/index.rst:561 +msgid "" +"If you want to define an entire installation scheme, you just have to supply " +"all of the installation directory options. The recommended way to do this " +"is to supply relative paths; for example, if you want to maintain all Python " +"module-related files under :file:`python` in your home directory, and you " +"want a separate directory for each platform that you use your home directory " +"from, you might define the following installation scheme::" +msgstr "" + +#: install/index.rst:574 +msgid "or, equivalently, ::" +msgstr "ou ::" + +#: install/index.rst:582 +msgid "" +"``$PLAT`` is not (necessarily) an environment variable---it will be expanded " +"by the Distutils as it parses your command line options, just as it does " +"when parsing your configuration file(s)." +msgstr "" + +#: install/index.rst:586 +msgid "" +"Obviously, specifying the entire installation scheme every time you install " +"a new module distribution would be very tedious. Thus, you can put these " +"options into your Distutils config file (see section :ref:`inst-config-" +"files`):" +msgstr "" + +#: install/index.rst:599 +msgid "or, equivalently," +msgstr "ou (équivalent)," + +#: install/index.rst:610 +msgid "" +"Note that these two are *not* equivalent if you supply a different " +"installation base directory when you run the setup script. For example, ::" +msgstr "" + +#: install/index.rst:615 +msgid "" +"would install pure modules to :file:`/tmp/python/lib` in the first case, and " +"to :file:`/tmp/lib` in the second case. (For the second case, you probably " +"want to supply an installation base of :file:`/tmp/python`.)" +msgstr "" + +#: install/index.rst:619 +msgid "" +"You probably noticed the use of ``$HOME`` and ``$PLAT`` in the sample " +"configuration file input. These are Distutils configuration variables, " +"which bear a strong resemblance to environment variables. In fact, you can " +"use environment variables in config files on platforms that have such a " +"notion but the Distutils additionally define a few extra variables that may " +"not be in your environment, such as ``$PLAT``. (And of course, on systems " +"that don't have environment variables, such as Mac OS 9, the configuration " +"variables supplied by the Distutils are the only ones you can use.) See " +"section :ref:`inst-config-files` for details." +msgstr "" + +#: install/index.rst:629 +msgid "" +"When a :ref:`virtual environment ` is activated, any options that " +"change the installation path will be ignored from all distutils " +"configuration files to prevent inadvertently installing projects outside of " +"the virtual environment." +msgstr "" + +#: install/index.rst:643 +msgid "Modifying Python's Search Path" +msgstr "" + +#: install/index.rst:645 +msgid "" +"When the Python interpreter executes an :keyword:`import` statement, it " +"searches for both Python code and extension modules along a search path. A " +"default value for the path is configured into the Python binary when the " +"interpreter is built. You can determine the path by importing the :mod:`sys` " +"module and printing the value of ``sys.path``. ::" +msgstr "" + +#: install/index.rst:662 +msgid "" +"The null string in ``sys.path`` represents the current working directory." +msgstr "" + +#: install/index.rst:664 +msgid "" +"The expected convention for locally installed packages is to put them in " +"the :file:`{...}/site-packages/` directory, but you may want to install " +"Python modules into some arbitrary directory. For example, your site may " +"have a convention of keeping all software related to the web server under :" +"file:`/www`. Add-on Python modules might then belong in :file:`/www/python`, " +"and in order to import them, this directory must be added to ``sys.path``. " +"There are several different ways to add the directory." +msgstr "" + +#: install/index.rst:672 +msgid "" +"The most convenient way is to add a path configuration file to a directory " +"that's already on Python's path, usually to the :file:`.../site-packages/` " +"directory. Path configuration files have an extension of :file:`.pth`, and " +"each line must contain a single path that will be appended to ``sys.path``. " +"(Because the new paths are appended to ``sys.path``, modules in the added " +"directories will not override standard modules. This means you can't use " +"this mechanism for installing fixed versions of standard modules.)" +msgstr "" + +#: install/index.rst:680 +msgid "" +"Paths can be absolute or relative, in which case they're relative to the " +"directory containing the :file:`.pth` file. See the documentation of the :" +"mod:`site` module for more information." +msgstr "" + +#: install/index.rst:684 +msgid "" +"A slightly less convenient way is to edit the :file:`site.py` file in " +"Python's standard library, and modify ``sys.path``. :file:`site.py` is " +"automatically imported when the Python interpreter is executed, unless the :" +"option:`-S` switch is supplied to suppress this behaviour. So you could " +"simply edit :file:`site.py` and add two lines to it:" +msgstr "" + +#: install/index.rst:695 +msgid "" +"However, if you reinstall the same major version of Python (perhaps when " +"upgrading from 2.2 to 2.2.2, for example) :file:`site.py` will be " +"overwritten by the stock version. You'd have to remember that it was " +"modified and save a copy before doing the installation." +msgstr "" + +#: install/index.rst:700 +msgid "" +"There are two environment variables that can modify ``sys.path``. :envvar:" +"`PYTHONHOME` sets an alternate value for the prefix of the Python " +"installation. For example, if :envvar:`PYTHONHOME` is set to ``/www/" +"python``, the search path will be set to ``['', '/www/python/lib/pythonX." +"Y/', '/www/python/lib/pythonX.Y/plat-linux2', ...]``." +msgstr "" + +#: install/index.rst:706 +msgid "" +"The :envvar:`PYTHONPATH` variable can be set to a list of paths that will be " +"added to the beginning of ``sys.path``. For example, if :envvar:" +"`PYTHONPATH` is set to ``/www/python:/opt/py``, the search path will begin " +"with ``['/www/python', '/opt/py']``. (Note that directories must exist in " +"order to be added to ``sys.path``; the :mod:`site` module removes paths that " +"don't exist.)" +msgstr "" + +#: install/index.rst:713 +msgid "" +"Finally, ``sys.path`` is just a regular Python list, so any Python " +"application can modify it by adding or removing entries." +msgstr "" + +#: install/index.rst:720 +msgid "Distutils Configuration Files" +msgstr "" + +#: install/index.rst:722 +msgid "" +"As mentioned above, you can use Distutils configuration files to record " +"personal or site preferences for any Distutils options. That is, any option " +"to any command can be stored in one of two or three (depending on your " +"platform) configuration files, which will be consulted before the command-" +"line is parsed. This means that configuration files will override default " +"values, and the command-line will in turn override configuration files. " +"Furthermore, if multiple configuration files apply, values from \"earlier\" " +"files are overridden by \"later\" files." +msgstr "" + +#: install/index.rst:735 +msgid "Location and names of config files" +msgstr "" + +#: install/index.rst:737 +msgid "" +"The names and locations of the configuration files vary slightly across " +"platforms. On Unix and macOS, the three configuration files (in the order " +"they are processed) are:" +msgstr "" + +#: install/index.rst:754 +msgid "Location and filename" +msgstr "" + +#: install/index.rst:756 +msgid "system" +msgstr "" + +#: install/index.rst:744 +msgid ":file:`{prefix}/lib/python{ver}/distutils/distutils.cfg`" +msgstr ":file:`{prefix}/lib/python{ver}/distutils/distutils.cfg`" + +#: install/index.rst:758 +msgid "personal" +msgstr "" + +#: install/index.rst:746 +msgid ":file:`$HOME/.pydistutils.cfg`" +msgstr ":file:`$HOME/.pydistutils.cfg`" + +#: install/index.rst:760 +msgid "local" +msgstr "" + +#: install/index.rst:760 +msgid ":file:`setup.cfg`" +msgstr ":file:`setup.cfg`" + +#: install/index.rst:760 +msgid "\\(3)" +msgstr "\\(3)" + +#: install/index.rst:751 +msgid "And on Windows, the configuration files are:" +msgstr "" + +#: install/index.rst:756 +msgid ":file:`{prefix}\\\\Lib\\\\distutils\\\\distutils.cfg`" +msgstr ":file:`{prefix}\\\\Lib\\\\distutils\\\\distutils.cfg`" + +#: install/index.rst:756 +msgid "\\(4)" +msgstr "\\(4)" + +#: install/index.rst:758 +msgid ":file:`%HOME%\\\\pydistutils.cfg`" +msgstr ":file:`%HOME%\\\\pydistutils.cfg`" + +#: install/index.rst:758 +msgid "\\(5)" +msgstr "\\(5)" + +#: install/index.rst:763 +msgid "" +"On all platforms, the \"personal\" file can be temporarily disabled by " +"passing the ``--no-user-cfg`` option." +msgstr "" + +#: install/index.rst:769 +msgid "" +"Strictly speaking, the system-wide configuration file lives in the directory " +"where the Distutils are installed; under Python 1.6 and later on Unix, this " +"is as shown. For Python 1.5.2, the Distutils will normally be installed to :" +"file:`{prefix}/lib/python1.5/site-packages/distutils`, so the system " +"configuration file should be put there under Python 1.5.2." +msgstr "" + +#: install/index.rst:776 +msgid "" +"On Unix, if the :envvar:`HOME` environment variable is not defined, the " +"user's home directory will be determined with the :func:`getpwuid` function " +"from the standard :mod:`pwd` module. This is done by the :func:`os.path." +"expanduser` function used by Distutils." +msgstr "" + +#: install/index.rst:782 +msgid "" +"I.e., in the current directory (usually the location of the setup script)." +msgstr "" + +#: install/index.rst:785 +msgid "" +"(See also note (1).) Under Python 1.6 and later, Python's default " +"\"installation prefix\" is :file:`C:\\\\Python`, so the system configuration " +"file is normally :file:`C:\\\\Python\\\\Lib\\\\distutils\\\\distutils.cfg`. " +"Under Python 1.5.2, the default prefix was :file:`C:\\\\Program Files\\" +"\\Python`, and the Distutils were not part of the standard library---so the " +"system configuration file would be :file:`C:\\\\Program Files\\\\Python\\" +"\\distutils\\\\distutils.cfg` in a standard Python 1.5.2 installation under " +"Windows." +msgstr "" + +#: install/index.rst:794 +msgid "" +"On Windows, if the :envvar:`HOME` environment variable is not defined, :" +"envvar:`USERPROFILE` then :envvar:`HOMEDRIVE` and :envvar:`HOMEPATH` will be " +"tried. This is done by the :func:`os.path.expanduser` function used by " +"Distutils." +msgstr "" + +#: install/index.rst:803 +msgid "Syntax of config files" +msgstr "" + +#: install/index.rst:805 +msgid "" +"The Distutils configuration files all have the same syntax. The config " +"files are grouped into sections. There is one section for each Distutils " +"command, plus a ``global`` section for global options that affect every " +"command. Each section consists of one option per line, specified as " +"``option=value``." +msgstr "" + +#: install/index.rst:810 +msgid "" +"For example, the following is a complete config file that just forces all " +"commands to run quietly by default:" +msgstr "" + +#: install/index.rst:818 +msgid "" +"If this is installed as the system config file, it will affect all " +"processing of any Python module distribution by any user on the current " +"system. If it is installed as your personal config file (on systems that " +"support them), it will affect only module distributions processed by you. " +"And if it is used as the :file:`setup.cfg` for a particular module " +"distribution, it affects only that distribution." +msgstr "" + +#: install/index.rst:825 +msgid "" +"You could override the default \"build base\" directory and make the :" +"command:`build\\*` commands always forcibly rebuild all files with the " +"following:" +msgstr "" + +#: install/index.rst:835 +msgid "which corresponds to the command-line arguments ::" +msgstr "" + +#: install/index.rst:839 +msgid "" +"except that including the :command:`build` command on the command-line means " +"that command will be run. Including a particular command in config files " +"has no such implication; it only means that if the command is run, the " +"options in the config file will apply. (Or if other commands that derive " +"values from it are run, they will use the values in the config file.)" +msgstr "" + +#: install/index.rst:845 +msgid "" +"You can find out the complete list of options for any command using the :" +"option:`!--help` option, e.g.::" +msgstr "" + +#: install/index.rst:850 +msgid "" +"and you can find out the complete list of global options by using :option:" +"`!--help` without a command::" +msgstr "" + +#: install/index.rst:855 +msgid "" +"See also the \"Reference\" section of the \"Distributing Python Modules\" " +"manual." +msgstr "" + +#: install/index.rst:861 +msgid "Building Extensions: Tips and Tricks" +msgstr "" + +#: install/index.rst:863 +msgid "" +"Whenever possible, the Distutils try to use the configuration information " +"made available by the Python interpreter used to run the :file:`setup.py` " +"script. For example, the same compiler and linker flags used to compile " +"Python will also be used for compiling extensions. Usually this will work " +"well, but in complicated situations this might be inappropriate. This " +"section discusses how to override the usual Distutils behaviour." +msgstr "" + +#: install/index.rst:874 +msgid "Tweaking compiler/linker flags" +msgstr "" + +#: install/index.rst:876 +msgid "" +"Compiling a Python extension written in C or C++ will sometimes require " +"specifying custom flags for the compiler and linker in order to use a " +"particular library or produce a special kind of object code. This is " +"especially true if the extension hasn't been tested on your platform, or if " +"you're trying to cross-compile Python." +msgstr "" + +#: install/index.rst:882 +msgid "" +"In the most general case, the extension author might have foreseen that " +"compiling the extensions would be complicated, and provided a :file:`Setup` " +"file for you to edit. This will likely only be done if the module " +"distribution contains many separate extension modules, or if they often " +"require elaborate sets of compiler flags in order to work." +msgstr "" + +#: install/index.rst:888 +msgid "" +"A :file:`Setup` file, if present, is parsed in order to get a list of " +"extensions to build. Each line in a :file:`Setup` describes a single " +"module. Lines have the following structure::" +msgstr "" + +#: install/index.rst:895 +msgid "Let's examine each of the fields in turn." +msgstr "" + +#: install/index.rst:897 +msgid "" +"*module* is the name of the extension module to be built, and should be a " +"valid Python identifier. You can't just change this in order to rename a " +"module (edits to the source code would also be needed), so this should be " +"left alone." +msgstr "" + +#: install/index.rst:901 +msgid "" +"*sourcefile* is anything that's likely to be a source code file, at least " +"judging by the filename. Filenames ending in :file:`.c` are assumed to be " +"written in C, filenames ending in :file:`.C`, :file:`.cc`, and :file:`.c++` " +"are assumed to be C++, and filenames ending in :file:`.m` or :file:`.mm` are " +"assumed to be in Objective C." +msgstr "" + +#: install/index.rst:907 +msgid "" +"*cpparg* is an argument for the C preprocessor, and is anything starting " +"with :option:`!-I`, :option:`!-D`, :option:`!-U` or :option:`!-C`." +msgstr "" + +#: install/index.rst:910 +msgid "" +"*library* is anything ending in :file:`.a` or beginning with :option:`!-l` " +"or :option:`!-L`." +msgstr "" + +#: install/index.rst:913 +msgid "" +"If a particular platform requires a special library on your platform, you " +"can add it by editing the :file:`Setup` file and running ``python setup.py " +"build``. For example, if the module defined by the line ::" +msgstr "" + +#: install/index.rst:919 +msgid "" +"must be linked with the math library :file:`libm.a` on your platform, simply " +"add :option:`!-lm` to the line::" +msgstr "" + +#: install/index.rst:924 +msgid "" +"Arbitrary switches intended for the compiler or the linker can be supplied " +"with the :option:`!-Xcompiler` *arg* and :option:`!-Xlinker` *arg* options::" +msgstr "" + +#: install/index.rst:929 +msgid "" +"The next option after :option:`!-Xcompiler` and :option:`!-Xlinker` will be " +"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++``." +msgstr "" + +#: install/index.rst:936 +msgid "" +"Compiler flags can also be supplied through setting the :envvar:`CFLAGS` " +"environment variable. If set, the contents of :envvar:`CFLAGS` will be " +"added to the compiler flags specified in the :file:`Setup` file." +msgstr "" + +#: install/index.rst:944 +msgid "Using non-Microsoft compilers on Windows" +msgstr "" + +#: install/index.rst:951 +msgid "Borland/CodeGear C++" +msgstr "" + +#: install/index.rst:953 +msgid "" +"This subsection describes the necessary steps to use Distutils with the " +"Borland C++ compiler version 5.5. First you have to know that Borland's " +"object file format (OMF) is different from the format used by the Python " +"version you can download from the Python or ActiveState web site. (Python " +"is built with Microsoft Visual C++, which uses COFF as the object file " +"format.) For this reason you have to convert Python's library :file:" +"`python25.lib` into the Borland format. You can do this as follows:" +msgstr "" + +#: install/index.rst:968 +msgid "" +"The :file:`coff2omf` program comes with the Borland compiler. The file :" +"file:`python25.lib` is in the :file:`Libs` directory of your Python " +"installation. If your extension uses other libraries (zlib, ...) you have " +"to convert them too." +msgstr "" + +#: install/index.rst:973 +msgid "" +"The converted files have to reside in the same directories as the normal " +"libraries." +msgstr "" + +#: install/index.rst:976 +msgid "" +"How does Distutils manage to use these libraries with their changed names? " +"If the extension needs a library (eg. :file:`foo`) Distutils checks first if " +"it finds a library with suffix :file:`_bcpp` (eg. :file:`foo_bcpp.lib`) and " +"then uses this library. In the case it doesn't find such a special library " +"it uses the default name (:file:`foo.lib`.) [#]_" +msgstr "" + +#: install/index.rst:982 +msgid "" +"To let Distutils compile your extension with Borland C++ you now have to " +"type::" +msgstr "" + +#: install/index.rst:986 +msgid "" +"If you want to use the Borland C++ compiler as the default, you could " +"specify this in your personal or system-wide configuration file for " +"Distutils (see section :ref:`inst-config-files`.)" +msgstr "" + +#: install/index.rst:995 +msgid "`C++Builder Compiler `_" +msgstr "" + +#: install/index.rst:994 +msgid "" +"Information about the free C++ compiler from Borland, including links to the " +"download pages." +msgstr "" + +#: install/index.rst:998 +msgid "" +"`Creating Python Extensions Using Borland's Free Compiler `_" +msgstr "" + +#: install/index.rst:998 +msgid "" +"Document describing how to use Borland's free command-line C++ compiler to " +"build Python." +msgstr "" + +#: install/index.rst:1003 +msgid "GNU C / Cygwin / MinGW" +msgstr "" + +#: install/index.rst:1005 +msgid "" +"This section describes the necessary steps to use Distutils with the GNU C/C+" +"+ compilers in their Cygwin and MinGW distributions. [#]_ For a Python " +"interpreter that was built with Cygwin, everything should work without any " +"of these following steps." +msgstr "" + +#: install/index.rst:1010 +msgid "" +"Not all extensions can be built with MinGW or Cygwin, but many can. " +"Extensions most likely to not work are those that use C++ or depend on " +"Microsoft Visual C extensions." +msgstr "" + +#: install/index.rst:1014 +msgid "To let Distutils compile your extension with Cygwin you have to type::" +msgstr "" + +#: install/index.rst:1018 +msgid "and for Cygwin in no-cygwin mode [#]_ or for MinGW type::" +msgstr "" + +#: install/index.rst:1022 +msgid "" +"If you want to use any of these options/compilers as default, you should " +"consider writing it in your personal or system-wide configuration file for " +"Distutils (see section :ref:`inst-config-files`.)" +msgstr "" + +#: install/index.rst:1027 +msgid "Older Versions of Python and MinGW" +msgstr "" + +#: install/index.rst:1028 +msgid "" +"The following instructions only apply if you're using a version of Python " +"inferior to 2.4.1 with a MinGW inferior to 3.0.0 (with " +"binutils-2.13.90-20030111-1)." +msgstr "" + +#: install/index.rst:1032 +msgid "" +"These compilers require some special libraries. This task is more complex " +"than for Borland's C++, because there is no program to convert the library. " +"First you have to create a list of symbols which the Python DLL exports. " +"(You can find a good program for this task at https://sourceforge.net/" +"projects/mingw/files/MinGW/Extension/pexports/)." +msgstr "" + +#: install/index.rst:1045 +msgid "" +"The location of an installed :file:`python25.dll` will depend on the " +"installation options and the version and language of Windows. In a \"just " +"for me\" installation, it will appear in the root of the installation " +"directory. In a shared installation, it will be located in the system " +"directory." +msgstr "" + +#: install/index.rst:1050 +msgid "" +"Then you can create from these information an import library for gcc. ::" +msgstr "" + +#: install/index.rst:1054 +msgid "" +"The resulting library has to be placed in the same directory as :file:" +"`python25.lib`. (Should be the :file:`libs` directory under your Python " +"installation directory.)" +msgstr "" + +#: install/index.rst:1058 +msgid "" +"If your extension uses other libraries (zlib,...) you might have to convert " +"them too. The converted files have to reside in the same directories as the " +"normal libraries do." +msgstr "" + +#: install/index.rst:1065 +msgid "" +"`Building Python modules on MS Windows platform with MinGW `_" +msgstr "" + +#: install/index.rst:1066 +msgid "" +"Information about building the required libraries for the MinGW environment." +msgstr "" + +#: install/index.rst:1070 +msgid "Footnotes" +msgstr "Notes" + +#: install/index.rst:1071 +msgid "" +"This also means you could replace all existing COFF-libraries with OMF-" +"libraries of the same name." +msgstr "" + +#: install/index.rst:1074 +msgid "Check https://www.sourceware.org/cygwin/ for more information" +msgstr "" + +#: install/index.rst:1076 +msgid "" +"Then you have no POSIX emulation available, but you also don't need :file:" +"`cygwin1.dll`." +msgstr "" diff --git a/installing/index.po b/installing/index.po new file mode 100644 index 0000000000..b70294c3d2 --- /dev/null +++ b/installing/index.po @@ -0,0 +1,465 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-18 15:46+0200\n" +"PO-Revision-Date: 2022-02-23 18:50+0100\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 3.0.1\n" + +#: installing/index.rst:7 +msgid "Installing Python Modules" +msgstr "Installation de modules Python" + +#: installing/index.rst:0 +msgid "Email" +msgstr "Email" + +#: installing/index.rst:9 +msgid "distutils-sig@python.org" +msgstr "distutils-sig@python.org" + +#: installing/index.rst:11 +msgid "" +"As a popular open source development project, Python has an active " +"supporting community of contributors and users that also make their software " +"available for other Python developers to use under open source license terms." +msgstr "" +"En tant que logiciel libre populaire, Python bénéficie d'une communauté " +"active de contributeurs et d'utilisateurs qui rendent à leur tour leurs " +"logiciels disponibles, sous licence libre, pour les autres développeurs " +"Python." + +#: installing/index.rst:15 +msgid "" +"This allows Python users to share and collaborate effectively, benefiting " +"from the solutions others have already created to common (and sometimes even " +"rare!) problems, as well as potentially contributing their own solutions to " +"the common pool." +msgstr "" +"Cela permet aux utilisateurs de Python de partager et de collaborer " +"efficacement, bénéficiant des solutions que les autres ont déjà crées pour " +"résoudre les problèmes communs (ou même, parfois, rares !), aussi que de " +"partager leurs propres solutions à tous." + +#: installing/index.rst:20 +msgid "" +"This guide covers the installation part of the process. For a guide to " +"creating and sharing your own Python projects, refer to the :ref:" +"`distribution guide `." +msgstr "" +"Ce guide couvre la partie installation. Pour un guide sur la création et le " +"partage de vos propres projets Python, voyez :ref:`le guide de distribution " +"`." + +#: installing/index.rst:26 +msgid "" +"For corporate and other institutional users, be aware that many " +"organisations have their own policies around using and contributing to open " +"source software. Please take such policies into account when making use of " +"the distribution and installation tools provided with Python." +msgstr "" +"Pour les entreprises et autres institutions, gardez en tête que certaines " +"organisations ont leurs propres règles sur l'utilisation et la contribution " +"au logiciel libre. Prenez ces règles en compte lorsque vous utilisez les " +"outils de distribution et d'installation fournis par Python." + +#: installing/index.rst:33 +msgid "Key terms" +msgstr "Vocabulaire" + +#: installing/index.rst:35 +msgid "" +"``pip`` is the preferred installer program. Starting with Python 3.4, it is " +"included by default with the Python binary installers." +msgstr "" +"``pip`` est l'outil d'installation de prédilection. À partir de Python 3.4, " +"il est inclus par défaut avec l'installateur de Python." + +#: installing/index.rst:37 +msgid "" +"A *virtual environment* is a semi-isolated Python environment that allows " +"packages to be installed for use by a particular application, rather than " +"being installed system wide." +msgstr "" +"Un *environnement virtuel* est un environnement Python semi-isolé qui " +"autorise les paquets à être installés pour une application particulière, " +"plutôt que d'être installés au niveau du système." + +#: installing/index.rst:40 +msgid "" +"``venv`` is the standard tool for creating virtual environments, and has " +"been part of Python since Python 3.3. Starting with Python 3.4, it defaults " +"to installing ``pip`` into all created virtual environments." +msgstr "" +"``venv`` est l'outil standard pour créer des environnements virtuels, et est " +"intégré à Python depuis la version 3.3. Depuis Python 3.4, il installe aussi " +"``pip`` dans tous les environnements virtuels créés." + +#: installing/index.rst:43 +msgid "" +"``virtualenv`` is a third party alternative (and predecessor) to ``venv``. " +"It allows virtual environments to be used on versions of Python prior to " +"3.4, which either don't provide ``venv`` at all, or aren't able to " +"automatically install ``pip`` into created environments." +msgstr "" +"``virtualenv`` est une alternative tierce à ``venv`` (et son prédécesseur). " +"Elle permet la création d'environnements virtuels pour les versions de " +"Python antérieures à 3.4, qui ne fournissent pas de ``venv``, ou ne sont pas " +"capables d'installer automatiquement ``pip`` dans les environnements créés." + +#: installing/index.rst:47 +msgid "" +"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 " +"paquets sous licence ouverte disponibles pour tous les utilisateurs Python." + +#: installing/index.rst:50 +msgid "" +"the `Python Packaging Authority `__ is the group of " +"developers and documentation authors responsible for the maintenance and " +"evolution of the standard packaging tools and the associated metadata and " +"file format standards. They maintain a variety of tools, documentation, and " +"issue trackers on both `GitHub `__ and `Bitbucket " +"`__." +msgstr "" +"le `Python Packaging Authority `__ est le groupe de " +"développeurs et d'auteurs de documentation responsable de la maintenance et " +"de l'évolution des suites d'outils standard et des normes de métadonnées et " +"de format de fichiers associées. Ils maintiennent une variété d'outils, de " +"documentation, et d'outils de suivi des problèmes sur les deux sites `GitHub " +"`__ et `Bitbucket `__." + +#: installing/index.rst:57 +msgid "" +"``distutils`` is the original build and distribution system first added to " +"the Python standard library in 1998. While direct use of ``distutils`` is " +"being phased out, it still laid the foundation for the current packaging and " +"distribution infrastructure, and it not only remains part of the standard " +"library, but its name lives on in other ways (such as the name of the " +"mailing list used to coordinate Python packaging standards development)." +msgstr "" +"``distutils`` est le premier système de construction et de distribution " +"ajouté à la bibliothèque standard en 1998. Bien que l'utilisation directe de " +"``distutils`` soit progressivement supprimée, elle reste le fondement de " +"l'infrastructure actuelle de construction de paquet et de distribution. Au-" +"delà de rester dans la bibliothèque standard, son nom vit aussi sous " +"d'autres formes, tel que la liste de diffusion utilisée pour coordonner le " +"développement et les standards de la création de paquet." + +#: installing/index.rst:65 +msgid "" +"The use of ``venv`` is now recommended for creating virtual environments." +msgstr "" +"L'utilisation de ``venv`` est maintenant recommandée pour créer vos " +"environnements virtuels." + +#: installing/index.rst:70 +msgid "" +"`Python Packaging User Guide: Creating and using virtual environments " +"`__" +msgstr "" +"`Guide Utilisateur de l'Empaquetage Python : Créer et utiliser des " +"environnements virtuels `__" + +#: installing/index.rst:75 +msgid "Basic usage" +msgstr "Utilisation de base" + +#: installing/index.rst:77 +msgid "" +"The standard packaging tools are all designed to be used from the command " +"line." +msgstr "" +"Les outils standards de création de paquets sont tous conçus pour être " +"utilisés à partir de la ligne de commande." + +#: installing/index.rst:80 +msgid "" +"The following command will install the latest version of a module and its " +"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 +msgid "" +"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 " +"ce guide supposent l'utilisation d'un :term:`environnement virtuel`." + +#: installing/index.rst:90 +msgid "" +"For Windows users, the examples in this guide assume that the option to " +"adjust the system PATH environment variable was selected when installing " +"Python." +msgstr "" +"Pour les utilisateurs de Windows, les exemples de ce guide supposent que " +"l'option proposant de modifier la variable d'environnement PATH à été cochée " +"lors de l'installation de Python." + +#: installing/index.rst:94 +msgid "" +"It's also possible to specify an exact or minimum version directly on the " +"command line. When using comparator operators such as ``>``, ``<`` or some " +"other special character which get interpreted by shell, the package name and " +"the version should be enclosed within double quotes::" +msgstr "" +"Il est aussi possible de préciser une version minimum exacte directement " +"depuis la ligne de commande. Utiliser des caractères de comparaison tel que " +"``>``, ``<`` ou d'autres caractères spéciaux qui sont interprétés par le " +"*shell*, le nom du paquet et la version doivent être mis entre guillemets ::" + +#: installing/index.rst:102 +msgid "" +"Normally, if a suitable module is already installed, attempting to install " +"it again will have no effect. Upgrading existing modules must be requested " +"explicitly::" +msgstr "" +"Normalement, si un module approprié est déjà installé, l'installer à nouveau " +"n'aura aucun effet. La mise à jour de modules existants doit être demandée " +"explicitement ::" + +#: installing/index.rst:108 +msgid "" +"More information and resources regarding ``pip`` and its capabilities can be " +"found in the `Python Packaging User Guide `__." +msgstr "" +"Plus d'informations et de ressources concernant ``pip`` et ses capacités " +"peuvent être trouvées dans le `Python Packaging User Guide `__." + +#: installing/index.rst:111 +msgid "" +"Creation of virtual environments is done through the :mod:`venv` module. " +"Installing packages into an active virtual environment uses the commands " +"shown above." +msgstr "" +"La création d'environnements virtuels est réalisée grâce au module :mod:" +"`venv`. Installer des paquets au sein de l'environnement virtuel courant " +"utilise les commandes montrées précédemment." + +#: installing/index.rst:117 +msgid "" +"`Python Packaging User Guide: Installing Python Distribution Packages " +"`__" +msgstr "" +"`Guide Utilisateur de l'Empaquetage Python : Installer les paquets de la " +"distribution Python `__" + +#: installing/index.rst:122 +msgid "How do I ...?" +msgstr "Comment puis-je … ?" + +#: installing/index.rst:124 +msgid "These are quick answers or links for some common tasks." +msgstr "" +"Ce sont des réponses rapides ou des liens pour certaines tâches courantes." + +#: installing/index.rst:127 +msgid "... install ``pip`` in versions of Python prior to Python 3.4?" +msgstr "" +"... Installer ``pip`` avec une version de Python antérieures à la 3.4 ?" + +#: installing/index.rst:129 +msgid "" +"Python only started bundling ``pip`` with Python 3.4. For earlier versions, " +"``pip`` needs to be \"bootstrapped\" as described in the Python Packaging " +"User Guide." +msgstr "" +"Python n'a commencé à fournir ``pip`` depuis Python 3.4. Pour les versions " +"précédentes, ``pip`` a besoin d'être \"amorcé\" tel que décrit dans le " +"*Python Packaging User Guide*." + +#: installing/index.rst:135 +msgid "" +"`Python Packaging User Guide: Requirements for Installing Packages `__" +msgstr "" +"`Guide Utilisateur de l'Empaquetage Python : Pré-requis pour installer des " +"paquets `__" + +#: installing/index.rst:142 +msgid "... install packages just for the current user?" +msgstr "... Installer des paquets juste pour l'utilisateur actuel ?" + +#: installing/index.rst:144 +msgid "" +"Passing the ``--user`` option to ``python -m pip install`` will install a " +"package just for the current user, rather than for all users of the system." +msgstr "" +"Donner l'option ``--user`` à ``python -m pip install`` lui fera installer un " +"paquet juste pour l'utilisateur en cours, plutôt que pour tous les " +"utilisateurs du système." + +#: installing/index.rst:149 +msgid "... install scientific Python packages?" +msgstr "... Installer des paquets Python scientifiques ?" + +#: installing/index.rst:151 +msgid "" +"A number of scientific Python packages have complex binary dependencies, and " +"aren't currently easy to install using ``pip`` directly. At this point in " +"time, it will often be easier for users to install these packages by `other " +"means `__ rather than attempting to " +"install them with ``pip``." +msgstr "" +"Un certain nombre de paquets scientifiques Python ont des dépendances " +"binaires complexes, et ne sont pas actuellement faciles à installer " +"directement avec ``pip``. Pour le moment, il est souvent plus simple pour " +"les utilisateurs d'installer ces paquets par `d'autres moyens `__ plutôt que d'essayer de les installer avec " +"``pip``." + +#: installing/index.rst:159 +msgid "" +"`Python Packaging User Guide: Installing Scientific Packages `__" +msgstr "" +"`Guide Utilisateur de l'Empaquetage Python : Installer des paquets " +"scientifiques `__" + +#: installing/index.rst:164 +msgid "... work with multiple versions of Python installed in parallel?" +msgstr "" +"... Travailler avec plusieurs versions de Python installés en parallèle ?" + +#: installing/index.rst:166 +msgid "" +"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 " +"la version appropriée de ``pip`` ::" + +#: installing/index.rst:175 +msgid "Appropriately versioned ``pip`` commands may also be available." +msgstr "" +"Les versions appropriées des commandes ``pip`` peuvent aussi être " +"disponibles." + +#: installing/index.rst:177 +msgid "" +"On Windows, use the ``py`` Python launcher in combination with the ``-m`` " +"switch::" +msgstr "" +"Sous Windows, utilisez le lanceur Python ``py`` en combinaison avec l'option " +"``-m`` ::" + +#: installing/index.rst:194 +msgid "Common installation issues" +msgstr "Les problèmes d'installation typiques" + +#: installing/index.rst:197 +msgid "Installing into the system Python on Linux" +msgstr "Installer dans le Python du système sur Linux" + +#: installing/index.rst:199 +msgid "" +"On Linux systems, a Python installation will typically be included as part " +"of the distribution. Installing into this Python installation requires root " +"access to the system, and may interfere with the operation of the system " +"package manager and other components of the system if a component is " +"unexpectedly upgraded using ``pip``." +msgstr "" +"Sur les systèmes Linux, une installation de Python sera généralement incluse " +"dans le cadre de la distribution. Installer dans cette installation de " +"Python nécessite un accès *root* sur le système, et peut interférer avec le " +"fonctionnement du gestionnaire de paquets du système et d'autres composants " +"du système si un composant est mis à jour de façon inattendue en utilisant " +"``pip``." + +#: installing/index.rst:205 +msgid "" +"On such systems, it is often better to use a virtual environment or a per-" +"user installation when installing packages with ``pip``." +msgstr "" +"Sur de tels systèmes, il est souvent préférable d'utiliser un environnement " +"virtuel ou une installation par l'utilisateur lors de l'installation des " +"paquets avec ``pip``." + +#: installing/index.rst:210 +msgid "Pip not installed" +msgstr "``Pip`` n'est pas installé" + +#: installing/index.rst:212 +msgid "" +"It is possible that ``pip`` does not get installed by default. One potential " +"fix is::" +msgstr "" +"Il est possible que ``pip`` ne soit pas installé par défaut. Une solution " +"est ::" + +#: installing/index.rst:216 +#, fuzzy +msgid "" +"There are also additional resources for `installing pip. `__" +msgstr "" +"Voir aussi `installing pip. `__" + +#: installing/index.rst:221 +msgid "Installing binary extensions" +msgstr "Installation d'extensions binaires" + +#: installing/index.rst:223 +msgid "" +"Python has typically relied heavily on source based distribution, with end " +"users being expected to compile extension modules from source as part of the " +"installation process." +msgstr "" +"Python a généralement beaucoup misé sur une distribution basée sur les " +"sources, avec laquelle les utilisateurs finaux devaient compiler, lors de " +"l'installation, les modules d'extension à partir des sources." + +#: installing/index.rst:227 +msgid "" +"With the introduction of support for the binary ``wheel`` format, and the " +"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 " +"Package Index*, ce problème devrait diminuer au fil du temps, car les " +"utilisateurs sont plus régulièrement en mesure d'installer des extensions " +"pré-compilées plutôt que de devoir les compiler eux-mêmes." + +#: installing/index.rst:233 +msgid "" +"Some of the solutions for installing `scientific software `__ that are not yet available as pre-built ``wheel`` " +"files may also help with obtaining other binary extensions without needing " +"to build them locally." +msgstr "" +"Certaines solutions pour installer des `paquets scientifiques `__ qui ne sont pas encore disponibles comme " +"``wheel`` pré-construites peuvent aussi aider à obtenir d'autres extensions " +"binaires sans devoir les construire localement." + +#: installing/index.rst:240 +msgid "" +"`Python Packaging User Guide: Binary Extensions `__" +msgstr "" +"`Guide Utilisateur de l'Empaquetage Python : Extensions binaires `__" diff --git a/library/2to3.po b/library/2to3.po new file mode 100644 index 0000000000..f41984e0a6 --- /dev/null +++ b/library/2to3.po @@ -0,0 +1,805 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-18 15:46+0200\n" +"PO-Revision-Date: 2022-10-18 15:44+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.1\n" + +#: library/2to3.rst:4 +#, fuzzy +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 +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 " +"library contains a rich set of fixers that will handle almost all code. " +"2to3 supporting library :mod:`lib2to3` is, however, a flexible and generic " +"library, so it is possible to write your own fixers for 2to3." +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` " +"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*." + +#: library/2to3.rst:18 +msgid "Using 2to3" +msgstr "Utilisation de *2to3*" + +#: library/2to3.rst:20 +msgid "" +"2to3 will usually be installed with the Python interpreter as a script. It " +"is also located in the :file:`Tools/scripts` directory of the Python root." +msgstr "" +"*2to3* sera généralement installé avec l'interpréteur Python en tant que " +"script. Il est également situé dans le dossier :file:`Tools/scripts` à " +"racine de Python." + +#: library/2to3.rst:23 +msgid "" +"2to3's basic arguments are a list of files or directories to transform. The " +"directories are recursively traversed for Python sources." +msgstr "" +"Les arguments de base de *2to3* sont une liste de fichiers et de répertoires " +"à transformer. Les répertoires sont parcourus récursivement pour trouver " +"les sources Python." + +#: library/2to3.rst:26 +msgid "Here is a sample Python 2.x source file, :file:`example.py`::" +msgstr "Voici un exemple de fichier source Python 2.x, :file:`example.py` ::" + +#: library/2to3.rst:34 +msgid "It can be converted to Python 3.x code via 2to3 on the command line:" +msgstr "" +"Il peut être converti en code Python 3.x par *2to3* en ligne de commande :" + +#: library/2to3.rst:40 +msgid "" +"A diff against the original source file is printed. 2to3 can also write the " +"needed modifications right back to the source file. (A backup of the " +"original file is made unless :option:`!-n` is also given.) Writing the " +"changes back is enabled with the :option:`!-w` flag:" +msgstr "" +"Une comparaison avec le fichier source original est affichée. *2to3* peut " +"aussi écrire les modifications nécessaires directement dans le fichier " +"source. (Une sauvegarde du fichier d'origine est effectuée à moins que " +"l'option :option:`!-n` soit également donnée.) L'écriture des modifications " +"est activée avec l'option :option:`!-w` :" + +#: library/2to3.rst:49 +msgid "After transformation, :file:`example.py` looks like this::" +msgstr "Après transformation, :file:`example.py` ressemble à ::" + +#: library/2to3.rst:57 +msgid "" +"Comments and exact indentation are preserved throughout the translation " +"process." +msgstr "" +"Les commentaires et les retraits sont préservés tout au long du processus de " +"traduction." + +#: library/2to3.rst:59 +msgid "" +"By default, 2to3 runs a set of :ref:`predefined fixers <2to3-fixers>`. The :" +"option:`!-l` flag lists all available fixers. An explicit set of fixers to " +"run can be given with :option:`!-f`. Likewise the :option:`!-x` explicitly " +"disables a fixer. The following example runs only the ``imports`` and " +"``has_key`` fixers:" +msgstr "" +"Par défaut, *2to3* exécute un ensemble de :ref:`correcteurs prédéfinis <2to3-" +"fixers>`. L'option :option:`!-l` énumère tous les correcteurs disponibles. " +"Un ensemble explicite de correcteurs à exécuter peut être donné avec :option:" +"`!-f`. De même, :option:`!-x` désactive explicitement un correcteur. " +"L'exemple suivant exécute uniquement les ``import`` et les correcteurs " +"``has_key`` :" + +#: library/2to3.rst:68 +msgid "This command runs every fixer except the ``apply`` fixer:" +msgstr "" +"Cette commande exécute tous les correcteurs, sauf le correcteurs ``apply`` :" + +#: library/2to3.rst:74 +msgid "" +"Some fixers are *explicit*, meaning they aren't run by default and must be " +"listed on the command line to be run. Here, in addition to the default " +"fixers, the ``idioms`` fixer is run:" +msgstr "" +"Certains correcteurs sont *explicites*, ce qui signifie qu'ils ne sont pas " +"exécutés par défaut et doivent être énumérés sur la ligne de commande à " +"exécuter. Ici, en plus des correcteurs par défaut, le correcteur ``idioms`` " +"est exécuté :" + +#: library/2to3.rst:82 +msgid "Notice how passing ``all`` enables all default fixers." +msgstr "Notez que passer ``all`` active tous les correcteurs par défaut." + +#: library/2to3.rst:84 +msgid "" +"Sometimes 2to3 will find a place in your source code that needs to be " +"changed, but 2to3 cannot fix automatically. In this case, 2to3 will print a " +"warning beneath the diff for a file. You should address the warning in " +"order to have compliant 3.x code." +msgstr "" +"Parfois, *2to3* trouvera un endroit dans votre code source qui doit être " +"changé, mais qu'il ne peut pas résoudre automatiquement. Dans ce cas, " +"*2to3* affiche un avertissement sous la comparaison d'un fichier. Vous " +"devez traiter l'avertissement afin d'avoir un code conforme à Python 3.x." + +#: library/2to3.rst:89 +msgid "" +"2to3 can also refactor doctests. To enable this mode, use the :option:`!-d` " +"flag. Note that *only* doctests will be refactored. This also doesn't " +"require the module to be valid Python. For example, doctest like examples " +"in a reST document could also be refactored with this option." +msgstr "" +"*2to3* peut également réusiner les *doctests*. Pour activer ce mode, " +"utilisez :option:`!-d`. Notez que *seul* les *doctests* seront réusinés. " +"Cela ne nécessite pas que le module soit du Python valide. Par exemple, des " +"*doctests* tels que des exemples dans un document *reST* peuvent également " +"être réusinés avec cette option." + +#: library/2to3.rst:94 +msgid "" +"The :option:`!-v` option enables output of more information on the " +"translation process." +msgstr "" +"L'option :option:`!-v` augmente la quantité de messages générés par le " +"processus de traduction." + +#: library/2to3.rst:97 +msgid "" +"Since some print statements can be parsed as function calls or statements, " +"2to3 cannot always read files containing the print function. When 2to3 " +"detects the presence of the ``from __future__ import print_function`` " +"compiler directive, it modifies its internal grammar to interpret :func:" +"`print` as a function. This change can also be enabled manually with the :" +"option:`!-p` flag. Use :option:`!-p` to run fixers on code that already has " +"had its print statements converted. Also :option:`!-e` can be used to make :" +"func:`exec` a function." +msgstr "" +"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 "" +"The :option:`!-o` or :option:`!--output-dir` option allows specification of " +"an alternate directory for processed output files to be written to. The :" +"option:`!-n` flag is required when using this as backup files do not make " +"sense when not overwriting the input files." +msgstr "" +"L'option :option:`!-o` ou :option:`!--output-dir` permet de donner autre " +"répertoire pour les fichiers de sortie en écriture. L'option :option:`!-n` " +"est requise quand on les utilise comme fichiers de sauvegarde qui n'ont pas " +"de sens si les fichiers d'entrée ne sont pas écrasés." + +#: library/2to3.rst:110 +msgid "The :option:`!-o` option was added." +msgstr "L'option :option:`!-o` a été ajoutée." + +#: library/2to3.rst:113 +msgid "" +"The :option:`!-W` or :option:`!--write-unchanged-files` flag tells 2to3 to " +"always write output files even if no changes were required to the file. " +"This is most useful with :option:`!-o` so that an entire Python source tree " +"is copied with translation from one directory to another. This option " +"implies the :option:`!-w` flag as it would not make sense otherwise." +msgstr "" +"L'option :option:`!-W` ou :option:`!—write-unchanged-files` indique à *2to3* " +"de toujours écrire des fichiers de sortie même si aucun changement du " +"fichier n'était nécessaire. Ceci est très utile avec :option:`!-o` pour " +"qu'un arbre des sources Python entier soit copié avec la traduction d'un " +"répertoire à l'autre. Cette option implique :option:`!-w` sans quoi elle " +"n'aurait pas de sens." + +#: library/2to3.rst:119 +msgid "The :option:`!-W` flag was added." +msgstr "L'option :option:`!-W` a été ajoutée." + +#: library/2to3.rst:122 +msgid "" +"The :option:`!--add-suffix` option specifies a string to append to all " +"output filenames. The :option:`!-n` flag is required when specifying this " +"as backups are not necessary when writing to different filenames. Example:" +msgstr "" +"L'option :option:`!--add-suffix` spécifie une chaîne à ajouter à tous les " +"noms de fichiers de sortie. L'option :option:`!-n` est nécessaire dans ce " +"cas, puisque sauvegarder n'est pas nécessaire en écrivant dans des fichiers " +"différents. Exemple:" + +#: library/2to3.rst:130 +msgid "Will cause a converted file named ``example.py3`` to be written." +msgstr "Écrit un fichier converti nommé ``example.py3``." + +#: library/2to3.rst:132 +msgid "The :option:`!--add-suffix` option was added." +msgstr "L'option :option:`!--add-suffix` est ajoutée." + +#: library/2to3.rst:135 +msgid "To translate an entire project from one directory tree to another use:" +msgstr "" +"Pour traduire un projet entier d'une arborescence de répertoires à une " +"autre, utilisez :" + +#: library/2to3.rst:145 +msgid "Fixers" +msgstr "Correcteurs" + +#: library/2to3.rst:147 +msgid "" +"Each step of transforming code is encapsulated in a fixer. The command " +"``2to3 -l`` lists them. As :ref:`documented above <2to3-using>`, each can " +"be turned on and off individually. They are described here in more detail." +msgstr "" +"Chaque étape de la transformation du code est encapsulée dans un " +"correcteur. La commande ``2to3 -l`` les énumère. Comme :ref:`documenté ci-" +"dessus <2to3-using>`, chacun peut être activé ou désactivé " +"individuellement. Ils sont décrits plus en détails ici." + +#: library/2to3.rst:154 +msgid "" +"Removes usage of :func:`apply`. For example ``apply(function, *args, " +"**kwargs)`` is converted to ``function(*args, **kwargs)``." +msgstr "" +"Supprime l'usage d':func:`apply`. Par exemple, ``apply(function, *args, " +"**kwargs)`` est converti en ``function(*args, **kwargs)``." + +#: library/2to3.rst:159 +msgid "Replaces deprecated :mod:`unittest` method names with the correct ones." +msgstr "" +"Remplace les noms de méthodes obsolètes du module :mod:`unittest` par les " +"bons." + +#: library/2to3.rst:351 +msgid "From" +msgstr "De" + +#: library/2to3.rst:351 +msgid "To" +msgstr "À" + +#: library/2to3.rst:164 +msgid "``failUnlessEqual(a, b)``" +msgstr "``failUnlessEqual(a, b)``" + +#: library/2to3.rst:166 +msgid ":meth:`assertEqual(a, b) `" +msgstr ":meth:`assertEqual(a, b) `" + +#: library/2to3.rst:166 +msgid "``assertEquals(a, b)``" +msgstr "``assertEquals(a, b)``" + +#: library/2to3.rst:168 +msgid "``failIfEqual(a, b)``" +msgstr "``failIfEqual(a, b)``" + +#: library/2to3.rst:170 +msgid ":meth:`assertNotEqual(a, b) `" +msgstr ":meth:`assertNotEqual(a, b) `" + +#: library/2to3.rst:170 +msgid "``assertNotEquals(a, b)``" +msgstr "``assertNotEquals(a, b)``" + +#: library/2to3.rst:172 +msgid "``failUnless(a)``" +msgstr "``failUnless(a)``" + +#: library/2to3.rst:174 +msgid ":meth:`assertTrue(a) `" +msgstr ":meth:`assertTrue(a) `" + +#: library/2to3.rst:174 +msgid "``assert_(a)``" +msgstr "``assert_(a)``" + +#: library/2to3.rst:176 +msgid "``failIf(a)``" +msgstr "``failIf(a)``" + +#: library/2to3.rst:176 +msgid ":meth:`assertFalse(a) `" +msgstr ":meth:`assertFalse(a) `" + +#: library/2to3.rst:178 +msgid "``failUnlessRaises(exc, cal)``" +msgstr "``failUnlessRaises(exc, cal)``" + +#: library/2to3.rst:178 +msgid ":meth:`assertRaises(exc, cal) `" +msgstr ":meth:`assertRaises(exc, cal) `" + +#: library/2to3.rst:180 +msgid "``failUnlessAlmostEqual(a, b)``" +msgstr "``failUnlessAlmostEqual(a, b)``" + +#: library/2to3.rst:182 +msgid ":meth:`assertAlmostEqual(a, b) `" +msgstr ":meth:`assertAlmostEqual(a, b) `" + +#: library/2to3.rst:182 +msgid "``assertAlmostEquals(a, b)``" +msgstr "``assertAlmostEquals(a, b)``" + +#: library/2to3.rst:184 +msgid "``failIfAlmostEqual(a, b)``" +msgstr "``failIfAlmostEqual(a, b)``" + +#: library/2to3.rst:186 +msgid "" +":meth:`assertNotAlmostEqual(a, b) `" +msgstr "" +":meth:`assertNotAlmostEqual(a, b) `" + +#: library/2to3.rst:186 +msgid "``assertNotAlmostEquals(a, b)``" +msgstr "``assertNotAlmostEquals(a, b)``" + +#: library/2to3.rst:192 +msgid "Converts :class:`basestring` to :class:`str`." +msgstr "Convertit une :class:`basestring` en :class:`str`." + +#: library/2to3.rst:196 +msgid "" +"Converts :class:`buffer` to :class:`memoryview`. This fixer is optional " +"because the :class:`memoryview` API is similar but not exactly the same as " +"that of :class:`buffer`." +msgstr "" +"Convertit un :class:`buffer` en :class:`memoryview`. Ce correcteur est " +"optionnel car l'API :class:`memoryview` est similaire mais pas exactement " +"pareil que celle de :class:`buffer`." + +#: library/2to3.rst:202 +msgid "" +"Fixes dictionary iteration methods. :meth:`dict.iteritems` is converted to :" +"meth:`dict.items`, :meth:`dict.iterkeys` to :meth:`dict.keys`, and :meth:" +"`dict.itervalues` to :meth:`dict.values`. Similarly, :meth:`dict." +"viewitems`, :meth:`dict.viewkeys` and :meth:`dict.viewvalues` are converted " +"respectively to :meth:`dict.items`, :meth:`dict.keys` and :meth:`dict." +"values`. It also wraps existing usages of :meth:`dict.items`, :meth:`dict." +"keys`, and :meth:`dict.values` in a call to :class:`list`." +msgstr "" +"Fixe les méthodes d'itération sur les dictionnaires. :meth:`dict.iteritems` " +"est converti en :meth:`dict.items`, :meth:`dict.iterkeys` en :meth:`dict." +"keys` et :meth:`dict.itervalues` en :meth:`dict.values`. De la même façon, :" +"meth:`dict.viewitems`, :meth:`dict.viewkeys` et :meth:`dict.viewvalues` sont " +"convertis respectivement en :meth:`dict.items`, :meth:`dict.keys` et :meth:" +"`dict.values`. Il encapsule également les usages existants de :meth:`dict." +"items`, :meth:`dict.keys` et :meth:`dict.values` dans un appel à :class:" +"`list`." + +#: library/2to3.rst:212 +msgid "Converts ``except X, T`` to ``except X as T``." +msgstr "Convertit ``except X, T`` en ``except X as T``." + +#: library/2to3.rst:216 +msgid "Converts the ``exec`` statement to the :func:`exec` function." +msgstr "Convertit l'instruction ``exec`` en fonction :func:`exec`." + +#: library/2to3.rst:220 +msgid "" +"Removes usage of :func:`execfile`. The argument to :func:`execfile` is " +"wrapped in calls to :func:`open`, :func:`compile`, and :func:`exec`." +msgstr "" +"Supprime l'usage de :func:`execfile`. L'argument de :func:`execfile` est " +"encapsulé dans des appels à :func:`open`, :func:`compile` et :func:`exec`." + +#: library/2to3.rst:225 +msgid "" +"Changes assignment of :attr:`sys.exitfunc` to use of the :mod:`atexit` " +"module." +msgstr "" +"Change l'affectation de :attr:`sys.exitfunc` pour utiliser le module :mod:" +"`atexit`." + +#: library/2to3.rst:230 +msgid "Wraps :func:`filter` usage in a :class:`list` call." +msgstr "Encapsule l'usage de :func:`filter` dans un appel à :class:`list`." + +#: library/2to3.rst:234 +msgid "" +"Fixes function attributes that have been renamed. For example, " +"``my_function.func_closure`` is converted to ``my_function.__closure__``." +msgstr "" +"Fixe les attributs de fonction ayant été renommés. Par exemple, " +"``my_function.func_closure`` est converti en ``my_function.__closure__``." + +#: library/2to3.rst:239 +msgid "Removes ``from __future__ import new_feature`` statements." +msgstr "Supprime les instructions ``from __future__ import new_feature``." + +#: library/2to3.rst:243 +msgid "Renames :func:`os.getcwdu` to :func:`os.getcwd`." +msgstr "Renomme :func:`os.getcwdu` en :func:`os.getcwd`." + +#: library/2to3.rst:247 +msgid "Changes ``dict.has_key(key)`` to ``key in dict``." +msgstr "Change ``dict.has_key(key)`` en ``key in dict``." + +#: library/2to3.rst:251 +msgid "" +"This optional fixer performs several transformations that make Python code " +"more idiomatic. Type comparisons like ``type(x) is SomeClass`` and " +"``type(x) == SomeClass`` are converted to ``isinstance(x, SomeClass)``. " +"``while 1`` becomes ``while True``. This fixer also tries to make use of :" +"func:`sorted` in appropriate places. For example, this block ::" +msgstr "" +"Ce correcteur optionnel effectue plusieurs transformations rendant le code " +"Python plus idiomatique. Les comparaisons de types telles que ``type(x) is " +"SomeClass`` et ``type(x) == SomeClass`` sont converties en ``isinstance(x, " +"SomeClass)``. ``while 1`` devient ``while True``. Ce correcteur essaye " +"aussi d'utiliser :func:`sorted` aux endroits appropriés. Par exemple, ce " +"bloc ::" + +#: library/2to3.rst:260 +msgid "is changed to ::" +msgstr "est transformé en ::" + +#: library/2to3.rst:266 +msgid "Detects sibling imports and converts them to relative imports." +msgstr "" +"Détecte les importations voisines et les convertit en importations relatives." + +#: library/2to3.rst:270 +msgid "Handles module renames in the standard library." +msgstr "Gère les renommages de modules dans la bibliothèque standard." + +#: library/2to3.rst:274 +msgid "" +"Handles other modules renames in the standard library. It is separate from " +"the :2to3fixer:`imports` fixer only because of technical limitations." +msgstr "" +"Gères d'autres renommages de modules dans la bibliothèque standard. Il est " +"distinct de :2to3fixer:`imports` seulement en raison de limitations " +"techniques." + +#: library/2to3.rst:279 +msgid "Converts ``input(prompt)`` to ``eval(input(prompt))``." +msgstr "Convertit ``input(prompt)`` en ``eval(input(prompt))``." + +#: library/2to3.rst:283 +msgid "Converts :func:`intern` to :func:`sys.intern`." +msgstr "Convertit :func:`intern` en :func:`sys.intern`." + +#: library/2to3.rst:287 +msgid "" +"Fixes duplicate types in the second argument of :func:`isinstance`. For " +"example, ``isinstance(x, (int, int))`` is converted to ``isinstance(x, " +"int)`` and ``isinstance(x, (int, float, int))`` is converted to " +"``isinstance(x, (int, float))``." +msgstr "" +"Fixe les types dupliqués dans le second argument de :func:`isinstance`. Par " +"exemple, ``isinstance(x, (int, int))`` est converti en ``isinstance(x, " +"int)`` et ``isinstance(x, (int, float, int))`` est converti en " +"``isinstance(x, (int, float))``." + +#: library/2to3.rst:294 +msgid "" +"Removes imports of :func:`itertools.ifilter`, :func:`itertools.izip`, and :" +"func:`itertools.imap`. Imports of :func:`itertools.ifilterfalse` are also " +"changed to :func:`itertools.filterfalse`." +msgstr "" +"Supprime les importations de :func:`itertools.ifilter`, :func:`itertools." +"izip` et :func:`itertools.imap`. Les importations de :func:`itertools." +"ifilterfalse` sont aussi changées en :func:`itertools.filterfalse`." + +#: library/2to3.rst:300 +msgid "" +"Changes usage of :func:`itertools.ifilter`, :func:`itertools.izip`, and :" +"func:`itertools.imap` to their built-in equivalents. :func:`itertools." +"ifilterfalse` is changed to :func:`itertools.filterfalse`." +msgstr "" +"Change l'usage de :func:`itertools.ifilter`, :func:`itertools.izip` et :func:" +"`itertools.imap` en leurs équivalents intégrés. :func:`itertools." +"ifilterfalse` est changé en :func:`itertools.filterfalse`." + +#: library/2to3.rst:306 +msgid "Renames :class:`long` to :class:`int`." +msgstr "Renomme :class:`long` en :class:`int`." + +#: library/2to3.rst:310 +msgid "" +"Wraps :func:`map` in a :class:`list` call. It also changes ``map(None, x)`` " +"to ``list(x)``. Using ``from future_builtins import map`` disables this " +"fixer." +msgstr "" +"Encapsule :func:`map` dans un appel à :class:`list`. Change aussi " +"``map(None, x)`` en ``list(x)``. L'usage de ``from future_builtins import " +"map`` désactive ce correcteur." + +#: library/2to3.rst:316 +msgid "" +"Converts the old metaclass syntax (``__metaclass__ = Meta`` in the class " +"body) to the new (``class X(metaclass=Meta)``)." +msgstr "" +"Convertit l'ancienne syntaxe de métaclasse (``__metaclass__ = Meta`` dans le " +"corps de la classe) à la nouvelle (``class X(metaclasse=Meta)``)." + +#: library/2to3.rst:321 +msgid "" +"Fixes old method attribute names. For example, ``meth.im_func`` is " +"converted to ``meth.__func__``." +msgstr "" +"Fixe les anciens noms d'attributs de méthodes. Par exemple, ``meth." +"im_func`` est converti en ``meth.__func__``." + +#: library/2to3.rst:326 +msgid "Converts the old not-equal syntax, ``<>``, to ``!=``." +msgstr "Convertit l'ancienne syntaxe d'inégalité, ``<>``, en ``!=``." + +#: library/2to3.rst:330 +msgid "" +"Converts the use of iterator's :meth:`~iterator.next` methods to the :func:" +"`next` function. It also renames :meth:`next` methods to :meth:`~iterator." +"__next__`." +msgstr "" +"Convertit l'usage des méthodes :meth:`~iterator.next` de l' itérateur en :" +"func:`next`. Renomme également les méthodes :meth:`next` en :meth:" +"`~iterator.__next__`." + +#: library/2to3.rst:336 +#, fuzzy +msgid "" +"Renames definitions of methods called :meth:`__nonzero__` to :meth:`~object." +"__bool__`." +msgstr "Renomme :meth:`__nonzero__` en :meth:`~object.__bool__`." + +#: 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:345 +msgid "" +"Converts calls to various functions in the :mod:`operator` module to other, " +"but equivalent, function calls. When needed, the appropriate ``import`` " +"statements are added, e.g. ``import collections.abc``. The following " +"mapping are made:" +msgstr "" +"Convertit les appels à diverses fonctions du module :mod:`operator` en " +"appels d'autres fonctions équivalentes. Si besoin, les instructions " +"``import`` appropriées sont ajoutées, e.g. ``import collections.abc``. Les " +"correspondances suivantes sont appliquées :" + +#: library/2to3.rst:353 +msgid "``operator.isCallable(obj)``" +msgstr "``operator.isCallable(obj)``" + +#: library/2to3.rst:353 +msgid "``callable(obj)``" +msgstr "``callable(obj)``" + +#: library/2to3.rst:354 +msgid "``operator.sequenceIncludes(obj)``" +msgstr "``operator.sequenceIncludes(obj)``" + +#: library/2to3.rst:354 +msgid "``operator.contains(obj)``" +msgstr "``operator.contains(obj)``" + +#: library/2to3.rst:355 +msgid "``operator.isSequenceType(obj)``" +msgstr "``operator.isSequenceType(obj)``" + +#: library/2to3.rst:355 +msgid "``isinstance(obj, collections.abc.Sequence)``" +msgstr "``isinstance(obj, collections.abc.Sequence)``" + +#: library/2to3.rst:356 +msgid "``operator.isMappingType(obj)``" +msgstr "``operator.isMappingType(obj)``" + +#: library/2to3.rst:356 +msgid "``isinstance(obj, collections.abc.Mapping)``" +msgstr "``isinstance(obj, collections.abc.Mapping)``" + +#: library/2to3.rst:357 +msgid "``operator.isNumberType(obj)``" +msgstr "``operator.isNumberType(obj)``" + +#: library/2to3.rst:357 +msgid "``isinstance(obj, numbers.Number)``" +msgstr "``isinstance(obj, numbers.Number)``" + +#: library/2to3.rst:358 +msgid "``operator.repeat(obj, n)``" +msgstr "``operator.repeat(obj, n)``" + +#: library/2to3.rst:358 +msgid "``operator.mul(obj, n)``" +msgstr "``operator.mul(obj, n)``" + +#: library/2to3.rst:359 +msgid "``operator.irepeat(obj, n)``" +msgstr "``operator.irepeat(obj, n)``" + +#: library/2to3.rst:359 +msgid "``operator.imul(obj, n)``" +msgstr "``operator.imul(obj, n)``" + +#: 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)]``." +msgstr "" +"Ajoute des parenthèses supplémentaires lorsqu'elles sont nécessaires dans " +"les listes en compréhension. Par exemple, ``[x for x in 1, 2]`` devient " +"``[x for x in (1, 2)]``." + +#: 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: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 " +"incorrect because substituting tuples for exceptions has been removed in 3.0." +msgstr "" +"Convertit ``raise E, V`` en ``raise E(V)`` et ``raise E, V, T`` en ``raise " +"E(V).with_traceback(T)``. Si ``E`` est un *n*-uplet, la conversion sera " +"incorrecte puisque la substitution de *n*-uplets aux exceptions a été " +"supprimée en 3.0." + +#: library/2to3.rst:379 +msgid "Converts :func:`raw_input` to :func:`input`." +msgstr "Convertit :func:`raw_input` en :func:`input`." + +#: 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:387 +msgid "Converts :func:`reload` to :func:`importlib.reload`." +msgstr "" +"Convertit les appels à :func:`reload` en appels à :func:`importlib.reload`." + +#: 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: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:399 +msgid "" +"Replaces use of the :class:`set` constructor with set literals. This fixer " +"is optional." +msgstr "" +"Remplace l'usage du constructeur de :class:`set` par les ensembles " +"littéraux. Ce correcteur est optionnel." + +#: library/2to3.rst:404 +msgid "Renames :exc:`StandardError` to :exc:`Exception`." +msgstr "Renomme :exc:`StandardError` en :exc:`Exception`." + +#: 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`." +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: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:417 +msgid "" +"Removes implicit tuple parameter unpacking. This fixer inserts temporary " +"variables." +msgstr "" +"Supprime la décompression implicite des paramètres d'un *n*-uplet. Ce " +"correcteur ajoute des variables temporaires." + +#: library/2to3.rst:422 +msgid "" +"Fixes code broken from the removal of some members in the :mod:`types` " +"module." +msgstr "" +"Fixe le code cassé par la suppression de certains membres du module :mod:" +"`types`." + +#: library/2to3.rst:427 +msgid "Renames :class:`unicode` to :class:`str`." +msgstr "Renomme :class:`unicode` en :class:`str`." + +#: library/2to3.rst:431 +msgid "" +"Handles the rename of :mod:`urllib` and :mod:`urllib2` to the :mod:`urllib` " +"package." +msgstr "" +"Gère le renommage des paquets :mod:`urllib` et :mod:`urllib2` en :mod:" +"`urllib`." + +#: library/2to3.rst:436 +msgid "" +"Removes excess whitespace from comma separated items. This fixer is " +"optional." +msgstr "" +"Supprime l'espace excédentaire des éléments séparés par des virgules. Ce " +"correcteur est optionnel." + +#: library/2to3.rst:441 +msgid "" +"Renames :func:`xrange` to :func:`range` and wraps existing :func:`range` " +"calls with :class:`list`." +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: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:450 +msgid "" +"Wraps :func:`zip` usage in a :class:`list` call. This is disabled when " +"``from future_builtins import zip`` appears." +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:455 +#, fuzzy +msgid ":mod:`lib2to3` --- 2to3's library" +msgstr ":mod:`lib2to3` — la bibliothèque de *2to3*" + +#: library/2to3.rst:464 +msgid "**Source code:** :source:`Lib/lib2to3/`" +msgstr "**Code source:** :source:`Lib/lib2to3/`" + +#: library/2to3.rst:477 +#, fuzzy +msgid "" +"Python 3.9 switched to a PEG parser (see :pep:`617`) while lib2to3 is using " +"a less flexible LL(1) parser. Python 3.10 includes new language syntax that " +"is not parsable by lib2to3's LL(1) parser (see :pep:`634`). The ``lib2to3`` " +"module was marked pending for deprecation in Python 3.9 (raising :exc:" +"`PendingDeprecationWarning` on import) and fully deprecated in Python 3.11 " +"(raising :exc:`DeprecationWarning`). It will be removed from the standard " +"library in Python 3.13. 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:480 +msgid "" +"The :mod:`lib2to3` API should be considered unstable and may change " +"drastically in the future." +msgstr "" +"L'API de :mod:`lib2to3` devrait être considérée instable et peut changer " +"drastiquement dans le futur." diff --git a/library/__future__.po b/library/__future__.po new file mode 100644 index 0000000000..10a982de9c --- /dev/null +++ b/library/__future__.po @@ -0,0 +1,313 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-05-21 16:37+0200\n" +"PO-Revision-Date: 2021-11-06 19:52+0100\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 3.0\n" + +#: library/__future__.rst:2 +msgid ":mod:`__future__` --- Future statement definitions" +msgstr ":mod:`__future__` — Définitions des futurs" + +#: library/__future__.rst:7 +msgid "**Source code:** :source:`Lib/__future__.py`" +msgstr "**Source code:** :source:`Lib/_future_.py`" + +#: library/__future__.rst:11 +msgid ":mod:`__future__` is a real module, and serves three purposes:" +msgstr "" +"Le module :mod:`__future__` est un vrai module, et il a trois objectifs :" + +#: library/__future__.rst:13 +msgid "" +"To avoid confusing existing tools that analyze import statements and expect " +"to find the modules they're importing." +msgstr "" +"éviter de dérouter les outils existants qui analysent les instructions " +"d'importation et s'attendent à trouver les modules qu'ils importent ;" + +#: library/__future__.rst:16 +msgid "" +"To ensure that :ref:`future statements ` run under releases prior to " +"2.1 at least yield runtime exceptions (the import of :mod:`__future__` will " +"fail, because there was no module of that name prior to 2.1)." +msgstr "" +"s'assurer que les :ref:`instructions *future* ` lancées sous les " +"versions antérieures à 2.1 lèvent au moins des exceptions à l'exécution " +"(l’importation du module :mod:`__future__` échoue, car il n’y avait pas de " +"module de ce nom avant 2.1) ;" + +#: library/__future__.rst:20 +msgid "" +"To document when incompatible changes were introduced, and when they will be " +"--- or were --- made mandatory. This is a form of executable documentation, " +"and can be inspected programmatically via importing :mod:`__future__` and " +"examining its contents." +msgstr "" +"Pour documenter le phasage de changements entraînant des incompatibilités : " +"introduction, utilisation obligatoire. Il s’agit d’une forme de " +"documentation exécutable, qui peut être inspectée par un programme en " +"important :mod:`__future__` et en examinant son contenu." + +#: library/__future__.rst:25 +msgid "Each statement in :file:`__future__.py` is of the form::" +msgstr "Chaque instruction dans :file:`__future__.py` est de la forme ::" + +#: library/__future__.rst:31 +msgid "" +"where, normally, *OptionalRelease* is less than *MandatoryRelease*, and both " +"are 5-tuples of the same form as :data:`sys.version_info`::" +msgstr "" +"où, normalement, *OptionalRelease* est inférieur à *MandatoryRelease*, et " +"les deux sont des quintuplets de la même forme que :data:`sys." +"version_info` ::" + +#: library/__future__.rst:41 +msgid "" +"*OptionalRelease* records the first release in which the feature was " +"accepted." +msgstr "" +"*OptionalRelease* enregistre la première version dans laquelle la " +"fonctionnalité a été acceptée." + +#: library/__future__.rst:43 +msgid "" +"In the case of a *MandatoryRelease* that has not yet occurred, " +"*MandatoryRelease* predicts the release in which the feature will become " +"part of the language." +msgstr "" +"Dans le cas d'un *MandatoryRelease* qui n'a pas encore eu lieu, " +"*MandatoryRelease* prédit la *release* dans laquelle la fonctionnalité " +"deviendra un élément du langage." + +#: library/__future__.rst:47 +msgid "" +"Else *MandatoryRelease* records when the feature became part of the " +"language; in releases at or after that, modules no longer need a future " +"statement to use the feature in question, but may continue to use such " +"imports." +msgstr "" +"Sinon *MandatoryRelease* enregistre lorsque la fonctionnalité est devenue " +"une partie du langage ; dans cette version ou les suivantes, les modules " +"n'ont plus besoin d'une déclaration *future* pour utiliser la fonctionnalité " +"en question, mais ils peuvent continuer à utiliser ces importations." + +#: library/__future__.rst:51 +msgid "" +"*MandatoryRelease* may also be ``None``, meaning that a planned feature got " +"dropped." +msgstr "" +"*MandatoryRelease* peut également être ``None``, ce qui signifie qu'une " +"fonction planifiée a été abandonnée." + +#: library/__future__.rst:54 +msgid "" +"Instances of class :class:`_Feature` have two corresponding methods, :meth:" +"`getOptionalRelease` and :meth:`getMandatoryRelease`." +msgstr "" +"Les instances de classe :class:`_Feature` ont deux méthodes " +"correspondantes, :meth:`getOptionalRelease` et :meth:`getMandatoryRelease`." + +#: library/__future__.rst:57 +msgid "" +"*CompilerFlag* is the (bitfield) flag that should be passed in the fourth " +"argument to the built-in function :func:`compile` to enable the feature in " +"dynamically compiled code. This flag is stored in the :attr:`compiler_flag` " +"attribute on :class:`_Feature` instances." +msgstr "" +"*CompilerFlag* est un drapeau (chaque bit représente un champ) qui doit être " +"passé en tant que quatrième argument à la fonction native :func:`compile` " +"pour activer la fonctionnalité dans le code compilé dynamiquement. Cet " +"indicateur est stocké dans l'attribut :attr:`compiler_flag` dans les " +"instances de :class:`_Feature`." + +#: library/__future__.rst:62 +msgid "" +"No feature description will ever be deleted from :mod:`__future__`. Since " +"its introduction in Python 2.1 the following features have found their way " +"into the language using this mechanism:" +msgstr "" +"Aucune fonctionnalité ne sera jamais supprimée de :mod:`__future__`. Depuis " +"son introduction dans Python 2.1, les fonctionnalités suivantes ont trouvé " +"leur places dans le langage utilisant ce mécanisme :" + +#: library/__future__.rst:67 +msgid "feature" +msgstr "fonctionnalité" + +#: library/__future__.rst:67 +msgid "optional in" +msgstr "optionnel dans" + +#: library/__future__.rst:67 +msgid "mandatory in" +msgstr "obligatoire dans" + +#: library/__future__.rst:67 +msgid "effect" +msgstr "effet" + +#: library/__future__.rst:69 +msgid "nested_scopes" +msgstr "nested_scopes" + +#: library/__future__.rst:69 +msgid "2.1.0b1" +msgstr "2.1.0b1" + +#: library/__future__.rst:69 +msgid "2.2" +msgstr "2.2" + +#: library/__future__.rst:69 +msgid ":pep:`227`: *Statically Nested Scopes*" +msgstr ":pep:`227` : *Portées imbriquées*" + +#: library/__future__.rst:72 +msgid "generators" +msgstr "générateurs" + +#: library/__future__.rst:72 +msgid "2.2.0a1" +msgstr "2.2.0a1" + +#: library/__future__.rst:72 +msgid "2.3" +msgstr "2.3" + +#: library/__future__.rst:72 +msgid ":pep:`255`: *Simple Generators*" +msgstr ":pep:`255` : *Générateurs simples*" + +#: library/__future__.rst:75 +msgid "division" +msgstr "division" + +#: library/__future__.rst:75 +msgid "2.2.0a2" +msgstr "2.2.0a2" + +#: library/__future__.rst:78 library/__future__.rst:87 +msgid "3.0" +msgstr "3.0" + +#: library/__future__.rst:75 +msgid ":pep:`238`: *Changing the Division Operator*" +msgstr ":pep:`238` : *Changement de l'opérateur de division*" + +#: library/__future__.rst:78 +msgid "absolute_import" +msgstr "absolute_import" + +#: library/__future__.rst:81 +msgid "2.5.0a1" +msgstr "2.5.0a1" + +#: library/__future__.rst:78 +msgid ":pep:`328`: *Imports: Multi-Line and Absolute/Relative*" +msgstr "" +":pep:`328` : *Importations : multilignes et absolues/relatives* (ressource " +"en anglais)" + +#: library/__future__.rst:81 +msgid "with_statement" +msgstr "with_statement" + +#: library/__future__.rst:81 +msgid "2.6" +msgstr "2.6" + +#: library/__future__.rst:81 +msgid ":pep:`343`: *The \"with\" Statement*" +msgstr ":pep:`343` : *L'instruction \"with\"*" + +#: library/__future__.rst:84 +msgid "print_function" +msgstr "print_function" + +#: library/__future__.rst:87 +msgid "2.6.0a2" +msgstr "2.6.0a2" + +#: library/__future__.rst:84 +msgid ":pep:`3105`: *Make print a function*" +msgstr ":pep:`3105` : *Transformation de print en fonction*" + +#: library/__future__.rst:87 +msgid "unicode_literals" +msgstr "unicode_literals" + +#: library/__future__.rst:87 +msgid ":pep:`3112`: *Bytes literals in Python 3000*" +msgstr ":pep:`3112` : *Chaînes d'octets littéraux en Python 3000*" + +#: library/__future__.rst:90 +msgid "generator_stop" +msgstr "generator_stop" + +#: library/__future__.rst:90 +msgid "3.5.0b1" +msgstr "3.5.0b1" + +#: library/__future__.rst:90 +msgid "3.7" +msgstr "3.7" + +#: library/__future__.rst:90 +msgid ":pep:`479`: *StopIteration handling inside generators*" +msgstr "" +":pep:`479` : *Gestion de *StopIteration* à l’intérieur des générateurs*" + +#: library/__future__.rst:93 +msgid "annotations" +msgstr "annotations" + +#: library/__future__.rst:93 +msgid "3.7.0b1" +msgstr "3.7.0b1" + +#: library/__future__.rst:93 +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: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:111 +msgid "How the compiler treats future imports." +msgstr "Comment le compilateur gère les importations « futures »." + +#~ msgid "3.11" +#~ msgstr "3.11" + +#~ msgid "3.10" +#~ msgstr "3.10" + +#~ msgid "4.0" +#~ msgstr "4.0" diff --git a/library/__main__.po b/library/__main__.po new file mode 100644 index 0000000000..d20f72b6d4 --- /dev/null +++ b/library/__main__.po @@ -0,0 +1,527 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-22 22:57+0100\n" +"PO-Revision-Date: 2022-05-18 13:39+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 3.0.1\n" + +#: library/__main__.rst:2 +msgid ":mod:`__main__` --- Top-level code environment" +msgstr ":mod:`__main__` — Environnement d'exécution principal" + +#: library/__main__.rst:10 +msgid "" +"In Python, the special name ``__main__`` is used for two important " +"constructs:" +msgstr "" +"En Python, le nom ``__main__`` a une fonction particulière. Il intervient " +"dans deux cas :" + +#: library/__main__.rst:12 +msgid "" +"the name of the top-level environment of the program, which can be checked " +"using the ``__name__ == '__main__'`` expression; and" +msgstr "" +"c'est le nom de l'environnement d'exécution principal, ce qui donne lieu au " +"test courant ``__name__ == '__main__'`` ;" + +#: library/__main__.rst:14 +msgid "the ``__main__.py`` file in Python packages." +msgstr "c'est aussi le nom du fichier ``__main__.py`` dans les paquets Python." + +#: library/__main__.rst:16 +msgid "" +"Both of these mechanisms are related to Python modules; how users interact " +"with them and how they interact with each other. They are explained in " +"detail below. If you're new to Python modules, see the tutorial section :" +"ref:`tut-modules` for an introduction." +msgstr "" +"Les deux sont liés aux modules Python, à la manière de s'en servir en tant " +"qu'utilisateur et à la manière dont ils interagissent entre eux. Cette page " +"contient des détails sur les modules Python. Si vous ne les avez jamais " +"utilisés, commencez par la section qui leur est consacrée dans le " +"tutoriel : :ref:`tut-modules`." + +#: library/__main__.rst:25 +msgid "``__name__ == '__main__'``" +msgstr "``__name__ == '__main__'``" + +#: library/__main__.rst:27 +msgid "" +"When a Python module or package is imported, ``__name__`` is set to the " +"module's name. Usually, this is the name of the Python file itself without " +"the ``.py`` extension::" +msgstr "" +"Lorsqu'un module ou un paquet Python est importé, son attribut ``__name__`` " +"est défini à son nom, qui est la plupart du temps le nom du fichier qui le " +"contient sans l'extension ``.py`` :" + +#: library/__main__.rst:35 +msgid "" +"If the file is part of a package, ``__name__`` will also include the parent " +"package's path::" +msgstr "" +"Si le fichier fait partie d'un paquet, ``__name__`` donne tout le chemin " +"d'accès :" + +#: library/__main__.rst:42 +msgid "" +"However, if the module is executed in the top-level code environment, its " +"``__name__`` is set to the string ``'__main__'``." +msgstr "" +"En revanche, si le module est exécuté dans l'environnement d'exécution " +"principal, la variable ``__name__`` vaut ``'__main__'``." + +#: library/__main__.rst:46 +msgid "What is the \"top-level code environment\"?" +msgstr "Qu'est-ce que l'« environnement d'exécution principal » ?" + +#: library/__main__.rst:48 +msgid "" +"``__main__`` is the name of the environment where top-level code is run. " +"\"Top-level code\" is the first user-specified Python module that starts " +"running. It's \"top-level\" because it imports all other modules that the " +"program needs. Sometimes \"top-level code\" is called an *entry point* to " +"the application." +msgstr "" +"L'environnement principal a pour nom ``__main__``. Il s'agit du premier " +"module Python dont l'exécution a été demandée par l'utilisateur final. On le " +"qualifie de principal car c'est lui qui importe tous les autres modules " +"nécessités par le programme. On l'appelle parfois le point d'entrée de " +"l'application." + +#: library/__main__.rst:53 +msgid "The top-level code environment can be:" +msgstr "L'environnement principal peut prendre diverses formes :" + +#: library/__main__.rst:55 +msgid "the scope of an interactive prompt::" +msgstr "l'environnement d'une invite de commande interactive :" + +#: library/__main__.rst:60 +msgid "the Python module passed to the Python interpreter as a file argument:" +msgstr "" +"le module passé directement en tant que fichier à la commande de " +"l'interpréteur Python :" + +#: library/__main__.rst:67 +msgid "" +"the Python module or package passed to the Python interpreter with the :" +"option:`-m` argument:" +msgstr "" +"le module ou paquet passé à l'interpréteur avec l'option :option:`-m` :" + +# Minuscule car toujours dans la même énumération, ignorez +# l'avertissement que Poedit affiche à cause de la majuscule à +# « Python ». +#: library/__main__.rst:75 +msgid "Python code read by the Python interpreter from standard input:" +msgstr "le code lu par l'interpréteur depuis l'entrée standard :" + +#: library/__main__.rst:86 +msgid "" +"Python code passed to the Python interpreter with the :option:`-c` argument:" +msgstr "le code passé à l'interpréteur avec l'option :option:`-c` :" + +#: library/__main__.rst:97 +msgid "" +"In each of these situations, the top-level module's ``__name__`` is set to " +"``'__main__'``." +msgstr "" +"Dans chacun de ces cas, l'attribut ``__name__`` du module principal est mis " +"à ``'__main__'``." + +#: library/__main__.rst:100 +msgid "" +"As a result, a module can discover whether or not it is running in the top-" +"level environment by checking its own ``__name__``, which allows a common " +"idiom for conditionally executing code when the module is not initialized " +"from an import statement::" +msgstr "" +"Un module peut donc savoir s'il est exécuté dans l'environnement principal " +"en vérifiant son ``__name__``, ce qui permet typiquement d'exécuter du code " +"lorsque le module est initialisé d'une manière autre que l'importation ::" + +#: library/__main__.rst:111 +msgid "" +"For a more detailed look at how ``__name__`` is set in all situations, see " +"the tutorial section :ref:`tut-modules`." +msgstr "" +"Pour plus de détails sur la manière dont ``__name__`` est défini dans les " +"divers cas, voir la section :ref:`tut-modules` dans le tutoriel." + +#: library/__main__.rst:239 +msgid "Idiomatic Usage" +msgstr "Utilisation idiomatique" + +#: library/__main__.rst:118 +msgid "" +"Some modules contain code that is intended for script use only, like parsing " +"command-line arguments or fetching data from standard input. If a module " +"like this was imported from a different module, for example to unit test it, " +"the script code would unintentionally execute as well." +msgstr "" +"Il arrive qu'un module contienne du code qui ne doit s'exécuter que lorsque " +"le module est utilisé comme script. On peut penser à l'analyse des arguments " +"passés en ligne de commande, ou bien à la lecture de l'entrée standard. Il " +"ne faudrait pas que ces opérations soient effectuées lorsque le module est " +"importé depuis un autre module, comme pour les tests." + +#: library/__main__.rst:123 +msgid "" +"This is where using the ``if __name__ == '__main__'`` code block comes in " +"handy. Code within this block won't run unless the module is executed in the " +"top-level environment." +msgstr "" +"C'est dans ces situations que sert la construction ``if __name__ == " +"'__main__'``. Le code mis à l'intérieur du bloc n'est exécuté que si le " +"module est dans l'environnement principal." + +#: library/__main__.rst:127 +msgid "" +"Putting as few statements as possible in the block below ``if __name___ == " +"'__main__'`` can improve code clarity and correctness. Most often, a " +"function named ``main`` encapsulates the program's primary behavior::" +msgstr "" +"Il vaut mieux mettre aussi peu de code que possible sous le ``if __name__ == " +"'__main__'`` pour garder le code clair et limiter les risques d'erreur. La " +"plupart du temps, on écrit une fonction ``main`` qui contient tout le code " +"spécifique à l'utilisation comme script :" + +#: library/__main__.rst:151 +msgid "" +"Note that if the module didn't encapsulate code inside the ``main`` function " +"but instead put it directly within the ``if __name__ == '__main__'`` block, " +"the ``phrase`` variable would be global to the entire module. This is error-" +"prone as other functions within the module could be unintentionally using " +"the global variable instead of a local name. A ``main`` function solves " +"this problem." +msgstr "" +"Si, dans le module ci-dessus, le code de ``main`` était placé directement " +"dans le ``if __name__ == '__main__'``, la variable ``phrase`` serait " +"globale, et d'autres fonctions pourraient s'en servir par erreur à la place " +"d'une variable locale. Encapsuler le code dans la fonction ``main`` évite " +"cet ennui." + +#: library/__main__.rst:158 +msgid "" +"Using a ``main`` function has the added benefit of the ``echo`` function " +"itself being isolated and importable elsewhere. When ``echo.py`` is " +"imported, the ``echo`` and ``main`` functions will be defined, but neither " +"of them will be called, because ``__name__ != '__main__'``." +msgstr "" +"De plus, la fonction ``echo`` est elle-même séparée du reste, et on peut " +"l'importer dans un autre module. Le fait d'importer ``echo.py`` définit les " +"fonctions ``main`` et ``echo``, mais n'en appelle aucune, puisque " +"``__name__ != '__main__'``." + +#: library/__main__.rst:165 +msgid "Packaging Considerations" +msgstr "Considérations liées à l'empaquetage" + +#: library/__main__.rst:167 +msgid "" +"``main`` functions are often used to create command-line tools by specifying " +"them as entry points for console scripts. When this is done, `pip `_ inserts the function call into a template script, where the " +"return value of ``main`` is passed into :func:`sys.exit`. For example::" +msgstr "" +"Les fonctions ``main`` servent souvent à créer des outils qui s'exécutent en " +"ligne de commande. Les scripts sont ajoutés au système à l'aide de points " +"d'entrée, qui demandent à `pip `_ de créer un " +"exécutable. Il le fait en insérant un appel à la fonction à l'intérieur d'un " +"modèle prédéfini où la valeur qu'elle renvoie est passée directement à :func:" +"`sys.exit` :" + +#: library/__main__.rst:175 +msgid "" +"Since the call to ``main`` is wrapped in :func:`sys.exit`, the expectation " +"is that your function will return some value acceptable as an input to :func:" +"`sys.exit`; typically, an integer or ``None`` (which is implicitly returned " +"if your function does not have a return statement)." +msgstr "" +"Puisque l'appel de ``main`` est encapsulé dans :func:`sys.exit`, ``main`` " +"doit renvoyer une valeur qui convienne comme argument à :func:`sys.exit`, " +"par exemple un code de retour sous forme d'entier. La valeur ``None`` est " +"également acceptée, et c'est d'ailleurs celle que renvoie la fonction si " +"elle se termine sans rencontrer d'instruction ``return``." + +#: library/__main__.rst:180 +msgid "" +"By proactively following this convention ourselves, our module will have the " +"same behavior when run directly (i.e. ``python3 echo.py``) as it will have " +"if we later package it as a console script entry-point in a pip-installable " +"package." +msgstr "" +"Il est utile de se conformer à cette convention. De cette manière, le module " +"se comporte de la même manière s'il est distribué comme script à l'aide des " +"points d'entrée que lorsqu'il est exécuté directement (avec ``python3 echo." +"py``)." + +#: library/__main__.rst:185 +msgid "" +"In particular, be careful about returning strings from your ``main`` " +"function. :func:`sys.exit` will interpret a string argument as a failure " +"message, so your program will have an exit code of ``1``, indicating " +"failure, and the string will be written to :data:`sys.stderr`. The ``echo." +"py`` example from earlier exemplifies using the ``sys.exit(main())`` " +"convention." +msgstr "" +"En particulier, mieux vaut éviter de renvoyer une chaîne de caractères " +"depuis la fonction ``main``. En effet, si :func:`sys.exit` reçoit une " +"chaîne, elle l'interprète comme un message d'erreur, qu'elle affiche sur :" +"data:`sys.stderr` avant de terminer le programme avec le code de retour 1 " +"(erreur). L'exemple de ``echo.py`` ci-dessus montre la pratique recommandée." + +#: library/__main__.rst:193 +msgid "" +"`Python Packaging User Guide `_ contains a " +"collection of tutorials and references on how to distribute and install " +"Python packages with modern tools." +msgstr "" +"Le `guide de l'empaquetage en Python `_ (en " +"anglais) contient plusieurs tutoriels et documents de référence autour de la " +"distribution et de l'installation de paquets Python avec des outils modernes." + +#: library/__main__.rst:199 +msgid "``__main__.py`` in Python Packages" +msgstr "Le fichier ``__main__.py`` dans les paquets Python" + +#: library/__main__.rst:201 +msgid "" +"If you are not familiar with Python packages, see section :ref:`tut-" +"packages` of the tutorial. Most commonly, the ``__main__.py`` file is used " +"to provide a command-line interface for a package. Consider the following " +"hypothetical package, \"bandclass\":" +msgstr "" +"Si vous n'êtes pas familier des paquets Python, lisez :ref:`tut-packages` " +"dans le tutoriel. Un fichier ``__main__.py`` permet à un paquet de définir " +"une interface en ligne de commande. Prenons pour exemple un paquet nommé " +"*bandclass* :" + +#: library/__main__.rst:213 +msgid "" +"``__main__.py`` will be executed when the package itself is invoked directly " +"from the command line using the :option:`-m` flag. For example:" +msgstr "" +"Le fichier ``__main__.py`` qu'il contient s'exécute lorsque le paquet est " +"appelé depuis la ligne de commande avec l'option :option:`-m` de " +"l'interpréteur, comme ceci :" + +#: library/__main__.rst:220 +msgid "" +"This command will cause ``__main__.py`` to run. How you utilize this " +"mechanism will depend on the nature of the package you are writing, but in " +"this hypothetical case, it might make sense to allow the teacher to search " +"for students::" +msgstr "" +"Cette commande lance l'exécution de ``__main__.py``. Il vous appartient, en " +"tant que concepteur du paquet, de déterminer ce qu'elle doit faire. Dans " +"notre exemple, elle pourrait rechercher un étudiant dans une base de " +"données ::" + +#: library/__main__.rst:233 +msgid "" +"Note that ``from .student import search_students`` is an example of a " +"relative import. This import style can be used when referencing modules " +"within a package. For more details, see :ref:`intra-package-references` in " +"the :ref:`tut-modules` section of the tutorial." +msgstr "" +"Remarquez l'importation ``from .student import search_students``. Le point " +"avant ``student`` sert à rendre le chemin ``student`` relatif à la position " +"du module qui l'importe. Pour plus d'informations, voir :ref:`intra-package-" +"references` dans la section :ref:`tut-modules` du tutoriel." + +#: library/__main__.rst:241 +msgid "" +"The contents of ``__main__.py`` typically isn't fenced with ``if __name__ == " +"'__main__'`` blocks. Instead, those files are kept short, functions to " +"execute from other modules. Those other modules can then be easily unit-" +"tested and are properly reusable." +msgstr "" +"En général, on ne met pas le code de ``__main__.py`` dans un bloc ``if " +"__name__ == '__main__'``. Il vaut mieux définir toutes les fonctions utiles " +"dans d'autres modules et réduire la taille du fichier ``__main__.py`` au " +"minimum. Il est alors plus facile de tester et réutiliser ces autres modules." + +#: library/__main__.rst:246 +msgid "" +"If used, an ``if __name__ == '__main__'`` block will still work as expected " +"for a ``__main__.py`` file within a package, because its ``__name__`` " +"attribute will include the package's path if imported::" +msgstr "" +"Cependant, un ``if __name__ == '__main__'``, s'il est présent dans le " +"``__main__.py``, fonctionne correctement. En effet, si ``__main__.py`` est " +"importé depuis autre module, son attribut ``__name__`` contient, avant " +"``__main__``, le nom du paquet dont il fait partie :" + +#: library/__main__.rst:254 +msgid "" +"This won't work for ``__main__.py`` files in the root directory of a .zip " +"file though. Hence, for consistency, minimal ``__main__.py`` like the :mod:" +"`venv` one mentioned below are preferred." +msgstr "" +"Malgré tout, cela ne fonctionne pas pour les fichiers ``__main__.py`` à la " +"racine d'une archive ZIP. Aussi est-il préférable d'écrire des ``__main__." +"py`` dans le style minimal de celui de :mod:`venv` mentionné ci-dessus." + +#: library/__main__.rst:260 +#, fuzzy +msgid "" +"See :mod:`venv` for an example of a package with a minimal ``__main__.py`` " +"in the standard library. It doesn't contain a ``if __name__ == '__main__'`` " +"block. You can invoke it with ``python -m venv [directory]``." +msgstr "" +"Le module :mod:`venv` de la bibliothèque standard est un exemple de paquet " +"contenant un fichier ``__main__.py`` minimal, sans ``if __name__ == " +"'__main__'``. Il s'appelle avec la commande :samp:`python3 -m venv {dossier}" +"`." + +#: library/__main__.rst:264 +msgid "" +"See :mod:`runpy` for more details on the :option:`-m` flag to the " +"interpreter executable." +msgstr "" +"La documentation du module :mod:`runpy` fournit une description complète de " +"l'option :option:`-m` de l'interpréteur." + +#: library/__main__.rst:267 +msgid "" +"See :mod:`zipapp` for how to run applications packaged as *.zip* files. In " +"this case Python looks for a ``__main__.py`` file in the root directory of " +"the archive." +msgstr "" +"Le module :mod:`zipapp` exécute des applications emballées dans une archive " +"ZIP. Dans ce cas, l'interpréteur recherche un fichier ``__main__.py`` à la " +"racine de l'archive." + +#: library/__main__.rst:274 +msgid "``import __main__``" +msgstr "``import __main__``" + +#: library/__main__.rst:276 +msgid "" +"Regardless of which module a Python program was started with, other modules " +"running within that same program can import the top-level environment's " +"scope (:term:`namespace`) by importing the ``__main__`` module. This " +"doesn't import a ``__main__.py`` file but rather whichever module that " +"received the special name ``'__main__'``." +msgstr "" +"Quel que soit le module principal d'un programme, les autres modules peuvent " +"accéder à l':term:`espace de nommage ` dans lequel il s'exécute " +"en important le module spécial ``__main__``. Celui-ci ne correspond pas " +"forcément à un fichier ``__main__.py``. Il s'agit simplement du module qui a " +"reçu le nom ``'__main__'``." + +#: library/__main__.rst:282 +msgid "Here is an example module that consumes the ``__main__`` namespace::" +msgstr "Voici un exemple d'utilisation du module ``__main__`` :" + +#: library/__main__.rst:300 +msgid "Example usage of this module could be as follows::" +msgstr "Ce code s'utilise comme ceci :" + +#: library/__main__.rst:319 +msgid "Now, if we started our program, the result would look like this:" +msgstr "Le programme ci-dessus donne la sortie :" + +#: library/__main__.rst:326 +msgid "" +"The exit code of the program would be 1, indicating an error. Uncommenting " +"the line with ``my_name = \"Dinsdale\"`` fixes the program and now it exits " +"with status code 0, indicating success:" +msgstr "" +"Son code de retour est 1, ce qui signifie une erreur. En supprimant la " +"marque de commentaire en début de ligne ``my_name = \"Dinsdale\"``, le " +"programme est corrigé, et renvoie au système le code 0 car il n'y a plus " +"d'erreur :" + +#: library/__main__.rst:335 +msgid "" +"Note that importing ``__main__`` doesn't cause any issues with " +"unintentionally running top-level code meant for script use which is put in " +"the ``if __name__ == \"__main__\"`` block of the ``start`` module. Why does " +"this work?" +msgstr "" +"On pourrait s'attendre à un problème au moment de l'importation de " +"``__main__`` : cela ne provoque-t-il pas l'exécution anticipée du code de " +"script sous ``if __name__ == '__main__'`` dans le module principal " +"``start`` ?" + +#: library/__main__.rst:339 +msgid "" +"Python inserts an empty ``__main__`` module in :attr:`sys.modules` at " +"interpreter startup, and populates it by running top-level code. In our " +"example this is the ``start`` module which runs line by line and imports " +"``namely``. In turn, ``namely`` imports ``__main__`` (which is really " +"``start``). That's an import cycle! Fortunately, since the partially " +"populated ``__main__`` module is present in :attr:`sys.modules`, Python " +"passes that to ``namely``. See :ref:`Special considerations for __main__ " +"` in the import system's reference for details on how " +"this works." +msgstr "" +"En fait, le déroulement de l'exécution est le suivant : au lancement de " +"l'interpréteur, un module ``__main__`` initialement vide est inséré dans :" +"attr:`sys.modules`. Il se remplit au fur et à mesure de l'exécution du code " +"principal. Dans notre exemple, le module principal est ``start``, qui " +"s'exécute ligne par ligne et en vient à importer ``namely``. Or ``namely``, " +"à son tour, importe ``__main__``, c'est-à-dire en fait ``start``. On a donc " +"une importation cyclique. Puisque le module ``__main__`` est déjà présent " +"dans :attr:`sys.modules`, bien qu'encore incomplet, il est directement passé " +"à ``namely`` sans réimportation. La section :ref:`import-dunder-main` dans " +"le document de référence du système d'importation explique plus avant ce " +"fonctionnement." + +#: library/__main__.rst:348 +msgid "" +"The Python REPL is another example of a \"top-level environment\", so " +"anything defined in the REPL becomes part of the ``__main__`` scope::" +msgstr "" +"L'interpréteur interactif est un autre environnement d'exécution principal " +"possible. Toute variable qui y est définie appartient à l'espace de nommage " +"``__main__`` :" + +#: library/__main__.rst:364 +msgid "" +"Note that in this case the ``__main__`` scope doesn't contain a ``__file__`` " +"attribute as it's interactive." +msgstr "" +"Dans ce cas, il n'y a pas de variable ``__file__``, puisque cela n'a pas de " +"sens dans le mode interactif." + +#: library/__main__.rst:367 +msgid "" +"The ``__main__`` scope is used in the implementation of :mod:`pdb` and :mod:" +"`rlcompleter`." +msgstr "" +"Le module ``__main__`` est notamment employé dans les implémentations de :" +"mod:`pdb` et :mod:`rlcompleter`." + +#~ msgid "" +#~ "``'__main__'`` is the name of the scope in which top-level code executes. " +#~ "A module's __name__ is set equal to ``'__main__'`` when read from " +#~ "standard input, a script, or from an interactive prompt." +#~ msgstr "" +#~ "``'__main__'`` est le nom du *scope* dans lequel le code s'exécute en " +#~ "premier. Le nom d'un module (son *__name__*) vaut ``'__main__'`` " +#~ "lorsqu'il est lu de l'entrée standard, lorsque c'est un script, ou une " +#~ "invite interactive." + +#~ msgid "" +#~ "For a package, the same effect can be achieved by including a ``__main__." +#~ "py`` module, the contents of which will be executed when the module is " +#~ "run with ``-m``." +#~ msgstr "" +#~ "Pour un paquet, le même effet peut être obtenu en utilisant un module " +#~ "``__main__.py``, son contenu sera exécuté si le paquet est lancé via ``-" +#~ "m``." diff --git a/library/_thread.po b/library/_thread.po new file mode 100644 index 0000000000..28e6346983 --- /dev/null +++ b/library/_thread.po @@ -0,0 +1,383 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-18 15:46+0200\n" +"PO-Revision-Date: 2021-11-06 20:06+0100\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 3.0\n" + +#: library/_thread.rst:2 +msgid ":mod:`_thread` --- Low-level threading API" +msgstr ":mod:`_thread` — API bas niveau de gestion de fils d'exécution" + +#: library/_thread.rst:15 +msgid "" +"This module provides low-level primitives for working with multiple threads " +"(also called :dfn:`light-weight processes` or :dfn:`tasks`) --- multiple " +"threads of control sharing their global data space. For synchronization, " +"simple locks (also called :dfn:`mutexes` or :dfn:`binary semaphores`) are " +"provided. The :mod:`threading` module provides an easier to use and higher-" +"level threading API built on top of this module." +msgstr "" +"Ce module fournit les primitives de bas niveau pour travailler avec de " +"multiples fils d'exécution (aussi appelés :dfn:`light-weight processes` ou :" +"dfn:`tasks`) — plusieurs fils d'exécution de contrôle partagent leur espace " +"de données global. Pour la synchronisation, de simples verrous (aussi " +"appelés des :dfn:`mutexes` ou des :dfn:`binary semaphores`) sont fournis. Le " +"module :mod:`threading` fournit une API de fils d'exécution de haut niveau, " +"plus facile à utiliser et construite à partir de ce module." + +#: library/_thread.rst:26 +msgid "This module used to be optional, it is now always available." +msgstr "Ce module était optionnel, il est maintenant toujours disponible." + +#: library/_thread.rst:29 +msgid "This module defines the following constants and functions:" +msgstr "Ce module définit les constantes et les fonctions suivantes :" + +#: library/_thread.rst:33 +msgid "Raised on thread-specific errors." +msgstr "Levée lors d'erreurs spécifiques aux fils d'exécution." + +#: library/_thread.rst:35 +msgid "This is now a synonym of the built-in :exc:`RuntimeError`." +msgstr "" +"Ceci est à présent un synonyme de l'exception native :exc:`RuntimeError`." + +#: library/_thread.rst:41 +msgid "This is the type of lock objects." +msgstr "C'est le type d'objets verrous." + +#: library/_thread.rst:46 +msgid "" +"Start a new thread and return its identifier. The thread executes the " +"function *function* with the argument list *args* (which must be a tuple). " +"The optional *kwargs* argument specifies a dictionary of keyword arguments." +msgstr "" +"Démarre un nouveau fils d'exécution et renvoie son identifiant. Ce fil " +"d'exécution exécute la fonction *function* avec la liste d'arguments *args* " +"(qui doit être un *n*-uplet). L'argument optionnel *kwargs* spécifie un " +"dictionnaire d'arguments nommés." + +#: library/_thread.rst:50 +msgid "When the function returns, the thread silently exits." +msgstr "Au renvoi de la fonction, le fil d'exécution quitte silencieusement." + +#: library/_thread.rst:52 +msgid "" +"When the function terminates with an unhandled exception, :func:`sys." +"unraisablehook` is called to handle the exception. The *object* attribute of " +"the hook argument is *function*. By default, a stack trace is printed and " +"then the thread exits (but other threads continue to run)." +msgstr "" +"Lorsque la fonction se termine avec une exception non gérée, :func:`sys." +"unraisablehook` est appelée pour gérer cette dernière. L'attribut *object* " +"de l'argument *hook* est *function*. Par défaut, la trace d'appels est " +"affichée puis le fil d'exécution se termine (mais les autres fils " +"d'exécution continuent de s'exécuter)." + +#: library/_thread.rst:57 +msgid "" +"When the function raises a :exc:`SystemExit` exception, it is silently " +"ignored." +msgstr "" +"Lorsque la fonction lève l'exception :exc:`SystemExit`, elle est ignorée " +"silencieusement." + +#: library/_thread.rst:60 +msgid ":func:`sys.unraisablehook` is now used to handle unhandled exceptions." +msgstr "" +":func:`sys.unraisablehook` est maintenant utilisée pour s'occuper des " +"exceptions non gérées." + +#: library/_thread.rst:66 +msgid "" +"Simulate the effect of a signal arriving in the main thread. A thread can " +"use this function to interrupt the main thread, though there is no guarantee " +"that the interruption will happen immediately." +msgstr "" +"Simule l'effet d'un signal arrivant au fil d'exécution principal. Un fil " +"d'exécution peut utiliser cette fonction pour interrompre le fil d'exécution " +"principal, bien qu'une interruption immédiate ne soit pas garantie." + +#: library/_thread.rst:70 +msgid "" +"If given, *signum* is the number of the signal to simulate. If *signum* is " +"not given, :data:`signal.SIGINT` is simulated." +msgstr "" +"Le signal simulé est *signum*. La valeur par défaut est :data:`signal." +"SIGINT`." + +#: library/_thread.rst:73 +msgid "" +"If the given signal isn't handled by Python (it was set to :data:`signal." +"SIG_DFL` or :data:`signal.SIG_IGN`), this function does nothing." +msgstr "" +"Si le signal n'est pas géré par Python (s'il a été paramétré à :data:`signal." +"SIG_DFL` ou :data:`signal.SIG_IGN`), cette fonction ne fait rien." + +#: library/_thread.rst:77 +msgid "The *signum* argument is added to customize the signal number." +msgstr "Ajout du paramètre *signum* pour modifier le numéro du signal." + +#: library/_thread.rst:81 +msgid "" +"This does not emit the corresponding signal but schedules a call to the " +"associated handler (if it exists). If you want to truly emit the signal, " +"use :func:`signal.raise_signal`." +msgstr "" +"Cette fonction n'émet pas vraiment le signal, mais programme un appel du " +"gestionnaire associé (à condition qu'il existe). Pour émettre réellement le " +"signal, utilisez :func:`signal.raise_signal`." + +#: library/_thread.rst:88 +msgid "" +"Raise the :exc:`SystemExit` exception. When not caught, this will cause the " +"thread to exit silently." +msgstr "" +"Lève une exception :exc:`SystemExit`. Quand elle n'est pas interceptée, le " +"fil d'exécution se terminera silencieusement." + +#: library/_thread.rst:102 +msgid "" +"Return a new lock object. Methods of locks are described below. The lock " +"is initially unlocked." +msgstr "" +"Renvoie un nouveau verrou. Les méthodes des verrous sont décrites ci-" +"dessous. Le verrou est initialement déverrouillé." + +#: library/_thread.rst:108 +msgid "" +"Return the 'thread identifier' of the current thread. This is a nonzero " +"integer. Its value has no direct meaning; it is intended as a magic cookie " +"to be used e.g. to index a dictionary of thread-specific data. Thread " +"identifiers may be recycled when a thread exits and another thread is " +"created." +msgstr "" +"Renvoie l'« identifiant de fil » du fil d'exécution courant. C'est un " +"entier non nul. Sa valeur n'a pas de signification directe ; il est destiné " +"à être utilisé comme *cookie* magique, par exemple pour indexer un " +"dictionnaire de données pour chaque fil. Les identifiants de fils peuvent " +"être recyclés lorsqu'un fil d'exécution se termine et qu'un autre fil est " +"créé." + +#: library/_thread.rst:116 +msgid "" +"Return the native integral Thread ID of the current thread assigned by the " +"kernel. This is a non-negative integer. Its value may be used to uniquely " +"identify this particular thread system-wide (until the thread terminates, " +"after which the value may be recycled by the OS)." +msgstr "" +"Renvoie l'identifiant natif complet assigné par le noyau du fil d'exécution " +"actuel. C'est un entier non négatif. Sa valeur peut uniquement être utilisée " +"pour identifier ce fil d'exécution à l'échelle du système (jusqu'à ce que le " +"fil d'exécution se termine, après quoi la valeur peut être recyclée par le " +"système d'exploitation)." + +#: library/_thread.rst:122 +msgid "" +":ref:`Availability `: Windows, FreeBSD, Linux, macOS, OpenBSD, " +"NetBSD, AIX." +msgstr "" +":ref:`Disponibilité ` : Windows, FreeBSD, Linux, macOS, " +"OpenBSD, NetBSD, AIX." + +#: library/_thread.rst:128 +msgid "" +"Return the thread stack size used when creating new threads. The optional " +"*size* argument specifies the stack size to be used for subsequently created " +"threads, and must be 0 (use platform or configured default) or a positive " +"integer value of at least 32,768 (32 KiB). If *size* is not specified, 0 is " +"used. If changing the thread stack size is unsupported, a :exc:" +"`RuntimeError` is raised. If the specified stack size is invalid, a :exc:" +"`ValueError` is raised and the stack size is unmodified. 32 KiB is " +"currently the minimum supported stack size value to guarantee sufficient " +"stack space for the interpreter itself. Note that some platforms may have " +"particular restrictions on values for the stack size, such as requiring a " +"minimum stack size > 32 KiB or requiring allocation in multiples of the " +"system memory page size - platform documentation should be referred to for " +"more information (4 KiB pages are common; using multiples of 4096 for the " +"stack size is the suggested approach in the absence of more specific " +"information)." +msgstr "" +"Renvoie la taille de la pile d'exécution utilisée lors de la création de " +"nouveaux fils d'exécution. L'argument optionnel *size* spécifie la taille de " +"pile à utiliser pour les fils créés ultérieurement, et doit être à 0 (pour " +"utiliser la taille de la plate-forme ou la valeur configurée par défaut) ou " +"un entier positif supérieur ou égal à 32 768 (32 Kio). Si *size* n'est pas " +"spécifié, 0 est utilisé. Si la modification de la taille de la pile de fils " +"n'est pas prise en charge, une exception :exc:`RuntimeError` est levée. Si " +"la taille de la pile spécifiée n'est pas valide, une exception :exc:" +"`ValueError` est levée et la taille de la pile n'est pas modifiée. 32 Kio " +"est actuellement la valeur minimale de taille de la pile prise en charge " +"pour garantir un espace de pile suffisant pour l'interpréteur lui-même. " +"Notez que certaines plates-formes peuvent avoir des restrictions " +"particulières sur les valeurs de taille de la pile, telles que l'exigence " +"d'une taille de pile minimale > 32 Kio ou d'une allocation en multiples de " +"la taille de page de la mémoire du système – la documentation de la plate-" +"forme devrait être consultée pour plus d'informations (4 Kio sont courants ; " +"en l'absence de renseignements plus spécifiques, l'approche suggérée est " +"l'utilisation de multiples de 4 096 octets pour la taille de la pile)." + +#: library/_thread.rst:143 +msgid "" +":ref:`Availability `: Windows, systems with POSIX threads." +msgstr "" +":ref:`Disponibilité ` : Windows et systèmes gérant les fils " +"d'exécution POSIX." + +#: library/_thread.rst:148 +msgid "" +"The maximum value allowed for the *timeout* parameter of :meth:`Lock." +"acquire`. Specifying a timeout greater than this value will raise an :exc:" +"`OverflowError`." +msgstr "" +"La valeur maximale autorisée pour le paramètre *timeout* de la méthode :" +"meth:`Lock.acquire`. Préciser un délai d'attente supérieur à cette valeur " +"lève une exception :exc:`OverflowError`." + +#: library/_thread.rst:155 +msgid "Lock objects have the following methods:" +msgstr "Les verrous ont les méthodes suivantes :" + +#: library/_thread.rst:160 +msgid "" +"Without any optional argument, this method acquires the lock " +"unconditionally, if necessary waiting until it is released by another thread " +"(only one thread at a time can acquire a lock --- that's their reason for " +"existence)." +msgstr "" +"Sans aucun argument optionnel, cette méthode acquiert le verrou " +"inconditionnellement, et si nécessaire attend jusqu'à ce qu'il soit relâché " +"par un autre fil d'exécution (un seul fil d'exécution à la fois peut " +"acquérir le verrou — c'est leur raison d'être)." + +#: library/_thread.rst:164 +#, fuzzy +msgid "" +"If the *blocking* argument is present, the action depends on its value: if " +"it is False, the lock is only acquired if it can be acquired immediately " +"without waiting, while if it is True, the lock is acquired unconditionally " +"as above." +msgstr "" +"Si l'argument *waitflag*, un entier, est présent, l'action dépend de sa " +"valeur : si elle est de zéro, le verrou est seulement acquis s'il peut être " +"acquis immédiatement, sans attendre, sinon le verrou est acquis " +"inconditionnellement comme ci-dessus." + +#: library/_thread.rst:169 +#, fuzzy +msgid "" +"If the floating-point *timeout* argument is present and positive, it " +"specifies the maximum wait time in seconds before returning. A negative " +"*timeout* argument specifies an unbounded wait. You cannot specify a " +"*timeout* if *blocking* is False." +msgstr "" +"Si l'argument *timeout*, en virgule flottante, est présent et positif, il " +"spécifie le temps d'attente maximum en secondes avant de renvoyer. Un " +"argument *timeout* négatif spécifie une attente illimitée. Vous ne pouvez " +"pas spécifier un *timeout* si *waitflag* est à zéro." + +#: library/_thread.rst:174 +msgid "" +"The return value is ``True`` if the lock is acquired successfully, ``False`` " +"if not." +msgstr "" +"La valeur renvoyée est ``True`` si le verrou est acquis avec succès, sinon " +"``False``." + +#: library/_thread.rst:177 +msgid "The *timeout* parameter is new." +msgstr "Le paramètre *timeout* est nouveau." + +#: library/_thread.rst:180 +msgid "Lock acquires can now be interrupted by signals on POSIX." +msgstr "" +"Le verrou acquis peut maintenant être interrompu par des signaux sur POSIX." + +#: library/_thread.rst:186 +msgid "" +"Releases the lock. The lock must have been acquired earlier, but not " +"necessarily by the same thread." +msgstr "" +"Relâche le verrou. Le verrou doit avoir été acquis plus tôt, mais pas " +"nécessairement par le même fil d'exécution." + +#: library/_thread.rst:192 +msgid "" +"Return the status of the lock: ``True`` if it has been acquired by some " +"thread, ``False`` if not." +msgstr "" +"Renvoie le statut du verrou : ``True`` s'il a été acquis par certains fils " +"d'exécution, sinon ``False``." + +#: library/_thread.rst:195 +msgid "" +"In addition to these methods, lock objects can also be used via the :keyword:" +"`with` statement, e.g.::" +msgstr "" +"En plus de ces méthodes, les objets verrous peuvent aussi être utilisés via " +"l'instruction :keyword:`with`, e.g. ::" + +#: library/_thread.rst:205 +msgid "**Caveats:**" +msgstr "**Avertissements :**" + +#: library/_thread.rst:209 +msgid "" +"Threads interact strangely with interrupts: the :exc:`KeyboardInterrupt` " +"exception will be received by an arbitrary thread. (When the :mod:`signal` " +"module is available, interrupts always go to the main thread.)" +msgstr "" +"Les fils d'exécution interagissent étrangement avec les interruptions : " +"l'exception :exc:`KeyboardInterrupt` sera reçue par un fil d'exécution " +"arbitraire. (Quand le module :mod:`signal` est disponible, les interruptions " +"vont toujours au fil d'exécution principal)." + +#: library/_thread.rst:213 +msgid "" +"Calling :func:`sys.exit` or raising the :exc:`SystemExit` exception is " +"equivalent to calling :func:`_thread.exit`." +msgstr "" +"Appeler la fonction :func:`sys.exit` ou lever l'exception :exc:`SystemExit` " +"est équivalent à appeler la fonction :func:`_thread.exit`." + +#: library/_thread.rst:216 +msgid "" +"It is not possible to interrupt the :meth:`acquire` method on a lock --- " +"the :exc:`KeyboardInterrupt` exception will happen after the lock has been " +"acquired." +msgstr "" +"Il n'est pas possible d'interrompre la méthode :meth:`acquire` sur un verrou " +"— l'exception :exc:`KeyboardInterrupt` surviendra après que le verrou a été " +"acquis." + +#: library/_thread.rst:219 +msgid "" +"When the main thread exits, it is system defined whether the other threads " +"survive. On most systems, they are killed without executing :keyword:" +"`try` ... :keyword:`finally` clauses or executing object destructors." +msgstr "" +"Quand le fil d'exécution principal s'arrête, il est défini par le système si " +"les autres fils d'exécution survivent. Sur beaucoup de systèmes, ils sont " +"tués sans l'exécution des clauses :keyword:`try`… :keyword:`finally` ou " +"l'exécution des destructeurs d'objets." + +#: library/_thread.rst:224 +msgid "" +"When the main thread exits, it does not do any of its usual cleanup (except " +"that :keyword:`try` ... :keyword:`finally` clauses are honored), and the " +"standard I/O files are not flushed." +msgstr "" +"Quand le fil d'exécution principal s'arrête, il ne fait pas son nettoyage " +"habituel (excepté que les clauses :keyword:`try`… :keyword:`finally` sont " +"honorées) et les fichiers d'entrée/sortie standards ne sont pas nettoyés." diff --git a/library/abc.po b/library/abc.po new file mode 100644 index 0000000000..e585b9e3e8 --- /dev/null +++ b/library/abc.po @@ -0,0 +1,472 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-22 22:57+0100\n" +"PO-Revision-Date: 2021-11-06 20:18+0100\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 3.0\n" + +#: library/abc.rst:2 +msgid ":mod:`abc` --- Abstract Base Classes" +msgstr ":mod:`abc` — Classes de Base Abstraites" + +#: library/abc.rst:11 +msgid "**Source code:** :source:`Lib/abc.py`" +msgstr "**Code source:** :source:`Lib/abc.py`" + +#: library/abc.rst:15 +msgid "" +"This module provides the infrastructure for defining :term:`abstract base " +"classes ` (ABCs) in Python, as outlined in :pep:`3119`; " +"see the PEP for why this was added to Python. (See also :pep:`3141` and the :" +"mod:`numbers` module regarding a type hierarchy for numbers based on ABCs.)" +msgstr "" +"Le module fournit l'infrastructure pour définir les :term:`classes de bases " +"abstraites ` (*Abstract Base Class* ou *ABC* en " +"anglais) en Python, tel qu'indiqué dans la :pep:`3119`; voir la PEP pour la " +"raison de son ajout à Python. (Voir également la :pep:`3141` et le module :" +"mod:`numbers` pour ce qui concerne la hiérarchie de types pour les nombres " +"basés sur les classes de base abstraites). Par la suite nous utiliserons " +"l'abréviation ABC (*Abstract Base Class*) pour désigner une classe de base " +"abstraite." + +#: library/abc.rst:20 +#, fuzzy +msgid "" +"The :mod:`collections` module has some concrete classes that derive from " +"ABCs; these can, of course, be further derived. In addition, the :mod:" +"`collections.abc` submodule has some ABCs that can be used to test whether a " +"class or instance provides a particular interface, for example, if it is :" +"term:`hashable` or if it is a mapping." +msgstr "" +"Le module :mod:`collections` possède certaines classes concrètes qui " +"dérivent d'ABC. Celles-ci peuvent, bien sur, être elles-mêmes dérivées. De " +"plus, le sous-module :mod:`collections.abc` possède des ABC qui peuvent être " +"utilisées pour tester si une classe ou une instance fournit une interface " +"spécifique. Par exemple, est-elle hachable ou un tableau associatif " +"(*mapping* en anglais) ?" + +#: library/abc.rst:27 +msgid "" +"This module provides the metaclass :class:`ABCMeta` for defining ABCs and a " +"helper class :class:`ABC` to alternatively define ABCs through inheritance:" +msgstr "" +"Ce module fournit la métaclasse :class:`ABCMeta` pour définir les ABC ainsi " +"que la classe d'aide :class:`ABC`, cette dernière permettant de définir des " +"ABC en utilisant l'héritage :" + +#: library/abc.rst:32 +msgid "" +"A helper class that has :class:`ABCMeta` as its metaclass. With this class, " +"an abstract base class can be created by simply deriving from :class:`ABC` " +"avoiding sometimes confusing metaclass usage, for example::" +msgstr "" +"Classe d'aide qui a :class:`ABCMeta` pour métaclasse. Avec cette classe, une " +"ABC peut être créée simplement en héritant de :class:`ABC` , ce qui permet " +"d'éviter l'utilisation parfois déroutante de métaclasse, par exemple ::" + +#: library/abc.rst:41 +msgid "" +"Note that the type of :class:`ABC` is still :class:`ABCMeta`, therefore " +"inheriting from :class:`ABC` requires the usual precautions regarding " +"metaclass usage, as multiple inheritance may lead to metaclass conflicts. " +"One may also define an abstract base class by passing the metaclass keyword " +"and using :class:`ABCMeta` directly, for example::" +msgstr "" +"Il est à noter que le type de :class:`ABC` reste :class:`ABCMeta`. En " +"conséquence, hériter de :class:`ABC` nécessite les précautions habituelles " +"concernant l'utilisation de métaclasses : l'utilisation d'héritage multiple " +"peut entrainer des conflits de métaclasses. Il est également possible de " +"définir une ABC en passant l'argument nommé *metaclass* et en utilisant :" +"class:`ABCMeta` directement, par exemple ::" + +#: library/abc.rst:57 +msgid "Metaclass for defining Abstract Base Classes (ABCs)." +msgstr "Métaclasse pour définir des classes de base abstraites (ABC)." + +#: library/abc.rst:59 +msgid "" +"Use this metaclass to create an ABC. An ABC can be subclassed directly, and " +"then acts as a mix-in class. You can also register unrelated concrete " +"classes (even built-in classes) and unrelated ABCs as \"virtual subclasses\" " +"-- these and their descendants will be considered subclasses of the " +"registering ABC by the built-in :func:`issubclass` function, but the " +"registering ABC won't show up in their MRO (Method Resolution Order) nor " +"will method implementations defined by the registering ABC be callable (not " +"even via :func:`super`). [#]_" +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:" +"`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 " +"appelable (pas même via :func:`super`). [#]_" + +#: library/abc.rst:68 +msgid "" +"Classes created with a metaclass of :class:`ABCMeta` have the following " +"method:" +msgstr "" +"Les classes dont la métaclasse est :class:`ABCMeta` possèdent les méthodes " +"suivantes :" + +#: library/abc.rst:72 +msgid "" +"Register *subclass* as a \"virtual subclass\" of this ABC. For example::" +msgstr "" +"Enregistrer *subclass* en tant que sous-classe virtuelle de cette ABC. Par " +"exemple ::" + +#: library/abc.rst:85 +msgid "Returns the registered subclass, to allow usage as a class decorator." +msgstr "" +"Renvoie la sous-classe enregistrée pour permettre l'utilisation en tant que " +"décorateur de classe." + +#: library/abc.rst:88 +msgid "" +"To detect calls to :meth:`register`, you can use the :func:`get_cache_token` " +"function." +msgstr "" +"Pour détecter les appels à :meth:`register`, vous pouvez utiliser la " +"fonction :func:`get_cache_token`." + +#: library/abc.rst:92 +msgid "You can also override this method in an abstract base class:" +msgstr "Vous pouvez également redéfinir cette méthode dans une ABC :" + +#: library/abc.rst:96 +msgid "(Must be defined as a class method.)" +msgstr "(Doit être définie en tant que méthode de classe.)" + +#: library/abc.rst:98 +msgid "" +"Check whether *subclass* is considered a subclass of this ABC. This means " +"that you can customize the behavior of ``issubclass`` further without the " +"need to call :meth:`register` on every class you want to consider a subclass " +"of the ABC. (This class method is called from the :meth:`__subclasscheck__` " +"method of the ABC.)" +msgstr "" +"Vérifie si *subclass* est considérée comme une sous-classe de cette ABC. " +"Cela signifie que vous pouvez personnaliser le comportement de " +"``issubclass`` sans nécessiter d'appeler :meth:`register` pour chacune des " +"classes que vous souhaitez considérer comme sous-classe de l'ABC. (Cette " +"méthode de classe est appelée par la méthode :meth:`__subclasscheck__` de la " +"classe de base abstraite)." + +#: library/abc.rst:104 +msgid "" +"This method should return ``True``, ``False`` or ``NotImplemented``. If it " +"returns ``True``, the *subclass* is considered a subclass of this ABC. If it " +"returns ``False``, the *subclass* is not considered a subclass of this ABC, " +"even if it would normally be one. If it returns ``NotImplemented``, the " +"subclass check is continued with the usual mechanism." +msgstr "" +"Cette méthode doit renvoyer ``True``, ``False`` ou ``NotImplemented``. Si " +"elle renvoie ``True``, *subclass* est considérée comme sous-classe de cette " +"ABC. Si elle renvoie ``False``, la *subclass* n'est pas considérée une sous-" +"classe de cette ABC même si elle l'aurait été en temps normal. Si elle " +"renvoie ``NotImplemented``, la vérification d'appartenance à la sous-classe " +"continue via le mécanisme habituel." + +#: library/abc.rst:114 +msgid "" +"For a demonstration of these concepts, look at this example ABC definition::" +msgstr "" +"Pour une illustration de ces concepts, voir cet exemple de définition de " +"ABC ::" + +#: library/abc.rst:143 +msgid "" +"The ABC ``MyIterable`` defines the standard iterable method, :meth:" +"`~iterator.__iter__`, as an abstract method. The implementation given here " +"can still be called from subclasses. The :meth:`get_iterator` method is " +"also part of the ``MyIterable`` abstract base class, but it does not have to " +"be overridden in non-abstract derived classes." +msgstr "" +"L'ABC ``MyIterable`` définit la méthode d'itération :meth:`~iterator." +"__iter__` comme méthode abstraite. L'implémentation qui lui est donnée ici " +"peut être appelée depuis les sous-classes. La méthode :meth:`get_iterator` " +"fait également partie de la classe de base abstraite ``MyIterable``, mais " +"elle n'a pas à être redéfinie dans les classes dérivées non-abstraites." + +#: library/abc.rst:149 +msgid "" +"The :meth:`__subclasshook__` class method defined here says that any class " +"that has an :meth:`~iterator.__iter__` method in its :attr:`~object." +"__dict__` (or in that of one of its base classes, accessed via the :attr:" +"`~class.__mro__` list) is considered a ``MyIterable`` too." +msgstr "" +"La méthode de classe :meth:`__subclasshook__` définie ici dit que toute " +"classe qui possède la méthode :meth:`~iterator.__iter__` dans son :attr:" +"`~object.__dict__` (ou dans une de ses classes de base, accédée via la " +"liste :attr:`~class.__mro__`) est considérée également comme un " +"``MyIterable``." + +#: library/abc.rst:154 +msgid "" +"Finally, the last line makes ``Foo`` a virtual subclass of ``MyIterable``, " +"even though it does not define an :meth:`~iterator.__iter__` method (it uses " +"the old-style iterable protocol, defined in terms of :meth:`__len__` and :" +"meth:`__getitem__`). Note that this will not make ``get_iterator`` " +"available as a method of ``Foo``, so it is provided separately." +msgstr "" +"Enfin, la dernière ligne fait de ``Foo`` une sous-classe virtuelle de " +"``MyIterable``, même si cette classe ne définit pas de méthode :meth:" +"`~iterator.__iter__` (elle utilise l'ancien protocole d'itération qui se " +"définit en termes de :meth:`__len__` et :meth:`__getitem__`). A noter que " +"cela ne rendra pas le ``get_iterator`` de ``MyIterable`` disponible comme " +"une méthode de ``Foo``, ``get_iterator`` est donc implémenté séparément." + +#: library/abc.rst:163 +msgid "The :mod:`abc` module also provides the following decorator:" +msgstr "Le module :mod:`abc` fournit aussi le décorateur :" + +#: library/abc.rst:167 +msgid "A decorator indicating abstract methods." +msgstr "Un décorateur marquant les méthodes comme abstraites." + +#: library/abc.rst:169 +msgid "" +"Using this decorator requires that the class's metaclass is :class:`ABCMeta` " +"or is derived from it. A class that has a metaclass derived from :class:" +"`ABCMeta` cannot be instantiated unless all of its abstract methods and " +"properties are overridden. The abstract methods can be called using any of " +"the normal 'super' call mechanisms. :func:`abstractmethod` may be used to " +"declare abstract methods for properties and descriptors." +msgstr "" +"Utiliser ce décorateur nécessite que la métaclasse de la classe soit :class:" +"`ABCMeta` ou soit dérivée de celle-ci. Une classe qui possède une méta-" +"classe dérivée de :class:`ABCMeta` ne peut pas être instanciée à moins que " +"toutes ses méthodes et propriétés abstraites soient redéfinies. Les méthodes " +"abstraites peuvent être appelées en utilisant n'importe quel des mécanismes " +"d'appel à 'super'. :func:`abstractmethod` peut être utilisée pour déclarer " +"des méthodes abstraites pour les propriétés et descripteurs." + +#: library/abc.rst:176 +msgid "" +"Dynamically adding abstract methods to a class, or attempting to modify the " +"abstraction status of a method or class once it is created, are only " +"supported using the :func:`update_abstractmethods` function. The :func:" +"`abstractmethod` only affects subclasses derived using regular inheritance; " +"\"virtual subclasses\" registered with the ABC's :meth:`register` method are " +"not affected." +msgstr "" +"L'ajout dynamique de méthodes abstraites à une classe comme la modification " +"de l'état d'abstraction d'une méthode ou d'une classe une fois celle-ci " +"créée sont des opérations à réaliser avec :func:`update_abstractmethods`. En " +"effet, :func:`abstractmethod` n'affecte que les sous-classes dérivées " +"utilisant l'héritage classique. Les \"sous-classes virtuelles\" enregistrées " +"avec la méthode :meth:`register` de l'ABC ne sont pas affectées." + +#: library/abc.rst:183 +msgid "" +"When :func:`abstractmethod` is applied in combination with other method " +"descriptors, it should be applied as the innermost decorator, as shown in " +"the following usage examples::" +msgstr "" +"Quand le décorateur :func:`abstractmethod` est utilisé en même temps que " +"d'autres descripteurs de méthodes, il doit être appliqué en tant que " +"décorateur le plus interne. Voir les exemples d'utilisation suivants ::" + +#: library/abc.rst:217 +msgid "" +"In order to correctly interoperate with the abstract base class machinery, " +"the descriptor must identify itself as abstract using :attr:" +"`__isabstractmethod__`. In general, this attribute should be ``True`` if any " +"of the methods used to compose the descriptor are abstract. For example, " +"Python's built-in :class:`property` does the equivalent of::" +msgstr "" +"Afin d'interagir correctement avec le mécanisme de classe de base abstraite, " +"un descripteur doit s'identifier comme abstrait en utilisant :attr:" +"`__isabstractmethod__`. En général, cet attribut doit être ``True`` si au " +"moins une des méthodes faisant partie du descripteur est abstraite. Par " +"exemple, la classe native :class:`property` de python fait l'équivalent de ::" + +#: library/abc.rst:232 +msgid "" +"Unlike Java abstract methods, these abstract methods may have an " +"implementation. This implementation can be called via the :func:`super` " +"mechanism from the class that overrides it. This could be useful as an end-" +"point for a super-call in a framework that uses cooperative multiple-" +"inheritance." +msgstr "" +"Contrairement aux méthodes abstraites Java, ces méthodes abstraites peuvent " +"être implémentées. Cette implémentation peut être appelée via le mécanisme :" +"func:`super` depuis la classe qui la redéfinit. C'est typiquement utile pour " +"y appeler *super* et ainsi coopérer correctement dans un environnement " +"utilisant de l'héritage multiple." + +#: library/abc.rst:239 +msgid "The :mod:`abc` module also supports the following legacy decorators:" +msgstr "" +"Le module :mod:`abc` gère également les décorateurs historiques suivants :" + +#: library/abc.rst:244 +msgid "" +"It is now possible to use :class:`classmethod` with :func:`abstractmethod`, " +"making this decorator redundant." +msgstr "" +"Il est désormais possible d'utiliser :class:`classmethod` avec :func:" +"`abstractmethod`, cela rend ce décorateur redondant." + +#: library/abc.rst:248 +msgid "" +"A subclass of the built-in :func:`classmethod`, indicating an abstract " +"classmethod. Otherwise it is similar to :func:`abstractmethod`." +msgstr "" +"Sous-classe du décorateur natif :func:`classmethod` qui indique une méthode " +"de classe ( ``classmethod`` ) abstraite. En dehors de cela, est similaire à :" +"func:`abstractmethod`." + +#: library/abc.rst:251 +msgid "" +"This special case is deprecated, as the :func:`classmethod` decorator is now " +"correctly identified as abstract when applied to an abstract method::" +msgstr "" +"Ce cas spécial est obsolète car le décorateur :func:`classmethod` est " +"désormais correctement identifié comme abstrait quand il est appliqué à une " +"méthode abstraite ::" + +#: library/abc.rst:265 +msgid "" +"It is now possible to use :class:`staticmethod` with :func:`abstractmethod`, " +"making this decorator redundant." +msgstr "" +"Il est désormais possible d'utiliser :class:`staticmethod` avec :func:" +"`abstractmethod`, cela rend ce décorateur redondant." + +#: library/abc.rst:269 +msgid "" +"A subclass of the built-in :func:`staticmethod`, indicating an abstract " +"staticmethod. Otherwise it is similar to :func:`abstractmethod`." +msgstr "" +"Sous-classe du décorateur natif :func:`classmethod` qui indique une méthode " +"statique ( ``staticmethod`` ) abstraite. En dehors de cela, est similaire à :" +"func:`abstractmethod`." + +#: library/abc.rst:272 +msgid "" +"This special case is deprecated, as the :func:`staticmethod` decorator is " +"now correctly identified as abstract when applied to an abstract method::" +msgstr "" +"Ce cas spécial est obsolète car le décorateur :func:`staticmethod` est " +"désormais correctement identifié comme abstrait quand appliqué à une méthode " +"abstraite ::" + +#: library/abc.rst:285 +msgid "" +"It is now possible to use :class:`property`, :meth:`property.getter`, :meth:" +"`property.setter` and :meth:`property.deleter` with :func:`abstractmethod`, " +"making this decorator redundant." +msgstr "" +"Il est désormais possible d'utiliser :class:`property`, :meth:`property." +"getter`, :meth:`property.setter` et :meth:`property.deleter` avec :func:" +"`abstractmethod`, ce qui rend ce décorateur redondant." + +#: library/abc.rst:290 +msgid "" +"A subclass of the built-in :func:`property`, indicating an abstract property." +msgstr "Sous-classe de :func:`property`, qui indique une propriété abstraite." + +#: library/abc.rst:293 +msgid "" +"This special case is deprecated, as the :func:`property` decorator is now " +"correctly identified as abstract when applied to an abstract method::" +msgstr "" +"Ce cas spécial est obsolète car le décorateur :func:`property` est désormais " +"correctement identifié comme abstrait quand appliqué à une méthode " +"abstraite ::" + +#: library/abc.rst:303 +msgid "" +"The above example defines a read-only property; you can also define a read-" +"write abstract property by appropriately marking one or more of the " +"underlying methods as abstract::" +msgstr "" +"L'exemple ci-dessus définit une propriété en lecture seule. Vous pouvez " +"également définir une propriété en lecture-écriture abstraite en indiquant " +"une ou plusieurs des méthodes sous-jacentes comme abstraite ::" + +#: library/abc.rst:317 +msgid "" +"If only some components are abstract, only those components need to be " +"updated to create a concrete property in a subclass::" +msgstr "" +"Si seuls certains composants sont abstraits, seuls ces composants abstraits " +"nécessitent d'être mis à jour pour créer une propriété concrète dans une " +"sous-classe ::" + +#: library/abc.rst:326 +msgid "The :mod:`abc` module also provides the following functions:" +msgstr "Le module :mod:`abc` fournit également la fonction suivante :" + +#: library/abc.rst:330 +msgid "Returns the current abstract base class cache token." +msgstr "Renvoie le jeton de cache ( *cache token*) de l'ABC." + +#: library/abc.rst:332 +msgid "" +"The token is an opaque object (that supports equality testing) identifying " +"the current version of the abstract base class cache for virtual subclasses. " +"The token changes with every call to :meth:`ABCMeta.register` on any ABC." +msgstr "" +"Le jeton est un objet opaque (qui implémente le test d'égalité) qui " +"identifie la version actuelle du cache de l'ABC pour les sous-classes " +"virtuelles. Le jeton change avec chaque appel à :meth:`ABCMeta.register` sur " +"n'importe quelle ABC." + +#: library/abc.rst:340 +msgid "" +"A function to recalculate an abstract class's abstraction status. This " +"function should be called if a class's abstract methods have been " +"implemented or changed after it was created. Usually, this function should " +"be called from within a class decorator." +msgstr "" +"Recalcule l'état d'abstraction de la classe. Il est nécessaire d'appeler " +"cette fonction si les méthodes abstraites d'une classe sont ajoutées ou " +"modifiées après la création de la classe. C'est notamment le cas dans les " +"décorateurs de classe." + +#: library/abc.rst:345 +msgid "Returns *cls*, to allow usage as a class decorator." +msgstr "" +"Pour permettre une utilisation en tant que décorateur, cette fonction " +"renvoie *cls*." + +#: library/abc.rst:347 +msgid "If *cls* is not an instance of :class:`ABCMeta`, does nothing." +msgstr "Ne fait rien si *cls* n'est pas une instance de :class:`ABCMeta`." + +#: library/abc.rst:351 +msgid "" +"This function assumes that *cls*'s superclasses are already updated. It does " +"not update any subclasses." +msgstr "" +"Cette fonction suppose que les classes mères de *cls* ont vu leur état " +"recalculé, et ne fait rien pour recalculer celui des classes filles." + +#: library/abc.rst:357 +msgid "Footnotes" +msgstr "Notes" + +#: library/abc.rst:358 +msgid "" +"C++ programmers should note that Python's virtual base class concept is not " +"the same as C++'s." +msgstr "" +"Les développeurs C++ noteront que le concept Python de classe de base " +"virtuelle ( *virtual base class* ) n'est pas le même que celui de C++." diff --git a/library/aifc.po b/library/aifc.po new file mode 100644 index 0000000000..0e1b0350c7 --- /dev/null +++ b/library/aifc.po @@ -0,0 +1,261 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-05-21 16:37+0200\n" +"PO-Revision-Date: 2020-12-11 15:56+0100\n" +"Last-Translator: Julien Palard \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" + +#: library/aifc.rst:2 +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: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: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 " +"sampled. The number of channels indicate if the audio is mono, stereo, or " +"quadro. Each frame consists of one sample per channel. The sample size is " +"the size in bytes of each sample. Thus a frame consists of ``nchannels * " +"samplesize`` bytes, and a second's worth of audio consists of ``nchannels * " +"samplesize * framerate`` bytes." +msgstr "" + +#: 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 " +"gives a frame size of 4 bytes (2\\*2), and a second's worth occupies " +"2\\*2\\*44100 bytes (176,400 bytes)." +msgstr "" + +#: 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: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 " +"or a :term:`file object`. *mode* must be ``'r'`` or ``'rb'`` when the file " +"must be opened for reading, or ``'w'`` or ``'wb'`` when the file must be " +"opened for writing. If omitted, ``file.mode`` is used if it exists, " +"otherwise ``'rb'`` is used. When used for writing, the file object should " +"be seekable, unless you know ahead of time how many samples you are going to " +"write in total and use :meth:`writeframesraw` and :meth:`setnframes`. The :" +"func:`.open` function may be used in a :keyword:`with` statement. When the :" +"keyword:`!with` block completes, the :meth:`~aifc.close` method is called." +msgstr "" + +#: 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:59 +msgid "" +"Objects returned by :func:`.open` when a file is opened for reading have the " +"following methods:" +msgstr "" + +#: 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:70 +msgid "Return the size in bytes of individual samples." +msgstr "Donne la taille en octets des échantillons, individuellement." + +#: library/aifc.rst:75 +msgid "Return the sampling rate (number of audio frames per second)." +msgstr "" + +#: 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: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: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:99 +msgid "" +"Returns a :func:`~collections.namedtuple` ``(nchannels, sampwidth, " +"framerate, nframes, comptype, compname)``, equivalent to output of the :meth:" +"`get\\*` methods." +msgstr "" +"Renvoie une :func:`~collections.namedtuple` ``(nchannels, sampwidth, " +"framerate, nframes, comptype, compname)``, équivalent à la sortie des " +"méthodes :meth:`get\\*`." + +#: 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 " +"mark position in frames from the beginning of the data (an integer), the " +"third is the name of the mark (a string)." +msgstr "" + +#: library/aifc.rst:114 +msgid "" +"Return the tuple as described in :meth:`getmarkers` for the mark with the " +"given *id*." +msgstr "" + +#: 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:127 +msgid "" +"Rewind the read pointer. The next :meth:`readframes` will start from the " +"beginning." +msgstr "" + +#: library/aifc.rst:133 +msgid "Seek to the specified frame number." +msgstr "Va à la trame de numéro donné." + +#: library/aifc.rst:138 +msgid "Return the current frame number." +msgstr "Donne le numéro de la trame courante." + +#: library/aifc.rst:143 +msgid "" +"Close the AIFF file. After calling this method, the object can no longer be " +"used." +msgstr "" + +#: 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 " +"addition the following methods exist. The :meth:`get\\*` methods can only " +"be called after the corresponding :meth:`set\\*` methods have been called. " +"Before the first :meth:`writeframes` or :meth:`writeframesraw`, all " +"parameters except for the number of frames must be filled in." +msgstr "" + +#: 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: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:169 +msgid "Specify the number of channels in the audio file." +msgstr "Définit le nombre de canaux du fichier audio." + +#: 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:179 +msgid "Specify the sampling frequency in frames per second." +msgstr "" + +#: 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: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 " +"should be a human-readable description of the compression type as a bytes " +"array, the type parameter should be a bytes array of length 4. Currently " +"the following compression types are supported: ``b'NONE'``, ``b'ULAW'``, " +"``b'ALAW'``, ``b'G722'``." +msgstr "" + +#: 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: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:219 +msgid "" +"Return the current write position in the output file. Useful in combination " +"with :meth:`setmark`." +msgstr "" + +#: 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:237 +msgid "Any :term:`bytes-like object` is now accepted." +msgstr "N'importe quel :term:`bytes-like object` est maintenant accepté." + +#: library/aifc.rst:234 +msgid "" +"Like :meth:`writeframes`, except that the header of the audio file is not " +"updated." +msgstr "" + +#: 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 " +"longer be used." +msgstr "" diff --git a/library/allos.po b/library/allos.po new file mode 100644 index 0000000000..20600fe50f --- /dev/null +++ b/library/allos.po @@ -0,0 +1,33 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +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: 2020-12-11 15:56+0100\n" +"Last-Translator: Julien Palard \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" + +#: library/allos.rst:5 +msgid "Generic Operating System Services" +msgstr "Services génériques du système d'exploitation" + +#: library/allos.rst:7 +msgid "" +"The modules described in this chapter provide interfaces to operating system " +"features that are available on (almost) all operating systems, such as files " +"and a clock. The interfaces are generally modeled after the Unix or C " +"interfaces, but they are available on most other systems as well. Here's an " +"overview:" +msgstr "" +"Les modules documentés dans ce chapitre fournissent des interfaces vers des " +"fonctionnalités communes à la grande majorité des systèmes d'exploitation, " +"telles que les fichiers et l'horloge. Bien que ces interfaces soient " +"classiquement calquées sur les interfaces Unix ou C, elles sont aussi " +"disponibles sur la plupart des autres systèmes. En voici un aperçu." diff --git a/library/archiving.po b/library/archiving.po new file mode 100644 index 0000000000..893e6f3dc5 --- /dev/null +++ b/library/archiving.po @@ -0,0 +1,31 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +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-07-27 23:01+0200\n" +"Last-Translator: Julien Palard \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" + +#: library/archiving.rst:5 +msgid "Data Compression and Archiving" +msgstr "Compression de donnée et archivage" + +#: library/archiving.rst:7 +msgid "" +"The modules described in this chapter support data compression with the " +"zlib, gzip, bzip2 and lzma algorithms, and the creation of ZIP- and tar-" +"format archives. See also :ref:`archiving-operations` provided by the :mod:" +"`shutil` module." +msgstr "" +"Les modules documentés dans ce chapitre implémentent les algorithmes de " +"compression *zlib*, *gzip*, *bzip2* et *lzma*, ainsi que la création " +"d'archives *ZIP* et *tar*. Voir aussi :ref:`archiving-operations` fourni par " +"le module :mod:`shutil`." diff --git a/library/argparse.po b/library/argparse.po new file mode 100644 index 0000000000..f296821b1c --- /dev/null +++ b/library/argparse.po @@ -0,0 +1,2660 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-22 22:57+0100\n" +"PO-Revision-Date: 2022-05-30 11:00+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.2\n" + +#: library/argparse.rst:2 +msgid "" +":mod:`argparse` --- Parser for command-line options, arguments and sub-" +"commands" +msgstr "" +":mod:`argparse` -- Parseur d'arguments, d'options, et de sous-commandes de " +"ligne de commande" + +#: library/argparse.rst:12 +msgid "**Source code:** :source:`Lib/argparse.py`" +msgstr "**Code source:** :source:`Lib/argparse.py`" + +#: library/argparse.rst:None +msgid "Tutorial" +msgstr "Tutoriel" + +#: library/argparse.rst:18 +msgid "" +"This page contains the API reference information. For a more gentle " +"introduction to Python command-line parsing, have a look at the :ref:" +"`argparse tutorial `." +msgstr "" +"Cette page est la référence de l'API. Pour une introduction plus en douceur " +"à l'analyse des arguments de la ligne de commande, regardez :ref:`le " +"tutoriel argparse `." + +#: library/argparse.rst:22 +msgid "" +"The :mod:`argparse` module makes it easy to write user-friendly command-line " +"interfaces. The program defines what arguments it requires, and :mod:" +"`argparse` will figure out how to parse those out of :data:`sys.argv`. The :" +"mod:`argparse` module also automatically generates help and usage messages " +"and issues errors when users give the program invalid arguments." +msgstr "" +"Le module :mod:`argparse` facilite l'écriture d'interfaces en ligne de " +"commande agréables à l'emploi. Le programme définit les arguments requis et :" +"mod:`argparse` s'arrange pour analyser ceux provenant de :data:`sys.argv`. " +"Le module :mod:`argparse` génère aussi automatiquement les messages d'aide, " +"le mode d'emploi, et lève des erreurs lorsque les utilisateurs fournissent " +"au programme des arguments invalides." + +#: library/argparse.rst:30 +msgid "Example" +msgstr "Exemple" + +#: library/argparse.rst:32 +msgid "" +"The following code is a Python program that takes a list of integers and " +"produces either the sum or the max::" +msgstr "" +"Le code suivant est un programme Python acceptant une liste de nombre " +"entiers et en donnant soit la somme, soit le maximum ::" + +#: library/argparse.rst:47 +msgid "" +"Assuming the Python code above is saved into a file called ``prog.py``, it " +"can be run at the command line and provides useful help messages:" +msgstr "" +"En supposant que le code Python ci-dessus est sauvegardé dans un fichier " +"nommé ``prog.py``, il peut être lancé en ligne de commande et fournit des " +"messages d'aide utiles :" + +#: library/argparse.rst:64 +msgid "" +"When run with the appropriate arguments, it prints either the sum or the max " +"of the command-line integers:" +msgstr "" +"Lorsqu'il est lancé avec les arguments appropriés, il affiche la somme ou le " +"maximum des entiers fournis en ligne de commande :" + +#: library/argparse.rst:75 +msgid "If invalid arguments are passed in, it will issue an error:" +msgstr "Si des arguments invalides sont passés, il lève une erreur :" + +#: library/argparse.rst:83 +msgid "The following sections walk you through this example." +msgstr "Les sections suivantes vous guident au travers de cet exemple." + +#: library/argparse.rst:87 +msgid "Creating a parser" +msgstr "Créer un analyseur (*parser* en anglais)" + +#: library/argparse.rst:89 +msgid "" +"The first step in using the :mod:`argparse` is creating an :class:" +"`ArgumentParser` object::" +msgstr "" +"La première étape dans l'utilisation de :mod:`argparse` est de créer un " +"objet :class:`ArgumentParser` ::" + +#: library/argparse.rst:94 +msgid "" +"The :class:`ArgumentParser` object will hold all the information necessary " +"to parse the command line into Python data types." +msgstr "" +"L'objet :class:`ArgumentParser` contiendra toutes les informations " +"nécessaires pour interpréter la ligne de commande comme des types de données " +"de Python." + +#: library/argparse.rst:99 +msgid "Adding arguments" +msgstr "Ajouter des arguments" + +#: library/argparse.rst:101 +msgid "" +"Filling an :class:`ArgumentParser` with information about program arguments " +"is done by making calls to the :meth:`~ArgumentParser.add_argument` method. " +"Generally, these calls tell the :class:`ArgumentParser` how to take the " +"strings on the command line and turn them into objects. This information is " +"stored and used when :meth:`~ArgumentParser.parse_args` is called. For " +"example::" +msgstr "" +"Alimenter un :class:`ArgumentParser` avec des informations sur les arguments " +"du programme s'effectue en faisant des appels à la méthode :meth:" +"`~ArgumentParser.add_argument`. En général ces appels disent à l':class:" +"`ArgumentParser` comment prendre les chaînes de caractères de la ligne de " +"commande et les transformer en objets. Cette information est stockée et " +"utilisée lorsque :meth:`~ArgumentParser.parse_args` est appelée. Par " +"exemple ::" + +#: library/argparse.rst:113 +msgid "" +"Later, calling :meth:`~ArgumentParser.parse_args` will return an object with " +"two attributes, ``integers`` and ``accumulate``. The ``integers`` attribute " +"will be a list of one or more ints, and the ``accumulate`` attribute will be " +"either the :func:`sum` function, if ``--sum`` was specified at the command " +"line, or the :func:`max` function if it was not." +msgstr "" +"Ensuite, appeler :meth:`~ArgumentParser.parse_args` va renvoyer un objet " +"avec deux attributs, ``integers`` et ``accumulate``. L'attribut ``integers`` " +"est une liste d'un ou plusieurs entiers, et l'attribut ``accumulate`` est " +"soit la fonction :func:`sum`, si ``--sum`` était fourni à la ligne de " +"commande, soit la fonction :func:`max` dans le cas contraire." + +#: library/argparse.rst:121 +msgid "Parsing arguments" +msgstr "Analyse des arguments" + +#: library/argparse.rst:123 +msgid "" +":class:`ArgumentParser` parses arguments through the :meth:`~ArgumentParser." +"parse_args` method. This will inspect the command line, convert each " +"argument to the appropriate type and then invoke the appropriate action. In " +"most cases, this means a simple :class:`Namespace` object will be built up " +"from attributes parsed out of the command line::" +msgstr "" +":class:`ArgumentParser` analyse les arguments avec la méthode :meth:" +"`~ArgumentParser.parse_args`. Cette méthode inspecte la ligne de commande, " +"convertit chaque argument au type approprié et invoque l'action requise. " +"Dans la plupart des cas, le résultat est la construction d'un objet :class:" +"`Namespace` à partir des attributs analysés dans la ligne de commande ::" + +#: library/argparse.rst:132 +msgid "" +"In a script, :meth:`~ArgumentParser.parse_args` will typically be called " +"with no arguments, and the :class:`ArgumentParser` will automatically " +"determine the command-line arguments from :data:`sys.argv`." +msgstr "" +"Dans un script, :meth:`~ArgumentParser.parse_args` est généralement appelée " +"sans arguments et l'objet :class:`ArgumentParser` détermine automatiquement " +"les arguments de la ligne de commande à partir de :data:`sys.argv`." + +#: library/argparse.rst:138 +msgid "ArgumentParser objects" +msgstr "Objets ``ArgumentParser``" + +#: library/argparse.rst:147 +msgid "" +"Create a new :class:`ArgumentParser` object. All parameters should be passed " +"as keyword arguments. Each parameter has its own more detailed description " +"below, but in short they are:" +msgstr "" +"Crée un nouvel objet :class:`ArgumentParser`. Tous les paramètres doivent " +"être passés en arguments nommés. Chaque paramètre a sa propre description " +"détaillée ci-dessous, mais en résumé ils sont :" + +#: library/argparse.rst:151 +msgid "" +"prog_ - The name of the program (default: ``os.path.basename(sys.argv[0])``)" +msgstr "" +"prog_ – Nom du programme (par défaut : ``os.path.basename(sys.argv[0])``) ;" + +#: library/argparse.rst:154 +msgid "" +"usage_ - The string describing the program usage (default: generated from " +"arguments added to parser)" +msgstr "" +"usage_ – Chaîne décrivant l'utilisation du programme (par défaut : générée à " +"partir des arguments ajoutés à l'analyseur) ;" + +#: library/argparse.rst:157 +msgid "" +"description_ - Text to display before the argument help (by default, no text)" +msgstr "" +"description_ – Texte à afficher au dessus de l'aide pour les arguments (vide " +"par défaut) ;" + +#: library/argparse.rst:160 +msgid "epilog_ - Text to display after the argument help (by default, no text)" +msgstr "" +"epilog_ – Texte à afficher après l'aide des arguments (vide par défaut) ;" + +#: library/argparse.rst:162 +msgid "" +"parents_ - A list of :class:`ArgumentParser` objects whose arguments should " +"also be included" +msgstr "" +"parents_ – Liste d'objets :class:`ArgumentParser` contenant des arguments " +"qui devraient aussi être inclus ;" + +#: library/argparse.rst:165 +msgid "formatter_class_ - A class for customizing the help output" +msgstr "" +"formatter_class_ – Classe pour personnaliser la sortie du message d'aide ;" + +#: library/argparse.rst:167 +msgid "" +"prefix_chars_ - The set of characters that prefix optional arguments " +"(default: '-')" +msgstr "" +"prefix_chars_ – Jeu de caractères qui précède les arguments optionnels (par " +"défaut : ``'-'``) ;" + +#: library/argparse.rst:170 +msgid "" +"fromfile_prefix_chars_ - The set of characters that prefix files from which " +"additional arguments should be read (default: ``None``)" +msgstr "" +"fromfile_prefix_chars_ – Jeu de caractères qui précède les fichiers d'où des " +"arguments additionnels doivent être lus (par défaut : ``None``) ;" + +#: library/argparse.rst:173 +msgid "" +"argument_default_ - The global default value for arguments (default: " +"``None``)" +msgstr "" +"argument_default_ – Valeur globale par défaut pour les arguments (par " +"défaut : ``None``) ;" + +#: library/argparse.rst:176 +msgid "" +"conflict_handler_ - The strategy for resolving conflicting optionals " +"(usually unnecessary)" +msgstr "" +"conflict_handler_ – Stratégie pour résoudre les conflits entre les arguments " +"optionnels (non-nécessaire en général) ;" + +#: library/argparse.rst:179 +msgid "" +"add_help_ - Add a ``-h/--help`` option to the parser (default: ``True``)" +msgstr "" +"add_help_ – Ajoute une option d'aide ``-h/--help`` à l'analyseur (par " +"défaut : ``True``) ;" + +#: library/argparse.rst:181 +msgid "" +"allow_abbrev_ - Allows long options to be abbreviated if the abbreviation is " +"unambiguous. (default: ``True``)" +msgstr "" +"allow_abbrev_ – Permet l'acceptation d'abréviations non-ambigües pour les " +"options longues (par défaut : ``True``) ;" + +#: library/argparse.rst:184 +msgid "" +"exit_on_error_ - Determines whether or not ArgumentParser exits with error " +"info when an error occurs. (default: ``True``)" +msgstr "" +"exit_on_error_ – Détermine si l'objet ``ArgumentParser`` termine l'exécution " +"avec un message d'erreur quand une erreur est rencontrée (par défaut : " +"``True``)." + +#: library/argparse.rst:187 +msgid "*allow_abbrev* parameter was added." +msgstr "Le paramètre *allow_abbrev* est ajouté." + +#: library/argparse.rst:190 +msgid "" +"In previous versions, *allow_abbrev* also disabled grouping of short flags " +"such as ``-vv`` to mean ``-v -v``." +msgstr "" +"Dans les versions précédentes, *allow_abbrev* désactivait aussi le " +"regroupement de plusieurs options courtes telles que ``-vv`` pour signifier " +"``-v -v``." + +#: library/argparse.rst:194 +msgid "*exit_on_error* parameter was added." +msgstr "Le paramètre *exit_on_error* est ajouté." + +#: library/argparse.rst:717 +msgid "The following sections describe how each of these are used." +msgstr "" +"Les sections suivantes décrivent comment chacune de ces options sont " +"utilisées." + +#: library/argparse.rst:201 +msgid "prog" +msgstr "Le paramètre *prog*" + +#: library/argparse.rst:203 +msgid "" +"By default, :class:`ArgumentParser` objects use ``sys.argv[0]`` to determine " +"how to display the name of the program in help messages. This default is " +"almost always desirable because it will make the help messages match how the " +"program was invoked on the command line. For example, consider a file named " +"``myprogram.py`` with the following code::" +msgstr "" +"Par défaut, l'objet :class:`ArgumentParser` utilise ``sys.argv[0]`` pour " +"déterminer comment afficher le nom du programme dans les messages d'aide. " +"Cette valeur par défaut est presque toujours souhaitable, car elle produit " +"un message d'aide qui correspond à la méthode utilisée pour lancer le " +"programme sur la ligne de commande. Par exemple, si on a un fichier nommé " +"``myprogram.py`` avec le code suivant ::" + +#: library/argparse.rst:214 +msgid "" +"The help for this program will display ``myprogram.py`` as the program name " +"(regardless of where the program was invoked from):" +msgstr "" +"Le message d'aide pour ce programme affiche ``myprogram.py`` pour le nom du " +"programme (peu importe d'où le programme est lancé) :" + +#: library/argparse.rst:233 +msgid "" +"To change this default behavior, another value can be supplied using the " +"``prog=`` argument to :class:`ArgumentParser`::" +msgstr "" +"Pour changer ce comportement par défaut, une valeur alternative est passée " +"par l'argument ``prog=`` du constructeur d':class:`ArgumentParser` ::" + +#: library/argparse.rst:243 +msgid "" +"Note that the program name, whether determined from ``sys.argv[0]`` or from " +"the ``prog=`` argument, is available to help messages using the ``%(prog)s`` " +"format specifier." +msgstr "" +"Prenez note que le nom du programme, peu importe s'il provient de ``sys." +"argv[0]`` ou de l'argument ``prog=``, est accessible aux messages d'aide " +"grâce au spécificateur de formatage ``%(prog)s``." + +#: library/argparse.rst:260 +msgid "usage" +msgstr "Le paramètre *usage*" + +#: library/argparse.rst:262 +msgid "" +"By default, :class:`ArgumentParser` calculates the usage message from the " +"arguments it contains::" +msgstr "" +"Par défaut, l'objet :class:`ArgumentParser` construit le message relatif à " +"l'utilisation à partir des arguments qu'il contient ::" + +#: library/argparse.rst:278 +msgid "" +"The default message can be overridden with the ``usage=`` keyword argument::" +msgstr "" +"Le message par défaut peut être remplacé grâce à l'argument nommé " +"``usage=`` ::" + +#: library/argparse.rst:293 +msgid "" +"The ``%(prog)s`` format specifier is available to fill in the program name " +"in your usage messages." +msgstr "" +"Le spécificateur de formatage ``%(prog)s`` est disponible pour insérer le " +"nom du programme dans vos messages d'utilisation." + +#: library/argparse.rst:298 +msgid "description" +msgstr "Le paramètre *description*" + +#: library/argparse.rst:300 +msgid "" +"Most calls to the :class:`ArgumentParser` constructor will use the " +"``description=`` keyword argument. This argument gives a brief description " +"of what the program does and how it works. In help messages, the " +"description is displayed between the command-line usage string and the help " +"messages for the various arguments::" +msgstr "" +"La plupart des appels au constructeur d':class:`ArgumentParser` utilisent " +"l'argument nommé ``description=``. Cet argument donne une brève description " +"de ce que fait le programme et de comment il fonctionne. Dans les messages " +"d'aide, cette description est affichée entre le prototype de ligne de " +"commande et les messages d'aide des arguments ::" + +#: library/argparse.rst:315 +msgid "" +"By default, the description will be line-wrapped so that it fits within the " +"given space. To change this behavior, see the formatter_class_ argument." +msgstr "" +"Par défaut, la description est sujette au retour à la ligne automatique pour " +"se conformer à l'espace disponible. Pour changer ce comportement, voyez " +"l'argument formatter_class_." + +#: library/argparse.rst:320 +msgid "epilog" +msgstr "Le paramètre *epilog*" + +#: library/argparse.rst:322 +msgid "" +"Some programs like to display additional description of the program after " +"the description of the arguments. Such text can be specified using the " +"``epilog=`` argument to :class:`ArgumentParser`::" +msgstr "" +"Certains programmes aiment afficher un texte supplémentaire après la " +"description des arguments. Un tel texte peut être spécifié grâce à " +"l'argument ``epilog=`` du constructeur d':class:`ArgumentParser` ::" + +#: library/argparse.rst:339 +msgid "" +"As with the description_ argument, the ``epilog=`` text is by default line-" +"wrapped, but this behavior can be adjusted with the formatter_class_ " +"argument to :class:`ArgumentParser`." +msgstr "" +"De même que pour l'argument description_, le texte passé à ``epilog=`` est " +"sujet au retour à la ligne automatique. Ce comportement peut être ajusté " +"grâce à l'argument formatter_class_ du constructeur d':class:" +"`ArgumentParser`." + +#: library/argparse.rst:345 +msgid "parents" +msgstr "Le paramètre *parents*" + +#: library/argparse.rst:347 +msgid "" +"Sometimes, several parsers share a common set of arguments. Rather than " +"repeating the definitions of these arguments, a single parser with all the " +"shared arguments and passed to ``parents=`` argument to :class:" +"`ArgumentParser` can be used. The ``parents=`` argument takes a list of :" +"class:`ArgumentParser` objects, collects all the positional and optional " +"actions from them, and adds these actions to the :class:`ArgumentParser` " +"object being constructed::" +msgstr "" +"Parfois, plusieurs analyseurs partagent un jeu commun d'arguments. Plutôt " +"que de répéter les définitions de ces arguments, un analyseur commun qui " +"contient tous les arguments partagés peut être utilisé, puis passé à " +"l'argument ``parents=`` du constructeur d':class:`ArgumentParser`. " +"L'argument ``parents=`` accepte une liste d'objets :class:`ArgumentParser`, " +"accumule toutes les actions positionnelles et optionnelles de ces objets, " +"puis les ajoute à l'instance d':class:`ArgumentParser` en cours de " +"création ::" + +#: library/argparse.rst:367 +msgid "" +"Note that most parent parsers will specify ``add_help=False``. Otherwise, " +"the :class:`ArgumentParser` will see two ``-h/--help`` options (one in the " +"parent and one in the child) and raise an error." +msgstr "" +"Prenez note que la majorité des analyseurs parents doivent spécifier " +"``add_help=False``. Autrement, le constructeur d':class:`ArgumentParser` va " +"voir plus d'une option ``-h/--help`` (une pour le parent et une pour " +"l'instance en cours de création) et va lever une erreur." + +#: library/argparse.rst:372 +msgid "" +"You must fully initialize the parsers before passing them via ``parents=``. " +"If you change the parent parsers after the child parser, those changes will " +"not be reflected in the child." +msgstr "" +"Vous devez initialiser complètement les analyseurs avant de les passer à " +"``parents=``. Si vous changez les analyseurs parents après la création de " +"l'analyseur enfant, ces changements ne seront pas répercutés sur l'enfant." + +#: library/argparse.rst:378 +msgid "formatter_class" +msgstr "Le paramètre *formatter_class*" + +#: library/argparse.rst:380 +msgid "" +":class:`ArgumentParser` objects allow the help formatting to be customized " +"by specifying an alternate formatting class. Currently, there are four such " +"classes:" +msgstr "" +"Les objets :class:`ArgumentParser` permettent la personnalisation de la mise " +"en page des messages d'aide en spécifiant une classe de formatage " +"alternative. Il y a actuellement quatre classes de formatage :" + +#: library/argparse.rst:389 +msgid "" +":class:`RawDescriptionHelpFormatter` and :class:`RawTextHelpFormatter` give " +"more control over how textual descriptions are displayed. By default, :class:" +"`ArgumentParser` objects line-wrap the description_ and epilog_ texts in " +"command-line help messages::" +msgstr "" +":class:`RawDescriptionHelpFormatter` et :class:`RawTextHelpFormatter` vous " +"donnent plus de contrôle sur comment les descriptions textuelles sont " +"affichées. Par défaut, les contenus de description_ et epilog_ des objets :" +"class:`ArgumentParser` font l'objet du retour à la ligne automatique dans " +"les messages d'aide ::" + +#: library/argparse.rst:414 +msgid "" +"Passing :class:`RawDescriptionHelpFormatter` as ``formatter_class=`` " +"indicates that description_ and epilog_ are already correctly formatted and " +"should not be line-wrapped::" +msgstr "" +"Passer :class:`RawDescriptionHelpFormatter` à ``formatter_class=`` indique " +"que les textes de description_ et d'epilog_ ont déjà été formatés " +"correctement et qu'ils ne doivent pas faire l'objet d'un retour à la ligne " +"automatique ::" + +#: library/argparse.rst:440 +msgid "" +":class:`RawTextHelpFormatter` maintains whitespace for all sorts of help " +"text, including argument descriptions. However, multiple new lines are " +"replaced with one. If you wish to preserve multiple blank lines, add spaces " +"between the newlines." +msgstr "" +":class:`RawTextHelpFormatter` conserve les espaces pour toutes les " +"catégories de textes d'aide, y compris les descriptions des arguments. Notez " +"bien que plusieurs retours à la ligne consécutifs sont remplacés par un " +"seul. Si vous voulez garder plusieurs sauts de ligne, ajoutez des espaces " +"entre les caractères de changement de ligne." + +#: library/argparse.rst:445 +msgid "" +":class:`ArgumentDefaultsHelpFormatter` automatically adds information about " +"default values to each of the argument help messages::" +msgstr "" +":class:`ArgumentDefaultsHelpFormatter` ajoute automatiquement l'information " +"sur les valeurs par défaut aux messages d'aide de tous les arguments ::" + +#: library/argparse.rst:463 +msgid "" +":class:`MetavarTypeHelpFormatter` uses the name of the type_ argument for " +"each argument as the display name for its values (rather than using the " +"dest_ as the regular formatter does)::" +msgstr "" +":class:`MetavarTypeHelpFormatter` utilise le nom du type_ de l'argument pour " +"chacun des arguments comme nom d'affichage pour leurs valeurs (contrairement " +"au formateur standard qui utilise dest_) ::" + +#: library/argparse.rst:484 +msgid "prefix_chars" +msgstr "Le paramètre *prefix_chars*" + +#: library/argparse.rst:486 +msgid "" +"Most command-line options will use ``-`` as the prefix, e.g. ``-f/--foo``. " +"Parsers that need to support different or additional prefix characters, e.g. " +"for options like ``+f`` or ``/foo``, may specify them using the " +"``prefix_chars=`` argument to the ArgumentParser constructor::" +msgstr "" +"La majorité des options sur la ligne de commande utilisent ``-`` comme " +"préfixe (par exemple : ``-f/--foo``). Pour les analyseurs qui doivent " +"accepter des caractères préfixes autres ou additionnels (par exemple pour " +"les options ``+f`` ou ``/foo``), vous devez les spécifier en utilisant " +"l'argument ``prefix_chars=`` du constructeur d'``ArgumentParser`` ::" + +#: library/argparse.rst:498 +msgid "" +"The ``prefix_chars=`` argument defaults to ``'-'``. Supplying a set of " +"characters that does not include ``-`` will cause ``-f/--foo`` options to be " +"disallowed." +msgstr "" +"La valeur par défaut de ``prefix_chars=`` est ``'-'``. Passer un jeu de " +"caractères qui n'inclut pas ``-`` provoquera le refus des options comme ``-" +"f/--foo``." + +#: library/argparse.rst:504 +msgid "fromfile_prefix_chars" +msgstr "Le paramètre *fromfile_prefix_chars*" + +#: library/argparse.rst:506 +msgid "" +"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 " +"with any of the specified characters will be treated as files, and will be " +"replaced by the arguments they contain. For example::" +msgstr "" +"Parfois, par exemple quand on traite une liste d'arguments particulièrement " +"longue, il est logique de stocker la liste d'arguments dans un fichier " +"plutôt que de la saisir sur la ligne de commande. Si un jeu de caractères " +"est passé à l'argument ``fromfile_prefix_chars=`` du constructeur de :class:" +"`ArgumentParser`, alors les arguments qui commencent par l'un des caractères " +"spécifiés seront traités comme des fichiers et seront remplacés par les " +"arguments contenus dans ces fichiers. Par exemple ::" + +#: library/argparse.rst:520 +msgid "" +"Arguments read from a file must by default be one per line (but see also :" +"meth:`~ArgumentParser.convert_arg_line_to_args`) and are treated as if they " +"were in the same place as the original file referencing argument on the " +"command line. So in the example above, the expression ``['-f', 'foo', " +"'@args.txt']`` is considered equivalent to the expression ``['-f', 'foo', '-" +"f', 'bar']``." +msgstr "" +"Par défaut, les arguments lus à partir d'un fichier doivent être chacun sur " +"une nouvelle ligne (voir aussi :meth:`~ArgumentParser." +"convert_arg_line_to_args`) et ils sont traités comme s'ils étaient au même " +"emplacement que le fichier original référençant les arguments de la ligne de " +"commande. Ainsi dans l'exemple ci-dessus, l'expression ``['-f', 'foo', " +"'@args.txt']`` est équivalente à l'expression ``['-f', 'foo', '-f', 'bar']``." + +#: library/argparse.rst:526 +msgid "" +"The ``fromfile_prefix_chars=`` argument defaults to ``None``, meaning that " +"arguments will never be treated as file references." +msgstr "" +"Par défaut, l'argument ``fromfile_prefix_chars=`` est ``None``, ce qui " +"signifie que les arguments ne seront pas traités en tant que références à " +"des fichiers." + +#: library/argparse.rst:531 +msgid "argument_default" +msgstr "Le paramètre *argument_default*" + +#: library/argparse.rst:533 +msgid "" +"Generally, argument defaults are specified either by passing a default to :" +"meth:`~ArgumentParser.add_argument` or by calling the :meth:`~ArgumentParser." +"set_defaults` methods with a specific set of name-value pairs. Sometimes " +"however, it may be useful to specify a single parser-wide default for " +"arguments. This can be accomplished by passing the ``argument_default=`` " +"keyword argument to :class:`ArgumentParser`. For example, to globally " +"suppress attribute creation on :meth:`~ArgumentParser.parse_args` calls, we " +"supply ``argument_default=SUPPRESS``::" +msgstr "" +"Généralement, les valeurs par défaut des arguments sont spécifiées soit en " +"passant la valeur désirée à :meth:`~ArgumentParser.add_argument` soit par un " +"appel à la méthode :meth:`~ArgumentParser.set_defaults`. Cette méthode " +"accepte un ensemble de paires nom-valeur. Il est parfois pertinent de " +"configurer une valeur par défaut pour tous les arguments d'un analyseur. On " +"peut activer ce comportement en passant la valeur désirée à l'argument nommé " +"``argument_default=`` du constructeur de :class:`ArgumentParser`. Par " +"exemple, pour supprimer globalement la création d'attributs pendant l'appel " +"de :meth:`~ArgumentParser.parse_args`, on fournit " +"``argument_default=SUPPRESS`` ::" + +#: library/argparse.rst:553 +msgid "allow_abbrev" +msgstr "Le paramètre *allow_abbrev*" + +#: library/argparse.rst:555 +msgid "" +"Normally, when you pass an argument list to the :meth:`~ArgumentParser." +"parse_args` method of an :class:`ArgumentParser`, it :ref:`recognizes " +"abbreviations ` of long options." +msgstr "" +"En temps normal, lorsque vous passez une liste d'arguments à la méthode :" +"meth:`~ArgumentParser.parse_args` d':class:`ArgumentParser` :ref:`elle " +"accepte les abréviations ` des options longues." + +#: library/argparse.rst:559 +msgid "This feature can be disabled by setting ``allow_abbrev`` to ``False``::" +msgstr "" +"Cette fonctionnalité peut être désactivée en passant ``False`` à " +"``allow_abbrev`` ::" + +#: library/argparse.rst:572 +msgid "conflict_handler" +msgstr "Le paramètre *conflict_handler*" + +#: library/argparse.rst:574 +msgid "" +":class:`ArgumentParser` objects do not allow two actions with the same " +"option string. By default, :class:`ArgumentParser` objects raise an " +"exception if an attempt is made to create an argument with an option string " +"that is already in use::" +msgstr "" +"Les objets :class:`ArgumentParser` ne peuvent pas avoir plus d'une option " +"avec la même chaîne d'option. Par défaut, les objets :class:`ArgumentParser` " +"lèvent une exception si on essaie de créer un argument avec une chaîne " +"d'option qui est déjà utilisée ::" + +#: library/argparse.rst:586 +msgid "" +"Sometimes (e.g. when using parents_) it may be useful to simply override any " +"older arguments with the same option string. To get this behavior, the " +"value ``'resolve'`` can be supplied to the ``conflict_handler=`` argument " +"of :class:`ArgumentParser`::" +msgstr "" +"Parfois, par exemple si on utilise des analyseurs parents_, il est " +"souhaitable de surcharger les anciens arguments qui partagent la même chaîne " +"d'option. Pour obtenir ce comportement, vous devez passer ``'resolve'`` à " +"l'argument ``conflict_handler=`` du constructeur d':class:`ArgumentParser` ::" + +#: library/argparse.rst:602 +msgid "" +"Note that :class:`ArgumentParser` objects only remove an action if all of " +"its option strings are overridden. So, in the example above, the old ``-f/--" +"foo`` action is retained as the ``-f`` action, because only the ``--foo`` " +"option string was overridden." +msgstr "" +"Prenez note que les objets :class:`ArgumentParser` n'enlèvent une action que " +"si toutes ses chaînes d'options sont surchargées. Ainsi dans l'exemple ci-" +"dessus, l'action ``-f/--foo`` du parent est conservée comme l'action ``-f`` " +"puisque ``--foo`` est la seule chaîne d'options qui a été surchargée." + +#: library/argparse.rst:609 +msgid "add_help" +msgstr "Le paramètre *add_help*" + +#: library/argparse.rst:611 +msgid "" +"By default, ArgumentParser objects add an option which simply displays the " +"parser's help message. For example, consider a file named ``myprogram.py`` " +"containing the following code::" +msgstr "" +"Par défaut, les objets ``ArgumentParser`` ajoutent une option qui offre " +"l'affichage du message d'aide de l'analyseur. Par exemple, prenons le " +"fichier ``myprogram.py`` qui contient le code suivant ::" + +#: library/argparse.rst:620 +msgid "" +"If ``-h`` or ``--help`` is supplied at the command line, the ArgumentParser " +"help will be printed:" +msgstr "" +"Si ``-h`` ou ``--help`` est passé sur la ligne de commande, le message " +"d'aide de l'``ArgumentParser`` sera affiché :" + +#: library/argparse.rst:632 +msgid "" +"Occasionally, it may be useful to disable the addition of this help option. " +"This can be achieved by passing ``False`` as the ``add_help=`` argument to :" +"class:`ArgumentParser`::" +msgstr "" +"Il est parfois utile de désactiver l'ajout de cette option d'aide. Pour ce " +"faire, vous devez passer ``False`` à l'argument ``add_help=`` du " +"constructeur d':class:`ArgumentParser` ::" + +#: library/argparse.rst:644 +msgid "" +"The help option is typically ``-h/--help``. The exception to this is if the " +"``prefix_chars=`` is specified and does not include ``-``, in which case ``-" +"h`` and ``--help`` are not valid options. In this case, the first character " +"in ``prefix_chars`` is used to prefix the help options::" +msgstr "" +"En général, l'option d'aide est ``-h/--help``. L'exception à cette règle est " +"quand une valeur est passée à ``prefix_chars=`` et qu'elle n'inclue pas ``-" +"``, auquel cas, ``-h`` et ``--help`` ne sont pas des options valides. Dans " +"ce cas, le premier caractère de ``prefix_chars`` est utilisé comme préfixe " +"des options d'aide ::" + +#: library/argparse.rst:659 +msgid "exit_on_error" +msgstr "Le paramètre *exit_on_error*" + +#: library/argparse.rst:661 +msgid "" +"Normally, when you pass an invalid argument list to the :meth:" +"`~ArgumentParser.parse_args` method of an :class:`ArgumentParser`, it will " +"exit with error info." +msgstr "" +"En général, quand vous passez une liste d'arguments dont au moins un est " +"invalide à la méthode :meth:`~ArgumentParser.parse_args` d'une instance d':" +"class:`ArgumentParser`, l'exécution se termine avec un message d'erreur." + +#: library/argparse.rst:664 +msgid "" +"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`` ::" + +#: library/argparse.rst:681 +msgid "The add_argument() method" +msgstr "La méthode *add_argument()*" + +#: library/argparse.rst:687 +msgid "" +"Define how a single command-line argument should be parsed. Each parameter " +"has its own more detailed description below, but in short they are:" +msgstr "" +"Définie comment une option de ligne de commande doit être analysée. Chacun " +"des paramètres est décrit plus en détails ci-bas, mais en résumé ils sont :" + +#: library/argparse.rst:690 +msgid "" +"`name or flags`_ - Either a name or a list of option strings, e.g. ``foo`` " +"or ``-f, --foo``." +msgstr "" +"`name_or_flags`_ – Nom ou liste de chaînes d'options. Par exemple : ``foo`` " +"ou ``-f, --foo`` ;" + +#: library/argparse.rst:693 +msgid "" +"action_ - The basic type of action to be taken when this argument is " +"encountered at the command line." +msgstr "" +"action_ – Type élémentaire de l'action à entreprendre quand cet argument est " +"reconnu sur la ligne de commande ;" + +#: library/argparse.rst:696 +msgid "nargs_ - The number of command-line arguments that should be consumed." +msgstr "nargs_ – Nombre d'arguments de la ligne de commande à capturer ;" + +#: library/argparse.rst:698 +msgid "" +"const_ - A constant value required by some action_ and nargs_ selections." +msgstr "" +"const_ – Valeur constante requise par certains choix d'action_ et de nargs_ ;" + +#: library/argparse.rst:700 +msgid "" +"default_ - The value produced if the argument is absent from the command " +"line and if it is absent from the namespace object." +msgstr "" +"default_ – Valeur produite si l'argument est absent de la ligne de " +"commande et absent de l'objet ``namespace`` ;" + +#: library/argparse.rst:703 +msgid "" +"type_ - The type to which the command-line argument should be converted." +msgstr "" +"type_ – Type vers lequel l'argument sur la ligne de commande doit être " +"converti ;" + +#: library/argparse.rst:705 +msgid "choices_ - A sequence of the allowable values for the argument." +msgstr "choices_ – La séquence de valeurs autorisées pour cet argument ;" + +#: library/argparse.rst:707 +msgid "" +"required_ - Whether or not the command-line option may be omitted (optionals " +"only)." +msgstr "" +"required_ – ``True`` si l'option sur la ligne de commande est obligatoire " +"(ne s'applique qu'aux arguments optionnels) ;" + +#: library/argparse.rst:710 +msgid "help_ - A brief description of what the argument does." +msgstr "help_ – Brève description de ce que fait l'argument ;" + +#: library/argparse.rst:712 +msgid "metavar_ - A name for the argument in usage messages." +msgstr "metavar_ – Nom de l'argument dans les messages d'utilisations ;" + +#: library/argparse.rst:714 +msgid "" +"dest_ - The name of the attribute to be added to the object returned by :" +"meth:`parse_args`." +msgstr "" +"dest_ – Nom de l'attribut qui sera ajouté à l'objet retourné par :meth:" +"`parse_args`." + +#: library/argparse.rst:721 +msgid "name or flags" +msgstr "Le paramètre *name_or_flags*" + +#: library/argparse.rst:723 +msgid "" +"The :meth:`~ArgumentParser.add_argument` method must know whether an " +"optional argument, like ``-f`` or ``--foo``, or a positional argument, like " +"a list of filenames, is expected. The first arguments passed to :meth:" +"`~ArgumentParser.add_argument` must therefore be either a series of flags, " +"or a simple argument name. For example, an optional argument could be " +"created like::" +msgstr "" +"La méthode :meth:`~ArgumentParser.add_argument` doit savoir si c'est un " +"argument optionnel (tel que ``-f`` ou ``--foo``) ou plutôt un argument " +"positionnel (tel qu'une liste de noms de fichiers) qui est attendu. Le " +"premier argument passé à :meth:`~ArgumentParser.add_argument` doit donc être " +"soit une série de noms d'options tels qu'ils apparaissent sur la ligne de " +"commande, soit simplement un nom si on désire un argument positionnel. Par " +"exemple, un argument optionnel est créé comme suit ::" + +#: library/argparse.rst:732 +msgid "while a positional argument could be created like::" +msgstr "alors qu'un argument positionnel est créé comme suit ::" + +#: library/argparse.rst:736 +msgid "" +"When :meth:`~ArgumentParser.parse_args` is called, optional arguments will " +"be identified by the ``-`` prefix, and the remaining arguments will be " +"assumed to be positional::" +msgstr "" +"Lors le l'appel de :meth:`~ArgumentParser.parse_args`, les arguments qui " +"commencent par le préfixe ``-`` sont présumés optionnels et tous les autres " +"sont présumés positionnels ::" + +#: library/argparse.rst:753 +msgid "action" +msgstr "Le paramètre *action*" + +#: library/argparse.rst:755 +msgid "" +":class:`ArgumentParser` objects associate command-line arguments with " +"actions. These actions can do just about anything with the command-line " +"arguments associated with them, though most actions simply add an attribute " +"to the object returned by :meth:`~ArgumentParser.parse_args`. The " +"``action`` keyword argument specifies how the command-line arguments should " +"be handled. The supplied actions are:" +msgstr "" +"Les objets :class:`ArgumentParser` associent les arguments de la ligne de " +"commande avec des actions. Ces actions peuvent soumettre les arguments de la " +"ligne de commande auxquels elles sont associées à un traitement arbitraire, " +"mais la majorité des actions se contentent d'ajouter un attribut à l'objet " +"renvoyé par :meth:`~ArgumentParser.parse_args`. L'argument nommé ``action`` " +"indique comment l'argument de la ligne de commande sera traité. Les actions " +"natives sont :" + +#: library/argparse.rst:761 +msgid "" +"``'store'`` - This just stores the argument's value. This is the default " +"action. For example::" +msgstr "" +"``'store'`` – Stocke la valeur de l'argument sans autre traitement. Ceci est " +"l'action par défaut. Par exemple ::" + +#: library/argparse.rst:769 +msgid "" +"``'store_const'`` - This stores the value specified by the const_ keyword " +"argument. The ``'store_const'`` action is most commonly used with optional " +"arguments that specify some sort of flag. For example::" +msgstr "" +"``'store_const'`` – Stocke la valeur passée à l'argument nommé const_. " +"L'action ``'store_const'`` est typiquement utilisée avec des arguments " +"optionnels qui représentent un drapeau ou une condition similaire. Par " +"exemple ::" + +#: library/argparse.rst:778 +msgid "" +"``'store_true'`` and ``'store_false'`` - These are special cases of " +"``'store_const'`` used for storing the values ``True`` and ``False`` " +"respectively. In addition, they create default values of ``False`` and " +"``True`` respectively. For example::" +msgstr "" +"``'store_true'`` et ``'store_false'`` – Ces actions sont des cas " +"particuliers de ``'store_const'`` pour lesquelles la valeur stockée est " +"``True`` et ``False``, respectivement. Aussi, ces actions ont comme valeur " +"par défaut ``False`` et ``True``, respectivement. Par exemple ::" + +#: library/argparse.rst:790 +msgid "" +"``'append'`` - This stores a list, and appends each argument value to the " +"list. This is useful to allow an option to be specified multiple times. " +"Example usage::" +msgstr "" +"``'append'`` – Stocke une liste et ajoute la valeur de l'argument à la " +"liste. Ceci est pratique pour les options qui peuvent être répétées sur la " +"ligne de commande ::" + +#: library/argparse.rst:799 +msgid "" +"``'append_const'`` - This stores a list, and appends the value specified by " +"the const_ keyword argument to the list. (Note that the const_ keyword " +"argument defaults to ``None``.) The ``'append_const'`` action is typically " +"useful when multiple arguments need to store constants to the same list. For " +"example::" +msgstr "" +"``'append_const'`` – Stocke une liste et ajoute la valeur passée à " +"l'argument nommé const_ à la fin de la liste. Notez que la valeur par défaut " +"de l'argument nommé const_ est ``None``. L'action ``'append_const'`` est " +"pratique quand plusieurs arguments ont besoin de stocker des constantes dans " +"la même liste. Par exemple ::" + +#: library/argparse.rst:811 +msgid "" +"``'count'`` - This counts the number of times a keyword argument occurs. For " +"example, this is useful for increasing verbosity levels::" +msgstr "" +"``'count'`` – Compte le nombre d'occurrences de l'argument nommé. Ceci est " +"pratique, par exemple, pour augmenter le niveau de verbosité ::" + +#: library/argparse.rst:819 +msgid "Note, the *default* will be ``None`` unless explicitly set to *0*." +msgstr "" +"Prenez note que la valeur de *default* sera ``None`` à moins qu'elle soit " +"explicitement définie à ``0``." + +#: library/argparse.rst:821 +msgid "" +"``'help'`` - This prints a complete help message for all the options in the " +"current parser and then exits. By default a help action is automatically " +"added to the parser. See :class:`ArgumentParser` for details of how the " +"output is created." +msgstr "" +"``'help'`` – Affiche le message d'aide complet pour toutes les options de " +"l'analyseur puis termine l'exécution. Une action ``help`` est " +"automatiquement ajoutée à l'analyseur par défaut. Consultez :class:" +"`ArgumentParser` pour les détails de la création du contenu de l'aide." + +#: library/argparse.rst:826 +msgid "" +"``'version'`` - This expects a ``version=`` keyword argument in the :meth:" +"`~ArgumentParser.add_argument` call, and prints version information and " +"exits when invoked::" +msgstr "" +"``'version'`` – Affiche la version du programme puis termine l'exécution. " +"Cette action requiert l'argument nommé ``version=`` dans l'appel à :meth:" +"`~ArgumentParser.add_argument` ::" + +#: library/argparse.rst:836 +msgid "" +"``'extend'`` - This stores a list, and extends each argument value to the " +"list. Example usage::" +msgstr "" +"``'extend'`` – Stock une liste et ajoute à la liste chacune des valeurs de " +"l'argument reçues. Voici un exemple de son utilisation ::" + +#: library/argparse.rst:847 +msgid "" +"You may also specify an arbitrary action by passing an Action subclass or " +"other object that implements the same interface. The " +"``BooleanOptionalAction`` is available in ``argparse`` and adds support for " +"boolean actions such as ``--foo`` and ``--no-foo``::" +msgstr "" +"Vous pouvez aussi spécifier une action arbitraire en passant une sous-classe " +"d'``Action`` ou un objet qui implémente la même interface. La classe " +"``BooleanOptionalAction`` est disponible dans ``argparse`` et elle ajoute la " +"gestion des options booléennes telles que ``--foo`` et ``--no-foo`` ::" + +#: library/argparse.rst:860 +msgid "" +"The recommended way to create a custom action is to extend :class:`Action`, " +"overriding the ``__call__`` method and optionally the ``__init__`` and " +"``format_usage`` methods." +msgstr "" +"La façon recommandée pour créer une action personnalisée est d'hériter d':" +"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:864 +msgid "An example of a custom action::" +msgstr "Un exemple d'action personnalisée ::" + +#: library/argparse.rst:884 +msgid "For more details, see :class:`Action`." +msgstr "Pour plus d'information, voir :class:`Action`." + +#: library/argparse.rst:887 +msgid "nargs" +msgstr "Le paramètre *nargs*" + +#: library/argparse.rst:889 +msgid "" +"ArgumentParser objects usually associate a single command-line argument with " +"a single action to be taken. The ``nargs`` keyword argument associates a " +"different number of command-line arguments with a single action. The " +"supported values are:" +msgstr "" +"En général, les objets ``ArgumentParser`` associent un seul argument de la " +"ligne de commande à une seule action à entreprendre. L'argument nommé " +"``nargs`` associe un nombre différent d'arguments de la ligne de commande à " +"une action. Les valeurs reconnues sont :" + +#: library/argparse.rst:894 +msgid "" +"``N`` (an integer). ``N`` arguments from the command line will be gathered " +"together into a list. For example::" +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:903 +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." +msgstr "" +"Prenez note que ``nargs=1`` produit une liste avec un seul élément. Ceci est " +"différent du comportement par défaut qui produit l'élément directement " +"(comme un scalaire)." + +#: library/argparse.rst:908 +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 " +"value from default_ will be produced. Note that for optional arguments, " +"there is an additional case - the option string is present but not followed " +"by a command-line argument. In this case the value from const_ will be " +"produced. Some examples to illustrate this::" +msgstr "" +"``'?'``. Un argument sera capturé de la ligne de commande et produit " +"directement. Si aucun argument n'est présent sur la ligne de commande, la " +"valeur de default_ est produite. Prenez note que pour les arguments " +"optionnels, il est aussi possible que la chaîne d'option soit présente mais " +"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:925 +msgid "" +"One of the more common uses of ``nargs='?'`` is to allow optional input and " +"output files::" +msgstr "" +"``nargs='?'`` est fréquemment utilisé pour accepter des fichiers d'entrée et " +"de sortie optionnels ::" + +#: library/argparse.rst:942 +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 " +"argument with ``nargs='*'``, but multiple optional arguments with " +"``nargs='*'`` is possible. For example::" +msgstr "" +"``'*'``. Tous les arguments présents sur la ligne de commande sont capturés " +"dans une liste. Prenez note qu'il n'est pas logique d'avoir plus d'un " +"argument positionnel avec ``nargs='*'``, mais il est par contre possible " +"d'avoir plusieurs arguments optionnels qui spécifient ``nargs='*'``. Par " +"exemple ::" + +#: library/argparse.rst:956 +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 " +"least one command-line argument present. For example::" +msgstr "" +"``'+'``. Comme pour ``'*'``, tous les arguments présents sur la ligne de " +"commande sont capturés dans une liste. De plus, un message d'erreur est " +"produit s'il n'y a pas au moins un argument présent sur la ligne de " +"commande. Par exemple ::" + +#: library/argparse.rst:968 +msgid "" +"If the ``nargs`` keyword argument is not provided, the number of arguments " +"consumed is determined by the action_. Generally this means a single " +"command-line argument will be consumed and a single item (not a list) will " +"be produced." +msgstr "" +"Si l'argument nommé ``nargs`` n'est pas fourni, le nombre d'arguments " +"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:974 +msgid "const" +msgstr "Le paramètre *const*" + +#: library/argparse.rst:976 +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 " +"required for the various :class:`ArgumentParser` actions. The two most " +"common uses of it are:" +msgstr "" +"L'argument ``const`` d':meth:`~ArgumentParser.add_argument` est utilisé pour " +"stocker une constante qui n'est pas lue depuis la ligne de commande mais qui " +"est requise par certaines actions d':class:`ArgumentParser`. Les deux " +"utilisations les plus communes sont :" + +#: library/argparse.rst:980 +msgid "" +"When :meth:`~ArgumentParser.add_argument` is called with " +"``action='http://github.com/store_const'`` or ``action='http://github.com/append_const'``. These actions add " +"the ``const`` value to one of the attributes of the object returned by :meth:" +"`~ArgumentParser.parse_args`. See the action_ description for examples." +msgstr "" +"quand :meth:`~ArgumentParser.add_argument` est appelée avec " +"``action='http://github.com/store_const'`` ou ``action='http://github.com/append_const'``. Ces actions ajoutent " +"la valeur de ``const`` à l'un des attributs de l'objet renvoyé par :meth:" +"`~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:985 +msgid "" +"When :meth:`~ArgumentParser.add_argument` is called with option strings " +"(like ``-f`` or ``--foo``) and ``nargs='?'``. This creates an optional " +"argument that can be followed by zero or one command-line arguments. When " +"parsing the command line, if the option string is encountered with no " +"command-line argument following it, the value of ``const`` will be assumed " +"instead. See the nargs_ description for examples." +msgstr "" +"Quand la méthode :meth:`~ArgumentParser.add_argument` est appelée avec des " +"chaînes d'options (telles que ``-f`` ou ``--foo``) et ``nargs='?'``. Ceci " +"crée un argument optionnel qui peut être suivi de zéro ou un argument de " +"ligne de commande. Quand la ligne de commande est analysée, si la chaîne " +"d'option est trouvée mais qu'elle n'est pas suivie par un argument, la " +"valeur de ``const`` est utilisée. Consultez la description de nargs_ pour " +"voir quelques exemples." + +#: library/argparse.rst:992 +msgid "" +"With the ``'store_const'`` and ``'append_const'`` actions, the ``const`` " +"keyword argument must be given. For other actions, it defaults to ``None``." +msgstr "" +"Pour les actions ``'store_const'`` et ``'append_const'``, l'argument nommé " +"``const`` doit être spécifié. Pour toutes les autres actions, il est " +"optionnel et sa valeur par défaut est ``None``." + +#: library/argparse.rst:997 +msgid "default" +msgstr "Le paramètre *default*" + +#: library/argparse.rst:999 +msgid "" +"All optional arguments and some positional arguments may be omitted at the " +"command line. The ``default`` keyword argument of :meth:`~ArgumentParser." +"add_argument`, whose value defaults to ``None``, specifies what value should " +"be used if the command-line argument is not present. For optional arguments, " +"the ``default`` value is used when the option string was not present at the " +"command line::" +msgstr "" +"Tous les arguments optionnels et certains arguments positionnels peuvent " +"être omis à la ligne de commande. L'argument nommé ``default`` de la " +"méthode :meth:`~ArgumentParser.add_argument` (qui vaut ``None`` par défaut), " +"indique quelle valeur sera utilisé si l'argument est absent de la ligne de " +"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:1013 +msgid "" +"If the target namespace already has an attribute set, the action *default* " +"will not over write it::" +msgstr "" +"Si l'objet ``namespace`` cible a déjà un attribut assigné, l'action " +"*default* ne l'écrase pas ::" + +#: library/argparse.rst:1021 +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_ " +"conversion argument, if provided, before setting the attribute on the :class:" +"`Namespace` return value. Otherwise, the parser uses the value as is::" +msgstr "" +"Si la valeur de ``default`` est une chaîne, l'analyseur analyse cette valeur " +"comme si c'était un argument de la ligne de commande. En particulier, " +"l'analyseur applique la conversion spécifiée par l'argument type_ (si elle " +"est fournie) avant d'affecter l'attribut à l'objet :class:`Namespace` " +"renvoyé. Autrement, l'analyseur utilise la valeur telle qu'elle ::" + +#: library/argparse.rst:1032 +msgid "" +"For positional arguments with nargs_ equal to ``?`` or ``*``, the " +"``default`` value is used when no command-line argument was present::" +msgstr "" +"Pour les arguments positionnels pour lesquels nargs_ est ``?`` ou ``*``, la " +"valeur de ``default`` est utilisée quand l'argument est absent de la ligne " +"de commande ::" + +#: library/argparse.rst:1043 +msgid "" +"Providing ``default=argparse.SUPPRESS`` causes no attribute to be added if " +"the command-line argument was not present::" +msgstr "" +"Si vous passez ``default=argparse.SUPPRESS``, aucun attribut ne sera ajouté " +"à l'objet ``Namespace`` quand l'argument est absent de la ligne de " +"commande ::" + +#: library/argparse.rst:1055 +msgid "type" +msgstr "Le paramètre *type*" + +#: library/argparse.rst:1057 +msgid "" +"By default, the parser reads command-line arguments in as simple strings. " +"However, quite often the command-line string should instead be interpreted " +"as another type, such as a :class:`float` or :class:`int`. The ``type`` " +"keyword for :meth:`~ArgumentParser.add_argument` allows any necessary type-" +"checking and type conversions to be performed." +msgstr "" +"Par défaut, l'analyseur capture les arguments de la ligne de commande comme " +"des chaînes. Très souvent par contre, on désire interpréter les chaînes de " +"la ligne de commande comme un autre type, tel que :class:`float` ou :class:" +"`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:1063 +msgid "" +"If the type_ keyword is used with the default_ keyword, the type converter " +"is only applied if the default is a string." +msgstr "" +"Si l'argument nommé type_ est utilisé en conjonction avec l'argument nommé " +"default_, le convertisseur de type n'est appliqué que si la valeur par " +"défaut est une chaîne." + +#: library/argparse.rst:1066 +msgid "" +"The argument to ``type`` can be any callable that accepts a single string. " +"If the function raises :exc:`ArgumentTypeError`, :exc:`TypeError`, or :exc:" +"`ValueError`, the exception is caught and a nicely formatted error message " +"is displayed. No other exception types are handled." +msgstr "" +"La valeur de l'argument ``type`` peut être n'importe quel appelable qui " +"accepte une seule chaîne. Si la fonction lance :exc:`ArgumentTypeError`, :" +"exc:`TypeError` ou :exc:`ValueError`, l'exception est traitée et un message " +"d'erreur agréablement formaté est affiché. Aucun autre type d'exception " +"n'est géré." + +#: library/argparse.rst:1071 +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:1087 +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:1099 +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 " +"``True``. This is usually not what is desired." +msgstr "" +"La fonction :func:`bool` est déconseillée comme convertisseur de type. Son " +"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:1103 +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 " +"exceptions. Anything with more interesting error-handling or resource " +"management should be done downstream after the arguments are parsed." +msgstr "" +"En général, l'argument nommé ``type`` est un raccourci qui ne devrait être " +"utilisé que pour les conversions simples qui ne peuvent lever qu'une des " +"trois exceptions gérées. Les conversions qui demandent un traitement " +"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:1108 +msgid "" +"For example, JSON or YAML conversions have complex error cases that require " +"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 "" +"Par exemple, les conversions de documents *JSON* ou *YAML* ont des cas " +"d'erreurs complexes qui requièrent un meilleur signalement que ce qui est " +"fourni par l'argument nommé ``type``. Une exception :exc:`~json." +"JSONDecodeError` ne serait pas adéquatement formatée et une exception :exc:" +"`FileNotFound` ne serait pas du tout traitée." + +#: library/argparse.rst:1113 +msgid "" +"Even :class:`~argparse.FileType` has its limitations for use with the " +"``type`` keyword. If one argument uses *FileType* and then a subsequent " +"argument fails, an error is reported but the file is not automatically " +"closed. In this case, it would be better to wait until after the parser has " +"run and then use the :keyword:`with`-statement to manage the files." +msgstr "" +"Même la classe :class:`~argparse.FileType` a ses limitations quand elle est " +"utilisée pour l'argument nommé ``type``. Si un argument utilise *FileType* " +"et qu'un argument ultérieur échoue, une erreur est annoncée mais le fichier " +"n'est pas automatiquement fermé. Dans ce cas, il serait mieux d'attendre la " +"fin de l'exécution de l'analyseur puis de gérer les fichiers à l'aide d'un " +"bloc :keyword:`with`." + +#: library/argparse.rst:1119 +msgid "" +"For type checkers that simply check against a fixed set of values, consider " +"using the choices_ keyword instead." +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:1124 +msgid "choices" +msgstr "Le paramètre *choices*" + +#: library/argparse.rst:1126 +msgid "" +"Some command-line arguments should be selected from a restricted set of " +"values. These can be handled by passing a sequence object as the *choices* " +"keyword argument to :meth:`~ArgumentParser.add_argument`. When the command " +"line is parsed, argument values will be checked, and an error message will " +"be displayed if the argument was not one of the acceptable values::" +msgstr "" +"Certains arguments de la ligne de commande doivent être choisis parmi un " +"ensemble prédéfini de valeurs. Celles-ci doivent être déclarées dans la " +"séquence passée à l'argument *choices* de la méthode :meth:`~ArgumentParser." +"add_argument`. Un message d'erreur est alors affiché si l'utilisateur passe " +"un argument qui n'est pas parmi les valeurs acceptables ::" + +#: library/argparse.rst:1141 +msgid "" +"Note that inclusion in the *choices* sequence is checked after any type_ " +"conversions have been performed, so the type of the objects in the *choices* " +"sequence should match the type_ specified::" +msgstr "" +"Prenez note que le test d'inclusion dans le conteneur *choices* est fait " +"après la conversion de type_. Le type des objets dans le conteneur *choices* " +"doit donc correspondre au type_ spécifié ::" + +#: library/argparse.rst:1153 +msgid "" +"Any sequence can be passed as the *choices* value, so :class:`list` " +"objects, :class:`tuple` objects, and custom sequences are all supported." +msgstr "" +"N'importe quel séquence peut être utilisée comme valeur de *choices*, dont " +"les objets de type :class:`list`, :class:`set` ou des conteneurs " +"personnalisés." + +#: library/argparse.rst:1156 +msgid "" +"Use of :class:`enum.Enum` is not recommended because it is difficult to " +"control its appearance in usage, help, and error messages." +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:1159 +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 " +"*dest* parameter. If this display isn't desirable (perhaps because there " +"are many choices), just specify an explicit metavar_." +msgstr "" +"Les choix formatés écrasent la valeur par défaut de *metavar* qui est " +"normalement dérivée de *dest*. C'est en général le comportement recherché " +"car l'utilisateur ne voit jamais le paramètre *dest*. Si cet affichage n'est " +"pas souhaité (comme lorsque les choix sont nombreux) spécifiez simplement " +"metavar_ de façon explicite." + +#: library/argparse.rst:1166 +msgid "required" +msgstr "Le paramètre *required*" + +#: library/argparse.rst:1168 +msgid "" +"In general, the :mod:`argparse` module assumes that flags like ``-f`` and " +"``--bar`` indicate *optional* arguments, which can always be omitted at the " +"command line. To make an option *required*, ``True`` can be specified for " +"the ``required=`` keyword argument to :meth:`~ArgumentParser.add_argument`::" +msgstr "" +"En général, le module :mod:`argparse` prend pour acquis que les drapeaux " +"comme ``-f`` et ``--bar`` annoncent un argument *optionnel* qui peut " +"toujours être omis de la ligne de commande. Pour rendre une option " +"*obligatoire*, ``True`` peut être passé à l'argument nommé ``required=`` d':" +"meth:`~ArgumentParser.add_argument` ::" + +#: library/argparse.rst:1181 +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 " +"present at the command line." +msgstr "" +"Tel qu'illustré' dans l'exemple, quand l'option est marquée comme " +"``required``, :meth:`~ArgumentParser.parse_args` mentionne une erreur si " +"l'option est absente de la ligne de commande." + +#: library/argparse.rst:1187 +msgid "" +"Required options are generally considered bad form because users expect " +"*options* to be *optional*, and thus they should be avoided when possible." +msgstr "" +"En général, les options obligatoires manifestent un style boiteux, car les " +"utilisateurs s'attendent que les *options* soient *optionnelles*. Elles " +"devraient donc être évitées si possible." + +#: library/argparse.rst:1192 +msgid "help" +msgstr "Le paramètre *help*" + +#: library/argparse.rst:1194 +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`` " +"at the command line), these ``help`` descriptions will be displayed with " +"each argument::" +msgstr "" +"La valeur de ``help`` est une chaîne qui contient une brève description de " +"l'argument. Quand un utilisateur demande de l'aide (en général par " +"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:1214 +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.::" +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 " +"par défaut de l'argument (voir default_). Les spécificateurs de formatage " +"disponibles incluent entre autres le nom du programme, ``%(prog)s``, et la " +"plupart des arguments nommés d':meth:`~ArgumentParser.add_argument`, tels " +"que ``%(default)s``, ``%(type)s``, etc. ::" + +#: library/argparse.rst:1231 +msgid "" +"As the help string supports %-formatting, if you want a literal ``%`` to " +"appear in the help string, you must escape it as ``%%``." +msgstr "" +"Comme la chaîne d'aide utilise le caractère ``%`` pour le formatage, si vous " +"désirez afficher un ``%`` littéral dans la chaîne d'aide, vous devez en " +"faire l’échappement avec ``%%``." + +#: library/argparse.rst:1234 +msgid "" +":mod:`argparse` supports silencing the help entry for certain options, by " +"setting the ``help`` value to ``argparse.SUPPRESS``::" +msgstr "" +":mod:`argparse` peut supprimer la rubrique d'aide de certaines options. Pour " +"ce faire, passez ``argparse.SUPPRESS`` à ``help`` ::" + +#: library/argparse.rst:1247 +msgid "metavar" +msgstr "Le paramètre *metavar*" + +#: library/argparse.rst:1249 +msgid "" +"When :class:`ArgumentParser` generates help messages, it needs some way to " +"refer to each expected argument. By default, ArgumentParser objects use the " +"dest_ value as the \"name\" of each object. By default, for positional " +"argument actions, the dest_ value is used directly, and for optional " +"argument actions, the dest_ value is uppercased. So, a single positional " +"argument with ``dest='bar'`` will be referred to as ``bar``. A single " +"optional argument ``--foo`` that should be followed by a single command-line " +"argument will be referred to as ``FOO``. An example::" +msgstr "" +"Quand un objet :class:`ArgumentParser` construit le message d'aide, il doit " +"pouvoir faire référence à chacun des arguments attendus. Par défaut, les " +"objets ``ArgumentParser`` utilisent la valeur de dest_ pour le nom de chaque " +"objet. Par défaut, la valeur de dest_ est utilisée telle quelle pour les " +"actions d'arguments positionnels et elle (dest_) est convertie en majuscules " +"pour les actions d'arguments optionnels. Ainsi, un argument positionnel " +"unique avec ``dest='bar'`` sera affiché comme ``bar`` et un argument " +"positionnel unique ``--foo`` qui prend un seul argument sur la ligne de " +"commande sera affiché comme ``FOO``. Par exemple ::" + +#: library/argparse.rst:1273 +msgid "An alternative name can be specified with ``metavar``::" +msgstr "Un nom alternatif peut être fourni à ``metavar`` ::" + +#: library/argparse.rst:1290 +msgid "" +"Note that ``metavar`` only changes the *displayed* name - the name of the " +"attribute on the :meth:`~ArgumentParser.parse_args` object is still " +"determined by the dest_ value." +msgstr "" +"Prenez note que ``metavar`` ne change que le nom *affiché*. Le nom de " +"l'attribut ajouté à l'objet renvoyé par :meth:`~ArgumentParser.parse_args` " +"est toujours déterminé par la valeur de dest_." + +#: library/argparse.rst:1294 +msgid "" +"Different values of ``nargs`` may cause the metavar to be used multiple " +"times. Providing a tuple to ``metavar`` specifies a different display for " +"each of the arguments::" +msgstr "" +"Certaines valeurs de ``nargs`` peuvent provoquer l'affichage de ``metavar`` " +"plus d'une fois. Passer un *n-uplet* à ``metavar`` indique les différents " +"noms à afficher pour chacun des arguments ::" + +#: library/argparse.rst:1311 +msgid "dest" +msgstr "Le paramètre *dest*" + +#: library/argparse.rst:1313 +msgid "" +"Most :class:`ArgumentParser` actions add some value as an attribute of the " +"object returned by :meth:`~ArgumentParser.parse_args`. The name of this " +"attribute is determined by the ``dest`` keyword argument of :meth:" +"`~ArgumentParser.add_argument`. For positional argument actions, ``dest`` " +"is normally supplied as the first argument to :meth:`~ArgumentParser." +"add_argument`::" +msgstr "" +"La plupart des actions d':class:`ArgumentParser` ajoutent une valeur dans un " +"attribut de l'objet renvoyé par :meth:`~ArgumentParser.parse_args`. Le nom " +"de l'attribut est déterminé par l'argument nommé ``dest`` d':meth:" +"`~ArgumentParser.add_argument`. Pour les arguments positionnels, ``dest`` " +"est généralement le premier argument d':meth:`~ArgumentParser." +"add_argument` ::" + +#: library/argparse.rst:1325 +msgid "" +"For optional argument actions, the value of ``dest`` is normally inferred " +"from the option strings. :class:`ArgumentParser` generates the value of " +"``dest`` by taking the first long option string and stripping away the " +"initial ``--`` string. If no long option strings were supplied, ``dest`` " +"will be derived from the first short option string by stripping the initial " +"``-`` character. Any internal ``-`` characters will be converted to ``_`` " +"characters to make sure the string is a valid attribute name. The examples " +"below illustrate this behavior::" +msgstr "" +"Pour les actions d'arguments optionnels, la valeur de ``dest`` est " +"généralement inférée à partir des chaînes d'options. :class:`ArgumentParser` " +"génère la valeur de ``dest`` en prenant la première chaîne d'option longue " +"et en retirant le préfixe ``--``. Si une chaîne d'option longue n'est pas " +"fournie, ``dest`` est dérivée de la première chaîne d'option courte sans le " +"préfixe ``-``. Tous les ``-`` subséquents seront convertis en ``_`` pour " +"s'assurer que la chaîne est un nom d'attribut valide. Les exemples suivants " +"illustrent ce comportement ::" + +#: library/argparse.rst:1342 +msgid "``dest`` allows a custom attribute name to be provided::" +msgstr "``dest`` vous permet de fournir un nom d'attribut personnalisé ::" + +#: library/argparse.rst:1350 +msgid "Action classes" +msgstr "Classes Action" + +#: library/argparse.rst:1352 +msgid "" +"Action classes implement the Action API, a callable which returns a callable " +"which processes arguments from the command-line. Any object which follows " +"this API may be passed as the ``action`` parameter to :meth:`add_argument`." +msgstr "" +"Les classes ``Action`` implémentent l'API Action, un appelable qui retourne " +"un appelable qui traite les arguments de la ligne de commande. Tout objet " +"qui suit cette API peut être passé comme paramètre ``action`` d':meth:" +"`add_argument`." + +#: library/argparse.rst:1361 +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 " +"line. The Action class must accept the two positional arguments plus any " +"keyword arguments passed to :meth:`ArgumentParser.add_argument` except for " +"the ``action`` itself." +msgstr "" +"Les objets ``Action`` sont utilisés par un ``ArgumentParser`` pour " +"représenter l'information nécessaire à l'analyse d'un seul argument à partir " +"d'une ou plusieurs chaînes de la ligne de commande. La classe ``Action`` " +"doit accepter les deux arguments positionnels d':meth:`ArgumentParser." +"add_argument` ainsi que tous ses arguments nommés, sauf ``action``." + +#: library/argparse.rst:1367 +msgid "" +"Instances of Action (or return value of any callable to the ``action`` " +"parameter) should have attributes \"dest\", \"option_strings\", \"default\", " +"\"type\", \"required\", \"help\", etc. defined. The easiest way to ensure " +"these attributes are defined is to call ``Action.__init__``." +msgstr "" +"Les instances d'``Action`` (ou la valeur de retour de l'appelable passé au " +"paramètre ``action``) doivent définir les attributs nécessaires : *dest*, " +"*option_strings*, *default*, *type*, *required*, *help*, etc. La façon la " +"plus simple de s'assurer que ces attributs sont définis est d'appeler " +"``Action.__init__``." + +#: library/argparse.rst:1372 +msgid "" +"Action instances should be callable, so subclasses must override the " +"``__call__`` method, which should accept four parameters:" +msgstr "" +"Les instances d'``Action`` doivent être appelables et donc les sous-classes " +"doivent surcharger la méthode ``__call__``. Cette méthode doit accepter " +"quatre paramètres :" + +#: library/argparse.rst:1375 +msgid "``parser`` - The ArgumentParser object which contains this action." +msgstr "``parser`` – L'objet ``ArgumentParser`` qui contient cette action ;" + +#: library/argparse.rst:1377 +msgid "" +"``namespace`` - The :class:`Namespace` object that will be returned by :meth:" +"`~ArgumentParser.parse_args`. Most actions add an attribute to this object " +"using :func:`setattr`." +msgstr "" +"``namespace`` – L'objet :class:`Namespace` qui sera renvoyé par :meth:" +"`~ArgumentParser.parse_args`. La majorité des actions ajoutent un attribut à " +"cet objet avec :func:`setattr` ;" + +#: library/argparse.rst:1381 +msgid "" +"``values`` - The associated command-line arguments, with any type " +"conversions applied. Type conversions are specified with the type_ keyword " +"argument to :meth:`~ArgumentParser.add_argument`." +msgstr "" +"``values`` – Les arguments de la ligne de commande associés à l'action après " +"les avoir soumis à la conversion de type. Les conversions de types sont " +"spécifiées grâce à l’argument nommé type_ d':meth:`~ArgumentParser." +"add_argument` ;" + +#: library/argparse.rst:1385 +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 " +"is associated with a positional argument." +msgstr "" +"``option_string`` – La chaîne d'option utilisée pour invoquer cette action. " +"L'argument ``option_string`` est optionnel et est absent si l'action est " +"associée à un argument positionnel." + +#: library/argparse.rst:1389 +msgid "" +"The ``__call__`` method may perform arbitrary actions, but will typically " +"set attributes on the ``namespace`` based on ``dest`` and ``values``." +msgstr "" +"La méthode ``__call__`` peut réaliser un traitement arbitraire, mais en " +"général elle affecte des attributs sur le ``namespace`` en fonction de " +"``dest`` et de ``values``." + +#: library/argparse.rst:1392 +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 " +"the program. If such method is not provided, a sensible default will be used." +msgstr "" +"Les classes dérivées d'``Action`` peuvent définir une méthode " +"``format_usage`` qui ne prend aucun argument et qui renvoie une chaîne " +"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:1397 +msgid "The parse_args() method" +msgstr "La méthode *parse_args()*" + +#: library/argparse.rst:1401 +msgid "" +"Convert argument strings to objects and assign them as attributes of the " +"namespace. Return the populated namespace." +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:1404 +msgid "" +"Previous calls to :meth:`add_argument` determine exactly what objects are " +"created and how they are assigned. See the documentation for :meth:" +"`add_argument` for details." +msgstr "" +"Les appels à :meth:`add_argument` qui ont été faits déterminent exactement " +"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:1408 +msgid "" +"args_ - List of strings to parse. The default is taken from :data:`sys." +"argv`." +msgstr "" +"args_ – Liste de chaînes à analyser. La valeur par défaut est récupérée " +"dans : :data:`sys.argv`." + +#: library/argparse.rst:1411 +msgid "" +"namespace_ - An object to take the attributes. The default is a new empty :" +"class:`Namespace` object." +msgstr "" +"namespace_ – Un objet pour recevoir les attributs. Par défaut : une nouvelle " +"instance (vide) de :class:`Namespace`." + +#: library/argparse.rst:1416 +msgid "Option value syntax" +msgstr "Syntaxe de la valeur des options" + +#: library/argparse.rst:1418 +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, " +"the option and its value are passed as two separate arguments::" +msgstr "" +"La méthode :meth:`~ArgumentParser.parse_args` offre plusieurs façons " +"d'indiquer la valeur d'une option si elle en prend une. Dans le cas le plus " +"simple, l'option et sa valeur sont passées en tant que deux arguments " +"distincts ::" + +#: library/argparse.rst:1430 +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 " +"``=`` to separate them::" +msgstr "" +"Pour les options longues (les options qui ont un nom plus long qu'un seul " +"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:1437 +msgid "" +"For short options (options only one character long), the option and its " +"value can be concatenated::" +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:1443 +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::" +msgstr "" +"Plusieurs options courtes peuvent être groupées ensemble après un seul " +"préfixe ``-`` pour autant que seule la dernière (ou aucune) nécessite une " +"valeur ::" + +#: library/argparse.rst:1455 +msgid "Invalid arguments" +msgstr "Arguments invalides" + +#: library/argparse.rst:1457 +msgid "" +"While parsing the command line, :meth:`~ArgumentParser.parse_args` checks " +"for a variety of errors, including ambiguous options, invalid types, invalid " +"options, wrong number of positional arguments, etc. When it encounters such " +"an error, it exits and prints the error along with a usage message::" +msgstr "" +"Quand elle fait l'analyse de la ligne de commande, la méthode :meth:" +"`~ArgumentParser.parse_args` vérifie plusieurs erreurs possibles : entre " +"autres, options ambigües, types invalides, options invalides, nombre " +"incorrect d'arguments positionnels, etc. Quand une erreur est rencontrée, " +"elle affiche l'erreur accompagnée du message d'aide puis termine " +"l'exécution ::" + +#: library/argparse.rst:1483 +msgid "Arguments containing ``-``" +msgstr "Arguments contenant ``-``" + +#: library/argparse.rst:1485 +msgid "" +"The :meth:`~ArgumentParser.parse_args` method attempts to give errors " +"whenever the user has clearly made a mistake, but some situations are " +"inherently ambiguous. For example, the command-line argument ``-1`` could " +"either be an attempt to specify an option or an attempt to provide a " +"positional argument. The :meth:`~ArgumentParser.parse_args` method is " +"cautious here: positional arguments may only begin with ``-`` if they look " +"like negative numbers and there are no options in the parser that look like " +"negative numbers::" +msgstr "" +"La méthode :meth:`~ArgumentParser.parse_args` tente de signaler une erreur " +"quand l'utilisateur s'est clairement trompé. Par contre, certaines " +"situations sont intrinsèquement ambigües. Par exemple, l'argument de la " +"ligne de commande ``-1`` peut aussi bien être une tentative de spécifier une " +"option qu'une tentative de passer un argument positionnel. La méthode :meth:" +"`~ArgumentParser.parse_args` est prudente : les arguments positionnels ne " +"peuvent commencer par ``-`` que s'ils ont l'apparence d'un nombre négatif et " +"que l'analyseur ne contient aucune option qui a l'apparence d'un nombre " +"négatif ::" + +#: library/argparse.rst:1523 +msgid "" +"If you have positional arguments that must begin with ``-`` and don't look " +"like negative numbers, you can insert the pseudo-argument ``'--'`` which " +"tells :meth:`~ArgumentParser.parse_args` that everything after that is a " +"positional argument::" +msgstr "" +"Si l'utilisateur a des arguments positionnels qui commencent par ``-`` et " +"qui n'ont pas l'apparence d'un nombre négatif, il peut insérer le pseudo-" +"argument ``'--'`` qui indique à :meth:`~ArgumentParser.parse_args` de " +"traiter tout ce qui suit comme un argument positionnel ::" + +#: library/argparse.rst:1534 +msgid "Argument abbreviations (prefix matching)" +msgstr "Arguments abrégés (Par comparaison de leurs préfixes)" + +#: library/argparse.rst:1536 +msgid "" +"The :meth:`~ArgumentParser.parse_args` method :ref:`by default " +"` allows long options to be abbreviated to a prefix, if the " +"abbreviation is unambiguous (the prefix matches a unique option)::" +msgstr "" +"Par défaut, la méthode :meth:`~ArgumentParser.parse_args` accepte que les " +"options longues soient :ref:`abrégées ` par un préfixe pour " +"autant que l’abréviation soit non-ambigüe, c'est-à-dire qu'elle ne " +"corresponde qu'à une seule option ::" + +#: library/argparse.rst:1551 +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``." +msgstr "" +"Une erreur est générée pour les arguments qui peuvent produire plus d'une " +"option. Ce comportement peut être désactivé en passant ``False`` à :ref:" +"`allow_abbrev`." + +#: library/argparse.rst:1557 +msgid "Beyond ``sys.argv``" +msgstr "Au-delà de ``sys.argv``" + +#: library/argparse.rst:1559 +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 " +"of strings to :meth:`~ArgumentParser.parse_args`. This is useful for " +"testing at the interactive prompt::" +msgstr "" +"Il est parfois désirable de demander à un objet ``ArgumentParser`` de faire " +"l'analyse d'arguments autres que ceux de :data:`sys.argv`. On peut faire ce " +"traitement en passant une liste de chaînes à :meth:`~ArgumentParser." +"parse_args`. Cette approche est pratique pour faire des tests depuis " +"l'invite de commande ::" + +#: library/argparse.rst:1579 +msgid "The Namespace object" +msgstr "L'objet ``Namespace``" + +#: library/argparse.rst:1583 +msgid "" +"Simple class used by default by :meth:`~ArgumentParser.parse_args` to create " +"an object holding attributes and return it." +msgstr "" +"Classe rudimentaire utilisée par défaut par :meth:`~ArgumentParser." +"parse_args` pour créer un objet qui stocke les attributs. Cet objet est " +"renvoyé par ``ArgumentParser.parse_args``." + +#: library/argparse.rst:1586 +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 " +"attributes, you can use the standard Python idiom, :func:`vars`::" +msgstr "" +"Cette classe est délibérément rudimentaire : une sous-classe d':class:" +"`object` avec une représentation textuelle intelligible. Si vous préférez " +"une vue *dict-compatible*, vous devez utiliser :func:`vars` (un idiome " +"Python classique) ::" + +#: library/argparse.rst:1596 +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. " +"This can be achieved by specifying the ``namespace=`` keyword argument::" +msgstr "" +"Il est parfois utile de demander à :class:`ArgumentParser` de faire " +"l'affectation des attributs sur un objet existant plutôt que de faire la " +"création d'un nouvel objet :class:`Namespace`. Ceci peut être réalisé avec " +"l'argument nommé ``namespace=`` ::" + +#: library/argparse.rst:1612 +msgid "Other utilities" +msgstr "Autres outils" + +#: library/argparse.rst:1615 +msgid "Sub-commands" +msgstr "Sous commandes" + +#: library/argparse.rst:1622 +msgid "" +"Many programs split up their functionality into a number of sub-commands, " +"for example, the ``svn`` program can invoke sub-commands like ``svn " +"checkout``, ``svn update``, and ``svn commit``. Splitting up functionality " +"this way can be a particularly good idea when a program performs several " +"different functions which require different kinds of command-line " +"arguments. :class:`ArgumentParser` supports the creation of such sub-" +"commands with the :meth:`add_subparsers` method. The :meth:`add_subparsers` " +"method is normally called with no arguments and returns a special action " +"object. This object has a single method, :meth:`~ArgumentParser." +"add_parser`, which takes a command name and any :class:`ArgumentParser` " +"constructor arguments, and returns an :class:`ArgumentParser` object that " +"can be modified as usual." +msgstr "" +"Certains programmes divisent leurs fonctionnalités entre un nombre de sous-" +"commandes. Par exemple : le programme ``svn`` peut être invoqué comme ``svn " +"checkout``, ``svn update`` et ``svn commit``. Séparer les fonctionnalités de " +"cette façon est judicieux quand le programme effectue plusieurs fonctions " +"différentes qui requièrent différents types de lignes de commandes. :class:" +"`ArgumentParser` prend en charge la création de ce genre de sous-commandes " +"grâce à la méthode :meth:`add_subparsers`. La méthode :meth:`add_subparsers` " +"est généralement appelée sans argument et elle renvoie un objet ``Action`` " +"spécial. Cet objet possède une seule méthode, :meth:`~ArgumentParser." +"add_parser`, qui prend le nom d'une commande et n'importe quels arguments du " +"constructeur d':class:`ArgumentParser` ; elle renvoie un objet :class:" +"`ArgumentParser` qui peut être modifié normalement." + +#: library/argparse.rst:1634 +msgid "Description of parameters:" +msgstr "Description des paramètres :" + +#: library/argparse.rst:1636 +msgid "" +"title - title for the sub-parser group in help output; by default " +"\"subcommands\" if description is provided, otherwise uses title for " +"positional arguments" +msgstr "" +"``title`` – titre du groupe de ce sous-analyseur dans la sortie d'aide ; par " +"défaut : ``\"subcommands\"`` si ``description`` est fournie, sinon utilise " +"la valeur de ``title`` de la section sur les arguments positionnels ;" + +#: library/argparse.rst:1640 +msgid "" +"description - description for the sub-parser group in help output, by " +"default ``None``" +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:1643 +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 " +"subparser argument" +msgstr "" +"``prog`` – nom du programme dans le message d'utilisation de l'aide des sous-" +"commandes ; par défaut : le nom du programme et les arguments positionnels " +"qui arrivent avant l'argument de ce sous-analyseur ;" + +#: library/argparse.rst:1647 +msgid "" +"parser_class - class which will be used to create sub-parser instances, by " +"default the class of the current parser (e.g. ArgumentParser)" +msgstr "" +"``parser_class`` – classe utilisée pour créer les instances de sous-" +"analyseurs ; par défaut : la classe de l'analyseur courant (par exemple " +"``ArgumentParser``) ;" + +#: library/argparse.rst:1650 +msgid "" +"action_ - the basic type of action to be taken when this argument is " +"encountered at the command line" +msgstr "" +"action_ – action à entreprendre quand cet argument est reconnu sur la ligne " +"de commande ;" + +#: library/argparse.rst:1653 +msgid "" +"dest_ - name of the attribute under which sub-command name will be stored; " +"by default ``None`` and no value is stored" +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:1656 +msgid "" +"required_ - Whether or not a subcommand must be provided, by default " +"``False`` (added in 3.7)" +msgstr "" +"required_ – ``True`` si la sous-commande est obligatoire ; par défaut : " +"``False`` (ajouté dans 3.7) ;" + +#: library/argparse.rst:1659 +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:1661 +msgid "" +"metavar_ - string presenting available sub-commands in help; by default it " +"is ``None`` and presents sub-commands in form {cmd1, cmd2, ..}" +msgstr "" +"metavar_ – chaîne qui représente les sous-commandes disponibles dans les " +"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:1664 +msgid "Some example usage::" +msgstr "Quelques exemples d'utilisation ::" + +#: library/argparse.rst:1685 +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 " +"command line (and not any other subparsers). So in the example above, when " +"the ``a`` command is specified, only the ``foo`` and ``bar`` attributes are " +"present, and when the ``b`` command is specified, only the ``foo`` and " +"``baz`` attributes are present." +msgstr "" +"Prenez note que l'objet renvoyé par :meth:`parse_args` ne contient que les " +"attributs reconnus par l'analyseur principal et le sous-analyseur " +"sélectionné par la ligne de commande. Les autres sous-analyseurs n'ont pas " +"d'influence sur l'objet renvoyé. Ainsi dans l'exemple précédent, quand la " +"commande ``a`` est spécifiée, seuls les attributs ``foo`` et ``bar`` sont " +"présents ; quand la commande ``b`` est spécifiée, seuls les attributs " +"``foo`` et ``baz`` sont présents." + +#: library/argparse.rst:1692 +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 " +"include parent parser or sibling parser messages. (A help message for each " +"subparser command, however, can be given by supplying the ``help=`` argument " +"to :meth:`add_parser` as above.)" +msgstr "" +"De même, quand le message d'aide est demandé depuis l'un des sous-" +"analyseurs, seul le message d'aide de cet analyseur est affiché. Le message " +"d'aide n'inclut pas le message de l'analyseur parent ni celui des sous-" +"analyseurs au même niveau. Il est toutefois possible de fournir un message " +"d'aide pour chacun des sous-analyseurs grâce à l'argument ``help=`` d':meth:" +"`add_parser` tel qu'illustré ci-dessus." + +#: library/argparse.rst:1728 +msgid "" +"The :meth:`add_subparsers` method also supports ``title`` and " +"``description`` keyword arguments. When either is present, the subparser's " +"commands will appear in their own group in the help output. For example::" +msgstr "" +"La méthode :meth:`add_subparsers` accepte les arguments nommés ``title`` et " +"``description``. Quand au moins l'un des deux est présent, les commandes du " +"sous-analyseur sont affichées dans leur propre groupe dans la sortie d'aide. " +"Par exemple ::" + +#: library/argparse.rst:1749 +msgid "" +"Furthermore, ``add_parser`` supports an additional ``aliases`` argument, " +"which allows multiple strings to refer to the same subparser. This example, " +"like ``svn``, aliases ``co`` as a shorthand for ``checkout``::" +msgstr "" +"De plus, ``add_parser`` accepte l'argument additionnel ``aliases`` qui " +"permet à plusieurs chaînes de faire référence au même sous-analyseur. " +"L'exemple suivant, à la manière de ``svn``, utilise ``co`` comme une " +"abréviation de ``checkout`` ::" + +#: library/argparse.rst:1760 +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` " +"so that each subparser knows which Python function it should execute. For " +"example::" +msgstr "" +"Une façon efficace de traiter les sous-commandes est de combiner " +"l'utilisation de la méthode :meth:`add_subparsers` avec des appels à :meth:" +"`set_defaults` pour que chaque sous-analyseur sache quelle fonction Python " +"doit être exécutée. Par exemple ::" + +#: library/argparse.rst:1797 +msgid "" +"This way, you can let :meth:`parse_args` do the job of calling the " +"appropriate function after argument parsing is complete. Associating " +"functions with actions like this is typically the easiest way to handle the " +"different actions for each of your subparsers. However, if it is necessary " +"to check the name of the subparser that was invoked, the ``dest`` keyword " +"argument to the :meth:`add_subparsers` call will work::" +msgstr "" +"Ainsi, vous pouvez laisser à :meth:`parse_args` la responsabilité de faire " +"l'appel à la bonne fonction après avoir analysé les arguments. Associer " +"fonctions et actions est en général la façon la plus facile de gérer des " +"actions différentes pour chacun de vos sous-analyseurs. Par contre, si vous " +"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:1813 +msgid "New *required* keyword argument." +msgstr "Introduction des arguments nommés obligatoires." + +#: library/argparse.rst:1818 +msgid "FileType objects" +msgstr "Objets ``FileType``" + +#: library/argparse.rst:1822 +msgid "" +"The :class:`FileType` factory creates objects that can be passed to the type " +"argument of :meth:`ArgumentParser.add_argument`. Arguments that have :class:" +"`FileType` objects as their type will open command-line arguments as files " +"with the requested modes, buffer sizes, encodings and error handling (see " +"the :func:`open` function for more details)::" +msgstr "" +"Le type fabrique :class:`FileType` crée des objets qui peuvent être passés à " +"l'argument ``type`` d':meth:`ArgumentParser.add_argument`. Les arguments qui " +"ont comme ``type`` un objet :class:`FileType` ouvrent les arguments de la " +"ligne de commande en tant que fichiers avec les options spécifiées : mode, " +"taille du tampon, encodage et gestion des erreurs (voir la fonction :func:" +"`open` pour plus de détails) ::" + +#: library/argparse.rst:1834 +msgid "" +"FileType objects understand the pseudo-argument ``'-'`` and automatically " +"convert this into :data:`sys.stdin` for readable :class:`FileType` objects " +"and :data:`sys.stdout` for writable :class:`FileType` objects::" +msgstr "" +"Les objets ``FileType`` reconnaissent le pseudo-argument ``'-'`` et le " +"convertissent automatiquement vers :data:`sys.stdin` pour les objets :class:" +"`FileType` ouverts en lecture, et vers :data:`sys.stdout` pour les objets :" +"class:`FileType` ouverts en écriture ::" + +#: library/argparse.rst:1843 +msgid "The *encodings* and *errors* keyword arguments." +msgstr "Les arguments nommés ``encodings`` et ``errors``." + +#: library/argparse.rst:1848 +msgid "Argument groups" +msgstr "Groupes d'arguments" + +#: library/argparse.rst:1852 +msgid "" +"By default, :class:`ArgumentParser` groups command-line arguments into " +"\"positional arguments\" and \"optional arguments\" when displaying help " +"messages. When there is a better conceptual grouping of arguments than this " +"default one, appropriate groups can be created using the :meth:" +"`add_argument_group` method::" +msgstr "" +"Par défaut, :class:`ArgumentParser` sépare les arguments de la ligne de " +"commande entre les groupes « arguments positionnels » et « arguments " +"optionnels » au moment d'afficher les messages d'aide. S'il existe un " +"meilleur regroupement conceptuel des arguments, les groupes adéquats peuvent " +"être créés avec la méthode :meth:`add_argument_group` ::" + +#: library/argparse.rst:1869 +msgid "" +"The :meth:`add_argument_group` method returns an argument group object which " +"has an :meth:`~ArgumentParser.add_argument` method just like a regular :" +"class:`ArgumentParser`. When an argument is added to the group, the parser " +"treats it just like a normal argument, but displays the argument in a " +"separate group for help messages. The :meth:`add_argument_group` method " +"accepts *title* and *description* arguments which can be used to customize " +"this display::" +msgstr "" +"La méthode :meth:`add_argument_group` renvoie un objet représentant le " +"groupe d'arguments. Cet objet possède une méthode :meth:`~ArgumentParser." +"add_argument` semblable à celle d':class:`ArgumentParser`. Quand un argument " +"est ajouté au groupe, l'analyseur le traite comme un argument normal, mais " +"il affiche le nouvel argument dans un groupe séparé dans les messages " +"d'aide. Afin de personnaliser l'affichage, la méthode :meth:" +"`add_argument_group` accepte les arguments ``title`` et ``description`` ::" + +#: library/argparse.rst:1895 +msgid "" +"Note that any arguments not in your user-defined groups will end up back in " +"the usual \"positional arguments\" and \"optional arguments\" sections." +msgstr "" +"Prenez note que tout argument qui n'est pas dans l'un de vos groupes est " +"affiché dans l'une des sections usuelles *positional arguments* et *optional " +"arguments*." + +#: library/argparse.rst:1900 +msgid "Mutual exclusion" +msgstr "Exclusion mutuelle" + +#: library/argparse.rst:1904 +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 " +"command line::" +msgstr "" +"Crée un groupe mutuellement exclusif. Le module :mod:`argparse` vérifie " +"qu'au plus un des arguments du groupe mutuellement exclusif est présent sur " +"la ligne de commande ::" + +#: library/argparse.rst:1920 +msgid "" +"The :meth:`add_mutually_exclusive_group` method also accepts a *required* " +"argument, to indicate that at least one of the mutually exclusive arguments " +"is required::" +msgstr "" +"La méthode :meth:`add_mutually_exclusive_group` accepte aussi l'argument " +"``required`` pour indiquer qu'au moins un des arguments mutuellement " +"exclusifs est nécessaire ::" + +#: library/argparse.rst:1932 +msgid "" +"Note that currently mutually exclusive argument groups do not support the " +"*title* and *description* arguments of :meth:`~ArgumentParser." +"add_argument_group`." +msgstr "" +"Prenez note que présentement les groupes d'arguments mutuellement exclusifs " +"n'acceptent pas les arguments ``title`` et ``description`` d':meth:" +"`~ArgumentParser.add_argument_group`." + +#: library/argparse.rst:1938 +msgid "Parser defaults" +msgstr "Valeurs par défaut de l'analyseur" + +#: library/argparse.rst:1942 +msgid "" +"Most of the time, the attributes of the object returned by :meth:" +"`parse_args` will be fully determined by inspecting the command-line " +"arguments and the argument actions. :meth:`set_defaults` allows some " +"additional attributes that are determined without any inspection of the " +"command line to be added::" +msgstr "" +"Dans la majorité des cas, les attributs de l'objet renvoyé par :meth:" +"`parse_args` sont entièrement définis par l'inspection des arguments de la " +"ligne de commande et par les actions des arguments. La méthode :meth:" +"`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:1954 +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:1962 +msgid "" +"Parser-level defaults can be particularly useful when working with multiple " +"parsers. See the :meth:`~ArgumentParser.add_subparsers` method for an " +"example of this type." +msgstr "" +"Les valeurs par défaut au niveau de l'analyseur sont particulièrement utiles " +"quand on travaille avec plusieurs analyseurs. Voir la méthode :meth:" +"`~ArgumentParser.add_subparsers` pour un exemple de cette utilisation." + +#: library/argparse.rst:1968 +msgid "" +"Get the default value for a namespace attribute, as set by either :meth:" +"`~ArgumentParser.add_argument` or by :meth:`~ArgumentParser.set_defaults`::" +msgstr "" +"Renvoie la valeur par défaut d'un attribut de l'objet ``Namespace`` tel " +"qu'il a été défini soit par :meth:`~ArgumentParser.add_argument` ou par :" +"meth:`~ArgumentParser.set_defaults` ::" + +#: library/argparse.rst:1979 +msgid "Printing help" +msgstr "Afficher l'aide" + +#: library/argparse.rst:1981 +msgid "" +"In most typical applications, :meth:`~ArgumentParser.parse_args` will take " +"care of formatting and printing any usage or error messages. However, " +"several formatting methods are available:" +msgstr "" +"Pour la majorité des applications, :meth:`~ArgumentParser.parse_args` se " +"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:1987 +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 " +"assumed." +msgstr "" +"Affiche une brève description sur la façon d'invoquer l':class:" +"`ArgumentParser` depuis la ligne de commande. Si ``file`` est ``None``, " +"utilise :data:`sys.stdout`." + +#: library/argparse.rst:1993 +msgid "" +"Print a help message, including the program usage and information about the " +"arguments registered with the :class:`ArgumentParser`. If *file* is " +"``None``, :data:`sys.stdout` is assumed." +msgstr "" +"Affiche un message d'aide qui inclut l'utilisation du programme et " +"l'information sur les arguments répertoriés dans l':class:`ArgumentParser`. " +"Si ``file`` est ``None``, utilise :data:`sys.stdout`." + +#: library/argparse.rst:1997 +msgid "" +"There are also variants of these methods that simply return a string instead " +"of printing it:" +msgstr "" +"Des variantes de ces méthodes sont fournies pour renvoyer la chaîne plutôt " +"que de l'afficher :" + +#: library/argparse.rst:2002 +msgid "" +"Return a string containing a brief description of how the :class:" +"`ArgumentParser` should be invoked on the command line." +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:2007 +msgid "" +"Return a string containing a help message, including the program usage and " +"information about the arguments registered with the :class:`ArgumentParser`." +msgstr "" +"Renvoie une chaîne représentant un message d'aide qui inclut des " +"informations sur l'utilisation du programme et sur les arguments définis " +"dans l':class:`ArgumentParser`." + +#: library/argparse.rst:2012 +msgid "Partial parsing" +msgstr "Analyse partielle" + +#: library/argparse.rst:2016 +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 " +"cases, the :meth:`~ArgumentParser.parse_known_args` method can be useful. " +"It works much like :meth:`~ArgumentParser.parse_args` except that it does " +"not produce an error when extra arguments are present. Instead, it returns " +"a two item tuple containing the populated namespace and the list of " +"remaining argument strings." +msgstr "" +"Parfois, un script n'analyse que de quelques-uns des arguments de la ligne " +"de commande avant de passer les arguments non-traités à un autre script ou " +"un autre programme. La méthode :meth:`~ArgumentParser.parse_known_args` est " +"utile dans ces cas. Elle fonctionne similairement à :meth:`~ArgumentParser." +"parse_args`, mais elle ne lève pas d'erreur quand des arguments non-reconnus " +"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:2032 +msgid "" +":ref:`Prefix matching ` rules apply to :meth:" +"`parse_known_args`. The parser may consume an option even if it's just a " +"prefix of one of its known options, instead of leaving it in the remaining " +"arguments list." +msgstr "" +"Les règles d':ref:`acceptation des abréviations ` sont " +"applicables à :meth:`parse_known_args`. L'analyseur peut ainsi capturer une " +"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:2039 +msgid "Customizing file parsing" +msgstr "Personnaliser le *parsing* de fichiers" + +#: library/argparse.rst:2043 +msgid "" +"Arguments that are read from a file (see the *fromfile_prefix_chars* keyword " +"argument to the :class:`ArgumentParser` constructor) are read one argument " +"per line. :meth:`convert_arg_line_to_args` can be overridden for fancier " +"reading." +msgstr "" +"Les arguments qui proviennent d'un fichier sont lus un par ligne. La " +"méthode :meth:`convert_arg_line_to_args` peut être surchargée pour accomplir " +"un traitement plus élaboré. Voir aussi l'argument nommé " +"``fromfile_prefix_chars`` du constructeur d':class:`ArgumentParser`." + +#: library/argparse.rst:2048 +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. " +"The method is called once per line read from the argument file, in order." +msgstr "" +"La méthode ``convert_arg_line_to_args`` accepte un seul argument, " +"``arg_line``, qui est une chaîne lue dans le fichier d'arguments. Elle " +"renvoie une liste d'arguments analysés dans cette chaîne. La méthode est " +"appelée une fois pour chaque ligne lue du fichier d'arguments. L'ordre est " +"préservé." + +#: library/argparse.rst:2052 +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::" +msgstr "" +"Une surcharge utile de cette méthode est de permettre à chaque mot délimité " +"par des espaces d'être traité comme un argument. L'exemple suivant illustre " +"comment réaliser ceci ::" + +#: library/argparse.rst:2061 +msgid "Exiting methods" +msgstr "Méthodes d'interruptions" + +#: library/argparse.rst:2065 +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 " +"method to handle these steps differently::" +msgstr "" +"Cette méthode interrompt l'exécution du programme et renvoie ``status`` " +"comme valeur de retour du processus. Si ``message`` est fourni, la chaîne " +"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:2077 +msgid "" +"This method prints a usage message including the *message* to the standard " +"error and terminates the program with a status code of 2." +msgstr "" +"Cette méthode affiche un message d'utilisation qui inclut la chaîne " +"``message`` sur la sortie d'erreur standard puis termine l'exécution avec le " +"code de fin d'exécution 2." + +#: library/argparse.rst:2082 +msgid "Intermixed parsing" +msgstr "Analyse entremêlée" + +#: library/argparse.rst:2087 +msgid "" +"A number of Unix commands allow the user to intermix optional arguments with " +"positional arguments. The :meth:`~ArgumentParser.parse_intermixed_args` " +"and :meth:`~ArgumentParser.parse_known_intermixed_args` methods support this " +"parsing style." +msgstr "" +"De nombreuses commandes Unix permettent à l'utilisateur d'entremêler les " +"arguments optionnels et les arguments positionnels. Les méthodes :meth:" +"`~ArgumentParser.parse_intermixed_args` et :meth:`~ArgumentParser." +"parse_known_intermixed_args` permettent ce style d'analyse." + +#: library/argparse.rst:2092 +msgid "" +"These parsers do not support all the argparse features, and will raise " +"exceptions if unsupported features are used. In particular, subparsers, " +"``argparse.REMAINDER``, and mutually exclusive groups that include both " +"optionals and positionals are not supported." +msgstr "" +"Ces analyseurs n'offrent pas toutes les fonctionnalités d'``argparse`` et " +"ils lèvent une exception si une fonctionnalité non prise en charge est " +"utilisée. En particulier, les sous-analyseurs, ``argparse.REMAINDER`` et les " +"groupes mutuellement exclusifs qui contiennent à la fois des arguments " +"optionnels et des arguments positionnels ne sont pas pris en charge." + +#: library/argparse.rst:2097 +msgid "" +"The following example shows the difference between :meth:`~ArgumentParser." +"parse_known_args` and :meth:`~ArgumentParser.parse_intermixed_args`: the " +"former returns ``['2', '3']`` as unparsed arguments, while the latter " +"collects all the positionals into ``rest``. ::" +msgstr "" +"L'exemple suivant illustre la différence entre :meth:`~ArgumentParser." +"parse_known_args` et :meth:`~ArgumentParser.parse_intermixed_args` : le " +"premier renvoie ``['2', '3']`` comme arguments non-traités alors que le " +"second capture tous les arguments positionnels dans ``rest`` ::" + +#: library/argparse.rst:2112 +msgid "" +":meth:`~ArgumentParser.parse_known_intermixed_args` returns a two item tuple " +"containing the populated namespace and the list of remaining argument " +"strings. :meth:`~ArgumentParser.parse_intermixed_args` raises an error if " +"there are any remaining unparsed argument strings." +msgstr "" +":meth:`~ArgumentParser.parse_known_intermixed_args` renvoie une paire de " +"valeurs : l'objet ``Namespace`` rempli et une liste de chaînes d'arguments " +"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:2122 +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:2124 +msgid "" +"Originally, the :mod:`argparse` module had attempted to maintain " +"compatibility with :mod:`optparse`. However, :mod:`optparse` was difficult " +"to extend transparently, particularly with the changes required to support " +"the new ``nargs=`` specifiers and better usage messages. When most " +"everything in :mod:`optparse` had either been copy-pasted over or monkey-" +"patched, it no longer seemed practical to try to maintain the backwards " +"compatibility." +msgstr "" +"Initialement, le module :mod:`argparse` tentait de rester compatible avec :" +"mod:`optparse`. Hélas, il était difficile de faire des améliorations à :mod:" +"`optparse` de façon transparente, en particulier pour les changements requis " +"pour gérer les nouveaux spécificateurs de ``nargs=`` et les messages " +"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:2131 +msgid "" +"The :mod:`argparse` module improves on the standard library :mod:`optparse` " +"module in a number of ways including:" +msgstr "" +"Le module :mod:`argparse` fournit plusieurs améliorations par rapport au " +"module :mod:`optparse` de la bibliothèque standard :" + +#: library/argparse.rst:2134 +msgid "Handling positional arguments." +msgstr "Gère les arguments positionnels ;" + +#: library/argparse.rst:2135 +msgid "Supporting sub-commands." +msgstr "Prise en charge des sous commandes ;" + +#: library/argparse.rst:2136 +msgid "Allowing alternative option prefixes like ``+`` and ``/``." +msgstr "" +"Permet d'utiliser les alternatives ``+`` ou ``/`` comme préfixes d'option ;" + +#: library/argparse.rst:2137 +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:2138 +msgid "Producing more informative usage messages." +msgstr "Fournit des messages d'aide plus complets ;" + +#: library/argparse.rst:2139 +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:2141 +msgid "A partial upgrade path from :mod:`optparse` to :mod:`argparse`:" +msgstr "Le portage partiel d':mod:`optparse` à :mod:`argparse` :" + +#: library/argparse.rst:2143 +msgid "" +"Replace all :meth:`optparse.OptionParser.add_option` calls with :meth:" +"`ArgumentParser.add_argument` calls." +msgstr "" +"Remplacer tous les appels à :meth:`optparse.OptionParser.add_option` par des " +"appels à :meth:`ArgumentParser.add_argument` ;" + +#: library/argparse.rst:2146 +msgid "" +"Replace ``(options, args) = parser.parse_args()`` with ``args = parser." +"parse_args()`` and add additional :meth:`ArgumentParser.add_argument` calls " +"for the positional arguments. Keep in mind that what was previously called " +"``options``, now in the :mod:`argparse` context is called ``args``." +msgstr "" +"Remplacer ``(options, args) = parser.parse_args()`` par ``args = parser." +"parse_args()`` et ajouter des appels à :meth:`ArgumentParser.add_argument` " +"pour les arguments positionnels. Prenez note que les valeurs précédemment " +"appelées ``options`` sont appelées ``args`` dans le contexte d':mod:" +"`argparse` ;" + +#: library/argparse.rst:2151 +msgid "" +"Replace :meth:`optparse.OptionParser.disable_interspersed_args` by using :" +"meth:`~ArgumentParser.parse_intermixed_args` instead of :meth:" +"`~ArgumentParser.parse_args`." +msgstr "" +"Remplacer :meth:`optparse.OptionParser.disable_interspersed_args` en " +"appelant :meth:`~ArgumentParser.parse_intermixed_args` plutôt que :meth:" +"`~ArgumentParser.parse_args` ;" + +#: library/argparse.rst:2155 +msgid "" +"Replace callback actions and the ``callback_*`` keyword arguments with " +"``type`` or ``action`` arguments." +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:2158 +msgid "" +"Replace string names for ``type`` keyword arguments with the corresponding " +"type objects (e.g. int, float, complex, etc)." +msgstr "" +"Remplacer les chaînes représentant le nom des types pour l'argument nommé " +"``type`` par les objets types correspondants (par exemple : ``int``, " +"``float``, ``complex``, etc) ;" + +#: library/argparse.rst:2161 +msgid "" +"Replace :class:`optparse.Values` with :class:`Namespace` and :exc:`optparse." +"OptionError` and :exc:`optparse.OptionValueError` with :exc:`ArgumentError`." +msgstr "" +"Remplacer :class:`optparse.Values` par :class:`Namespace` ; et :exc:" +"`optparse.OptionError` et :exc:`optparse.OptionValueError` par :exc:" +"`ArgumentError` ;" + +#: library/argparse.rst:2165 +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 " +"l'interpolation d'un dictionnaire dans les chaînes de formatage (c'est-à-" +"dire ``%(default)s`` et ``%(prog)s``) ;" + +#: library/argparse.rst:2169 +msgid "" +"Replace the OptionParser constructor ``version`` argument with a call to " +"``parser.add_argument('--version', action='http://github.com/version', version='')``." +msgstr "" +"Remplacer l'argument ``version`` du constructeur d'``OptionParser`` par un " +"appel à ``parser.add_argument('--version', action='http://github.com/version', version='')``." + +#~ msgid "" +#~ "See the section on the default_ keyword argument for information on when " +#~ "the ``type`` argument is applied to default arguments." +#~ msgstr "" +#~ "Consultez la rubrique de l'argument nommé default_ pour plus " +#~ "d'information sur quand l'argument ``type`` est appliqué aux arguments " +#~ "par défaut." + +#~ msgid "" +#~ "To ease the use of various types of files, the argparse module provides " +#~ "the factory FileType which takes the ``mode=``, ``bufsize=``, " +#~ "``encoding=`` and ``errors=`` arguments of the :func:`open` function. " +#~ "For example, ``FileType('w')`` can be used to create a writable file::" +#~ msgstr "" +#~ "Pour faciliter l'utilisation de types de fichiers variés, le module " +#~ "``argparse`` fournit le type fabrique ``FileType`` qui accepte les " +#~ "arguments ``mode=``, ``bufsize=``, ``encoding=`` et ``errors=`` de la " +#~ "fonction :func:`open`. Par exemple, ``FileType('w')`` peut être utilisé " +#~ "pour créer un fichier en mode écriture ::" + +#~ msgid "" +#~ "``type=`` can take any callable that takes a single string argument and " +#~ "returns the converted value::" +#~ msgstr "" +#~ "``type=`` peut prendre n'importe quelle fonction ou objet appelable qui " +#~ "prend une seule chaîne de caractère comme argument et qui renvoie la " +#~ "valeur convertie ::" + +#~ msgid "" +#~ "The choices_ keyword argument may be more convenient for type checkers " +#~ "that simply check against a range of values::" +#~ msgstr "" +#~ "L'argument nommé choices_ est parfois plus facile d'utilisation pour les " +#~ "vérificateurs de type qui comparent la valeur à une gamme prédéfinie ::" + +#~ msgid "See the choices_ section for more details." +#~ msgstr "Voir la rubrique de choices_ pour plus de détails." diff --git a/library/array.po b/library/array.po new file mode 100644 index 0000000000..6118558936 --- /dev/null +++ b/library/array.po @@ -0,0 +1,576 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-22 22:57+0100\n" +"PO-Revision-Date: 2019-10-31 12:47+0100\n" +"Last-Translator: Cléo Buck \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" + +#: library/array.rst:2 +msgid ":mod:`array` --- Efficient arrays of numeric values" +msgstr ":mod:`array` — Tableaux efficaces de valeurs numériques" + +#: library/array.rst:11 +msgid "" +"This module defines an object type which can compactly represent an array of " +"basic values: characters, integers, floating point numbers. Arrays are " +"sequence types and behave very much like lists, except that the type of " +"objects stored in them is constrained. The type is specified at object " +"creation time by using a :dfn:`type code`, which is a single character. The " +"following type codes are defined:" +msgstr "" +"Ce module définit un type d'objet qui permet de représenter de façon " +"compacte un tableau (*array*) de valeurs élémentaires : caractères, entiers, " +"flottants. Les tableaux sont de type séquence et se comportent de manière " +"très similaire aux listes, sauf que les types d'objets qui y sont stockés " +"sont limités. Le type est spécifié au moment de la création de l’objet en " +"utilisant :dfn:`type code`, qui est un caractère unique. Voir ci-dessous " +"pour la définition des types :" + +#: library/array.rst:19 +msgid "Type code" +msgstr "Code d'indication du type" + +#: library/array.rst:19 +msgid "C Type" +msgstr "Type C" + +#: library/array.rst:19 +msgid "Python Type" +msgstr "Type Python" + +#: library/array.rst:19 +msgid "Minimum size in bytes" +msgstr "Taille minimum en octets" + +#: library/array.rst:19 +msgid "Notes" +msgstr "Notes" + +#: library/array.rst:21 +msgid "``'b'``" +msgstr "``'b'``" + +#: library/array.rst:21 +msgid "signed char" +msgstr "``signed char``" + +#: library/array.rst:23 library/array.rst:29 library/array.rst:33 +#: library/array.rst:37 library/array.rst:41 +msgid "int" +msgstr "*int*" + +#: library/array.rst:23 +msgid "1" +msgstr "1" + +#: library/array.rst:23 +msgid "``'B'``" +msgstr "``'B'``" + +#: library/array.rst:23 +msgid "unsigned char" +msgstr "``unsigned char``" + +#: library/array.rst:25 +msgid "``'u'``" +msgstr "``'u'``" + +#: library/array.rst:25 +msgid "wchar_t" +msgstr "" + +#: library/array.rst:25 +msgid "Unicode character" +msgstr "Caractère Unicode" + +#: library/array.rst:27 library/array.rst:31 library/array.rst:33 +msgid "2" +msgstr "2" + +#: library/array.rst:25 +msgid "\\(1)" +msgstr "\\(1)" + +#: library/array.rst:27 +msgid "``'h'``" +msgstr "``'h'``" + +#: library/array.rst:27 +msgid "signed short" +msgstr "``signed short``" + +#: library/array.rst:29 +msgid "``'H'``" +msgstr "``'H'``" + +#: library/array.rst:29 +msgid "unsigned short" +msgstr "``unsigned short``" + +#: library/array.rst:31 +msgid "``'i'``" +msgstr "``'i'``" + +#: library/array.rst:31 +msgid "signed int" +msgstr "``signed int``" + +#: library/array.rst:33 +msgid "``'I'``" +msgstr "``'I'``" + +#: library/array.rst:33 +msgid "unsigned int" +msgstr "``unsigned int``" + +#: library/array.rst:35 +msgid "``'l'``" +msgstr "``'l'``" + +#: library/array.rst:35 +msgid "signed long" +msgstr "``signed long``" + +#: library/array.rst:37 library/array.rst:43 +msgid "4" +msgstr "4" + +#: library/array.rst:37 +msgid "``'L'``" +msgstr "``'L'``" + +#: library/array.rst:37 +msgid "unsigned long" +msgstr "``unsigned long``" + +#: library/array.rst:39 +msgid "``'q'``" +msgstr "``'q'``" + +#: library/array.rst:39 +msgid "signed long long" +msgstr "``signed long long``" + +#: library/array.rst:41 library/array.rst:45 +msgid "8" +msgstr "8" + +#: library/array.rst:41 +msgid "``'Q'``" +msgstr "``'Q'``" + +#: library/array.rst:41 +msgid "unsigned long long" +msgstr "``unsigned long long``" + +#: library/array.rst:43 +msgid "``'f'``" +msgstr "``'f'``" + +#: library/array.rst:45 +msgid "float" +msgstr "*float*" + +#: library/array.rst:45 +msgid "``'d'``" +msgstr "``'d'``" + +#: library/array.rst:45 +msgid "double" +msgstr "double" + +#: library/array.rst:48 +msgid "Notes:" +msgstr "Notes :" + +#: library/array.rst:51 +msgid "It can be 16 bits or 32 bits depending on the platform." +msgstr "" + +#: library/array.rst:53 +msgid "" +"``array('u')`` now uses ``wchar_t`` as C type instead of deprecated " +"``Py_UNICODE``. This change doesn't affect its behavior because " +"``Py_UNICODE`` is alias of ``wchar_t`` since Python 3.3." +msgstr "" + +#: library/array.rst:61 +#, fuzzy +msgid "" +"The actual representation of values is determined by the machine " +"architecture (strictly speaking, by the C implementation). The actual size " +"can be accessed through the :attr:`array.itemsize` attribute." +msgstr "" +"La représentation réelle des valeurs est déterminée par l'architecture de la " +"machine (à proprement parler, par l'implémentation C). La taille réelle est " +"accessible via l'attribut :attr:`itemsize`." + +#: library/array.rst:65 +#, fuzzy +msgid "The module defines the following item:" +msgstr "Le module définit le type suivant :" + +#: library/array.rst:70 +msgid "A string with all available type codes." +msgstr "Une chaîne avec tous les codes de types disponibles." + +#: library/array.rst:73 +msgid "The module defines the following type:" +msgstr "Le module définit le type suivant :" + +#: library/array.rst:78 +msgid "" +"A new array whose items are restricted by *typecode*, and initialized from " +"the optional *initializer* value, which must be a list, a :term:`bytes-like " +"object`, or iterable over elements of the appropriate type." +msgstr "" +"Un nouveau tableau dont les éléments sont limités par *typecode*, et " +"initialisés par la valeur optionnelle *initializer*, qui peut être une " +"liste, un :term:`bytes-like object`, ou un itérable sur des éléments du type " +"approprié." + +#: library/array.rst:83 +msgid "" +"If given a list or string, the initializer is passed to the new array's :" +"meth:`fromlist`, :meth:`frombytes`, or :meth:`fromunicode` method (see " +"below) to add initial items to the array. Otherwise, the iterable " +"initializer is passed to the :meth:`extend` method." +msgstr "" +"Si le paramètre *initializer* est une liste ou une chaîne de caractères, il " +"est passé à la méthode :meth:`fromlist`, :meth:`frombytes` ou :meth:" +"`fromunicode` du tableau (voir ci-dessous) pour ajouter les éléments " +"initiaux du tableau. Si c'est un itérable, il est passé à la méthode :meth:" +"`extend`." + +#: library/array.rst:88 +msgid "" +"Array objects support the ordinary sequence operations of indexing, slicing, " +"concatenation, and multiplication. When using slice assignment, the " +"assigned value must be an array object with the same type code; in all other " +"cases, :exc:`TypeError` is raised. Array objects also implement the buffer " +"interface, and may be used wherever :term:`bytes-like objects ` are supported." +msgstr "" +"Les objets de tableau supportent les opérations classiques de séquence : " +"indiçage, découpage, concaténation et multiplication. Lors de l'utilisation " +"de tranche, la valeur assignée doit être un tableau du même type ; dans tous " +"les autres cas, l'exception :exc:`TypeError` est levée. Les objets de " +"tableau implémentent également l'interface tampon, et peuvent être utilisés " +"partout où :term:`bytes-like objects ` sont supportés." + +#: library/array.rst:94 +msgid "" +"Raises an :ref:`auditing event ` ``array.__new__`` with arguments " +"``typecode``, ``initializer``." +msgstr "" +"Lève un :ref:`événement d'audit ` ``array.__new__`` avec les " +"arguments ``typecode``, ``initializer``." + +#: library/array.rst:99 +msgid "The typecode character used to create the array." +msgstr "" +"Le code (de type Python caractère) utilisé pour spécifier le type des " +"éléments du tableau." + +#: library/array.rst:104 +msgid "The length in bytes of one array item in the internal representation." +msgstr "" +"La longueur en octets d'un élément du tableau dans la représentation interne." + +#: library/array.rst:109 +msgid "Append a new item with value *x* to the end of the array." +msgstr "Ajoute un nouvel élément avec la valeur *x* à la fin du tableau." + +#: library/array.rst:114 +#, fuzzy +msgid "" +"Return a tuple ``(address, length)`` giving the current memory address and " +"the length in elements of the buffer used to hold array's contents. The " +"size of the memory buffer in bytes can be computed as ``array.buffer_info()" +"[1] * array.itemsize``. This is occasionally useful when working with low-" +"level (and inherently unsafe) I/O interfaces that require memory addresses, " +"such as certain :c:func:`!ioctl` operations. The returned numbers are valid " +"as long as the array exists and no length-changing operations are applied to " +"it." +msgstr "" +"Renvoie un *n*-uplet ``(address, length)`` indiquant l'adresse mémoire " +"courante et la longueur en éléments du tampon utilisé pour contenir le " +"contenu du tableau. La taille du tampon mémoire en octets peut être calculée " +"par ``array.buffer_info()[1] * array.itemsize``. Ceci est parfois utile " +"lorsque vous travaillez sur des interfaces E/S de bas niveau (et " +"intrinsèquement dangereuses) qui nécessitent des adresses mémoire, telles " +"que certaines opérations :c:func:`ioctl`. Les nombres renvoyés sont valides " +"tant que le tableau existe et qu'aucune opération qui modifie sa taille ne " +"lui est appliquée." + +#: library/array.rst:124 +msgid "" +"When using array objects from code written in C or C++ (the only way to " +"effectively make use of this information), it makes more sense to use the " +"buffer interface supported by array objects. This method is maintained for " +"backward compatibility and should be avoided in new code. The buffer " +"interface is documented in :ref:`bufferobjects`." +msgstr "" +"Lors de l'utilisation d'objets tableaux provenant de codes écrits en C ou C+" +"+ (le seul moyen d'utiliser efficacement ces informations), il est plus " +"logique d'utiliser l'interface tampon supportée par les objets tableaux. " +"Cette méthode est maintenue pour des raisons de rétrocompatibilité et " +"devrait être évitée dans un nouveau code. L'interface tampon est documentée " +"dans :ref:`bufferobjects`." + +#: library/array.rst:133 +msgid "" +"\"Byteswap\" all items of the array. This is only supported for values " +"which are 1, 2, 4, or 8 bytes in size; for other types of values, :exc:" +"`RuntimeError` is raised. It is useful when reading data from a file " +"written on a machine with a different byte order." +msgstr "" +"Boutisme de tous les éléments du tableau. Ceci n'est pris en charge que pour " +"les valeurs de 1, 2, 4 ou 8 octets ; pour les autres types de valeur, :exc:" +"`RuntimeError` est levée. Il est utile lors de la lecture de données à " +"partir d'un fichier écrit sur une machine avec un ordre d'octets différent." + +#: library/array.rst:141 +msgid "Return the number of occurrences of *x* in the array." +msgstr "Renvoi le nombre d'occurrences de *x* dans le tableau." + +#: library/array.rst:146 +msgid "" +"Append items from *iterable* to the end of the array. If *iterable* is " +"another array, it must have *exactly* the same type code; if not, :exc:" +"`TypeError` will be raised. If *iterable* is not an array, it must be " +"iterable and its elements must be the right type to be appended to the array." +msgstr "" +"Ajoute les éléments de *iterable* à la fin du tableau. Si *iterable* est un " +"autre tableau, il doit le même code d'indication du type ; dans le cas " +"contraire, :exc:`TypeError` sera levée. Si *iterable* n'est pas un tableau, " +"il doit être itérable et ces éléments doivent être du bon type pour être " +"ajoutés dans le tableau." + +#: library/array.rst:154 +msgid "" +"Appends items from the string, interpreting the string as an array of " +"machine values (as if it had been read from a file using the :meth:" +"`fromfile` method)." +msgstr "" +"Ajoute des éléments de la chaîne, interprétant la chaîne comme un tableau de " +"valeurs machine (comme si elle avait été lue depuis le fichier en utilisant " +"la méthode :meth:`from file`)." + +#: library/array.rst:157 +#, fuzzy +msgid ":meth:`!fromstring` is renamed to :meth:`frombytes` for clarity." +msgstr "" +":meth:`fromstring` est renommée en :meth:`frombytes` pour plus de lisibilité." + +#: library/array.rst:163 +#, 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." +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, :" +"exc:`EOFError` est levée, mais les éléments qui étaient disponibles sont " +"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:171 +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." +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:177 +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 " +"``array.frombytes(unicodestring.encode(enc))`` to append Unicode data to an " +"array of some other type." +msgstr "" +"Étend ce tableau avec les données de la chaîne Unicode donnée. Le tableau " +"doit être de type ``'u'`` ; sinon :exc:`ValueError` est levée. Utiliser " +"``array.frombytes(unicodestring.encode(enc))`` pour ajouter des données " +"Unicode à un tableau d'un autre type." + +#: library/array.rst:185 +msgid "" +"Return the smallest *i* such that *i* is the index of the first occurrence " +"of *x* in the array. The optional arguments *start* and *stop* can be " +"specified to search for *x* within a subsection of the array. Raise :exc:" +"`ValueError` if *x* is not found." +msgstr "" + +#: library/array.rst:190 +msgid "Added optional *start* and *stop* parameters." +msgstr "" + +#: library/array.rst:196 +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." +msgstr "" +"Ajoute un nouvel élément avec la valeur *x* dans le tableau avant la " +"position *i*. Les valeurs négatives sont traitées relativement à la fin du " +"tableau." + +#: library/array.rst:202 +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 " +"removed and returned." +msgstr "" +"Supprime l'élément du tableau avec l'index *i* et le renvoie. L'argument " +"optionnel par défaut est à ``-1``, de sorte que par défaut le dernier " +"élément est supprimé et renvoyé." + +#: library/array.rst:209 +msgid "Remove the first occurrence of *x* from the array." +msgstr "Supprime la première occurrence de *x* du tableau." + +#: library/array.rst:214 +msgid "Reverse the order of the items in the array." +msgstr "Inverse l'ordre des éléments du tableau." + +#: library/array.rst:219 +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 " +"by the :meth:`tofile` method.)" +msgstr "" +"Convertit le tableau en un tableau de valeurs machine et renvoie la " +"représentation en octets (la même séquence d'octets qui serait écrite par la " +"méthode :meth:`tofile`)." + +#: library/array.rst:223 +#, fuzzy +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:229 +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:234 +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:239 +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()." +"decode(enc)`` to obtain a unicode string from an array of some other type." +msgstr "" +"Convertit le tableau en une chaîne Unicode. Le tableau doit être un tableau " +"de type ``'u'`` ; sinon :exc:`ValueError` est levée. Utilisez ``array." +"tobytes().decode(enc)`` pour obtenir une chaîne Unicode depuis un tableau de " +"tout autre type." + +#: library/array.rst:244 +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 " +"array is empty, otherwise it is a string if the *typecode* is ``'u'``, " +"otherwise it is a list of numbers. The string is guaranteed to be able to " +"be converted back to an array with the same type and value using :func:" +"`eval`, so long as the :class:`~array.array` class has been imported using " +"``from array import array``. Examples::" +msgstr "" +"Quand un objet tableau est affiché ou converti en chaîne, il est représenté " +"en tant que ``array(typecode, initializer)``. *initializer* est omis si le " +"tableau est vide, sinon c'est une chaine si le *typecode* est ``'u'``, sinon " +"c'est une liste de nombres. Il est garanti que la chaîne puisse être " +"convertie en un tableau avec le même type et la même valeur en utilisant :" +"func:`eval`, tant que la classe :class:`~array.array` a été importée en " +"utilisant ``from array import array``. Exemples ::" + +#: library/array.rst:261 +msgid "Module :mod:`struct`" +msgstr "Module :mod:`struct`" + +#: library/array.rst:261 +msgid "Packing and unpacking of heterogeneous binary data." +msgstr "Empaquetage et dépaquetage de données binaires hétérogènes." + +#: library/array.rst:265 +msgid "Module :mod:`xdrlib`" +msgstr "Module :mod:`xdrlib`" + +#: library/array.rst:264 +msgid "" +"Packing and unpacking of External Data Representation (XDR) data as used in " +"some remote procedure call systems." +msgstr "" +"Empaquetage et dépaquetage des données XDR (External Data Representation) " +"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:267 +msgid "`NumPy `_" +msgstr "" + +#: library/array.rst:268 +msgid "The NumPy package defines another array type." +msgstr "" + +#~ msgid "The following data items and methods are also supported:" +#~ msgstr "" +#~ "Les éléments de données et méthodes suivants sont également supportés :" + +#~ msgid "" +#~ "Return the smallest *i* such that *i* is the index of the first " +#~ "occurrence of *x* in the array." +#~ msgstr "" +#~ "Renvoie le plus petit *i* tel que *i* est l'index de la première " +#~ "occurrence de *x* dans le tableau." + +#~ 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/%20for%20further%20information%20about%20Numerical%20Python." +#~ 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" + +#~ msgid "" +#~ "The ``'u'`` type code corresponds to Python's obsolete unicode character " +#~ "(:c:type:`Py_UNICODE` which is :c:type:`wchar_t`). Depending on the " +#~ "platform, it can be 16 bits or 32 bits." +#~ msgstr "" +#~ "Le code de type ``'u'`` correspond au type obsolète de Python caractère " +#~ "Unicode (:c:type:`Py_UNICODE` de type :c:type:`wchar_t`). Selon la " +#~ "plateforme, il peut être 16 bits ou 32 bits." + +#~ msgid "" +#~ "``'u'`` will be removed together with the rest of the :c:type:" +#~ "`Py_UNICODE` API." +#~ msgstr "``'u'`` sera supprimé avec le reste de l'API :c:type:`Py_UNICODE`." + +#~ msgid "Deprecated alias for :meth:`frombytes`." +#~ msgstr "Alias obsolète de :meth:`frombytes`." + +#~ msgid "Deprecated alias for :meth:`tobytes`." +#~ msgstr "Alias obsolète de :meth:`tobytes`." diff --git a/library/ast.po b/library/ast.po new file mode 100644 index 0000000000..b16cf8b624 --- /dev/null +++ b/library/ast.po @@ -0,0 +1,1821 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-18 15:46+0200\n" +"PO-Revision-Date: 2021-09-15 23:54+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/ast.rst:2 +msgid ":mod:`ast` --- Abstract Syntax Trees" +msgstr ":mod:`ast` — Arbres Syntaxiques Abstraits" + +#: library/ast.rst:14 +msgid "**Source code:** :source:`Lib/ast.py`" +msgstr "**Code source :** :source:`Lib/ast.py`" + +#: library/ast.rst:18 +msgid "" +"The :mod:`ast` module helps Python applications to process trees of the " +"Python abstract syntax grammar. The abstract syntax itself might change " +"with each Python release; this module helps to find out programmatically " +"what the current grammar looks like." +msgstr "" +"Le module :mod:`ast` permet aux applications Python de traiter les arbres " +"syntaxiques, dérivés directement de la grammaire abstraite du langage. On " +"peut notamment déterminer dans un programme la forme de chaque élément de " +"grammaire, qui est susceptible d'être modifiée par les nouvelles versions de " +"Python." + +#: library/ast.rst:23 +msgid "" +"An abstract syntax tree can be generated by passing :data:`ast." +"PyCF_ONLY_AST` as a flag to the :func:`compile` built-in function, or using " +"the :func:`parse` helper provided in this module. The result will be a tree " +"of objects whose classes all inherit from :class:`ast.AST`. An abstract " +"syntax tree can be compiled into a Python code object using the built-in :" +"func:`compile` function." +msgstr "" +"Un arbre syntaxique abstrait peut être généré en passant l'option :data:`ast." +"PyCF_ONLY_AST` à la fonction native :func:`compile`, ou à l'aide de la " +"fonction auxiliaire :func:`parse` fournie par ce module. Le résultat est un " +"arbre composé d'objets dont les classes héritent toutes de :class:`ast.AST`. " +"On peut compiler les arbres en code objet Python à l'aide de la fonction " +"native :func:`compile`." + +#: library/ast.rst:33 +msgid "Abstract Grammar" +msgstr "Grammaire abstraite" + +#: library/ast.rst:35 +msgid "The abstract grammar is currently defined as follows:" +msgstr "La grammaire abstraite est actuellement définie comme suit :" + +#: library/ast.rst:42 +msgid "Node classes" +msgstr "Classes de nœuds" + +#: library/ast.rst:46 +#, fuzzy +msgid "" +"This is the base of all AST node classes. The actual node classes are " +"derived from the :file:`Parser/Python.asdl` file, which is reproduced :ref:" +"`above `. They are defined in the :mod:`_ast` C module " +"and re-exported in :mod:`ast`." +msgstr "" +"C'est la classe de base de toute classe de nœuds des d'arbres syntaxiques " +"abstraits. Les classes de nœuds elle-mêmes sont dérivées du fichier :file:" +"`Parser/Python.asdl`, qui est reproduit :ref:`ci-dessous `. Elles sont définies dans le module C :mod:`_ast` et ré-exportées " +"dans le module :mod:`ast`." + +#: library/ast.rst:51 +msgid "" +"There is one class defined for each left-hand side symbol in the abstract " +"grammar (for example, :class:`ast.stmt` or :class:`ast.expr`). In addition, " +"there is one class defined for each constructor on the right-hand side; " +"these classes inherit from the classes for the left-hand side trees. For " +"example, :class:`ast.BinOp` inherits from :class:`ast.expr`. For production " +"rules with alternatives (aka \"sums\"), the left-hand side class is " +"abstract: only instances of specific constructor nodes are ever created." +msgstr "" +"Il y a une classe définie pour chacun des symboles présents à gauche dans la " +"grammaire abstraite (par exemple :class:`ast.stmt` ou :class:`ast.expr`). En " +"plus de cela, une classe est définie pour chacun des constructeurs présentés " +"à droite ; ces classes héritent des classes situées à leur gauche dans " +"l'arbre. Par exemple, la classe :class:`ast.BinOp` hérite de la classe :" +"class:`ast.expr`. Pour les règles de réécriture avec alternatives (les " +"« sommes »), la classe de la partie gauche est abstraite : seules les " +"classes de nœuds à droite sont instanciées." + +#: library/ast.rst:64 +msgid "" +"Each concrete class has an attribute :attr:`_fields` which gives the names " +"of all child nodes." +msgstr "" +"Chaque classe concrète possède un attribut :attr:`_fields` donnant les noms " +"de tous les nœuds enfants." + +#: library/ast.rst:67 +msgid "" +"Each instance of a concrete class has one attribute for each child node, of " +"the type as defined in the grammar. For example, :class:`ast.BinOp` " +"instances have an attribute :attr:`left` of type :class:`ast.expr`." +msgstr "" +"Chaque instance d'une classe concrète possède un attribut pour chaque nœud " +"enfant, du type défini par la grammaire. Par exemple, les instances :class:" +"`ast.BinOp` possèdent un attribut :attr:`left` de type :class:`ast.expr`." + +#: library/ast.rst:71 +msgid "" +"If these attributes are marked as optional in the grammar (using a question " +"mark), the value might be ``None``. If the attributes can have zero-or-more " +"values (marked with an asterisk), the values are represented as Python " +"lists. All possible attributes must be present and have valid values when " +"compiling an AST with :func:`compile`." +msgstr "" +"Si un attribut est marqué comme optionnel dans la grammaire (avec un point " +"d'interrogation ``?``), sa valeur peut être ``None``. S'il peut avoir zéro, " +"une ou plusieurs valeurs (ce qui est marqué par un astérisque ``*``), elles " +"sont regroupées dans une liste Python. Tous les attributs possibles doivent " +"être présents et avoir une valeur valide pour compiler un arbre syntaxique " +"avec :func:`compile`." + +#: library/ast.rst:82 +#, fuzzy +msgid "" +"Instances of :class:`ast.expr` and :class:`ast.stmt` subclasses have :attr:" +"`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 " +"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." +msgstr "" +"Les instances des sous-classes de :class:`ast.expr` et :class:`ast.stmt` " +"possèdent les attributs :attr:`lineno`, :attr:`col_offset`, :attr:" +"`end_lineno` et :attr:`end_col_offset`. Les attributs :attr:`lineno` et :" +"attr:`end_lineno` sont les numéros de ligne de début et de fin dans le code " +"source (indexés à partir de 1, la première ligne est la ligne 1). Les " +"attributs :attr:`col_offset` et :attr:`end_col_offset` représentent quant à " +"eux les décalages respectifs, en octets au format UTF-8, du premier et du " +"dernier lexème qui ont généré le nœud. Les décalages sont exprimés en octets " +"au format UTF-8 parce que l'analyseur syntaxique utilise l'UTF-8 en interne." + +#: 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:96 +msgid "" +"The constructor of a class :class:`ast.T` parses its arguments as follows:" +msgstr "" +"Le constructeur d'une classe nommée :class:`ast.T` analyse ses arguments " +"comme suit :" + +#: 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." +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:100 +msgid "" +"If there are keyword arguments, they will set the attributes of the same " +"names to the given values." +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:103 +msgid "" +"For example, to create and populate an :class:`ast.UnaryOp` node, you could " +"use ::" +msgstr "" +"Par exemple, pour créer et peupler un nœud :class:`ast.UnaryOp`, on peut " +"utiliser ::" + +#: library/ast.rst:115 +msgid "or the more compact ::" +msgstr "ou, plus compact ::" + +#: 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:126 +msgid "" +"Simple indices are represented by their value, extended slices are " +"represented as tuples." +msgstr "" + +#: 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: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: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:150 +msgid "Literals" +msgstr "Littéraux" + +#: 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 " +"simple types such as a number, string or ``None``, but also immutable " +"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: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: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:174 +msgid "``conversion`` is an integer:" +msgstr "*conversion* est un entier parmi les valeurs suivantes :" + +#: library/ast.rst:176 +msgid "-1: no formatting" +msgstr "-1, aucun formatage ;" + +#: library/ast.rst:177 +msgid "115: ``!s`` string formatting" +msgstr "115, pour le formatage par ``str()`` correspondant à ``!s`` ;" + +#: library/ast.rst:178 +msgid "114: ``!r`` repr formatting" +msgstr "114, pour le formatage par ``repr()`` correspondant à ``!r`` ;" + +#: library/ast.rst:179 +msgid "97: ``!a`` ascii formatting" +msgstr "97, pour le formatage par ``ascii()`` correspondant à ``!a``." + +#: 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: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: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:243 +msgid "A set. ``elts`` holds a list of nodes representing the set's elements." +msgstr "Ensemble. *elts* est la liste de ses éléments." + +#: 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: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:280 +msgid "Variables" +msgstr "Variables" + +#: 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: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: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:348 +msgid "Expressions" +msgstr "Expressions" + +#: 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 " +"container. ``value`` holds one of the other nodes in this section, a :class:" +"`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: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: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: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:421 +msgid "Binary operator tokens." +msgstr "Unités lexicales pour les opérations binaires." + +#: 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: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:447 +msgid "Boolean operator tokens." +msgstr "Unités lexicales pour les opérations booléennes." + +#: 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:481 +msgid "Comparison operator tokens." +msgstr "Unités lexicales pour les comparaisons." + +#: 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: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: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: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: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: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: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: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:570 +msgid "Subscripting" +msgstr "Indiçage" + +#: 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: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:615 +msgid "Comprehensions" +msgstr "Compréhensions" + +#: 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:626 +msgid "``generators`` is a list of :class:`comprehension` nodes." +msgstr "*generators* est une liste de nœuds :class:`comprehension`." + +#: 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: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:739 +msgid "Statements" +msgstr "Instructions" + +#: 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: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:1038 library/ast.rst:1632 +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: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`. " +"``annotation`` is the annotation, such as a :class:`Constant` or :class:" +"`Name` node. ``value`` is a single optional node. ``simple`` is a boolean " +"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: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:841 +#, fuzzy +msgid "" +"The ``target`` attribute cannot be of class :class:`Tuple` or :class:`List`, " +"unlike the targets of :class:`Assign`." +msgstr "" +"Contrairement aux cibles acceptées par :class:`Assign`, le champ *target* ne " +"peut pas être ici de type :class:`Tuple` ou :class:`List`." + +#: 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: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: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:909 +msgid "A ``pass`` statement." +msgstr "Instruction ``pass``." + +#: 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:924 +msgid "Imports" +msgstr "Importations" + +#: 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: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: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:984 +msgid "Control flow" +msgstr "Contrôle de l'exécution" + +#: 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." + +# Il faut développer un peu plus que l'original car le lecteur ne +# comprend pas forcément les termes « body » et « orelse ». La même +# considération s'applique à bien des descriptions par la suite. +#: 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: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: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 " +"the item to be looped over, again as a single node. ``body`` and ``orelse`` " +"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: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:1091 +msgid "The ``break`` and ``continue`` statements." +msgstr "Instructions ``break`` et ``continue``." + +#: 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: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: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: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:1249 +msgid "Pattern matching" +msgstr "" + +#: library/ast.rst:1254 +msgid "" +"A ``match`` statement. ``subject`` holds the subject of the match (the " +"object that is being matched against the cases) and ``cases`` contains an " +"iterable of :class:`match_case` nodes with the different cases." +msgstr "" + +#: library/ast.rst:1260 +msgid "" +"A single case pattern in a ``match`` statement. ``pattern`` contains the " +"match pattern that the subject will be matched against. Note that the :class:" +"`AST` nodes produced for patterns differ from those produced for " +"expressions, even when they share the same syntax." +msgstr "" + +#: library/ast.rst:1265 +msgid "" +"The ``guard`` attribute contains an expression that will be evaluated if the " +"pattern matches the subject." +msgstr "" + +#: library/ast.rst:1268 +msgid "" +"``body`` contains a list of nodes to execute if the pattern matches and the " +"result of evaluating the guard expression is true." +msgstr "" + +#: library/ast.rst:1311 +msgid "" +"A match literal or value pattern that compares by equality. ``value`` is an " +"expression node. Permitted value nodes are restricted as described in the " +"match statement documentation. This pattern succeeds if the match subject is " +"equal to the evaluated value." +msgstr "" + +#: library/ast.rst:1338 +msgid "" +"A match literal pattern that compares by identity. ``value`` is the " +"singleton to be compared against: ``None``, ``True``, or ``False``. This " +"pattern succeeds if the match subject is the given constant." +msgstr "" + +#: library/ast.rst:1363 +msgid "" +"A match sequence pattern. ``patterns`` contains the patterns to be matched " +"against the subject elements if the subject is a sequence. Matches a " +"variable length sequence if one of the subpatterns is a ``MatchStar`` node, " +"otherwise matches a fixed length sequence." +msgstr "" + +#: library/ast.rst:1394 +msgid "" +"Matches the rest of the sequence in a variable length match sequence " +"pattern. If ``name`` is not ``None``, a list containing the remaining " +"sequence elements is bound to that name if the overall sequence pattern is " +"successful." +msgstr "" + +#: library/ast.rst:1434 +msgid "" +"A match mapping pattern. ``keys`` is a sequence of expression nodes. " +"``patterns`` is a corresponding sequence of pattern nodes. ``rest`` is an " +"optional name that can be specified to capture the remaining mapping " +"elements. Permitted key expressions are restricted as described in the match " +"statement documentation." +msgstr "" + +#: library/ast.rst:1440 +msgid "" +"This pattern succeeds if the subject is a mapping, all evaluated key " +"expressions are present in the mapping, and the value corresponding to each " +"key matches the corresponding subpattern. If ``rest`` is not ``None``, a " +"dict containing the remaining mapping elements is bound to that name if the " +"overall mapping pattern is successful." +msgstr "" + +#: library/ast.rst:1480 +msgid "" +"A match class pattern. ``cls`` is an expression giving the nominal class to " +"be matched. ``patterns`` is a sequence of pattern nodes to be matched " +"against the class defined sequence of pattern matching attributes. " +"``kwd_attrs`` is a sequence of additional attributes to be matched " +"(specified as keyword arguments in the class pattern), ``kwd_patterns`` are " +"the corresponding patterns (specified as keyword values in the class " +"pattern)." +msgstr "" + +#: library/ast.rst:1487 +msgid "" +"This pattern succeeds if the subject is an instance of the nominated class, " +"all positional patterns match the corresponding class-defined attributes, " +"and any specified keyword attributes match their corresponding pattern." +msgstr "" + +#: library/ast.rst:1491 +msgid "" +"Note: classes may define a property that returns self in order to match a " +"pattern node against the instance being matched. Several builtin types are " +"also matched that way, as described in the match statement documentation." +msgstr "" + +#: library/ast.rst:1544 +msgid "" +"A match \"as-pattern\", capture pattern or wildcard pattern. ``pattern`` " +"contains the match pattern that the subject will be matched against. If the " +"pattern is ``None``, the node represents a capture pattern (i.e a bare name) " +"and will always succeed." +msgstr "" + +#: library/ast.rst:1549 +msgid "" +"The ``name`` attribute contains the name that will be bound if the pattern " +"is successful. If ``name`` is ``None``, ``pattern`` must also be ``None`` " +"and the node represents the wildcard pattern." +msgstr "" + +#: library/ast.rst:1585 +msgid "" +"A match \"or-pattern\". An or-pattern matches each of its subpatterns in " +"turn to the subject, until one succeeds. The or-pattern is then deemed to " +"succeed. If none of the subpatterns succeed the or-pattern fails. The " +"``patterns`` attribute contains a list of match pattern nodes that will be " +"matched against the subject." +msgstr "" + +#: library/ast.rst:1617 +msgid "Function and class definitions" +msgstr "Définition de fonctions et de classes" + +#: library/ast.rst:1621 +msgid "A function definition." +msgstr "Définition d'une fonction." + +#: library/ast.rst:1623 +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:1624 +#, fuzzy +msgid "``args`` is an :class:`arguments` node." +msgstr "" +"*args* est un nœud de type :class:`arguments` qui contient les arguments de " +"la signature." + +#: library/ast.rst:1625 +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:1626 +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:1628 +msgid "``returns`` is the return annotation." +msgstr "*returns* est l'annotation de renvoi éventuelle." + +#: library/ast.rst:1637 +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:1661 +msgid "The arguments for a function." +msgstr "Arguments d'une fonction." + +#: library/ast.rst:1663 +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:1664 +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:1666 +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:1668 +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:1675 +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:1681 +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:1725 +msgid "A ``return`` statement." +msgstr "Instruction ``return``, qui renvoie *value*." + +#: library/ast.rst:1740 +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:1765 +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:1792 +msgid "A class definition." +msgstr "Définition d'une classe." + +#: library/ast.rst:1794 +msgid "``name`` is a raw string for the class name" +msgstr "*name* est le nom de la classe sous forme de chaîne de caractères ;" + +#: library/ast.rst:1795 +msgid "``bases`` is a list of nodes for explicitly specified base classes." +msgstr "*bases* est la liste des classes mères données explicitement ;" + +#: library/ast.rst:1796 +#, fuzzy +msgid "" +"``keywords`` is a list of :class:`keyword` nodes, principally for " +"'metaclass'. Other keywords will be passed to the metaclass, as per " +"`PEP-3115 `_." +msgstr "" +"*keywords* est une liste de nœuds de type :class:`keyword`. Le principal mot-" +"clé qui peut y apparaître est ``metaclass``. Les autres sont passés à la " +"métaclasse (voir la :pep:`3115`) ;" + +#: library/ast.rst:1799 +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:1802 +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:1804 +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:1833 +msgid "Async and await" +msgstr "``async`` et ``await``" + +#: library/ast.rst:1837 +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:1843 +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:1876 +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:1881 +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." +"boolop` and :class:`ast.expr_context`) on the returned tree will be " +"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:1889 +msgid ":mod:`ast` Helpers" +msgstr "Outils du module :mod:`ast`" + +#: library/ast.rst:1891 +msgid "" +"Apart from the node classes, the :mod:`ast` module defines these utility " +"functions and classes for traversing abstract syntax trees:" +msgstr "" +"À part les classes de nœuds, le module :mod:`ast` définit plusieurs " +"fonctions et classes utilitaires pour traverser les arbres syntaxiques " +"abstraits." + +#: library/ast.rst:1896 +msgid "" +"Parse the source into an AST node. Equivalent to ``compile(source, " +"filename, mode, ast.PyCF_ONLY_AST)``." +msgstr "" +"Analyse le code source et renvoie un arbre syntaxique. Équivalent à " +"``compile(source, filename, mode, ast.PyCF_ONLY_AST)``." + +#: library/ast.rst:1899 +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 " +"equivalent to adding :data:`ast.PyCF_TYPE_COMMENTS` to the flags passed to :" +"func:`compile()`. This will report syntax errors for misplaced type " +"comments. Without this flag, type comments will be ignored, and the " +"``type_comment`` field on selected AST nodes will always be ``None``. In " +"addition, the locations of ``# type: ignore`` comments will be returned as " +"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:1909 +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:1913 +msgid "" +"Also, setting ``feature_version`` to a tuple ``(major, minor)`` will attempt " +"to parse using that Python version's grammar. Currently ``major`` must equal " +"to ``3``. For example, setting ``feature_version=(3, 4)`` will allow the " +"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:1920 +msgid "" +"If source contains a null character ('\\0'), :exc:`ValueError` is raised." +msgstr "" + +#: library/ast.rst:1923 +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:1930 +msgid "" +"In particular, :func:`ast.parse` won't do any scoping checks, which the " +"compilation step does." +msgstr "" + +#: library/ast.rst:1934 +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." +msgstr "" +"Il est possible de faire planter l'interpréteur Python avec des chaînes " +"suffisamment grandes ou complexes lors de la compilation d'un arbre " +"syntaxique en raison de la limitation de la profondeur de la pile d'appels." + +#: library/ast.rst:1938 +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:1944 +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:1949 +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:1954 +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:1962 +#, fuzzy +msgid "" +"Evaluate an expression node or a string containing only a Python literal or " +"container display. The string or node provided may only consist of the " +"following Python literal structures: strings, bytes, numbers, tuples, lists, " +"dicts, sets, booleans, ``None`` and ``Ellipsis``." +msgstr "" +"Évalue de manière sûre un nœud d'expression, ou bien une chaîne de " +"caractères contenant une valeur littérale simple ou un conteneur sous forme " +"littérale. La chaîne de caractères ou le nœud fourni ne doit contenir que " +"des littéraux parmi les types suivants : chaînes de caractères, octets, " +"nombres, *n*-uplets, listes, dictionnaires, ensembles, booléens, et ``None``." + +#: library/ast.rst:1967 +#, fuzzy +msgid "" +"This can be used for evaluating strings containing Python values without the " +"need to parse the values oneself. It is not capable of evaluating " +"arbitrarily complex expressions, for example involving operators or indexing." +msgstr "" +"Cela peut être utilisé pour évaluer de manière sûre la chaîne de caractères " +"contenant des valeurs Python de source non fiable sans avoir besoin " +"d'analyser les valeurs elles-mêmes. Cette fonction n'est pas capable " +"d'évaluer des expressions arbitrairement complexes, par exemple impliquant " +"des opérateurs ou de l'indiçage." + +#: library/ast.rst:1972 +msgid "" +"This function had been documented as \"safe\" in the past without defining " +"what that meant. That was misleading. This is specifically designed not to " +"execute Python code, unlike the more general :func:`eval`. There is no " +"namespace, no name lookups, or ability to call out. But it is not free from " +"attack: A relatively small input can lead to memory exhaustion or to C stack " +"exhaustion, crashing the process. There is also the possibility for " +"excessive CPU consumption denial of service on some inputs. Calling it on " +"untrusted data is thus not recommended." +msgstr "" + +#: library/ast.rst:1982 +#, fuzzy +msgid "" +"It is possible to crash the Python interpreter due to stack depth " +"limitations in Python's AST compiler." +msgstr "" +"Il est possible de faire planter l'interpréteur Python avec des chaînes " +"suffisamment grandes ou complexes lors de la compilation d'un arbre " +"syntaxique en raison de la limitation de la profondeur de la pile d'appels." + +#: library/ast.rst:1985 +msgid "" +"It can raise :exc:`ValueError`, :exc:`TypeError`, :exc:`SyntaxError`, :exc:" +"`MemoryError` and :exc:`RecursionError` depending on the malformed input." +msgstr "" + +#: library/ast.rst:1989 +msgid "Now allows bytes and set literals." +msgstr "accepte maintenant les octets et ensembles littéraux." + +#: library/ast.rst:1992 +msgid "Now supports creating empty sets with ``'set()'``." +msgstr "accepte ``set()`` pour les ensembles vides." + +#: library/ast.rst:1995 +msgid "For string inputs, leading spaces and tabs are now stripped." +msgstr "" + +#: library/ast.rst:2001 +msgid "" +"Return the docstring of the given *node* (which must be a :class:" +"`FunctionDef`, :class:`AsyncFunctionDef`, :class:`ClassDef`, or :class:" +"`Module` node), or ``None`` if it has no docstring. If *clean* is true, " +"clean up the docstring's indentation with :func:`inspect.cleandoc`." +msgstr "" +"Renvoie la *docstring* du nœud *node* (de type :class:`FunctionDef`, :class:" +"`AsyncFunctionDef`, :class:`ClassDef` or :class:`Module`), ou ``None`` s'il " +"n'a pas de *docstring*. Si *clean* est vrai, cette fonction nettoie " +"l'indentation de la *docstring* avec :func:`inspect.cleandoc`." + +#: library/ast.rst:2007 +msgid ":class:`AsyncFunctionDef` is now supported." +msgstr ":class:`AsyncFunctionDef` est maintenant gérée." + +#: library/ast.rst:2013 +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:2017 +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:2025 +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 " +"them. This is rather tedious to fill in for generated nodes, so this helper " +"adds these attributes recursively where not already set, by setting them to " +"the values of the parent node. It works recursively starting at *node*." +msgstr "" +"Lorsque l'on compile un arbre avec :func:`compile`, le compilateur attend " +"les attributs :attr:`lineno` et :attr:`col_offset` pour tous les nœuds qui " +"les prennent en charge. Il est fastidieux de les remplir pour les nœuds " +"générés par du code. Cette fonction utilitaire ajoute ces attributs de " +"manière récursive là où 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:2034 +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* 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:2041 +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 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:2048 +msgid "" +"Yield a tuple of ``(fieldname, value)`` for each field in ``node._fields`` " +"that is present on *node*." +msgstr "" +"Produit un *n*-uplet de couples ``(nom_du_champ, valeur)`` pour chaque champ " +"de ``node._fields`` qui est présent dans *node*." + +#: library/ast.rst:2054 +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." +msgstr "" +"Produit tous les nœuds enfants directs de *node*, c'est-à-dire tous les " +"champs qui sont des nœuds et tous les éléments des champs qui sont des " +"listes de nœuds." + +#: library/ast.rst:2060 +msgid "" +"Recursively yield all descendant nodes in the tree starting at *node* " +"(including *node* itself), in no specified order. This is useful if you " +"only want to modify nodes in place and don't care about the context." +msgstr "" +"Produit récursivement tous les nœuds enfants dans l'arbre en commençant par " +"*node* (*node* lui-même est inclus), sans ordre spécifique. C'est utile " +"lorsque l'on souhaite modifier les nœuds sur place sans prêter attention au " +"contexte." + +#: library/ast.rst:2067 +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 " +"which is forwarded by the :meth:`visit` method." +msgstr "" +"Classe de base pour un visiteur de nœud, qui parcourt l'arbre syntaxique " +"abstrait et appelle une fonction de visite pour chacun des nœuds trouvés. " +"Cette fonction peut renvoyer une valeur, qui est transmise par la méthode :" +"meth:`visit`." + +#: library/ast.rst:2071 +msgid "" +"This class is meant to be subclassed, with the subclass adding visitor " +"methods." +msgstr "" +"Cette classe est faite pour être dérivée, en ajoutant des méthodes de visite " +"à la sous-classe." + +#: library/ast.rst:2076 +msgid "" +"Visit a node. The default implementation calls the method called :samp:" +"`self.visit_{classname}` where *classname* is the name of the node class, " +"or :meth:`generic_visit` if that method doesn't exist." +msgstr "" +"Visite un nœud. L'implémentation par défaut appelle la méthode :samp:`self." +"visit_{classe}` où *classe* représente le nom de la classe du nœud, ou :meth:" +"`generic_visit` si cette méthode n'existe pas." + +#: library/ast.rst:2082 +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:2084 +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." +msgstr "" +"Notons que les nœuds enfants qui possèdent une méthode de visite spéciale ne " +"sont 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:2088 +msgid "" +"Don't use the :class:`NodeVisitor` if you want to apply changes to nodes " +"during traversal. For this a special visitor exists (:class:" +"`NodeTransformer`) that allows modifications." +msgstr "" +"N'utilisez pas :class:`NodeVisitor` si vous souhaitez appliquer des " +"changements sur les nœuds lors du parcours. Pour cela, un visiteur spécial " +"existe (:class:`NodeTransformer`) qui permet les modifications." + +#: library/ast.rst:2094 +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:2102 +msgid "" +"A :class:`NodeVisitor` subclass that walks the abstract syntax tree and " +"allows modification of nodes." +msgstr "" +"Une sous-classe de :class:`NodeVisitor` qui traverse l'arbre syntaxique " +"abstrait et permet de modifier les nœuds." + +#: library/ast.rst:2105 +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 " +"of the visitor method is ``None``, the node will be removed from its " +"location, otherwise it is replaced with the return value. The return value " +"may be the original node in which case no replacement takes place." +msgstr "" +"Le :class:`NodeTransformer` traverse l'arbre syntaxique et utilise la valeur " +"renvoyée par les méthodes du visiteur pour remplacer ou supprimer l'ancien " +"nœud. Si la valeur renvoyée par la méthode du visiteur est ``None``, le nœud " +"est supprimé de sa position, sinon il est remplacé par cette valeur. Elle " +"peut être le nœud original, auquel cas il n'y a pas de remplacement." + +#: library/ast.rst:2111 +msgid "" +"Here is an example transformer that rewrites all occurrences of name lookups " +"(``foo``) to ``data['foo']``::" +msgstr "" +"Voici un exemple de transformation qui réécrit tous les accès à la valeur " +"d'une variable ``toto`` en ``data['toto']`` ::" + +#: library/ast.rst:2123 +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` " +"method for the node first." +msgstr "" +"Gardez en tête que si un nœud sur lequel vous travaillez a des nœuds " +"enfants, vous devez transformer également ces nœuds enfants vous-même ou " +"appeler d'abord la méthode :meth:`generic_visit` sur le nœud." + +#: library/ast.rst:2127 +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 " +"just a single node." +msgstr "" +"Pour les nœuds qui font partie d'un groupe (notamment toutes les " +"instructions), le visiteur peut aussi renvoyer une liste des nœuds plutôt " +"qu'un seul nœud." + +#: library/ast.rst:2131 +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:2139 +msgid "Usually you use the transformer like this::" +msgstr "Utilisation typique des transformations ::" + +#: library/ast.rst:2146 +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 " +"string will show the names and the values for fields. If *annotate_fields* " +"is false, the result string will be more compact by omitting unambiguous " +"field names. Attributes such as line numbers and column offsets are not " +"dumped by default. If this is wanted, *include_attributes* can be set to " +"true." +msgstr "" +"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:2154 +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 " +"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:2161 +msgid "Added the *indent* option." +msgstr "ajout du paramètre *indent*." + +#: library/ast.rst:2168 +msgid "Compiler Flags" +msgstr "Options du compilateur" + +#: library/ast.rst:2170 +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:2175 +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:2182 +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:2187 +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:2196 +msgid "Command-Line Usage" +msgstr "Utilisation en ligne de commande" + +#: library/ast.rst:2200 +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:2207 +msgid "The following options are accepted:" +msgstr "Les options suivantes sont acceptées :" + +#: library/ast.rst:2213 +msgid "Show the help message and exit." +msgstr "Affiche un message d'aide et quitte." + +#: library/ast.rst:2218 +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:2223 +msgid "Don't parse type comments." +msgstr "Désactive la reconnaissance des commentaires de type." + +#: library/ast.rst:2227 +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:2232 +msgid "Indentation of nodes in AST (number of spaces)." +msgstr "Nombre d'espaces pour chaque niveau d'indentation dans la sortie." + +#: library/ast.rst:2234 +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:2240 +msgid "" +"`Green Tree Snakes `_, an external " +"documentation resource, has good details on working with Python ASTs." +msgstr "" +"`Green Tree Snakes `_, une " +"ressource documentaire externe, qui possède plus de détails pour travailler " +"avec des arbres syntaxiques Python." + +#: library/ast.rst:2243 +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:2248 +#, fuzzy +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 "" +"`leoAst.py `_ unifie les " +"visions des lexèmes et des arbres syntaxiques en insérant des liens " +"bidirectionnels entre les deux." + +#: library/ast.rst:2252 +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:2257 +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 new file mode 100644 index 0000000000..57e80557ba --- /dev/null +++ b/library/asynchat.po @@ -0,0 +1,323 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-18 15:46+0200\n" +"PO-Revision-Date: 2018-10-06 17:04+0200\n" +"Last-Translator: Julien Palard \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" + +#: library/asynchat.rst:2 +msgid ":mod:`asynchat` --- Asynchronous socket command/response handler" +msgstr "" +":mod:`asynchat` --- Gestionnaire d'interfaces de connexion (*socket*) " +"commande/réponse asynchrones" + +#: library/asynchat.rst:11 +msgid "**Source code:** :source:`Lib/asynchat.py`" +msgstr "*Code source :** :source:`Lib/asynchat.py`" + +#: 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:22 +msgid "" +"This module exists for backwards compatibility only. For new code we " +"recommend using :mod:`asyncio`." +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:25 +msgid "" +"This module builds on the :mod:`asyncore` infrastructure, simplifying " +"asynchronous clients and servers and making it easier to handle protocols " +"whose elements are terminated by arbitrary strings, or are of variable " +"length. :mod:`asynchat` defines the abstract class :class:`async_chat` that " +"you subclass, providing implementations of the :meth:`collect_incoming_data` " +"and :meth:`found_terminator` methods. It uses the same asynchronous loop as :" +"mod:`asyncore`, and the two types of channel, :class:`asyncore.dispatcher` " +"and :class:`asynchat.async_chat`, can freely be mixed in the channel map. " +"Typically an :class:`asyncore.dispatcher` server channel generates new :" +"class:`asynchat.async_chat` channel objects as it receives incoming " +"connection requests." +msgstr "" +"Ce module s'appuie sur l'infrastructure de :mod:`asyncore`, en simplifiant " +"les clients et serveurs asynchrones et en rendant plus facile la gestion de " +"protocoles dont les éléments finissent par une chaine arbitraire, ou sont de " +"longueur variable. :mod:`asynchat` définit une classe abstraite :class:" +"`async_chat` dont vous héritez, et qui fournit des implémentations des " +"méthodes :meth:`collect_incoming_data` et :meth:`found_terminator`. Il " +"utilise la même boucle asynchrone que :mod:`asyncore`, et deux types de " +"canaux, :class:`asyncore.dispatcher` et :class:`asynchat.async_chat`, qui " +"peuvent être librement mélangés dans la carte des canaux. Habituellement, un " +"canal de serveur :class:`asyncore.dispatcher` génère de nouveaux canaux " +"d'objets :class:`asynchat.async_chat` à la réception de requêtes de " +"connexion." + +#: 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 " +"meaningful :meth:`collect_incoming_data` and :meth:`found_terminator` " +"methods. The :class:`asyncore.dispatcher` methods can be used, although not " +"all make sense in a message/response context." +msgstr "" +"Cette classe est une sous-classe abstraite de :class:`asyncore.dispatcher`. " +"Pour en faire un usage pratique, vous devez créer une classe héritant de :" +"class:`async_chat`, et implémentant des méthodes :meth:" +"`collect_incoming_data` et :meth:`found_terminator` sensées. Les méthodes " +"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: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:" +"func:`select` call. Once the polling loop has been started the :class:" +"`async_chat` object's methods are called by the event-processing framework " +"with no action on the part of the programmer." +msgstr "" +"Comme :class:`asyncore.dispatcher`, :class:`async_chat` définit un ensemble " +"d’événements générés par une analyse de l'état des interfaces de connexion " +"(*socket* en anglais) après un appel à :c:func:`select`. Une fois que la " +"boucle de scrutation (*polling* en anglais) a été lancée, les méthodes des " +"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:53 +msgid "" +"Two class attributes can be modified, to improve performance, or possibly " +"even to conserve memory." +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: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:64 +msgid "The asynchronous output buffer size (default ``4096``)." +msgstr "La taille du tampon de sorties asynchrones (``4096`` par défaut)." + +#: 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 " +"need have only one method, :meth:`more`, which should return data to be " +"transmitted on the channel. The producer indicates exhaustion (*i.e.* that " +"it contains no more data) by having its :meth:`more` method return the empty " +"bytes object. At this point the :class:`async_chat` object removes the " +"producer from the queue and starts using the next producer, if any. When the " +"producer queue is empty the :meth:`handle_write` method does nothing. You " +"use the channel object's :meth:`set_terminator` method to describe how to " +"recognize the end of, or an important breakpoint in, an incoming " +"transmission from the remote endpoint." +msgstr "" +"Contrairement à :class:`asyncore.dispatcher`, :class:`async_chat` permet de " +"définir une queue :abbr:`FIFO (first-in, first-out)` de *producteurs*. Un " +"producteur nécessite seulement une méthode, :meth:`more`, qui renvoie la " +"donnée à transmettre au canal. Le producteur indique son épuisement (*c.-à-d." +"* qu'il ne contiens plus de données) en ne retournant avec sa méthode :meth:" +"`more` l'objet bytes vide. L'objet :class:`async_chat` retire alors le " +"producteur de la queue et commence à utiliser le producteur suivant, si il y " +"en à un. Quand la queue de producteurs est vide, la méthode :meth:" +"`handle_write` ne fait rien. La méthode :meth:`set_terminator` de l'objet du " +"canal est utilisé pour décrire comment reconnaître la fin, ou la présence " +"d'un point d'arrêt, dans in transmission entrante depuis le point d’accès " +"distant." + +#: 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 " +"data that the channel receives asynchronously. The methods are described " +"below." +msgstr "" +"Pour construire une sous classe fonctionnelle de :class:`async_chat` pour " +"vos méthodes d'entrées :meth:`collect_incoming_data` et :meth:" +"`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: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." +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:93 +msgid "" +"Called with *data* holding an arbitrary amount of received data. The " +"default method, which must be overridden, raises a :exc:" +"`NotImplementedError` exception." +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:100 +msgid "" +"In emergencies this method will discard any data held in the input and/or " +"output buffers and the producer queue." +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:106 +msgid "" +"Called when the incoming data stream matches the termination condition set " +"by :meth:`set_terminator`. The default method, which must be overridden, " +"raises a :exc:`NotImplementedError` exception. The buffered input data " +"should be available via an instance attribute." +msgstr "" +"Appelée quand le flux de donné corresponds à la condition de fin décrite " +"par :meth:`set_terminator`. La méthode par défaut, qui doit être écrasée, " +"lève une :exc:`NotImplementedError`. Les données entrantes mise en tampon " +"devraient être disponible via un attribut de l'instance." + +#: library/asynchat.rst:114 +msgid "Returns the current terminator for the channel." +msgstr "Renvoie le terminateur courant pour le canal." + +#: 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, " +"although it is possible to use your own producers in more complex schemes to " +"implement encryption and chunking, for example." +msgstr "" +"Pousse *data* sur la pile du canal pour assurer sa transmission. C'est tout " +"ce dont on a besoin pour que le canal envoie des données sur le réseau. " +"Cependant, il est possible d'utiliser vos propres producteurs dans des " +"schémas plus complexes qui implémentent de la cryptographie et du *chunking* " +"par exemple." + +#: library/asynchat.rst:127 +#, fuzzy +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 " +"channel will consume this producer's data by calling its :meth:`more` method " +"and send the data to the remote endpoint." +msgstr "" +"Prends un objet producteur l'ajoute à la queue de producteurs associée au " +"canal. Quand tout les producteurs actuellement poussés ont été épuisé, le " +"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: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 " +"handle incoming protocol data." +msgstr "" +"Définit le marqueur de fin que le canal doit reconnaître. ``term`` peut être " +"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:140 +msgid "term" +msgstr "*term*" + +#: library/asynchat.rst:140 +msgid "Description" +msgstr "Description" + +#: library/asynchat.rst:142 +msgid "*string*" +msgstr "*string*" + +#: library/asynchat.rst:142 +msgid "" +"Will call :meth:`found_terminator` when the string is found in the input " +"stream" +msgstr "" +"Appellera :meth:`found_terminator` quand la chaîne est trouvée dans le flux " +"d'entré" + +#: library/asynchat.rst:145 +msgid "*integer*" +msgstr "*integer*" + +#: library/asynchat.rst:145 +msgid "" +"Will call :meth:`found_terminator` when the indicated number of characters " +"have been received" +msgstr "" +"Appellera :meth:`found_terminator` quand le nombre de caractère indiqué à " +"été reçu" + +#: library/asynchat.rst:149 +msgid "``None``" +msgstr "``None``" + +#: 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:153 +msgid "" +"Note that any data following the terminator will be available for reading by " +"the channel after :meth:`found_terminator` is called." +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:160 +msgid "asynchat Example" +msgstr "Exemple *asynchat*" + +#: 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:" +"`http_request_handler` object for each incoming client connection. Notice " +"that initially the channel terminator is set to match the blank line at the " +"end of the HTTP headers, and a flag indicates that the headers are being " +"read." +msgstr "" +"L'exemple partiel suivant montre comment des requêtes HTTP peuvent être lues " +"avec :class:`async_chat`. Un serveur web pourrait créer un objet :class:" +"`http_request_handler` pour chaque connections lient entrantes. Notez que " +"initialement, le marqueur de fin du canal est défini pour reconnaître les " +"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: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:" +"`` header is used to set a numeric terminator to read the right amount of " +"data from the channel." +msgstr "" +"Une fois que les entêtes ont été lues, si la requête est de type *POST* (ce " +"qui indique que davantage de données sont présent dans dans le flux entrant) " +"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: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 " +"any extraneous data sent by the web client are ignored. ::" +msgstr "" +"La méthode :meth:`handle_request` est appelée une fois que toutes les " +"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 new file mode 100644 index 0000000000..89a1fdec05 --- /dev/null +++ b/library/asyncio-api-index.po @@ -0,0 +1,402 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-04-05 10:05+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \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" + +#: library/asyncio-api-index.rst:6 +msgid "High-level API Index" +msgstr "" + +#: library/asyncio-api-index.rst:8 +msgid "This page lists all high-level async/await enabled asyncio APIs." +msgstr "" + +#: library/asyncio-api-index.rst:12 +msgid "Tasks" +msgstr "Tâches" + +#: library/asyncio-api-index.rst:14 +msgid "" +"Utilities to run asyncio programs, create Tasks, and await on multiple " +"things with timeouts." +msgstr "" + +#: library/asyncio-api-index.rst:21 +#, fuzzy +msgid ":func:`run`" +msgstr ":func:`round`" + +#: library/asyncio-api-index.rst:22 +msgid "Create event loop, run a coroutine, close the loop." +msgstr "" + +#: library/asyncio-api-index.rst:24 +msgid ":func:`create_task`" +msgstr ":func:`create_task`" + +#: library/asyncio-api-index.rst:25 +msgid "Start an asyncio Task." +msgstr "" + +#: library/asyncio-api-index.rst:27 +msgid "``await`` :func:`sleep`" +msgstr "" + +#: library/asyncio-api-index.rst:28 +msgid "Sleep for a number of seconds." +msgstr "" + +#: library/asyncio-api-index.rst:30 +msgid "``await`` :func:`gather`" +msgstr "" + +#: library/asyncio-api-index.rst:31 +msgid "Schedule and wait for things concurrently." +msgstr "" + +#: library/asyncio-api-index.rst:33 +msgid "``await`` :func:`wait_for`" +msgstr "" + +#: library/asyncio-api-index.rst:34 +msgid "Run with a timeout." +msgstr "" + +#: library/asyncio-api-index.rst:36 +msgid "``await`` :func:`shield`" +msgstr "" + +#: library/asyncio-api-index.rst:37 +msgid "Shield from cancellation." +msgstr "" + +#: library/asyncio-api-index.rst:39 +msgid "``await`` :func:`wait`" +msgstr "" + +#: library/asyncio-api-index.rst:40 +msgid "Monitor for completion." +msgstr "" + +#: library/asyncio-api-index.rst:42 +msgid ":func:`current_task`" +msgstr ":func:`current_task`" + +#: library/asyncio-api-index.rst:43 +msgid "Return the current Task." +msgstr "" + +#: library/asyncio-api-index.rst:45 +msgid ":func:`all_tasks`" +msgstr ":func:`all_tasks`" + +#: library/asyncio-api-index.rst:46 +msgid "Return all tasks for an event loop." +msgstr "" + +#: library/asyncio-api-index.rst:48 +msgid ":class:`Task`" +msgstr ":class:`Task`" + +#: library/asyncio-api-index.rst:49 +msgid "Task object." +msgstr "" + +#: library/asyncio-api-index.rst:51 +#, fuzzy +msgid ":func:`to_thread`" +msgstr ":func:`round`" + +#: library/asyncio-api-index.rst:52 +msgid "Asynchronously run a function in a separate OS thread." +msgstr "" + +#: library/asyncio-api-index.rst:54 +msgid ":func:`run_coroutine_threadsafe`" +msgstr ":func:`run_coroutine_threadsafe`" + +#: library/asyncio-api-index.rst:55 +msgid "Schedule a coroutine from another OS thread." +msgstr "" + +#: library/asyncio-api-index.rst:57 +msgid "``for in`` :func:`as_completed`" +msgstr "" + +#: library/asyncio-api-index.rst:58 +msgid "Monitor for completion with a ``for`` loop." +msgstr "" + +#: library/asyncio-api-index.rst:62 library/asyncio-api-index.rst:98 +#: library/asyncio-api-index.rst:122 library/asyncio-api-index.rst:158 +#: library/asyncio-api-index.rst:191 library/asyncio-api-index.rst:216 +msgid "Examples" +msgstr "Exemples" + +#: library/asyncio-api-index.rst:63 +msgid "" +":ref:`Using asyncio.gather() to run things in parallel " +"`." +msgstr "" + +#: library/asyncio-api-index.rst:66 +msgid "" +":ref:`Using asyncio.wait_for() to enforce a timeout " +"`." +msgstr "" + +#: library/asyncio-api-index.rst:69 +msgid ":ref:`Cancellation `." +msgstr "" + +#: library/asyncio-api-index.rst:71 +msgid ":ref:`Using asyncio.sleep() `." +msgstr "" + +#: library/asyncio-api-index.rst:73 +msgid "See also the main :ref:`Tasks documentation page `." +msgstr "" + +#: library/asyncio-api-index.rst:77 +msgid "Queues" +msgstr "" + +#: library/asyncio-api-index.rst:79 +msgid "" +"Queues should be used to distribute work amongst multiple asyncio Tasks, " +"implement connection pools, and pub/sub patterns." +msgstr "" + +#: library/asyncio-api-index.rst:87 +msgid ":class:`Queue`" +msgstr ":class:`Queue`" + +#: library/asyncio-api-index.rst:88 +msgid "A FIFO queue." +msgstr "" + +#: library/asyncio-api-index.rst:90 +msgid ":class:`PriorityQueue`" +msgstr ":class:`PriorityQueue`" + +#: library/asyncio-api-index.rst:91 +msgid "A priority queue." +msgstr "" + +#: library/asyncio-api-index.rst:93 +msgid ":class:`LifoQueue`" +msgstr ":class:`LifoQueue`" + +#: library/asyncio-api-index.rst:94 +msgid "A LIFO queue." +msgstr "" + +#: library/asyncio-api-index.rst:99 +msgid "" +":ref:`Using asyncio.Queue to distribute workload between several Tasks " +"`." +msgstr "" + +#: library/asyncio-api-index.rst:102 +msgid "See also the :ref:`Queues documentation page `." +msgstr "" + +#: library/asyncio-api-index.rst:106 +msgid "Subprocesses" +msgstr "Sous-processus" + +#: library/asyncio-api-index.rst:108 +msgid "Utilities to spawn subprocesses and run shell commands." +msgstr "" + +#: library/asyncio-api-index.rst:114 +msgid "``await`` :func:`create_subprocess_exec`" +msgstr "" + +#: library/asyncio-api-index.rst:115 +msgid "Create a subprocess." +msgstr "Crée un sous-processus." + +#: library/asyncio-api-index.rst:117 +msgid "``await`` :func:`create_subprocess_shell`" +msgstr "" + +#: library/asyncio-api-index.rst:118 +msgid "Run a shell command." +msgstr "" + +#: library/asyncio-api-index.rst:123 +msgid ":ref:`Executing a shell command `." +msgstr "" + +#: library/asyncio-api-index.rst:125 +msgid "See also the :ref:`subprocess APIs ` documentation." +msgstr "" + +#: library/asyncio-api-index.rst:130 +msgid "Streams" +msgstr "Streams" + +#: library/asyncio-api-index.rst:132 +msgid "High-level APIs to work with network IO." +msgstr "" + +#: library/asyncio-api-index.rst:138 +msgid "``await`` :func:`open_connection`" +msgstr "" + +#: library/asyncio-api-index.rst:139 +msgid "Establish a TCP connection." +msgstr "" + +#: library/asyncio-api-index.rst:141 +msgid "``await`` :func:`open_unix_connection`" +msgstr "" + +#: library/asyncio-api-index.rst:142 +msgid "Establish a Unix socket connection." +msgstr "" + +#: library/asyncio-api-index.rst:144 +msgid "``await`` :func:`start_server`" +msgstr "" + +#: library/asyncio-api-index.rst:145 +msgid "Start a TCP server." +msgstr "" + +#: library/asyncio-api-index.rst:147 +msgid "``await`` :func:`start_unix_server`" +msgstr "" + +#: library/asyncio-api-index.rst:148 +msgid "Start a Unix socket server." +msgstr "" + +#: library/asyncio-api-index.rst:150 +msgid ":class:`StreamReader`" +msgstr ":class:`StreamReader`" + +#: library/asyncio-api-index.rst:151 +msgid "High-level async/await object to receive network data." +msgstr "" + +#: library/asyncio-api-index.rst:153 +msgid ":class:`StreamWriter`" +msgstr ":class:`StreamWriter`" + +#: library/asyncio-api-index.rst:154 +msgid "High-level async/await object to send network data." +msgstr "" + +#: library/asyncio-api-index.rst:159 +msgid ":ref:`Example TCP client `." +msgstr "" + +#: library/asyncio-api-index.rst:161 +msgid "See also the :ref:`streams APIs ` documentation." +msgstr "" + +#: library/asyncio-api-index.rst:166 +msgid "Synchronization" +msgstr "" + +#: library/asyncio-api-index.rst:168 +msgid "Threading-like synchronization primitives that can be used in Tasks." +msgstr "" + +#: library/asyncio-api-index.rst:174 +msgid ":class:`Lock`" +msgstr ":class:`Lock`" + +#: library/asyncio-api-index.rst:175 +msgid "A mutex lock." +msgstr "" + +#: library/asyncio-api-index.rst:177 +msgid ":class:`Event`" +msgstr ":class:`Event`" + +#: library/asyncio-api-index.rst:178 +msgid "An event object." +msgstr "" + +#: library/asyncio-api-index.rst:180 +msgid ":class:`Condition`" +msgstr ":class:`Condition`" + +#: library/asyncio-api-index.rst:181 +msgid "A condition object." +msgstr "" + +#: library/asyncio-api-index.rst:183 +msgid ":class:`Semaphore`" +msgstr ":class:`Semaphore`" + +#: library/asyncio-api-index.rst:184 +msgid "A semaphore." +msgstr "" + +#: library/asyncio-api-index.rst:186 +msgid ":class:`BoundedSemaphore`" +msgstr ":class:`BoundedSemaphore`" + +#: library/asyncio-api-index.rst:187 +msgid "A bounded semaphore." +msgstr "" + +#: library/asyncio-api-index.rst:192 +msgid ":ref:`Using asyncio.Event `." +msgstr "" + +#: library/asyncio-api-index.rst:194 +msgid "" +"See also the documentation of asyncio :ref:`synchronization primitives " +"`." +msgstr "" + +#: library/asyncio-api-index.rst:199 +msgid "Exceptions" +msgstr "Exceptions" + +#: library/asyncio-api-index.rst:206 +msgid ":exc:`asyncio.TimeoutError`" +msgstr ":exc:`asyncio.TimeoutError`" + +#: library/asyncio-api-index.rst:207 +msgid "" +"Raised on timeout by functions like :func:`wait_for`. Keep in mind that " +"``asyncio.TimeoutError`` is **unrelated** to the built-in :exc:" +"`TimeoutError` exception." +msgstr "" + +#: library/asyncio-api-index.rst:211 +msgid ":exc:`asyncio.CancelledError`" +msgstr ":exc:`asyncio.CancelledError`" + +#: library/asyncio-api-index.rst:212 +msgid "Raised when a Task is cancelled. See also :meth:`Task.cancel`." +msgstr "" + +#: library/asyncio-api-index.rst:217 +msgid "" +":ref:`Handling CancelledError to run code on cancellation request " +"`." +msgstr "" + +#: library/asyncio-api-index.rst:220 +msgid "" +"See also the full list of :ref:`asyncio-specific exceptions `." +msgstr "" diff --git a/library/asyncio-dev.po b/library/asyncio-dev.po new file mode 100644 index 0000000000..c630bbfc85 --- /dev/null +++ b/library/asyncio-dev.po @@ -0,0 +1,351 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-18 15:46+0200\n" +"PO-Revision-Date: 2022-06-06 21:29-0400\n" +"Last-Translator: Nicolas Haller \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 3.0.1\n" + +#: library/asyncio-dev.rst:7 +msgid "Developing with asyncio" +msgstr "Programmer avec *asyncio*" + +#: library/asyncio-dev.rst:9 +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 "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 "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 "en passant ``debug=True`` à la fonction :func:`asyncio.run` ;" + +#: library/asyncio-dev.rst:32 +msgid "Calling :meth:`loop.set_debug`." +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 "En plus d'activer le mode débogage, vous pouvez également :" + +#: library/asyncio-dev.rst:36 +msgid "" +"setting the log level of the :ref:`asyncio logger ` to :py:" +"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 "" +"configuring the :mod:`warnings` module to display :exc:`ResourceWarning` " +"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 "Lorsque le mode débogage est activé :" + +# long ref +#: library/asyncio-dev.rst:49 +msgid "" +"asyncio checks for :ref:`coroutines that were not awaited ` 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 » ;" + +# thread safe comment traduire +#: library/asyncio-dev.rst:53 +msgid "" +"Many non-threadsafe asyncio APIs (such as :meth:`loop.call_soon` and :meth:" +"`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 "" +"Callbacks taking longer than 100ms are logged. The :attr:`loop." +"slow_callback_duration` attribute can be used to set the minimum execution " +"duration in seconds that is considered \"slow\"." +msgstr "" +"les fonctions de rappel prenant plus de 100 ms sont journalisées ; " +"l'attribut :attr:`loop.slow_callback_duration` peut être utilisé pour " +"changer la limite (en secondes) après laquelle une fonction de rappel est " +"considérée comme « lent »." + +#: library/asyncio-dev.rst:68 +msgid "Concurrency and Multithreading" +msgstr "Programmation concurrente et multi-fils" + +#: library/asyncio-dev.rst:70 +msgid "" +"An event loop runs in a thread (typically the main thread) and executes all " +"callbacks and Tasks in its thread. While a Task is running in the event " +"loop, no other Tasks can run in the same thread. When a Task executes an " +"``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 "" +"Almost all asyncio objects are not thread safe, which is typically not a " +"problem unless there is code that works with them from outside of a Task or " +"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 "" +"To schedule a coroutine object from a different OS thread, the :func:" +"`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 "" +"The :meth:`loop.run_in_executor` method can be used with a :class:" +"`concurrent.futures.ThreadPoolExecutor` to execute blocking code in a " +"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 +#, fuzzy +msgid "" +"There is currently no way to schedule coroutines or callbacks directly from " +"a different process (such as one started with :mod:`multiprocessing`). The :" +"ref:`asyncio-event-loop-methods` section lists APIs that can read from pipes " +"and watch file descriptors without blocking the event loop. In addition, " +"asyncio's :ref:`Subprocess ` APIs provide a way to start " +"a process and communicate with it from the event loop. Lastly, the " +"aforementioned :meth:`loop.run_in_executor` method can also be used with a :" +"class:`concurrent.futures.ProcessPoolExecutor` to execute code in a " +"different process." +msgstr "" +"Il n'y a actuellement aucune façon de planifier des coroutines ou des " +"rappels directement depuis un autre processus (comme, par exemple, un " +"processus démarré avec :mod:`multiprocessing`). La section :ref:`Méthodes de " +"la boucle d'évènements ` liste les *API* pouvant lire " +"les tubes (*pipes*) et surveiller les descripteurs de fichiers sans bloquer " +"la boucle d'évènements. De plus, les *API* :ref:`Subprocess ` d'*asyncio* fournissent un moyen de démarrer un processus et de " +"communiquer avec lui depuis la boucle d'évènements. Enfin, la méthode :meth:" +"`loop.run_in_executor` peut également être utilisée avec :class:`concurrent." +"futures.ProcessPoolExecutor` pour exécuter du code dans un processus " +"différent." + +#: library/asyncio-dev.rst:124 +msgid "Running Blocking Code" +msgstr "Exécution de code bloquant" + +#: library/asyncio-dev.rst:126 +msgid "" +"Blocking (CPU-bound) code should not be called directly. For example, if a " +"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 "" +"An executor can be used to run a task in a different thread or even in a " +"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" +msgstr "Journalisation" + +#: library/asyncio-dev.rst:142 +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:151 +msgid "" +"Network logging can block the event loop. It is recommended to use a " +"separate thread for handling logs or use non-blocking IO. For example, see :" +"ref:`blocking-handlers`." +msgstr "" + +#: library/asyncio-dev.rst:159 +msgid "Detect never-awaited coroutines" +msgstr "Détection des coroutines jamais attendues" + +#: library/asyncio-dev.rst:161 +msgid "" +"When a coroutine function is called, but not awaited (e.g. ``coro()`` " +"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:221 +msgid "Output::" +msgstr "Sortie ::" + +#: library/asyncio-dev.rst:237 +msgid "Output in debug mode::" +msgstr "Affichage en mode débogage ::" + +#: library/asyncio-dev.rst:194 +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:202 +msgid "Detect never-retrieved exceptions" +msgstr "Détection des exceptions jamais récupérées" + +#: library/asyncio-dev.rst:204 +msgid "" +"If a :meth:`Future.set_exception` is called but the Future object is never " +"awaited on, the exception would never be propagated to the user code. In " +"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:209 +msgid "Example of an unhandled exception::" +msgstr "Exemple d'une exception non-gérée ::" + +#: library/asyncio-dev.rst:232 +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 new file mode 100644 index 0000000000..4d1b6dd917 --- /dev/null +++ b/library/asyncio-eventloop.po @@ -0,0 +1,2074 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-22 22:57+0100\n" +"PO-Revision-Date: 2019-06-10 15:50+0200\n" +"Last-Translator: Julien Palard \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" + +#: library/asyncio-eventloop.rst:8 +msgid "Event Loop" +msgstr "Boucle d'évènements" + +#: library/asyncio-eventloop.rst:10 +msgid "" +"**Source code:** :source:`Lib/asyncio/events.py`, :source:`Lib/asyncio/" +"base_events.py`" +msgstr "" + +#: library/asyncio-eventloop.rst:16 +msgid "Preface" +msgstr "" + +#: library/asyncio-eventloop.rst:17 +msgid "" +"The event loop is the core of every asyncio application. Event loops run " +"asynchronous tasks and callbacks, perform network IO operations, and run " +"subprocesses." +msgstr "" + +#: library/asyncio-eventloop.rst:21 +msgid "" +"Application developers should typically use the high-level asyncio " +"functions, such as :func:`asyncio.run`, and should rarely need to reference " +"the loop object or call its methods. This section is intended mostly for " +"authors of lower-level code, libraries, and frameworks, who need finer " +"control over the event loop behavior." +msgstr "" + +#: library/asyncio-eventloop.rst:28 +msgid "Obtaining the Event Loop" +msgstr "Obtenir une boucle d'évènements" + +#: library/asyncio-eventloop.rst:29 +msgid "" +"The following low-level functions can be used to get, set, or create an " +"event loop:" +msgstr "" + +#: library/asyncio-eventloop.rst:34 +msgid "Return the running event loop in the current OS thread." +msgstr "" + +#: library/asyncio-eventloop.rst:36 +msgid "Raise a :exc:`RuntimeError` if there is no running event loop." +msgstr "" + +#: library/asyncio-eventloop.rst:38 +msgid "This function can only be called from a coroutine or a callback." +msgstr "" + +#: library/asyncio-eventloop.rst:44 +#, fuzzy +msgid "Get the current event loop." +msgstr "Arrête l'exécution de la boucle d'évènements." + +#: library/asyncio-eventloop.rst:46 +msgid "" +"When called from a coroutine or a callback (e.g. scheduled with call_soon or " +"similar API), this function will always return the running event loop." +msgstr "" + +#: library/asyncio-eventloop.rst:50 +msgid "" +"If there is no running event loop set, the function will return the result " +"of the ``get_event_loop_policy().get_event_loop()`` call." +msgstr "" + +#: library/asyncio-eventloop.rst:53 +msgid "" +"Because this function has rather complex behavior (especially when custom " +"event loop policies are in use), using the :func:`get_running_loop` function " +"is preferred to :func:`get_event_loop` in coroutines and callbacks." +msgstr "" + +#: library/asyncio-eventloop.rst:58 +msgid "" +"As noted above, consider using the higher-level :func:`asyncio.run` " +"function, instead of using these lower level functions to manually create " +"and close an event loop." +msgstr "" + +#: library/asyncio-eventloop.rst:63 +msgid "" +"In Python versions 3.10.0--3.10.8 and 3.11.0 this function (and other " +"functions which use it implicitly) emitted a :exc:`DeprecationWarning` if " +"there was no running event loop, even if the current loop was set on the " +"policy. In Python versions 3.10.9, 3.11.1 and 3.12 they emit a :exc:" +"`DeprecationWarning` if there is no running event loop and no current loop " +"is set. In some future Python release this will become an error." +msgstr "" + +#: library/asyncio-eventloop.rst:74 +#, fuzzy +msgid "Set *loop* as the current event loop for the current OS thread." +msgstr "" +"Appelle le gestionnaire d'exception de la boucle d'évènements actuelle." + +#: library/asyncio-eventloop.rst:78 +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:80 +msgid "" +"Note that the behaviour of :func:`get_event_loop`, :func:`set_event_loop`, " +"and :func:`new_event_loop` functions can be altered by :ref:`setting a " +"custom event loop policy `." +msgstr "" + +#: library/asyncio-eventloop.rst:86 +msgid "Contents" +msgstr "Sommaire" + +#: library/asyncio-eventloop.rst:87 +msgid "This documentation page contains the following sections:" +msgstr "" + +#: library/asyncio-eventloop.rst:89 +msgid "" +"The `Event Loop Methods`_ section is the reference documentation of the " +"event loop APIs;" +msgstr "" + +#: library/asyncio-eventloop.rst:92 +msgid "" +"The `Callback Handles`_ section documents the :class:`Handle` and :class:" +"`TimerHandle` instances which are returned from scheduling methods such as :" +"meth:`loop.call_soon` and :meth:`loop.call_later`;" +msgstr "" + +#: library/asyncio-eventloop.rst:96 +msgid "" +"The `Server Objects`_ section documents types returned from event loop " +"methods like :meth:`loop.create_server`;" +msgstr "" + +#: library/asyncio-eventloop.rst:99 +msgid "" +"The `Event Loop Implementations`_ section documents the :class:" +"`SelectorEventLoop` and :class:`ProactorEventLoop` classes;" +msgstr "" + +#: library/asyncio-eventloop.rst:102 +msgid "" +"The `Examples`_ section showcases how to work with some event loop APIs." +msgstr "" + +#: library/asyncio-eventloop.rst:109 +msgid "Event Loop Methods" +msgstr "Méthodes de la boucle d'évènements" + +#: library/asyncio-eventloop.rst:111 +msgid "Event loops have **low-level** APIs for the following:" +msgstr "" + +#: library/asyncio-eventloop.rst:119 +msgid "Running and stopping the loop" +msgstr "Démarrer et arrêter une boucle d'évènements" + +#: library/asyncio-eventloop.rst:123 +msgid "Run until the *future* (an instance of :class:`Future`) has completed." +msgstr "" +"Lance la boucle jusqu'à ce que *future* (une instance de :class:`Future`) " +"soit terminée." + +#: library/asyncio-eventloop.rst:126 +msgid "" +"If the argument is a :ref:`coroutine object ` it is implicitly " +"scheduled to run as a :class:`asyncio.Task`." +msgstr "" + +#: library/asyncio-eventloop.rst:129 +msgid "Return the Future's result or raise its exception." +msgstr "" + +#: library/asyncio-eventloop.rst:133 +msgid "Run the event loop until :meth:`stop` is called." +msgstr "" + +#: library/asyncio-eventloop.rst:135 +msgid "" +"If :meth:`stop` is called before :meth:`run_forever()` is called, the loop " +"will poll the I/O selector once with a timeout of zero, run all callbacks " +"scheduled in response to I/O events (and those that were already scheduled), " +"and then exit." +msgstr "" + +#: library/asyncio-eventloop.rst:140 +msgid "" +"If :meth:`stop` is called while :meth:`run_forever` is running, the loop " +"will run the current batch of callbacks and then exit. Note that new " +"callbacks scheduled by callbacks will not run in this case; instead, they " +"will run the next time :meth:`run_forever` or :meth:`run_until_complete` is " +"called." +msgstr "" + +#: library/asyncio-eventloop.rst:148 +msgid "Stop the event loop." +msgstr "Arrête l'exécution de la boucle d'évènements." + +#: library/asyncio-eventloop.rst:152 +msgid "Return ``True`` if the event loop is currently running." +msgstr "Renvoie ``True`` si la boucle d'évènements est démarrée." + +#: library/asyncio-eventloop.rst:156 +msgid "Return ``True`` if the event loop was closed." +msgstr "Renvoie ``True`` si la boucle d'évènements est arrêtée." + +#: library/asyncio-eventloop.rst:160 +msgid "Close the event loop." +msgstr "Arrête la boucle d'évènements." + +#: library/asyncio-eventloop.rst:162 +msgid "" +"The loop must not be running when this function is called. Any pending " +"callbacks will be discarded." +msgstr "" + +#: library/asyncio-eventloop.rst:165 +msgid "" +"This method clears all queues and shuts down the executor, but does not wait " +"for the executor to finish." +msgstr "" + +#: library/asyncio-eventloop.rst:168 +msgid "" +"This method is idempotent and irreversible. No other methods should be " +"called after the event loop is closed." +msgstr "" + +#: library/asyncio-eventloop.rst:173 +msgid "" +"Schedule all currently open :term:`asynchronous generator` objects to close " +"with an :meth:`~agen.aclose()` call. After calling this method, the event " +"loop will issue a warning if a new asynchronous generator is iterated. This " +"should be used to reliably finalize all scheduled asynchronous generators." +msgstr "" + +#: library/asyncio-eventloop.rst:179 +msgid "" +"Note that there is no need to call this function when :func:`asyncio.run` is " +"used." +msgstr "" + +#: library/asyncio-eventloop.rst:182 library/asyncio-eventloop.rst:1124 +#: library/asyncio-eventloop.rst:1516 +msgid "Example::" +msgstr "Exemple ::" + +#: library/asyncio-eventloop.rst:194 +msgid "" +"Schedule the closure of the default executor and wait for it to join all of " +"the threads in the :class:`~concurrent.futures.ThreadPoolExecutor`. Once " +"this method has been called, using the default executor with :meth:`loop." +"run_in_executor` will raise a :exc:`RuntimeError`." +msgstr "" + +#: library/asyncio-eventloop.rst:202 +msgid "" +"Do not call this method when using :func:`asyncio.run`, as the latter " +"handles default executor shutdown automatically." +msgstr "" + +#: library/asyncio-eventloop.rst:209 +msgid "Scheduling callbacks" +msgstr "" + +#: library/asyncio-eventloop.rst:213 +msgid "" +"Schedule the *callback* :term:`callback` to be called with *args* arguments " +"at the next iteration of the event loop." +msgstr "" + +#: library/asyncio-eventloop.rst:216 +msgid "" +"Return an instance of :class:`asyncio.Handle`, which can be used later to " +"cancel the callback." +msgstr "" + +#: library/asyncio-eventloop.rst:219 +msgid "" +"Callbacks are called in the order in which they are registered. Each " +"callback will be called exactly once." +msgstr "" + +#: library/asyncio-eventloop.rst:222 +#, fuzzy +msgid "" +"The optional keyword-only *context* argument specifies a custom :class:" +"`contextvars.Context` for the *callback* to run in. Callbacks use the " +"current context 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:226 +msgid "Unlike :meth:`call_soon_threadsafe`, this method is not thread-safe." +msgstr "" + +#: library/asyncio-eventloop.rst:230 +msgid "" +"A thread-safe variant of :meth:`call_soon`. When scheduling callbacks from " +"another thread, this function *must* be used, since :meth:`call_soon` is not " +"thread-safe." +msgstr "" + +#: library/asyncio-eventloop.rst:234 +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:238 +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:241 library/asyncio-eventloop.rst:291 +#: library/asyncio-eventloop.rst:311 +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:249 +msgid "" +"Most :mod:`asyncio` scheduling functions don't allow passing keyword " +"arguments. To do that, use :func:`functools.partial`::" +msgstr "" + +#: library/asyncio-eventloop.rst:256 +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:264 +msgid "Scheduling delayed callbacks" +msgstr "" + +#: library/asyncio-eventloop.rst:266 +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:273 +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:276 library/asyncio-eventloop.rst:308 +msgid "" +"An instance of :class:`asyncio.TimerHandle` is returned which can be used to " +"cancel the callback." +msgstr "" + +#: library/asyncio-eventloop.rst:279 +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:283 +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:287 +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:295 +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:302 +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:306 +msgid "This method's behavior is the same as :meth:`call_later`." +msgstr "" + +#: library/asyncio-eventloop.rst:315 +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:322 +msgid "" +"Return the current time, as a :class:`float` value, according to the event " +"loop's internal monotonic clock." +msgstr "" + +#: library/asyncio-eventloop.rst:326 +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:332 +msgid "The :func:`asyncio.sleep` function." +msgstr "La fonction :func:`asyncio.sleep`." + +#: library/asyncio-eventloop.rst:336 +msgid "Creating Futures and Tasks" +msgstr "" + +#: library/asyncio-eventloop.rst:340 +msgid "Create an :class:`asyncio.Future` object attached to the event loop." +msgstr "" + +#: library/asyncio-eventloop.rst:342 +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:350 +msgid "" +"Schedule the execution of :ref:`coroutine ` *coro*. Return a :" +"class:`Task` object." +msgstr "" + +#: library/asyncio-eventloop.rst:353 +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:357 +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:360 +#, fuzzy +msgid "Added the *name* parameter." +msgstr "ajout du paramètre ``name``." + +#: library/asyncio-eventloop.rst:365 +msgid "Set a task factory that will be used by :meth:`loop.create_task`." +msgstr "" + +#: library/asyncio-eventloop.rst:368 +msgid "" +"If *factory* is ``None`` the default task factory will be set. Otherwise, " +"*factory* must be a *callable* with the signature matching ``(loop, coro)``, " +"where *loop* is a reference to the active event loop, and *coro* is a " +"coroutine object. The callable must return a :class:`asyncio.Future`-" +"compatible object." +msgstr "" + +#: library/asyncio-eventloop.rst:376 +msgid "Return a task factory or ``None`` if the default one is in use." +msgstr "" + +#: library/asyncio-eventloop.rst:380 +msgid "Opening network connections" +msgstr "Créer des connexions" + +#: library/asyncio-eventloop.rst:389 +msgid "" +"Open a streaming transport connection to a given address specified by *host* " +"and *port*." +msgstr "" + +#: library/asyncio-eventloop.rst:392 +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:396 +msgid "The socket type will be :py:data:`~socket.SOCK_STREAM`." +msgstr "" + +#: library/asyncio-eventloop.rst:398 library/asyncio-eventloop.rst:1040 +#: library/asyncio-eventloop.rst:1056 +msgid "" +"*protocol_factory* must be a callable returning an :ref:`asyncio protocol " +"` implementation." +msgstr "" + +#: library/asyncio-eventloop.rst:401 +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:404 +msgid "The chronological synopsis of the underlying operation is as follows:" +msgstr "" + +#: library/asyncio-eventloop.rst:406 +msgid "" +"The connection is established and a :ref:`transport ` is " +"created for it." +msgstr "" + +#: library/asyncio-eventloop.rst:409 +msgid "" +"*protocol_factory* is called without arguments and is expected to return a :" +"ref:`protocol ` instance." +msgstr "" + +#: library/asyncio-eventloop.rst:412 +msgid "" +"The protocol instance is coupled with the transport by calling its :meth:" +"`~BaseProtocol.connection_made` method." +msgstr "" + +#: library/asyncio-eventloop.rst:415 +msgid "A ``(transport, protocol)`` tuple is returned on success." +msgstr "" + +#: library/asyncio-eventloop.rst:417 +msgid "" +"The created transport is an implementation-dependent bidirectional stream." +msgstr "" + +#: library/asyncio-eventloop.rst:420 library/asyncio-eventloop.rst:548 +msgid "Other arguments:" +msgstr "" + +#: library/asyncio-eventloop.rst:422 +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` " +"object, this context is used to create the transport; if *ssl* is :const:" +"`True`, a default context returned from :func:`ssl.create_default_context` " +"is used." +msgstr "" + +#: library/asyncio-eventloop.rst:428 +msgid ":ref:`SSL/TLS security considerations `" +msgstr "" + +#: library/asyncio-eventloop.rst:430 +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 " +"``None``. By default the value of the *host* argument is used. If *host* " +"is empty, there is no default and you must pass a value for " +"*server_hostname*. If *server_hostname* is an empty string, hostname " +"matching is disabled (which is a serious security risk, allowing for " +"potential man-in-the-middle attacks)." +msgstr "" + +#: library/asyncio-eventloop.rst:438 +msgid "" +"*family*, *proto*, *flags* are the optional address family, protocol and " +"flags to be passed through to getaddrinfo() for *host* resolution. If given, " +"these should all be integers from the corresponding :mod:`socket` module " +"constants." +msgstr "" + +#: library/asyncio-eventloop.rst:443 +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)." +msgstr "" + +#: library/asyncio-eventloop.rst:451 +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." +msgstr "" + +#: library/asyncio-eventloop.rst:460 +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 " +"*host*, *port*, *family*, *proto*, *flags*, *happy_eyeballs_delay*, " +"*interleave* and *local_addr* should be specified." +msgstr "" + +#: library/asyncio-eventloop.rst:468 library/asyncio-eventloop.rst:579 +#: library/asyncio-eventloop.rst:765 +msgid "" +"The *sock* argument transfers ownership of the socket to the transport " +"created. To close the socket, call the transport's :meth:`~asyncio." +"BaseTransport.close` method." +msgstr "" + +#: library/asyncio-eventloop.rst:472 +msgid "" +"*local_addr*, if given, is a ``(local_host, local_port)`` tuple used to bind " +"the socket locally. The *local_host* and *local_port* are looked up using " +"``getaddrinfo()``, similarly to *host* and *port*." +msgstr "" + +#: library/asyncio-eventloop.rst:476 library/asyncio-eventloop.rst:847 +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:482 library/asyncio-eventloop.rst:706 +msgid "Added support for SSL/TLS in :class:`ProactorEventLoop`." +msgstr "" + +#: library/asyncio-eventloop.rst:486 +msgid "" +"The socket option :py:data:`~socket.TCP_NODELAY` is set by default for all " +"TCP connections." +msgstr "" + +#: library/asyncio-eventloop.rst:491 library/asyncio-eventloop.rst:782 +#, fuzzy +msgid "Added the *ssl_handshake_timeout* parameter." +msgstr "ajout du paramètre ``name``." + +#: library/asyncio-eventloop.rst:495 +msgid "Added the *happy_eyeballs_delay* and *interleave* parameters." +msgstr "" + +#: library/asyncio-eventloop.rst:497 +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 " +"are not working, a dual-stack client application experiences significant " +"connection delay compared to an IPv4-only client. This is undesirable " +"because it causes the dual-stack client to have a worse user experience. " +"This document specifies requirements for algorithms that reduce this user-" +"visible delay and provides an algorithm." +msgstr "" + +#: library/asyncio-eventloop.rst:506 +msgid "For more information: https://tools.ietf.org/html/rfc6555" +msgstr "" + +#: library/asyncio-eventloop.rst:510 +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:521 +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:525 +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:529 +msgid "" +"For supported platforms, *reuse_port* can be used as a replacement for " +"similar functionality. With *reuse_port*, :py:data:`~sockets.SO_REUSEPORT` " +"is used instead, which specifically prevents processes with differing UIDs " +"from assigning sockets to the same socket address." +msgstr "" + +#: library/asyncio-eventloop.rst:535 +msgid "Create a datagram connection." +msgstr "Créer une connexion par datagramme" + +#: library/asyncio-eventloop.rst:537 +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:541 +msgid "The socket type will be :py:data:`~socket.SOCK_DGRAM`." +msgstr "" + +#: library/asyncio-eventloop.rst:543 library/asyncio-eventloop.rst:641 +#: library/asyncio-eventloop.rst:757 +msgid "" +"*protocol_factory* must be a callable returning a :ref:`protocol ` implementation." +msgstr "" + +#: library/asyncio-eventloop.rst:546 library/asyncio-eventloop.rst:606 +msgid "A tuple of ``(transport, protocol)`` is returned on success." +msgstr "" + +#: library/asyncio-eventloop.rst:550 +msgid "" +"*local_addr*, if given, is a ``(local_host, local_port)`` tuple used to bind " +"the socket locally. The *local_host* and *local_port* are looked up using :" +"meth:`getaddrinfo`." +msgstr "" + +#: library/asyncio-eventloop.rst:554 +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:558 +msgid "" +"*family*, *proto*, *flags* are the optional address family, protocol and " +"flags to be passed through to :meth:`getaddrinfo` for *host* resolution. If " +"given, these should all be integers from the corresponding :mod:`socket` " +"module constants." +msgstr "" + +#: library/asyncio-eventloop.rst:563 +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 and some " +"Unixes. If the :py:data:`~socket.SO_REUSEPORT` constant is not defined then " +"this capability is unsupported." +msgstr "" + +#: library/asyncio-eventloop.rst:569 +msgid "" +"*allow_broadcast* tells the kernel to allow this endpoint to send messages " +"to the broadcast address." +msgstr "" + +#: library/asyncio-eventloop.rst:572 +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 " +"specified, *local_addr* and *remote_addr* should be omitted (must be :const:" +"`None`)." +msgstr "" + +#: library/asyncio-eventloop.rst:583 +msgid "" +"See :ref:`UDP echo client protocol ` and :" +"ref:`UDP echo server protocol ` examples." +msgstr "" + +#: library/asyncio-eventloop.rst:586 +msgid "" +"The *family*, *proto*, *flags*, *reuse_address*, *reuse_port, " +"*allow_broadcast*, and *sock* parameters were added." +msgstr "" + +#: library/asyncio-eventloop.rst:590 +msgid "" +"The *reuse_address* parameter is no longer supported due to security " +"concerns." +msgstr "" + +#: library/asyncio-eventloop.rst:594 +msgid "Added support for Windows." +msgstr "Prise en charge sur Windows." + +#: library/asyncio-eventloop.rst:601 +msgid "Create a Unix connection." +msgstr "Créer une connexion Unix" + +#: library/asyncio-eventloop.rst:603 +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:608 +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:613 +msgid "" +"See the documentation of the :meth:`loop.create_connection` method for " +"information about arguments to this method." +msgstr "" + +#: library/asyncio-eventloop.rst:617 library/asyncio-eventloop.rst:741 +#: library/asyncio-eventloop.rst:1107 +msgid ":ref:`Availability `: Unix." +msgstr ":ref:`Disponibilité ` : Unix." + +#: library/asyncio-eventloop.rst:618 +msgid "" +"Added the *ssl_handshake_timeout* parameter. The *path* parameter can now be " +"a :term:`path-like object`." +msgstr "" + +#: library/asyncio-eventloop.rst:624 +msgid "Creating network servers" +msgstr "Créer des serveurs" + +#: library/asyncio-eventloop.rst:634 +msgid "" +"Create a TCP server (socket type :data:`~socket.SOCK_STREAM`) listening on " +"*port* of the *host* address." +msgstr "" + +#: library/asyncio-eventloop.rst:637 +msgid "Returns a :class:`Server` object." +msgstr "" + +#: library/asyncio-eventloop.rst:639 +#, fuzzy +msgid "Arguments:" +msgstr "Arguments" + +#: library/asyncio-eventloop.rst:644 +msgid "" +"The *host* parameter can be set to several types which determine where the " +"server would be listening:" +msgstr "" + +#: library/asyncio-eventloop.rst:647 +msgid "" +"If *host* is a string, the TCP server is bound to a single network interface " +"specified by *host*." +msgstr "" + +#: library/asyncio-eventloop.rst:650 +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:653 +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:657 +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:662 +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:667 +msgid "*flags* is a bitmask for :meth:`getaddrinfo`." +msgstr "*flags* est un masque de bits pour :meth:`getaddrinfo`." + +#: library/asyncio-eventloop.rst:669 +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:674 +msgid "" +"The *sock* argument transfers ownership of the socket to the server created. " +"To close the socket, call the server's :meth:`~asyncio.Server.close` method." +msgstr "" + +#: library/asyncio-eventloop.rst:678 +msgid "" +"*backlog* is the maximum number of queued connections passed to :meth:" +"`~socket.socket.listen` (defaults to 100)." +msgstr "" + +#: library/asyncio-eventloop.rst:681 +msgid "" +"*ssl* can be set to an :class:`~ssl.SSLContext` instance to enable TLS over " +"the accepted connections." +msgstr "" + +#: library/asyncio-eventloop.rst:684 +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:689 +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:694 +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:698 +msgid "" +"*start_serving* set to ``True`` (the default) causes the created server to " +"start accepting connections immediately. When set to ``False``, the user " +"should await on :meth:`Server.start_serving` or :meth:`Server.serve_forever` " +"to make the server to start accepting connections." +msgstr "" + +#: library/asyncio-eventloop.rst:710 +msgid "The *host* parameter can be a sequence of strings." +msgstr "" + +#: library/asyncio-eventloop.rst:714 +msgid "" +"Added *ssl_handshake_timeout* and *start_serving* parameters. The socket " +"option :py:data:`~socket.TCP_NODELAY` is set by default for all TCP " +"connections." +msgstr "" + +#: library/asyncio-eventloop.rst:720 +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:729 +msgid "" +"Similar to :meth:`loop.create_server` but works with the :py:data:`~socket." +"AF_UNIX` socket family." +msgstr "" + +#: library/asyncio-eventloop.rst:732 +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:737 +msgid "" +"See the documentation of the :meth:`loop.create_server` method for " +"information about arguments to this method." +msgstr "" + +#: library/asyncio-eventloop.rst:744 +msgid "" +"Added the *ssl_handshake_timeout* and *start_serving* parameters. The *path* " +"parameter can now be a :class:`~pathlib.Path` object." +msgstr "" + +#: library/asyncio-eventloop.rst:750 +msgid "Wrap an already accepted connection into a transport/protocol pair." +msgstr "" + +#: library/asyncio-eventloop.rst:752 +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:755 library/asyncio-eventloop.rst:833 +msgid "Parameters:" +msgstr "Paramètres :" + +#: library/asyncio-eventloop.rst:760 +msgid "" +"*sock* is a preexisting socket object returned from :meth:`socket.accept " +"`." +msgstr "" + +#: library/asyncio-eventloop.rst:769 +msgid "" +"*ssl* can be set to an :class:`~ssl.SSLContext` to enable SSL over the " +"accepted connections." +msgstr "" + +#: library/asyncio-eventloop.rst:772 +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:776 +msgid "Returns a ``(transport, protocol)`` pair." +msgstr "" + +#: library/asyncio-eventloop.rst:786 +msgid "Transferring files" +msgstr "" + +#: library/asyncio-eventloop.rst:791 +msgid "" +"Send a *file* over a *transport*. Return the total number of bytes sent." +msgstr "" + +#: library/asyncio-eventloop.rst:794 +msgid "The method uses high-performance :meth:`os.sendfile` if available." +msgstr "" + +#: library/asyncio-eventloop.rst:796 +msgid "*file* must be a regular file object opened in binary mode." +msgstr "" + +#: library/asyncio-eventloop.rst:798 library/asyncio-eventloop.rst:995 +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 " +"until EOF is reached. File position is always updated, even when this method " +"raises an error, and :meth:`file.tell() ` can be used to " +"obtain the actual number of bytes sent." +msgstr "" + +#: library/asyncio-eventloop.rst:805 +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:809 +msgid "" +"Raise :exc:`SendfileNotAvailableError` if the system does not support the " +"*sendfile* syscall and *fallback* is ``False``." +msgstr "" + +#: library/asyncio-eventloop.rst:816 +msgid "TLS Upgrade" +msgstr "" + +#: library/asyncio-eventloop.rst:822 +msgid "Upgrade an existing transport-based connection to TLS." +msgstr "Convertit une connexion existante en connexion TLS." + +#: library/asyncio-eventloop.rst:824 +msgid "" +"Create a TLS coder/decoder instance and insert it between the *transport* " +"and the *protocol*. The coder/decoder implements both *transport*-facing " +"protocol and *protocol*-facing transport." +msgstr "" + +#: library/asyncio-eventloop.rst:828 +msgid "" +"Return the created two-interface instance. After *await*, the *protocol* " +"must stop using the original *transport* and communicate with the returned " +"object only because the coder caches *protocol*-side data and sporadically " +"exchanges extra TLS session packets with *transport*." +msgstr "" + +#: library/asyncio-eventloop.rst:835 +msgid "" +"*transport* and *protocol* instances that methods like :meth:`~loop." +"create_server` and :meth:`~loop.create_connection` return." +msgstr "" + +#: library/asyncio-eventloop.rst:839 +msgid "*sslcontext*: a configured instance of :class:`~ssl.SSLContext`." +msgstr "" + +#: library/asyncio-eventloop.rst:841 +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:844 +msgid "" +"*server_hostname*: sets or overrides the host name that the target server's " +"certificate will be matched against." +msgstr "" + +#: library/asyncio-eventloop.rst:855 +msgid "Watching file descriptors" +msgstr "Surveiller des descripteurs de fichiers" + +#: library/asyncio-eventloop.rst:859 +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:865 +msgid "" +"Stop monitoring the *fd* file descriptor for read availability. Returns " +"``True`` if *fd* was previously being monitored for reads." +msgstr "" + +#: library/asyncio-eventloop.rst:870 +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:874 library/asyncio-eventloop.rst:1094 +msgid "" +"Use :func:`functools.partial` :ref:`to pass keyword arguments ` to *callback*." +msgstr "" + +#: library/asyncio-eventloop.rst:879 +msgid "" +"Stop monitoring the *fd* file descriptor for write availability. Returns " +"``True`` if *fd* was previously being monitored for writes." +msgstr "" + +#: library/asyncio-eventloop.rst:882 +msgid "" +"See also :ref:`Platform Support ` section for some " +"limitations of these methods." +msgstr "" + +#: library/asyncio-eventloop.rst:887 +msgid "Working with socket objects directly" +msgstr "" + +#: library/asyncio-eventloop.rst:889 +msgid "" +"In general, protocol implementations that use transport-based APIs such as :" +"meth:`loop.create_connection` and :meth:`loop.create_server` are faster than " +"implementations that work with sockets directly. However, there are some use " +"cases when performance is not critical, and working with :class:`~socket." +"socket` objects directly is more convenient." +msgstr "" + +#: library/asyncio-eventloop.rst:898 +msgid "" +"Receive up to *nbytes* from *sock*. Asynchronous version of :meth:`socket." +"recv() `." +msgstr "" + +#: library/asyncio-eventloop.rst:901 +msgid "Return the received data as a bytes object." +msgstr "" + +#: library/asyncio-eventloop.rst:903 library/asyncio-eventloop.rst:917 +#: library/asyncio-eventloop.rst:932 library/asyncio-eventloop.rst:945 +#: library/asyncio-eventloop.rst:971 library/asyncio-eventloop.rst:1009 +msgid "*sock* must be a non-blocking socket." +msgstr "Le connecteur *sock* ne doit pas être bloquant." + +#: library/asyncio-eventloop.rst:905 +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:912 +msgid "" +"Receive data from *sock* into the *buf* buffer. Modeled after the blocking :" +"meth:`socket.recv_into() ` method." +msgstr "" + +#: library/asyncio-eventloop.rst:915 +msgid "Return the number of bytes written to the buffer." +msgstr "" + +#: library/asyncio-eventloop.rst:923 +msgid "" +"Send *data* to the *sock* socket. Asynchronous version of :meth:`socket." +"sendall() `." +msgstr "" + +#: library/asyncio-eventloop.rst:926 +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 " +"error, an exception is raised. Additionally, there is no way to determine " +"how much data, if any, was successfully processed by the receiving end of " +"the connection." +msgstr "" + +#: library/asyncio-eventloop.rst:934 +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:941 +msgid "Connect *sock* to a remote socket at *address*." +msgstr "" + +#: library/asyncio-eventloop.rst:943 +msgid "" +"Asynchronous version of :meth:`socket.connect() `." +msgstr "" + +#: library/asyncio-eventloop.rst:947 +msgid "" +"``address`` no longer needs to be resolved. ``sock_connect`` will try to " +"check if the *address* is already resolved by calling :func:`socket." +"inet_pton`. If not, :meth:`loop.getaddrinfo` will be used to resolve the " +"*address*." +msgstr "" + +#: library/asyncio-eventloop.rst:956 +msgid "" +":meth:`loop.create_connection` and :func:`asyncio.open_connection() " +"`." +msgstr "" + +#: library/asyncio-eventloop.rst:962 +msgid "" +"Accept a connection. Modeled after the blocking :meth:`socket.accept() " +"` method." +msgstr "" + +#: library/asyncio-eventloop.rst:965 +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 " +"object usable to send and receive data on the connection, and *address* is " +"the address bound to the socket on the other end of the connection." +msgstr "" + +#: library/asyncio-eventloop.rst:973 +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:980 +msgid ":meth:`loop.create_server` and :func:`start_server`." +msgstr "" + +#: library/asyncio-eventloop.rst:985 +msgid "" +"Send a file using high-performance :mod:`os.sendfile` if possible. Return " +"the total number of bytes sent." +msgstr "" + +#: library/asyncio-eventloop.rst:988 +msgid "" +"Asynchronous version of :meth:`socket.sendfile() `." +msgstr "" + +#: library/asyncio-eventloop.rst:990 +msgid "" +"*sock* must be a non-blocking :const:`socket.SOCK_STREAM` :class:`~socket." +"socket`." +msgstr "" + +#: library/asyncio-eventloop.rst:993 +msgid "*file* must be a regular file object open in binary mode." +msgstr "" + +#: library/asyncio-eventloop.rst:1002 +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:1006 +msgid "" +"Raise :exc:`SendfileNotAvailableError` if the system does not support " +"*sendfile* syscall and *fallback* is ``False``." +msgstr "" + +#: library/asyncio-eventloop.rst:1015 +msgid "DNS" +msgstr "" + +#: library/asyncio-eventloop.rst:1020 +msgid "Asynchronous version of :meth:`socket.getaddrinfo`." +msgstr "" + +#: library/asyncio-eventloop.rst:1024 +msgid "Asynchronous version of :meth:`socket.getnameinfo`." +msgstr "" + +#: library/asyncio-eventloop.rst:1026 +msgid "" +"Both *getaddrinfo* and *getnameinfo* methods were always documented to " +"return a coroutine, but prior to Python 3.7 they were, in fact, returning :" +"class:`asyncio.Future` objects. Starting with Python 3.7 both methods are " +"coroutines." +msgstr "" + +#: library/asyncio-eventloop.rst:1034 +msgid "Working with pipes" +msgstr "" + +#: library/asyncio-eventloop.rst:1038 +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:1043 +msgid "*pipe* is a :term:`file-like object `." +msgstr "" + +#: library/asyncio-eventloop.rst:1045 +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:1049 library/asyncio-eventloop.rst:1065 +msgid "" +"With :class:`SelectorEventLoop` event loop, the *pipe* is set to non-" +"blocking mode." +msgstr "" + +#: library/asyncio-eventloop.rst:1054 +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:1059 +msgid "*pipe* is :term:`file-like object `." +msgstr "" + +#: library/asyncio-eventloop.rst:1061 +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:1070 +msgid "" +":class:`SelectorEventLoop` does not support the above methods on Windows. " +"Use :class:`ProactorEventLoop` instead for Windows." +msgstr "" + +#: library/asyncio-eventloop.rst:1075 +msgid "" +"The :meth:`loop.subprocess_exec` and :meth:`loop.subprocess_shell` methods." +msgstr "" + +#: library/asyncio-eventloop.rst:1080 +msgid "Unix signals" +msgstr "Signaux Unix" + +#: library/asyncio-eventloop.rst:1084 +msgid "Set *callback* as the handler for the *signum* signal." +msgstr "" + +#: library/asyncio-eventloop.rst:1086 +msgid "" +"The callback will be invoked by *loop*, along with other queued callbacks " +"and runnable coroutines of that event loop. Unlike signal handlers " +"registered using :func:`signal.signal`, a callback registered with this " +"function is allowed to interact with the event loop." +msgstr "" + +#: library/asyncio-eventloop.rst:1091 +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:1097 +msgid "" +"Like :func:`signal.signal`, this function must be invoked in the main thread." +msgstr "" + +#: library/asyncio-eventloop.rst:1102 +msgid "Remove the handler for the *sig* signal." +msgstr "Supprime le gestionnaire du signal *sig*." + +#: library/asyncio-eventloop.rst:1104 +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:1111 +msgid "The :mod:`signal` module." +msgstr "Le module :mod:`signal`." + +#: library/asyncio-eventloop.rst:1115 +msgid "Executing code in thread or process pools" +msgstr "" + +#: library/asyncio-eventloop.rst:1119 +msgid "Arrange for *func* to be called in the specified executor." +msgstr "" + +#: library/asyncio-eventloop.rst:1121 +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:1166 +msgid "" +"Note that the entry point guard (``if __name__ == '__main__'``) is required " +"for option 3 due to the peculiarities of :mod:`multiprocessing`, which is " +"used by :class:`~concurrent.futures.ProcessPoolExecutor`. See :ref:`Safe " +"importing of main module `." +msgstr "" + +#: library/asyncio-eventloop.rst:1171 +msgid "This method returns a :class:`asyncio.Future` object." +msgstr "" + +#: library/asyncio-eventloop.rst:1173 +msgid "" +"Use :func:`functools.partial` :ref:`to pass keyword arguments ` to *func*." +msgstr "" + +#: library/asyncio-eventloop.rst:1176 +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 " +"executor (:class:`~concurrent.futures.ThreadPoolExecutor`) to set the " +"default." +msgstr "" + +#: library/asyncio-eventloop.rst:1185 +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:1189 +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:1194 +msgid "" +"*executor* must be an instance of :class:`concurrent.futures." +"ThreadPoolExecutor`." +msgstr "" + +#: library/asyncio-eventloop.rst:1199 +msgid "Error Handling API" +msgstr "API de gestion d'erreur" + +#: library/asyncio-eventloop.rst:1201 +msgid "Allows customizing how exceptions are handled in the event loop." +msgstr "" + +#: library/asyncio-eventloop.rst:1205 +msgid "Set *handler* as the new event loop exception handler." +msgstr "" + +#: library/asyncio-eventloop.rst:1207 +msgid "" +"If *handler* is ``None``, the default exception handler will be set. " +"Otherwise, *handler* must be a callable with the signature matching ``(loop, " +"context)``, where ``loop`` is a reference to the active event loop, and " +"``context`` is a ``dict`` object containing the details of the exception " +"(see :meth:`call_exception_handler` documentation for details about context)." +msgstr "" + +#: library/asyncio-eventloop.rst:1217 +msgid "" +"Return the current exception handler, or ``None`` if no custom exception " +"handler was set." +msgstr "" + +#: library/asyncio-eventloop.rst:1224 +msgid "Default exception handler." +msgstr "Gestionnaire d'exception par défaut." + +#: library/asyncio-eventloop.rst:1226 +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:1230 +msgid "" +"*context* parameter has the same meaning as in :meth:" +"`call_exception_handler`." +msgstr "" + +#: library/asyncio-eventloop.rst:1235 +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:1237 +msgid "" +"*context* is a ``dict`` object containing the following keys (new keys may " +"be introduced in future Python versions):" +msgstr "" + +#: library/asyncio-eventloop.rst:1240 +msgid "'message': Error message;" +msgstr "``message`` : Message d'erreur ;" + +#: library/asyncio-eventloop.rst:1241 +msgid "'exception' (optional): Exception object;" +msgstr "``exception`` (optionnel): Un objet exception ;" + +#: library/asyncio-eventloop.rst:1242 +msgid "'future' (optional): :class:`asyncio.Future` instance;" +msgstr "" + +#: library/asyncio-eventloop.rst:1243 +msgid "'task' (optional): :class:`asyncio.Task` instance;" +msgstr "" + +#: library/asyncio-eventloop.rst:1244 +msgid "'handle' (optional): :class:`asyncio.Handle` instance;" +msgstr "" + +#: library/asyncio-eventloop.rst:1245 +msgid "'protocol' (optional): :ref:`Protocol ` instance;" +msgstr "" + +#: library/asyncio-eventloop.rst:1246 +msgid "'transport' (optional): :ref:`Transport ` instance;" +msgstr "" + +#: library/asyncio-eventloop.rst:1247 +msgid "'socket' (optional): :class:`socket.socket` instance;" +msgstr "" + +#: library/asyncio-eventloop.rst:1249 +msgid "'asyncgen' (optional): Asynchronous generator that caused" +msgstr "" + +#: library/asyncio-eventloop.rst:1249 +#, fuzzy +msgid "the exception." +msgstr "Gestionnaire d'exception par défaut." + +#: library/asyncio-eventloop.rst:1253 +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:1258 +msgid "Enabling debug mode" +msgstr "Active le mode débogage" + +#: library/asyncio-eventloop.rst:1262 +msgid "Get the debug mode (:class:`bool`) of the event loop." +msgstr "" + +#: library/asyncio-eventloop.rst:1264 +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:1270 +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:1274 +msgid "" +"The new :ref:`Python Development Mode ` can now also be used to " +"enable the debug mode." +msgstr "" + +#: library/asyncio-eventloop.rst:1279 +msgid "The :ref:`debug mode of asyncio `." +msgstr "" + +#: library/asyncio-eventloop.rst:1283 +msgid "Running Subprocesses" +msgstr "" + +#: library/asyncio-eventloop.rst:1285 +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:1292 +msgid "" +"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:1301 +msgid "" +"Create a subprocess from one or more string arguments specified by *args*." +msgstr "" + +#: library/asyncio-eventloop.rst:1304 +msgid "*args* must be a list of strings represented by:" +msgstr "" + +#: library/asyncio-eventloop.rst:1306 +#, fuzzy +msgid ":class:`str`;" +msgstr ":class:`str`" + +#: library/asyncio-eventloop.rst:1307 +msgid "" +"or :class:`bytes`, encoded to the :ref:`filesystem encoding `." +msgstr "" + +#: library/asyncio-eventloop.rst:1310 +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:1314 +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 " +"argument; however, where :class:`~subprocess.Popen` takes a single argument " +"which is list of strings, *subprocess_exec* takes multiple string arguments." +msgstr "" + +#: library/asyncio-eventloop.rst:1320 +msgid "" +"The *protocol_factory* must be a callable returning a subclass of the :class:" +"`asyncio.SubprocessProtocol` class." +msgstr "" + +#: library/asyncio-eventloop.rst:1323 +msgid "Other parameters:" +msgstr "Autres paramètres :" + +#: library/asyncio-eventloop.rst:1325 +msgid "*stdin* can be any of these:" +msgstr "" + +#: library/asyncio-eventloop.rst:1327 +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:1330 library/asyncio-eventloop.rst:1342 +#: library/asyncio-eventloop.rst:1354 +msgid "" +"the :const:`subprocess.PIPE` constant (default) which will create a new pipe " +"and connect it," +msgstr "" + +#: library/asyncio-eventloop.rst:1332 library/asyncio-eventloop.rst:1344 +#: library/asyncio-eventloop.rst:1356 +msgid "" +"the value ``None`` which will make the subprocess inherit the file " +"descriptor from this process" +msgstr "" + +#: library/asyncio-eventloop.rst:1334 library/asyncio-eventloop.rst:1346 +#: library/asyncio-eventloop.rst:1358 +msgid "" +"the :const:`subprocess.DEVNULL` constant which indicates that the special :" +"data:`os.devnull` file will be used" +msgstr "" + +#: library/asyncio-eventloop.rst:1337 +msgid "*stdout* can be any of these:" +msgstr "" + +#: library/asyncio-eventloop.rst:1339 +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:1349 +msgid "*stderr* can be any of these:" +msgstr "" + +#: library/asyncio-eventloop.rst:1351 +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:1360 +msgid "" +"the :const:`subprocess.STDOUT` constant which will connect the standard " +"error stream to the process' standard output stream" +msgstr "" + +#: library/asyncio-eventloop.rst:1363 +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:1368 +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:1372 +msgid "" +"See the constructor of the :class:`subprocess.Popen` class for documentation " +"on other arguments." +msgstr "" + +#: library/asyncio-eventloop.rst:1375 +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:1383 +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:1388 +msgid "" +"This is similar to the standard library :class:`subprocess.Popen` class " +"called with ``shell=True``." +msgstr "" + +#: library/asyncio-eventloop.rst:1391 +msgid "" +"The *protocol_factory* must be a callable returning a subclass of the :class:" +"`SubprocessProtocol` class." +msgstr "" + +#: library/asyncio-eventloop.rst:1394 +msgid "" +"See :meth:`~loop.subprocess_exec` for more details about the remaining " +"arguments." +msgstr "" + +#: library/asyncio-eventloop.rst:1397 +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:1402 +msgid "" +"It is the application's responsibility to ensure that all whitespace and " +"special characters are quoted appropriately to avoid `shell injection " +"`_ " +"vulnerabilities. The :func:`shlex.quote` function can be used to properly " +"escape whitespace and special characters in strings that are going to be " +"used to construct shell commands." +msgstr "" + +#: library/asyncio-eventloop.rst:1411 +msgid "Callback Handles" +msgstr "" + +#: library/asyncio-eventloop.rst:1415 +msgid "" +"A callback wrapper object returned by :meth:`loop.call_soon`, :meth:`loop." +"call_soon_threadsafe`." +msgstr "" + +#: library/asyncio-eventloop.rst:1420 +msgid "" +"Cancel the callback. If the callback has already been canceled or executed, " +"this method has no effect." +msgstr "" + +#: library/asyncio-eventloop.rst:1425 +msgid "Return ``True`` if the callback was cancelled." +msgstr "Renvoie ``True`` si la fonction de rappel à été annulé." + +#: library/asyncio-eventloop.rst:1431 +msgid "" +"A callback wrapper object returned by :meth:`loop.call_later`, and :meth:" +"`loop.call_at`." +msgstr "" + +#: library/asyncio-eventloop.rst:1434 +msgid "This class is a subclass of :class:`Handle`." +msgstr "" + +#: library/asyncio-eventloop.rst:1438 +msgid "Return a scheduled callback time as :class:`float` seconds." +msgstr "" + +#: library/asyncio-eventloop.rst:1440 +msgid "" +"The time is an absolute timestamp, using the same time reference as :meth:" +"`loop.time`." +msgstr "" + +#: library/asyncio-eventloop.rst:1447 +msgid "Server Objects" +msgstr "Objets Serveur" + +#: library/asyncio-eventloop.rst:1449 +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:1453 +msgid "Do not instantiate the class directly." +msgstr "" + +#: library/asyncio-eventloop.rst:1457 +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:1470 +msgid "Server object is an asynchronous context manager since Python 3.7." +msgstr "" + +#: library/asyncio-eventloop.rst:1475 +msgid "" +"Stop serving: close listening sockets and set the :attr:`sockets` attribute " +"to ``None``." +msgstr "" + +#: library/asyncio-eventloop.rst:1478 +msgid "" +"The sockets that represent existing incoming client connections are left " +"open." +msgstr "" + +#: library/asyncio-eventloop.rst:1481 +msgid "" +"The server is closed asynchronously, use the :meth:`wait_closed` coroutine " +"to wait until the server is closed." +msgstr "" + +#: library/asyncio-eventloop.rst:1486 +msgid "Return the event loop associated with the server object." +msgstr "" + +#: library/asyncio-eventloop.rst:1492 +msgid "Start accepting connections." +msgstr "Commence à accepter les connexions." + +#: library/asyncio-eventloop.rst:1494 +msgid "" +"This method is idempotent, so it can be called when the server is already " +"being serving." +msgstr "" + +#: library/asyncio-eventloop.rst:1497 +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 " +"accepting connections initially. In this case ``Server.start_serving()``, " +"or :meth:`Server.serve_forever` can be used to make the Server start " +"accepting connections." +msgstr "" + +#: library/asyncio-eventloop.rst:1508 +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:1512 +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:1534 +msgid "Return ``True`` if the server is accepting new connections." +msgstr "Donne ``True`` si le serveur accepte de nouvelles connexions." + +#: library/asyncio-eventloop.rst:1540 +msgid "Wait until the :meth:`close` method completes." +msgstr "Attends que la méthode :meth:`close` se termine." + +#: library/asyncio-eventloop.rst:1544 +msgid "List of :class:`socket.socket` objects the server is listening on." +msgstr "" + +#: library/asyncio-eventloop.rst:1546 +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:1556 +msgid "Event Loop Implementations" +msgstr "Implémentations de boucle d'évènements" + +#: library/asyncio-eventloop.rst:1558 +msgid "" +"asyncio ships with two different event loop implementations: :class:" +"`SelectorEventLoop` and :class:`ProactorEventLoop`." +msgstr "" + +#: library/asyncio-eventloop.rst:1561 +msgid "" +"By default asyncio is configured to use :class:`SelectorEventLoop` on Unix " +"and :class:`ProactorEventLoop` on Windows." +msgstr "" + +#: library/asyncio-eventloop.rst:1567 +msgid "An event loop based on the :mod:`selectors` module." +msgstr "" + +#: library/asyncio-eventloop.rst:1569 +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:1584 +msgid ":ref:`Availability `: Unix, Windows." +msgstr ":ref:`Disponibilité ` : Unix, Windows." + +#: library/asyncio-eventloop.rst:1589 +msgid "An event loop for Windows that uses \"I/O Completion Ports\" (IOCP)." +msgstr "" + +#: library/asyncio-eventloop.rst:1592 +msgid ":ref:`Availability `: Windows." +msgstr ":ref:`Disponibilité ` : Windows." + +#: library/asyncio-eventloop.rst:1595 +msgid "" +"`MSDN documentation on I/O Completion Ports `_." +msgstr "" + +#: library/asyncio-eventloop.rst:1601 +msgid "Abstract base class for asyncio-compliant event loops." +msgstr "" + +#: library/asyncio-eventloop.rst:1603 +msgid "" +"The :ref:`asyncio-event-loop-methods` section lists all methods that an " +"alternative implementation of ``AbstractEventLoop`` should have defined." +msgstr "" + +#: library/asyncio-eventloop.rst:1609 +msgid "Examples" +msgstr "Exemples" + +#: library/asyncio-eventloop.rst:1611 +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." +"call_soon`. Modern asyncio applications rarely need to be written this way; " +"consider using the high-level functions like :func:`asyncio.run`." +msgstr "" + +#: library/asyncio-eventloop.rst:1621 +msgid "Hello World with call_soon()" +msgstr "\"Hello World\" avec ``call_soon()``" + +#: library/asyncio-eventloop.rst:1623 +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:1647 +msgid "" +"A similar :ref:`Hello World ` example created with a coroutine " +"and the :func:`run` function." +msgstr "" + +#: library/asyncio-eventloop.rst:1654 +msgid "Display the current date with call_later()" +msgstr "Afficher la date actuelle avec ``call_later()``" + +#: library/asyncio-eventloop.rst:1656 +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:1684 +msgid "" +"A similar :ref:`current date ` example created with a " +"coroutine and the :func:`run` function." +msgstr "" + +#: library/asyncio-eventloop.rst:1691 +msgid "Watch a file descriptor for read events" +msgstr "" + +#: library/asyncio-eventloop.rst:1693 +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:1731 +msgid "" +"A similar :ref:`example ` using " +"transports, protocols, and the :meth:`loop.create_connection` method." +msgstr "" + +#: library/asyncio-eventloop.rst:1735 +msgid "" +"Another similar :ref:`example ` " +"using the high-level :func:`asyncio.open_connection` function and streams." +msgstr "" + +#: library/asyncio-eventloop.rst:1743 +msgid "Set signal handlers for SIGINT and SIGTERM" +msgstr "Définit les gestionnaires de signaux pour *SIGINT* et *SIGTERM*" + +#: library/asyncio-eventloop.rst:1745 +msgid "(This ``signals`` example only works on Unix.)" +msgstr "(Cet exemple ne fonctionne que sur Unix.)" + +#: library/asyncio-eventloop.rst:1747 +msgid "" +"Register handlers for signals :py:data:`SIGINT` and :py:data:`SIGTERM` using " +"the :meth:`loop.add_signal_handler` method::" +msgstr "" diff --git a/library/asyncio-exceptions.po b/library/asyncio-exceptions.po new file mode 100644 index 0000000000..36806d636f --- /dev/null +++ b/library/asyncio-exceptions.po @@ -0,0 +1,98 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +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: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \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" + +#: library/asyncio-exceptions.rst:8 +msgid "Exceptions" +msgstr "Exceptions" + +#: library/asyncio-exceptions.rst:10 +msgid "**Source code:** :source:`Lib/asyncio/exceptions.py`" +msgstr "" + +#: library/asyncio-exceptions.rst:16 +#, fuzzy +msgid "The operation has exceeded the given deadline." +msgstr "L'opération a dépassé le délai donné." + +#: library/asyncio-exceptions.rst:19 +msgid "" +"This exception is different from the builtin :exc:`TimeoutError` exception." +msgstr "" + +#: library/asyncio-exceptions.rst:25 +msgid "The operation has been cancelled." +msgstr "" + +#: library/asyncio-exceptions.rst:27 +msgid "" +"This exception can be caught to perform custom operations when asyncio Tasks " +"are cancelled. In almost all situations the exception must be re-raised." +msgstr "" + +#: library/asyncio-exceptions.rst:33 +msgid ":exc:`CancelledError` is now a subclass of :class:`BaseException`." +msgstr "" + +#: library/asyncio-exceptions.rst:38 +msgid "Invalid internal state of :class:`Task` or :class:`Future`." +msgstr "" + +#: library/asyncio-exceptions.rst:40 +msgid "" +"Can be raised in situations like setting a result value for a *Future* " +"object that already has a result value set." +msgstr "" + +#: library/asyncio-exceptions.rst:46 +msgid "" +"The \"sendfile\" syscall is not available for the given socket or file type." +msgstr "" + +#: library/asyncio-exceptions.rst:49 +msgid "A subclass of :exc:`RuntimeError`." +msgstr "" + +#: library/asyncio-exceptions.rst:54 +msgid "The requested read operation did not complete fully." +msgstr "" + +#: library/asyncio-exceptions.rst:56 +msgid "Raised by the :ref:`asyncio stream APIs`." +msgstr "" + +#: library/asyncio-exceptions.rst:58 +msgid "This exception is a subclass of :exc:`EOFError`." +msgstr "" + +#: library/asyncio-exceptions.rst:62 +msgid "The total number (:class:`int`) of expected bytes." +msgstr "" + +#: library/asyncio-exceptions.rst:66 +msgid "A string of :class:`bytes` read before the end of stream was reached." +msgstr "" + +#: library/asyncio-exceptions.rst:71 +msgid "Reached the buffer size limit while looking for a separator." +msgstr "" + +#: library/asyncio-exceptions.rst:73 +msgid "Raised by the :ref:`asyncio stream APIs `." +msgstr "" + +#: library/asyncio-exceptions.rst:77 +msgid "The total number of to be consumed bytes." +msgstr "" diff --git a/library/asyncio-future.po b/library/asyncio-future.po new file mode 100644 index 0000000000..67adbd1989 --- /dev/null +++ b/library/asyncio-future.po @@ -0,0 +1,441 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-18 15:46+0200\n" +"PO-Revision-Date: 2022-08-22 22:57-0400\n" +"Last-Translator: Nicolas Haller \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 3.1.1\n" + +#: library/asyncio-future.rst:8 +msgid "Futures" +msgstr "Futures" + +#: library/asyncio-future.rst:10 +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 "Fonctions pour *Future*" + +#: library/asyncio-future.rst:24 +msgid "Return ``True`` if *obj* is either of:" +msgstr "Renvoie ``True`` si *obj* est soit :" + +#: library/asyncio-future.rst:26 +msgid "an instance of :class:`asyncio.Future`," +msgstr "une instance de :class:`asyncio.Future` ;" + +#: library/asyncio-future.rst:27 +msgid "an instance of :class:`asyncio.Task`," +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 "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 "" +"a :class:`Task` object wrapping *obj*, if *obj* is a coroutine (:func:" +"`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 +#, fuzzy +msgid "" +"Save a reference to the result of this function, to avoid a task " +"disappearing mid-execution." +msgstr "" +"Gardez une référence au résultat de cette fonction pour éviter de voir une " +"tâche disparaitre au milieu de son exécution." + +#: 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 +msgid "" +"Deprecation warning is emitted if *obj* is not a Future-like object and " +"*loop* is not specified and there is no running event loop." +msgstr "" +"Un ``DeprecationWarning`` est levé si *obj* n'est pas un objet se comportant " +"comme un *Future*, si *loop* n'est pas spécifié et s'il n'y a pas de boucle " +"d'évènements en cours d'exécution." + +#: library/asyncio-future.rst:70 +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:73 +msgid "" +"Deprecation warning is emitted if *future* is not a Future-like object and " +"*loop* is not specified and there is no running event loop." +msgstr "" +"Un ``DeprecationWarning`` est levé si *future* n'est pas un objet se " +"comportant comme un *Future*, si *loop* n'est pas spécifié et s'il n'y a pas " +"de boucle d'évènements en cours d'exécution." + +#: library/asyncio-future.rst:79 +msgid "Future Object" +msgstr "Objet *Future*" + +#: library/asyncio-future.rst:83 +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:86 +#, fuzzy +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. A Future can be awaited multiple times and the result is same." +msgstr "" +"*Future* est un objet qui peut être attendu (:term:`awaitable`). Les " +"coroutines peuvent attendre les objets *Future* jusqu'à ce qu'ils renvoient " +"un résultat, ils lèvent une exception ou qu'ils soient annulés." + +#: library/asyncio-future.rst:91 +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:96 +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:102 +msgid "Added support for the :mod:`contextvars` module." +msgstr "Ajout du support du module :mod:`contextvars`." + +#: library/asyncio-future.rst:105 +msgid "" +"Deprecation warning is emitted if *loop* is not specified and there is no " +"running event loop." +msgstr "" +"Un ``DeprecationWarning`` est levé si *loop* n'est pas spécifié et s'il n'y " +"a pas de boucle d'évènements en cours d'exécution." + +#: library/asyncio-future.rst:111 +msgid "Return the result of the Future." +msgstr "Renvoie le résultat du *Future*." + +#: library/asyncio-future.rst:113 +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:116 +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:207 +msgid "" +"If the Future has been *cancelled*, this method raises a :exc:" +"`CancelledError` exception." +msgstr "" +"Si le *Future* a été *annulé*, cette méthode lève une exception :exc:" +"`CancelledError`." + +#: library/asyncio-future.rst:122 +msgid "" +"If the Future's result isn't yet available, this method raises a :exc:" +"`InvalidStateError` exception." +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:127 +msgid "Mark the Future as *done* and set its result." +msgstr "Marque le *Future* comme « terminé » et définit son résultat." + +#: library/asyncio-future.rst:136 +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:134 +msgid "Mark the Future as *done* and set an exception." +msgstr "Marque le *Future* comme « terminé » et définit une exception." + +#: library/asyncio-future.rst:141 +msgid "Return ``True`` if the Future is *done*." +msgstr "Renvoie ``True`` si le *Future* est « terminé »." + +#: library/asyncio-future.rst:143 +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:149 +msgid "Return ``True`` if the Future was *cancelled*." +msgstr "Renvoie ``True`` si le *Future* a été « annulé »." + +#: library/asyncio-future.rst:151 +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:159 +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:161 +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:164 +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:167 +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:171 +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:178 +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:184 +msgid "Remove *callback* from the callbacks list." +msgstr "Retire *callback* de la liste de fonctions de rappel." + +#: library/asyncio-future.rst:186 +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:191 +msgid "Cancel the Future and schedule callbacks." +msgstr "Annule le *Future* et planifie l'exécution des fonctions de rappel." + +#: library/asyncio-future.rst:193 +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:197 +msgid "Added the *msg* parameter." +msgstr "Ajout du paramètre *msg*." + +#: library/asyncio-future.rst:202 +msgid "Return the exception that was set on this Future." +msgstr "Renvoie l'exception définie pour ce *Future*." + +#: library/asyncio-future.rst:204 +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:210 +msgid "" +"If the Future isn't *done* yet, this method raises an :exc:" +"`InvalidStateError` exception." +msgstr "" +"Si le *Future* n'est pas encore « terminé », cette méthode lève une " +"exception :exc:`InvalidStateError`." + +#: library/asyncio-future.rst:215 +msgid "Return the event loop the Future object is bound to." +msgstr "Renvoie la boucle d'évènements à laquelle le *Future* est attaché." + +#: library/asyncio-future.rst:222 +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:257 +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:260 +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:263 +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:266 +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:270 +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:274 +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:278 +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 new file mode 100644 index 0000000000..46128d82b4 --- /dev/null +++ b/library/asyncio-llapi-index.po @@ -0,0 +1,997 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-22 22:57+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \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" + +#: library/asyncio-llapi-index.rst:6 +msgid "Low-level API Index" +msgstr "" + +#: library/asyncio-llapi-index.rst:8 +msgid "This page lists all low-level asyncio APIs." +msgstr "" + +#: library/asyncio-llapi-index.rst:12 +msgid "Obtaining the Event Loop" +msgstr "Obtenir une boucle d'évènements" + +#: library/asyncio-llapi-index.rst:18 +msgid ":func:`asyncio.get_running_loop`" +msgstr ":func:`asyncio.get_running_loop`" + +#: library/asyncio-llapi-index.rst:19 +msgid "The **preferred** function to get the running event loop." +msgstr "" + +#: library/asyncio-llapi-index.rst:21 +msgid ":func:`asyncio.get_event_loop`" +msgstr ":func:`asyncio.get_event_loop`" + +#: library/asyncio-llapi-index.rst:22 +msgid "Get an event loop instance (running or current via the current policy)." +msgstr "" + +#: library/asyncio-llapi-index.rst:24 +msgid ":func:`asyncio.set_event_loop`" +msgstr ":func:`asyncio.set_event_loop`" + +#: library/asyncio-llapi-index.rst:25 +msgid "Set the event loop as current via the current policy." +msgstr "" + +#: library/asyncio-llapi-index.rst:27 +msgid ":func:`asyncio.new_event_loop`" +msgstr ":func:`asyncio.new_event_loop`" + +#: library/asyncio-llapi-index.rst:28 +msgid "Create a new event loop." +msgstr "" + +#: library/asyncio-llapi-index.rst:32 library/asyncio-llapi-index.rst:260 +msgid "Examples" +msgstr "Exemples" + +#: library/asyncio-llapi-index.rst:33 +msgid ":ref:`Using asyncio.get_running_loop() `." +msgstr "" + +#: library/asyncio-llapi-index.rst:37 +msgid "Event Loop Methods" +msgstr "Méthodes de la boucle d'évènements" + +#: library/asyncio-llapi-index.rst:39 +msgid "" +"See also the main documentation section about the :ref:`asyncio-event-loop-" +"methods`." +msgstr "" + +#: library/asyncio-llapi-index.rst:42 +msgid "Lifecycle" +msgstr "" + +#: library/asyncio-llapi-index.rst:47 +msgid ":meth:`loop.run_until_complete`" +msgstr ":meth:`loop.run_until_complete`" + +#: library/asyncio-llapi-index.rst:48 +msgid "Run a Future/Task/awaitable until complete." +msgstr "" + +#: library/asyncio-llapi-index.rst:50 +msgid ":meth:`loop.run_forever`" +msgstr ":meth:`loop.run_forever`" + +#: library/asyncio-llapi-index.rst:51 +msgid "Run the event loop forever." +msgstr "" + +#: library/asyncio-llapi-index.rst:53 +msgid ":meth:`loop.stop`" +msgstr ":meth:`loop.stop`" + +#: library/asyncio-llapi-index.rst:54 +msgid "Stop the event loop." +msgstr "Arrête l'exécution de la boucle d'évènements." + +#: library/asyncio-llapi-index.rst:56 +msgid ":meth:`loop.close`" +msgstr ":meth:`loop.close`" + +#: library/asyncio-llapi-index.rst:57 +msgid "Close the event loop." +msgstr "Arrête la boucle d'évènements." + +#: library/asyncio-llapi-index.rst:59 +msgid ":meth:`loop.is_running()`" +msgstr ":meth:`loop.is_running()`" + +#: library/asyncio-llapi-index.rst:60 +msgid "Return ``True`` if the event loop is running." +msgstr "" + +#: library/asyncio-llapi-index.rst:62 +msgid ":meth:`loop.is_closed()`" +msgstr ":meth:`loop.is_closed()`" + +#: library/asyncio-llapi-index.rst:63 +#, fuzzy +msgid "Return ``True`` if the event loop is closed." +msgstr "Renvoie ``True`` si la boucle d'évènements est arrêtée." + +#: library/asyncio-llapi-index.rst:65 +msgid "``await`` :meth:`loop.shutdown_asyncgens`" +msgstr "" + +#: library/asyncio-llapi-index.rst:66 +msgid "Close asynchronous generators." +msgstr "" + +#: library/asyncio-llapi-index.rst:69 +msgid "Debugging" +msgstr "Débogage" + +#: library/asyncio-llapi-index.rst:74 +msgid ":meth:`loop.set_debug`" +msgstr ":meth:`loop.set_debug`" + +#: library/asyncio-llapi-index.rst:75 +msgid "Enable or disable the debug mode." +msgstr "" + +#: library/asyncio-llapi-index.rst:77 +msgid ":meth:`loop.get_debug`" +msgstr ":meth:`loop.get_debug`" + +#: library/asyncio-llapi-index.rst:78 +msgid "Get the current debug mode." +msgstr "" + +#: library/asyncio-llapi-index.rst:81 +msgid "Scheduling Callbacks" +msgstr "" + +#: library/asyncio-llapi-index.rst:86 +msgid ":meth:`loop.call_soon`" +msgstr ":meth:`loop.call_soon`" + +#: library/asyncio-llapi-index.rst:87 +msgid "Invoke a callback soon." +msgstr "" + +#: library/asyncio-llapi-index.rst:89 +msgid ":meth:`loop.call_soon_threadsafe`" +msgstr ":meth:`loop.call_soon_threadsafe`" + +#: library/asyncio-llapi-index.rst:90 +msgid "A thread-safe variant of :meth:`loop.call_soon`." +msgstr "" + +#: library/asyncio-llapi-index.rst:92 +msgid ":meth:`loop.call_later`" +msgstr ":meth:`loop.call_later`" + +#: library/asyncio-llapi-index.rst:93 +msgid "Invoke a callback *after* the given time." +msgstr "" + +#: library/asyncio-llapi-index.rst:95 +msgid ":meth:`loop.call_at`" +msgstr ":meth:`loop.call_at`" + +#: library/asyncio-llapi-index.rst:96 +msgid "Invoke a callback *at* the given time." +msgstr "" + +#: library/asyncio-llapi-index.rst:99 +msgid "Thread/Process Pool" +msgstr "" + +#: library/asyncio-llapi-index.rst:104 +msgid "``await`` :meth:`loop.run_in_executor`" +msgstr "" + +#: library/asyncio-llapi-index.rst:105 +msgid "" +"Run a CPU-bound or other blocking function in a :mod:`concurrent.futures` " +"executor." +msgstr "" + +#: library/asyncio-llapi-index.rst:108 +msgid ":meth:`loop.set_default_executor`" +msgstr ":meth:`loop.set_default_executor`" + +#: library/asyncio-llapi-index.rst:109 +msgid "Set the default executor for :meth:`loop.run_in_executor`." +msgstr "" + +#: library/asyncio-llapi-index.rst:112 +msgid "Tasks and Futures" +msgstr "" + +#: library/asyncio-llapi-index.rst:117 +msgid ":meth:`loop.create_future`" +msgstr ":meth:`loop.create_future`" + +#: library/asyncio-llapi-index.rst:118 +msgid "Create a :class:`Future` object." +msgstr "" + +#: library/asyncio-llapi-index.rst:120 +msgid ":meth:`loop.create_task`" +msgstr ":meth:`loop.create_task`" + +#: library/asyncio-llapi-index.rst:121 +msgid "Schedule coroutine as a :class:`Task`." +msgstr "" + +#: library/asyncio-llapi-index.rst:123 +msgid ":meth:`loop.set_task_factory`" +msgstr ":meth:`loop.set_task_factory`" + +#: library/asyncio-llapi-index.rst:124 +msgid "" +"Set a factory used by :meth:`loop.create_task` to create :class:`Tasks " +"`." +msgstr "" + +#: library/asyncio-llapi-index.rst:127 +msgid ":meth:`loop.get_task_factory`" +msgstr ":meth:`loop.get_task_factory`" + +#: library/asyncio-llapi-index.rst:128 +msgid "" +"Get the factory :meth:`loop.create_task` uses to create :class:`Tasks " +"`." +msgstr "" + +#: library/asyncio-llapi-index.rst:132 +msgid "DNS" +msgstr "" + +#: library/asyncio-llapi-index.rst:137 +msgid "``await`` :meth:`loop.getaddrinfo`" +msgstr "" + +#: library/asyncio-llapi-index.rst:138 +msgid "Asynchronous version of :meth:`socket.getaddrinfo`." +msgstr "" + +#: library/asyncio-llapi-index.rst:140 +msgid "``await`` :meth:`loop.getnameinfo`" +msgstr "" + +#: library/asyncio-llapi-index.rst:141 +msgid "Asynchronous version of :meth:`socket.getnameinfo`." +msgstr "" + +#: library/asyncio-llapi-index.rst:144 +msgid "Networking and IPC" +msgstr "" + +#: library/asyncio-llapi-index.rst:149 +msgid "``await`` :meth:`loop.create_connection`" +msgstr "" + +#: library/asyncio-llapi-index.rst:150 +msgid "Open a TCP connection." +msgstr "" + +#: library/asyncio-llapi-index.rst:152 +msgid "``await`` :meth:`loop.create_server`" +msgstr "" + +#: library/asyncio-llapi-index.rst:153 +msgid "Create a TCP server." +msgstr "" + +#: library/asyncio-llapi-index.rst:155 +msgid "``await`` :meth:`loop.create_unix_connection`" +msgstr "" + +#: library/asyncio-llapi-index.rst:156 +msgid "Open a Unix socket connection." +msgstr "" + +#: library/asyncio-llapi-index.rst:158 +msgid "``await`` :meth:`loop.create_unix_server`" +msgstr "" + +#: library/asyncio-llapi-index.rst:159 +msgid "Create a Unix socket server." +msgstr "" + +#: library/asyncio-llapi-index.rst:161 +msgid "``await`` :meth:`loop.connect_accepted_socket`" +msgstr "" + +#: library/asyncio-llapi-index.rst:162 +msgid "Wrap a :class:`~socket.socket` into a ``(transport, protocol)`` pair." +msgstr "" + +#: library/asyncio-llapi-index.rst:165 +msgid "``await`` :meth:`loop.create_datagram_endpoint`" +msgstr "" + +#: library/asyncio-llapi-index.rst:166 +msgid "Open a datagram (UDP) connection." +msgstr "" + +#: library/asyncio-llapi-index.rst:168 +msgid "``await`` :meth:`loop.sendfile`" +msgstr "" + +#: library/asyncio-llapi-index.rst:169 +msgid "Send a file over a transport." +msgstr "" + +#: library/asyncio-llapi-index.rst:171 +msgid "``await`` :meth:`loop.start_tls`" +msgstr "" + +#: library/asyncio-llapi-index.rst:172 +msgid "Upgrade an existing connection to TLS." +msgstr "" + +#: library/asyncio-llapi-index.rst:174 +msgid "``await`` :meth:`loop.connect_read_pipe`" +msgstr "" + +#: library/asyncio-llapi-index.rst:175 +msgid "Wrap a read end of a pipe into a ``(transport, protocol)`` pair." +msgstr "" + +#: library/asyncio-llapi-index.rst:177 +msgid "``await`` :meth:`loop.connect_write_pipe`" +msgstr "" + +#: library/asyncio-llapi-index.rst:178 +msgid "Wrap a write end of a pipe into a ``(transport, protocol)`` pair." +msgstr "" + +#: library/asyncio-llapi-index.rst:181 +msgid "Sockets" +msgstr "Interfaces de connexion (*sockets*)" + +#: library/asyncio-llapi-index.rst:186 +msgid "``await`` :meth:`loop.sock_recv`" +msgstr "" + +#: library/asyncio-llapi-index.rst:187 +msgid "Receive data from the :class:`~socket.socket`." +msgstr "" + +#: library/asyncio-llapi-index.rst:189 +msgid "``await`` :meth:`loop.sock_recv_into`" +msgstr "" + +#: library/asyncio-llapi-index.rst:190 +msgid "Receive data from the :class:`~socket.socket` into a buffer." +msgstr "" + +#: library/asyncio-llapi-index.rst:192 +msgid "``await`` :meth:`loop.sock_sendall`" +msgstr "" + +#: library/asyncio-llapi-index.rst:193 +msgid "Send data to the :class:`~socket.socket`." +msgstr "" + +#: library/asyncio-llapi-index.rst:195 +msgid "``await`` :meth:`loop.sock_connect`" +msgstr "" + +#: library/asyncio-llapi-index.rst:196 +msgid "Connect the :class:`~socket.socket`." +msgstr "" + +#: library/asyncio-llapi-index.rst:198 +msgid "``await`` :meth:`loop.sock_accept`" +msgstr "" + +#: library/asyncio-llapi-index.rst:199 +msgid "Accept a :class:`~socket.socket` connection." +msgstr "" + +#: library/asyncio-llapi-index.rst:201 +msgid "``await`` :meth:`loop.sock_sendfile`" +msgstr "" + +#: library/asyncio-llapi-index.rst:202 +msgid "Send a file over the :class:`~socket.socket`." +msgstr "" + +#: library/asyncio-llapi-index.rst:204 +msgid ":meth:`loop.add_reader`" +msgstr ":meth:`loop.add_reader`" + +#: library/asyncio-llapi-index.rst:205 +msgid "Start watching a file descriptor for read availability." +msgstr "" + +#: library/asyncio-llapi-index.rst:207 +msgid ":meth:`loop.remove_reader`" +msgstr ":meth:`loop.remove_reader`" + +#: library/asyncio-llapi-index.rst:208 +msgid "Stop watching a file descriptor for read availability." +msgstr "" + +#: library/asyncio-llapi-index.rst:210 +msgid ":meth:`loop.add_writer`" +msgstr ":meth:`loop.add_writer`" + +#: library/asyncio-llapi-index.rst:211 +msgid "Start watching a file descriptor for write availability." +msgstr "" + +#: library/asyncio-llapi-index.rst:213 +msgid ":meth:`loop.remove_writer`" +msgstr ":meth:`loop.remove_writer`" + +#: library/asyncio-llapi-index.rst:214 +msgid "Stop watching a file descriptor for write availability." +msgstr "" + +#: library/asyncio-llapi-index.rst:217 +#, fuzzy +msgid "Unix Signals" +msgstr "Signaux Unix" + +#: library/asyncio-llapi-index.rst:222 +msgid ":meth:`loop.add_signal_handler`" +msgstr ":meth:`loop.add_signal_handler`" + +#: library/asyncio-llapi-index.rst:223 +msgid "Add a handler for a :mod:`signal`." +msgstr "" + +#: library/asyncio-llapi-index.rst:225 +msgid ":meth:`loop.remove_signal_handler`" +msgstr ":meth:`loop.remove_signal_handler`" + +#: library/asyncio-llapi-index.rst:226 +msgid "Remove a handler for a :mod:`signal`." +msgstr "" + +#: library/asyncio-llapi-index.rst:229 +msgid "Subprocesses" +msgstr "Sous-processus" + +#: library/asyncio-llapi-index.rst:234 +msgid ":meth:`loop.subprocess_exec`" +msgstr ":meth:`loop.subprocess_exec`" + +#: library/asyncio-llapi-index.rst:235 +msgid "Spawn a subprocess." +msgstr "" + +#: library/asyncio-llapi-index.rst:237 +msgid ":meth:`loop.subprocess_shell`" +msgstr ":meth:`loop.subprocess_shell`" + +#: library/asyncio-llapi-index.rst:238 +msgid "Spawn a subprocess from a shell command." +msgstr "" + +#: library/asyncio-llapi-index.rst:241 +msgid "Error Handling" +msgstr "Gestion des erreurs" + +#: library/asyncio-llapi-index.rst:246 +msgid ":meth:`loop.call_exception_handler`" +msgstr ":meth:`loop.call_exception_handler`" + +#: library/asyncio-llapi-index.rst:247 +msgid "Call the exception handler." +msgstr "" + +#: library/asyncio-llapi-index.rst:249 +msgid ":meth:`loop.set_exception_handler`" +msgstr ":meth:`loop.set_exception_handler`" + +#: library/asyncio-llapi-index.rst:250 +msgid "Set a new exception handler." +msgstr "" + +#: library/asyncio-llapi-index.rst:252 +msgid ":meth:`loop.get_exception_handler`" +msgstr ":meth:`loop.get_exception_handler`" + +#: library/asyncio-llapi-index.rst:253 +msgid "Get the current exception handler." +msgstr "" + +#: library/asyncio-llapi-index.rst:255 +msgid ":meth:`loop.default_exception_handler`" +msgstr ":meth:`loop.default_exception_handler`" + +#: library/asyncio-llapi-index.rst:256 +msgid "The default exception handler implementation." +msgstr "" + +#: library/asyncio-llapi-index.rst:261 +msgid "" +":ref:`Using asyncio.get_event_loop() and loop.run_forever() " +"`." +msgstr "" + +#: library/asyncio-llapi-index.rst:264 +msgid ":ref:`Using loop.call_later() `." +msgstr "" + +#: library/asyncio-llapi-index.rst:266 +msgid "" +"Using ``loop.create_connection()`` to implement :ref:`an echo-client " +"`." +msgstr "" + +#: library/asyncio-llapi-index.rst:269 +msgid "" +"Using ``loop.create_connection()`` to :ref:`connect a socket " +"`." +msgstr "" + +#: library/asyncio-llapi-index.rst:272 +msgid "" +":ref:`Using add_reader() to watch an FD for read events " +"`." +msgstr "" + +#: library/asyncio-llapi-index.rst:275 +msgid ":ref:`Using loop.add_signal_handler() `." +msgstr "" + +#: library/asyncio-llapi-index.rst:277 +msgid ":ref:`Using loop.subprocess_exec() `." +msgstr "" + +#: library/asyncio-llapi-index.rst:281 +msgid "Transports" +msgstr "Transports" + +#: library/asyncio-llapi-index.rst:283 +msgid "All transports implement the following methods:" +msgstr "" + +#: library/asyncio-llapi-index.rst:289 +msgid ":meth:`transport.close() `" +msgstr "" + +#: library/asyncio-llapi-index.rst:290 +msgid "Close the transport." +msgstr "Ferme le transport." + +#: library/asyncio-llapi-index.rst:292 +msgid ":meth:`transport.is_closing() `" +msgstr "" + +#: library/asyncio-llapi-index.rst:293 +msgid "Return ``True`` if the transport is closing or is closed." +msgstr "" + +#: library/asyncio-llapi-index.rst:295 +msgid ":meth:`transport.get_extra_info() `" +msgstr "" + +#: library/asyncio-llapi-index.rst:296 +msgid "Request for information about the transport." +msgstr "" + +#: library/asyncio-llapi-index.rst:298 +msgid ":meth:`transport.set_protocol() `" +msgstr "" + +#: library/asyncio-llapi-index.rst:299 +msgid "Set a new protocol." +msgstr "Change le protocole." + +#: library/asyncio-llapi-index.rst:301 +msgid ":meth:`transport.get_protocol() `" +msgstr "" + +#: library/asyncio-llapi-index.rst:302 +msgid "Return the current protocol." +msgstr "Renvoie le protocole courant." + +#: library/asyncio-llapi-index.rst:305 +msgid "" +"Transports that can receive data (TCP and Unix connections, pipes, etc). " +"Returned from methods like :meth:`loop.create_connection`, :meth:`loop." +"create_unix_connection`, :meth:`loop.connect_read_pipe`, etc:" +msgstr "" + +#: library/asyncio-llapi-index.rst:310 +msgid "Read Transports" +msgstr "" + +#: library/asyncio-llapi-index.rst:315 +msgid ":meth:`transport.is_reading() `" +msgstr "" + +#: library/asyncio-llapi-index.rst:316 +msgid "Return ``True`` if the transport is receiving." +msgstr "" + +#: library/asyncio-llapi-index.rst:318 +msgid ":meth:`transport.pause_reading() `" +msgstr "" + +#: library/asyncio-llapi-index.rst:319 +msgid "Pause receiving." +msgstr "" + +#: library/asyncio-llapi-index.rst:321 +msgid ":meth:`transport.resume_reading() `" +msgstr "" + +#: library/asyncio-llapi-index.rst:322 +msgid "Resume receiving." +msgstr "" + +#: library/asyncio-llapi-index.rst:325 +msgid "" +"Transports that can Send data (TCP and Unix connections, pipes, etc). " +"Returned from methods like :meth:`loop.create_connection`, :meth:`loop." +"create_unix_connection`, :meth:`loop.connect_write_pipe`, etc:" +msgstr "" + +#: library/asyncio-llapi-index.rst:330 +msgid "Write Transports" +msgstr "" + +#: library/asyncio-llapi-index.rst:335 +msgid ":meth:`transport.write() `" +msgstr "" + +#: library/asyncio-llapi-index.rst:336 +msgid "Write data to the transport." +msgstr "" + +#: library/asyncio-llapi-index.rst:338 +msgid ":meth:`transport.writelines() `" +msgstr "" + +#: library/asyncio-llapi-index.rst:339 +msgid "Write buffers to the transport." +msgstr "" + +#: library/asyncio-llapi-index.rst:341 +msgid ":meth:`transport.can_write_eof() `" +msgstr "" + +#: library/asyncio-llapi-index.rst:342 +msgid "Return :const:`True` if the transport supports sending EOF." +msgstr "" + +#: library/asyncio-llapi-index.rst:344 +msgid ":meth:`transport.write_eof() `" +msgstr "" + +#: library/asyncio-llapi-index.rst:345 +msgid "Close and send EOF after flushing buffered data." +msgstr "" + +#: library/asyncio-llapi-index.rst:347 +msgid ":meth:`transport.abort() `" +msgstr "" + +#: library/asyncio-llapi-index.rst:348 library/asyncio-llapi-index.rst:374 +msgid "Close the transport immediately." +msgstr "" + +#: library/asyncio-llapi-index.rst:350 +msgid "" +":meth:`transport.get_write_buffer_size() `" +msgstr "" + +#: library/asyncio-llapi-index.rst:352 +#, fuzzy +msgid "Return the current size of the output buffer." +msgstr "Renvoie le protocole courant." + +#: library/asyncio-llapi-index.rst:354 +msgid "" +":meth:`transport.get_write_buffer_limits() `" +msgstr "" + +#: library/asyncio-llapi-index.rst:356 +msgid "Return high and low water marks for write flow control." +msgstr "" + +#: library/asyncio-llapi-index.rst:358 +msgid "" +":meth:`transport.set_write_buffer_limits() `" +msgstr "" + +#: library/asyncio-llapi-index.rst:360 +msgid "Set new high and low water marks for write flow control." +msgstr "" + +#: library/asyncio-llapi-index.rst:363 +msgid "Transports returned by :meth:`loop.create_datagram_endpoint`:" +msgstr "" + +#: library/asyncio-llapi-index.rst:365 +msgid "Datagram Transports" +msgstr "Transports de datagrammes" + +#: library/asyncio-llapi-index.rst:370 +msgid ":meth:`transport.sendto() `" +msgstr "" + +#: library/asyncio-llapi-index.rst:371 +msgid "Send data to the remote peer." +msgstr "" + +#: library/asyncio-llapi-index.rst:373 +msgid ":meth:`transport.abort() `" +msgstr "" + +#: library/asyncio-llapi-index.rst:377 +msgid "" +"Low-level transport abstraction over subprocesses. Returned by :meth:`loop." +"subprocess_exec` and :meth:`loop.subprocess_shell`:" +msgstr "" + +#: library/asyncio-llapi-index.rst:381 +msgid "Subprocess Transports" +msgstr "Transports vers des sous-processus" + +#: library/asyncio-llapi-index.rst:386 +msgid ":meth:`transport.get_pid() `" +msgstr "" + +#: library/asyncio-llapi-index.rst:387 +msgid "Return the subprocess process id." +msgstr "" + +#: library/asyncio-llapi-index.rst:389 +msgid "" +":meth:`transport.get_pipe_transport() `" +msgstr "" + +#: library/asyncio-llapi-index.rst:391 +msgid "" +"Return the transport for the requested communication pipe (*stdin*, " +"*stdout*, or *stderr*)." +msgstr "" + +#: library/asyncio-llapi-index.rst:394 +msgid ":meth:`transport.get_returncode() `" +msgstr "" + +#: library/asyncio-llapi-index.rst:395 +msgid "Return the subprocess return code." +msgstr "" + +#: library/asyncio-llapi-index.rst:397 +msgid ":meth:`transport.kill() `" +msgstr "" + +#: library/asyncio-llapi-index.rst:398 +msgid "Kill the subprocess." +msgstr "Tue le sous-processus." + +#: library/asyncio-llapi-index.rst:400 +msgid ":meth:`transport.send_signal() `" +msgstr "" + +#: library/asyncio-llapi-index.rst:401 +msgid "Send a signal to the subprocess." +msgstr "" + +#: library/asyncio-llapi-index.rst:403 +msgid ":meth:`transport.terminate() `" +msgstr "" + +#: library/asyncio-llapi-index.rst:404 +msgid "Stop the subprocess." +msgstr "Termine le sous-processus." + +#: library/asyncio-llapi-index.rst:406 +msgid ":meth:`transport.close() `" +msgstr "" + +#: library/asyncio-llapi-index.rst:407 +msgid "Kill the subprocess and close all pipes." +msgstr "" + +#: library/asyncio-llapi-index.rst:411 +msgid "Protocols" +msgstr "Protocoles" + +#: library/asyncio-llapi-index.rst:413 +msgid "Protocol classes can implement the following **callback methods**:" +msgstr "" + +#: library/asyncio-llapi-index.rst:419 +msgid "``callback`` :meth:`connection_made() `" +msgstr "" + +#: library/asyncio-llapi-index.rst:420 +msgid "Called when a connection is made." +msgstr "Appelé lorsqu'une connexion est établie." + +#: library/asyncio-llapi-index.rst:422 +msgid "``callback`` :meth:`connection_lost() `" +msgstr "" + +#: library/asyncio-llapi-index.rst:423 +msgid "Called when the connection is lost or closed." +msgstr "Appelé lorsqu'une connexion est perdue ou fermée." + +#: library/asyncio-llapi-index.rst:425 +msgid "``callback`` :meth:`pause_writing() `" +msgstr "" + +#: library/asyncio-llapi-index.rst:426 +msgid "Called when the transport's buffer goes over the high water mark." +msgstr "" + +#: library/asyncio-llapi-index.rst:428 +msgid "``callback`` :meth:`resume_writing() `" +msgstr "" + +#: library/asyncio-llapi-index.rst:429 +msgid "Called when the transport's buffer drains below the low water mark." +msgstr "" + +#: library/asyncio-llapi-index.rst:432 +msgid "Streaming Protocols (TCP, Unix Sockets, Pipes)" +msgstr "" + +#: library/asyncio-llapi-index.rst:437 +msgid "``callback`` :meth:`data_received() `" +msgstr "" + +#: library/asyncio-llapi-index.rst:438 +msgid "Called when some data is received." +msgstr "" + +#: library/asyncio-llapi-index.rst:440 +msgid "``callback`` :meth:`eof_received() `" +msgstr "" + +#: library/asyncio-llapi-index.rst:441 library/asyncio-llapi-index.rst:456 +msgid "Called when an EOF is received." +msgstr "" + +#: library/asyncio-llapi-index.rst:444 +msgid "Buffered Streaming Protocols" +msgstr "" + +#: library/asyncio-llapi-index.rst:449 +msgid "``callback`` :meth:`get_buffer() `" +msgstr "" + +#: library/asyncio-llapi-index.rst:450 +msgid "Called to allocate a new receive buffer." +msgstr "" + +#: library/asyncio-llapi-index.rst:452 +msgid "``callback`` :meth:`buffer_updated() `" +msgstr "" + +#: library/asyncio-llapi-index.rst:453 +msgid "Called when the buffer was updated with the received data." +msgstr "" + +#: library/asyncio-llapi-index.rst:455 +msgid "``callback`` :meth:`eof_received() `" +msgstr "" + +#: library/asyncio-llapi-index.rst:459 +msgid "Datagram Protocols" +msgstr "Protocoles non-connectés" + +#: library/asyncio-llapi-index.rst:464 +msgid "" +"``callback`` :meth:`datagram_received() `" +msgstr "" + +#: library/asyncio-llapi-index.rst:466 +msgid "Called when a datagram is received." +msgstr "" + +#: library/asyncio-llapi-index.rst:468 +msgid "``callback`` :meth:`error_received() `" +msgstr "" + +#: library/asyncio-llapi-index.rst:469 +msgid "" +"Called when a previous send or receive operation raises an :class:`OSError`." +msgstr "" + +#: library/asyncio-llapi-index.rst:473 +msgid "Subprocess Protocols" +msgstr "Protocoles liés aux sous-processus" + +#: library/asyncio-llapi-index.rst:478 +msgid "" +"``callback`` :meth:`pipe_data_received() `" +msgstr "" + +#: library/asyncio-llapi-index.rst:480 +#, fuzzy +msgid "" +"Called when the child process writes data into its *stdout* or *stderr* pipe." +msgstr "" +"Appelé lorsqu'un processus enfant écrit sur sa sortie d'erreur ou sa sortie " +"standard." + +#: library/asyncio-llapi-index.rst:483 +msgid "" +"``callback`` :meth:`pipe_connection_lost() `" +msgstr "" + +#: library/asyncio-llapi-index.rst:485 +msgid "" +"Called when one of the pipes communicating with the child process is closed." +msgstr "" +"Appelé lorsqu'une des *pipe*\\ s de communication avec un sous-processus est " +"fermée." + +#: library/asyncio-llapi-index.rst:488 +msgid "" +"``callback`` :meth:`process_exited() `" +msgstr "" + +#: library/asyncio-llapi-index.rst:490 +msgid "Called when the child process has exited." +msgstr "Appelé lorsqu'un processus enfant se termine." + +#: library/asyncio-llapi-index.rst:494 +msgid "Event Loop Policies" +msgstr "" + +#: library/asyncio-llapi-index.rst:496 +msgid "" +"Policies is a low-level mechanism to alter the behavior of functions like :" +"func:`asyncio.get_event_loop`. See also the main :ref:`policies section " +"` for more details." +msgstr "" + +#: library/asyncio-llapi-index.rst:502 +msgid "Accessing Policies" +msgstr "" + +#: library/asyncio-llapi-index.rst:507 +msgid ":meth:`asyncio.get_event_loop_policy`" +msgstr ":meth:`asyncio.get_event_loop_policy`" + +#: library/asyncio-llapi-index.rst:508 +msgid "Return the current process-wide policy." +msgstr "Renvoie la stratégie actuelle à l'échelle du processus." + +#: library/asyncio-llapi-index.rst:510 +msgid ":meth:`asyncio.set_event_loop_policy`" +msgstr ":meth:`asyncio.set_event_loop_policy`" + +#: library/asyncio-llapi-index.rst:511 +msgid "Set a new process-wide policy." +msgstr "" + +#: library/asyncio-llapi-index.rst:513 +msgid ":class:`AbstractEventLoopPolicy`" +msgstr ":class:`AbstractEventLoopPolicy`" + +#: library/asyncio-llapi-index.rst:514 +msgid "Base class for policy objects." +msgstr "" diff --git a/library/asyncio-platforms.po b/library/asyncio-platforms.po new file mode 100644 index 0000000000..af3d408cfa --- /dev/null +++ b/library/asyncio-platforms.po @@ -0,0 +1,151 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +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: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \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" + +#: library/asyncio-platforms.rst:9 +msgid "Platform Support" +msgstr "" + +#: library/asyncio-platforms.rst:11 +msgid "" +"The :mod:`asyncio` module is designed to be portable, but some platforms " +"have subtle differences and limitations due to the platforms' underlying " +"architecture and capabilities." +msgstr "" + +#: library/asyncio-platforms.rst:17 +msgid "All Platforms" +msgstr "" + +#: library/asyncio-platforms.rst:19 +msgid "" +":meth:`loop.add_reader` and :meth:`loop.add_writer` cannot be used to " +"monitor file I/O." +msgstr "" + +#: library/asyncio-platforms.rst:24 +msgid "Windows" +msgstr "Windows" + +#: library/asyncio-platforms.rst:26 +msgid "" +"**Source code:** :source:`Lib/asyncio/proactor_events.py`, :source:`Lib/" +"asyncio/windows_events.py`, :source:`Lib/asyncio/windows_utils.py`" +msgstr "" + +#: library/asyncio-platforms.rst:34 +msgid "On Windows, :class:`ProactorEventLoop` is now the default event loop." +msgstr "" + +#: library/asyncio-platforms.rst:36 +msgid "All event loops on Windows do not support the following methods:" +msgstr "" + +#: library/asyncio-platforms.rst:38 +msgid "" +":meth:`loop.create_unix_connection` and :meth:`loop.create_unix_server` are " +"not supported. The :data:`socket.AF_UNIX` socket family is specific to Unix." +msgstr "" + +#: library/asyncio-platforms.rst:42 +msgid "" +":meth:`loop.add_signal_handler` and :meth:`loop.remove_signal_handler` are " +"not supported." +msgstr "" + +#: library/asyncio-platforms.rst:45 +msgid ":class:`SelectorEventLoop` has the following limitations:" +msgstr "" + +#: library/asyncio-platforms.rst:47 +msgid "" +":class:`~selectors.SelectSelector` is used to wait on socket events: it " +"supports sockets and is limited to 512 sockets." +msgstr "" + +#: library/asyncio-platforms.rst:50 +msgid "" +":meth:`loop.add_reader` and :meth:`loop.add_writer` only accept socket " +"handles (e.g. pipe file descriptors are not supported)." +msgstr "" + +#: library/asyncio-platforms.rst:53 +msgid "" +"Pipes are not supported, so the :meth:`loop.connect_read_pipe` and :meth:" +"`loop.connect_write_pipe` methods are not implemented." +msgstr "" + +#: library/asyncio-platforms.rst:56 +msgid "" +":ref:`Subprocesses ` are not supported, i.e. :meth:`loop." +"subprocess_exec` and :meth:`loop.subprocess_shell` methods are not " +"implemented." +msgstr "" + +#: library/asyncio-platforms.rst:60 +msgid ":class:`ProactorEventLoop` has the following limitations:" +msgstr "" + +#: library/asyncio-platforms.rst:62 +msgid "" +"The :meth:`loop.add_reader` and :meth:`loop.add_writer` methods are not " +"supported." +msgstr "" + +#: library/asyncio-platforms.rst:65 +msgid "" +"The resolution of the monotonic clock on Windows is usually around 15.6 " +"msec. The best resolution is 0.5 msec. The resolution depends on the " +"hardware (availability of `HPET `_) and on the Windows configuration." +msgstr "" + +#: library/asyncio-platforms.rst:75 +msgid "Subprocess Support on Windows" +msgstr "" + +#: library/asyncio-platforms.rst:77 +msgid "" +"On Windows, the default event loop :class:`ProactorEventLoop` supports " +"subprocesses, whereas :class:`SelectorEventLoop` does not." +msgstr "" + +#: library/asyncio-platforms.rst:80 +msgid "" +"The :meth:`policy.set_child_watcher() ` function is also not supported, as :class:" +"`ProactorEventLoop` has a different mechanism to watch child processes." +msgstr "" + +#: library/asyncio-platforms.rst:87 +msgid "macOS" +msgstr "macOS" + +#: library/asyncio-platforms.rst:89 +msgid "Modern macOS versions are fully supported." +msgstr "" + +#: library/asyncio-platforms.rst:92 +msgid "macOS <= 10.8" +msgstr "" + +#: library/asyncio-platforms.rst:93 +msgid "" +"On macOS 10.6, 10.7 and 10.8, the default event loop uses :class:`selectors." +"KqueueSelector`, which does not support character devices on these " +"versions. The :class:`SelectorEventLoop` can be manually configured to use :" +"class:`~selectors.SelectSelector` or :class:`~selectors.PollSelector` to " +"support character devices on these older versions of macOS. Example::" +msgstr "" diff --git a/library/asyncio-policy.po b/library/asyncio-policy.po new file mode 100644 index 0000000000..8ef9b022a9 --- /dev/null +++ b/library/asyncio-policy.po @@ -0,0 +1,480 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-22 22:57+0100\n" +"PO-Revision-Date: 2019-11-17 01:26+0100\n" +"Last-Translator: Mathieu Dupuy \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" + +#: library/asyncio-policy.rst:8 +msgid "Policies" +msgstr "Stratégies" + +#: library/asyncio-policy.rst:10 +msgid "" +"An event loop policy is a global object used to get and set the current :ref:" +"`event loop `, as well as create new event loops. The " +"default policy can be :ref:`replaced ` with :ref:" +"`built-in alternatives ` to use different event loop " +"implementations, or substituted by a :ref:`custom policy ` that can override these behaviors." +msgstr "" + +#: library/asyncio-policy.rst:19 +#, fuzzy +msgid "" +"The :ref:`policy object ` gets and sets a separate " +"event loop per *context*. This is per-thread by default, though custom " +"policies could define *context* differently." +msgstr "" +"Une stratégie définit la notion de *contexte* et gère une boucle d'événement " +"distincte par contexte. La stratégie par défaut définit le *contexte* comme " +"étant le fil d'exécution actuel." + +#: library/asyncio-policy.rst:24 +#, fuzzy +msgid "" +"Custom event loop policies can control the behavior of :func:" +"`get_event_loop`, :func:`set_event_loop`, and :func:`new_event_loop`." +msgstr "" +"En utilisant une stratégie de boucle d'événement personnalisée, le " +"comportement des fonctions :func:`get_event_loop`, :func:`set_event_loop` " +"et :func:`new_event_loop` peut être personnalisé." + +#: library/asyncio-policy.rst:27 +msgid "" +"Policy objects should implement the APIs defined in the :class:" +"`AbstractEventLoopPolicy` abstract base class." +msgstr "" +"Les objets de stratégie doivent implémenter les API définies dans la classe " +"de base abstraite :class:`AbstractEventLoopPolicy`." + +#: library/asyncio-policy.rst:34 +msgid "Getting and Setting the Policy" +msgstr "Obtenir et définir la stratégie" + +#: library/asyncio-policy.rst:36 +msgid "" +"The following functions can be used to get and set the policy for the " +"current process:" +msgstr "" +"Les fonctions suivantes peuvent être utilisées pour obtenir et définir la " +"stratégie du processus en cours :" + +#: library/asyncio-policy.rst:41 +msgid "Return the current process-wide policy." +msgstr "Renvoie la stratégie actuelle à l'échelle du processus." + +#: library/asyncio-policy.rst:45 +msgid "Set the current process-wide policy to *policy*." +msgstr "" +"Définit la stratégie actuelle sur l'ensemble du processus sur *policy*." + +#: library/asyncio-policy.rst:47 +msgid "If *policy* is set to ``None``, the default policy is restored." +msgstr "" +"Si *policy* est définie sur ``None``, la stratégie par défaut est restaurée." + +#: library/asyncio-policy.rst:53 +msgid "Policy Objects" +msgstr "Sujets de stratégie" + +#: library/asyncio-policy.rst:55 +msgid "The abstract event loop policy base class is defined as follows:" +msgstr "" +"La classe de base abstraite de la stratégie de boucle d'événements est " +"définie comme suit:" + +#: library/asyncio-policy.rst:59 +msgid "An abstract base class for asyncio policies." +msgstr "Une classe de base abstraite pour les stratégies *asyncio*." + +#: library/asyncio-policy.rst:63 +msgid "Get the event loop for the current context." +msgstr "Récupère la boucle d'évènements pour le contexte actuel." + +#: library/asyncio-policy.rst:65 +msgid "" +"Return an event loop object implementing the :class:`AbstractEventLoop` " +"interface." +msgstr "" +"Renvoie un objet de boucle d'événements en implémentant l'interface :class:" +"`AbstractEventLoop`." + +#: library/asyncio-policy.rst:80 +msgid "This method should never return ``None``." +msgstr "Cette méthode ne devrait jamais renvoyer ``None``." + +#: library/asyncio-policy.rst:74 +msgid "Set the event loop for the current context to *loop*." +msgstr "Définit la boucle d'événements du contexte actuel sur *loop*." + +#: library/asyncio-policy.rst:78 +msgid "Create and return a new event loop object." +msgstr "Crée et renvoie un nouvel objet de boucle d'événements." + +#: library/asyncio-policy.rst:84 +msgid "Get a child process watcher object." +msgstr "Récupère un objet observateur du processus enfant." + +#: library/asyncio-policy.rst:86 +msgid "" +"Return a watcher object implementing the :class:`AbstractChildWatcher` " +"interface." +msgstr "" +"Renvoie un objet observateur implémentant l'interface :class:" +"`AbstractChildWatcher`." + +#: library/asyncio-policy.rst:95 +msgid "This function is Unix specific." +msgstr "Cette fonction est spécifique à Unix." + +#: library/asyncio-policy.rst:93 +msgid "Set the current child process watcher to *watcher*." +msgstr "Définit l'observateur du processus enfant actuel à *watcher*." + +#: library/asyncio-policy.rst:100 +msgid "asyncio ships with the following built-in policies:" +msgstr "*asyncio* est livré avec les stratégies intégrées suivantes :" + +#: library/asyncio-policy.rst:105 +msgid "" +"The default asyncio policy. Uses :class:`SelectorEventLoop` on Unix and :" +"class:`ProactorEventLoop` on Windows." +msgstr "" +"La stratégie *asyncio* par défaut. Utilise :class:`SelectorEventLoop` sur " +"les plates-formes Unix et :class:`ProactorEventLoop` sur Windows." + +#: library/asyncio-policy.rst:108 +msgid "" +"There is no need to install the default policy manually. asyncio is " +"configured to use the default policy automatically." +msgstr "" +"Il n'est pas nécessaire d'installer la stratégie par défaut manuellement. " +"*asyncio* est configuré pour utiliser automatiquement la stratégie par " +"défaut." + +#: library/asyncio-policy.rst:113 +msgid "On Windows, :class:`ProactorEventLoop` is now used by default." +msgstr "" + +#: library/asyncio-policy.rst:116 +msgid "" +"In Python versions 3.10.9, 3.11.1 and 3.12 the :meth:`get_event_loop` method " +"of the default asyncio policy emits a :exc:`DeprecationWarning` if there is " +"no running event loop and no current loop is set. In some future Python " +"release this will become an error." +msgstr "" + +#: library/asyncio-policy.rst:124 +msgid "" +"An alternative event loop policy that uses the :class:`SelectorEventLoop` " +"event loop implementation." +msgstr "" +"Stratégie de boucle d'événements alternative utilisant l'implémentation de " +"la boucle d'événements :class:`ProactorEventLoop`." + +#: library/asyncio-policy.rst:135 +msgid ":ref:`Availability `: Windows." +msgstr ":ref:`Disponibilité ` : Windows." + +#: library/asyncio-policy.rst:132 +#, fuzzy +msgid "" +"An alternative event loop policy that uses the :class:`ProactorEventLoop` " +"event loop implementation." +msgstr "" +"Stratégie de boucle d'événements alternative utilisant l'implémentation de " +"la boucle d'événements :class:`ProactorEventLoop`." + +#: library/asyncio-policy.rst:141 +msgid "Process Watchers" +msgstr "Observateurs de processus" + +#: library/asyncio-policy.rst:143 +msgid "" +"A process watcher allows customization of how an event loop monitors child " +"processes on Unix. Specifically, the event loop needs to know when a child " +"process has exited." +msgstr "" +"Un observateur de processus permet de personnaliser la manière dont une " +"boucle d'événements surveille les processus enfants sous Unix. Plus " +"précisément, la boucle d'événements a besoin de savoir quand un processus " +"enfant s'est terminé." + +#: library/asyncio-policy.rst:147 +msgid "" +"In asyncio, child processes are created with :func:`create_subprocess_exec` " +"and :meth:`loop.subprocess_exec` functions." +msgstr "" +"Dans *asyncio*, les processus enfants sont créés avec les fonctions :func:" +"`create_subprocess_exec` et :meth:`loop.subprocess_exec`." + +#: library/asyncio-policy.rst:151 +#, fuzzy +msgid "" +"asyncio defines the :class:`AbstractChildWatcher` abstract base class, which " +"child watchers should implement, and has four different implementations: :" +"class:`ThreadedChildWatcher` (configured to be used by default), :class:" +"`MultiLoopChildWatcher`, :class:`SafeChildWatcher`, and :class:" +"`FastChildWatcher`." +msgstr "" +"*asyncio* définit la classe de base abstraite :class:`AbstractChildWatcher`, " +"que les observateurs enfants doivent implémenter et possède deux " +"implémentations différentes : :class:`SafeChildWatcher` (configurée pour " +"être utilisé par défaut) et :class:`FastChildWatcher`." + +#: library/asyncio-policy.rst:157 +msgid "" +"See also the :ref:`Subprocess and Threads ` " +"section." +msgstr "" +"Voir aussi la section :ref:`sous-processus et fils d'exécution `." + +#: library/asyncio-policy.rst:160 +msgid "" +"The following two functions can be used to customize the child process " +"watcher implementation used by the asyncio event loop:" +msgstr "" +"Les deux fonctions suivantes peuvent être utilisées pour personnaliser " +"l'implémentation de l'observateur de processus enfant utilisé par la boucle " +"d'événements *asyncio* :" + +#: library/asyncio-policy.rst:165 +msgid "Return the current child watcher for the current policy." +msgstr "Renvoie l'observateur enfant actuel pour la stratégie actuelle." + +#: library/asyncio-policy.rst:169 +msgid "" +"Set the current child watcher to *watcher* for the current policy. " +"*watcher* must implement methods defined in the :class:" +"`AbstractChildWatcher` base class." +msgstr "" +"Définit l'observateur enfant actuel à *watcher* pour la stratégie actuelle. " +"*watcher* doit implémenter les méthodes définies dans la classe de base :" +"class:`AbstractChildWatcher`." + +#: library/asyncio-policy.rst:174 +msgid "" +"Third-party event loops implementations might not support custom child " +"watchers. For such event loops, using :func:`set_child_watcher` might be " +"prohibited or have no effect." +msgstr "" +"Les implémentations de boucles d'événement tierces peuvent ne pas prendre en " +"charge les observateurs enfants personnalisés. Pour ces boucles " +"d'événements, utiliser :func:`set_child_watcher` pourrait être interdit ou " +"n'avoir aucun effet." + +#: library/asyncio-policy.rst:182 +msgid "Register a new child handler." +msgstr "Enregistre un nouveau gestionnaire." + +#: library/asyncio-policy.rst:184 +msgid "" +"Arrange for ``callback(pid, returncode, *args)`` to be called when a process " +"with PID equal to *pid* terminates. Specifying another callback for the " +"same process replaces the previous handler." +msgstr "" +"Organise l'appel de ``callback(pid, returncode, * args)`` lorsqu'un " +"processus dont le PID est égal à *pid* se termine. La spécification d'un " +"autre rappel pour le même processus remplace le gestionnaire précédent." + +#: library/asyncio-policy.rst:189 +msgid "The *callback* callable must be thread-safe." +msgstr "" +"L'appelable *callback* doit être compatible avec les programmes à fils " +"d'exécution multiples." + +#: library/asyncio-policy.rst:193 +msgid "Removes the handler for process with PID equal to *pid*." +msgstr "Supprime le gestionnaire de processus avec un PID égal à *pid*." + +#: library/asyncio-policy.rst:195 +msgid "" +"The function returns ``True`` if the handler was successfully removed, " +"``False`` if there was nothing to remove." +msgstr "" +"La fonction renvoie ``True`` si le gestionnaire a été supprimé avec succès, " +"``False`` s'il n'y a rien à supprimer." + +#: library/asyncio-policy.rst:200 +msgid "Attach the watcher to an event loop." +msgstr "Attache l'observateur à une boucle d'événement." + +#: library/asyncio-policy.rst:202 +msgid "" +"If the watcher was previously attached to an event loop, then it is first " +"detached before attaching to the new loop." +msgstr "" +"Si l'observateur était précédemment attaché à une boucle d'événements, il " +"est d'abord détaché avant d'être rattaché à la nouvelle boucle." + +#: library/asyncio-policy.rst:205 +msgid "Note: loop may be ``None``." +msgstr "Remarque : la boucle peut être ``None``." + +#: library/asyncio-policy.rst:209 +msgid "Return ``True`` if the watcher is ready to use." +msgstr "" + +#: library/asyncio-policy.rst:211 +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:218 +msgid "Close the watcher." +msgstr "Ferme l'observateur." + +#: library/asyncio-policy.rst:220 +msgid "" +"This method has to be called to ensure that underlying resources are cleaned-" +"up." +msgstr "" +"Cette méthode doit être appelée pour s'assurer que les ressources sous-" +"jacentes sont nettoyées." + +#: library/asyncio-policy.rst:225 +#, fuzzy +msgid "" +"This implementation starts a new waiting thread for every subprocess spawn." +msgstr "" +"Cette implémentation évite de perturber un autre code qui aurait besoin de " +"générer des processus en interrogeant chaque processus explicitement par un " +"signal :py:data:`SIGCHLD`." + +#: library/asyncio-policy.rst:227 +#, fuzzy +msgid "" +"It works reliably even when the asyncio event loop is run in a non-main OS " +"thread." +msgstr "" +"C'est une solution sûre, mais elle nécessite un temps système important lors " +"de la manipulation d'un grand nombre de processus (*O(n)* à chaque fois que " +"un :py:data:`SIGCHLD` est reçu)." + +#: library/asyncio-policy.rst:229 +#, fuzzy +msgid "" +"There is no noticeable overhead when handling a big number of children " +"(*O(1)* each time a child terminates), but starting a thread per process " +"requires extra memory." +msgstr "" +"Il n'y a pas de surcharge visible lors de la manipulation d'un grand nombre " +"d'enfants (*O(1)* à chaque fois qu'un enfant se termine)." + +#: library/asyncio-policy.rst:232 +msgid "This watcher is used by default." +msgstr "" + +#: library/asyncio-policy.rst:238 +msgid "" +"This implementation registers a :py:data:`SIGCHLD` signal handler on " +"instantiation. That can break third-party code that installs a custom " +"handler for :py:data:`SIGCHLD` signal." +msgstr "" + +#: library/asyncio-policy.rst:260 +msgid "" +"The watcher avoids disrupting other code spawning processes by polling every " +"process explicitly on a :py:data:`SIGCHLD` signal." +msgstr "" + +#: library/asyncio-policy.rst:245 +msgid "" +"There is no limitation for running subprocesses from different threads once " +"the watcher is installed." +msgstr "" + +#: library/asyncio-policy.rst:248 +msgid "" +"The solution is safe but it has a significant overhead when handling a big " +"number of processes (*O(n)* each time a :py:data:`SIGCHLD` is received)." +msgstr "" + +#: library/asyncio-policy.rst:256 +msgid "" +"This implementation uses active event loop from the main thread to handle :" +"py:data:`SIGCHLD` signal. If the main thread has no running event loop " +"another thread cannot spawn a subprocess (:exc:`RuntimeError` is raised)." +msgstr "" + +#: library/asyncio-policy.rst:263 +msgid "" +"This solution is as safe as :class:`MultiLoopChildWatcher` and has the same " +"*O(N)* complexity but requires a running event loop in the main thread to " +"work." +msgstr "" + +#: library/asyncio-policy.rst:268 +msgid "" +"This implementation reaps every terminated processes by calling ``os." +"waitpid(-1)`` directly, possibly breaking other code spawning processes and " +"waiting for their termination." +msgstr "" +"Cette implémentation récupère tous les processus terminés en appelant " +"directement ``os.waitpid(-1)``, cassant éventuellement un autre code qui " +"génère des processus et attend leur fin." + +#: library/asyncio-policy.rst:272 +msgid "" +"There is no noticeable overhead when handling a big number of children " +"(*O(1)* each time a child terminates)." +msgstr "" +"Il n'y a pas de surcharge visible lors de la manipulation d'un grand nombre " +"d'enfants (*O(1)* à chaque fois qu'un enfant se termine)." + +#: library/asyncio-policy.rst:275 +msgid "" +"This solution requires a running event loop in the main thread to work, as :" +"class:`SafeChildWatcher`." +msgstr "" + +#: library/asyncio-policy.rst:280 +msgid "" +"This implementation polls process file descriptors (pidfds) to await child " +"process termination. In some respects, :class:`PidfdChildWatcher` is a " +"\"Goldilocks\" child watcher implementation. It doesn't require signals or " +"threads, doesn't interfere with any processes launched outside the event " +"loop, and scales linearly with the number of subprocesses launched by the " +"event loop. The main disadvantage is that pidfds are specific to Linux, and " +"only work on recent (5.3+) kernels." +msgstr "" + +#: library/asyncio-policy.rst:294 +msgid "Custom Policies" +msgstr "Stratégies personnalisées" + +#: library/asyncio-policy.rst:296 +msgid "" +"To implement a new event loop policy, it is recommended to subclass :class:" +"`DefaultEventLoopPolicy` and override the methods for which custom behavior " +"is wanted, e.g.::" +msgstr "" +"Pour implémenter une nouvelle politique de boucle d’événements, il est " +"recommandé de sous-classer :class:`DefaultEventLoopPolicy` et de " +"réimplémenter les méthodes pour lesquelles un comportement personnalisé est " +"souhaité, par exemple ::" + +#~ msgid "" +#~ "An event loop policy is a global per-process object that controls the " +#~ "management of the event loop. Each event loop has a default policy, which " +#~ "can be changed and customized using the policy API." +#~ msgstr "" +#~ "Une stratégie de boucle d'événements est un objet global, pour chaque " +#~ "processus, qui contrôle la gestion de la boucle d'événement. Chaque " +#~ "boucle d'événement a une stratégie par défaut, qui peut être modifiée et " +#~ "personnalisée à l'aide de l'API de la stratégie." diff --git a/library/asyncio-protocol.po b/library/asyncio-protocol.po new file mode 100644 index 0000000000..1b9a21397b --- /dev/null +++ b/library/asyncio-protocol.po @@ -0,0 +1,1033 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-22 22:57+0100\n" +"PO-Revision-Date: 2019-06-18 22:29+0200\n" +"Last-Translator: Julien Palard \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" + +#: library/asyncio-protocol.rst:9 +msgid "Transports and Protocols" +msgstr "Transports et Protocoles" + +#: library/asyncio-protocol.rst:12 +msgid "Preface" +msgstr "" + +#: library/asyncio-protocol.rst:13 +msgid "" +"Transports and Protocols are used by the **low-level** event loop APIs such " +"as :meth:`loop.create_connection`. They use callback-based programming " +"style and enable high-performance implementations of network or IPC " +"protocols (e.g. HTTP)." +msgstr "" + +#: library/asyncio-protocol.rst:18 +msgid "" +"Essentially, transports and protocols should only be used in libraries and " +"frameworks and never in high-level asyncio applications." +msgstr "" + +#: library/asyncio-protocol.rst:22 +msgid "This documentation page covers both `Transports`_ and `Protocols`_." +msgstr "" + +#: library/asyncio-protocol.rst:25 +msgid "Introduction" +msgstr "Introduction" + +#: library/asyncio-protocol.rst:26 +msgid "" +"At the highest level, the transport is concerned with *how* bytes are " +"transmitted, while the protocol determines *which* bytes to transmit (and to " +"some extent when)." +msgstr "" + +#: library/asyncio-protocol.rst:30 +msgid "" +"A different way of saying the same thing: a transport is an abstraction for " +"a socket (or similar I/O endpoint) while a protocol is an abstraction for an " +"application, from the transport's point of view." +msgstr "" + +#: library/asyncio-protocol.rst:35 +msgid "" +"Yet another view is the transport and protocol interfaces together define an " +"abstract interface for using network I/O and interprocess I/O." +msgstr "" + +#: library/asyncio-protocol.rst:39 +msgid "" +"There is always a 1:1 relationship between transport and protocol objects: " +"the protocol calls transport methods to send data, while the transport calls " +"protocol methods to pass it data that has been received." +msgstr "" + +#: library/asyncio-protocol.rst:44 +msgid "" +"Most of connection oriented event loop methods (such as :meth:`loop." +"create_connection`) usually accept a *protocol_factory* argument used to " +"create a *Protocol* object for an accepted connection, represented by a " +"*Transport* object. Such methods usually return a tuple of ``(transport, " +"protocol)``." +msgstr "" + +#: library/asyncio-protocol.rst:51 +msgid "Contents" +msgstr "Sommaire" + +#: library/asyncio-protocol.rst:52 +msgid "This documentation page contains the following sections:" +msgstr "" + +#: library/asyncio-protocol.rst:54 +msgid "" +"The `Transports`_ section documents asyncio :class:`BaseTransport`, :class:" +"`ReadTransport`, :class:`WriteTransport`, :class:`Transport`, :class:" +"`DatagramTransport`, and :class:`SubprocessTransport` classes." +msgstr "" + +#: library/asyncio-protocol.rst:59 +msgid "" +"The `Protocols`_ section documents asyncio :class:`BaseProtocol`, :class:" +"`Protocol`, :class:`BufferedProtocol`, :class:`DatagramProtocol`, and :class:" +"`SubprocessProtocol` classes." +msgstr "" + +#: library/asyncio-protocol.rst:63 +msgid "" +"The `Examples`_ section showcases how to work with transports, protocols, " +"and low-level event loop APIs." +msgstr "" + +#: library/asyncio-protocol.rst:70 +msgid "Transports" +msgstr "Transports" + +#: library/asyncio-protocol.rst:72 +msgid "**Source code:** :source:`Lib/asyncio/transports.py`" +msgstr "" + +#: library/asyncio-protocol.rst:76 +msgid "" +"Transports are classes provided by :mod:`asyncio` in order to abstract " +"various kinds of communication channels." +msgstr "" + +#: library/asyncio-protocol.rst:79 +msgid "" +"Transport objects are always instantiated by an :ref:`asyncio event loop " +"`." +msgstr "" + +#: library/asyncio-protocol.rst:82 +msgid "" +"asyncio implements transports for TCP, UDP, SSL, and subprocess pipes. The " +"methods available on a transport depend on the transport's kind." +msgstr "" + +#: library/asyncio-protocol.rst:85 +msgid "" +"The transport classes are :ref:`not thread safe `." +msgstr "" + +#: library/asyncio-protocol.rst:89 +msgid "Transports Hierarchy" +msgstr "Hiérarchie des transports" + +#: library/asyncio-protocol.rst:93 +msgid "" +"Base class for all transports. Contains methods that all asyncio transports " +"share." +msgstr "" + +#: library/asyncio-protocol.rst:98 +msgid "A base transport for write-only connections." +msgstr "" + +#: library/asyncio-protocol.rst:100 +msgid "" +"Instances of the *WriteTransport* class are returned from the :meth:`loop." +"connect_write_pipe` event loop method and are also used by subprocess-" +"related methods like :meth:`loop.subprocess_exec`." +msgstr "" + +#: library/asyncio-protocol.rst:107 +msgid "A base transport for read-only connections." +msgstr "" + +#: library/asyncio-protocol.rst:109 +msgid "" +"Instances of the *ReadTransport* class are returned from the :meth:`loop." +"connect_read_pipe` event loop method and are also used by subprocess-related " +"methods like :meth:`loop.subprocess_exec`." +msgstr "" + +#: library/asyncio-protocol.rst:116 +msgid "" +"Interface representing a bidirectional transport, such as a TCP connection." +msgstr "" + +#: library/asyncio-protocol.rst:119 +msgid "" +"The user does not instantiate a transport directly; they call a utility " +"function, passing it a protocol factory and other information necessary to " +"create the transport and protocol." +msgstr "" + +#: library/asyncio-protocol.rst:123 +msgid "" +"Instances of the *Transport* class are returned from or used by event loop " +"methods like :meth:`loop.create_connection`, :meth:`loop." +"create_unix_connection`, :meth:`loop.create_server`, :meth:`loop.sendfile`, " +"etc." +msgstr "" + +#: library/asyncio-protocol.rst:131 +msgid "A transport for datagram (UDP) connections." +msgstr "" + +#: library/asyncio-protocol.rst:133 +msgid "" +"Instances of the *DatagramTransport* class are returned from the :meth:`loop." +"create_datagram_endpoint` event loop method." +msgstr "" + +#: library/asyncio-protocol.rst:139 +msgid "" +"An abstraction to represent a connection between a parent and its child OS " +"process." +msgstr "" + +#: library/asyncio-protocol.rst:142 +msgid "" +"Instances of the *SubprocessTransport* class are returned from event loop " +"methods :meth:`loop.subprocess_shell` and :meth:`loop.subprocess_exec`." +msgstr "" + +#: library/asyncio-protocol.rst:148 +msgid "Base Transport" +msgstr "Classe de base des Transports" + +#: library/asyncio-protocol.rst:152 +msgid "Close the transport." +msgstr "Ferme le transport." + +#: library/asyncio-protocol.rst:154 +msgid "" +"If the transport has a buffer for outgoing data, buffered data will be " +"flushed asynchronously. No more data will be received. After all buffered " +"data is flushed, the protocol's :meth:`protocol.connection_lost() " +"` method will be called with :const:`None` as " +"its argument. The transport should not be used once it is closed." +msgstr "" + +#: library/asyncio-protocol.rst:164 +msgid "Return ``True`` if the transport is closing or is closed." +msgstr "" + +#: library/asyncio-protocol.rst:168 +msgid "Return information about the transport or underlying resources it uses." +msgstr "" + +#: library/asyncio-protocol.rst:171 +msgid "" +"*name* is a string representing the piece of transport-specific information " +"to get." +msgstr "" + +#: library/asyncio-protocol.rst:174 +msgid "" +"*default* is the value to return if the information is not available, or if " +"the transport does not support querying it with the given third-party event " +"loop implementation or on the current platform." +msgstr "" + +#: library/asyncio-protocol.rst:179 +msgid "" +"For example, the following code attempts to get the underlying socket object " +"of the transport::" +msgstr "" + +#: library/asyncio-protocol.rst:186 +msgid "Categories of information that can be queried on some transports:" +msgstr "" + +#: library/asyncio-protocol.rst:188 +msgid "socket:" +msgstr "" + +#: library/asyncio-protocol.rst:190 +msgid "" +"``'peername'``: the remote address to which the socket is connected, result " +"of :meth:`socket.socket.getpeername` (``None`` on error)" +msgstr "" + +#: library/asyncio-protocol.rst:194 +msgid "``'socket'``: :class:`socket.socket` instance" +msgstr "``'socket'`` : Instance de :class:`socket.socket`" + +#: library/asyncio-protocol.rst:196 +msgid "" +"``'sockname'``: the socket's own address, result of :meth:`socket.socket." +"getsockname`" +msgstr "" + +#: library/asyncio-protocol.rst:199 +msgid "SSL socket:" +msgstr "Connecteur (*socket* en anglais) SSL :" + +#: library/asyncio-protocol.rst:201 +msgid "" +"``'compression'``: the compression algorithm being used as a string, or " +"``None`` if the connection isn't compressed; result of :meth:`ssl.SSLSocket." +"compression`" +msgstr "" + +#: library/asyncio-protocol.rst:205 +msgid "" +"``'cipher'``: a three-value tuple containing the name of the cipher being " +"used, the version of the SSL protocol that defines its use, and the number " +"of secret bits being used; result of :meth:`ssl.SSLSocket.cipher`" +msgstr "" + +#: library/asyncio-protocol.rst:210 +msgid "" +"``'peercert'``: peer certificate; result of :meth:`ssl.SSLSocket.getpeercert`" +msgstr "" + +#: library/asyncio-protocol.rst:213 +msgid "``'sslcontext'``: :class:`ssl.SSLContext` instance" +msgstr "``sslcontext'`` : Instance de :class:`ssl.SSLContext`" + +#: library/asyncio-protocol.rst:215 +msgid "" +"``'ssl_object'``: :class:`ssl.SSLObject` or :class:`ssl.SSLSocket` instance" +msgstr "" + +#: library/asyncio-protocol.rst:218 +msgid "pipe:" +msgstr "" + +#: library/asyncio-protocol.rst:220 +msgid "``'pipe'``: pipe object" +msgstr "``'pipe'`` : objet *pipe*" + +#: library/asyncio-protocol.rst:222 +msgid "subprocess:" +msgstr "sous-processus :" + +#: library/asyncio-protocol.rst:224 +msgid "``'subprocess'``: :class:`subprocess.Popen` instance" +msgstr "" + +#: library/asyncio-protocol.rst:228 +msgid "Set a new protocol." +msgstr "Change le protocole." + +#: library/asyncio-protocol.rst:230 +msgid "" +"Switching protocol should only be done when both protocols are documented to " +"support the switch." +msgstr "" + +#: library/asyncio-protocol.rst:235 +msgid "Return the current protocol." +msgstr "Renvoie le protocole courant." + +#: library/asyncio-protocol.rst:239 +msgid "Read-only Transports" +msgstr "Transports en lecture seule" + +#: library/asyncio-protocol.rst:243 +msgid "Return ``True`` if the transport is receiving new data." +msgstr "" + +#: library/asyncio-protocol.rst:249 +msgid "" +"Pause the receiving end of the transport. No data will be passed to the " +"protocol's :meth:`protocol.data_received() ` method " +"until :meth:`resume_reading` is called." +msgstr "" + +#: library/asyncio-protocol.rst:253 +msgid "" +"The method is idempotent, i.e. it can be called when the transport is " +"already paused or closed." +msgstr "" + +#: library/asyncio-protocol.rst:259 +msgid "" +"Resume the receiving end. The protocol's :meth:`protocol.data_received() " +"` method will be called once again if some data is " +"available for reading." +msgstr "" + +#: library/asyncio-protocol.rst:263 +msgid "" +"The method is idempotent, i.e. it can be called when the transport is " +"already reading." +msgstr "" + +#: library/asyncio-protocol.rst:269 +msgid "Write-only Transports" +msgstr "Transports en lecture/écriture" + +#: library/asyncio-protocol.rst:273 +msgid "" +"Close the transport immediately, without waiting for pending operations to " +"complete. Buffered data will be lost. No more data will be received. The " +"protocol's :meth:`protocol.connection_lost() ` " +"method will eventually be called with :const:`None` as its argument." +msgstr "" + +#: library/asyncio-protocol.rst:281 +msgid "" +"Return :const:`True` if the transport supports :meth:`~WriteTransport." +"write_eof`, :const:`False` if not." +msgstr "" + +#: library/asyncio-protocol.rst:286 +msgid "Return the current size of the output buffer used by the transport." +msgstr "" + +#: library/asyncio-protocol.rst:290 +msgid "" +"Get the *high* and *low* watermarks for write flow control. Return a tuple " +"``(low, high)`` where *low* and *high* are positive number of bytes." +msgstr "" + +#: library/asyncio-protocol.rst:294 +msgid "Use :meth:`set_write_buffer_limits` to set the limits." +msgstr "" + +#: library/asyncio-protocol.rst:300 +msgid "Set the *high* and *low* watermarks for write flow control." +msgstr "" + +#: library/asyncio-protocol.rst:302 +msgid "" +"These two values (measured in number of bytes) control when the protocol's :" +"meth:`protocol.pause_writing() ` and :meth:" +"`protocol.resume_writing() ` methods are " +"called. If specified, the low watermark must be less than or equal to the " +"high watermark. Neither *high* nor *low* can be negative." +msgstr "" + +#: library/asyncio-protocol.rst:310 +msgid "" +":meth:`~BaseProtocol.pause_writing` is called when the buffer size becomes " +"greater than or equal to the *high* value. If writing has been paused, :meth:" +"`~BaseProtocol.resume_writing` is called when the buffer size becomes less " +"than or equal to the *low* value." +msgstr "" + +#: library/asyncio-protocol.rst:315 +msgid "" +"The defaults are implementation-specific. If only the high watermark is " +"given, the low watermark defaults to an implementation-specific value less " +"than or equal to the high watermark. Setting *high* to zero forces *low* to " +"zero as well, and causes :meth:`~BaseProtocol.pause_writing` to be called " +"whenever the buffer becomes non-empty. Setting *low* to zero causes :meth:" +"`~BaseProtocol.resume_writing` to be called only once the buffer is empty. " +"Use of zero for either limit is generally sub-optimal as it reduces " +"opportunities for doing I/O and computation concurrently." +msgstr "" + +#: library/asyncio-protocol.rst:326 +msgid "Use :meth:`~WriteTransport.get_write_buffer_limits` to get the limits." +msgstr "" + +#: library/asyncio-protocol.rst:331 +msgid "Write some *data* bytes to the transport." +msgstr "Écrit des octets de *data* sur le transport." + +#: library/asyncio-protocol.rst:333 library/asyncio-protocol.rst:362 +msgid "" +"This method does not block; it buffers the data and arranges for it to be " +"sent out asynchronously." +msgstr "" + +#: library/asyncio-protocol.rst:338 +msgid "" +"Write a list (or any iterable) of data bytes to the transport. This is " +"functionally equivalent to calling :meth:`write` on each element yielded by " +"the iterable, but may be implemented more efficiently." +msgstr "" + +#: library/asyncio-protocol.rst:345 +msgid "" +"Close the write end of the transport after flushing all buffered data. Data " +"may still be received." +msgstr "" + +#: library/asyncio-protocol.rst:348 +msgid "" +"This method can raise :exc:`NotImplementedError` if the transport (e.g. SSL) " +"doesn't support half-closed connections." +msgstr "" + +#: library/asyncio-protocol.rst:353 +msgid "Datagram Transports" +msgstr "Transports de datagrammes" + +#: library/asyncio-protocol.rst:357 +msgid "" +"Send the *data* bytes to the remote peer given by *addr* (a transport-" +"dependent target address). If *addr* is :const:`None`, the data is sent to " +"the target address given on transport creation." +msgstr "" + +#: library/asyncio-protocol.rst:367 +msgid "" +"Close the transport immediately, without waiting for pending operations to " +"complete. Buffered data will be lost. No more data will be received. The " +"protocol's :meth:`protocol.connection_lost() ` " +"method will eventually be called with :const:`None` as its argument." +msgstr "" + +#: library/asyncio-protocol.rst:377 +msgid "Subprocess Transports" +msgstr "Transports vers des sous-processus" + +#: library/asyncio-protocol.rst:381 +msgid "Return the subprocess process id as an integer." +msgstr "" +"Donne l'identifiant du sous processus sous la forme d'un nombre entier." + +#: library/asyncio-protocol.rst:385 +msgid "" +"Return the transport for the communication pipe corresponding to the integer " +"file descriptor *fd*:" +msgstr "" + +#: library/asyncio-protocol.rst:388 +msgid "" +"``0``: readable streaming transport of the standard input (*stdin*), or :" +"const:`None` if the subprocess was not created with ``stdin=PIPE``" +msgstr "" + +#: library/asyncio-protocol.rst:390 +msgid "" +"``1``: writable streaming transport of the standard output (*stdout*), or :" +"const:`None` if the subprocess was not created with ``stdout=PIPE``" +msgstr "" + +#: library/asyncio-protocol.rst:392 +msgid "" +"``2``: writable streaming transport of the standard error (*stderr*), or :" +"const:`None` if the subprocess was not created with ``stderr=PIPE``" +msgstr "" + +#: library/asyncio-protocol.rst:394 +msgid "other *fd*: :const:`None`" +msgstr "autre *fd* : :const:`None`" + +#: library/asyncio-protocol.rst:398 +msgid "" +"Return the subprocess return code as an integer or :const:`None` if it " +"hasn't returned, which is similar to the :attr:`subprocess.Popen.returncode` " +"attribute." +msgstr "" + +#: library/asyncio-protocol.rst:404 +msgid "Kill the subprocess." +msgstr "Tue le sous-processus." + +#: library/asyncio-protocol.rst:406 +msgid "" +"On POSIX systems, the function sends SIGKILL to the subprocess. On Windows, " +"this method is an alias for :meth:`terminate`." +msgstr "" + +#: library/asyncio-protocol.rst:409 +msgid "See also :meth:`subprocess.Popen.kill`." +msgstr "" + +#: library/asyncio-protocol.rst:413 +msgid "" +"Send the *signal* number to the subprocess, as in :meth:`subprocess.Popen." +"send_signal`." +msgstr "" + +#: library/asyncio-protocol.rst:418 +msgid "Stop the subprocess." +msgstr "Termine le sous-processus." + +#: library/asyncio-protocol.rst:420 +msgid "" +"On POSIX systems, this method sends SIGTERM to the subprocess. On Windows, " +"the Windows API function TerminateProcess() is called to stop the subprocess." +msgstr "" + +#: library/asyncio-protocol.rst:424 +msgid "See also :meth:`subprocess.Popen.terminate`." +msgstr "" + +#: library/asyncio-protocol.rst:428 +msgid "Kill the subprocess by calling the :meth:`kill` method." +msgstr "" + +#: library/asyncio-protocol.rst:430 +msgid "" +"If the subprocess hasn't returned yet, and close transports of *stdin*, " +"*stdout*, and *stderr* pipes." +msgstr "" + +#: library/asyncio-protocol.rst:437 +msgid "Protocols" +msgstr "Protocoles" + +#: library/asyncio-protocol.rst:439 +msgid "**Source code:** :source:`Lib/asyncio/protocols.py`" +msgstr "" + +#: library/asyncio-protocol.rst:443 +msgid "" +"asyncio provides a set of abstract base classes that should be used to " +"implement network protocols. Those classes are meant to be used together " +"with :ref:`transports `." +msgstr "" + +#: library/asyncio-protocol.rst:447 +msgid "" +"Subclasses of abstract base protocol classes may implement some or all " +"methods. All these methods are callbacks: they are called by transports on " +"certain events, for example when some data is received. A base protocol " +"method should be called by the corresponding transport." +msgstr "" + +#: library/asyncio-protocol.rst:454 +msgid "Base Protocols" +msgstr "Protocoles de base" + +#: library/asyncio-protocol.rst:458 +msgid "Base protocol with methods that all protocols share." +msgstr "" + +#: library/asyncio-protocol.rst:462 +msgid "" +"The base class for implementing streaming protocols (TCP, Unix sockets, etc)." +msgstr "" + +#: library/asyncio-protocol.rst:467 +msgid "" +"A base class for implementing streaming protocols with manual control of the " +"receive buffer." +msgstr "" + +#: library/asyncio-protocol.rst:472 +msgid "The base class for implementing datagram (UDP) protocols." +msgstr "" + +#: library/asyncio-protocol.rst:476 +msgid "" +"The base class for implementing protocols communicating with child processes " +"(unidirectional pipes)." +msgstr "" + +#: library/asyncio-protocol.rst:481 +#, fuzzy +msgid "Base Protocol" +msgstr "Protocoles de base" + +#: library/asyncio-protocol.rst:483 +msgid "All asyncio protocols can implement Base Protocol callbacks." +msgstr "" + +#: library/asyncio-protocol.rst:486 +msgid "Connection Callbacks" +msgstr "" + +#: library/asyncio-protocol.rst:487 +msgid "" +"Connection callbacks are called on all protocols, exactly once per a " +"successful connection. All other protocol callbacks can only be called " +"between those two methods." +msgstr "" + +#: library/asyncio-protocol.rst:493 +msgid "Called when a connection is made." +msgstr "Appelé lorsqu'une connexion est établie." + +#: library/asyncio-protocol.rst:495 +msgid "" +"The *transport* argument is the transport representing the connection. The " +"protocol is responsible for storing the reference to its transport." +msgstr "" + +#: library/asyncio-protocol.rst:501 +msgid "Called when the connection is lost or closed." +msgstr "Appelé lorsqu'une connexion est perdue ou fermée." + +#: library/asyncio-protocol.rst:503 +msgid "" +"The argument is either an exception object or :const:`None`. The latter " +"means a regular EOF is received, or the connection was aborted or closed by " +"this side of the connection." +msgstr "" + +#: library/asyncio-protocol.rst:509 +msgid "Flow Control Callbacks" +msgstr "" + +#: library/asyncio-protocol.rst:510 +msgid "" +"Flow control callbacks can be called by transports to pause or resume " +"writing performed by the protocol." +msgstr "" + +#: library/asyncio-protocol.rst:513 +msgid "" +"See the documentation of the :meth:`~WriteTransport.set_write_buffer_limits` " +"method for more details." +msgstr "" + +#: library/asyncio-protocol.rst:518 +msgid "Called when the transport's buffer goes over the high watermark." +msgstr "" + +#: library/asyncio-protocol.rst:522 +msgid "Called when the transport's buffer drains below the low watermark." +msgstr "" + +#: library/asyncio-protocol.rst:524 +msgid "" +"If the buffer size equals the high watermark, :meth:`~BaseProtocol." +"pause_writing` is not called: the buffer size must go strictly over." +msgstr "" + +#: library/asyncio-protocol.rst:528 +msgid "" +"Conversely, :meth:`~BaseProtocol.resume_writing` is called when the buffer " +"size is equal or lower than the low watermark. These end conditions are " +"important to ensure that things go as expected when either mark is zero." +msgstr "" + +#: library/asyncio-protocol.rst:535 +msgid "Streaming Protocols" +msgstr "Protocoles connectés" + +#: library/asyncio-protocol.rst:537 +msgid "" +"Event methods, such as :meth:`loop.create_server`, :meth:`loop." +"create_unix_server`, :meth:`loop.create_connection`, :meth:`loop." +"create_unix_connection`, :meth:`loop.connect_accepted_socket`, :meth:`loop." +"connect_read_pipe`, and :meth:`loop.connect_write_pipe` accept factories " +"that return streaming protocols." +msgstr "" + +#: library/asyncio-protocol.rst:545 +msgid "" +"Called when some data is received. *data* is a non-empty bytes object " +"containing the incoming data." +msgstr "" + +#: library/asyncio-protocol.rst:548 +msgid "" +"Whether the data is buffered, chunked or reassembled depends on the " +"transport. In general, you shouldn't rely on specific semantics and instead " +"make your parsing generic and flexible. However, data is always received in " +"the correct order." +msgstr "" + +#: library/asyncio-protocol.rst:553 +msgid "" +"The method can be called an arbitrary number of times while a connection is " +"open." +msgstr "" + +#: library/asyncio-protocol.rst:556 +msgid "" +"However, :meth:`protocol.eof_received() ` is called " +"at most once. Once ``eof_received()`` is called, ``data_received()`` is not " +"called anymore." +msgstr "" + +#: library/asyncio-protocol.rst:562 +msgid "" +"Called when the other end signals it won't send any more data (for example " +"by calling :meth:`transport.write_eof() `, if the " +"other end also uses asyncio)." +msgstr "" + +#: library/asyncio-protocol.rst:567 +msgid "" +"This method may return a false value (including ``None``), in which case the " +"transport will close itself. Conversely, if this method returns a true " +"value, the protocol used determines whether to close the transport. Since " +"the default implementation returns ``None``, it implicitly closes the " +"connection." +msgstr "" + +#: library/asyncio-protocol.rst:573 +msgid "" +"Some transports, including SSL, don't support half-closed connections, in " +"which case returning true from this method will result in the connection " +"being closed." +msgstr "" + +#: library/asyncio-protocol.rst:578 library/asyncio-protocol.rst:636 +msgid "State machine:" +msgstr "Machine à états :" + +#: library/asyncio-protocol.rst:589 +msgid "Buffered Streaming Protocols" +msgstr "" + +#: library/asyncio-protocol.rst:593 +msgid "" +"Buffered Protocols can be used with any event loop method that supports " +"`Streaming Protocols`_." +msgstr "" + +#: library/asyncio-protocol.rst:596 +msgid "" +"``BufferedProtocol`` implementations allow explicit manual allocation and " +"control of the receive buffer. Event loops can then use the buffer provided " +"by the protocol to avoid unnecessary data copies. This can result in " +"noticeable performance improvement for protocols that receive big amounts of " +"data. Sophisticated protocol implementations can significantly reduce the " +"number of buffer allocations." +msgstr "" + +#: library/asyncio-protocol.rst:603 +msgid "" +"The following callbacks are called on :class:`BufferedProtocol` instances:" +msgstr "" + +#: library/asyncio-protocol.rst:608 +msgid "Called to allocate a new receive buffer." +msgstr "" + +#: library/asyncio-protocol.rst:610 +msgid "" +"*sizehint* is the recommended minimum size for the returned buffer. It is " +"acceptable to return smaller or larger buffers than what *sizehint* " +"suggests. When set to -1, the buffer size can be arbitrary. It is an error " +"to return a buffer with a zero size." +msgstr "" + +#: library/asyncio-protocol.rst:615 +msgid "" +"``get_buffer()`` must return an object implementing the :ref:`buffer " +"protocol `." +msgstr "" + +#: library/asyncio-protocol.rst:620 +msgid "Called when the buffer was updated with the received data." +msgstr "" + +#: library/asyncio-protocol.rst:622 +msgid "*nbytes* is the total number of bytes that were written to the buffer." +msgstr "" + +#: library/asyncio-protocol.rst:626 +msgid "" +"See the documentation of the :meth:`protocol.eof_received() ` method." +msgstr "" + +#: library/asyncio-protocol.rst:630 +msgid "" +":meth:`~BufferedProtocol.get_buffer` can be called an arbitrary number of " +"times during a connection. However, :meth:`protocol.eof_received() " +"` is called at most once and, if called, :meth:" +"`~BufferedProtocol.get_buffer` and :meth:`~BufferedProtocol.buffer_updated` " +"won't be called after it." +msgstr "" + +#: library/asyncio-protocol.rst:649 +msgid "Datagram Protocols" +msgstr "Protocoles non-connectés" + +#: library/asyncio-protocol.rst:651 +msgid "" +"Datagram Protocol instances should be constructed by protocol factories " +"passed to the :meth:`loop.create_datagram_endpoint` method." +msgstr "" + +#: library/asyncio-protocol.rst:656 +msgid "" +"Called when a datagram is received. *data* is a bytes object containing the " +"incoming data. *addr* is the address of the peer sending the data; the " +"exact format depends on the transport." +msgstr "" + +#: library/asyncio-protocol.rst:662 +msgid "" +"Called when a previous send or receive operation raises an :class:" +"`OSError`. *exc* is the :class:`OSError` instance." +msgstr "" + +#: library/asyncio-protocol.rst:665 +msgid "" +"This method is called in rare conditions, when the transport (e.g. UDP) " +"detects that a datagram could not be delivered to its recipient. In many " +"conditions though, undeliverable datagrams will be silently dropped." +msgstr "" + +#: library/asyncio-protocol.rst:672 +msgid "" +"On BSD systems (macOS, FreeBSD, etc.) flow control is not supported for " +"datagram protocols, because there is no reliable way to detect send failures " +"caused by writing too many packets." +msgstr "" + +#: library/asyncio-protocol.rst:676 +msgid "" +"The socket always appears 'ready' and excess packets are dropped. An :class:" +"`OSError` with ``errno`` set to :const:`errno.ENOBUFS` may or may not be " +"raised; if it is raised, it will be reported to :meth:`DatagramProtocol." +"error_received` but otherwise ignored." +msgstr "" + +#: library/asyncio-protocol.rst:685 +msgid "Subprocess Protocols" +msgstr "Protocoles liés aux sous-processus" + +#: library/asyncio-protocol.rst:687 +msgid "" +"Subprocess Protocol instances should be constructed by protocol factories " +"passed to the :meth:`loop.subprocess_exec` and :meth:`loop.subprocess_shell` " +"methods." +msgstr "" + +#: library/asyncio-protocol.rst:693 +msgid "" +"Called when the child process writes data into its stdout or stderr pipe." +msgstr "" +"Appelé lorsqu'un processus enfant écrit sur sa sortie d'erreur ou sa sortie " +"standard." + +#: library/asyncio-protocol.rst:696 +msgid "*fd* is the integer file descriptor of the pipe." +msgstr "" + +#: library/asyncio-protocol.rst:698 +msgid "*data* is a non-empty bytes object containing the received data." +msgstr "" + +#: library/asyncio-protocol.rst:702 +msgid "" +"Called when one of the pipes communicating with the child process is closed." +msgstr "" +"Appelé lorsqu'une des *pipe*\\ s de communication avec un sous-processus est " +"fermée." + +#: library/asyncio-protocol.rst:705 +msgid "*fd* is the integer file descriptor that was closed." +msgstr "" + +#: library/asyncio-protocol.rst:709 +msgid "Called when the child process has exited." +msgstr "Appelé lorsqu'un processus enfant se termine." + +#: library/asyncio-protocol.rst:713 +msgid "Examples" +msgstr "Exemples" + +#: library/asyncio-protocol.rst:718 +msgid "TCP Echo Server" +msgstr "Serveur de *ping* en TCP" + +#: library/asyncio-protocol.rst:720 +msgid "" +"Create a TCP echo server using the :meth:`loop.create_server` method, send " +"back received data, and close the connection::" +msgstr "" + +#: library/asyncio-protocol.rst:761 +msgid "" +"The :ref:`TCP echo server using streams ` " +"example uses the high-level :func:`asyncio.start_server` function." +msgstr "" + +#: library/asyncio-protocol.rst:767 +msgid "TCP Echo Client" +msgstr "Client de *ping* en TCP" + +#: library/asyncio-protocol.rst:769 +msgid "" +"A TCP echo client using the :meth:`loop.create_connection` method, sends " +"data, and waits until the connection is closed::" +msgstr "" + +#: library/asyncio-protocol.rst:817 +msgid "" +"The :ref:`TCP echo client using streams ` " +"example uses the high-level :func:`asyncio.open_connection` function." +msgstr "" + +#: library/asyncio-protocol.rst:824 +msgid "UDP Echo Server" +msgstr "Serveur de *ping* en UDP" + +#: library/asyncio-protocol.rst:826 +msgid "" +"A UDP echo server, using the :meth:`loop.create_datagram_endpoint` method, " +"sends back received data::" +msgstr "" + +#: library/asyncio-protocol.rst:868 +msgid "UDP Echo Client" +msgstr "Client de *ping* en UDP" + +#: library/asyncio-protocol.rst:870 +msgid "" +"A UDP echo client, using the :meth:`loop.create_datagram_endpoint` method, " +"sends data and closes the transport when it receives the answer::" +msgstr "" + +#: library/asyncio-protocol.rst:925 +msgid "Connecting Existing Sockets" +msgstr "" + +#: library/asyncio-protocol.rst:927 +msgid "" +"Wait until a socket receives data using the :meth:`loop.create_connection` " +"method with a protocol::" +msgstr "" + +#: library/asyncio-protocol.rst:981 +msgid "" +"The :ref:`watch a file descriptor for read events " +"` example uses the low-level :meth:`loop." +"add_reader` method to register an FD." +msgstr "" + +#: library/asyncio-protocol.rst:985 +msgid "" +"The :ref:`register an open socket to wait for data using streams " +"` example uses high-level streams " +"created by the :func:`open_connection` function in a coroutine." +msgstr "" + +#: library/asyncio-protocol.rst:992 +msgid "loop.subprocess_exec() and SubprocessProtocol" +msgstr "" + +#: library/asyncio-protocol.rst:994 +msgid "" +"An example of a subprocess protocol used to get the output of a subprocess " +"and to wait for the subprocess exit." +msgstr "" + +#: library/asyncio-protocol.rst:997 +msgid "The subprocess is created by the :meth:`loop.subprocess_exec` method::" +msgstr "" + +#: library/asyncio-protocol.rst:1043 +msgid "" +"See also the :ref:`same example ` " +"written using high-level APIs." +msgstr "" diff --git a/library/asyncio-queue.po b/library/asyncio-queue.po new file mode 100644 index 0000000000..2f05f8ae9f --- /dev/null +++ b/library/asyncio-queue.po @@ -0,0 +1,221 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-03-18 17:06+0100\n" +"PO-Revision-Date: 2018-10-13 17:37+0200\n" +"Last-Translator: FULL NAME \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" + +#: library/asyncio-queue.rst:7 +msgid "Queues" +msgstr "" + +#: library/asyncio-queue.rst:9 +#, fuzzy +msgid "**Source code:** :source:`Lib/asyncio/queues.py`" +msgstr "**Code source :** :source:`Lib/asyncore.py`" + +#: library/asyncio-queue.rst:13 +msgid "" +"asyncio queues are designed to be similar to classes of the :mod:`queue` " +"module. Although asyncio queues are not thread-safe, they are designed to " +"be used specifically in async/await code." +msgstr "" + +#: library/asyncio-queue.rst:17 +msgid "" +"Note that methods of asyncio queues don't have a *timeout* parameter; use :" +"func:`asyncio.wait_for` function to do queue operations with a timeout." +msgstr "" + +#: library/asyncio-queue.rst:21 +msgid "See also the `Examples`_ section below." +msgstr "" + +#: library/asyncio-queue.rst:24 +msgid "Queue" +msgstr "" + +#: library/asyncio-queue.rst:28 +msgid "A first in, first out (FIFO) queue." +msgstr "" + +#: library/asyncio-queue.rst:30 +msgid "" +"If *maxsize* is less than or equal to zero, the queue size is infinite. If " +"it is an integer greater than ``0``, then ``await put()`` blocks when the " +"queue reaches *maxsize* until an item is removed by :meth:`get`." +msgstr "" + +#: library/asyncio-queue.rst:35 +msgid "" +"Unlike the standard library threading :mod:`queue`, the size of the queue is " +"always known and can be returned by calling the :meth:`qsize` method." +msgstr "" + +#: library/asyncio-queue.rst:39 +msgid "Removed the *loop* parameter." +msgstr "Suppression du 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." +msgstr "Nombre d'éléments autorisés dans la queue." + +#: library/asyncio-queue.rst:51 +msgid "Return ``True`` if the queue is empty, ``False`` otherwise." +msgstr "Renvoie ``True`` si la queue est vide, ``False`` sinon." + +#: library/asyncio-queue.rst:55 +msgid "Return ``True`` if there are :attr:`maxsize` items in the queue." +msgstr "" + +#: library/asyncio-queue.rst:57 +msgid "" +"If the queue was initialized with ``maxsize=0`` (the default), then :meth:" +"`full()` never returns ``True``." +msgstr "" + +#: library/asyncio-queue.rst:62 +msgid "" +"Remove and return an item from the queue. If queue is empty, wait until an " +"item is available." +msgstr "" + +#: library/asyncio-queue.rst:67 +msgid "" +"Return an item if one is immediately available, else raise :exc:`QueueEmpty`." +msgstr "" + +#: library/asyncio-queue.rst:72 +#, fuzzy +msgid "Block until all items in the queue have been received and processed." +msgstr "" +"Bloque jusqu'à ce que tous les éléments de la queue aient été récupérés et " +"traités." + +#: library/asyncio-queue.rst:74 +#, fuzzy +msgid "" +"The count of unfinished tasks goes up whenever an item is added to the " +"queue. The count goes down whenever a consumer coroutine calls :meth:" +"`task_done` to indicate that the item was retrieved and all work on it is " +"complete. When the count of unfinished tasks drops to zero, :meth:`join` " +"unblocks." +msgstr "" +"Le nombre de tâches inachevées augmente chaque fois qu'un élément est ajouté " +"à la file. Ce nombre diminue chaque fois qu'un fil d'exécution consommateur " +"appelle :meth:`task_done` pour indiquer que l'élément a été extrait et que " +"tout le travail à effectuer dessus est terminé. Lorsque le nombre de tâches " +"non terminées devient nul, :meth:`join` débloque." + +#: library/asyncio-queue.rst:82 +msgid "" +"Put an item into the queue. If the queue is full, wait until a free slot is " +"available before adding the item." +msgstr "" + +#: library/asyncio-queue.rst:87 +msgid "Put an item into the queue without blocking." +msgstr "Ajoute un élément dans la queue sans bloquer." + +#: library/asyncio-queue.rst:89 +msgid "If no free slot is immediately available, raise :exc:`QueueFull`." +msgstr "" + +#: library/asyncio-queue.rst:93 +msgid "Return the number of items in the queue." +msgstr "Renvoie le nombre d'éléments dans la queue." + +#: library/asyncio-queue.rst:97 +msgid "Indicate that a formerly enqueued task is complete." +msgstr "" + +#: library/asyncio-queue.rst:99 +msgid "" +"Used by queue consumers. For each :meth:`~Queue.get` used to fetch a task, a " +"subsequent call to :meth:`task_done` tells the queue that the processing on " +"the task is complete." +msgstr "" + +#: library/asyncio-queue.rst:103 +#, fuzzy +msgid "" +"If a :meth:`join` is currently blocking, it will resume when all items have " +"been processed (meaning that a :meth:`task_done` call was received for every " +"item that had been :meth:`~Queue.put` into the queue)." +msgstr "" +"Si un :meth:`join` est actuellement bloquant, on reprendra lorsque tous les " +"éléments auront été traités (ce qui signifie qu'un appel à :meth:`task_done` " +"a été effectué pour chaque élément qui a été :meth:`put` dans la file)." + +#: library/asyncio-queue.rst:108 +#, fuzzy +msgid "" +"Raises :exc:`ValueError` if called more times than there were items placed " +"in the queue." +msgstr "" +"Lève une exception :exc:`ValueError` si appelée plus de fois qu'il y avait " +"d'éléments dans la file." + +#: library/asyncio-queue.rst:113 +msgid "Priority Queue" +msgstr "File de priorité" + +#: library/asyncio-queue.rst:117 +msgid "" +"A variant of :class:`Queue`; retrieves entries in priority order (lowest " +"first)." +msgstr "" + +#: library/asyncio-queue.rst:120 +msgid "Entries are typically tuples of the form ``(priority_number, data)``." +msgstr "" + +#: library/asyncio-queue.rst:125 +msgid "LIFO Queue" +msgstr "" + +#: library/asyncio-queue.rst:129 +msgid "" +"A variant of :class:`Queue` that retrieves most recently added entries first " +"(last in, first out)." +msgstr "" + +#: library/asyncio-queue.rst:134 +msgid "Exceptions" +msgstr "Exceptions" + +#: library/asyncio-queue.rst:138 +msgid "" +"This exception is raised when the :meth:`~Queue.get_nowait` method is called " +"on an empty queue." +msgstr "" + +#: library/asyncio-queue.rst:144 +msgid "" +"Exception raised when the :meth:`~Queue.put_nowait` method is called on a " +"queue that has reached its *maxsize*." +msgstr "" + +#: library/asyncio-queue.rst:149 +msgid "Examples" +msgstr "Exemples" + +#: library/asyncio-queue.rst:153 +msgid "" +"Queues can be used to distribute workload between several concurrent tasks::" +msgstr "" diff --git a/library/asyncio-stream.po b/library/asyncio-stream.po new file mode 100644 index 0000000000..e0a4ffca02 --- /dev/null +++ b/library/asyncio-stream.po @@ -0,0 +1,435 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-22 22:57+0100\n" +"PO-Revision-Date: 2019-09-06 13:48+0200\n" +"Last-Translator: Julien Palard \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" + +#: library/asyncio-stream.rst:7 +msgid "Streams" +msgstr "Streams" + +#: library/asyncio-stream.rst:9 +#, fuzzy +msgid "**Source code:** :source:`Lib/asyncio/streams.py`" +msgstr "**Code source :** :source:`Lib/asyncore.py`" + +#: library/asyncio-stream.rst:13 +msgid "" +"Streams are high-level async/await-ready primitives to work with network " +"connections. Streams allow sending and receiving data without using " +"callbacks or low-level protocols and transports." +msgstr "" + +#: library/asyncio-stream.rst:19 +msgid "Here is an example of a TCP echo client written using asyncio streams::" +msgstr "" + +#: library/asyncio-stream.rst:42 +msgid "See also the `Examples`_ section below." +msgstr "" + +#: library/asyncio-stream.rst:46 +msgid "Stream Functions" +msgstr "" + +#: library/asyncio-stream.rst:47 +msgid "" +"The following top-level asyncio functions can be used to create and work " +"with streams:" +msgstr "" + +#: library/asyncio-stream.rst:57 +msgid "" +"Establish a network connection and return a pair of ``(reader, writer)`` " +"objects." +msgstr "" + +#: 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:105 +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:67 +msgid "" +"The rest of the arguments are passed directly to :meth:`loop." +"create_connection`." +msgstr "" + +#: library/asyncio-stream.rst:140 +msgid "" +"The *sock* argument transfers ownership of the socket to the :class:" +"`StreamWriter` created. To close the socket, call its :meth:`~asyncio." +"StreamWriter.close` method." +msgstr "" + +#: library/asyncio-stream.rst:76 +msgid "Added the *ssl_handshake_timeout* parameter." +msgstr "" + +#: library/asyncio-stream.rst:79 +msgid "Added *happy_eyeballs_delay* and *interleave* parameters." +msgstr "" + +#: library/asyncio-stream.rst:121 library/asyncio-stream.rst:176 +msgid "Removed the *loop* parameter." +msgstr "Suppression du paramètre *loop*." + +#: library/asyncio-stream.rst:94 +msgid "Start a socket server." +msgstr "" + +#: library/asyncio-stream.rst:96 +msgid "" +"The *client_connected_cb* callback is called whenever a new client " +"connection is established. It receives a ``(reader, writer)`` pair as two " +"arguments, instances of the :class:`StreamReader` and :class:`StreamWriter` " +"classes." +msgstr "" + +#: library/asyncio-stream.rst:101 +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:109 +msgid "" +"The rest of the arguments are passed directly to :meth:`loop.create_server`." +msgstr "" + +#: library/asyncio-stream.rst:166 +msgid "" +"The *sock* argument transfers ownership of the socket to the server created. " +"To close the socket, call the server's :meth:`~asyncio.Server.close` method." +msgstr "" + +#: library/asyncio-stream.rst:118 +msgid "Added the *ssl_handshake_timeout* and *start_serving* parameters." +msgstr "" + +#: library/asyncio-stream.rst:126 +msgid "Unix Sockets" +msgstr "" + +#: library/asyncio-stream.rst:131 +msgid "" +"Establish a Unix socket connection and return a pair of ``(reader, writer)``." +msgstr "" + +#: library/asyncio-stream.rst:134 +msgid "Similar to :func:`open_connection` but operates on Unix sockets." +msgstr "" + +#: library/asyncio-stream.rst:136 +msgid "See also the documentation of :meth:`loop.create_unix_connection`." +msgstr "" + +#: library/asyncio-stream.rst:171 +msgid ":ref:`Availability `: Unix." +msgstr ":ref:`Disponibilité ` : Unix." + +#: library/asyncio-stream.rst:146 +msgid "" +"Added the *ssl_handshake_timeout* parameter. The *path* parameter can now be " +"a :term:`path-like object`" +msgstr "" + +#: library/asyncio-stream.rst:158 +msgid "Start a Unix socket server." +msgstr "" + +#: library/asyncio-stream.rst:160 +msgid "Similar to :func:`start_server` but works with Unix sockets." +msgstr "" + +#: library/asyncio-stream.rst:162 +msgid "See also the documentation of :meth:`loop.create_unix_server`." +msgstr "" + +#: library/asyncio-stream.rst:172 +msgid "" +"Added the *ssl_handshake_timeout* and *start_serving* parameters. The *path* " +"parameter can now be a :term:`path-like object`." +msgstr "" + +#: library/asyncio-stream.rst:181 +msgid "StreamReader" +msgstr "StreamReader" + +#: library/asyncio-stream.rst:185 +msgid "" +"Represents a reader object that provides APIs to read data from the IO " +"stream. As an :term:`asynchronous iterable`, the object supports the :" +"keyword:`async for` statement." +msgstr "" + +#: library/asyncio-stream.rst:189 +msgid "" +"It is not recommended to instantiate *StreamReader* objects directly; use :" +"func:`open_connection` and :func:`start_server` instead." +msgstr "" + +#: library/asyncio-stream.rst:195 +msgid "Read up to *n* bytes from the stream." +msgstr "" + +#: library/asyncio-stream.rst:197 +msgid "" +"If *n* is not provided or set to ``-1``, read until EOF, then return all " +"read :class:`bytes`. If EOF was received and the internal buffer is empty, " +"return an empty ``bytes`` object." +msgstr "" + +#: library/asyncio-stream.rst:202 +msgid "If *n* is ``0``, return an empty ``bytes`` object immediately." +msgstr "" + +#: library/asyncio-stream.rst:204 +msgid "" +"If *n* is positive, return at most *n* available ``bytes`` as soon as at " +"least 1 byte is available in the internal buffer. If EOF is received before " +"any byte is read, return an empty ``bytes`` object." +msgstr "" + +#: library/asyncio-stream.rst:211 +msgid "" +"Read one line, where \"line\" is a sequence of bytes ending with ``\\n``." +msgstr "" + +#: library/asyncio-stream.rst:214 +msgid "" +"If EOF is received and ``\\n`` was not found, the method returns partially " +"read data." +msgstr "" + +#: library/asyncio-stream.rst:217 +msgid "" +"If EOF is received and the internal buffer is empty, return an empty " +"``bytes`` object." +msgstr "" + +#: library/asyncio-stream.rst:222 +msgid "Read exactly *n* bytes." +msgstr "" + +#: library/asyncio-stream.rst:224 +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:230 +msgid "Read data from the stream until *separator* is found." +msgstr "" + +#: library/asyncio-stream.rst:232 +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:236 +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:240 +msgid "" +"If EOF is reached before the complete separator is found, an :exc:" +"`IncompleteReadError` exception is raised, and the internal buffer is " +"reset. The :attr:`IncompleteReadError.partial` attribute may contain a " +"portion of the separator." +msgstr "" + +#: library/asyncio-stream.rst:249 +msgid "Return ``True`` if the buffer is empty and :meth:`feed_eof` was called." +msgstr "" + +#: library/asyncio-stream.rst:254 +msgid "StreamWriter" +msgstr "StreamWriter" + +#: library/asyncio-stream.rst:258 +msgid "" +"Represents a writer object that provides APIs to write data to the IO stream." +msgstr "" + +#: library/asyncio-stream.rst:261 +msgid "" +"It is not recommended to instantiate *StreamWriter* objects directly; use :" +"func:`open_connection` and :func:`start_server` instead." +msgstr "" + +#: library/asyncio-stream.rst:267 +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:283 +msgid "The method should be used along with the ``drain()`` method::" +msgstr "" + +#: library/asyncio-stream.rst:278 +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:290 +msgid "The method closes the stream and the underlying socket." +msgstr "" + +#: library/asyncio-stream.rst:292 +msgid "" +"The method should be used, though not mandatory, along with the " +"``wait_closed()`` method::" +msgstr "" + +#: library/asyncio-stream.rst:300 +msgid "" +"Return ``True`` if the underlying transport supports the :meth:`write_eof` " +"method, ``False`` otherwise." +msgstr "" + +#: library/asyncio-stream.rst:305 +msgid "" +"Close the write end of the stream after the buffered write data is flushed." +msgstr "" + +#: library/asyncio-stream.rst:310 +msgid "Return the underlying asyncio transport." +msgstr "" + +#: library/asyncio-stream.rst:314 +msgid "" +"Access optional transport information; see :meth:`BaseTransport." +"get_extra_info` for details." +msgstr "" + +#: library/asyncio-stream.rst:319 +msgid "Wait until it is appropriate to resume writing to the stream. Example::" +msgstr "" + +#: library/asyncio-stream.rst:325 +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()* " +"blocks until the size of the buffer is drained down to the low watermark and " +"writing can be resumed. When there is nothing to wait for, the :meth:" +"`drain` returns immediately." +msgstr "" + +#: library/asyncio-stream.rst:334 +msgid "" +"Return ``True`` if the stream is closed or in the process of being closed." +msgstr "" + +#: library/asyncio-stream.rst:341 +msgid "Wait until the stream is closed." +msgstr "" + +#: library/asyncio-stream.rst:343 +msgid "" +"Should be called after :meth:`close` to wait until the underlying connection " +"is closed, ensuring that all data has been flushed before e.g. exiting the " +"program." +msgstr "" + +#: library/asyncio-stream.rst:351 +msgid "Examples" +msgstr "Exemples" + +#: library/asyncio-stream.rst:356 +msgid "TCP echo client using streams" +msgstr "" + +#: library/asyncio-stream.rst:358 +msgid "TCP echo client using the :func:`asyncio.open_connection` function::" +msgstr "" + +#: library/asyncio-stream.rst:381 +msgid "" +"The :ref:`TCP echo client protocol " +"` example uses the low-level :meth:" +"`loop.create_connection` method." +msgstr "" + +#: library/asyncio-stream.rst:388 +msgid "TCP echo server using streams" +msgstr "" + +#: library/asyncio-stream.rst:390 +msgid "TCP echo server using the :func:`asyncio.start_server` function::" +msgstr "" + +#: library/asyncio-stream.rst:424 +msgid "" +"The :ref:`TCP echo server protocol " +"` example uses the :meth:`loop." +"create_server` method." +msgstr "" + +#: library/asyncio-stream.rst:429 +msgid "Get HTTP headers" +msgstr "Récupère les en-têtes HTTP" + +#: library/asyncio-stream.rst:431 +msgid "" +"Simple example querying HTTP headers of the URL passed on the command line::" +msgstr "" + +#: library/asyncio-stream.rst:470 +msgid "Usage::" +msgstr "Utilisation ::" + +#: library/asyncio-stream.rst:474 +msgid "or with HTTPS::" +msgstr "ou avec HTTPS ::" + +#: library/asyncio-stream.rst:482 +msgid "Register an open socket to wait for data using streams" +msgstr "" + +#: library/asyncio-stream.rst:484 +msgid "" +"Coroutine waiting until a socket receives data using the :func:" +"`open_connection` function::" +msgstr "" + +#: library/asyncio-stream.rst:519 +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:523 +msgid "" +"The :ref:`watch a file descriptor for read events " +"` example uses the low-level :meth:`loop." +"add_reader` method to watch a file descriptor." +msgstr "" diff --git a/library/asyncio-subprocess.po b/library/asyncio-subprocess.po new file mode 100644 index 0000000000..ba1b4fc005 --- /dev/null +++ b/library/asyncio-subprocess.po @@ -0,0 +1,508 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-22 22:57+0100\n" +"PO-Revision-Date: 2018-10-15 00:37+0200\n" +"Last-Translator: Julien Palard \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" + +#: library/asyncio-subprocess.rst:7 +msgid "Subprocesses" +msgstr "Sous-processus" + +#: library/asyncio-subprocess.rst:9 +msgid "" +"**Source code:** :source:`Lib/asyncio/subprocess.py`, :source:`Lib/asyncio/" +"base_subprocess.py`" +msgstr "" + +#: library/asyncio-subprocess.rst:14 +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 +msgid "will print::" +msgstr "affiche ::" + +#: library/asyncio-subprocess.rst:46 +msgid "" +"Because all asyncio subprocess functions are asynchronous and asyncio " +"provides many tools to work with such functions, it is easy to execute and " +"monitor multiple subprocesses in parallel. It is indeed trivial to modify " +"the above example to run several commands simultaneously::" +msgstr "" + +#: library/asyncio-subprocess.rst:58 +msgid "See also the `Examples`_ subsection." +msgstr "Voir également la section `Exemples`_." + +#: library/asyncio-subprocess.rst:62 +msgid "Creating Subprocesses" +msgstr "Créer des sous-processus" + +#: library/asyncio-subprocess.rst:67 +msgid "Create a subprocess." +msgstr "Crée un sous-processus." + +#: library/asyncio-subprocess.rst:69 library/asyncio-subprocess.rst:87 +msgid "" +"The *limit* argument sets the buffer limit for :class:`StreamReader` " +"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:73 library/asyncio-subprocess.rst:91 +msgid "Return a :class:`~asyncio.subprocess.Process` instance." +msgstr "Renvoie une instance de :class:`~asyncio.subprocess.Process`." + +#: library/asyncio-subprocess.rst:75 +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:78 library/asyncio-subprocess.rst:105 +msgid "Removed the *loop* parameter." +msgstr "Suppression du paramètre *loop*." + +#: library/asyncio-subprocess.rst:85 +msgid "Run the *cmd* shell command." +msgstr "Exécute la commande *cmd* dans un *shell*." + +#: library/asyncio-subprocess.rst:93 +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:98 +msgid "" +"It is the application's responsibility to ensure that all whitespace and " +"special characters are quoted appropriately to avoid `shell injection " +"`_ " +"vulnerabilities. The :func:`shlex.quote` function can be used to properly " +"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:110 +msgid "" +"Subprocesses are available for Windows if a :class:`ProactorEventLoop` is " +"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:116 +msgid "" +"asyncio also has the following *low-level* APIs to work with subprocesses: :" +"meth:`loop.subprocess_exec`, :meth:`loop.subprocess_shell`, :meth:`loop." +"connect_read_pipe`, :meth:`loop.connect_write_pipe`, as well as the :ref:" +"`Subprocess Transports ` and :ref:`Subprocess " +"Protocols `." +msgstr "" + +#: library/asyncio-subprocess.rst:124 +msgid "Constants" +msgstr "Constantes" + +#: library/asyncio-subprocess.rst:129 +msgid "Can be passed to the *stdin*, *stdout* or *stderr* parameters." +msgstr "Peut être passé aux paramètres *stdin*, *stdout* ou *stderr*." + +#: library/asyncio-subprocess.rst:131 +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:135 +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:143 +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 +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 +msgid "Interacting with Subprocesses" +msgstr "Interagir avec les sous-processus" + +#: library/asyncio-subprocess.rst:157 +msgid "" +"Both :func:`create_subprocess_exec` and :func:`create_subprocess_shell` " +"functions return instances of the *Process* class. *Process* is a high-" +"level wrapper that allows communicating with subprocesses and watching for " +"their completion." +msgstr "" + +#: library/asyncio-subprocess.rst:165 +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:169 +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:173 +msgid "" +"unlike Popen, Process instances do not have an equivalent to the :meth:" +"`~subprocess.Popen.poll` method;" +msgstr "" + +#: library/asyncio-subprocess.rst:176 +msgid "" +"the :meth:`~asyncio.subprocess.Process.communicate` and :meth:`~asyncio." +"subprocess.Process.wait` methods don't have a *timeout* parameter: use the :" +"func:`~asyncio.wait_for` function;" +msgstr "" + +#: library/asyncio-subprocess.rst:180 +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:184 +msgid "the *universal_newlines* parameter is not supported." +msgstr "le paramètre *universal_newlines* n'est pas pris en charge." + +#: library/asyncio-subprocess.rst:186 +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:188 +msgid "" +"See also the :ref:`Subprocess and Threads ` " +"section." +msgstr "" +"Voir aussi la section :ref:`sous-processus et fils d'exécution `." + +#: library/asyncio-subprocess.rst:193 +msgid "Wait for the child process to terminate." +msgstr "Attend que le sous processus s'arrête." + +#: library/asyncio-subprocess.rst:195 +msgid "Set and return the :attr:`returncode` attribute." +msgstr "Définit et renvoie l'attribut :attr:`returncode`." + +#: library/asyncio-subprocess.rst:199 +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:207 +msgid "Interact with process:" +msgstr "Interagit avec le processus :" + +#: library/asyncio-subprocess.rst:209 +msgid "send data to *stdin* (if *input* is not ``None``);" +msgstr "envoie des données sur le *stdin* (si *input* n'est pas ``None``);" + +#: library/asyncio-subprocess.rst:210 +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:211 +msgid "wait for process to terminate." +msgstr "attend que le processus s'arrête." + +#: library/asyncio-subprocess.rst:213 +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:216 +msgid "Return a tuple ``(stdout_data, stderr_data)``." +msgstr "Renvoie un tuple ``(stdout_data, stderr_data)``." + +#: library/asyncio-subprocess.rst:218 +msgid "" +"If either :exc:`BrokenPipeError` or :exc:`ConnectionResetError` exception is " +"raised when writing *input* into *stdin*, the exception is ignored. This " +"condition occurs when the process exits before all data are written into " +"*stdin*." +msgstr "" + +#: library/asyncio-subprocess.rst:223 +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 " +"``None`` in the result tuple, the process has to be created with " +"``stdout=PIPE`` and/or ``stderr=PIPE`` arguments." +msgstr "" + +#: library/asyncio-subprocess.rst:229 +msgid "" +"Note, that the data read is buffered in memory, so do not use this method if " +"the data size is large or unlimited." +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:234 +msgid "Sends the signal *signal* to the child process." +msgstr "Envoie le signal *signal* au sous-processus." + +#: library/asyncio-subprocess.rst:238 +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, :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:245 +msgid "Stop the child process." +msgstr "Arrête le sous-processus." + +#: library/asyncio-subprocess.rst:247 +msgid "" +"On POSIX systems this method sends :py:data:`signal.SIGTERM` to the child " +"process." +msgstr "" +"Sur les systèmes POSIX, cette méthode envoie un :py:data:`signal.SIGTERM` au " +"sous-processus." + +#: library/asyncio-subprocess.rst:250 +msgid "" +"On Windows the Win32 API function :c:func:`TerminateProcess` is called to " +"stop the child process." +msgstr "" + +#: library/asyncio-subprocess.rst:255 +#, fuzzy +msgid "Kill the child process." +msgstr "Arrête le sous-processus." + +#: library/asyncio-subprocess.rst:257 +msgid "" +"On POSIX systems this method sends :py:data:`SIGKILL` to the child process." +msgstr "" +"Sur les systèmes POSIX, cette méthode envoie :py:data:`signal.SIGTERM` au " +"sous-processus." + +#: library/asyncio-subprocess.rst:260 +msgid "On Windows this method is an alias for :meth:`terminate`." +msgstr "Sous Windows, cette méthode est un alias pour :meth:`terminate`." + +#: library/asyncio-subprocess.rst:264 +msgid "" +"Standard input stream (:class:`StreamWriter`) or ``None`` if the process was " +"created with ``stdin=None``." +msgstr "" + +#: library/asyncio-subprocess.rst:269 +msgid "" +"Standard output stream (:class:`StreamReader`) or ``None`` if the process " +"was created with ``stdout=None``." +msgstr "" + +#: library/asyncio-subprocess.rst:274 +msgid "" +"Standard error stream (:class:`StreamReader`) or ``None`` if the process was " +"created with ``stderr=None``." +msgstr "" + +#: library/asyncio-subprocess.rst:279 +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." +msgstr "" + +#: library/asyncio-subprocess.rst:288 +msgid "Process identification number (PID)." +msgstr "" +"Numéro d'identification du processus (PID, pour *Process Identification " +"Number* en anglais)." + +#: library/asyncio-subprocess.rst:290 +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:295 +msgid "Return code of the process when it exits." +msgstr "Code de retour du processus quand il se termine." + +#: library/asyncio-subprocess.rst:297 +msgid "A ``None`` value indicates that the process has not terminated yet." +msgstr "" + +#: library/asyncio-subprocess.rst:299 +msgid "" +"A negative value ``-N`` indicates that the child was terminated by signal " +"``N`` (POSIX only)." +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:306 +msgid "Subprocess and Threads" +msgstr "Sous-processus et fils d'exécution" + +#: library/asyncio-subprocess.rst:308 +msgid "" +"Standard asyncio event loop supports running subprocesses from different " +"threads by default." +msgstr "" + +#: library/asyncio-subprocess.rst:311 +msgid "" +"On Windows subprocesses are provided by :class:`ProactorEventLoop` only " +"(default), :class:`SelectorEventLoop` has no subprocess support." +msgstr "" + +#: library/asyncio-subprocess.rst:314 +msgid "" +"On UNIX *child watchers* are used for subprocess finish waiting, see :ref:" +"`asyncio-watchers` for more info." +msgstr "" + +#: library/asyncio-subprocess.rst:320 +msgid "" +"UNIX switched to use :class:`ThreadedChildWatcher` for spawning subprocesses " +"from different threads without any limitation." +msgstr "" + +#: library/asyncio-subprocess.rst:323 +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:326 +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:331 +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:336 +msgid "Examples" +msgstr "Exemples" + +#: library/asyncio-subprocess.rst:338 +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:344 +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:371 +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 new file mode 100644 index 0000000000..4c13b5e16c --- /dev/null +++ b/library/asyncio-sync.po @@ -0,0 +1,371 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-04-05 10:05+0200\n" +"PO-Revision-Date: 2018-10-15 00:46+0200\n" +"Last-Translator: FULL NAME \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" + +#: library/asyncio-sync.rst:7 +#, fuzzy +msgid "Synchronization Primitives" +msgstr "Primitives de synchronisation" + +#: library/asyncio-sync.rst:9 +msgid "**Source code:** :source:`Lib/asyncio/locks.py`" +msgstr "" + +#: library/asyncio-sync.rst:13 +msgid "" +"asyncio synchronization primitives are designed to be similar to those of " +"the :mod:`threading` module with two important caveats:" +msgstr "" + +#: library/asyncio-sync.rst:16 +msgid "" +"asyncio primitives are not thread-safe, therefore they should not be used " +"for OS thread synchronization (use :mod:`threading` for that);" +msgstr "" + +#: library/asyncio-sync.rst:20 +msgid "" +"methods of these synchronization primitives do not accept the *timeout* " +"argument; use the :func:`asyncio.wait_for` function to perform operations " +"with timeouts." +msgstr "" + +#: library/asyncio-sync.rst:24 +msgid "asyncio has the following basic synchronization primitives:" +msgstr "" + +#: library/asyncio-sync.rst:26 +msgid ":class:`Lock`" +msgstr ":class:`Lock`" + +#: library/asyncio-sync.rst:27 +msgid ":class:`Event`" +msgstr ":class:`Event`" + +#: library/asyncio-sync.rst:28 +msgid ":class:`Condition`" +msgstr ":class:`Condition`" + +#: library/asyncio-sync.rst:29 +msgid ":class:`Semaphore`" +msgstr ":class:`Semaphore`" + +#: library/asyncio-sync.rst:30 +msgid ":class:`BoundedSemaphore`" +msgstr ":class:`BoundedSemaphore`" + +#: library/asyncio-sync.rst:37 +msgid "Lock" +msgstr "" + +#: library/asyncio-sync.rst:41 +msgid "Implements a mutex lock for asyncio tasks. Not thread-safe." +msgstr "" + +#: library/asyncio-sync.rst:43 +msgid "" +"An asyncio lock can be used to guarantee exclusive access to a shared " +"resource." +msgstr "" + +#: library/asyncio-sync.rst:46 +msgid "The preferred way to use a Lock is an :keyword:`async with` statement::" +msgstr "" + +#: library/asyncio-sync.rst:198 library/asyncio-sync.rst:297 +msgid "which is equivalent to::" +msgstr "" + +#: library/asyncio-sync.rst:111 library/asyncio-sync.rst:285 +#: library/asyncio-sync.rst:340 +msgid "Removed the *loop* parameter." +msgstr "Suppression du paramètre *loop*." + +#: library/asyncio-sync.rst:71 +msgid "Acquire the lock." +msgstr "" + +#: library/asyncio-sync.rst:73 +msgid "" +"This method waits until the lock is *unlocked*, sets it to *locked* and " +"returns ``True``." +msgstr "" + +#: library/asyncio-sync.rst:76 +msgid "" +"When more than one coroutine is blocked in :meth:`acquire` waiting for the " +"lock to be unlocked, only one coroutine eventually proceeds." +msgstr "" + +#: library/asyncio-sync.rst:80 +msgid "" +"Acquiring a lock is *fair*: the coroutine that proceeds will be the first " +"coroutine that started waiting on the lock." +msgstr "" + +#: library/asyncio-sync.rst:85 +msgid "Release the lock." +msgstr "Libère un verrou." + +#: library/asyncio-sync.rst:87 +msgid "When the lock is *locked*, reset it to *unlocked* and return." +msgstr "" + +#: library/asyncio-sync.rst:89 +msgid "If the lock is *unlocked*, a :exc:`RuntimeError` is raised." +msgstr "" + +#: library/asyncio-sync.rst:93 +msgid "Return ``True`` if the lock is *locked*." +msgstr "Donne ``True`` si le verrou est verrouillé." + +#: library/asyncio-sync.rst:97 +msgid "Event" +msgstr "" + +#: library/asyncio-sync.rst:101 +msgid "An event object. Not thread-safe." +msgstr "" + +#: library/asyncio-sync.rst:103 +msgid "" +"An asyncio event can be used to notify multiple asyncio tasks that some " +"event has happened." +msgstr "" + +#: library/asyncio-sync.rst:106 +msgid "" +"An Event object manages an internal flag that can be set to *true* with the :" +"meth:`~Event.set` method and reset to *false* with the :meth:`clear` " +"method. The :meth:`~Event.wait` method blocks until the flag is set to " +"*true*. The flag is set to *false* initially." +msgstr "" + +#: library/asyncio-sync.rst:116 +msgid "Example::" +msgstr "Exemple ::" + +#: library/asyncio-sync.rst:141 +msgid "Wait until the event is set." +msgstr "Attend que l'évènement ait une valeur." + +#: library/asyncio-sync.rst:143 +msgid "" +"If the event is set, return ``True`` immediately. Otherwise block until " +"another task calls :meth:`~Event.set`." +msgstr "" + +#: library/asyncio-sync.rst:148 +msgid "Set the event." +msgstr "" + +#: library/asyncio-sync.rst:150 +msgid "All tasks waiting for event to be set will be immediately awakened." +msgstr "" + +#: library/asyncio-sync.rst:155 +msgid "Clear (unset) the event." +msgstr "" + +#: library/asyncio-sync.rst:157 +msgid "" +"Tasks awaiting on :meth:`~Event.wait` will now block until the :meth:`~Event." +"set` method is called again." +msgstr "" + +#: library/asyncio-sync.rst:162 +msgid "Return ``True`` if the event is set." +msgstr "Renvoie ``True`` si l'évènement a une valeur." + +#: library/asyncio-sync.rst:166 +msgid "Condition" +msgstr "" + +#: library/asyncio-sync.rst:170 +msgid "A Condition object. Not thread-safe." +msgstr "" + +#: library/asyncio-sync.rst:172 +msgid "" +"An asyncio condition primitive can be used by a task to wait for some event " +"to happen and then get exclusive access to a shared resource." +msgstr "" + +#: library/asyncio-sync.rst:176 +msgid "" +"In essence, a Condition object combines the functionality of an :class:" +"`Event` and a :class:`Lock`. It is possible to have multiple Condition " +"objects share one Lock, which allows coordinating exclusive access to a " +"shared resource between different tasks interested in particular states of " +"that shared resource." +msgstr "" + +#: library/asyncio-sync.rst:182 +msgid "" +"The optional *lock* argument must be a :class:`Lock` object or ``None``. In " +"the latter case a new Lock object is created automatically." +msgstr "" + +#: library/asyncio-sync.rst:189 +msgid "" +"The preferred way to use a Condition is an :keyword:`async with` statement::" +msgstr "" + +#: library/asyncio-sync.rst:211 +msgid "Acquire the underlying lock." +msgstr "" + +#: library/asyncio-sync.rst:213 +msgid "" +"This method waits until the underlying lock is *unlocked*, sets it to " +"*locked* and returns ``True``." +msgstr "" + +#: library/asyncio-sync.rst:218 +msgid "" +"Wake up at most *n* tasks (1 by default) waiting on this condition. The " +"method is no-op if no tasks are waiting." +msgstr "" + +#: library/asyncio-sync.rst:236 +msgid "" +"The lock must be acquired before this method is called and released shortly " +"after. If called with an *unlocked* lock a :exc:`RuntimeError` error is " +"raised." +msgstr "" + +#: library/asyncio-sync.rst:227 +msgid "Return ``True`` if the underlying lock is acquired." +msgstr "" + +#: library/asyncio-sync.rst:231 +msgid "Wake up all tasks waiting on this condition." +msgstr "" + +#: library/asyncio-sync.rst:233 +msgid "This method acts like :meth:`notify`, but wakes up all waiting tasks." +msgstr "" + +#: library/asyncio-sync.rst:242 +msgid "Release the underlying lock." +msgstr "Libère le verrou sous-jacent." + +#: library/asyncio-sync.rst:244 +msgid "When invoked on an unlocked lock, a :exc:`RuntimeError` is raised." +msgstr "" + +#: library/asyncio-sync.rst:249 +msgid "Wait until notified." +msgstr "Attends d'être notifié." + +#: library/asyncio-sync.rst:251 +msgid "" +"If the calling task has not acquired the lock when this method is called, a :" +"exc:`RuntimeError` is raised." +msgstr "" + +#: library/asyncio-sync.rst:254 +msgid "" +"This method releases the underlying lock, and then blocks until it is " +"awakened by a :meth:`notify` or :meth:`notify_all` call. Once awakened, the " +"Condition re-acquires its lock and this method returns ``True``." +msgstr "" + +#: library/asyncio-sync.rst:261 +msgid "Wait until a predicate becomes *true*." +msgstr "Attends jusqu'à ce qu'un prédicat devienne vrai." + +#: library/asyncio-sync.rst:263 +msgid "" +"The predicate must be a callable which result will be interpreted as a " +"boolean value. The final value is the return value." +msgstr "" + +#: library/asyncio-sync.rst:269 +msgid "Semaphore" +msgstr "Sémaphore" + +#: library/asyncio-sync.rst:273 +msgid "A Semaphore object. Not thread-safe." +msgstr "" + +#: library/asyncio-sync.rst:275 +msgid "" +"A semaphore manages an internal counter which is decremented by each :meth:" +"`acquire` call and incremented by each :meth:`release` call. The counter can " +"never go below zero; when :meth:`acquire` finds that it is zero, it blocks, " +"waiting until some task calls :meth:`release`." +msgstr "" + +#: library/asyncio-sync.rst:281 +msgid "" +"The optional *value* argument gives the initial value for the internal " +"counter (``1`` by default). If the given value is less than ``0`` a :exc:" +"`ValueError` is raised." +msgstr "" + +#: library/asyncio-sync.rst:288 +msgid "" +"The preferred way to use a Semaphore is an :keyword:`async with` statement::" +msgstr "" + +#: library/asyncio-sync.rst:310 +msgid "Acquire a semaphore." +msgstr "" + +#: library/asyncio-sync.rst:312 +msgid "" +"If the internal counter is greater than zero, decrement it by one and return " +"``True`` immediately. If it is zero, wait until a :meth:`release` is called " +"and return ``True``." +msgstr "" + +#: library/asyncio-sync.rst:318 +msgid "Returns ``True`` if semaphore can not be acquired immediately." +msgstr "" + +#: library/asyncio-sync.rst:322 +msgid "" +"Release a semaphore, incrementing the internal counter by one. Can wake up a " +"task waiting to acquire the semaphore." +msgstr "" + +#: library/asyncio-sync.rst:325 +msgid "" +"Unlike :class:`BoundedSemaphore`, :class:`Semaphore` allows making more " +"``release()`` calls than ``acquire()`` calls." +msgstr "" + +#: library/asyncio-sync.rst:330 +msgid "BoundedSemaphore" +msgstr "BoundedSemaphore" + +#: library/asyncio-sync.rst:334 +msgid "A bounded semaphore object. Not thread-safe." +msgstr "" + +#: library/asyncio-sync.rst:336 +msgid "" +"Bounded Semaphore is a version of :class:`Semaphore` that raises a :exc:" +"`ValueError` in :meth:`~Semaphore.release` if it increases the internal " +"counter above the initial *value*." +msgstr "" + +#: library/asyncio-sync.rst:348 +msgid "" +"Acquiring a lock using ``await lock`` or ``yield from lock`` and/or :keyword:" +"`with` statement (``with await lock``, ``with (yield from lock)``) was " +"removed. Use ``async with lock`` instead." +msgstr "" diff --git a/library/asyncio-task.po b/library/asyncio-task.po new file mode 100644 index 0000000000..d131bd93ec --- /dev/null +++ b/library/asyncio-task.po @@ -0,0 +1,1334 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-22 22:57+0100\n" +"PO-Revision-Date: 2020-09-22 17:11+0200\n" +"Last-Translator: Philippe GALVAN \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/asyncio-task.rst:6 +msgid "Coroutines and Tasks" +msgstr "Coroutines et tâches" + +#: library/asyncio-task.rst:8 +msgid "" +"This section outlines high-level asyncio APIs to work with coroutines and " +"Tasks." +msgstr "" +"Cette section donne un aperçu des API de haut-niveau du module *asyncio* " +"pour utiliser les coroutines et les tâches." + +#: library/asyncio-task.rst:125 +msgid "Coroutines" +msgstr "Coroutines" + +#: library/asyncio-task.rst:21 +msgid "**Source code:** :source:`Lib/asyncio/coroutines.py`" +msgstr "" + +#: library/asyncio-task.rst:25 +#, 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 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 " +"exemple, l’extrait de code suivant (requiert Python 3.7+) affiche « hello », " +"attend 1 seconde et affiche ensuite « world » ::" + +#: library/asyncio-task.rst:41 +msgid "" +"Note that simply calling a coroutine will not schedule it to be executed::" +msgstr "Appeler une coroutine ne la planifie pas pour exécution ::" + +#: library/asyncio-task.rst:47 +msgid "To actually run a coroutine, asyncio provides three main mechanisms:" +msgstr "" +"Pour réellement exécuter une coroutine, *asyncio* fournit trois mécanismes " +"principaux :" + +#: library/asyncio-task.rst:49 +msgid "" +"The :func:`asyncio.run` function to run the top-level entry point \"main()\" " +"function (see the above example.)" +msgstr "" +"La fonction :func:`asyncio.run` pour exécuter la fonction « main() », le " +"point d'entrée de haut-niveau (voir l'exemple ci-dessus)." + +#: library/asyncio-task.rst:52 +msgid "" +"Awaiting on a coroutine. The following snippet of code will print \"hello\" " +"after waiting for 1 second, and then print \"world\" after waiting for " +"*another* 2 seconds::" +msgstr "" +"Attendre une coroutine. Le morceau de code suivant attend une seconde, " +"affiche « hello », attend 2 secondes *supplémentaires*, puis affiche enfin " +"« world » ::" + +#: library/asyncio-task.rst:73 +msgid "Expected output::" +msgstr "Sortie attendue ::" + +#: library/asyncio-task.rst:80 +msgid "" +"The :func:`asyncio.create_task` function to run coroutines concurrently as " +"asyncio :class:`Tasks `." +msgstr "" +"La fonction :func:`asyncio.create_task` pour exécuter de manière concurrente " +"des coroutines en tant que :class:`tâches ` *asyncio*." + +#: library/asyncio-task.rst:83 +msgid "" +"Let's modify the above example and run two ``say_after`` coroutines " +"*concurrently*::" +msgstr "" +"Modifions l'exemple ci-dessus et lançons deux coroutines ``say_after`` *de " +"manière concurrente* ::" + +#: library/asyncio-task.rst:102 +msgid "" +"Note that expected output now shows that the snippet runs 1 second faster " +"than before::" +msgstr "" +"La sortie attendue montre à présent que ce code s'exécute une seconde plus " +"rapidement que le précédent ::" + +#: library/asyncio-task.rst:114 +msgid "Awaitables" +msgstr "*Attendables*" + +#: library/asyncio-task.rst:116 +msgid "" +"We say that an object is an **awaitable** object if it can be used in an :" +"keyword:`await` expression. Many asyncio APIs are designed to accept " +"awaitables." +msgstr "" +"Un objet est dit *attendable* (*awaitable* en anglais, c.-à-d. qui peut être " +"attendu) s'il peut être utilisé dans une expression :keyword:`await`. " +"Beaucoup d'API d'*asyncio* sont conçues pour accepter des *attendables*." + +#: library/asyncio-task.rst:120 +msgid "" +"There are three main types of *awaitable* objects: **coroutines**, " +"**Tasks**, and **Futures**." +msgstr "" +"Il existe trois types principaux d'*attendables* : les **coroutines**, les " +"**tâches** et les **futurs**." + +#: library/asyncio-task.rst:126 +msgid "" +"Python coroutines are *awaitables* and therefore can be awaited from other " +"coroutines::" +msgstr "" +"Les coroutines sont des *awaitables* et peuvent donc être attendues par " +"d'autres coroutines ::" + +#: library/asyncio-task.rst:147 +msgid "" +"In this documentation the term \"coroutine\" can be used for two closely " +"related concepts:" +msgstr "" +"Dans cette documentation, le terme « coroutine » est utilisé pour désigner " +"deux concepts voisins :" + +#: library/asyncio-task.rst:150 +msgid "a *coroutine function*: an :keyword:`async def` function;" +msgstr "une *fonction coroutine* : une fonction :keyword:`async def` ;" + +#: library/asyncio-task.rst:152 +msgid "" +"a *coroutine object*: an object returned by calling a *coroutine function*." +msgstr "un *objet coroutine* : un objet renvoyé par une *fonction coroutine*." + +#: library/asyncio-task.rst:155 +msgid "" +"asyncio also supports legacy :ref:`generator-based " +"` coroutines." +msgstr "" +"*asyncio* implémente également les coroutines :ref:`basées sur des " +"générateurs ` ; celles-ci sont obsolètes." + +#: library/asyncio-task.rst:160 +msgid "Tasks" +msgstr "Tâches" + +#: library/asyncio-task.rst:161 +msgid "*Tasks* are used to schedule coroutines *concurrently*." +msgstr "" +"Les *tâches* servent à planifier des coroutines de façon à ce qu'elles " +"s'exécutent de manière concurrente." + +#: library/asyncio-task.rst:163 +msgid "" +"When a coroutine is wrapped into a *Task* with functions like :func:`asyncio." +"create_task` the coroutine is automatically scheduled to run soon::" +msgstr "" +"Lorsqu'une coroutine est encapsulée dans une *tâche* à l'aide de fonctions " +"comme :func:`asyncio.create_task`, la coroutine est automatiquement " +"planifiée pour s'exécuter prochainement ::" + +#: library/asyncio-task.rst:185 +msgid "Futures" +msgstr "Futurs" + +#: library/asyncio-task.rst:186 +msgid "" +"A :class:`Future` is a special **low-level** awaitable object that " +"represents an **eventual result** of an asynchronous operation." +msgstr "" +"Un :class:`Future` est un objet *awaitable* spécial de **bas-niveau**, qui " +"représente le **résultat final** d'une opération asynchrone." + +#: library/asyncio-task.rst:189 +msgid "" +"When a Future object is *awaited* it means that the coroutine will wait " +"until the Future is resolved in some other place." +msgstr "" +"Quand un objet *Future* est *attendu*, cela signifie que la coroutine " +"attendra que ce futur soit résolu à un autre endroit." + +#: library/asyncio-task.rst:192 +msgid "" +"Future objects in asyncio are needed to allow callback-based code to be used " +"with async/await." +msgstr "" +"Les objets *Future* d'*asyncio* sont nécessaires pour permettre l'exécution " +"de code basé sur les fonctions de rappel avec la syntaxe *async* / *await*." + +#: library/asyncio-task.rst:195 +msgid "" +"Normally **there is no need** to create Future objects at the application " +"level code." +msgstr "" +"Il est normalement **inutile** de créer des objets *Future* dans la couche " +"applicative du code." + +#: library/asyncio-task.rst:198 +msgid "" +"Future objects, sometimes exposed by libraries and some asyncio APIs, can be " +"awaited::" +msgstr "" +"Les objets *Future*, parfois exposés par des bibliothèques et quelques API " +"d'*asyncio*, peuvent être attendus ::" + +#: library/asyncio-task.rst:210 +msgid "" +"A good example of a low-level function that returns a Future object is :meth:" +"`loop.run_in_executor`." +msgstr "" +":meth:`loop.run_in_executor` est l'exemple typique d'une fonction bas-niveau " +"renvoyant un objet *Future*." + +#: library/asyncio-task.rst:215 +msgid "Running an asyncio Program" +msgstr "Exécution d'un programme *asyncio*" + +#: library/asyncio-task.rst:219 +msgid "Execute the :term:`coroutine` *coro* and return the result." +msgstr "Exécute la :term:`coroutine` *coro* et renvoie le résultat." + +#: library/asyncio-task.rst:221 +#, fuzzy +msgid "" +"This function runs the passed coroutine, taking care of managing the asyncio " +"event loop, *finalizing asynchronous generators*, and closing the threadpool." +msgstr "" +"Cette fonction exécute la coroutine passée en argument. Elle gère la boucle " +"d'événements *asyncio* et *finalise les générateurs asynchrones*." + +#: library/asyncio-task.rst:225 +msgid "" +"This function cannot be called when another asyncio event loop is running in " +"the same thread." +msgstr "" +"Cette fonction ne peut pas être appelée si une autre boucle d'événement " +"*asyncio* s'exécute dans le même fil d'exécution." + +#: library/asyncio-task.rst:228 +msgid "If *debug* is ``True``, the event loop will be run in debug mode." +msgstr "" +"Si *debug* vaut ``True``, la boucle d'événement s'exécute en mode de " +"débogage." + +#: library/asyncio-task.rst:230 +msgid "" +"This function always creates a new event loop and closes it at the end. It " +"should be used as a main entry point for asyncio programs, and should " +"ideally only be called once." +msgstr "" +"Cette fonction crée toujours une nouvelle boucle d'événement et la clôt à la " +"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:382 library/asyncio-task.rst:657 +msgid "Example::" +msgstr "Exemple ::" + +#: library/asyncio-task.rst:244 +msgid "Updated to use :meth:`loop.shutdown_default_executor`." +msgstr "" + +#: library/asyncio-task.rst:248 +msgid "" +"The source code for ``asyncio.run()`` can be found in :source:`Lib/asyncio/" +"runners.py`." +msgstr "" +"Le code source pour ``asyncio.run()`` est disponible dans :source:`Lib/" +"asyncio/runners.py`." + +#: library/asyncio-task.rst:252 +msgid "Creating Tasks" +msgstr "Création de tâches" + +#: library/asyncio-task.rst:254 +msgid "**Source code:** :source:`Lib/asyncio/tasks.py`" +msgstr "" + +#: library/asyncio-task.rst:260 +msgid "" +"Wrap the *coro* :ref:`coroutine ` into a :class:`Task` and " +"schedule its execution. Return the Task object." +msgstr "" +"Encapsule la :ref:`coroutine ` *coro* dans une tâche et la " +"planifie pour exécution. Renvoie l'objet :class:`Task`." + +#: library/asyncio-task.rst:263 +msgid "" +"If *name* is not ``None``, it is set as the name of the task using :meth:" +"`Task.set_name`." +msgstr "" +"Si *name* n’est pas ``None``, il est défini comme le nom de la tâche en " +"utilisant :meth:`Task.set_name`." + +#: library/asyncio-task.rst:266 +msgid "" +"The task is executed in the loop returned by :func:`get_running_loop`, :exc:" +"`RuntimeError` is raised if there is no running loop in current thread." +msgstr "" +"La tâche est exécutée dans la boucle renvoyée par :func:" +"`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:272 +msgid "" +"Save a reference to the result of this function, to avoid a task " +"disappearing mid-execution. The event loop only keeps weak references to " +"tasks. A task that isn't referenced elsewhere may get garbage collected at " +"any time, even before it's done. For reliable \"fire-and-forget\" background " +"tasks, gather them in a collection::" +msgstr "" + +#: library/asyncio-task.rst:846 +#, fuzzy +msgid "Added the *name* parameter." +msgstr "ajout du paramètre ``name``." + +#: library/asyncio-task.rst:299 +msgid "Sleeping" +msgstr "Attente" + +#: library/asyncio-task.rst:303 +msgid "Block for *delay* seconds." +msgstr "Attend pendant *delay* secondes." + +#: library/asyncio-task.rst:305 +msgid "" +"If *result* is provided, it is returned to the caller when the coroutine " +"completes." +msgstr "" +"Si *result* est spécifié, il est renvoyé à l'appelant quand la coroutine se " +"termine." + +#: library/asyncio-task.rst:308 +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:311 +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:320 +msgid "" +"The ``loop`` parameter. This function has been implicitly getting the " +"current running loop since 3.7. See :ref:`What's New in 3.10's Removed " +"section ` for more information." +msgstr "" + +#: library/asyncio-task.rst:323 +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:377 library/asyncio-task.rst:485 +#: library/asyncio-task.rst:549 library/asyncio-task.rst:643 +#: library/asyncio-task.rst:663 +msgid "Removed the *loop* parameter." +msgstr "Suppression du paramètre *loop*." + +#: library/asyncio-task.rst:346 +msgid "Running Tasks Concurrently" +msgstr "Exécution de tâches de manière concurrente" + +#: library/asyncio-task.rst:350 +msgid "" +"Run :ref:`awaitable objects ` in the *aws* sequence " +"*concurrently*." +msgstr "" +"Exécute les objets :ref:`awaitable ` de la séquence " +"*aws*, *de manière concurrente*." + +#: library/asyncio-task.rst:353 +msgid "" +"If any awaitable in *aws* is a coroutine, it is automatically scheduled as a " +"Task." +msgstr "" +"Si un *attendable* de *aws* est une coroutine, celui-ci est automatiquement " +"planifié comme une tâche *Task*." + +#: library/asyncio-task.rst:356 +msgid "" +"If all awaitables are completed successfully, the result is an aggregate " +"list of returned values. The order of result values corresponds to the " +"order of awaitables in *aws*." +msgstr "" +"Si tous les *awaitables* s'achèvent avec succès, le résultat est la liste " +"des valeurs renvoyées. L'ordre de cette liste correspond à l'ordre des " +"*awaitables* dans *aws*." + +#: library/asyncio-task.rst:360 +msgid "" +"If *return_exceptions* is ``False`` (default), the first raised exception is " +"immediately propagated to the task that awaits on ``gather()``. Other " +"awaitables in the *aws* sequence **won't be cancelled** and will continue to " +"run." +msgstr "" +"Si *return_exceptions* vaut ``False`` (valeur par défaut), la première " +"exception levée est immédiatement propagée vers la tâche en attente dans le " +"``gather()``. Les autres *attendables* dans la séquence *aws* **ne sont pas " +"annulés** et poursuivent leur exécution." + +#: library/asyncio-task.rst:365 +msgid "" +"If *return_exceptions* is ``True``, exceptions are treated the same as " +"successful results, and aggregated in the result list." +msgstr "" +"Si *return_exceptions* vaut ``True``, les exceptions sont traitées de la " +"même manière que les exécutions normales, et incluses dans la liste des " +"résultats." + +#: library/asyncio-task.rst:368 +msgid "" +"If ``gather()`` is *cancelled*, all submitted awaitables (that have not " +"completed yet) are also *cancelled*." +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:371 +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** " +"cancelled in this case. This is to prevent the cancellation of one " +"submitted Task/Future to cause other Tasks/Futures to be cancelled." +msgstr "" +"Si n'importe quel *Task* ou *Future* de la séquence *aws* est *annulé*, il " +"est traité comme s'il avait levé :exc:`CancelledError` — l'appel à " +"``gather()`` n'est alors **pas** annulé. Ceci permet d'empêcher que " +"l'annulation d'une tâche ou d'un futur entraîne l'annulation des autres " +"tâches ou futurs." + +#: library/asyncio-task.rst:420 +msgid "" +"If *return_exceptions* is False, cancelling gather() after it has been " +"marked done won't cancel any submitted awaitables. For instance, gather can " +"be marked done after propagating an exception to the caller, therefore, " +"calling ``gather.cancel()`` after catching an exception (raised by one of " +"the awaitables) from gather won't cancel any other awaitables." +msgstr "" + +#: library/asyncio-task.rst:427 +msgid "" +"If the *gather* itself is cancelled, the cancellation is propagated " +"regardless of *return_exceptions*." +msgstr "" +"Si *gather* est lui-même annulé, l'annulation est propagée indépendamment de " +"*return_exceptions*." + +#: library/asyncio-task.rst:434 +msgid "" +"Deprecation warning is emitted if no positional arguments are provided or " +"not all positional arguments are Future-like objects and there is no running " +"event loop." +msgstr "" + +#: library/asyncio-task.rst:441 +msgid "Shielding From Cancellation" +msgstr "Protection contre l'annulation" + +#: library/asyncio-task.rst:445 +msgid "" +"Protect an :ref:`awaitable object ` from being :meth:" +"`cancelled `." +msgstr "" +"Empêche qu'un objet :ref:`awaitable ` puisse être :meth:" +"`annulé `." + +#: library/asyncio-task.rst:501 +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:450 +msgid "The statement::" +msgstr "L'instruction ::" + +#: library/asyncio-task.rst:455 +msgid "is equivalent to::" +msgstr "est équivalente à ::" + +#: library/asyncio-task.rst:459 +msgid "" +"*except* that if the coroutine containing it is cancelled, the Task running " +"in ``something()`` is not cancelled. From the point of view of " +"``something()``, the cancellation did not happen. Although its caller is " +"still cancelled, so the \"await\" expression still raises a :exc:" +"`CancelledError`." +msgstr "" +"*à la différence près* que, si la coroutine qui la contient est annulée, la " +"tâche s'exécutant dans ``something()`` n'est pas annulée. Du point de vue de " +"``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:465 +msgid "" +"If ``something()`` is cancelled by other means (i.e. from within itself) " +"that would also cancel ``shield()``." +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:468 +msgid "" +"If it is desired to completely ignore cancellation (not recommended) the " +"``shield()`` function should be combined with a try/except clause, as " +"follows::" +msgstr "" +"Pour ignorer complètement l'annulation (déconseillé), la fonction " +"``shield()`` peut être combinée à une clause *try* / *except*, comme dans le " +"code ci-dessous ::" + +#: library/asyncio-task.rst:480 +msgid "" +"Save a reference to tasks passed to this function, to avoid a task " +"disappearing mid-execution. The event loop only keeps weak references to " +"tasks. A task that isn't referenced elsewhere may get garbage collected at " +"any time, even before it's done." +msgstr "" + +#: library/asyncio-task.rst:488 +msgid "" +"Deprecation warning is emitted if *aw* is not Future-like object and there " +"is no running event loop." +msgstr "" + +#: library/asyncio-task.rst:494 +msgid "Timeouts" +msgstr "Délais d'attente" + +#: library/asyncio-task.rst:498 +msgid "" +"Wait for the *aw* :ref:`awaitable ` to complete with a " +"timeout." +msgstr "" +"Attend la fin de l':ref:`awaitable ` *aw* avec délai " +"d'attente." + +#: library/asyncio-task.rst:503 +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." +msgstr "" +"*timeout* peut-être soit ``None``, soit le nombre de secondes (entier ou " +"décimal) d'attente. Si *timeout* vaut ``None``, la fonction s'interrompt " +"jusqu'à ce que le futur s'achève." + +#: library/asyncio-task.rst:507 +msgid "" +"If a timeout occurs, it cancels the task and raises :exc:`asyncio." +"TimeoutError`." +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:510 +msgid "" +"To avoid the task :meth:`cancellation `, wrap it in :func:" +"`shield`." +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:513 +#, fuzzy +msgid "" +"The function will wait until the future is actually cancelled, so the total " +"wait time may exceed the *timeout*. If an exception happens during " +"cancellation, it is propagated." +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:517 +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:544 +msgid "" +"When *aw* is cancelled due to a timeout, ``wait_for`` waits for *aw* to be " +"cancelled. Previously, it raised :exc:`asyncio.TimeoutError` immediately." +msgstr "" +"Si le dépassement du délai d'attente maximal provoque l'annulation de *aw*, " +"``wait_for`` attend que *aw* soit annulée. Auparavant, l'exception :exc:" +"`asyncio.TimeoutError` était immédiatement levée." + +#: library/asyncio-task.rst:554 +msgid "Waiting Primitives" +msgstr "Primitives d'attente" + +#: library/asyncio-task.rst:558 +#, fuzzy +msgid "" +"Run :ref:`awaitable objects ` in the *aws* iterable " +"concurrently and block until the condition specified by *return_when*." +msgstr "" +"Exécute les objets :ref:`awaitables ` de l'ensemble " +"*aws* de manière concurrente, et s'interrompt jusqu'à ce que la condition " +"décrite dans *return_when* soit vraie." + +#: library/asyncio-task.rst:562 +msgid "The *aws* iterable must not be empty." +msgstr "" + +#: library/asyncio-task.rst:564 +msgid "Returns two sets of Tasks/Futures: ``(done, pending)``." +msgstr "Renvoie deux ensembles de *Tasks* / *Futures* : ``(done, pending)``." + +#: library/asyncio-task.rst:566 +msgid "Usage::" +msgstr "Utilisation ::" + +#: library/asyncio-task.rst:570 +msgid "" +"*timeout* (a float or int), if specified, can be used to control the maximum " +"number of seconds to wait before returning." +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:573 +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 " +"second set." +msgstr "" +"Cette fonction ne lève pas :exc:`asyncio.TimeoutError`. Les futurs et les " +"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:577 +msgid "" +"*return_when* indicates when this function should return. It must be one of " +"the following constants:" +msgstr "" +"*return_when* indique quand la fonction doit se terminer. Il peut prendre " +"les valeurs suivantes :" + +#: library/asyncio-task.rst:583 +msgid "Constant" +msgstr "Constante" + +#: library/asyncio-task.rst:583 +msgid "Description" +msgstr "Description" + +#: library/asyncio-task.rst:585 +msgid ":const:`FIRST_COMPLETED`" +msgstr ":const:`FIRST_COMPLETED`" + +#: library/asyncio-task.rst:585 +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:588 +msgid ":const:`FIRST_EXCEPTION`" +msgstr ":const:`FIRST_EXCEPTION`" + +#: library/asyncio-task.rst:588 +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:" +"`ALL_COMPLETED`." +msgstr "" +"La fonction se termine lorsque n'importe quel futur se termine en levant une " +"exception. Si aucun *futur* ne lève d'exception, équivaut à :const:" +"`ALL_COMPLETED`." + +#: library/asyncio-task.rst:594 +msgid ":const:`ALL_COMPLETED`" +msgstr ":const:`ALL_COMPLETED`" + +#: library/asyncio-task.rst:594 +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:598 +msgid "" +"Unlike :func:`~asyncio.wait_for`, ``wait()`` does not cancel the futures " +"when a timeout occurs." +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:603 +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 " +"leads to :ref:`confusing behavior `." +msgstr "" +"Si un *awaitable* de *aws* est une coroutine, celle-ci est automatiquement " +"planifiée comme une tâche. Passer directement des objets coroutines à " +"``wait()`` est obsolète, car ceci conduisait :ref:`à un comportement portant " +"à confusion `." + +#: library/asyncio-task.rst:614 +msgid "" +"``wait()`` schedules coroutines as Tasks automatically and later returns " +"those implicitly created Task objects in ``(done, pending)`` sets. " +"Therefore the following code won't work as expected::" +msgstr "" +"``wait()`` planifie automatiquement les coroutines comme des tâches et " +"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:627 +msgid "Here is how the above snippet can be fixed::" +msgstr "Voici comment corriger le morceau de code ci-dessus ::" + +#: library/asyncio-task.rst:640 +msgid "Passing coroutine objects to ``wait()`` directly is deprecated." +msgstr "Passer directement des objets coroutines à ``wait()`` est obsolète." + +#: library/asyncio-task.rst:649 +#, fuzzy +msgid "" +"Run :ref:`awaitable objects ` in the *aws* iterable " +"concurrently. Return an iterator of coroutines. Each coroutine returned can " +"be awaited to get the earliest next result from the iterable of the " +"remaining awaitables." +msgstr "" +"Exécute les objets :ref:`awaitables ` de l'ensemble " +"*aws* de manière concurrente. Renvoie un itérateur sur des objets :class:" +"`Future`. Chaque objet *futur* renvoyé représente le résultat le plus récent " +"de l'ensemble des *awaitables* restants." + +#: library/asyncio-task.rst:654 +msgid "" +"Raises :exc:`asyncio.TimeoutError` if the timeout occurs before all Futures " +"are done." +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:666 +msgid "" +"Deprecation warning is emitted if not all awaitable objects in the *aws* " +"iterable are Future-like objects and there is no running event loop." +msgstr "" + +#: library/asyncio-task.rst:672 +msgid "Running in Threads" +msgstr "" + +#: library/asyncio-task.rst:676 +msgid "Asynchronously run function *func* in a separate thread." +msgstr "" + +#: library/asyncio-task.rst:678 +msgid "" +"Any \\*args and \\*\\*kwargs supplied for this function are directly passed " +"to *func*. Also, the current :class:`contextvars.Context` is propagated, " +"allowing context variables from the event loop thread to be accessed in the " +"separate thread." +msgstr "" + +#: library/asyncio-task.rst:683 +msgid "" +"Return a coroutine that can be awaited to get the eventual result of *func*." +msgstr "" + +#: library/asyncio-task.rst:685 +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:715 +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, by using ``asyncio.to_thread()``, we can run it in a separate " +"thread without blocking the event loop." +msgstr "" + +#: library/asyncio-task.rst:722 +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 " +"release the GIL or alternative Python implementations that don't have one, " +"``asyncio.to_thread()`` can also be used for CPU-bound functions." +msgstr "" + +#: library/asyncio-task.rst:731 +msgid "Scheduling From Other Threads" +msgstr "Planification depuis d'autres fils d'exécution" + +#: library/asyncio-task.rst:735 +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:737 +msgid "" +"Return a :class:`concurrent.futures.Future` to wait for the result from " +"another OS thread." +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:740 +msgid "" +"This function is meant to be called from a different OS thread than the one " +"where the event loop is running. Example::" +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:752 +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::" +msgstr "" +"Si une exception est levée dans une coroutine, le futur renvoyé en sera " +"averti. Elle peut également être utilisée pour annuler la tâche de la boucle " +"d'événement ::" + +#: library/asyncio-task.rst:766 +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-task.rst:769 +msgid "" +"Unlike other asyncio functions this function requires the *loop* argument to " +"be passed explicitly." +msgstr "" +"À la différence des autres fonctions d'*asyncio*, cette fonction requiert " +"que *loop* soit passé de manière explicite." + +#: library/asyncio-task.rst:776 +msgid "Introspection" +msgstr "Introspection" + +#: library/asyncio-task.rst:781 +msgid "" +"Return the currently running :class:`Task` instance, or ``None`` if no task " +"is running." +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:784 +msgid "" +"If *loop* is ``None`` :func:`get_running_loop` is used to get the current " +"loop." +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:792 +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:795 +msgid "" +"If *loop* is ``None``, :func:`get_running_loop` is used for getting current " +"loop." +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:802 +msgid "Task Object" +msgstr "Objets *Task*" + +#: library/asyncio-task.rst:806 +msgid "" +"A :class:`Future-like ` object that runs a Python :ref:`coroutine " +"`. Not thread-safe." +msgstr "" +"Objet compatible avec :class:`Future ` qui exécute une :ref:" +"`coroutine ` Python. Cet objet n'est pas utilisable dans des " +"programmes à fils d'exécution multiples." + +#: library/asyncio-task.rst:809 +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 " +"completion of the Future. When the Future is *done*, the execution of the " +"wrapped coroutine resumes." +msgstr "" +"Les tâches servent à exécuter des coroutines dans des boucles d'événements. " +"Si une coroutine attend un futur, la tâche interrompt son exécution et " +"attend la fin de ce *futur*. Quand celui-ci est terminé, l'exécution de la " +"coroutine encapsulée reprend." + +#: library/asyncio-task.rst:815 +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 " +"runs other Tasks, callbacks, or performs IO operations." +msgstr "" +"Les boucles d'événement fonctionnent de manière *coopérative* : une boucle " +"d'événement exécute une tâche à la fois. Quand une tâche attend la fin d'un " +"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:820 +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. " +"Manual instantiation of Tasks is discouraged." +msgstr "" +"La fonction de haut niveau :func:`asyncio.create_task` et les fonctions de " +"bas-niveau :meth:`loop.create_task` ou :func:`ensure_future` permettent de " +"créer des tâches. Il est déconseillé d'instancier manuellement des objets " +"*Task*." + +#: library/asyncio-task.rst:825 +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 " +"coroutine. If a coroutine is awaiting on a Future object during " +"cancellation, the Future object will be cancelled." +msgstr "" +"La méthode :meth:`cancel` d'une tâche en cours d'exécution permet d'annuler " +"celle-ci. L'appel de cette méthode force la tâche à lever l'exception :exc:" +"`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:830 +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:" +"`CancelledError` exception and was actually cancelled." +msgstr "" +"La méthode :meth:`cancelled` permet de vérifier si la tâche a été annulée. " +"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:835 +msgid "" +":class:`asyncio.Task` inherits from :class:`Future` all of its APIs except :" +"meth:`Future.set_result` and :meth:`Future.set_exception`." +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:839 +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 " +"context." +msgstr "" +"*Task* implémente le module :mod:`contextvars`. Lors de sa création, une " +"tâche effectue une copie du contexte actuel et exécutera ses coroutines dans " +"cette copie." + +#: library/asyncio-task.rst:843 +msgid "Added support for the :mod:`contextvars` module." +msgstr "Ajout du support du module :mod:`contextvars`." + +#: library/asyncio-task.rst:849 +msgid "" +"Deprecation warning is emitted if *loop* is not specified and there is no " +"running event loop." +msgstr "" +"Un ``DeprecationWarning`` est levé si *loop* n'est pas spécifié et s'il n'y " +"a pas de boucle d'évènements en cours d'exécution." + +#: library/asyncio-task.rst:855 +msgid "Request the Task to be cancelled." +msgstr "Demande l'annulation d'une tâche." + +#: library/asyncio-task.rst:857 +msgid "" +"This arranges for a :exc:`CancelledError` exception to be thrown into the " +"wrapped coroutine on the next cycle of the event loop." +msgstr "" +"Provisionne la levée de l'exception :exc:`CancelledError` dans la coroutine " +"encapsulée. L'exception sera levée au prochain cycle de la boucle " +"d'exécution." + +#: library/asyncio-task.rst:860 +msgid "" +"The coroutine then has a chance to clean up or even deny the request by " +"suppressing the exception with a :keyword:`try` ... ... ``except " +"CancelledError`` ... :keyword:`finally` block. Therefore, unlike :meth:" +"`Future.cancel`, :meth:`Task.cancel` does not guarantee that the Task will " +"be cancelled, although suppressing cancellation completely is not common and " +"is actively discouraged." +msgstr "" +"La coroutine peut alors faire le ménage ou même ignorer la requête en " +"supprimant l'exception à l'aide d'un bloc :keyword:`try` … … ``except " +"CancelledError`` … :keyword:`finally`. Par conséquent, contrairement à :meth:" +"`Future.cancel`, :meth:`Task.cancel` ne garantit pas que la tâche sera " +"annulée, bien qu'ignorer totalement une annulation ne soit ni une pratique " +"courante, ni encouragé." + +#: library/asyncio-task.rst:868 +msgid "Added the *msg* parameter." +msgstr "Ajout du paramètre *msg*." + +#: library/asyncio-task.rst:873 +msgid "" +"The following example illustrates how coroutines can intercept the " +"cancellation request::" +msgstr "" +"L'exemple ci-dessous illustre comment une coroutine peut intercepter une " +"requête d'annulation ::" + +#: library/asyncio-task.rst:912 +msgid "Return ``True`` if the Task is *cancelled*." +msgstr "Renvoie ``True`` si la tâche est *annulée*." + +#: library/asyncio-task.rst:914 +msgid "" +"The Task is *cancelled* when the cancellation was requested with :meth:" +"`cancel` and the wrapped coroutine propagated the :exc:`CancelledError` " +"exception thrown into it." +msgstr "" +"La tâche est *annulée* quand l'annulation a été demandée avec :meth:`cancel` " +"et la coroutine encapsulée a propagé l'exception :exc:`CancelledError` qui a " +"été levée en son sein." + +#: library/asyncio-task.rst:920 +msgid "Return ``True`` if the Task is *done*." +msgstr "Renvoie ``True`` si la tâche est *achevée*." + +#: library/asyncio-task.rst:922 +msgid "" +"A Task is *done* when the wrapped coroutine either returned a value, raised " +"an exception, or the Task was cancelled." +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:927 +msgid "Return the result of the Task." +msgstr "Renvoie le résultat de la tâche." + +#: library/asyncio-task.rst:929 +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.)" +msgstr "" +"Si la tâche est *achevée*, le résultat de la coroutine encapsulée est " +"renvoyé (sinon, dans le cas où la coroutine a levé une exception, cette " +"exception est de nouveau levée)." + +#: library/asyncio-task.rst:947 +msgid "" +"If the Task 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:" +"`CancelledError`." + +#: library/asyncio-task.rst:936 +msgid "" +"If the Task's result isn't yet available, this method raises a :exc:" +"`InvalidStateError` exception." +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:941 +msgid "Return the exception of the Task." +msgstr "Renvoie l'exception de la tâche." + +#: library/asyncio-task.rst:943 +msgid "" +"If the wrapped coroutine raised an exception that exception is returned. If " +"the wrapped coroutine returned normally this method returns ``None``." +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:950 +msgid "" +"If the Task 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`." + +#: library/asyncio-task.rst:955 +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:966 +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:959 +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:964 +msgid "Remove *callback* from the callbacks list." +msgstr "Retire *callback* de la liste de fonctions de rappel." + +#: library/asyncio-task.rst:968 +msgid "" +"See the documentation of :meth:`Future.remove_done_callback` for more " +"details." +msgstr "" +"Se référer à la documentation de :meth:`Future.remove_done_callback` pour " +"plus de détails." + +#: library/asyncio-task.rst:973 +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:975 +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, " +"this returns an empty list. If the coroutine was terminated by an exception, " +"this returns the list of traceback frames." +msgstr "" +"Si la coroutine encapsulée n'est pas terminée, cette fonction renvoie la " +"pile d'appels à partir de l'endroit où celle-ci est interrompue. Si la " +"coroutine s'est terminée normalement ou a été annulée, cette fonction " +"renvoie une liste vide. Si la coroutine a été terminée par une exception, " +"ceci renvoie la pile d'erreurs." + +#: library/asyncio-task.rst:981 +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:983 +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:985 +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 " +"list differs depending on whether a stack or a traceback is returned: the " +"newest frames of a stack are returned, but the oldest frames of a traceback " +"are returned. (This matches the behavior of the traceback module.)" +msgstr "" +"L'argument facultatif *limit* définit le nombre maximal d'appels à " +"renvoyer ; par défaut, tous sont renvoyés. L'ordre de la liste diffère selon " +"la nature de celle-ci : les appels les plus récents d'une pile d'appels sont " +"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:994 +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:996 +msgid "" +"This produces output similar to that of the traceback module for the frames " +"retrieved by :meth:`get_stack`." +msgstr "" +"Le format de sortie des appels produits par :meth:`get_stack` est similaire " +"à celui du module *traceback*." + +#: library/asyncio-task.rst:999 +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:1001 +#, fuzzy +msgid "" +"The *file* argument is an I/O stream to which the output is written; by " +"default output is written to :data:`sys.stdout`." +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:1006 +msgid "Return the coroutine object wrapped by the :class:`Task`." +msgstr "Renvoie l’objet *coroutine* encapsulé par la :class:`Task`." + +#: library/asyncio-task.rst:1012 +msgid "Return the name of the Task." +msgstr "Renvoie le nom de la tâche." + +#: library/asyncio-task.rst:1014 +msgid "" +"If no name has been explicitly assigned to the Task, the default asyncio " +"Task implementation generates a default name during instantiation." +msgstr "" +"Si aucun nom n’a été explicitement assigné à la tâche, l’implémentation par " +"défaut d’une *Task* *asyncio* génère un nom par défaut durant " +"l’instanciation." + +#: library/asyncio-task.rst:1022 +msgid "Set the name of the Task." +msgstr "Définit le nom de la tâche." + +#: library/asyncio-task.rst:1024 +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:1027 +msgid "" +"In the default Task implementation, the name will be visible in the :func:" +"`repr` output of a task object." +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:1036 +msgid "Generator-based Coroutines" +msgstr "Coroutines basées sur des générateurs" + +#: library/asyncio-task.rst:1040 +#, fuzzy +msgid "" +"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:1043 +msgid "" +"Generator-based coroutines predate async/await syntax. They are Python " +"generators that use ``yield from`` expressions to await on Futures and other " +"coroutines." +msgstr "" +"Les coroutines basées sur des générateurs sont antérieures à la syntaxe " +"*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:1047 +msgid "" +"Generator-based coroutines should be decorated with :func:`@asyncio." +"coroutine `, although this is not enforced." +msgstr "" +"Les coroutines basées sur des générateurs doivent être décorées avec :func:" +"`@asyncio.coroutine `, même si ce n'est pas vérifié par " +"l'interpréteur." + +#: library/asyncio-task.rst:1054 +msgid "Decorator to mark generator-based coroutines." +msgstr "Décorateur pour coroutines basées sur des générateurs." + +#: library/asyncio-task.rst:1056 +msgid "" +"This decorator enables legacy generator-based coroutines to be compatible " +"with async/await code::" +msgstr "" +"Ce décorateur rend compatibles les coroutines basées sur des générateurs " +"avec le code *async* / *await* ::" + +#: library/asyncio-task.rst:1066 +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:1071 +msgid "Use :keyword:`async def` instead." +msgstr "utilisez :keyword:`async def` à la place." + +#: library/asyncio-task.rst:1075 +msgid "Return ``True`` if *obj* is a :ref:`coroutine object `." +msgstr "Renvoie ``True`` si *obj* est un :ref:`objet coroutine `." + +#: library/asyncio-task.rst:1077 +msgid "" +"This method is different from :func:`inspect.iscoroutine` because it returns " +"``True`` for generator-based coroutines." +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:1082 +msgid "Return ``True`` if *func* is a :ref:`coroutine function `." +msgstr "" +"Renvoie ``True`` si *func* est une :ref:`fonction coroutine `." + +#: library/asyncio-task.rst:1085 +msgid "" +"This method is different from :func:`inspect.iscoroutinefunction` because it " +"returns ``True`` for generator-based coroutine functions decorated with :" +"func:`@coroutine `." +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 new file mode 100644 index 0000000000..90e24a799b --- /dev/null +++ b/library/asyncio.po @@ -0,0 +1,145 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-22 22:57+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.4.3\n" + +#: library/asyncio.rst:76 +msgid "High-level APIs" +msgstr "Bibliothèques de haut-niveau" + +#: library/asyncio.rst:87 +msgid "Low-level APIs" +msgstr "Bibliothèques de bas-niveau" + +#: library/asyncio.rst:97 +msgid "Guides and Tutorials" +msgstr "Guides et tutoriels" + +#: library/asyncio.rst:2 +msgid ":mod:`asyncio` --- Asynchronous I/O" +msgstr ":mod:`asyncio` — Entrées/Sorties asynchrones" + +#: library/asyncio.rst:None +msgid "Hello World!" +msgstr "Hello World !" + +#: library/asyncio.rst:22 +msgid "" +"asyncio is a library to write **concurrent** code using the **async/await** " +"syntax." +msgstr "" +"``asyncio`` est une bibliothèque permettant de faire de la programmation " +"asynchrone en utilisant la syntaxe *async*/*await*." + +#: library/asyncio.rst:25 +msgid "" +"asyncio is used as a foundation for multiple Python asynchronous frameworks " +"that provide high-performance network and web-servers, database connection " +"libraries, distributed task queues, etc." +msgstr "" +"``asyncio`` constitue la base de nombreux cadriciels (*frameworks*) Python " +"asynchrones qui fournissent des utilitaires réseau et des serveurs web " +"performants, des bibliothèques de connexion à des bases de données, des " +"files d'exécution distribuées, etc." + +#: library/asyncio.rst:29 +msgid "" +"asyncio is often a perfect fit for IO-bound and high-level **structured** " +"network code." +msgstr "" +"``asyncio`` est souvent le bon choix pour écrire du code réseau de haut-" +"niveau et tributaire des entrées-sorties (*IO-bound*)." + +#: library/asyncio.rst:32 +msgid "asyncio provides a set of **high-level** APIs to:" +msgstr "" +"``asyncio`` fournit des interfaces de programmation **haut-niveau** pour :" + +#: library/asyncio.rst:34 +msgid "" +":ref:`run Python coroutines ` concurrently and have full control " +"over their execution;" +msgstr "" +":ref:`exécuter des coroutines Python ` de manière concurrente et " +"d'avoir le contrôle total sur leur exécution ;" + +#: library/asyncio.rst:37 +msgid "perform :ref:`network IO and IPC `;" +msgstr "" +"effectuer :ref:`des entrées/sorties réseau et de la communication inter-" +"processus ` ;" + +#: library/asyncio.rst:39 +msgid "control :ref:`subprocesses `;" +msgstr "contrôler des :ref:`sous-processus ` ;" + +#: library/asyncio.rst:41 +msgid "distribute tasks via :ref:`queues `;" +msgstr "distribuer des tâches avec des :ref:`queues ` ;" + +#: library/asyncio.rst:43 +msgid ":ref:`synchronize ` concurrent code;" +msgstr "" +":ref:`synchroniser ` du code s'exécutant de manière " +"concurrente ;" + +#: library/asyncio.rst:45 +msgid "" +"Additionally, there are **low-level** APIs for *library and framework " +"developers* to:" +msgstr "" +"En plus, il existe des bibliothèques de **bas-niveau** pour que les " +"*développeurs de bibliothèques et de frameworks* puissent :" + +#: library/asyncio.rst:48 +msgid "" +"create and manage :ref:`event loops `, which provide " +"asynchronous APIs for :meth:`networking `, running :meth:" +"`subprocesses `, handling :meth:`OS signals `, etc;" +msgstr "" +"créer et gérer des :ref:`boucles d'événements `, qui " +"fournissent des bibliothèques asynchrones de :meth:`réseau `, d'exécution de :meth:`subprocesses `, " +"de gestion de :meth:`signaux système `, etc ;" + +#: library/asyncio.rst:53 +msgid "" +"implement efficient protocols using :ref:`transports `;" +msgstr "" +"implémenter des protocoles efficaces à l'aide de :ref:`transports ` ;" + +#: library/asyncio.rst:56 +msgid "" +":ref:`bridge ` callback-based libraries and code with async/" +"await syntax." +msgstr "" +":ref:`lier ` des bibliothèques basées sur les fonctions de " +"rappel et développer avec la syntaxe *async*/*await*." + +#: library/asyncio.rst:59 +msgid "You can experiment with an ``asyncio`` concurrent context in the REPL:" +msgstr "" + +#: library/asyncio.rst:75 +msgid "Reference" +msgstr "Sommaire" + +#: library/asyncio.rst:106 +msgid "The source code for asyncio can be found in :source:`Lib/asyncio/`." +msgstr "" +"Le code source d'``asyncio`` est disponible dans :source:`Lib/asyncio/`." diff --git a/library/asyncore.po b/library/asyncore.po new file mode 100644 index 0000000000..0c0d294645 --- /dev/null +++ b/library/asyncore.po @@ -0,0 +1,367 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-05-21 16:37+0200\n" +"PO-Revision-Date: 2018-07-27 23:21+0200\n" +"Last-Translator: Julien Palard \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" + +#: library/asyncore.rst:2 +msgid ":mod:`asyncore` --- Asynchronous socket handler" +msgstr ":mod:`asyncore` — Gestionnaire de socket asynchrone" + +#: library/asyncore.rst:14 +msgid "**Source code:** :source:`Lib/asyncore.py`" +msgstr "**Code source :** :source:`Lib/asyncore.py`" + +#: 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:25 +msgid "" +"This module exists for backwards compatibility only. For new code we " +"recommend using :mod:`asyncio`." +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:28 +msgid "" +"This module provides the basic infrastructure for writing asynchronous " +"socket service clients and servers." +msgstr "" + +#: 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 " +"most popular way to do it, but there is another very different technique, " +"that lets you have nearly all the advantages of multi-threading, without " +"actually using multiple threads. It's really only practical if your " +"program is largely I/O bound. If your program is processor bound, then pre-" +"emptive scheduled threads are probably what you really need. Network " +"servers are rarely processor bound, however." +msgstr "" + +#: 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 " +"communication channels at once; doing other work while your I/O is taking " +"place in the \"background.\" Although this strategy can seem strange and " +"complex, especially at first, it is in many ways easier to understand and " +"control than multi-threaded programming. The :mod:`asyncore` module solves " +"many of the difficult problems for you, making the task of building " +"sophisticated high-performance network servers and clients a snap. For " +"\"conversational\" applications and protocols the companion :mod:`asynchat` " +"module is invaluable." +msgstr "" + +#: 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:" +"`asynchat.async_chat`. Creating the channels adds them to a global map, " +"used by the :func:`loop` function if you do not provide it with your own " +"*map*." +msgstr "" + +#: 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 " +"(including any that have been added to the map during asynchronous service) " +"is closed." +msgstr "" + +#: 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 " +"defaults to ``None``, resulting in the loop terminating only when all " +"channels have been closed. The *timeout* argument sets the timeout " +"parameter for the appropriate :func:`~select.select` or :func:`~select.poll` " +"call, measured in seconds; the default is 30 seconds. The *use_poll* " +"parameter, if true, indicates that :func:`~select.poll` should be used in " +"preference to :func:`~select.select` (the default is ``False``)." +msgstr "" + +#: 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 " +"omitted, a global map is used. Channels (instances of :class:`asyncore." +"dispatcher`, :class:`asynchat.async_chat` and subclasses thereof) can freely " +"be mixed in the map." +msgstr "" + +#: 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 " +"which are called from the asynchronous loop. Otherwise, it can be treated " +"as a normal non-blocking socket object." +msgstr "" + +#: 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 " +"taken place. For example, if we have asked for a socket to connect to " +"another host, we know that the connection has been made when the socket " +"becomes writable for the first time (at this point you know that you may " +"write to it with the expectation of success). The implied higher-level " +"events are:" +msgstr "" + +#: library/asyncore.rst:96 +msgid "Event" +msgstr "" + +#: library/asyncore.rst:96 +msgid "Description" +msgstr "Description" + +#: library/asyncore.rst:98 +msgid "``handle_connect()``" +msgstr "``handle_connect()``" + +#: library/asyncore.rst:98 +msgid "Implied by the first read or write event" +msgstr "" + +#: library/asyncore.rst:101 +msgid "``handle_close()``" +msgstr "``handle_close()``" + +#: library/asyncore.rst:101 +msgid "Implied by a read event with no data available" +msgstr "" + +#: library/asyncore.rst:104 +msgid "``handle_accepted()``" +msgstr "``handle_accepted()``" + +#: library/asyncore.rst:104 +msgid "Implied by a read event on a listening socket" +msgstr "" + +#: 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 " +"should be added to the list of channels :c:func:`select`\\ ed or :c:func:" +"`poll`\\ ed for read and write events." +msgstr "" + +#: 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:119 +msgid "" +"Called when the asynchronous loop detects that a :meth:`read` call on the " +"channel's socket will succeed." +msgstr "" + +#: 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: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: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:149 +msgid "Called when the socket is closed." +msgstr "Appelé lorsque la socket est fermée." + +#: 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: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` " +"call for the local endpoint. Deprecated in version 3.2; use :meth:" +"`handle_accepted` instead." +msgstr "" + +#: 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` " +"call for the local endpoint. *sock* is a *new* socket object usable to send " +"and receive data on the connection, and *addr* is the address bound to the " +"socket on the other end of the connection." +msgstr "" + +#: 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 " +"occur. The default method simply returns ``True``, indicating that by " +"default, all channels will be interested in read events." +msgstr "" + +#: 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 " +"occur. The default method simply returns ``True``, indicating that by " +"default, all channels will be interested in write events." +msgstr "" + +#: 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: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:205 +msgid "*family* and *type* arguments can be omitted." +msgstr "Les arguments *family* et *type* sont optionnels." + +#: 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:217 +msgid "Send *data* to the remote end-point of the socket." +msgstr "Envoie *data* à l'autre bout de la socket." + +#: 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: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: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: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:" +"`socket` documentation for more information.) To mark the socket as re-" +"usable (setting the :const:`SO_REUSEADDR` option), call the :class:" +"`dispatcher` object's :meth:`set_reuse_addr` method." +msgstr "" + +#: 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, " +"address)`` where *conn* is a *new* socket object usable to send and receive " +"data on the connection, and *address* is the address bound to the socket on " +"the other end of the connection. When ``None`` is returned it means the " +"connection didn't take place, in which case the server should just ignore " +"this event and keep listening for further incoming connections." +msgstr "" + +#: 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: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: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:" +"func:`loop` functions. If provided a file object or anything with a :c:func:" +"`fileno` method, that method will be called and passed to the :class:" +"`file_wrapper` constructor." +msgstr "" + +#: library/asyncore.rst:290 +msgid ":ref:`Availability `: Unix." +msgstr ":ref:`Disponibilité ` : Unix." + +#: 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 " +"of the file_wrapper. This class implements sufficient methods to emulate a " +"socket for use by the :class:`file_dispatcher` class." +msgstr "" + +#: library/asyncore.rst:296 +msgid "asyncore Example basic HTTP client" +msgstr "Exemple de client HTTP basique avec :mod:`asyncore`" + +#: 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:335 +msgid "asyncore Example basic echo server" +msgstr "Serveur *echo* basique avec :mod:`asyncore`" + +#: 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 new file mode 100644 index 0000000000..dbf52ea55d --- /dev/null +++ b/library/atexit.po @@ -0,0 +1,181 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-09-23 16:16+0200\n" +"PO-Revision-Date: 2022-03-23 13:05-0600\n" +"Last-Translator: Yannick Gingras \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 3.0\n" + +#: library/atexit.rst:2 +msgid ":mod:`atexit` --- Exit handlers" +msgstr ":mod:`atexit` — Gestionnaire de fin de programme" + +#: library/atexit.rst:12 +msgid "" +"The :mod:`atexit` module defines functions to register and unregister " +"cleanup functions. Functions thus registered are automatically executed " +"upon normal interpreter termination. :mod:`atexit` runs these functions in " +"the *reverse* order in which they were registered; if you register ``A``, " +"``B``, and ``C``, at interpreter termination time they will be run in the " +"order ``C``, ``B``, ``A``." +msgstr "" +"Le module :mod:`atexit` définit des fonctions pour inscrire et désinscrire " +"des fonctions de nettoyage. Les fonctions ainsi inscrites sont " +"automatiquement exécutées au moment de l'arrêt normal de l'interpréteur. :" +"mod:`atexit` exécute ces fonctions dans l'ordre inverse dans lequel elles " +"ont été inscrites ; si vous inscrivez ``A``, ``B``, et ``C``, au moment de " +"l'arrêt de l'interpréteur elles seront exécutées dans l'ordre ``C``, ``B``, " +"``A``." + +#: library/atexit.rst:19 +msgid "" +"**Note:** The functions registered via this module are not called when the " +"program is killed by a signal not handled by Python, when a Python fatal " +"internal error is detected, or when :func:`os._exit` is called." +msgstr "" +"**Note:** Les fonctions inscrites via ce module ne sont pas appelées quand " +"le programme est tué par un signal non géré par Python, quand une erreur " +"fatale interne de Python est détectée, ou quand :func:`os._exit` est appelé." + +#: library/atexit.rst:23 +msgid "" +"When used with C-API subinterpreters, registered functions are local to the " +"interpreter they were registered in." +msgstr "" +"Quand elles sont utilisées avec des sous-interpréteurs de l'API C, les " +"fonctions inscrites sont locales à l'interpréteur dans lequel elles ont été " +"inscrites." + +#: library/atexit.rst:29 +msgid "" +"Register *func* as a function to be executed at termination. Any optional " +"arguments that are to be passed to *func* must be passed as arguments to :" +"func:`register`. It is possible to register the same function and arguments " +"more than once." +msgstr "" +"Inscrit *func* comme une fonction à exécuter au moment de l'arrêt de " +"l'interpréteur. Tout argument optionnel qui doit être passé à *func* doit " +"être passé comme argument à :func:`register`. Il est possible d'inscrire les " +"mêmes fonctions et arguments plus d'une fois." + +#: library/atexit.rst:34 +msgid "" +"At normal program termination (for instance, if :func:`sys.exit` is called " +"or the main module's execution completes), all functions registered are " +"called in last in, first out order. The assumption is that lower level " +"modules will normally be imported before higher level modules and thus must " +"be cleaned up later." +msgstr "" +"Lors d'un arrêt normal du programme (par exemple, si :func:`sys.exit` est " +"appelée ou l’exécution du module principal se termine), toutes les fonctions " +"inscrites sont appelées, dans l'ordre de la dernière arrivée, première " +"servie. La supposition est que les modules les plus bas niveau vont " +"normalement être importés avant les modules haut niveau et ainsi être " +"nettoyés en dernier." + +#: library/atexit.rst:40 +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 " +"last exception to be raised is re-raised." +msgstr "" +"Si une exception est levée durant l'exécution du gestionnaire de fin de " +"programme, une trace d'appels est affichée (à moins que :exc:`SystemExit` " +"ait été levée) et les informations de l'exception sont sauvegardées. Une " +"fois que tous les gestionnaires de fin de programme ont eu une chance de " +"s'exécuter, la dernière exception à avoir été levée l'est de nouveau." + +#: library/atexit.rst:45 +msgid "" +"This function returns *func*, which makes it possible to use it as a " +"decorator." +msgstr "" +"Cette fonction renvoie *func*, ce qui rend possible de l'utiliser en tant " +"que décorateur." + +#: library/atexit.rst:51 +msgid "" +"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 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:62 +msgid "" +"Useful example of :mod:`atexit` to read and write :mod:`readline` history " +"files." +msgstr "" +"Un exemple utile de l'usage de :mod:`atexit` pour lire et écrire des " +"fichiers d'historique :mod:`readline`." + +#: library/atexit.rst:69 +msgid ":mod:`atexit` Example" +msgstr "Exemple avec :mod:`atexit`" + +#: 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 " +"automatically when the program terminates without relying on the application " +"making an explicit call into this module at termination. ::" +msgstr "" +"Le simple exemple suivant démontre comment un module peut initialiser un " +"compteur depuis un fichier quand il est importé, et sauver le valeur mise à " +"jour du compteur automatiquement quand le programme se termine, sans avoir " +"besoin que l'application fasse un appel explicite dans ce module au moment " +"de l'arrêt de l'interpréteur. ::" + +#: 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::" +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:106 +msgid "Usage as a :term:`decorator`::" +msgstr "Utilisation en tant que :term:`décorateur ` ::" + +#: 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 new file mode 100644 index 0000000000..ad9bb59039 --- /dev/null +++ b/library/audioop.po @@ -0,0 +1,358 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-05-21 16:37+0200\n" +"PO-Revision-Date: 2021-11-15 19:06-0500\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/audioop.rst:2 +msgid ":mod:`audioop` --- Manipulate raw audio data" +msgstr ":mod:`audioop` — Manipulation de données audio brutes" + +#: 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 " +"samples 8, 16, 24 or 32 bits wide, stored in :term:`bytes-like objects " +"`. 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: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: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: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:37 +msgid "The module defines the following variables and functions:" +msgstr "Le module définit les fonctions et variables suivantes :" + +#: 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: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: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: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:69 +msgid "Return the average over all samples in the fragment." +msgstr "Renvoie la moyenne prise sur l'ensemble des échantillons du fragment." + +#: 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:80 +#, fuzzy +msgid "" +"Return a fragment that is the original fragment with a bias added to each " +"sample. Samples wrap around in case of overflow." +msgstr "" +"Renvoie un fragment créé en ajoutant un biais à chaque échantillon du " +"fragment d'origine. Les échantillons s'enroulent autour dans le cas de " +"débordement." + +#: 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:94 +msgid "" +"Return the number of zero crossings in the fragment passed as an argument." +msgstr "" + +#: 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* " +"to make it match as well as possible to *fragment*. The fragments should " +"both contain 2-byte samples." +msgstr "" + +#: library/audioop.rst:104 +msgid "The time taken by this routine is proportional to ``len(fragment)``." +msgstr "Le temps pris par cette routine est proportionnel à ``len(fragment)``." + +#: 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 " +"taking slices out of *fragment*, using :func:`findfactor` to compute the " +"best match, and minimizing the result. The fragments should both contain 2-" +"byte samples. Return a tuple ``(offset, factor)`` where *offset* is the " +"(integer) offset into *fragment* where the optimal match started and " +"*factor* is the (floating-point) factor as per :func:`findfactor`." +msgstr "" + +#: 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." +msgstr "" + +#: library/audioop.rst:124 +msgid "The routine takes time proportional to ``len(fragment)``." +msgstr "La routine s'exécute en un temps proportionnel à ``len(fragment)``." + +#: 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: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 " +"one sample and the next, divided by a (varying) step. The Intel/DVI ADPCM " +"algorithm has been selected for use by the IMA, so it may well become a " +"standard." +msgstr "" + +#: 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 " +"next call of :func:`lin2adpcm`. In the initial call, ``None`` can be passed " +"as the state. *adpcmfrag* is the ADPCM coded fragment packed 2 4-bit values " +"per byte." +msgstr "" + +#: 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 " +"range of about 13 bits using only 8 bit samples. It is used by the Sun " +"audio hardware, among others." +msgstr "" + +#: library/audioop.rst:155 +msgid "Convert samples between 1-, 2-, 3- and 4-byte formats." +msgstr "Convertit des échantillons pour les formats à 1, 2, 3, et 4 octets." + +#: 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: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: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 " +"range of about 14 bits using only 8 bit samples. It is used by the Sun " +"audio hardware, among others." +msgstr "" + +#: 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:185 +msgid "Return the maximum peak-peak value in the sound fragment." +msgstr "" + +#: 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: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:202 +msgid "Convert the frame rate of the input fragment." +msgstr "Transforme la fréquence d'échantillonnage du fragment d'entrée." + +#: 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 " +"to the next call of :func:`ratecv`. The initial call should pass ``None`` " +"as the state." +msgstr "" + +#: 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: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: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: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: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: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: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: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 " +"equal. If this is a problem the stereo fragment should be split into two " +"mono fragments first and recombined later. Here is an example of how to do " +"that::" +msgstr "" + +#: 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 " +"should not only transmit the data but also the state. Note that you should " +"send the *initial* state (the one you passed to :func:`lin2adpcm`) along to " +"the decoder, not the final state (as returned by the coder). If you want to " +"use :class:`struct.Struct` to store the state in binary you can code the " +"first element (the predicted value) in 16 bits and the second (the delta " +"index) in 8." +msgstr "" + +#: 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: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 " +"is to pick the most energetic piece of the output sample, locate that in the " +"input sample and subtract the whole output sample from the input sample::" +msgstr "" diff --git a/library/audit_events.po b/library/audit_events.po new file mode 100644 index 0000000000..202a14317f --- /dev/null +++ b/library/audit_events.po @@ -0,0 +1,132 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \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" +"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/audit_events.rst:6 +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 (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 " +"bibliothèque standard. Ces appels ont été ajoutés dans les versions 3.8.0 et " +"ultérieures." + +#: library/audit_events.rst:12 +msgid "" +"See :func:`sys.addaudithook` and :c:func:`PySys_AddAuditHook` for " +"information on handling these events." +msgstr "" +"Voir :func:`sys.addaudithook` et :c:func:`PySys_AddAuditHook` pour plus " +"d'informations sur la gestion de ces évènements." + +#: library/audit_events.rst:17 +msgid "" +"This table is generated from the CPython documentation, and may not " +"represent events raised by other implementations. See your runtime specific " +"documentation for actual events raised." +msgstr "" +"Cette table est générée à partir de la documentation de CPython et peut ne " +"pas représenter des évènements levés par d'autres implémentations. Consultez " +"la documentation propre à votre implémentation pour connaître les évènements " +"réellement levés." + +#: library/audit_events.rst:23 +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 +msgid "Audit event" +msgstr "Table des évènements d'audit" + +#: library/audit_events.rst:27 +msgid "Arguments" +msgstr "Arguments" + +#: library/audit_events.rst:29 +msgid "_winapi.CreateFile" +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 "_winapi.CreateJunction" + +#: library/audit_events.rst:33 +msgid "``src_path``, ``dst_path``" +msgstr "``src_path``, ``dst_path``" + +#: library/audit_events.rst:35 +msgid "_winapi.CreateNamedPipe" +msgstr "_winapi.CreateNamedPipe" + +#: library/audit_events.rst:35 +msgid "``name``, ``open_mode``, ``pipe_mode``" +msgstr "``name``, ``open_mode``, ``pipe_mode``" + +#: library/audit_events.rst:37 +msgid "_winapi.CreatePipe" +msgstr "_winapi.CreatePipe" + +#: library/audit_events.rst:39 +msgid "_winapi.CreateProcess" +msgstr "_winapi.CreateProcess" + +#: library/audit_events.rst:39 +msgid "``application_name``, ``command_line``, ``current_directory``" +msgstr "``application_name``, ``command_line``, ``current_directory``" + +#: library/audit_events.rst:42 +msgid "_winapi.OpenProcess" +msgstr "_winapi.OpenProcess" + +#: library/audit_events.rst:42 +msgid "``process_id``, ``desired_access``" +msgstr "``process_id``, ``desired_access``" + +#: library/audit_events.rst:44 +msgid "_winapi.TerminateProcess" +msgstr "_winapi.TerminateProcess" + +#: library/audit_events.rst:44 +msgid "``handle``, ``exit_code``" +msgstr "``handle``, ``exit_code``" + +#: library/audit_events.rst:46 +msgid "ctypes.PyObj_FromPtr" +msgstr "ctypes.PyObj_FromPtr" + +#: library/audit_events.rst:46 +msgid "``obj``" +msgstr "``obj``" diff --git a/library/base64.po b/library/base64.po new file mode 100644 index 0000000000..e6958e9577 --- /dev/null +++ b/library/base64.po @@ -0,0 +1,536 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-22 22:57+0100\n" +"PO-Revision-Date: 2022-10-18 15:43+0200\n" +"Last-Translator: Julien Palard \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" + +#: library/base64.rst:2 +msgid ":mod:`base64` --- Base16, Base32, Base64, Base85 Data Encodings" +msgstr ":mod:`base64` — Encodages base16, base32, base64 et base85" + +#: library/base64.rst:8 +msgid "**Source code:** :source:`Lib/base64.py`" +msgstr "**Code source :** :source:`Lib/base64.py`" + +#: library/base64.rst:16 +#, fuzzy +msgid "" +"This module provides functions for encoding binary data to printable ASCII " +"characters and decoding such encodings back to binary data. It provides " +"encoding and decoding functions for the encodings specified in :rfc:`4648`, " +"which defines the Base16, Base32, and Base64 algorithms, and for the de-" +"facto standard Ascii85 and Base85 encodings." +msgstr "" +"Ce module fournit des fonctions permettant de coder des données binaires en " +"caractères ASCII affichables ainsi que de décoder ces caractères vers des " +"données binaires en retour. Il fournit des fonctions d'encodage et de " +"décodage pour les codages spécifiés par la :rfc:`3548` qui définit les " +"algorithmes base16, base32 et base64, ainsi que les encodages standards *de " +"facto* Ascii85 et base85." + +#: library/base64.rst:22 +#, fuzzy +msgid "" +"The :rfc:`4648` encodings are suitable for encoding binary data so that it " +"can be safely sent by email, used as parts of URLs, or included as part of " +"an HTTP POST request. The encoding algorithm is not the same as the :" +"program:`uuencode` program." +msgstr "" +"Les encodages définis par la :rfc:`3548` sont adaptés au codage des données " +"binaires pour leur transfert par courriel, comme éléments d'une URL ou d'une " +"requête HTTP POST. L'algorithme d'encodage ne doit pas être confondu avec le " +"programme :program:`uuencode`." + +#: library/base64.rst:27 +#, fuzzy +msgid "" +"There are two interfaces provided by this module. The modern interface " +"supports encoding :term:`bytes-like objects ` to ASCII :" +"class:`bytes`, and decoding :term:`bytes-like objects ` " +"or strings containing ASCII to :class:`bytes`. Both base-64 alphabets " +"defined in :rfc:`4648` (normal, and URL- and filesystem-safe) are supported." +msgstr "" +"Ce module présente deux interfaces. L'interface moderne gère l'encodage d':" +"term:`objets octet-compatibles ` en :class:`bytes` ASCII " +"ainsi que le décodage d':term:`objets octet-compatibles ` " +"ou de chaînes de caractères contenant de l'ASCII en :class:`bytes`. Les deux " +"alphabets de l'algorithme base64 définis par la :rfc:`3548` (normal et sûr " +"pour les systèmes de fichiers ou URL) sont gérés." + +#: library/base64.rst:33 +msgid "" +"The legacy interface does not support decoding from strings, but it does " +"provide functions for encoding and decoding to and from :term:`file objects " +"`. It only supports the Base64 standard alphabet, and it adds " +"newlines every 76 characters as per :rfc:`2045`. Note that if you are " +"looking for :rfc:`2045` support you probably want to be looking at the :mod:" +"`email` package instead." +msgstr "" +"L'interface historique ne permet pas le décodage des chaînes de caractères " +"mais fournit des fonctions permettant d'encoder et décoder depuis et vers " +"des :term:`objets fichiers `. Elle ne gère que l'alphabet " +"base64 standard et ajoute une nouvelle ligne tous les 76 caractères, comme " +"spécifié par la :rfc:`2045`. Notez que le paquet :mod:`email` est " +"probablement ce que vous cherchez si vous souhaitez une implémentation de " +"la :rfc:`2045`." + +#: library/base64.rst:41 +msgid "" +"ASCII-only Unicode strings are now accepted by the decoding functions of the " +"modern interface." +msgstr "" +"Les chaînes de caractères Unicode contenant uniquement des caractères ASCII " +"sont désormais acceptées par les fonctions de décodage de l'interface " +"moderne." + +#: library/base64.rst:45 +msgid "" +"Any :term:`bytes-like objects ` are now accepted by all " +"encoding and decoding functions in this module. Ascii85/Base85 support " +"added." +msgstr "" +"Tous les :term:`objets octet-compatibles ` sont désormais " +"acceptés par l'ensemble des fonctions d'encodage et de décodage de ce " +"module. La gestion de Ascii85/base85 a été ajoutée." + +#: library/base64.rst:49 +msgid "The modern interface provides:" +msgstr "L'interface moderne propose :" + +#: library/base64.rst:53 +msgid "" +"Encode the :term:`bytes-like object` *s* using Base64 and return the " +"encoded :class:`bytes`." +msgstr "" +"Encode un :term:`objet octet-compatible ` *s* en " +"utilisant l'algorithme base64 et renvoie les :class:`bytes` encodés." + +#: library/base64.rst:56 +#, fuzzy +msgid "" +"Optional *altchars* must be a :term:`bytes-like object` of length 2 which " +"specifies an alternative alphabet for the ``+`` and ``/`` characters. This " +"allows an application to e.g. generate URL or filesystem safe Base64 " +"strings. The default is ``None``, for which the standard Base64 alphabet is " +"used." +msgstr "" +"L'option *altchars* doit être un :term:`bytes-like object` de longueur au " +"moins 2 (les caractères additionnels sont ignorés) qui spécifie un alphabet " +"alternatif pour les délimiteurs ``+`` et ``/``. Cela permet de générer des " +"chaînes de caractères base64 pouvant être utilisées pour une URL ou dans un " +"système de fichiers. La valeur par défaut est ``None``, auquel cas " +"l'alphabet standard base64 est utilisé." + +#: library/base64.rst:61 +msgid "" +"May assert or raise a :exc:`ValueError` if the length of *altchars* is not " +"2. Raises a :exc:`TypeError` if *altchars* is not a :term:`bytes-like " +"object`." +msgstr "" + +#: library/base64.rst:67 +msgid "" +"Decode the Base64 encoded :term:`bytes-like object` or ASCII string *s* and " +"return the decoded :class:`bytes`." +msgstr "" +"Décode un :term:`objet octet-compatible ` ou une chaîne " +"de caractères ASCII *s* encodée en base64 et renvoie les :class:`bytes` " +"décodés." + +#: library/base64.rst:70 +#, fuzzy +msgid "" +"Optional *altchars* must be a :term:`bytes-like object` or ASCII string of " +"length 2 which specifies the alternative alphabet used instead of the ``+`` " +"and ``/`` characters." +msgstr "" +"L'option *altchars* doit être un :term:`bytes-like object` de longueur au " +"moins égale à 2 (les caractères additionnels sont ignorés) qui spécifie un " +"alphabet alternatif pour les délimiteurs ``+`` et ``/``." + +#: library/base64.rst:74 +msgid "" +"A :exc:`binascii.Error` exception is raised if *s* is incorrectly padded." +msgstr "" +"Une exception :exc:`binascii.Error` est levée si *s* n'est pas remplie à une " +"longueur attendue." + +#: library/base64.rst:77 +msgid "" +"If *validate* is ``False`` (the default), characters that are neither in the " +"normal base-64 alphabet nor the alternative alphabet are discarded prior to " +"the padding check. If *validate* is ``True``, these non-alphabet characters " +"in the input result in a :exc:`binascii.Error`." +msgstr "" +"Si *validate* est ``False`` (par défaut), les caractères qui ne sont ni dans " +"l'alphabet base64 normal, ni dans l'alphabet alternatif, sont ignorés avant " +"la vérification de la longueur du remplissage. Si *validate* est ``True``, " +"les caractères hors de l'alphabet de l'entrée produisent une :exc:`binascii." +"Error`." + +#: library/base64.rst:83 +msgid "" +"May assert or raise a :exc:`ValueError` if the length of *altchars* is not 2." +msgstr "" + +#: library/base64.rst:87 +msgid "" +"Encode :term:`bytes-like object` *s* using the standard Base64 alphabet and " +"return the encoded :class:`bytes`." +msgstr "" +"Encode un :term:`objet octet-compatible ` *s* en " +"utilisant l'alphabet standard base64 et renvoie les :class:`bytes` encodés." + +#: library/base64.rst:93 +msgid "" +"Decode :term:`bytes-like object` or ASCII string *s* using the standard " +"Base64 alphabet and return the decoded :class:`bytes`." +msgstr "" +"Décode un :term:`objet octet-compatible ` ou une chaîne " +"de caractères ASCII *s* utilisant l'alphabet base64 standard et renvoie les :" +"class:`bytes` décodés." + +#: library/base64.rst:99 +msgid "" +"Encode :term:`bytes-like object` *s* using the URL- and filesystem-safe " +"alphabet, which substitutes ``-`` instead of ``+`` and ``_`` instead of ``/" +"`` in the standard Base64 alphabet, and return the encoded :class:`bytes`. " +"The result can still contain ``=``." +msgstr "" +"Encode un :term:`objet byte-compatible ` *s* en utilisant " +"un alphabet sûr pour les URL et systèmes de fichiers qui substitue ``-`` et " +"``_`` à ``+`` et ``/`` dans l'alphabet standard base64 et renvoie les :class:" +"`bytes` encodés." + +#: library/base64.rst:108 +msgid "" +"Decode :term:`bytes-like object` or ASCII string *s* using the URL- and " +"filesystem-safe alphabet, which substitutes ``-`` instead of ``+`` and ``_`` " +"instead of ``/`` in the standard Base64 alphabet, and return the decoded :" +"class:`bytes`." +msgstr "" +"Décode un :term:`objet octet-compatible ` ou une chaîne " +"de caractères ASCII *s* utilisant un alphabet sûr pour les URL et systèmes " +"de fichiers qui substitue ``-`` et ``_`` à ``+`` et ``/`` dans l'alphabet " +"standard base64 et renvoie les :class:`bytes` décodés." + +#: library/base64.rst:117 +msgid "" +"Encode the :term:`bytes-like object` *s* using Base32 and return the " +"encoded :class:`bytes`." +msgstr "" +"Encode un :term:`objet byte-compatible ` *s* en utilisant " +"l'algorithme base32 et renvoie les :class:`bytes` encodés." + +#: library/base64.rst:123 +msgid "" +"Decode the Base32 encoded :term:`bytes-like object` or ASCII string *s* and " +"return the decoded :class:`bytes`." +msgstr "" +"Décode un :term:`objet octet-compatible ` ou une chaîne " +"de caractères ASCII *s* encodé en base32 et renvoie les :class:`bytes` " +"décodés." + +#: library/base64.rst:174 +msgid "" +"Optional *casefold* is a flag specifying whether a lowercase alphabet is " +"acceptable as input. For security purposes, the default is ``False``." +msgstr "" +"L'option *casefold* est un drapeau spécifiant si l'utilisation d'un alphabet " +"en minuscules est acceptable comme entrée. Pour des raisons de sécurité, " +"cette option est à ``False`` par défaut." + +#: library/base64.rst:130 +#, fuzzy +msgid "" +":rfc:`4648` allows for optional mapping of the digit 0 (zero) to the letter " +"O (oh), and for optional mapping of the digit 1 (one) to either the letter I " +"(eye) or letter L (el). The optional argument *map01* when not ``None``, " +"specifies which letter the digit 1 should be mapped to (when *map01* is not " +"``None``, the digit 0 is always mapped to the letter O). For security " +"purposes the default is ``None``, so that 0 and 1 are not allowed in the " +"input." +msgstr "" +"La :rfc:`3548` autorise une correspondance optionnelle du chiffre 0 (zéro) " +"vers la lettre O (/o/) ainsi que du chiffre 1 (un) vers soit la lettre I (/" +"i/) ou la lettre L (/l/). L'argument optionnel *map01*, lorsqu'il diffère de " +"``None``, spécifie en quelle lettre le chiffre 1 doit être transformé " +"(lorsque *map01* n'est pas ``None``, le chiffre 0 est toujours transformé en " +"la lettre O). Pour des raisons de sécurité, le défaut est ``None``, de telle " +"sorte que 0 et 1 ne sont pas autorisés dans l'entrée." + +#: library/base64.rst:178 +msgid "" +"A :exc:`binascii.Error` is raised if *s* is incorrectly padded or if there " +"are non-alphabet characters present in the input." +msgstr "" +"Une exception :exc:`binascii.Error` est levée si *s* n'est pas remplie à une " +"longueur attendue ou si elle contient des caractères hors de l'alphabet." + +#: library/base64.rst:144 +msgid "" +"Similar to :func:`b32encode` but uses the Extended Hex Alphabet, as defined " +"in :rfc:`4648`." +msgstr "" + +#: library/base64.rst:152 +msgid "" +"Similar to :func:`b32decode` but uses the Extended Hex Alphabet, as defined " +"in :rfc:`4648`." +msgstr "" + +#: library/base64.rst:155 +msgid "" +"This version does not allow the digit 0 (zero) to the letter O (oh) and " +"digit 1 (one) to either the letter I (eye) or letter L (el) mappings, all " +"these characters are included in the Extended Hex Alphabet and are not " +"interchangeable." +msgstr "" + +#: library/base64.rst:165 +msgid "" +"Encode the :term:`bytes-like object` *s* using Base16 and return the " +"encoded :class:`bytes`." +msgstr "" +"Encode un :term:`objet byte-compatible ` *s* en utilisant " +"l'algorithme base16 et renvoie les :class:`bytes` encodés." + +#: library/base64.rst:171 +msgid "" +"Decode the Base16 encoded :term:`bytes-like object` or ASCII string *s* and " +"return the decoded :class:`bytes`." +msgstr "" +"Décode un :term:`objet octet-compatible ` ou une chaîne " +"de caractères ASCII *s* encodé en base16 et renvoie les :class:`bytes` " +"décodés." + +#: library/base64.rst:185 +msgid "" +"Encode the :term:`bytes-like object` *b* using Ascii85 and return the " +"encoded :class:`bytes`." +msgstr "" +"Encode un :term:`objet byte-compatible ` *s* en utilisant " +"l'algorithme Ascii85 et renvoie les :class:`bytes` encodés." + +#: library/base64.rst:188 +msgid "" +"*foldspaces* is an optional flag that uses the special short sequence 'y' " +"instead of 4 consecutive spaces (ASCII 0x20) as supported by 'btoa'. This " +"feature is not supported by the \"standard\" Ascii85 encoding." +msgstr "" +"L'option *foldspaces* permet d'utiliser la séquence spéciale 'y' à la place " +"de quatre espaces consécutives (ASCII ``0x20``) comme pris en charge par " +"*btoa*. Cette fonctionnalité n'est pas gérée par l'encodage « standard » " +"Ascii85." + +#: library/base64.rst:192 +msgid "" +"*wrapcol* controls whether the output should have newline (``b'\\n'``) " +"characters added to it. If this is non-zero, each output line will be at " +"most this many characters long." +msgstr "" +"*wrapcol* contrôle l'ajout de caractères de saut de ligne (``b'\\n'``) à la " +"sortie. Chaque ligne de sortie contient au maximum *wrapcol* caractères si " +"cette option diffère de zéro." + +#: library/base64.rst:196 +msgid "" +"*pad* controls whether the input is padded to a multiple of 4 before " +"encoding. Note that the ``btoa`` implementation always pads." +msgstr "" +"*pad* spécifie l'ajout de caractères de remplissage (*padding* en anglais) à " +"l'entrée jusqu'à ce que sa longueur soit un multiple de 4 avant encodage. " +"Notez que l'implémentation ``btoa`` effectue systématiquement ce remplissage." + +#: library/base64.rst:199 +msgid "" +"*adobe* controls whether the encoded byte sequence is framed with ``<~`` and " +"``~>``, which is used by the Adobe implementation." +msgstr "" +"*adobe* contrôle si oui ou non la séquence encodée d'octets est encadrée par " +"``<~`` et ``~>`` comme utilisé dans l'implémentation Adobe." + +#: library/base64.rst:207 +msgid "" +"Decode the Ascii85 encoded :term:`bytes-like object` or ASCII string *b* and " +"return the decoded :class:`bytes`." +msgstr "" +"Décode un :term:`objet octet-compatible ` ou une chaîne " +"de caractères ASCII *s* encodé en Ascii85 et renvoie les :class:`bytes` " +"décodés." + +#: library/base64.rst:210 +msgid "" +"*foldspaces* is a flag that specifies whether the 'y' short sequence should " +"be accepted as shorthand for 4 consecutive spaces (ASCII 0x20). This feature " +"is not supported by the \"standard\" Ascii85 encoding." +msgstr "" +"L'option *foldspaces* permet d'utiliser la séquence spéciale 'y' à la place " +"de quatre espaces consécutives (ASCII ``0x20``) comme pris en charge par " +"*btoa*. Cette fonctionnalité n'est pas gérée par l'encodage « standard » " +"Ascii85." + +#: library/base64.rst:214 +msgid "" +"*adobe* controls whether the input sequence is in Adobe Ascii85 format (i.e. " +"is framed with <~ and ~>)." +msgstr "" +"*adobe* indique si la séquence d'entrée utilise le format Adobe Ascii85 " +"(c'est-à-dire utilise l'encadrement par ``<~`` et ``~>``)." + +#: library/base64.rst:217 +msgid "" +"*ignorechars* should be a :term:`bytes-like object` or ASCII string " +"containing characters to ignore from the input. This should only contain " +"whitespace characters, and by default contains all whitespace characters in " +"ASCII." +msgstr "" +"*ignorechars* doit être un :term:`bytes-like object` ou une chaîne ASCII " +"contenant des caractères à ignorer dans l'entrée. Il ne doit contenir que " +"des caractères d'espacement et contient par défaut l'ensemble des caractères " +"d'espacement de l'alphabet ASCII." + +#: library/base64.rst:227 +msgid "" +"Encode the :term:`bytes-like object` *b* using base85 (as used in e.g. git-" +"style binary diffs) and return the encoded :class:`bytes`." +msgstr "" +"Encode un :term:`objet byte-compatible ` *s* en utilisant " +"l'algorithme base85 (tel qu'utilisé par exemple par le programme *git-diff* " +"sur des données binaires) et renvoie les :class:`bytes` encodés." + +#: library/base64.rst:230 +msgid "" +"If *pad* is true, the input is padded with ``b'\\0'`` so its length is a " +"multiple of 4 bytes before encoding." +msgstr "" +"Si *pad* est vrai, des caractères de remplissage ``b'\\0'`` (*padding* en " +"anglais) sont ajoutés à l'entrée jusqu'à ce que sa longueur soit un multiple " +"de 4 octets avant encodage." + +#: library/base64.rst:238 +msgid "" +"Decode the base85-encoded :term:`bytes-like object` or ASCII string *b* and " +"return the decoded :class:`bytes`. Padding is implicitly removed, if " +"necessary." +msgstr "" +"Décode un :term:`objet octet-compatible ` ou une chaîne " +"de caractères ASCII *b* encodé en base85 et renvoie les :class:`bytes` " +"décodés. Les caractères de remplissage sont implicitement retirés si " +"nécessaire." + +#: library/base64.rst:245 +msgid "The legacy interface:" +msgstr "L'interface historique :" + +#: library/base64.rst:249 +msgid "" +"Decode the contents of the binary *input* file and write the resulting " +"binary data to the *output* file. *input* and *output* must be :term:`file " +"objects `. *input* will be read until ``input.readline()`` " +"returns an empty bytes object." +msgstr "" +"Décode le contenu d'un fichier binaire *input* et écrit les données binaires " +"résultantes dans le fichier *output*. *input* et *output* doivent être des :" +"term:`objets fichiers `. *input* est lu jusqu'à ce que ``input." +"readline()`` renvoie un objet *bytes* vide." + +#: library/base64.rst:257 +msgid "" +"Decode the :term:`bytes-like object` *s*, which must contain one or more " +"lines of base64 encoded data, and return the decoded :class:`bytes`." +msgstr "" +"Décode un :term:`objet octet-compatible ` *s* devant " +"contenir une ou plusieurs lignes de données encodées en base64 et renvoie " +"les :class:`bytes` décodés." + +#: library/base64.rst:265 +msgid "" +"Encode the contents of the binary *input* file and write the resulting " +"base64 encoded data to the *output* file. *input* and *output* must be :term:" +"`file objects `. *input* will be read until ``input.read()`` " +"returns an empty bytes object. :func:`encode` inserts a newline character " +"(``b'\\n'``) after every 76 bytes of the output, as well as ensuring that " +"the output always ends with a newline, as per :rfc:`2045` (MIME)." +msgstr "" +"Encode le contenu du fichier binaire *input* et écrit les données encodées " +"en base64 résultantes dans le fichier *output. *input* et *output* doivent " +"être des :term:`objets fichiers `. *input* est lu jusqu'à ce " +"que ``input.readline()`` renvoie un objet *bytes* vide. :func:`encode` " +"insère un caractère de saut de ligne (``b'\\n'``) tous les 76 octets de " +"sortie et assure que celle-ci se termine par une nouvelle ligne, comme " +"spécifié par la :rfc:`2045` (MIME)." + +#: library/base64.rst:275 +msgid "" +"Encode the :term:`bytes-like object` *s*, which can contain arbitrary binary " +"data, and return :class:`bytes` containing the base64-encoded data, with " +"newlines (``b'\\n'``) inserted after every 76 bytes of output, and ensuring " +"that there is a trailing newline, as per :rfc:`2045` (MIME)." +msgstr "" +"Encode un :term:`objet octet-compatible ` *s* pouvant " +"contenir des données binaires arbitraires et renvoie les :class:`bytes` " +"contenant les données encodées en base64. Un caractère de saut de ligne " +"(``b'\\n'``) est inséré tous les 76 octets de sortie et celle-ci se termine " +"par une nouvelle ligne, comme spécifié par la :rfc:`2045` (MIME)." + +#: library/base64.rst:283 +msgid "An example usage of the module:" +msgstr "Un exemple d'utilisation du module :" + +#: library/base64.rst:296 +msgid "Security Considerations" +msgstr "Considérations de sécurité" + +#: library/base64.rst:298 +msgid "" +"A new security considerations section was added to :rfc:`4648` (section 12); " +"it's recommended to review the security section for any code deployed to " +"production." +msgstr "" + +#: library/base64.rst:304 +msgid "Module :mod:`binascii`" +msgstr "Module :mod:`binascii`" + +#: library/base64.rst:304 +msgid "" +"Support module containing ASCII-to-binary and binary-to-ASCII conversions." +msgstr "" +"Module secondaire contenant les conversions ASCII vers binaire et binaire " +"vers ASCII." + +#: library/base64.rst:307 +msgid "" +":rfc:`1521` - MIME (Multipurpose Internet Mail Extensions) Part One: " +"Mechanisms for Specifying and Describing the Format of Internet Message " +"Bodies" +msgstr "" +":rfc:`1521` — MIME (*Multipurpose Internet Mail Extensions*) *Part One: " +"Mechanisms for Specifying and Describing the Format of Internet Message " +"Bodies*" + +#: library/base64.rst:307 +msgid "" +"Section 5.2, \"Base64 Content-Transfer-Encoding,\" provides the definition " +"of the base64 encoding." +msgstr "" +"La Section 5.2, \"*Base64 Content-Transfer-Encoding*\", donne la définition " +"de l'encodage base64." + +#~ msgid "Deprecated alias of :func:`decodebytes`." +#~ msgstr "Alias obsolète de :func:`decodebytes`." + +#~ msgid "Deprecated alias of :func:`encodebytes`." +#~ msgstr "Alias obsolète de :func:`encodebytes`." diff --git a/library/bdb.po b/library/bdb.po new file mode 100644 index 0000000000..76a48e1f32 --- /dev/null +++ b/library/bdb.po @@ -0,0 +1,604 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-18 15:46+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \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" + +#: library/bdb.rst:2 +msgid ":mod:`bdb` --- Debugger framework" +msgstr ":mod:`bdb` — Framework de débogage" + +#: library/bdb.rst:7 +msgid "**Source code:** :source:`Lib/bdb.py`" +msgstr "**Code source :** :source:`Lib/bdb.py`" + +#: library/bdb.rst:11 +msgid "" +"The :mod:`bdb` module handles basic debugger functions, like setting " +"breakpoints or managing execution via the debugger." +msgstr "" + +#: library/bdb.rst:14 +msgid "The following exception is defined:" +msgstr "L'exception suivante est définie :" + +#: library/bdb.rst:18 +msgid "Exception raised by the :class:`Bdb` class for quitting the debugger." +msgstr "" + +#: library/bdb.rst:21 +msgid "The :mod:`bdb` module also defines two classes:" +msgstr "Le module :mod:`bdb` définis deux classes :" + +#: library/bdb.rst:25 +msgid "" +"This class implements temporary breakpoints, ignore counts, disabling and " +"(re-)enabling, and conditionals." +msgstr "" + +#: library/bdb.rst:28 +msgid "" +"Breakpoints are indexed by number through a list called :attr:`bpbynumber` " +"and by ``(file, line)`` pairs through :attr:`bplist`. The former points to " +"a single instance of class :class:`Breakpoint`. The latter points to a list " +"of such instances since there may be more than one breakpoint per line." +msgstr "" + +#: library/bdb.rst:33 +msgid "" +"When creating a breakpoint, its associated :attr:`file name ` should " +"be in canonical form. If a :attr:`funcname` is defined, a breakpoint :attr:" +"`hit ` will be counted when the first line of that function is " +"executed. A :attr:`conditional ` breakpoint always counts a :attr:" +"`hit `." +msgstr "" + +#: library/bdb.rst:39 +msgid ":class:`Breakpoint` instances have the following methods:" +msgstr "" + +#: library/bdb.rst:43 +msgid "" +"Delete the breakpoint from the list associated to a file/line. If it is the " +"last breakpoint in that position, it also deletes the entry for the file/" +"line." +msgstr "" + +#: library/bdb.rst:50 +msgid "Mark the breakpoint as enabled." +msgstr "Active le point d'arrêt." + +#: library/bdb.rst:55 +msgid "Mark the breakpoint as disabled." +msgstr "Désactive le point d'arrêt." + +#: library/bdb.rst:60 +msgid "" +"Return a string with all the information about the breakpoint, nicely " +"formatted:" +msgstr "" + +#: library/bdb.rst:63 +#, fuzzy +msgid "Breakpoint number." +msgstr "Le numéro du point d'arrêt." + +#: library/bdb.rst:64 +msgid "Temporary status (del or keep)." +msgstr "" + +#: library/bdb.rst:65 +msgid "File/line position." +msgstr "" + +#: library/bdb.rst:66 +msgid "Break condition." +msgstr "" + +#: library/bdb.rst:67 +msgid "Number of times to ignore." +msgstr "" + +#: library/bdb.rst:68 +msgid "Number of times hit." +msgstr "" + +#: library/bdb.rst:74 +msgid "" +"Print the output of :meth:`bpformat` to the file *out*, or if it is " +"``None``, to standard output." +msgstr "" + +#: library/bdb.rst:77 +msgid ":class:`Breakpoint` instances have the following attributes:" +msgstr "" + +#: library/bdb.rst:81 +msgid "File name of the :class:`Breakpoint`." +msgstr "" + +#: library/bdb.rst:85 +msgid "Line number of the :class:`Breakpoint` within :attr:`file`." +msgstr "" + +#: library/bdb.rst:89 +msgid "True if a :class:`Breakpoint` at (file, line) is temporary." +msgstr "" + +#: library/bdb.rst:93 +msgid "Condition for evaluating a :class:`Breakpoint` at (file, line)." +msgstr "" + +#: library/bdb.rst:97 +msgid "" +"Function name that defines whether a :class:`Breakpoint` is hit upon " +"entering the function." +msgstr "" + +#: library/bdb.rst:102 +#, fuzzy +msgid "True if :class:`Breakpoint` is enabled." +msgstr "Active le point d'arrêt." + +#: library/bdb.rst:106 +msgid "Numeric index for a single instance of a :class:`Breakpoint`." +msgstr "" + +#: library/bdb.rst:110 +msgid "" +"Dictionary of :class:`Breakpoint` instances indexed by (:attr:`file`, :attr:" +"`line`) tuples." +msgstr "" + +#: library/bdb.rst:115 +msgid "Number of times to ignore a :class:`Breakpoint`." +msgstr "" + +#: library/bdb.rst:119 +msgid "Count of the number of times a :class:`Breakpoint` has been hit." +msgstr "" + +#: library/bdb.rst:123 +msgid "The :class:`Bdb` class acts as a generic Python debugger base class." +msgstr "" + +#: library/bdb.rst:125 +msgid "" +"This class takes care of the details of the trace facility; a derived class " +"should implement user interaction. The standard debugger class (:class:`pdb." +"Pdb`) is an example." +msgstr "" + +#: library/bdb.rst:129 +msgid "" +"The *skip* argument, if given, must be an iterable of glob-style module name " +"patterns. The debugger will not step into frames that originate in a module " +"that matches one of these patterns. Whether a frame is considered to " +"originate in a certain module is determined by the ``__name__`` in the frame " +"globals." +msgstr "" + +#: library/bdb.rst:135 +msgid "The *skip* argument." +msgstr "L'argument *skip*." + +#: library/bdb.rst:138 +msgid "" +"The following methods of :class:`Bdb` normally don't need to be overridden." +msgstr "" + +#: library/bdb.rst:142 +msgid "Return canonical form of *filename*." +msgstr "" + +#: library/bdb.rst:144 +msgid "" +"For real file names, the canonical form is an operating-system-dependent, :" +"func:`case-normalized ` :func:`absolute path `. A *filename* with angle brackets, such as ``\"\"`` " +"generated in interactive mode, is returned unchanged." +msgstr "" + +#: library/bdb.rst:151 +msgid "" +"Set the :attr:`botframe`, :attr:`stopframe`, :attr:`returnframe` and :attr:" +"`quitting` attributes with values ready to start debugging." +msgstr "" + +#: library/bdb.rst:156 +msgid "" +"This function is installed as the trace function of debugged frames. Its " +"return value is the new trace function (in most cases, that is, itself)." +msgstr "" + +#: library/bdb.rst:159 +msgid "" +"The default implementation decides how to dispatch a frame, depending on the " +"type of event (passed as a string) that is about to be executed. *event* can " +"be one of the following:" +msgstr "" + +#: library/bdb.rst:163 +msgid "``\"line\"``: A new line of code is going to be executed." +msgstr "" + +#: library/bdb.rst:164 +msgid "" +"``\"call\"``: A function is about to be called, or another code block " +"entered." +msgstr "" + +#: library/bdb.rst:166 +msgid "``\"return\"``: A function or other code block is about to return." +msgstr "" + +#: library/bdb.rst:167 +msgid "``\"exception\"``: An exception has occurred." +msgstr "``\"exception\"`` : Une exception est survenue." + +#: library/bdb.rst:168 +msgid "``\"c_call\"``: A C function is about to be called." +msgstr "``\"c_call\"`` : Une fonction C est sur le point d'être appelée." + +#: library/bdb.rst:169 +msgid "``\"c_return\"``: A C function has returned." +msgstr "``\"c_return\"`` : Une fonction C s'est terminée." + +#: library/bdb.rst:170 +msgid "``\"c_exception\"``: A C function has raised an exception." +msgstr "" + +#: library/bdb.rst:172 +msgid "" +"For the Python events, specialized functions (see below) are called. For " +"the C events, no action is taken." +msgstr "" + +#: library/bdb.rst:175 +msgid "The *arg* parameter depends on the previous event." +msgstr "Le paramètre *arg* dépend de l'événement précédent." + +#: library/bdb.rst:177 +msgid "" +"See the documentation for :func:`sys.settrace` for more information on the " +"trace function. For more information on code and frame objects, refer to :" +"ref:`types`." +msgstr "" + +#: library/bdb.rst:183 +msgid "" +"If the debugger should stop on the current line, invoke the :meth:" +"`user_line` method (which should be overridden in subclasses). Raise a :exc:" +"`BdbQuit` exception if the :attr:`Bdb.quitting` flag is set (which can be " +"set from :meth:`user_line`). Return a reference to the :meth:" +"`trace_dispatch` method for further tracing in that scope." +msgstr "" + +#: library/bdb.rst:191 +msgid "" +"If the debugger should stop on this function call, invoke the :meth:" +"`user_call` method (which should be overridden in subclasses). Raise a :exc:" +"`BdbQuit` exception if the :attr:`Bdb.quitting` flag is set (which can be " +"set from :meth:`user_call`). Return a reference to the :meth:" +"`trace_dispatch` method for further tracing in that scope." +msgstr "" + +#: library/bdb.rst:199 +msgid "" +"If the debugger should stop on this function return, invoke the :meth:" +"`user_return` method (which should be overridden in subclasses). Raise a :" +"exc:`BdbQuit` exception if the :attr:`Bdb.quitting` flag is set (which can " +"be set from :meth:`user_return`). Return a reference to the :meth:" +"`trace_dispatch` method for further tracing in that scope." +msgstr "" + +#: library/bdb.rst:207 +msgid "" +"If the debugger should stop at this exception, invokes the :meth:" +"`user_exception` method (which should be overridden in subclasses). Raise a :" +"exc:`BdbQuit` exception if the :attr:`Bdb.quitting` flag is set (which can " +"be set from :meth:`user_exception`). Return a reference to the :meth:" +"`trace_dispatch` method for further tracing in that scope." +msgstr "" + +#: library/bdb.rst:213 +msgid "" +"Normally derived classes don't override the following methods, but they may " +"if they want to redefine the definition of stopping and breakpoints." +msgstr "" + +#: library/bdb.rst:218 +msgid "Return True if *module_name* matches any skip pattern." +msgstr "" + +#: library/bdb.rst:222 +msgid "Return True if *frame* is below the starting frame in the stack." +msgstr "" + +#: library/bdb.rst:226 +msgid "Return True if there is an effective breakpoint for this line." +msgstr "" + +#: library/bdb.rst:228 +msgid "" +"Check whether a line or function breakpoint exists and is in effect. Delete " +"temporary breakpoints based on information from :func:`effective`." +msgstr "" + +#: library/bdb.rst:233 +msgid "Return True if any breakpoint exists for *frame*'s filename." +msgstr "" + +#: library/bdb.rst:235 +msgid "" +"Derived classes should override these methods to gain control over debugger " +"operation." +msgstr "" + +#: library/bdb.rst:240 +msgid "" +"Called from :meth:`dispatch_call` if a break might stop inside the called " +"function." +msgstr "" + +#: library/bdb.rst:245 +msgid "" +"Called from :meth:`dispatch_line` when either :meth:`stop_here` or :meth:" +"`break_here` returns ``True``." +msgstr "" + +#: library/bdb.rst:250 +msgid "" +"Called from :meth:`dispatch_return` when :meth:`stop_here` returns ``True``." +msgstr "" + +#: library/bdb.rst:254 +msgid "" +"Called from :meth:`dispatch_exception` when :meth:`stop_here` returns " +"``True``." +msgstr "" + +#: library/bdb.rst:259 +msgid "Handle how a breakpoint must be removed when it is a temporary one." +msgstr "" + +#: library/bdb.rst:261 +msgid "This method must be implemented by derived classes." +msgstr "" + +#: library/bdb.rst:264 +msgid "" +"Derived classes and clients can call the following methods to affect the " +"stepping state." +msgstr "" + +#: library/bdb.rst:269 +msgid "Stop after one line of code." +msgstr "Arrête après une ligne de code." + +#: library/bdb.rst:273 +msgid "Stop on the next line in or below the given frame." +msgstr "" + +#: library/bdb.rst:277 +msgid "Stop when returning from the given frame." +msgstr "" + +#: library/bdb.rst:281 +msgid "" +"Stop when the line with the *lineno* greater than the current one is reached " +"or when returning from current frame." +msgstr "" + +#: library/bdb.rst:286 +msgid "" +"Start debugging from *frame*. If *frame* is not specified, debugging starts " +"from caller's frame." +msgstr "" + +#: library/bdb.rst:291 +msgid "" +"Stop only at breakpoints or when finished. If there are no breakpoints, set " +"the system trace function to ``None``." +msgstr "" + +#: library/bdb.rst:296 +msgid "" +"Set the :attr:`quitting` attribute to ``True``. This raises :exc:`BdbQuit` " +"in the next call to one of the :meth:`dispatch_\\*` methods." +msgstr "" + +#: library/bdb.rst:300 +msgid "" +"Derived classes and clients can call the following methods to manipulate " +"breakpoints. These methods return a string containing an error message if " +"something went wrong, or ``None`` if all is well." +msgstr "" + +#: library/bdb.rst:306 +msgid "" +"Set a new breakpoint. If the *lineno* line doesn't exist for the *filename* " +"passed as argument, return an error message. The *filename* should be in " +"canonical form, as described in the :meth:`canonic` method." +msgstr "" + +#: library/bdb.rst:312 +msgid "" +"Delete the breakpoints in *filename* and *lineno*. If none were set, return " +"an error message." +msgstr "" + +#: library/bdb.rst:317 +msgid "" +"Delete the breakpoint which has the index *arg* in the :attr:`Breakpoint." +"bpbynumber`. If *arg* is not numeric or out of range, return an error " +"message." +msgstr "" + +#: library/bdb.rst:323 +msgid "" +"Delete all breakpoints in *filename*. If none were set, return an error " +"message." +msgstr "" + +#: library/bdb.rst:328 +msgid "" +"Delete all existing breakpoints. If none were set, return an error message." +msgstr "" + +#: library/bdb.rst:333 +msgid "" +"Return a breakpoint specified by the given number. If *arg* is a string, it " +"will be converted to a number. If *arg* is a non-numeric string, if the " +"given breakpoint never existed or has been deleted, a :exc:`ValueError` is " +"raised." +msgstr "" + +#: library/bdb.rst:342 +msgid "Return True if there is a breakpoint for *lineno* in *filename*." +msgstr "" + +#: library/bdb.rst:346 +msgid "" +"Return all breakpoints for *lineno* in *filename*, or an empty list if none " +"are set." +msgstr "" + +#: library/bdb.rst:351 +msgid "Return all breakpoints in *filename*, or an empty list if none are set." +msgstr "" + +#: library/bdb.rst:355 +msgid "Return all breakpoints that are set." +msgstr "Donne tous les points d'arrêt définis." + +#: library/bdb.rst:358 +msgid "" +"Derived classes and clients can call the following methods to get a data " +"structure representing a stack trace." +msgstr "" + +#: library/bdb.rst:363 +msgid "Return a list of (frame, lineno) tuples in a stack trace, and a size." +msgstr "" + +#: library/bdb.rst:365 +msgid "" +"The most recently called frame is last in the list. The size is the number " +"of frames below the frame where the debugger was invoked." +msgstr "" + +#: library/bdb.rst:370 +msgid "" +"Return a string with information about a stack entry, which is a ``(frame, " +"lineno)`` tuple. The return string contains:" +msgstr "" + +#: library/bdb.rst:373 +msgid "The canonical filename which contains the frame." +msgstr "" + +#: library/bdb.rst:374 +#, fuzzy +msgid "The function name or ``\"\"``." +msgstr "Le nom de la fonction, ou ``\"\"``." + +#: library/bdb.rst:375 +msgid "The input arguments." +msgstr "Les arguments donnés." + +#: library/bdb.rst:376 +msgid "The return value." +msgstr "Le résultat." + +#: library/bdb.rst:377 +msgid "The line of code (if it exists)." +msgstr "La ligne de code (si elle existe)." + +#: library/bdb.rst:380 +msgid "" +"The following two methods can be called by clients to use a debugger to " +"debug a :term:`statement`, given as a string." +msgstr "" + +#: library/bdb.rst:385 +msgid "" +"Debug a statement executed via the :func:`exec` function. *globals* " +"defaults to :attr:`__main__.__dict__`, *locals* defaults to *globals*." +msgstr "" + +#: library/bdb.rst:390 +msgid "" +"Debug an expression executed via the :func:`eval` function. *globals* and " +"*locals* have the same meaning as in :meth:`run`." +msgstr "" + +#: library/bdb.rst:395 +msgid "For backwards compatibility. Calls the :meth:`run` method." +msgstr "" + +#: library/bdb.rst:399 +msgid "Debug a single function call, and return its result." +msgstr "" + +#: library/bdb.rst:402 +msgid "Finally, the module defines the following functions:" +msgstr "" + +#: library/bdb.rst:406 +msgid "" +"Return True if we should break here, depending on the way the :class:" +"`Breakpoint` *b* was set." +msgstr "" + +#: library/bdb.rst:409 +msgid "" +"If it was set via line number, it checks if :attr:`b.line ` is the same as the one in *frame*. If the breakpoint was set via :" +"attr:`function name `, we have to check we are in " +"the right *frame* (the right function) and if we are on its first executable " +"line." +msgstr "" + +#: library/bdb.rst:418 +msgid "" +"Return ``(active breakpoint, delete temporary flag)`` or ``(None, None)`` as " +"the breakpoint to act upon." +msgstr "" + +#: library/bdb.rst:421 +msgid "" +"The *active breakpoint* is the first entry in :attr:`bplist ` for the (:attr:`file `, :attr:`line `) (which must exist) that is :attr:`enabled `, for which :func:`checkfuncname` is True, and that has neither a " +"False :attr:`condition ` nor positive :attr:`ignore " +"` count. The *flag*, meaning that a temporary " +"breakpoint should be deleted, is False only when the :attr:`cond ` cannot be evaluated (in which case, :attr:`ignore ` count is ignored)." +msgstr "" + +#: library/bdb.rst:432 +msgid "If no such entry exists, then (None, None) is returned." +msgstr "" + +#: library/bdb.rst:437 +msgid "Start debugging with a :class:`Bdb` instance from caller's frame." +msgstr "" + +#~ msgid "If it is temporary or not." +#~ msgstr "S'il est temporaire ou non." + +#~ msgid "Delete all existing breakpoints." +#~ msgstr "Supprime tous les points d'arrêt définis." diff --git a/library/binary.po b/library/binary.po new file mode 100644 index 0000000000..1435010a1a --- /dev/null +++ b/library/binary.po @@ -0,0 +1,49 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +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: 2017-11-07 23:13+0100\n" +"Last-Translator: FULL NAME \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" + +#: library/binary.rst:5 +msgid "Binary Data Services" +msgstr "Services autour des Données Binaires" + +#: library/binary.rst:7 +msgid "" +"The modules described in this chapter provide some basic services operations " +"for manipulation of binary data. Other operations on binary data, " +"specifically in relation to file formats and network protocols, are " +"described in the relevant sections." +msgstr "" +"Les modules décrits dans ce chapitre fournissent des services élémentaires " +"pour manipuler des données binaires. Les autres manipulations sur les " +"données binaires, particulièrement celles en relation avec les formats de " +"fichier et les protocoles réseaux sont décrits dans leurs propres chapitres." + +#: library/binary.rst:12 +msgid "" +"Some libraries described under :ref:`textservices` also work with either " +"ASCII-compatible binary formats (for example, :mod:`re`) or all binary data " +"(for example, :mod:`difflib`)." +msgstr "" +"Certaines bibliothèques décrites dans :ref:`textservices` fonctionnent aussi " +"avec soit des formats binaires compatibles ASCII (comme le module :mod:`re`) " +"soit toutes les données binaires (comme le module :mod:`difflib`)." + +#: library/binary.rst:16 +msgid "" +"In addition, see the documentation for Python's built-in binary data types " +"in :ref:`binaryseq`." +msgstr "" +"En complément, consultez la documentation des types natifs binaires dans :" +"ref:`binaryseq`." diff --git a/library/binascii.po b/library/binascii.po new file mode 100644 index 0000000000..f54be04479 --- /dev/null +++ b/library/binascii.po @@ -0,0 +1,334 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-04-05 10:05+0200\n" +"PO-Revision-Date: 2020-05-10 13:40+0200\n" +"Last-Translator: ZepmanBC \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" + +#: library/binascii.rst:2 +msgid ":mod:`binascii` --- Convert between binary and ASCII" +msgstr ":mod:`binascii` --- Conversion entre binaire et ASCII" + +#: library/binascii.rst:15 +msgid "" +"The :mod:`binascii` module contains a number of methods to convert between " +"binary and various ASCII-encoded binary representations. Normally, you will " +"not use these functions directly but use wrapper modules like :mod:`uu`, :" +"mod:`base64`, or :mod:`binhex` instead. The :mod:`binascii` module contains " +"low-level functions written in C for greater speed that are used by the " +"higher-level modules." +msgstr "" +"Le module :mod:`binascii` contient des méthodes pour convertir entre binaire " +"et diverses représentations binaires encodées en ASCII. Normalement, vous " +"n’allez pas utiliser ces fonctions directement mais vous utiliserez des " +"modules d’encapsulage comme :mod:`uu`, :mod:`base64`, or :mod:`binhex` à la " +"place. Le module :mod:`binascii` contient des fonctions bas-niveau écrites " +"en C plus rapides qui sont utilisées par des modules haut-niveau." + +#: library/binascii.rst:24 +msgid "" +"``a2b_*`` functions accept Unicode strings containing only ASCII characters. " +"Other functions only accept :term:`bytes-like objects ` " +"(such as :class:`bytes`, :class:`bytearray` and other objects that support " +"the buffer protocol)." +msgstr "" +"La fonction ``a2b_*`` accepte des chaînes de caractères contenant seulement " +"des caractères ASCII. D’autres fonctions acceptent seulement des objets :" +"term:`bytes et similaire ` (tel que :class:`bytes`, :" +"class:`bytearray` et autres objets qui supportent le protocole tampon)." + +#: library/binascii.rst:29 +msgid "ASCII-only unicode strings are now accepted by the ``a2b_*`` functions." +msgstr "" +"Les chaines de caractères *unicode* seulement composées de caractères ASCII " +"sont désormais acceptées par les fonctions ``a2b_*``." + +#: library/binascii.rst:33 +msgid "The :mod:`binascii` module defines the following functions:" +msgstr "Le module :mod:`binascii` définit les fonctions suivantes :" + +#: library/binascii.rst:38 +msgid "" +"Convert a single line of uuencoded data back to binary and return the binary " +"data. Lines normally contain 45 (binary) bytes, except for the last line. " +"Line data may be followed by whitespace." +msgstr "" +"Convertit une seule ligne de donnée *uuencoded* en binaire et renvoie la " +"donnée binaire. Les lignes contiennent normalement 45 octets (binaire), sauf " +"pour la dernière ligne. Il se peut que la ligne de donnée soit suivie d’un " +"espace blanc." + +#: library/binascii.rst:45 +msgid "" +"Convert binary data to a line of ASCII characters, the return value is the " +"converted line, including a newline char. The length of *data* should be at " +"most 45. If *backtick* is true, zeros are represented by ``'`'`` instead of " +"spaces." +msgstr "" +"Convertit les données binaires en une ligne de caractères ASCII, la valeur " +"renvoyée est la ligne convertie incluant un caractère de nouvelle ligne. La " +"longueur de *data* doit être au maximum de 45. Si *backtick* est vraie, les " +"zéros sont représentés par ``'`'`` plutôt que par des espaces." + +#: library/binascii.rst:49 +msgid "Added the *backtick* parameter." +msgstr "Ajout du paramètre *backtick*." + +#: library/binascii.rst:55 +msgid "" +"Convert a block of base64 data back to binary and return the binary data. " +"More than one line may be passed at a time." +msgstr "" +"Convertit un bloc de donnée en *base64* en binaire et renvoie la donnée " +"binaire. Plus d’une ligne peut être passé à la fois." + +#: library/binascii.rst:61 +msgid "" +"Convert binary data to a line of ASCII characters in base64 coding. The " +"return value is the converted line, including a newline char if *newline* is " +"true. The output of this function conforms to :rfc:`3548`." +msgstr "" +"Convertit les données binaires en une ligne de caractères ASCII en codage " +"base 64. La valeur de renvoyée et la ligne convertie, incluant un caractère " +"de nouvelle ligne si *newline* est vraie. La sortie de cette fonction se " +"conforme à :rfc:`3548`." + +#: library/binascii.rst:65 +msgid "Added the *newline* parameter." +msgstr "Ajout du paramètre *newline*." + +#: library/binascii.rst:71 +msgid "" +"Convert a block of quoted-printable data back to binary and return the " +"binary data. More than one line may be passed at a time. If the optional " +"argument *header* is present and true, underscores will be decoded as spaces." +msgstr "" +"Convertit un bloc de données *quoted-printable* en binaire et renvoie les " +"données binaires. Plus d’une ligne peut être passée à la fois. Si l’argument " +"optionnel *header* est présent et vrai, les traits soulignés seront décodés " +"en espaces." + +#: library/binascii.rst:78 +msgid "" +"Convert binary data to a line(s) of ASCII characters in quoted-printable " +"encoding. The return value is the converted line(s). If the optional " +"argument *quotetabs* is present and true, all tabs and spaces will be " +"encoded. If the optional argument *istext* is present and true, newlines " +"are not encoded but trailing whitespace will be encoded. If the optional " +"argument *header* is present and true, spaces will be encoded as underscores " +"per :rfc:`1522`. If the optional argument *header* is present and false, " +"newline characters will be encoded as well; otherwise linefeed conversion " +"might corrupt the binary data stream." +msgstr "" +"Convertit les données binaires en ligne(s) de caractères ASCII en codage " +"imprimable entre guillemets. La valeur de retour est la\\les lignes(s) " +"convertie(s). Si l’argument optionnel *quotetabs* est présent et vrai, " +"toutes les tabulations et espaces seront encodés. Si l’argument optionnel " +"*istext* est présent et faux, les nouvelles lignes ne sont pas encodées mais " +"les espaces de fin de ligne le seront. Si l’argument optionnel *header* est " +"présent et vrai, les espaces vont être encodés comme de traits soulignés " +"selon :rfc:`1522`. Si l’argument optionnel *header* est présent et faux, les " +"caractères de nouvelle ligne seront également encodés ; sinon la conversion " +"de saut de ligne pourrait corrompre le flux de données binaire." + +#: library/binascii.rst:91 +msgid "" +"Convert binhex4 formatted ASCII data to binary, without doing RLE-" +"decompression. The string should contain a complete number of binary bytes, " +"or (in case of the last portion of the binhex4 data) have the remaining bits " +"zero." +msgstr "" +"Convertit un bloc de donnée ASCII au format *binhex4* en binaire, sans faire " +"de décompression RLE. La chaîne de caractères doit contenir un nombre " +"complet d’octet binaires ou (au cas où la dernière portion de donnée est au " +"format *binhex4*) avoir les bits restants à 0." + +#: library/binascii.rst:100 +msgid "" +"Perform RLE-decompression on the data, as per the binhex4 standard. The " +"algorithm uses ``0x90`` after a byte as a repeat indicator, followed by a " +"count. A count of ``0`` specifies a byte value of ``0x90``. The routine " +"returns the decompressed data, unless data input data ends in an orphaned " +"repeat indicator, in which case the :exc:`Incomplete` exception is raised." +msgstr "" +"Réalise une décompression RLE sur la donnée, d’après la norme *binhex4*. " +"L’algorithme utilise ``0x90`` après un octet comme un indicateur de " +"répétition, suivi d’un décompte. Un décompte de ``0`` définit une valeur " +"d’octet de ``0x90``. La routine renvoie la donnée décompressée, sauf si la " +"donnée entrante se finit sur un indicateur de répétition orphelin. Dans ce " +"cas l’exception :exc:`Incomplete` est levée." + +#: library/binascii.rst:106 +msgid "Accept only bytestring or bytearray objects as input." +msgstr "Accepte seulement des objets *bytestring* ou *bytearray* en entrée." + +#: library/binascii.rst:114 +msgid "Perform binhex4 style RLE-compression on *data* and return the result." +msgstr "" +"Réalise une compression RLE de type *binhex4* sur *data* et renvoie le " +"résultat." + +#: library/binascii.rst:121 +msgid "" +"Perform hexbin4 binary-to-ASCII translation and return the resulting string. " +"The argument should already be RLE-coded, and have a length divisible by 3 " +"(except possibly the last fragment)." +msgstr "" +"Réalise une traduction *hexbin4* de binaire à ASCII et renvoie la chaîne de " +"caractères résultante. L’argument doit être *RLE-coded*, et avoir une " +"longueur divisible par 3 (sauf, éventuellement, le dernier fragment)." + +#: library/binascii.rst:130 +msgid "" +"Compute a 16-bit CRC value of *data*, starting with *value* as the initial " +"CRC, and return the result. This uses the CRC-CCITT polynomial *x*:sup:`16` " +"+ *x*:sup:`12` + *x*:sup:`5` + 1, often represented as 0x1021. This CRC is " +"used in the binhex4 format." +msgstr "" +"Calcule une valeur en CRC 16-bit de *data*, commençant par *value* comme CRC " +"initial et renvoie le résultat. Ceci utilise le CRC-CCITT polynomial *x*:sup:" +"`16` + *x*:sup:`12` + *x*:sup:`5` + 1, souvent représenté comme *0x1021*. Ce " +"CRC est utilisé dans le format *binhex4*." + +#: library/binascii.rst:138 +#, fuzzy +msgid "" +"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 " +"cohérent avec la somme de contrôle du fichier ZIP. Comme l’algorithme est " +"conçu pour être utilisé comme un algorithme de somme de contrôle, il ne " +"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 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:158 +msgid "" +"Return the hexadecimal representation of the binary *data*. Every byte of " +"*data* is converted into the corresponding 2-digit hex representation. The " +"returned bytes object is therefore twice as long as the length of *data*." +msgstr "" +"Renvoie la représentation hexadécimale du binaire *data*. Chaque octet de " +"*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:162 +msgid "" +"Similar functionality (but returning a text string) is also conveniently " +"accessible using the :meth:`bytes.hex` method." +msgstr "" +"Fonctionnalité similaire est également commodément accessible en utilisant " +"la méthode :meth:`bytes.hex`." + +#: 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. " +"Separator placement is counted from the right end of the output by default, " +"if you wish to count from the left, supply a negative *bytes_per_sep* value." +msgstr "" +"Si *sep* est spécifié, il doit s'agir d'une chaîne de caractères ou d'un " +"objet *byte*. Il sera inséré dans la sortie tous les *bytes_per_sep* octets. " +"Par défaut, l'emplacement du séparateur est compté à partir de l'extrémité " +"droite de la sortie. Si vous souhaitez compter à partir de la gauche, " +"indiquez une valeur *bytes_per_sep* négative." + +#: 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: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 " +"number of hexadecimal digits (which can be upper or lower case), otherwise " +"an :exc:`Error` exception is raised." +msgstr "" +"Renvoie la donnée binaire représentée par la chaîne de caractères " +"hexadécimale *hexstr*. Cette fonction est l’inverse de :func:`b2a_hex`. " +"*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:191 +msgid "" +"Similar functionality (accepting only text string arguments, but more " +"liberal towards whitespace) is also accessible using the :meth:`bytes." +"fromhex` class method." +msgstr "" +"Une fonctionnalité similaire (n’acceptant que les arguments de chaîne de " +"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: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: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." +msgstr "" +"Exception levée par des données incomplète. Il ne s’agit généralement pas " +"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:210 +msgid "Module :mod:`base64`" +msgstr "Module :mod:`base64`" + +#: 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:213 +msgid "Module :mod:`binhex`" +msgstr "Module :mod:`binhex`" + +#: 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:216 +msgid "Module :mod:`uu`" +msgstr "Module :mod:`uu`" + +#: library/binascii.rst:216 +msgid "Support for UU encoding used on Unix." +msgstr "Gestion de l'encodage UU utilisé sur Unix." + +#: library/binascii.rst:218 +msgid "Module :mod:`quopri`" +msgstr "Module :mod:`quopri`" + +#: 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* " +"MIME." diff --git a/library/binhex.po b/library/binhex.po new file mode 100644 index 0000000000..d1aa3d27de --- /dev/null +++ b/library/binhex.po @@ -0,0 +1,108 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +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-07-29 23:42+0200\n" +"Last-Translator: Julien Palard \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 1.8.11\n" + +#: library/binhex.rst:2 +msgid ":mod:`binhex` --- Encode and decode binhex4 files" +msgstr ":mod:`binhex` — Encode et décode les fichiers *binhex4*" + +#: library/binhex.rst:7 +msgid "**Source code:** :source:`Lib/binhex.py`" +msgstr "**Code source :** :source:`Lib/binhex.py`" + +#: library/binhex.rst:13 +msgid "" +"This module encodes and decodes files in binhex4 format, a format allowing " +"representation of Macintosh files in ASCII. Only the data fork is handled." +msgstr "" +"Ce module encode et décode les fichiers au format *binhex4*, un format " +"permettant la représentation de fichier Macintosh au format ASCII. Seulement " +"la fourchette de donnée est supportée." + +#: library/binhex.rst:16 +msgid "The :mod:`binhex` module defines the following functions:" +msgstr "Le module :mod:`binhex` définit les fonctions suivantes :" + +#: library/binhex.rst:21 +msgid "" +"Convert a binary file with filename *input* to binhex file *output*. The " +"*output* parameter can either be a filename or a file-like object (any " +"object supporting a :meth:`write` and :meth:`close` method)." +msgstr "" +"Convertit un fichier binaire avec comme nom *input* en fichier *binhex* " +"*output*. Le paramètre *output* peut être soit un nom de fichier, soit un " +"objet s’apparentant à un fichier (tout objet supportant les méthodes :meth:" +"`write` et :meth:`close`)." + +#: library/binhex.rst:28 +msgid "" +"Decode a binhex file *input*. *input* may be a filename or a file-like " +"object supporting :meth:`read` and :meth:`close` methods. The resulting file " +"is written to a file named *output*, unless the argument is ``None`` in " +"which case the output filename is read from the binhex file." +msgstr "" +"Décode un fichier *binhex* *input*. *input* peut être soit un nom de " +"fichier, soit un objet s’apparentant à un fichier supportant les méthodes :" +"meth:`write` et :meth:`close`. Le résultat est écrit dans un fichier nommé " +"*output*, sauf si l'argument est ``None``, dans ce cas le fichier de sortie " +"est lu depuis le fichier *binhex*." + +#: library/binhex.rst:33 +msgid "The following exception is also defined:" +msgstr "L'exception suivante est aussi définie :" + +#: library/binhex.rst:38 +msgid "" +"Exception raised when something can't be encoded using the binhex format " +"(for example, a filename is too long to fit in the filename field), or when " +"input is not properly encoded binhex data." +msgstr "" +"Exception levée quand quelque chose ne peut être encodé en utilisant le " +"format *binhex* (par exemple, un nom de fichier trop long pour rentrer dans " +"le champ *filename*) ou quand les données d'entrée ne sont pas encodées " +"correctement en *binhex*." + +#: library/binhex.rst:45 +msgid "Module :mod:`binascii`" +msgstr "Module :mod:`binascii`" + +#: library/binhex.rst:46 +msgid "" +"Support module containing ASCII-to-binary and binary-to-ASCII conversions." +msgstr "" +"Module secondaire contenant les conversions ASCII vers binaire et binaire " +"vers ASCII." + +#: library/binhex.rst:52 +msgid "Notes" +msgstr "Notes" + +#: library/binhex.rst:54 +msgid "" +"There is an alternative, more powerful interface to the coder and decoder, " +"see the source for details." +msgstr "" +"Il y a une alternative, une interface plus puissante pour le codeur et " +"décodeur, voir les sources pour les détails." + +#: library/binhex.rst:57 +msgid "" +"If you code or decode textfiles on non-Macintosh platforms they will still " +"use the old Macintosh newline convention (carriage-return as end of line)." +msgstr "" +"Si vous codez ou décodez sur des plateformes autres que Macintosh, elles " +"utiliseront l'ancienne convention Macintosh pour les retours à la ligne " +"(retour-chariot comme fin de ligne)." diff --git a/library/bisect.po b/library/bisect.po new file mode 100644 index 0000000000..af06024d3a --- /dev/null +++ b/library/bisect.po @@ -0,0 +1,302 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-18 15:46+0200\n" +"PO-Revision-Date: 2021-10-17 12:13+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 3.0\n" + +#: library/bisect.rst:2 +msgid ":mod:`bisect` --- Array bisection algorithm" +msgstr ":mod:`bisect` — Algorithme de bissection de listes" + +#: library/bisect.rst:10 +msgid "**Source code:** :source:`Lib/bisect.py`" +msgstr "**Code source :** :source:`Lib/bisect.py`" + +#: library/bisect.rst:14 +msgid "" +"This module provides support for maintaining a list in sorted order without " +"having to sort the list after each insertion. For long lists of items with " +"expensive comparison operations, this can be an improvement over the more " +"common approach. The module is called :mod:`bisect` because it uses a basic " +"bisection algorithm to do its work. The source code may be most useful as a " +"working example of the algorithm (the boundary conditions are already " +"right!)." +msgstr "" +"Ce module fournit des outils pour maintenir une liste triée sans avoir à la " +"trier à chaque insertion. Il pourrait être plus rapide que l'approche " +"classique pour de longues listes d'éléments dont les opérations de " +"comparaison sont lourdes. Le module se nomme :mod:`bisect` car il utilise " +"une approche simple par bissection. Si vous voulez un exemple de cet " +"algorithme, le mieux est d'aller lire le code source de ce module (les " +"conditions sur les limites y étant justes !)." + +#: library/bisect.rst:21 +msgid "The following functions are provided:" +msgstr "Les fonctions suivantes sont fournies :" + +#: library/bisect.rst:26 +msgid "" +"Locate the insertion point for *x* in *a* to maintain sorted order. The " +"parameters *lo* and *hi* may be used to specify a subset of the list which " +"should be considered; by default the entire list is used. If *x* is already " +"present in *a*, the insertion point will be before (to the left of) any " +"existing entries. The return value is suitable for use as the first " +"parameter to ``list.insert()`` assuming that *a* is already sorted." +msgstr "" +"Trouve le point d'insertion de *x* dans *a* permettant de conserver l'ordre. " +"Les paramètres *lo* et *hi* permettent de limiter les emplacements à " +"vérifier dans la liste, par défaut toute la liste est utilisée. Si *x* est " +"déjà présent dans *a*, le point d'insertion proposé sera avant (à gauche) de " +"l'entrée existante. Si *a* est déjà triée, la valeur renvoyée peut " +"directement être utilisée comme premier paramètre de ``list.insert()``." + +#: library/bisect.rst:33 +msgid "" +"The returned insertion point *i* partitions the array *a* into two halves so " +"that ``all(val < x for val in a[lo : i])`` for the left side and ``all(val " +">= x for val in a[i : hi])`` for the right side." +msgstr "" +"Le point d'insertion renvoyé, *i*, coupe la liste *a* en deux moitiés telles " +"que, pour la moitié de gauche : ``all(val < x for val in a[lo : i])``, et " +"pour la partie de droite : ``all(val >= x for val in a[i : hi])``." + +#: library/bisect.rst:58 +#, fuzzy +msgid "" +"*key* specifies a :term:`key function` of one argument that is used to " +"extract a comparison key from each element in the array. To support " +"searching complex records, the key function is not applied to the *x* value." +msgstr "" +"Le paramètre facultatif *key* est une :term:`fonction clé ` " +"prenant un argument. S'il est fourni, les comparaisons se font sur les " +"valeurs renvoyées par la fonction clé. Par défaut, les éléments sont " +"comparés directement." + +#: library/bisect.rst:62 +msgid "" +"If *key* is ``None``, the elements are compared directly with no intervening " +"function call." +msgstr "" + +#: library/bisect.rst:65 library/bisect.rst:103 +msgid "Added the *key* parameter." +msgstr "ajout du paramètre *key*." + +#: library/bisect.rst:51 +msgid "" +"Similar to :func:`bisect_left`, but returns an insertion point which comes " +"after (to the right of) any existing entries of *x* in *a*." +msgstr "" +"Semblable à :func:`bisect_left`, mais renvoie un point d'insertion après (à " +"droite) d'une potentielle entrée existante valant *x* dans *a*." + +#: library/bisect.rst:54 +msgid "" +"The returned insertion point *i* partitions the array *a* into two halves so " +"that ``all(val <= x for val in a[lo : i])`` for the left side and ``all(val " +"> x for val in a[i : hi])`` for the right side." +msgstr "" +"Le point d'insertion renvoyé, *i*, coupe la liste *a* en deux moitiés telles " +"que, pour la moitié de gauche : ``all(val <= x for val in a[lo : i])`` et " +"pour la moitié de droite : ``all(val > x for val in a[i : hi])``." + +#: library/bisect.rst:71 +msgid "Insert *x* in *a* in sorted order." +msgstr "Insère *x* dans *a* en préservant l'ordre." + +#: library/bisect.rst:73 +msgid "" +"This function first runs :func:`bisect_left` to locate an insertion point. " +"Next, it runs the :meth:`insert` method on *a* to insert *x* at the " +"appropriate position to maintain sort order." +msgstr "" +"Cette fonction commence par appliquer :func:`bisect_left` pour déterminer la " +"position de l'insertion, puis appelle la méthode :meth:`insert` de *a* pour " +"ajouter *x* à l'endroit adéquat." + +#: library/bisect.rst:97 +msgid "" +"To support inserting records in a table, the *key* function (if any) is " +"applied to *x* for the search step but not for the insertion step." +msgstr "" + +#: library/bisect.rst:100 +msgid "" +"Keep in mind that the ``O(log n)`` search is dominated by the slow O(n) " +"insertion step." +msgstr "" +"Gardez à l'esprit que la complexité logarithmique :math:`O(\\ln(n))` de la " +"recherche est dominée par la lenteur de l'insertion, de complexité linéaire :" +"math:`O(n)`." + +#: library/bisect.rst:90 +msgid "" +"Similar to :func:`insort_left`, but inserting *x* in *a* after any existing " +"entries of *x*." +msgstr "" +"Similaire à :func:`insort_left`, mais en insérant *x* dans *a* après une " +"potentielle entrée existante égale à *x*." + +#: library/bisect.rst:93 +msgid "" +"This function first runs :func:`bisect_right` to locate an insertion point. " +"Next, it runs the :meth:`insert` method on *a* to insert *x* at the " +"appropriate position to maintain sort order." +msgstr "" +"Le principe est le même que :func:`insort_left`, mais avec :func:" +"`bisect_right`." + +#: library/bisect.rst:108 +msgid "Performance Notes" +msgstr "Notes sur la performance" + +#: library/bisect.rst:110 +msgid "" +"When writing time sensitive code using *bisect()* and *insort()*, keep these " +"thoughts in mind:" +msgstr "" +"Pour écrire du code sensible à la performance utilisant ``bisect()`` et " +"``insort()``, prenez en compte ces quelques considérations :" + +#: library/bisect.rst:113 +msgid "" +"Bisection is effective for searching ranges of values. For locating specific " +"values, dictionaries are more performant." +msgstr "" +"La bissection est une bonne idée pour rechercher une plage de valeurs. Pour " +"une seule valeur, mieux vaut un dictionnaire." + +#: library/bisect.rst:116 +msgid "" +"The *insort()* functions are ``O(n)`` because the logarithmic search step is " +"dominated by the linear time insertion step." +msgstr "" +"Les fonctions d'insertion dans une liste classée ont une complexité linéaire " +"car c'est le coût d'une insertion, même si la recherche est logarithmique." + +#: library/bisect.rst:119 +msgid "" +"The search functions are stateless and discard key function results after " +"they are used. Consequently, if the search functions are used in a loop, " +"the key function may be called again and again on the same array elements. " +"If the key function isn't fast, consider wrapping it with :func:`functools." +"cache` to avoid duplicate computations. Alternatively, consider searching " +"an array of precomputed keys to locate the insertion point (as shown in the " +"examples section below)." +msgstr "" +"Les fonctions de recherche ne maintiennent pas d'état et ne conservent pas " +"le résultat de la fonction clé après utilisation. Par conséquent, si elles " +"sont appelées dans une boucle, la fonction clé peut être appelée de " +"nombreuses fois sur les mêmes entrées. Si cette fonction clé est lente, une " +"possibilité est de l'encapsuler dans :func:`functools.cache` pour éviter de " +"répéter les opérations. Une autre possibilité est d'effectuer la recherche " +"sur un tableau de clés pré-calculées pour trouver le point d'insertion (voir " +"les exemples plus bas)." + +#: library/bisect.rst:129 +#, fuzzy +msgid "" +"`Sorted Collections `_ is a " +"high performance module that uses *bisect* to managed sorted collections of " +"data." +msgstr "" +"`Sorted Collections `_ " +"est un module de haute performance qui fait appel à *bisect* pour maintenir " +"des données ordonnées." + +#: library/bisect.rst:133 +msgid "" +"The `SortedCollection recipe `_ uses bisect to build a full-featured collection class " +"with straight-forward search methods and support for a key-function. The " +"keys are precomputed to save unnecessary calls to the key function during " +"searches." +msgstr "" +"`SortedCollection recipe `_ utilise le module *bisect* pour construire une classe " +"collection exposant des méthodes de recherches naturelles et gérant une " +"fonction clef. Les clefs sont pré-calculées pour économiser des appels " +"inutiles à la fonction clef durant les recherches." + +#: library/bisect.rst:141 +msgid "Searching Sorted Lists" +msgstr "Chercher dans des listes triées" + +#: library/bisect.rst:143 +msgid "" +"The above :func:`bisect` functions are useful for finding insertion points " +"but can be tricky or awkward to use for common searching tasks. The " +"following five functions show how to transform them into the standard " +"lookups for sorted lists::" +msgstr "" +"Les fonctions :func:`bisect` ci-dessus sont utiles pour insérer des " +"éléments, mais peuvent être étranges et peu naturelles à utiliser pour " +"rechercher des éléments. Les cinq fonctions suivantes montrent comment les " +"transformer en recherche plus classique pour les listes triées ::" + +#: library/bisect.rst:185 +msgid "Examples" +msgstr "Exemples" + +#: library/bisect.rst:189 +msgid "" +"The :func:`bisect` function can be useful for numeric table lookups. This " +"example uses :func:`bisect` to look up a letter grade for an exam score " +"(say) based on a set of ordered numeric breakpoints: 90 and up is an 'A', 80 " +"to 89 is a 'B', and so on::" +msgstr "" +"La fonction :func:`bisect` peut être utile pour des recherches dans des " +"tableaux de nombres. Cet exemple utilise :func:`bisect` pour rechercher la " +"note (sous forme de lettre) correspondant à une note sous forme de points, " +"en se basant sur une échelle prédéfinie : plus de 90 vaut 'A', de 80 à 89 " +"vaut 'B', etc. ::" + +#: library/bisect.rst:201 +msgid "" +"The :func:`bisect` and :func:`insort` functions also work with lists of " +"tuples. The *key* argument can serve to extract the field used for ordering " +"records in a table::" +msgstr "" + +#: library/bisect.rst:235 +#, fuzzy +msgid "" +"If the key function is expensive, it is possible to avoid repeated function " +"calls by searching a list of precomputed keys to find the index of a record::" +msgstr "" +"Une technique consiste à utiliser une liste de clefs pré-calculée pour " +"chercher l'indice de l'enregistrement en question ::" + +#~ msgid "" +#~ "Insert *x* in *a* in sorted order. This is equivalent to ``a." +#~ "insert(bisect.bisect_left(a, x, lo, hi), x)`` assuming that *a* is " +#~ "already sorted. Keep in mind that the O(log n) search is dominated by " +#~ "the slow O(n) insertion step." +#~ msgstr "" +#~ "Insère *x* dans *a* en conservant le tri. C'est l'équivalent de ``a." +#~ "insert(bisect.bisect_left(a, x, lo, hi), x)``, tant que *a* est déjà " +#~ "triée. Gardez en tête que bien que la recherche ne coûte que O(log n), " +#~ "l'insertion coûte O(n)." + +#~ msgid "" +#~ "Unlike the :func:`sorted` function, it does not make sense for the :func:" +#~ "`bisect` functions to have *key* or *reversed* arguments because that " +#~ "would lead to an inefficient design (successive calls to bisect functions " +#~ "would not \"remember\" all of the previous key lookups)." +#~ msgstr "" +#~ "Contrairement à la fonction :func:`sorted`, ça n'aurait pas de sens pour " +#~ "la fonction :func:`bisect` d'avoir un paramètre *key* ou *reversed*, qui " +#~ "conduiraient à une utilisation inefficace (des appels successifs à la " +#~ "fonction *bisect* n'auraient aucun moyen de se \"souvenir\" des " +#~ "recherches de clef précédentes)." diff --git a/library/builtins.po b/library/builtins.po new file mode 100644 index 0000000000..d3a5122935 --- /dev/null +++ b/library/builtins.po @@ -0,0 +1,60 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +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-07-29 00:46+0200\n" +"Last-Translator: Julien Palard \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" + +#: library/builtins.rst:2 +msgid ":mod:`builtins` --- Built-in objects" +msgstr ":mod:`builtins` — Objets natifs" + +#: library/builtins.rst:9 +msgid "" +"This module provides direct access to all 'built-in' identifiers of Python; " +"for example, ``builtins.open`` is the full name for the built-in function :" +"func:`open`. See :ref:`built-in-funcs` and :ref:`built-in-consts` for " +"documentation." +msgstr "" +"Ce module fournit un accès direct aux identifiants 'natifs' de Python; par " +"exemple, ``builtins.open`` est le nom complet pour la fonction native :func:" +"`open`. Voir :ref:`built-in-funcs` et :ref:`built-in-consts` pour plus de " +"documentation." + +#: library/builtins.rst:15 +msgid "" +"This module is not normally accessed explicitly by most applications, but " +"can be useful in modules that provide objects with the same name as a built-" +"in value, but in which the built-in of that name is also needed. For " +"example, in a module that wants to implement an :func:`open` function that " +"wraps the built-in :func:`open`, this module can be used directly::" +msgstr "" +"Ce module n'est normalement pas accédé explicitement par la plupart des " +"applications, mais peut être utile dans des modules qui exposent des objets " +"de même nom qu'une valeur native, mais pour qui le natif de même nom est " +"aussi nécessaire. Par exemple, dans un module qui voudrait implémenter une " +"fonction :func:`open` autour de la fonction native :func:`open`, ce module " +"peut être utilisé directement ::" + +#: library/builtins.rst:38 +msgid "" +"As an implementation detail, most modules have the name ``__builtins__`` " +"made available as part of their globals. The value of ``__builtins__`` is " +"normally either this module or the value of this module's :attr:`~object." +"__dict__` attribute. Since this is an implementation detail, it may not be " +"used by alternate implementations of Python." +msgstr "" +"Spécificité de l'implémentation: La plupart des modules ont ``__builtins__`` " +"dans leurs globales. La valeur de ``__builtins__`` est classiquement soit " +"ce module, soit la valeur de l'attribut :attr:`~object.__dict__` du module. " +"Puisque c'est une spécificité de CPython, ce n'est peut-être pas utilisé par " +"toutes les autres implémentations." diff --git a/library/bz2.po b/library/bz2.po new file mode 100644 index 0000000000..0412940e93 --- /dev/null +++ b/library/bz2.po @@ -0,0 +1,522 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-18 15:46+0200\n" +"PO-Revision-Date: 2022-10-18 15:44+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 3.0\n" + +#: library/bz2.rst:2 +msgid ":mod:`bz2` --- Support for :program:`bzip2` compression" +msgstr ":mod:`bz2` — Prise en charge de la compression :program:`bzip2`" + +#: library/bz2.rst:12 +msgid "**Source code:** :source:`Lib/bz2.py`" +msgstr "**Code Source :** :source:`Lib/bz2.py`" + +#: library/bz2.rst:16 +msgid "" +"This module provides a comprehensive interface for compressing and " +"decompressing data using the bzip2 compression algorithm." +msgstr "" +"Ce module fournit une interface complète pour compresser et décompresser les " +"données en utilisant l'algorithme de compression *bzip2*." + +#: library/bz2.rst:19 +msgid "The :mod:`bz2` module contains:" +msgstr "Le module :mod:`bz2` contient :" + +#: library/bz2.rst:21 +msgid "" +"The :func:`.open` function and :class:`BZ2File` class for reading and " +"writing compressed files." +msgstr "" +"La fonction :func:`.open` et la classe :class:`BZ2File` pour lire et écrire " +"des fichiers compressés." + +#: library/bz2.rst:23 +msgid "" +"The :class:`BZ2Compressor` and :class:`BZ2Decompressor` classes for " +"incremental (de)compression." +msgstr "" +"Les classes :class:`BZ2Compressor` et :class:`BZ2Decompressor` pour la " +"(dé)compression incrémentielle." + +#: library/bz2.rst:25 +msgid "" +"The :func:`compress` and :func:`decompress` functions for one-shot " +"(de)compression." +msgstr "" +"Les fonctions :func:`compress` et :func:`decompress` pour la (dé)compression " +"en une seule fois." + +#: library/bz2.rst:30 +msgid "(De)compression of files" +msgstr "(Dé)compression de fichiers" + +#: library/bz2.rst:34 +msgid "" +"Open a bzip2-compressed file in binary or text mode, returning a :term:`file " +"object`." +msgstr "" +"Ouvre un fichier compressé par *bzip2* en mode binaire ou texte, le " +"renvoyant en :term:`file object`." + +#: library/bz2.rst:37 +msgid "" +"As with the constructor for :class:`BZ2File`, the *filename* argument can be " +"an actual filename (a :class:`str` or :class:`bytes` object), or an existing " +"file object to read from or write to." +msgstr "" +"Tout comme avec le constructeur pour la classe :class:`BZ2File`, l'argument " +"*filename* peut être un nom de fichier réel (un objet :class:`str` ou :class:" +"`bytes`), ou un objet fichier existant à lire ou à écrire." + +#: library/bz2.rst:41 +msgid "" +"The *mode* argument can be any of ``'r'``, ``'rb'``, ``'w'``, ``'wb'``, " +"``'x'``, ``'xb'``, ``'a'`` or ``'ab'`` for binary mode, or ``'rt'``, " +"``'wt'``, ``'xt'``, or ``'at'`` for text mode. The default is ``'rb'``." +msgstr "" +"L'argument *mode* peut valoir ``'r'``, ``'rb'``, ``'w'``, ``'wb'``, ``'x'``, " +"``'xb'``, ``'a'`` ou ``'ab'`` pour le mode binaire, ou ``'rt'``, ``'wt'``, " +"``'xt'`` ou ``'at'`` pour le mode texte. Il vaut par défaut ``'rb'``." + +#: library/bz2.rst:45 +msgid "" +"The *compresslevel* argument is an integer from 1 to 9, as for the :class:" +"`BZ2File` constructor." +msgstr "" +"L'argument *compresslevel* est un entier de 1 à 9, comme pour le " +"constructeur :class:`BZ2File`." + +#: library/bz2.rst:48 +msgid "" +"For binary mode, this function is equivalent to the :class:`BZ2File` " +"constructor: ``BZ2File(filename, mode, compresslevel=compresslevel)``. In " +"this case, the *encoding*, *errors* and *newline* arguments must not be " +"provided." +msgstr "" +"Pour le mode binaire, cette fonction est équivalente au constructeur :class:" +"`BZ2File` : ``BZ2File(filename, mode, compresslevel=compresslevel)``. Dans " +"ce cas, les arguments *encoding*, *errors* et *newline* arguments ne doivent " +"pas être fournis." + +#: library/bz2.rst:53 +msgid "" +"For text mode, a :class:`BZ2File` object is created, and wrapped in an :" +"class:`io.TextIOWrapper` instance with the specified encoding, error " +"handling behavior, and line ending(s)." +msgstr "" +"Pour le mode texte, un objet :class:`BZ2File` est créé et encapsulé dans une " +"instance :class:`io.TextIOWrapper` avec l'encodage spécifié, le comportement " +"de gestion des erreurs et les fins de ligne." + +#: library/bz2.rst:124 +msgid "The ``'x'`` (exclusive creation) mode was added." +msgstr "Le mode ``'x'`` (création exclusive) est ajouté." + +#: library/bz2.rst:131 +msgid "Accepts a :term:`path-like object`." +msgstr "Accepte un :term:`path-like object`." + +#: library/bz2.rst:68 +msgid "Open a bzip2-compressed file in binary mode." +msgstr "Ouvre un fichier *bzip2* en mode binaire." + +#: library/bz2.rst:70 +msgid "" +"If *filename* is a :class:`str` or :class:`bytes` object, open the named " +"file directly. Otherwise, *filename* should be a :term:`file object`, which " +"will be used to read or write the compressed data." +msgstr "" +"Si *filename* est un objet :class:`str` ou :class:`bytes`, ouvre le nom de " +"fichier directement. Autrement, *filename* doit être un :term:`file object`, " +"qui est utilisé pour lire ou écrire les données compressées." + +#: library/bz2.rst:74 +msgid "" +"The *mode* argument can be either ``'r'`` for reading (default), ``'w'`` for " +"overwriting, ``'x'`` for exclusive creation, or ``'a'`` for appending. These " +"can equivalently be given as ``'rb'``, ``'wb'``, ``'xb'`` and ``'ab'`` " +"respectively." +msgstr "" +"L'argument *mode* peut être soit ``'r'`` pour lire (par défaut), ``'w'`` " +"pour écraser, ``'x'`` pour créer exclusivement, ou ``'a'`` pour ajouter. Ils " +"peuvent également être écrits respectivement comme ``'rb'``, ``'wb'``, " +"``'xb'`` et ``'ab'``." + +#: library/bz2.rst:79 +msgid "" +"If *filename* is a file object (rather than an actual file name), a mode of " +"``'w'`` does not truncate the file, and is instead equivalent to ``'a'``." +msgstr "" +"Si *filename* est un objet fichier (plutôt que le nom de fichier réel), le " +"mode ``'w'`` ne tronque pas le fichier, mais équivaut à ``'a'``." + +#: library/bz2.rst:82 +msgid "" +"If *mode* is ``'w'`` or ``'a'``, *compresslevel* can be an integer between " +"``1`` and ``9`` specifying the level of compression: ``1`` produces the " +"least compression, and ``9`` (default) produces the most compression." +msgstr "" +"Si *mode* est ``'w'`` ou ``'a'``, *compresslevel* peut être un entier entre " +"``1`` et ``9`` spécifiant le niveau de compression : ``1`` utilise la " +"compression la moins forte, et ``9`` (par défaut) la compression la plus " +"forte." + +#: library/bz2.rst:86 +msgid "" +"If *mode* is ``'r'``, the input file may be the concatenation of multiple " +"compressed streams." +msgstr "" +"Si *mode* est ``'r'``, le fichier d'entrée peut être la concaténation de " +"plusieurs flux compressés." + +#: library/bz2.rst:89 +msgid "" +":class:`BZ2File` provides all of the members specified by the :class:`io." +"BufferedIOBase`, except for :meth:`detach` and :meth:`truncate`. Iteration " +"and the :keyword:`with` statement are supported." +msgstr "" +":class:`BZ2File` fournit tous les membres spécifiés par la classe :class:`io." +"BufferedIOBase`, excepté les méthodes :meth:`detach` et :meth:`truncate`. " +"L'itération et l'instruction :keyword:`with` sont prises en charge." + +#: library/bz2.rst:93 +msgid ":class:`BZ2File` also provides the following method:" +msgstr ":class:`BZ2File` fournit aussi la méthode suivante :" + +#: library/bz2.rst:97 +msgid "" +"Return buffered data without advancing the file position. At least one byte " +"of data will be returned (unless at EOF). The exact number of bytes returned " +"is unspecified." +msgstr "" +"Renvoie des données en mémoire tampon sans avancer la position du fichier. " +"Au moins un octet de donnée (sauf l'EOF) est renvoyé. Le nombre exact " +"d'octets renvoyés n'est pas spécifié." + +#: library/bz2.rst:101 +msgid "" +"While calling :meth:`peek` does not change the file position of the :class:" +"`BZ2File`, it may change the position of the underlying file object (e.g. if " +"the :class:`BZ2File` was constructed by passing a file object for " +"*filename*)." +msgstr "" +"Bien que l'appel à la méthode :meth:`peek` ne change pas la position du " +"fichier de la classe :class:`BZ2File`, il peut changer la position de " +"l'objet fichier sous-jacent (e.g. si la classe :class:`BZ2File` a été " +"construite en passant un objet fichier à *filename*)." + +#: library/bz2.rst:109 +msgid "Support for the :keyword:`with` statement was added." +msgstr "La prise en charge de l'instruction :keyword:`with` a été ajoutée." + +#: library/bz2.rst:112 +msgid "" +"The :meth:`fileno`, :meth:`readable`, :meth:`seekable`, :meth:`writable`, :" +"meth:`read1` and :meth:`readinto` methods were added." +msgstr "" +"Les méthodes :meth:`fileno`, :meth:`readable`, :meth:`seekable`, :meth:" +"`writable`, :meth:`read1` et :meth:`readinto` ont été ajoutées." + +#: library/bz2.rst:116 +msgid "" +"Support was added for *filename* being a :term:`file object` instead of an " +"actual filename." +msgstr "" +"La gestion de *filename* comme :term:`file object` au lieu d'un nom de " +"fichier réel a été ajoutée." + +#: library/bz2.rst:120 +msgid "" +"The ``'a'`` (append) mode was added, along with support for reading multi-" +"stream files." +msgstr "" +"Le mode ``'a'`` (ajout) a été ajouté, avec la prise en charge de la lecture " +"des fichiers *multiflux*." + +#: library/bz2.rst:127 +msgid "" +"The :meth:`~io.BufferedIOBase.read` method now accepts an argument of " +"``None``." +msgstr "" +"La méthode :meth:`~io.BufferedIOBase.read` accepte maintenant un argument " +"``None``." + +#: library/bz2.rst:134 +msgid "" +"The *buffering* parameter has been removed. It was ignored and deprecated " +"since Python 3.0. Pass an open file object to control how the file is opened." +msgstr "" +"Le paramètre *buffering* a été supprimé. Il était ignoré et obsolète depuis " +"Python 3.0. Passez un objet fichier déjà ouvert si vous voulez contrôler la " +"façon dont le fichier est ouvert." + +#: library/bz2.rst:139 +msgid "The *compresslevel* parameter became keyword-only." +msgstr "" +"Le paramètre *compresslevel* est devenu un paramètre exclusivement nommé." + +#: library/bz2.rst:141 +msgid "" +"This class is thread unsafe in the face of multiple simultaneous readers or " +"writers, just like its equivalent classes in :mod:`gzip` and :mod:`lzma` " +"have always been." +msgstr "" +"Cette classe n'est plus protégée d'un accès concurrent malheureux par " +"plusieurs lecteurs ou compresseurs. C'était déjà le cas depuis toujours des " +"classes analogues dans les modules :mod:`gzip` et :mod:`lzma`." + +#: library/bz2.rst:148 +msgid "Incremental (de)compression" +msgstr "(Dé)compression incrémentielle" + +#: library/bz2.rst:152 +msgid "" +"Create a new compressor object. This object may be used to compress data " +"incrementally. For one-shot compression, use the :func:`compress` function " +"instead." +msgstr "" +"Crée un nouvel objet compresseur. Cet objet peut être utilisé pour " +"compresser les données de manière incrémentielle. Pour une compression en " +"une seule fois, utilisez à la place la fonction :func:`compress`." + +#: library/bz2.rst:244 +msgid "" +"*compresslevel*, if given, must be an integer between ``1`` and ``9``. The " +"default is ``9``." +msgstr "" +"*compresslevel*, s'il est fourni, doit être un entier entre ``1`` et ``9``. " +"Sa valeur par défaut est ``9``." + +#: library/bz2.rst:161 +msgid "" +"Provide data to the compressor object. Returns a chunk of compressed data if " +"possible, or an empty byte string otherwise." +msgstr "" +"Fournit la donnée à l'objet compresseur. Renvoie un bloc de données " +"compressées si possible, ou autrement une chaîne d'octet vide." + +#: library/bz2.rst:164 +msgid "" +"When you have finished providing data to the compressor, call the :meth:" +"`flush` method to finish the compression process." +msgstr "" +"Quand vous avez fini de fournir des données au compresseur, appelez la " +"méthode :meth:`flush` pour finir le processus de compression." + +#: library/bz2.rst:170 +msgid "" +"Finish the compression process. Returns the compressed data left in internal " +"buffers." +msgstr "" +"Finit le processus de compression. Renvoie la donnée compressée restante " +"dans les tampons internes." + +#: library/bz2.rst:173 +msgid "" +"The compressor object may not be used after this method has been called." +msgstr "" +"L'objet compresseur ne peut pas être utilisé après que cette méthode a été " +"appelée." + +#: library/bz2.rst:178 +msgid "" +"Create a new decompressor object. This object may be used to decompress data " +"incrementally. For one-shot compression, use the :func:`decompress` function " +"instead." +msgstr "" +"Crée un nouvel objet décompresseur. Cet objet peut être utilisé pour " +"décompresser les données de manière incrémentielle. Pour une compression en " +"une seule fois, utilisez à la place la fonction :func:`decompress`." + +#: library/bz2.rst:183 +msgid "" +"This class does not transparently handle inputs containing multiple " +"compressed streams, unlike :func:`decompress` and :class:`BZ2File`. If you " +"need to decompress a multi-stream input with :class:`BZ2Decompressor`, you " +"must use a new decompressor for each stream." +msgstr "" +"Cette classe ne gère pas de manière transparente les entrées contenant " +"plusieurs flux compressés, à la différence de :func:`decompress` et :class:" +"`BZ2File`. Si vous avez besoin de décompresser une entrée *multiflux* avec " +"la classe :class:`BZ2Decompressor`, vous devez utiliser un nouveau " +"décompresseur pour chaque flux." + +#: library/bz2.rst:190 +msgid "" +"Decompress *data* (a :term:`bytes-like object`), returning uncompressed data " +"as bytes. Some of *data* may be buffered internally, for use in later calls " +"to :meth:`decompress`. The returned data should be concatenated with the " +"output of any previous calls to :meth:`decompress`." +msgstr "" +"Décompresse *data* (un :term:`bytes-like object`), renvoyant une donnée non " +"compressée en tant que chaîne d'octets. Certaines de ces *data* peuvent être " +"mises en interne en tampon, pour un usage lors d'appels ultérieurs par la " +"méthode :meth:`decompress`. La donnée renvoyée doit être concaténée avec la " +"sortie des appels précédents à la méthode :meth:`decompress`." + +#: library/bz2.rst:196 +msgid "" +"If *max_length* is nonnegative, returns at most *max_length* bytes of " +"decompressed data. If this limit is reached and further output can be " +"produced, the :attr:`~.needs_input` attribute will be set to ``False``. In " +"this case, the next call to :meth:`~.decompress` may provide *data* as " +"``b''`` to obtain more of the output." +msgstr "" +"Si *max_length* est positif, renvoie au plus *max_length* octets de données " +"compressées. Si la limite est atteinte et que d'autres sorties peuvent être " +"produites, l'attribut :attr:`~.needs_input` est positionné sur ``False``. " +"Dans ce cas, lors de l'appel suivant à la méthode :meth:`~.decompress`, vous " +"pouvez fournir ``b''`` dans *data* afin d'obtenir la suite de la sortie." + +#: library/bz2.rst:203 +msgid "" +"If all of the input data was decompressed and returned (either because this " +"was less than *max_length* bytes, or because *max_length* was negative), " +"the :attr:`~.needs_input` attribute will be set to ``True``." +msgstr "" +"Si toutes les données entrées ont été décompressées et renvoyées (soit parce " +"qu'il y avait moins de *max_length* octets, ou parce que *max_length* était " +"négatif), l'attribut :attr:`~.needs_input` sera configuré sur ``True``." + +#: library/bz2.rst:208 +#, fuzzy +msgid "" +"Attempting to decompress data after the end of stream is reached raises an :" +"exc:`EOFError`. Any data found after the end of the stream is ignored and " +"saved in the :attr:`~.unused_data` attribute." +msgstr "" +"Essayer de décompresser des données après que la fin du flux soit atteinte " +"lève une erreur ``EOFError``. Toute donnée trouvée après la fin du flux est " +"ignorée et sauvegardée dans l'attribut :attr:`~.unused_data`." + +#: library/bz2.rst:212 +msgid "Added the *max_length* parameter." +msgstr "Ajout du paramètre *max_length*." + +#: library/bz2.rst:217 +msgid "``True`` if the end-of-stream marker has been reached." +msgstr "``True`` si le marqueur de fin de flux a été atteint." + +#: library/bz2.rst:224 +msgid "Data found after the end of the compressed stream." +msgstr "Donnée trouvée après la fin du flux compressé." + +#: library/bz2.rst:226 +msgid "" +"If this attribute is accessed before the end of the stream has been reached, " +"its value will be ``b''``." +msgstr "" +"Si l'attribut est accédé avant que la fin du flux ait été atteint, sa valeur " +"sera ``b''``." + +#: library/bz2.rst:231 +msgid "" +"``False`` if the :meth:`.decompress` method can provide more decompressed " +"data before requiring new uncompressed input." +msgstr "" +"``False`` si la méthode :meth:`.decompress` peut fournir plus de données " +"décompressées avant l'acquisition d'une nouvelle entrée non compressée." + +#: library/bz2.rst:238 +msgid "One-shot (de)compression" +msgstr "(Dé)compression en une fois" + +#: library/bz2.rst:242 +msgid "Compress *data*, a :term:`bytes-like object `." +msgstr "Compresse *data*, un :term:`bytes-like object `." + +#: library/bz2.rst:247 +msgid "For incremental compression, use a :class:`BZ2Compressor` instead." +msgstr "" +"Pour la compression incrémentielle, utilisez à la place la classe :class:" +"`BZ2Compressor`." + +#: library/bz2.rst:252 +msgid "Decompress *data*, a :term:`bytes-like object `." +msgstr "Décompresse *data*, un :term:`bytes-like object `." + +#: library/bz2.rst:254 +msgid "" +"If *data* is the concatenation of multiple compressed streams, decompress " +"all of the streams." +msgstr "" +"Si *data* est la concaténation de multiples flux compressés, décompresse " +"tous les flux." + +#: library/bz2.rst:257 +msgid "For incremental decompression, use a :class:`BZ2Decompressor` instead." +msgstr "" +"Pour une décompression incrémentielle, utilisez à la place la classe :class:" +"`BZ2Decompressor`." + +#: library/bz2.rst:259 +msgid "Support for multi-stream inputs was added." +msgstr "Prise en charge des entrées *multiflux*." + +#: library/bz2.rst:265 +msgid "Examples of usage" +msgstr "Exemples d'utilisation" + +#: library/bz2.rst:267 +msgid "Below are some examples of typical usage of the :mod:`bz2` module." +msgstr "" +"Ci-dessous, nous présentons quelques exemples typiques de l'utilisation du " +"module :mod:`bz2`." + +#: library/bz2.rst:269 +msgid "" +"Using :func:`compress` and :func:`decompress` to demonstrate round-trip " +"compression:" +msgstr "" +"Utilise les fonctions :func:`compress` et :func:`decompress` pour démontrer " +"une compression aller-retour :" + +#: library/bz2.rst:287 +msgid "Using :class:`BZ2Compressor` for incremental compression:" +msgstr "" +"Utilise la classe :class:`BZ2Compressor` pour une compression " +"incrémentielle :" + +#: library/bz2.rst:305 +#, fuzzy +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, " +"repetitive data usually yields a high compression ratio." +msgstr "" +"L'exemple ci-dessus utilise un flux de données vraiment pas aléatoire (un " +"flux de blocs de ``b\"z\"``). Les données aléatoires ont tendance à mal se " +"compresser, alors que les données répétitives ou ordonnées donnent " +"généralement un taux de compression élevé." + +#: library/bz2.rst:309 +msgid "Writing and reading a bzip2-compressed file in binary mode:" +msgstr "" +"Écriture et lecture en mode binaire d'un fichier compressé avec *bzip2* :" + +#~ msgid "" +#~ "All of the classes in this module may safely be accessed from multiple " +#~ "threads." +#~ msgstr "" +#~ "Toutes les classes de ce module peuvent en toute sécurité être accédées " +#~ "depuis de multiples fils d'exécution." + +#~ msgid "" +#~ "The *buffering* argument is ignored. Its use is deprecated since Python " +#~ "3.0." +#~ msgstr "" +#~ "L'argument *buffering* est ignoré. Son usage est obsolète depuis Python " +#~ "3.0." diff --git a/library/calendar.po b/library/calendar.po new file mode 100644 index 0000000000..2ff0b97a6e --- /dev/null +++ b/library/calendar.po @@ -0,0 +1,619 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-03-18 17:06+0100\n" +"PO-Revision-Date: 2022-10-18 15:58+0200\n" +"Last-Translator: Loc Cosnier \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" +"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" +msgstr ":mod:`calendar` — Fonctions calendaires générales" + +#: library/calendar.rst:10 +msgid "**Source code:** :source:`Lib/calendar.py`" +msgstr "**Code source :** :source:`Lib/calendar.py`" + +#: library/calendar.rst:14 +msgid "" +"This module allows you to output calendars like the Unix :program:`cal` " +"program, and provides additional useful functions related to the calendar. " +"By default, these calendars have Monday as the first day of the week, and " +"Sunday as the last (the European convention). Use :func:`setfirstweekday` to " +"set the first day of the week to Sunday (6) or to any other weekday. " +"Parameters that specify dates are given as integers. For related " +"functionality, see also the :mod:`datetime` and :mod:`time` modules." +msgstr "" +"Ce module permet d'afficher un calendrier comme le fait le programme Unix :" +"program:`cal`, et il fournit des fonctions utiles relatives au calendrier. " +"Par défaut, ces calendriers ont le lundi comme premier jour de la semaine et " +"le dimanche comme dernier jour. Utilisez :func:`setfirstweekday` pour " +"définir le premier jour de la semaine à dimanche (6) ou à tout autre jour de " +"la semaine. Les paramètres pour spécifier les dates sont donnés sous forme " +"de nombres entiers. Voir aussi les modules :mod:`datetime` et :mod:`time`." + +#: library/calendar.rst:22 +msgid "" +"The functions and classes defined in this module use an idealized calendar, " +"the current Gregorian calendar extended indefinitely in both directions. " +"This matches the definition of the \"proleptic Gregorian\" calendar in " +"Dershowitz and Reingold's book \"Calendrical Calculations\", where it's the " +"base calendar for all computations. Zero and negative years are interpreted " +"as prescribed by the ISO 8601 standard. Year 0 is 1 BC, year -1 is 2 BC, " +"and so on." +msgstr "" +"Les fonctions et les classes définies dans ce module utilisent un calendrier " +"idéalisé, le calendrier grégorien actuel s'étendant indéfiniment dans les " +"deux sens. Cela correspond à la définition du calendrier grégorien " +"proleptique dans le livre de Dershowitz et Reingold « *Calendrical " +"Calculations* », œuvre dans lequel il est le calendrier de référence de tous " +"les calculs. Les années zéros et les années négatives sont interprétées " +"comme prescrit par la norme ISO 8601. L'année 0 est 1 avant JC, l'année " +"``-1`` est 2 avant JC et ainsi de suite." + +#: library/calendar.rst:33 +#, fuzzy +msgid "" +"Creates a :class:`Calendar` object. *firstweekday* is an integer specifying " +"the first day of the week. :const:`MONDAY` is ``0`` (the default), :const:" +"`SUNDAY` is ``6``." +msgstr "" +"Crée un objet :class:`Calendar`. *firstweekday* est un entier spécifiant le " +"premier jour de la semaine, valant par défaut ``0`` (lundi), pouvant aller " +"jusqu'à ``6`` (dimanche)." + +#: library/calendar.rst:36 +msgid "" +"A :class:`Calendar` object provides several methods that can be used for " +"preparing the calendar data for formatting. This class doesn't do any " +"formatting itself. This is the job of subclasses." +msgstr "" +"L'objet :class:`Calendar` fournit plusieurs méthodes pouvant être utilisées " +"pour préparer les données du calendrier pour le formatage. Cette classe ne " +"fait pas de formatage elle-même. Il s'agit du travail des sous-classes." + +#: library/calendar.rst:41 +msgid ":class:`Calendar` instances have the following methods:" +msgstr "Les instances de :class:`Calendar` ont les méthodes suivantes :" + +#: library/calendar.rst:45 +msgid "" +"Return an iterator for the week day numbers that will be used for one week. " +"The first value from the iterator will be the same as the value of the :attr:" +"`firstweekday` property." +msgstr "" +"Renvoie un itérateur sur les numéros des jours d'une semaine. La première " +"valeur est donc la même que la valeur de la propriété :attr:`firstweekday`." + +#: library/calendar.rst:52 +msgid "" +"Return an iterator for the month *month* (1--12) in the year *year*. This " +"iterator will return all days (as :class:`datetime.date` objects) for the " +"month and all days before the start of the month or after the end of the " +"month that are required to get a complete week." +msgstr "" +"Renvoie un itérateur sur les jours du mois *month* (1 à 12) de l'année " +"*year*. Cet itérateur renvoie tous les jours du mois (sous forme d'instances " +"de :class:`datetime.date`) ainsi que tous les jours avant le début du mois " +"et après la fin du mois nécessaires pour obtenir des semaines complètes." + +#: library/calendar.rst:60 +msgid "" +"Return an iterator for the month *month* in the year *year* similar to :meth:" +"`itermonthdates`, but not restricted by the :class:`datetime.date` range. " +"Days returned will simply be day of the month numbers. For the days outside " +"of the specified month, the day number is ``0``." +msgstr "" +"Renvoie un itérateur sur les jours du mois *month* de l'année *year*, comme :" +"meth:`itermonthdates`, sans être limité par l'intervalle de :class:`datetime." +"date`. Les jours renvoyés sont simplement les numéros des jours du mois. " +"Pour les jours en dehors du mois spécifié, le numéro du jour est ``0``." + +#: library/calendar.rst:68 +msgid "" +"Return an iterator for the month *month* in the year *year* similar to :meth:" +"`itermonthdates`, but not restricted by the :class:`datetime.date` range. " +"Days returned will be tuples consisting of a day of the month number and a " +"week day number." +msgstr "" +"Renvoie un itérateur sur les jours du mois *month* de l'année *year* comme :" +"meth:`itermonthdates`, sans être limité par la plage :class:`datetime.date`. " +"Les jours renvoyés sont des paires composées du numéro du jour dans le mois " +"et du numéro du jour dans la semaine." + +#: library/calendar.rst:76 +msgid "" +"Return an iterator for the month *month* in the year *year* similar to :meth:" +"`itermonthdates`, but not restricted by the :class:`datetime.date` range. " +"Days returned will be tuples consisting of a year, a month and a day of the " +"month numbers." +msgstr "" +"Renvoie un itérateur sur les jours du *month* de l'année *year*, comme :meth:" +"`itermonthdates`, sans être limité par l'intervalle de :class:`datetime." +"date`. Les jours sont renvoyés sous forme de triplets composés du numéro de " +"l'année, du mois et du jour dans le mois." + +#: library/calendar.rst:86 +msgid "" +"Return an iterator for the month *month* in the year *year* similar to :meth:" +"`itermonthdates`, but not restricted by the :class:`datetime.date` range. " +"Days returned will be tuples consisting of a year, a month, a day of the " +"month, and a day of the week numbers." +msgstr "" +"Renvoie un itérateur sur les jours du mois *month* de l'année *year*, comme :" +"meth:`itermonthdates`, sans être limité par l'intervalle de :class:`datetime." +"date`. Le jours sont renvoyés sous forme de quadruplets contenant le numéro " +"de l'année, du mois, du jour du mois et du jour de la semaine." + +#: library/calendar.rst:96 +msgid "" +"Return a list of the weeks in the month *month* of the *year* as full " +"weeks. Weeks are lists of seven :class:`datetime.date` objects." +msgstr "" +"Renvoie la liste des semaines complètes du mois *month* de l'année *year*. " +"Les semaines sont des listes de sept objets :class:`datetime.date`." + +#: library/calendar.rst:102 +msgid "" +"Return a list of the weeks in the month *month* of the *year* as full " +"weeks. Weeks are lists of seven tuples of day numbers and weekday numbers." +msgstr "" +"Renvoie la liste des semaines complètes du mois *month* de l'année *year*. " +"Les semaines sont des listes de sept paires contenant le numéro du jour dans " +"le mois et du numéro du jour dans la semaine." + +#: library/calendar.rst:109 +msgid "" +"Return a list of the weeks in the month *month* of the *year* as full " +"weeks. Weeks are lists of seven day numbers." +msgstr "" +"Renvoie la liste des semaines complètes du mois *month* de l'année *year*. " +"Les semaines sont une liste de sept numéros de jours." + +#: library/calendar.rst:115 +msgid "" +"Return the data for the specified year ready for formatting. The return " +"value is a list of month rows. Each month row contains up to *width* months " +"(defaulting to 3). Each month contains between 4 and 6 weeks and each week " +"contains 1--7 days. Days are :class:`datetime.date` objects." +msgstr "" +"Renvoie ce qu'il faut pour afficher correctement une année. La valeur " +"renvoyée est une liste de lignes de mois. Chaque ligne mensuelle contient " +"jusqu'à *width* mois (avec une valeur par défaut à 3). Chaque mois contient " +"de 4 à 6 semaines et chaque semaine 1 à 7 jours. Les jours sont des objets :" +"class:`datetime.date`." + +#: library/calendar.rst:123 +msgid "" +"Return the data for the specified year ready for formatting (similar to :" +"meth:`yeardatescalendar`). Entries in the week lists are tuples of day " +"numbers and weekday numbers. Day numbers outside this month are zero." +msgstr "" +"Renvoie ce qu'il faut pour afficher correctement une année, (similaire à :" +"meth:`yeardatescalendar`). Les listes des semaines contiennent des paires " +"contenant le numéro du jour du mois et le numéro du jour de la semaine. Les " +"numéro des jours en dehors de ce mois sont à zéro." + +#: library/calendar.rst:130 +msgid "" +"Return the data for the specified year ready for formatting (similar to :" +"meth:`yeardatescalendar`). Entries in the week lists are day numbers. Day " +"numbers outside this month are zero." +msgstr "" +"Renvoie ce qu'il faut pour afficher correctement une année, (similaire à :" +"meth:`yeardatescalendar`). Les listes de semaines contiennent des numéros de " +"jours. Les numéros de jours en dehors de ce mois sont de zéro." + +#: library/calendar.rst:137 +msgid "This class can be used to generate plain text calendars." +msgstr "" +"Cette classe peut être utilisée pour générer des calendriers en texte brut." + +#: library/calendar.rst:139 +msgid ":class:`TextCalendar` instances have the following methods:" +msgstr "Les instances :class:`TextCalendar` exposent les méthodes suivantes :" + +#: library/calendar.rst:143 +msgid "" +"Return a month's calendar in a multi-line string. If *w* is provided, it " +"specifies the width of the date columns, which are centered. If *l* is " +"given, it specifies the number of lines that each week will use. Depends on " +"the first weekday as specified in the constructor or set by the :meth:" +"`setfirstweekday` method." +msgstr "" +"Donne le calendrier d'un mois dans une chaîne multi-ligne. Si *w* est " +"fourni, il spécifie la largeur des colonnes de date, qui sont centrées. Si " +"*l* est donné, il spécifie le nombre de lignes que chaque semaine utilisera. " +"Le résultat varie en fonction du premier jour de la semaine spécifié dans le " +"constructeur ou défini par la méthode :meth:`setfirstweekday`." + +#: library/calendar.rst:152 +msgid "Print a month's calendar as returned by :meth:`formatmonth`." +msgstr "" +"Affiche le calendrier d'un mois tel que renvoyé par :meth:`formatmonth`." + +#: library/calendar.rst:157 +msgid "" +"Return a *m*-column calendar for an entire year as a multi-line string. " +"Optional parameters *w*, *l*, and *c* are for date column width, lines per " +"week, and number of spaces between month columns, respectively. Depends on " +"the first weekday as specified in the constructor or set by the :meth:" +"`setfirstweekday` method. The earliest year for which a calendar can be " +"generated is platform-dependent." +msgstr "" +"Renvoie un calendrier de *m* colonnes pour une année entière sous forme de " +"chaîne multi-ligne. Les paramètres facultatifs *w*, *l* et *c* correspondent " +"respectivement à la largeur de la colonne date, les lignes par semaines, le " +"nombre d'espace entre les colonnes de mois. Le résultat varie en fonction du " +"premier jour de la semaine spécifié dans le constructeur ou défini par la " +"méthode :meth:`setfirstweekday`. La première année pour laquelle un " +"calendrier peut être généré, dépend de la plateforme." + +#: library/calendar.rst:167 +msgid "" +"Print the calendar for an entire year as returned by :meth:`formatyear`." +msgstr "" +"Affiche le calendrier pour une année entière comme renvoyé par :meth:" +"`formatyear`." + +#: library/calendar.rst:172 +msgid "This class can be used to generate HTML calendars." +msgstr "Cette classe peut être utilisée pour générer des calendriers HTML." + +#: library/calendar.rst:175 +msgid ":class:`!HTMLCalendar` instances have the following methods:" +msgstr "" +"Les instances de :class:`!HTMLCalendar` utilisent les méthodes suivantes :" + +#: library/calendar.rst:179 +msgid "" +"Return a month's calendar as an HTML table. If *withyear* is true the year " +"will be included in the header, otherwise just the month name will be used." +msgstr "" +"Renvoie le calendrier d'un mois sous la forme d'une table HTML. Si " +"*withyear* est vrai l'année sera inclue dans l'en-tête, sinon seul le nom du " +"mois sera utilisé." + +#: library/calendar.rst:186 +msgid "" +"Return a year's calendar as an HTML table. *width* (defaulting to 3) " +"specifies the number of months per row." +msgstr "" +"Renvoie le calendrier d'une année sous la forme d'une table HTML. *width* " +"(par défaut à 3) spécifie le nombre de mois par ligne." + +#: library/calendar.rst:192 +msgid "" +"Return a year's calendar as a complete HTML page. *width* (defaulting to 3) " +"specifies the number of months per row. *css* is the name for the cascading " +"style sheet to be used. :const:`None` can be passed if no style sheet should " +"be used. *encoding* specifies the encoding to be used for the output " +"(defaulting to the system default encoding)." +msgstr "" +"Renvoie le calendrier d'une année sous la forme d'une page HTML complète. " +"*width* (par défaut à 3) spécifie le nombre de mois par ligne. *css* est le " +"nom de la feuille de style en cascade à utiliser. :const:`None` peut être " +"passé si aucune feuille de style ne doit être utilisée. *encoding* spécifie " +"l'encodage à utiliser pour les données de sortie (par défaut l'encodage par " +"défaut du système)." + +#: library/calendar.rst:199 +msgid "" +":class:`!HTMLCalendar` has the following attributes you can override to " +"customize the CSS classes used by the calendar:" +msgstr "" +":class:`!HTMLCalendar` possède les attributs suivants que vous pouvez " +"surcharger pour personnaliser les classes CSS utilisées par le calendrier :" + +#: library/calendar.rst:204 +msgid "" +"A list of CSS classes used for each weekday. The default class list is::" +msgstr "" +"Une liste de classes CSS utilisées pour chaque jour de la semaine. La liste " +"par défaut de la classe est ::" + +#: library/calendar.rst:208 +msgid "more styles can be added for each day::" +msgstr "davantage de styles peuvent être ajoutés pour chaque jour ::" + +#: library/calendar.rst:212 +msgid "Note that the length of this list must be seven items." +msgstr "Notez que la longueur de cette liste doit être de sept éléments." + +#: library/calendar.rst:217 +msgid "The CSS class for a weekday occurring in the previous or coming month." +msgstr "" +"La classe CSS pour le jour de la semaine apparaissant dans le mois précédent " +"ou à venir." + +#: library/calendar.rst:224 +msgid "" +"A list of CSS classes used for weekday names in the header row. The default " +"is the same as :attr:`cssclasses`." +msgstr "" +"Une liste de classes CSS utilisées pour les noms des jours de la semaine " +"dans la ligne d'en-tête. Par défaut les mêmes que :attr:`cssclasses`." + +#: library/calendar.rst:232 +msgid "" +"The month's head CSS class (used by :meth:`formatmonthname`). The default " +"value is ``\"month\"``." +msgstr "" +"La classe CSS du mois en en-tête (utilisé par :meth:`formatmonthname`). La " +"valeur par défaut est ``\"month\"``." + +#: library/calendar.rst:240 +msgid "" +"The CSS class for the whole month's table (used by :meth:`formatmonth`). The " +"default value is ``\"month\"``." +msgstr "" +"La classe CSS pour la table du mois entière (utilisé par :meth:" +"`formatmonth`). La valeur par défaut est ``\"month\"``." + +#: library/calendar.rst:248 +msgid "" +"The CSS class for the whole year's table of tables (used by :meth:" +"`formatyear`). The default value is ``\"year\"``." +msgstr "" +"La classe CSS pour la table entière des tables de l'année (utilisé par :meth:" +"`formatyear`). La valeur par défaut est ``\"year\"``." + +#: library/calendar.rst:256 +msgid "" +"The CSS class for the table head for the whole year (used by :meth:" +"`formatyear`). The default value is ``\"year\"``." +msgstr "" +"La classe CSS pour l'en-tête de la table pour l'année entière (utilisé par :" +"meth:`formatyear`). La valeur par défaut est ``\"year\"``." + +#: library/calendar.rst:262 +msgid "" +"Note that although the naming for the above described class attributes is " +"singular (e.g. ``cssclass_month`` ``cssclass_noday``), one can replace the " +"single CSS class with a space separated list of CSS classes, for example::" +msgstr "" +"Notez que même si le nommage ci-dessus des attributs de classe est au " +"singulier (p. ex. ``cssclass_month`` ``cssclass_noday``), on peut remplacer " +"la seule classe CSS par une liste de classes CSS séparées par une espace, " +"par exemple ::" + +#: library/calendar.rst:268 +msgid "Here is an example how :class:`!HTMLCalendar` can be customized::" +msgstr "" +"Voici un exemple de comment peut être personnalisée :class:`!HTMLCalendar` ::" + +#: library/calendar.rst:280 +msgid "" +"This subclass of :class:`TextCalendar` can be passed a locale name in the " +"constructor and will return month and weekday names in the specified locale. " +"If this locale includes an encoding all strings containing month and weekday " +"names will be returned as unicode." +msgstr "" +"Le constructeur de cette sous-classe de :class:`TextCalendar` accepte un " +"paramètre régional *locale* : une langue au format ``\"fr_FR.UTF-8\"``, et " +"renvoie les noms de mois et de jours de la semaine traduits dans cette " +"langue. Si ce lieu possède un encodage, toutes les chaînes contenant des " +"noms de mois ou de jours de la semaine seront renvoyées en Unicode." + +#: library/calendar.rst:288 +msgid "" +"This subclass of :class:`HTMLCalendar` can be passed a locale name in the " +"constructor and will return month and weekday names in the specified locale. " +"If this locale includes an encoding all strings containing month and weekday " +"names will be returned as unicode." +msgstr "" +"Cette sous-classe de :class:`HTMLCalendar` peut recevoir un nom de lieu dans " +"le constructeur et renvoie les noms de mois et de jours de la semaine selon " +"le lieu spécifié. Si ce lieu possède un encodage, toutes les chaînes " +"contenant des noms de mois ou de jours de la semaine seront renvoyées en " +"Unicode." + +#: library/calendar.rst:295 +msgid "" +"The :meth:`formatweekday` and :meth:`formatmonthname` methods of these two " +"classes temporarily change the current locale to the given *locale*. " +"Because the current locale is a process-wide setting, they are not thread-" +"safe." +msgstr "" +"Les méthodes :meth:`formatweekday` et :meth:`formatmonthname` de ces deux " +"classes changent temporairement le paramètre régional courant pour le " +"paramètre donné via *locale* . Comme le paramètre régional est un réglage de " +"l'ensemble du processus, elles ne sont pas utilisables de manière sûre avec " +"les programmes à fils d'exécution multiples." + +#: library/calendar.rst:300 +msgid "For simple text calendars this module provides the following functions." +msgstr "" +"Pour les calendriers texte simples ce module fournit les fonctions suivantes." + +#: library/calendar.rst:304 +msgid "" +"Sets the weekday (``0`` is Monday, ``6`` is Sunday) to start each week. The " +"values :const:`MONDAY`, :const:`TUESDAY`, :const:`WEDNESDAY`, :const:" +"`THURSDAY`, :const:`FRIDAY`, :const:`SATURDAY`, and :const:`SUNDAY` are " +"provided for convenience. For example, to set the first weekday to Sunday::" +msgstr "" +"Fixe le jour de la semaine (``0`` pour lundi, ``6`` pour dimanche) qui " +"débute chaque semaine. Les valeurs :const:`MONDAY`, :const:`TUESDAY`, :const:" +"`WEDNESDAY`, :const:`THURSDAY`, :const:`FRIDAY`, :const:`SATURDAY`, et :" +"const:`SUNDAY` sont fournies par commodité. Par exemple, pour fixer le " +"premier jour de la semaine à dimanche ::" + +#: library/calendar.rst:315 +msgid "Returns the current setting for the weekday to start each week." +msgstr "" +"Renvoie le réglage courant pour le jour de la semaine débutant chaque " +"semaine." + +#: library/calendar.rst:320 +msgid "" +"Returns :const:`True` if *year* is a leap year, otherwise :const:`False`." +msgstr "" +"Renvoie :const:`True` si *year* est une année bissextile, sinon :const:" +"`False`." + +#: library/calendar.rst:325 +msgid "" +"Returns the number of leap years in the range from *y1* to *y2* (exclusive), " +"where *y1* and *y2* are years." +msgstr "" +"Renvoie le nombre d'années bissextiles dans la période de *y1* à *y2* (non " +"inclus), où *y1* et *y2* sont des années." + +#: library/calendar.rst:328 +msgid "This function works for ranges spanning a century change." +msgstr "" +"Cette fonction marche pour les périodes couvrant un changement de siècle." + +#: library/calendar.rst:333 +msgid "" +"Returns the day of the week (``0`` is Monday) for *year* (``1970``--...), " +"*month* (``1``--``12``), *day* (``1``--``31``)." +msgstr "" +"Renvoie le jour de la semaine (``0`` pour lundi) pour *year* (``1970``-- …), " +"*month* (``1``--``12``), *day* (``1``--``31``)." + +#: library/calendar.rst:339 +msgid "" +"Return a header containing abbreviated weekday names. *n* specifies the " +"width in characters for one weekday." +msgstr "" +"Renvoie un en-tête contenant les jours de la semaine en abrégé. *n* spécifie " +"la largeur en caractères pour un jour de la semaine." + +#: library/calendar.rst:345 +msgid "" +"Returns weekday of first day of the month and number of days in month, for " +"the specified *year* and *month*." +msgstr "" +"Renvoie le jour de la semaine correspondant au premier jour du mois et le " +"nombre de jours dans le mois, pour l'année *year* et le mois *month* " +"spécifiés." + +#: library/calendar.rst:351 +msgid "" +"Returns a matrix representing a month's calendar. Each row represents a " +"week; days outside of the month are represented by zeros. Each week begins " +"with Monday unless set by :func:`setfirstweekday`." +msgstr "" +"Renvoie une matrice représentant le calendrier d'un mois. Chaque ligne " +"représente une semaine ; les jours en dehors du mois sont représentés par " +"des zéros. Chaque semaine débute avec le lundi à moins de l'avoir modifié " +"avec :func:`setfirstweekday`." + +#: library/calendar.rst:358 +msgid "Prints a month's calendar as returned by :func:`month`." +msgstr "Affiche le calendrier d'un mois tel que renvoyé par :func:`month`." + +#: library/calendar.rst:363 +msgid "" +"Returns a month's calendar in a multi-line string using the :meth:" +"`formatmonth` of the :class:`TextCalendar` class." +msgstr "" +"Renvoie le calendrier d'un mois dans une chaîne multi-lignes en utilisant la " +"méthode :meth:`formatmonth` de la classe :class:`TextCalendar`." + +#: library/calendar.rst:369 +msgid "" +"Prints the calendar for an entire year as returned by :func:`calendar`." +msgstr "" +"Affiche le calendrier pour une année entière tel que renvoyé par :func:" +"`calendar`." + +#: library/calendar.rst:374 +msgid "" +"Returns a 3-column calendar for an entire year as a multi-line string using " +"the :meth:`formatyear` of the :class:`TextCalendar` class." +msgstr "" +"Renvoie un calendrier sur 3 colonnes pour une année entière dans une chaîne " +"multi-lignes en utilisant la méthode :meth:`formatyear` de la classe :class:" +"`TextCalendar`." + +#: library/calendar.rst:380 +msgid "" +"An unrelated but handy function that takes a time tuple such as returned by " +"the :func:`~time.gmtime` function in the :mod:`time` module, and returns the " +"corresponding Unix timestamp value, assuming an epoch of 1970, and the POSIX " +"encoding. In fact, :func:`time.gmtime` and :func:`timegm` are each others' " +"inverse." +msgstr "" +"Une fonction sans rapport mais pratique, qui prend un *n*-uplet temporel tel " +"que celui renvoyé par la fonction :func:`~time.gmtime` dans le module :mod:" +"`time`, et renvoie la valeur d'horodatage Unix (*timestamp* en anglais) " +"correspondante, en supposant une époque de 1970, et l'encodage POSIX. En " +"fait, :func:`time.gmtime` et :func:`timegm` sont l'inverse l'un de l'autre." + +#: library/calendar.rst:387 +msgid "The :mod:`calendar` module exports the following data attributes:" +msgstr "Le module :mod:`calendar` exporte les attributs suivants :" + +#: library/calendar.rst:391 +msgid "An array that represents the days of the week in the current locale." +msgstr "" +"Un tableau qui représente les jours de la semaine pour les paramètres " +"régionaux actifs." + +#: library/calendar.rst:396 +msgid "" +"An array that represents the abbreviated days of the week in the current " +"locale." +msgstr "" +"Un tableau qui représente les jours de la semaine en abrégé pour les " +"paramètres régionaux actifs." + +#: library/calendar.rst:401 +msgid "" +"An array that represents the months of the year in the current locale. This " +"follows normal convention of January being month number 1, so it has a " +"length of 13 and ``month_name[0]`` is the empty string." +msgstr "" +"Un tableau qui représente les mois de l'année pour les paramètres régionaux " +"actifs. Ceux-ci respectent la convention usuelle où janvier est le mois " +"numéro 1, donc il a une longueur de 13 et ``month_name[0]`` est la chaîne " +"vide." + +#: library/calendar.rst:408 +msgid "" +"An array that represents the abbreviated months of the year in the current " +"locale. This follows normal convention of January being month number 1, so " +"it has a length of 13 and ``month_abbr[0]`` is the empty string." +msgstr "" +"Un tableau qui représente les mois de l'année en abrégé pour les paramètres " +"régionaux actifs. Celui-ci respectent la convention usuelle où janvier est " +"le mois numéro 1, donc il a une longueur de 13 et ``month_name[0]`` est la " +"chaîne vide." + +#: library/calendar.rst:420 +msgid "" +"Aliases for day numbers, where ``MONDAY`` is ``0`` and ``SUNDAY`` is ``6``." +msgstr "" + +#: library/calendar.rst:426 +msgid "Module :mod:`datetime`" +msgstr "Module :mod:`datetime`" + +#: library/calendar.rst:425 +msgid "" +"Object-oriented interface to dates and times with similar functionality to " +"the :mod:`time` module." +msgstr "" +"Interface orientée objet pour les dates et les heures avec des " +"fonctionnalités similaires au module :mod:`time`." + +#: library/calendar.rst:428 +msgid "Module :mod:`time`" +msgstr "Module :mod:`time`" + +#: library/calendar.rst:429 +msgid "Low-level time related functions." +msgstr "Fonctions bas niveau relatives au temps." diff --git a/library/cgi.po b/library/cgi.po new file mode 100644 index 0000000000..4e2c797b9f --- /dev/null +++ b/library/cgi.po @@ -0,0 +1,641 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-05-21 16:37+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \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" + +#: library/cgi.rst:2 +msgid ":mod:`cgi` --- Common Gateway Interface support" +msgstr "" + +#: library/cgi.rst:8 +msgid "**Source code:** :source:`Lib/cgi.py`" +msgstr "**Code source :** :source:`Lib/cgi.py`" + +#: 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:26 +msgid "" +"This module defines a number of utilities for use by CGI scripts written in " +"Python." +msgstr "" + +#: library/cgi.rst:31 +msgid "Introduction" +msgstr "Introduction" + +#: 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: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 " +"(such as the client's hostname, the requested URL, the query string, and " +"lots of other goodies) in the script's shell environment, executes the " +"script, and sends the script's output back to the client." +msgstr "" + +#: 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 " +"\"query string\" part of the URL. This module is intended to take care of " +"the different cases and provide a simpler interface to the Python script. " +"It also provides a number of utilities that help in debugging scripts, and " +"the latest addition is support for file uploads from a form (if your browser " +"supports it)." +msgstr "" + +#: 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 " +"client what kind of data is following. Python code to generate a minimal " +"header section looks like this::" +msgstr "" + +#: 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:71 +msgid "Using the cgi module" +msgstr "" + +#: library/cgi.rst:73 +msgid "Begin by writing ``import cgi``." +msgstr "" + +#: library/cgi.rst:75 +msgid "When you write a new script, consider adding these lines::" +msgstr "" + +#: 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 " +"the guts of your program to users of your script, you can have the reports " +"saved to files instead, with code like this::" +msgstr "" + +#: 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 " +"in tracking down bugs. You can always remove the ``cgitb`` line later when " +"you have tested your script and are confident that it works correctly." +msgstr "" + +#: 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 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:102 +msgid "" +"The :class:`FieldStorage` instance can be indexed like a Python dictionary. " +"It allows membership testing with the :keyword:`in` operator, and also " +"supports the standard dictionary method :meth:`~dict.keys` and the built-in " +"function :func:`len`. Form fields containing empty strings are ignored and " +"do not appear in the dictionary; to keep such values, provide a true value " +"for the optional *keep_blank_values* keyword parameter when creating the :" +"class:`FieldStorage` instance." +msgstr "" + +#: 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:124 +msgid "" +"Here the fields, accessed through ``form[key]``, are themselves instances " +"of :class:`FieldStorage` (or :class:`MiniFieldStorage`, depending on the " +"form encoding). The :attr:`~FieldStorage.value` attribute of the instance " +"yields the string value of the field. The :meth:`~FieldStorage.getvalue` " +"method returns this string value directly; it also accepts an optional " +"second argument as a default to return if the requested key is not present." +msgstr "" + +#: 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 :" +"class:`MiniFieldStorage` instance but a list of such instances. Similarly, " +"in this situation, ``form.getvalue(key)`` would return a list of strings. If " +"you expect this possibility (when your HTML form contains multiple fields " +"with the same name), use the :meth:`~FieldStorage.getlist` method, which " +"always returns a list of values (so that you do not need to special-case the " +"single item case). For example, this code concatenates any number of " +"username fields, separated by commas::" +msgstr "" + +#: 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 " +"reads the entire file in memory as bytes. This may not be what you want. " +"You can test for an uploaded file by testing either the :attr:`~FieldStorage." +"filename` attribute or the :attr:`~FieldStorage.file` attribute. You can " +"then read the data from the :attr:`!file` attribute before it is " +"automatically closed as part of the garbage collection of the :class:" +"`FieldStorage` instance (the :func:`~io.RawIOBase.read` and :func:`~io." +"IOBase.readline` methods will return bytes)::" +msgstr "" + +#: 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: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 " +"Back or Cancel button) the :attr:`~FieldStorage.done` attribute of the " +"object for the field will be set to the value -1." +msgstr "" + +#: 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/\\*` " +"encoding). When this occurs, the item will be a dictionary-like :class:" +"`FieldStorage` item. This can be determined by testing its :attr:`!type` " +"attribute, which should be :mimetype:`multipart/form-data` (or perhaps " +"another MIME type matching :mimetype:`multipart/\\*`). In this case, it can " +"be iterated over recursively just like the top-level form object." +msgstr "" + +#: 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 " +"items will actually be instances of the class :class:`MiniFieldStorage`. In " +"this case, the :attr:`!list`, :attr:`!file`, and :attr:`filename` attributes " +"are always ``None``." +msgstr "" + +#: 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:188 +msgid "" +"The :attr:`~FieldStorage.file` attribute is automatically closed upon the " +"garbage collection of the creating :class:`FieldStorage` instance." +msgstr "" + +#: library/cgi.rst:192 +msgid "" +"Added support for the context management protocol to the :class:" +"`FieldStorage` class." +msgstr "" + +#: library/cgi.rst:198 +msgid "Higher Level Interface" +msgstr "" + +#: 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 " +"was added to this class to allow one to do it in a more readable and " +"intuitive way. The interface doesn't make the techniques described in " +"previous sections obsolete --- they are still useful to process file uploads " +"efficiently, for example." +msgstr "" + +#: 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: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: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: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: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 " +"another ``user=foo`` pair to the query string, then the script would crash, " +"because in this situation the ``getvalue(\"user\")`` method call returns a " +"list instead of a string. Calling the :meth:`~str.upper` method on a list " +"is not valid (since lists do not have a method of this name) and results in " +"an :exc:`AttributeError` exception." +msgstr "" + +#: 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: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: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 " +"under such name. Please note that the order in which the values are " +"received may vary from browser to browser and should not be counted on. " +"[#]_ If no such form field or value exists then the method returns the " +"value specified by the optional parameter *default*. This parameter " +"defaults to ``None`` if not specified." +msgstr "" + +#: 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 " +"exists for *name*. It returns a list consisting of one item if only one " +"such value exists." +msgstr "" + +#: library/cgi.rst:267 +msgid "Using these methods you can write nice compact code::" +msgstr "" + +#: library/cgi.rst:279 +msgid "Functions" +msgstr "Fonctions" + +#: 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: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: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 " +"other parameters in the :mailheader:`Content-Type` header, and *encoding*, " +"the request encoding." +msgstr "" + +#: 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: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: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:311 +msgid "Added the *separator* parameter." +msgstr "" + +#: 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:323 +msgid "" +"Robust test CGI script, usable as main program. Writes minimal HTTP headers " +"and formats all information provided to the script in HTML format." +msgstr "" + +#: library/cgi.rst:329 +msgid "Format the shell environment in HTML." +msgstr "" + +#: library/cgi.rst:334 +msgid "Format a form in HTML." +msgstr "" + +#: library/cgi.rst:339 +msgid "Format the current directory in HTML." +msgstr "" + +#: library/cgi.rst:344 +msgid "Print a list of useful (used by CGI) environment variables in HTML." +msgstr "" + +#: library/cgi.rst:350 +msgid "Caring about security" +msgstr "" + +#: library/cgi.rst:354 +msgid "" +"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: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:368 +msgid "Installing your CGI script on a Unix system" +msgstr "" + +#: 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: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``). " +"Make sure that the first line of the script contains ``#!`` starting in " +"column 1 followed by the pathname of the Python interpreter, for instance::" +msgstr "" + +#: library/cgi.rst:381 +msgid "" +"Make sure the Python interpreter exists and is executable by \"others\"." +msgstr "" + +#: 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 " +"readable and ``0o666`` for writable. This is because, for security reasons, " +"the HTTP server executes your script as user \"nobody\", without any special " +"privileges. It can only read (write, execute) files that everybody can read " +"(write, execute). The current directory at execution time is also different " +"(it is usually the server's cgi-bin directory) and the set of environment " +"variables is also different from what you get when you log in. In " +"particular, don't count on the shell's search path for executables (:envvar:" +"`PATH`) or the Python module search path (:envvar:`PYTHONPATH`) to be set to " +"anything interesting." +msgstr "" + +#: 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:402 +msgid "(This way, the directory inserted last will be searched first!)" +msgstr "" + +#: 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:409 +msgid "Testing your CGI script" +msgstr "" + +#: 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 " +"fail mysteriously when run from the server. There's one reason why you " +"should still test your script from the command line: if it contains a syntax " +"error, the Python interpreter won't execute it at all, and the HTTP server " +"will most likely send a cryptic error to the client." +msgstr "" + +#: 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:423 +msgid "Debugging CGI scripts" +msgstr "" + +#: 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 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: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 " +"another error, there's an installation problem that you should fix before " +"trying to go any further. If you get a nicely formatted listing of the " +"environment and form content (in this example, the fields should be listed " +"as \"addr\" with value \"At Home\" and \"name\" with value \"Joe Blow\"), " +"the :file:`cgi.py` script has been installed correctly. If you follow the " +"same procedure for your own script, you should now be able to debug it." +msgstr "" + +#: 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:454 +msgid "" +"This should produce the same results as those gotten from installing the :" +"file:`cgi.py` file itself." +msgstr "" + +#: 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 " +"Python interpreter prints a nice traceback and exits. While the Python " +"interpreter will still do this when your CGI script raises an exception, " +"most likely the traceback will end up in one of the HTTP server's log files, " +"or be discarded altogether." +msgstr "" + +#: 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: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: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: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 " +"processing. If your script works, the raw HTML will be displayed by your " +"client. If it raises an exception, most likely after the first two lines " +"have been printed, a traceback will be displayed. Because no HTML " +"interpretation is going on, the traceback will be readable." +msgstr "" + +#: library/cgi.rst:493 +msgid "Common problems and solutions" +msgstr "" + +#: 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:499 +msgid "Check the installation instructions above." +msgstr "" + +#: 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:504 +msgid "" +"Always check a script for syntax errors first, by doing something like " +"``python script.py``." +msgstr "" + +#: 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: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: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 " +"typically the userid under which the web server is running, or some " +"explicitly specified userid for a web server's ``suexec`` feature." +msgstr "" + +#: 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:523 +msgid "Footnotes" +msgstr "Notes" + +#: 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 " +"received from a conforming browser, or even from a browser at all, is " +"tedious and error-prone." +msgstr "" diff --git a/library/cgitb.po b/library/cgitb.po new file mode 100644 index 0000000000..8374321315 --- /dev/null +++ b/library/cgitb.po @@ -0,0 +1,151 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-05-21 16:37+0200\n" +"PO-Revision-Date: 2018-07-29 18:36+0200\n" +"Last-Translator: Julien Palard \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.9\n" + +#: library/cgitb.rst:2 +msgid ":mod:`cgitb` --- Traceback manager for CGI scripts" +msgstr ":mod:`cgitb` — Gestionnaire d'exceptions pour les scripts CGI" + +#: library/cgitb.rst:11 +msgid "**Source code:** :source:`Lib/cgitb.py`" +msgstr "**Code source :** :source:`Lib/cgitb.py`" + +#: 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 " +"display extensive traceback information in HTML for CGI scripts. It was " +"later generalized to also display this information in plain text.) After " +"this module is activated, if an uncaught exception occurs, a detailed, " +"formatted report will be displayed. The report includes a traceback showing " +"excerpts of the source code for each level, as well as the values of the " +"arguments and local variables to currently running functions, to help you " +"debug the problem. Optionally, you can save this information to a file " +"instead of sending it to the browser." +msgstr "" +"Le module :mod:`cgitb` fournit un gestionnaire d'exceptions spécifique pour " +"les scripts Python. (Son nom est trompeur : Il a été conçu à l'origine pour " +"afficher des pile d'appels en HTML pour les scripts CGI, puis a été " +"généralisé par la suite pour afficher cette information en texte brut.) Une " +"fois ce module activé, si une exception remonte jusqu'à l'interpréteur, un " +"rapport détaillé sera affiché. Le rapport affiche la pile d'appels, montrant " +"des extraits de code pour chaque niveau, ainsi que les arguments et les " +"variables locales des fonctions appelantes pour vous aider à résoudre le " +"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: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: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 " +"later analysis." +msgstr "" +"Les paramètres optionnels de la fonction :func:`enable` permettent de " +"choisir si le rapport est envoyé au navigateur ou si le rapport est écrit " +"dans un fichier pour analyse ultérieure." + +#: 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." +"excepthook`." +msgstr "" +"Appeler cette fonction remplace le gestionnaire d'exceptions par défaut de " +"l'interpréteur par celui du module :mod:`cgitb`, en configurant :attr:`sys." +"excepthook`." + +#: 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 " +"present, the traceback reports are written to files. The value of *logdir* " +"should be a directory where these files will be placed. The optional " +"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\"``." +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 " +"l'argument *logdir* est donné les piles d'appels seront écrites dans des " +"fichiers placés dans le dossier *logdir*. L'argument optionnel *context* est " +"le nombre de lignes de code à afficher autour de la ligne courante dans le " +"code source à chaque niveau de la pile d'appel, il vaut ``5`` par défaut. Si " +"l'argument optionnel *format* est ``\"html\"``, le rapport sera rédigé en " +"HTML. Le rapport sera écrit en texte brut pour toute autre valeur. La " +"valeur par défaut est ``\"html\"``." + +#: 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 " +"text and returning the result as a string. The optional 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``." +msgstr "" +"Cette fonction gère l’exception décrite par *info* (un triplet contenant le " +"résultat de :func:`sys.exc_info`), elle présente sa pile d’appels en texte " +"brut et renvois le résultat sous forme de chaîne de caractères. L’argument " +"facultatif *contexte* est le nombre de lignes de contexte à afficher autour " +"de la ligne courante du code source dans la pile d’appels ; la valeur par " +"défaut est ``5``." + +#: 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 " +"HTML and returning the result as a string. The optional 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``." +msgstr "" +"Cette fonction gère l’exception décrite par *info* (un triplet contenant le " +"résultat de :func:`sys.exc_info`), elle présente sa pile d’appels en HTML et " +"renvoie le résultat sous forme de chaîne de caractères. L’argument " +"facultatif *contexte* est le nombre de lignes de contexte à afficher autour " +"de la ligne courante du code source dans la pile d’appels ; la valeur par " +"défaut est ``5``." + +#: 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 " +"you've caught an exception and want to report it using :mod:`cgitb`. The " +"optional *info* argument should be a 3-tuple containing an exception type, " +"exception value, and traceback object, exactly like the tuple returned by :" +"func:`sys.exc_info`. If the *info* argument is not supplied, the current " +"exception is obtained from :func:`sys.exc_info`." +msgstr "" +"Cette fonction gère les exceptions en utilisant la configuration par défaut " +"(c'est à dire envoyer un rapport HTML au navigateur sans l'enregistrer dans " +"un fichier). Il peut être utilisé lorsque vous avez intercepté une exception " +"et que vous en voulez un rapport généré par :mod:`cgitb`. L'argument " +"optionnel *info* doit être un *n*-uplet de trois éléments contenant le type " +"de l'exception, l'exception, et la pile d'appels, tel que le *n*-uplet " +"renvoyé par :func:`sys.exc_info`. Si l'argument *info* n'est pas donné, " +"l'exception courante est obtenue via :func:`sys.exc_info`." diff --git a/library/chunk.po b/library/chunk.po new file mode 100644 index 0000000000..88ccdaa37d --- /dev/null +++ b/library/chunk.po @@ -0,0 +1,200 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-05-21 16:37+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \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" + +#: library/chunk.rst:2 +msgid ":mod:`chunk` --- Read IFF chunked data" +msgstr "" + +#: library/chunk.rst:11 +#, fuzzy +msgid "**Source code:** :source:`Lib/chunk.py`" +msgstr "**Code source :** :source:`Lib/uu.py`" + +#: 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 " +"Format (AIFF/AIFF-C) and the Real Media File Format (RMFF). The WAVE audio " +"file format is closely related and can also be read using this module." +msgstr "" + +#: library/chunk.rst:31 +msgid "A chunk has the following structure:" +msgstr "" + +#: library/chunk.rst:34 +msgid "Offset" +msgstr "" + +#: library/chunk.rst:34 +msgid "Length" +msgstr "" + +#: library/chunk.rst:34 +msgid "Contents" +msgstr "Sommaire" + +#: library/chunk.rst:36 +msgid "0" +msgstr "0" + +#: library/chunk.rst:38 +msgid "4" +msgstr "4" + +#: library/chunk.rst:36 +msgid "Chunk ID" +msgstr "" + +#: library/chunk.rst:38 +msgid "Size of chunk in big-endian byte order, not including the header" +msgstr "" + +#: library/chunk.rst:42 +msgid "8" +msgstr "8" + +#: library/chunk.rst:42 +msgid "*n*" +msgstr "*n*" + +#: library/chunk.rst:42 +msgid "Data bytes, where *n* is the size given in the preceding field" +msgstr "" + +#: library/chunk.rst:46 +msgid "8 + *n*" +msgstr "8 + *n*" + +#: library/chunk.rst:46 +msgid "0 or 1" +msgstr "0 or 1" + +#: library/chunk.rst:46 +msgid "Pad byte needed if *n* is odd and chunk alignment is used" +msgstr "" + +#: library/chunk.rst:50 +msgid "The ID is a 4-byte string which identifies the type of chunk." +msgstr "" + +#: 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: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 " +"the start of each chunk and read from the instance until it reaches the end, " +"after which a new instance can be instantiated. At the end of the file, " +"creating a new instance will fail with an :exc:`EOFError` exception." +msgstr "" + +#: 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 " +"only method that is needed is :meth:`~io.IOBase.read`. If the methods :meth:" +"`~io.IOBase.seek` and :meth:`~io.IOBase.tell` are present and don't raise an " +"exception, they are also used. If these methods are present and raise an " +"exception, they are expected to not have altered the object. If the " +"optional argument *align* is true, chunks are assumed to be aligned on 2-" +"byte boundaries. If *align* is false, no alignment is assumed. The default " +"value is true. If the optional argument *bigendian* is false, the chunk " +"size is assumed to be in little-endian order. This is needed for WAVE audio " +"files. The default value is true. If the optional argument *inclheader* is " +"true, the size given in the chunk header includes the size of the header. " +"The default value is false." +msgstr "" + +#: library/chunk.rst:78 +msgid "A :class:`Chunk` object supports the following methods:" +msgstr "" + +#: 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:89 +msgid "Returns the size of the chunk." +msgstr "" + +#: 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: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:104 +msgid "Returns ``False``." +msgstr "" + +#: 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 " +"relative to the current position) and ``2`` (seek relative to the file's " +"end). There is no return value. If the underlying file does not allow seek, " +"only forward seeks are allowed." +msgstr "" + +#: library/chunk.rst:118 +msgid "Return the current position into the chunk." +msgstr "" + +#: 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 " +"negative or omitted, read all data until the end of the chunk. An empty " +"bytes object is returned when the end of the chunk is encountered " +"immediately." +msgstr "" + +#: 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 " +"chunk, this method should be called so that the file points to the start of " +"the next chunk." +msgstr "" + +#: library/chunk.rst:139 +msgid "Footnotes" +msgstr "Notes" + +#: library/chunk.rst:140 +msgid "" +"\"EA IFF 85\" Standard for Interchange Format Files, Jerry Morrison, " +"Electronic Arts, January 1985." +msgstr "" diff --git a/library/cmath.po b/library/cmath.po new file mode 100644 index 0000000000..a8eb966801 --- /dev/null +++ b/library/cmath.po @@ -0,0 +1,475 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-22 22:57+0100\n" +"PO-Revision-Date: 2019-05-28 20:19+0200\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.3\n" + +#: library/cmath.rst:2 +msgid ":mod:`cmath` --- Mathematical functions for complex numbers" +msgstr "Fonctions mathématiques pour nombres complexes — :mod:`cmath`" + +#: library/cmath.rst:9 +msgid "" +"This module provides access to mathematical functions for complex numbers. " +"The functions in this module accept integers, floating-point numbers or " +"complex numbers as arguments. They will also accept any Python object that " +"has either a :meth:`__complex__` or a :meth:`__float__` method: these " +"methods are used to convert the object to a complex or floating-point " +"number, respectively, and the function is then applied to the result of the " +"conversion." +msgstr "" +"Ce module fournit l'accès aux fonctions mathématiques pour les nombres " +"complexes. Les fonctions de ce module acceptent les entiers, les nombres " +"flottants ou les nombres complexes comme arguments. Elles acceptent " +"également tout objet Python ayant une méthode :meth:`__complex__` " +"(respectivement :meth:`__float__`) : cette méthode est utilisée pour " +"convertir l’objet en nombre complexe (respectivement un nombre flottant) et " +"la fonction est ensuite appliquée sur le résultat de la conversion." + +#: library/cmath.rst:18 +msgid "" +"For functions involving branch cuts, we have the problem of deciding how to " +"define those functions on the cut itself. Following Kahan's \"Branch cuts " +"for complex elementary functions\" paper, as well as Annex G of C99 and " +"later C standards, we use the sign of zero to distinguish one side of the " +"branch cut from the other: for a branch cut along (a portion of) the real " +"axis we look at the sign of the imaginary part, while for a branch cut along " +"the imaginary axis we look at the sign of the real part." +msgstr "" + +#: library/cmath.rst:26 +msgid "" +"For example, the :func:`cmath.sqrt` function has a branch cut along the " +"negative real axis. An argument of ``complex(-2.0, -0.0)`` is treated as " +"though it lies *below* the branch cut, and so gives a result on the negative " +"imaginary axis::" +msgstr "" + +#: library/cmath.rst:34 +msgid "" +"But an argument of ``complex(-2.0, 0.0)`` is treated as though it lies above " +"the branch cut::" +msgstr "" + +#: library/cmath.rst:42 +msgid "Conversions to and from polar coordinates" +msgstr "Conversion vers et à partir de coordonnées polaires" + +#: library/cmath.rst:44 +msgid "" +"A Python complex number ``z`` is stored internally using *rectangular* or " +"*Cartesian* coordinates. It is completely determined by its *real part* ``z." +"real`` and its *imaginary part* ``z.imag``. In other words::" +msgstr "" +"Un nombre complexe Python ``z`` est stocké de manière interne en coordonnées " +"*cartésiennes*. Il est entièrement défini par sa *partie réelle* ``z.real`` " +"et sa *partie complexe* ``z.imag``. En d'autres termes ::" + +#: library/cmath.rst:51 +msgid "" +"*Polar coordinates* give an alternative way to represent a complex number. " +"In polar coordinates, a complex number *z* is defined by the modulus *r* and " +"the phase angle *phi*. The modulus *r* is the distance from *z* to the " +"origin, while the phase *phi* is the counterclockwise angle, measured in " +"radians, from the positive x-axis to the line segment that joins the origin " +"to *z*." +msgstr "" +"Les *coordonnées polaires* donnent une manière alternative de représenter un " +"nombre complexe. En coordonnées polaires, un nombre complexe *z* est défini " +"par son module *r* et par son argument (*angle de phase*) *phi*. Le module " +"*r* est la distance entre *z* et l'origine, alors que l'argument *phi* est " +"l'angle (dans le sens inverse des aiguilles d'une montre, ou sens " +"trigonométrique), mesuré en radians, à partir de l'axe X positif, et vers le " +"segment de droite joignant *z* à l'origine." + +#: library/cmath.rst:58 +msgid "" +"The following functions can be used to convert from the native rectangular " +"coordinates to polar coordinates and back." +msgstr "" +"Les fonctions suivantes peuvent être utilisées pour convertir à partir des " +"coordonnées rectangulaires natives vers les coordonnées polaires, et vice-" +"versa." + +#: library/cmath.rst:63 +#, fuzzy +msgid "" +"Return the phase of *x* (also known as the *argument* of *x*), as a float. " +"``phase(x)`` is equivalent to ``math.atan2(x.imag, x.real)``. The result " +"lies in the range [-\\ *π*, *π*], and the branch cut for this operation lies " +"along the negative real axis. The sign of the result is the same as the " +"sign of ``x.imag``, even when ``x.imag`` is zero::" +msgstr "" +"Renvoie l'argument de *x*, dans un nombre flottant. ``phase(x)`` est " +"équivalent à ``math.atan2(x.imag, x.real)``. Le résultat se situe dans " +"l'intervalle [-\\ *π*, *π*], et la coupure par cette opération se situe sur " +"la partie négative de l'axe des réels, continue par au-dessus. Sur les " +"systèmes supportant les zéros signés (ce qui inclut la plupart des systèmes " +"utilisés actuellement), cela signifie que le signe du résultat est le même " +"que ``x.imag`` même quand ``x.imag`` vaut zéro ::" + +#: library/cmath.rst:77 +msgid "" +"The modulus (absolute value) of a complex number *x* can be computed using " +"the built-in :func:`abs` function. There is no separate :mod:`cmath` module " +"function for this operation." +msgstr "" +"Le module (valeur absolue) d'un nombre complexe *x* peut être calculé en " +"utilisant la primitive :func:`abs`. Il n'y a pas de fonction spéciale du " +"module :mod:`cmath` pour cette opération." + +#: library/cmath.rst:84 +msgid "" +"Return the representation of *x* in polar coordinates. Returns a pair ``(r, " +"phi)`` where *r* is the modulus of *x* and phi is the phase of *x*. " +"``polar(x)`` is equivalent to ``(abs(x), phase(x))``." +msgstr "" +"Renvoie la représentation de *x* en coordonnées polaires. Renvoie une paire " +"``(r, phi)`` où *r* est le module de *x* et phi est l'argument de *x*. " +"``polar(x)`` est équivalent à ``(abs(x), phase(x))``." + +#: library/cmath.rst:92 +msgid "" +"Return the complex number *x* with polar coordinates *r* and *phi*. " +"Equivalent to ``r * (math.cos(phi) + math.sin(phi)*1j)``." +msgstr "" +"Renvoie le nombre complexe *x* dont les coordonnées polaires sont *r* et " +"*phi*. Équivalent à ``r * (math.cos(phi) + math.sin(phi)*1j)``." + +#: library/cmath.rst:97 +msgid "Power and logarithmic functions" +msgstr "Fonctions logarithme et exponentielle" + +#: library/cmath.rst:101 +msgid "" +"Return *e* raised to the power *x*, where *e* is the base of natural " +"logarithms." +msgstr "" +"Renvoie *e* élevé à la puissance *x*, où *e* est la base des logarithmes " +"naturels." + +#: library/cmath.rst:107 +#, fuzzy +msgid "" +"Returns the logarithm of *x* to the given *base*. If the *base* is not " +"specified, returns the natural logarithm of *x*. There is one branch cut, " +"from 0 along the negative real axis to -∞." +msgstr "" +"Renvoie le logarithme de *x* dans la *base* précisée. Si la *base* n'est pas " +"spécifiée, le logarithme *naturel* (népérien) de *x* est renvoyé. Il y a une " +"coupure, partant de 0 sur l'axe réel négatif et vers ``-∞``, continue par au-" +"dessus." + +#: library/cmath.rst:114 +msgid "" +"Return the base-10 logarithm of *x*. This has the same branch cut as :func:" +"`log`." +msgstr "" +"Renvoie le logarithme en base 10 de *x*. Elle a la même coupure que :func:" +"`log`." + +#: library/cmath.rst:120 +msgid "" +"Return the square root of *x*. This has the same branch cut as :func:`log`." +msgstr "" +"Renvoie la racine carrée de *x*. Elle a la même coupure que :func:`log`." + +#: library/cmath.rst:124 +msgid "Trigonometric functions" +msgstr "Fonctions trigonométriques" + +#: library/cmath.rst:128 +#, fuzzy +msgid "" +"Return the arc cosine of *x*. There are two branch cuts: One extends right " +"from 1 along the real axis to ∞. The other extends left from -1 along the " +"real axis to -∞." +msgstr "" +"Renvoie l'arc cosinus de *x*. Il y a deux coupures : une allant de 1 sur " +"l'axe réel vers ∞, continue par en-dessous ; l'autre allant de ``-1`` sur " +"l'axe réel vers ``-∞``, continue par au-dessus." + +#: library/cmath.rst:135 +msgid "" +"Return the arc sine of *x*. This has the same branch cuts as :func:`acos`." +msgstr "" +"Renvoie l'arc sinus de *x*. Elle a les mêmes coupures que :func:`acos`." + +#: library/cmath.rst:140 +#, fuzzy +msgid "" +"Return the arc tangent of *x*. There are two branch cuts: One extends from " +"``1j`` along the imaginary axis to ``∞j``. The other extends from ``-1j`` " +"along the imaginary axis to ``-∞j``." +msgstr "" +"Renvoie la tangente de *x*. l y a deux coupures : une allant de ``1j`` sur " +"l'axe imaginaire vers ``∞j``, continue par la droite ; l'autre allant de " +"``-1j`` sur l'axe imaginaire vers ``-∞j``, continue par la gauche." + +#: library/cmath.rst:147 +msgid "Return the cosine of *x*." +msgstr "Renvoie le cosinus de *x*." + +#: library/cmath.rst:152 +msgid "Return the sine of *x*." +msgstr "Renvoie le sinus de *x*." + +#: library/cmath.rst:157 +msgid "Return the tangent of *x*." +msgstr "Renvoie la tangente de *x*." + +#: library/cmath.rst:161 +msgid "Hyperbolic functions" +msgstr "Fonctions hyperboliques" + +#: library/cmath.rst:165 +#, fuzzy +msgid "" +"Return the inverse hyperbolic cosine of *x*. There is one branch cut, " +"extending left from 1 along the real axis to -∞." +msgstr "" +"Renvoie l'arc cosinus hyperbolique de *x*. Il y a une coupure, allant de 1 " +"sur l'axe réel vers ``-∞``, continue par au-dessus." + +#: library/cmath.rst:171 +#, fuzzy +msgid "" +"Return the inverse hyperbolic sine of *x*. There are two branch cuts: One " +"extends from ``1j`` along the imaginary axis to ``∞j``. The other extends " +"from ``-1j`` along the imaginary axis to ``-∞j``." +msgstr "" +"Renvoie l'arc sinus hyperbolique de *x*. Il y a deux coupures : une allant " +"de ``1j`` sur l'axe imaginaire vers ``∞j``, continue par la droite ; l'autre " +"allant de ``-1j`` sur l'axe imaginaire vers ``∞j``, continue par la gauche." + +#: library/cmath.rst:178 +#, fuzzy +msgid "" +"Return the inverse hyperbolic tangent of *x*. There are two branch cuts: One " +"extends from ``1`` along the real axis to ``∞``. The other extends from " +"``-1`` along the real axis to ``-∞``." +msgstr "" +"Renvoie l'arc tangente hyperbolique de *x*. Il y a deux coupures : une " +"allant de ``1`` sur l'axe réel allant vers ``∞``, continue par en-dessous ; " +"l'autre allant de ``-1`` sur l'axe réel vers ``-∞``, continue par au-dessus." + +#: library/cmath.rst:185 +msgid "Return the hyperbolic cosine of *x*." +msgstr "Renvoie le cosinus hyperbolique de *x*." + +#: library/cmath.rst:190 +msgid "Return the hyperbolic sine of *x*." +msgstr "Renvoie le sinus hyperbolique de *x*." + +#: library/cmath.rst:195 +msgid "Return the hyperbolic tangent of *x*." +msgstr "Renvoie la tangente hyperbolique de *x*." + +#: library/cmath.rst:199 +msgid "Classification functions" +msgstr "Fonctions de classifications" + +#: library/cmath.rst:203 +msgid "" +"Return ``True`` if both the real and imaginary parts of *x* are finite, and " +"``False`` otherwise." +msgstr "" +"Renvoie ``True`` si la partie réelle *et* la partie imaginaire de *x* sont " +"finies, et ``False`` sinon." + +#: library/cmath.rst:211 +msgid "" +"Return ``True`` if either the real or the imaginary part of *x* is an " +"infinity, and ``False`` otherwise." +msgstr "" +"Renvoie ``True`` si soit la partie réelle *ou* la partie imaginaire de *x* " +"est infinie, et ``False`` sinon." + +#: library/cmath.rst:217 +msgid "" +"Return ``True`` if either the real or the imaginary part of *x* is a NaN, " +"and ``False`` otherwise." +msgstr "" +"Renvoie ``True`` si soit la partie réelle *ou* la partie imaginaire de *x* " +"est NaN, et ``False`` sinon." + +#: library/cmath.rst:223 +msgid "" +"Return ``True`` if the values *a* and *b* are close to each other and " +"``False`` otherwise." +msgstr "" +"Renvoie ``True`` si les valeurs *a* et *b* sont proches l'une de l'autre, et " +"``False`` sinon." + +#: library/cmath.rst:226 +msgid "" +"Whether or not two values are considered close is determined according to " +"given absolute and relative tolerances." +msgstr "" +"Déterminer si deux valeurs sont proches se fait à l'aide des tolérances " +"absolues et relatives données en paramètres." + +#: library/cmath.rst:229 +msgid "" +"*rel_tol* is the relative tolerance -- it is the maximum allowed difference " +"between *a* and *b*, relative to the larger absolute value of *a* or *b*. " +"For example, to set a tolerance of 5%, pass ``rel_tol=0.05``. The default " +"tolerance is ``1e-09``, which assures that the two values are the same " +"within about 9 decimal digits. *rel_tol* must be greater than zero." +msgstr "" +"*rel_tol* est la tolérance relative -- c'est la différence maximale permise " +"entre *a* et *b*, relativement à la plus grande valeur de *a* ou de *b*. Par " +"exemple, pour définir une tolérance de 5%,, précisez ``rel_tol=0.05``. La " +"tolérance par défaut est ``1e-09``, ce qui assure que deux valeurs sont les " +"mêmes à partir de la 9\\ :sup:`e` décimale. *rel_tol* doit être supérieur à " +"zéro." + +#: library/cmath.rst:235 +msgid "" +"*abs_tol* is the minimum absolute tolerance -- useful for comparisons near " +"zero. *abs_tol* must be at least zero." +msgstr "" +"*abs_tol* est la tolérance absolue minimale -- utile pour les comparaisons " +"proches de zéro. *abs_tol* doit valoir au moins zéro." + +#: library/cmath.rst:238 +msgid "" +"If no errors occur, the result will be: ``abs(a-b) <= max(rel_tol * " +"max(abs(a), abs(b)), abs_tol)``." +msgstr "" +"Si aucune erreur n'est rencontrée, le résultat sera : ``abs(a-b) <= " +"max(rel_tol * max(abs(a), abs(b)), abs_tol)``." + +#: library/cmath.rst:241 +msgid "" +"The IEEE 754 special values of ``NaN``, ``inf``, and ``-inf`` will be " +"handled according to IEEE rules. Specifically, ``NaN`` is not considered " +"close to any other value, including ``NaN``. ``inf`` and ``-inf`` are only " +"considered close to themselves." +msgstr "" +"Les valeurs spécifiques suivantes : ``NaN``, ``inf``, et ``-inf`` définies " +"dans la norme IEEE 754 seront manipulées selon les règles du standard IEEE. " +"En particulier, ``NaN`` n'est considéré proche d'aucune autre valeur, " +"``NaN`` inclus. ``inf`` et ``-inf`` ne sont considérés proches que d'eux-" +"mêmes." + +#: library/cmath.rst:250 +msgid ":pep:`485` -- A function for testing approximate equality" +msgstr ":pep:`485` -- Une fonction pour tester des égalités approximées" + +#: library/cmath.rst:254 +msgid "Constants" +msgstr "Constantes" + +#: library/cmath.rst:258 +msgid "The mathematical constant *π*, as a float." +msgstr "La constante mathématique *π*, en tant que flottant." + +#: library/cmath.rst:263 +msgid "The mathematical constant *e*, as a float." +msgstr "La constante mathématique *e*, en tant que flottant." + +#: library/cmath.rst:268 +msgid "The mathematical constant *τ*, as a float." +msgstr "La constante mathématique *τ*, sous forme de flottant." + +#: library/cmath.rst:275 +msgid "Floating-point positive infinity. Equivalent to ``float('inf')``." +msgstr "" +"Nombre à virgule flottante positif infini. Équivaut à ``float('inf')``." + +#: library/cmath.rst:282 +msgid "" +"Complex number with zero real part and positive infinity imaginary part. " +"Equivalent to ``complex(0.0, float('inf'))``." +msgstr "" +"Nombre complexe dont la partie réelle vaut zéro et la partie imaginaire un " +"infini positif. Équivalent à ``complex(0.0, float('inf'))``." + +#: library/cmath.rst:290 +msgid "" +"A floating-point \"not a number\" (NaN) value. Equivalent to " +"``float('nan')``." +msgstr "" +"Un nombre à virgule flottante *NaN* (*Not a number*). Équivalent à " +"``float('nan')``." + +#: library/cmath.rst:298 +msgid "" +"Complex number with zero real part and NaN imaginary part. Equivalent to " +"``complex(0.0, float('nan'))``." +msgstr "" +"Nombre complexe dont la partie réelle vaut zéro et la partie imaginaire vaut " +"un *NaN*. Équivalent à ``complex(0.0, float('nan'))``." + +#: library/cmath.rst:306 +msgid "" +"Note that the selection of functions is similar, but not identical, to that " +"in module :mod:`math`. The reason for having two modules is that some users " +"aren't interested in complex numbers, and perhaps don't even know what they " +"are. They would rather have ``math.sqrt(-1)`` raise an exception than " +"return a complex number. Also note that the functions defined in :mod:" +"`cmath` always return a complex number, even if the answer can be expressed " +"as a real number (in which case the complex number has an imaginary part of " +"zero)." +msgstr "" +"Notez que la sélection de fonctions est similaire, mais pas identique, à " +"celles du module :mod:`math`. La raison d'avoir deux modules est que " +"certains utilisateurs ne sont pas intéressés par les nombres complexes, et " +"peut-être ne savent même pas ce qu'ils sont. Ils préféreraient alors que " +"``math.sqrt(-1)`` lève une exception au lieu de renvoyer un nombre complexe. " +"Également, notez que les fonctions définies dans :mod:`cmath` renvoient " +"toujours un nombre complexe, même si le résultat peut être exprimé à l'aide " +"d'un nombre réel (en quel cas la partie imaginaire du complexe vaut zéro)." + +#: library/cmath.rst:314 +msgid "" +"A note on branch cuts: They are curves along which the given function fails " +"to be continuous. They are a necessary feature of many complex functions. " +"It is assumed that if you need to compute with complex functions, you will " +"understand about branch cuts. Consult almost any (not too elementary) book " +"on complex variables for enlightenment. For information of the proper " +"choice of branch cuts for numerical purposes, a good reference should be the " +"following:" +msgstr "" +"Une note sur les *coupures* : ce sont des courbes sur lesquelles la fonction " +"n'est pas continue. Ce sont des caractéristiques nécessaires de beaucoup de " +"fonctions complexes. Il est supposé que si vous avez besoin d'utiliser des " +"fonctions complexes, vous comprendrez ce que sont les coupures. Consultez " +"n'importe quel livre (pas trop élémentaire) sur les variables complexes pour " +"plus d'informations. Pour des informations sur les choix des coupures à des " +"fins numériques, voici une bonne référence :" + +#: library/cmath.rst:324 +msgid "" +"Kahan, W: Branch cuts for complex elementary functions; or, Much ado about " +"nothing's sign bit. In Iserles, A., and Powell, M. (eds.), The state of the " +"art in numerical analysis. Clarendon Press (1987) pp165--211." +msgstr "" +"Kahan, W: Branch cuts for complex elementary functions; or, Much ado about " +"nothing's sign bit. In Iserles, A., and Powell, M. (eds.), The state of the " +"art in numerical analysis. Clarendon Press (1987) pp165--211." + +#~ msgid "" +#~ "On platforms with hardware and system-level support for signed zeros, " +#~ "functions involving branch cuts are continuous on *both* sides of the " +#~ "branch cut: the sign of the zero distinguishes one side of the branch cut " +#~ "from the other. On platforms that do not support signed zeros the " +#~ "continuity is as specified below." +#~ msgstr "" +#~ "Sur les plate-formes avec un support système et matériel des zéros " +#~ "signés, les fonctions incluant une coupure complexe sont continues *de " +#~ "chaque* côté de la coupure : le signe du zéro distingue les deux " +#~ "extrémités de la coupure. Sur les plate-formes ne supportant pas les " +#~ "zéros signés, la continuité est spécifiée en-dessous." diff --git a/library/cmd.po b/library/cmd.po new file mode 100644 index 0000000000..f29afec863 --- /dev/null +++ b/library/cmd.po @@ -0,0 +1,445 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-03-18 17:06+0100\n" +"PO-Revision-Date: 2018-07-29 23:43+0200\n" +"Last-Translator: Luka Peschke \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.3\n" + +#: library/cmd.rst:2 +msgid ":mod:`cmd` --- Support for line-oriented command interpreters" +msgstr ":mod:`cmd` — Interpréteurs en ligne de commande." + +#: library/cmd.rst:9 +msgid "**Source code:** :source:`Lib/cmd.py`" +msgstr "**Code source:** :source:`Lib/cmd.py`" + +#: library/cmd.rst:13 +msgid "" +"The :class:`Cmd` class provides a simple framework for writing line-oriented " +"command interpreters. These are often useful for test harnesses, " +"administrative tools, and prototypes that will later be wrapped in a more " +"sophisticated interface." +msgstr "" +"La :class:`Cmd` fournit une base simple permettant d'écrire des " +"interpréteurs en ligne de commande. Ceux-ci sont souvent utiles pour piloter " +"des tests, pour des outils administratifs, et pour des prototypes destinés à " +"être intégrés à une interface plus sophistiquée." + +#: library/cmd.rst:20 +msgid "" +"A :class:`Cmd` instance or subclass instance is a line-oriented interpreter " +"framework. There is no good reason to instantiate :class:`Cmd` itself; " +"rather, it's useful as a superclass of an interpreter class you define " +"yourself in order to inherit :class:`Cmd`'s methods and encapsulate action " +"methods." +msgstr "" +"Une instance de :class:`Cmd` ou d'une classe en héritant est un *framework* " +"orienté ligne de commande. Il n'y a pas de bonne raison d'instancier :class:" +"`Cmd` directement. Elle est plutôt utile en tant que classe mère d'une " +"classe-interprète que vous définirez afin d'hériter des méthodes de :class:" +"`Cmd` et d'encapsuler les opérations." + +#: library/cmd.rst:25 +msgid "" +"The optional argument *completekey* is the :mod:`readline` name of a " +"completion key; it defaults to :kbd:`Tab`. If *completekey* is not :const:" +"`None` and :mod:`readline` is available, command completion is done " +"automatically." +msgstr "" +"L'argument facultatif *completekey* est le nom :mod:`readline` d'une touche " +"de complétion. Si *completekey* ne vaut pas :const:`None` et que :mod:" +"`readline` est disponible, la complétion de commandes est faite " +"automatiquement." + +#: library/cmd.rst:29 +msgid "" +"The optional arguments *stdin* and *stdout* specify the input and output " +"file objects that the Cmd instance or subclass instance will use for input " +"and output. If not specified, they will default to :data:`sys.stdin` and :" +"data:`sys.stdout`." +msgstr "" +"Les arguments facultatifs *stdin* et *stdout* spécifient les objets-fichiers " +"de lecture et d'écriture que l'instance de Cmd ou d'une classe fille " +"utilisera comme entrée et sortie. Si ces arguments ne sont pas spécifiés, " +"ils prendront comme valeur par défaut :data:`sys.stdin` et :data:`sys." +"stdout`." + +#: library/cmd.rst:34 +msgid "" +"If you want a given *stdin* to be used, make sure to set the instance's :" +"attr:`use_rawinput` attribute to ``False``, otherwise *stdin* will be " +"ignored." +msgstr "" +"Si vous souhaitez qu'un *stdin* donné soit utilisé, assurez-vous que " +"l'attribut :attr:`use_rawinput` de l'instance vaille ``False``, faute de " +"quoi *stdin* sera ignoré." + +#: library/cmd.rst:42 +msgid "Cmd Objects" +msgstr "Objets Cmd" + +#: library/cmd.rst:44 +msgid "A :class:`Cmd` instance has the following methods:" +msgstr "Une instance de :class:`Cmd` possède les méthodes suivantes :" + +#: library/cmd.rst:49 +msgid "" +"Repeatedly issue a prompt, accept input, parse an initial prefix off the " +"received input, and dispatch to action methods, passing them the remainder " +"of the line as argument." +msgstr "" +"Affiche une invite de commande de manière répétée, accepte une entrée, " +"soustrait un préfixe initial de l'entrée reçue et envoie aux méthodes " +"d'opération la partie restante de l'entrée reçue." + +#: library/cmd.rst:53 +msgid "" +"The optional argument is a banner or intro string to be issued before the " +"first prompt (this overrides the :attr:`intro` class attribute)." +msgstr "" +"L'argument facultatif est une bannière ou chaîne de caractères " +"d'introduction à afficher avant la première invite de commande (il redéfinit " +"l'attribut de classe :attr:`intro`)." + +#: library/cmd.rst:56 +msgid "" +"If the :mod:`readline` module is loaded, input will automatically inherit :" +"program:`bash`\\ -like history-list editing (e.g. :kbd:`Control-P` scrolls " +"back to the last command, :kbd:`Control-N` forward to the next one, :kbd:" +"`Control-F` moves the cursor to the right non-destructively, :kbd:`Control-" +"B` moves the cursor to the left non-destructively, etc.)." +msgstr "" +"Si le module :mod:`readline` est chargé, l'entrée héritera automatiquement " +"d'une édition d'historique similaire à :program:`bash` (Par exemple, :kbd:" +"`Control-P` reviendra à la dernière commande, :kbd:`Control-N` avancera à la " +"suivante, :kbd:`Control-F` déplace le curseur vers la droite, :kbd:`Control-" +"B` déplace le curseur vers la gauche, etc...)." + +#: library/cmd.rst:62 +msgid "An end-of-file on input is passed back as the string ``'EOF'``." +msgstr "" +"Une caractère de fin de fichier est transmis via la chaîne de caractères " +"``'EOF'``." + +#: library/cmd.rst:68 +msgid "" +"An interpreter instance will recognize a command name ``foo`` if and only if " +"it has a method :meth:`do_foo`. As a special case, a line beginning with " +"the character ``'?'`` is dispatched to the method :meth:`do_help`. As " +"another special case, a line beginning with the character ``'!'`` is " +"dispatched to the method :meth:`do_shell` (if such a method is defined)." +msgstr "" +"Une instance d'un interpréteur reconnaîtra un nom de commande ``foo`` si et " +"seulement si celle-ci possède une méthode :meth:`do_foo`. Les lignes " +"commençant par le caractère ``'?'`` sont un cas particulier: elles sont " +"envoyées à la méthode :meth:`do_help`. Les lignes commençant par le " +"caractère ``'!'`` sont également un cas particulier: elles sont envoyées à " +"la méthode :meth:`do_shell` (si une telle méthode est définie)." + +#: library/cmd.rst:74 +msgid "" +"This method will return when the :meth:`postcmd` method returns a true " +"value. The *stop* argument to :meth:`postcmd` is the return value from the " +"command's corresponding :meth:`do_\\*` method." +msgstr "" +"Cette méthode ne s'arrêtera que lorsque :meth:`postcmd` renverra une valeur " +"vraie. L'argument *stop* de :meth:`postcmd` est la valeur de retour de la " +"méthode :meth:`do_\\*` correspondant à la commande." + +#: library/cmd.rst:78 +msgid "" +"If completion is enabled, completing commands will be done automatically, " +"and completing of commands args is done by calling :meth:`complete_foo` with " +"arguments *text*, *line*, *begidx*, and *endidx*. *text* is the string " +"prefix we are attempting to match: all returned matches must begin with it. " +"*line* is the current input line with leading whitespace removed, *begidx* " +"and *endidx* are the beginning and ending indexes of the prefix text, which " +"could be used to provide different completion depending upon which position " +"the argument is in." +msgstr "" +"Si la complétion est activée, la complétion de commandes sera faite " +"automatiquement; et la complétion d'arguments sera faite en appelant :meth:" +"`complete_foo` avec les arguments *text*, *line*, *begidx*, et *endidx*. " +"*text* est le préfixe que nous cherchons à faire coïncider: toutes les " +"valeurs renvoyées doivent commencer par ce préfixe. *line* est la ligne " +"d'entrée actuelle sans les espaces blancs de début. *begidx* et *endidx* " +"sont les index de début et de fin du préfixe, ils pourraient être utilisés " +"pour fournir différentes complétions en fonction de la position de " +"l'argument." + +#: library/cmd.rst:86 +msgid "" +"All subclasses of :class:`Cmd` inherit a predefined :meth:`do_help`. This " +"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 " +"undocumented commands." +msgstr "" +"Toutes les classes filles de :class:`Cmd` héritent d'une méthode :meth:" +"`do_help` prédéfinie. Cette méthode appellera la méthode :meth:`help_bar` " +"lorsqu'elle est appelée avec un argument ``'bar'``. Si celle-ci n'est pas " +"définie, elle affichera la *docstring* de :meth:`do_bar`, (si elle a une " +"*docstring*). Sans argument, :meth:`do_help` listera tous les sujets d'aide " +"(c'est à dire, toutes les commandes avec une méthode :meth:`help_\\\\*` " +"correspondante ou commande ayant une *docstring*, elle lisera aussi les " +"commandes non documentées." + +#: library/cmd.rst:97 +msgid "" +"Interpret the argument as though it had been typed in response to the " +"prompt. This may be overridden, but should not normally need to be; see the :" +"meth:`precmd` and :meth:`postcmd` methods for useful execution hooks. The " +"return value is a flag indicating whether interpretation of commands by the " +"interpreter should stop. If there is a :meth:`do_\\*` method for the " +"command *str*, the return value of that method is returned, otherwise the " +"return value from the :meth:`default` method is returned." +msgstr "" +"Interprète l'argument comme si il avait été entré en réponse à l'invite de " +"commande. Cette méthode peut être surchargée, mais ne devrait normalement " +"pas avoir besoin de l'être; voir les méthodes :meth:`precmd` et :meth:" +"`postcmd` pour altérer l'exécution d'une commande. La valeur de retour est " +"un *flag* indiquant si l'interprétation de commandes par l'interpréteur " +"devrait arrêter. S'il existe une méthode :meth:`do_\\*` pour la commande " +"*str*, la valeur de retour de cette méthode est renvoyée. Dans le cas " +"contraire, la valeur de retour de la méthode :meth:`default` est renvoyée." + +#: library/cmd.rst:108 +msgid "" +"Method called when an empty line is entered in response to the prompt. If " +"this method is not overridden, it repeats the last nonempty command entered." +msgstr "" +"Méthode appelée quand une ligne vide est entrée en réponse à l'invite de " +"commande. Si cette méthode n'est pas surchargée, elle répète la dernière " +"commande non-vide entrée." + +#: library/cmd.rst:114 +msgid "" +"Method called on an input line when the command prefix is not recognized. If " +"this method is not overridden, it prints an error message and returns." +msgstr "" +"Méthode appelée lorsque le préfixe de commande d'une ligne entrée n'est pas " +"reconnu. Si cette méthode n'est pas surchargée, elle affiche un message " +"d'erreur et s'arrête." + +#: library/cmd.rst:120 +msgid "" +"Method called to complete an input line when no command-specific :meth:" +"`complete_\\*` method is available. By default, it returns an empty list." +msgstr "" +"Méthode appelée pour compléter une ligne entrée quand aucune méthode :meth:" +"`complete_\\*` spécifique à la commande n'est disponible. Par défaut, elle " +"renvoie une liste vide." + +#: library/cmd.rst:126 +msgid "" +"Hook method executed just before the command line *line* is interpreted, but " +"after the input prompt is generated and issued. This method is a stub in :" +"class:`Cmd`; it exists to be overridden by subclasses. The return value is " +"used as the command which will be executed by the :meth:`onecmd` method; " +"the :meth:`precmd` implementation may re-write the command or simply return " +"*line* unchanged." +msgstr "" +"Méthode de rappel exécutée juste avant que la ligne de commande *line* ne " +"soit interprétée, mais après que l'invite de commande ait été généré et " +"affiché. Cette méthode existe afin d'être surchargée par des classes filles " +"de :class:`Cmd`. La valeur de retour est utilisée comme la commande qui sera " +"exécutée par la méthode :meth:`onecmd`. L'implémentation de :meth:`precmd` " +"peut réécrire la commande ou simplement renvoyer *line* sans modification." + +#: library/cmd.rst:136 +msgid "" +"Hook method executed just after a command dispatch is finished. This method " +"is a stub in :class:`Cmd`; it exists to be overridden by subclasses. *line* " +"is the command line which was executed, and *stop* is a flag which indicates " +"whether execution will be terminated after the call to :meth:`postcmd`; this " +"will be the return value of the :meth:`onecmd` method. The return value of " +"this method will be used as the new value for the internal flag which " +"corresponds to *stop*; returning false will cause interpretation to continue." +msgstr "" +"Méthode de rappel exécutée juste après qu'une commande ait été exécutée. " +"Cette méthode existe afin d'être surchargée par des classes filles de :class:" +"`Cmd`. *line est la ligne de commande ayant été exécutée et *stop* est un " +"*flag* indiquant si l'exécution sera terminée après un appel à :meth:" +"`postcmd`. *stop* sera la valeur de retour de :meth:`onecmd`. La valeur de " +"retour de cette méthode sera utilisée comme nouvelle valeur pour le *flag* " +"interne correspondant à *stop*. Renvoyer *False* permettra à " +"l'interprétation de continuer." + +#: library/cmd.rst:147 +msgid "" +"Hook method executed once when :meth:`cmdloop` is called. This method is a " +"stub in :class:`Cmd`; it exists to be overridden by subclasses." +msgstr "" +"Méthode de rappel exécutée une fois lorsque :meth:`cmdloop` est appelée. " +"Cette méthode existe afin d'être surchargée par des classes filles de :class:" +"`Cmd`." + +#: library/cmd.rst:153 +msgid "" +"Hook method executed once when :meth:`cmdloop` is about to return. This " +"method is a stub in :class:`Cmd`; it exists to be overridden by subclasses." +msgstr "" +"Méthode de rappel exécutée une fois lorsque :meth:`cmdloop` va s'arrêter. " +"Cette méthode existe afin d'être surchargée par des classes filles de :class:" +"`Cmd`." + +#: library/cmd.rst:157 +msgid "" +"Instances of :class:`Cmd` subclasses have some public instance variables:" +msgstr "" +"Les instances de classes filles de :class:`Cmd` possèdent des variables " +"d'instance publiques:" + +#: library/cmd.rst:161 +msgid "The prompt issued to solicit input." +msgstr "L'invite de commande affiché pour solliciter une entrée." + +#: library/cmd.rst:166 +msgid "The string of characters accepted for the command prefix." +msgstr "La chaîne de caractères acceptée en tant que préfixe de commande." + +#: library/cmd.rst:171 +msgid "The last nonempty command prefix seen." +msgstr "Le dernier préfixe de commande non-vide vu." + +#: library/cmd.rst:176 +msgid "" +"A list of queued input lines. The cmdqueue list is checked in :meth:" +"`cmdloop` when new input is needed; if it is nonempty, its elements will be " +"processed in order, as if entered at the prompt." +msgstr "" +"Une liste de lignes entrées en file. La liste *cmdqueue* est vérifiée dans :" +"meth:`cmdloop` lorsqu'une nouvelle entrée est nécessitée; si elle n'est pas " +"vide, ses éléments seront traités dans l'ordre, comme si ils avaient entrés " +"dans l'invite de commande." + +#: library/cmd.rst:183 +msgid "" +"A string to issue as an intro or banner. May be overridden by giving the :" +"meth:`cmdloop` method an argument." +msgstr "" +"Une chaîne de caractères à afficher en introduction ou bannière. Peut être " +"surchargée en passant un argument à la méthode :meth:`cmdloop`." + +#: library/cmd.rst:189 +msgid "" +"The header to issue if the help output has a section for documented commands." +msgstr "" +"L'en-tête à afficher si la sortie de l'aide possède une section pour les " +"commandes documentées." + +#: library/cmd.rst:194 +msgid "" +"The header to issue if the help output has a section for miscellaneous help " +"topics (that is, there are :meth:`help_\\*` methods without corresponding :" +"meth:`do_\\*` methods)." +msgstr "" +"L'en-tête à afficher si la sortie de l'aide possède une section pour divers " +"sujets (c'est-à-dire qu'il existe des méthodes :meth:`help_\\*` sans " +"méthodes :meth:`do_\\*` correspondantes)." + +#: library/cmd.rst:201 +msgid "" +"The header to issue if the help output has a section for undocumented " +"commands (that is, there are :meth:`do_\\*` methods without corresponding :" +"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)." + +#: library/cmd.rst:208 +msgid "" +"The character used to draw separator lines under the help-message headers. " +"If empty, no ruler line is drawn. It defaults to ``'='``." +msgstr "" +"Le caractère utilisé pour afficher des lignes de séparation sous les en-" +"têtes de messages d'aide. Si il est vide, aucune ligne de séparation n'est " +"affichée. Par défaut, ce caractère vaut ``'='``." + +#: library/cmd.rst:214 +msgid "" +"A flag, defaulting to true. If true, :meth:`cmdloop` uses :func:`input` to " +"display a prompt and read the next command; if false, :meth:`sys.stdout." +"write` and :meth:`sys.stdin.readline` are used. (This means that by " +"importing :mod:`readline`, on systems that support it, the interpreter will " +"automatically support :program:`Emacs`\\ -like line editing and command-" +"history keystrokes.)" +msgstr "" +"Un *flag*, valant *True* par défaut. Si ce *flag* est vrai, :meth:`cmdloop` " +"utilise :func:`input` pour afficher une invite de commande et lire la " +"prochaine commande; si il est faux, :meth:`sys.stdout.write` et :meth:`sys." +"stdin.readline` sont utilisées. (Cela signifie qu'en important :mod:" +"`readline` sur les systèmes qui le supportent, l'interpréteur va " +"automatiquement supporter une édition de ligne similaire à :program:`Emacs` " +"ainsi que des touches d'historique de commande)." + +#: library/cmd.rst:224 +msgid "Cmd Example" +msgstr "Exemple" + +#: library/cmd.rst:228 +msgid "" +"The :mod:`cmd` module is mainly useful for building custom shells that let a " +"user work with a program interactively." +msgstr "" +"Le module :mod:`cmd` est utile pour produire des invites de commande " +"permettant à l'utilisateur de travailler avec un programme de manière " +"interactive." + +#: library/cmd.rst:231 +msgid "" +"This section presents a simple example of how to build a shell around a few " +"of the commands in the :mod:`turtle` module." +msgstr "" +"Cette section présente un exemple simple de comment produire une invite de " +"commande autour de quelques commandes du module :mod:`turtle`." + +#: library/cmd.rst:234 +msgid "" +"Basic turtle commands such as :meth:`~turtle.forward` are added to a :class:" +"`Cmd` subclass with method named :meth:`do_forward`. The argument is " +"converted to a number and dispatched to the turtle module. The docstring is " +"used in the help utility provided by the shell." +msgstr "" +"Des commandes *turtle* basiques telles que :meth:`~turtle.forward` sont " +"ajoutées à une classe fille de :class:`Cmd` avec la méthode appelée :meth:" +"`do_forward`. L'argument est converti en nombre et envoyé au module " +"*turtle*. La *docstring* est utilisée dans l'utilitaire d'aide fourni par " +"l'invite de commande." + +#: library/cmd.rst:239 +msgid "" +"The example also includes a basic record and playback facility implemented " +"with the :meth:`~Cmd.precmd` method which is responsible for converting the " +"input to lowercase and writing the commands to a file. The :meth:" +"`do_playback` method reads the file and adds the recorded commands to the :" +"attr:`cmdqueue` for immediate playback::" +msgstr "" +"L'exemple inclut également un utilitaire d'enregistrement et de *playback* " +"implémenté avec la méthode :meth:`~Cmd.precmd`, qui est responsable du " +"passage de l'entrée en minuscules ainsi que d'écrire les commandes dans un " +"fichier. La méthode :meth:`do_playback` lit le fichier et ajoute les " +"commandes enregistrées à :attr:`cmdqueue` pour être rejouées immédiatement ::" + +#: library/cmd.rst:320 +msgid "" +"Here is a sample session with the turtle shell showing the help functions, " +"using blank lines to repeat commands, and the simple record and playback " +"facility:" +msgstr "" +"Voici une session d'exemple avec l'invite de commande *turtle*. Elle montre " +"les fonctions d'aide, utilise les lignes vides pour répéter des commandes et " +"montre l'utilitaire de *playback*:" diff --git a/library/code.po b/library/code.po new file mode 100644 index 0000000000..4b2d2f4afd --- /dev/null +++ b/library/code.po @@ -0,0 +1,233 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +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: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \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" + +#: library/code.rst:2 +msgid ":mod:`code` --- Interpreter base classes" +msgstr "" + +#: library/code.rst:7 +msgid "**Source code:** :source:`Lib/code.py`" +msgstr "**Code source :** :source:`Lib/code.py`" + +#: library/code.rst:11 +msgid "" +"The ``code`` module provides facilities to implement read-eval-print loops " +"in Python. Two classes and convenience functions are included which can be " +"used to build applications which provide an interactive interpreter prompt." +msgstr "" + +#: library/code.rst:18 +msgid "" +"This class deals with parsing and interpreter state (the user's namespace); " +"it does not deal with input buffering or prompting or input file naming (the " +"filename is always passed in explicitly). The optional *locals* argument " +"specifies the dictionary in which code will be executed; it defaults to a " +"newly created dictionary with key ``'__name__'`` set to ``'__console__'`` " +"and key ``'__doc__'`` set to ``None``." +msgstr "" + +#: library/code.rst:28 +msgid "" +"Closely emulate the behavior of the interactive Python interpreter. This " +"class builds on :class:`InteractiveInterpreter` and adds prompting using the " +"familiar ``sys.ps1`` and ``sys.ps2``, and input buffering." +msgstr "" + +#: library/code.rst:35 +msgid "" +"Convenience function to run a read-eval-print loop. This creates a new " +"instance of :class:`InteractiveConsole` and sets *readfunc* to be used as " +"the :meth:`InteractiveConsole.raw_input` method, if provided. If *local* is " +"provided, it is passed to the :class:`InteractiveConsole` constructor for " +"use as the default namespace for the interpreter loop. The :meth:`interact` " +"method of the instance is then run with *banner* and *exitmsg* passed as the " +"banner and exit message to use, if provided. The console object is " +"discarded after use." +msgstr "" + +#: library/code.rst:44 +msgid "Added *exitmsg* parameter." +msgstr "" + +#: library/code.rst:50 +msgid "" +"This function is useful for programs that want to emulate Python's " +"interpreter main loop (a.k.a. the read-eval-print loop). The tricky part is " +"to determine when the user has entered an incomplete command that can be " +"completed by entering more text (as opposed to a complete command or a " +"syntax error). This function *almost* always makes the same decision as the " +"real interpreter main loop." +msgstr "" + +#: library/code.rst:57 +msgid "" +"*source* is the source string; *filename* is the optional filename from " +"which source was read, defaulting to ``''``; and *symbol* is the " +"optional grammar start symbol, which should be ``'single'`` (the default), " +"``'eval'`` or ``'exec'``." +msgstr "" + +#: library/code.rst:62 +msgid "" +"Returns a code object (the same as ``compile(source, filename, symbol)``) if " +"the command is complete and valid; ``None`` if the command is incomplete; " +"raises :exc:`SyntaxError` if the command is complete and contains a syntax " +"error, or raises :exc:`OverflowError` or :exc:`ValueError` if the command " +"contains an invalid literal." +msgstr "" + +#: library/code.rst:72 +msgid "Interactive Interpreter Objects" +msgstr "" + +#: library/code.rst:77 +msgid "" +"Compile and run some source in the interpreter. Arguments are the same as " +"for :func:`compile_command`; the default for *filename* is ``''``, " +"and for *symbol* is ``'single'``. One of several things can happen:" +msgstr "" + +#: library/code.rst:81 +msgid "" +"The input is incorrect; :func:`compile_command` raised an exception (:exc:" +"`SyntaxError` or :exc:`OverflowError`). A syntax traceback will be printed " +"by calling the :meth:`showsyntaxerror` method. :meth:`runsource` returns " +"``False``." +msgstr "" + +#: library/code.rst:86 +msgid "" +"The input is incomplete, and more input is required; :func:`compile_command` " +"returned ``None``. :meth:`runsource` returns ``True``." +msgstr "" + +#: library/code.rst:89 +msgid "" +"The input is complete; :func:`compile_command` returned a code object. The " +"code is executed by calling the :meth:`runcode` (which also handles run-time " +"exceptions, except for :exc:`SystemExit`). :meth:`runsource` returns " +"``False``." +msgstr "" + +#: library/code.rst:93 +msgid "" +"The return value can be used to decide whether to use ``sys.ps1`` or ``sys." +"ps2`` to prompt the next line." +msgstr "" + +#: library/code.rst:99 +msgid "" +"Execute a code object. When an exception occurs, :meth:`showtraceback` is " +"called to display a traceback. All exceptions are caught except :exc:" +"`SystemExit`, which is allowed to propagate." +msgstr "" + +#: library/code.rst:103 +msgid "" +"A note about :exc:`KeyboardInterrupt`: this exception may occur elsewhere in " +"this code, and may not always be caught. The caller should be prepared to " +"deal with it." +msgstr "" + +#: library/code.rst:110 +msgid "" +"Display the syntax error that just occurred. This does not display a stack " +"trace because there isn't one for syntax errors. If *filename* is given, it " +"is stuffed into the exception instead of the default filename provided by " +"Python's parser, because it always uses ``''`` when reading from a " +"string. The output is written by the :meth:`write` method." +msgstr "" + +#: library/code.rst:119 +msgid "" +"Display the exception that just occurred. We remove the first stack item " +"because it is within the interpreter object implementation. The output is " +"written by the :meth:`write` method." +msgstr "" + +#: library/code.rst:123 +msgid "" +"The full chained traceback is displayed instead of just the primary " +"traceback." +msgstr "" + +#: library/code.rst:129 +msgid "" +"Write a string to the standard error stream (``sys.stderr``). Derived " +"classes should override this to provide the appropriate output handling as " +"needed." +msgstr "" + +#: library/code.rst:136 +msgid "Interactive Console Objects" +msgstr "" + +#: library/code.rst:138 +msgid "" +"The :class:`InteractiveConsole` class is a subclass of :class:" +"`InteractiveInterpreter`, and so offers all the methods of the interpreter " +"objects as well as the following additions." +msgstr "" + +#: library/code.rst:145 +msgid "" +"Closely emulate the interactive Python console. The optional *banner* " +"argument specify the banner to print before the first interaction; by " +"default it prints a banner similar to the one printed by the standard Python " +"interpreter, followed by the class name of the console object in parentheses " +"(so as not to confuse this with the real interpreter -- since it's so " +"close!)." +msgstr "" + +#: library/code.rst:151 +msgid "" +"The optional *exitmsg* argument specifies an exit message printed when " +"exiting. Pass the empty string to suppress the exit message. If *exitmsg* is " +"not given or ``None``, a default message is printed." +msgstr "" + +#: library/code.rst:155 +msgid "To suppress printing any banner, pass an empty string." +msgstr "" + +#: library/code.rst:158 +msgid "Print an exit message when exiting." +msgstr "" + +#: library/code.rst:164 +msgid "" +"Push a line of source text to the interpreter. The line should not have a " +"trailing newline; it may have internal newlines. The line is appended to a " +"buffer and the interpreter's :meth:`runsource` method is called with the " +"concatenated contents of the buffer as source. If this indicates that the " +"command was executed or invalid, the buffer is reset; otherwise, the command " +"is incomplete, and the buffer is left as it was after the line was " +"appended. The return value is ``True`` if more input is required, ``False`` " +"if the line was dealt with in some way (this is the same as :meth:" +"`runsource`)." +msgstr "" + +#: library/code.rst:176 +msgid "Remove any unhandled source text from the input buffer." +msgstr "" + +#: library/code.rst:181 +msgid "" +"Write a prompt and read a line. The returned line does not include the " +"trailing newline. When the user enters the EOF key sequence, :exc:" +"`EOFError` is raised. The base implementation reads from ``sys.stdin``; a " +"subclass may replace this with a different implementation." +msgstr "" diff --git a/library/codecs.po b/library/codecs.po new file mode 100644 index 0000000000..5714923a34 --- /dev/null +++ b/library/codecs.po @@ -0,0 +1,2877 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-22 22:57+0100\n" +"PO-Revision-Date: 2022-10-18 16:08+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.3\n" + +#: library/codecs.rst:2 +msgid ":mod:`codecs` --- Codec registry and base classes" +msgstr ":mod:`codecs` — Registre des codecs et classes de base associées" + +#: library/codecs.rst:11 +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 (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 " +"codecs internes à Python, qui gère le processus de recherche de codecs et de " +"gestion des erreurs. La plupart des codecs sont des :term:`encodeurs de " +"texte `, qui encode du texte vers des séquences d'octets " +"(type *bytes* de Python) mais il existe aussi des codecs qui encodent du " +"texte vers du texte et des *bytes* vers des *bytes*. Les codecs " +"personnalisés peuvent encoder et décoder des types arbitraires, mais " +"l'utilisation de certaines fonctionnalités du module est restreinte aux :" +"term:`encodeurs de texte ` ou aux codecs qui encodent vers :" +"class:`bytes`." + +#: library/codecs.rst:33 +msgid "" +"The module defines the following functions for encoding and decoding with " +"any codec:" +msgstr "" +"Le module définit les fonctions suivantes pour encoder et décoder à l'aide " +"de n'importe quel codec :" + +#: library/codecs.rst:38 +msgid "Encodes *obj* using the codec registered for *encoding*." +msgstr "Encode *obj* en utilisant le codec enregistré pour *encoding*." + +#: library/codecs.rst:40 +msgid "" +"*Errors* may be given to set the desired error handling scheme. The default " +"error handler is ``'strict'`` meaning that encoding errors raise :exc:" +"`ValueError` (or a more codec specific subclass, such as :exc:" +"`UnicodeEncodeError`). Refer to :ref:`codec-base-classes` for more " +"information on codec error handling." +msgstr "" +"Vous pouvez spécifier *errors* pour définir la façon de gérer les erreurs. " +"Le gestionnaire d'erreurs par défaut est ``'strict'``, ce qui veut dire " +"qu'une erreur lors de l'encodage lève :exc:`ValueError` (ou une sous-classe " +"spécifique du codec, telle que :exc:`UnicodeEncodeError`). Référez-vous aux :" +"ref:`classes de base des codecs ` pour plus " +"d'informations sur la gestion des erreurs par les codecs." + +#: library/codecs.rst:48 +msgid "Decodes *obj* using the codec registered for *encoding*." +msgstr "Décode *obj* en utilisant le codec enregistré pour *encoding*." + +#: library/codecs.rst:50 +msgid "" +"*Errors* may be given to set the desired error handling scheme. The default " +"error handler is ``'strict'`` meaning that decoding errors raise :exc:" +"`ValueError` (or a more codec specific subclass, such as :exc:" +"`UnicodeDecodeError`). Refer to :ref:`codec-base-classes` for more " +"information on codec error handling." +msgstr "" +"Vous pouvez spécifier *errors* pour définir la façon de gérer les erreurs. " +"Le gestionnaire d'erreurs par défaut est ``'strict'``, ce qui veut dire " +"qu'une erreur lors du décodage lève :exc:`ValueError` (ou une sous-classe " +"spécifique du codec, telle que :exc:`UnicodeDecodeError`). Référez-vous aux :" +"ref:`classes de base des codecs ` pour plus " +"d'informations sur la gestion des erreurs par les codecs." + +#: library/codecs.rst:56 +msgid "The full details for each codec can also be looked up directly:" +msgstr "" +"Les détails complets de chaque codec peuvent être examinés directement :" + +#: library/codecs.rst:60 +msgid "" +"Looks up the codec info in the Python codec registry and returns a :class:" +"`CodecInfo` object as defined below." +msgstr "" +"Recherche les informations relatives au codec dans le registre des codecs de " +"Python et renvoie l'objet :class:`CodecInfo` tel que défini ci-dessous." + +#: library/codecs.rst:63 +msgid "" +"Encodings are first looked up in the registry's cache. If not found, the " +"list of registered search functions is scanned. If no :class:`CodecInfo` " +"object is found, a :exc:`LookupError` is raised. Otherwise, the :class:" +"`CodecInfo` object is stored in the cache and returned to the caller." +msgstr "" +"Les encodeurs sont recherchés en priorité dans le cache du registre. S'ils " +"n'y sont pas, la liste des fonctions de recherche enregistrées est passée en " +"revue. Si aucun objet :class:`CodecInfo` n'est trouvé, une :exc:" +"`LookupError` est levée. Sinon, l'objet :class:`CodecInfo` est mis en cache " +"et renvoyé vers l'appelant." + +#: library/codecs.rst:70 +msgid "" +"Codec details when looking up the codec registry. The constructor arguments " +"are stored in attributes of the same name:" +msgstr "" +"Les détails d'un codec trouvé dans le registre des codecs. Les arguments du " +"constructeur sont stockés dans les attributs éponymes :" + +#: library/codecs.rst:76 +msgid "The name of the encoding." +msgstr "Le nom de l'encodeur." + +#: library/codecs.rst:82 +msgid "" +"The stateless encoding and decoding functions. These must be functions or " +"methods which have the same interface as the :meth:`~Codec.encode` and :meth:" +"`~Codec.decode` methods of Codec instances (see :ref:`Codec Interface `). The functions or methods are expected to work in a stateless " +"mode." +msgstr "" +"Les fonctions d'encodage et de décodage. Ces fonctions ou méthodes doivent " +"avoir la même interface que les méthodes :meth:`~Codec.encode` et :meth:" +"`~Codec.decode` des instances de Codec (voir :ref:`Interface des codecs " +"`). Les fonctions et méthodes sont censées fonctionner sans " +"état interne." + +#: library/codecs.rst:92 +msgid "" +"Incremental encoder and decoder classes or factory functions. These have to " +"provide the interface defined by the base classes :class:" +"`IncrementalEncoder` and :class:`IncrementalDecoder`, respectively. " +"Incremental codecs can maintain state." +msgstr "" +"Classes d'encodeurs et de décodeurs incrémentaux ou fonctions usines. Elles " +"doivent avoir respectivement les mêmes interfaces que celles définies par " +"les classes de base :class:`IncrementalEncoder` et :class:" +"`IncrementalDecoder`. Les codecs incrémentaux peuvent conserver des états " +"internes." + +#: library/codecs.rst:101 +msgid "" +"Stream writer and reader classes or factory functions. These have to provide " +"the interface defined by the base classes :class:`StreamWriter` and :class:" +"`StreamReader`, respectively. Stream codecs can maintain state." +msgstr "" +"Classes d'écriture et de lecture de flux ou fonctions usines. Elles doivent " +"avoir les mêmes interfaces que celles définies par les classes de base :" +"class:`StreamWriter` et :class:`StreamReader`, respectivement. Les codecs de " +"flux peuvent conserver un état interne." + +#: library/codecs.rst:106 +msgid "" +"To simplify access to the various codec components, the module provides " +"these additional functions which use :func:`lookup` for the codec lookup:" +msgstr "" +"Pour simplifier l'accès aux différents composants du codec, le module " +"fournit les fonctions supplémentaires suivantes qui utilisent :func:`lookup` " +"pour la recherche du codec :" + +#: library/codecs.rst:111 +msgid "" +"Look up the codec for the given encoding and return its encoder function." +msgstr "" +"Recherche le codec pour l'encodage *encoding* et renvoie sa fonction " +"d'encodage." + +#: library/codecs.rst:120 library/codecs.rst:154 +msgid "Raises a :exc:`LookupError` in case the encoding cannot be found." +msgstr "Lève une :exc:`LookupError` si l'encodage *encoding* n'est pas trouvé." + +#: library/codecs.rst:118 +msgid "" +"Look up the codec for the given encoding and return its decoder function." +msgstr "" +"Recherche le codec pour l'encodage *encoding* et renvoie sa fonction de " +"décodage." + +#: library/codecs.rst:125 +msgid "" +"Look up the codec for the given encoding and return its incremental encoder " +"class or factory function." +msgstr "" +"Recherche le codec pour l'encodage *encoding* et renvoie sa classe " +"d'encodage incrémental ou la fonction usine." + +#: library/codecs.rst:128 +msgid "" +"Raises a :exc:`LookupError` in case the encoding cannot be found or the " +"codec doesn't support an incremental encoder." +msgstr "" +"Lève une :exc:`LookupError` si l'encodage *encoding* n'est pas trouvé ou si " +"le codec ne gère pas l'encodage incrémental." + +#: library/codecs.rst:134 +msgid "" +"Look up the codec for the given encoding and return its incremental decoder " +"class or factory function." +msgstr "" +"Recherche le codec pour l'encodage *encoding* et renvoie sa classe de " +"décodage incrémental ou la fonction usine." + +#: library/codecs.rst:137 +msgid "" +"Raises a :exc:`LookupError` in case the encoding cannot be found or the " +"codec doesn't support an incremental decoder." +msgstr "" +"Lève une :exc:`LookupError` si l'encodage *encoding* n'est pas trouvé ou si " +"le codec ne gère pas le décodage incrémental." + +#: library/codecs.rst:143 +msgid "" +"Look up the codec for the given encoding and return its :class:" +"`StreamReader` class or factory function." +msgstr "" +"Recherche le codec pour l'encodage *encoding* et renvoie sa classe :class:" +"`StreamReader` ou la fonction usine." + +#: library/codecs.rst:151 +msgid "" +"Look up the codec for the given encoding and return its :class:" +"`StreamWriter` class or factory function." +msgstr "" +"Recherche le codec pour l'encodage *encoding* et renvoie sa classe :class:" +"`StreamWriter` ou la fonction usine." + +#: library/codecs.rst:156 +msgid "" +"Custom codecs are made available by registering a suitable codec search " +"function:" +msgstr "" +"Les codecs personnalisés sont mis à disposition en enregistrant une fonction " +"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 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 " +"minuscules, et renvoie un objet :class:`CodecInfo`. Si la fonction de " +"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 "" + +#: library/codecs.rst:173 +msgid "" +"Unregister a codec search function and clear the registry's cache. If the " +"search function is not registered, do nothing." +msgstr "" + +#: library/codecs.rst:179 +msgid "" +"While the builtin :func:`open` and the associated :mod:`io` module are the " +"recommended approach for working with encoded text files, this module " +"provides additional utility functions and classes that allow the use of a " +"wider range of codecs when working with binary files:" +msgstr "" +"Alors qu'il est recommandé d'utiliser la fonction native :func:`open` et le " +"module associé :mod:`io` pour travailler avec des fichiers texte encodés, le " +"présent module fournit des fonctions et classes utilitaires supplémentaires " +"qui permettent l'utilisation d'une plus large gamme de codecs si vous " +"travaillez avec des fichiers binaires :" + +#: library/codecs.rst:186 +msgid "" +"Open an encoded file using the given *mode* and return an instance of :class:" +"`StreamReaderWriter`, providing transparent encoding/decoding. The default " +"file mode is ``'r'``, meaning to open the file in read mode." +msgstr "" +"Ouvre un fichier encodé en utilisant le *mode* donné et renvoie une instance " +"de :class:`StreamReaderWriter`, permettant un encodage-décodage transparent. " +"Le mode de fichier par défaut est ``'r'``, ce qui signifie que le fichier " +"est ouvert en lecture." + +# Pas de majuscule en début car suit un deux-points. +#: library/codecs.rst:192 +#, fuzzy +msgid "" +"If *encoding* is not ``None``, then the underlying encoded files are always " +"opened in binary mode. No automatic conversion of ``'\\n'`` is done on " +"reading and writing. The *mode* argument may be any binary mode acceptable " +"to the built-in :func:`open` function; the ``'b'`` is automatically added." +msgstr "" +"les fichiers encodés sous-jacents sont toujours ouverts en mode binaire. " +"Aucune conversion automatique de ``'\\n'`` n'est effectuée à la lecture ou à " +"l'écriture. L'argument *mode* peut être n'importe quel mode binaire " +"acceptable pour la fonction native :func:`open` ; le ``'b'`` est " +"automatiquement ajouté." + +#: library/codecs.rst:198 +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 " +"types supported by the file methods depend on the codec used." +msgstr "" +"*encoding* spécifie l'encodage à utiliser pour le fichier. Tout encodage qui " +"encode et décode des octets (type *bytes*) est autorisé et les types de " +"données pris en charge par les méthodes relatives aux fichiers dépendent du " +"codec utilisé." + +#: library/codecs.rst:202 +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 " +"encoding error occurs." +msgstr "" +"*errors* peut être spécifié pour définir la gestion des erreurs. La valeur " +"par défaut est ``'strict'``, ce qui lève une :exc:`ValueError` en cas " +"d'erreur lors du codage." + +#: library/codecs.rst:205 +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." +msgstr "" +"*buffering* a la même signification que pour la fonction native :func:" +"`open`. Il vaut ``-1`` par défaut, ce qui signifie que la taille par défaut " +"du tampon est utilisée." + +#: library/codecs.rst:211 +msgid "" +"Return a :class:`StreamRecoder` instance, a wrapped version of *file* which " +"provides transparent transcoding. The original file is closed when the " +"wrapped version is closed." +msgstr "" +"Renvoie une instance de :class:`StreamRecoder`, version encapsulée de *file* " +"qui fournit un transcodage transparent. Le fichier original est fermé quand " +"la version encapsulée est fermée." + +#: library/codecs.rst:215 +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 " +"*file_encoding*. Bytes read from the original file are decoded according to " +"*file_encoding*, and the result is encoded using *data_encoding*." +msgstr "" +"Les données écrites dans un fichier encapsulant sont décodées en fonction du " +"*data_encoding* spécifié puis écrites vers le fichier original en tant que " +"*bytes* en utilisant *file_encoding*. Les octets lus dans le fichier " +"original sont décodés conformément à *file_encoding* et le résultat est " +"encodé en utilisant *data_encoding*." + +#: library/codecs.rst:221 +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:223 +msgid "" +"*errors* may be given to define the error handling. It defaults to " +"``'strict'``, which causes :exc:`ValueError` to be raised in case an " +"encoding error occurs." +msgstr "" +"*errors* peut être spécifié pour définir la gestion des erreurs. La valeur " +"par défaut est ``'strict'``, ce qui lève une :exc:`ValueError` en cas " +"d'erreur lors du codage." + +#: library/codecs.rst:230 +msgid "" +"Uses an incremental encoder to iteratively encode the input provided by " +"*iterator*. This function is a :term:`generator`. The *errors* argument (as " +"well as any other keyword argument) is passed through to the incremental " +"encoder." +msgstr "" +"Utilise un encodeur incrémental pour encoder de manière itérative l'entrée " +"fournie par *iterator*. Cette fonction est un :term:`générateur " +"`. L'argument *errors* (ainsi que tout autre argument passé par " +"son nom) est transmis à l'encodeur incrémental." + +#: library/codecs.rst:235 +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 " +"``base64_codec``." +msgstr "" +"Cette fonction nécessite que le codec accepte les objets texte (classe :" +"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:242 +msgid "" +"Uses an incremental decoder to iteratively decode the input provided by " +"*iterator*. This function is a :term:`generator`. The *errors* argument (as " +"well as any other keyword argument) is passed through to the incremental " +"decoder." +msgstr "" +"Utilise un décodeur incrémental pour décoder de manière itérative l'entrée " +"fournie par *iterator*. Cette fonction est un :term:`générateur`. L'argument " +"*errors* (ainsi que tout autre argument passé par son nom) est transmis au " +"décodeur incrémental." + +#: library/codecs.rst:247 +msgid "" +"This function requires that the codec accept :class:`bytes` objects to " +"decode. Therefore it does not support text-to-text encoders such as " +"``rot_13``, although ``rot_13`` may be used equivalently with :func:" +"`iterencode`." +msgstr "" +"Cette fonction requiert que le codec accepte les objets :class:`bytes` en " +"entrée. Par conséquent, elle ne prend pas en charge les encodeurs de texte " +"vers texte tels que ``rot_13``, bien que ``rot_13`` puisse être utilisé de " +"manière équivalente avec :func:`iterencode`." + +#: library/codecs.rst:253 +msgid "" +"The module also provides the following constants which are useful for " +"reading and writing to platform dependent files:" +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:268 +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 " +"streams to indicate the byte order used, and in UTF-8 as a Unicode " +"signature. :const:`BOM_UTF16` is either :const:`BOM_UTF16_BE` or :const:" +"`BOM_UTF16_LE` depending on the platform's native byte order, :const:`BOM` " +"is an alias for :const:`BOM_UTF16`, :const:`BOM_LE` for :const:" +"`BOM_UTF16_LE` and :const:`BOM_BE` for :const:`BOM_UTF16_BE`. The others " +"represent the BOM in UTF-8 and UTF-32 encodings." +msgstr "" +"Ces constantes définissent diverses séquences d'octets, les marques d'ordre " +"d'octets (BOM pour *byte order mark* en anglais) Unicode pour plusieurs " +"encodages. Elles sont utilisées dans les flux de données UTF-16 et UTF-32 " +"pour indiquer l'ordre des octets utilisé, et dans UTF-8 comme signature " +"Unicode. :const:`BOM_UTF16` vaut soit :const:`BOM_UTF16_BE`, soit :const:" +"`BOM_UTF16_LE` selon le boutisme natif de la plateforme, :const:`BOM` est un " +"alias pour :const:`BOM_UTF16`, :const:`BOM_LE` pour :const:`BOM_UTF16_LE` " +"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:282 +msgid "Codec Base Classes" +msgstr "Classes de base de codecs" + +#: library/codecs.rst:284 +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 " +"for custom codec implementations." +msgstr "" +"Le module :mod:`codecs` définit un ensemble de classes de base qui " +"spécifient les interfaces pour travailler avec des objets codecs et qui " +"peuvent également être utilisées comme base pour des implémentations de " +"codecs personnalisés." + +#: library/codecs.rst:288 +msgid "" +"Each codec has to define four interfaces to make it usable as codec in " +"Python: stateless encoder, stateless decoder, stream reader and stream " +"writer. The stream reader and writers typically reuse the stateless encoder/" +"decoder to implement the file protocols. Codec authors also need to define " +"how the codec will handle encoding and decoding errors." +msgstr "" +"Chaque codec doit définir quatre interfaces pour être utilisable comme codec " +"en Python : codeur sans état, décodeur sans état, lecteur de flux et " +"écrivain de flux. Le lecteur et l'écrivain de flux réutilisent généralement " +"l'encodeur-décodeur sans état pour implémenter les protocoles de fichiers. " +"Les auteurs de codecs doivent également définir comment le codec gère les " +"erreurs d'encodage et de décodage." + +#: library/codecs.rst:299 +msgid "Error Handlers" +msgstr "Gestionnaires d'erreurs" + +#: library/codecs.rst:301 +#, fuzzy +msgid "" +"To simplify and standardize error handling, codecs may implement different " +"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 " +"l'argument *errors* de type chaîne. Les chaînes suivantes sont définies et " +"les gestionnaires correspondants implémentés par tous les codecs Python " +"standards :" + +#: library/codecs.rst:321 +#, 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:369 library/codecs.rst:388 +msgid "Value" +msgstr "Valeur" + +#: library/codecs.rst:369 library/codecs.rst:1321 library/codecs.rst:1443 +msgid "Meaning" +msgstr "Signification" + +#: library/codecs.rst:329 +msgid "``'strict'``" +msgstr "``'strict'``" + +#: library/codecs.rst:329 +#, fuzzy +msgid "" +"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:333 +msgid "``'ignore'``" +msgstr "``'ignore'``" + +#: library/codecs.rst:333 +msgid "" +"Ignore the malformed data and continue without further notice. Implemented " +"in :func:`ignore_errors`." +msgstr "" +"Ignore les données incorrectement formatées et continue sans rien signaler. " +"Implémenté dans :func:`ignore_errors`." + +#: library/codecs.rst:337 +msgid "``'replace'``" +msgstr "``'replace'``" + +#: library/codecs.rst:337 +#, fuzzy +msgid "" +"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:343 +msgid "``'backslashreplace'``" +msgstr "``'backslashreplace'``" + +#: library/codecs.rst:343 +msgid "" +"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 "" + +#: library/codecs.rst:351 +msgid "``'surrogateescape'``" +msgstr "``'surrogateescape'``" + +#: library/codecs.rst:351 +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.)" +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:365 +#, 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:371 +msgid "``'xmlcharrefreplace'``" +msgstr "``'xmlcharrefreplace'``" + +#: library/codecs.rst:371 +#, 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:376 +msgid "``'namereplace'``" +msgstr "``'namereplace'``" + +#: library/codecs.rst:376 +#, 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:385 +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:388 +msgid "Codecs" +msgstr "Codecs" + +#: library/codecs.rst:390 +msgid "``'surrogatepass'``" +msgstr "``'surrogatepass'``" + +#: library/codecs.rst:390 +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:390 +#, fuzzy +msgid "" +"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:397 +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:400 +#, fuzzy +msgid "" +"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:404 +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:407 +#, fuzzy +msgid "" +"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:411 +msgid "" +"The set of allowed values can be extended by registering a new named error " +"handler:" +msgstr "" +"L'ensemble des valeurs autorisées peut être étendu en enregistrant un " +"nouveau gestionnaire d'erreurs nommé :" + +#: library/codecs.rst:416 +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:420 +msgid "" +"For encoding, *error_handler* will be called with a :exc:" +"`UnicodeEncodeError` instance, which contains information about the location " +"of the error. The error handler must either raise this or a different " +"exception, or return a tuple with a replacement for the unencodable part of " +"the input and a position where encoding should continue. The replacement may " +"be either :class:`str` or :class:`bytes`. If the replacement is bytes, the " +"encoder will simply copy them into the output buffer. If the replacement is " +"a string, the encoder will encode the replacement. Encoding continues on " +"original input at the specified position. Negative position values will be " +"treated as being relative to the end of the input string. If the resulting " +"position is out of bound an :exc:`IndexError` will be raised." +msgstr "" + +#: library/codecs.rst:432 +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:437 +msgid "" +"Previously registered error handlers (including the standard error handlers) " +"can be looked up by name:" +msgstr "" + +#: library/codecs.rst:442 +msgid "Return the error handler previously registered under the name *name*." +msgstr "" + +#: library/codecs.rst:444 +msgid "Raises a :exc:`LookupError` in case the handler cannot be found." +msgstr "" + +#: library/codecs.rst:446 +msgid "" +"The following standard error handlers are also made available as module " +"level functions:" +msgstr "" + +# pas de majuscule en début de phrase car suit un deux-points. +#: library/codecs.rst:451 +#, fuzzy +msgid "Implements the ``'strict'`` error handling." +msgstr "le gestionnaire d'erreurs ``'namereplace'``." + +#: library/codecs.rst:453 +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:458 +#, fuzzy +msgid "Implements the ``'ignore'`` error handling." +msgstr "le gestionnaire d'erreurs ``'namereplace'``." + +#: library/codecs.rst:460 +msgid "" +"Malformed data is ignored; encoding or decoding is continued without further " +"notice." +msgstr "" + +# pas de majuscule en début de phrase car suit un deux-points. +#: library/codecs.rst:466 +#, fuzzy +msgid "Implements the ``'replace'`` error handling." +msgstr "le gestionnaire d'erreurs ``'namereplace'``." + +#: library/codecs.rst:468 +msgid "" +"Substitutes ``?`` (ASCII character) for encoding errors or ``�`` (U+FFFD, " +"the official REPLACEMENT CHARACTER) for decoding errors." +msgstr "" + +# pas de majuscule en début de phrase car suit un deux-points. +#: library/codecs.rst:474 +#, fuzzy +msgid "Implements the ``'backslashreplace'`` error handling." +msgstr "le gestionnaire d'erreurs ``'namereplace'``." + +#: library/codecs.rst:476 +msgid "" +"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:481 +msgid "Works with decoding and translating." +msgstr "" + +#: library/codecs.rst:487 +msgid "" +"Implements the ``'xmlcharrefreplace'`` error handling (for encoding within :" +"term:`text encoding` only)." +msgstr "" + +#: library/codecs.rst:490 +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:497 +msgid "" +"Implements the ``'namereplace'`` error handling (for encoding within :term:" +"`text encoding` only)." +msgstr "" + +#: library/codecs.rst:500 +msgid "" +"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:511 +msgid "Stateless Encoding and Decoding" +msgstr "" + +#: library/codecs.rst:513 +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:519 +msgid "" +"Encodes the object *input* and returns a tuple (output object, length " +"consumed). For instance, :term:`text encoding` converts a string object to a " +"bytes object using a particular character set encoding (e.g., ``cp1252`` or " +"``iso-8859-1``)." +msgstr "" + +#: library/codecs.rst:546 +msgid "" +"The *errors* argument defines the error handling to apply. It defaults to " +"``'strict'`` handling." +msgstr "" + +#: library/codecs.rst:527 +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:531 +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:537 +msgid "" +"Decodes the object *input* and returns a tuple (output object, length " +"consumed). For instance, for a :term:`text encoding`, decoding converts a " +"bytes object encoded using a particular character set encoding to a string " +"object." +msgstr "" + +#: library/codecs.rst:542 +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:549 +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:553 +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:558 +msgid "Incremental Encoding and Decoding" +msgstr "" + +#: library/codecs.rst:560 +msgid "" +"The :class:`IncrementalEncoder` and :class:`IncrementalDecoder` classes " +"provide the basic interface for incremental encoding and decoding. Encoding/" +"decoding the input isn't done with one call to the stateless encoder/decoder " +"function, but with multiple calls to the :meth:`~IncrementalEncoder.encode`/:" +"meth:`~IncrementalDecoder.decode` method of the incremental encoder/decoder. " +"The incremental encoder/decoder keeps track of the encoding/decoding process " +"during method calls." +msgstr "" + +#: library/codecs.rst:568 +msgid "" +"The joined output of calls to the :meth:`~IncrementalEncoder.encode`/:meth:" +"`~IncrementalDecoder.decode` method is the same as if all the single inputs " +"were joined into one, and this input was encoded/decoded with the stateless " +"encoder/decoder." +msgstr "" + +#: library/codecs.rst:577 +msgid "IncrementalEncoder Objects" +msgstr "" + +#: library/codecs.rst:579 +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:586 +msgid "Constructor for an :class:`IncrementalEncoder` instance." +msgstr "" + +#: library/codecs.rst:588 +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:592 +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:596 +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 " +"error handling strategies during the lifetime of the :class:" +"`IncrementalEncoder` object." +msgstr "" + +#: library/codecs.rst:604 +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:611 +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:618 +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 " +"that are more complicated than integers can be converted into an integer by " +"marshaling/pickling the state and encoding the bytes of the resulting string " +"into an integer.)" +msgstr "" + +#: library/codecs.rst:627 +msgid "" +"Set the state of the encoder to *state*. *state* must be an encoder state " +"returned by :meth:`getstate`." +msgstr "" + +#: library/codecs.rst:634 +msgid "IncrementalDecoder Objects" +msgstr "" + +#: library/codecs.rst:636 +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:643 +msgid "Constructor for an :class:`IncrementalDecoder` instance." +msgstr "" + +#: library/codecs.rst:645 +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:649 +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:653 +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 " +"error handling strategies during the lifetime of the :class:" +"`IncrementalDecoder` object." +msgstr "" + +#: library/codecs.rst:661 +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:" +"`decode` *final* must be true (the default is false). If *final* is true the " +"decoder must decode the input completely and must flush all buffers. If this " +"isn't possible (e.g. because of incomplete byte sequences at the end of the " +"input) it must initiate error handling just like in the stateless case " +"(which might raise an exception)." +msgstr "" + +#: library/codecs.rst:672 +msgid "Reset the decoder to the initial state." +msgstr "" + +#: library/codecs.rst:677 +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. " +"The second must be an integer and can be additional state info. (The " +"implementation should make sure that ``0`` is the most common additional " +"state info.) If this additional state info is ``0`` it must be possible to " +"set the decoder to the state which has no input buffered and ``0`` as the " +"additional state info, so that feeding the previously buffered input to the " +"decoder returns it to the previous state without producing any output. " +"(Additional state info that is more complicated than integers can be " +"converted into an integer by marshaling/pickling the info and encoding the " +"bytes of the resulting string into an integer.)" +msgstr "" + +#: library/codecs.rst:692 +msgid "" +"Set the state of the decoder to *state*. *state* must be a decoder state " +"returned by :meth:`getstate`." +msgstr "" + +#: library/codecs.rst:697 +msgid "Stream Encoding and Decoding" +msgstr "" + +#: library/codecs.rst:700 +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:708 +msgid "StreamWriter Objects" +msgstr "" + +#: library/codecs.rst:710 +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:717 +msgid "Constructor for a :class:`StreamWriter` instance." +msgstr "" + +#: library/codecs.rst:719 +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:723 +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:726 +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:730 +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 " +"error handling strategies during the lifetime of the :class:`StreamWriter` " +"object." +msgstr "" + +#: library/codecs.rst:736 +msgid "Writes the object's contents encoded to the stream." +msgstr "" + +#: library/codecs.rst:741 +msgid "" +"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:844 +msgid "Resets the codec buffers used for keeping internal state." +msgstr "" + +#: library/codecs.rst:751 +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:756 +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:763 +msgid "StreamReader Objects" +msgstr "" + +#: library/codecs.rst:765 +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:772 +msgid "Constructor for a :class:`StreamReader` instance." +msgstr "" + +#: library/codecs.rst:774 +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:778 +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:781 +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:785 +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 " +"error handling strategies during the lifetime of the :class:`StreamReader` " +"object." +msgstr "" + +#: library/codecs.rst:789 +msgid "" +"The set of allowed values for the *errors* argument can be extended with :" +"func:`register_error`." +msgstr "" + +#: library/codecs.rst:795 +msgid "Decodes data from the stream and returns the resulting object." +msgstr "" + +#: library/codecs.rst:797 +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:802 +msgid "" +"The *size* argument indicates the approximate maximum number of encoded " +"bytes or code points to read for decoding. The decoder can modify this " +"setting as appropriate. The default value -1 indicates to read and decode as " +"much as possible. This parameter is intended to prevent having to decode " +"huge files in one step." +msgstr "" + +#: library/codecs.rst:809 +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:813 +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 " +"size, e.g. if optional encoding endings or state markers are available on " +"the stream, these should be read too." +msgstr "" + +#: library/codecs.rst:821 +msgid "Read one line from the input stream and return the decoded data." +msgstr "" + +#: library/codecs.rst:823 +msgid "" +"*size*, if given, is passed as size argument to the stream's :meth:`read` " +"method." +msgstr "" + +#: library/codecs.rst:826 +msgid "" +"If *keepends* is false line-endings will be stripped from the lines returned." +msgstr "" + +#: library/codecs.rst:832 +msgid "" +"Read all lines available on the input stream and return them as a list of " +"lines." +msgstr "" + +#: library/codecs.rst:835 +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:838 +msgid "" +"*sizehint*, if given, is passed as the *size* argument to the stream's :meth:" +"`read` method." +msgstr "" + +#: library/codecs.rst:846 +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:850 +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:856 +msgid "StreamReaderWriter Objects" +msgstr "" + +#: library/codecs.rst:858 +msgid "" +"The :class:`StreamReaderWriter` is a convenience class that allows wrapping " +"streams which work in both read and write modes." +msgstr "" + +#: library/codecs.rst:885 +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:867 +msgid "" +"Creates a :class:`StreamReaderWriter` instance. *stream* must be a file-like " +"object. *Reader* and *Writer* must be factory functions or classes providing " +"the :class:`StreamReader` and :class:`StreamWriter` interface resp. Error " +"handling is done in the same way as defined for the stream readers and " +"writers." +msgstr "" + +#: library/codecs.rst:872 +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:880 +msgid "StreamRecoder Objects" +msgstr "" + +#: library/codecs.rst:882 +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:891 +msgid "" +"Creates a :class:`StreamRecoder` instance which implements a two-way " +"conversion: *encode* and *decode* work on the frontend — the data visible to " +"code calling :meth:`read` and :meth:`write`, while *Reader* and *Writer* " +"work on the backend — the data in *stream*." +msgstr "" + +#: library/codecs.rst:896 +msgid "" +"You can use these objects to do transparent transcodings, e.g., from Latin-1 " +"to UTF-8 and back." +msgstr "" + +#: library/codecs.rst:899 +msgid "The *stream* argument must be a file-like object." +msgstr "" + +#: library/codecs.rst:901 +msgid "" +"The *encode* and *decode* arguments must adhere to the :class:`Codec` " +"interface. *Reader* and *Writer* must be factory functions or classes " +"providing objects of the :class:`StreamReader` and :class:`StreamWriter` " +"interface respectively." +msgstr "" + +#: library/codecs.rst:906 +msgid "" +"Error handling is done in the same way as defined for the stream readers and " +"writers." +msgstr "" + +#: library/codecs.rst:910 +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:918 +msgid "Encodings and Unicode" +msgstr "" + +#: library/codecs.rst:920 +msgid "" +"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:930 +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 " +"string object that contains code points above ``U+00FF`` can't be encoded " +"with this codec. Doing so will raise a :exc:`UnicodeEncodeError` that looks " +"like the following (although the details of the error message may differ): " +"``UnicodeEncodeError: 'latin-1' codec can't encode character '\\u1234' in " +"position 3: ordinal not in range(256)``." +msgstr "" + +#: library/codecs.rst:938 +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 " +"points are mapped to the bytes ``0x0``--``0xff``. To see how this is done " +"simply open e.g. :file:`encodings/cp1252.py` (which is an encoding that is " +"used primarily on Windows). There's a string constant with 256 characters " +"that shows you which character is mapped to which byte value." +msgstr "" + +#: library/codecs.rst:945 +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 " +"Unicode code point, is to store each code point as four consecutive bytes. " +"There are two possibilities: store the bytes in big endian or in little " +"endian order. These two encodings are called ``UTF-32-BE`` and ``UTF-32-LE`` " +"respectively. Their disadvantage is that if e.g. you use ``UTF-32-BE`` on a " +"little endian machine you will always have to swap bytes on encoding and " +"decoding. ``UTF-32`` avoids this problem: bytes will always be in natural " +"endianness. When these bytes are read by a CPU with a different endianness, " +"then bytes have to be swapped though. To be able to detect the endianness of " +"a ``UTF-16`` or ``UTF-32`` byte sequence, there's the so called BOM (\"Byte " +"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 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 " +"width and doesn't allow a word to be split. It can e.g. be used to give " +"hints to a ligature algorithm. With Unicode 4.0 using ``U+FEFF`` as a ``ZERO " +"WIDTH NO-BREAK SPACE`` has been deprecated (with ``U+2060`` (``WORD " +"JOINER``) assuming this role). Nevertheless Unicode software still must be " +"able to handle ``U+FEFF`` in both roles: as a BOM it's a device to determine " +"the storage layout of the encoded bytes, and vanishes once the byte sequence " +"has been decoded into a string; as a ``ZERO WIDTH NO-BREAK SPACE`` it's a " +"normal character that will be decoded like any other." +msgstr "" + +#: library/codecs.rst:971 +msgid "" +"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 " +"marker bits are a sequence of zero to four ``1`` bits followed by a ``0`` " +"bit. Unicode characters are encoded like this (with x being payload bits, " +"which when concatenated give the Unicode character):" +msgstr "" + +#: library/codecs.rst:980 +msgid "Range" +msgstr "*Range*" + +#: library/codecs.rst:980 +#, fuzzy +msgid "Encoding" +msgstr "Encodages" + +#: library/codecs.rst:982 +msgid "``U-00000000`` ... ``U-0000007F``" +msgstr "``U-00000000`` ... ``U-0000007F``" + +#: library/codecs.rst:982 +msgid "0xxxxxxx" +msgstr "0xxxxxxx" + +#: library/codecs.rst:984 +msgid "``U-00000080`` ... ``U-000007FF``" +msgstr "``U-00000080`` ... ``U-000007FF``" + +#: library/codecs.rst:984 +msgid "110xxxxx 10xxxxxx" +msgstr "110xxxxx 10xxxxxx" + +#: library/codecs.rst:986 +msgid "``U-00000800`` ... ``U-0000FFFF``" +msgstr "``U-00000800`` ... ``U-0000FFFF``" + +#: library/codecs.rst:986 +msgid "1110xxxx 10xxxxxx 10xxxxxx" +msgstr "1110xxxx 10xxxxxx 10xxxxxx" + +#: library/codecs.rst:988 +msgid "``U-00010000`` ... ``U-0010FFFF``" +msgstr "``U-00010000`` ... ``U-0010FFFF``" + +#: library/codecs.rst:988 +msgid "11110xxx 10xxxxxx 10xxxxxx 10xxxxxx" +msgstr "11110xxx 10xxxxxx 10xxxxxx 10xxxxxx" + +#: library/codecs.rst:991 +msgid "" +"The least significant bit of the Unicode character is the rightmost x bit." +msgstr "" + +#: library/codecs.rst:993 +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:997 +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 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 +msgid "LATIN SMALL LETTER I WITH DIAERESIS" +msgstr "LATIN SMALL LETTER I WITH DIAERESIS" + +#: library/codecs.rst:0 +msgid "RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK" +msgstr "RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK" + +#: library/codecs.rst:0 +msgid "INVERTED QUESTION MARK" +msgstr "INVERTED QUESTION MARK" + +#: library/codecs.rst:1013 +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 " +"to be able to determine the byte order used for generating the byte " +"sequence, but as a signature that helps in guessing the encoding. On " +"encoding the utf-8-sig codec will write ``0xef``, ``0xbb``, ``0xbf`` as the " +"first three bytes to the file. On decoding ``utf-8-sig`` will skip those " +"three bytes if they appear as the first three bytes in the file. In UTF-8, " +"the use of the BOM is discouraged and should generally be avoided." +msgstr "" + +#: library/codecs.rst:1026 +msgid "Standard Encodings" +msgstr "" + +#: library/codecs.rst:1028 +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 " +"the codecs by name, together with a few common aliases, and the languages " +"for which the encoding is likely used. Neither the list of aliases nor the " +"list of languages is meant to be exhaustive. Notice that spelling " +"alternatives that only differ in case or use a hyphen instead of an " +"underscore are also valid aliases; therefore, e.g. ``'utf-8'`` is a valid " +"alias for the ``'utf_8'`` codec." +msgstr "" + +#: library/codecs.rst:1038 +msgid "" +"Some common encodings can bypass the codecs lookup machinery to improve " +"performance. These optimization opportunities are only recognized by CPython " +"for a limited set of (case insensitive) aliases: utf-8, utf8, latin-1, " +"latin1, iso-8859-1, iso8859-1, mbcs (Windows only), ascii, us-ascii, utf-16, " +"utf16, utf-32, utf32, and the same using underscores instead of dashes. " +"Using alternative aliases for these encodings may result in slower execution." +msgstr "" + +#: library/codecs.rst:1046 +msgid "Optimization opportunity recognized for us-ascii." +msgstr "" + +#: library/codecs.rst:1049 +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 " +"in the assignment of characters to code positions. For the European " +"languages in particular, the following variants typically exist:" +msgstr "" + +#: library/codecs.rst:1054 +msgid "an ISO 8859 codeset" +msgstr "" + +#: library/codecs.rst:1056 +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:1059 +msgid "an IBM EBCDIC code page" +msgstr "" + +#: library/codecs.rst:1061 +msgid "an IBM PC code page, which is ASCII compatible" +msgstr "" + +#: library/codecs.rst:1321 library/codecs.rst:1443 +msgid "Codec" +msgstr "" + +#: library/codecs.rst:1321 library/codecs.rst:1443 +msgid "Aliases" +msgstr "" + +#: library/codecs.rst:1066 +msgid "Languages" +msgstr "" + +#: library/codecs.rst:1068 +msgid "ascii" +msgstr "*ascii*" + +#: library/codecs.rst:1068 +msgid "646, us-ascii" +msgstr "*646*, *us-ascii*" + +#: library/codecs.rst:1074 library/codecs.rst:1082 +msgid "English" +msgstr "Anglais" + +#: library/codecs.rst:1070 +msgid "big5" +msgstr "*big5*" + +#: library/codecs.rst:1070 +msgid "big5-tw, csbig5" +msgstr "*big5-tw*, *csbig5*" + +#: library/codecs.rst:1072 library/codecs.rst:1130 +msgid "Traditional Chinese" +msgstr "Chinois Traditionnel" + +#: library/codecs.rst:1072 +msgid "big5hkscs" +msgstr "*big5hkscs*" + +#: library/codecs.rst:1072 +msgid "big5-hkscs, hkscs" +msgstr "*big5-hkscs*, *hkscs*" + +#: library/codecs.rst:1074 +msgid "cp037" +msgstr "*cp037*" + +#: library/codecs.rst:1074 +msgid "IBM037, IBM039" +msgstr "*IBM037*, *IBM039*" + +#: library/codecs.rst:1076 +msgid "cp273" +msgstr "*cp273*" + +#: library/codecs.rst:1076 +msgid "273, IBM273, csIBM273" +msgstr "*273*, *IBM273*, *csIBM273*" + +#: library/codecs.rst:1076 +msgid "German" +msgstr "Allemand" + +#: library/codecs.rst:1080 +msgid "cp424" +msgstr "*cp424*" + +#: library/codecs.rst:1080 +msgid "EBCDIC-CP-HE, IBM424" +msgstr "*EBCDIC-CP-HE*, *IBM424*" + +#: library/codecs.rst:1100 library/codecs.rst:1153 library/codecs.rst:1216 +msgid "Hebrew" +msgstr "Hébreux" + +#: library/codecs.rst:1082 +msgid "cp437" +msgstr "*cp437*" + +#: library/codecs.rst:1082 +msgid "437, IBM437" +msgstr "*437*, *IBM437*" + +#: library/codecs.rst:1084 +msgid "cp500" +msgstr "*cp500*" + +#: library/codecs.rst:1084 +msgid "EBCDIC-CP-BE, EBCDIC-CP-CH, IBM500" +msgstr "*EBCDIC-CP-BE*, *EBCDIC-CP-CH*, *IBM500*" + +#: library/codecs.rst:1093 library/codecs.rst:1140 library/codecs.rst:1200 +#: library/codecs.rst:1256 +msgid "Western Europe" +msgstr "Europe de l'ouest" + +#: library/codecs.rst:1087 +msgid "cp720" +msgstr "*cp720*" + +#: library/codecs.rst:1114 library/codecs.rst:1212 +msgid "Arabic" +msgstr "Arabe" + +#: library/codecs.rst:1089 +msgid "cp737" +msgstr "*cp737*" + +#: library/codecs.rst:1120 library/codecs.rst:1149 library/codecs.rst:1249 +msgid "Greek" +msgstr "Grec" + +#: library/codecs.rst:1091 +msgid "cp775" +msgstr "*cp775*" + +#: library/codecs.rst:1091 +msgid "IBM775" +msgstr "*IBM775*" + +#: library/codecs.rst:1157 library/codecs.rst:1224 +msgid "Baltic languages" +msgstr "Langues Baltiques" + +#: library/codecs.rst:1093 +msgid "cp850" +msgstr "*cp850*" + +#: library/codecs.rst:1093 +msgid "850, IBM850" +msgstr "*850*, *IBM850*" + +#: library/codecs.rst:1095 +msgid "cp852" +msgstr "*cp852*" + +#: library/codecs.rst:1095 +msgid "852, IBM852" +msgstr "*852*, *IBM852*" + +#: library/codecs.rst:1142 library/codecs.rst:1253 +msgid "Central and Eastern Europe" +msgstr "Europe centrale et Europe de l'Est" + +#: library/codecs.rst:1097 +msgid "cp855" +msgstr "*cp855*" + +#: library/codecs.rst:1097 +msgid "855, IBM855" +msgstr "*855*, *IBM855*" + +#: library/codecs.rst:1144 library/codecs.rst:1246 +msgid "Bulgarian, Byelorussian, Macedonian, Russian, Serbian" +msgstr "Bulgare, Biélorusse, Macédonien, Russe, Serbe" + +#: library/codecs.rst:1100 +msgid "cp856" +msgstr "*cp856*" + +#: library/codecs.rst:1102 +msgid "cp857" +msgstr "*cp857*" + +#: library/codecs.rst:1102 +msgid "857, IBM857" +msgstr "*857*, *IBM857*" + +#: library/codecs.rst:1134 library/codecs.rst:1218 library/codecs.rst:1258 +msgid "Turkish" +msgstr "Turc" + +#: library/codecs.rst:1104 +msgid "cp858" +msgstr "*cp858*" + +#: library/codecs.rst:1104 +msgid "858, IBM858" +msgstr "*858*, *IBM858*" + +#: library/codecs.rst:1106 +msgid "cp860" +msgstr "*cp860*" + +#: library/codecs.rst:1106 +msgid "860, IBM860" +msgstr "*860*, *IBM860*" + +#: library/codecs.rst:1106 +msgid "Portuguese" +msgstr "Portugais" + +#: library/codecs.rst:1108 +msgid "cp861" +msgstr "*cp861*" + +#: library/codecs.rst:1108 +msgid "861, CP-IS, IBM861" +msgstr "*861*, *CP-IS*, *IBM861*" + +#: library/codecs.rst:1251 +msgid "Icelandic" +msgstr "Islandais" + +#: library/codecs.rst:1110 +msgid "cp862" +msgstr "*cp862*" + +#: library/codecs.rst:1110 +msgid "862, IBM862" +msgstr "*862*, *IBM862*" + +#: library/codecs.rst:1112 +msgid "cp863" +msgstr "*cp863*" + +#: library/codecs.rst:1112 +msgid "863, IBM863" +msgstr "*863*, *IBM863*" + +#: library/codecs.rst:1112 +msgid "Canadian" +msgstr "Canadien" + +#: library/codecs.rst:1114 +msgid "cp864" +msgstr "*cp864*" + +#: library/codecs.rst:1114 +msgid "IBM864" +msgstr "*IBM864*" + +#: library/codecs.rst:1116 +msgid "cp865" +msgstr "*cp865*" + +#: library/codecs.rst:1116 +msgid "865, IBM865" +msgstr "*865*, *IBM865*" + +#: library/codecs.rst:1116 +msgid "Danish, Norwegian" +msgstr "" + +#: library/codecs.rst:1118 +msgid "cp866" +msgstr "*cp866*" + +#: library/codecs.rst:1118 +msgid "866, IBM866" +msgstr "*866*, *IBM866*" + +#: library/codecs.rst:1234 +msgid "Russian" +msgstr "Russe" + +#: library/codecs.rst:1120 +msgid "cp869" +msgstr "*cp869*" + +#: library/codecs.rst:1120 +msgid "869, CP-GR, IBM869" +msgstr "*869*, *CP-GR*, *IBM869*" + +#: library/codecs.rst:1122 +msgid "cp874" +msgstr "*cp874*" + +#: library/codecs.rst:1122 +msgid "Thai" +msgstr "" + +#: library/codecs.rst:1124 +msgid "cp875" +msgstr "*cp875*" + +#: library/codecs.rst:1126 +msgid "cp932" +msgstr "*cp932*" + +#: library/codecs.rst:1126 +msgid "932, ms932, mskanji, ms-kanji" +msgstr "*932*, *ms932*, *mskanji*, *ms-kanji*" + +#: library/codecs.rst:1161 library/codecs.rst:1165 library/codecs.rst:1185 +#: library/codecs.rst:1193 library/codecs.rst:1263 library/codecs.rst:1269 +msgid "Japanese" +msgstr "" + +#: library/codecs.rst:1128 +msgid "cp949" +msgstr "*cp949*" + +#: library/codecs.rst:1128 +msgid "949, ms949, uhc" +msgstr "*949*, *ms949*, *uhc*" + +#: library/codecs.rst:1167 library/codecs.rst:1232 +msgid "Korean" +msgstr "" + +#: library/codecs.rst:1130 +msgid "cp950" +msgstr "*cp950*" + +#: library/codecs.rst:1130 +msgid "950, ms950" +msgstr "*950*, *ms950*" + +#: library/codecs.rst:1132 +msgid "cp1006" +msgstr "*cp1006*" + +#: library/codecs.rst:1132 +msgid "Urdu" +msgstr "" + +#: library/codecs.rst:1134 +msgid "cp1026" +msgstr "*cp1026*" + +#: library/codecs.rst:1134 +msgid "ibm1026" +msgstr "*ibm1026*" + +#: library/codecs.rst:1136 +msgid "cp1125" +msgstr "*cp1125*" + +#: library/codecs.rst:1136 +msgid "1125, ibm1125, cp866u, ruscii" +msgstr "*1125*, *ibm1125*, *cp866u*, *ruscii*" + +#: library/codecs.rst:1240 +msgid "Ukrainian" +msgstr "" + +#: library/codecs.rst:1140 +msgid "cp1140" +msgstr "*cp1140*" + +#: library/codecs.rst:1140 +msgid "ibm1140" +msgstr "*ibm1140*" + +#: library/codecs.rst:1142 +msgid "cp1250" +msgstr "*cp1250*" + +#: library/codecs.rst:1142 +msgid "windows-1250" +msgstr "*windows-1250*" + +#: library/codecs.rst:1144 +msgid "cp1251" +msgstr "*cp1251*" + +#: library/codecs.rst:1144 +msgid "windows-1251" +msgstr "*windows-1251*" + +#: library/codecs.rst:1147 +msgid "cp1252" +msgstr "*cp1252*" + +#: library/codecs.rst:1147 +msgid "windows-1252" +msgstr "*windows-1252*" + +#: library/codecs.rst:1149 +msgid "cp1253" +msgstr "*cp1253*" + +#: library/codecs.rst:1149 +msgid "windows-1253" +msgstr "*windows-1253*" + +#: library/codecs.rst:1151 +msgid "cp1254" +msgstr "*cp1254*" + +#: library/codecs.rst:1151 +msgid "windows-1254" +msgstr "*windows-1254*" + +#: library/codecs.rst:1153 +msgid "cp1255" +msgstr "*cp1255*" + +#: library/codecs.rst:1153 +msgid "windows-1255" +msgstr "*windows-1255*" + +#: library/codecs.rst:1155 +msgid "cp1256" +msgstr "*cp1256*" + +#: library/codecs.rst:1155 +msgid "windows-1256" +msgstr "*windows-1256*" + +#: library/codecs.rst:1157 +msgid "cp1257" +msgstr "*cp1257*" + +#: library/codecs.rst:1157 +msgid "windows-1257" +msgstr "*windows-1257*" + +#: library/codecs.rst:1159 +msgid "cp1258" +msgstr "*cp1258*" + +#: library/codecs.rst:1159 +msgid "windows-1258" +msgstr "*windows-1258*" + +#: library/codecs.rst:1159 +msgid "Vietnamese" +msgstr "" + +#: library/codecs.rst:1161 +msgid "euc_jp" +msgstr "*euc_jp*" + +#: library/codecs.rst:1161 +msgid "eucjp, ujis, u-jis" +msgstr "*eucjp*, *ujis*, *u-jis*" + +#: library/codecs.rst:1163 +msgid "euc_jis_2004" +msgstr "*euc_jis_2004*" + +#: library/codecs.rst:1163 +msgid "jisx0213, eucjis2004" +msgstr "*jisx0213*, *eucjis2004*" + +#: library/codecs.rst:1165 +msgid "euc_jisx0213" +msgstr "*euc_jisx0213*" + +#: library/codecs.rst:1165 +msgid "eucjisx0213" +msgstr "*eucjisx0213*" + +#: library/codecs.rst:1167 +msgid "euc_kr" +msgstr "*euc_kr*" + +#: library/codecs.rst:1167 +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:1171 +msgid "gb2312" +msgstr "*gb2312*" + +#: library/codecs.rst:1171 +msgid "" +"chinese, csiso58gb231280, euc-cn, euccn, eucgb2312-cn, gb2312-1980, " +"gb2312-80, iso-ir-58" +msgstr "" +"*chinese*, *csiso58gb231280*, *euc-cn*, *euccn*, *eucgb2312-cn*, " +"*gb2312-1980*, *gb2312-80*, *iso-ir-58*" + +#: library/codecs.rst:1180 +msgid "Simplified Chinese" +msgstr "" + +#: library/codecs.rst:1176 +msgid "gbk" +msgstr "*gbk*" + +#: library/codecs.rst:1176 +msgid "936, cp936, ms936" +msgstr "*936*, *cp936*, *ms936*" + +#: library/codecs.rst:1178 +msgid "Unified Chinese" +msgstr "" + +#: library/codecs.rst:1178 +msgid "gb18030" +msgstr "*gb18030*" + +#: library/codecs.rst:1178 +msgid "gb18030-2000" +msgstr "*gb18030-2000*" + +#: library/codecs.rst:1180 +msgid "hz" +msgstr "*hz*" + +#: library/codecs.rst:1180 +msgid "hzgb, hz-gb, hz-gb-2312" +msgstr "*hzgb*, *hz-gb*, *hz-gb-2312*" + +#: library/codecs.rst:1182 +msgid "iso2022_jp" +msgstr "*iso2022_jp*" + +#: library/codecs.rst:1182 +msgid "csiso2022jp, iso2022jp, iso-2022-jp" +msgstr "*csiso2022jp*, *iso2022jp*, *iso-2022-jp*" + +#: library/codecs.rst:1185 +msgid "iso2022_jp_1" +msgstr "*iso2022_jp_1*" + +#: library/codecs.rst:1185 +msgid "iso2022jp-1, iso-2022-jp-1" +msgstr "*iso2022jp-1*, *iso-2022-jp-1*" + +#: library/codecs.rst:1187 +msgid "iso2022_jp_2" +msgstr "*iso2022_jp_2*" + +#: library/codecs.rst:1187 +msgid "iso2022jp-2, iso-2022-jp-2" +msgstr "*iso2022jp-2*, *iso-2022-jp-2*" + +#: library/codecs.rst:1187 +msgid "Japanese, Korean, Simplified Chinese, Western Europe, Greek" +msgstr "" + +#: library/codecs.rst:1190 +msgid "iso2022_jp_2004" +msgstr "*iso2022_jp_2004*" + +#: library/codecs.rst:1190 +msgid "iso2022jp-2004, iso-2022-jp-2004" +msgstr "*iso2022jp-2004*, *iso-2022-jp-2004*" + +#: library/codecs.rst:1193 +msgid "iso2022_jp_3" +msgstr "*iso2022_jp_3*" + +#: library/codecs.rst:1193 +msgid "iso2022jp-3, iso-2022-jp-3" +msgstr "*iso2022jp-3*, *iso-2022-jp-3*" + +#: library/codecs.rst:1195 +msgid "iso2022_jp_ext" +msgstr "*iso2022_jp_ext*" + +#: library/codecs.rst:1195 +msgid "iso2022jp-ext, iso-2022-jp-ext" +msgstr "*iso2022jp-ext*, *iso-2022-jp-ext*" + +#: library/codecs.rst:1197 +msgid "iso2022_kr" +msgstr "*iso2022_kr*" + +#: library/codecs.rst:1197 +msgid "csiso2022kr, iso2022kr, iso-2022-kr" +msgstr "*csiso2022kr*, *iso2022kr*, *iso-2022-kr*" + +#: library/codecs.rst:1200 +msgid "latin_1" +msgstr "*latin_1*" + +#: library/codecs.rst:1200 +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:1203 +msgid "iso8859_2" +msgstr "*iso8859_2*" + +#: library/codecs.rst:1203 +msgid "iso-8859-2, latin2, L2" +msgstr "*iso-8859-2*, *latin2*, *L2*" + +#: library/codecs.rst:1205 +msgid "iso8859_3" +msgstr "*iso8859_3*" + +#: library/codecs.rst:1205 +msgid "iso-8859-3, latin3, L3" +msgstr "*iso-8859-3*, *latin3*, *L3*" + +#: library/codecs.rst:1205 +msgid "Esperanto, Maltese" +msgstr "" + +#: library/codecs.rst:1207 +msgid "iso8859_4" +msgstr "*iso8859_4*" + +#: library/codecs.rst:1207 +msgid "iso-8859-4, latin4, L4" +msgstr "*iso-8859-4*, *latin4*, *L4*" + +#: library/codecs.rst:1209 +msgid "iso8859_5" +msgstr "*iso8859_5*" + +#: library/codecs.rst:1209 +msgid "iso-8859-5, cyrillic" +msgstr "*iso-8859-5*, *cyrillic*" + +#: library/codecs.rst:1212 +msgid "iso8859_6" +msgstr "*iso8859_6*" + +#: library/codecs.rst:1212 +msgid "iso-8859-6, arabic" +msgstr "*iso-8859-6*, *arabic*" + +#: library/codecs.rst:1214 +msgid "iso8859_7" +msgstr "*iso8859_7*" + +#: library/codecs.rst:1214 +msgid "iso-8859-7, greek, greek8" +msgstr "*iso-8859-7*, *greek*, *greek8*" + +#: library/codecs.rst:1216 +msgid "iso8859_8" +msgstr "*iso8859_8*" + +#: library/codecs.rst:1216 +msgid "iso-8859-8, hebrew" +msgstr "*iso-8859-8*, *hebrew*" + +#: library/codecs.rst:1218 +msgid "iso8859_9" +msgstr "*iso8859_9*" + +#: library/codecs.rst:1218 +msgid "iso-8859-9, latin5, L5" +msgstr "*iso-8859-9*, *latin5*, *L5*" + +#: library/codecs.rst:1220 +msgid "iso8859_10" +msgstr "*iso8859_10*" + +#: library/codecs.rst:1220 +msgid "iso-8859-10, latin6, L6" +msgstr "*iso-8859-10*, *latin6*, *L6*" + +#: library/codecs.rst:1220 +msgid "Nordic languages" +msgstr "" + +#: library/codecs.rst:1222 +msgid "iso8859_11" +msgstr "*iso8859_11*" + +#: library/codecs.rst:1222 +msgid "iso-8859-11, thai" +msgstr "*iso-8859-11*, *thai*" + +#: library/codecs.rst:1222 +msgid "Thai languages" +msgstr "" + +#: library/codecs.rst:1224 +msgid "iso8859_13" +msgstr "*iso8859_13*" + +#: library/codecs.rst:1224 +msgid "iso-8859-13, latin7, L7" +msgstr "*iso-8859-13*, *latin7*, *L7*" + +#: library/codecs.rst:1226 +msgid "iso8859_14" +msgstr "*iso8859_14*" + +#: library/codecs.rst:1226 +msgid "iso-8859-14, latin8, L8" +msgstr "*iso-8859-14*, *latin8*, *L8*" + +#: library/codecs.rst:1226 +msgid "Celtic languages" +msgstr "" + +#: library/codecs.rst:1228 +msgid "iso8859_15" +msgstr "*iso8859_15*" + +#: library/codecs.rst:1228 +msgid "iso-8859-15, latin9, L9" +msgstr "*iso-8859-15*, *latin9*, *L9*" + +#: library/codecs.rst:1230 +msgid "iso8859_16" +msgstr "*iso8859_16*" + +#: library/codecs.rst:1230 +msgid "iso-8859-16, latin10, L10" +msgstr "*iso-8859-16*, *latin10*, *L10*" + +#: library/codecs.rst:1230 +msgid "South-Eastern Europe" +msgstr "" + +#: library/codecs.rst:1232 +msgid "johab" +msgstr "*johab*" + +#: library/codecs.rst:1232 +msgid "cp1361, ms1361" +msgstr "*cp1361*, *ms1361*" + +#: library/codecs.rst:1234 +msgid "koi8_r" +msgstr "*koi8_r*" + +#: library/codecs.rst:1236 +msgid "koi8_t" +msgstr "*koi8_t*" + +#: library/codecs.rst:1236 +msgid "Tajik" +msgstr "*Tajik*" + +#: library/codecs.rst:1240 +msgid "koi8_u" +msgstr "*koi8_u*" + +#: library/codecs.rst:1242 +msgid "kz1048" +msgstr "*kz1048*" + +#: library/codecs.rst:1242 +msgid "kz_1048, strk1048_2002, rk1048" +msgstr "*kz_1048*, *strk1048_2002*, *rk1048*" + +#: library/codecs.rst:1260 +msgid "Kazakh" +msgstr "" + +#: library/codecs.rst:1246 +msgid "mac_cyrillic" +msgstr "*mac_cyrillic*" + +#: library/codecs.rst:1246 +msgid "maccyrillic" +msgstr "*maccyrillic*" + +#: library/codecs.rst:1249 +msgid "mac_greek" +msgstr "*mac_greek*" + +#: library/codecs.rst:1249 +msgid "macgreek" +msgstr "*macgreek*" + +#: library/codecs.rst:1251 +msgid "mac_iceland" +msgstr "*mac_iceland*" + +#: library/codecs.rst:1251 +msgid "maciceland" +msgstr "*maciceland*" + +#: library/codecs.rst:1253 +msgid "mac_latin2" +msgstr "*mac_latin2*" + +#: library/codecs.rst:1253 +#, fuzzy +msgid "maclatin2, maccentraleurope, mac_centeuro" +msgstr "*maclatin2*, *maccentraleurope*" + +#: library/codecs.rst:1256 +msgid "mac_roman" +msgstr "*mac_roman*" + +#: library/codecs.rst:1256 +msgid "macroman, macintosh" +msgstr "*macroman*, *macintosh*" + +#: library/codecs.rst:1258 +msgid "mac_turkish" +msgstr "*mac_turkish*" + +#: library/codecs.rst:1258 +msgid "macturkish" +msgstr "*macturkish*" + +#: library/codecs.rst:1260 +msgid "ptcp154" +msgstr "*ptcp154*" + +#: library/codecs.rst:1260 +msgid "csptcp154, pt154, cp154, cyrillic-asian" +msgstr "*csptcp154*, *pt154*, *cp154*, *cyrillic-asian*" + +#: library/codecs.rst:1263 +msgid "shift_jis" +msgstr "*shift_jis*" + +#: library/codecs.rst:1263 +msgid "csshiftjis, shiftjis, sjis, s_jis" +msgstr "*csshiftjis*, *shiftjis*, *sjis*, *s_jis*" + +#: library/codecs.rst:1266 +msgid "shift_jis_2004" +msgstr "*shift_jis_2004*" + +#: library/codecs.rst:1266 +msgid "shiftjis2004, sjis_2004, sjis2004" +msgstr "*shiftjis2004*, *sjis_2004*, *sjis2004*" + +#: library/codecs.rst:1269 +msgid "shift_jisx0213" +msgstr "*shift_jisx0213*" + +#: library/codecs.rst:1269 +msgid "shiftjisx0213, sjisx0213, s_jisx0213" +msgstr "*shiftjisx0213*, *sjisx0213*, *s_jisx0213*" + +#: library/codecs.rst:1272 +msgid "utf_32" +msgstr "*utf_32*" + +#: library/codecs.rst:1272 +msgid "U32, utf32" +msgstr "*U32*, *utf32*" + +#: library/codecs.rst:1274 library/codecs.rst:1278 library/codecs.rst:1282 +#: library/codecs.rst:1286 library/codecs.rst:1288 +msgid "all languages" +msgstr "" + +#: library/codecs.rst:1274 +msgid "utf_32_be" +msgstr "*utf_32_be*" + +#: library/codecs.rst:1274 +msgid "UTF-32BE" +msgstr "*UTF-32BE*" + +#: library/codecs.rst:1276 +msgid "utf_32_le" +msgstr "*utf_32_le*" + +#: library/codecs.rst:1276 +msgid "UTF-32LE" +msgstr "*UTF-32LE*" + +#: library/codecs.rst:1278 +msgid "utf_16" +msgstr "*utf_16*" + +#: library/codecs.rst:1278 +msgid "U16, utf16" +msgstr "*U16*, *utf16*" + +#: library/codecs.rst:1280 +msgid "utf_16_be" +msgstr "*utf_16_be*" + +#: library/codecs.rst:1280 +msgid "UTF-16BE" +msgstr "*UTF-16BE*" + +#: library/codecs.rst:1282 +msgid "utf_16_le" +msgstr "*utf_16_le*" + +#: library/codecs.rst:1282 +msgid "UTF-16LE" +msgstr "*UTF-16LE*" + +#: library/codecs.rst:1284 +msgid "utf_7" +msgstr "*utf_7*" + +#: library/codecs.rst:1284 +msgid "U7, unicode-1-1-utf-7" +msgstr "*U7*, *unicode-1-1-utf-7*" + +#: library/codecs.rst:1286 +msgid "utf_8" +msgstr "*utf_8*" + +#: library/codecs.rst:1286 +#, fuzzy +msgid "U8, UTF, utf8, cp65001" +msgstr "*U8*, *UTF*, *utf8*" + +#: library/codecs.rst:1288 +msgid "utf_8_sig" +msgstr "*utf_8_sig*" + +#: library/codecs.rst:1291 +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:1297 +msgid "``cp65001`` is now an alias to ``utf_8``." +msgstr "" + +#: library/codecs.rst:1302 +msgid "Python Specific Encodings" +msgstr "" + +#: library/codecs.rst:1304 +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 " +"on the expected input and output types (note that while text encodings are " +"the most common use case for codecs, the underlying codec infrastructure " +"supports arbitrary data transforms rather than just text encodings). For " +"asymmetric codecs, the stated meaning describes the encoding direction." +msgstr "" + +#: library/codecs.rst:1312 +msgid "Text Encodings" +msgstr "" + +#: library/codecs.rst:1314 +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:1323 +msgid "idna" +msgstr "idna" + +#: library/codecs.rst:1323 +msgid "" +"Implement :rfc:`3490`, see also :mod:`encodings.idna`. Only " +"``errors='strict'`` is supported." +msgstr "" + +#: library/codecs.rst:1329 +msgid "mbcs" +msgstr "mbcs" + +#: library/codecs.rst:1329 +msgid "ansi, dbcs" +msgstr "" + +#: library/codecs.rst:1329 +msgid "" +"Windows only: Encode the operand according to the ANSI codepage (CP_ACP)." +msgstr "" + +#: library/codecs.rst:1333 +msgid "oem" +msgstr "" + +#: library/codecs.rst:1333 +msgid "" +"Windows only: Encode the operand according to the OEM codepage (CP_OEMCP)." +msgstr "" + +#: library/codecs.rst:1339 +msgid "palmos" +msgstr "palmos" + +#: library/codecs.rst:1339 +msgid "Encoding of PalmOS 3.5." +msgstr "" + +#: library/codecs.rst:1341 +msgid "punycode" +msgstr "punycode" + +#: library/codecs.rst:1341 +msgid "Implement :rfc:`3492`. Stateful codecs are not supported." +msgstr "" + +#: library/codecs.rst:1345 +msgid "raw_unicode_escape" +msgstr "raw_unicode_escape" + +#: library/codecs.rst:1345 +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:1354 +msgid "undefined" +msgstr "undefined" + +#: library/codecs.rst:1354 +msgid "" +"Raise an exception for all conversions, even empty strings. The error " +"handler is ignored." +msgstr "" + +#: library/codecs.rst:1359 +msgid "unicode_escape" +msgstr "unicode_escape" + +#: library/codecs.rst:1359 +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:1371 +msgid "\"unicode_internal\" codec is removed." +msgstr "" + +#: library/codecs.rst:1378 +msgid "Binary Transforms" +msgstr "" + +#: library/codecs.rst:1380 +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:1388 +msgid "Encoder / decoder" +msgstr "" + +#: library/codecs.rst:1390 +msgid "base64_codec [#b64]_" +msgstr "base64_codec [#b64]_" + +#: library/codecs.rst:1390 +msgid "base64, base_64" +msgstr "base64, base_64" + +#: library/codecs.rst:1390 +msgid "" +"Convert the operand to multiline MIME base64 (the result always includes a " +"trailing ``'\\n'``)." +msgstr "" + +#: library/codecs.rst:1395 +msgid "" +"accepts any :term:`bytes-like object` as input for encoding and decoding" +msgstr "" + +#: library/codecs.rst:1390 +msgid ":meth:`base64.encodebytes` / :meth:`base64.decodebytes`" +msgstr "" + +#: library/codecs.rst:1401 +msgid "bz2_codec" +msgstr "bz2_codec" + +#: library/codecs.rst:1401 +msgid "bz2" +msgstr "bz2" + +#: library/codecs.rst:1401 +msgid "Compress the operand using bz2." +msgstr "" + +#: library/codecs.rst:1401 +msgid ":meth:`bz2.compress` / :meth:`bz2.decompress`" +msgstr "" + +#: library/codecs.rst:1404 +msgid "hex_codec" +msgstr "hex_codec" + +#: library/codecs.rst:1404 +msgid "hex" +msgstr "hex" + +#: library/codecs.rst:1404 +msgid "" +"Convert the operand to hexadecimal representation, with two digits per byte." +msgstr "" + +#: library/codecs.rst:1404 +msgid ":meth:`binascii.b2a_hex` / :meth:`binascii.a2b_hex`" +msgstr "" + +#: library/codecs.rst:1409 +msgid "quopri_codec" +msgstr "quopri_codec" + +#: library/codecs.rst:1409 +msgid "quopri, quotedprintable, quoted_printable" +msgstr "" + +#: library/codecs.rst:1409 +msgid "Convert the operand to MIME quoted printable." +msgstr "" + +#: library/codecs.rst:1409 +msgid ":meth:`quopri.encode` with ``quotetabs=True`` / :meth:`quopri.decode`" +msgstr "" + +#: library/codecs.rst:1413 +msgid "uu_codec" +msgstr "uu_codec" + +#: library/codecs.rst:1413 +msgid "uu" +msgstr "uu" + +#: library/codecs.rst:1413 +msgid "Convert the operand using uuencode." +msgstr "" + +#: library/codecs.rst:1413 +msgid ":meth:`uu.encode` / :meth:`uu.decode`" +msgstr "" + +#: library/codecs.rst:1416 +msgid "zlib_codec" +msgstr "zlib_codec" + +#: library/codecs.rst:1416 +msgid "zip, zlib" +msgstr "zip, zlib" + +#: library/codecs.rst:1416 +msgid "Compress the operand using gzip." +msgstr "" + +#: library/codecs.rst:1416 +msgid ":meth:`zlib.compress` / :meth:`zlib.decompress`" +msgstr ":meth:`zlib.compress` / :meth:`zlib.decompress`" + +#: library/codecs.rst:1420 +msgid "" +"In addition to :term:`bytes-like objects `, " +"``'base64_codec'`` also accepts ASCII-only instances of :class:`str` for " +"decoding" +msgstr "" + +#: library/codecs.rst:1424 +msgid "Restoration of the binary transforms." +msgstr "" + +#: library/codecs.rst:1427 +msgid "Restoration of the aliases for the binary transforms." +msgstr "" + +#: library/codecs.rst:1434 +msgid "Text Transforms" +msgstr "" + +#: library/codecs.rst:1436 +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:1445 +msgid "rot_13" +msgstr "rot_13" + +#: library/codecs.rst:1445 +msgid "rot13" +msgstr "rot13" + +#: library/codecs.rst:1445 +msgid "Return the Caesar-cypher encryption of the operand." +msgstr "" + +#: library/codecs.rst:1450 +msgid "Restoration of the ``rot_13`` text transform." +msgstr "" + +#: library/codecs.rst:1453 +msgid "Restoration of the ``rot13`` alias." +msgstr "" + +#: library/codecs.rst:1458 +msgid "" +":mod:`encodings.idna` --- Internationalized Domain Names in Applications" +msgstr "" + +#: library/codecs.rst:1464 +msgid "" +"This module implements :rfc:`3490` (Internationalized Domain Names in " +"Applications) and :rfc:`3492` (Nameprep: A Stringprep Profile for " +"Internationalized Domain Names (IDN)). It builds upon the ``punycode`` " +"encoding and :mod:`stringprep`." +msgstr "" + +#: library/codecs.rst:1469 +msgid "" +"If you need the IDNA 2008 standard from :rfc:`5891` and :rfc:`5895`, use the " +"third-party `idna module `_." +msgstr "" + +#: library/codecs.rst:1472 +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." +"Alliancefrançaise.nu``) is converted into an ASCII-compatible encoding (ACE, " +"such as ``www.xn--alliancefranaise-npb.nu``). The ACE form of the domain " +"name is then used in all places where arbitrary characters are not allowed " +"by the protocol, such as DNS queries, HTTP :mailheader:`Host` fields, and so " +"on. This conversion is carried out in the application; if possible invisible " +"to the user: The application should transparently convert Unicode domain " +"labels to IDNA on the wire, and convert back ACE labels to Unicode before " +"presenting them to the user." +msgstr "" + +#: library/codecs.rst:1483 +msgid "" +"Python supports this conversion in several ways: the ``idna`` codec " +"performs conversion between Unicode and ACE, separating an input string into " +"labels based on the separator characters defined in :rfc:`section 3.1 of RFC " +"3490 <3490#section-3.1>` and converting each label to ACE as required, and " +"conversely separating an input byte string into labels based on the ``.`` " +"separator and converting any ACE labels found into unicode. Furthermore, " +"the :mod:`socket` module transparently converts Unicode host names to ACE, " +"so that applications need not be concerned about converting host names " +"themselves when they pass them to the socket module. On top of that, modules " +"that have host names as function parameters, such as :mod:`http.client` and :" +"mod:`ftplib`, accept Unicode host names (:mod:`http.client` then also " +"transparently sends an IDNA hostname in the :mailheader:`Host` field if it " +"sends that field at all)." +msgstr "" + +#: library/codecs.rst:1496 +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:1500 +msgid "" +"The module :mod:`encodings.idna` also implements the nameprep procedure, " +"which performs certain normalizations on host names, to achieve case-" +"insensitivity of international domain names, and to unify similar " +"characters. The nameprep functions can be used directly if desired." +msgstr "" + +#: library/codecs.rst:1508 +msgid "" +"Return the nameprepped version of *label*. The implementation currently " +"assumes query strings, so ``AllowUnassigned`` is true." +msgstr "" + +#: library/codecs.rst:1514 +msgid "" +"Convert a label to ASCII, as specified in :rfc:`3490`. ``UseSTD3ASCIIRules`` " +"is assumed to be false." +msgstr "" + +#: library/codecs.rst:1520 +msgid "Convert a label to Unicode, as specified in :rfc:`3490`." +msgstr "" + +#: library/codecs.rst:1524 +msgid ":mod:`encodings.mbcs` --- Windows ANSI codepage" +msgstr "" + +#: library/codecs.rst:1529 +msgid "This module implements the ANSI codepage (CP_ACP)." +msgstr "" + +#: library/codecs.rst:1532 +msgid ":ref:`Availability `: Windows only." +msgstr ":ref:`Disponibilité ` : Windows uniquement." + +#: library/codecs.rst:1533 +msgid "Support any error handler." +msgstr "" + +#: library/codecs.rst:1536 +msgid "" +"Before 3.2, the *errors* argument was ignored; ``'replace'`` was always used " +"to encode, and ``'ignore'`` to decode." +msgstr "" + +#: library/codecs.rst:1542 +msgid ":mod:`encodings.utf_8_sig` --- UTF-8 codec with BOM signature" +msgstr "" + +#: library/codecs.rst:1548 +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 " +"encoder this is only done once (on the first write to the byte stream). On " +"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`." + +# Pas de majuscule en début car suit un deux-points. +#~ msgid "" +#~ "Search function registration is not currently reversible, which may cause " +#~ "problems in some cases, such as unit testing or module reloading." +#~ msgstr "" +#~ "l'enregistrement d'une fonction de recherche n'est actuellement pas " +#~ "réversible, ce qui peut entraîner des problèmes dans certains cas, par " +#~ "exemple pour les tests unitaires ou le rechargement de module." diff --git a/library/codeop.po b/library/codeop.po new file mode 100644 index 0000000000..1d77275eae --- /dev/null +++ b/library/codeop.po @@ -0,0 +1,149 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-11-27 10:27+0100\n" +"PO-Revision-Date: 2021-11-06 20:25+0100\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 3.0\n" + +#: library/codeop.rst:2 +msgid ":mod:`codeop` --- Compile Python code" +msgstr ":mod:`codeop` — Compilation de code Python" + +#: library/codeop.rst:10 +msgid "**Source code:** :source:`Lib/codeop.py`" +msgstr "**Code source :** :source:`Lib/codeop.py`" + +#: library/codeop.rst:14 +msgid "" +"The :mod:`codeop` module provides utilities upon which the Python read-eval-" +"print loop can be emulated, as is done in the :mod:`code` module. As a " +"result, you probably don't want to use the module directly; if you want to " +"include such a loop in your program you probably want to use the :mod:`code` " +"module instead." +msgstr "" +"Le module :mod:`codeop` fournit des outils permettant d'émuler une boucle de " +"lecture-évaluation-affichage (en anglais *read-eval-print-loop* ou REPL), " +"comme dans le module :mod:`code`. Par conséquent, ce module n'est pas " +"destiné à être utilisé directement ; pour inclure un REPL dans un programme, " +"il est préférable d'utiliser le module :mod:`code`." + +#: library/codeop.rst:20 +msgid "There are two parts to this job:" +msgstr "Cette tâche se divise en deux parties :" + +#: library/codeop.rst:22 +msgid "" +"Being able to tell if a line of input completes a Python statement: in " +"short, telling whether to print '``>>>``' or '``...``' next." +msgstr "" +"Pouvoir affirmer qu'une ligne d'entrée est une instruction complète, ou " +"achève une instruction : en bref, savoir s'il faut afficher « ``>>>`` » ou " +"« ``...`` » à sa suite." + +#: library/codeop.rst:25 +msgid "" +"Remembering which future statements the user has entered, so subsequent " +"input can be compiled with these in effect." +msgstr "" +"Conserver les instructions déjà entrées par l'utilisateur, afin que les " +"entrées suivantes puissent êtres compilées avec elles." + +#: library/codeop.rst:28 +msgid "" +"The :mod:`codeop` module provides a way of doing each of these things, and a " +"way of doing them both." +msgstr "" +"Le module :mod:`codeop` fournit un moyen d'effectuer ces deux parties, " +"individuellement ou simultanément." + +#: library/codeop.rst:31 +msgid "To do just the former:" +msgstr "Pour ne faire que la première partie :" + +#: library/codeop.rst:35 +msgid "" +"Tries to compile *source*, which should be a string of Python code and " +"return a code object if *source* is valid Python code. In that case, the " +"filename attribute of the code object will be *filename*, which defaults to " +"``''``. Returns ``None`` if *source* is *not* valid Python code, but " +"is a prefix of valid Python code." +msgstr "" +"Essaye de compiler *source*, qui doit être une chaîne de caractères " +"représentant du code Python valide et renvoie un objet code le cas échéant. " +"Dans ce cas, l'attribut de nom de fichier de l'objet code renvoyé sera " +"*filename* (``''`` par défaut). Renvoie ``None`` si *source* n'est " +"*pas* du code Python valide, mais un *début* de code Python valide." + +#: library/codeop.rst:41 +msgid "" +"If there is a problem with *source*, an exception will be raised. :exc:" +"`SyntaxError` is raised if there is invalid Python syntax, and :exc:" +"`OverflowError` or :exc:`ValueError` if there is an invalid literal." +msgstr "" +"En cas de problème avec *source*, une exception est levée ; :exc:" +"`SyntaxError` si la syntaxe Python est incorrecte, et :exc:`OverflowError` " +"ou :exc:`ValueError` si un littéral invalide est rencontré." + +#: library/codeop.rst:45 +msgid "" +"The *symbol* argument determines whether *source* is compiled as a statement " +"(``'single'``, the default), as a sequence of statements (``'exec'``) or as " +"an :term:`expression` (``'eval'``). Any other value will cause :exc:" +"`ValueError` to be raised." +msgstr "" +"L'argument *symbol* détermine si *source* est compilée comme une instruction " +"(``'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 "" +"It is possible (but not likely) that the parser stops parsing with a " +"successful outcome before reaching the end of the source; in this case, " +"trailing symbols may be ignored instead of causing an error. For example, a " +"backslash followed by two newlines may be followed by arbitrary garbage. " +"This will be fixed once the API for the parser is better." +msgstr "" +"Il est possible (quoique improbable) que l'analyseur s'arrête avant " +"d'atteindre la fin du code source ; dans ce cas, les symboles venant après " +"peuvent être ignorés au lieu de provoquer une erreur. Par exemple, une barre " +"oblique inverse suivie de deux retours à la ligne peut être suivie par de la " +"mémoire non-initialisée. Ceci sera corrigé quand l'interface de l'analyseur " +"aura été améliorée." + +#: library/codeop.rst:61 +msgid "" +"Instances of this class have :meth:`__call__` methods identical in signature " +"to the built-in function :func:`compile`, but with the difference that if " +"the instance compiles program text containing a :mod:`__future__` statement, " +"the instance 'remembers' and compiles all subsequent program texts with the " +"statement in force." +msgstr "" +"Les instances de cette classe ont des méthodes :meth:`__call__` de signature " +"identique à la fonction native :func:`compile`, à la différence près que si " +"l'instance compile du code source contenant une instruction :mod:" +"`__future__`, l'instance s'en « souviendra » et compilera tous les codes " +"sources suivants avec cette instruction activée." + +#: library/codeop.rst:70 +msgid "" +"Instances of this class have :meth:`__call__` methods identical in signature " +"to :func:`compile_command`; the difference is that if the instance compiles " +"program text containing a ``__future__`` statement, the instance 'remembers' " +"and compiles all subsequent program texts with the statement in force." +msgstr "" +"Les instances de cette classe ont des méthodes :meth:`__call__` de signature " +"identique à la fonction :func:`compile_command`, à la différence près que si " +"l'instance compile du code source contenant une instruction ``__future__``, " +"l'instance s'en « souviendra » et compilera tous les codes sources suivants " +"avec cette instruction activée." diff --git a/library/collections.abc.po b/library/collections.abc.po new file mode 100644 index 0000000000..aed5a33488 --- /dev/null +++ b/library/collections.abc.po @@ -0,0 +1,763 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-22 22:57+0100\n" +"PO-Revision-Date: 2021-03-21 16:06+0100\n" +"Last-Translator: Loc Cosnier \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" +"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" +msgstr "" +":mod:`collections.abc` --- Classes de base abstraites pour les conteneurs" + +#: library/collections.abc.rst:10 +msgid "Formerly, this module was part of the :mod:`collections` module." +msgstr "Auparavant, ce module faisait partie du module :mod:`collections`." + +#: library/collections.abc.rst:13 +msgid "**Source code:** :source:`Lib/_collections_abc.py`" +msgstr "**Code source :** :source:`Lib/_collections_abc.py`" + +#: library/collections.abc.rst:23 +#, fuzzy +msgid "" +"This module provides :term:`abstract base classes ` " +"that can be used to test whether a class provides a particular interface; " +"for example, whether it is :term:`hashable` or whether it is a mapping." +msgstr "" +"Ce module fournit :term:`des classes de base abstraites ` qui peuvent être utilisées pour vérifier si une classe fournit une " +"interface particulière (par exemple, savoir s'il s'agit d'un hachable ou " +"d'une table de correspondance)." + +#: library/collections.abc.rst:27 +msgid "" +"An :func:`issubclass` or :func:`isinstance` test for an interface works in " +"one of three ways." +msgstr "" + +#: library/collections.abc.rst:30 +msgid "" +"1) A newly written class can inherit directly from one of the abstract base " +"classes. The class must supply the required abstract methods. The " +"remaining mixin methods come from inheritance and can be overridden if " +"desired. Other methods may be added as needed:" +msgstr "" + +#: library/collections.abc.rst:50 +msgid "" +"2) Existing classes and built-in classes can be registered as \"virtual " +"subclasses\" of the ABCs. Those classes should define the full API " +"including all of the abstract methods and all of the mixin methods. This " +"lets users rely on :func:`issubclass` or :func:`isinstance` tests to " +"determine whether the full interface is supported. The exception to this " +"rule is for methods that are automatically inferred from the rest of the API:" +msgstr "" + +#: library/collections.abc.rst:76 +msgid "" +"In this example, class :class:`D` does not need to define ``__contains__``, " +"``__iter__``, and ``__reversed__`` because the :ref:`in-operator " +"`, the :term:`iteration ` logic, and the :func:" +"`reversed` function automatically fall back to using ``__getitem__`` and " +"``__len__``." +msgstr "" + +#: library/collections.abc.rst:82 +msgid "" +"3) Some simple interfaces are directly recognizable by the presence of the " +"required methods (unless those methods have been set to :const:`None`):" +msgstr "" + +#: library/collections.abc.rst:99 +msgid "" +"Complex interfaces do not support this last technique because an interface " +"is more than just the presence of method names. Interfaces specify " +"semantics and relationships between methods that cannot be inferred solely " +"from the presence of specific method names. For example, knowing that a " +"class supplies ``__getitem__``, ``__len__``, and ``__iter__`` is " +"insufficient for distinguishing a :class:`Sequence` from a :class:`Mapping`." +msgstr "" + +#: library/collections.abc.rst:107 +msgid "" +"These abstract classes now support ``[]``. See :ref:`types-genericalias` " +"and :pep:`585`." +msgstr "" + +#: library/collections.abc.rst:114 +msgid "Collections Abstract Base Classes" +msgstr "Classes de base abstraites de collections" + +#: library/collections.abc.rst:116 +msgid "" +"The collections module offers the following :term:`ABCs `:" +msgstr "" +"Le module collections apporte les :term:`ABC ` " +"suivantes :" + +#: library/collections.abc.rst:121 +msgid "ABC" +msgstr "ABC" + +#: library/collections.abc.rst:121 +msgid "Inherits from" +msgstr "Hérite de" + +#: library/collections.abc.rst:121 +msgid "Abstract Methods" +msgstr "Méthodes abstraites" + +#: library/collections.abc.rst:121 +msgid "Mixin Methods" +msgstr "Méthodes *mixin*" + +#: library/collections.abc.rst:123 +#, fuzzy +msgid ":class:`Container` [1]_" +msgstr ":class:`Container`" + +#: library/collections.abc.rst:123 +msgid "``__contains__``" +msgstr "``__contains__``" + +#: library/collections.abc.rst:124 +#, fuzzy +msgid ":class:`Hashable` [1]_" +msgstr ":class:`Hashable`" + +#: library/collections.abc.rst:124 +msgid "``__hash__``" +msgstr "``__hash__``" + +#: library/collections.abc.rst:125 +#, fuzzy +msgid ":class:`Iterable` [1]_ [2]_" +msgstr ":class:`Iterable`" + +#: library/collections.abc.rst:125 library/collections.abc.rst:126 +msgid "``__iter__``" +msgstr "``__iter__``" + +#: library/collections.abc.rst:126 +#, fuzzy +msgid ":class:`Iterator` [1]_" +msgstr ":class:`Iterator`" + +#: library/collections.abc.rst:126 library/collections.abc.rst:127 +msgid ":class:`Iterable`" +msgstr ":class:`Iterable`" + +#: library/collections.abc.rst:126 +msgid "``__next__``" +msgstr "``__next__``" + +#: library/collections.abc.rst:127 +#, fuzzy +msgid ":class:`Reversible` [1]_" +msgstr ":class:`Reversible`" + +#: library/collections.abc.rst:127 +msgid "``__reversed__``" +msgstr "``__reversed__``" + +#: library/collections.abc.rst:128 +#, fuzzy +msgid ":class:`Generator` [1]_" +msgstr ":class:`Generator`" + +#: library/collections.abc.rst:128 +msgid ":class:`Iterator`" +msgstr ":class:`Iterator`" + +#: library/collections.abc.rst:128 library/collections.abc.rst:176 +msgid "``send``, ``throw``" +msgstr "``send``, ``throw``" + +#: library/collections.abc.rst:128 +msgid "``close``, ``__iter__``, ``__next__``" +msgstr "``close``, ``__iter__``, ``__next__``" + +#: library/collections.abc.rst:129 +#, fuzzy +msgid ":class:`Sized` [1]_" +msgstr ":class:`Sized`" + +#: library/collections.abc.rst:129 library/collections.abc.rst:168 +msgid "``__len__``" +msgstr "``__len__``" + +#: library/collections.abc.rst:130 +#, fuzzy +msgid ":class:`Callable` [1]_" +msgstr ":class:`Callable`" + +#: library/collections.abc.rst:130 +msgid "``__call__``" +msgstr "``__call__``" + +#: library/collections.abc.rst:131 +#, fuzzy +msgid ":class:`Collection` [1]_" +msgstr ":class:`Collection`" + +#: library/collections.abc.rst:131 +msgid ":class:`Sized`, :class:`Iterable`, :class:`Container`" +msgstr ":class:`Sized`, :class:`Iterable`, :class:`Container`" + +#: library/collections.abc.rst:131 library/collections.abc.rst:147 +msgid "``__contains__``, ``__iter__``, ``__len__``" +msgstr "``__contains__``, ``__iter__``, ``__len__``" + +#: library/collections.abc.rst:135 library/collections.abc.rst:138 +#: library/collections.abc.rst:144 +msgid ":class:`Sequence`" +msgstr ":class:`Sequence`" + +#: library/collections.abc.rst:135 +msgid ":class:`Reversible`, :class:`Collection`" +msgstr ":class:`Reversible`, :class:`Collection`" + +#: library/collections.abc.rst:135 library/collections.abc.rst:144 +msgid "``__getitem__``, ``__len__``" +msgstr "``__getitem__``, ``__len__``" + +#: library/collections.abc.rst:135 +msgid "" +"``__contains__``, ``__iter__``, ``__reversed__``, ``index``, and ``count``" +msgstr "" +"``__contains__``, ``__iter__``, ``__reversed__``, ``index`` et ``count``" + +#: library/collections.abc.rst:138 +msgid ":class:`MutableSequence`" +msgstr ":class:`MutableSequence`" + +#: library/collections.abc.rst:138 +msgid "" +"``__getitem__``, ``__setitem__``, ``__delitem__``, ``__len__``, ``insert``" +msgstr "" +"``__getitem__``, ``__setitem__``, ``__delitem__``, ``__len__``, ``insert``" + +#: library/collections.abc.rst:138 +msgid "" +"Inherited :class:`Sequence` methods and ``append``, ``reverse``, ``extend``, " +"``pop``, ``remove``, and ``__iadd__``" +msgstr "" +"Méthodes héritées de :class:`Sequence`, et ``append``, ``reverse``, " +"``extend``, ``pop``, ``remove`` et ``__iadd__``" + +#: library/collections.abc.rst:144 +msgid ":class:`ByteString`" +msgstr ":class:`ByteString`" + +#: library/collections.abc.rst:144 +msgid "Inherited :class:`Sequence` methods" +msgstr "Méthodes héritées de :class:`Sequence`" + +#: library/collections.abc.rst:147 library/collections.abc.rst:151 +msgid ":class:`Set`" +msgstr ":class:`Set`" + +#: library/collections.abc.rst:147 library/collections.abc.rst:157 +msgid ":class:`Collection`" +msgstr ":class:`Collection`" + +#: library/collections.abc.rst:147 +msgid "" +"``__le__``, ``__lt__``, ``__eq__``, ``__ne__``, ``__gt__``, ``__ge__``, " +"``__and__``, ``__or__``, ``__sub__``, ``__xor__``, and ``isdisjoint``" +msgstr "" +"``__le__``, ``__lt__``, ``__eq__``, ``__ne__``, ``__gt__``, ``__ge__``, " +"``__and__``, ``__or__``, ``__sub__``, ``__xor__`` et ``isdisjoint``" + +#: library/collections.abc.rst:151 +msgid ":class:`MutableSet`" +msgstr ":class:`MutableSet`" + +#: library/collections.abc.rst:151 +msgid "``__contains__``, ``__iter__``, ``__len__``, ``add``, ``discard``" +msgstr "``__contains__``, ``__iter__``, ``__len__``, ``add``, ``discard``" + +#: library/collections.abc.rst:151 +msgid "" +"Inherited :class:`Set` methods and ``clear``, ``pop``, ``remove``, " +"``__ior__``, ``__iand__``, ``__ixor__``, and ``__isub__``" +msgstr "" +"Méthodes héritées de :class:`Set`, et ``clear``, ``pop``, ``remove``, " +"``__ior__``, ``__iand__``, ``__ixor__`` et ``__isub__``" + +#: library/collections.abc.rst:157 library/collections.abc.rst:161 +msgid ":class:`Mapping`" +msgstr ":class:`Mapping`" + +#: library/collections.abc.rst:157 +msgid "``__getitem__``, ``__iter__``, ``__len__``" +msgstr "``__getitem__``, ``__iter__``, ``__len__``" + +#: library/collections.abc.rst:157 +msgid "" +"``__contains__``, ``keys``, ``items``, ``values``, ``get``, ``__eq__``, and " +"``__ne__``" +msgstr "" +"``__contains__``, ``keys``, ``items``, ``values``, ``get``, ``__eq__`` et " +"``__ne__``" + +#: library/collections.abc.rst:161 +msgid ":class:`MutableMapping`" +msgstr ":class:`MutableMapping`" + +#: library/collections.abc.rst:161 +msgid "" +"``__getitem__``, ``__setitem__``, ``__delitem__``, ``__iter__``, ``__len__``" +msgstr "" +"``__getitem__``, ``__setitem__``, ``__delitem__``, ``__iter__``, ``__len__``" + +#: library/collections.abc.rst:161 +msgid "" +"Inherited :class:`Mapping` methods and ``pop``, ``popitem``, ``clear``, " +"``update``, and ``setdefault``" +msgstr "" +"Méthodes héritées de :class:`Mapping`, et ``pop``, ``popitem``, ``clear``, " +"``update`` et ``setdefault``" + +#: library/collections.abc.rst:168 +msgid ":class:`MappingView`" +msgstr ":class:`MappingView`" + +#: library/collections.abc.rst:168 +msgid ":class:`Sized`" +msgstr ":class:`Sized`" + +#: library/collections.abc.rst:169 +msgid ":class:`ItemsView`" +msgstr ":class:`ItemsView`" + +#: library/collections.abc.rst:169 library/collections.abc.rst:171 +msgid ":class:`MappingView`, :class:`Set`" +msgstr ":class:`MappingView`, :class:`Set`" + +#: library/collections.abc.rst:169 library/collections.abc.rst:171 +#: library/collections.abc.rst:173 +msgid "``__contains__``, ``__iter__``" +msgstr "``__contains__``, ``__iter__``" + +#: library/collections.abc.rst:171 +msgid ":class:`KeysView`" +msgstr ":class:`KeysView`" + +#: library/collections.abc.rst:173 +msgid ":class:`ValuesView`" +msgstr ":class:`ValuesView`" + +#: library/collections.abc.rst:173 +msgid ":class:`MappingView`, :class:`Collection`" +msgstr ":class:`MappingView`, :class:`Collection`" + +#: library/collections.abc.rst:175 +#, fuzzy +msgid ":class:`Awaitable` [1]_" +msgstr ":class:`Awaitable`" + +#: library/collections.abc.rst:175 +msgid "``__await__``" +msgstr "``__await__``" + +#: library/collections.abc.rst:176 +#, fuzzy +msgid ":class:`Coroutine` [1]_" +msgstr ":class:`Coroutine`" + +#: library/collections.abc.rst:176 +msgid ":class:`Awaitable`" +msgstr ":class:`Awaitable`" + +#: library/collections.abc.rst:176 +msgid "``close``" +msgstr "``close``" + +#: library/collections.abc.rst:177 +#, fuzzy +msgid ":class:`AsyncIterable` [1]_" +msgstr ":class:`AsyncIterable`" + +#: library/collections.abc.rst:177 library/collections.abc.rst:178 +msgid "``__aiter__``" +msgstr "``__aiter__``" + +#: library/collections.abc.rst:178 +#, fuzzy +msgid ":class:`AsyncIterator` [1]_" +msgstr ":class:`AsyncIterator`" + +#: library/collections.abc.rst:178 +msgid ":class:`AsyncIterable`" +msgstr ":class:`AsyncIterable`" + +#: library/collections.abc.rst:178 +msgid "``__anext__``" +msgstr "``__anext__``" + +#: library/collections.abc.rst:179 +#, fuzzy +msgid ":class:`AsyncGenerator` [1]_" +msgstr ":class:`AsyncGenerator`" + +#: library/collections.abc.rst:179 +msgid ":class:`AsyncIterator`" +msgstr ":class:`AsyncIterator`" + +#: library/collections.abc.rst:179 +msgid "``asend``, ``athrow``" +msgstr "``asend``, ``athrow``" + +#: library/collections.abc.rst:179 +msgid "``aclose``, ``__aiter__``, ``__anext__``" +msgstr "``aclose``, ``__aiter__``, ``__anext__``" + +#: library/collections.abc.rst:184 +msgid "Footnotes" +msgstr "Notes" + +#: library/collections.abc.rst:185 +msgid "" +"These ABCs override :meth:`object.__subclasshook__` to support testing an " +"interface by verifying the required methods are present and have not been " +"set to :const:`None`. This only works for simple interfaces. More complex " +"interfaces require registration or direct subclassing." +msgstr "" + +#: library/collections.abc.rst:191 +#, fuzzy +msgid "" +"Checking ``isinstance(obj, Iterable)`` detects classes that are registered " +"as :class:`Iterable` or that have an :meth:`__iter__` method, but it does " +"not detect classes that iterate with the :meth:`__getitem__` method. The " +"only reliable way to determine whether an object is :term:`iterable` is to " +"call ``iter(obj)``." +msgstr "" +"Évaluer ``isinstance(obj, Iterable)`` détecte les classes qui sont " +"enregistrées comme :class:`Iterable` ou qui possèdent une méthode :meth:" +"`__iter__`, mais ne détecte pas les classes qui itèrent avec la méthode :" +"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:199 +#, fuzzy +msgid "Collections Abstract Base Classes -- Detailed Descriptions" +msgstr "Classes de base abstraites de collections" + +#: library/collections.abc.rst:204 +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:208 +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:212 +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:216 +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:220 +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:222 +msgid "" +"Checking ``isinstance(obj, Iterable)`` detects classes that are registered " +"as :class:`Iterable` or that have an :meth:`__iter__` method, but it does " +"not detect classes that iterate with the :meth:`__getitem__` method. The " +"only reliable way to determine whether an object is :term:`iterable` is to " +"call ``iter(obj)``." +msgstr "" +"Évaluer ``isinstance(obj, Iterable)`` détecte les classes qui sont " +"enregistrées comme :class:`Iterable` ou qui possèdent une méthode :meth:" +"`__iter__`, mais ne détecte pas les classes qui itèrent avec la méthode :" +"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:230 +msgid "ABC for sized iterable container classes." +msgstr "ABC pour les classes de conteneurs itérables et *sized*." + +#: library/collections.abc.rst:236 +msgid "" +"ABC for classes that provide the :meth:`~iterator.__iter__` and :meth:" +"`~iterator.__next__` methods. See also the definition of :term:`iterator`." +msgstr "" +"ABC pour les classes qui définissent les méthodes :meth:`~iterator.__iter__` " +"et :meth:`~iterator.__next__`. Voir aussi la définition d':term:`itérateur " +"`." + +#: library/collections.abc.rst:242 +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:249 +msgid "" +"ABC for generator classes that implement the protocol defined in :pep:`342` " +"that extends iterators with the :meth:`~generator.send`, :meth:`~generator." +"throw` and :meth:`~generator.close` methods. See also the definition of :" +"term:`generator`." +msgstr "" +"ABC pour les classes de générateurs qui implémentent le protocole défini " +"dans la :pep:`342` qui étend les itérateurs avec les méthodes :meth:" +"`~generator.send`, :meth:`~generator.throw` et :meth:`~generator.close`. " +"Voir aussi la définition de :term:`générateur `." + +#: library/collections.abc.rst:260 +msgid "ABCs for read-only and mutable :term:`sequences `." +msgstr "ABC pour les :term:`séquences ` immuables et muables." + +#: library/collections.abc.rst:262 +msgid "" +"Implementation note: Some of the mixin methods, such as :meth:`__iter__`, :" +"meth:`__reversed__` and :meth:`index`, make repeated calls to the " +"underlying :meth:`__getitem__` method. Consequently, if :meth:`__getitem__` " +"is implemented with constant access speed, the mixin methods will have " +"linear performance; however, if the underlying method is linear (as it would " +"be with a linked list), the mixins will have quadratic performance and will " +"likely need to be overridden." +msgstr "" +"Note pour l'implémentation : quelques méthodes *mixin*, comme :meth:" +"`__iter__`, :meth:`__reversed__` et :meth:`index`, font des appels répétés à " +"la méthode sous-jacente :meth:`__getitem__`. Ainsi, si :meth:`__getitem__` " +"est implémentée avec une vitesse d'accès constante, les méthodes *mixin* " +"auront une performance linéaire ; cependant, si elle est linéaire, les " +"*mixin* auront une performance quadratique, il serait alors judicieux de les " +"surcharger." + +#: library/collections.abc.rst:271 +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:278 +msgid "ABCs for read-only and mutable sets." +msgstr "ABC pour les ensembles immuables et muables." + +#: library/collections.abc.rst:283 +msgid "ABCs for read-only and mutable :term:`mappings `." +msgstr "" +"ABC pour les :term:`tables de correspondances ` immuables et " +"muables." + +#: library/collections.abc.rst:290 +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:294 +msgid "" +"ABC for :term:`awaitable` objects, which can be used in :keyword:`await` " +"expressions. Custom implementations must provide the :meth:`__await__` " +"method." +msgstr "" +"ABC pour les objets :term:`awaitables `, qui peuvent être " +"utilisés dans les expressions :keyword:`await`. Les implémentations " +"personnalisées doivent définir la méthode :meth:`__await__`." + +#: library/collections.abc.rst:298 +msgid "" +":term:`Coroutine ` objects and instances of the :class:" +"`~collections.abc.Coroutine` ABC are all instances of this ABC." +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:302 +msgid "" +"In CPython, generator-based coroutines (generators decorated with :func:" +"`types.coroutine` or :func:`asyncio.coroutine`) are *awaitables*, even " +"though they do not have an :meth:`__await__` method. Using " +"``isinstance(gencoro, Awaitable)`` for them will return ``False``. Use :func:" +"`inspect.isawaitable` to detect them." +msgstr "" +"En CPython, les coroutines basées sur les générateurs (les générateurs " +"décorés avec :func:`types.coroutine` ou :func:`asyncio.coroutine`) sont " +"*awaitables*, bien qu'elles n'aient pas de méthode :meth:`__await__`. " +"Évaluer ``isinstance(gencoro, Awaitable)`` où ``gencoro`` est un générateur " +"décoré va renvoyer ``False``. Utilisez :func:`inspect.isawaitable` pour les " +"détecter." + +#: library/collections.abc.rst:312 +msgid "" +"ABC for coroutine compatible classes. These implement the following " +"methods, defined in :ref:`coroutine-objects`: :meth:`~coroutine.send`, :meth:" +"`~coroutine.throw`, and :meth:`~coroutine.close`. Custom implementations " +"must also implement :meth:`__await__`. All :class:`Coroutine` instances are " +"also instances of :class:`Awaitable`. See also the definition of :term:" +"`coroutine`." +msgstr "" +"ABC pour les classes compatibles avec les coroutines. Elles implémentent les " +"méthodes suivantes, définies dans :ref:`coroutine-objects` : :meth:" +"`~coroutine.send`, :meth:`~coroutine.throw` et :meth:`~coroutine.close`. Les " +"implémentations personnalisées doivent également fournir :meth:`__await__`. " +"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:320 +msgid "" +"In CPython, generator-based coroutines (generators decorated with :func:" +"`types.coroutine` or :func:`asyncio.coroutine`) are *awaitables*, even " +"though they do not have an :meth:`__await__` method. Using " +"``isinstance(gencoro, Coroutine)`` for them will return ``False``. Use :func:" +"`inspect.isawaitable` to detect them." +msgstr "" +"En CPython, les coroutines basées sur les générateurs (les générateurs " +"décorés avec :func:`types.coroutine` ou :func:`asyncio.coroutine`) sont " +"*awaitables*, bien qu'elles n'aient pas de méthode :meth:`__await__`. " +"Évaluer ``isinstance(gencoro, Corourine)`` où ``gencoro`` est un générateur " +"décoré va renvoyer ``False``. Utilisez :func:`inspect.isawaitable` pour les " +"détecter." + +#: library/collections.abc.rst:330 +msgid "" +"ABC for classes that provide ``__aiter__`` method. See also the definition " +"of :term:`asynchronous iterable`." +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:337 +msgid "" +"ABC for classes that provide ``__aiter__`` and ``__anext__`` methods. See " +"also the definition of :term:`asynchronous iterator`." +msgstr "" +"ABC pour les classes qui définissent les méthodes ``__aiter__`` et " +"``__anext__``. Voir aussi la définition d':term:`itérateur asynchrone " +"`." + +#: library/collections.abc.rst:344 +msgid "" +"ABC for asynchronous generator classes that implement the protocol defined " +"in :pep:`525` and :pep:`492`." +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:350 +msgid "Examples and Recipes" +msgstr "Exemples et recettes" + +#: library/collections.abc.rst:352 +#, fuzzy +msgid "" +"ABCs allow us to ask classes or instances if they provide particular " +"functionality, for example::" +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:359 +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 " +"the full :class:`Set` API, it is only necessary to supply the three " +"underlying abstract methods: :meth:`__contains__`, :meth:`__iter__`, and :" +"meth:`__len__`. The ABC supplies the remaining methods such as :meth:" +"`__and__` and :meth:`isdisjoint`::" +msgstr "" +"Une partie des ABC sont également utiles en tant que *mixins* : cela rend " +"plus facile le développement de classes qui gèrent des API de conteneurs. " +"Par exemple, pour écrire une classe qui gère l'API entière de :class:`Set`, " +"il est uniquement nécessaire de fournir les trois méthodes sous-jacentes " +"abstraites :meth:`__contains__`, :meth:`__iter__` et :meth:`__len__`. L'ABC " +"apporte les méthodes restantes, comme :meth:`__and__` et :meth:" +"`isdisjoint` ::" + +#: library/collections.abc.rst:388 +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:391 +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 " +"assumed to have a signature in the form ``ClassName(iterable)``. That " +"assumption is factored-out to an internal classmethod called :meth:" +"`_from_iterable` which calls ``cls(iterable)`` to produce a new set. If the :" +"class:`Set` mixin is being used in a class with a different constructor " +"signature, you will need to override :meth:`_from_iterable` with a " +"classmethod or regular method that can construct new instances from an " +"iterable argument." +msgstr "" +"Comme une partie des opérations sur les ensembles créent de nouveaux " +"ensembles, les méthodes *mixins* par défaut ont besoin d'un moyen de créer " +"de nouvelles instances à partir d'un itérable. Le constructeur de classe est " +"supposé avoir une signature de la forme ``ClassName(iterable)``. Cette " +"supposition est faite par une méthode de classe interne appelée :meth:" +"`_from_iterable` qui appelle ``cls(iterable)`` pour construire un nouvel " +"ensemble. Si le :class:`Set` *mixin* est utilisé dans une classe avec un " +"constructeur de signature différente, vous devez surcharger :meth:" +"`_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:402 +msgid "" +"To override the comparisons (presumably for speed, as the semantics are " +"fixed), redefine :meth:`__le__` and :meth:`__ge__`, then the other " +"operations will automatically follow suit." +msgstr "" +"Pour surcharger les comparaisons (a priori pour la rapidité, puisque la " +"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:407 +#, fuzzy +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 " +"sets are :term:`hashable` or immutable. To add set hashability using " +"mixins, inherit from both :meth:`Set` and :meth:`Hashable`, then define " +"``__hash__ = Set._hash``." +msgstr "" +"La classe *mixin* :class:`Set` apporte une méthode :meth:`_hash` pour " +"calculer une valeur de hachage pour l'ensemble ; cependant :meth:`__hash__` " +"n'est pas défini car tous les ensembles ne sont pas hachables ou immuables. " +"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:415 +msgid "" +"`OrderedSet recipe `_ for an " +"example built on :class:`MutableSet`." +msgstr "" +"`OrderedSet recipe `_ pour un " +"exemple construit sur :class:`MutableSet`." + +#: library/collections.abc.rst:418 +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 :" +"pep:`3119`." + +#~ msgid "" +#~ "ABCs for classes that provide respectively the methods :meth:" +#~ "`__contains__`, :meth:`__hash__`, :meth:`__len__`, and :meth:`__call__`." +#~ msgstr "" +#~ "ABC pour les classes qui définissent respectivement les méthodes :meth:" +#~ "`__contains__`, :meth:`__hash__`, :meth:`__len__` et :meth:`__call__`." diff --git a/library/collections.po b/library/collections.po new file mode 100644 index 0000000000..a61db4f061 --- /dev/null +++ b/library/collections.po @@ -0,0 +1,1857 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-22 22:57+0100\n" +"PO-Revision-Date: 2021-11-06 20:46+0100\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" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" +"X-Generator: Poedit 3.0\n" + +#: library/collections.rst:2 +msgid ":mod:`collections` --- Container datatypes" +msgstr ":mod:`collections` — Types de données de conteneurs" + +#: library/collections.rst:10 +msgid "**Source code:** :source:`Lib/collections/__init__.py`" +msgstr "**Code source :** :source:`Lib/collections/__init__.py`" + +#: library/collections.rst:20 +msgid "" +"This module implements specialized container datatypes providing " +"alternatives to Python's general purpose built-in containers, :class:" +"`dict`, :class:`list`, :class:`set`, and :class:`tuple`." +msgstr "" +"Ce module implémente des types de données de conteneurs spécialisés qui " +"apportent des alternatives aux conteneurs natifs de Python plus généraux :" +"class:`dict`, :class:`list`, :class:`set` et :class:`tuple`." + +#: library/collections.rst:25 +msgid ":func:`namedtuple`" +msgstr ":func:`namedtuple`" + +#: library/collections.rst:25 +msgid "factory function for creating tuple subclasses with named fields" +msgstr "" +"fonction permettant de créer des sous-classes de ``tuple`` avec des champs " +"nommés" + +#: library/collections.rst:26 +msgid ":class:`deque`" +msgstr ":class:`deque`" + +#: library/collections.rst:26 +msgid "list-like container with fast appends and pops on either end" +msgstr "" +"conteneur se comportant comme une liste avec des ajouts et retraits rapides " +"à chaque extrémité" + +#: library/collections.rst:27 +msgid ":class:`ChainMap`" +msgstr ":class:`ChainMap`" + +#: library/collections.rst:27 +msgid "dict-like class for creating a single view of multiple mappings" +msgstr "" +"classe semblable aux dictionnaires qui crée une unique vue à partir de " +"plusieurs dictionnaires" + +#: library/collections.rst:28 +msgid ":class:`Counter`" +msgstr ":class:`Counter`" + +#: library/collections.rst:28 +#, fuzzy +msgid "dict subclass for counting :term:`hashable` objects" +msgstr "sous-classe de ``dict`` pour compter des objets hachables" + +#: library/collections.rst:29 +msgid ":class:`OrderedDict`" +msgstr ":class:`OrderedDict`" + +#: library/collections.rst:29 +msgid "dict subclass that remembers the order entries were added" +msgstr "" +"sous-classe de ``dict`` qui garde en mémoire l'ordre dans lequel les entrées " +"ont été ajoutées" + +#: library/collections.rst:30 +msgid ":class:`defaultdict`" +msgstr ":class:`defaultdict`" + +#: library/collections.rst:30 +msgid "dict subclass that calls a factory function to supply missing values" +msgstr "" +"sous-classe de ``dict`` qui appelle une fonction de fabrication en cas de " +"valeur manquante" + +#: library/collections.rst:31 +msgid ":class:`UserDict`" +msgstr ":class:`UserDict`" + +#: library/collections.rst:31 +msgid "wrapper around dictionary objects for easier dict subclassing" +msgstr "" +"surcouche autour des objets dictionnaires pour faciliter l'héritage de " +"``dict``" + +#: library/collections.rst:32 +msgid ":class:`UserList`" +msgstr ":class:`UserList`" + +#: library/collections.rst:32 +msgid "wrapper around list objects for easier list subclassing" +msgstr "" +"surcouche autour des objets listes pour faciliter l'héritage de ``list``" + +#: library/collections.rst:33 +msgid ":class:`UserString`" +msgstr ":class:`UserString`" + +#: library/collections.rst:33 +msgid "wrapper around string objects for easier string subclassing" +msgstr "" +"surcouche autour des objets chaînes de caractères pour faciliter l'héritage " +"de ``str``" + +#: library/collections.rst:38 +msgid ":class:`ChainMap` objects" +msgstr "Objets :class:`ChainMap`" + +#: library/collections.rst:42 +msgid "" +"A :class:`ChainMap` class is provided for quickly linking a number of " +"mappings so they can be treated as a single unit. It is often much faster " +"than creating a new dictionary and running multiple :meth:`~dict.update` " +"calls." +msgstr "" +"Le module fournit une classe :class:`ChainMap` afin de réunir rapidement " +"plusieurs dictionnaires en une unique entité. Cela est souvent plus rapide " +"que de créer un nouveau dictionnaire et d'effectuer plusieurs appels de :" +"meth:`~dict.update`." + +#: library/collections.rst:46 +msgid "" +"The class can be used to simulate nested scopes and is useful in templating." +msgstr "" +"Cette classe peut être utilisée pour simuler des portées imbriquées, elle " +"est aussi utile pour le *templating*." + +#: library/collections.rst:50 +msgid "" +"A :class:`ChainMap` groups multiple dicts or other mappings together to " +"create a single, updateable view. If no *maps* are specified, a single " +"empty dictionary is provided so that a new chain always has at least one " +"mapping." +msgstr "" +"Un objet :class:`ChainMap` regroupe plusieurs dictionnaires (ou autres " +"tableaux de correspondance) en une vue que l'on peut mettre à jour. Si le " +"paramètre *maps* est vide, un dictionnaire vide est fourni de telle manière " +"qu'une nouvelle chaîne possède toujours au moins un dictionnaire." + +#: library/collections.rst:54 +msgid "" +"The underlying mappings are stored in a list. That list is public and can " +"be accessed or updated using the *maps* attribute. There is no other state." +msgstr "" +"Les dictionnaires sous-jacents sont stockés dans une liste. Celle-ci est " +"publique et peut être consultée ou mise à jour via l'attribut *maps*. Il n'y " +"a pas d'autre état." + +#: library/collections.rst:57 +msgid "" +"Lookups search the underlying mappings successively until a key is found. " +"In contrast, writes, updates, and deletions only operate on the first " +"mapping." +msgstr "" +"Les recherches s'effectuent successivement dans chaque dictionnaire jusqu'à " +"la première clé correspondante. En revanche, les écritures, mises à jour et " +"suppressions n'affectent que le premier dictionnaire." + +#: library/collections.rst:60 +msgid "" +"A :class:`ChainMap` incorporates the underlying mappings by reference. So, " +"if one of the underlying mappings gets updated, those changes will be " +"reflected in :class:`ChainMap`." +msgstr "" +"Un objet :class:`ChainMap` incorpore les dictionnaires sous-jacents par leur " +"référence. Ainsi, si l'un d'eux est modifié, les changements affectent " +"également la :class:`ChainMap`." + +#: library/collections.rst:64 +msgid "" +"All of the usual dictionary methods are supported. In addition, there is a " +"*maps* attribute, a method for creating new subcontexts, and a property for " +"accessing all but the first mapping:" +msgstr "" +"Toutes les méthodes usuelles des dictionnaires sont gérées. De plus, cette " +"classe fournit un attribut *maps*, une méthode pour créer de nouveaux sous-" +"contextes et une propriété pour accéder à tous les dictionnaires sous-" +"jacents excepté le premier :" + +#: library/collections.rst:70 +msgid "" +"A user updateable list of mappings. The list is ordered from first-searched " +"to last-searched. It is the only stored state and can be modified to change " +"which mappings are searched. The list should always contain at least one " +"mapping." +msgstr "" +"Liste de dictionnaires éditable par l'utilisateur et classée selon l'ordre " +"de recherche. Il s'agit de l'unique état stocké et elle peut être modifiée " +"pour changer l'ordre de recherche. La liste doit toujours contenir au moins " +"un dictionnaire." + +#: library/collections.rst:77 +msgid "" +"Returns a new :class:`ChainMap` containing a new map followed by all of the " +"maps in the current instance. If ``m`` is specified, it becomes the new map " +"at the front of the list of mappings; if not specified, an empty dict is " +"used, so that a call to ``d.new_child()`` is equivalent to: ``ChainMap({}, " +"*d.maps)``. If any keyword arguments are specified, they update passed map " +"or new empty dict. This method is used for creating subcontexts that can be " +"updated without altering values in any of the parent mappings." +msgstr "" +"Renvoie un nouvel objet :class:`ChainMap` contenant un nouveau dictionnaire " +"suivi par tous les autres de l'instance actuelle. Si ``m`` est spécifié, il " +"devient le nouveau dictionnaire au début de la liste ; sinon, un " +"dictionnaire vide est utilisé, de telle manière qu'appeler ``d.new_child()`` " +"équivaut à appeler ``ChainMap({}, *d.maps)``. Si des arguments sont passés " +"par mot-clé, ils sont insérés comme de nouvelles entrées du dictionnaire " +"ajouté. Cette méthode est utile pour créer des sous-contextes qui peuvent " +"être mis à jour sans altérer les valeurs dans les dictionnaires parents." + +# Pas de majuscule car suit deux points. +#: library/collections.rst:86 +msgid "The optional ``m`` parameter was added." +msgstr "ajout du paramètre optionnel ``m``." + +#: library/collections.rst:89 +msgid "Keyword arguments support was added." +msgstr "prise en charge des arguments par mot-clé." + +#: library/collections.rst:94 +msgid "" +"Property returning a new :class:`ChainMap` containing all of the maps in the " +"current instance except the first one. This is useful for skipping the " +"first map in the search. Use cases are similar to those for the :keyword:" +"`nonlocal` keyword used in :term:`nested scopes `. The use " +"cases also parallel those for the built-in :func:`super` function. A " +"reference to ``d.parents`` is equivalent to: ``ChainMap(*d.maps[1:])``." +msgstr "" +"Propriété qui renvoie un nouvel objet :class:`ChainMap` contenant tous les " +"dictionnaires de l'instance actuelle hormis le premier. Cette propriété est " +"utile pour ignorer le premier dictionnaire dans les recherches ; son " +"utilisation rappelle le mot-clé :keyword:`nonlocal` (utilisé pour les :term:" +"`portées imbriquées `), ou bien la fonction native :func:" +"`super`. Une référence à ``d.parents`` est équivalente à : ``ChainMap(*d." +"maps[1:])``." + +#: library/collections.rst:102 +msgid "" +"Note, the iteration order of a :class:`ChainMap()` is determined by scanning " +"the mappings last to first::" +msgstr "" +"Notez que l'itération de :class:`ChainMap()` se fait en parcourant les " +"tableaux de correspondances du dernier jusqu'au premier ::" + +#: library/collections.rst:110 +msgid "" +"This gives the same ordering as a series of :meth:`dict.update` calls " +"starting with the last mapping::" +msgstr "" +"Cela produit le même ordre qu'une suite d'appels à :meth:`dict.update` en " +"commençant par le dernier tableau de correspondances ::" + +#: library/collections.rst:118 +msgid "Added support for ``|`` and ``|=`` operators, specified in :pep:`584`." +msgstr "" +"Ajout de la gestion des opérateurs ``|`` et ``|=`` tels que définis dans :" +"pep:`584`." + +#: library/collections.rst:123 +msgid "" +"The `MultiContext class `_ in the Enthought `CodeTools package " +"`_ has options to support writing to " +"any mapping in the chain." +msgstr "" +"La `classe MultiContext `_ dans le `package CodeTools `_ d'Enthought possède des options pour gérer " +"l'écriture dans n'importe quel dictionnaire de la chaîne." + +#: library/collections.rst:129 +msgid "" +"Django's `Context class `_ for templating is a read-only chain of mappings. It " +"also features pushing and popping of contexts similar to the :meth:" +"`~collections.ChainMap.new_child` method and the :attr:`~collections." +"ChainMap.parents` property." +msgstr "" +"La `classe de contexte de Django `_ pour la création de modèles est une chaîne de " +"dictionnaires en lecture seule. Elle comporte également des fonctionnalités " +"d'ajouts et de retraits de contextes similaires à la méthode :meth:" +"`~collections.ChainMap.new_child` et à la propriété :attr:`~collections." +"ChainMap.parents`." + +#: library/collections.rst:136 +msgid "" +"The `Nested Contexts recipe `_ " +"has options to control whether writes and other mutations apply only to the " +"first mapping or to any mapping in the chain." +msgstr "" +"`Le Cas pratique des contextes imbriqués `_ a des options pour contrôler si les écritures et autres " +"mutations ne s'appliquent qu'au premier ou à un autre dictionnaire de la " +"chaîne." + +#: library/collections.rst:141 +msgid "" +"A `greatly simplified read-only version of Chainmap `_." +msgstr "" +"Une `version grandement simplifiée de Chainmap en lecture seule `_." + +#: library/collections.rst:146 +msgid ":class:`ChainMap` Examples and Recipes" +msgstr "Exemples et cas pratiques utilisant :class:`ChainMap`" + +#: library/collections.rst:148 +msgid "This section shows various approaches to working with chained maps." +msgstr "" +"Cette partie montre diverses approches afin de travailler avec les " +"dictionnaires chaînés." + +#: library/collections.rst:151 +msgid "Example of simulating Python's internal lookup chain::" +msgstr "Exemple 1 : simulation de la chaîne de recherche interne de Python ::" + +#: library/collections.rst:156 +msgid "" +"Example of letting user specified command-line arguments take precedence " +"over environment variables which in turn take precedence over default " +"values::" +msgstr "" +"Exemple 2 : spécification d'une hiérarchie pour les options : ligne de " +"commande, variable d'environnement, valeurs par défaut ::" + +#: library/collections.rst:173 +msgid "" +"Example patterns for using the :class:`ChainMap` class to simulate nested " +"contexts::" +msgstr "" +"Exemple 3 : modèles pour simuler des contextes imbriqués avec la classe :" +"class:`ChainMap` ::" + +#: library/collections.rst:192 +msgid "" +"The :class:`ChainMap` class only makes updates (writes and deletions) to the " +"first mapping in the chain while lookups will search the full chain. " +"However, if deep writes and deletions are desired, it is easy to make a " +"subclass that updates keys found deeper in the chain::" +msgstr "" +"La classe :class:`ChainMap` ne met à jour (écriture et suppression) que le " +"premier dictionnaire de la chaîne, alors qu'une recherche inspecte toute la " +"chaîne. Cependant, si l'on veut effectuer des écritures ou suppressions en " +"profondeur, on peut facilement faire une sous-classe qui met à jour les clés " +"trouvées de la chaîne en profondeur ::" + +#: library/collections.rst:223 +msgid ":class:`Counter` objects" +msgstr "Objets :class:`Counter`" + +#: library/collections.rst:225 +msgid "" +"A counter tool is provided to support convenient and rapid tallies. For " +"example::" +msgstr "" +"Ce module fournit un outil pour effectuer rapidement et facilement des " +"dénombrements. Par exemple ::" + +#: library/collections.rst:244 +#, fuzzy +msgid "" +"A :class:`Counter` is a :class:`dict` subclass for counting :term:`hashable` " +"objects. It is a collection where elements are stored as dictionary keys and " +"their counts are stored as dictionary values. Counts are allowed to be any " +"integer value including zero or negative counts. The :class:`Counter` class " +"is similar to bags or multisets in other languages." +msgstr "" +"La classe :class:`Counter` est une sous-classe de :class:`dict` qui permet " +"le dénombrement d'objets hachables. Il s'agit d'une collection dans laquelle " +"les éléments sont stockés comme des clés de dictionnaire et leurs nombres " +"d’occurrences respectifs comme leurs valeurs. Ceux-ci peuvent être des " +"entiers relatifs (positifs, négatifs ou nuls). La classe :class:`Counter` " +"est similaire aux sacs ou aux multiensembles dans d'autres langages." + +#: library/collections.rst:250 +msgid "" +"Elements are counted from an *iterable* or initialized from another " +"*mapping* (or counter):" +msgstr "" +"Les éléments sont comptés à partir d'un itérable ou initialisés à partir " +"d'un autre dictionnaire (ou compteur) :" + +#: library/collections.rst:258 +msgid "" +"Counter objects have a dictionary interface except that they return a zero " +"count for missing items instead of raising a :exc:`KeyError`:" +msgstr "" +"Les objets Counter ont une interface de dictionnaire, à l'exception près " +"qu'ils renvoient zéro au lieu de lever une exception :exc:`KeyError` pour " +"des éléments manquants :" + +#: library/collections.rst:265 +msgid "" +"Setting a count to zero does not remove an element from a counter. Use " +"``del`` to remove it entirely:" +msgstr "" +"Mettre un comptage à zéro pour un élément ne le retire pas de l'objet " +"Counter. Il faut utiliser ``del`` pour le supprimer complètement :" + +#: library/collections.rst:273 +#, fuzzy +msgid "" +"As a :class:`dict` subclass, :class:`Counter` inherited the capability to " +"remember insertion order. Math operations on *Counter* objects also " +"preserve order. Results are ordered according to when an element is first " +"encountered in the left operand and then by the order encountered in the " +"right operand." +msgstr "" +"Puisqu'elle est une sous-classe de :class:`dict`, :class:`Counter` conserve " +"aussi l'ordre d'insertion. Les opérations mathématiques sur les objets " +"*Counter* préservent aussi l'ordre des insertions. Les résultats sont " +"ordonnés d'abord en fonction de la recherche d'apparition pour l'opérande de " +"gauche, puis dans l'ordre d'apparition de l'opérande de droite." + +#: library/collections.rst:279 +#, fuzzy +msgid "" +"Counter objects support additional methods beyond those available for all " +"dictionaries:" +msgstr "" +"En plus des méthodes disponibles pour tous les dictionnaires, les objets " +"compteurs gèrent trois méthodes supplémentaires :" + +#: library/collections.rst:284 +msgid "" +"Return an iterator over elements repeating each as many times as its count. " +"Elements are returned in the order first encountered. If an element's count " +"is less than one, :meth:`elements` will ignore it." +msgstr "" +"Renvoie un itérateur sur chaque élément en le répétant autant de fois que la " +"valeur du compteur associé. Les éléments sont renvoyés dans l'ordre selon " +"lequel ils sont rencontrés pour la première fois. Si le comptage d'un " +"élément est strictement inférieur à 1, alors :meth:`elements` l'ignore." + +#: library/collections.rst:294 +msgid "" +"Return a list of the *n* most common elements and their counts from the most " +"common to the least. If *n* is omitted or ``None``, :meth:`most_common` " +"returns *all* elements in the counter. Elements with equal counts are " +"ordered in the order first encountered:" +msgstr "" +"Renvoie une liste des *n* éléments les plus nombreux et leur valeur " +"respective dans l'ordre décroissant. Si *n* n'est pas fourni ou vaut " +"``None``, :meth:`most_common` renvoie *tous* les éléments du compteur. Les " +"éléments qui ont le même nombre d'occurrences sont ordonnés par l'ordre " +"selon lequel ils ont été rencontrés pour la première fois :" + +#: library/collections.rst:304 +msgid "" +"Elements are subtracted from an *iterable* or from another *mapping* (or " +"counter). Like :meth:`dict.update` but subtracts counts instead of " +"replacing them. Both inputs and outputs may be zero or negative." +msgstr "" +"Les éléments sont soustraits à partir d'un itérable ou d'un autre " +"dictionnaire (ou compteur). Cette méthode se comporte comme :meth:`dict." +"update` mais soustrait les nombres d'occurrences au lieu de les remplacer. " +"Les entrées et sorties peuvent être négatives ou nulles." + +#: library/collections.rst:318 +msgid "Compute the sum of the counts." +msgstr "Calcule la somme totale des nombres d'occurrences." + +#: library/collections.rst:326 +msgid "" +"The usual dictionary methods are available for :class:`Counter` objects " +"except for two which work differently for counters." +msgstr "" +"Les méthodes usuelles des dictionnaires sont disponibles pour les objets :" +"class:`Counter` à l'exception de deux méthodes qui fonctionnent différemment " +"pour les compteurs." + +#: library/collections.rst:331 +msgid "This class method is not implemented for :class:`Counter` objects." +msgstr "" +"Cette méthode de classe n'est pas implémentée pour les objets :class:" +"`Counter`." + +#: library/collections.rst:335 +msgid "" +"Elements are counted from an *iterable* or added-in from another *mapping* " +"(or counter). Like :meth:`dict.update` but adds counts instead of replacing " +"them. Also, the *iterable* is expected to be a sequence of elements, not a " +"sequence of ``(key, value)`` pairs." +msgstr "" +"Les éléments sont comptés à partir d'un itérable ou ajoutés d'un autre " +"dictionnaire (ou compteur). Cette méthode se comporte comme :meth:`dict." +"update` mais additionne les nombres d'occurrences au lieu de les remplacer. " +"De plus, l'itérable doit être une séquence d'éléments et non une séquence de " +"paires ``(clé, valeur)``." + +#: library/collections.rst:340 +msgid "" +"Counters support rich comparison operators for equality, subset, and " +"superset relationships: ``==``, ``!=``, ``<``, ``<=``, ``>``, ``>=``. All of " +"those tests treat missing elements as having zero counts so that " +"``Counter(a=1) == Counter(a=1, b=0)`` returns true." +msgstr "" +"Les compteurs prennent en charge les comparaisons riches pour les tests " +"d'égalité ainsi que d'inclusion du membre gauche dans le membre droite et " +"réciproquement, avec les opérateurs ``==``, ``!=``, ``<``, ``<=``, ``>`` et " +"``>=``. Les éléments dont le nombre d'occurrences est à zéro sont ignorés. " +"Par exemple, on a ``Counter(a=1) == Counter(a=1, b=0)``." + +#: library/collections.rst:345 +msgid "Rich comparison operations were added." +msgstr "ajout des comparaisons riches." + +#: library/collections.rst:348 +msgid "" +"In equality tests, missing elements are treated as having zero counts. " +"Formerly, ``Counter(a=3)`` and ``Counter(a=3, b=0)`` were considered " +"distinct." +msgstr "" +"les éléments dont le nombre d'occurrences est à zéro sont désormais ignorés " +"dans les tests d'égalité. On avait auparavant ``Counter(a=3) != Counter(a=3, " +"b=0)``." + +#: library/collections.rst:353 +msgid "Common patterns for working with :class:`Counter` objects::" +msgstr "Opérations usuelles sur les objets :class:`Counter` ::" + +#: library/collections.rst:365 +#, fuzzy +msgid "" +"Several mathematical operations are provided for combining :class:`Counter` " +"objects to produce multisets (counters that have counts greater than zero). " +"Addition and subtraction combine counters by adding or subtracting the " +"counts of corresponding elements. Intersection and union return the minimum " +"and maximum of corresponding counts. Equality and inclusion compare " +"corresponding counts. Each operation can accept inputs with signed counts, " +"but the output will exclude results with counts of zero or less." +msgstr "" +"Quelques opérations mathématiques sont fournies pour combiner des objets :" +"class:`Counter` afin de créer des multiensembles (des compteurs dont les " +"dénombrements des éléments sont strictement supérieurs à zéro). Les " +"additions et soustractions combinent les compteurs en ajoutant ou " +"retranchant les nombres d'occurrences des éléments correspondants. Les " +"intersections et unions renvoient les minimums et maximums des comptages " +"correspondants. Chaque opération peut accepter des entrées avec des " +"comptages relatifs, mais la sortie exclut les résultats avec des comptages " +"négatifs ou nuls." + +#: library/collections.rst:390 +msgid "" +"Unary addition and subtraction are shortcuts for adding an empty counter or " +"subtracting from an empty counter." +msgstr "" +"L'addition et la soustraction unaires (avec un seul terme) sont des " +"raccourcis pour respectivement additionner un compteur avec un compteur vide " +"ou et pour retrancher un compteur d'un compteur vide." + +#: library/collections.rst:399 +msgid "" +"Added support for unary plus, unary minus, and in-place multiset operations." +msgstr "" +"Ajout de la gestion des additions et soustractions unaires, et des " +"remplacements dans les multiensembles." + +#: library/collections.rst:404 +msgid "" +"Counters were primarily designed to work with positive integers to represent " +"running counts; however, care was taken to not unnecessarily preclude use " +"cases needing other types or negative values. To help with those use cases, " +"this section documents the minimum range and type restrictions." +msgstr "" +"Les compteurs ont été conçus essentiellement pour fonctionner avec des " +"entiers naturels pour représenter les dénombrements en cours ; cependant, " +"les cas d'utilisation nécessitant d'autres types ou des valeurs négatives " +"n'ont pas été écartés. Pour vous aider dans ces cas particuliers, cette " +"section documente la plage minimale et les restrictions de type." + +#: library/collections.rst:409 +msgid "" +"The :class:`Counter` class itself is a dictionary subclass with no " +"restrictions on its keys and values. The values are intended to be numbers " +"representing counts, but you *could* store anything in the value field." +msgstr "" +"La classe :class:`Counter` est elle-même une sous-classe de dictionnaire " +"sans restriction particulière sur ces clés ou valeurs. Les valeurs ont " +"vocation à être des nombres représentants des comptages, mais il est " +"*possible* de stocker n'importe quel type de valeur." + +#: library/collections.rst:413 +msgid "" +"The :meth:`~Counter.most_common` method requires only that the values be " +"orderable." +msgstr "" +"La méthode :meth:`~Counter.most_common` exige uniquement que les valeurs " +"soient ordonnables." + +#: library/collections.rst:415 +msgid "" +"For in-place operations such as ``c[key] += 1``, the value type need only " +"support addition and subtraction. So fractions, floats, and decimals would " +"work and negative values are supported. The same is also true for :meth:" +"`~Counter.update` and :meth:`~Counter.subtract` which allow negative and " +"zero values for both inputs and outputs." +msgstr "" +"Les opérations de remplacement telles que ``c[key] += 1`` exigent une valeur " +"dont le type gère l'addition et la soustraction. Cela inclut donc les " +"fractions, les flottants et les décimaux, y compris négatifs. Il en va de " +"même pour :meth:`~Counter.update` et :meth:`~Cointer.substract` qui " +"acceptent des valeurs négatives ou nulles dans les entrées et sorties." + +#: library/collections.rst:421 +msgid "" +"The multiset methods are designed only for use cases with positive values. " +"The inputs may be negative or zero, but only outputs with positive values " +"are created. There are no type restrictions, but the value type needs to " +"support addition, subtraction, and comparison." +msgstr "" +"Les méthodes de multiensembles sont uniquement conçues pour les cas " +"d'utilisation avec des valeurs positives. Les entrées peuvent contenir des " +"valeurs négatives ou nulles, mais seules les sorties avec des valeurs " +"positives sont créées. Il n'y a pas de restriction de type, mais les types " +"des valeurs doivent gérer l'addition, la soustraction et la comparaison." + +#: library/collections.rst:426 +msgid "" +"The :meth:`~Counter.elements` method requires integer counts. It ignores " +"zero and negative counts." +msgstr "" +"La méthode :meth:`~Counter.elements` exige des valeurs entières et ignore " +"les valeurs négatives ou nulles." + +#: library/collections.rst:431 +msgid "" +"`Bag class `_ in Smalltalk." +msgstr "" +"`Bag class `_ dans Smalltalk." + +#: library/collections.rst:434 +msgid "" +"Wikipedia entry for `Multisets `_." +msgstr "" +"L'article Wikipédia sur les `multiensembles `_ sur Wikipédia (ou `l'article en anglais `_)." + +#: library/collections.rst:436 +msgid "" +"`C++ multisets `_ tutorial with examples." +msgstr "" +"Des guides et exemples à propos des `multiensembles en C++ `_." + +#: library/collections.rst:439 +msgid "" +"For mathematical operations on multisets and their use cases, see *Knuth, " +"Donald. The Art of Computer Programming Volume II, Section 4.6.3, Exercise " +"19*." +msgstr "" +"Pour les opérations mathématiques sur les multiensembles et leurs " +"applications, voir *Knuth, Donald. The Art of Computer Programming Volume " +"II, Section 4.6.3, Exercise 19*." + +#: library/collections.rst:443 +msgid "" +"To enumerate all distinct multisets of a given size over a given set of " +"elements, see :func:`itertools.combinations_with_replacement`::" +msgstr "" +"Pour lister tous les multiensembles distincts de même taille parmi un " +"ensemble donné d'éléments, voir :func:`itertools." +"combinations_with_replacement` ::" + +#: library/collections.rst:450 +msgid ":class:`deque` objects" +msgstr "Objets :class:`deque`" + +#: library/collections.rst:454 +msgid "" +"Returns a new deque object initialized left-to-right (using :meth:`append`) " +"with data from *iterable*. If *iterable* is not specified, the new deque is " +"empty." +msgstr "" +"Renvoie un nouvel objet *deque* initialisé de gauche à droite (en utilisant :" +"meth:`append`) avec les données d'*iterable*. Si *iterable* n'est pas " +"spécifié, alors la nouvelle *deque* est vide." + +#: library/collections.rst:457 +msgid "" +"Deques are a generalization of stacks and queues (the name is pronounced " +"\"deck\" and is short for \"double-ended queue\"). Deques support thread-" +"safe, memory efficient appends and pops from either side of the deque with " +"approximately the same O(1) performance in either direction." +msgstr "" +"Les *deques* sont une généralisation des piles et des files (*deque* se " +"prononce \"*dèque*\" et est l'abréviation de l'anglais *double-ended " +"queue*) : il est possible d'ajouter et retirer des éléments par les deux " +"bouts des *deques*. Celles-ci gèrent des ajouts et des retraits utilisables " +"par de multiples fils d'exécution (*thread-safe*) et efficients du point de " +"vue de la mémoire des deux côtés de la *deque*, avec approximativement la " +"même performance en *O(1)* dans les deux sens." + +#: library/collections.rst:462 +msgid "" +"Though :class:`list` objects support similar operations, they are optimized " +"for fast fixed-length operations and incur O(n) memory movement costs for " +"``pop(0)`` and ``insert(0, v)`` operations which change both the size and " +"position of the underlying data representation." +msgstr "" +"Bien que les objets :class:`list` gèrent des opérations similaires, ils sont " +"optimisés pour des opérations qui ne changent pas la taille de la liste. Les " +"opérations ``pop(0)`` et ``insert(0, v)`` qui changent la taille et la " +"position de la représentation des données sous-jacentes entraînent des coûts " +"de déplacement de mémoire en *O(n)*." + +#: library/collections.rst:468 +msgid "" +"If *maxlen* is not specified or is ``None``, deques may grow to an arbitrary " +"length. Otherwise, the deque is bounded to the specified maximum length. " +"Once a bounded length deque is full, when new items are added, a " +"corresponding number of items are discarded from the opposite end. Bounded " +"length deques provide functionality similar to the ``tail`` filter in Unix. " +"They are also useful for tracking transactions and other pools of data where " +"only the most recent activity is of interest." +msgstr "" +"Si *maxlen* n'est pas spécifié ou vaut *None*, les *deques* peuvent " +"atteindre une taille arbitraire. Sinon, la *deque* est limitée par cette " +"taille maximale. Une fois que celle-ci est atteinte, un ajout d'un ou " +"plusieurs éléments engendre la suppression du nombre correspondant " +"d'éléments à l'autre extrémité de la *deque*. Les *deques* à longueur " +"limitée apportent des fonctionnalités similaires au filtre ``tail`` d'Unix. " +"Elles sont aussi utiles pour le suivi de transactions et autres lots de " +"données où seule l'activité récente est intéressante." + +#: library/collections.rst:477 +msgid "Deque objects support the following methods:" +msgstr "Les objets *deques* gèrent les méthodes suivantes :" + +#: library/collections.rst:481 +msgid "Add *x* to the right side of the deque." +msgstr "Ajoute *x* à l'extrémité droite de la *deque*." + +#: library/collections.rst:486 +msgid "Add *x* to the left side of the deque." +msgstr "Ajoute *x* à l'extrémité gauche de la *deque*." + +#: library/collections.rst:491 +msgid "Remove all elements from the deque leaving it with length 0." +msgstr "" +"Supprime tous les éléments de la *deque* et la laisse avec une longueur de 0." + +#: library/collections.rst:496 +msgid "Create a shallow copy of the deque." +msgstr "Crée une copie superficielle de la *deque*." + +#: library/collections.rst:503 +msgid "Count the number of deque elements equal to *x*." +msgstr "Compte le nombre d'éléments de la *deque* égaux à *x*." + +#: library/collections.rst:510 +msgid "" +"Extend the right side of the deque by appending elements from the iterable " +"argument." +msgstr "" +"Étend la *deque* en ajoutant les éléments de l'itérable en argument à son " +"extrémité droite." + +#: library/collections.rst:516 +msgid "" +"Extend the left side of the deque by appending elements from *iterable*. " +"Note, the series of left appends results in reversing the order of elements " +"in the iterable argument." +msgstr "" +"Étend la *deque* en ajoutant les éléments d'*iterable* à son extrémité " +"gauche. Dans ce cas, notez que la série d'ajouts inverse l'ordre des " +"éléments de l'argument itérable." + +#: library/collections.rst:523 +msgid "" +"Return the position of *x* in the deque (at or after index *start* and " +"before index *stop*). Returns the first match or raises :exc:`ValueError` " +"if not found." +msgstr "" +"Renvoie la position de *x* dans la *deque* (à partir de *start* inclus et " +"jusqu'à *stop* exclus). Renvoie la première correspondance ou lève :exc:" +"`ValueError` si aucune n'est trouvée." + +#: library/collections.rst:532 +msgid "Insert *x* into the deque at position *i*." +msgstr "Insère *x* dans la *deque* à la position *i*." + +#: library/collections.rst:534 +msgid "" +"If the insertion would cause a bounded deque to grow beyond *maxlen*, an :" +"exc:`IndexError` is raised." +msgstr "" +"Si une insertion provoque un dépassement de la taille limitée d'une *deque*, " +"alors elle lève une exception :exc:`IndexError`." + +#: library/collections.rst:542 +msgid "" +"Remove and return an element from the right side of the deque. If no " +"elements are present, raises an :exc:`IndexError`." +msgstr "" +"Retire et renvoie un élément de l'extrémité droite de la *deque*. S'il n'y a " +"aucun élément, lève une exception :exc:`IndexError`." + +#: library/collections.rst:548 +msgid "" +"Remove and return an element from the left side of the deque. If no elements " +"are present, raises an :exc:`IndexError`." +msgstr "" +"Retire et renvoie un élément de l'extrémité gauche de la *deque*. S'il n'y a " +"aucun élément, lève une exception :exc:`IndexError`." + +#: library/collections.rst:554 +msgid "" +"Remove the first occurrence of *value*. If not found, raises a :exc:" +"`ValueError`." +msgstr "" +"Supprime la première occurrence de *value*. Si aucune occurrence n'est " +"trouvée, lève une exception :exc:`ValueError`." + +#: library/collections.rst:560 +msgid "Reverse the elements of the deque in-place and then return ``None``." +msgstr "" +"Inverse le sens des éléments de la *deque* sans créer de copie et renvoie " +"``None``." + +#: library/collections.rst:567 +msgid "" +"Rotate the deque *n* steps to the right. If *n* is negative, rotate to the " +"left." +msgstr "" +"Décale les éléments de la *deque* de *n* places vers la droite (le dernier " +"élément revient au début). Si *n* est négatif, décale vers la gauche." + +#: library/collections.rst:570 +msgid "" +"When the deque is not empty, rotating one step to the right is equivalent to " +"``d.appendleft(d.pop())``, and rotating one step to the left is equivalent " +"to ``d.append(d.popleft())``." +msgstr "" +"Quand la *deque* n'est pas vide, un décalage d'une place vers la droite " +"équivaut à ``d.appendleft(d.pop())`` et un décalage d'une place vers la " +"gauche est équivalent à ``d.append(d.popleft())``." + +#: library/collections.rst:575 +msgid "Deque objects also provide one read-only attribute:" +msgstr "" +"Les objets *deques* fournissent également un attribut en lecture seule :" + +#: library/collections.rst:579 +msgid "Maximum size of a deque or ``None`` if unbounded." +msgstr "La taille maximale d'une *deque*, ou ``None`` si illimitée." + +#: library/collections.rst:584 +msgid "" +"In addition to the above, deques support iteration, pickling, ``len(d)``, " +"``reversed(d)``, ``copy.copy(d)``, ``copy.deepcopy(d)``, membership testing " +"with the :keyword:`in` operator, and subscript references such as ``d[0]`` " +"to access the first element. Indexed access is O(1) at both ends but slows " +"to O(n) in the middle. For fast random access, use lists instead." +msgstr "" +"En plus des méthodes précédentes, les *deques* gèrent l'itération, la " +"sérialisation, ``len(d)``, ``reversed(d)``, ``copy.copy(d)``, ``copy." +"deepcopy(d)``, le test d'appartenance avec l'opérateur :keyword:`in`, et les " +"références en indice telles que ``d[0]`` pour accéder au premier élément. " +"L'accès par indice est en *O(1)* aux extrémités mais en *O(n)* au milieu. " +"Pour des accès aléatoires rapides, il est préférable d'utiliser des listes." + +#: library/collections.rst:590 +msgid "" +"Starting in version 3.5, deques support ``__add__()``, ``__mul__()``, and " +"``__imul__()``." +msgstr "" +"Depuis la version 3.5, les *deques* gèrent ``__add__()``, ``__mul__()`` et " +"``__imul__()``." + +#: library/collections.rst:593 +msgid "Example:" +msgstr "Exemple :" + +#: library/collections.rst:650 +msgid ":class:`deque` Recipes" +msgstr "Cas pratiques utilisant :class:`deque`" + +#: library/collections.rst:652 +msgid "This section shows various approaches to working with deques." +msgstr "" +"Cette partie montre diverses approches afin de travailler avec les *deques*." + +#: library/collections.rst:654 +msgid "" +"Bounded length deques provide functionality similar to the ``tail`` filter " +"in Unix::" +msgstr "" +"Les *deques* à taille limitée apportent une fonctionnalité similaire au " +"filtre ``tail`` d'Unix ::" + +#: library/collections.rst:662 +msgid "" +"Another approach to using deques is to maintain a sequence of recently added " +"elements by appending to the right and popping to the left::" +msgstr "" +"Une autre approche d'utilisation des *deques* est de maintenir une séquence " +"d'éléments récemment ajoutés en les ajoutant à droite et en retirant les " +"anciens par la gauche ::" + +#: library/collections.rst:677 +msgid "" +"A `round-robin scheduler `_ can be implemented with input iterators stored in a :" +"class:`deque`. Values are yielded from the active iterator in position " +"zero. If that iterator is exhausted, it can be removed with :meth:`~deque." +"popleft`; otherwise, it can be cycled back to the end with the :meth:`~deque." +"rotate` method::" +msgstr "" +"Un `ordonnancement en round-robin `_ peut être implémenté avec des entrées itérateurs " +"stockées dans une :class:`deque`. Les valeurs sont produites par l'itérateur " +"actif en position zéro. Si cet itérateur est épuisé, il peut être retiré " +"avec la méthode :meth:`~deque.popleft` ; ou bien il peut être remis à la fin " +"avec la méthode :meth:`~ deque.rotate` ::" + +#: library/collections.rst:696 +msgid "" +"The :meth:`~deque.rotate` method provides a way to implement :class:`deque` " +"slicing and deletion. For example, a pure Python implementation of ``del " +"d[n]`` relies on the ``rotate()`` method to position elements to be popped::" +msgstr "" +"La méthode :meth:`~deque.rotate` apporte une façon d'implémenter la " +"sélection d'intervalle (*slicing*) et les suppressions pour les :class:" +"`deques`. Par exemple, une implémentation de ``del d[n]`` en Python pur " +"utilise la méthode ``rotate()`` pour mettre en position les éléments à " +"éjecter ::" + +#: library/collections.rst:705 +msgid "" +"To implement :class:`deque` slicing, use a similar approach applying :meth:" +"`~deque.rotate` to bring a target element to the left side of the deque. " +"Remove old entries with :meth:`~deque.popleft`, add new entries with :meth:" +"`~deque.extend`, and then reverse the rotation. With minor variations on " +"that approach, it is easy to implement Forth style stack manipulations such " +"as ``dup``, ``drop``, ``swap``, ``over``, ``pick``, ``rot``, and ``roll``." +msgstr "" +"Pour implémenter le *slicing* pour les :class:`deques `, il est " +"possible d'utiliser une approche similaire en appliquant :meth:`~deque." +"rotate` afin d'apporter un élément cible à l'extrémité gauche de la *deque*. " +"On éjecte les anciennes entrées avec :meth:`~deque.popleft` et on ajoute les " +"nouvelles avec :meth:`~deque.extend`, puis on inverse la rotation. Il est " +"aisé d'implémenter les manipulations des piles inspirées du Forth telles que " +"``dup``, ``drop``, ``swap``, ``over``, ``pick``, ``rot`` et ``roll``." + +#: library/collections.rst:715 +msgid ":class:`defaultdict` objects" +msgstr "Objets :class:`defaultdict`" + +#: library/collections.rst:719 +msgid "" +"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." +msgstr "" +"Renvoie un nouvel objet qui se comporte comme un dictionnaire. :class:" +"`defaultdict` est une sous-classe de la classe native :class:`dict`. Elle " +"surcharge une méthode et ajoute une variable d'instance modifiable. Les " +"autres fonctionnalités sont les mêmes que celles des objets :class:`dict` et " +"ne sont pas documentées ici." + +#: library/collections.rst:724 +msgid "" +"The first argument provides the initial value for the :attr:" +"`default_factory` attribute; it defaults to ``None``. All remaining " +"arguments are treated the same as if they were passed to the :class:`dict` " +"constructor, including keyword arguments." +msgstr "" +"Le premier argument fournit la valeur initiale de l'attribut :attr:" +"`default_factory` qui doit être un objet appelable sans paramètre ou " +"``None``, sa valeur par défaut. Tous les autres arguments sont traités comme " +"si on les passait au constructeur de :class:`dict`, y compris les arguments " +"nommés." + +#: library/collections.rst:730 +msgid "" +":class:`defaultdict` objects support the following method in addition to the " +"standard :class:`dict` operations:" +msgstr "" +"En plus des opérations usuelles de :class:`dict`, les objets :class:" +"`defaultdict` gèrent les méthodes supplémentaires suivantes :" + +#: library/collections.rst:735 +msgid "" +"If the :attr:`default_factory` attribute is ``None``, this raises a :exc:" +"`KeyError` exception with the *key* as argument." +msgstr "" +"Si l'attribut :attr:`default_factory` est ``None``, lève une exception :exc:" +"`KeyError` avec *key* comme argument." + +#: library/collections.rst:738 +msgid "" +"If :attr:`default_factory` is not ``None``, it is called without arguments " +"to provide a default value for the given *key*, this value is inserted in " +"the dictionary for the *key*, and returned." +msgstr "" +"Si :attr:`default_fatory` ne vaut pas ``None``, cet attribut est appelé sans " +"argument pour fournir une valeur par défaut pour la *key* demandée. Cette " +"valeur est insérée dans le dictionnaire avec pour clé *key* et est renvoyée." + +#: library/collections.rst:742 +msgid "" +"If calling :attr:`default_factory` raises an exception this exception is " +"propagated unchanged." +msgstr "" +"Si appeler :attr:`default_factory` lève une exception, celle-ci est " +"transmise inchangée." + +#: library/collections.rst:745 +msgid "" +"This method is called by the :meth:`__getitem__` method of the :class:`dict` " +"class when the requested key is not found; whatever it returns or raises is " +"then returned or raised by :meth:`__getitem__`." +msgstr "" +"Cette méthode est appelée par la méthode :meth:`__getitem__` de la classe :" +"class:`dict` lorsque la clé demandée n'est pas trouvée. Ce qu'elle renvoie " +"ou lève est alors renvoyé ou levé par :meth:`__getitem__`." + +#: library/collections.rst:749 +msgid "" +"Note that :meth:`__missing__` is *not* called for any operations besides :" +"meth:`__getitem__`. This means that :meth:`get` will, like normal " +"dictionaries, return ``None`` as a default rather than using :attr:" +"`default_factory`." +msgstr "" +"Remarquez que :meth:`__missing__` n'est *pas* appelée pour les opérations " +"autres que :meth:`__getitem__`. Cela signifie que :meth:`get` renvoie " +"``None`` comme les dictionnaires natifs dans les cas triviaux et n'utilise " +"pas :attr:`default_factory`." + +#: library/collections.rst:755 +msgid ":class:`defaultdict` objects support the following instance variable:" +msgstr "Les objets :class:`defaultdict` gèrent la variable d'instance :" + +#: library/collections.rst:760 +msgid "" +"This attribute is used by the :meth:`__missing__` method; it is initialized " +"from the first argument to the constructor, if present, or to ``None``, if " +"absent." +msgstr "" +"Cet attribut est utilisé par la méthode :meth:`__missing__` ; il est " +"initialisé par le premier argument passé au constructeur, s'il est spécifié, " +"sinon par ``None``." + +#: library/collections.rst:1180 +msgid "" +"Added merge (``|``) and update (``|=``) operators, specified in :pep:`584`." +msgstr "" +"ajout des opérateurs fusion (``|``) et mise-à-jour (``|=``) tels que définis " +"dans :pep:`584`." + +#: library/collections.rst:770 +msgid ":class:`defaultdict` Examples" +msgstr "Exemples utilisant :class:`defaultdict`" + +#: library/collections.rst:772 +msgid "" +"Using :class:`list` as the :attr:`~defaultdict.default_factory`, it is easy " +"to group a sequence of key-value pairs into a dictionary of lists:" +msgstr "" +"Utiliser :class:`list` comme :attr:`~defaultdict.default_factory` facilite " +"le regroupement d'une séquence de paires clé-valeur en un dictionnaire de " +"listes :" + +#: library/collections.rst:783 +msgid "" +"When each key is encountered for the first time, it is not already in the " +"mapping; so an entry is automatically created using the :attr:`~defaultdict." +"default_factory` function which returns an empty :class:`list`. The :meth:" +"`list.append` operation then attaches the value to the new list. When keys " +"are encountered again, the look-up proceeds normally (returning the list for " +"that key) and the :meth:`list.append` operation adds another value to the " +"list. This technique is simpler and faster than an equivalent technique " +"using :meth:`dict.setdefault`:" +msgstr "" +"Lorsque chaque clé est rencontrée pour la première fois, elle n'est pas " +"encore présente dans le dictionnaire, donc une entrée est automatiquement " +"créée grâce à la fonction :attr:`~defaultdict.default_factory` qui renvoie " +"un objet :class:`list` vide. L'opération :meth:`list.append` ajoute la " +"valeur à la nouvelle liste. Quand les clés sont à nouveau rencontrées, la " +"recherche se déroule correctement (elle renvoie la liste de cette clé) et " +"l'opération :meth:`list.append` ajoute une autre valeur à la liste. Cette " +"technique est plus simple et plus rapide qu'une technique équivalente " +"utilisant :meth:`dict.setdefault` :" + +#: library/collections.rst:798 +msgid "" +"Setting the :attr:`~defaultdict.default_factory` to :class:`int` makes the :" +"class:`defaultdict` useful for counting (like a bag or multiset in other " +"languages):" +msgstr "" +"Utiliser :class:`int` comme :attr:`~defaultdict.default_factory` rend la " +"classe :class:`defaultdict` pratique pour le comptage (comme un sac ou multi-" +"ensemble dans d'autres langages) :" + +#: library/collections.rst:810 +msgid "" +"When a letter is first encountered, it is missing from the mapping, so the :" +"attr:`~defaultdict.default_factory` function calls :func:`int` to supply a " +"default count of zero. The increment operation then builds up the count for " +"each letter." +msgstr "" +"Quand une lettre est rencontrée pour la première fois, elle n'est pas dans " +"le dictionnaire, donc la fonction :attr:`~defaultdict.default_factory` " +"appelle :func:`int` pour mettre un nouveau compteur à zéro. L'incrémentation " +"augmente ensuite le comptage pour chaque lettre." + +#: library/collections.rst:814 +msgid "" +"The function :func:`int` which always returns zero is just a special case of " +"constant functions. A faster and more flexible way to create constant " +"functions is to use a lambda function which can supply any constant value " +"(not just zero):" +msgstr "" +"La fonction :func:`int` qui retourne toujours zéro est simplement une " +"fonction constante particulière. Un moyen plus flexible et rapide de créer " +"une fonction constante est d'utiliser une fonction lambda qui peut fournir " +"n'importe quelle valeur constante (pas seulement zéro) :" + +#: library/collections.rst:826 +msgid "" +"Setting the :attr:`~defaultdict.default_factory` to :class:`set` makes the :" +"class:`defaultdict` useful for building a dictionary of sets:" +msgstr "" +"Utiliser :class:`set` comme :attr:`~defaultdict.default_factory` rend la " +"classe :class:`defaultdict` pratique pour créer un dictionnaire d'ensembles :" + +#: library/collections.rst:839 +msgid ":func:`namedtuple` Factory Function for Tuples with Named Fields" +msgstr "" +":func:`namedtuple` : fonction de construction pour *n*-uplets avec des " +"champs nommés" + +#: library/collections.rst:841 +msgid "" +"Named tuples assign meaning to each position in a tuple and allow for more " +"readable, self-documenting code. They can be used wherever regular tuples " +"are used, and they add the ability to access fields by name instead of " +"position index." +msgstr "" +"Les *n*-uplets nommés assignent une signification à chacun de leur élément, " +"ce qui rend le code plus lisible et explicite. Ils peuvent être utilisés " +"partout où les *n*-uplets natifs sont utilisés, et ils ajoutent la " +"possibilité d'accéder à leurs champs grâce à leur nom au lieu de leur index " +"de position." + +#: library/collections.rst:847 +msgid "" +"Returns a new tuple subclass named *typename*. The new subclass is used to " +"create tuple-like objects that have fields accessible by attribute lookup as " +"well as being indexable and iterable. Instances of the subclass also have a " +"helpful docstring (with typename and field_names) and a helpful :meth:" +"`__repr__` method which lists the tuple contents in a ``name=value`` format." +msgstr "" +"Renvoie une nouvelle sous-classe de ``tuple`` appelée *typename*. Elle est " +"utilisée pour créer des objets se comportant comme les *n*-uplets qui ont " +"des champs accessibles par recherche d'attribut en plus d'être indexables et " +"itérables. Les instances de cette sous-classe possèdent aussi une " +"*docstring* explicite (avec *type_name* et les *field_names*) et une " +"méthode :meth:`__repr__` pratique qui liste le contenu du *n*-uplet au " +"format ``nom=valeur``." + +#: library/collections.rst:853 +msgid "" +"The *field_names* are a sequence of strings such as ``['x', 'y']``. " +"Alternatively, *field_names* can be a single string with each fieldname " +"separated by whitespace and/or commas, for example ``'x y'`` or ``'x, y'``." +msgstr "" +"*field_names* peut être une séquence de chaînes de caractères telle que " +"``['x', 'y']`` ou bien une unique chaîne de caractères où les noms de champs " +"sont séparés par un espace et/ou une virgule, par exemple ``'x y'`` ou ``'x, " +"y'``." + +#: library/collections.rst:857 +msgid "" +"Any valid Python identifier may be used for a fieldname except for names " +"starting with an underscore. Valid identifiers consist of letters, digits, " +"and underscores but do not start with a digit or underscore and cannot be a :" +"mod:`keyword` such as *class*, *for*, *return*, *global*, *pass*, or *raise*." +msgstr "" +"N'importe quel identifiant Python peut être utilisé pour un nom de champ " +"hormis ceux commençant par un tiret bas. Les identifiants valides peuvent " +"contenir des lettres, des chiffres (sauf en première position) et des tirets " +"bas (sauf en première position). Un identifiant ne peut pas être un :mod:" +"`keyword` tel que ``class``, ``for``, ``return``, ``global``, ``pass`` ou " +"``raise``." + +#: library/collections.rst:863 +msgid "" +"If *rename* is true, invalid fieldnames are automatically replaced with " +"positional names. For example, ``['abc', 'def', 'ghi', 'abc']`` is " +"converted to ``['abc', '_1', 'ghi', '_3']``, eliminating the keyword ``def`` " +"and the duplicate fieldname ``abc``." +msgstr "" +"Si *rename* vaut ``True``, alors les noms de champs invalides sont " +"automatiquement renommés en noms positionnels. Par exemple, ``['abc', 'def', " +"'ghi', 'abc']`` est converti en ``['abc, '_1', 'ghi', '_3']`` afin " +"d'éliminer le mot-clé ``def`` et le doublon de ``abc``." + +#: library/collections.rst:868 +msgid "" +"*defaults* can be ``None`` or an :term:`iterable` of default values. Since " +"fields with a default value must come after any fields without a default, " +"the *defaults* are applied to the rightmost parameters. For example, if the " +"fieldnames are ``['x', 'y', 'z']`` and the defaults are ``(1, 2)``, then " +"``x`` will be a required argument, ``y`` will default to ``1``, and ``z`` " +"will default to ``2``." +msgstr "" +"*defaults* peut être ``None`` ou un :term:`iterable` de valeurs par défaut. " +"Comme les champs avec une valeur par défaut doivent être définis après les " +"champs sans valeur par défaut, les *defaults* sont appliqués aux paramètres " +"les plus à droite. Par exemple, si les noms des champs sont ``['x', 'y', " +"'z']`` et les valeurs par défaut ``(1, 2)``, alors ``x`` est un argument " +"obligatoire tandis que ``y`` et ``y`` valent par défaut ``1`` et ``2``." + +#: library/collections.rst:875 +msgid "" +"If *module* is defined, the ``__module__`` attribute of the named tuple is " +"set to that value." +msgstr "" +"Si *module* est spécifié, alors il est assigné à l'attribut ``__module__`` " +"du *n*-uplet nommé." + +#: library/collections.rst:878 +msgid "" +"Named tuple instances do not have per-instance dictionaries, so they are " +"lightweight and require no more memory than regular tuples." +msgstr "" +"Les instances de *n*-uplets nommés n'ont pas de dictionnaires propres, elles " +"sont donc légères et ne requièrent pas plus de mémoire que les *n*-uplets " +"natifs." + +#: library/collections.rst:881 +msgid "" +"To support pickling, the named tuple class should be assigned to a variable " +"that matches *typename*." +msgstr "" +"Pour permettre la sérialisation, la classe de *n*-uplet nommée doit être " +"assignée à une variable qui correspond à *typename*." + +#: library/collections.rst:884 +msgid "Added support for *rename*." +msgstr "Gestion de *rename*." + +#: library/collections.rst:887 +msgid "" +"The *verbose* and *rename* parameters became :ref:`keyword-only arguments " +"`." +msgstr "" +"Les paramètres *verbose* et *rename* deviennent des :ref:`arguments " +"obligatoirement nommés `." + +#: library/collections.rst:891 +msgid "Added the *module* parameter." +msgstr "Ajout du paramètre *module*." + +#: library/collections.rst:894 +msgid "Removed the *verbose* parameter and the :attr:`_source` attribute." +msgstr "Suppression du paramètre *verbose* et de l'attribut :attr:`_source`." + +#: library/collections.rst:897 +msgid "" +"Added the *defaults* parameter and the :attr:`_field_defaults` attribute." +msgstr "" +"Ajout du paramètre *defaults* et de l'attribut :attr:`_field_defaults`." + +#: library/collections.rst:917 +msgid "" +"Named tuples are especially useful for assigning field names to result " +"tuples returned by the :mod:`csv` or :mod:`sqlite3` modules::" +msgstr "" +"Les *n*-uplets nommés sont particulièrement utiles pour associer des noms de " +"champs à des *n*-uplets renvoyés par les modules :mod:`csv` ou :mod:" +"`sqlite3` ::" + +#: library/collections.rst:933 +msgid "" +"In addition to the methods inherited from tuples, named tuples support three " +"additional methods and two attributes. To prevent conflicts with field " +"names, the method and attribute names start with an underscore." +msgstr "" +"En plus des méthodes héritées de ``tuple``, les *n*-uplets nommés " +"implémentent trois méthodes et deux attributs supplémentaires. Pour éviter " +"les conflits avec noms de champs, leurs noms commencent par un tiret bas." + +#: library/collections.rst:939 +msgid "" +"Class method that makes a new instance from an existing sequence or iterable." +msgstr "" +"Méthode de classe qui construit une nouvelle instance à partir d'une " +"séquence ou d'un itérable existant." + +#: library/collections.rst:949 +msgid "" +"Return a new :class:`dict` which maps field names to their corresponding " +"values:" +msgstr "" +"Renvoie un nouveau :class:`dict` qui associe chaque nom de champ à sa valeur " +"correspondante :" + +#: library/collections.rst:958 +msgid "Returns an :class:`OrderedDict` instead of a regular :class:`dict`." +msgstr "Renvoie un :class:`OrderedDict` au lieu d'un :class:`dict` natif." + +#: library/collections.rst:961 +msgid "" +"Returns a regular :class:`dict` instead of an :class:`OrderedDict`. As of " +"Python 3.7, regular dicts are guaranteed to be ordered. If the extra " +"features of :class:`OrderedDict` are required, the suggested remediation is " +"to cast the result to the desired type: ``OrderedDict(nt._asdict())``." +msgstr "" +"renvoie un :class:`dict` natif plutôt qu'un :class:`OrderedDict`. À partir " +"de Python 3.7, les dictionnaires natifs garantissent la préservation de " +"l'ordre. Si les autres fonctionnalités d':class:`OrderedDict` sont " +"nécessaires, la solution préconisée est de convertir le résultat vers le " +"type souhaité : ``OrderedDict(nt._asdict())``." + +#: library/collections.rst:970 +msgid "" +"Return a new instance of the named tuple replacing specified fields with new " +"values::" +msgstr "" +"Renvoie une nouvelle instance du *n*-uplet nommé en remplaçant les champs " +"spécifiés par leurs nouvelles valeurs ::" + +#: library/collections.rst:982 +msgid "" +"Tuple of strings listing the field names. Useful for introspection and for " +"creating new named tuple types from existing named tuples." +msgstr "" +"Tuple de chaînes de caractères listant les noms de champs. Pratique pour " +"l'introspection et pour créer de nouveaux types de *n*-uplets nommés à " +"partir d'existants." + +#: library/collections.rst:997 +msgid "Dictionary mapping field names to default values." +msgstr "Dictionnaire qui assigne les valeurs par défaut aux noms des champs." + +#: library/collections.rst:1007 +msgid "" +"To retrieve a field whose name is stored in a string, use the :func:" +"`getattr` function:" +msgstr "" +"Pour récupérer un champ dont le nom est une chaîne de caractères, utilisez " +"la fonction :func:`getattr` :" + +#: library/collections.rst:1013 +msgid "" +"To convert a dictionary to a named tuple, use the double-star-operator (as " +"described in :ref:`tut-unpacking-arguments`):" +msgstr "" +"Pour convertir un dictionnaire en *n*-uplet nommé, utilisez l'opérateur " +"double-étoile (comme expliqué dans :ref:`tut-unpacking-arguments`) :" + +#: library/collections.rst:1020 +msgid "" +"Since a named tuple is a regular Python class, it is easy to add or change " +"functionality with a subclass. Here is how to add a calculated field and a " +"fixed-width print format:" +msgstr "" +"Il est aisé d'ajouter ou de modifier les fonctionnalités des *n*-uplets " +"nommés grâce à l'héritage puisqu'il s'agit de simples classes. Voici comment " +"ajouter un champ calculé avec une longueur fixe d'affichage :" + +#: library/collections.rst:1039 +msgid "" +"The subclass shown above sets ``__slots__`` to an empty tuple. This helps " +"keep memory requirements low by preventing the creation of instance " +"dictionaries." +msgstr "" +"La sous-classe ci-dessus définit ``__slots__`` comme un *n*-uplet vide. Cela " +"permet de garder une emprunte mémoire faible en empêchant la création de " +"dictionnaire d'instance." + +#: library/collections.rst:1042 +msgid "" +"Subclassing is not useful for adding new, stored fields. Instead, simply " +"create a new named tuple type from the :attr:`~somenamedtuple._fields` " +"attribute:" +msgstr "" +"L'héritage n'est pas pertinent pour ajouter de nouveaux champs. Il est " +"préférable de simplement créer un nouveau type de *n*-uplet nommé avec " +"l'attribut :attr:`~somenamedtuple._fields` :" + +#: library/collections.rst:1047 +msgid "" +"Docstrings can be customized by making direct assignments to the ``__doc__`` " +"fields:" +msgstr "" +"Les *docstrings* peuvent être personnalisées en modifiant directement " +"l'attribut ``__doc__`` :" + +#: library/collections.rst:1056 +msgid "Property docstrings became writeable." +msgstr "La propriété devient éditable." + +#: library/collections.rst:1061 +msgid "" +"See :class:`typing.NamedTuple` for a way to add type hints for named " +"tuples. It also provides an elegant notation using the :keyword:`class` " +"keyword::" +msgstr "" +"Voir :meth:`typing.NamedTuple` pour un moyen d'ajouter des indications de " +"type pour les *n*-uplets nommés. Cela propose aussi une notation élégante " +"utilisant le mot-clé :keyword:`class` ::" + +#: library/collections.rst:1070 +msgid "" +"See :meth:`types.SimpleNamespace` for a mutable namespace based on an " +"underlying dictionary instead of a tuple." +msgstr "" +"Voir :meth:`types.SimpleNamespace` pour un espace de nommage muable basé sur " +"un dictionnaire sous-jacent à la place d'un *n*-uplet." + +#: library/collections.rst:1073 +msgid "" +"The :mod:`dataclasses` module provides a decorator and functions for " +"automatically adding generated special methods to user-defined classes." +msgstr "" +"Le module :mod:`dataclasses` fournit un décorateur et des fonctions pour " +"ajouter automatiquement des méthodes spéciales générées aux classes définies " +"par l’utilisateur." + +#: library/collections.rst:1078 +msgid ":class:`OrderedDict` objects" +msgstr "Objets :class:`OrderedDict`" + +#: library/collections.rst:1080 +msgid "" +"Ordered dictionaries are just like regular dictionaries but have some extra " +"capabilities relating to ordering operations. They have become less " +"important now that the built-in :class:`dict` class gained the ability to " +"remember insertion order (this new behavior became guaranteed in Python 3.7)." +msgstr "" +"Les dictionnaires ordonnés sont des dictionnaires comme les autres mais " +"possèdent des capacités supplémentaires pour s'ordonner. Ils sont maintenant " +"moins importants puisque la classe native :class:`dict` sait se souvenir de " +"l'ordre d'insertion (cette fonctionnalité a été garantie par Python 3.7)." + +#: library/collections.rst:1086 +msgid "Some differences from :class:`dict` still remain:" +msgstr "Quelques différences persistent vis-à-vis de :class:`dict` :" + +#: library/collections.rst:1088 +msgid "" +"The regular :class:`dict` was designed to be very good at mapping " +"operations. Tracking insertion order was secondary." +msgstr "" +"Les :class:`dict` classiques ont été conçus pour être performants dans les " +"opérations de correspondance. Garder une trace de l'ordre d'insertion était " +"secondaire." + +#: library/collections.rst:1091 +msgid "" +"The :class:`OrderedDict` was designed to be good at reordering operations. " +"Space efficiency, iteration speed, and the performance of update operations " +"were secondary." +msgstr "" +"Les :class:`OrderedDict` ont été conçus pour être performants dans les " +"opérations de ré-arrangement. L'occupation mémoire, la vitesse de parcours " +"et les performances de mise à jour étaient secondaires." + +#: library/collections.rst:1095 +#, fuzzy +msgid "" +"The :class:`OrderedDict` algorithm can handle frequent reordering operations " +"better than :class:`dict`. As shown in the recipes below, this makes it " +"suitable for implementing various kinds of LRU caches." +msgstr "" +"Algorithmiquement, :class:`OrderedDict` gère mieux les ré-arrangements " +"fréquents que :class:`dict`. Ceci la rend adaptée pour suivre les accès les " +"plus récents (par exemple pour implémenter un `cache LRU `_ pour *Least " +"Recently Used* en anglais)." + +#: library/collections.rst:1099 +msgid "" +"The equality operation for :class:`OrderedDict` checks for matching order." +msgstr "" +"Le test d'égalité de :class:`OrderedDict` vérifie si l'ordre correspond." + +#: library/collections.rst:1101 +msgid "" +"A regular :class:`dict` can emulate the order sensitive equality test with " +"``p == q and all(k1 == k2 for k1, k2 in zip(p, q))``." +msgstr "" + +#: library/collections.rst:1104 +msgid "" +"The :meth:`popitem` method of :class:`OrderedDict` has a different " +"signature. It accepts an optional argument to specify which item is popped." +msgstr "" +"La méthode :meth:`popitem` de :class:`OrderedDict` possède une signature " +"différente. Elle accepte un argument optionnel pour spécifier quel élément " +"doit être enlevé." + +#: library/collections.rst:1107 +msgid "" +"A regular :class:`dict` can emulate OrderedDict's ``od.popitem(last=True)`` " +"with ``d.popitem()`` which is guaranteed to pop the rightmost (last) item." +msgstr "" + +#: library/collections.rst:1110 +msgid "" +"A regular :class:`dict` can emulate OrderedDict's ``od.popitem(last=False)`` " +"with ``(k := next(iter(d)), d.pop(k))`` which will return and remove the " +"leftmost (first) item if it exists." +msgstr "" + +#: library/collections.rst:1114 +msgid "" +":class:`OrderedDict` has a :meth:`move_to_end` method to efficiently " +"reposition an element to an endpoint." +msgstr "" +":class:`OrderedDict` possède une méthode :meth:`move_to_end` pour déplacer " +"efficacement un élément à la fin." + +#: library/collections.rst:1117 +msgid "" +"A regular :class:`dict` can emulate OrderedDict's ``od.move_to_end(k, " +"last=True)`` with ``d[k] = d.pop(k)`` which will move the key and its " +"associated value to the rightmost (last) position." +msgstr "" + +#: library/collections.rst:1121 +msgid "" +"A regular :class:`dict` does not have an efficient equivalent for " +"OrderedDict's ``od.move_to_end(k, last=False)`` which moves the key and its " +"associated value to the leftmost (first) position." +msgstr "" + +#: library/collections.rst:1125 +msgid "Until Python 3.8, :class:`dict` lacked a :meth:`__reversed__` method." +msgstr "" +"Avant Python 3.8, :class:`dict` n'a pas de méthode :meth:`__reversed__`." + +#: library/collections.rst:1130 +msgid "" +"Return an instance of a :class:`dict` subclass that has methods specialized " +"for rearranging dictionary order." +msgstr "" +"Renvoie une instance d'une sous-classe de :class:`dict` qui possède des " +"méthodes spécialisées pour redéfinir l'ordre du dictionnaire." + +#: library/collections.rst:1137 +msgid "" +"The :meth:`popitem` method for ordered dictionaries returns and removes a " +"(key, value) pair. The pairs are returned in :abbr:`LIFO (last-in, first-" +"out)` order if *last* is true or :abbr:`FIFO (first-in, first-out)` order if " +"false." +msgstr "" +"La méthode :meth:`popitem` pour les dictionnaires ordonnés retire et renvoie " +"une paire ``(clé, valeur)``. Les paires sont renvoyées comme pour une pile, " +"c'est-à-dire dernier entré, premier sorti (en anglais :abbr:`LIFO (last-in, " +"first-out)`) si *last* vaut ``True``. Si *last* vaut ``False``, alors les " +"paires sont renvoyées comme pour une file, c'est-à-dire premier entré, " +"premier sorti (en anglais :abbr:`FIFO (first-in, first-out)`)." + +#: library/collections.rst:1144 +#, fuzzy +msgid "" +"Move an existing *key* to either end of an ordered dictionary. The item is " +"moved to the right end if *last* is true (the default) or to the beginning " +"if *last* is false. Raises :exc:`KeyError` if the *key* does not exist:" +msgstr "" +"Déplace une clé *key* existante à l'une des deux extrémités du " +"dictionnaire : à droite si *last* vaut ``True`` (comportement par défaut) ou " +"à gauche sinon. Lève une exception :exc:`KeyError` si la clé *key* n'est pas " +"trouvée ::" + +#: library/collections.rst:1161 +msgid "" +"In addition to the usual mapping methods, ordered dictionaries also support " +"reverse iteration using :func:`reversed`." +msgstr "" +"En plus des méthodes usuelles des dictionnaires, les dictionnaires ordonnés " +"gèrent l'itération en sens inverse grâce à :func:`reversed`." + +#: library/collections.rst:1164 +msgid "" +"Equality tests between :class:`OrderedDict` objects are order-sensitive and " +"are implemented as ``list(od1.items())==list(od2.items())``. Equality tests " +"between :class:`OrderedDict` objects and other :class:`~collections.abc." +"Mapping` objects are order-insensitive like regular dictionaries. This " +"allows :class:`OrderedDict` objects to be substituted anywhere a regular " +"dictionary is used." +msgstr "" +"Les tests d'égalité entre deux objets :class:`OrderedDict` sont sensibles à " +"l'ordre et sont implémentés comme ceci : ``list(od1.items() == list(od2." +"items())``. Les tests d'égalité entre un objet :class:`OrderedDict` et un " +"objet :class:`~collections.abc.Mapping` ne sont pas sensibles à l'ordre " +"(comme les dictionnaires natifs). Cela permet substituer des objets :class:" +"`OrderedDict` partout où les dictionnaires natifs sont utilisés." + +#: library/collections.rst:1171 +msgid "" +"The items, keys, and values :term:`views ` of :class:" +"`OrderedDict` now support reverse iteration using :func:`reversed`." +msgstr "" +"Les :term:`vues ` d'éléments, de clés et de valeurs de :" +"class:`OrderedDict` gèrent maintenant l'itération en sens inverse en " +"utilisant :func:`reversed`." + +#: library/collections.rst:1175 +msgid "" +"With the acceptance of :pep:`468`, order is retained for keyword arguments " +"passed to the :class:`OrderedDict` constructor and its :meth:`update` method." +msgstr "" +"Suite à l'acceptation de la :pep:`468`, l'ordre des arguments nommés passés " +"au constructeur et à la méthode :meth:`update` de :class:`OrderedDict` est " +"conservé." + +#: library/collections.rst:1185 +msgid ":class:`OrderedDict` Examples and Recipes" +msgstr "Exemples et cas pratiques utilisant :class:`OrderDict`" + +#: library/collections.rst:1187 +msgid "" +"It is straightforward to create an ordered dictionary variant that remembers " +"the order the keys were *last* inserted. If a new entry overwrites an " +"existing entry, the original insertion position is changed and moved to the " +"end::" +msgstr "" +"Il est facile de créer une variante de dictionnaire ordonné qui retient " +"l'ordre dans lequel les clés ont été insérées *en dernier*. Si une nouvelle " +"entrée écrase une existante, la position d'insertion d'origine est modifiée " +"et déplacée à la fin ::" + +#: library/collections.rst:1199 +msgid "" +"An :class:`OrderedDict` would also be useful for implementing variants of :" +"func:`functools.lru_cache`:" +msgstr "" +"Un :class:`OrderedDict` peut aussi être utile pour implémenter des variantes " +"de :func:`functools.lru_cache` :" + +#: library/collections.rst:1297 +msgid ":class:`UserDict` objects" +msgstr "Objets :class:`UserDict`" + +#: library/collections.rst:1299 +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 " +"subclass directly from :class:`dict`; however, this class can be easier to " +"work with because the underlying dictionary is accessible as an attribute." +msgstr "" +"La classe :class:`UserDict` se comporte comme une surcouche autour des " +"dictionnaires. L'utilité de cette classe est réduite, car on peut maintenant " +"hériter directement de :class:`dict`. Cependant, il peut être plus facile de " +"travailler avec celle-ci, car le dictionnaire sous-jacent est accessible " +"comme attribut." + +#: library/collections.rst:1307 +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 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 " +"dictionnaire natif. Si *initialdata* est spécifié, alors :attr:`data` est " +"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:1313 +msgid "" +"In addition to supporting the methods and operations of mappings, :class:" +"`UserDict` instances provide the following attribute:" +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:1318 +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:1324 +msgid ":class:`UserList` objects" +msgstr "Objets :class:`UserList`" + +#: library/collections.rst:1326 +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 " +"existing methods or add new ones. In this way, one can add new behaviors to " +"lists." +msgstr "" +"Cette classe agit comme une surcouche autour des objets ``list``. C'est une " +"classe mère utile pour vos classes listes-compatibles qui peuvent en hériter " +"et surcharger les méthodes existantes ou en ajouter de nouvelles. Ainsi, on " +"peut ajouter de nouveaux comportements aux listes." + +#: library/collections.rst:1331 +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 " +"work with because the underlying list is accessible as an attribute." +msgstr "" +"L'utilité de cette classe a été partiellement réduite par la possibilité " +"d'hériter directement de :class:`list`. Cependant, il peut être plus facile " +"de travailler avec cette classe, car la liste sous-jacente est accessible " +"via un attribut." + +#: library/collections.rst:1337 +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:" +"`UserList` instances. The instance's contents are initially set to a copy " +"of *list*, defaulting to the empty list ``[]``. *list* can be any iterable, " +"for example a real Python list or a :class:`UserList` object." +msgstr "" +"Classe simulant une liste. Les instances de :class:`UserList` possèdent un " +"attribut :attr:`UserList` où est stocké leur contenu sous forme de liste " +"native. Il est initialement une copie de *list*, ou ``[]`` par défaut. " +"*list* peut être un itérable, par exemple une liste native ou un objet :" +"class:`UserList`." + +#: library/collections.rst:1343 +msgid "" +"In addition to supporting the methods and operations of mutable sequences, :" +"class:`UserList` instances provide the following attribute:" +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:1348 +msgid "" +"A real :class:`list` object used to store the contents of the :class:" +"`UserList` class." +msgstr "" +"Un objet :class:`list` natif utilisé pour stocker le contenu de la classe :" +"class:`UserList`." + +#: library/collections.rst:1351 +msgid "" +"**Subclassing requirements:** Subclasses of :class:`UserList` are expected " +"to offer a constructor which can be called with either no arguments or one " +"argument. List operations which return a new sequence attempt to create an " +"instance of the actual implementation class. To do so, it assumes that the " +"constructor can be called with a single parameter, which is a sequence " +"object used as a data source." +msgstr "" +"**Prérequis pour l'héritage :** Les sous-classes de :class:`UserList` " +"doivent implémenter un constructeur qui peut être appelé avec zéro ou un " +"argument. Les opérations sur les listes qui renvoient une nouvelle séquence " +"essayent de créer une instance de la classe courante. C'est pour cela que le " +"constructeur doit pouvoir être appelé avec un unique paramètre, un objet " +"séquence utilisé comme source de données." + +#: library/collections.rst:1358 +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 " +"consult the sources for information about the methods which need to be " +"provided in that case." +msgstr "" +"Si une classe fille ne remplit pas cette condition, toutes les méthodes " +"spéciales gérées par cette classe devront être implémentées à nouveau. Merci " +"de consulter les sources pour obtenir des informations sur les méthodes qui " +"doivent être fournies dans ce cas." + +#: library/collections.rst:1364 +msgid ":class:`UserString` objects" +msgstr "Objets :class:`UserString`" + +#: library/collections.rst:1366 +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 " +"directly from :class:`str`; however, this class can be easier to work with " +"because the underlying string is accessible as an attribute." +msgstr "" +"La classe :class:`UserString` agit comme une surcouche autour des objets " +"``str``. L'utilité de cette classe a été partiellement réduite par la " +"possibilité d'hériter directement de :class:`str`. Cependant, il peut être " +"plus facile de travailler avec cette classe, car la chaîne de caractère sous-" +"jacente est accessible via un attribut." + +#: library/collections.rst:1374 +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 " +"of :class:`UserString` instances. The instance's contents are initially set " +"to a copy of *seq*. The *seq* argument can be any object which can be " +"converted into a string using the built-in :func:`str` function." +msgstr "" +"Classe simulant une chaîne de caractères. Les instances de :class:" +"`UserString` possèdent un attribut :attr:`data` où est stocké leur contenu " +"sous forme de chaîne de caractères native. Le contenu de l'instance est " +"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:1381 +msgid "" +"In addition to supporting the methods and operations of strings, :class:" +"`UserString` instances provide the following attribute:" +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:1386 +msgid "" +"A real :class:`str` object used to store the contents of the :class:" +"`UserString` class." +msgstr "" +"Un objet :class:`str` natif utilisé pour stocker le contenu de la classe :" +"class:`UserString`." + +#: library/collections.rst:1389 +msgid "" +"New methods ``__getnewargs__``, ``__rmod__``, ``casefold``, ``format_map``, " +"``isprintable``, and ``maketrans``." +msgstr "" +"Nouvelles méthodes ``__getnewargs__``, ``__rmod__``, ``casefold``, " +"``format_map``, ``isprintable`` et ``maketrans``." + +#~ msgid "" +#~ "Moved :ref:`collections-abstract-base-classes` to the :mod:`collections." +#~ "abc` module. For backwards compatibility, they continue to be visible in " +#~ "this module through Python 3.9." +#~ msgstr "" +#~ "Les :ref:`collections-abstract-base-classes` ont été déplacées vers le " +#~ "module :mod:`collections.abc`. Pour assurer la rétrocompatibilité, elles " +#~ "sont toujours disponibles dans ce module dans Python 3.9." diff --git a/library/colorsys.po b/library/colorsys.po new file mode 100644 index 0000000000..e9ad46748d --- /dev/null +++ b/library/colorsys.po @@ -0,0 +1,96 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +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: 2020-09-25 17:03-0600\n" +"Last-Translator: Yannick Gingras \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/colorsys.rst:2 +msgid ":mod:`colorsys` --- Conversions between color systems" +msgstr ":mod:`colorsys` — Conversions entre les systèmes de couleurs" + +#: library/colorsys.rst:9 +msgid "**Source code:** :source:`Lib/colorsys.py`" +msgstr "**Code source :** :source:`Lib/colorsys.py`" + +#: library/colorsys.rst:13 +msgid "" +"The :mod:`colorsys` module defines bidirectional conversions of color values " +"between colors expressed in the RGB (Red Green Blue) color space used in " +"computer monitors and three other coordinate systems: YIQ, HLS (Hue " +"Lightness Saturation) and HSV (Hue Saturation Value). Coordinates in all of " +"these color spaces are floating point values. In the YIQ space, the Y " +"coordinate is between 0 and 1, but the I and Q coordinates can be positive " +"or negative. In all other spaces, the coordinates are all between 0 and 1." +msgstr "" +"Le module :mod:`colorsys` définit les conversions bidirectionnelles des " +"valeurs de couleur entre les couleurs exprimées dans l'espace colorimétrique " +"RVB (Rouge Vert Bleu) utilisé par les écrans d'ordinateur et trois autres " +"systèmes de coordonnées : YIQ, HLS (Hue Lightness Saturation) et HSV (Hue " +"Saturation Value). Les coordonnées dans tous ces espaces colorimétriques " +"sont des valeurs en virgule flottante. Dans l'espace YIQ, la coordonnée Y " +"est comprise entre 0 et 1, mais les coordonnées I et Q peuvent être " +"positives ou négatives. Dans tous les autres espaces, les coordonnées sont " +"toutes comprises entre 0 et 1." + +#: library/colorsys.rst:23 +msgid "" +"More information about color spaces can be found at https://poynton.ca/" +"ColorFAQ.html and https://www.cambridgeincolour.com/tutorials/color-spaces." +"htm." +msgstr "" +"Consultez https://poynton.ca/ColorFAQ.html et https://www.cambridgeincolour." +"com/tutorials/color-spaces.htm pour plus d'informations concernant les " +"espaces colorimétriques." + +#: library/colorsys.rst:27 +msgid "The :mod:`colorsys` module defines the following functions:" +msgstr "Le module :mod:`colorsys` définit les fonctions suivantes :" + +#: library/colorsys.rst:32 +msgid "Convert the color from RGB coordinates to YIQ coordinates." +msgstr "" +"Convertit la couleur des coordonnées RGB (RVB) vers les coordonnées YIQ." + +#: library/colorsys.rst:37 +msgid "Convert the color from YIQ coordinates to RGB coordinates." +msgstr "" +"Convertit la couleur des coordonnées YIQ vers les coordonnées RGB (RVB)." + +#: library/colorsys.rst:42 +msgid "Convert the color from RGB coordinates to HLS coordinates." +msgstr "" +"Convertit la couleur des coordonnées RGB (RVB) vers les coordonnées HLS " +"(TSV)." + +#: library/colorsys.rst:47 +msgid "Convert the color from HLS coordinates to RGB coordinates." +msgstr "" +"Convertit la couleur des coordonnées HLS (TSV) vers les coordonnées RGB " +"(RVB)." + +#: library/colorsys.rst:52 +msgid "Convert the color from RGB coordinates to HSV coordinates." +msgstr "" +"Convertit la couleur des coordonnées RGB (RVB) vers les coordonnées HSV " +"(TSV)." + +#: library/colorsys.rst:57 +msgid "Convert the color from HSV coordinates to RGB coordinates." +msgstr "" +"Convertit la couleur des coordonnées HSV (TSV) vers les coordonnées RGB " +"(RVB)." + +#: library/colorsys.rst:59 +msgid "Example::" +msgstr "Exemple ::" diff --git a/library/compileall.po b/library/compileall.po new file mode 100644 index 0000000000..d7f1389547 --- /dev/null +++ b/library/compileall.po @@ -0,0 +1,530 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-22 22:57+0100\n" +"PO-Revision-Date: 2022-10-18 16:06+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 3.0\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`" +msgstr "**Code source :** :source:`Lib/compileall.py`" + +#: library/compileall.rst:11 +msgid "" +"This module provides some utility functions to support installing Python " +"libraries. These functions compile Python source files in a directory tree. " +"This module can be used to create the cached byte-code files at library " +"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 "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 "" +"Positional arguments are files to compile or directories that contain source " +"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 "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 "" +"Directory prepended to the path to each file being compiled. This will " +"appear in compilation time tracebacks, and is also compiled in to the byte-" +"code file, where it will be used in tracebacks and other messages in cases " +"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 "" +"Read the file ``list`` and add each line that it contains to the list of " +"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 "" +"Write the byte-code files to their legacy locations and names, which may " +"overwrite byte-code files created by another version of Python. The default " +"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 "" +"Control the maximum recursion level for subdirectories. If this is given, " +"then ``-l`` option will not be taken into account. :program:`python -m " +"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 "" +"Control how the generated byte-code files are invalidated at runtime. The " +"``timestamp`` value, means that ``.pyc`` files with the source timestamp and " +"size embedded will be generated. The ``checked-hash`` and ``unchecked-hash`` " +"values cause hash-based pycs to be generated. Hash-based pycs embed a hash " +"of the source file contents rather than a timestamp. See :ref:`pyc-" +"invalidation` for more information on how Python validates bytecode cache " +"files at runtime. The default is ``timestamp`` if the :envvar:" +"`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 "" +"Compile with the given optimization level. May be used multiple times to " +"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 "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 "ajout des options ``-i``, ``-b`` et ``-h``." + +#: library/compileall.rst:124 +msgid "" +"Added the ``-j``, ``-r``, and ``-qq`` options. ``-q`` option was changed " +"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 "ajout de l'option ``--invalidation-mode``." + +#: library/compileall.rst:132 +msgid "" +"Added the ``-s``, ``-p``, ``-e`` and ``--hardlink-dupes`` options. Raised " +"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 "" +"There is no command-line option to control the optimization level used by " +"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 "" +"Similarly, the :func:`compile` function respects the :attr:`sys." +"pycache_prefix` setting. The generated bytecode cache will only be useful " +"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 "Fonctions publiques" + +#: library/compileall.rst:153 +msgid "" +"Recursively descend the directory tree named by *dir*, compiling all :file:`." +"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 "" +"If *ddir* is given, it is prepended to the path to each file being compiled " +"for use in compilation time tracebacks, and is also compiled in to the byte-" +"code file, where it will be used in tracebacks and other messages in cases " +"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. 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: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: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 " +"Python. The default is to write files to their :pep:`3147` locations and " +"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: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: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 " +"can't use multiple workers and *workers* argument is given, then sequential " +"compilation will be used as a fallback. If *workers* is 0, the number of " +"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: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:269 +#, fuzzy +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`` 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: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:304 +msgid "Added the *legacy* and *optimize* parameter." +msgstr "ajout des paramètres *legacy* et *optimize*." + +#: library/compileall.rst:209 +msgid "Added the *workers* parameter." +msgstr "ajout du paramètre *workers*." + +#: library/compileall.rst:278 library/compileall.rst:307 +msgid "*quiet* parameter was changed to a multilevel value." +msgstr "le paramètre *quiet* peut prendre plusieurs niveaux." + +#: 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:219 +msgid "Accepts a :term:`path-like object`." +msgstr "accepte un :term:`objet simili-chemin `." + +#: library/compileall.rst:285 library/compileall.rst:314 +msgid "The *invalidation_mode* parameter was added." +msgstr "ajout du paramètre *invalidation_mode*." + +#: 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: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: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: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: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-" +"code file, where it will be used in tracebacks and other messages in cases " +"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: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. 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: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: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: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: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:337 +msgid "Module :mod:`py_compile`" +msgstr "Module :mod:`py_compile`" + +#: library/compileall.rst:338 +msgid "Byte-compile a single source file." +msgstr "Compiler un fichier source unique." diff --git a/library/concurrency.po b/library/concurrency.po new file mode 100644 index 0000000000..739a00d38b --- /dev/null +++ b/library/concurrency.po @@ -0,0 +1,40 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +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: 2019-03-11 14:38+0100\n" +"Last-Translator: Julien Palard \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" + +#: library/concurrency.rst:5 +msgid "Concurrent Execution" +msgstr "Exécution concourante" + +#: library/concurrency.rst:7 +msgid "" +"The modules described in this chapter provide support for concurrent " +"execution of code. The appropriate choice of tool will depend on the task to " +"be executed (CPU bound vs IO bound) and preferred style of development " +"(event driven cooperative multitasking vs preemptive multitasking). Here's " +"an overview:" +msgstr "" +"Les modules documentés dans ce chapitre fournissent des outils d'exécution " +"concourante de code. Le choix de l'outil approprié dépend de la tâche à " +"exécuter (limitée par le CPU (*CPU bound*), ou limitée la vitesse des " +"entrées-sorties (*IO bound*)) et du style de développement désiré " +"(coopération gérée par des évènements ou multitâche préemptif). En voici un " +"survol :" + +#: library/concurrency.rst:27 +msgid "The following are support modules for some of the above services:" +msgstr "" +"Les modules suivants servent de fondation pour certains services cités ci-" +"dessus." diff --git a/library/concurrent.futures.po b/library/concurrent.futures.po new file mode 100644 index 0000000000..0204292d80 --- /dev/null +++ b/library/concurrent.futures.po @@ -0,0 +1,581 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-18 15:46+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \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" + +#: library/concurrent.futures.rst:2 +#, fuzzy +msgid ":mod:`concurrent.futures` --- Launching parallel tasks" +msgstr ":mod:`concurrent.futures` -- Lancer des tâches en parallèle" + +#: library/concurrent.futures.rst:9 +msgid "" +"**Source code:** :source:`Lib/concurrent/futures/thread.py` and :source:`Lib/" +"concurrent/futures/process.py`" +msgstr "" + +#: library/concurrent.futures.rst:14 +msgid "" +"The :mod:`concurrent.futures` module provides a high-level interface for " +"asynchronously executing callables." +msgstr "" + +#: library/concurrent.futures.rst:17 +msgid "" +"The asynchronous execution can be performed with threads, using :class:" +"`ThreadPoolExecutor`, or separate processes, using :class:" +"`ProcessPoolExecutor`. Both implement the same interface, which is defined " +"by the abstract :class:`Executor` class." +msgstr "" + +#: library/concurrent.futures.rst:24 +msgid "Executor Objects" +msgstr "" + +#: library/concurrent.futures.rst:28 +msgid "" +"An abstract class that provides methods to execute calls asynchronously. It " +"should not be used directly, but through its concrete subclasses." +msgstr "" + +#: library/concurrent.futures.rst:33 +msgid "" +"Schedules the callable, *fn*, to be executed as ``fn(*args, **kwargs)`` and " +"returns a :class:`Future` object representing the execution of the " +"callable. ::" +msgstr "" + +#: library/concurrent.futures.rst:43 +msgid "Similar to :func:`map(func, *iterables) ` except:" +msgstr "" + +#: library/concurrent.futures.rst:45 +msgid "the *iterables* are collected immediately rather than lazily;" +msgstr "" + +#: library/concurrent.futures.rst:47 +msgid "" +"*func* is executed asynchronously and several calls to *func* may be made " +"concurrently." +msgstr "" + +#: library/concurrent.futures.rst:50 +msgid "" +"The returned iterator raises a :exc:`concurrent.futures.TimeoutError` if :" +"meth:`~iterator.__next__` is called and the result isn't available after " +"*timeout* seconds from the original call to :meth:`Executor.map`. *timeout* " +"can be an int or a float. If *timeout* is not specified or ``None``, there " +"is no limit to the wait time." +msgstr "" + +#: library/concurrent.futures.rst:56 +msgid "" +"If a *func* call raises an exception, then that exception will be raised " +"when its value is retrieved from the iterator." +msgstr "" + +#: library/concurrent.futures.rst:59 +msgid "" +"When using :class:`ProcessPoolExecutor`, this method chops *iterables* into " +"a number of chunks which it submits to the pool as separate tasks. The " +"(approximate) size of these chunks can be specified by setting *chunksize* " +"to a positive integer. For very long iterables, using a large value for " +"*chunksize* can significantly improve performance compared to the default " +"size of 1. With :class:`ThreadPoolExecutor`, *chunksize* has no effect." +msgstr "" + +#: library/concurrent.futures.rst:67 +msgid "Added the *chunksize* argument." +msgstr "" + +#: library/concurrent.futures.rst:72 +msgid "" +"Signal the executor that it should free any resources that it is using when " +"the currently pending futures are done executing. Calls to :meth:`Executor." +"submit` and :meth:`Executor.map` made after shutdown will raise :exc:" +"`RuntimeError`." +msgstr "" + +#: library/concurrent.futures.rst:77 +msgid "" +"If *wait* is ``True`` then this method will not return until all the pending " +"futures are done executing and the resources associated with the executor " +"have been freed. If *wait* is ``False`` then this method will return " +"immediately and the resources associated with the executor will be freed " +"when all pending futures are done executing. Regardless of the value of " +"*wait*, the entire Python program will not exit until all pending futures " +"are done executing." +msgstr "" + +#: library/concurrent.futures.rst:85 +msgid "" +"If *cancel_futures* is ``True``, this method will cancel all pending futures " +"that the executor has not started running. Any futures that are completed or " +"running won't be cancelled, regardless of the value of *cancel_futures*." +msgstr "" + +#: library/concurrent.futures.rst:90 +msgid "" +"If both *cancel_futures* and *wait* are ``True``, all futures that the " +"executor has started running will be completed prior to this method " +"returning. The remaining futures are cancelled." +msgstr "" + +#: library/concurrent.futures.rst:94 +msgid "" +"You can avoid having to call this method explicitly if you use the :keyword:" +"`with` statement, which will shutdown the :class:`Executor` (waiting as if :" +"meth:`Executor.shutdown` were called with *wait* set to ``True``)::" +msgstr "" + +#: library/concurrent.futures.rst:106 +msgid "Added *cancel_futures*." +msgstr "" + +#: library/concurrent.futures.rst:111 +msgid "ThreadPoolExecutor" +msgstr "ThreadPoolExecutor" + +#: library/concurrent.futures.rst:113 +msgid "" +":class:`ThreadPoolExecutor` is an :class:`Executor` subclass that uses a " +"pool of threads to execute calls asynchronously." +msgstr "" + +#: library/concurrent.futures.rst:116 +msgid "" +"Deadlocks can occur when the callable associated with a :class:`Future` " +"waits on the results of another :class:`Future`. For example::" +msgstr "" + +#: library/concurrent.futures.rst:135 +msgid "And::" +msgstr "Et ::" + +#: library/concurrent.futures.rst:149 +msgid "" +"An :class:`Executor` subclass that uses a pool of at most *max_workers* " +"threads to execute calls asynchronously." +msgstr "" + +#: library/concurrent.futures.rst:152 +msgid "" +"All threads enqueued to ``ThreadPoolExecutor`` will be joined before the " +"interpreter can exit. Note that the exit handler which does this is executed " +"*before* any exit handlers added using ``atexit``. This means exceptions in " +"the main thread must be caught and handled in order to signal threads to " +"exit gracefully. For this reason, it is recommended that " +"``ThreadPoolExecutor`` not be used for long-running tasks." +msgstr "" + +#: library/concurrent.futures.rst:159 +msgid "" +"*initializer* is an optional callable that is called at the start of each " +"worker thread; *initargs* is a tuple of arguments passed to the " +"initializer. Should *initializer* raise an exception, all currently pending " +"jobs will raise a :exc:`~concurrent.futures.thread.BrokenThreadPool`, as " +"well as any attempt to submit more jobs to the pool." +msgstr "" + +#: library/concurrent.futures.rst:165 +msgid "" +"If *max_workers* is ``None`` or not given, it will default to the number of " +"processors on the machine, multiplied by ``5``, assuming that :class:" +"`ThreadPoolExecutor` is often used to overlap I/O instead of CPU work and " +"the number of workers should be higher than the number of workers for :class:" +"`ProcessPoolExecutor`." +msgstr "" + +#: library/concurrent.futures.rst:173 +msgid "" +"The *thread_name_prefix* argument was added to allow users to control the :" +"class:`threading.Thread` names for worker threads created by the pool for " +"easier debugging." +msgstr "" + +#: library/concurrent.futures.rst:178 library/concurrent.futures.rst:272 +msgid "Added the *initializer* and *initargs* arguments." +msgstr "" + +#: library/concurrent.futures.rst:181 +msgid "" +"Default value of *max_workers* is changed to ``min(32, os.cpu_count() + " +"4)``. This default value preserves at least 5 workers for I/O bound tasks. " +"It utilizes at most 32 CPU cores for CPU bound tasks which release the GIL. " +"And it avoids using very large resources implicitly on many-core machines." +msgstr "" + +#: library/concurrent.futures.rst:187 +msgid "" +"ThreadPoolExecutor now reuses idle worker threads before starting " +"*max_workers* worker threads too." +msgstr "" + +#: library/concurrent.futures.rst:194 +msgid "ThreadPoolExecutor Example" +msgstr "" + +#: library/concurrent.futures.rst:226 +msgid "ProcessPoolExecutor" +msgstr "ProcessPoolExecutor" + +#: library/concurrent.futures.rst:228 +msgid "" +"The :class:`ProcessPoolExecutor` class is an :class:`Executor` subclass that " +"uses a pool of processes to execute calls asynchronously. :class:" +"`ProcessPoolExecutor` uses the :mod:`multiprocessing` module, which allows " +"it to side-step the :term:`Global Interpreter Lock ` but also means that only picklable objects can be executed and " +"returned." +msgstr "" + +#: library/concurrent.futures.rst:235 +msgid "" +"The ``__main__`` module must be importable by worker subprocesses. This " +"means that :class:`ProcessPoolExecutor` will not work in the interactive " +"interpreter." +msgstr "" + +#: library/concurrent.futures.rst:238 +msgid "" +"Calling :class:`Executor` or :class:`Future` methods from a callable " +"submitted to a :class:`ProcessPoolExecutor` will result in deadlock." +msgstr "" + +#: library/concurrent.futures.rst:243 +msgid "" +"An :class:`Executor` subclass that executes calls asynchronously using a " +"pool of at most *max_workers* processes. If *max_workers* is ``None`` or " +"not given, it will default to the number of processors on the machine. If " +"*max_workers* is less than or equal to ``0``, then a :exc:`ValueError` will " +"be raised. On Windows, *max_workers* must be less than or equal to ``61``. " +"If it is not then :exc:`ValueError` will be raised. If *max_workers* is " +"``None``, then the default chosen will be at most ``61``, even if more " +"processors are available. *mp_context* can be a multiprocessing context or " +"None. It will be used to launch the workers. If *mp_context* is ``None`` or " +"not given, the default multiprocessing context is used." +msgstr "" + +#: library/concurrent.futures.rst:256 +msgid "" +"*initializer* is an optional callable that is called at the start of each " +"worker process; *initargs* is a tuple of arguments passed to the " +"initializer. Should *initializer* raise an exception, all currently pending " +"jobs will raise a :exc:`~concurrent.futures.process.BrokenProcessPool`, as " +"well as any attempt to submit more jobs to the pool." +msgstr "" + +#: library/concurrent.futures.rst:262 +msgid "" +"When one of the worker processes terminates abruptly, a :exc:" +"`BrokenProcessPool` error is now raised. Previously, behaviour was " +"undefined but operations on the executor or its futures would often freeze " +"or deadlock." +msgstr "" + +#: library/concurrent.futures.rst:268 +msgid "" +"The *mp_context* argument was added to allow users to control the " +"start_method for worker processes created by the pool." +msgstr "" + +#: library/concurrent.futures.rst:278 +msgid "ProcessPoolExecutor Example" +msgstr "" + +#: library/concurrent.futures.rst:316 +msgid "Future Objects" +msgstr "" + +#: library/concurrent.futures.rst:318 +msgid "" +"The :class:`Future` class encapsulates the asynchronous execution of a " +"callable. :class:`Future` instances are created by :meth:`Executor.submit`." +msgstr "" + +#: library/concurrent.futures.rst:323 +msgid "" +"Encapsulates the asynchronous execution of a callable. :class:`Future` " +"instances are created by :meth:`Executor.submit` and should not be created " +"directly except for testing." +msgstr "" + +#: library/concurrent.futures.rst:329 +msgid "" +"Attempt to cancel the call. If the call is currently being executed or " +"finished running and cannot be cancelled then the method will return " +"``False``, otherwise the call will be cancelled and the method will return " +"``True``." +msgstr "" + +#: library/concurrent.futures.rst:336 +msgid "Return ``True`` if the call was successfully cancelled." +msgstr "" + +#: library/concurrent.futures.rst:340 +msgid "" +"Return ``True`` if the call is currently being executed and cannot be " +"cancelled." +msgstr "" + +#: library/concurrent.futures.rst:345 +msgid "" +"Return ``True`` if the call was successfully cancelled or finished running." +msgstr "" + +#: library/concurrent.futures.rst:350 +msgid "" +"Return the value returned by the call. If the call hasn't yet completed then " +"this method will wait up to *timeout* seconds. If the call hasn't completed " +"in *timeout* seconds, then a :exc:`concurrent.futures.TimeoutError` will be " +"raised. *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:357 library/concurrent.futures.rst:371 +msgid "" +"If the future is cancelled before completing then :exc:`.CancelledError` " +"will be raised." +msgstr "" + +#: library/concurrent.futures.rst:360 +msgid "" +"If the call raised an exception, this method will raise the same exception." +msgstr "" + +#: library/concurrent.futures.rst:364 +msgid "" +"Return the exception raised by the call. If the call hasn't yet completed " +"then this method will wait up to *timeout* seconds. If the call hasn't " +"completed in *timeout* seconds, then a :exc:`concurrent.futures." +"TimeoutError` will be raised. *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:374 +msgid "If the call completed without raising, ``None`` is returned." +msgstr "" + +#: library/concurrent.futures.rst:378 +msgid "" +"Attaches the callable *fn* to the future. *fn* will be called, with the " +"future as its only argument, when the future is cancelled or finishes " +"running." +msgstr "" + +#: library/concurrent.futures.rst:382 +msgid "" +"Added callables are called in the order that they were added and are always " +"called in a thread belonging to the process that added them. If the " +"callable raises an :exc:`Exception` subclass, it will be logged and " +"ignored. If the callable raises a :exc:`BaseException` subclass, the " +"behavior is undefined." +msgstr "" + +#: library/concurrent.futures.rst:388 +msgid "" +"If the future has already completed or been cancelled, *fn* will be called " +"immediately." +msgstr "" + +#: library/concurrent.futures.rst:391 +msgid "" +"The following :class:`Future` methods are meant for use in unit tests and :" +"class:`Executor` implementations." +msgstr "" + +#: library/concurrent.futures.rst:396 +msgid "" +"This method should only be called by :class:`Executor` implementations " +"before executing the work associated with the :class:`Future` and by unit " +"tests." +msgstr "" + +#: library/concurrent.futures.rst:400 +msgid "" +"If the method returns ``False`` then the :class:`Future` was cancelled, i." +"e. :meth:`Future.cancel` was called and returned ``True``. Any threads " +"waiting on the :class:`Future` completing (i.e. through :func:`as_completed` " +"or :func:`wait`) will be woken up." +msgstr "" + +#: library/concurrent.futures.rst:405 +msgid "" +"If the method returns ``True`` then the :class:`Future` was not cancelled " +"and has been put in the running state, i.e. calls to :meth:`Future.running` " +"will return ``True``." +msgstr "" + +#: library/concurrent.futures.rst:409 +msgid "" +"This method can only be called once and cannot be called after :meth:`Future." +"set_result` or :meth:`Future.set_exception` have been called." +msgstr "" + +#: library/concurrent.futures.rst:415 +msgid "" +"Sets the result of the work associated with the :class:`Future` to *result*." +msgstr "" + +#: library/concurrent.futures.rst:418 library/concurrent.futures.rst:431 +msgid "" +"This method should only be used by :class:`Executor` implementations and " +"unit tests." +msgstr "" + +#: library/concurrent.futures.rst:421 library/concurrent.futures.rst:434 +msgid "" +"This method raises :exc:`concurrent.futures.InvalidStateError` if the :class:" +"`Future` is already done." +msgstr "" + +#: library/concurrent.futures.rst:428 +msgid "" +"Sets the result of the work associated with the :class:`Future` to the :" +"class:`Exception` *exception*." +msgstr "" + +#: library/concurrent.futures.rst:440 +msgid "Module Functions" +msgstr "" + +#: library/concurrent.futures.rst:444 +msgid "" +"Wait for the :class:`Future` instances (possibly created by different :class:" +"`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:452 +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:456 +msgid "" +"*return_when* indicates when this function should return. It must be one of " +"the following constants:" +msgstr "" +"*return_when* indique quand la fonction doit se terminer. Il peut prendre " +"les valeurs suivantes :" + +#: library/concurrent.futures.rst:462 +msgid "Constant" +msgstr "Constante" + +#: library/concurrent.futures.rst:462 +msgid "Description" +msgstr "Description" + +#: library/concurrent.futures.rst:464 +msgid ":const:`FIRST_COMPLETED`" +msgstr ":const:`FIRST_COMPLETED`" + +#: library/concurrent.futures.rst:464 +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:467 +msgid ":const:`FIRST_EXCEPTION`" +msgstr ":const:`FIRST_EXCEPTION`" + +#: library/concurrent.futures.rst:467 +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:" +"`ALL_COMPLETED`." +msgstr "" +"La fonction se termine lorsque n'importe quel futur se termine en levant une " +"exception. Si aucun *futur* ne lève d'exception, équivaut à :const:" +"`ALL_COMPLETED`." + +#: library/concurrent.futures.rst:473 +msgid ":const:`ALL_COMPLETED`" +msgstr ":const:`ALL_COMPLETED`" + +#: library/concurrent.futures.rst:473 +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:479 +msgid "" +"Returns an iterator over the :class:`Future` instances (possibly created by " +"different :class:`Executor` instances) given by *fs* that yields futures as " +"they complete (finished or cancelled futures). Any futures given by *fs* " +"that are duplicated will be returned once. Any futures that completed " +"before :func:`as_completed` is called will be yielded first. The returned " +"iterator raises a :exc:`concurrent.futures.TimeoutError` if :meth:`~iterator." +"__next__` is called and the result isn't available after *timeout* seconds " +"from the original call to :func:`as_completed`. *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:493 +msgid ":pep:`3148` -- futures - execute computations asynchronously" +msgstr "" + +#: library/concurrent.futures.rst:493 +msgid "" +"The proposal which described this feature for inclusion in the Python " +"standard library." +msgstr "" + +#: library/concurrent.futures.rst:498 +msgid "Exception classes" +msgstr "" + +#: library/concurrent.futures.rst:504 +msgid "Raised when a future is cancelled." +msgstr "" + +#: library/concurrent.futures.rst:508 +msgid "Raised when a future operation exceeds the given timeout." +msgstr "" + +#: library/concurrent.futures.rst:512 +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:520 +msgid "" +"Raised when an operation is performed on a future that is not allowed in the " +"current state." +msgstr "" + +#: library/concurrent.futures.rst:529 +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:539 +msgid "" +"Derived from :exc:`~concurrent.futures.BrokenExecutor` (formerly :exc:" +"`RuntimeError`), this exception class is raised when one of the workers of " +"a :class:`ProcessPoolExecutor` has terminated in a non-clean fashion (for " +"example, if it was killed from the outside)." +msgstr "" diff --git a/library/concurrent.po b/library/concurrent.po new file mode 100644 index 0000000000..fc08f89e63 --- /dev/null +++ b/library/concurrent.po @@ -0,0 +1,27 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +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: 2017-10-18 09:28+0200\n" +"Last-Translator: Julien Palard \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" + +#: library/concurrent.rst:2 +msgid "The :mod:`concurrent` package" +msgstr "Le paquet :mod:`concurrent`" + +#: library/concurrent.rst:4 +msgid "Currently, there is only one module in this package:" +msgstr "Il n'y a actuellement qu'un module dans ce paquet :" + +#: library/concurrent.rst:6 +msgid ":mod:`concurrent.futures` -- Launching parallel tasks" +msgstr ":mod:`concurrent.futures` -- Lancer des tâches en parallèle" diff --git a/library/configparser.po b/library/configparser.po new file mode 100644 index 0000000000..997398bceb --- /dev/null +++ b/library/configparser.po @@ -0,0 +1,1427 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-22 22:57+0100\n" +"PO-Revision-Date: 2022-10-18 12:35+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 ":mod:`configparser` — Lecture et écriture de fichiers de configuration" + +#: library/configparser.rst:14 +msgid "**Source code:** :source:`Lib/configparser.py`" +msgstr "**Code source :** :source:`Lib/configparser.py`" + +#: library/configparser.rst:24 +msgid "" +"This module provides the :class:`ConfigParser` class which implements a " +"basic configuration language which provides a structure similar to what's " +"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 "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 "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:56 +msgid "Quick Start" +msgstr "Premiers pas" + +#: 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:75 +msgid "" +"The structure of INI files is described `in the following section " +"<#supported-ini-file-structure>`_. Essentially, the file consists of " +"sections, each of which contains keys with values. :mod:`configparser` " +"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: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: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: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:143 +msgid "" +"It is possible to read several configurations into a single :class:" +"`ConfigParser`, where the most recently added configuration has the highest " +"priority. Any conflicting keys are taken from the more recent configuration " +"while the previously existing keys are retained." +msgstr "" + +#: library/configparser.rst:164 +msgid "" +"This behaviour is equivalent to a :meth:`ConfigParser.read` call with " +"several files passed to the *filenames* parameter." +msgstr "" + +#: library/configparser.rst:169 +msgid "Supported Datatypes" +msgstr "Types de données prises en charge" + +#: library/configparser.rst:171 +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:182 +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 " +"interesting because simply passing the value to ``bool()`` would do no good " +"since ``bool('False')`` is still ``True``. This is why config parsers also " +"provide :meth:`~ConfigParser.getboolean`. This method is case-insensitive " +"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:199 +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:205 +msgid "Fallback Values" +msgstr "Valeurs de substitution" + +#: library/configparser.rst:207 +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:220 +#, fuzzy +msgid "" +"Please note that default values have precedence over fallback values. For " +"instance, in our example the ``'CompressionLevel'`` key was specified only " +"in the ``'DEFAULT'`` section. If we try to get it from the section " +"``'topsecret.server.example'``, 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:231 +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:242 +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:258 +msgid "Supported INI File Structure" +msgstr "Structure des fichiers *INI* prise en change" + +#: library/configparser.rst:260 +#, 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 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:270 +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:273 +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:340 +msgid "For example:" +msgstr "Par exemple :" + +#: library/configparser.rst:325 +msgid "Interpolation of values" +msgstr "Interpolation des valeurs" + +#: library/configparser.rst:327 +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:335 +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:353 +msgid "" +"In the example above, :class:`ConfigParser` with *interpolation* set to " +"``BasicInterpolation()`` would resolve ``%(home_dir)s`` to the value of " +"``home_dir`` (``/Users`` in this case). ``%(my_dir)s`` in effect would " +"resolve to ``/Users/lumberjack``. All interpolations are done on demand so " +"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:360 +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/" +"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:368 +msgid "" +"An alternative handler for interpolation which implements a more advanced " +"syntax, used for instance in ``zc.buildout``. Extended interpolation is " +"using ``${section:option}`` to denote a value from a foreign section. " +"Interpolation can span multiple levels. For convenience, if the ``section:" +"`` 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:375 +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:389 +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:411 +msgid "Mapping Protocol Access" +msgstr "Protocole d'accès associatif" + +#: library/configparser.rst:415 +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:420 +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 " +"from the original parser on demand. What's even more important is that when " +"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:426 +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:431 +msgid "" +"By default, all keys in sections are accessible in a case-insensitive manner " +"[1]_. E.g. ``for option in parser[\"section\"]`` yields only " +"``optionxform``'ed option key names. This means lowercased keys by " +"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:439 +msgid "" +"All sections include ``DEFAULTSECT`` values as well which means that ``." +"clear()`` on a section may not leave the section visibly empty. This is " +"because default values cannot be deleted from the section (because " +"technically they are not there). If they are overridden in the section, " +"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:446 +msgid "``DEFAULTSECT`` cannot be removed from the parser:" +msgstr "La section ``DEFAULTSECT`` ne peut pas être supprimée ::" + +# fausse alerte dans poedit - garder le point-virgule +#: library/configparser.rst:448 +msgid "trying to delete it raises :exc:`ValueError`," +msgstr "l'exception :exc:`ValueError` est levée si on essaye de la supprimer ;" + +# fausse alerte dans poedit - garder le point-virgule +#: library/configparser.rst:450 +msgid "``parser.clear()`` leaves it intact," +msgstr "appeler ``parser.clear()`` la laisse intacte ;" + +#: library/configparser.rst:452 +msgid "``parser.popitem()`` never returns it." +msgstr "appeler ``parser.popitem()`` ne la renvoie jamais." + +#: library/configparser.rst:454 +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:458 +msgid "" +"``parser.items()`` is compatible with the mapping protocol (returns a list " +"of *section_name*, *section_proxy* pairs including the DEFAULTSECT). " +"However, this method can also be invoked with arguments: ``parser." +"items(section, raw, vars)``. The latter call returns a list of *option*, " +"*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:465 +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:471 +msgid "Customizing Parser Behaviour" +msgstr "Personnalisation du comportement de l'analyseur" + +#: library/configparser.rst:473 +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 " +"sensible set of INI styles available. The default functionality is mainly " +"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:479 +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:482 +msgid "*defaults*, default value: ``None``" +msgstr "*defaults*, valeur par défaut : ``None``" + +#: library/configparser.rst:484 +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:489 +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:492 +msgid "*dict_type*, default value: :class:`dict`" +msgstr "*dict_type*, valeur par défaut : :class:`dict`" + +#: library/configparser.rst:494 +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:499 +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:502 +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:524 +msgid "*allow_no_value*, default value: ``False``" +msgstr "*allow_no_value*, valeur par défaut : ``False``" + +#: library/configparser.rst:526 +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:561 +msgid "*delimiters*, default value: ``('=', ':')``" +msgstr "*delimiters*, valeur par défaut : ``('=', ':')``" + +#: library/configparser.rst:563 +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:567 +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:570 +msgid "*comment_prefixes*, default value: ``('#', ';')``" +msgstr "" +"*comment_prefixes* (préfixes de commentaire) — valeur par défaut : ``('#', " +"';')``" + +#: library/configparser.rst:572 +msgid "*inline_comment_prefixes*, default value: ``None``" +msgstr "" +"*inline_comment_prefixes* (préfixes de commentaire en ligne) — valeur par " +"défaut : ``('#', ';')``" + +#: library/configparser.rst:574 +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 " +"lines (optionally indented) whereas *inline_comment_prefixes* can be used " +"after every valid value (e.g. section names, options and empty lines as " +"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:581 +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:585 +msgid "" +"Please note that config parsers don't support escaping of comment prefixes " +"so using *inline_comment_prefixes* may prevent users from specifying option " +"values with characters used as comment prefixes. When in doubt, avoid " +"setting *inline_comment_prefixes*. In any circumstances, the only way of " +"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:631 +msgid "*strict*, default value: ``True``" +msgstr "*scrict*, valeur par défaut : ``True``" + +#: library/configparser.rst:633 +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:638 +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:642 +msgid "*empty_lines_in_values*, default value: ``True``" +msgstr "*empty_lines_in_values*, valeur par défaut : ``True``" + +#: library/configparser.rst:644 +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 " +"empty lines to be parts of values. At the same time, keys can be " +"arbitrarily indented themselves to improve readability. In consequence, " +"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:659 +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 " +"not need values with empty lines, you should consider disallowing them. " +"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:665 +msgid "" +"*default_section*, default value: ``configparser.DEFAULTSECT`` (that is: " +"``\"DEFAULT\"``)" +msgstr "" +"*default_section*, valeur par défaut : ``configparser.DEFAULTSECT`` " +"(autrement dit : ``\"DEFAULT\"``)" + +#: library/configparser.rst:668 +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 " +"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:679 +msgid "*interpolation*, default value: ``configparser.BasicInterpolation``" +msgstr "" + +#: library/configparser.rst:681 +msgid "" +"Interpolation behaviour may be customized by providing a custom handler " +"through the *interpolation* argument. ``None`` can be used to turn off " +"interpolation completely, ``ExtendedInterpolation()`` provides a more " +"advanced variant inspired by ``zc.buildout``. More on the subject in the " +"`dedicated documentation section <#interpolation-of-values>`_. :class:" +"`RawConfigParser` has a default value of ``None``." +msgstr "" + +#: library/configparser.rst:688 +msgid "*converters*, default value: not set" +msgstr "" + +#: library/configparser.rst:690 +msgid "" +"Config parsers provide option value getters that perform type conversion. " +"By default :meth:`~ConfigParser.getint`, :meth:`~ConfigParser.getfloat`, " +"and :meth:`~ConfigParser.getboolean` are implemented. Should other getters " +"be desirable, users may define them in a subclass or pass a dictionary where " +"each key is a name of the converter and each value is a callable " +"implementing said conversion. For instance, passing ``{'decimal': decimal." +"Decimal}`` would add :meth:`getdecimal` on both the parser object and all " +"section proxies. In other words, it will be possible to write both " +"``parser_instance.getdecimal('section', 'key', fallback=0)`` and " +"``parser_instance['section'].getdecimal('key', 0)``." +msgstr "" + +#: library/configparser.rst:701 +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 " +"method starts with ``get``, it will be available on all section proxies, in " +"the dict-compatible form (see the ``getdecimal()`` example above)." +msgstr "" + +#: library/configparser.rst:706 +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:712 +msgid "" +"By default when using :meth:`~ConfigParser.getboolean`, config parsers " +"consider the following values ``True``: ``'1'``, ``'yes'``, ``'true'``, " +"``'on'`` and the following values ``False``: ``'0'``, ``'no'``, ``'false'``, " +"``'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:730 +msgid "" +"Other typical Boolean pairs include ``accept``/``reject`` or ``enabled``/" +"``disabled``." +msgstr "" + +#: library/configparser.rst:736 +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 " +"configuration file gets written, all keys will be lowercase. Override this " +"method if that's unsuitable. For example:" +msgstr "" + +#: library/configparser.rst:766 +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:773 +msgid "" +"A compiled regular expression used to parse section headers. The default " +"matches ``[section]`` to the name ``\"section\"``. Whitespace is considered " +"part of the section name, thus ``[ larch ]`` will be read as a section of " +"name ``\" larch \"``. Override this attribute if that's unsuitable. For " +"example:" +msgstr "" + +#: library/configparser.rst:801 +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:807 +msgid "Legacy API Examples" +msgstr "" + +#: library/configparser.rst:809 +msgid "" +"Mainly because of backwards compatibility concerns, :mod:`configparser` " +"provides also a legacy API with explicit ``get``/``set`` methods. While " +"there are valid use cases for the methods outlined below, mapping protocol " +"access is preferred for new projects. The legacy API is at times more " +"advanced, low-level and downright counterintuitive." +msgstr "" + +#: library/configparser.rst:815 +msgid "An example of writing to a configuration file::" +msgstr "" + +#: library/configparser.rst:838 +msgid "An example of reading the configuration file again::" +msgstr "" + +#: library/configparser.rst:856 +msgid "To get interpolation, use :class:`ConfigParser`::" +msgstr "" + +#: library/configparser.rst:889 +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:907 +msgid "ConfigParser Objects" +msgstr "" + +#: library/configparser.rst:911 +msgid "" +"The main configuration parser. When *defaults* is given, it is initialized " +"into the dictionary of intrinsic defaults. When *dict_type* is given, it " +"will be used to create the dictionary objects for the list of sections, for " +"the options within a section, and for the default values." +msgstr "" + +#: library/configparser.rst:916 +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 " +"set of substrings that prefix comments in otherwise empty lines. Comments " +"can be indented. When *inline_comment_prefixes* is given, it will be used " +"as the set of substrings that prefix comments in non-empty lines." +msgstr "" + +#: library/configparser.rst:922 +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, " +"string or dictionary), raising :exc:`DuplicateSectionError` or :exc:" +"`DuplicateOptionError`. When *empty_lines_in_values* is ``False`` (default: " +"``True``), each empty line marks the end of an option. Otherwise, internal " +"empty lines of a multiline option are kept as part of the value. When " +"*allow_no_value* is ``True`` (default: ``False``), options without values " +"are accepted; the value held for these is ``None`` and they are serialized " +"without the trailing delimiter." +msgstr "" + +#: library/configparser.rst:932 +msgid "" +"When *default_section* is given, it specifies the name for the special " +"section holding default values for other sections and interpolation purposes " +"(normally named ``\"DEFAULT\"``). This value can be retrieved and changed " +"on runtime using the ``default_section`` instance attribute." +msgstr "" + +#: library/configparser.rst:937 +msgid "" +"Interpolation behaviour may be customized by providing a custom handler " +"through the *interpolation* argument. ``None`` can be used to turn off " +"interpolation completely, ``ExtendedInterpolation()`` provides a more " +"advanced variant inspired by ``zc.buildout``. More on the subject in the " +"`dedicated documentation section <#interpolation-of-values>`_." +msgstr "" + +#: library/configparser.rst:943 +msgid "" +"All option names used in interpolation will be passed through the :meth:" +"`optionxform` method just like any other option name reference. For " +"example, using the default implementation of :meth:`optionxform` (which " +"converts option names to lower case), the values ``foo %(bar)s`` and ``foo " +"%(BAR)s`` are equivalent." +msgstr "" + +#: library/configparser.rst:949 +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 " +"implementing the conversion from string to the desired datatype. Every " +"converter gets its own corresponding :meth:`get*()` method on the parser " +"object and section proxies." +msgstr "" + +#: library/configparser.rst:955 +msgid "The default *dict_type* is :class:`collections.OrderedDict`." +msgstr "" + +#: library/configparser.rst:958 +msgid "" +"*allow_no_value*, *delimiters*, *comment_prefixes*, *strict*, " +"*empty_lines_in_values*, *default_section* and *interpolation* were added." +msgstr "" + +#: library/configparser.rst:963 +msgid "The *converters* argument was added." +msgstr "" + +#: library/configparser.rst:966 +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:1256 +msgid "" +"The default *dict_type* is :class:`dict`, since it now preserves insertion " +"order." +msgstr "" + +#: library/configparser.rst:977 +msgid "Return a dictionary containing the instance-wide defaults." +msgstr "" + +#: library/configparser.rst:982 +msgid "" +"Return a list of the sections available; the *default section* is not " +"included in the list." +msgstr "" + +#: library/configparser.rst:988 +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. The name of " +"the section must be a string; if not, :exc:`TypeError` is raised." +msgstr "" + +#: library/configparser.rst:993 +msgid "Non-string section names raise :exc:`TypeError`." +msgstr "" + +#: library/configparser.rst:999 +msgid "" +"Indicates whether the named *section* is present in the configuration. The " +"*default section* is not acknowledged." +msgstr "" + +#: library/configparser.rst:1005 +msgid "Return a list of options available in the specified *section*." +msgstr "" + +#: library/configparser.rst:1010 +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:1017 +msgid "" +"Attempt to read and parse an iterable of filenames, returning a list of " +"filenames which were successfully parsed." +msgstr "" + +#: library/configparser.rst:1020 +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* " +"cannot be opened, that file will be ignored. This is designed so that you " +"can specify an iterable of potential configuration file locations (for " +"example, the current directory, the user's home directory, and some system-" +"wide directory), and all existing configuration files in the iterable will " +"be read." +msgstr "" + +#: library/configparser.rst:1029 +msgid "" +"If none of the named files exist, the :class:`ConfigParser` instance will " +"contain an empty dataset. An application which requires initial values to " +"be loaded from a file should load the required file or files using :meth:" +"`read_file` before calling :meth:`read` for any optional files::" +msgstr "" + +#: library/configparser.rst:1042 +msgid "" +"The *encoding* parameter. Previously, all files were read using the default " +"encoding for :func:`open`." +msgstr "" + +#: library/configparser.rst:1046 +#, 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:1049 +msgid "The *filenames* parameter accepts a :class:`bytes` object." +msgstr "" + +#: library/configparser.rst:1055 +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:1058 +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:1062 +msgid "Replaces :meth:`readfp`." +msgstr "" + +#: library/configparser.rst:1067 +msgid "Parse configuration data from a string." +msgstr "" + +#: library/configparser.rst:1069 +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:1078 +msgid "" +"Load configuration from any object that provides a dict-like ``items()`` " +"method. Keys are section names, values are dictionaries with keys and " +"values that should be present in the section. If the used dictionary type " +"preserves order, sections and their keys will be added in order. Values are " +"automatically converted to strings." +msgstr "" + +#: library/configparser.rst:1084 +msgid "" +"Optional argument *source* specifies a context-specific name of the " +"dictionary passed. If not given, ```` is used." +msgstr "" + +#: library/configparser.rst:1087 +msgid "This method can be used to copy state between parsers." +msgstr "" + +#: library/configparser.rst:1094 +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), " +"*section*, and in *DEFAULTSECT* in that order. If the key is not found and " +"*fallback* is provided, it is used as a fallback value. ``None`` can be " +"provided as a *fallback* value." +msgstr "" + +#: library/configparser.rst:1100 +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:1104 +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:1112 +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:1119 +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:1126 +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 " +"``'1'``, ``'yes'``, ``'true'``, and ``'on'``, which cause this method to " +"return ``True``, and ``'0'``, ``'no'``, ``'false'``, and ``'off'``, which " +"cause it to return ``False``. These string values are checked in a case-" +"insensitive manner. Any other value will cause it to raise :exc:" +"`ValueError`. See :meth:`get` for explanation of *raw*, *vars* and " +"*fallback*." +msgstr "" + +#: library/configparser.rst:1139 +msgid "" +"When *section* is not given, return a list of *section_name*, " +"*section_proxy* pairs, including DEFAULTSECT." +msgstr "" + +#: library/configparser.rst:1142 +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:1146 +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:1154 +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:1161 +msgid "" +"Write a representation of the configuration to the specified :term:`file " +"object`, which must be opened in text mode (accepting strings). This " +"representation can be parsed by a future :meth:`read` call. If " +"*space_around_delimiters* is true, delimiters between keys and values are " +"surrounded by spaces." +msgstr "" + +#: library/configparser.rst:1169 +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:1177 +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:1185 +msgid "" +"Remove the specified *section* from the configuration. If the section in " +"fact existed, return ``True``. Otherwise return ``False``." +msgstr "" + +#: library/configparser.rst:1191 +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 " +"structures. The default implementation returns a lower-case version of " +"*option*; subclasses may override this or client code can set an attribute " +"of this name on instances to affect this behavior." +msgstr "" + +#: library/configparser.rst:1197 +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 " +"string. Setting it to ``str``, for example, would make option names case " +"sensitive::" +msgstr "" + +#: library/configparser.rst:1205 +msgid "" +"Note that when reading configuration files, whitespace around the option " +"names is stripped before :meth:`optionxform` is called." +msgstr "" + +#: library/configparser.rst:1211 +msgid "Use :meth:`read_file` instead." +msgstr "" + +#: library/configparser.rst:1214 +msgid "" +":meth:`readfp` now iterates on *fp* instead of calling ``fp.readline()``." +msgstr "" + +#: library/configparser.rst:1217 +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:1227 +msgid "" +"Instead of ``parser.readfp(fp)`` use ``parser." +"read_file(readline_generator(fp))``." +msgstr "" + +#: library/configparser.rst:1233 +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:1241 +msgid "RawConfigParser Objects" +msgstr "" + +#: library/configparser.rst:1251 +msgid "" +"Legacy variant of the :class:`ConfigParser`. It has interpolation disabled " +"by default and allows for non-string section names, option names, and values " +"via its unsafe ``add_section`` and ``set`` methods, as well as the legacy " +"``defaults=`` keyword argument handling." +msgstr "" + +#: library/configparser.rst:1261 +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:1268 +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:1272 +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:1278 +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:" +"`RawConfigParser` (or :class:`ConfigParser` with *raw* parameters set to " +"true) for *internal* storage of non-string values, full functionality " +"(including interpolation and output to files) can only be achieved using " +"string values." +msgstr "" + +#: library/configparser.rst:1285 +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 " +"file or get it in non-raw mode. **Use the mapping protocol API** which does " +"not allow such assignments to take place." +msgstr "" + +#: library/configparser.rst:1292 +msgid "Exceptions" +msgstr "Exceptions" + +#: library/configparser.rst:1296 +msgid "Base class for all other :mod:`configparser` exceptions." +msgstr "" + +#: library/configparser.rst:1301 +msgid "Exception raised when a specified section is not found." +msgstr "" + +#: library/configparser.rst:1306 +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:1310 +msgid "" +"Optional ``source`` and ``lineno`` attributes and arguments to :meth:" +"`__init__` were added." +msgstr "" + +#: library/configparser.rst:1317 +msgid "" +"Exception raised by strict parsers if a single option appears twice during " +"reading from a single file, string or dictionary. This catches misspellings " +"and case sensitivity-related errors, e.g. a dictionary may have two keys " +"representing the same case-insensitive configuration key." +msgstr "" + +#: library/configparser.rst:1325 +msgid "" +"Exception raised when a specified option is not found in the specified " +"section." +msgstr "" + +#: library/configparser.rst:1331 +msgid "" +"Base class for exceptions raised when problems occur performing string " +"interpolation." +msgstr "" + +#: library/configparser.rst:1337 +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:1344 +msgid "" +"Exception raised when an option referenced from a value does not exist. " +"Subclass of :exc:`InterpolationError`." +msgstr "" + +#: library/configparser.rst:1350 +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:1356 +msgid "" +"Exception raised when attempting to parse a file which has no section " +"headers." +msgstr "" + +#: library/configparser.rst:1362 +msgid "Exception raised when errors occur attempting to parse a file." +msgstr "" + +#: library/configparser.rst:1364 +msgid "" +"The ``filename`` attribute and :meth:`__init__` argument were renamed to " +"``source`` for consistency." +msgstr "" + +#: library/configparser.rst:1370 +msgid "Footnotes" +msgstr "Notes" + +#: library/configparser.rst:1371 +msgid "" +"Config parsers allow for heavy customization. If you are interested in " +"changing the behaviour outlined by the footnote reference, consult the " +"`Customizing Parser Behaviour`_ section." +msgstr "" diff --git a/library/constants.po b/library/constants.po new file mode 100644 index 0000000000..88d9662653 --- /dev/null +++ b/library/constants.po @@ -0,0 +1,189 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-09-23 16:16+0200\n" +"PO-Revision-Date: 2021-11-06 21:25+0100\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 3.0\n" + +#: library/constants.rst:4 +msgid "Built-in Constants" +msgstr "Constantes natives" + +#: library/constants.rst:6 +msgid "A small number of constants live in the built-in namespace. They are:" +msgstr "" +"Un petit nombre de constantes existent dans le *namespace* natif. Elles " +"sont :" + +#: library/constants.rst:10 +msgid "" +"The false value of the :class:`bool` type. Assignments to ``False`` are " +"illegal and raise a :exc:`SyntaxError`." +msgstr "" +"La valeur fausse du type :class:`bool`. Les assignations à ``False`` ne sont " +"pas autorisées et lèvent une :exc:`SyntaxError`." + +#: library/constants.rst:16 +msgid "" +"The true value of the :class:`bool` type. Assignments to ``True`` are " +"illegal and raise a :exc:`SyntaxError`." +msgstr "" +"La valeur vraie du type :class:`bool`. Les assignations à ``True`` ne sont " +"pas autorisées et lèvent une :exc:`SyntaxError`." + +#: library/constants.rst:22 +msgid "" +"An object frequently used to represent the absence of a value, as when " +"default arguments are not passed to a function. Assignments to ``None`` are " +"illegal and raise a :exc:`SyntaxError`. ``None`` is the sole instance of " +"the :data:`NoneType` type." +msgstr "" +"Objet utilisé fréquemment pour représenter l'absence de valeur, comme " +"lorsque des arguments par défaut ne sont pas passés à une fonction. Les " +"assignations à ``None`` ne sont pas autorisées et lèvent une :exc:" +"`SyntaxError`. ``None`` est la seule instance du type :data:`NoneType`." + +#: library/constants.rst:30 +msgid "" +"A special value which should be returned by the binary special methods (e." +"g. :meth:`__eq__`, :meth:`__lt__`, :meth:`__add__`, :meth:`__rsub__`, etc.) " +"to indicate that the operation is not implemented with respect to the other " +"type; may be returned by the in-place binary special methods (e.g. :meth:" +"`__imul__`, :meth:`__iand__`, etc.) for the same purpose. It should not be " +"evaluated in a boolean context. ``NotImplemented`` is the sole instance of " +"the :data:`types.NotImplementedType` type." +msgstr "" +"Valeur spéciale qui devrait être renvoyée par les méthodes magiques à deux " +"opérandes (comme :meth:`__eq__`, :meth:`__lt__`, :meth:`__add__`, :meth:" +"`__rsub__`, etc.) pour indiquer que l'opération n'est pas implémentée pour " +"l'autre type ; peut être renvoyée par les méthodes magiques augmentées à " +"deux opérandes (comme :meth:`__imul__`, :meth:`__iand__`, etc.) avec le même " +"objectif. Elle ne doit pas être évaluée comme booléen. ``NotImplemented`` " +"est la seule instance de :data:`types.NotImplementedType`." + +#: library/constants.rst:40 +msgid "" +"When a binary (or in-place) method returns ``NotImplemented`` the " +"interpreter will try the reflected operation on the other type (or some " +"other fallback, depending on the operator). If all attempts return " +"``NotImplemented``, the interpreter will raise an appropriate exception. " +"Incorrectly returning ``NotImplemented`` will result in a misleading error " +"message or the ``NotImplemented`` value being returned to Python code." +msgstr "" +"Lorsqu'une méthode à deux opérandes renvoie ``NotImplemented``, " +"l'interpréteur essaye d'exécuter l'opération réfléchie sur l'autre type (il " +"existe d'autres mécanismes de *fallback*, en fonction de l'opérateur). Si " +"toutes les tentatives renvoient ``NotImplemented``, l'interpréteur lève une " +"exception appropriée. Renvoyer ``NotImplemented`` à tort donne lieu à un " +"message d'erreur peu clair ou au renvoi de la valeur ``NotImplemented`` pour " +"le code Python." + +#: library/constants.rst:47 +msgid "See :ref:`implementing-the-arithmetic-operations` for examples." +msgstr "Voir :ref:`implementing-the-arithmetic-operations` pour des exemples." + +#: library/constants.rst:51 +msgid "" +"``NotImplementedError`` and ``NotImplemented`` are not interchangeable, even " +"though they have similar names and purposes. See :exc:`NotImplementedError` " +"for details on when to use it." +msgstr "" +"``NotImplementedError`` et ``NotImplemented`` ne sont pas interchangeables, " +"même s'ils ont un nom et un objectif similaire. Voir :exc:" +"`NotImplementedError` pour savoir quand l'utiliser." + +#: library/constants.rst:55 +msgid "" +"Evaluating ``NotImplemented`` in a boolean context is deprecated. While it " +"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:64 +msgid "" +"The same as the ellipsis literal \"``...``\". Special value used mostly in " +"conjunction with extended slicing syntax for user-defined container data " +"types. ``Ellipsis`` is the sole instance of the :data:`types.EllipsisType` " +"type." +msgstr "" +"Identique au littéral *points de suspension* (\"``...``\"). Valeur spéciale " +"utilisée principalement de manière conjointe avec la syntaxe de découpage " +"(*slicing*) étendu pour les conteneurs personnalisés. ``Ellipsis`` est la " +"seule instance de :data:`types.EllipsisType`." + +#: library/constants.rst:71 +msgid "" +"This constant is true if Python was not started with an :option:`-O` option. " +"See also the :keyword:`assert` statement." +msgstr "" +"Cette constante est vraie si Python n'a pas été démarré avec une option :" +"option:`-O`. Voir aussi l'expression :keyword:`assert`." + +#: library/constants.rst:77 +msgid "" +"The names :data:`None`, :data:`False`, :data:`True` and :data:`__debug__` " +"cannot be reassigned (assignments to them, even as an attribute name, raise :" +"exc:`SyntaxError`), so they can be considered \"true\" constants." +msgstr "" +"Les noms :data:`None`, :data:`False`, :data:`True` et :data:`__debug__` ne " +"peuvent pas être réassignés (des assignations à ces noms, ou aux noms de " +"leurs attributs, lèvent une :exc:`SyntaxError`), donc ils peuvent être " +"considérés comme des \"vraies\" constantes." + +#: library/constants.rst:83 +msgid "Constants added by the :mod:`site` module" +msgstr "Constantes ajoutées par le module :mod:`site`" + +#: library/constants.rst:85 +msgid "" +"The :mod:`site` module (which is imported automatically during startup, " +"except if the :option:`-S` command-line option is given) adds several " +"constants to the built-in namespace. They are useful for the interactive " +"interpreter shell and should not be used in programs." +msgstr "" +"Le module :mod:`site` (qui est importé automatiquement au démarrage, sauf si " +"l'option de ligne de commande :option:`-S` est donnée ajoute un certain " +"nombre de constantes au *namespace* natif. Elles sont utiles pour " +"l'interpréteur interactif et ne devraient pas être utilisées par des " +"programmes." + +#: library/constants.rst:93 +msgid "" +"Objects that when printed, print a message like \"Use quit() or Ctrl-D (i.e. " +"EOF) to exit\", and when called, raise :exc:`SystemExit` with the specified " +"exit code." +msgstr "" +"Objets qui, lorsqu'ils sont représentés, affichent un message comme *\"Use " +"quit() or Ctrl-D (i.e. EOF) to exit\"*, et lorsqu'ils sont appelés, lèvent " +"un :exc:`SystemExit` avec le code de retour spécifié." + +#: library/constants.rst:100 +msgid "" +"Objects that when printed or called, print the text of copyright or credits, " +"respectively." +msgstr "" +"Objets qui, lorsqu'ils sont affichés ou appelés, affichent le copyright ou " +"les crédits, respectivement." + +#: library/constants.rst:105 +msgid "" +"Object that when printed, prints the message \"Type license() to see the " +"full license text\", and when called, displays the full license text in a " +"pager-like fashion (one screen at a time)." +msgstr "" +"Objet qui, lorsqu'il est affiché, affiche un message comme *\"Type license() " +"to see the full license text\"*, et lorsqu'il est appelé, affiche le texte " +"complet de la licence dans un style paginé (un écran à la fois)." diff --git a/library/contextlib.po b/library/contextlib.po new file mode 100644 index 0000000000..4db366b1d5 --- /dev/null +++ b/library/contextlib.po @@ -0,0 +1,1129 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-18 15:46+0200\n" +"PO-Revision-Date: 2021-11-06 21:37+0100\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 3.0\n" + +#: library/contextlib.rst:2 +msgid "" +":mod:`!contextlib` --- Utilities for :keyword:`!with`\\ -statement contexts" +msgstr "" +":mod:`!contextlib` — Utilitaires pour les contextes s'appuyant sur " +"l'instruction :keyword:`!with`" + +#: library/contextlib.rst:7 +msgid "**Source code:** :source:`Lib/contextlib.py`" +msgstr "**Code source :** :source:`Lib/contextlib.py`" + +#: library/contextlib.rst:11 +msgid "" +"This module provides utilities for common tasks involving the :keyword:" +"`with` statement. For more information see also :ref:`typecontextmanager` " +"and :ref:`context-managers`." +msgstr "" +"Ce module fournit des utilitaires pour les tâches impliquant le mot-clé :" +"keyword:`with`. Pour plus d'informations voir aussi :ref:" +"`typecontextmanager` et :ref:`context-managers`." + +#: library/contextlib.rst:17 +msgid "Utilities" +msgstr "Utilitaires" + +#: library/contextlib.rst:19 +msgid "Functions and classes provided:" +msgstr "Fonctions et classes fournies :" + +#: library/contextlib.rst:23 +msgid "" +"An :term:`abstract base class` for classes that implement :meth:`object." +"__enter__` and :meth:`object.__exit__`. A default implementation for :meth:" +"`object.__enter__` is provided which returns ``self`` while :meth:`object." +"__exit__` is an abstract method which by default returns ``None``. See also " +"the definition of :ref:`typecontextmanager`." +msgstr "" +":term:`Classe mère abstraite ` pour les classes qui " +"implémentent les méthodes :meth:`object.__enter__` et :meth:`object." +"__exit__`. Une implémentation par défaut de :meth:`object.__enter__` est " +"fournie, qui renvoie ``self``, et :meth:`object.__exit__` est une méthode " +"abstraite qui renvoie ``None`` par défaut. Voir aussi la définition de :ref:" +"`typecontextmanager`." + +#: library/contextlib.rst:34 +msgid "" +"An :term:`abstract base class` for classes that implement :meth:`object." +"__aenter__` and :meth:`object.__aexit__`. A default implementation for :meth:" +"`object.__aenter__` is provided which returns ``self`` while :meth:`object." +"__aexit__` is an abstract method which by default returns ``None``. See also " +"the definition of :ref:`async-context-managers`." +msgstr "" +":term:`Classe mère abstraite ` pour les classes qui " +"implémentent les méthodes :meth:`object.__aenter__` et :meth:`object." +"__aexit__`. Une implémentation par défaut de :meth:`object.__aenter__` est " +"fournie, qui renvoie ``self``, et :meth:`object.__aexit__` est une méthode " +"abstraite qui renvoie ``None`` par défaut. Voir aussi la définition de :ref:" +"`async-context-managers`." + +#: library/contextlib.rst:46 +msgid "" +"This function is a :term:`decorator` that can be used to define a factory " +"function for :keyword:`with` statement context managers, without needing to " +"create a class or separate :meth:`__enter__` and :meth:`__exit__` methods." +msgstr "" +"Cette fonction est un :term:`decorator` qui peut être utilisé pour définir " +"une fonction fabriquant des gestionnaires de contexte à utiliser avec :" +"keyword:`with`, sans nécessiter de créer une classe ou des méthodes :meth:" +"`__enter__` et :meth:`__exit__` séparées." + +#: library/contextlib.rst:50 +msgid "" +"While many objects natively support use in with statements, sometimes a " +"resource needs to be managed that isn't a context manager in its own right, " +"and doesn't implement a ``close()`` method for use with ``contextlib." +"closing``" +msgstr "" +"Alors que de nombreux objets s'utilisent nativement dans des blocs *with*, " +"on trouve parfois des ressources qui nécessitent d'être gérées mais ne sont " +"pas des gestionnaires de contextes, et qui n'implémentent pas de méthode " +"``close()`` pour pouvoir être utilisées avec ``contextlib.closing``" + +#: library/contextlib.rst:54 +msgid "" +"An abstract example would be the following to ensure correct resource " +"management::" +msgstr "" +"L'exemple abstrait suivant présente comment assurer une gestion correcte des " +"ressources ::" + +#: library/contextlib.rst:69 +msgid "The function can then be used like this::" +msgstr "" + +#: library/contextlib.rst:75 +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." + +#: library/contextlib.rst:79 +msgid "" +"At the point where the generator yields, the block nested in the :keyword:" +"`with` statement is executed. The generator is then resumed after the block " +"is exited. If an unhandled exception occurs in the block, it is reraised " +"inside the generator at the point where the yield occurred. Thus, you can " +"use a :keyword:`try`...\\ :keyword:`except`...\\ :keyword:`finally` " +"statement to trap the error (if any), or ensure that some cleanup takes " +"place. If an exception is trapped merely in order to log it or to perform " +"some action (rather than to suppress it entirely), the generator must " +"reraise that exception. Otherwise the generator context manager will " +"indicate to the :keyword:`!with` statement that the exception has been " +"handled, and execution will resume with the statement immediately following " +"the :keyword:`!with` statement." +msgstr "" +"Au moment où le générateur produit une valeur, le bloc imbriqué sous " +"l'instruction :keyword:`with` est exécuté. Le générateur est ensuite repris " +"après la sortie du bloc. Si une exception non gérée survient dans le bloc, " +"elle est relayée dans le générateur au niveau de l'instruction *yield*. " +"Ainsi, vous pouvez utiliser les instructions :keyword:`try`…\\ :keyword:" +"`except`…\\ :keyword:`finally` pour attraper l'erreur (s'il y a), ou vous " +"assurer qu'un nettoyage a bien lieu. Si une exception est attrapée dans " +"l'unique but d'être journalisée ou d'effectuer une action particulière " +"(autre que supprimer entièrement l'exception), le générateur se doit de la " +"relayer. Autrement le générateur gestionnaire de contexte doit indiquer à " +"l'instruction :keyword:`!with` que l'exception a été gérée, et l'exécution " +"reprend sur l'instruction qui suit directement le bloc :keyword:`!with`." + +#: library/contextlib.rst:91 +msgid "" +":func:`contextmanager` uses :class:`ContextDecorator` so the context " +"managers it creates can be used as decorators as well as in :keyword:`with` " +"statements. When used as a decorator, a new generator instance is implicitly " +"created on each function call (this allows the otherwise \"one-shot\" " +"context managers created by :func:`contextmanager` to meet the requirement " +"that context managers support multiple invocations in order to be used as " +"decorators)." +msgstr "" +"Le décorateur :func:`contextmanager` utilise la classe :class:" +"`ContextDecorator` afin que les gestionnaires de contexte qu'il crée " +"puissent être utilisés aussi bien en tant que décorateurs qu'avec des " +"instructions :keyword:`with`. Quand vous l'utilisez comme décorateur, une " +"nouvelle instance du générateur est créée à chaque appel de la fonction " +"(cela permet aux gestionnaires de contexte à usage unique créés par :func:" +"`contextmanager` de remplir la condition de pouvoir être invoqués plusieurs " +"fois afin d'être utilisés comme décorateurs)." + +#: library/contextlib.rst:98 +msgid "Use of :class:`ContextDecorator`." +msgstr "Utilisation de la classe :class:`ContextDecorator`." + +#: library/contextlib.rst:104 +msgid "" +"Similar to :func:`~contextlib.contextmanager`, but creates an :ref:" +"`asynchronous context manager `." +msgstr "" +"Similaire à :func:`~contextlib.contextmanager`, mais crée un :ref:" +"`gestionnaire de contexte asynchrone `." + +#: library/contextlib.rst:107 +msgid "" +"This function is a :term:`decorator` that can be used to define a factory " +"function for :keyword:`async with` statement asynchronous context managers, " +"without needing to create a class or separate :meth:`__aenter__` and :meth:" +"`__aexit__` methods. It must be applied to an :term:`asynchronous generator` " +"function." +msgstr "" +"Cette fonction est un :term:`decorator` qui peut être utilisé pour définir " +"une fonction fabriquant des gestionnaires de contexte asynchrones à utiliser " +"avec :keyword:`async with`, sans nécessiter de créer une classe ou des " +"méthodes :meth:`__aenter__` et :meth:`__aexit__` séparées. Le décorateur " +"doit être appliqué à une fonction renvoyant un :term:`asynchronous " +"generator`." + +#: library/contextlib.rst:113 +msgid "A simple example::" +msgstr "Un exemple simple ::" + +#: library/contextlib.rst:131 +msgid "" +"Context managers defined with :func:`asynccontextmanager` can be used either " +"as decorators or with :keyword:`async with` statements::" +msgstr "" +"Les gestionnaires de contexte définis avec :func:`asynccontextmanager` " +"peuvent s'utiliser comme décorateurs ou dans les instructions :keyword:" +"`async with` :" + +#: library/contextlib.rst:149 +msgid "" +"When used as a decorator, a new generator instance is implicitly created on " +"each function call. This allows the otherwise \"one-shot\" context managers " +"created by :func:`asynccontextmanager` to meet the requirement that context " +"managers support multiple invocations in order to be used as decorators." +msgstr "" + +#: library/contextlib.rst:154 +#, fuzzy +msgid "" +"Async context managers created with :func:`asynccontextmanager` can be used " +"as decorators." +msgstr "" +"Une classe mère qui permet à un gestionnaire de contexte d'être aussi " +"utilisé comme décorateur." + +#: library/contextlib.rst:161 +msgid "" +"Return a context manager that closes *thing* upon completion of the block. " +"This is basically equivalent to::" +msgstr "" +"Renvoie un gestionnaire de contexte qui ferme *thing* à la fin du bloc. " +"C'est essentiellement équivalent à ::" + +#: library/contextlib.rst:173 +msgid "And lets you write code like this::" +msgstr "Et cela vous permet d'écrire du code tel que ::" + +#: library/contextlib.rst:182 +msgid "" +"without needing to explicitly close ``page``. Even if an error occurs, " +"``page.close()`` will be called when the :keyword:`with` block is exited." +msgstr "" +"sans besoin de fermer explicitement ``page``. Même si une erreur survient, " +"``page.close()`` est appelée à la fermeture du bloc :keyword:`with`." + +#: library/contextlib.rst:188 +#, fuzzy +msgid "" +"Return an async context manager that calls the ``aclose()`` method of " +"*thing* upon completion of the block. This is basically equivalent to::" +msgstr "" +"Renvoie un gestionnaire de contexte qui ferme *thing* à la fin du bloc. " +"C'est essentiellement équivalent à ::" + +#: library/contextlib.rst:200 +msgid "" +"Significantly, ``aclosing()`` supports deterministic cleanup of async " +"generators when they happen to exit early by :keyword:`break` or an " +"exception. For example::" +msgstr "" + +#: library/contextlib.rst:211 +msgid "" +"This pattern ensures that the generator's async exit code is executed in the " +"same context as its iterations (so that exceptions and context variables " +"work as expected, and the exit code isn't run after the lifetime of some " +"task it depends on)." +msgstr "" + +#: library/contextlib.rst:223 +msgid "" +"Return a context manager that returns *enter_result* from ``__enter__``, but " +"otherwise does nothing. It is intended to be used as a stand-in for an " +"optional context manager, for example::" +msgstr "" +"Renvoie un gestionnaire de contexte dont la méthode ``__enter__`` renvoie " +"*enter_result*, mais ne fait rien d'autre. L'idée est de l'utiliser comme " +"remplaçant pour un gestionnaire de contexte optionnel, par exemple ::" + +#: library/contextlib.rst:237 +msgid "An example using *enter_result*::" +msgstr "Un exemple utilisant *enter_result* ::" + +#: library/contextlib.rst:250 +#, fuzzy +msgid "" +"It can also be used as a stand-in for :ref:`asynchronous context managers " +"`::" +msgstr "" +"Similaire à :func:`~contextlib.contextmanager`, mais crée un :ref:" +"`gestionnaire de contexte asynchrone `." + +#: library/contextlib.rst:266 +msgid ":term:`asynchronous context manager` support was added." +msgstr "" + +#: library/contextlib.rst:273 +#, fuzzy +msgid "" +"Return a context manager that suppresses any of the specified exceptions if " +"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:278 +msgid "" +"As with any other mechanism that completely suppresses exceptions, this " +"context manager should be used only to cover very specific errors where " +"silently continuing with program execution is known to be the right thing to " +"do." +msgstr "" +"Comme pour tous les mécanismes qui suppriment complètement les exceptions, " +"ce gestionnaire de contexte doit seulement être utilisé pour couvrir des cas " +"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:283 +msgid "For example::" +msgstr "Par exemple ::" + +#: library/contextlib.rst:293 +msgid "This code is equivalent to::" +msgstr "Ce code est équivalent à ::" + +#: library/contextlib.rst:345 library/contextlib.rst:355 +msgid "This context manager is :ref:`reentrant `." +msgstr "Ce gestionnaire de contexte est :ref:`réentrant `." + +#: library/contextlib.rst:312 +msgid "" +"Context manager for temporarily redirecting :data:`sys.stdout` to another " +"file or file-like object." +msgstr "" +"Gestionnaire de contexte servant à rediriger temporairement :data:`sys." +"stdout` vers un autre fichier ou objet fichier-compatible." + +#: library/contextlib.rst:315 +msgid "" +"This tool adds flexibility to existing functions or classes whose output is " +"hardwired to stdout." +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:318 +#, 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. 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:328 +msgid "" +"To send the output of :func:`help` to a file on disk, redirect the output to " +"a regular file::" +msgstr "" +"Pour envoyer la sortie de :func:`help` vers un fichier sur le disque, " +"redirigez-la sur un fichier normal ::" + +#: library/contextlib.rst:335 +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:340 +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 " +"applications. It also has no effect on the output of subprocesses. However, " +"it is still a useful approach for many utility scripts." +msgstr "" +"Notez que l'effet de bord global sur :data:`sys.stdout` signifie que ce " +"gestionnaire de contexte n'est pas adapté à une utilisation dans le code " +"d'une bibliothèque ni dans la plupart des applications à plusieurs fils " +"d'exécution. Aussi, cela n'a pas d'effet sur la sortie des sous-processus. " +"Cependant, cela reste une approche utile pour beaucoup de scripts " +"utilitaires." + +#: library/contextlib.rst:352 +msgid "" +"Similar to :func:`~contextlib.redirect_stdout` but redirecting :data:`sys." +"stderr` to another file or file-like object." +msgstr "" +"Similaire à :func:`~contextlib.redirect_stdout` mais redirige :data:`sys." +"stderr` vers un autre fichier ou objet fichier-compatible." + +#: library/contextlib.rst:362 +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:364 +msgid "" +"Context managers inheriting from ``ContextDecorator`` have to implement " +"``__enter__`` and ``__exit__`` as normal. ``__exit__`` retains its optional " +"exception handling even when used as a decorator." +msgstr "" +"Les gestionnaires de contexte héritant de ``ContextDecorator`` doivent " +"implémenter ``__enter__`` et ``__exit__`` comme habituellement. ``__exit__`` " +"conserve sa gestion optionnelle des exceptions même lors de l'utilisation en " +"décorateur." + +#: library/contextlib.rst:368 +msgid "" +"``ContextDecorator`` is used by :func:`contextmanager`, so you get this " +"functionality automatically." +msgstr "" +"``ContextDecorator`` est utilisé par :func:`contextmanager`, donc vous " +"bénéficiez automatiquement de cette fonctionnalité." + +#: library/contextlib.rst:371 +msgid "Example of ``ContextDecorator``::" +msgstr "Exemple de ``ContextDecorator`` ::" + +#: library/contextlib.rst:456 +msgid "The class can then be used like this::" +msgstr "" + +#: library/contextlib.rst:402 +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:408 +msgid "``ContextDecorator`` lets you instead write::" +msgstr "``ContextDecorator`` vous permet d'écrire à la place ::" + +#: library/contextlib.rst:414 +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)." +msgstr "" +"Cela éclaircit le fait que ``cm`` s'applique à la fonction entière, et pas " +"seulement à un morceau en particulier (et gagner un niveau d'indentation est " +"toujours appréciable)." + +#: library/contextlib.rst:417 +msgid "" +"Existing context managers that already have a base class can be extended by " +"using ``ContextDecorator`` as a mixin class::" +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:430 +msgid "" +"As the decorated function must be able to be called multiple times, the " +"underlying context manager must support use in multiple :keyword:`with` " +"statements. If this is not the case, then the original construct with the " +"explicit :keyword:`!with` statement inside the function should be used." +msgstr "" +"Comme la fonction décorée doit être capable d'être appelée plusieurs fois, " +"le gestionnaire de contexte sous-jacent doit permettre d'être utilisé dans " +"de multiples instructions :keyword:`with`. Si ce n'est pas le cas, alors la " +"construction d'origine avec de multiples instructions :keyword:`!with` au " +"sein de la fonction doit être utilisée." + +#: library/contextlib.rst:440 +#, fuzzy +msgid "" +"Similar to :class:`ContextDecorator` but only for asynchronous functions." +msgstr "" +"Similaire à :meth:`enter_context` mais attend un gestionnaire de contexte " +"asynchrone." + +#: library/contextlib.rst:442 +#, fuzzy +msgid "Example of ``AsyncContextDecorator``::" +msgstr "Exemple de ``ContextDecorator`` ::" + +#: library/contextlib.rst:481 +msgid "" +"A context manager that is designed to make it easy to programmatically " +"combine other context managers and cleanup functions, especially those that " +"are optional or otherwise driven by input data." +msgstr "" +"Gestionnaire de contexte conçu pour simplifier le fait de combiner " +"programmatiquement d'autres gestionnaires de contexte et fonctions de " +"nettoyage, spécifiquement ceux qui sont optionnels ou pilotés par des " +"données d'entrée." + +#: library/contextlib.rst:485 +msgid "" +"For example, a set of files may easily be handled in a single with statement " +"as follows::" +msgstr "" +"Par exemple, un ensemble de fichiers peut facilement être géré dans une " +"unique instruction *with* comme suit ::" + +#: library/contextlib.rst:494 +msgid "" +"The :meth:`__enter__` method returns the :class:`ExitStack` instance, and " +"performs no additional operations." +msgstr "" + +#: library/contextlib.rst:497 +msgid "" +"Each instance maintains a stack of registered callbacks that are called in " +"reverse order when the instance is closed (either explicitly or implicitly " +"at the end of a :keyword:`with` statement). Note that callbacks are *not* " +"invoked implicitly when the context stack instance is garbage collected." +msgstr "" +"Chaque instance maintient une pile de fonctions de rappels (*callbacks*) " +"enregistrées qui sont appelées en ordre inverse quand l'instance est fermée " +"(explicitement ou implicitement à la fin d'un bloc :keyword:`with`). Notez " +"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:502 +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 " +"correctly." +msgstr "" +"Ce modèle de pile est utilisé afin que les gestionnaires de contexte qui " +"acquièrent leurs ressources dans leur méthode ``__init__`` (tels que les " +"objets-fichiers) puissent être gérés correctement." + +#: library/contextlib.rst:506 +msgid "" +"Since registered callbacks are invoked in the reverse order of registration, " +"this ends up behaving as if multiple nested :keyword:`with` statements had " +"been used with the registered set of callbacks. This even extends to " +"exception handling - if an inner callback suppresses or replaces an " +"exception, then outer callbacks will be passed arguments based on that " +"updated state." +msgstr "" +"Comme les fonctions de rappel enregistrées sont invoquées dans l'ordre " +"inverse d'enregistrement, cela revient au même que si de multiples blocs :" +"keyword:`with` imbriqués avaient été utilisés avec l'ensemble de fonctions " +"enregistrées. Cela s'étend aussi à la gestion d'exceptions — si une fonction " +"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:513 +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 " +"foundation for higher level context managers that manipulate the exit stack " +"in application specific ways." +msgstr "" +"C'est une *API* relativement bas-niveau qui s'occupe de dérouler " +"correctement la pile des appels de sortie. Elle fournit une base adaptée " +"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:522 +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 :" +"meth:`__enter__` method." +msgstr "" +"Entre dans un nouveau gestionnaire de contexte et ajoute sa méthode :meth:" +"`__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:526 +msgid "" +"These context managers may suppress exceptions just as they normally would " +"if used directly as part of a :keyword:`with` statement." +msgstr "" +"Ces gestionnaires de contexte peuvent supprimer des exceptions comme ils le " +"feraient normalement s'ils étaient utilisés directement derrière une " +"instruction :keyword:`with`." + +#: library/contextlib.rst:531 +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:533 +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:" +"`__exit__` method." +msgstr "" +"Comme ``__enter__`` n'est *pas* invoquée, cette méthode peut être utilisée " +"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:537 +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__` " +"method and adds it directly to the callback stack." +msgstr "" +"Si l'argument passé n'est pas un gestionnaire de contexte, la méthode assume " +"qu'il s'agit d'une fonction de rappel avec la même signature que la méthode :" +"meth:`__exit__` des gestionnaires de contexte pour l'ajouter directement à " +"la pile d'appels." + +#: library/contextlib.rst:541 +msgid "" +"By returning true values, these callbacks can suppress exceptions the same " +"way context manager :meth:`__exit__` methods can." +msgstr "" +"En retournant des valeurs vraies, ces fonctions peuvent supprimer des " +"exceptions de la même manière que le peuvent les méthodes :meth:`__exit__` " +"des gestionnaires de contexte." + +#: library/contextlib.rst:544 +msgid "" +"The passed in object is returned from the function, allowing this method to " +"be used as a function decorator." +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:549 +msgid "" +"Accepts an arbitrary callback function and arguments and adds it to the " +"callback stack." +msgstr "" +"Accepte une fonction arbitraire et ses arguments et les ajoute à la pile des " +"fonctions de rappel." + +#: library/contextlib.rst:552 +msgid "" +"Unlike the other methods, callbacks added this way cannot suppress " +"exceptions (as they are never passed the exception details)." +msgstr "" +"À la différence des autres méthodes, les fonctions de rappel ajoutées de " +"cette manière ne peuvent pas supprimer les exceptions (puisqu'elles ne " +"reçoivent jamais les détails de l'exception)." + +#: library/contextlib.rst:555 +msgid "" +"The passed in callback is returned from the function, allowing this method " +"to be used as a function decorator." +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:560 +msgid "" +"Transfers the callback stack to a fresh :class:`ExitStack` instance and " +"returns it. No callbacks are invoked by this operation - instead, they will " +"now be invoked when the new stack is closed (either explicitly or implicitly " +"at the end of a :keyword:`with` statement)." +msgstr "" +"Transfère la pile d'appels à une nouvelle instance de :class:`ExitStack` et " +"la renvoie. Aucune fonction de rappel n'est invoquée par cette opération — à " +"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:565 +msgid "" +"For example, a group of files can be opened as an \"all or nothing\" " +"operation as follows::" +msgstr "" +"Par exemple, un groupe de fichiers peut être ouvert comme une opération " +"« tout ou rien » comme suit ::" + +#: library/contextlib.rst:579 +msgid "" +"Immediately unwinds the callback stack, invoking callbacks in the reverse " +"order of registration. For any context managers and exit callbacks " +"registered, the arguments passed in will indicate that no exception occurred." +msgstr "" +"Déroule immédiatement la pile d'appels, invoquant les fonctions de rappel " +"dans l'ordre inverse d'enregistrement. Pour chaque gestionnaire de contexte " +"et fonction de sortie enregistré, les arguments passés indiqueront qu'aucune " +"exception n'est survenue." + +#: library/contextlib.rst:586 +msgid "" +"An :ref:`asynchronous context manager `, similar to :" +"class:`ExitStack`, that supports combining both synchronous and asynchronous " +"context managers, as well as having coroutines for cleanup logic." +msgstr "" +"Un :ref:`gestionnaire de contexte asynchrone `, " +"similaire à :class:`ExitStack`, apte à combiner à la fois des gestionnaires " +"de contexte synchrones et asynchrones, ainsi que la gestion de coroutines " +"pour la logique de nettoyage." + +#: library/contextlib.rst:591 +msgid "" +"The :meth:`close` method is not implemented, :meth:`aclose` must be used " +"instead." +msgstr "" +"La méthode :meth:`close` n'est pas implémentée, :meth:`aclose` doit plutôt " +"être utilisée." + +#: library/contextlib.rst:596 +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:601 +msgid "" +"Similar to :meth:`push` but expects either an asynchronous context manager " +"or a coroutine function." +msgstr "" +"Similaire à :meth:`push` mais attend soit un gestionnaire de contexte " +"asynchrone soit une fonction coroutine." + +#: library/contextlib.rst:606 +msgid "Similar to :meth:`callback` but expects a coroutine function." +msgstr "Similaire à :meth:`callback` mais attend une fonction coroutine." + +#: library/contextlib.rst:610 +msgid "Similar to :meth:`close` but properly handles awaitables." +msgstr "" +"Similaire à :meth:`close` mais gère correctement les tâches asynchrones." + +#: library/contextlib.rst:612 +msgid "Continuing the example for :func:`asynccontextmanager`::" +msgstr "En continuité de l'exemple de :func:`asynccontextmanager` ::" + +#: library/contextlib.rst:624 +msgid "Examples and Recipes" +msgstr "Exemples et Recettes" + +#: library/contextlib.rst:626 +msgid "" +"This section describes some examples and recipes for making effective use of " +"the tools provided by :mod:`contextlib`." +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:631 +msgid "Supporting a variable number of context managers" +msgstr "Gérer un nombre variable de gestionnaires de contexte" + +#: library/contextlib.rst:633 +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 " +"cleanup operations in a single :keyword:`with` statement. The variability " +"may come from the number of context managers needed being driven by user " +"input (such as opening a user specified collection of files), or from some " +"of the context managers being optional::" +msgstr "" +"Le cas d'utilisation primaire de :class:`ExitStack` est celui décrit dans la " +"documentation de la classe : gérer un nombre variable de gestionnaires de " +"contexte et d'autres opérations de nettoyage en une unique instruction :" +"keyword:`with`. La variabilité peut venir du nombre de gestionnaires de " +"contexte voulus découlant d'une entrée de l'utilisateur (comme ouvrir une " +"collection spécifique de fichiers de l'utilisateur), ou de certains " +"gestionnaires de contexte qui peuvent être optionnels ::" + +#: library/contextlib.rst:648 +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 " +"context management protocol." +msgstr "" +"Comme montré, :class:`ExitStack` rend aussi assez facile d'utiliser les " +"instructions :keyword:`with` pour gérer des ressources arbitraires qui ne " +"gèrent pas nativement le protocole des gestionnaires de contexte." + +#: library/contextlib.rst:654 +msgid "Catching exceptions from ``__enter__`` methods" +msgstr "Attraper des exceptions depuis les méthodes ``__enter__``" + +#: library/contextlib.rst:656 +msgid "" +"It is occasionally desirable to catch exceptions from an ``__enter__`` " +"method implementation, *without* inadvertently catching exceptions from the :" +"keyword:`with` statement body or the context manager's ``__exit__`` method. " +"By using :class:`ExitStack` the steps in the context management protocol can " +"be separated slightly in order to allow this::" +msgstr "" +"Il est occasionnellement souhaitable d'attraper les exceptions depuis " +"l'implémentation d'une méthode ``__enter__``, *sans* attraper par " +"inadvertance les exceptions du corps de l'instruction :keyword:`with` ou de " +"la méthode ``__exit__`` des gestionnaires de contexte. En utilisant :class:" +"`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:671 +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 :" +"keyword:`try`/:keyword:`except`/:keyword:`finally` statements, but not all " +"APIs are well designed in that regard. When a context manager is the only " +"resource management API provided, then :class:`ExitStack` can make it easier " +"to handle various situations that can't be handled directly in a :keyword:" +"`with` statement." +msgstr "" +"Avoir à faire cela est en fait surtout utile pour indiquer que l'*API* sous-" +"jacente devrait fournir une interface directe de gestion des ressources à " +"utiliser avec les instructions :keyword:`try`/:keyword:`except`/:keyword:" +"`finally`, mais que toutes les *API* ne sont pas bien conçues dans cet " +"objectif. Quand un gestionnaire de contexte est la seule *API* de gestion " +"des ressources fournie, alors :class:`ExitStack` peut rendre plus facile la " +"gestion de plusieurs situations qui ne peuvent pas être traitées directement " +"dans une instruction :keyword:`with`." + +#: library/contextlib.rst:681 +msgid "Cleaning up in an ``__enter__`` implementation" +msgstr "Nettoyer dans une méthode ``__enter__``" + +#: library/contextlib.rst:683 +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 :" +"meth:`__enter__` implementation fail." +msgstr "" +"Comme indiqué dans la documentation de :meth:`ExitStack.push`, cette méthode " +"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:687 +msgid "" +"Here's an example of doing this for a context manager that accepts resource " +"acquisition and release functions, along with an optional validation " +"function, and maps them to the context management protocol::" +msgstr "" +"Voici un exemple de gestionnaire de contexte qui reçoit des fonctions " +"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:727 +msgid "Replacing any use of ``try-finally`` and flag variables" +msgstr "Remplacer un ``try-finally`` avec une option variable" + +#: library/contextlib.rst:729 +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 " +"should be executed. In its simplest form (that can't already be handled just " +"by using an ``except`` clause instead), it looks something like this::" +msgstr "" +"Un modèle que vous rencontrerez parfois est un bloc ``try-finally`` avec une " +"option pour indiquer si le corps de la clause ``finally`` doit être exécuté " +"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:743 +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 " +"up being separated by arbitrarily long sections of code." +msgstr "" +"Comme avec n'importe quel code basé sur une instruction ``try``, cela peut " +"poser problème pour le développement et la revue, parce que beaucoup de " +"codes d'installation et de nettoyage peuvent finir par être séparés par des " +"sections de code arbitrairement longues." + +#: library/contextlib.rst:747 +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 " +"executing that callback::" +msgstr "" +":class:`ExitStack` rend possible de plutôt enregistrer une fonction de " +"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:759 +msgid "" +"This allows the intended cleanup up behaviour to be made explicit up front, " +"rather than requiring a separate flag variable." +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:762 +msgid "" +"If a particular application uses this pattern a lot, it can be simplified " +"even further by means of a small helper class::" +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:780 +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:" +"`ExitStack.callback` to declare the resource cleanup in advance::" +msgstr "" +"Si le nettoyage de la ressource n'est pas déjà soigneusement embarqué dans " +"une fonction autonome, il est possible d'utiliser le décorateur :meth:" +"`ExitStack.callback` pour déclarer la fonction de nettoyage de ressource en " +"avance ::" + +#: library/contextlib.rst:795 +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 " +"must be accessed as closure variables." +msgstr "" +"Dû au fonctionnement du protocole des décorateurs, une fonction déclarée " +"ainsi ne peut prendre aucun paramètre. À la place, les ressources à libérer " +"doivent être récupérées depuis l'extérieur comme des variables de fermeture " +"(*closure*)." + +#: library/contextlib.rst:801 +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:803 +msgid "" +":class:`ContextDecorator` makes it possible to use a context manager in both " +"an ordinary ``with`` statement and also as a function decorator." +msgstr "" +":class:`ContextDecorator` rend possible l'utilisation d'un gestionnaire de " +"contexte à la fois ordinairement avec une instruction ``with`` ou comme un " +"décorateur de fonction." + +#: library/contextlib.rst:806 +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. " +"Rather than writing both a function decorator and a context manager for the " +"task, inheriting from :class:`ContextDecorator` provides both capabilities " +"in a single definition::" +msgstr "" +"Par exemple, il est parfois utile d'emballer les fonctions ou blocs " +"d'instructions avec un journaliseur qui pourrait suivre le temps d'exécution " +"entre l'entrée et la sortie. Plutôt qu'écrire à la fois un décorateur et un " +"gestionnaire de contexte pour la même tâche, hériter de :class:" +"`ContextDecorator` fournit les deux fonctionnalités en une seule " +"définition ::" + +#: library/contextlib.rst:827 +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:833 +msgid "And also as a function decorator::" +msgstr "Et comme décorateurs de fonctions ::" + +#: library/contextlib.rst:840 +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:" +"`__enter__`. If that value is needed, then it is still necessary to use an " +"explicit ``with`` statement." +msgstr "" +"Notez qu'il y a une autre limitation en utilisant les gestionnaires de " +"contexte comme décorateurs : il n'y a aucune manière d'accéder à la valeur " +"de retour de :meth:`__enter__`. Si cette valeur est nécessaire, il faut " +"utiliser explicitement une instruction ``with``." + +#: library/contextlib.rst:848 +msgid ":pep:`343` - The \"with\" statement" +msgstr ":pep:`343` - The \"with\" statement" + +#: library/contextlib.rst:848 +msgid "" +"The specification, background, and examples for the Python :keyword:`with` " +"statement." +msgstr "" +"La spécification, les motivations et des exemples de l'instruction :keyword:" +"`with` en Python." + +#: library/contextlib.rst:854 +msgid "Single use, reusable and reentrant context managers" +msgstr "Gestionnaires de contexte à usage unique, réutilisables et réentrants" + +#: library/contextlib.rst:856 +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 " +"managers must be created afresh each time they're used - attempting to use " +"them a second time will trigger an exception or otherwise not work correctly." +msgstr "" +"La plupart des gestionnaires de contexte sont écrits d'une manière qui ne " +"leur permet que d'être utilisés une fois avec une instruction :keyword:" +"`with`. Ces gestionnaires de contexte à usage unique doivent être recréés " +"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:862 +msgid "" +"This common limitation means that it is generally advisable to create " +"context managers directly in the header of the :keyword:`with` statement " +"where they are used (as shown in all of the usage examples above)." +msgstr "" +"Cette limitation commune signifie qu'il est généralement conseillé de créer " +"les gestionnaires de contexte directement dans l'en-tête du bloc :keyword:" +"`with` où ils sont utilisés (comme montré dans tous les exemples " +"d'utilisation au-dessus)." + +#: library/contextlib.rst:866 +msgid "" +"Files are an example of effectively single use context managers, since the " +"first :keyword:`with` statement will close the file, preventing any further " +"IO operations using that file object." +msgstr "" +"Les fichiers sont un exemple de gestionnaires de contexte étant " +"effectivement à usage unique, puisque la première instruction :keyword:" +"`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:870 +msgid "" +"Context managers created using :func:`contextmanager` are also single use " +"context managers, and will complain about the underlying generator failing " +"to yield if an attempt is made to use them a second time::" +msgstr "" +"Les gestionnaires de contexte créés avec :func:`contextmanager` sont aussi à " +"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:898 +msgid "Reentrant context managers" +msgstr "Gestionnaires de contexte réentrants" + +#: library/contextlib.rst:900 +msgid "" +"More sophisticated context managers may be \"reentrant\". These context " +"managers can not only be used in multiple :keyword:`with` statements, but " +"may also be used *inside* a :keyword:`!with` statement that is already using " +"the same context manager." +msgstr "" +"Certains gestionnaires de contexte plus sophistiqués peuvent être " +"« réentrants ». Ces gestionnaires de contexte ne peuvent pas seulement être " +"utilisés avec plusieurs instructions :keyword:`with`, mais aussi *à " +"l'intérieur* d'une instruction :keyword:`!with` qui utilise déjà ce même " +"gestionnaire de contexte." + +#: library/contextlib.rst:905 +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 " +"example of reentrant use::" +msgstr "" +":class:`threading.RLock` est un exemple de gestionnaire de contexte " +"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:924 +msgid "" +"Real world examples of reentrancy are more likely to involve multiple " +"functions calling each other and hence be far more complicated than this " +"example." +msgstr "" +"Les exemples plus réels de réentrance sont susceptibles d'invoquer plusieurs " +"fonctions s'entre-appelant, et donc être bien plus compliqués que cet " +"exemple." + +#: library/contextlib.rst:928 +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, " +"as it makes a global modification to the system state by binding :data:`sys." +"stdout` to a different stream." +msgstr "" +"Notez aussi qu'être réentrant ne signifie *pas* être *thread safe*. :func:" +"`redirect_stdout`, par exemple, n'est définitivement pas *thread safe*, " +"puisqu'il effectue des changements globaux sur l'état du système en " +"branchant :data:`sys.stdout` sur différents flux." + +#: library/contextlib.rst:937 +msgid "Reusable context managers" +msgstr "Gestionnaires de contexte réutilisables" + +#: library/contextlib.rst:939 +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." +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 " +"explicite, « réutilisables mais pas réentrants », puisque les gestionnaires " +"de contexte réentrants sont aussi réutilisables). Ces gestionnaires de " +"contexte sont conçus afin d'être utilisés plusieurs fois, mais échoueront " +"(ou ne fonctionnent pas correctement) si l'instance de gestionnaire de " +"contexte référencée a déjà été utilisée dans une instruction *with* " +"englobante." + +#: library/contextlib.rst:946 +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:" +"`threading.RLock` instead)." +msgstr "" +":class:`threading.Lock` est un exemple de gestionnaire de contexte " +"réutilisable mais pas réentrant (pour un verrou réentrant, il faut à la " +"place utiliser :class:`threading.RLock`)." + +#: library/contextlib.rst:950 +msgid "" +"Another example of a reusable, but not reentrant, context manager is :class:" +"`ExitStack`, as it invokes *all* currently registered callbacks when leaving " +"any with statement, regardless of where those callbacks were added::" +msgstr "" +"Un autre exemple de gestionnaire de contexte réutilisable mais pas réentrant " +"est :class:`ExitStack`, puisqu'il invoque *toutes* les fonctions de rappel " +"actuellement enregistrées en quittant l'instruction *with*, sans regarder où " +"ces fonctions ont été ajoutées ::" + +#: library/contextlib.rst:981 +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 " +"cause the stack to be cleared at the end of the innermost with statement, " +"which is unlikely to be desirable behaviour." +msgstr "" +"Comme le montre la sortie de l'exemple, réutiliser une simple pile entre " +"plusieurs instructions *with* fonctionne correctement, mais essayer de les " +"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:986 +msgid "" +"Using separate :class:`ExitStack` instances instead of reusing a single " +"instance avoids that problem::" +msgstr "" +"Pour éviter ce problème, utilisez des instances différentes de :class:" +"`ExitStack` plutôt qu'une seule instance ::" diff --git a/library/contextvars.po b/library/contextvars.po new file mode 100644 index 0000000000..49c1976c52 --- /dev/null +++ b/library/contextvars.po @@ -0,0 +1,355 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-22 22:57+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 ":mod:`contextvars` — Variables de contexte" + +#: library/contextvars.rst:11 +msgid "" +"This module provides APIs to manage, store, and access context-local state. " +"The :class:`~contextvars.ContextVar` class is used to declare and work with " +"*Context Variables*. The :func:`~contextvars.copy_context` function and " +"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 "" +"Context managers that have state should use Context Variables instead of :" +"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 "Voir aussi :pep:`567` pour plus de détails." + +#: library/contextvars.rst:27 +msgid "Context Variables" +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 "" +"The optional keyword-only *default* parameter is returned by :meth:" +"`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 "" +"**Important:** Context Variables should be created at the top module level " +"and never in closures. :class:`Context` objects hold strong references to " +"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 "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 "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 "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::" +msgstr "Par exemple ::" + +#: library/contextvars.rst:99 +msgid "" +"*Token* objects are returned by the :meth:`ContextVar.set` method. They can " +"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 +#, fuzzy +msgid "" +"A read-only property. Set to the value the variable had before the :meth:" +"`ContextVar.set` method call that created the token. It points to :attr:" +"`Token.MISSING` if 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 "Objet marqueur utilisé par :attr:`Token.old_value`." + +#: library/contextvars.rst:122 +msgid "Manual Context Management" +msgstr "Gestion de contexte manuelle" + +#: library/contextvars.rst:126 +msgid "Returns a copy of the current :class:`~contextvars.Context` object." +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 "" +"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: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: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: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:195 +msgid "Return a shallow copy of the context object." +msgstr "Renvoie une copie de surface de l'objet de contexte." + +#: 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: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: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: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:221 +msgid "Return the number of variables set in the context object." +msgstr "Renvoie le nombre de variables définies dans l'objet de contexte." + +#: library/contextvars.rst:225 +msgid "Return a list of all variables in the context object." +msgstr "Renvoie une liste de toutes les variables dans l'objet de contexte." + +#: 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: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:239 +msgid "asyncio support" +msgstr "Gestion avec *asyncio*" + +#: 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 new file mode 100644 index 0000000000..1647e32a8f --- /dev/null +++ b/library/copy.po @@ -0,0 +1,200 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-11-27 10:27+0100\n" +"PO-Revision-Date: 2019-02-21 17:18+0100\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.0.2\n" + +#: library/copy.rst:2 +msgid ":mod:`copy` --- Shallow and deep copy operations" +msgstr ":mod:`copy` — Opérations de copie superficielle et récursive" + +#: library/copy.rst:7 +msgid "**Source code:** :source:`Lib/copy.py`" +msgstr "**Code source :** :source:`Lib/copy.py`" + +#: library/copy.rst:11 +msgid "" +"Assignment statements in Python do not copy objects, they create bindings " +"between a target and an object. For collections that are mutable or contain " +"mutable items, a copy is sometimes needed so one can change one copy without " +"changing the other. This module provides generic shallow and deep copy " +"operations (explained below)." +msgstr "" +"Les instructions d'affectation en Python ne copient pas les objets, elles " +"créent des liens entre la cible et l'objet. Concernant les collections qui " +"sont muables ou contiennent des éléments muables, une copie est parfois " +"nécessaire, pour pouvoir modifier une copie sans modifier l'autre. Ce module " +"met à disposition des opérations de copie génériques superficielle et " +"récursive (comme expliqué ci-dessous)." + +#: library/copy.rst:18 +msgid "Interface summary:" +msgstr "Résumé de l'interface :" + +#: library/copy.rst:22 +msgid "Return a shallow copy of *x*." +msgstr "Renvoie une copie superficielle de *x*." + +#: library/copy.rst:27 +msgid "Return a deep copy of *x*." +msgstr "Renvoie une copie récursive de *x*." + +#: library/copy.rst:32 +msgid "Raised for module specific errors." +msgstr "Levée pour les erreurs spécifiques au module." + +#: library/copy.rst:36 +msgid "" +"The difference between shallow and deep copying is only relevant for " +"compound objects (objects that contain other objects, like lists or class " +"instances):" +msgstr "" +"La différence entre copie superficielle et récursive n'est pertinente que " +"pour les objets composés (objets contenant d'autres objets, comme des listes " +"ou des instances de classe) :" + +#: library/copy.rst:39 +msgid "" +"A *shallow copy* constructs a new compound object and then (to the extent " +"possible) inserts *references* into it to the objects found in the original." +msgstr "" +"Une *copie superficielle* construit un nouvel objet composé puis (dans la " +"mesure du possible) insère dans l'objet composé des *références* aux objets " +"trouvés dans l'original." + +#: library/copy.rst:42 +msgid "" +"A *deep copy* constructs a new compound object and then, recursively, " +"inserts *copies* into it of the objects found in the original." +msgstr "" +"Une *copie récursive (ou profonde)* construit un nouvel objet composé puis, " +"récursivement, insère dans l'objet composé des *copies* des objets trouvés " +"dans l'objet original." + +#: library/copy.rst:45 +msgid "" +"Two problems often exist with deep copy operations that don't exist with " +"shallow copy operations:" +msgstr "" +"On rencontre souvent deux problèmes avec les opérations de copie récursive " +"qui n'existent pas avec les opérations de copie superficielle :" + +#: library/copy.rst:48 +msgid "" +"Recursive objects (compound objects that, directly or indirectly, contain a " +"reference to themselves) may cause a recursive loop." +msgstr "" +"Les objets récursifs (objets composés qui, directement ou indirectement, " +"contiennent une référence à eux-mêmes) peuvent causer une boucle récursive." + +#: library/copy.rst:51 +msgid "" +"Because deep copy copies everything it may copy too much, such as data which " +"is intended to be shared between copies." +msgstr "" +"Comme une copie récursive copie tout, elle peut en copier trop, par exemple " +"des données qui sont destinées à être partagées entre différentes copies." + +#: library/copy.rst:54 +msgid "The :func:`deepcopy` function avoids these problems by:" +msgstr "La fonction :func:`deepcopy` évite ces problèmes en :" + +#: library/copy.rst:56 +msgid "" +"keeping a ``memo`` dictionary of objects already copied during the current " +"copying pass; and" +msgstr "" +"gardant en mémoire dans un dictionnaire ``memo`` les objets déjà copiés " +"durant la phase de copie actuelle ; et" + +#: library/copy.rst:59 +msgid "" +"letting user-defined classes override the copying operation or the set of " +"components copied." +msgstr "" +"laissant les classes créées par l'utilisateur écraser l'opération de copie " +"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, 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." +msgstr "" +"Ce module ne copie pas les types tels que module, méthode, trace d'appels, " +"cadre de pile, fichier, socket, fenêtre, tableau, ou tout autre type " +"similaire. Il \"copie\" les fonctions et les classes (superficiellement et " +"récursivement), en retournant l'objet original inchangé ; c'est compatible " +"avec la manière dont ils sont traités par le module :mod:`pickle`." + +#: library/copy.rst:67 +msgid "" +"Shallow copies of dictionaries can be made using :meth:`dict.copy`, and of " +"lists by assigning a slice of the entire list, for example, ``copied_list = " +"original_list[:]``." +msgstr "" +"Les copies superficielles de dictionnaires peuvent être faites en utilisant :" +"meth:`dict.copy`, et de listes en affectant un ``slice`` de la liste, par " +"exemple, ``copied_list = original_list[:]``." + +#: library/copy.rst:73 +msgid "" +"Classes can use the same interfaces to control copying that they use to " +"control pickling. See the description of module :mod:`pickle` for " +"information on these methods. In fact, the :mod:`copy` module uses the " +"registered pickle functions from the :mod:`copyreg` module." +msgstr "" +"Les classes peuvent utiliser les mêmes interfaces de contrôle que celles " +"utilisées pour la sérialisation. Voir la description du module :mod:`pickle` " +"pour plus d'informations sur ces méthodes. En effet, le module :mod:`copy` " +"utilise les fonctions de sérialisation enregistrées à partir du module :mod:" +"`copyreg`." + +#: library/copy.rst:82 +#, fuzzy +msgid "" +"In order for a class to define its own copy implementation, it can define " +"special methods :meth:`__copy__` and :meth:`__deepcopy__`. The former is " +"called to implement the shallow copy operation; no additional arguments are " +"passed. The latter is called to implement the deep copy operation; it is " +"passed one argument, the ``memo`` dictionary. If the :meth:`__deepcopy__` " +"implementation needs to make a deep copy of a component, it should call the :" +"func:`deepcopy` function with the component as first argument and the memo " +"dictionary as second argument. The memo dictionary should be treated as an " +"opaque object." +msgstr "" +"Afin qu'une classe définisse sa propre implémentation de copie, elle peut " +"définir les méthodes spéciales :meth:`__copy__` et :meth:`__deepcopy__`. La " +"première est appelée pour implémenter l'opération de copie superficielle ; " +"aucun argument supplémentaire n'est passé. La seconde est appelée pour " +"implémenter l'opération de copie récursive ; elle reçoit un argument, le " +"dictionnaire ``memo``. Si l'implémentation de :meth:`__deepcopy__` a besoin " +"de faire une copie récursive d'un composant, elle doit appeler la fonction :" +"func:`deepcopy` avec le composant comme premier argument et le dictionnaire " +"*memo* comme second argument." + +#: library/copy.rst:95 +msgid "Module :mod:`pickle`" +msgstr "Module :mod:`pickle`" + +#: library/copy.rst:95 +msgid "" +"Discussion of the special methods used to support object state retrieval and " +"restoration." +msgstr "" +"Discussion sur les méthodes spéciales utilisées pour gérer la récupération " +"et la restauration de l'état d'un objet." diff --git a/library/copyreg.po b/library/copyreg.po new file mode 100644 index 0000000000..bfd4b8a3cf --- /dev/null +++ b/library/copyreg.po @@ -0,0 +1,106 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-18 15:46+0200\n" +"PO-Revision-Date: 2018-11-23 15:14+0100\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\n" + +#: library/copyreg.rst:2 +msgid ":mod:`copyreg` --- Register :mod:`pickle` support functions" +msgstr ":mod:`copyreg` — Enregistre les fonctions support de :mod:`pickle`" + +#: library/copyreg.rst:7 +msgid "**Source code:** :source:`Lib/copyreg.py`" +msgstr "**Code source :** :source:`Lib/copyreg.py`" + +#: library/copyreg.rst:15 +msgid "" +"The :mod:`copyreg` module offers a way to define functions used while " +"pickling specific objects. The :mod:`pickle` and :mod:`copy` modules use " +"those functions when pickling/copying those objects. The module provides " +"configuration information about object constructors which are not classes. " +"Such constructors may be factory functions or class instances." +msgstr "" +"Le module :mod:`copyreg` permet de définir des fonctions utilisées durant la " +"sérialisation avec *pickle* de certains objets. Les modules :mod:`pickle` " +"et :mod:`copy` utilisent ces fonctions lors d'une sérialisation ou d'une " +"copie de ces objets. Le module propose alors des informations de " +"configuration à propos de constructeurs d'objets qui ne sont pas des " +"classes. De tels constructeurs peuvent être des instances de classes ou des " +"fonctions." + +#: library/copyreg.rst:24 +msgid "" +"Declares *object* to be a valid constructor. If *object* is not callable " +"(and hence not valid as a constructor), raises :exc:`TypeError`." +msgstr "" +"Déclare *object* comme étant un constructeur valide. Si *object* n'est pas " +"appelable (et n'est donc pas un constructeur valide), l'erreur :exc:" +"`TypeError` est levée." + +#: library/copyreg.rst:30 +#, fuzzy +msgid "" +"Declares that *function* should be used as a \"reduction\" function for " +"objects of type *type*. *function* should return either a string or a tuple " +"containing two or three elements. See the :attr:`~pickle.Pickler." +"dispatch_table` for more details on the interface of *function*." +msgstr "" +"Déclare que *function* devrait être utilisée en tant que fonction de " +"*réduction* pour des objets de type *type*. *function* doit soit renvoyer " +"une chaîne de caractères soit un *n*-uplet qui contient deux ou trois " +"éléments." + +#: library/copyreg.rst:35 +msgid "" +"The *constructor_ob* parameter is a legacy feature and is now ignored, but " +"if passed it must be a callable." +msgstr "" + +#: library/copyreg.rst:38 +#, fuzzy +msgid "" +"Note that the :attr:`~pickle.Pickler.dispatch_table` attribute of a pickler " +"object or subclass of :class:`pickle.Pickler` can also be used for declaring " +"reduction functions." +msgstr "" +"Voir le module :mod:`pickle` pour plus de détails sur l'interface attendue " +"de *function* et *constructor*. Notez que l’attribut :attr:`~pickle.Pickler." +"dispatch_table` d'un objet ``pickler`` ou d'une sous-classe de :class:" +"`pickle.Pickler` peut aussi être utilisée pour déclarer des fonctions " +"réductrices." + +#: library/copyreg.rst:43 +msgid "Example" +msgstr "Exemple" + +#: library/copyreg.rst:45 +msgid "" +"The example below would like to show how to register a pickle function and " +"how it will be used:" +msgstr "" +"L'exemple si-dessous essaye de démontrer comment enregistrer une fonction " +"*pickle* et comment elle sera utilisée :" + +#, 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. 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 *n*-uplet d'arguments renvoyés par *function* durant la " +#~ "sérialisation avec *pickle*. Une exception :exc:`TypeError` est levée si " +#~ "*object* est une classe ou si *constructor* n'est pas appelable." diff --git a/library/crypt.po b/library/crypt.po new file mode 100644 index 0000000000..b97f4e81b6 --- /dev/null +++ b/library/crypt.po @@ -0,0 +1,201 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-05-21 16:37+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \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" + +#: library/crypt.rst:2 +msgid ":mod:`crypt` --- Function to check Unix passwords" +msgstr "" + +#: library/crypt.rst:13 +#, fuzzy +msgid "**Source code:** :source:`Lib/crypt.py`" +msgstr "**Code source :** :source:`Lib/pty.py`" + +#: 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 " +"the Unix man page for further details. Possible uses include storing hashed " +"passwords so you can check passwords without storing the actual password, or " +"attempting to crack Unix passwords with a dictionary." +msgstr "" + +#: 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. " +"Therefore, any extensions available on the current implementation will also " +"be available on this module." +msgstr "" + +#: library/crypt.rst:40 +msgid ":ref:`Availability `: Unix. Not available on VxWorks." +msgstr "" + +#: library/crypt.rst:42 +msgid "Hashing Methods" +msgstr "" + +#: 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: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: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:61 +msgid "" +"Another Modular Crypt Format method with 22 character salt and 31 character " +"hash based on the Blowfish cipher." +msgstr "" + +#: 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:73 +msgid "" +"The traditional method with a 2 character salt and 13 characters of hash. " +"This is the weakest method." +msgstr "" + +#: library/crypt.rst:78 +msgid "Module Attributes" +msgstr "" + +#: 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:90 +msgid "Module Functions" +msgstr "" + +#: 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: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 available in :attr:`methods` will be used." +msgstr "" + +#: 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: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 " +"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$``." +msgstr "" + +#: 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: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:122 +msgid "Accept ``crypt.METHOD_*`` values in addition to strings for *salt*." +msgstr "" + +#: library/crypt.rst:128 +msgid "" +"Return a randomly generated salt of the specified method. If no *method* is " +"given, the strongest method available in :attr:`methods` is used." +msgstr "" + +#: 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:135 +msgid "" +"*rounds* specifies the number of rounds for ``METHOD_SHA256``, " +"``METHOD_SHA512`` and ``METHOD_BLOWFISH``. For ``METHOD_SHA256`` and " +"``METHOD_SHA512`` it must be an integer between ``1000`` and " +"``999_999_999``, the default is ``5000``. For ``METHOD_BLOWFISH`` it must " +"be a power of two between ``16`` (2\\ :sup:`4`) and ``2_147_483_648`` (2\\ :" +"sup:`31`), the default is ``4096`` (2\\ :sup:`12`)." +msgstr "" + +#: library/crypt.rst:145 +msgid "Added the *rounds* parameter." +msgstr "" + +#: library/crypt.rst:150 +msgid "Examples" +msgstr "Exemples" + +#: 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:172 +msgid "" +"To generate a hash of a password using the strongest available method and " +"check it against the original::" +msgstr "" + +#, fuzzy +#~ msgid "The :mod:`crypt` module is deprecated (see :pep:`594` for details)." +#~ msgstr "Le module :mod:`pty` expose les fonctions suivantes :" diff --git a/library/crypto.po b/library/crypto.po new file mode 100644 index 0000000000..a3309df9f0 --- /dev/null +++ b/library/crypto.po @@ -0,0 +1,31 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +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-02-15 00:42+0100\n" +"Last-Translator: FULL NAME \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" + +#: library/crypto.rst:5 +msgid "Cryptographic Services" +msgstr "Service de cryptographie" + +#: library/crypto.rst:9 +msgid "" +"The modules described in this chapter implement various algorithms of a " +"cryptographic nature. They are available at the discretion of the " +"installation. On Unix systems, the :mod:`crypt` module may also be " +"available. Here's an overview:" +msgstr "" +"Les modules décrits dans ce chapitre mettent en œuvre divers algorithmes " +"cryptographiques. Ils peuvent, ou pas, être disponibles, en fonction de " +"l'installation Sur les systèmes Unix, le module :mod:`crypt` peut aussi être " +"disponible. Voici une vue d'ensemble:" diff --git a/library/csv.po b/library/csv.po new file mode 100644 index 0000000000..cb00babdca --- /dev/null +++ b/library/csv.po @@ -0,0 +1,849 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-18 15:46+0200\n" +"PO-Revision-Date: 2022-05-20 10:21+0200\n" +"Last-Translator: Mathieu Dupuy \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 3.0.1\n" + +#: library/csv.rst:2 +msgid ":mod:`csv` --- CSV File Reading and Writing" +msgstr ":mod:`csv` — Lecture et écriture de fichiers CSV" + +#: library/csv.rst:9 +msgid "**Source code:** :source:`Lib/csv.py`" +msgstr "**Code source :** :source:`Lib/csv.py`" + +#: library/csv.rst:17 +msgid "" +"The so-called CSV (Comma Separated Values) format is the most common import " +"and export format for spreadsheets and databases. CSV format was used for " +"many years prior to attempts to describe the format in a standardized way " +"in :rfc:`4180`. The lack of a well-defined standard means that subtle " +"differences often exist in the data produced and consumed by different " +"applications. These differences can make it annoying to process CSV files " +"from multiple sources. Still, while the delimiters and quoting characters " +"vary, the overall format is similar enough that it is possible to write a " +"single module which can efficiently manipulate such data, hiding the details " +"of reading and writing the data from the programmer." +msgstr "" +"Le format CSV (*Comma Separated Values*, valeurs séparées par des virgules) " +"est le format le plus commun dans l'importation et l'exportation de feuilles " +"de calculs et de bases de données. Le format fut utilisé pendant des années " +"avant qu'aient lieu des tentatives de standardisation avec la :rfc:`4180`. " +"L'absence de format bien défini signifie que des différences subtiles " +"existent dans la production et la consommation de données par différentes " +"applications. Ces différences peuvent gêner lors du traitement de fichiers " +"CSV depuis des sources multiples. Cependant, bien que les séparateurs et " +"délimiteurs varient, le format global est suffisamment similaire pour qu'un " +"module unique puisse manipuler efficacement ces données, masquant au " +"programmeur les détails de lecture/écriture des données." + +#: library/csv.rst:28 +msgid "" +"The :mod:`csv` module implements classes to read and write tabular data in " +"CSV format. It allows programmers to say, \"write this data in the format " +"preferred by Excel,\" or \"read data from this file which was generated by " +"Excel,\" without knowing the precise details of the CSV format used by " +"Excel. Programmers can also describe the CSV formats understood by other " +"applications or define their own special-purpose CSV formats." +msgstr "" +"Le module :mod:`csv` implémente des classes pour lire et écrire des données " +"tabulaires au format CSV. Il vous permet de dire « écris ces données dans " +"le format préféré par Excel » ou « lis les données de ce fichier généré par " +"Excel », sans connaître les détails précis du format CSV utilisé par Excel. " +"Vous pouvez aussi décrire les formats CSV utilisés par d'autres applications " +"ou définir vos propres spécialisations." + +#: library/csv.rst:35 +msgid "" +"The :mod:`csv` module's :class:`reader` and :class:`writer` objects read and " +"write sequences. Programmers can also read and write data in dictionary " +"form using the :class:`DictReader` and :class:`DictWriter` classes." +msgstr "" +"Les objets :class:`reader` et :class:`writer` du module :mod:`csv` lisent et " +"écrivent des séquences. Vous pouvez aussi lire/écrire les données dans un " +"dictionnaire en utilisant les classes :class:`DictReader` et :class:" +"`DictWriter`." + +#: library/csv.rst:41 +msgid ":pep:`305` - CSV File API" +msgstr ":pep:`305` ­— Interface des fichiers CSV" + +#: library/csv.rst:42 +msgid "The Python Enhancement Proposal which proposed this addition to Python." +msgstr "" +"La proposition d'amélioration de Python (PEP) qui a proposé cet ajout au " +"langage." + +#: library/csv.rst:48 +msgid "Module Contents" +msgstr "Contenu du module" + +#: library/csv.rst:50 +msgid "The :mod:`csv` module defines the following functions:" +msgstr "Le module :mod:`csv` définit les fonctions suivantes :" + +#: library/csv.rst:58 +msgid "" +"Return a reader object which will iterate over lines in the given *csvfile*. " +"*csvfile* can be any object which supports the :term:`iterator` protocol and " +"returns a string each time its :meth:`!__next__` method is called --- :term:" +"`file objects ` and list objects are both suitable. If " +"*csvfile* is a file object, it should be opened with ``newline=''``. [1]_ " +"An optional *dialect* parameter can be given which is used to define a set " +"of parameters specific to a particular CSV dialect. It may be an instance " +"of a subclass of the :class:`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`." +msgstr "" +"Renvoie un objet lecteur, qui itérera sur les lignes de l'objet *csvfile* " +"donné. *csvfile* peut être n'importe quel objet supportant le protocole :" +"term:`itérateur ` et renvoyant une chaîne de caractères chaque " +"fois que sa méthode :meth:`!__next__` est appelée — les :term:`fichiers " +"objets ` et les listes sont tous deux valables. 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 utilisé. Pour des détails complets " +"sur les dialectes et paramètres de formatage, voir la section :ref:`csv-fmt-" +"params`." + +#: library/csv.rst:71 +msgid "" +"Each row read from the csv file is returned as a list of strings. No " +"automatic data type conversion is performed unless the ``QUOTE_NONNUMERIC`` " +"format option is specified (in which case unquoted fields are transformed " +"into floats)." +msgstr "" +"Chaque ligne lue depuis le fichier CSV est renvoyée comme une liste de " +"chaînes de caractères. Aucune conversion automatique de type des données " +"n'est effectuée à moins que l'option de formatage ``QUOTE_NONNUMERIC`` soit " +"spécifiée (dans ce cas, les champs sans guillemets sont transformés en " +"nombres flottants)." + +#: library/csv.rst:105 library/csv.rst:212 +msgid "A short usage example::" +msgstr "Un court exemple d'utilisation ::" + +#: library/csv.rst:88 +msgid "" +"Return a writer object responsible for converting the user's data into " +"delimited strings on the given file-like object. *csvfile* can be any " +"object with a :func:`write` method. If *csvfile* is a file object, it " +"should be opened with ``newline=''`` [1]_. An optional *dialect* parameter " +"can be given which is used to define a set of parameters specific to a " +"particular CSV dialect. It may be an instance of a subclass of the :class:" +"`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 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 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 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 tous les " +"détails sur les dialectes et paramètres de formatage, voir la section :ref:" +"`csv-fmt-params`." + +#: library/csv.rst:126 +msgid "" +"Delete the dialect associated with *name* from the dialect registry. An :" +"exc:`Error` is raised if *name* is not a registered dialect name." +msgstr "" +"Supprime le dialecte associé à *name* depuis le registre des dialectes. " +"Une :exc:`Error` est levée si *name* n'est pas un nom de dialecte enregistré." + +#: library/csv.rst:132 +msgid "" +"Return the dialect associated with *name*. An :exc:`Error` is raised if " +"*name* is not a registered dialect name. This function returns an " +"immutable :class:`Dialect`." +msgstr "" +"Renvoie le dialecte associé à *name*. Une :exc:`Error` est levée si *name* " +"n'est pas un nom de dialecte enregistré. Cette fonction renvoie un objet :" +"class:`Dialect` immuable." + +#: library/csv.rst:138 +msgid "Return the names of all registered dialects." +msgstr "Renvoie les noms de tous les dialectes enregistrés." + +#: library/csv.rst:143 +msgid "" +"Returns the current maximum field size allowed by the parser. If *new_limit* " +"is given, this becomes the new limit." +msgstr "" +"Renvoie la taille de champ maximale actuelle autorisée par l'analyseur. Si " +"*new_limit* est donnée, elle devient la nouvelle limite." + +#: library/csv.rst:147 +msgid "The :mod:`csv` module defines the following classes:" +msgstr "Le module :mod:`csv` définit les classes suivantes :" + +#: library/csv.rst:152 +msgid "" +"Create an object that operates like a regular reader but maps the " +"information in each row to a :class:`dict` whose keys are given by the " +"optional *fieldnames* parameter." +msgstr "" +"Crée un objet qui opère comme un lecteur ordinaire mais assemble les " +"informations de chaque ligne dans un :class:`dict` dont les clés sont " +"données par le paramètre optionnel *fieldnames*." + +#: library/csv.rst:156 +msgid "" +"The *fieldnames* parameter is a :term:`sequence`. If *fieldnames* is " +"omitted, the values in the first row of file *f* will be used as the " +"fieldnames. Regardless of how the fieldnames are determined, the dictionary " +"preserves their original ordering." +msgstr "" +"Le paramètre *fieldnames* est une :term:`séquence `. Si " +"*fieldnames* est omis, les valeurs de la première ligne du fichier *f* sont " +"utilisées comme noms de champs. Sans se soucier de comment sont déterminés " +"les noms de champs, le dictionnaire préserve leur ordre original." + +#: library/csv.rst:161 +msgid "" +"If a row has more fields than fieldnames, the remaining data is put in a " +"list and stored with the fieldname specified by *restkey* (which defaults to " +"``None``). If a non-blank row has fewer fields than fieldnames, the missing " +"values are filled-in with the value of *restval* (which defaults to " +"``None``)." +msgstr "" +"Si une ligne a plus de champs que *fieldnames*, les données excédentaires " +"sont mises dans une liste stockée dans le champ spécifié par *restkey* " +"(``None`` par défaut). Si une ligne non-vide a moins de champs que " +"*fieldnames*, les valeurs manquantes sont remplacées par la valeur de " +"*restval* (``None`` par défaut)." + +#: library/csv.rst:167 +msgid "" +"All other optional or keyword arguments are passed to the underlying :class:" +"`reader` instance." +msgstr "" +"Tous les autres arguments optionnels ou nommés sont passés à l'instance :" +"class:`reader` sous-jacente." + +#: library/csv.rst:170 +msgid "Returned rows are now of type :class:`OrderedDict`." +msgstr "Les lignes renvoyées sont maintenant de type :class:`OrderedDict`." + +#: library/csv.rst:173 +msgid "Returned rows are now of type :class:`dict`." +msgstr "Les lignes renvoyées sont maintenant de type :class:`dict`." + +#: library/csv.rst:194 +msgid "" +"Create an object which operates like a regular writer but maps dictionaries " +"onto output rows. The *fieldnames* parameter is a :mod:`sequence " +"` of keys that identify the order in which values in the " +"dictionary passed to the :meth:`writerow` method are written to file *f*. " +"The optional *restval* parameter specifies the value to be written if the " +"dictionary is missing a key in *fieldnames*. If the dictionary passed to " +"the :meth:`writerow` method contains a key not found in *fieldnames*, the " +"optional *extrasaction* parameter indicates what action to take. If it is " +"set to ``'raise'``, the default value, a :exc:`ValueError` is raised. If it " +"is set to ``'ignore'``, extra values in the dictionary are ignored. Any " +"other optional or keyword arguments are passed to the underlying :class:" +"`writer` instance." +msgstr "" +"Crée un objet qui opère comme un transcripteur ordinaire mais qui produit " +"les lignes de sortie depuis des dictionnaires. Le paramètre *fieldnames* " +"est une :mod:`séquence ` de clés qui indique l'ordre dans " +"lequel les valeurs du dictionnaire passé à la méthode :meth:`writerow` " +"doivent être écrites vers le fichier *f*. Le paramètre optionnel *restval* " +"spécifie la valeur à écrire si une clé de *fieldnames* manque dans le " +"dictionnaire. Si le dictionnaire passé à :meth:`writerow` possède une clé " +"non présente dans *fieldnames*, le paramètre optionnel *extrasaction* " +"indique quelle action réaliser. S'il vaut ``'raise'``, sa valeur par défaut, " +"une :exc:`ValueError` est levée. S'il vaut ``'ignore'``, les valeurs " +"excédentaires du dictionnaire sont ignorées. Les autres arguments optionnels " +"ou nommés sont passés à l'instance :class:`writer` sous-jacente." + +#: library/csv.rst:209 +msgid "" +"Note that unlike the :class:`DictReader` class, the *fieldnames* parameter " +"of the :class:`DictWriter` class is not optional." +msgstr "" +"Notez que contrairement à la classe :class:`DictReader`, le paramètre " +"*fieldnames* de :class:`DictWriter` n'est pas optionnel." + +#: library/csv.rst:228 +msgid "" +"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 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: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'``." +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: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 " +"``'excel-tab'``." +msgstr "" +"La classe :class:`excel_tab` définit les propriétés usuelles d'un fichier " +"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: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 " +"quoting all fields. It is registered with the dialect name ``'unix'``." +msgstr "" +"La classe :class:`unix_dialect` définit les propriétés usuelles d'un fichier " +"CSV généré sur un système Unix, c'est-à-dire utilisant ``'\\n'`` comme " +"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: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:270 +msgid "The :class:`Sniffer` class provides two methods:" +msgstr "La classe :class:`Sniffer` fournit deux méthodes :" + +#: 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 " +"is interpreted as a string containing possible valid delimiter characters." +msgstr "" +"Analyse l'extrait donné (*sample*) et renvoie une sous-classe :class:" +"`Dialect` reflétant les paramètres trouvés. Si le paramètre optionnel " +"*delimiters* est donné, il est interprété comme une chaîne contenant tous " +"les caractères valides de séparation possibles." + +#: 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. Inspecting " +"each column, one of two key criteria will be considered to estimate if the " +"sample contains a header:" +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. En " +"inspectant chaque colonne, l’un des deux critères clés sera pris en compte " +"pour estimer si l’échantillon contient un en-tête :" + +#: library/csv.rst:287 +msgid "the second through n-th rows contain numeric values" +msgstr "les deuxième à n-ième lignes contiennent des valeurs numériques" + +#: library/csv.rst:288 +msgid "" +"the second through n-th rows contain strings where at least one value's " +"length differs from that of the putative header of that column." +msgstr "" +"les deuxième à n-ième lignes contiennent des chaînes dont la longueur d’au " +"moins une valeur diffère de celle de l’en-tête putatif de cette colonne." + +#: library/csv.rst:291 +msgid "" +"Twenty rows after the first row are sampled; if more than half of columns + " +"rows meet the criteria, :const:`True` is returned." +msgstr "" +"L'échantillon est composé des vingt lignes après la première ligne ; si plus " +"de la moitié des colonnes + lignes répondent aux critères, :const:`True` est " +"renvoyé." + +#: library/csv.rst:296 +msgid "" +"This method is a rough heuristic and may produce both false positives and " +"negatives." +msgstr "" +"Cette méthode est une heuristique discutable et peut produire tant des faux-" +"positifs que des faux-négatifs." + +#: library/csv.rst:299 +msgid "An example for :class:`Sniffer` use::" +msgstr "Un exemple d'utilisation de :class:`Sniffer` ::" + +#: library/csv.rst:308 +msgid "The :mod:`csv` module defines the following constants:" +msgstr "Le module :mod:`csv` définit les constantes suivantes :" + +#: library/csv.rst:312 +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:317 +msgid "" +"Instructs :class:`writer` objects to only quote those fields which contain " +"special characters such as *delimiter*, *quotechar* or any of the characters " +"in *lineterminator*." +msgstr "" +"Indique aux objets :class:`writer` de ne délimiter ainsi que les champs " +"contenant un caractère spécial comme *delimiter*, *quotechar* ou n'importe " +"quel caractère de *lineterminator*." + +#: library/csv.rst:324 +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:326 +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:331 +msgid "" +"Instructs :class:`writer` objects to never quote fields. When the current " +"*delimiter* occurs in output data it is preceded by the current *escapechar* " +"character. If *escapechar* is not set, the writer will raise :exc:`Error` " +"if any characters that require escaping are encountered." +msgstr "" +"Indique aux objets :class:`writer` de ne jamais délimiter les champs par des " +"guillemets. Quand le *delimiter* utilisé apparaît dans les données, il est " +"précédé sur la sortie par un caractère *escapechar*. Si *escapechar* n'est " +"pas précisé, le transcripteur lèvera une :exc:`Error` si un caractère " +"nécessitant un échappement est rencontré." + +#: library/csv.rst:336 +msgid "" +"Instructs :class:`reader` to perform no special processing of quote " +"characters." +msgstr "" +"Indique au :class:`reader` de ne pas opérer de traitement spécial sur les " +"guillemets." + +#: library/csv.rst:338 +msgid "The :mod:`csv` module defines the following exception:" +msgstr "Le module :mod:`csv` définit les exceptions suivantes :" + +#: library/csv.rst:343 +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:348 +msgid "Dialects and Formatting Parameters" +msgstr "Dialectes et paramètres de formatage" + +#: library/csv.rst:350 +msgid "" +"To make it easier to specify the format of input and output records, " +"specific formatting parameters are grouped together into dialects. A " +"dialect is a subclass of the :class:`Dialect` class having a set of specific " +"methods and a single :meth:`validate` method. When creating :class:`reader` " +"or :class:`writer` objects, the programmer can specify a string or a " +"subclass of the :class:`Dialect` class as the dialect parameter. In " +"addition to, or instead of, the *dialect* parameter, the programmer can also " +"specify individual formatting parameters, which have the same names as the " +"attributes defined below for the :class:`Dialect` class." +msgstr "" +"Pour faciliter la spécification du format des entrées et sorties, les " +"paramètres de formatage spécifiques sont regroupés en dialectes. Un " +"dialecte est une sous-classe de :class:`Dialect` avec un ensemble de " +"méthodes spécifiques et une méthode :meth:`validate`. Quand un objet :class:" +"`reader` ou :class:`writer` est créé, vous pouvez spécifier une chaîne ou " +"une sous-classe de :class:`Dialect` comme paramètre *dialect*. En plus du " +"paramètre *dialect*, ou à sa place, vous pouvez aussi préciser des " +"paramètres de formatage individuels, qui ont les mêmes noms que les " +"attributs de :class:`Dialect` définis ci-dessous." + +#: library/csv.rst:360 +msgid "Dialects support the following attributes:" +msgstr "Les dialectes supportent les attributs suivants :" + +#: library/csv.rst:365 +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:370 +msgid "" +"Controls how instances of *quotechar* appearing inside a field should " +"themselves be quoted. When :const:`True`, the character is doubled. When :" +"const:`False`, the *escapechar* is used as a prefix to the *quotechar*. It " +"defaults to :const:`True`." +msgstr "" +"Contrôle comment les caractères *quotechar* dans le champ doivent être " +"retranscrits. Quand ce paramètre vaut :const:`True`, le caractère est " +"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:375 +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." +msgstr "" +"En écriture, si *doublequote* vaut :const:`False` et qu'aucun *escapechar* " +"n'est précisé, une :exc:`Error` est levée si un *quotechar* est trouvé dans " +"le champ." + +#: library/csv.rst:381 +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* " +"is :const:`False`. On reading, the *escapechar* removes any special meaning " +"from the following character. It defaults to :const:`None`, which disables " +"escaping." +msgstr "" +"Une chaîne d'un seul caractère utilisée par le transcripteur pour échapper " +"*delimiter* si *quoting* vaut :const:`QUOTE_NONE`, et pour échapper " +"*quotechar* si *doublequote* vaut :const:`False`. À la lecture, *escapechar* " +"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:389 +msgid "" +"The string used to terminate lines produced by the :class:`writer`. It " +"defaults to ``'\\r\\n'``." +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:394 +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 " +"the future." +msgstr "" +"La classe :class:`reader` est codée en dur pour reconnaître ``'\\r'`` et " +"``'\\n'`` comme marqueurs de fin de ligne, et ignorer *lineterminator*. Ce " +"comportement pourrait changer dans le futur." + +#: library/csv.rst:401 +msgid "" +"A one-character string used to quote fields containing special characters, " +"such as the *delimiter* or *quotechar*, or which contain new-line " +"characters. It defaults to ``'\"'``." +msgstr "" +"Une chaîne d'un seul caractère utilisée pour délimiter les champs contenant " +"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:408 +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 " +"section :ref:`csv-contents`) and defaults to :const:`QUOTE_MINIMAL`." +msgstr "" +"Contrôle quand les guillemets doivent être générés par le transcripteur et " +"reconnus par le lecteur. Il peut prendre comme valeur l'une des constantes :" +"const:`QUOTE_\\*` (voir la section :ref:`csv-contents`) et vaut par défaut :" +"const:`QUOTE_MINIMAL`." + +#: library/csv.rst:415 +#, fuzzy +msgid "" +"When :const:`True`, spaces immediately following the *delimiter* are " +"ignored. The default is :const:`False`." +msgstr "" +"Quand il vaut :const:`True`, les espaces suivant directement *delimiter* " +"sont ignorés. Il vaut :const:`False` par défaut." + +#: library/csv.rst:421 +msgid "" +"When ``True``, raise exception :exc:`Error` on bad CSV input. The default is " +"``False``." +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:425 +msgid "Reader Objects" +msgstr "Objets lecteurs" + +#: library/csv.rst:427 +msgid "" +"Reader objects (:class:`DictReader` instances and objects returned by the :" +"func:`reader` function) have the following public methods:" +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:432 +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 :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 la classe :class:`Dialect` " +"utilisée. Généralement, vous devez appeler la méthode à l'aide de " +"``next(reader)``." + +#: library/csv.rst:438 +msgid "Reader objects have the following public attributes:" +msgstr "Les objets lecteurs ont les attributs publics suivants :" + +#: library/csv.rst:442 +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:447 +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." +msgstr "" +"Le nombre de lignes lues depuis l'itérateur source. Ce n'est pas équivalent " +"au nombre d'enregistrements renvoyés, puisque certains enregistrements " +"peuvent s'étendre sur plusieurs lignes." + +#: library/csv.rst:451 +msgid "DictReader objects have the following public attribute:" +msgstr "Les objets *DictReader* ont les attributs publics suivants :" + +#: library/csv.rst:455 +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." +msgstr "" +"S'il n'est pas passé comme paramètre à la création de l'objet, cet attribut " +"est initialisé lors du premier accès ou quand le premier enregistrement est " +"lu depuis le fichier." + +#: library/csv.rst:462 +msgid "Writer Objects" +msgstr "Objets transcripteurs" + +#: library/csv.rst:464 +msgid "" +":class:`Writer` objects (:class:`DictWriter` instances and objects returned " +"by the :func:`writer` function) have the following public methods. A *row* " +"must be an iterable of strings or numbers for :class:`Writer` objects and a " +"dictionary mapping fieldnames to strings or numbers (by passing them " +"through :func:`str` first) for :class:`DictWriter` objects. Note that " +"complex numbers are written out surrounded by parens. This may cause some " +"problems for other programs which read CSV files (assuming they support " +"complex numbers at all)." +msgstr "" +"Les objets :class:`Writer` (instances de :class:`DictWriter` ou objets " +"renvoyés par la fonction :func:`writer`) ont les méthodes publiques " +"suivantes. Une *row* doit être un itérable de chaînes de caractères ou de " +"nombres pour les objets :class:`Writer`, et un dictionnaire associant des " +"noms de champs à des chaînes ou des nombres (en les faisant d'abord passer " +"par :func:`str`) pour les objets :class:`DictWriter`. Notez que les nombres " +"complexes sont retranscrits entourés de parenthèses. Cela peut causer " +"quelques problèmes pour d'autres programmes qui liraient ces fichiers CSV " +"(en supposant qu'ils supportent les nombres complexes)." + +#: library/csv.rst:475 +msgid "" +"Write the *row* parameter to the writer's file object, formatted according " +"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 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:479 +msgid "Added support of arbitrary iterables." +msgstr "Ajout du support d'itérables arbitraires." + +#: library/csv.rst:484 +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 " +"dialect." +msgstr "" +"Écrit tous les éléments de *rows* (itérable d'objets *row* comme décrits " +"précédemment) vers le fichier associé au transcripteur, formatés selon le " +"dialecte utilisé." + +#: library/csv.rst:488 +msgid "Writer objects have the following public attribute:" +msgstr "Les objets transcripteurs ont l’attribut public suivant :" + +#: library/csv.rst:493 +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:496 +msgid "DictWriter objects have the following public method:" +msgstr "Les objets *DictWriter* ont la méthode publique suivante :" + +#: library/csv.rst:501 +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 " +"return value of the :meth:`csvwriter.writerow` call used internally." +msgstr "" +"Écrit une ligne avec le nom des en-têtes (comme définies dans le " +"constructeur) dans l'objet fichier associé au transcripteur, formatée selon " +"le dialecte utilisé. Renvoie la valeur de retour de l'appel :meth:`csvwriter." +"writerow` utilisé en interne." + +#: library/csv.rst:506 +msgid "" +":meth:`writeheader` now also returns the value returned by the :meth:" +"`csvwriter.writerow` method it uses internally." +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:514 +msgid "Examples" +msgstr "Exemples" + +#: library/csv.rst:516 +msgid "The simplest example of reading a CSV file::" +msgstr "Le plus simple exemple de lecture d'un fichier CSV ::" + +#: library/csv.rst:524 +msgid "Reading a file with an alternate format::" +msgstr "Lire un fichier avec un format alternatif ::" + +#: library/csv.rst:532 +msgid "The corresponding simplest possible writing example is::" +msgstr "Le plus simple exemple d'écriture correspondant est ::" + +#: library/csv.rst:539 +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:" +"`locale.getpreferredencoding`). To decode a file using a different " +"encoding, use the ``encoding`` argument of open::" +msgstr "" +"Puisque :func:`open` est utilisée pour ouvrir un fichier CSV en lecture, le " +"fichier sera par défaut décodé vers Unicode en utilisant l'encodage par " +"défaut (voir :func:`locale.getpreferredencoding`). Pour décoder un fichier " +"utilisant un encodage différent, utilisez l'argument ``encoding`` de " +"*open* ::" + +#: library/csv.rst:550 +msgid "" +"The same applies to writing in something other than the system default " +"encoding: specify the encoding argument when opening the output file." +msgstr "" +"Cela s’applique également lors de l'écriture dans un autre encodage que " +"celui par défaut du système : spécifiez l'encodage en argument lors de " +"l'ouverture du fichier de sortie." + +#: library/csv.rst:553 +msgid "Registering a new dialect::" +msgstr "Enregistrer un nouveau dialecte ::" + +#: library/csv.rst:560 +msgid "" +"A slightly more advanced use of the reader --- catching and reporting " +"errors::" +msgstr "" +"Un exemple d'utilisation un peu plus avancé du lecteur --- attrapant et " +"notifiant les erreurs ::" + +#: library/csv.rst:572 +msgid "" +"And while the module doesn't directly support parsing strings, it can easily " +"be done::" +msgstr "" +"Et bien que le module ne permette pas d'analyser directement des chaînes, " +"cela peut être fait facilement ::" + +#: library/csv.rst:581 +msgid "Footnotes" +msgstr "Notes" + +#: library/csv.rst:582 +msgid "" +"If ``newline=''`` is not specified, newlines embedded inside quoted fields " +"will not be interpreted correctly, and on platforms that use ``\\r\\n`` " +"linendings on write an extra ``\\r`` will be added. It should always be " +"safe to specify ``newline=''``, since the csv module does its own (:term:" +"`universal `) newline handling." +msgstr "" +"Si ``newline=''`` n'est pas précisé, les caractères de fin de ligne " +"embarqués dans des champs délimités par des guillemets ne seront pas " +"interprétés correctement, et sur les plateformes qui utilisent ``\\r\\n`` " +"comme marqueur de fin de ligne, un ``\\r`` sera ajouté. Il devrait toujours " +"être sûr de préciser ``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 new file mode 100644 index 0000000000..b7b1972b00 --- /dev/null +++ b/library/ctypes.po @@ -0,0 +1,3408 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-22 22:57+0100\n" +"PO-Revision-Date: 2021-11-09 08:06+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" + +#: library/ctypes.rst:2 +msgid ":mod:`ctypes` --- A foreign function library for Python" +msgstr ":mod:`ctypes` — Bibliothèque Python d'appels à des fonctions externes" + +#: library/ctypes.rst:9 +msgid "**Source code:** :source:`Lib/ctypes`" +msgstr "" + +#: library/ctypes.rst:13 +msgid "" +":mod:`ctypes` is a foreign function library for Python. It provides C " +"compatible data types, and allows calling functions in DLLs or shared " +"libraries. It can be used to wrap these libraries in pure Python." +msgstr "" +":mod:`ctypes` est une bibliothèque d'appel à des fonctions externes en " +"python. Elle fournit des types de données compatibles avec le langage C et " +"permet d'appeler des fonctions depuis des DLL ou des bibliothèques " +"partagées, rendant ainsi possible l'interfaçage de ces bibliothèques avec du " +"pur code Python." + +#: library/ctypes.rst:21 +msgid "ctypes tutorial" +msgstr "Didacticiel de *ctypes*" + +#: library/ctypes.rst:23 +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 macOS, they contain doctest directives in comments." +msgstr "" +"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 macOS, ils " +"contiennent des directives *doctest* dans les commentaires." + +#: library/ctypes.rst:27 +msgid "" +"Note: Some code samples reference the ctypes :class:`c_int` type. On " +"platforms where ``sizeof(long) == sizeof(int)`` it is an alias to :class:" +"`c_long`. So, you should not be confused if :class:`c_long` is printed if " +"you would expect :class:`c_int` --- they are actually the same type." +msgstr "" +"Remarque : le type :class:`c_int` du module apparaît dans certains de ces " +"exemples. Sur les plates-formes où ``sizeof(long) == sizeof(int)``, ce type " +"est un alias de :class:`c_long`. Ne soyez donc pas surpris si :class:" +"`c_long` s'affiche là où vous vous attendiez à :class:`c_int` — il s'agit " +"bien du même type." + +#: library/ctypes.rst:35 +msgid "Loading dynamic link libraries" +msgstr "Chargement des DLL" + +#: library/ctypes.rst:37 +msgid "" +":mod:`ctypes` exports the *cdll*, and on Windows *windll* and *oledll* " +"objects, for loading dynamic link libraries." +msgstr "" +":mod:`ctypes` fournit l'objet *cdll* pour charger des bibliothèques à liens " +"dynamiques (et les objets *windll* et *oledll* en Windows)." + +#: library/ctypes.rst:40 +msgid "" +"You load libraries by accessing them as attributes of these objects. *cdll* " +"loads libraries which export functions using the standard ``cdecl`` calling " +"convention, while *windll* libraries call functions using the ``stdcall`` " +"calling convention. *oledll* also uses the ``stdcall`` calling convention, " +"and assumes the functions return a Windows :c:type:`HRESULT` error code. The " +"error code is used to automatically raise an :class:`OSError` exception when " +"the function call fails." +msgstr "" +"Une bibliothèque se charge en y accédant comme un attribut de ces objets. " +"*cdll* charge les bibliothèques qui exportent des fonctions utilisant la " +"convention d'appel standard ``cdecl``, alors que les bibliothèques qui se " +"chargent avec *windll* utilisent la convention d'appel ``stdcall``. *oledll* " +"utilise elle aussi la convention ``stdcall`` et suppose que les fonctions " +"renvoient un code d'erreur :c:type:`HRESULT` de Windows. Ce code d'erreur " +"est utilisé pour lever automatiquement une :class:`OSError` quand l'appel de " +"la fonction échoue." + +#: library/ctypes.rst:48 +msgid "" +"Windows errors used to raise :exc:`WindowsError`, which is now an alias of :" +"exc:`OSError`." +msgstr "" +"En Windows, les erreurs levaient auparavant une :exc:`WindowsError`, qui est " +"maintenant un alias de :exc:`OSError`." + +#: library/ctypes.rst:53 +msgid "" +"Here are some examples for Windows. Note that ``msvcrt`` is the MS standard " +"C library containing most standard C functions, and uses the cdecl calling " +"convention::" +msgstr "" +"Voici quelques exemples Windows. ``msvcrt`` est la bibliothèque standard C " +"de Microsoft qui contient la plupart des fonctions standards C. Elle suit la " +"convention d'appel *cdecl* ::" + +#: library/ctypes.rst:65 +msgid "Windows appends the usual ``.dll`` file suffix automatically." +msgstr "Windows ajoute le suffixe habituel ``.dll`` automatiquement." + +#: library/ctypes.rst:68 +msgid "" +"Accessing the standard C library through ``cdll.msvcrt`` will use an " +"outdated version of the library that may be incompatible with the one being " +"used by Python. Where possible, use native Python functionality, or else " +"import and use the ``msvcrt`` module." +msgstr "" +"Accéder à la bibliothèque standard C par ``cdll.msvcrt`` utilise une version " +"obsolète de la bibliothèque qui peut avoir des problèmes de compatibilité " +"avec celle que Python utilise. Si possible, mieux vaut utiliser la " +"fonctionnalité native de Python, ou bien importer et utiliser le module " +"``msvcrt``." + +#: library/ctypes.rst:73 +msgid "" +"On Linux, it is required to specify the filename *including* the extension " +"to load a library, so attribute access can not be used to load libraries. " +"Either the :meth:`LoadLibrary` method of the dll loaders should be used, or " +"you should load the library by creating an instance of CDLL by calling the " +"constructor::" +msgstr "" +"Pour charger une bibliothèque en Linux, il faut passer le nom du fichier " +"*avec* son extension. Il est donc impossible de charger une bibliothèque en " +"accédant à un attribut. Il faut utiliser la méthode :meth:`LoadLibrary` des " +"chargeurs de DLL, ou bien charger la bibliothèque en créant une instance de " +"*CDLL* en appelant son constructeur ::" + +#: library/ctypes.rst:91 +msgid "Accessing functions from loaded dlls" +msgstr "Accès aux fonctions des DLL chargées" + +#: library/ctypes.rst:93 +msgid "Functions are accessed as attributes of dll objects::" +msgstr "Les fonctions sont alors des attributs des objets DLL ::" + +#: library/ctypes.rst:108 +msgid "" +"Note that win32 system dlls like ``kernel32`` and ``user32`` often export " +"ANSI as well as UNICODE versions of a function. The UNICODE version is " +"exported with an ``W`` appended to the name, while the ANSI version is " +"exported with an ``A`` appended to the name. The win32 ``GetModuleHandle`` " +"function, which returns a *module handle* for a given module name, has the " +"following C prototype, and a macro is used to expose one of them as " +"``GetModuleHandle`` depending on whether UNICODE is defined or not::" +msgstr "" +"Les DLL des systèmes *win32* comme ``kernel32`` et ``user32`` exportent " +"souvent une version ANSI et une version UNICODE d'une fonction. La version " +"UNICODE est exportée avec un ``W`` à la fin, et la version ANSI avec un " +"``A``. La fonction *win32* ``GetModuleHandle``, qui renvoie un *gestionnaire " +"de module* à partir de son nom, a le prototype C suivant (c'est une macro " +"qui décide d'exporter l'une ou l'autre à travers ``GetModuleHandle``, selon " +"qu'UNICODE est définie ou non) ::" + +#: library/ctypes.rst:121 +msgid "" +"*windll* does not try to select one of them by magic, you must access the " +"version you need by specifying ``GetModuleHandleA`` or ``GetModuleHandleW`` " +"explicitly, and then call it with bytes or string objects respectively." +msgstr "" +"*windll* n'en choisit pas une par magie, il faut accéder à la bonne en " +"écrivant explicitement ``GetModuleHandleA`` ou ``GetModuleHandleW`` et en " +"les appelant ensuite avec des objets octets ou avec des chaînes de " +"caractères, respectivement." + +#: library/ctypes.rst:125 +msgid "" +"Sometimes, dlls export functions with names which aren't valid Python " +"identifiers, like ``\"??2@YAPAXI@Z\"``. In this case you have to use :func:" +"`getattr` to retrieve the function::" +msgstr "" +"Les DLL exportent parfois des fonctions dont les noms ne sont pas des " +"identifiants Python valides, comme ``\"??2@YAPAXI@Z\"``. Dans ce cas, il " +"faut utiliser :func:`getattr` pour accéder à la fonction ::" + +#: library/ctypes.rst:133 +msgid "" +"On Windows, some dlls export functions not by name but by ordinal. These " +"functions can be accessed by indexing the dll object with the ordinal " +"number::" +msgstr "" +"Sous Windows, certaines DLL exportent des fonctions à travers un indice " +"plutôt qu'à travers un nom. On accède à une fonction en indiçant l'objet DLL " +"avec son index ::" + +#: library/ctypes.rst:150 +msgid "Calling functions" +msgstr "Appel de fonctions" + +#: library/ctypes.rst:152 +msgid "" +"You can call these functions like any other Python callable. This example " +"uses the ``time()`` function, which returns system time in seconds since the " +"Unix epoch, and the ``GetModuleHandleA()`` function, which returns a win32 " +"module handle." +msgstr "" +"Ces fonctions s'appellent comme n'importe quel appelable Python. Cet exemple " +"utilise la fonction ``time()``, qui renvoie le temps en secondes du système " +"depuis l'*epoch* Unix, et la fonction ``GetModuleHandleA()``, qui renvoie un " +"gestionnaire de module *win32*." + +#: library/ctypes.rst:157 +msgid "" +"This example calls both functions with a ``NULL`` pointer (``None`` should " +"be used as the ``NULL`` pointer)::" +msgstr "" +"Cet exemple appelle les deux fonctions avec un pointeur ``NULL`` (on utilise " +"``None`` pour passer un pointeur ``NULL``) ::" + +#: library/ctypes.rst:166 +msgid "" +":exc:`ValueError` is raised when you call an ``stdcall`` function with the " +"``cdecl`` calling convention, or vice versa::" +msgstr "" +"Une :exc:`ValueError` est levée quand on appelle une fonction ``stdcall`` " +"avec la convention d'appel ``cdecl`` et vice-versa ::" + +#: library/ctypes.rst:181 +msgid "" +"To find out the correct calling convention you have to look into the C " +"header file or the documentation for the function you want to call." +msgstr "" +"Pour déterminer la convention d'appel, il faut consulter l'en-tête C ou la " +"documentation de la fonction à appeler." + +#: library/ctypes.rst:184 +msgid "" +"On Windows, :mod:`ctypes` uses win32 structured exception handling to " +"prevent crashes from general protection faults when functions are called " +"with invalid argument values::" +msgstr "" +"En Windows, :mod:`ctypes` tire profit de la gestion structurée des " +"exceptions (*structured exception handling*) *win32* pour empêcher les " +"plantages dus à des interruptions, afin de préserver la protection globale " +"(*general protection faults*) du système, lorsque des fonctions sont " +"appelées avec un nombre incorrect d'arguments ::" + +#: library/ctypes.rst:194 +msgid "" +"There are, however, enough ways to crash Python with :mod:`ctypes`, so you " +"should be careful anyway. The :mod:`faulthandler` module can be helpful in " +"debugging crashes (e.g. from segmentation faults produced by erroneous C " +"library calls)." +msgstr "" +"Cependant, il y a suffisamment de façons de faire planter Python avec :mod:" +"`ctypes`, donc il faut être prudent dans tous les cas. Le module :mod:" +"`faulthandler` est pratique pour déboguer les plantages (p. ex. dus à des " +"erreurs de segmentation produites par des appels erronés à la bibliothèque " +"C)." + +#: library/ctypes.rst:199 +#, fuzzy +msgid "" +"``None``, integers, bytes objects and (unicode) strings are the only native " +"Python objects that can directly be used as parameters in these function " +"calls. ``None`` is passed as a C ``NULL`` pointer, bytes objects and strings " +"are passed as pointer to the memory block that contains their data (:c:expr:" +"`char *` or :c:expr:`wchar_t *`). Python integers are passed as the " +"platforms default C :c:expr:`int` type, their value is masked to fit into " +"the C type." +msgstr "" +"``None``, les entiers, les objets octets et les chaînes de caractères " +"(Unicode) sont les seuls types natifs de Python qui peuvent être directement " +"passés en paramètres de ces appels de fonctions. ``None`` est passé comme le " +"pointeur C ``NULL``, les objets octets et les chaînes de caractères sont " +"passés comme un pointeur sur le bloc mémoire qui contient la donnée (:c:type:" +"`char *` ou :c:type:`wchar_t *`). Les entiers Python sont passés comme le " +"type C :c:type:`int` par défaut de la plate-forme, un masque étant appliqué " +"pour qu'ils tiennent dans le type C." + +#: library/ctypes.rst:206 +msgid "" +"Before we move on calling functions with other parameter types, we have to " +"learn more about :mod:`ctypes` data types." +msgstr "" +"Avant de poursuivre sur l'appel de fonctions avec d'autres types de " +"paramètres, apprenons-en un peu plus sur les types de données de :mod:" +"`ctypes`." + +#: library/ctypes.rst:2160 +msgid "Fundamental data types" +msgstr "Types de données de base" + +#: library/ctypes.rst:215 +msgid ":mod:`ctypes` defines a number of primitive C compatible data types:" +msgstr "" +":mod:`ctypes` définit plusieurs types de donnée de base compatibles avec le " +"C :" + +#: library/ctypes.rst:218 +msgid "ctypes type" +msgstr "Types de *ctypes*" + +#: library/ctypes.rst:218 +msgid "C type" +msgstr "Type C" + +#: library/ctypes.rst:218 +msgid "Python type" +msgstr "Type Python" + +#: library/ctypes.rst:220 +msgid ":class:`c_bool`" +msgstr ":class:`c_bool`" + +#: library/ctypes.rst:220 +#, fuzzy +msgid ":c:expr:`_Bool`" +msgstr ":c:type:`_Bool`" + +#: library/ctypes.rst:220 +msgid "bool (1)" +msgstr "*bool* (1)" + +#: library/ctypes.rst:222 +msgid ":class:`c_char`" +msgstr ":class:`c_char`" + +#: library/ctypes.rst:226 +#, fuzzy +msgid ":c:expr:`char`" +msgstr ":c:type:`char`" + +#: library/ctypes.rst:222 +msgid "1-character bytes object" +msgstr "objet octet (*bytes*) de 1 caractère" + +#: library/ctypes.rst:224 +msgid ":class:`c_wchar`" +msgstr ":class:`c_wchar`" + +#: library/ctypes.rst:224 +#, fuzzy +msgid ":c:expr:`wchar_t`" +msgstr ":c:type:`wchar_t`" + +#: library/ctypes.rst:224 +msgid "1-character string" +msgstr "chaîne de caractères (*string*) de longueur 1" + +#: library/ctypes.rst:226 +msgid ":class:`c_byte`" +msgstr ":class:`c_byte`" + +#: library/ctypes.rst:228 library/ctypes.rst:232 library/ctypes.rst:236 +#: library/ctypes.rst:240 library/ctypes.rst:244 library/ctypes.rst:249 +msgid "int" +msgstr "*int*" + +#: library/ctypes.rst:228 +msgid ":class:`c_ubyte`" +msgstr ":class:`c_ubyte`" + +#: library/ctypes.rst:228 +#, fuzzy +msgid ":c:expr:`unsigned char`" +msgstr ":c:type:`unsigned char`" + +#: library/ctypes.rst:230 +msgid ":class:`c_short`" +msgstr ":class:`c_short`" + +#: library/ctypes.rst:230 +#, fuzzy +msgid ":c:expr:`short`" +msgstr ":c:type:`short`" + +#: library/ctypes.rst:232 +msgid ":class:`c_ushort`" +msgstr ":class:`c_ushort`" + +#: library/ctypes.rst:232 +#, fuzzy +msgid ":c:expr:`unsigned short`" +msgstr ":c:type:`unsigned short`" + +#: library/ctypes.rst:234 +msgid ":class:`c_int`" +msgstr ":class:`c_int`" + +#: library/ctypes.rst:234 +#, fuzzy +msgid ":c:expr:`int`" +msgstr ":c:type:`int`" + +#: library/ctypes.rst:236 +msgid ":class:`c_uint`" +msgstr ":class:`c_uint`" + +#: library/ctypes.rst:236 +#, fuzzy +msgid ":c:expr:`unsigned int`" +msgstr ":c:type:`unsigned int`" + +#: library/ctypes.rst:238 +msgid ":class:`c_long`" +msgstr ":class:`c_long`" + +#: library/ctypes.rst:238 +#, fuzzy +msgid ":c:expr:`long`" +msgstr ":c:type:`long`" + +#: library/ctypes.rst:240 +msgid ":class:`c_ulong`" +msgstr ":class:`c_ulong`" + +#: library/ctypes.rst:240 +#, fuzzy +msgid ":c:expr:`unsigned long`" +msgstr ":c:type:`unsigned long`" + +#: library/ctypes.rst:242 +msgid ":class:`c_longlong`" +msgstr ":class:`c_longlong`" + +#: library/ctypes.rst:242 +#, fuzzy +msgid ":c:expr:`__int64` or :c:expr:`long long`" +msgstr ":c:type:`__int64` ou :c:type:`long long`" + +#: library/ctypes.rst:244 +msgid ":class:`c_ulonglong`" +msgstr ":class:`c_ulonglong`" + +#: library/ctypes.rst:244 +#, fuzzy +msgid ":c:expr:`unsigned __int64` or :c:expr:`unsigned long long`" +msgstr ":c:type:`unsigned __int64` ou :c:type:`unsigned long long`" + +#: library/ctypes.rst:247 +msgid ":class:`c_size_t`" +msgstr ":class:`c_size_t`" + +#: library/ctypes.rst:247 +#, fuzzy +msgid ":c:expr:`size_t`" +msgstr ":c:type:`size_t`" + +#: library/ctypes.rst:249 +msgid ":class:`c_ssize_t`" +msgstr ":class:`c_ssize_t`" + +#: library/ctypes.rst:249 +#, fuzzy +msgid ":c:expr:`ssize_t` or :c:expr:`Py_ssize_t`" +msgstr ":c:type:`ssize_t` ou :c:type:`Py_ssize_t`" + +#: library/ctypes.rst:252 +msgid ":class:`c_float`" +msgstr ":class:`c_float`" + +#: library/ctypes.rst:252 +#, fuzzy +msgid ":c:expr:`float`" +msgstr ":c:type:`float`" + +#: library/ctypes.rst:254 library/ctypes.rst:256 +msgid "float" +msgstr "*float*" + +#: library/ctypes.rst:254 +msgid ":class:`c_double`" +msgstr ":class:`c_double`" + +#: library/ctypes.rst:254 +#, fuzzy +msgid ":c:expr:`double`" +msgstr ":c:type:`double`" + +#: library/ctypes.rst:256 +msgid ":class:`c_longdouble`" +msgstr ":class:`c_longdouble`" + +#: library/ctypes.rst:256 +#, fuzzy +msgid ":c:expr:`long double`" +msgstr ":c:type:`long double`" + +#: library/ctypes.rst:258 +msgid ":class:`c_char_p`" +msgstr ":class:`c_char_p`" + +#: library/ctypes.rst:258 +#, fuzzy +msgid ":c:expr:`char *` (NUL terminated)" +msgstr ":c:type:`char *` (terminé par NUL)" + +#: library/ctypes.rst:258 +msgid "bytes object or ``None``" +msgstr "objet octet (*bytes*) ou ``None``" + +#: library/ctypes.rst:260 +msgid ":class:`c_wchar_p`" +msgstr ":class:`c_wchar_p`" + +#: library/ctypes.rst:260 +#, fuzzy +msgid ":c:expr:`wchar_t *` (NUL terminated)" +msgstr ":c:type:`wchar_t *` (terminé par NUL)" + +#: library/ctypes.rst:260 +msgid "string or ``None``" +msgstr "chaîne de caractères (*string*) ou ``None``" + +#: library/ctypes.rst:262 +msgid ":class:`c_void_p`" +msgstr ":class:`c_void_p`" + +#: library/ctypes.rst:262 +#, fuzzy +msgid ":c:expr:`void *`" +msgstr ":c:type:`void *`" + +#: library/ctypes.rst:262 +msgid "int or ``None``" +msgstr "*int* ou ``None``" + +#: library/ctypes.rst:266 +msgid "The constructor accepts any object with a truth value." +msgstr "Le constructeur accepte n'importe quel objet convertible en booléen." + +#: library/ctypes.rst:268 +msgid "" +"All these types can be created by calling them with an optional initializer " +"of the correct type and value::" +msgstr "" +"Il est possible de créer chacun de ces types en les appelant avec une valeur " +"d'initialisation du bon type et avec une valeur cohérente ::" + +#: library/ctypes.rst:279 +msgid "" +"Since these types are mutable, their value can also be changed afterwards::" +msgstr "" +"Ces types étant des muables, leur valeur peut aussi être modifiée après " +"coup ::" + +#: library/ctypes.rst:291 +msgid "" +"Assigning a new value to instances of the pointer types :class:`c_char_p`, :" +"class:`c_wchar_p`, and :class:`c_void_p` changes the *memory location* they " +"point to, *not the contents* of the memory block (of course not, because " +"Python bytes objects are immutable)::" +msgstr "" +"Affecter une nouvelle valeur à une instance de type pointeur — :class:" +"`c_char_p`, :class:`c_wchar_p` et :class:`c_void_p` — change *la zone " +"mémoire* sur laquelle elle pointe, et non *le contenu* de ce bloc mémoire " +"(c'est logique parce que les objets octets sont immuables en Python) ::" + +#: library/ctypes.rst:311 +msgid "" +"You should be careful, however, not to pass them to functions expecting " +"pointers to mutable memory. If you need mutable memory blocks, ctypes has a :" +"func:`create_string_buffer` function which creates these in various ways. " +"The current memory block contents can be accessed (or changed) with the " +"``raw`` property; if you want to access it as NUL terminated string, use the " +"``value`` property::" +msgstr "" +"Cependant, prenez garde à ne pas en passer à des fonctions qui prennent en " +"paramètre des pointeurs sur de la mémoire modifiable. S'il vous faut de la " +"mémoire modifiable, *ctypes* fournit la fonction :func:" +"`create_string_buffer` qui en crée de plusieurs façons. L'attribut ``raw`` " +"permet d'accéder à (ou de modifier) un bloc mémoire ; l'attribut ``value`` " +"permet d'y accéder comme à une chaîne de caractères terminée par NUL ::" + +#: library/ctypes.rst:335 +#, fuzzy +msgid "" +"The :func:`create_string_buffer` function replaces the :func:`c_buffer` " +"function (which is still available as an alias), as well as the :func:" +"`c_string` function from earlier ctypes releases. To create a mutable " +"memory block containing unicode characters of the C type :c:expr:`wchar_t` " +"use the :func:`create_unicode_buffer` function." +msgstr "" +"La fonction :func:`create_string_buffer` remplace les fonctions :func:" +"`c_buffer` (qui en reste un alias) et :func:`c_string` des versions " +"antérieures de *ctypes*. La fonction :func:`create_unicode_buffer` crée un " +"bloc mémoire modifiable contenant des caractères Unicode du type C :c:type:" +"`wchar_t`." + +#: library/ctypes.rst:345 +msgid "Calling functions, continued" +msgstr "Appel de fonctions, suite" + +#: library/ctypes.rst:347 +msgid "" +"Note that printf prints to the real standard output channel, *not* to :data:" +"`sys.stdout`, so these examples will only work at the console prompt, not " +"from within *IDLE* or *PythonWin*::" +msgstr "" +"*printf* utilise la vraie sortie standard, et non :data:`sys.stdout` ; les " +"exemples suivants ne fonctionnent donc que dans une invite de commande et " +"non depuis *IDLE* or *PythonWin* ::" + +#: library/ctypes.rst:367 +msgid "" +"As has been mentioned before, all Python types except integers, strings, and " +"bytes objects have to be wrapped in their corresponding :mod:`ctypes` type, " +"so that they can be converted to the required C data type::" +msgstr "" +"Comme mentionné plus haut, tous les types Python (les entiers, les chaînes " +"de caractères et les objets octet exceptés) doivent être encapsulés dans " +"leur type :mod:`ctypes` correspondant pour pouvoir être convertis dans le " +"type C requis ::" + +#: library/ctypes.rst:379 +#, fuzzy +msgid "Calling varadic functions" +msgstr "Appel de fonctions" + +#: library/ctypes.rst:381 +msgid "" +"On a lot of platforms calling variadic functions through ctypes is exactly " +"the same as calling functions with a fixed number of parameters. On some " +"platforms, and in particular ARM64 for Apple Platforms, the calling " +"convention for variadic functions is different than that for regular " +"functions." +msgstr "" + +#: library/ctypes.rst:386 +msgid "" +"On those platforms it is required to specify the *argtypes* attribute for " +"the regular, non-variadic, function arguments:" +msgstr "" + +#: library/ctypes.rst:393 +msgid "" +"Because specifying the attribute does inhibit portability it is advised to " +"always specify ``argtypes`` for all variadic functions." +msgstr "" + +#: library/ctypes.rst:400 +msgid "Calling functions with your own custom data types" +msgstr "Appel de fonctions avec des types de données personnalisés" + +#: library/ctypes.rst:402 +msgid "" +"You can also customize :mod:`ctypes` argument conversion to allow instances " +"of your own classes be used as function arguments. :mod:`ctypes` looks for " +"an :attr:`_as_parameter_` attribute and uses this as the function argument. " +"Of course, it must be one of integer, string, or bytes::" +msgstr "" +"Il est possible de personnaliser la conversion des arguments effectuée par :" +"mod:`ctypes` pour permettre de passer en argument des instances de vos " +"propres classes. :mod:`ctypes` recherche un attribut :attr:`_as_parameter_` " +"et le prend comme argument à la fonction. Bien entendu, cet attribut doit " +"être un entier, une chaîne de caractères ou des octets ::" + +#: library/ctypes.rst:417 +msgid "" +"If you don't want to store the instance's data in the :attr:`_as_parameter_` " +"instance variable, you could define a :class:`property` which makes the " +"attribute available on request." +msgstr "" +"Si vous ne souhaitez pas stocker les données de l'instance dans la variable :" +"attr:`_as_parameter_` de l'instance, vous pouvez toujours définir une :class:" +"`propriété ` qui rend cet attribut disponible sur demande." + +#: library/ctypes.rst:425 +msgid "Specifying the required argument types (function prototypes)" +msgstr "Définition du type des arguments nécessaires (prototypes de fonction)" + +#: library/ctypes.rst:427 +msgid "" +"It is possible to specify the required argument types of functions exported " +"from DLLs by setting the :attr:`argtypes` attribute." +msgstr "" +"Il est possible de définir le type des arguments demandés par une fonction " +"exportée depuis une DLL en définissant son attribut :attr:`argtypes`." + +#: library/ctypes.rst:430 +msgid "" +":attr:`argtypes` must be a sequence of C data types (the ``printf`` function " +"is probably not a good example here, because it takes a variable number and " +"different types of parameters depending on the format string, on the other " +"hand this is quite handy to experiment with this feature)::" +msgstr "" +":attr:`argtypes` doit être une séquence de types de données C (la fonction " +"``printf`` n'est probablement pas le meilleur exemple pour l'illustrer, car " +"elle accepte un nombre variable d'arguments de types eux aussi variables, " +"selon la chaîne de formatage ; cela dit, elle se révèle pratique pour tester " +"cette fonctionnalité) ::" + +#: library/ctypes.rst:441 +msgid "" +"Specifying a format protects against incompatible argument types (just as a " +"prototype for a C function), and tries to convert the arguments to valid " +"types::" +msgstr "" +"Définir un format empêche de passer des arguments de type incompatible " +"(comme le fait le prototype d'une fonction C) et tente de convertir les " +"arguments en des types valides ::" + +#: library/ctypes.rst:453 +msgid "" +"If you have defined your own classes which you pass to function calls, you " +"have to implement a :meth:`from_param` class method for them to be able to " +"use them in the :attr:`argtypes` sequence. The :meth:`from_param` class " +"method receives the Python object passed to the function call, it should do " +"a typecheck or whatever is needed to make sure this object is acceptable, " +"and then return the object itself, its :attr:`_as_parameter_` attribute, or " +"whatever you want to pass as the C function argument in this case. Again, " +"the result should be an integer, string, bytes, a :mod:`ctypes` instance, or " +"an object with an :attr:`_as_parameter_` attribute." +msgstr "" +"Pour appeler une fonction avec votre propre classe définie dans la séquence :" +"attr:`argtypes`, il est nécessaire d'implémenter une méthode de classe :meth:" +"`from_param`. La méthode de classe :meth:`from_param` récupère l'objet " +"Python passé à la fonction et doit faire une vérification de type ou tout ce " +"qui est nécessaire pour s'assurer que l'objet est valide, puis renvoie " +"l'objet lui-même, son attribut :attr:`_as_parameter_`, ou tout ce que vous " +"voulez passer comme argument fonction C dans ce cas. Encore une fois, il " +"convient que le résultat soit un entier, une chaîne, des octets, une " +"instance :mod:`ctypes` ou un objet avec un attribut :attr:`_as_parameter_`." + +#: library/ctypes.rst:467 +msgid "Return types" +msgstr "Types de sortie" + +#: library/ctypes.rst:469 +#, fuzzy +msgid "" +"By default functions are assumed to return the C :c:expr:`int` type. Other " +"return types can be specified by setting the :attr:`restype` attribute of " +"the function object." +msgstr "" +"Le module suppose que toutes les fonctions renvoient par défaut un :c:type:" +"`int` C. Pour préciser un autre type de sortie, il faut définir l'attribut :" +"attr:`restype` de l'objet encapsulant la fonction." + +#: library/ctypes.rst:473 +msgid "" +"Here is a more advanced example, it uses the ``strchr`` function, which " +"expects a string pointer and a char, and returns a pointer to a string::" +msgstr "" +"Voici un exemple plus poussé. Celui-ci utilise la fonction ``strchr``, qui " +"prend en paramètres un pointeur vers une chaîne et un caractère. Elle " +"renvoie un pointeur sur une chaîne de caractères ::" + +#: library/ctypes.rst:486 +msgid "" +"If you want to avoid the ``ord(\"x\")`` calls above, you can set the :attr:" +"`argtypes` attribute, and the second argument will be converted from a " +"single character Python bytes object into a C char::" +msgstr "" +"Pour économiser l'appel ``ord(\"x\")``, il est possible de définir " +"l'attribut :attr:`argtypes` ; le second argument, un objet octet à un seul " +"caractère, sera automatiquement converti en un caractère C ::" + +#: library/ctypes.rst:504 +msgid "" +"You can also use a callable Python object (a function or a class for " +"example) as the :attr:`restype` attribute, if the foreign function returns " +"an integer. The callable will be called with the *integer* the C function " +"returns, and the result of this call will be used as the result of your " +"function call. This is useful to check for error return values and " +"automatically raise an exception::" +msgstr "" +"Si la fonction à interfacer renvoie un entier, l'attribut :attr:`restype` " +"peut aussi être un appelable (une fonction ou une classe par exemple). Dans " +"ce cas, l'appelable est appelé avec l'entier renvoyé par la fonction et le " +"résultat de cet appel sera le résultat final de l'appel à la fonction. C'est " +"pratique pour vérifier les codes d'erreurs des valeurs de retour et lever " +"automatiquement des exceptions ::" + +#: library/ctypes.rst:527 +msgid "" +"``WinError`` is a function which will call Windows ``FormatMessage()`` api " +"to get the string representation of an error code, and *returns* an " +"exception. ``WinError`` takes an optional error code parameter, if no one is " +"used, it calls :func:`GetLastError` to retrieve it." +msgstr "" +"``WinError`` appelle l'API Windows ``FormatMessage()`` pour obtenir une " +"représentation de la chaîne de caractères qui correspond au code d'erreur, " +"et *renvoie* une exception. ``WinError`` prend en paramètre — optionnel — le " +"code d'erreur. Si celui-ci n'est pas passé, elle appelle :func:" +"`GetLastError` pour le récupérer." + +#: library/ctypes.rst:532 +msgid "" +"Please note that a much more powerful error checking mechanism is available " +"through the :attr:`errcheck` attribute; see the reference manual for details." +msgstr "" +"Notez cependant que l'attribut :attr:`errcheck` permet de vérifier bien plus " +"efficacement les erreurs ; référez-vous au manuel de référence pour plus de " +"précisions." + +#: library/ctypes.rst:539 +msgid "Passing pointers (or: passing parameters by reference)" +msgstr "Passage de pointeurs (passage de paramètres par référence)" + +#: library/ctypes.rst:541 +msgid "" +"Sometimes a C api function expects a *pointer* to a data type as parameter, " +"probably to write into the corresponding location, or if the data is too " +"large to be passed by value. This is also known as *passing parameters by " +"reference*." +msgstr "" +"Il arrive qu'une fonction C du code à interfacer requière un *pointeur* vers " +"un certain type de donnée en paramètre, typiquement pour écrire à l'endroit " +"correspondant ou si la donnée est trop grande pour pouvoir être passée par " +"valeur. Ce mécanisme est appelé *passage de paramètres par référence*." + +#: library/ctypes.rst:545 +msgid "" +":mod:`ctypes` exports the :func:`byref` function which is used to pass " +"parameters by reference. The same effect can be achieved with the :func:" +"`pointer` function, although :func:`pointer` does a lot more work since it " +"constructs a real pointer object, so it is faster to use :func:`byref` if " +"you don't need the pointer object in Python itself::" +msgstr "" +":mod:`ctypes` contient la fonction :func:`byref` qui permet de passer des " +"paramètres par référence. La fonction :func:`pointer` a la même utilité, " +"mais fait plus de travail car :func:`pointer` construit un véritable objet " +"pointeur. Ainsi, si vous n'avez pas besoin de cet objet dans votre code " +"Python, utiliser :func:`byref` est plus performant ::" + +#: library/ctypes.rst:567 +msgid "Structures and unions" +msgstr "Structures et unions" + +#: library/ctypes.rst:569 +msgid "" +"Structures and unions must derive from the :class:`Structure` and :class:" +"`Union` base classes which are defined in the :mod:`ctypes` module. Each " +"subclass must define a :attr:`_fields_` attribute. :attr:`_fields_` must be " +"a list of *2-tuples*, containing a *field name* and a *field type*." +msgstr "" +"Les structures et les unions doivent hériter des classes de base :class:" +"`Structure` et :class:`Union` définies dans le module :mod:`ctypes`. Chaque " +"sous-classe doit définir un attribut :attr:`_fields_`. :attr:`_fields_` doit " +"être une liste de *paires*, contenant un *nom de champ* et un *type de " +"champ*." + +#: library/ctypes.rst:574 +msgid "" +"The field type must be a :mod:`ctypes` type like :class:`c_int`, or any " +"other derived :mod:`ctypes` type: structure, union, array, pointer." +msgstr "" +"Le type de champ doit être un type :mod:`ctypes` comme :class:`c_int` ou un " +"type :mod:`ctypes` dérivé : structure, union, tableau ou pointeur." + +#: library/ctypes.rst:577 +msgid "" +"Here is a simple example of a POINT structure, which contains two integers " +"named *x* and *y*, and also shows how to initialize a structure in the " +"constructor::" +msgstr "" +"Voici un exemple simple : une structure POINT qui contient deux entiers *x* " +"et *y* et qui montre également comment instancier une structure avec le " +"constructeur ::" + +#: library/ctypes.rst:597 +msgid "" +"You can, however, build much more complicated structures. A structure can " +"itself contain other structures by using a structure as a field type." +msgstr "" +"Il est bien entendu possible de créer des structures plus complexes. Une " +"structure peut elle-même contenir d'autres structures en prenant une " +"structure comme type de champ." + +#: library/ctypes.rst:600 +msgid "" +"Here is a RECT structure which contains two POINTs named *upperleft* and " +"*lowerright*::" +msgstr "" +"Voici une structure RECT qui contient deux POINTs *upperleft* et " +"*lowerright* ::" + +#: library/ctypes.rst:614 +msgid "" +"Nested structures can also be initialized in the constructor in several " +"ways::" +msgstr "" +"Une structure encapsulée peut être instanciée par un constructeur de " +"plusieurs façons ::" + +#: library/ctypes.rst:619 +msgid "" +"Field :term:`descriptor`\\s can be retrieved from the *class*, they are " +"useful for debugging because they can provide useful information::" +msgstr "" +"Il est possible de récupérer les :term:`descripteurs ` des " +"champs depuis la *classe*. Ils sont importants pour déboguer car ils " +"contiennent des informations utiles ::" + +#: library/ctypes.rst:633 +msgid "" +":mod:`ctypes` does not support passing unions or structures with bit-fields " +"to functions by value. While this may work on 32-bit x86, it's not " +"guaranteed by the library to work in the general case. Unions and " +"structures with bit-fields should always be passed to functions by pointer." +msgstr "" +":mod:`ctypes` ne prend pas en charge le passage par valeur des unions ou des " +"structures avec des champs de bits. Bien que cela puisse fonctionner sur des " +"architectures 32 bits avec un jeu d'instructions x86, ce n'est pas garanti " +"par la bibliothèque en général. Les unions et les structures avec des champs " +"de bits doivent toujours être passées par pointeur." + +#: library/ctypes.rst:639 +msgid "Structure/union alignment and byte order" +msgstr "Alignement et boutisme des structures et des unions" + +#: library/ctypes.rst:641 +msgid "" +"By default, Structure and Union fields are aligned in the same way the C " +"compiler does it. It is possible to override this behavior by specifying a :" +"attr:`_pack_` class attribute in the subclass definition. This must be set " +"to a positive integer and specifies the maximum alignment for the fields. " +"This is what ``#pragma pack(n)`` also does in MSVC." +msgstr "" +"Par défaut les champs d'une *Structure* ou d'une *Union* sont alignés de la " +"même manière que le ferait un compilateur C. Ce comportement peut être " +"redéfini en définissant l'attribut :attr:`_pack_` dans la définition de la " +"sous-classe. Ce champ doit être un entier positif et vaut l'alignement " +"maximal des champs. C'est ce que fait ``#pragma pack(n)`` pour MSVC." + +#: library/ctypes.rst:647 +msgid "" +":mod:`ctypes` uses the native byte order for Structures and Unions. To " +"build structures with non-native byte order, you can use one of the :class:" +"`BigEndianStructure`, :class:`LittleEndianStructure`, :class:" +"`BigEndianUnion`, and :class:`LittleEndianUnion` base classes. These " +"classes cannot contain pointer fields." +msgstr "" +":mod:`ctypes` suit le boutisme natif pour les *Structure* et les *Union*. " +"Pour construire des structures avec un boutisme différent, utilisez les " +"classes de base :class:`BigEndianStructure`, :class:" +"`LittleEndianStructure`, :class:`BigEndianUnion` ou :class:" +"`LittleEndianUnion`. Ces classes ne peuvent pas avoir de champ pointeur." + +#: library/ctypes.rst:657 +msgid "Bit fields in structures and unions" +msgstr "Champs de bits dans les structures et les unions" + +#: library/ctypes.rst:659 +msgid "" +"It is possible to create structures and unions containing bit fields. Bit " +"fields are only possible for integer fields, the bit width is specified as " +"the third item in the :attr:`_fields_` tuples::" +msgstr "" +"Il est possible de créer des structures et des unions contenant des champs " +"de bits. Seuls les entiers peuvent être des champs de bits, le nombre de " +"bits est défini dans le troisième champ du *n*-uplet :attr:`_fields_` ::" + +#: library/ctypes.rst:677 +msgid "Arrays" +msgstr "Tableaux" + +#: library/ctypes.rst:679 +msgid "" +"Arrays are sequences, containing a fixed number of instances of the same " +"type." +msgstr "" +"Les tableaux sont des séquences qui contiennent un nombre fixe d'instances " +"du même type." + +#: library/ctypes.rst:681 +msgid "" +"The recommended way to create array types is by multiplying a data type with " +"a positive integer::" +msgstr "" +"La meilleure façon de créer des tableaux consiste à multiplier le type de " +"donnée par un entier positif ::" + +#: library/ctypes.rst:686 +msgid "" +"Here is an example of a somewhat artificial data type, a structure " +"containing 4 POINTs among other stuff::" +msgstr "" +"Voici un exemple — un peu artificiel — d'une structure contenant, entre " +"autres, 4 POINTs ::" + +#: library/ctypes.rst:702 +msgid "Instances are created in the usual way, by calling the class::" +msgstr "Comme d'habitude, on crée les instances en appelant la classe ::" + +#: library/ctypes.rst:708 +msgid "" +"The above code print a series of ``0 0`` lines, because the array contents " +"is initialized to zeros." +msgstr "" +"Le code précédent affiche une suite de ``0 0`` car le contenu du tableau est " +"initialisé avec des zéros." + +#: library/ctypes.rst:711 +msgid "Initializers of the correct type can also be specified::" +msgstr "Des valeurs d'initialisation du bon type peuvent être passées ::" + +#: library/ctypes.rst:727 +msgid "Pointers" +msgstr "Pointeurs" + +#: library/ctypes.rst:729 +msgid "" +"Pointer instances are created by calling the :func:`pointer` function on a :" +"mod:`ctypes` type::" +msgstr "" +"On crée une instance de pointeur en appelant la fonction :func:`pointer` sur " +"un type :mod:`ctypes` ::" + +#: library/ctypes.rst:737 +msgid "" +"Pointer instances have a :attr:`~_Pointer.contents` attribute which returns " +"the object to which the pointer points, the ``i`` object above::" +msgstr "" +"Les instances de pointeurs ont un attribut :attr:`~_Pointer.contents` qui " +"renvoie l'objet pointé (l'objet ``i`` ci-dessus) ::" + +#: library/ctypes.rst:744 +msgid "" +"Note that :mod:`ctypes` does not have OOR (original object return), it " +"constructs a new, equivalent object each time you retrieve an attribute::" +msgstr "" +"Attention, :mod:`ctypes` ne fait pas de ROI (retour de l'objet initial). Il " +"crée un nouvel objet à chaque fois qu'on accède à un attribut ::" + +#: library/ctypes.rst:753 +msgid "" +"Assigning another :class:`c_int` instance to the pointer's contents " +"attribute would cause the pointer to point to the memory location where this " +"is stored::" +msgstr "" +"Affecter une autre instance de :class:`c_int` à l'attribut *contents* du " +"pointeur fait pointer le pointeur vers l'adresse mémoire de cette nouvelle " +"instance ::" + +#: library/ctypes.rst:765 +msgid "Pointer instances can also be indexed with integers::" +msgstr "Il est possible d'indexer les pointeurs par des entiers ::" + +#: library/ctypes.rst:771 +msgid "Assigning to an integer index changes the pointed to value::" +msgstr "Affecter à travers un indice change la valeur pointée ::" + +#: library/ctypes.rst:780 +msgid "" +"It is also possible to use indexes different from 0, but you must know what " +"you're doing, just as in C: You can access or change arbitrary memory " +"locations. Generally you only use this feature if you receive a pointer from " +"a C function, and you *know* that the pointer actually points to an array " +"instead of a single item." +msgstr "" +"Si vous êtes sûr de vous, vous pouvez utiliser d'autres valeurs que 0, comme " +"en C : il est ainsi possible de modifier une zone mémoire de votre choix. De " +"manière générale cette fonctionnalité ne s'utilise que sur un pointeur " +"renvoyé par une fonction C, pointeur que vous *savez* pointer vers un " +"tableau et non sur un seul élément." + +#: library/ctypes.rst:786 +msgid "" +"Behind the scenes, the :func:`pointer` function does more than simply create " +"pointer instances, it has to create pointer *types* first. This is done with " +"the :func:`POINTER` function, which accepts any :mod:`ctypes` type, and " +"returns a new type::" +msgstr "" +"Sous le capot, la fonction :func:`pointer` fait plus que simplement créer " +"une instance de pointeur ; elle doit d'abord créer un type « pointeur " +"sur… ». Cela s'effectue avec la fonction :func:`POINTER`, qui prend en " +"paramètre n'importe quel type :mod:`ctypes` et renvoie un nouveau type ::" + +#: library/ctypes.rst:802 +msgid "" +"Calling the pointer type without an argument creates a ``NULL`` pointer. " +"``NULL`` pointers have a ``False`` boolean value::" +msgstr "" +"Appeler le pointeur sur type sans arguments crée un pointeur ``NULL``. Les " +"pointeurs ``NULL`` s'évaluent à ``False`` ::" + +#: library/ctypes.rst:810 +msgid "" +":mod:`ctypes` checks for ``NULL`` when dereferencing pointers (but " +"dereferencing invalid non-\\ ``NULL`` pointers would crash Python)::" +msgstr "" +":mod:`ctypes` vérifie que le pointeur n'est pas ``NULL`` quand il en " +"déréférence un (mais déréférencer des pointeurs non ``NULL`` invalides fait " +"planter Python) ::" + +#: library/ctypes.rst:829 +msgid "Type conversions" +msgstr "Conversions de type" + +#: library/ctypes.rst:831 +msgid "" +"Usually, ctypes does strict type checking. This means, if you have " +"``POINTER(c_int)`` in the :attr:`argtypes` list of a function or as the type " +"of a member field in a structure definition, only instances of exactly the " +"same type are accepted. There are some exceptions to this rule, where " +"ctypes accepts other objects. For example, you can pass compatible array " +"instances instead of pointer types. So, for ``POINTER(c_int)``, ctypes " +"accepts an array of c_int::" +msgstr "" +"En général, *ctypes* respecte un typage fort. Cela signifie que si un " +"``POINTER(c_int)`` est présent dans la liste des :attr:`argtypes` d'une " +"fonction ou est le type d'un attribut membre dans une définition de " +"structure, seules des instances de ce type seront valides. Cette règle " +"comporte quelques exceptions pour lesquelles *ctypes* accepte d'autres " +"objets. Par exemple il est possible de passer des instances de tableau à " +"place de pointeurs, s'ils sont compatibles. Dans le cas de " +"``POINTER(c_int)``, *ctypes* accepte des tableaux de *c_int* ::" + +#: library/ctypes.rst:852 +msgid "" +"In addition, if a function argument is explicitly declared to be a pointer " +"type (such as ``POINTER(c_int)``) in :attr:`argtypes`, an object of the " +"pointed type (``c_int`` in this case) can be passed to the function. ctypes " +"will apply the required :func:`byref` conversion in this case automatically." +msgstr "" +"De plus, si un paramètre de fonction est déclaré explicitement de type " +"pointeur (comme ``POINTER(c_int)``) dans les :attr:`argtypes`, il est aussi " +"possible de passer un objet du type pointé — ici, ``c_int`` — à la fonction. " +"*ctypes* appelle alors automatiquement la fonction de conversion :func:" +"`byref`." + +#: library/ctypes.rst:857 +msgid "To set a POINTER type field to ``NULL``, you can assign ``None``::" +msgstr "" +"Pour mettre un champ de type *POINTER* à ``NULL``, il faut lui affecter " +"``None`` ::" + +#: library/ctypes.rst:864 +msgid "" +"Sometimes you have instances of incompatible types. In C, you can cast one " +"type into another type. :mod:`ctypes` provides a :func:`cast` function " +"which can be used in the same way. The ``Bar`` structure defined above " +"accepts ``POINTER(c_int)`` pointers or :class:`c_int` arrays for its " +"``values`` field, but not instances of other types::" +msgstr "" +"Parfois il faut gérer des incompatibilités entre les types. En C, il est " +"possible de convertir un type en un autre. :mod:`ctypes` fournit la " +"fonction :func:`cast` qui permet la même chose. La structure ``Bar`` ci-" +"dessus accepte des pointeurs ``POINTER(c_int)`` ou des tableaux de :class:" +"`c_int` comme valeur pour le champ ``values``, mais pas des instances " +"d'autres types ::" + +#: library/ctypes.rst:876 +msgid "For these cases, the :func:`cast` function is handy." +msgstr "C'est là que la fonction :func:`cast` intervient." + +#: library/ctypes.rst:878 +msgid "" +"The :func:`cast` function can be used to cast a ctypes instance into a " +"pointer to a different ctypes data type. :func:`cast` takes two parameters, " +"a ctypes object that is or can be converted to a pointer of some kind, and a " +"ctypes pointer type. It returns an instance of the second argument, which " +"references the same memory block as the first argument::" +msgstr "" +"La fonction :func:`cast` permet de convertir une instance de *ctypes* en un " +"pointeur vers un type de données *ctypes* différent. :func:`cast` prend deux " +"paramètres : un objet *ctypes* qui est, ou qui peut être converti en, un " +"certain pointeur et un type pointeur de *ctypes*. Elle renvoie une instance " +"du second argument, qui pointe sur le même bloc mémoire que le premier " +"argument ::" + +#: library/ctypes.rst:889 +msgid "" +"So, :func:`cast` can be used to assign to the ``values`` field of ``Bar`` " +"the structure::" +msgstr "" +"Ainsi, la fonction :func:`cast` permet de remplir le champ ``values`` de la " +"structure ``Bar`` ::" + +#: library/ctypes.rst:902 +msgid "Incomplete Types" +msgstr "Types incomplets" + +#: library/ctypes.rst:904 +msgid "" +"*Incomplete Types* are structures, unions or arrays whose members are not " +"yet specified. In C, they are specified by forward declarations, which are " +"defined later::" +msgstr "" +"Un *type incomplet* est une structure, une union ou un tableau dont les " +"membres ne sont pas encore définis. C'est l'équivalent d'une déclaration " +"avancée en C, où la définition est fournie plus tard ::" + +#: library/ctypes.rst:915 +msgid "" +"The straightforward translation into ctypes code would be this, but it does " +"not work::" +msgstr "" +"Une traduction naïve, mais invalide, en code *ctypes* ressemblerait à ça ::" + +#: library/ctypes.rst:928 +msgid "" +"because the new ``class cell`` is not available in the class statement " +"itself. In :mod:`ctypes`, we can define the ``cell`` class and set the :attr:" +"`_fields_` attribute later, after the class statement::" +msgstr "" +"Cela ne fonctionne pas parce que la nouvelle ``class cell`` n'est pas " +"accessible dans la définition de la classe elle-même. Dans le module :mod:" +"`ctypes`, on définit la classe ``cell`` et on définira les :attr:`_fields_` " +"plus tard, après avoir défini la classe ::" + +#: library/ctypes.rst:940 +msgid "" +"Let's try it. We create two instances of ``cell``, and let them point to " +"each other, and finally follow the pointer chain a few times::" +msgstr "" +"Essayons. Nous créons deux instances de ``cell``, les faisons pointer l'une " +"sur l'autre et enfin nous suivons quelques maillons de la chaîne de " +"pointeurs ::" + +#: library/ctypes.rst:961 +msgid "Callback functions" +msgstr "Fonctions de rappel" + +#: library/ctypes.rst:963 +msgid "" +":mod:`ctypes` allows creating C callable function pointers from Python " +"callables. These are sometimes called *callback functions*." +msgstr "" +":mod:`ctypes` permet de créer des pointeurs de fonctions appelables par des " +"appelables Python. On les appelle parfois *fonctions de rappel*." + +#: library/ctypes.rst:966 +msgid "" +"First, you must create a class for the callback function. The class knows " +"the calling convention, the return type, and the number and types of " +"arguments this function will receive." +msgstr "" +"Tout d'abord, il faut créer une classe pour la fonction de rappel. La classe " +"connaît la convention d'appel, le type de retour ainsi que le nombre et le " +"type de paramètres que la fonction accepte." + +#: library/ctypes.rst:970 +msgid "" +"The :func:`CFUNCTYPE` factory function creates types for callback functions " +"using the ``cdecl`` calling convention. On Windows, the :func:`WINFUNCTYPE` " +"factory function creates types for callback functions using the ``stdcall`` " +"calling convention." +msgstr "" +"La fabrique :func:`CFUNCTYPE` crée un type pour les fonctions de rappel qui " +"suivent la convention d'appel ``cdecl``. En Windows, c'est la fabrique :func:" +"`WINFUNCTYPE` qui crée un type pour les fonctions de rappel qui suivent la " +"convention d'appel ``stdcall``." + +#: library/ctypes.rst:975 +msgid "" +"Both of these factory functions are called with the result type as first " +"argument, and the callback functions expected argument types as the " +"remaining arguments." +msgstr "" +"Le premier paramètre de ces deux fonctions est le type de retour, et les " +"suivants sont les types des arguments qu'attend la fonction de rappel." + +#: library/ctypes.rst:979 +msgid "" +"I will present an example here which uses the standard C library's :c:func:" +"`qsort` function, that is used to sort items with the help of a callback " +"function. :c:func:`qsort` will be used to sort an array of integers::" +msgstr "" +"Intéressons-nous à un exemple tiré de la bibliothèque standard C : la " +"fonction :c:func:`qsort`. Celle-ci permet de classer des éléments par " +"l'emploi d'une fonction de rappel. Nous allons utiliser :c:func:`qsort` pour " +"ordonner un tableau d'entiers ::" + +#: library/ctypes.rst:989 +msgid "" +":func:`qsort` must be called with a pointer to the data to sort, the number " +"of items in the data array, the size of one item, and a pointer to the " +"comparison function, the callback. The callback will then be called with two " +"pointers to items, and it must return a negative integer if the first item " +"is smaller than the second, a zero if they are equal, and a positive integer " +"otherwise." +msgstr "" +":func:`qsort` doit être appelée avec un pointeur vers la donnée à ordonner, " +"le nombre d'éléments dans la donnée, la taille d'un élément et un pointeur " +"vers le comparateur, c.-à-d. la fonction de rappel. Cette fonction sera " +"invoquée avec deux pointeurs sur deux éléments et doit renvoyer un entier " +"négatif si le premier élément est plus petit que le second, zéro s'ils sont " +"égaux et un entier positif sinon." + +#: library/ctypes.rst:995 +msgid "" +"So our callback function receives pointers to integers, and must return an " +"integer. First we create the ``type`` for the callback function::" +msgstr "" +"Ainsi notre fonction de rappel reçoit des pointeurs vers des entiers et doit " +"renvoyer un entier. Créons d'abord le ``type`` pour la fonction de rappel ::" + +#: library/ctypes.rst:1001 +msgid "" +"To get started, here is a simple callback that shows the values it gets " +"passed::" +msgstr "" +"Pour commencer, voici une fonction de rappel simple qui affiche les valeurs " +"qu'on lui passe ::" + +#: library/ctypes.rst:1011 +msgid "The result::" +msgstr "Résultat ::" + +#: library/ctypes.rst:1021 +msgid "Now we can actually compare the two items and return a useful result::" +msgstr "" +"À présent, comparons pour de vrai les deux entiers et renvoyons un résultat " +"utile ::" + +#: library/ctypes.rst:1036 +msgid "As we can easily check, our array is sorted now::" +msgstr "" +"Et comme il est facile de le voir, notre tableau est désormais classé ::" + +#: library/ctypes.rst:1043 +msgid "" +"The function factories can be used as decorator factories, so we may as well " +"write::" +msgstr "" +"Ces fonctions peuvent aussi être utilisées comme des décorateurs ; il est " +"donc possible d'écrire ::" + +#: library/ctypes.rst:1061 +msgid "" +"Make sure you keep references to :func:`CFUNCTYPE` objects as long as they " +"are used from C code. :mod:`ctypes` doesn't, and if you don't, they may be " +"garbage collected, crashing your program when a callback is made." +msgstr "" +"Prenez garde à bien conserver une référence à un objet :func:`CFUNCTYPE` " +"tant que celui-ci est utilisé par le code C. :mod:`ctypes` ne le fait pas " +"tout seul et, si vous ne le faites pas, le ramasse-miette pourrait les " +"libérer, ce qui fera planter votre programme quand un appel sera fait." + +#: library/ctypes.rst:1065 +msgid "" +"Also, note that if the callback function is called in a thread created " +"outside of Python's control (e.g. by the foreign code that calls the " +"callback), ctypes creates a new dummy Python thread on every invocation. " +"This behavior is correct for most purposes, but it means that values stored " +"with :class:`threading.local` will *not* survive across different callbacks, " +"even when those calls are made from the same C thread." +msgstr "" +"Notez aussi que si la fonction de rappel est appelée dans un fil d'exécution " +"créé hors de Python (p. ex. par du code externe qui appelle la fonction de " +"rappel), *ctypes* crée un nouveau fil Python « creux » à chaque fois. Ce " +"comportement est acceptable pour la plupart des cas d'utilisation, mais cela " +"implique que les valeurs stockées avec :class:`threading.local` ne seront " +"*pas* persistantes d'un appel à l'autre, même si les appels proviennent du " +"même fil d'exécution C." + +#: library/ctypes.rst:1075 +msgid "Accessing values exported from dlls" +msgstr "Accès aux variables exportées depuis une DLL" + +#: library/ctypes.rst:1077 +msgid "" +"Some shared libraries not only export functions, they also export variables. " +"An example in the Python library itself is the :c:data:`Py_OptimizeFlag`, an " +"integer set to 0, 1, or 2, depending on the :option:`-O` or :option:`-OO` " +"flag given on startup." +msgstr "" +"Certaines bibliothèques ne se contentent pas d'exporter des fonctions, elles " +"exportent aussi des variables. Par exemple, la bibliothèque Python exporte :" +"c:data:`Py_OptimizeFlag`, un entier valant 0, 1, ou 2 selon que l'option :" +"option:`-O` ou :option:`-OO` soit donnée au démarrage." + +#: library/ctypes.rst:1082 +msgid "" +":mod:`ctypes` can access values like this with the :meth:`in_dll` class " +"methods of the type. *pythonapi* is a predefined symbol giving access to " +"the Python C api::" +msgstr "" +":mod:`ctypes` peut accéder à ce type de valeurs avec les méthodes de classe :" +"meth:`in_dll` du type considéré. *pythonapi* est un symbole prédéfini qui " +"donne accès à l'API C Python ::" + +#: library/ctypes.rst:1091 +msgid "" +"If the interpreter would have been started with :option:`-O`, the sample " +"would have printed ``c_long(1)``, or ``c_long(2)`` if :option:`-OO` would " +"have been specified." +msgstr "" +"Si l'interpréteur est lancé avec :option:`-O`, l'exemple affiche " +"``c_long(1)`` et ``c_long(2)`` avec :option:`-OO`." + +#: library/ctypes.rst:1095 +msgid "" +"An extended example which also demonstrates the use of pointers accesses " +"the :c:data:`PyImport_FrozenModules` pointer exported by Python." +msgstr "" +"Le pointeur :c:data:`PyImport_FrozenModules` exposé par Python est un autre " +"exemple complet de l'utilisation de pointeurs." + +#: library/ctypes.rst:1098 +msgid "Quoting the docs for that value:" +msgstr "Citons la documentation :" + +#: library/ctypes.rst:1100 +#, fuzzy +msgid "" +"This pointer is initialized to point to an array of :c:struct:`_frozen` " +"records, terminated by one whose members are all ``NULL`` or zero. When a " +"frozen module is imported, it is searched in this table. Third-party code " +"could play tricks with this to provide a dynamically created collection of " +"frozen modules." +msgstr "" +"Ce pointeur est initialisé de manière à pointer sur un tableau d'entrées de :" +"c:type:`struct _frozen`, dont tous les membres de la dernière valent " +"``NULL`` ou zéro. Quand un module figé est importé, il est cherché dans ce " +"tableau. Du code tiers peut jouer avec pour construire dynamiquement une " +"collection de module figés." + +#: library/ctypes.rst:1105 +msgid "" +"So manipulating this pointer could even prove useful. To restrict the " +"example size, we show only how this table can be read with :mod:`ctypes`::" +msgstr "" +"Donc manipuler ce pointeur peut même se révéler utile. Pour limiter la " +"taille de l'exemple, nous nous bornons à montrer comment lire ce tableau " +"avec :mod:`ctypes` ::" + +#: library/ctypes.rst:1117 +#, fuzzy +msgid "" +"We have defined the :c:struct:`_frozen` data type, so we can get the pointer " +"to the table::" +msgstr "" +"Le type de donnée :c:type:`struct _frozen` ayant été défini, nous pouvons " +"récupérer le pointeur vers le tableau ::" + +#: library/ctypes.rst:1124 +msgid "" +"Since ``table`` is a ``pointer`` to the array of ``struct_frozen`` records, " +"we can iterate over it, but we just have to make sure that our loop " +"terminates, because pointers have no size. Sooner or later it would probably " +"crash with an access violation or whatever, so it's better to break out of " +"the loop when we hit the ``NULL`` entry::" +msgstr "" +"Puisque ``table`` est un ``pointer`` vers un tableau d'entrées de " +"``struct_frozen``, il est possible d'itérer dessus, mais il faut être " +"certain que la boucle se termine, car les pointeurs n'ont pas de taille. Tôt " +"ou tard, il planterait probablement avec une erreur de segmentation ou " +"autre, donc mieux vaut sortir de la boucle quand on lit l'entrée ``NULL`` ::" + +#: library/ctypes.rst:1142 +msgid "" +"The fact that standard Python has a frozen module and a frozen package " +"(indicated by the negative ``size`` member) is not well known, it is only " +"used for testing. Try it out with ``import __hello__`` for example." +msgstr "" +"Le fait que le standard Python possède un module et un paquet figés " +"(indiqués par la valeur négative du membre *size*) est peu connu, cela ne " +"sert qu'aux tests. Essayez avec ``import __hello__`` par exemple." + +#: library/ctypes.rst:1150 +msgid "Surprises" +msgstr "Pièges" + +#: library/ctypes.rst:1152 +msgid "" +"There are some edges in :mod:`ctypes` where you might expect something other " +"than what actually happens." +msgstr "" +"Il y a quelques cas tordus dans :mod:`ctypes` où on peut s'attendre à un " +"résultat différent de la réalité." + +#: library/ctypes.rst:1155 +msgid "Consider the following example::" +msgstr "Examinons l'exemple suivant ::" + +#: library/ctypes.rst:1175 +msgid "" +"Hm. We certainly expected the last statement to print ``3 4 1 2``. What " +"happened? Here are the steps of the ``rc.a, rc.b = rc.b, rc.a`` line above::" +msgstr "" +"Diantre. On s'attendait certainement à ce que le dernier résultat affiche " +"``3 4 1 2``. Que s'est-il passé ? Les étapes de la ligne ``rc.a, rc.b = rc." +"b, rc.a`` ci-dessus sont les suivantes ::" + +#: library/ctypes.rst:1183 +msgid "" +"Note that ``temp0`` and ``temp1`` are objects still using the internal " +"buffer of the ``rc`` object above. So executing ``rc.a = temp0`` copies the " +"buffer contents of ``temp0`` into ``rc`` 's buffer. This, in turn, changes " +"the contents of ``temp1``. So, the last assignment ``rc.b = temp1``, doesn't " +"have the expected effect." +msgstr "" +"Les objets ``temp0`` et ``temp1`` utilisent encore le tampon interne de " +"l'objet ``rc`` ci-dessus. Donc exécuter ``rc.a = temp0`` copie le contenu du " +"tampon de ``temp0`` dans celui de ``rc``. Ce qui, par ricochet, modifie le " +"contenu de ``temp1``. Et donc, la dernière affectation, ``rc.b = temp1``, " +"n'a pas l'effet escompté." + +#: library/ctypes.rst:1189 +msgid "" +"Keep in mind that retrieving sub-objects from Structure, Unions, and Arrays " +"doesn't *copy* the sub-object, instead it retrieves a wrapper object " +"accessing the root-object's underlying buffer." +msgstr "" +"Gardez en tête qu'accéder au sous-objet depuis une *Structure*, une *Union* " +"ou un *Array* ne copie *pas* le sous-objet, mais crée un objet interface qui " +"accède au tampon sous-jacent de l'objet initial." + +#: library/ctypes.rst:1193 +msgid "" +"Another example that may behave differently from what one would expect is " +"this::" +msgstr "" +"Un autre exemple de comportement *a priori* inattendu est le suivant ::" + +#: library/ctypes.rst:1205 +msgid "" +"Objects instantiated from :class:`c_char_p` can only have their value set to " +"bytes or integers." +msgstr "" +"La valeur d'une instance de :class:`c_char_p` ne peut être initialisée " +"qu'avec un octet ou un entier." + +#: library/ctypes.rst:1208 +msgid "" +"Why is it printing ``False``? ctypes instances are objects containing a " +"memory block plus some :term:`descriptor`\\s accessing the contents of the " +"memory. Storing a Python object in the memory block does not store the " +"object itself, instead the ``contents`` of the object is stored. Accessing " +"the contents again constructs a new Python object each time!" +msgstr "" +"Pourquoi cela affiche-t'il ``False`` ? Les instances *ctypes* sont des " +"objets qui contiennent un bloc mémoire et des :term:`descriptor` qui donnent " +"accès au contenu du ce bloc. Stocker un objet Python dans le bloc mémoire ne " +"stocke pas l'objet même ; seuls ses ``contents`` le sont. Accéder au " +"``contents`` crée un nouvel objet Python à chaque fois !" + +#: library/ctypes.rst:1218 +msgid "Variable-sized data types" +msgstr "Types de données à taille flottante" + +#: library/ctypes.rst:1220 +msgid "" +":mod:`ctypes` provides some support for variable-sized arrays and structures." +msgstr "" +":mod:`ctypes` assure la prise en charge des tableaux et des structures à " +"taille flottante." + +#: library/ctypes.rst:1222 +msgid "" +"The :func:`resize` function can be used to resize the memory buffer of an " +"existing ctypes object. The function takes the object as first argument, " +"and the requested size in bytes as the second argument. The memory block " +"cannot be made smaller than the natural memory block specified by the " +"objects type, a :exc:`ValueError` is raised if this is tried::" +msgstr "" +"La fonction :func:`resize` permet de redimensionner la taille du tampon " +"mémoire d'un objet *ctypes* existant. Cette fonction prend l'objet comme " +"premier argument et la taille en octets désirée comme second. La taille du " +"tampon mémoire ne peut pas être inférieure à celle occupée par un objet " +"unitaire du type considéré. Une :exc:`ValueError` est levée si c'est le " +"cas ::" + +#: library/ctypes.rst:1242 +msgid "" +"This is nice and fine, but how would one access the additional elements " +"contained in this array? Since the type still only knows about 4 elements, " +"we get errors accessing other elements::" +msgstr "" +"Cela dit, comment accéder aux éléments supplémentaires contenus dans le " +"tableau ? Vu que le type ne connaît que 4 éléments, on obtient une erreur si " +"l'on accède aux suivants ::" + +#: library/ctypes.rst:1254 +msgid "" +"Another way to use variable-sized data types with :mod:`ctypes` is to use " +"the dynamic nature of Python, and (re-)define the data type after the " +"required size is already known, on a case by case basis." +msgstr "" +"Une autre approche pour utiliser des types de donnée à taille flottante " +"avec :mod:`ctypes` consiste à tirer profit de la nature intrinsèquement " +"dynamique de Python et de (re)définir le type de donnée une fois que la " +"taille demandée est connue, au cas-par-cas." + +#: library/ctypes.rst:1262 +msgid "ctypes reference" +msgstr "Référence du module" + +#: library/ctypes.rst:1268 +msgid "Finding shared libraries" +msgstr "Recherche de bibliothèques partagées" + +#: library/ctypes.rst:1270 +msgid "" +"When programming in a compiled language, shared libraries are accessed when " +"compiling/linking a program, and when the program is run." +msgstr "" +"Les langages compilés ont besoin d'accéder aux bibliothèques partagées au " +"moment de la compilation, de l'édition de liens et pendant l'exécution du " +"programme." + +#: library/ctypes.rst:1273 +msgid "" +"The purpose of the :func:`find_library` function is to locate a library in a " +"way similar to what the compiler or runtime loader does (on platforms with " +"several versions of a shared library the most recent should be loaded), " +"while the ctypes library loaders act like when a program is run, and call " +"the runtime loader directly." +msgstr "" +"Le but de la fonction :func:`find_library` est de trouver une bibliothèque " +"de la même façon que le ferait le compilateur ou le chargeur (sur les plates-" +"formes avec plusieurs versions de la même bibliothèque, la plus récente est " +"chargée), alors que les chargeurs de bibliothèques de *ctypes* se comportent " +"de la même façon qu'un programme qui s'exécute, et appellent directement le " +"chargeur." + +#: library/ctypes.rst:1279 +msgid "" +"The :mod:`ctypes.util` module provides a function which can help to " +"determine the library to load." +msgstr "" +"Le module :mod:`ctypes.util` fournit une fonction pour déterminer quelle " +"bibliothèque charger." + +#: library/ctypes.rst:1287 +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 " +"number (this is the form used for the posix linker option :option:`!-l`). " +"If no library can be found, returns ``None``." +msgstr "" +"Tente de trouver une bibliothèque et en renvoie le chemin. *name* est le nom " +"de la bibliothèque sans préfixe — comme *lib* — ni suffixe — comme ``.so``, " +"``.dylib`` ou un numéro de version (c.-à-d. la même forme que l'option POSIX " +"de l'éditeur de lien :option:`!-l`). Si la fonction ne parvient pas à " +"trouver de bibliothèque, elle renvoie ``None``." + +#: library/ctypes.rst:1935 +msgid "The exact functionality is system dependent." +msgstr "Le mode opératoire exact dépend du système." + +#: library/ctypes.rst:1294 +msgid "" +"On Linux, :func:`find_library` tries to run external programs (``/sbin/" +"ldconfig``, ``gcc``, ``objdump`` and ``ld``) to find the library file. It " +"returns the filename of the library file." +msgstr "" +"Sous Linux, :func:`find_library` essaye de lancer des programmes externes " +"(``/sbin/ldconfig``, ``gcc``, ``objdump`` et ``ld``) pour trouver la " +"bibliothèque. Elle renvoie le nom de la bibliothèque sur le disque." + +#: library/ctypes.rst:1298 +msgid "" +"On Linux, the value of the environment variable ``LD_LIBRARY_PATH`` is used " +"when searching for libraries, if a library cannot be found by any other " +"means." +msgstr "" +"Sous Linux, si les autres moyens échouent, la fonction utilise la variable " +"d'environnement ``LD_LIBRARY_PATH`` pour trouver la bibliothèque." + +#: library/ctypes.rst:1302 +msgid "Here are some examples::" +msgstr "Voici quelques exemples :" + +#: library/ctypes.rst:1313 +msgid "" +"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 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 :" + +#: library/ctypes.rst:1327 +msgid "" +"On Windows, :func:`find_library` searches along the system search path, and " +"returns the full pathname, but since there is no predefined naming scheme a " +"call like ``find_library(\"c\")`` will fail and return ``None``." +msgstr "" +"Sous Windows, :func:`find_library` examine le chemin de recherche du système " +"et renvoie le chemin complet de la bibliothèque, mais comme il n'existe pas " +"de convention de nommage, des appels comme ``find_library(\"c\")`` échouent " +"et renvoient ``None``." + +#: library/ctypes.rst:1331 +msgid "" +"If wrapping a shared library with :mod:`ctypes`, it *may* be better to " +"determine the shared library name at development time, and hardcode that " +"into the wrapper module instead of using :func:`find_library` to locate the " +"library at runtime." +msgstr "" +"Si vous encapsulez une bibliothèque partagée avec :mod:`ctypes`, il est " +"*probablement* plus judicieux de déterminer le chemin de cette bibliothèque " +"lors du développement et de l'écrire en dur dans le module d'encapsulation, " +"plutôt que d'utiliser :func:`find_library` pour la trouver lors de " +"l'exécution." + +#: library/ctypes.rst:1339 +msgid "Loading shared libraries" +msgstr "Chargement des bibliothèques partagées" + +#: library/ctypes.rst:1341 +msgid "" +"There are several ways to load shared libraries into the Python process. " +"One way is to instantiate one of the following classes:" +msgstr "" +"Il y a plusieurs moyens de charger une bibliothèque partagée dans un " +"processus Python. L'un d'entre eux consiste à instancier une des classes " +"suivantes :" + +#: library/ctypes.rst:1347 +#, fuzzy +msgid "" +"Instances of this class represent loaded shared libraries. Functions in " +"these libraries use the standard C calling convention, and are assumed to " +"return :c:expr:`int`." +msgstr "" +"Une instance de cette classe représente une bibliothèque partagée déjà " +"chargée. Les fonctions de cette bibliothèque utilisent la convention d'appel " +"C standard et doivent renvoyer un :c:type:`int`." + +#: library/ctypes.rst:1351 +msgid "" +"On Windows creating a :class:`CDLL` instance may fail even if the DLL name " +"exists. When a dependent DLL of the loaded DLL is not found, a :exc:" +"`OSError` error is raised with the message *\"[WinError 126] The specified " +"module could not be found\".* This error message does not contain the name " +"of the missing DLL because the Windows API does not return this information " +"making this error hard to diagnose. To resolve this error and determine " +"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:1363 +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:1369 +msgid "" +"Windows only: Instances of this class represent loaded shared libraries, " +"functions in these libraries use the ``stdcall`` calling convention, and are " +"assumed to return the windows specific :class:`HRESULT` code. :class:" +"`HRESULT` values contain information specifying whether the function call " +"failed or succeeded, together with additional error code. If the return " +"value signals a failure, an :class:`OSError` is automatically raised." +msgstr "" +"En Windows seulement : une instance de cette classe représente une " +"bibliothèque partagée déjà chargée. Les fonctions de cette bibliothèque " +"utilisent la convention d'appel *stdcall*, et doivent renvoyer un code :" +"class:`HRESULT` (propre à Windows). Les valeurs de :class:`HRESULT` " +"contiennent des informations précisant si l'appel de la fonction a échoué ou " +"s'il a réussi, ainsi qu'un code d'erreur supplémentaire. Si la valeur de " +"retour signale un échec, une :class:`OSError` est levée automatiquement." + +#: library/ctypes.rst:1376 +msgid ":exc:`WindowsError` used to be raised." +msgstr ":exc:`WindowsError` était levée auparavant." + +#: library/ctypes.rst:1382 +#, fuzzy +msgid "" +"Windows only: Instances of this class represent loaded shared libraries, " +"functions in these libraries use the ``stdcall`` calling convention, and are " +"assumed to return :c:expr:`int` by default." +msgstr "" +"En Windows seulement : une instance de cette classe représente une " +"bibliothèque partagée déjà chargée. Les fonctions de cette bibliothèque " +"utilisent la convention d'appel *stdcall* et doivent renvoyer par défaut un :" +"c:type:`int`." + +#: library/ctypes.rst:1386 +msgid "" +"The Python :term:`global interpreter lock` is released before calling any " +"function exported by these libraries, and reacquired afterwards." +msgstr "" +"Le :term:`verrou global de l'interpréteur ` Python " +"est relâché avant chaque appel d'une fonction exposée par ces bibliothèques " +"et ré-activé après." + +#: library/ctypes.rst:1392 +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 " +"function execution the Python error flag is checked. If the error flag is " +"set, a Python exception is raised." +msgstr "" +"Cette classe est identique à :class:`CDLL`, à ceci près que le GIL n'est " +"*pas* relâché pendant l'appel de la fonction, et, qu'au terme de l'appel, le " +"drapeau d'erreur Python est vérifié. Si celui-ci est activé, une exception " +"Python est levée." + +#: library/ctypes.rst:1397 +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:1399 +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 " +"handle to an already loaded shared library, it can be passed as the " +"``handle`` named parameter, otherwise the underlying platforms ``dlopen`` or " +"``LoadLibrary`` function is used to load the library into the process, and " +"to get a handle to it." +msgstr "" +"Toutes ces classes peuvent être instanciées en les appelant avec le chemin " +"de la bibliothèque partagée comme unique argument. Il est aussi possible de " +"passer un lien vers une bibliothèque déjà chargée en utilisant le paramètre " +"``handle``. Sinon, les fonctions ``dlopen`` ou ``LoadLibrary`` de la plate-" +"forme sous-jacente permettent de charger la bibliothèque dans le processus, " +"et d'en obtenir un lien." + +#: library/ctypes.rst:1406 +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 " +"ignored. On posix systems, RTLD_NOW is always added, and is not " +"configurable." +msgstr "" +"Le mode de chargement de la bibliothèque est défini par le paramètre *mode*. " +"Pour plus de détails, référez-vous à l'entrée :manpage:`dlopen(3)` du " +"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:1411 +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:" +"`ctypes` maintains a thread-local copy of the systems :data:`errno` " +"variable; if you call foreign functions created with ``use_errno=True`` then " +"the :data:`errno` value before the function call is swapped with the ctypes " +"private copy, the same happens immediately after the function call." +msgstr "" +"Le paramètre *use_errno*, lorsque défini à vrai, active un mécanisme de " +"*ctypes* qui permet d'accéder au numéro d'erreur :data:`errno` du système de " +"manière sécurisée. :mod:`ctypes` maintient une copie de :data:`errno` du " +"système dans chaque fil d'exécution. Si vous appelez des fonctions externes " +"créées avec ``use_errno=True``, la valeur de :data:`errno` avant l'appel de " +"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:1418 +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 " +"private copy to a new value and returns the former value." +msgstr "" +"La fonction :func:`ctypes.get_errno` renvoie la valeur de la copie privée de " +"*ctypes*. La fonction :func:`ctypes.set_errno` affecte une nouvelle valeur à " +"la copie privée et renvoie l'ancienne valeur." + +#: library/ctypes.rst:1422 +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 :" +"func:`SetLastError` Windows API functions; :func:`ctypes.get_last_error` " +"and :func:`ctypes.set_last_error` are used to request and change the ctypes " +"private copy of the windows error code." +msgstr "" +"Définir le paramètre *use_last_error* à vrai active le même mécanisme pour " +"le code d'erreur de Windows qui est géré par les fonctions :func:" +"`GetLastError` et :func:`SetLastError` de l'API Windows ; :func:`ctypes." +"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:1428 +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 " +"Win32 API ``LoadLibraryEx`` flags parameter. When omitted, the default is to " +"use the flags that result in the most secure DLL load to avoiding issues " +"such as DLL hijacking. Passing the full path to the DLL is the safest way to " +"ensure the correct library and dependencies are loaded." +msgstr "" +"Sous Windows, le paramètre *winmode* définit comment charger la bibliothèque " +"(puisque *mode* est ignoré). Il accepte toute valeur compatible avec le " +"drapeau ``LoadLibraryEx`` de l'API Win32. Lorsqu'il est omis, les drapeaux " +"par défaut sont ceux qui chargent la DLL de la manière la plus sécurisée " +"possible, afin d'éviter des problèmes comme le détournement de DLL. Passer " +"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:1435 +msgid "Added *winmode* parameter." +msgstr "Ajout du paramètre *winmode*." + +#: library/ctypes.rst:1442 +msgid "" +"Flag to use as *mode* parameter. On platforms where this flag is not " +"available, it is defined as the integer zero." +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:1449 +msgid "" +"Flag to use as *mode* parameter. On platforms where this is not available, " +"it is the same as *RTLD_GLOBAL*." +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:1456 +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*." +msgstr "" +"Mode de chargement par défaut des bibliothèques partagées. Vaut " +"*RTLD_GLOBAL* sur OSX 10.3 et *RTLD_LOCAL* sur les autres systèmes " +"d'exploitation." + +#: library/ctypes.rst:1459 +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 " +"that accessing the function through an attribute caches the result and " +"therefore accessing it repeatedly returns the same object each time. On the " +"other hand, accessing it through an index returns a new object each time::" +msgstr "" +"Les instances de ces classes n'ont pas de méthodes publiques ; on accède aux " +"fonctions de la bibliothèque partagée par attribut ou par indiçage. Notez " +"que les résultats des accès par attribut sont mis en cache, et donc des " +"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:1472 +msgid "" +"The following public attributes are available, their name starts with an " +"underscore to not clash with exported function names:" +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:1478 +msgid "The system handle used to access the library." +msgstr "Le lien système d'accès à la bibliothèque." + +#: library/ctypes.rst:1483 +msgid "The name of the library passed in the constructor." +msgstr "Nom de la bibliothèque donné au constructeur." + +#: library/ctypes.rst:1485 +msgid "" +"Shared libraries can also be loaded by using one of the prefabricated " +"objects, which are instances of the :class:`LibraryLoader` class, either by " +"calling the :meth:`LoadLibrary` method, or by retrieving the library as " +"attribute of the loader instance." +msgstr "" +"Il est possible de charger une bibliothèque partagée soit en utilisant une " +"instance de la classe :class:`LibraryLoader`, soit en appelant la méthode :" +"meth:`LoadLibrary`, soit en récupérant la bibliothèque comme attribut de " +"l'instance du chargeur." + +#: library/ctypes.rst:1493 +msgid "" +"Class which loads shared libraries. *dlltype* should be one of the :class:" +"`CDLL`, :class:`PyDLL`, :class:`WinDLL`, or :class:`OleDLL` types." +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:1496 +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 " +"cached, so repeated attribute accesses return the same library each time." +msgstr "" +":meth:`__getattr__` a un comportement particulier : elle charge une " +"bibliothèque quand on accède à un attribut du chargeur. Le résultat est mis " +"en cache, donc des accès consécutifs renvoient la même bibliothèque à chaque " +"fois." + +#: library/ctypes.rst:1502 +msgid "" +"Load a shared library into the process and return it. This method always " +"returns a new instance of the library." +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:1506 +msgid "These prefabricated library loaders are available:" +msgstr "Plusieurs chargeurs sont fournis :" + +#: library/ctypes.rst:1511 +msgid "Creates :class:`CDLL` instances." +msgstr "Pour créer des instances de :class:`CDLL`." + +#: library/ctypes.rst:1517 +msgid "Windows only: Creates :class:`WinDLL` instances." +msgstr "Pour créer des instances de :class:`WinDLL` (uniquement en Windows)." + +#: library/ctypes.rst:1523 +msgid "Windows only: Creates :class:`OleDLL` instances." +msgstr "Pour créer des instances de :class:`OleDLL` (uniquement en Windows)." + +#: library/ctypes.rst:1529 +msgid "Creates :class:`PyDLL` instances." +msgstr "Pour créer des instances de :class:`PyDLL`." + +#: library/ctypes.rst:1532 +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:1538 +#, fuzzy +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:expr:" +"`int`, which is of course not always the truth, so you have to assign the " +"correct :attr:`restype` attribute to use these functions." +msgstr "" +"Une instance de :class:`PyDLL` dont les attributs sont les fonctions " +"exportées par l'API C Python. Toutes ces fonctions sont supposées renvoyer " +"un :c:type:`int` C, ce qui n'est bien entendu pas toujours le cas. Il faut " +"donc définir vous-même le bon attribut :attr:`restype` pour pouvoir les " +"utiliser." + +#: library/ctypes.rst:1543 +msgid "" +"Raises an :ref:`auditing event ` ``ctypes.dlopen`` with argument " +"``name``." +msgstr "" +"Lève un :ref:`évènement d'audit ` ``ctypes.dlopen``, avec en " +"argument ``name``." + +#: library/ctypes.rst:1545 +msgid "" +"Loading a library through any of these objects raises an :ref:`auditing " +"event ` ``ctypes.dlopen`` with string argument ``name``, the name " +"used to load the library." +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``." + +#: library/ctypes.rst:1549 +#, fuzzy +msgid "" +"Raises an :ref:`auditing event ` ``ctypes.dlsym`` with arguments " +"``library``, ``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``." + +#: library/ctypes.rst:1551 +msgid "" +"Accessing a function on a loaded library raises an auditing event ``ctypes." +"dlsym`` with arguments ``library`` (the library object) and ``name`` (the " +"symbol's name as a string or integer)." +msgstr "" +"Accéder à une fonction d'une bibliothèque lève un évènement d'audit ``ctypes." +"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:1555 +#, fuzzy +msgid "" +"Raises an :ref:`auditing event ` ``ctypes.dlsym/handle`` with " +"arguments ``handle``, ``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``." + +#: library/ctypes.rst:1557 +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 " +"arguments ``handle`` (the raw library handle) and ``name``." +msgstr "" +"Si seul le lien sur la bibliothèque, et non l'objet, est disponible, accéder " +"à 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:1564 +msgid "Foreign functions" +msgstr "Fonctions externes" + +#: library/ctypes.rst:1566 +msgid "" +"As explained in the previous section, foreign functions can be accessed as " +"attributes of loaded shared libraries. The function objects created in this " +"way by default accept any number of arguments, accept any ctypes data " +"instances as arguments, and return the default result type specified by the " +"library loader. They are instances of a private class:" +msgstr "" +"Comme expliqué dans la section précédente, on peut accéder aux fonctions " +"externes au travers des attributs des bibliothèques partagées. Un objet " +"fonction créé de cette façon accepte par défaut un nombre quelconque " +"d'arguments qui peuvent être de n'importe quel type de données *ctypes*. Il " +"renvoie le type par défaut du chargeur de la bibliothèque. Ce sont des " +"instances de la classe privée :" + +#: library/ctypes.rst:1575 +msgid "Base class for C callable foreign functions." +msgstr "Classe de base pour les fonctions externes C." + +#: library/ctypes.rst:1577 +msgid "" +"Instances of foreign functions are also C compatible data types; they " +"represent C function pointers." +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:1580 +msgid "" +"This behavior can be customized by assigning to special attributes of the " +"foreign function object." +msgstr "" +"Son comportement peut-être personnalisé en réaffectant les attributs " +"spécifiques de l'objet représentant la fonction externe." + +#: library/ctypes.rst:1585 +#, fuzzy +msgid "" +"Assign a ctypes type to specify the result type of the foreign function. Use " +"``None`` for :c:expr:`void`, a function not returning anything." +msgstr "" +"Fait correspondre le type de retour de la fonction externe à un type " +"*ctypes*. Dans le cas où la fonction ne renvoie rien (:c:type:`void`), " +"utilisez ``None``." + +#: library/ctypes.rst:1588 +#, fuzzy +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:expr:`int`, and the " +"callable will be called with this integer, allowing further processing or " +"error checking. Using this is deprecated, for more flexible post processing " +"or error checking use a ctypes data type as :attr:`restype` and assign a " +"callable to the :attr:`errcheck` attribute." +msgstr "" +"Il est aussi possible de passer n'importe quel un objet Python qui n'est pas " +"un type *ctypes* pourvu qu'il soit appelable. Dans ce cas, la fonction est " +"censée renvoyer un :c:type:`int` C et l'appelable sera appelé avec cet " +"entier, ce qui permet ainsi de faire des actions supplémentaires comme " +"vérifier un code d'erreur. Ce mécanisme est obsolète ; une façon plus souple " +"de faire des actions supplémentaires ou de la vérification consiste à " +"affecter un type *ctypes* à :attr:`restype` et à affecter un appelable à " +"l'attribut :attr:`errcheck`." + +#: library/ctypes.rst:1597 +msgid "" +"Assign a tuple of ctypes types to specify the argument types that the " +"function accepts. Functions using the ``stdcall`` calling convention can " +"only be called with the same number of arguments as the length of this " +"tuple; functions using the C calling convention accept additional, " +"unspecified arguments as well." +msgstr "" +"Fait correspondre le type des arguments que la fonction accepte avec un *n*-" +"uplet de types *ctypes*. Les fonctions qui utilisent la convention d'appel " +"``stdcall`` ne peuvent être appelées qu'avec le même nombre d'arguments que " +"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:1603 +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, " +"this method allows adapting the actual argument to an object that the " +"foreign function accepts. For example, a :class:`c_char_p` item in the :" +"attr:`argtypes` tuple will convert a string passed as argument into a bytes " +"object using ctypes conversion rules." +msgstr "" +"À l'appel d'une fonction externe, chaque argument est passé à la méthode de " +"classe :meth:`from_param` de l'élément correspondant dans le *n*-uplet des :" +"attr:`argtypes`. Cette méthode convertit l'argument initial en un objet que " +"la fonction externe peut comprendre. Par exemple, un :class:`c_char_p` dans " +"le *n*-uplet des :attr:`argtypes` va transformer la chaîne de caractères " +"passée en argument en un objet chaîne d'octets selon les règles de " +"conversion *ctypes*." + +#: library/ctypes.rst:1610 +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 " +"usable as argument (integer, string, ctypes instance). This allows defining " +"adapters that can adapt custom objects as function parameters." +msgstr "" +"Nouveau : il est maintenant possible de mettre des objets qui ne sont pas " +"des types de *ctypes* dans les *argtypes*, mais ceux-ci doivent avoir une " +"méthode :meth:`from_param` renvoyant une valeur qui peut être utilisée comme " +"un argument (entier, chaîne de caractères ou instance *ctypes*). Ceci permet " +"de créer des adaptateurs qui convertissent des objets arbitraires en des " +"paramètres de fonction." + +#: library/ctypes.rst:1617 +msgid "" +"Assign a Python function or another callable to this attribute. The callable " +"will be called with three or more arguments:" +msgstr "" +"Définit une fonction Python ou tout autre appelable qui sera appelé avec " +"trois arguments ou plus :" + +#: library/ctypes.rst:1624 +msgid "" +"*result* is what the foreign function returns, as specified by the :attr:" +"`restype` attribute." +msgstr "" +"*result* est la valeur de retour de la fonction externe, comme défini par " +"l'attribut :attr:`restype`." + +#: library/ctypes.rst:1627 +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." +msgstr "" +"*func* est l'objet représentant la fonction externe elle-même. Cet accesseur " +"permet de réutiliser le même appelable pour vérifier le résultat de " +"plusieurs fonctions ou de faire des actions supplémentaires après leur " +"exécution." + +#: library/ctypes.rst:1631 +msgid "" +"*arguments* is a tuple containing the parameters originally passed to the " +"function call, this allows specializing the behavior on the arguments used." +msgstr "" +"*arguments* est le *n*-uplet qui contient les paramètres initiaux passés à " +"la fonction, ceci permet de spécialiser le comportement des arguments " +"utilisés." + +#: library/ctypes.rst:1635 +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 " +"if the foreign function call failed." +msgstr "" +"L'objet renvoyé par cette fonction est celui renvoyé par l'appel de la " +"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:1642 +msgid "" +"This exception is raised when a foreign function call cannot convert one of " +"the passed arguments." +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:1646 +msgid "" +"Raises an :ref:`auditing event ` ``ctypes.seh_exception`` with " +"argument ``code``." +msgstr "" + +#: library/ctypes.rst:1648 +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 " +"a suitable Python exception. Further, an auditing event ``ctypes." +"seh_exception`` with argument ``code`` will be raised, allowing an audit " +"hook to replace the exception with its own." +msgstr "" +"En Windows, quand un appel à une fonction externe lève une exception système " +"(par exemple, une erreur de segmentation), celle-ci est interceptée pour " +"être remplacée par l'exception Python correspondante. De plus, un évènement " +"d'audit ``ctypes.seh_exception`` est levé avec ``code`` en argument, ce qui " +"permet à un point d'entrée (*hook* en anglais) d'audit de remplacer " +"l'exception par une des siennes." + +#: library/ctypes.rst:1654 +#, fuzzy +msgid "" +"Raises an :ref:`auditing event ` ``ctypes.call_function`` with " +"arguments ``func_pointer``, ``arguments``." +msgstr "" +"Certaines manières d'appeler des fonction externes peuvent lever des " +"évènements d'audit ``ctypes.call_function`` avec ``function pointer`` et " +"``arguments`` comme arguments." + +#: library/ctypes.rst:1656 +msgid "" +"Some ways to invoke foreign function calls may raise an auditing event " +"``ctypes.call_function`` with arguments ``function pointer`` and " +"``arguments``." +msgstr "" +"Certaines manières d'appeler des fonction externes peuvent lever des " +"évènements d'audit ``ctypes.call_function`` avec ``function pointer`` et " +"``arguments`` comme arguments." + +#: library/ctypes.rst:1662 +msgid "Function prototypes" +msgstr "Prototypes de fonction" + +#: library/ctypes.rst:1664 +msgid "" +"Foreign functions can also be created by instantiating function prototypes. " +"Function prototypes are similar to function prototypes in C; they describe a " +"function (return type, argument types, calling convention) without defining " +"an implementation. The factory functions must be called with the desired " +"result type and the argument types of the function, and can be used as " +"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:1675 +msgid "" +"The returned function prototype creates functions that use the standard C " +"calling convention. The function will release the GIL during the call. If " +"*use_errno* is set to true, the ctypes private copy of the system :data:" +"`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:1685 +#, fuzzy +msgid "" +"Windows only: The returned function prototype creates functions that use the " +"``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 "" +"En Windows seulement : renvoie un prototype de fonction qui crée des " +"fonctions qui suivent la convention d'appel standard ``stdcall``, sauf sous " +"Windows CE où :func:`WINFUNCTYPE` équivaut à :func:`CFUNCTYPE`. Les " +"fonctions libèreront le GIL lors de leur exécution. *use_errno* et " +"*use_last_error* ont la même signification que ci-dessus." + +#: library/ctypes.rst:1693 +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:1696 +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:1704 +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:1711 +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:1718 +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:1728 +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:1733 +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:1737 +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:1740 +msgid "*paramflags* must be a tuple of the same length as :attr:`argtypes`." +msgstr "*paramflags* est un *n*-uplet de la même taille que :attr:`argtypes`." + +#: library/ctypes.rst:1742 +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:1745 +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:1749 +msgid "1" +msgstr "1" + +#: library/ctypes.rst:1749 +msgid "Specifies an input parameter to the function." +msgstr "Paramètre d'entrée." + +#: library/ctypes.rst:1752 +msgid "2" +msgstr "2" + +#: library/ctypes.rst:1752 +msgid "Output parameter. The foreign function fills in a value." +msgstr "Paramètre de sortie. La fonction externe va modifier cette valeur." + +#: library/ctypes.rst:1755 +msgid "4" +msgstr "4" + +#: library/ctypes.rst:1755 +msgid "Input parameter which defaults to the integer zero." +msgstr "Paramètre d'entrée, valant 0 par défaut." + +#: library/ctypes.rst:1757 +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:1760 +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:1762 +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:1796 +msgid "Here is the wrapping with :mod:`ctypes`::" +msgstr "L'encapsulation :mod:`ctypes` correspondante est alors ::" + +#: library/ctypes.rst:1781 +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:1787 +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:1805 +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:1810 +msgid "" +"Output parameters can be combined with the :attr:`errcheck` protocol to do " +"further output processing and error checking. The win32 ``GetWindowRect`` " +"api function returns a ``BOOL`` to signal success or failure, so this " +"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:1823 +msgid "" +"If the :attr:`errcheck` function returns the argument tuple it receives " +"unchanged, :mod:`ctypes` continues the normal processing it does on the " +"output parameters. If you want to return a tuple of window coordinates " +"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:1842 +msgid "Utility functions" +msgstr "Fonctions utilitaires" + +#: library/ctypes.rst:1846 +msgid "" +"Returns the address of the memory buffer as integer. *obj* must be an " +"instance of a ctypes type." +msgstr "" + +#: library/ctypes.rst:1849 +msgid "" +"Raises an :ref:`auditing event ` ``ctypes.addressof`` with " +"argument ``obj``." +msgstr "" + +#: library/ctypes.rst:1854 +msgid "" +"Returns the alignment requirements of a ctypes type. *obj_or_type* must be a " +"ctypes type or instance." +msgstr "" + +#: library/ctypes.rst:1860 +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:1864 +msgid "``byref(obj, offset)`` corresponds to this C code::" +msgstr "" + +#: library/ctypes.rst:1868 +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:1874 +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* " +"must be a pointer type, and *obj* must be an object that can be interpreted " +"as a pointer." +msgstr "" + +#: library/ctypes.rst:1882 +msgid "" +"This function creates a mutable character buffer. The returned object is a " +"ctypes array of :class:`c_char`." +msgstr "" + +#: library/ctypes.rst:1885 +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:1888 +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 " +"termination character. An integer can be passed as second argument which " +"allows specifying the size of the array if the length of the bytes should " +"not be used." +msgstr "" + +#: library/ctypes.rst:1893 +msgid "" +"Raises an :ref:`auditing event ` ``ctypes.create_string_buffer`` " +"with arguments ``init``, ``size``." +msgstr "" + +#: library/ctypes.rst:1898 +msgid "" +"This function creates a mutable unicode character buffer. The returned " +"object is a ctypes array of :class:`c_wchar`." +msgstr "" + +#: library/ctypes.rst:1901 +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:1904 +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 " +"is a NUL termination character. An integer can be passed as second argument " +"which allows specifying the size of the array if the length of the string " +"should not be used." +msgstr "" + +#: library/ctypes.rst:1910 +msgid "" +"Raises an :ref:`auditing event ` ``ctypes.create_unicode_buffer`` " +"with arguments ``init``, ``size``." +msgstr "" + +#: library/ctypes.rst:1915 +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:1922 +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:1930 +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 " +"number (this is the form used for the posix linker option :option:`!-l`). " +"If no library can be found, returns ``None``." +msgstr "" + +#: library/ctypes.rst:1941 +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:1945 +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:1952 +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:1959 +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:1965 +msgid "" +"Returns the current value of the ctypes-private copy of the system :data:" +"`errno` variable in the calling thread." +msgstr "" + +#: library/ctypes.rst:1968 +msgid "" +"Raises an :ref:`auditing event ` ``ctypes.get_errno`` with no " +"arguments." +msgstr "" + +#: library/ctypes.rst:1972 +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:1975 +msgid "" +"Raises an :ref:`auditing event ` ``ctypes.get_last_error`` with no " +"arguments." +msgstr "" + +#: library/ctypes.rst:1979 +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:1986 +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:1993 +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:2000 +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:2003 +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:2009 +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 " +"than the native size of the objects type, as given by ``sizeof(type(obj))``, " +"but it is possible to enlarge the buffer." +msgstr "" + +#: library/ctypes.rst:2017 +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:2020 +msgid "" +"Raises an :ref:`auditing event ` ``ctypes.set_errno`` with " +"argument ``errno``." +msgstr "" + +#: library/ctypes.rst:2025 +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:2029 +msgid "" +"Raises an :ref:`auditing event ` ``ctypes.set_last_error`` with " +"argument ``error``." +msgstr "" + +#: library/ctypes.rst:2034 +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:2040 +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:2044 +msgid "" +"Raises an :ref:`auditing event ` ``ctypes.string_at`` with " +"arguments ``address``, ``size``." +msgstr "" + +#: library/ctypes.rst:2049 +msgid "" +"Windows only: this function is probably the worst-named thing in ctypes. It " +"creates an instance of OSError. If *code* is not specified, " +"``GetLastError`` is called to determine the error code. If *descr* is not " +"specified, :func:`FormatError` is called to get a textual description of the " +"error." +msgstr "" + +#: library/ctypes.rst:2055 +msgid "An instance of :exc:`WindowsError` used to be created." +msgstr "" + +#: library/ctypes.rst:2061 +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 " +"characters of the string, otherwise the string is assumed to be zero-" +"terminated." +msgstr "" + +#: library/ctypes.rst:2066 +msgid "" +"Raises an :ref:`auditing event ` ``ctypes.wstring_at`` with " +"arguments ``address``, ``size``." +msgstr "" + +#: library/ctypes.rst:2072 +msgid "Data types" +msgstr "Types de données" + +#: library/ctypes.rst:2077 +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 " +"hold C compatible data; the address of the memory block is returned by the :" +"func:`addressof` helper function. Another instance variable is exposed as :" +"attr:`_objects`; this contains other Python objects that need to be kept " +"alive in case the memory block contains pointers." +msgstr "" + +#: library/ctypes.rst:2084 +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:2089 +msgid "" +"This method returns a ctypes instance that shares the buffer of the *source* " +"object. The *source* object must support the writeable buffer interface. " +"The optional *offset* parameter specifies an offset into the source buffer " +"in bytes; the default is zero. If the source buffer is not large enough a :" +"exc:`ValueError` is raised." +msgstr "" + +#: library/ctypes.rst:2105 +msgid "" +"Raises an :ref:`auditing event ` ``ctypes.cdata/buffer`` with " +"arguments ``pointer``, ``size``, ``offset``." +msgstr "" + +#: library/ctypes.rst:2099 +msgid "" +"This method creates a ctypes instance, copying the buffer from the *source* " +"object buffer which must be readable. The optional *offset* parameter " +"specifies an offset into the source buffer in bytes; the default is zero. " +"If the source buffer is not large enough a :exc:`ValueError` is raised." +msgstr "" + +#: library/ctypes.rst:2109 +msgid "" +"This method returns a ctypes type instance using the memory specified by " +"*address* which must be an integer." +msgstr "" + +#: library/ctypes.rst:2112 +msgid "" +"Raises an :ref:`auditing event ` ``ctypes.cdata`` with argument " +"``address``." +msgstr "" + +#: library/ctypes.rst:2114 +msgid "" +"This method, and others that indirectly call this method, raises an :ref:" +"`auditing event ` ``ctypes.cdata`` with argument ``address``." +msgstr "" + +#: library/ctypes.rst:2120 +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 " +"foreign function's :attr:`argtypes` tuple; it must return an object that can " +"be used as a function call parameter." +msgstr "" + +#: library/ctypes.rst:2125 +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:2131 +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:2135 +msgid "Common instance variables of ctypes data types:" +msgstr "" + +#: library/ctypes.rst:2139 +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:" +"`_b_base_` read-only member is the root ctypes object that owns the memory " +"block." +msgstr "" + +#: library/ctypes.rst:2146 +msgid "" +"This read-only variable is true when the ctypes data instance has allocated " +"the memory block itself, false otherwise." +msgstr "" + +#: library/ctypes.rst:2151 +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. " +"This object is only exposed for debugging; never modify the contents of this " +"dictionary." +msgstr "" + +#: library/ctypes.rst:2164 +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 " +"fundamental ctypes data types. :class:`_SimpleCData` is a subclass of :" +"class:`_CData`, so it inherits their methods and attributes. ctypes data " +"types that are not and do not contain pointers can now be pickled." +msgstr "" + +#: library/ctypes.rst:2170 +msgid "Instances have a single attribute:" +msgstr "" + +#: library/ctypes.rst:2174 +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 " +"character bytes object or string, for character pointer types it is a Python " +"bytes object or string." +msgstr "" + +#: library/ctypes.rst:2179 +msgid "" +"When the ``value`` attribute is retrieved from a ctypes instance, usually a " +"new object is returned each time. :mod:`ctypes` does *not* implement " +"original object return, always a new object is constructed. The same is " +"true for all other ctypes object instances." +msgstr "" + +#: library/ctypes.rst:2185 +msgid "" +"Fundamental data types, when returned as foreign function call results, or, " +"for example, by retrieving structure field members or array items, are " +"transparently converted to native Python types. In other words, if a " +"foreign function has a :attr:`restype` of :class:`c_char_p`, you will always " +"receive a Python bytes object, *not* a :class:`c_char_p` instance." +msgstr "" + +#: library/ctypes.rst:2193 +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 " +"will receive an instance of this subclass from the function call. Of course, " +"you can get the value of the pointer by accessing the ``value`` attribute." +msgstr "" + +#: library/ctypes.rst:2198 +msgid "These are the fundamental ctypes data types:" +msgstr "" + +#: library/ctypes.rst:2202 +msgid "" +"Represents the C :c:expr:`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:2209 +msgid "" +"Represents the C :c:expr:`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:2216 +msgid "" +"Represents the C :c:expr:`char *` datatype when it points to a zero-" +"terminated string. For a general character pointer that may also point to " +"binary data, ``POINTER(c_char)`` must be used. The constructor accepts an " +"integer address, or a bytes object." +msgstr "" + +#: library/ctypes.rst:2224 +msgid "" +"Represents the C :c:expr:`double` datatype. The constructor accepts an " +"optional float initializer." +msgstr "" + +#: library/ctypes.rst:2230 +msgid "" +"Represents the C :c:expr:`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:2236 +msgid "" +"Represents the C :c:expr:`float` datatype. The constructor accepts an " +"optional float initializer." +msgstr "" + +#: library/ctypes.rst:2242 +msgid "" +"Represents the C :c:expr:`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:2249 +msgid "" +"Represents the C 8-bit :c:expr:`signed int` datatype. Usually an alias for :" +"class:`c_byte`." +msgstr "" + +#: library/ctypes.rst:2255 +msgid "" +"Represents the C 16-bit :c:expr:`signed int` datatype. Usually an alias " +"for :class:`c_short`." +msgstr "" + +#: library/ctypes.rst:2261 +msgid "" +"Represents the C 32-bit :c:expr:`signed int` datatype. Usually an alias " +"for :class:`c_int`." +msgstr "" + +#: library/ctypes.rst:2267 +msgid "" +"Represents the C 64-bit :c:expr:`signed int` datatype. Usually an alias " +"for :class:`c_longlong`." +msgstr "" + +#: library/ctypes.rst:2273 +msgid "" +"Represents the C :c:expr:`signed long` datatype. The constructor accepts an " +"optional integer initializer; no overflow checking is done." +msgstr "" + +#: library/ctypes.rst:2279 +msgid "" +"Represents the C :c:expr:`signed long long` datatype. The constructor " +"accepts an optional integer initializer; no overflow checking is done." +msgstr "" + +#: library/ctypes.rst:2285 +msgid "" +"Represents the C :c:expr:`signed short` datatype. The constructor accepts " +"an optional integer initializer; no overflow checking is done." +msgstr "" + +#: library/ctypes.rst:2291 +msgid "Represents the C :c:type:`size_t` datatype." +msgstr "" + +#: library/ctypes.rst:2296 +msgid "Represents the C :c:type:`ssize_t` datatype." +msgstr "" + +#: library/ctypes.rst:2303 +msgid "" +"Represents the C :c:expr:`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:2310 +msgid "" +"Represents the C :c:expr:`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:2317 +msgid "" +"Represents the C 8-bit :c:expr:`unsigned int` datatype. Usually an alias " +"for :class:`c_ubyte`." +msgstr "" + +#: library/ctypes.rst:2323 +msgid "" +"Represents the C 16-bit :c:expr:`unsigned int` datatype. Usually an alias " +"for :class:`c_ushort`." +msgstr "" + +#: library/ctypes.rst:2329 +msgid "" +"Represents the C 32-bit :c:expr:`unsigned int` datatype. Usually an alias " +"for :class:`c_uint`." +msgstr "" + +#: library/ctypes.rst:2335 +msgid "" +"Represents the C 64-bit :c:expr:`unsigned int` datatype. Usually an alias " +"for :class:`c_ulonglong`." +msgstr "" + +#: library/ctypes.rst:2341 +msgid "" +"Represents the C :c:expr:`unsigned long` datatype. The constructor accepts " +"an optional integer initializer; no overflow checking is done." +msgstr "" + +#: library/ctypes.rst:2347 +msgid "" +"Represents the C :c:expr:`unsigned long long` datatype. The constructor " +"accepts an optional integer initializer; no overflow checking is done." +msgstr "" + +#: library/ctypes.rst:2353 +msgid "" +"Represents the C :c:expr:`unsigned short` datatype. The constructor accepts " +"an optional integer initializer; no overflow checking is done." +msgstr "" + +#: library/ctypes.rst:2359 +msgid "" +"Represents the C :c:expr:`void *` type. The value is represented as " +"integer. The constructor accepts an optional integer initializer." +msgstr "" + +#: library/ctypes.rst:2365 +msgid "" +"Represents the C :c:expr:`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:2372 +msgid "" +"Represents the C :c:expr:`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:2379 +msgid "" +"Represent the C :c:expr:`bool` datatype (more accurately, :c:expr:`_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:2386 +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:2392 +msgid "" +"Represents the C :c:expr:`PyObject *` datatype. Calling this without an " +"argument creates a ``NULL`` :c:expr:`PyObject *` pointer." +msgstr "" + +#: library/ctypes.rst:2395 +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:" +"`DWORD`. Some useful structures like :c:type:`MSG` or :c:type:`RECT` are " +"also defined." +msgstr "" + +#: library/ctypes.rst:2403 +msgid "Structured data types" +msgstr "Types de données dérivés de Structure" + +#: library/ctypes.rst:2408 +msgid "Abstract base class for unions in native byte order." +msgstr "" + +#: library/ctypes.rst:2413 +msgid "Abstract base class for structures in *big endian* byte order." +msgstr "" + +#: library/ctypes.rst:2418 +msgid "Abstract base class for structures in *little endian* byte order." +msgstr "" + +#: library/ctypes.rst:2420 +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:2426 +msgid "Abstract base class for structures in *native* byte order." +msgstr "" + +#: library/ctypes.rst:2428 +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:" +"`ctypes` will create :term:`descriptor`\\s which allow reading and writing " +"the fields by direct attribute accesses. These are the" +msgstr "" + +#: library/ctypes.rst:2436 +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:2440 +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:2444 +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:2447 +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:2457 +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, " +"and so on). Later assignments to the :attr:`_fields_` class variable will " +"raise an AttributeError." +msgstr "" + +#: library/ctypes.rst:2462 +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:2469 +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:2476 +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:2480 +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 " +"accessing the nested fields directly, without the need to create the " +"structure or union field." +msgstr "" + +#: library/ctypes.rst:2485 +msgid "Here is an example type (Windows)::" +msgstr "" + +#: library/ctypes.rst:2498 +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 " +"defined as anonymous field, it is now possible to access the members " +"directly off the TYPEDESC instance. ``td.lptdesc`` and ``td.u.lptdesc`` are " +"equivalent, but the former is faster since it does not need to create a " +"temporary union instance::" +msgstr "" + +#: library/ctypes.rst:2510 +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:" +"`_fields_` variable, the fields specified in this are appended to the fields " +"of the base class." +msgstr "" + +#: library/ctypes.rst:2515 +msgid "" +"Structure and union constructors accept both positional and keyword " +"arguments. Positional arguments are used to initialize member fields in the " +"same order as they are appear in :attr:`_fields_`. Keyword arguments in the " +"constructor are interpreted as attribute assignments, so they will " +"initialize :attr:`_fields_` with the same name, or create new attributes for " +"names not present in :attr:`_fields_`." +msgstr "" + +#: library/ctypes.rst:2526 +msgid "Arrays and pointers" +msgstr "Tableaux et pointeurs" + +#: library/ctypes.rst:2530 +msgid "Abstract base class for arrays." +msgstr "Classe de base abstraite pour les *arrays*." + +#: library/ctypes.rst:2532 +msgid "" +"The recommended way to create concrete array types is by multiplying any :" +"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:2542 +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:2549 +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:2552 +msgid "" +"Array subclass constructors accept positional arguments, used to initialize " +"the elements in order." +msgstr "" + +#: library/ctypes.rst:2558 +msgid "Private, abstract base class for pointers." +msgstr "" + +#: library/ctypes.rst:2560 +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:2564 +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 :" +"func:`len` will raise :exc:`TypeError`. Negative subscripts will read from " +"the memory *before* the pointer (as in C), and out-of-range subscripts will " +"probably crash with an access violation (if you're lucky)." +msgstr "" + +#: library/ctypes.rst:2574 +msgid "Specifies the type pointed to." +msgstr "" + +#: library/ctypes.rst:2578 +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.ascii.po b/library/curses.ascii.po new file mode 100644 index 0000000000..50fa3ed644 --- /dev/null +++ b/library/curses.ascii.po @@ -0,0 +1,469 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-22 22:57+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \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" + +#: library/curses.ascii.rst:2 +msgid ":mod:`curses.ascii` --- Utilities for ASCII characters" +msgstr "" + +#: library/curses.ascii.rst:10 +msgid "**Source code:** :source:`Lib/curses/ascii.py`" +msgstr "" + +#: library/curses.ascii.rst:14 +msgid "" +"The :mod:`curses.ascii` module supplies name constants for ASCII characters " +"and functions to test membership in various ASCII character classes. The " +"constants supplied are names for control characters as follows:" +msgstr "" + +#: library/curses.ascii.rst:19 +msgid "Name" +msgstr "Nom" + +#: library/curses.ascii.rst:19 +msgid "Meaning" +msgstr "Signification" + +#: library/curses.ascii.rst:21 +msgid ":const:`NUL`" +msgstr ":const:`NUL`" + +#: library/curses.ascii.rst:23 +msgid ":const:`SOH`" +msgstr ":const:`SOH`" + +#: library/curses.ascii.rst:23 +msgid "Start of heading, console interrupt" +msgstr "" + +#: library/curses.ascii.rst:25 +msgid ":const:`STX`" +msgstr ":const:`STX`" + +#: library/curses.ascii.rst:25 +msgid "Start of text" +msgstr "" + +#: library/curses.ascii.rst:27 +msgid ":const:`ETX`" +msgstr ":const:`ETX`" + +#: library/curses.ascii.rst:27 +msgid "End of text" +msgstr "" + +#: library/curses.ascii.rst:29 +msgid ":const:`EOT`" +msgstr ":const:`EOT`" + +#: library/curses.ascii.rst:29 +msgid "End of transmission" +msgstr "" + +#: library/curses.ascii.rst:31 +msgid ":const:`ENQ`" +msgstr ":const:`ENQ`" + +#: library/curses.ascii.rst:31 +msgid "Enquiry, goes with :const:`ACK` flow control" +msgstr "" + +#: library/curses.ascii.rst:33 +msgid ":const:`ACK`" +msgstr ":const:`ACK`" + +#: library/curses.ascii.rst:33 +#, fuzzy +msgid "Acknowledgement" +msgstr "Remerciements" + +#: library/curses.ascii.rst:35 +msgid ":const:`BEL`" +msgstr ":const:`BEL`" + +#: library/curses.ascii.rst:35 +msgid "Bell" +msgstr "" + +#: library/curses.ascii.rst:37 +msgid ":const:`BS`" +msgstr ":const:`BS`" + +#: library/curses.ascii.rst:37 +msgid "Backspace" +msgstr "" + +#: library/curses.ascii.rst:39 +msgid ":const:`TAB`" +msgstr ":const:`TAB`" + +#: library/curses.ascii.rst:39 +msgid "Tab" +msgstr "" + +#: library/curses.ascii.rst:41 +msgid ":const:`HT`" +msgstr ":const:`HT`" + +#: library/curses.ascii.rst:41 +msgid "Alias for :const:`TAB`: \"Horizontal tab\"" +msgstr "" + +#: library/curses.ascii.rst:43 +msgid ":const:`LF`" +msgstr ":const:`LF`" + +#: library/curses.ascii.rst:43 +msgid "Line feed" +msgstr "" + +#: library/curses.ascii.rst:45 +msgid ":const:`NL`" +msgstr ":const:`NL`" + +#: library/curses.ascii.rst:45 +msgid "Alias for :const:`LF`: \"New line\"" +msgstr "" + +#: library/curses.ascii.rst:47 +msgid ":const:`VT`" +msgstr ":const:`VT`" + +#: library/curses.ascii.rst:47 +msgid "Vertical tab" +msgstr "" + +#: library/curses.ascii.rst:49 +msgid ":const:`FF`" +msgstr ":const:`FF`" + +#: library/curses.ascii.rst:49 +msgid "Form feed" +msgstr "" + +#: library/curses.ascii.rst:51 +msgid ":const:`CR`" +msgstr ":const:`CR`" + +#: library/curses.ascii.rst:51 +msgid "Carriage return" +msgstr "Retour chariot" + +#: library/curses.ascii.rst:53 +msgid ":const:`SO`" +msgstr ":const:`SO`" + +#: library/curses.ascii.rst:53 +msgid "Shift-out, begin alternate character set" +msgstr "" + +#: library/curses.ascii.rst:55 +msgid ":const:`SI`" +msgstr ":const:`SI`" + +#: library/curses.ascii.rst:55 +msgid "Shift-in, resume default character set" +msgstr "" + +#: library/curses.ascii.rst:57 +msgid ":const:`DLE`" +msgstr ":const:`DLE`" + +#: library/curses.ascii.rst:57 +msgid "Data-link escape" +msgstr "" + +#: library/curses.ascii.rst:59 +msgid ":const:`DC1`" +msgstr ":const:`DC1`" + +#: library/curses.ascii.rst:59 +msgid "XON, for flow control" +msgstr "" + +#: library/curses.ascii.rst:61 +msgid ":const:`DC2`" +msgstr ":const:`DC2`" + +#: library/curses.ascii.rst:61 +msgid "Device control 2, block-mode flow control" +msgstr "" + +#: library/curses.ascii.rst:63 +msgid ":const:`DC3`" +msgstr ":const:`DC3`" + +#: library/curses.ascii.rst:63 +msgid "XOFF, for flow control" +msgstr "" + +#: library/curses.ascii.rst:65 +msgid ":const:`DC4`" +msgstr ":const:`DC4`" + +#: library/curses.ascii.rst:65 +msgid "Device control 4" +msgstr "" + +#: library/curses.ascii.rst:67 +msgid ":const:`NAK`" +msgstr ":const:`NAK`" + +#: library/curses.ascii.rst:67 +msgid "Negative acknowledgement" +msgstr "" + +#: library/curses.ascii.rst:69 +msgid ":const:`SYN`" +msgstr ":const:`SYN`" + +#: library/curses.ascii.rst:69 +msgid "Synchronous idle" +msgstr "" + +#: library/curses.ascii.rst:71 +msgid ":const:`ETB`" +msgstr ":const:`ETB`" + +#: library/curses.ascii.rst:71 +msgid "End transmission block" +msgstr "" + +#: library/curses.ascii.rst:73 +msgid ":const:`CAN`" +msgstr ":const:`CAN`" + +#: library/curses.ascii.rst:73 +msgid "Cancel" +msgstr "" + +#: library/curses.ascii.rst:75 +msgid ":const:`EM`" +msgstr ":const:`EM`" + +#: library/curses.ascii.rst:75 +msgid "End of medium" +msgstr "" + +#: library/curses.ascii.rst:77 +msgid ":const:`SUB`" +msgstr ":const:`SUB`" + +#: library/curses.ascii.rst:77 +msgid "Substitute" +msgstr "" + +#: library/curses.ascii.rst:79 +msgid ":const:`ESC`" +msgstr ":const:`ESC`" + +#: library/curses.ascii.rst:79 +msgid "Escape" +msgstr "" + +#: library/curses.ascii.rst:81 +msgid ":const:`FS`" +msgstr ":const:`FS`" + +#: library/curses.ascii.rst:81 +msgid "File separator" +msgstr "Séparateur de fichiers" + +#: library/curses.ascii.rst:83 +msgid ":const:`GS`" +msgstr ":const:`GS`" + +#: library/curses.ascii.rst:83 +msgid "Group separator" +msgstr "Séparateur de groupe" + +#: library/curses.ascii.rst:85 +msgid ":const:`RS`" +msgstr ":const:`RS`" + +#: library/curses.ascii.rst:85 +msgid "Record separator, block-mode terminator" +msgstr "" + +#: library/curses.ascii.rst:87 +msgid ":const:`US`" +msgstr ":const:`US`" + +#: library/curses.ascii.rst:87 +msgid "Unit separator" +msgstr "" + +#: library/curses.ascii.rst:89 +msgid ":const:`SP`" +msgstr ":const:`SP`" + +#: library/curses.ascii.rst:89 +msgid "Space" +msgstr "" + +#: library/curses.ascii.rst:91 +msgid ":const:`DEL`" +msgstr ":const:`DEL`" + +#: library/curses.ascii.rst:91 +msgid "Delete" +msgstr "" + +#: library/curses.ascii.rst:94 +msgid "" +"Note that many of these have little practical significance in modern usage. " +"The mnemonics derive from teleprinter conventions that predate digital " +"computers." +msgstr "" + +#: library/curses.ascii.rst:97 +msgid "" +"The module supplies the following functions, patterned on those in the " +"standard C library:" +msgstr "" + +#: library/curses.ascii.rst:103 +msgid "" +"Checks for an ASCII alphanumeric character; it is equivalent to ``isalpha(c) " +"or isdigit(c)``." +msgstr "" + +#: library/curses.ascii.rst:109 +msgid "" +"Checks for an ASCII alphabetic character; it is equivalent to ``isupper(c) " +"or islower(c)``." +msgstr "" + +#: library/curses.ascii.rst:115 +msgid "Checks for a character value that fits in the 7-bit ASCII set." +msgstr "" + +#: library/curses.ascii.rst:120 +msgid "Checks for an ASCII whitespace character; space or horizontal tab." +msgstr "" + +#: library/curses.ascii.rst:125 +msgid "" +"Checks for an ASCII control character (in the range 0x00 to 0x1f or 0x7f)." +msgstr "" + +#: library/curses.ascii.rst:130 +msgid "" +"Checks for an ASCII decimal digit, ``'0'`` through ``'9'``. This is " +"equivalent to ``c in string.digits``." +msgstr "" + +#: library/curses.ascii.rst:136 +msgid "Checks for ASCII any printable character except space." +msgstr "" + +#: library/curses.ascii.rst:141 +msgid "Checks for an ASCII lower-case character." +msgstr "" + +#: library/curses.ascii.rst:146 +msgid "Checks for any ASCII printable character including space." +msgstr "" + +#: library/curses.ascii.rst:151 +msgid "" +"Checks for any printable ASCII character which is not a space or an " +"alphanumeric character." +msgstr "" + +#: library/curses.ascii.rst:157 +msgid "" +"Checks for ASCII white-space characters; space, line feed, carriage return, " +"form feed, horizontal tab, vertical tab." +msgstr "" + +#: library/curses.ascii.rst:163 +msgid "Checks for an ASCII uppercase letter." +msgstr "" + +#: library/curses.ascii.rst:168 +msgid "" +"Checks for an ASCII hexadecimal digit. This is equivalent to ``c in string." +"hexdigits``." +msgstr "" + +#: library/curses.ascii.rst:174 +msgid "Checks for an ASCII control character (ordinal values 0 to 31)." +msgstr "" + +#: library/curses.ascii.rst:179 +msgid "Checks for a non-ASCII character (ordinal values 0x80 and above)." +msgstr "" + +#: library/curses.ascii.rst:181 +msgid "" +"These functions accept either integers or single-character strings; when the " +"argument is a string, it is first converted using the built-in function :" +"func:`ord`." +msgstr "" + +#: library/curses.ascii.rst:184 +msgid "" +"Note that all these functions check ordinal bit values derived from the " +"character of the string you pass in; they do not actually know anything " +"about the host machine's character encoding." +msgstr "" + +#: library/curses.ascii.rst:188 +msgid "" +"The following two functions take either a single-character string or integer " +"byte value; they return a value of the same type." +msgstr "" + +#: library/curses.ascii.rst:194 +msgid "Return the ASCII value corresponding to the low 7 bits of *c*." +msgstr "" + +#: library/curses.ascii.rst:199 +msgid "" +"Return the control character corresponding to the given character (the " +"character bit value is bitwise-anded with 0x1f)." +msgstr "" + +#: library/curses.ascii.rst:205 +msgid "" +"Return the 8-bit character corresponding to the given ASCII character (the " +"character bit value is bitwise-ored with 0x80)." +msgstr "" + +#: library/curses.ascii.rst:208 +msgid "" +"The following function takes either a single-character string or integer " +"value; it returns a string." +msgstr "" + +#: library/curses.ascii.rst:218 +msgid "" +"Return a string representation of the ASCII character *c*. If *c* is " +"printable, this string is the character itself. If the character is a " +"control character (0x00--0x1f) the string consists of a caret (``'^'``) " +"followed by the corresponding uppercase letter. If the character is an ASCII " +"delete (0x7f) the string is ``'^?'``. If the character has its meta bit " +"(0x80) set, the meta bit is stripped, the preceding rules applied, and " +"``'!'`` prepended to the result." +msgstr "" + +#: library/curses.ascii.rst:228 +msgid "" +"A 33-element string array that contains the ASCII mnemonics for the thirty-" +"two ASCII control characters from 0 (NUL) to 0x1f (US), in order, plus the " +"mnemonic ``SP`` for the space character." +msgstr "" diff --git a/library/curses.panel.po b/library/curses.panel.po new file mode 100644 index 0000000000..ee29ac664f --- /dev/null +++ b/library/curses.panel.po @@ -0,0 +1,126 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +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: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \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" + +#: library/curses.panel.rst:2 +msgid ":mod:`curses.panel` --- A panel stack extension for curses" +msgstr "" + +#: library/curses.panel.rst:11 +msgid "" +"Panels are windows with the added feature of depth, so they can be stacked " +"on top of each other, and only the visible portions of each window will be " +"displayed. Panels can be added, moved up or down in the stack, and removed." +msgstr "" + +#: library/curses.panel.rst:19 +msgid "Functions" +msgstr "Fonctions" + +#: library/curses.panel.rst:21 +msgid "The module :mod:`curses.panel` defines the following functions:" +msgstr "" + +#: library/curses.panel.rst:26 +msgid "Returns the bottom panel in the panel stack." +msgstr "" + +#: library/curses.panel.rst:31 +msgid "" +"Returns a panel object, associating it with the given window *win*. Be aware " +"that you need to keep the returned panel object referenced explicitly. If " +"you don't, the panel object is garbage collected and removed from the panel " +"stack." +msgstr "" + +#: library/curses.panel.rst:38 +msgid "Returns the top panel in the panel stack." +msgstr "" + +#: library/curses.panel.rst:43 +msgid "" +"Updates the virtual screen after changes in the panel stack. This does not " +"call :func:`curses.doupdate`, so you'll have to do this yourself." +msgstr "" + +#: library/curses.panel.rst:50 +msgid "Panel Objects" +msgstr "" + +#: library/curses.panel.rst:52 +msgid "" +"Panel objects, as returned by :func:`new_panel` above, are windows with a " +"stacking order. There's always a window associated with a panel which " +"determines the content, while the panel methods are responsible for the " +"window's depth in the panel stack." +msgstr "" + +#: library/curses.panel.rst:57 +msgid "Panel objects have the following methods:" +msgstr "" + +#: library/curses.panel.rst:62 +msgid "Returns the panel above the current panel." +msgstr "" + +#: library/curses.panel.rst:67 +msgid "Returns the panel below the current panel." +msgstr "" + +#: library/curses.panel.rst:72 +msgid "Push the panel to the bottom of the stack." +msgstr "" + +#: library/curses.panel.rst:77 +msgid "" +"Returns ``True`` if the panel is hidden (not visible), ``False`` otherwise." +msgstr "" + +#: library/curses.panel.rst:82 +msgid "" +"Hide the panel. This does not delete the object, it just makes the window on " +"screen invisible." +msgstr "" + +#: library/curses.panel.rst:88 +msgid "Move the panel to the screen coordinates ``(y, x)``." +msgstr "" + +#: library/curses.panel.rst:93 +msgid "Change the window associated with the panel to the window *win*." +msgstr "" + +#: library/curses.panel.rst:98 +msgid "" +"Set the panel's user pointer to *obj*. This is used to associate an " +"arbitrary piece of data with the panel, and can be any Python object." +msgstr "" + +#: library/curses.panel.rst:104 +msgid "Display the panel (which might have been hidden)." +msgstr "" + +#: library/curses.panel.rst:109 +msgid "Push panel to the top of the stack." +msgstr "" + +#: library/curses.panel.rst:114 +msgid "" +"Returns the user pointer for the panel. This might be any Python object." +msgstr "" + +#: library/curses.panel.rst:119 +msgid "Returns the window object associated with the panel." +msgstr "" diff --git a/library/curses.po b/library/curses.po new file mode 100644 index 0000000000..d24ce982f5 --- /dev/null +++ b/library/curses.po @@ -0,0 +1,3191 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-22 22:57+0100\n" +"PO-Revision-Date: 2018-07-04 11:32+0200\n" +"Last-Translator: Julien Palard \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 1.8.11\n" + +#: library/curses.rst:2 +msgid ":mod:`curses` --- Terminal handling for character-cell displays" +msgstr "" + +#: library/curses.rst:12 +msgid "**Source code:** :source:`Lib/curses`" +msgstr "" + +#: library/curses.rst:16 +msgid "" +"The :mod:`curses` module provides an interface to the curses library, the de-" +"facto standard for portable advanced terminal handling." +msgstr "" + +#: library/curses.rst:19 +msgid "" +"While curses is most widely used in the Unix environment, versions are " +"available for Windows, DOS, and possibly other systems as well. This " +"extension module is designed to match the API of ncurses, an open-source " +"curses library hosted on Linux and the BSD variants of Unix." +msgstr "" + +#: library/curses.rst:26 +msgid "" +"Whenever the documentation mentions a *character* it can be specified as an " +"integer, a one-character Unicode string or a one-byte byte string." +msgstr "" + +#: library/curses.rst:29 +msgid "" +"Whenever the documentation mentions a *character string* it can be specified " +"as a Unicode string or a byte string." +msgstr "" + +#: library/curses.rst:34 +msgid "" +"Since version 5.4, the ncurses library decides how to interpret non-ASCII " +"data using the ``nl_langinfo`` function. That means that you have to call :" +"func:`locale.setlocale` in the application and encode Unicode strings using " +"one of the system's available encodings. This example uses the system's " +"default encoding::" +msgstr "" + +#: library/curses.rst:44 +msgid "Then use *code* as the encoding for :meth:`str.encode` calls." +msgstr "" + +#: library/curses.rst:49 +msgid "Module :mod:`curses.ascii`" +msgstr "Module :mod:`curses.ascii`" + +#: library/curses.rst:49 +msgid "" +"Utilities for working with ASCII characters, regardless of your locale " +"settings." +msgstr "" + +#: library/curses.rst:52 +msgid "Module :mod:`curses.panel`" +msgstr "Module :mod:`curses.panel`" + +#: library/curses.rst:52 +msgid "A panel stack extension that adds depth to curses windows." +msgstr "" + +#: library/curses.rst:55 +msgid "Module :mod:`curses.textpad`" +msgstr "Module :mod:`curses.textpad`" + +#: library/curses.rst:55 +msgid "" +"Editable text widget for curses supporting :program:`Emacs`\\ -like " +"bindings." +msgstr "" + +#: library/curses.rst:59 +msgid ":ref:`curses-howto`" +msgstr ":ref:`curses-howto`" + +#: library/curses.rst:58 +msgid "" +"Tutorial material on using curses with Python, by Andrew Kuchling and Eric " +"Raymond." +msgstr "" + +#: library/curses.rst:61 +msgid "" +"The :source:`Tools/demo/` directory in the Python source distribution " +"contains some example programs using the curses bindings provided by this " +"module." +msgstr "" + +#: library/curses.rst:68 +msgid "Functions" +msgstr "Fonctions" + +#: library/curses.rst:70 +msgid "The module :mod:`curses` defines the following exception:" +msgstr "" + +#: library/curses.rst:75 +msgid "Exception raised when a curses library function returns an error." +msgstr "" + +#: library/curses.rst:79 +msgid "" +"Whenever *x* or *y* arguments to a function or a method are optional, they " +"default to the current cursor location. Whenever *attr* is optional, it " +"defaults to :const:`A_NORMAL`." +msgstr "" + +#: library/curses.rst:83 +msgid "The module :mod:`curses` defines the following functions:" +msgstr "" + +#: library/curses.rst:88 +msgid "" +"Return the output speed of the terminal in bits per second. On software " +"terminal emulators it will have a fixed high value. Included for historical " +"reasons; in former times, it was used to write output loops for time delays " +"and occasionally to change interfaces depending on the line speed." +msgstr "" + +#: library/curses.rst:96 +msgid "Emit a short attention sound." +msgstr "" + +#: library/curses.rst:101 +msgid "" +"Return ``True`` or ``False``, depending on whether the programmer can change " +"the colors displayed by the terminal." +msgstr "" + +#: library/curses.rst:107 +msgid "" +"Enter cbreak mode. In cbreak mode (sometimes called \"rare\" mode) normal " +"tty line buffering is turned off and characters are available to be read one " +"by one. However, unlike raw mode, special characters (interrupt, quit, " +"suspend, and flow control) retain their effects on the tty driver and " +"calling program. Calling first :func:`raw` then :func:`cbreak` leaves the " +"terminal in cbreak mode." +msgstr "" + +#: library/curses.rst:116 +msgid "" +"Return the intensity of the red, green, and blue (RGB) components in the " +"color *color_number*, which must be between ``0`` and ``COLORS - 1``. " +"Return a 3-tuple, containing the R,G,B values for the given color, which " +"will be between ``0`` (no component) and ``1000`` (maximum amount of " +"component)." +msgstr "" + +#: library/curses.rst:124 +msgid "" +"Return the attribute value for displaying text in the specified color pair. " +"Only the first 256 color pairs are supported. This attribute value can be " +"combined with :const:`A_STANDOUT`, :const:`A_REVERSE`, and the other :const:" +"`A_\\*` attributes. :func:`pair_number` is the counterpart to this function." +msgstr "" + +#: library/curses.rst:133 +msgid "" +"Set the cursor state. *visibility* can be set to ``0``, ``1``, or ``2``, " +"for invisible, normal, or very visible. If the terminal supports the " +"visibility requested, return the previous cursor state; otherwise raise an " +"exception. On many terminals, the \"visible\" mode is an underline cursor " +"and the \"very visible\" mode is a block cursor." +msgstr "" + +#: library/curses.rst:142 +msgid "" +"Save the current terminal mode as the \"program\" mode, the mode when the " +"running program is using curses. (Its counterpart is the \"shell\" mode, " +"for when the program is not in curses.) Subsequent calls to :func:" +"`reset_prog_mode` will restore this mode." +msgstr "" + +#: library/curses.rst:150 +msgid "" +"Save the current terminal mode as the \"shell\" mode, the mode when the " +"running program is not using curses. (Its counterpart is the \"program\" " +"mode, when the program is using curses capabilities.) Subsequent calls to :" +"func:`reset_shell_mode` will restore this mode." +msgstr "" + +#: library/curses.rst:158 +msgid "Insert an *ms* millisecond pause in output." +msgstr "" + +#: library/curses.rst:163 +msgid "" +"Update the physical screen. The curses library keeps two data structures, " +"one representing the current physical screen contents and a virtual screen " +"representing the desired next state. The :func:`doupdate` ground updates " +"the physical screen to match the virtual screen." +msgstr "" + +#: library/curses.rst:168 +msgid "" +"The virtual screen may be updated by a :meth:`~window.noutrefresh` call " +"after write operations such as :meth:`~window.addstr` have been performed on " +"a window. The normal :meth:`~window.refresh` call is simply :meth:`!" +"noutrefresh` followed by :func:`!doupdate`; if you have to update multiple " +"windows, you can speed performance and perhaps reduce screen flicker by " +"issuing :meth:`!noutrefresh` calls on all windows, followed by a single :" +"func:`!doupdate`." +msgstr "" + +#: library/curses.rst:178 +msgid "" +"Enter echo mode. In echo mode, each character input is echoed to the screen " +"as it is entered." +msgstr "" + +#: library/curses.rst:184 +msgid "De-initialize the library, and return terminal to normal status." +msgstr "" + +#: library/curses.rst:189 +msgid "" +"Return the user's current erase character as a one-byte bytes object. Under " +"Unix operating systems this is a property of the controlling tty of the " +"curses program, and is not set by the curses library itself." +msgstr "" + +#: library/curses.rst:196 +msgid "" +"The :func:`.filter` routine, if used, must be called before :func:`initscr` " +"is called. The effect is that, during those calls, :envvar:`LINES` is set " +"to ``1``; the capabilities ``clear``, ``cup``, ``cud``, ``cud1``, ``cuu1``, " +"``cuu``, ``vpa`` are disabled; and the ``home`` string is set to the value " +"of ``cr``. The effect is that the cursor is confined to the current line, " +"and so are screen updates. This may be used for enabling character-at-a-" +"time line editing without touching the rest of the screen." +msgstr "" + +#: library/curses.rst:206 +msgid "" +"Flash the screen. That is, change it to reverse-video and then change it " +"back in a short interval. Some people prefer such as 'visible bell' to the " +"audible attention signal produced by :func:`beep`." +msgstr "" + +#: library/curses.rst:213 +msgid "" +"Flush all input buffers. This throws away any typeahead that has been " +"typed by the user and has not yet been processed by the program." +msgstr "" + +#: library/curses.rst:219 +msgid "" +"After :meth:`~window.getch` returns :const:`KEY_MOUSE` to signal a mouse " +"event, this method should be called to retrieve the queued mouse event, " +"represented as a 5-tuple ``(id, x, y, z, bstate)``. *id* is an ID value used " +"to distinguish multiple devices, and *x*, *y*, *z* are the event's " +"coordinates. (*z* is currently unused.) *bstate* is an integer value whose " +"bits will be set to indicate the type of event, and will be the bitwise OR " +"of one or more of the following constants, where *n* is the button number " +"from 1 to 5: :const:`BUTTONn_PRESSED`, :const:`BUTTONn_RELEASED`, :const:" +"`BUTTONn_CLICKED`, :const:`BUTTONn_DOUBLE_CLICKED`, :const:" +"`BUTTONn_TRIPLE_CLICKED`, :const:`BUTTON_SHIFT`, :const:`BUTTON_CTRL`, :" +"const:`BUTTON_ALT`." +msgstr "" + +#: library/curses.rst:230 +msgid "" +"The ``BUTTON5_*`` constants are now exposed if they are provided by the " +"underlying curses library." +msgstr "" + +#: library/curses.rst:237 +msgid "" +"Return the current coordinates of the virtual screen cursor as a tuple ``(y, " +"x)``. If :meth:`leaveok ` is currently ``True``, then " +"return ``(-1, -1)``." +msgstr "" + +#: library/curses.rst:243 +msgid "" +"Read window related data stored in the file by an earlier :func:`putwin` " +"call. The routine then creates and initializes a new window using that data, " +"returning the new window object." +msgstr "" + +#: library/curses.rst:250 +msgid "" +"Return ``True`` if the terminal can display colors; otherwise, return " +"``False``." +msgstr "" + +#: library/curses.rst:254 +msgid "" +"Return ``True`` if the module supports extended colors; otherwise, return " +"``False``. Extended color support allows more than 256 color pairs for " +"terminals that support more than 16 colors (e.g. xterm-256color)." +msgstr "" + +#: library/curses.rst:258 +msgid "Extended color support requires ncurses version 6.1 or later." +msgstr "" + +#: library/curses.rst:264 +msgid "" +"Return ``True`` if the terminal has insert- and delete-character " +"capabilities. This function is included for historical reasons only, as all " +"modern software terminal emulators have such capabilities." +msgstr "" + +#: library/curses.rst:271 +msgid "" +"Return ``True`` if the terminal has insert- and delete-line capabilities, or " +"can simulate them using scrolling regions. This function is included for " +"historical reasons only, as all modern software terminal emulators have such " +"capabilities." +msgstr "" + +#: library/curses.rst:279 +msgid "" +"Take a key value *ch*, and return ``True`` if the current terminal type " +"recognizes a key with that value." +msgstr "" + +#: library/curses.rst:285 +msgid "" +"Used for half-delay mode, which is similar to cbreak mode in that characters " +"typed by the user are immediately available to the program. However, after " +"blocking for *tenths* tenths of seconds, raise an exception if nothing has " +"been typed. The value of *tenths* must be a number between ``1`` and " +"``255``. Use :func:`nocbreak` to leave half-delay mode." +msgstr "" + +#: library/curses.rst:294 +msgid "" +"Change the definition of a color, taking the number of the color to be " +"changed followed by three RGB values (for the amounts of red, green, and " +"blue components). The value of *color_number* must be between ``0`` and " +"``COLORS - 1``. Each of *r*, *g*, *b*, must be a value between ``0`` and " +"``1000``. When :func:`init_color` is used, all occurrences of that color on " +"the screen immediately change to the new definition. This function is a no-" +"op on most terminals; it is active only if :func:`can_change_color` returns " +"``True``." +msgstr "" + +#: library/curses.rst:305 +msgid "" +"Change the definition of a color-pair. It takes three arguments: the number " +"of the color-pair to be changed, the foreground color number, and the " +"background color number. The value of *pair_number* must be between ``1`` " +"and ``COLOR_PAIRS - 1`` (the ``0`` color pair is wired to white on black and " +"cannot be changed). The value of *fg* and *bg* arguments must be between " +"``0`` and ``COLORS - 1``, or, after calling :func:`use_default_colors`, " +"``-1``. If the color-pair was previously initialized, the screen is " +"refreshed and all occurrences of that color-pair are changed to the new " +"definition." +msgstr "" + +#: library/curses.rst:318 +msgid "" +"Initialize the library. Return a :ref:`window ` " +"object which represents the whole screen." +msgstr "" + +#: library/curses.rst:323 +msgid "" +"If there is an error opening the terminal, the underlying curses library may " +"cause the interpreter to exit." +msgstr "" + +#: library/curses.rst:329 +msgid "" +"Return ``True`` if :func:`resize_term` would modify the window structure, " +"``False`` otherwise." +msgstr "" + +#: library/curses.rst:335 +msgid "" +"Return ``True`` if :func:`endwin` has been called (that is, the curses " +"library has been deinitialized)." +msgstr "" + +#: library/curses.rst:341 +msgid "" +"Return the name of the key numbered *k* as a bytes object. The name of a " +"key generating printable ASCII character is the key's character. The name " +"of a control-key combination is a two-byte bytes object consisting of a " +"caret (``b'^'``) followed by the corresponding printable ASCII character. " +"The name of an alt-key combination (128--255) is a bytes object consisting " +"of the prefix ``b'M-'`` followed by the name of the corresponding ASCII " +"character." +msgstr "" + +#: library/curses.rst:351 +msgid "" +"Return the user's current line kill character as a one-byte bytes object. " +"Under Unix operating systems this is a property of the controlling tty of " +"the curses program, and is not set by the curses library itself." +msgstr "" + +#: library/curses.rst:358 +msgid "" +"Return a bytes object containing the terminfo long name field describing the " +"current terminal. The maximum length of a verbose description is 128 " +"characters. It is defined only after the call to :func:`initscr`." +msgstr "" + +#: library/curses.rst:365 +msgid "" +"If *flag* is ``True``, allow 8-bit characters to be input. If *flag* is " +"``False``, allow only 7-bit chars." +msgstr "" + +#: library/curses.rst:371 +msgid "" +"Set the maximum time in milliseconds that can elapse between press and " +"release events in order for them to be recognized as a click, and return the " +"previous interval value. The default value is 200 msec, or one fifth of a " +"second." +msgstr "" + +#: library/curses.rst:378 +msgid "" +"Set the mouse events to be reported, and return a tuple ``(availmask, " +"oldmask)``. *availmask* indicates which of the specified mouse events can " +"be reported; on complete failure it returns ``0``. *oldmask* is the " +"previous value of the given window's mouse event mask. If this function is " +"never called, no mouse events are ever reported." +msgstr "" + +#: library/curses.rst:387 +msgid "Sleep for *ms* milliseconds." +msgstr "" + +#: library/curses.rst:392 +msgid "" +"Create and return a pointer to a new pad data structure with the given " +"number of lines and columns. Return a pad as a window object." +msgstr "" + +#: library/curses.rst:395 +msgid "" +"A pad is like a window, except that it is not restricted by the screen size, " +"and is not necessarily associated with a particular part of the screen. " +"Pads can be used when a large window is needed, and only a part of the " +"window will be on the screen at one time. Automatic refreshes of pads (such " +"as from scrolling or echoing of input) do not occur. The :meth:`~window." +"refresh` and :meth:`~window.noutrefresh` methods of a pad require 6 " +"arguments to specify the part of the pad to be displayed and the location on " +"the screen to be used for the display. The arguments are *pminrow*, " +"*pmincol*, *sminrow*, *smincol*, *smaxrow*, *smaxcol*; the *p* arguments " +"refer to the upper left corner of the pad region to be displayed and the *s* " +"arguments define a clipping box on the screen within which the pad region is " +"to be displayed." +msgstr "" + +#: library/curses.rst:411 +msgid "" +"Return a new :ref:`window `, whose left-upper corner " +"is at ``(begin_y, begin_x)``, and whose height/width is *nlines*/*ncols*." +msgstr "" + +#: library/curses.rst:414 +msgid "" +"By default, the window will extend from the specified position to the lower " +"right corner of the screen." +msgstr "" + +#: library/curses.rst:420 +msgid "" +"Enter newline mode. This mode translates the return key into newline on " +"input, and translates newline into return and line-feed on output. Newline " +"mode is initially on." +msgstr "" + +#: library/curses.rst:427 +msgid "" +"Leave cbreak mode. Return to normal \"cooked\" mode with line buffering." +msgstr "" + +#: library/curses.rst:432 +msgid "Leave echo mode. Echoing of input characters is turned off." +msgstr "" + +#: library/curses.rst:437 +msgid "" +"Leave newline mode. Disable translation of return into newline on input, " +"and disable low-level translation of newline into newline/return on output " +"(but this does not change the behavior of ``addch('\\n')``, which always " +"does the equivalent of return and line feed on the virtual screen). With " +"translation off, curses can sometimes speed up vertical motion a little; " +"also, it will be able to detect the return key on input." +msgstr "" + +#: library/curses.rst:447 +msgid "" +"When the :func:`!noqiflush` routine is used, normal flush of input and " +"output queues associated with the ``INTR``, ``QUIT`` and ``SUSP`` characters " +"will not be done. You may want to call :func:`!noqiflush` in a signal " +"handler if you want output to continue as though the interrupt had not " +"occurred, after the handler exits." +msgstr "" + +#: library/curses.rst:455 +msgid "Leave raw mode. Return to normal \"cooked\" mode with line buffering." +msgstr "" + +#: library/curses.rst:460 +msgid "" +"Return a tuple ``(fg, bg)`` containing the colors for the requested color " +"pair. The value of *pair_number* must be between ``0`` and ``COLOR_PAIRS - " +"1``." +msgstr "" + +#: library/curses.rst:466 +msgid "" +"Return the number of the color-pair set by the attribute value *attr*. :func:" +"`color_pair` is the counterpart to this function." +msgstr "" + +#: library/curses.rst:472 +msgid "" +"Equivalent to ``tputs(str, 1, putchar)``; emit the value of a specified " +"terminfo capability for the current terminal. Note that the output of :func:" +"`putp` always goes to standard output." +msgstr "" + +#: library/curses.rst:479 +msgid "" +"If *flag* is ``False``, the effect is the same as calling :func:`noqiflush`. " +"If *flag* is ``True``, or no argument is provided, the queues will be " +"flushed when these control characters are read." +msgstr "" + +#: library/curses.rst:486 +msgid "" +"Enter raw mode. In raw mode, normal line buffering and processing of " +"interrupt, quit, suspend, and flow control keys are turned off; characters " +"are presented to curses input functions one by one." +msgstr "" + +#: library/curses.rst:493 +msgid "" +"Restore the terminal to \"program\" mode, as previously saved by :func:" +"`def_prog_mode`." +msgstr "" + +#: library/curses.rst:499 +msgid "" +"Restore the terminal to \"shell\" mode, as previously saved by :func:" +"`def_shell_mode`." +msgstr "" + +#: library/curses.rst:505 +msgid "" +"Restore the state of the terminal modes to what it was at the last call to :" +"func:`savetty`." +msgstr "" + +#: library/curses.rst:511 +msgid "" +"Backend function used by :func:`resizeterm`, performing most of the work; " +"when resizing the windows, :func:`resize_term` blank-fills the areas that " +"are extended. The calling application should fill in these areas with " +"appropriate data. The :func:`!resize_term` function attempts to resize all " +"windows. However, due to the calling convention of pads, it is not possible " +"to resize these without additional interaction with the application." +msgstr "" + +#: library/curses.rst:521 +msgid "" +"Resize the standard and current windows to the specified dimensions, and " +"adjusts other bookkeeping data used by the curses library that record the " +"window dimensions (in particular the SIGWINCH handler)." +msgstr "" + +#: library/curses.rst:528 +msgid "" +"Save the current state of the terminal modes in a buffer, usable by :func:" +"`resetty`." +msgstr "" + +#: library/curses.rst:533 +msgid "Retrieves the value set by :func:`set_escdelay`." +msgstr "" + +#: library/curses.rst:539 +msgid "" +"Sets the number of milliseconds to wait after reading an escape character, " +"to distinguish between an individual escape character entered on the " +"keyboard from escape sequences sent by cursor and function keys." +msgstr "" + +#: library/curses.rst:547 +msgid "Retrieves the value set by :func:`set_tabsize`." +msgstr "" + +#: library/curses.rst:553 +msgid "" +"Sets the number of columns used by the curses library when converting a tab " +"character to spaces as it adds the tab to a window." +msgstr "" + +#: library/curses.rst:560 +msgid "" +"Set the virtual screen cursor to *y*, *x*. If *y* and *x* are both ``-1``, " +"then :meth:`leaveok ` is set ``True``." +msgstr "" + +#: library/curses.rst:566 +msgid "" +"Initialize the terminal. *term* is a string giving the terminal name, or " +"``None``; if omitted or ``None``, the value of the :envvar:`TERM` " +"environment variable will be used. *fd* is the file descriptor to which any " +"initialization sequences will be sent; if not supplied or ``-1``, the file " +"descriptor for ``sys.stdout`` will be used." +msgstr "" + +#: library/curses.rst:575 +msgid "" +"Must be called if the programmer wants to use colors, and before any other " +"color manipulation routine is called. It is good practice to call this " +"routine right after :func:`initscr`." +msgstr "" + +#: library/curses.rst:579 +msgid "" +":func:`start_color` initializes eight basic colors (black, red, green, " +"yellow, blue, magenta, cyan, and white), and two global variables in the :" +"mod:`curses` module, :const:`COLORS` and :const:`COLOR_PAIRS`, containing " +"the maximum number of colors and color-pairs the terminal can support. It " +"also restores the colors on the terminal to the values they had when the " +"terminal was just turned on." +msgstr "" + +#: library/curses.rst:588 +msgid "" +"Return a logical OR of all video attributes supported by the terminal. This " +"information is useful when a curses program needs complete control over the " +"appearance of the screen." +msgstr "" + +#: library/curses.rst:595 +msgid "" +"Return the value of the environment variable :envvar:`TERM`, as a bytes " +"object, truncated to 14 characters." +msgstr "" + +#: library/curses.rst:601 +msgid "" +"Return the value of the Boolean capability corresponding to the terminfo " +"capability name *capname* as an integer. Return the value ``-1`` if " +"*capname* is not a Boolean capability, or ``0`` if it is canceled or absent " +"from the terminal description." +msgstr "" + +#: library/curses.rst:609 +msgid "" +"Return the value of the numeric capability corresponding to the terminfo " +"capability name *capname* as an integer. Return the value ``-2`` if " +"*capname* is not a numeric capability, or ``-1`` if it is canceled or absent " +"from the terminal description." +msgstr "" + +#: library/curses.rst:617 +msgid "" +"Return the value of the string capability corresponding to the terminfo " +"capability name *capname* as a bytes object. Return ``None`` if *capname* " +"is not a terminfo \"string capability\", or is canceled or absent from the " +"terminal description." +msgstr "" + +#: library/curses.rst:625 +msgid "" +"Instantiate the bytes object *str* with the supplied parameters, where *str* " +"should be a parameterized string obtained from the terminfo database. E.g. " +"``tparm(tigetstr(\"cup\"), 5, 3)`` could result in ``b'\\033[6;4H'``, the " +"exact result depending on terminal type." +msgstr "" + +#: library/curses.rst:633 +msgid "" +"Specify that the file descriptor *fd* be used for typeahead checking. If " +"*fd* is ``-1``, then no typeahead checking is done." +msgstr "" + +#: library/curses.rst:636 +msgid "" +"The curses library does \"line-breakout optimization\" by looking for " +"typeahead periodically while updating the screen. If input is found, and it " +"is coming from a tty, the current update is postponed until refresh or " +"doupdate is called again, allowing faster response to commands typed in " +"advance. This function allows specifying a different file descriptor for " +"typeahead checking." +msgstr "" + +#: library/curses.rst:645 +msgid "" +"Return a bytes object which is a printable representation of the character " +"*ch*. Control characters are represented as a caret followed by the " +"character, for example as ``b'^C'``. Printing characters are left as they " +"are." +msgstr "" + +#: library/curses.rst:652 +msgid "Push *ch* so the next :meth:`~window.getch` will return it." +msgstr "" + +#: library/curses.rst:656 +msgid "Only one *ch* can be pushed before :meth:`!getch` is called." +msgstr "" + +#: library/curses.rst:661 +msgid "" +"Update :envvar:`LINES` and :envvar:`COLS`. Useful for detecting manual " +"screen resize." +msgstr "" + +#: library/curses.rst:668 +msgid "Push *ch* so the next :meth:`~window.get_wch` will return it." +msgstr "" + +#: library/curses.rst:672 +msgid "Only one *ch* can be pushed before :meth:`!get_wch` is called." +msgstr "" + +#: library/curses.rst:679 +msgid "" +"Push a :const:`KEY_MOUSE` event onto the input queue, associating the given " +"state data with it." +msgstr "" + +#: library/curses.rst:685 +msgid "" +"If used, this function should be called before :func:`initscr` or newterm " +"are called. When *flag* is ``False``, the values of lines and columns " +"specified in the terminfo database will be used, even if environment " +"variables :envvar:`LINES` and :envvar:`COLUMNS` (used by default) are set, " +"or if curses is running in a window (in which case default behavior would be " +"to use the window size if :envvar:`LINES` and :envvar:`COLUMNS` are not set)." +msgstr "" + +#: library/curses.rst:695 +msgid "" +"Allow use of default values for colors on terminals supporting this feature. " +"Use this to support transparency in your application. The default color is " +"assigned to the color number ``-1``. After calling this function, " +"``init_pair(x, curses.COLOR_RED, -1)`` initializes, for instance, color pair " +"*x* to a red foreground color on the default background." +msgstr "" + +#: library/curses.rst:704 +msgid "" +"Initialize curses and call another callable object, *func*, which should be " +"the rest of your curses-using application. If the application raises an " +"exception, this function will restore the terminal to a sane state before re-" +"raising the exception and generating a traceback. The callable object " +"*func* is then passed the main window 'stdscr' as its first argument, " +"followed by any other arguments passed to :func:`!wrapper`. Before calling " +"*func*, :func:`!wrapper` turns on cbreak mode, turns off echo, enables the " +"terminal keypad, and initializes colors if the terminal has color support. " +"On exit (whether normally or by exception) it restores cooked mode, turns on " +"echo, and disables the terminal keypad." +msgstr "" + +#: library/curses.rst:718 +msgid "Window Objects" +msgstr "" + +#: library/curses.rst:720 +msgid "" +"Window objects, as returned by :func:`initscr` and :func:`newwin` above, " +"have the following methods and attributes:" +msgstr "" + +#: library/curses.rst:727 +msgid "" +"Paint character *ch* at ``(y, x)`` with attributes *attr*, overwriting any " +"character previously painted at that location. By default, the character " +"position and attributes are the current settings for the window object." +msgstr "" + +#: library/curses.rst:733 +msgid "" +"Writing outside the window, subwindow, or pad raises a :exc:`curses.error`. " +"Attempting to write to the lower right corner of a window, subwindow, or pad " +"will cause an exception to be raised after the character is printed." +msgstr "" + +#: library/curses.rst:741 +msgid "" +"Paint at most *n* characters of the character string *str* at ``(y, x)`` " +"with attributes *attr*, overwriting anything previously on the display." +msgstr "" + +#: library/curses.rst:749 +msgid "" +"Paint the character string *str* at ``(y, x)`` with attributes *attr*, " +"overwriting anything previously on the display." +msgstr "" + +#: library/curses.rst:754 +msgid "" +"Writing outside the window, subwindow, or pad raises :exc:`curses.error`. " +"Attempting to write to the lower right corner of a window, subwindow, or pad " +"will cause an exception to be raised after the string is printed." +msgstr "" + +#: library/curses.rst:758 +msgid "" +"A `bug in ncurses `_, the backend for " +"this Python module, can cause SegFaults when resizing windows. This is fixed " +"in ncurses-6.1-20190511. If you are stuck with an earlier ncurses, you can " +"avoid triggering this if you do not call :func:`addstr` with a *str* that " +"has embedded newlines. Instead, call :func:`addstr` separately for each " +"line." +msgstr "" + +#: library/curses.rst:768 +msgid "" +"Remove attribute *attr* from the \"background\" set applied to all writes to " +"the current window." +msgstr "" + +#: library/curses.rst:774 +msgid "" +"Add attribute *attr* from the \"background\" set applied to all writes to " +"the current window." +msgstr "" + +#: library/curses.rst:780 +msgid "" +"Set the \"background\" set of attributes to *attr*. This set is initially " +"``0`` (no attributes)." +msgstr "" + +#: library/curses.rst:786 +msgid "" +"Set the background property of the window to the character *ch*, with " +"attributes *attr*. The change is then applied to every character position " +"in that window:" +msgstr "" + +#: library/curses.rst:790 +msgid "" +"The attribute of every character in the window is changed to the new " +"background attribute." +msgstr "" + +#: library/curses.rst:793 +msgid "" +"Wherever the former background character appears, it is changed to the new " +"background character." +msgstr "" + +#: library/curses.rst:799 +msgid "" +"Set the window's background. A window's background consists of a character " +"and any combination of attributes. The attribute part of the background is " +"combined (OR'ed) with all non-blank characters that are written into the " +"window. Both the character and attribute parts of the background are " +"combined with the blank characters. The background becomes a property of " +"the character and moves with the character through any scrolling and insert/" +"delete line/character operations." +msgstr "" + +#: library/curses.rst:809 +msgid "" +"Draw a border around the edges of the window. Each parameter specifies the " +"character to use for a specific part of the border; see the table below for " +"more details." +msgstr "" + +#: library/curses.rst:815 +msgid "" +"A ``0`` value for any parameter will cause the default character to be used " +"for that parameter. Keyword parameters can *not* be used. The defaults are " +"listed in this table:" +msgstr "" + +#: library/curses.rst:820 +msgid "Parameter" +msgstr "Paramètre" + +#: library/curses.rst:820 +msgid "Description" +msgstr "Description" + +#: library/curses.rst:820 +msgid "Default value" +msgstr "Valeur par défaut" + +#: library/curses.rst:822 +msgid "*ls*" +msgstr "*ls*" + +#: library/curses.rst:822 +msgid "Left side" +msgstr "" + +#: library/curses.rst:824 +msgid ":const:`ACS_VLINE`" +msgstr ":const:`ACS_VLINE`" + +#: library/curses.rst:824 +msgid "*rs*" +msgstr "*rs*" + +#: library/curses.rst:824 +msgid "Right side" +msgstr "" + +#: library/curses.rst:826 +msgid "*ts*" +msgstr "*ts*" + +#: library/curses.rst:826 +msgid "Top" +msgstr "" + +#: library/curses.rst:828 +msgid ":const:`ACS_HLINE`" +msgstr ":const:`ACS_HLINE`" + +#: library/curses.rst:828 +msgid "*bs*" +msgstr "*bs*" + +#: library/curses.rst:828 +msgid "Bottom" +msgstr "" + +#: library/curses.rst:830 +msgid "*tl*" +msgstr "*tl*" + +#: library/curses.rst:830 +msgid "Upper-left corner" +msgstr "" + +#: library/curses.rst:830 +msgid ":const:`ACS_ULCORNER`" +msgstr ":const:`ACS_ULCORNER`" + +#: library/curses.rst:832 +msgid "*tr*" +msgstr "" + +#: library/curses.rst:832 +msgid "Upper-right corner" +msgstr "" + +#: library/curses.rst:832 +msgid ":const:`ACS_URCORNER`" +msgstr ":const:`ACS_URCORNER`" + +#: library/curses.rst:834 +msgid "*bl*" +msgstr "" + +#: library/curses.rst:834 +msgid "Bottom-left corner" +msgstr "" + +#: library/curses.rst:834 +msgid ":const:`ACS_LLCORNER`" +msgstr ":const:`ACS_LLCORNER`" + +#: library/curses.rst:836 +msgid "*br*" +msgstr "" + +#: library/curses.rst:836 +msgid "Bottom-right corner" +msgstr "" + +#: library/curses.rst:836 +msgid ":const:`ACS_LRCORNER`" +msgstr ":const:`ACS_LRCORNER`" + +#: library/curses.rst:842 +msgid "" +"Similar to :meth:`border`, but both *ls* and *rs* are *vertch* and both *ts* " +"and *bs* are *horch*. The default corner characters are always used by this " +"function." +msgstr "" + +#: library/curses.rst:851 +msgid "" +"Set the attributes of *num* characters at the current cursor position, or at " +"position ``(y, x)`` if supplied. If *num* is not given or is ``-1``, the " +"attribute will be set on all the characters to the end of the line. This " +"function moves cursor to position ``(y, x)`` if supplied. The changed line " +"will be touched using the :meth:`touchline` method so that the contents will " +"be redisplayed by the next window refresh." +msgstr "" + +#: library/curses.rst:861 +msgid "" +"Like :meth:`erase`, but also cause the whole window to be repainted upon " +"next call to :meth:`refresh`." +msgstr "" + +#: library/curses.rst:867 +msgid "" +"If *flag* is ``True``, the next call to :meth:`refresh` will clear the " +"window completely." +msgstr "" + +#: library/curses.rst:873 +msgid "" +"Erase from cursor to the end of the window: all lines below the cursor are " +"deleted, and then the equivalent of :meth:`clrtoeol` is performed." +msgstr "" + +#: library/curses.rst:879 +msgid "Erase from cursor to the end of the line." +msgstr "" + +#: library/curses.rst:884 +msgid "" +"Update the current cursor position of all the ancestors of the window to " +"reflect the current cursor position of the window." +msgstr "" + +#: library/curses.rst:890 +msgid "Delete any character at ``(y, x)``." +msgstr "" + +#: library/curses.rst:895 +msgid "" +"Delete the line under the cursor. All following lines are moved up by one " +"line." +msgstr "" + +#: library/curses.rst:901 +msgid "" +"An abbreviation for \"derive window\", :meth:`derwin` is the same as " +"calling :meth:`subwin`, except that *begin_y* and *begin_x* are relative to " +"the origin of the window, rather than relative to the entire screen. Return " +"a window object for the derived window." +msgstr "" + +#: library/curses.rst:909 +msgid "" +"Add character *ch* with attribute *attr*, and immediately call :meth:" +"`refresh` on the window." +msgstr "" + +#: library/curses.rst:915 +msgid "" +"Test whether the given pair of screen-relative character-cell coordinates " +"are enclosed by the given window, returning ``True`` or ``False``. It is " +"useful for determining what subset of the screen windows enclose the " +"location of a mouse event." +msgstr "" + +#: library/curses.rst:920 +msgid "Previously it returned ``1`` or ``0`` instead of ``True`` or ``False``." +msgstr "" + +#: library/curses.rst:926 +msgid "" +"Encoding used to encode method arguments (Unicode strings and characters). " +"The encoding attribute is inherited from the parent window when a subwindow " +"is created, for example with :meth:`window.subwin`. By default, the locale " +"encoding is used (see :func:`locale.getpreferredencoding`)." +msgstr "" + +#: library/curses.rst:936 +msgid "Clear the window." +msgstr "" + +#: library/curses.rst:941 +msgid "Return a tuple ``(y, x)`` of co-ordinates of upper-left corner." +msgstr "" + +#: library/curses.rst:946 +msgid "Return the given window's current background character/attribute pair." +msgstr "" + +#: library/curses.rst:951 +msgid "" +"Get a character. Note that the integer returned does *not* have to be in " +"ASCII range: function keys, keypad keys and so on are represented by numbers " +"higher than 255. In no-delay mode, return ``-1`` if there is no input, " +"otherwise wait until a key is pressed." +msgstr "" + +#: library/curses.rst:959 +msgid "" +"Get a wide character. Return a character for most keys, or an integer for " +"function keys, keypad keys, and other special keys. In no-delay mode, raise " +"an exception if there is no input." +msgstr "" + +#: library/curses.rst:968 +msgid "" +"Get a character, returning a string instead of an integer, as :meth:`getch` " +"does. Function keys, keypad keys and other special keys return a multibyte " +"string containing the key name. In no-delay mode, raise an exception if " +"there is no input." +msgstr "" + +#: library/curses.rst:976 +msgid "Return a tuple ``(y, x)`` of the height and width of the window." +msgstr "" + +#: library/curses.rst:981 +msgid "" +"Return the beginning coordinates of this window relative to its parent " +"window as a tuple ``(y, x)``. Return ``(-1, -1)`` if this window has no " +"parent." +msgstr "" + +#: library/curses.rst:991 +msgid "" +"Read a bytes object from the user, with primitive line editing capacity." +msgstr "" + +#: library/curses.rst:996 +msgid "" +"Return a tuple ``(y, x)`` of current cursor position relative to the " +"window's upper-left corner." +msgstr "" + +#: library/curses.rst:1003 +msgid "" +"Display a horizontal line starting at ``(y, x)`` with length *n* consisting " +"of the character *ch*." +msgstr "" + +#: library/curses.rst:1009 +msgid "" +"If *flag* is ``False``, curses no longer considers using the hardware insert/" +"delete character feature of the terminal; if *flag* is ``True``, use of " +"character insertion and deletion is enabled. When curses is first " +"initialized, use of character insert/delete is enabled by default." +msgstr "" + +#: library/curses.rst:1017 +msgid "" +"If *flag* is ``True``, :mod:`curses` will try and use hardware line editing " +"facilities. Otherwise, line insertion/deletion are disabled." +msgstr "" + +#: library/curses.rst:1023 +msgid "" +"If *flag* is ``True``, any change in the window image automatically causes " +"the window to be refreshed; you no longer have to call :meth:`refresh` " +"yourself. However, it may degrade performance considerably, due to repeated " +"calls to wrefresh. This option is disabled by default." +msgstr "" + +#: library/curses.rst:1031 +msgid "" +"Return the character at the given position in the window. The bottom 8 bits " +"are the character proper, and upper bits are the attributes." +msgstr "" + +#: library/curses.rst:1038 +msgid "" +"Paint character *ch* at ``(y, x)`` with attributes *attr*, moving the line " +"from position *x* right by one character." +msgstr "" + +#: library/curses.rst:1044 +msgid "" +"Insert *nlines* lines into the specified window above the current line. The " +"*nlines* bottom lines are lost. For negative *nlines*, delete *nlines* " +"lines starting with the one under the cursor, and move the remaining lines " +"up. The bottom *nlines* lines are cleared. The current cursor position " +"remains the same." +msgstr "" + +#: library/curses.rst:1053 +msgid "" +"Insert a blank line under the cursor. All following lines are moved down by " +"one line." +msgstr "" + +#: library/curses.rst:1060 +msgid "" +"Insert a character string (as many characters as will fit on the line) " +"before the character under the cursor, up to *n* characters. If *n* is " +"zero or negative, the entire string is inserted. All characters to the right " +"of the cursor are shifted right, with the rightmost characters on the line " +"being lost. The cursor position does not change (after moving to *y*, *x*, " +"if specified)." +msgstr "" + +#: library/curses.rst:1070 +msgid "" +"Insert a character string (as many characters as will fit on the line) " +"before the character under the cursor. All characters to the right of the " +"cursor are shifted right, with the rightmost characters on the line being " +"lost. The cursor position does not change (after moving to *y*, *x*, if " +"specified)." +msgstr "" + +#: library/curses.rst:1079 +msgid "" +"Return a bytes object of characters, extracted from the window starting at " +"the current cursor position, or at *y*, *x* if specified. Attributes are " +"stripped from the characters. If *n* is specified, :meth:`instr` returns a " +"string at most *n* characters long (exclusive of the trailing NUL)." +msgstr "" + +#: library/curses.rst:1087 +msgid "" +"Return ``True`` if the specified line was modified since the last call to :" +"meth:`refresh`; otherwise return ``False``. Raise a :exc:`curses.error` " +"exception if *line* is not valid for the given window." +msgstr "" + +#: library/curses.rst:1094 +msgid "" +"Return ``True`` if the specified window was modified since the last call to :" +"meth:`refresh`; otherwise return ``False``." +msgstr "" + +#: library/curses.rst:1100 +msgid "" +"If *flag* is ``True``, escape sequences generated by some keys (keypad, " +"function keys) will be interpreted by :mod:`curses`. If *flag* is ``False``, " +"escape sequences will be left as is in the input stream." +msgstr "" + +#: library/curses.rst:1107 +msgid "" +"If *flag* is ``True``, cursor is left where it is on update, instead of " +"being at \"cursor position.\" This reduces cursor movement where possible. " +"If possible the cursor will be made invisible." +msgstr "" + +#: library/curses.rst:1111 +msgid "" +"If *flag* is ``False``, cursor will always be at \"cursor position\" after " +"an update." +msgstr "" + +#: library/curses.rst:1116 +msgid "Move cursor to ``(new_y, new_x)``." +msgstr "" + +#: library/curses.rst:1121 +msgid "" +"Move the window inside its parent window. The screen-relative parameters of " +"the window are not changed. This routine is used to display different parts " +"of the parent window at the same physical position on the screen." +msgstr "" + +#: library/curses.rst:1128 +msgid "Move the window so its upper-left corner is at ``(new_y, new_x)``." +msgstr "" + +#: library/curses.rst:1133 +msgid "If *flag* is ``True``, :meth:`getch` will be non-blocking." +msgstr "" + +#: library/curses.rst:1138 +msgid "If *flag* is ``True``, escape sequences will not be timed out." +msgstr "" + +#: library/curses.rst:1140 +msgid "" +"If *flag* is ``False``, after a few milliseconds, an escape sequence will " +"not be interpreted, and will be left in the input stream as is." +msgstr "" + +#: library/curses.rst:1146 +msgid "" +"Mark for refresh but wait. This function updates the data structure " +"representing the desired state of the window, but does not force an update " +"of the physical screen. To accomplish that, call :func:`doupdate`." +msgstr "" + +#: library/curses.rst:1153 +msgid "" +"Overlay the window on top of *destwin*. The windows need not be the same " +"size, only the overlapping region is copied. This copy is non-destructive, " +"which means that the current background character does not overwrite the old " +"contents of *destwin*." +msgstr "" + +#: library/curses.rst:1158 +msgid "" +"To get fine-grained control over the copied region, the second form of :meth:" +"`overlay` can be used. *sminrow* and *smincol* are the upper-left " +"coordinates of the source window, and the other variables mark a rectangle " +"in the destination window." +msgstr "" + +#: library/curses.rst:1166 +msgid "" +"Overwrite the window on top of *destwin*. The windows need not be the same " +"size, in which case only the overlapping region is copied. This copy is " +"destructive, which means that the current background character overwrites " +"the old contents of *destwin*." +msgstr "" + +#: library/curses.rst:1171 +msgid "" +"To get fine-grained control over the copied region, the second form of :meth:" +"`overwrite` can be used. *sminrow* and *smincol* are the upper-left " +"coordinates of the source window, the other variables mark a rectangle in " +"the destination window." +msgstr "" + +#: library/curses.rst:1179 +msgid "" +"Write all data associated with the window into the provided file object. " +"This information can be later retrieved using the :func:`getwin` function." +msgstr "" + +#: library/curses.rst:1185 +msgid "" +"Indicate that the *num* screen lines, starting at line *beg*, are corrupted " +"and should be completely redrawn on the next :meth:`refresh` call." +msgstr "" + +#: library/curses.rst:1191 +msgid "" +"Touch the entire window, causing it to be completely redrawn on the next :" +"meth:`refresh` call." +msgstr "" + +#: library/curses.rst:1197 +msgid "" +"Update the display immediately (sync actual screen with previous drawing/" +"deleting methods)." +msgstr "" + +#: library/curses.rst:1200 +msgid "" +"The 6 optional arguments can only be specified when the window is a pad " +"created with :func:`newpad`. The additional parameters are needed to " +"indicate what part of the pad and screen are involved. *pminrow* and " +"*pmincol* specify the upper left-hand corner of the rectangle to be " +"displayed in the pad. *sminrow*, *smincol*, *smaxrow*, and *smaxcol* " +"specify the edges of the rectangle to be displayed on the screen. The lower " +"right-hand corner of the rectangle to be displayed in the pad is calculated " +"from the screen coordinates, since the rectangles must be the same size. " +"Both rectangles must be entirely contained within their respective " +"structures. Negative values of *pminrow*, *pmincol*, *sminrow*, or " +"*smincol* are treated as if they were zero." +msgstr "" + +#: library/curses.rst:1214 +msgid "" +"Reallocate storage for a curses window to adjust its dimensions to the " +"specified values. If either dimension is larger than the current values, " +"the window's data is filled with blanks that have the current background " +"rendition (as set by :meth:`bkgdset`) merged into them." +msgstr "" + +#: library/curses.rst:1222 +msgid "Scroll the screen or scrolling region upward by *lines* lines." +msgstr "" + +#: library/curses.rst:1227 +msgid "" +"Control what happens when the cursor of a window is moved off the edge of " +"the window or scrolling region, either as a result of a newline action on " +"the bottom line, or typing the last character of the last line. If *flag* " +"is ``False``, the cursor is left on the bottom line. If *flag* is ``True``, " +"the window is scrolled up one line. Note that in order to get the physical " +"scrolling effect on the terminal, it is also necessary to call :meth:`idlok`." +msgstr "" + +#: library/curses.rst:1237 +msgid "" +"Set the scrolling region from line *top* to line *bottom*. All scrolling " +"actions will take place in this region." +msgstr "" + +#: library/curses.rst:1243 +msgid "" +"Turn off the standout attribute. On some terminals this has the side effect " +"of turning off all attributes." +msgstr "" + +#: library/curses.rst:1249 +msgid "Turn on attribute *A_STANDOUT*." +msgstr "" + +#: library/curses.rst:1262 +msgid "" +"Return a sub-window, whose upper-left corner is at ``(begin_y, begin_x)``, " +"and whose width/height is *ncols*/*nlines*." +msgstr "" + +#: library/curses.rst:1265 +msgid "" +"By default, the sub-window will extend from the specified position to the " +"lower right corner of the window." +msgstr "" + +#: library/curses.rst:1271 +msgid "" +"Touch each location in the window that has been touched in any of its " +"ancestor windows. This routine is called by :meth:`refresh`, so it should " +"almost never be necessary to call it manually." +msgstr "" + +#: library/curses.rst:1278 +msgid "" +"If *flag* is ``True``, then :meth:`syncup` is called automatically whenever " +"there is a change in the window." +msgstr "" + +#: library/curses.rst:1284 +msgid "" +"Touch all locations in ancestors of the window that have been changed in " +"the window." +msgstr "" + +#: library/curses.rst:1290 +msgid "" +"Set blocking or non-blocking read behavior for the window. If *delay* is " +"negative, blocking read is used (which will wait indefinitely for input). " +"If *delay* is zero, then non-blocking read is used, and :meth:`getch` will " +"return ``-1`` if no input is waiting. If *delay* is positive, then :meth:" +"`getch` will block for *delay* milliseconds, and return ``-1`` if there is " +"still no input at the end of that time." +msgstr "" + +#: library/curses.rst:1300 +msgid "" +"Pretend *count* lines have been changed, starting with line *start*. If " +"*changed* is supplied, it specifies whether the affected lines are marked as " +"having been changed (*changed*\\ ``=True``) or unchanged (*changed*\\ " +"``=False``)." +msgstr "" + +#: library/curses.rst:1307 +msgid "" +"Pretend the whole window has been changed, for purposes of drawing " +"optimizations." +msgstr "" + +#: library/curses.rst:1313 +msgid "" +"Mark all lines in the window as unchanged since the last call to :meth:" +"`refresh`." +msgstr "" + +#: library/curses.rst:1320 +msgid "" +"Display a vertical line starting at ``(y, x)`` with length *n* consisting of " +"the character *ch* with attributes *attr*." +msgstr "" + +#: library/curses.rst:1325 +msgid "Constants" +msgstr "Constantes" + +#: library/curses.rst:1327 +msgid "The :mod:`curses` module defines the following data members:" +msgstr "" + +#: library/curses.rst:1332 +msgid "" +"Some curses routines that return an integer, such as :meth:`~window." +"getch`, return :const:`ERR` upon failure." +msgstr "" + +#: library/curses.rst:1338 +msgid "" +"Some curses routines that return an integer, such as :func:`napms`, " +"return :const:`OK` upon success." +msgstr "" + +#: library/curses.rst:1344 +msgid "" +"A bytes object representing the current version of the module. Also " +"available as :const:`__version__`." +msgstr "" + +#: library/curses.rst:1350 +msgid "" +"A named tuple containing the three components of the ncurses library " +"version: *major*, *minor*, and *patch*. All values are integers. The " +"components can also be accessed by name, so ``curses.ncurses_version[0]`` " +"is equivalent to ``curses.ncurses_version.major`` and so on." +msgstr "" + +#: library/curses.rst:1355 +msgid "Availability: if the ncurses library is used." +msgstr "" + +#: library/curses.rst:1360 +msgid "" +"Some constants are available to specify character cell attributes. The exact " +"constants available are system dependent." +msgstr "" + +#: library/curses.rst:1364 +msgid "Attribute" +msgstr "Attribut" + +#: library/curses.rst:1412 library/curses.rst:1656 +msgid "Meaning" +msgstr "Signification" + +#: library/curses.rst:1366 +msgid "``A_ALTCHARSET``" +msgstr "``A_ALTCHARSET``" + +#: library/curses.rst:1366 +msgid "Alternate character set mode" +msgstr "" + +#: library/curses.rst:1368 +msgid "``A_BLINK``" +msgstr "``A_BLINK``" + +#: library/curses.rst:1368 +msgid "Blink mode" +msgstr "" + +#: library/curses.rst:1370 +msgid "``A_BOLD``" +msgstr "``A_BOLD``" + +#: library/curses.rst:1370 +msgid "Bold mode" +msgstr "" + +#: library/curses.rst:1372 +msgid "``A_DIM``" +msgstr "``A_DIM``" + +#: library/curses.rst:1372 +msgid "Dim mode" +msgstr "" + +#: library/curses.rst:1374 +msgid "``A_INVIS``" +msgstr "``A_INVIS``" + +#: library/curses.rst:1374 +msgid "Invisible or blank mode" +msgstr "" + +#: library/curses.rst:1376 +msgid "``A_ITALIC``" +msgstr "``A_ITALIC``" + +#: library/curses.rst:1376 +msgid "Italic mode" +msgstr "" + +#: library/curses.rst:1378 +msgid "``A_NORMAL``" +msgstr "``A_NORMAL``" + +#: library/curses.rst:1378 +msgid "Normal attribute" +msgstr "Attribut normal" + +#: library/curses.rst:1380 +msgid "``A_PROTECT``" +msgstr "``A_PROTECT``" + +#: library/curses.rst:1380 +msgid "Protected mode" +msgstr "" + +#: library/curses.rst:1382 +msgid "``A_REVERSE``" +msgstr "``A_REVERSE``" + +#: library/curses.rst:1382 +msgid "Reverse background and foreground colors" +msgstr "" + +#: library/curses.rst:1385 +msgid "``A_STANDOUT``" +msgstr "``A_STANDOUT``" + +#: library/curses.rst:1385 +msgid "Standout mode" +msgstr "" + +#: library/curses.rst:1387 +msgid "``A_UNDERLINE``" +msgstr "``A_UNDERLINE``" + +#: library/curses.rst:1387 +msgid "Underline mode" +msgstr "" + +#: library/curses.rst:1389 +msgid "``A_HORIZONTAL``" +msgstr "``A_HORIZONTAL``" + +#: library/curses.rst:1389 +msgid "Horizontal highlight" +msgstr "" + +#: library/curses.rst:1391 +msgid "``A_LEFT``" +msgstr "``A_LEFT``" + +#: library/curses.rst:1391 +msgid "Left highlight" +msgstr "" + +#: library/curses.rst:1393 +msgid "``A_LOW``" +msgstr "``A_LOW``" + +#: library/curses.rst:1393 +msgid "Low highlight" +msgstr "" + +#: library/curses.rst:1395 +msgid "``A_RIGHT``" +msgstr "``A_RIGHT``" + +#: library/curses.rst:1395 +msgid "Right highlight" +msgstr "" + +#: library/curses.rst:1397 +msgid "``A_TOP``" +msgstr "``A_TOP``" + +#: library/curses.rst:1397 +msgid "Top highlight" +msgstr "" + +#: library/curses.rst:1399 +msgid "``A_VERTICAL``" +msgstr "``A_VERTICAL``" + +#: library/curses.rst:1399 +msgid "Vertical highlight" +msgstr "" + +#: library/curses.rst:1417 +msgid "``A_CHARTEXT``" +msgstr "``A_CHARTEXT``" + +#: library/curses.rst:1417 +msgid "Bit-mask to extract a character" +msgstr "" + +#: library/curses.rst:1405 +msgid "``A_ITALIC`` was added." +msgstr "" + +#: library/curses.rst:1408 +msgid "" +"Several constants are available to extract corresponding attributes returned " +"by some methods." +msgstr "" + +#: library/curses.rst:1412 +msgid "Bit-mask" +msgstr "" + +#: library/curses.rst:1414 +msgid "``A_ATTRIBUTES``" +msgstr "``A_ATTRIBUTES``" + +#: library/curses.rst:1414 +msgid "Bit-mask to extract attributes" +msgstr "" + +#: library/curses.rst:1420 +msgid "``A_COLOR``" +msgstr "``A_COLOR``" + +#: library/curses.rst:1420 +msgid "Bit-mask to extract color-pair field information" +msgstr "" + +#: library/curses.rst:1424 +msgid "" +"Keys are referred to by integer constants with names starting with " +"``KEY_``. The exact keycaps available are system dependent." +msgstr "" + +#: library/curses.rst:1430 +msgid "Key constant" +msgstr "" + +#: library/curses.rst:1430 +msgid "Key" +msgstr "Clé" + +#: library/curses.rst:1432 +msgid "``KEY_MIN``" +msgstr "``KEY_MIN``" + +#: library/curses.rst:1432 +msgid "Minimum key value" +msgstr "" + +#: library/curses.rst:1434 +msgid "``KEY_BREAK``" +msgstr "``KEY_BREAK``" + +#: library/curses.rst:1434 +msgid "Break key (unreliable)" +msgstr "" + +#: library/curses.rst:1436 +msgid "``KEY_DOWN``" +msgstr "``KEY_DOWN``" + +#: library/curses.rst:1436 +msgid "Down-arrow" +msgstr "" + +#: library/curses.rst:1438 +msgid "``KEY_UP``" +msgstr "``KEY_UP``" + +#: library/curses.rst:1438 +msgid "Up-arrow" +msgstr "" + +#: library/curses.rst:1440 +msgid "``KEY_LEFT``" +msgstr "``KEY_LEFT``" + +#: library/curses.rst:1440 +msgid "Left-arrow" +msgstr "" + +#: library/curses.rst:1442 +msgid "``KEY_RIGHT``" +msgstr "``KEY_RIGHT``" + +#: library/curses.rst:1442 +msgid "Right-arrow" +msgstr "" + +#: library/curses.rst:1444 +msgid "``KEY_HOME``" +msgstr "``KEY_HOME``" + +#: library/curses.rst:1444 +msgid "Home key (upward+left arrow)" +msgstr "" + +#: library/curses.rst:1446 +msgid "``KEY_BACKSPACE``" +msgstr "``KEY_BACKSPACE``" + +#: library/curses.rst:1446 +msgid "Backspace (unreliable)" +msgstr "" + +#: library/curses.rst:1448 +msgid "``KEY_F0``" +msgstr "``KEY_F0``" + +#: library/curses.rst:1448 +msgid "Function keys. Up to 64 function keys are supported." +msgstr "" + +#: library/curses.rst:1451 +msgid "``KEY_Fn``" +msgstr "``KEY_Fn``" + +#: library/curses.rst:1451 +msgid "Value of function key *n*" +msgstr "" + +#: library/curses.rst:1453 +msgid "``KEY_DL``" +msgstr "``KEY_DL``" + +#: library/curses.rst:1453 +msgid "Delete line" +msgstr "" + +#: library/curses.rst:1455 +msgid "``KEY_IL``" +msgstr "``KEY_IL``" + +#: library/curses.rst:1455 +msgid "Insert line" +msgstr "" + +#: library/curses.rst:1457 +msgid "``KEY_DC``" +msgstr "``KEY_DC``" + +#: library/curses.rst:1457 +msgid "Delete character" +msgstr "" + +#: library/curses.rst:1459 +msgid "``KEY_IC``" +msgstr "``KEY_IC``" + +#: library/curses.rst:1459 +msgid "Insert char or enter insert mode" +msgstr "" + +#: library/curses.rst:1461 +msgid "``KEY_EIC``" +msgstr "``KEY_EIC``" + +#: library/curses.rst:1461 +msgid "Exit insert char mode" +msgstr "" + +#: library/curses.rst:1463 +msgid "``KEY_CLEAR``" +msgstr "``KEY_CLEAR``" + +#: library/curses.rst:1463 +msgid "Clear screen" +msgstr "" + +#: library/curses.rst:1465 +msgid "``KEY_EOS``" +msgstr "``KEY_EOS``" + +#: library/curses.rst:1465 +msgid "Clear to end of screen" +msgstr "" + +#: library/curses.rst:1467 +msgid "``KEY_EOL``" +msgstr "``KEY_EOL``" + +#: library/curses.rst:1467 +msgid "Clear to end of line" +msgstr "" + +#: library/curses.rst:1469 +msgid "``KEY_SF``" +msgstr "``KEY_SF``" + +#: library/curses.rst:1469 +msgid "Scroll 1 line forward" +msgstr "" + +#: library/curses.rst:1471 +msgid "``KEY_SR``" +msgstr "``KEY_SR``" + +#: library/curses.rst:1471 +msgid "Scroll 1 line backward (reverse)" +msgstr "" + +#: library/curses.rst:1473 +msgid "``KEY_NPAGE``" +msgstr "``KEY_NPAGE``" + +#: library/curses.rst:1473 +msgid "Next page" +msgstr "" + +#: library/curses.rst:1475 +msgid "``KEY_PPAGE``" +msgstr "``KEY_PPAGE``" + +#: library/curses.rst:1475 +msgid "Previous page" +msgstr "" + +#: library/curses.rst:1477 +msgid "``KEY_STAB``" +msgstr "``KEY_STAB``" + +#: library/curses.rst:1477 +msgid "Set tab" +msgstr "" + +#: library/curses.rst:1479 +msgid "``KEY_CTAB``" +msgstr "``KEY_CTAB``" + +#: library/curses.rst:1479 +msgid "Clear tab" +msgstr "" + +#: library/curses.rst:1481 +msgid "``KEY_CATAB``" +msgstr "``KEY_CATAB``" + +#: library/curses.rst:1481 +msgid "Clear all tabs" +msgstr "" + +#: library/curses.rst:1483 +msgid "``KEY_ENTER``" +msgstr "``KEY_ENTER``" + +#: library/curses.rst:1483 +msgid "Enter or send (unreliable)" +msgstr "" + +#: library/curses.rst:1485 +msgid "``KEY_SRESET``" +msgstr "``KEY_SRESET``" + +#: library/curses.rst:1485 +msgid "Soft (partial) reset (unreliable)" +msgstr "" + +#: library/curses.rst:1487 +msgid "``KEY_RESET``" +msgstr "``KEY_RESET``" + +#: library/curses.rst:1487 +msgid "Reset or hard reset (unreliable)" +msgstr "" + +#: library/curses.rst:1489 +msgid "``KEY_PRINT``" +msgstr "``KEY_PRINT``" + +#: library/curses.rst:1489 +msgid "Print" +msgstr "" + +#: library/curses.rst:1491 +msgid "``KEY_LL``" +msgstr "``KEY_LL``" + +#: library/curses.rst:1491 +msgid "Home down or bottom (lower left)" +msgstr "" + +#: library/curses.rst:1493 +msgid "``KEY_A1``" +msgstr "``KEY_A1``" + +#: library/curses.rst:1493 +msgid "Upper left of keypad" +msgstr "" + +#: library/curses.rst:1495 +msgid "``KEY_A3``" +msgstr "``KEY_A3``" + +#: library/curses.rst:1495 +msgid "Upper right of keypad" +msgstr "" + +#: library/curses.rst:1497 +msgid "``KEY_B2``" +msgstr "``KEY_B2``" + +#: library/curses.rst:1497 +msgid "Center of keypad" +msgstr "" + +#: library/curses.rst:1499 +msgid "``KEY_C1``" +msgstr "``KEY_C1``" + +#: library/curses.rst:1499 +msgid "Lower left of keypad" +msgstr "" + +#: library/curses.rst:1501 +msgid "``KEY_C3``" +msgstr "``KEY_C3``" + +#: library/curses.rst:1501 +msgid "Lower right of keypad" +msgstr "" + +#: library/curses.rst:1503 +msgid "``KEY_BTAB``" +msgstr "``KEY_BTAB``" + +#: library/curses.rst:1503 +msgid "Back tab" +msgstr "" + +#: library/curses.rst:1505 +msgid "``KEY_BEG``" +msgstr "``KEY_BEG``" + +#: library/curses.rst:1505 +msgid "Beg (beginning)" +msgstr "" + +#: library/curses.rst:1507 +msgid "``KEY_CANCEL``" +msgstr "``KEY_CANCEL``" + +#: library/curses.rst:1507 +msgid "Cancel" +msgstr "" + +#: library/curses.rst:1509 +msgid "``KEY_CLOSE``" +msgstr "``KEY_CLOSE``" + +#: library/curses.rst:1509 +msgid "Close" +msgstr "*Close*" + +#: library/curses.rst:1511 +msgid "``KEY_COMMAND``" +msgstr "``KEY_COMMAND``" + +#: library/curses.rst:1511 +msgid "Cmd (command)" +msgstr "" + +#: library/curses.rst:1513 +msgid "``KEY_COPY``" +msgstr "``KEY_COPY``" + +#: library/curses.rst:1513 +msgid "Copy" +msgstr "*Copy*" + +#: library/curses.rst:1515 +msgid "``KEY_CREATE``" +msgstr "``KEY_CREATE``" + +#: library/curses.rst:1515 +msgid "Create" +msgstr "" + +#: library/curses.rst:1517 +msgid "``KEY_END``" +msgstr "``KEY_END``" + +#: library/curses.rst:1517 +msgid "End" +msgstr "" + +#: library/curses.rst:1519 +msgid "``KEY_EXIT``" +msgstr "``KEY_EXIT``" + +#: library/curses.rst:1519 +msgid "Exit" +msgstr "*Exit*" + +#: library/curses.rst:1521 +msgid "``KEY_FIND``" +msgstr "``KEY_FIND``" + +#: library/curses.rst:1521 +msgid "Find" +msgstr "" + +#: library/curses.rst:1523 +msgid "``KEY_HELP``" +msgstr "``KEY_HELP``" + +#: library/curses.rst:1523 +msgid "Help" +msgstr "" + +#: library/curses.rst:1525 +msgid "``KEY_MARK``" +msgstr "``KEY_MARK``" + +#: library/curses.rst:1525 +msgid "Mark" +msgstr "" + +#: library/curses.rst:1527 +msgid "``KEY_MESSAGE``" +msgstr "``KEY_MESSAGE``" + +#: library/curses.rst:1527 +msgid "Message" +msgstr "" + +#: library/curses.rst:1529 +msgid "``KEY_MOVE``" +msgstr "``KEY_MOVE``" + +#: library/curses.rst:1529 +msgid "Move" +msgstr "" + +#: library/curses.rst:1531 +msgid "``KEY_NEXT``" +msgstr "``KEY_NEXT``" + +#: library/curses.rst:1531 +msgid "Next" +msgstr "" + +#: library/curses.rst:1533 +msgid "``KEY_OPEN``" +msgstr "``KEY_OPEN``" + +#: library/curses.rst:1533 +msgid "Open" +msgstr "" + +#: library/curses.rst:1535 +msgid "``KEY_OPTIONS``" +msgstr "``KEY_OPTIONS``" + +#: library/curses.rst:1535 +msgid "Options" +msgstr "Options" + +#: library/curses.rst:1537 +msgid "``KEY_PREVIOUS``" +msgstr "``KEY_PREVIOUS``" + +#: library/curses.rst:1537 +msgid "Prev (previous)" +msgstr "" + +#: library/curses.rst:1539 +msgid "``KEY_REDO``" +msgstr "``KEY_REDO``" + +#: library/curses.rst:1539 +msgid "Redo" +msgstr "*Redo*" + +#: library/curses.rst:1541 +msgid "``KEY_REFERENCE``" +msgstr "``KEY_REFERENCE``" + +#: library/curses.rst:1541 +msgid "Ref (reference)" +msgstr "" + +#: library/curses.rst:1543 +msgid "``KEY_REFRESH``" +msgstr "``KEY_REFRESH``" + +#: library/curses.rst:1543 +msgid "Refresh" +msgstr "" + +#: library/curses.rst:1545 +msgid "``KEY_REPLACE``" +msgstr "``KEY_REPLACE``" + +#: library/curses.rst:1545 +msgid "Replace" +msgstr "" + +#: library/curses.rst:1547 +msgid "``KEY_RESTART``" +msgstr "``KEY_RESTART``" + +#: library/curses.rst:1547 +msgid "Restart" +msgstr "" + +#: library/curses.rst:1549 +msgid "``KEY_RESUME``" +msgstr "``KEY_RESUME``" + +#: library/curses.rst:1549 +msgid "Resume" +msgstr "" + +#: library/curses.rst:1551 +msgid "``KEY_SAVE``" +msgstr "``KEY_SAVE``" + +#: library/curses.rst:1551 +msgid "Save" +msgstr "*Save*" + +#: library/curses.rst:1553 +msgid "``KEY_SBEG``" +msgstr "``KEY_SBEG``" + +#: library/curses.rst:1553 +msgid "Shifted Beg (beginning)" +msgstr "" + +#: library/curses.rst:1555 +msgid "``KEY_SCANCEL``" +msgstr "``KEY_SCANCEL``" + +#: library/curses.rst:1555 +msgid "Shifted Cancel" +msgstr "" + +#: library/curses.rst:1557 +msgid "``KEY_SCOMMAND``" +msgstr "``KEY_SCOMMAND``" + +#: library/curses.rst:1557 +msgid "Shifted Command" +msgstr "" + +#: library/curses.rst:1559 +msgid "``KEY_SCOPY``" +msgstr "``KEY_SCOPY``" + +#: library/curses.rst:1559 +msgid "Shifted Copy" +msgstr "" + +#: library/curses.rst:1561 +msgid "``KEY_SCREATE``" +msgstr "``KEY_SCREATE``" + +#: library/curses.rst:1561 +msgid "Shifted Create" +msgstr "" + +#: library/curses.rst:1563 +msgid "``KEY_SDC``" +msgstr "``KEY_SDC``" + +#: library/curses.rst:1563 +msgid "Shifted Delete char" +msgstr "" + +#: library/curses.rst:1565 +msgid "``KEY_SDL``" +msgstr "``KEY_SDL``" + +#: library/curses.rst:1565 +msgid "Shifted Delete line" +msgstr "" + +#: library/curses.rst:1567 +msgid "``KEY_SELECT``" +msgstr "``KEY_SELECT``" + +#: library/curses.rst:1567 +msgid "Select" +msgstr "" + +#: library/curses.rst:1569 +msgid "``KEY_SEND``" +msgstr "``KEY_SEND``" + +#: library/curses.rst:1569 +msgid "Shifted End" +msgstr "" + +#: library/curses.rst:1571 +msgid "``KEY_SEOL``" +msgstr "``KEY_SEOL``" + +#: library/curses.rst:1571 +msgid "Shifted Clear line" +msgstr "" + +#: library/curses.rst:1573 +msgid "``KEY_SEXIT``" +msgstr "``KEY_SEXIT``" + +#: library/curses.rst:1573 +msgid "Shifted Exit" +msgstr "" + +#: library/curses.rst:1575 +msgid "``KEY_SFIND``" +msgstr "``KEY_SFIND``" + +#: library/curses.rst:1575 +msgid "Shifted Find" +msgstr "" + +#: library/curses.rst:1577 +msgid "``KEY_SHELP``" +msgstr "``KEY_SHELP``" + +#: library/curses.rst:1577 +msgid "Shifted Help" +msgstr "" + +#: library/curses.rst:1579 +msgid "``KEY_SHOME``" +msgstr "``KEY_SHOME``" + +#: library/curses.rst:1579 +msgid "Shifted Home" +msgstr "" + +#: library/curses.rst:1581 +msgid "``KEY_SIC``" +msgstr "``KEY_SIC``" + +#: library/curses.rst:1581 +msgid "Shifted Input" +msgstr "" + +#: library/curses.rst:1583 +msgid "``KEY_SLEFT``" +msgstr "``KEY_SLEFT``" + +#: library/curses.rst:1583 +msgid "Shifted Left arrow" +msgstr "" + +#: library/curses.rst:1585 +msgid "``KEY_SMESSAGE``" +msgstr "``KEY_SMESSAGE``" + +#: library/curses.rst:1585 +msgid "Shifted Message" +msgstr "" + +#: library/curses.rst:1587 +msgid "``KEY_SMOVE``" +msgstr "``KEY_SMOVE``" + +#: library/curses.rst:1587 +msgid "Shifted Move" +msgstr "" + +#: library/curses.rst:1589 +msgid "``KEY_SNEXT``" +msgstr "``KEY_SNEXT``" + +#: library/curses.rst:1589 +msgid "Shifted Next" +msgstr "" + +#: library/curses.rst:1591 +msgid "``KEY_SOPTIONS``" +msgstr "``KEY_SOPTIONS``" + +#: library/curses.rst:1591 +msgid "Shifted Options" +msgstr "" + +#: library/curses.rst:1593 +msgid "``KEY_SPREVIOUS``" +msgstr "``KEY_SPREVIOUS``" + +#: library/curses.rst:1593 +msgid "Shifted Prev" +msgstr "" + +#: library/curses.rst:1595 +msgid "``KEY_SPRINT``" +msgstr "``KEY_SPRINT``" + +#: library/curses.rst:1595 +msgid "Shifted Print" +msgstr "" + +#: library/curses.rst:1597 +msgid "``KEY_SREDO``" +msgstr "``KEY_SREDO``" + +#: library/curses.rst:1597 +msgid "Shifted Redo" +msgstr "" + +#: library/curses.rst:1599 +msgid "``KEY_SREPLACE``" +msgstr "``KEY_SREPLACE``" + +#: library/curses.rst:1599 +msgid "Shifted Replace" +msgstr "" + +#: library/curses.rst:1601 +msgid "``KEY_SRIGHT``" +msgstr "``KEY_SRIGHT``" + +#: library/curses.rst:1601 +msgid "Shifted Right arrow" +msgstr "" + +#: library/curses.rst:1603 +msgid "``KEY_SRSUME``" +msgstr "``KEY_SRSUME``" + +#: library/curses.rst:1603 +msgid "Shifted Resume" +msgstr "" + +#: library/curses.rst:1605 +msgid "``KEY_SSAVE``" +msgstr "``KEY_SSAVE``" + +#: library/curses.rst:1605 +msgid "Shifted Save" +msgstr "" + +#: library/curses.rst:1607 +msgid "``KEY_SSUSPEND``" +msgstr "``KEY_SSUSPEND``" + +#: library/curses.rst:1607 +msgid "Shifted Suspend" +msgstr "" + +#: library/curses.rst:1609 +msgid "``KEY_SUNDO``" +msgstr "``KEY_SUNDO``" + +#: library/curses.rst:1609 +msgid "Shifted Undo" +msgstr "" + +#: library/curses.rst:1611 +msgid "``KEY_SUSPEND``" +msgstr "``KEY_SUSPEND``" + +#: library/curses.rst:1611 +msgid "Suspend" +msgstr "" + +#: library/curses.rst:1613 +msgid "``KEY_UNDO``" +msgstr "``KEY_UNDO``" + +#: library/curses.rst:1613 +msgid "Undo" +msgstr "*Undo*" + +#: library/curses.rst:1615 +msgid "``KEY_MOUSE``" +msgstr "``KEY_MOUSE``" + +#: library/curses.rst:1615 +msgid "Mouse event has occurred" +msgstr "" + +#: library/curses.rst:1617 +msgid "``KEY_RESIZE``" +msgstr "``KEY_RESIZE``" + +#: library/curses.rst:1617 +msgid "Terminal resize event" +msgstr "" + +#: library/curses.rst:1619 +msgid "``KEY_MAX``" +msgstr "``KEY_MAX``" + +#: library/curses.rst:1619 +msgid "Maximum key value" +msgstr "" + +#: library/curses.rst:1622 +msgid "" +"On VT100s and their software emulations, such as X terminal emulators, there " +"are normally at least four function keys (:const:`KEY_F1`, :const:`KEY_F2`, :" +"const:`KEY_F3`, :const:`KEY_F4`) available, and the arrow keys mapped to :" +"const:`KEY_UP`, :const:`KEY_DOWN`, :const:`KEY_LEFT` and :const:`KEY_RIGHT` " +"in the obvious way. If your machine has a PC keyboard, it is safe to expect " +"arrow keys and twelve function keys (older PC keyboards may have only ten " +"function keys); also, the following keypad mappings are standard:" +msgstr "" + +#: library/curses.rst:1631 +msgid "Keycap" +msgstr "" + +#: library/curses.rst:1748 library/curses.rst:1872 +msgid "Constant" +msgstr "Constante" + +#: library/curses.rst:1633 +msgid ":kbd:`Insert`" +msgstr ":kbd:`Insert`" + +#: library/curses.rst:1633 +msgid "KEY_IC" +msgstr "" + +#: library/curses.rst:1635 +msgid ":kbd:`Delete`" +msgstr ":kbd:`Delete`" + +#: library/curses.rst:1635 +msgid "KEY_DC" +msgstr "" + +#: library/curses.rst:1637 +msgid ":kbd:`Home`" +msgstr ":kbd:`Home`" + +#: library/curses.rst:1637 +msgid "KEY_HOME" +msgstr "KEY_HOME" + +#: library/curses.rst:1639 +msgid ":kbd:`End`" +msgstr ":kbd:`End`" + +#: library/curses.rst:1639 +msgid "KEY_END" +msgstr "KEY_END" + +#: library/curses.rst:1641 +msgid ":kbd:`Page Up`" +msgstr ":kbd:`Page Up`" + +#: library/curses.rst:1641 +msgid "KEY_PPAGE" +msgstr "KEY_PPAGE" + +#: library/curses.rst:1643 +msgid ":kbd:`Page Down`" +msgstr ":kbd:`Page Down`" + +#: library/curses.rst:1643 +msgid "KEY_NPAGE" +msgstr "KEY_NPAGE" + +#: library/curses.rst:1646 +msgid "" +"The following table lists characters from the alternate character set. These " +"are inherited from the VT100 terminal, and will generally be available on " +"software emulations such as X terminals. When there is no graphic " +"available, curses falls back on a crude printable ASCII approximation." +msgstr "" + +#: library/curses.rst:1653 +msgid "These are available only after :func:`initscr` has been called." +msgstr "" + +#: library/curses.rst:1656 +msgid "ACS code" +msgstr "" + +#: library/curses.rst:1658 +msgid "``ACS_BBSS``" +msgstr "``ACS_BBSS``" + +#: library/curses.rst:1658 +msgid "alternate name for upper right corner" +msgstr "" + +#: library/curses.rst:1660 +msgid "``ACS_BLOCK``" +msgstr "``ACS_BLOCK``" + +#: library/curses.rst:1660 +msgid "solid square block" +msgstr "" + +#: library/curses.rst:1662 +msgid "``ACS_BOARD``" +msgstr "``ACS_BOARD``" + +#: library/curses.rst:1662 +msgid "board of squares" +msgstr "" + +#: library/curses.rst:1664 +msgid "``ACS_BSBS``" +msgstr "``ACS_BSBS``" + +#: library/curses.rst:1664 +msgid "alternate name for horizontal line" +msgstr "" + +#: library/curses.rst:1666 +msgid "``ACS_BSSB``" +msgstr "``ACS_BSSB``" + +#: library/curses.rst:1666 +msgid "alternate name for upper left corner" +msgstr "" + +#: library/curses.rst:1668 +msgid "``ACS_BSSS``" +msgstr "``ACS_BSSS``" + +#: library/curses.rst:1668 +msgid "alternate name for top tee" +msgstr "" + +#: library/curses.rst:1670 +msgid "``ACS_BTEE``" +msgstr "``ACS_BTEE``" + +#: library/curses.rst:1670 +msgid "bottom tee" +msgstr "" + +#: library/curses.rst:1672 +msgid "``ACS_BULLET``" +msgstr "``ACS_BULLET``" + +#: library/curses.rst:1672 +msgid "bullet" +msgstr "" + +#: library/curses.rst:1674 +msgid "``ACS_CKBOARD``" +msgstr "``ACS_CKBOARD``" + +#: library/curses.rst:1674 +msgid "checker board (stipple)" +msgstr "" + +#: library/curses.rst:1676 +msgid "``ACS_DARROW``" +msgstr "``ACS_DARROW``" + +#: library/curses.rst:1676 +msgid "arrow pointing down" +msgstr "" + +#: library/curses.rst:1678 +msgid "``ACS_DEGREE``" +msgstr "``ACS_DEGREE``" + +#: library/curses.rst:1678 +msgid "degree symbol" +msgstr "" + +#: library/curses.rst:1680 +msgid "``ACS_DIAMOND``" +msgstr "``ACS_DIAMOND``" + +#: library/curses.rst:1680 +msgid "diamond" +msgstr "" + +#: library/curses.rst:1682 +msgid "``ACS_GEQUAL``" +msgstr "``ACS_GEQUAL``" + +#: library/curses.rst:1682 +msgid "greater-than-or-equal-to" +msgstr "" + +#: library/curses.rst:1684 +msgid "``ACS_HLINE``" +msgstr "``ACS_HLINE``" + +#: library/curses.rst:1684 +msgid "horizontal line" +msgstr "" + +#: library/curses.rst:1686 +msgid "``ACS_LANTERN``" +msgstr "``ACS_LANTERN``" + +#: library/curses.rst:1686 +msgid "lantern symbol" +msgstr "" + +#: library/curses.rst:1688 +msgid "``ACS_LARROW``" +msgstr "``ACS_LARROW``" + +#: library/curses.rst:1688 +msgid "left arrow" +msgstr "" + +#: library/curses.rst:1690 +msgid "``ACS_LEQUAL``" +msgstr "``ACS_LEQUAL``" + +#: library/curses.rst:1690 +msgid "less-than-or-equal-to" +msgstr "" + +#: library/curses.rst:1692 +msgid "``ACS_LLCORNER``" +msgstr "``ACS_LLCORNER``" + +#: library/curses.rst:1692 +msgid "lower left-hand corner" +msgstr "" + +#: library/curses.rst:1694 +msgid "``ACS_LRCORNER``" +msgstr "``ACS_LRCORNER``" + +#: library/curses.rst:1694 +msgid "lower right-hand corner" +msgstr "" + +#: library/curses.rst:1696 +msgid "``ACS_LTEE``" +msgstr "``ACS_LTEE``" + +#: library/curses.rst:1696 +msgid "left tee" +msgstr "" + +#: library/curses.rst:1698 +msgid "``ACS_NEQUAL``" +msgstr "``ACS_NEQUAL``" + +#: library/curses.rst:1698 +msgid "not-equal sign" +msgstr "" + +#: library/curses.rst:1700 +msgid "``ACS_PI``" +msgstr "``ACS_PI``" + +#: library/curses.rst:1700 +msgid "letter pi" +msgstr "" + +#: library/curses.rst:1702 +msgid "``ACS_PLMINUS``" +msgstr "``ACS_PLMINUS``" + +#: library/curses.rst:1702 +msgid "plus-or-minus sign" +msgstr "" + +#: library/curses.rst:1704 +msgid "``ACS_PLUS``" +msgstr "``ACS_PLUS``" + +#: library/curses.rst:1704 +msgid "big plus sign" +msgstr "" + +#: library/curses.rst:1706 +msgid "``ACS_RARROW``" +msgstr "``ACS_RARROW``" + +#: library/curses.rst:1706 +msgid "right arrow" +msgstr "" + +#: library/curses.rst:1708 +msgid "``ACS_RTEE``" +msgstr "``ACS_RTEE``" + +#: library/curses.rst:1708 +msgid "right tee" +msgstr "" + +#: library/curses.rst:1710 +msgid "``ACS_S1``" +msgstr "``ACS_S1``" + +#: library/curses.rst:1710 +msgid "scan line 1" +msgstr "" + +#: library/curses.rst:1712 +msgid "``ACS_S3``" +msgstr "``ACS_S3``" + +#: library/curses.rst:1712 +msgid "scan line 3" +msgstr "" + +#: library/curses.rst:1714 +msgid "``ACS_S7``" +msgstr "``ACS_S7``" + +#: library/curses.rst:1714 +msgid "scan line 7" +msgstr "" + +#: library/curses.rst:1716 +msgid "``ACS_S9``" +msgstr "``ACS_S9``" + +#: library/curses.rst:1716 +msgid "scan line 9" +msgstr "" + +#: library/curses.rst:1718 +msgid "``ACS_SBBS``" +msgstr "``ACS_SBBS``" + +#: library/curses.rst:1718 +msgid "alternate name for lower right corner" +msgstr "" + +#: library/curses.rst:1720 +msgid "``ACS_SBSB``" +msgstr "``ACS_SBSB``" + +#: library/curses.rst:1720 +msgid "alternate name for vertical line" +msgstr "" + +#: library/curses.rst:1722 +msgid "``ACS_SBSS``" +msgstr "``ACS_SBSS``" + +#: library/curses.rst:1722 +msgid "alternate name for right tee" +msgstr "" + +#: library/curses.rst:1724 +msgid "``ACS_SSBB``" +msgstr "``ACS_SSBB``" + +#: library/curses.rst:1724 +msgid "alternate name for lower left corner" +msgstr "" + +#: library/curses.rst:1726 +msgid "``ACS_SSBS``" +msgstr "``ACS_SSBS``" + +#: library/curses.rst:1726 +msgid "alternate name for bottom tee" +msgstr "" + +#: library/curses.rst:1728 +msgid "``ACS_SSSB``" +msgstr "``ACS_SSSB``" + +#: library/curses.rst:1728 +msgid "alternate name for left tee" +msgstr "" + +#: library/curses.rst:1730 +msgid "``ACS_SSSS``" +msgstr "``ACS_SSSS``" + +#: library/curses.rst:1730 +msgid "alternate name for crossover or big plus" +msgstr "" + +#: library/curses.rst:1732 +msgid "``ACS_STERLING``" +msgstr "``ACS_STERLING``" + +#: library/curses.rst:1732 +msgid "pound sterling" +msgstr "" + +#: library/curses.rst:1734 +msgid "``ACS_TTEE``" +msgstr "``ACS_TTEE``" + +#: library/curses.rst:1734 +msgid "top tee" +msgstr "" + +#: library/curses.rst:1736 +msgid "``ACS_UARROW``" +msgstr "``ACS_UARROW``" + +#: library/curses.rst:1736 +msgid "up arrow" +msgstr "" + +#: library/curses.rst:1738 +msgid "``ACS_ULCORNER``" +msgstr "``ACS_ULCORNER``" + +#: library/curses.rst:1738 +msgid "upper left corner" +msgstr "" + +#: library/curses.rst:1740 +msgid "``ACS_URCORNER``" +msgstr "``ACS_URCORNER``" + +#: library/curses.rst:1740 +msgid "upper right corner" +msgstr "" + +#: library/curses.rst:1742 +msgid "``ACS_VLINE``" +msgstr "``ACS_VLINE``" + +#: library/curses.rst:1742 +msgid "vertical line" +msgstr "" + +#: library/curses.rst:1745 +msgid "The following table lists the predefined colors:" +msgstr "" + +#: library/curses.rst:1748 +msgid "Color" +msgstr "" + +#: library/curses.rst:1750 +msgid "``COLOR_BLACK``" +msgstr "``COLOR_BLACK``" + +#: library/curses.rst:1750 +msgid "Black" +msgstr "" + +#: library/curses.rst:1752 +msgid "``COLOR_BLUE``" +msgstr "``COLOR_BLUE``" + +#: library/curses.rst:1752 +msgid "Blue" +msgstr "" + +#: library/curses.rst:1754 +msgid "``COLOR_CYAN``" +msgstr "``COLOR_CYAN``" + +#: library/curses.rst:1754 +msgid "Cyan (light greenish blue)" +msgstr "" + +#: library/curses.rst:1756 +msgid "``COLOR_GREEN``" +msgstr "``COLOR_GREEN``" + +#: library/curses.rst:1756 +msgid "Green" +msgstr "" + +#: library/curses.rst:1758 +msgid "``COLOR_MAGENTA``" +msgstr "``COLOR_MAGENTA``" + +#: library/curses.rst:1758 +msgid "Magenta (purplish red)" +msgstr "" + +#: library/curses.rst:1760 +msgid "``COLOR_RED``" +msgstr "``COLOR_RED``" + +#: library/curses.rst:1760 +msgid "Red" +msgstr "" + +#: library/curses.rst:1762 +msgid "``COLOR_WHITE``" +msgstr "``COLOR_WHITE``" + +#: library/curses.rst:1762 +msgid "White" +msgstr "" + +#: library/curses.rst:1764 +msgid "``COLOR_YELLOW``" +msgstr "``COLOR_YELLOW``" + +#: library/curses.rst:1764 +msgid "Yellow" +msgstr "" + +#: library/curses.rst:1769 +msgid ":mod:`curses.textpad` --- Text input widget for curses programs" +msgstr "" + +#: library/curses.rst:1777 +msgid "" +"The :mod:`curses.textpad` module provides a :class:`Textbox` class that " +"handles elementary text editing in a curses window, supporting a set of " +"keybindings resembling those of Emacs (thus, also of Netscape Navigator, " +"BBedit 6.x, FrameMaker, and many other programs). The module also provides " +"a rectangle-drawing function useful for framing text boxes or for other " +"purposes." +msgstr "" + +#: library/curses.rst:1783 +msgid "The module :mod:`curses.textpad` defines the following function:" +msgstr "" + +#: library/curses.rst:1788 +msgid "" +"Draw a rectangle. The first argument must be a window object; the remaining " +"arguments are coordinates relative to that window. The second and third " +"arguments are the y and x coordinates of the upper left hand corner of the " +"rectangle to be drawn; the fourth and fifth arguments are the y and x " +"coordinates of the lower right hand corner. The rectangle will be drawn " +"using VT100/IBM PC forms characters on terminals that make this possible " +"(including xterm and most other software terminal emulators). Otherwise it " +"will be drawn with ASCII dashes, vertical bars, and plus signs." +msgstr "" + +#: library/curses.rst:1801 +msgid "Textbox objects" +msgstr "" + +#: library/curses.rst:1803 +msgid "You can instantiate a :class:`Textbox` object as follows:" +msgstr "" + +#: library/curses.rst:1808 +msgid "" +"Return a textbox widget object. The *win* argument should be a curses :ref:" +"`window ` object in which the textbox is to be " +"contained. The edit cursor of the textbox is initially located at the upper " +"left hand corner of the containing window, with coordinates ``(0, 0)``. The " +"instance's :attr:`stripspaces` flag is initially on." +msgstr "" + +#: library/curses.rst:1814 +#, fuzzy +msgid ":class:`Textbox` objects have the following methods:" +msgstr "" +"Les objets de la classe :class:`TestLoader` ont les attributs suivants :" + +#: library/curses.rst:1819 +msgid "" +"This is the entry point you will normally use. It accepts editing " +"keystrokes until one of the termination keystrokes is entered. If " +"*validator* is supplied, it must be a function. It will be called for each " +"keystroke entered with the keystroke as a parameter; command dispatch is " +"done on the result. This method returns the window contents as a string; " +"whether blanks in the window are included is affected by the :attr:" +"`stripspaces` attribute." +msgstr "" + +#: library/curses.rst:1830 +msgid "" +"Process a single command keystroke. Here are the supported special " +"keystrokes:" +msgstr "" + +#: library/curses.rst:1872 +msgid "Keystroke" +msgstr "" + +#: library/curses.rst:1834 +msgid "Action" +msgstr "Action" + +#: library/curses.rst:1836 +msgid ":kbd:`Control-A`" +msgstr ":kbd:`Control-A`" + +#: library/curses.rst:1836 +msgid "Go to left edge of window." +msgstr "" + +#: library/curses.rst:1874 +msgid ":kbd:`Control-B`" +msgstr ":kbd:`Control-B`" + +#: library/curses.rst:1838 +msgid "Cursor left, wrapping to previous line if appropriate." +msgstr "" + +#: library/curses.rst:1841 +msgid ":kbd:`Control-D`" +msgstr ":kbd:`Control-D`" + +#: library/curses.rst:1841 +msgid "Delete character under cursor." +msgstr "" + +#: library/curses.rst:1843 +msgid ":kbd:`Control-E`" +msgstr ":kbd:`Control-E`" + +#: library/curses.rst:1843 +msgid "Go to right edge (stripspaces off) or end of line (stripspaces on)." +msgstr "" + +#: library/curses.rst:1876 +msgid ":kbd:`Control-F`" +msgstr ":kbd:`Control-F`" + +#: library/curses.rst:1846 +msgid "Cursor right, wrapping to next line when appropriate." +msgstr "" + +#: library/curses.rst:1849 +msgid ":kbd:`Control-G`" +msgstr ":kbd:`Control-G`" + +#: library/curses.rst:1849 +msgid "Terminate, returning the window contents." +msgstr "" + +#: library/curses.rst:1851 +msgid ":kbd:`Control-H`" +msgstr ":kbd:`Control-H`" + +#: library/curses.rst:1851 +msgid "Delete character backward." +msgstr "" + +#: library/curses.rst:1853 +msgid ":kbd:`Control-J`" +msgstr ":kbd:`Control-J`" + +#: library/curses.rst:1853 +msgid "Terminate if the window is 1 line, otherwise insert newline." +msgstr "" + +#: library/curses.rst:1856 +msgid ":kbd:`Control-K`" +msgstr ":kbd:`Control-K`" + +#: library/curses.rst:1856 +msgid "If line is blank, delete it, otherwise clear to end of line." +msgstr "" + +#: library/curses.rst:1859 +msgid ":kbd:`Control-L`" +msgstr ":kbd:`Control-L`" + +#: library/curses.rst:1859 +msgid "Refresh screen." +msgstr "" + +#: library/curses.rst:1880 +msgid ":kbd:`Control-N`" +msgstr ":kbd:`Control-N`" + +#: library/curses.rst:1861 +msgid "Cursor down; move down one line." +msgstr "" + +#: library/curses.rst:1863 +msgid ":kbd:`Control-O`" +msgstr ":kbd:`Control-O`" + +#: library/curses.rst:1863 +msgid "Insert a blank line at cursor location." +msgstr "" + +#: library/curses.rst:1878 +msgid ":kbd:`Control-P`" +msgstr ":kbd:`Control-P`" + +#: library/curses.rst:1865 +msgid "Cursor up; move up one line." +msgstr "" + +#: library/curses.rst:1868 +msgid "" +"Move operations do nothing if the cursor is at an edge where the movement is " +"not possible. The following synonyms are supported where possible:" +msgstr "" + +#: library/curses.rst:1874 +msgid ":const:`KEY_LEFT`" +msgstr ":const:`KEY_LEFT`" + +#: library/curses.rst:1876 +msgid ":const:`KEY_RIGHT`" +msgstr ":const:`KEY_RIGHT`" + +#: library/curses.rst:1878 +msgid ":const:`KEY_UP`" +msgstr ":const:`KEY_UP`" + +#: library/curses.rst:1880 +msgid ":const:`KEY_DOWN`" +msgstr ":const:`KEY_DOWN`" + +#: library/curses.rst:1882 +msgid ":const:`KEY_BACKSPACE`" +msgstr ":const:`KEY_BACKSPACE`" + +#: library/curses.rst:1882 +msgid ":kbd:`Control-h`" +msgstr ":kbd:`Control-h`" + +#: library/curses.rst:1885 +msgid "" +"All other keystrokes are treated as a command to insert the given character " +"and move right (with line wrapping)." +msgstr "" + +#: library/curses.rst:1891 +msgid "" +"Return the window contents as a string; whether blanks in the window are " +"included is affected by the :attr:`stripspaces` member." +msgstr "" + +#: library/curses.rst:1897 +msgid "" +"This attribute is a flag which controls the interpretation of blanks in the " +"window. When it is on, trailing blanks on each line are ignored; any cursor " +"motion that would land the cursor on a trailing blank goes to the end of " +"that line instead, and trailing blanks are stripped when the window contents " +"are gathered." +msgstr "" diff --git a/library/custominterp.po b/library/custominterp.po new file mode 100644 index 0000000000..9a52f5c87e --- /dev/null +++ b/library/custominterp.po @@ -0,0 +1,39 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-18 15:46+0200\n" +"PO-Revision-Date: 2018-07-29 19:08+0200\n" +"Last-Translator: Julien Palard \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" + +#: library/custominterp.rst:5 +msgid "Custom Python Interpreters" +msgstr "Interpréteurs Python personnalisés" + +#: library/custominterp.rst:7 +#, fuzzy +msgid "" +"The modules described in this chapter allow writing interfaces similar to " +"Python's interactive interpreter. If you want a Python interpreter that " +"supports some special feature in addition to the Python language, you should " +"look at the :mod:`code` module. (The :mod:`codeop` module is lower-level, " +"used to support compiling a possibly incomplete chunk of Python code.)" +msgstr "" +"Les modules décrits dans ce chapitre permettent d'écrire des interfaces " +"similaires à l'interpréteur interactif de Python. Si vous voulez un " +"interpréteur Python qui gère quelques fonctionnalités supplémentaires, vous " +"devriez regarder le module :mod:`code`. (Le module :mod:`codeop` est un " +"module de plus bas niveau permettant de compiler des morceaux, pas forcément " +"complets, de Python.)" + +#: library/custominterp.rst:13 +msgid "The full list of modules described in this chapter is:" +msgstr "La liste complète des modules décrits dans ce chapitre est :" diff --git a/library/dataclasses.po b/library/dataclasses.po new file mode 100644 index 0000000000..ee7df24fc3 --- /dev/null +++ b/library/dataclasses.po @@ -0,0 +1,1172 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-22 22:57+0100\n" +"PO-Revision-Date: 2021-10-28 11:44+0200\n" +"Last-Translator: David GIRAUD \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 3.0\n" + +#: library/dataclasses.rst:2 +msgid ":mod:`dataclasses` --- Data Classes" +msgstr ":mod:`dataclasses` — Classes de Données" + +#: library/dataclasses.rst:10 +msgid "**Source code:** :source:`Lib/dataclasses.py`" +msgstr "**Code source :** :source:`Lib/dataclasses.py`" + +#: library/dataclasses.rst:14 +msgid "" +"This module provides a decorator and functions for automatically adding " +"generated :term:`special method`\\s such as :meth:`__init__` and :meth:" +"`__repr__` to user-defined classes. It was originally described in :pep:" +"`557`." +msgstr "" +"Ce module fournit un décorateur et des fonctions pour générer " +"automatiquement les :term:`méthodes spéciales ` comme :meth:" +"`__init__` et :meth:`__repr__` dans les *Classes de Données* définies par " +"l’utilisateur. Ces classes ont été décrites dans la :pep:`557`." + +#: 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::" +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 ::" + +#: library/dataclasses.rst:34 +msgid "will add, among other things, a :meth:`__init__` that looks like::" +msgstr "" +"ce code ajoute à la classe, entre autres choses, une méthode :meth:" +"`__init__` qui ressemble à ::" + +#: library/dataclasses.rst:41 +msgid "" +"Note that this method is automatically added to the class: it is not " +"directly specified in the ``InventoryItem`` definition shown above." +msgstr "" +"Il est important de noter que cette méthode est ajoutée automatiquement dans " +"la classe. Elle n’est jamais écrite dans la définition de ``InventoryItem``." + +#: library/dataclasses.rst:47 +msgid "Module contents" +msgstr "Classe de données" + +#: library/dataclasses.rst:51 +msgid "" +"This function is a :term:`decorator` that is used to add generated :term:" +"`special method`\\s to classes, as described below." +msgstr "" +"Cette fonction est un :term:`décorateur ` qui ajoute aux classes " +"des :term:`méthodes spéciales ` générées automatiquement. " +"Voici une description plus détaillée." + +#: library/dataclasses.rst:54 +msgid "" +"The :func:`dataclass` decorator examines the class to find ``field``\\s. A " +"``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. " +"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 "" +"The order of the fields in all of the generated methods is the order in " +"which they appear in the class definition." +msgstr "" +"L’ordre des paramètres des méthodes générées est celui d’apparition des " +"champs dans la définition de la classe." + +#: library/dataclasses.rst:63 +msgid "" +"The :func:`dataclass` decorator will add various \"dunder\" methods to 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 it is called on; no new class is " +"created." +msgstr "" +"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. Le décorateur renvoie la " +"classe sur laquelle il est appelé ; aucune nouvelle classe n'est créée." + +#: library/dataclasses.rst:69 +msgid "" +"If :func:`dataclass` is used just as a simple decorator with no parameters, " +"it acts as if it has the default values documented in this signature. That " +"is, these three uses of :func:`dataclass` are equivalent::" +msgstr "" +"Si :func:`dataclass` est utilisé directement, il se comporte comme si on " +"l’avait appelé sans argument (c.-à-d. en laissant les valeurs par défaut de " +"sa signature). Ainsi, les trois usages suivants de :func:`dataclass` sont " +"équivalents ::" + +#: library/dataclasses.rst:87 +msgid "The parameters to :func:`dataclass` are:" +msgstr "Les paramètres de :func:`dataclass` sont les suivants :" + +#: library/dataclasses.rst:89 +msgid "" +"``init``: If true (the default), a :meth:`__init__` method will be generated." +msgstr "" +"*init* : si vrai (par défaut), une méthode :meth:`__init__` est générée." + +#: library/dataclasses.rst:92 +msgid "" +"If the class already defines :meth:`__init__`, this parameter is ignored." +msgstr "" +"Si la classe définit déjà une méthode :meth:`__init__`, ce paramètre est " +"ignoré." + +#: library/dataclasses.rst:95 +msgid "" +"``repr``: If true (the default), a :meth:`__repr__` method will be " +"generated. The generated repr string will have the class name and the name " +"and repr of each field, in the order they are defined in the class. Fields " +"that are marked as being excluded from the repr are not included. For " +"example: ``InventoryItem(name='widget', unit_price=3.0, " +"quantity_on_hand=10)``." +msgstr "" +"*repr* : si vrai (par défaut), une méthode :meth:`__repr__` est générée. La " +"chaîne de représentation comporte le nom de la classe et le nom ainsi que la " +"représentation de chaque champ, suivant leur ordre de définition. Les " +"champs marqués comme exclus de la représentation (voir ``Field`` ci-dessous) " +"sont ignorés. Par exemple : ``InventoryItem(name='widget', unit_price=3.0, " +"quantity_on_hand=10)``." + +#: library/dataclasses.rst:102 +msgid "" +"If the class already defines :meth:`__repr__`, this parameter is ignored." +msgstr "" +"Si la classe définit déjà une méthode :meth:`__repr__`, ce paramètre est " +"ignoré." + +#: library/dataclasses.rst:105 +msgid "" +"``eq``: If true (the default), an :meth:`__eq__` method will be generated. " +"This method compares the class as if it were a tuple of its fields, in " +"order. Both instances in the comparison must be of the identical type." +msgstr "" +"*eq* : si vrai (par défaut), une méthode :meth:`__eq__` est générée. Cette " +"méthode permet de comparer les instances de la classe comme si elles étaient " +"des *n*-uplet de leurs champs, pris dans l’ordre. Les deux instances dans la " +"comparaison doivent être de même type." + +#: library/dataclasses.rst:110 +msgid "If the class already defines :meth:`__eq__`, this parameter is ignored." +msgstr "" +"Si la classe définit déjà une méthode :meth:`__eq__`, ce paramètre est " +"ignoré." + +#: library/dataclasses.rst:113 +msgid "" +"``order``: If true (the default is ``False``), :meth:`__lt__`, :meth:" +"`__le__`, :meth:`__gt__`, and :meth:`__ge__` methods will be generated. " +"These compare the class as if it were a tuple of its fields, in order. Both " +"instances in the comparison must be of the identical type. If ``order`` is " +"true and ``eq`` is false, a :exc:`ValueError` is raised." +msgstr "" +"*order* : si vrai (``False`` par défaut), les méthodes :meth:`__lt__`, :meth:" +"`__le__`, :meth:`__gt__`, et :meth:`__ge__` sont générées. Elles permettent " +"de comparer les instances de la classe en les considérant comme des *n*-" +"uplets, dans l’ordre de définition des champs. Toutes les instances dans la " +"comparaison doivent être de même type. Si ``order`` est vrai mais que " +"``eq`` est faux, une :exc:`ValueError` est levée." + +#: library/dataclasses.rst:120 +msgid "" +"If the class already defines any of :meth:`__lt__`, :meth:`__le__`, :meth:" +"`__gt__`, or :meth:`__ge__`, then :exc:`TypeError` is raised." +msgstr "" +"Si la classe définit déjà l’une des méthodes :meth:`__lt__`, :meth:" +"`__le__`, :meth:`__gt__`, ou :meth:`__ge__`, alors une :exc:`TypeError` est " +"levée." + +#: library/dataclasses.rst:124 +msgid "" +"``unsafe_hash``: If ``False`` (the default), a :meth:`__hash__` method is " +"generated according to how ``eq`` and ``frozen`` are set." +msgstr "" +"*unsafe_hash* : si ``False`` (par défaut), une méthode :meth:`__hash__` est " +"générée et son comportement dépend des valeurs de *eq* et *frozen*." + +#: library/dataclasses.rst:127 +msgid "" +":meth:`__hash__` is used by built-in :meth:`hash()`, and when objects are " +"added to hashed collections such as dictionaries and sets. Having a :meth:" +"`__hash__` implies that instances of the class are immutable. Mutability is " +"a complicated property that depends on the programmer's intent, the " +"existence and behavior of :meth:`__eq__`, and the values of the ``eq`` and " +"``frozen`` flags in the :func:`dataclass` decorator." +msgstr "" +":meth:`__hash__` est utilisée par la fonction native :meth:`hash()`, ainsi " +"que lorsqu’un objet est inséré dans une collection utilisant du hachage, tel " +"qu’un dictionnaire ou un ensemble. Avoir une méthode :meth:`__hash__` " +"implique que les instances de la classe sont immuables. La muabilité est une " +"propriété complexe qui dépend des intentions du programmeur, de l’existence " +"et du comportement de la méthode :meth:`__eq__`, et des valeurs des options " +"*eq* et *frozen* dans l’appel au décorateur :func:`dataclass`." + +#: library/dataclasses.rst:134 +msgid "" +"By default, :func:`dataclass` will not implicitly add a :meth:`__hash__` " +"method unless it is safe to do so. Neither will it add or change an " +"existing explicitly defined :meth:`__hash__` method. Setting the class " +"attribute ``__hash__ = None`` has a specific meaning to Python, as described " +"in the :meth:`__hash__` documentation." +msgstr "" +"Par défaut, :func:`dataclass` n’ajoute pas de méthode implicite :meth:" +"`__hash__`, sauf s’il n’existe aucun risque sous-jacent. Il n’ajoute ou ne " +"modifie pas non plus la méthode :meth:`__hash__` si elle a été définie " +"explicitement. Définir l’attribut de classe ``__hash__ = None`` a une " +"signification particulière, comme précisé dans la documentation de :meth:" +"`__hash__`." + +#: library/dataclasses.rst:140 +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. " +"Although not recommended, you can force :func:`dataclass` to create a :meth:" +"`__hash__` method with ``unsafe_hash=True``. This might be the case if your " +"class is logically immutable but can nonetheless be mutated. This is a " +"specialized use case and should be considered carefully." +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 " +"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. Il " +"s'agit là d'un cas particulier qui doit être considéré avec la plus grande " +"prudence." + +#: library/dataclasses.rst:147 +msgid "" +"Here are the rules governing implicit creation of a :meth:`__hash__` " +"method. Note that you cannot both have an explicit :meth:`__hash__` method " +"in your dataclass and set ``unsafe_hash=True``; this will result in a :exc:" +"`TypeError`." +msgstr "" +"Voici les règles autour de la création implicite de la méthode :meth:" +"`__hash__`. Il faut noter que vous ne pouvez pas avoir à la fois une " +"méthode :meth:`__hash__` explicite dans votre classe de données et définir " +"``unsafe_hash=True`` ; cela lèvera une :exc:`TypeError`." + +#: library/dataclasses.rst:152 +msgid "" +"If ``eq`` and ``frozen`` are both true, by default :func:`dataclass` will " +"generate a :meth:`__hash__` method for you. If ``eq`` is true and " +"``frozen`` is false, :meth:`__hash__` will be set to ``None``, marking it " +"unhashable (which it is, since it is mutable). If ``eq`` is false, :meth:" +"`__hash__` will be left untouched meaning the :meth:`__hash__` method of the " +"superclass will be used (if the superclass is :class:`object`, this means it " +"will fall back to id-based hashing)." +msgstr "" +"Si *eq* et *frozen* sont tous deux vrais, :func:`dataclass` génère par " +"défaut une méthode :meth:`__hash__` pour vous. Si *eq* est vrai mais que " +"*frozen* est faux, :meth:`__hash__` prend la valeur ``None``, marquant la " +"classe comme non-hachable (et c’est le cas, puisque les instances sont " +"mutables). Si ``eq`` est faux, la méthode :meth:`__hash__` est laissée " +"intacte, ce qui veut dire que la méthode :meth:`__hash__` de la classe " +"parente sera utilisée (si la classe parente est :class:`object`, le " +"comportement est un hachage basé sur les id)." + +#: library/dataclasses.rst:160 +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è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-" +"dessous." + +#: library/dataclasses.rst:165 +msgid "" +"``match_args``: If true (the default is ``True``), the ``__match_args__`` " +"tuple will be created from the list of parameters to the generated :meth:" +"`__init__` method (even if :meth:`__init__` is not generated, see above). " +"If false, or if ``__match_args__`` is already defined in the class, then " +"``__match_args__`` will not be generated." +msgstr "" +"*match_args* : si vrai (``True`` est la valeur par défaut), le *n*-uplet " +"``__match_args__`` est créé automatiquement depuis la liste des paramètres " +"de la méthode :meth:`__init__` générée (même si :meth:`__init__` n'est pas " +"générée, voir ci-dessus). Si faux ou si ``__match_args__`` est déjà défini " +"dans la classe alors ``__match_args__`` n'est pas créé." + +#: library/dataclasses.rst:174 +msgid "" +"``kw_only``: If true (the default value is ``False``), then all fields will " +"be marked as keyword-only. If a field is marked as keyword-only, then the " +"only affect is that the :meth:`__init__` parameter generated from a keyword-" +"only field must be specified with a keyword when :meth:`__init__` is " +"called. There is no effect on any other aspect of dataclasses. See the :" +"term:`parameter` glossary entry for details. Also see the :const:`KW_ONLY` " +"section." +msgstr "" +"*kw_only* : si vrai (``False`` est la valeur par défaut) alors tous les " +"champs sont marqués comme exclusivement nommés. Si un champ est marqué comme " +"exclusivement nommé, le seul impact est que le champ de la méthode :meth:" +"`__init__` générée devra être explicitement nommé lors de l'appel de la " +"méthode :meth:`__init__`. Il n'y a aucun autre effet dans les autres aspects " +"des classes de données. Voir l'entrée :term:`paramètre ` du " +"glossaire pour plus d'informations. Voir également la section :const:" +"`KW_ONLY`." + +#: library/dataclasses.rst:185 +msgid "" +"``slots``: If true (the default is ``False``), :attr:`__slots__` attribute " +"will be generated and new class will be returned instead of the original " +"one. If :attr:`__slots__` is already defined in the class, then :exc:" +"`TypeError` is raised." +msgstr "" +"*slot* : si vrai (``False`` est la valeur par défaut), l'attribut :attr:" +"`__slots__` est généré et une nouvelle classe est renvoyée à la place de " +"celle d'origine. Si :attr:`__slots__` est déjà défini dans la classe alors " +"une :exc:`TypeError` est levée." + +#: library/dataclasses.rst:192 +msgid "" +"``field``\\s may optionally specify a default value, using normal Python " +"syntax::" +msgstr "" +"Les champs peuvent éventuellement préciser une valeur par défaut, en " +"utilisant la syntaxe Python normale ::" + +#: library/dataclasses.rst:200 +msgid "" +"In this example, both ``a`` and ``b`` will be included in the added :meth:" +"`__init__` method, which will be defined as::" +msgstr "" +"Dans cet exemple, ``a`` et ``b`` sont tous deux inclus dans la signature de " +"la méthode générée :meth:`__init__`, qui est définie comme suit ::" + +#: library/dataclasses.rst:205 +msgid "" +":exc:`TypeError` will be raised if a field without a default value follows a " +"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 ou si c’est le résultat d’un héritage de classes." + +#: library/dataclasses.rst:211 +msgid "" +"For common and simple use cases, no other functionality is required. There " +"are, however, some dataclass features that require additional per-field " +"information. To satisfy this need for additional information, you can " +"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:224 +msgid "" +"As shown above, the :const:`MISSING` value is a sentinel object used to " +"detect if some parameters are provided by the user. This sentinel is used " +"because ``None`` is a valid value for some parameters with a distinct " +"meaning. No code should directly use the :const:`MISSING` value." +msgstr "" +"Comme le montre la signature, la constante :const:`MISSING` est une valeur " +"sentinelle pour déterminer si des paramètres ont été fournis par " +"l'utilisateur. ``None`` ne conviendrait pas puisque c'est une valeur avec un " +"sens qui peut être différent pour certains paramètres. La sentinelle :const:" +"`MISSING` est interne au module et ne doit pas être utilisée dans vos " +"programmes." + +#: library/dataclasses.rst:229 +msgid "The parameters to :func:`field` are:" +msgstr "Les paramètres de :func:`field` sont :" + +#: library/dataclasses.rst:231 +msgid "" +"``default``: If provided, this will be the default value for this field. " +"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:235 +msgid "" +"``default_factory``: If provided, it must be a zero-argument callable that " +"will be called when a default value is needed for this field. Among other " +"purposes, this can be used to specify fields with mutable default values, as " +"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:241 +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:244 +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:247 +msgid "" +"``hash``: This can be a bool or ``None``. If true, this field is included " +"in the generated :meth:`__hash__` method. If ``None`` (the default), use " +"the value of ``compare``: this would normally be the expected behavior. A " +"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:254 +msgid "" +"One possible reason to set ``hash=False`` but ``compare=True`` would be if a " +"field is expensive to compute a hash value for, that field is needed for " +"equality testing, and there are other fields that contribute to the type's " +"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:260 +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:264 +msgid "" +"``metadata``: This can be a mapping or None. None is treated as an empty " +"dict. This value is wrapped in :func:`~types.MappingProxyType` to make it " +"read-only, and exposed on the :class:`Field` object. It is not used at all " +"by Data Classes, and is provided as a third-party extension mechanism. " +"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:272 +msgid "" +"``kw_only``: If true, this field will be marked as keyword-only. This is " +"used when the generated :meth:`__init__` method's parameters are computed." +msgstr "" +"``kw_only`` : Si vrai ce champ est marqué comme exclusivement nommé. Cela " +"est utilisé lors du traitement des paramètres de la méthode :meth:`__init__` " +"générée." + +#: library/dataclasses.rst:278 +msgid "" +"If the default value of a field is specified by a call to :func:`field()`, " +"then the class attribute for this field will be replaced by the specified " +"``default`` value. If no ``default`` is provided, then the class attribute " +"will be deleted. The intent is that after the :func:`dataclass` decorator " +"runs, the class attributes will all contain the default values for the " +"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:294 +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:300 +msgid "" +":class:`Field` objects describe each defined field. These objects are " +"created internally, and are returned by the :func:`fields` module-level " +"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:305 +msgid "``name``: The name of the field." +msgstr "*name* : le nom du champ ;" + +#: library/dataclasses.rst:307 +msgid "``type``: The type of the field." +msgstr "*type* : le type associé au champ par l'annotation ;" + +#: library/dataclasses.rst:309 +msgid "" +"``default``, ``default_factory``, ``init``, ``repr``, ``hash``, ``compare``, " +"``metadata``, and ``kw_only`` have the identical meaning and values as they " +"do in the :func:`field` function." +msgstr "" +"*default*, *default_factory*, *init*, *repr*, *hash*, *compare*, *metadata* " +"et *kw_only* qui correspondent aux paramètres de :func:`field` et en " +"prennent les valeurs." + +#: library/dataclasses.rst:313 +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:318 +msgid "" +"Returns a tuple of :class:`Field` objects that define the fields for this " +"dataclass. Accepts either a dataclass, or an instance of a dataclass. " +"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:325 +msgid "" +"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. 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:331 +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:368 +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:352 +msgid "" +":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:357 +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:363 +msgid "Continuing from the previous example::" +msgstr "Pour continuer l'exemple précédent :" + +#: library/dataclasses.rst:372 +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:377 +msgid "" +"Creates a new dataclass with name ``cls_name``, fields as defined in " +"``fields``, base classes as given in ``bases``, and initialized with a " +"namespace as given in ``namespace``. ``fields`` is an iterable whose " +"elements are each either ``name``, ``(name, type)``, or ``(name, type, " +"Field)``. If just ``name`` is supplied, ``typing.Any`` is used for " +"``type``. The values of ``init``, ``repr``, ``eq``, ``order``, " +"``unsafe_hash``, ``frozen``, ``match_args``, ``kw_only``, and ``slots`` " +"have the same meaning as they do in :func:`dataclass`." +msgstr "" +"Crée une nouvelle classe de données avec le nom *cls_name*. Les champs " +"proviennent de l'objet itérable *fields*. Les classes mères sont lues dans " +"*bases*. L'espace de nommage de la classe est initialisé par *namespace*. La " +"forme la plus générale d'un élément de *fields* est un triplet ``(nom, type, " +"objet_Field)``. Le troisième élément peut être omis. On peut aussi passer un " +"simple nom, auquel cas le type sera ``typing.Any``. Les paramètres restants, " +"à savoir *init*, *repr*, *eq*, *order*, *unsafe_hash*, *frozen*, " +"*march_args*, *kw_only* et *slots*, sont les mêmes que dans :func:" +"`dataclass`." + +#: library/dataclasses.rst:387 +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:399 +msgid "Is equivalent to::" +msgstr "est équivalent à ::" + +#: library/dataclasses.rst:412 +msgid "" +"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:417 +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:421 +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:425 +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:429 +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 " +"initialized in :meth:`__post_init__`, if they're initialized at all. It is " +"expected that ``init=False`` fields will be rarely and judiciously used. If " +"they are used, it might be wise to have alternate class constructors, or " +"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:440 +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:443 +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:452 +msgid "A sentinel value signifying a missing default or default_factory." +msgstr "" +"Une valeur sentinelle pour dénoter l'absence de *default* ou " +"*default_factory*." + +#: library/dataclasses.rst:456 +msgid "" +"A sentinel value used as a type annotation. Any fields after a pseudo-field " +"with the type of :const:`KW_ONLY` are marked as keyword-only fields. Note " +"that a pseudo-field of type :const:`KW_ONLY` is otherwise completely " +"ignored. This includes the name of such a field. By convention, a name of " +"``_`` is used for a :const:`KW_ONLY` field. Keyword-only fields signify :" +"meth:`__init__` parameters that must be specified as keywords when the class " +"is instantiated." +msgstr "" +"Une valeur sentinelle utilisée en tant qu'annotation de type. Chaque " +"attribut situé après un pseudo-champ ayant pour type la constante :const:" +"`KW_ONLY` est marqué comme champ exclusivement nommé. Notez que le pseudo-" +"champ ayant pour type la constante :const:`KW_ONLY` est par ailleurs " +"complètement ignoré. Par convention le nom ``_`` est utilisé pour " +"l'attribut :const:`KW_ONLY`. Les paramètres de la méthode :meth:`__init__` " +"exclusivement nommés doivent être spécifiés par leur nom lors de " +"l'instanciation de la classe." + +#: library/dataclasses.rst:465 +msgid "" +"In this example, the fields ``y`` and ``z`` will be marked as keyword-only " +"fields::" +msgstr "" +"Dans cette exemple ``y`` et ``z`` sont marqués comme exclusivement nommés ::" + +#: library/dataclasses.rst:476 +msgid "" +"In a single dataclass, it is an error to specify more than one field whose " +"type is :const:`KW_ONLY`." +msgstr "" +"Une erreur est levée s'il y a plus d'un champ de type :const:`KW_ONLY` dans " +"une unique classe de données." + +#: library/dataclasses.rst:483 +msgid "" +"Raised when an implicitly defined :meth:`__setattr__` or :meth:`__delattr__` " +"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``." + +#: library/dataclasses.rst:488 +msgid "Post-init processing" +msgstr "Post-initialisation" + +#: library/dataclasses.rst:490 +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 " +"normally be called as ``self.__post_init__()``. However, if any ``InitVar`` " +"fields are defined, they will also be passed to :meth:`__post_init__` in the " +"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:498 +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:510 +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:527 +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:531 +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:536 +msgid "Class variables" +msgstr "Variables de classe" + +#: library/dataclasses.rst:538 +#, fuzzy +msgid "" +"One of the few 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:" +"`526`. It does this by checking if the type of the field is ``typing." +"ClassVar``. If a field is a ``ClassVar``, it is excluded from consideration " +"as a field and is ignored by the dataclass mechanisms. Such ``ClassVar`` " +"pseudo-fields are not returned by the module-level :func:`fields` function." +msgstr "" +"Voici le premier des deux cas où le type fourni dans l'annotation d'un champ " +"est pris en compte par :func:`dataclass` au moment de l'exécution. Si ce " +"type est ``typing.ClassVar``, le champ est considéré comme une variable de " +"classe, notion définie dans la :pep:`526`. Les champs de ce genre sont " +"complètement ignorés du point de vue des classes de données. Ils " +"n'apparaissent pas dans le résultat de :func:`fields`." + +#: library/dataclasses.rst:547 +msgid "Init-only variables" +msgstr "Variables d'initialisation" + +#: library/dataclasses.rst:549 +#, fuzzy +msgid "" +"Another 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 " +"the type of a field is of type ``dataclasses.InitVar``. If a field is an " +"``InitVar``, it is considered a pseudo-field called an init-only field. As " +"it is not a true field, it is not returned by the module-level :func:" +"`fields` function. Init-only fields are added as parameters to the " +"generated :meth:`__init__` method, and are passed to the optional :meth:" +"`__post_init__` method. They are not otherwise used by dataclasses." +msgstr "" +"L'autre cas où l'annotation de type influence :func:`dataclass` est le " +"suivant : si le type est ``dataclasses.InitVar``, le nom devient un « champ " +"d'initialisation ». Puisque ce n'est pas un vrai champ, il n'est pas inclus " +"dans le *n*-uplet que renvoie :func:`fields`. Les champs d'initialisation " +"sont ajoutés en tant que paramètres à la méthode :meth:`__init__` générée. " +"Leurs valeurs sont passées à :meth:`__post_init__`, si cette méthode existe. " +"C'est la seule manière dont elles sont utilisées." + +#: library/dataclasses.rst:559 +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:574 +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:578 +msgid "Frozen instances" +msgstr "Instances figées" + +#: library/dataclasses.rst:580 +msgid "" +"It is not possible to create truly immutable Python objects. However, by " +"passing ``frozen=True`` to the :meth:`dataclass` decorator you can emulate " +"immutability. In that case, dataclasses will add :meth:`__setattr__` and :" +"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:586 +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:591 +msgid "Inheritance" +msgstr "Héritage" + +#: library/dataclasses.rst:593 +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, " +"starting at :class:`object`) and, for each dataclass that it finds, adds the " +"fields from that base class to an ordered mapping of fields. After all of " +"the base class fields are added, it adds its own fields to the ordered " +"mapping. All of the generated methods will use this combined, calculated " +"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:613 +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:616 +msgid "The generated :meth:`__init__` method for ``C`` will look like::" +msgstr "La méthode :meth:`__init__` générée pour ``C`` ressemble à :" + +#: library/dataclasses.rst:621 +msgid "Re-ordering of keyword-only parameters in :meth:`__init__`" +msgstr "" +"Réarrangement des paramètres exclusivement nommés dans :meth:`__init__`" + +#: library/dataclasses.rst:623 +msgid "" +"After the parameters needed for :meth:`__init__` are computed, any keyword-" +"only parameters are moved to come after all regular (non-keyword-only) " +"parameters. This is a requirement of how keyword-only parameters are " +"implemented in Python: they must come after non-keyword-only parameters." +msgstr "" +"Lorsque les paramètres requis pour :meth:`__init__` sont préparés, tout ceux " +"marqués comme exclusivement nommé sont déplacés pour être positionnés après " +"tous ceux non exclusivement nommés. Ceci est un prérequis de la façon dont " +"les paramètres exclusivement nommés sont implémentés en Python : ils sont " +"après les paramètres non exclusivement nommés." + +#: library/dataclasses.rst:629 +msgid "" +"In this example, ``Base.y``, ``Base.w``, and ``D.t`` are keyword-only " +"fields, and ``Base.x`` and ``D.z`` are regular fields::" +msgstr "" +"Dans cet exemple, ``Base.y``, ``Base.w``, et ``D.t`` sont des champs " +"exclusivement nommés alors que ``Base.x`` et ``D.z`` sont des champs " +"normaux ::" + +#: library/dataclasses.rst:644 +msgid "The generated :meth:`__init__` method for ``D`` will look like::" +msgstr "La méthode :meth:`__init__` générée pour ``D`` ressemble à ::" + +#: library/dataclasses.rst:648 +msgid "" +"Note that the parameters have been re-ordered from how they appear in the " +"list of fields: parameters derived from regular fields are followed by " +"parameters derived from keyword-only fields." +msgstr "" +"Les paramètres ont été réarrangés par rapport à leur ordre d'apparition dans " +"la liste des champs : les paramètres provenant des attributs normaux sont " +"suivis par les paramètres qui proviennent des attributs exclusivement nommés." + +#: library/dataclasses.rst:652 +msgid "" +"The relative ordering of keyword-only parameters is maintained in the re-" +"ordered :meth:`__init__` parameter list." +msgstr "" +"L'ordre relatif des paramètres exclusivement nommés est conservé par le " +"réarrangement des paramètres d'\\ :meth:`__init__`." + +#: library/dataclasses.rst:657 +msgid "Default factory functions" +msgstr "Fabriques de valeurs par défaut" + +#: library/dataclasses.rst:659 +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:665 +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:672 +msgid "Mutable default values" +msgstr "Valeurs par défaut muables" + +#: library/dataclasses.rst:674 +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:689 +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:692 +msgid "Using dataclasses, *if* this code was valid::" +msgstr "Avec les classes de données, si ce code était valide :" + +#: library/dataclasses.rst:700 +msgid "it would generate code similar to::" +msgstr "il générerait un code équivalent à :" + +#: library/dataclasses.rst:711 +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 " +"creating a class instance will share the same copy of ``x``. Because " +"dataclasses just use normal Python class creation they also share this " +"behavior. There is no general way for Data Classes to detect this " +"condition. Instead, the :func:`dataclass` decorator will raise a :exc:" +"`TypeError` if it detects a default parameter of type ``list``, ``dict``, or " +"``set``. This is a partial solution, but it does protect against many common " +"errors." +msgstr "" +"On se retrouve avec le même problème qu'au premier exemple avec la classe " +"``C``. Les classes de données étant créées comme toutes les autres classes " +"Python, leur comportement est identique. Ainsi, deux instances distinctes de " +"``D`` où l'attribut ``x`` a été laissé à sa valeur par défaut partagent la " +"même copie de l'objet ``x``. Il n'y a aucun moyen commun de détecter cette " +"situation. C'est pourquoi le décorateur :func:`dataclass` lève :exc:" +"`TypeError` si une valeur par défaut est de type ``list``, ``dict`` ou " +"``set`` est détectée. Cette solution n'est pas parfaite, mais permet " +"d'éviter la majorité des erreurs." + +#: library/dataclasses.rst:722 +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:732 +msgid "Descriptor-typed fields" +msgstr "" + +#: library/dataclasses.rst:734 +msgid "" +"Fields that are assigned :ref:`descriptor objects ` as their " +"default value have the following special behaviors:" +msgstr "" + +#: library/dataclasses.rst:737 +msgid "" +"The value for the field passed to the dataclass's ``__init__`` method is " +"passed to the descriptor's ``__set__`` method rather than overwriting the " +"descriptor object." +msgstr "" + +#: library/dataclasses.rst:740 +msgid "" +"Similarly, when getting or setting the field, the descriptor's ``__get__`` " +"or ``__set__`` method is called rather than returning or overwriting the " +"descriptor object." +msgstr "" + +#: library/dataclasses.rst:743 +msgid "" +"To determine whether a field contains a default value, ``dataclasses`` will " +"call the descriptor's ``__get__`` method using its class access form (i.e. " +"``descriptor.__get__(obj=None, type=cls)``. If the descriptor returns a " +"value in this case, it will be used as the field's default. On the other " +"hand, if the descriptor raises :exc:`AttributeError` in this situation, no " +"default value will be provided for the field." +msgstr "" + +#: library/dataclasses.rst:778 +msgid "" +"Note that if a field is annotated with a descriptor type, but is not " +"assigned a descriptor object as its default value, the field will act like a " +"normal field." +msgstr "" + +#~ msgid "Module-level decorators, classes, and functions" +#~ msgstr "Décorateurs, classes et fonctions du module" + +#~ msgid "Exceptions" +#~ msgstr "Exceptions" diff --git a/library/datatypes.po b/library/datatypes.po new file mode 100644 index 0000000000..74af1e1919 --- /dev/null +++ b/library/datatypes.po @@ -0,0 +1,46 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +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-11-17 23:05+0100\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" + +#: library/datatypes.rst:5 +msgid "Data Types" +msgstr "Types de données" + +#: library/datatypes.rst:7 +msgid "" +"The modules described in this chapter provide a variety of specialized data " +"types such as dates and times, fixed-type arrays, heap queues, double-ended " +"queues, and enumerations." +msgstr "" +"Les modules documentés dans ce chapitre fournissent une gamme de types de " +"données spécialisés tel que les dates et les heures, les listes à type " +"prédéfini, les *heap queue*, les queues synchronisées et les énumérations." + +#: library/datatypes.rst:11 +msgid "" +"Python also provides some built-in data types, in particular, :class:" +"`dict`, :class:`list`, :class:`set` and :class:`frozenset`, and :class:" +"`tuple`. The :class:`str` class is used to hold Unicode strings, and the :" +"class:`bytes` and :class:`bytearray` classes are used to hold binary data." +msgstr "" +"Python fournit aussi quelques types natifs, typiquement :class:`dict`, :" +"class:`list`, :class:`set`, :class:`frozenset`, et :class:`tuple`. La " +"classe :class:`str` est utilisée pour stocker des chaînes Unicode, et les " +"classes :class:`bytes` et :class:`bytearray` des données binaires." + +#: library/datatypes.rst:17 +msgid "The following modules are documented in this chapter:" +msgstr "Les modules suivants sont documentés dans ce chapitre :" diff --git a/library/datetime.po b/library/datetime.po new file mode 100644 index 0000000000..1dcdba29b1 --- /dev/null +++ b/library/datetime.po @@ -0,0 +1,4186 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-22 22:57+0100\n" +"PO-Revision-Date: 2022-05-18 17:37+0200\n" +"Last-Translator: Loc Cosnier \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" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" +"X-Generator: Poedit 3.0.1\n" + +#: library/datetime.rst:2 +msgid ":mod:`datetime` --- Basic date and time types" +msgstr ":mod:`datetime` — Types de base pour la date et l'heure" + +#: library/datetime.rst:11 +msgid "**Source code:** :source:`Lib/datetime.py`" +msgstr "**Code source :** :source:`Lib/datetime.py`" + +#: library/datetime.rst:17 +msgid "" +"The :mod:`datetime` module supplies classes for manipulating dates and times." +msgstr "" +"Le module :mod:`datetime` fournit des classes permettant de manipuler les " +"dates et les heures." + +#: library/datetime.rst:19 +msgid "" +"While date and time arithmetic is supported, the focus of the implementation " +"is on efficient attribute extraction for output formatting and manipulation." +msgstr "" +"Bien que les calculs de date et d'heure sont gérés, l'attention lors de " +"l'implémentation s'est essentiellement portée sur l'efficacité de " +"l'extraction des attributs en vue de leur manipulation et formatage pour " +"l'affichage." + +#: library/datetime.rst:25 +msgid "Module :mod:`calendar`" +msgstr "Module :mod:`calendar`" + +#: library/datetime.rst:25 +msgid "General calendar related functions." +msgstr "Fonctions génériques associées au calendrier." + +#: library/datetime.rst:28 +msgid "Module :mod:`time`" +msgstr "Module :mod:`time`" + +#: library/datetime.rst:28 +msgid "Time access and conversions." +msgstr "Accès aux données d'horaires et aux conversions associées." + +#: 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: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:39 +msgid "Aware and Naive Objects" +msgstr "Objets avisés et naïfs" + +#: 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." +msgstr "" +"Les objets *date* et *time* peuvent être classés comme « avisés » ou " +"« naïfs » selon qu'ils contiennent ou non des informations sur le fuseau " +"horaire." + +#: 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 " +"**aware** object can locate itself relative to other aware objects. An aware " +"object represents a specific moment in time that is not open to " +"interpretation. [#]_" +msgstr "" +"Un objet **avisé** possède suffisamment de connaissance des règles à " +"appliquer et des politiques d'ajustement de l'heure comme les informations " +"sur les fuseaux horaires et l'heure d'été pour se situer de façon relative " +"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:50 +msgid "" +"A **naive** object does not contain enough information to unambiguously " +"locate itself relative to other date/time objects. Whether a naive object " +"represents Coordinated Universal Time (UTC), local time, or time in some " +"other timezone is purely up to the program, just like it is up to the " +"program whether a particular number represents metres, miles, or mass. Naive " +"objects are easy to understand and to work with, at the cost of ignoring " +"some aspects of reality." +msgstr "" +"Un objet **naïf** ne comporte pas assez d'informations pour se situer sans " +"ambiguïté par rapport à d'autres objets *date/time*. Le fait qu'un objet " +"naïf représente un Temps universel coordonné (UTC), une heure locale ou une " +"heure dans un autre fuseau horaire dépend complètement du programme, tout " +"comme un nombre peut représenter une longueur, un poids ou une distance pour " +"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:57 +msgid "" +"For applications requiring aware objects, :class:`.datetime` and :class:`." +"time` objects have an optional time zone information attribute, :attr:`!" +"tzinfo`, that can be set to an instance of a subclass of the abstract :class:" +"`tzinfo` class. These :class:`tzinfo` objects capture information about the " +"offset from UTC time, the time zone name, and whether daylight saving time " +"is in effect." +msgstr "" +"Pour les applications nécessitant des objets avisés, les objets :class:`." +"datetime` et :class:`.time` ont un attribut facultatif renseignant le fuseau " +"horaire, :attr:`!tzinfo`, qui peut être une instance d'une sous-classe de la " +"classe abstraite :class:`tzinfo`. Ces objets :class:`tzinfo` regroupent des " +"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:63 +msgid "" +"Only one concrete :class:`tzinfo` class, the :class:`timezone` class, is " +"supplied by the :mod:`datetime` module. The :class:`timezone` class can " +"represent simple timezones with fixed offsets from UTC, such as UTC itself " +"or North American EST and EDT timezones. Supporting timezones at deeper " +"levels of detail is up to the application. The rules for time adjustment " +"across the world are more political than rational, change frequently, and " +"there is no standard suitable for every application aside from UTC." +msgstr "" +"Notez qu'une seule classe concrète :class:`tzinfo`, la classe :class:" +"`timezone`, est proposée par le module :mod:`datetime`. La classe :class:" +"`timezone` représente des fuseaux horaires simples avec un décalage fixe par " +"rapport à UTC, comme UTC lui-même ou les fuseaux EST et EDT d'Amérique du " +"Nord. Gérer des fuseaux horaires d'un niveau de détails plus avancé est à la " +"charge de l'application. Les règles d'ajustement du temps à travers le monde " +"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:72 +msgid "Constants" +msgstr "Constantes" + +#: 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:78 +msgid "" +"The smallest year number allowed in a :class:`date` or :class:`.datetime` " +"object. :const:`MINYEAR` is ``1``." +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:84 +msgid "" +"The largest year number allowed in a :class:`date` or :class:`.datetime` " +"object. :const:`MAXYEAR` is ``9999``." +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:88 +msgid "Available Types" +msgstr "Types disponibles" + +#: 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 :" +"attr:`day`." +msgstr "" +"Une date naïve idéalisée, en supposant que le calendrier Grégorien actuel a " +"toujours existé et qu'il existera toujours. Attributs : :attr:`year`, :attr:" +"`month` et :attr:`day`." + +#: 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`." +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:110 +msgid "" +"A combination of a date and a time. Attributes: :attr:`year`, :attr:" +"`month`, :attr:`day`, :attr:`hour`, :attr:`minute`, :attr:`second`, :attr:" +"`microsecond`, and :attr:`.tzinfo`." +msgstr "" +"Une combinaison d'une date et d'une heure. Attributs : :attr:`year`, :attr:" +"`month`, :attr:`day`, :attr:`hour`, :attr:`minute`, :attr:`second`, :attr:" +"`microsecond`, et :attr:`tzinfo`." + +#: library/datetime.rst:118 +msgid "" +"A duration expressing the difference between two :class:`date`, :class:`." +"time`, or :class:`.datetime` instances to microsecond resolution." +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: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 " +"notion of time adjustment (for example, to account for time zone and/or " +"daylight saving time)." +msgstr "" +"Une classe de base abstraite pour les objets portants des informations sur " +"les fuseaux horaires. Ceux-ci sont utilisés par les classes :class:`." +"datetime` et :class:`.time` pour donner une notion personnalisable " +"d'ajustement d'horaire (par exemple la prise en compte d'un fuseau horaire " +"et/ou de l'heure d'été)." + +#: library/datetime.rst:133 +msgid "" +"A class that implements the :class:`tzinfo` abstract base class as a fixed " +"offset from the UTC." +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:156 +msgid "Objects of these types are immutable." +msgstr "Les objets issus de ces types sont immuables." + +#: library/datetime.rst:140 +msgid "Subclass relationships::" +msgstr "Relations entre les sous-classes ::" + +#: library/datetime.rst:151 +msgid "Common Properties" +msgstr "Propriétés communes" + +#: library/datetime.rst:153 +msgid "" +"The :class:`date`, :class:`.datetime`, :class:`.time`, and :class:`timezone` " +"types share these common features:" +msgstr "" +"Les types :class:`date`, :class:`.datetime`, :class:`.time`, et :class:" +"`timezone` partagent les caractéristiques suivantes :" + +#: library/datetime.rst:157 +#, fuzzy +msgid "" +"Objects of these types are :term:`hashable`, meaning that they can be used " +"as dictionary keys." +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:159 +msgid "" +"Objects of these types support efficient pickling via the :mod:`pickle` " +"module." +msgstr "" +"Les objets de ces types peuvent être sérialisés efficacement par le module :" +"mod:`pickle`." + +#: 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: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: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: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:170 +msgid "``d.tzinfo`` is not ``None``" +msgstr "``d.tzinfo`` ne vaut pas ``None``" + +#: 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:173 +msgid "Otherwise, *d* is naive." +msgstr "Autrement, *d* est naïf." + +#: 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:177 +msgid "``t.tzinfo`` is not ``None``" +msgstr "``t.tzinfo`` ne vaut pas ``None``" + +#: 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:180 +msgid "Otherwise, *t* is naive." +msgstr "Autrement, *t* est naïf." + +#: library/datetime.rst:182 +msgid "" +"The distinction between aware and naive doesn't apply to :class:`timedelta` " +"objects." +msgstr "" +"La distinction entre avisé et naïf ne s'applique pas aux objets de type :" +"class:`timedelta`." + +#: library/datetime.rst:188 +msgid ":class:`timedelta` Objects" +msgstr "Objets :class:`timedelta`" + +#: library/datetime.rst:190 +msgid "" +"A :class:`timedelta` object represents a duration, the difference between " +"two dates or times." +msgstr "" +"Un objet :class:`timedelta` représente une durée, c'est-à-dire la différence " +"entre deux dates ou heures." + +#: 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." +msgstr "" +"Tous les paramètres sont optionnels et ont ``0`` comme valeur par défaut. " +"Les paramètres peuvent être des entiers ou des flottants et ils peuvent être " +"positifs ou négatifs." + +#: library/datetime.rst:198 +msgid "" +"Only *days*, *seconds* and *microseconds* are stored internally. Arguments " +"are converted to those units:" +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:201 +msgid "A millisecond is converted to 1000 microseconds." +msgstr "Une milliseconde est convertie en 1000 microsecondes." + +#: library/datetime.rst:202 +msgid "A minute is converted to 60 seconds." +msgstr "Une minute est convertie en 60 secondes." + +#: library/datetime.rst:203 +msgid "An hour is converted to 3600 seconds." +msgstr "Une heure est convertie en 3600 secondes." + +#: library/datetime.rst:204 +msgid "A week is converted to 7 days." +msgstr "Une semaine est convertie en 7 jours." + +#: library/datetime.rst:206 +msgid "" +"and days, seconds and microseconds are then normalized so that the " +"representation is unique, with" +msgstr "" +"et ensuite les jours, secondes et microsecondes sont normalisés pour que la " +"représentation soit unique avec" + +#: library/datetime.rst:209 +msgid "``0 <= microseconds < 1000000``" +msgstr "``0 <= microseconds < 1000000``" + +#: 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:211 +msgid "``-999999999 <= days <= 999999999``" +msgstr "``-999999999 <= days <= 999999999``" + +#: library/datetime.rst:213 +msgid "" +"The following example illustrates how any arguments besides *days*, " +"*seconds* and *microseconds* are \"merged\" and normalized into those three " +"resulting attributes::" +msgstr "" +"L'exemple suivant illustre comment tous les arguments autres que *days*, " +"*seconds* et *microseconds* sont « fusionnés » et normalisés dans ces trois " +"attributs résultants ::" + +#: 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 " +"sum is rounded to the nearest microsecond using round-half-to-even " +"tiebreaker. If no argument is a float, the conversion and normalization " +"processes are exact (no information is lost)." +msgstr "" +"Si l'un des arguments est un flottant et qu'il y a des microsecondes " +"décimales, les microsecondes décimales laissées par les arguments sont " +"combinées et leur somme est arrondie à la microseconde la plus proche (en " +"arrondissant les demis vers le nombre pair). Si aucun argument n'est " +"flottant, les processus de conversion et de normalisation seront exacts (pas " +"d'informations perdues)." + +#: library/datetime.rst:238 +msgid "" +"If the normalized value of days lies outside the indicated range, :exc:" +"`OverflowError` is raised." +msgstr "" +"Si la valeur normalisée des jours déborde de l'intervalle indiqué, une :exc:" +"`OverflowError` est levée." + +#: library/datetime.rst:241 +msgid "" +"Note that normalization of negative values may be surprising at first. For " +"example::" +msgstr "" +"Notez que la normalisation de valeurs négatives peut être surprenante au " +"premier abord. Par exemple ::" + +#: library/datetime.rst:544 library/datetime.rst:1669 library/datetime.rst:2262 +msgid "Class attributes:" +msgstr "Attributs de la classe :" + +#: 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:259 +msgid "" +"The most positive :class:`timedelta` object, ``timedelta(days=999999999, " +"hours=23, minutes=59, seconds=59, microseconds=999999)``." +msgstr "" +"L'objet :class:`timedelta` le plus positif, ``timedelta(days=999999999, " +"hours=23, minutes=59, seconds=59, microseconds=999999)``." + +#: library/datetime.rst:265 +msgid "" +"The smallest possible difference between non-equal :class:`timedelta` " +"objects, ``timedelta(microseconds=1)``." +msgstr "" +"La plus petite différence entre des objets :class:`timedelta` non égaux, " +"``timedelta(microseconds=1)``." + +#: library/datetime.rst:268 +msgid "" +"Note that, because of normalization, ``timedelta.max`` > ``-timedelta.min``. " +"``-timedelta.max`` is not representable as a :class:`timedelta` object." +msgstr "" +"Il est à noter, du fait de la normalisation, que ``timedelta.max`` > ``-" +"timedelta.min``. ``-timedelta.max`` n'est pas représentable sous la forme " +"d'un objet :class:`timedelta`." + +#: library/datetime.rst:562 library/datetime.rst:1689 +msgid "Instance attributes (read-only):" +msgstr "Attributs de l'instance (en lecture seule) :" + +#: library/datetime.rst:274 +msgid "Attribute" +msgstr "Attribut" + +#: library/datetime.rst:274 +msgid "Value" +msgstr "Valeur" + +#: library/datetime.rst:276 +msgid "``days``" +msgstr "``days``" + +#: library/datetime.rst:276 +msgid "Between -999999999 and 999999999 inclusive" +msgstr "Entre ``-999999999`` et ``999999999`` inclus" + +#: library/datetime.rst:278 +msgid "``seconds``" +msgstr "``seconds``" + +#: library/datetime.rst:278 +msgid "Between 0 and 86399 inclusive" +msgstr "Entre 0 et 86399 inclus" + +#: library/datetime.rst:280 +msgid "``microseconds``" +msgstr "``microseconds``" + +#: library/datetime.rst:280 +msgid "Between 0 and 999999 inclusive" +msgstr "Entre 0 et 999999 inclus" + +#: library/datetime.rst:579 library/datetime.rst:1124 +msgid "Supported operations:" +msgstr "Opérations gérées :" + +#: library/datetime.rst:582 library/datetime.rst:1127 +msgid "Operation" +msgstr "Opération" + +#: library/datetime.rst:582 library/datetime.rst:1127 +msgid "Result" +msgstr "Résultat" + +#: library/datetime.rst:290 +msgid "``t1 = t2 + t3``" +msgstr "``t1 = t2 + t3``" + +#: library/datetime.rst:290 +msgid "" +"Sum of *t2* and *t3*. Afterwards *t1*-*t2* == *t3* and *t1*-*t3* == *t2* are " +"true. (1)" +msgstr "" +"Somme de *t2* et *t3*. Ensuite ``t1 - t2 == t3`` et ``t1 - t3 == t2`` sont " +"des expressions vraies. (1)" + +#: library/datetime.rst:293 +msgid "``t1 = t2 - t3``" +msgstr "``t1 = t2 - t3``" + +#: library/datetime.rst:293 +msgid "" +"Difference of *t2* and *t3*. Afterwards *t1* == *t2* - *t3* and *t2* == *t1* " +"+ *t3* are true. (1)(6)" +msgstr "" +"Différence entre *t2* et *t3*. Ensuite ``t1 == t2 - t3`` et ``t2 == t1 + " +"t3`` sont des expressions vraies. (1)(6)" + +#: library/datetime.rst:297 +msgid "``t1 = t2 * i or t1 = i * t2``" +msgstr "``t1 = t2 * i or t1 = i * t2``" + +#: library/datetime.rst:297 +msgid "" +"Delta multiplied by an integer. Afterwards *t1* // i == *t2* is true, " +"provided ``i != 0``." +msgstr "" +"Delta multiplié par un entier. Ensuite *t1* // i == *t2* est vrai, en " +"admettant que ``i != 0``." + +#: 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:304 +msgid "``t1 = t2 * f or t1 = f * t2``" +msgstr "``t1 = t2 * f or t1 = f * t2``" + +#: 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." +msgstr "" +"Delta multiplié par un flottant. Le résultat est arrondi au multiple le plus " +"proche de ``timedelta.resolution`` en utilisant la règle de l'arrondi au " +"pair le plus proche." + +#: library/datetime.rst:308 +msgid "``f = t2 / t3``" +msgstr "``f = t2 / t3``" + +#: library/datetime.rst:308 +msgid "" +"Division (3) of overall duration *t2* by interval unit *t3*. Returns a :" +"class:`float` object." +msgstr "" +"Division (3) de la durée totale *t2* par l'unité d'intervalle *t3*. Renvoie " +"un objet :class:`float`." + +#: library/datetime.rst:312 +msgid "``t1 = t2 / f or t1 = t2 / i``" +msgstr "``t1 = t2 / f or t1 = t2 / i``" + +#: 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." +msgstr "" +"Delta divisé par un flottant ou un entier. Le résultat est arrondi au " +"multiple le plus proche de ``timedelta.resolution`` en utilisant la règle de " +"l'arrondi au pair le plus proche." + +#: library/datetime.rst:316 +msgid "``t1 = t2 // i`` or ``t1 = t2 // t3``" +msgstr "``t1 = t2 // i`` or ``t1 = t2 // t3``" + +#: 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)" +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:320 +msgid "``t1 = t2 % t3``" +msgstr "``t1 = t2 % t3``" + +#: 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:323 +msgid "``q, r = divmod(t1, t2)``" +msgstr "``q, r = divmod(t1, t2)``" + +#: 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." +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:328 +msgid "``+t1``" +msgstr "``+t1``" + +#: 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:331 +msgid "``-t1``" +msgstr "``-t1``" + +#: library/datetime.rst:331 +msgid "" +"equivalent to :class:`timedelta`\\ (-*t1.days*, -*t1.seconds*, -*t1." +"microseconds*), and to *t1*\\* -1. (1)(4)" +msgstr "" +"équivalent à :class:`timedelta`\\ (*-t1.days*, *-t1.seconds*, *-t1." +"microseconds*), et à ``t1 * -1``. (1)(4)" + +#: library/datetime.rst:336 +msgid "``abs(t)``" +msgstr "``abs(t)``" + +#: library/datetime.rst:336 +msgid "" +"equivalent to +\\ *t* when ``t.days >= 0``, and to -*t* when ``t.days < 0``. " +"(2)" +msgstr "" +"équivalent à ``+t`` quand ``t.days >= 0``, et à ``-t`` quand ``t.days < 0``. " +"(2)" + +#: library/datetime.rst:339 +msgid "``str(t)``" +msgstr "``str(t)``" + +#: 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)" +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:343 +msgid "``repr(t)``" +msgstr "``repr(t)``" + +#: library/datetime.rst:343 +msgid "" +"Returns a string representation of the :class:`timedelta` object as a " +"constructor call with canonical attribute values." +msgstr "" +"Renvoie une chaîne de la forme objet :class:`timedelta` comme un appel " +"construit avec des valeurs d'attributs canoniques." + +#: library/datetime.rst:596 library/datetime.rst:2475 +msgid "Notes:" +msgstr "Notes :" + +#: library/datetime.rst:352 +msgid "This is exact but may overflow." +msgstr "Ceci est exact, mais peut provoquer un débordement." + +#: 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:358 +msgid "Division by 0 raises :exc:`ZeroDivisionError`." +msgstr "Une division par 0 provoque :exc:`ZeroDivisionError`." + +#: 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:364 +msgid "" +"String representations of :class:`timedelta` objects are normalized " +"similarly to their internal representation. This leads to somewhat unusual " +"results for negative timedeltas. For example::" +msgstr "" +"La représentation en chaîne de caractères des objets :class:`timedelta` est " +"normalisée similairement à leur représentation interne. Cela amène à des " +"résultats inhabituels pour des *timedeltas* négatifs. Par exemple ::" + +#: 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 " +"will produce a result while the latter will overflow." +msgstr "" +"L'expression ``t2 - t3`` est toujours égale à l'expression ``t2 + (-t3)`` " +"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:378 +msgid "" +"In addition to the operations listed above, :class:`timedelta` objects " +"support certain additions and subtractions with :class:`date` and :class:`." +"datetime` objects (see below)." +msgstr "" +"En plus des opérations listées ci-dessus, les objets :class:`timedelta` " +"implémentent certaines additions et soustractions avec des objets :class:" +"`date` et :class:`datetime` (voir ci-dessous)." + +#: 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 " +"the :func:`divmod` function. True division and multiplication of a :class:" +"`timedelta` object by a :class:`float` object are now supported." +msgstr "" +"La division entière et la vraie division d'un objet :class:`timedelta` par " +"un autre :class:`timedelta` sont maintenant gérées, comme le sont les " +"opérations de reste euclidien et la fonction :func:`divmod`. La vraie " +"division et la multiplication d'un objet :class:`timedelta` par un :class:" +"`float` sont maintenant implémentées." + +#: 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:391 +msgid "" +"The comparisons ``==`` or ``!=`` *always* return a :class:`bool`, no matter " +"the type of the compared object::" +msgstr "" +"Les comparaisons ``==`` ou ``!=`` renvoient *toujours* un :class:`bool`, " +"quel que soit le type de l'objet comparé ::" + +#: 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:" +"`TypeError` is raised::" +msgstr "" +"Pour toutes les autres comparaisons (telles que ``<`` et ``>``), lorsqu'un " +"objet :class:`timedelta` est comparé à un objet d'un type différent, :exc:" +"`TypeError` est levée ::" + +#: 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)``." +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:625 library/datetime.rst:1786 +msgid "Instance methods:" +msgstr "Méthodes de l'instance :" + +#: 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 " +"the division form directly (e.g. ``td / timedelta(microseconds=1)``)." +msgstr "" +"Renvoie le nombre total de secondes contenues dans la durée. Équivalent à " +"``td / timedelta(seconds=1)``. Pour un intervalle dont l'unité n'est pas la " +"seconde, utilisez directement la division (par exemple, ``td / " +"timedelta(microseconds=1)``)." + +#: 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." +msgstr "" +"Notez que pour des intervalles de temps très larges (supérieurs à 270 ans " +"sur la plupart des plateformes), cette méthode perdra la précision des " +"microsecondes." + +#: library/datetime.rst:430 +msgid "Examples of usage: :class:`timedelta`" +msgstr "Exemples d'utilisation de la classe :class:`timedelta` :" + +#: library/datetime.rst:432 +msgid "An additional example of normalization::" +msgstr "Un exemple supplémentaire de normalisation ::" + +#: library/datetime.rst:444 +msgid "Examples of :class:`timedelta` arithmetic::" +msgstr "Exemples d'arithmétique avec la classe :class:`timedelta` ::" + +#: library/datetime.rst:463 +msgid ":class:`date` Objects" +msgstr "Objets :class:`date`" + +#: 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 " +"both directions." +msgstr "" +"Un objet :class:`date` représente une date (année, mois et jour) dans un " +"calendrier idéal, le calendrier grégorien actuel étant indéfiniment étendu " +"dans les deux sens." + +#: 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. [#]_" +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:474 +msgid "" +"All arguments are required. Arguments must be integers, in the following " +"ranges:" +msgstr "" +"Tous les arguments sont requis. Les arguments peuvent être des entiers, dans " +"les intervalles suivants :" + +#: library/datetime.rst:477 +msgid "``MINYEAR <= year <= MAXYEAR``" +msgstr "``MINYEAR <= year <= MAXYEAR``" + +#: library/datetime.rst:478 +msgid "``1 <= month <= 12``" +msgstr "``1 <= month <= 12``" + +#: 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: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:848 +msgid "Other constructors, all class methods:" +msgstr "Autres constructeurs, méthodes de classe :" + +#: library/datetime.rst:488 +msgid "Return the current local date." +msgstr "Renvoie la date locale courante." + +#: library/datetime.rst:490 +msgid "This is equivalent to ``date.fromtimestamp(time.time())``." +msgstr "Cela est équivalent à ``date.fromtimestamp(time.time())``." + +#: library/datetime.rst:494 +msgid "" +"Return the local date corresponding to the POSIX timestamp, such as is " +"returned by :func:`time.time`." +msgstr "" +"Renvoie la date locale correspondant à l'horodatage POSIX, telle que " +"renvoyée par :func:`time.time`." + +#: 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:" +"`OSError` on :c:func:`localtime` failure. It's common for this to be " +"restricted to years from 1970 through 2038. Note that on non-POSIX systems " +"that include leap seconds in their notion of a timestamp, leap seconds are " +"ignored by :meth:`fromtimestamp`." +msgstr "" +"Elle peut lever une :exc:`OverflowError`, si l'horodatage est en dehors des " +"bornes gérées par la fonction C :c:func:`localtime` de la plateforme, et " +"une :exc:`OSError` en cas d'échec de :c:func:`localtime`. Il est commun " +"d'être restreint aux années entre 1970 et 2038. Notez que sur les systèmes " +"non *POSIX* qui incluent les secondes intercalaires dans leur notion " +"d'horodatage, ces secondes sont ignorées par :meth:`fromtimestamp`." + +#: 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` " +"function. Raise :exc:`OSError` instead of :exc:`ValueError` on :c:func:" +"`localtime` failure." +msgstr "" +"Lève une :exc:`OverflowError` plutôt qu'une :exc:`ValueError` si " +"l'horodatage (*timestamp* en anglais) est en dehors des bornes gérées par la " +"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:513 +msgid "" +"Return the date corresponding to the proleptic Gregorian ordinal, where " +"January 1 of year 1 has ordinal 1." +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:516 +msgid "" +":exc:`ValueError` is raised unless ``1 <= ordinal <= date.max.toordinal()``. " +"For any date *d*, ``date.fromordinal(d.toordinal()) == d``." +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:523 +msgid "" +"Return a :class:`date` corresponding to a *date_string* given in the format " +"``YYYY-MM-DD``::" +msgstr "" +"Renvoie une :class:`date` correspondant à *date_string* dans le format " +"``YYYY-MM-DD`` ::" + +#: library/datetime.rst:530 +msgid "" +"This is the inverse of :meth:`date.isoformat`. It only supports the format " +"``YYYY-MM-DD``." +msgstr "" +"C'est la réciproque de :meth:`date.isoformat`. Elle ne prend en charge que " +"le format ``YYYY-MM-DD``." + +#: 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." +"isocalendar`." +msgstr "" +"Renvoie une :class:`date` correspondant à la date du calendrier ISO définie " +"par l'année, la semaine et le jour. C'est la réciproque de la fonction :meth:" +"`date.isocalendar`." + +#: 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:553 +msgid "The latest representable date, ``date(MAXYEAR, 12, 31)``." +msgstr "La dernière date représentable, ``date(MAXYEAR, 12, 31)``." + +#: library/datetime.rst:558 +msgid "" +"The smallest possible difference between non-equal date objects, " +"``timedelta(days=1)``." +msgstr "" +"La plus petite différence possible entre deux objets dates non-égaux, " +"``timedelta(days=1)``." + +#: library/datetime.rst:1075 +msgid "Between :const:`MINYEAR` and :const:`MAXYEAR` inclusive." +msgstr "Entre :const:`MINYEAR` et :const:`MAXYEAR` inclus." + +#: library/datetime.rst:1080 +msgid "Between 1 and 12 inclusive." +msgstr "Entre 1 et 12 inclus." + +#: 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:584 +msgid "``date2 = date1 + timedelta``" +msgstr "``date2 = date1 + timedelta``" + +#: library/datetime.rst:584 +#, fuzzy +msgid "*date2* will be ``timedelta.days`` days after *date1*. (1)" +msgstr "" +"*date2* est décalée de ``timedelta.days`` jours par rapport à *date1*. (1)" + +#: library/datetime.rst:587 +msgid "``date2 = date1 - timedelta``" +msgstr "``date2 = date1 - timedelta``" + +#: 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:590 +msgid "``timedelta = date1 - date2``" +msgstr "``timedelta = date1 - date2``" + +#: library/datetime.rst:1133 +msgid "\\(3)" +msgstr "\\(3)" + +#: library/datetime.rst:592 +msgid "``date1 < date2``" +msgstr "``date1 < date2``" + +#: library/datetime.rst:592 +msgid "" +"*date1* is considered less than *date2* when *date1* precedes *date2* in " +"time. (4)" +msgstr "" +"*date1* est considérée comme inférieure à *date2* quand *date1* précède " +"*date2* dans le temps. (4)" + +#: 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``. " +"``timedelta.seconds`` and ``timedelta.microseconds`` are ignored. :exc:" +"`OverflowError` is raised if ``date2.year`` would be smaller than :const:" +"`MINYEAR` or larger than :const:`MAXYEAR`." +msgstr "" +"*date2* est déplacée en avant dans le temps si ``timedelta.days > 0``, ou en " +"arrière si ``timedelta.days < 0``. Après quoi ``date2 - date1 == timedelta." +"days``. ``timedelta.seconds`` et ``timedelta.microseconds`` sont ignorés. " +"Une :exc:`OverflowError` est levée si ``date2.year`` devait être inférieure " +"à :const:`MINYEAR` ou supérieure à :const:`MAXYEAR`." + +#: library/datetime.rst:606 +msgid "``timedelta.seconds`` and ``timedelta.microseconds`` are ignored." +msgstr "``timedelta.seconds`` et ``timedelta.microseconds`` sont ignorés." + +#: library/datetime.rst:609 +msgid "" +"This is exact, and cannot overflow. timedelta.seconds and timedelta." +"microseconds are 0, and date2 + timedelta == date1 after." +msgstr "" +"Cela est exact, et ne peut pas provoquer de débordement. ``timedelta." +"seconds`` et ``timedelta.microseconds`` valent ``0``, et ``date2 + timedelta " +"== date1`` après cela." + +#: 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 " +"comparand isn't also a :class:`date` object. However, ``NotImplemented`` is " +"returned instead if the other comparand has a :meth:`timetuple` attribute. " +"This hook gives other kinds of date objects a chance at implementing mixed-" +"type comparison. If not, when a :class:`date` object is compared to an " +"object of a different type, :exc:`TypeError` is raised unless the comparison " +"is ``==`` or ``!=``. The latter cases return :const:`False` or :const:" +"`True`, respectively." +msgstr "" +"En d'autres termes, ``date1 < date2`` si et seulement si ``date1.toordinal() " +"< date2.toordinal()``. La comparaison de dates lève une :exc:`TypeError` si " +"l'autre opérande n'est pas un objet :class:`date`. Cependant, " +"``NotImplemented`` est renvoyé à la place si l'autre opérande a un attribut :" +"meth:`timetuple`. Cela permet à d'autres types d'objets dates d'avoir une " +"chance d'implémenter une comparaison entre types différents. Sinon, quand un " +"objet :class:`date` est comparé à un objet d'un type différent, une :exc:" +"`TypeError` est levée à moins que la comparaison soit ``==`` ou ``!=``. Ces " +"derniers cas renvoient respectivement :const:`False` et :const:`True`." + +#: 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:629 +msgid "" +"Return a date with the same value, except for those parameters given new " +"values by whichever keyword arguments are specified." +msgstr "" +"Renvoie une date avec la même valeur, excepté pour les valeurs spécifiées " +"par arguments nommés." + +#: library/datetime.rst:1829 +msgid "Example::" +msgstr "Exemple ::" + +#: library/datetime.rst:1311 +msgid "" +"Return a :class:`time.struct_time` such as returned by :func:`time." +"localtime`." +msgstr "" +"Renvoie une :class:`time.struct_time` telle que renvoyée par :func:`time." +"localtime`." + +#: 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:1313 +msgid "``d.timetuple()`` is equivalent to::" +msgstr "``d.timetuple()`` est équivalent à ::" + +#: 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." +msgstr "" +"où ``yday = d.toordinal() - date(d.year, 1, 1).toordinal() + 1`` est le " +"numéro du jour dans l'année courante commençant par ``1`` pour le 1\\ :sup:" +"`er` janvier." + +#: 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." +"toordinal()) == d``." +msgstr "" +"Renvoie l'ordinal grégorien proleptique de la date, où le 1er janvier de " +"l'an 1 a l'ordinal 1. Pour tout objet :class:`date` *d*, ``date." +"fromordinal(d.toordinal()) == d``." + +#: 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 :" +"meth:`isoweekday`." +msgstr "" +"Renvoie le jour de la semaine sous forme de nombre, où lundi vaut 0 et " +"dimanche vaut 6. Par exemple, ``date(2002, 12, 4).weekday() == 2``, un " +"mercredi. Voir aussi :meth:`isoweekday`." + +#: 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 :" +"meth:`weekday`, :meth:`isocalendar`." +msgstr "" +"Renvoie le jour de la semaine sous forme de nombre, où lundi vaut 1 et " +"dimanche vaut 7. Par exemple, ``date(2002, 12, 4).isoweekday() == 3``, un " +"mercredi. Voir aussi :meth:`weekday`, :meth:`isocalendar`." + +#: library/datetime.rst:677 +msgid "" +"Return a :term:`named tuple` object with three components: ``year``, " +"``week`` and ``weekday``." +msgstr "" +"Renvoie un objet :term:`named tuple` avec trois composants : ``year``, " +"``week`` et ``weekday``." + +#: 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: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 " +"(Gregorian) calendar week of a year containing a Thursday. This is called " +"week number 1, and the ISO year of that Thursday is the same as its " +"Gregorian year." +msgstr "" +"Une année ISO est composée de 52 ou 53 semaines pleines, où chaque semaine " +"débute un lundi et se termine un dimanche. La première semaine d'une année " +"ISO est la première semaine calendaire (grégorienne) de l'année comportant " +"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: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::" +msgstr "" +"Par exemple, l'année 2004 débute un jeudi, donc la première semaine de " +"l'année ISO 2004 débute le lundi 29 décembre 2003 et se termine le dimanche " +"4 janvier 2004 ::" + +#: 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: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:707 +msgid "This is the inverse of :meth:`date.fromisoformat`." +msgstr "C'est la réciproque de :meth:`date.fromisoformat`." + +#: 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:716 +msgid "Return a string representing the date::" +msgstr "Renvoie une chaîne de caractères représentant la date ::" + +#: library/datetime.rst:1497 +msgid "``d.ctime()`` is equivalent to::" +msgstr "``d.ctime()`` est équivalent à ::" + +#: 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 " +"the C standard." +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: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 " +"values. For a complete list of formatting directives, see :ref:`strftime-" +"strptime-behavior`." +msgstr "" +"Renvoie une chaîne de caractères représentant la date, contrôlée par une " +"chaîne de formatage explicite. Les codes de formatage se référant aux " +"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: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 ` and when using :meth:`str.format`. For a complete list of " +"formatting directives, see :ref:`strftime-strptime-behavior`." +msgstr "" +"Identique à :meth:`.date.strftime`. Cela permet de spécifier une chaîne de " +"formatage pour un objet :class:`.date` dans une :ref:`chaîne de formatage " +"littérale ` et à l'utilisation de :meth:`str.format`. Pour une " +"liste complète des directives de formatage, voir :ref:`strftime-strptime-" +"behavior`." + +#: library/datetime.rst:748 +msgid "Examples of Usage: :class:`date`" +msgstr "Exemple d'utilisation de la classe :class:`date` :" + +#: library/datetime.rst:750 +msgid "Example of counting days to an event::" +msgstr "Exemple de décompte des jours avant un évènement ::" + +#: library/datetime.rst:768 +msgid "More examples of working with :class:`date`:" +msgstr "Plus d'exemples avec la classe :class:`date` :" + +#: library/datetime.rst:817 +msgid ":class:`.datetime` Objects" +msgstr "Objets :class:`.datetime`" + +#: library/datetime.rst:819 +msgid "" +"A :class:`.datetime` object is a single object containing all the " +"information from a :class:`date` object and a :class:`.time` object." +msgstr "" +"Un objet :class:`.datetime` est un seul et même objet contenant toute " +"l'information d'un objet :class:`date` et d'un objet :class:`time`." + +#: library/datetime.rst:822 +msgid "" +"Like a :class:`date` object, :class:`.datetime` assumes the current " +"Gregorian calendar extended in both directions; like a :class:`.time` " +"object, :class:`.datetime` assumes there are exactly 3600\\*24 seconds in " +"every day." +msgstr "" +"Comme un objet :class:`date`, un objet :class:`.datetime` utilise le " +"calendrier Grégorien actuel étendu vers le passé et le futur ; comme un " +"objet :class:`.time`, un objet :class:`.datetime` suppose qu'il y a " +"exactement 3600\\*24 secondes chaque jour." + +#: library/datetime.rst:826 +msgid "Constructor:" +msgstr "Constructeur :" + +#: library/datetime.rst:830 +msgid "" +"The *year*, *month* and *day* arguments are required. *tzinfo* may be " +"``None``, or an instance of a :class:`tzinfo` subclass. The remaining " +"arguments must be integers in the following ranges:" +msgstr "" +"Les arguments *year*, *month* et *day* sont requis. *tzinfo* peut être " +"``None`` ou une instance d'une sous-classe de :class:`tzinfo`. Les arguments " +"restant doivent être des nombres, dans les intervalles suivants :" + +#: library/datetime.rst:834 +msgid "``MINYEAR <= year <= MAXYEAR``," +msgstr "``MINYEAR <= year <= MAXYEAR``," + +#: library/datetime.rst:835 +msgid "``1 <= month <= 12``," +msgstr "``1 <= month <= 12``," + +#: library/datetime.rst:836 +msgid "``1 <= day <= number of days in the given month and year``," +msgstr "``1 <= day <= nombre de jours dans le mois donné de l'année donnée``," + +#: library/datetime.rst:1660 +msgid "``0 <= hour < 24``," +msgstr "``0 <= hour < 24``," + +#: library/datetime.rst:1661 +msgid "``0 <= minute < 60``," +msgstr "``0 <= minute < 60``," + +#: library/datetime.rst:1662 +msgid "``0 <= second < 60``," +msgstr "``0 <= second < 60``," + +#: library/datetime.rst:1663 +msgid "``0 <= microsecond < 1000000``," +msgstr "``0 <= microsecond < 1000000``," + +#: library/datetime.rst:1664 +msgid "``fold in [0, 1]``." +msgstr "``fold in [0, 1]``." + +#: library/datetime.rst:1232 library/datetime.rst:1796 +msgid "Added the ``fold`` argument." +msgstr "Ajout de l'argument ``fold``." + +#: library/datetime.rst:852 +msgid "Return the current local datetime, with :attr:`.tzinfo` ``None``." +msgstr "Renvoie la date locale actuelle, avec :attr:`.tzinfo` ``None``." + +#: library/datetime.rst:854 +msgid "Equivalent to::" +msgstr "Équivalent à ::" + +#: library/datetime.rst:858 +msgid "See also :meth:`now`, :meth:`fromtimestamp`." +msgstr "Voir aussi :meth:`now`, :meth:`fromtimestamp`." + +#: library/datetime.rst:860 +msgid "" +"This method is functionally equivalent to :meth:`now`, but without a ``tz`` " +"parameter." +msgstr "" +"Cette méthode est fonctionnellement équivalente à :meth:`now`, mais sans le " +"paramètre ``tz``." + +#: library/datetime.rst:865 +msgid "Return the current local date and time." +msgstr "Renvoie la date et l'heure locale actuelle." + +#: library/datetime.rst:867 +msgid "" +"If optional argument *tz* is ``None`` or not specified, this is like :meth:" +"`today`, but, if possible, supplies more precision than can be gotten from " +"going through a :func:`time.time` timestamp (for example, this may be " +"possible on platforms supplying the C :c:func:`gettimeofday` function)." +msgstr "" +"Si l'argument optionnel *tz* est ``None`` ou n'est pas spécifié, la méthode " +"est similaire à :meth:`today`, mais, si possible, apporte plus de précisions " +"que ce qui peut être trouvé à travers un horodatage :func:`time.time` (par " +"exemple, cela peut être possible sur des plateformes fournissant la fonction " +"C :c:func:`gettimeofday`)." + +#: library/datetime.rst:873 +msgid "" +"If *tz* is not ``None``, it must be an instance of a :class:`tzinfo` " +"subclass, and the current date and time are converted to *tz*’s time zone." +msgstr "" +"Si *tz* n'est pas ``None``, il doit être une instance d'une sous-classe :" +"class:`tzinfo`, et la date et l'heure courantes sont converties vers le " +"fuseau horaire *tz*." + +#: library/datetime.rst:876 +msgid "This function is preferred over :meth:`today` and :meth:`utcnow`." +msgstr "Cette fonction est préférée à :meth:`today` et :meth:`utcnow`." + +#: library/datetime.rst:881 +msgid "Return the current UTC date and time, with :attr:`.tzinfo` ``None``." +msgstr "" +"Renvoie la date et l'heure UTC actuelle, avec :attr:`.tzinfo` ``None``." + +#: library/datetime.rst:883 +msgid "" +"This is like :meth:`now`, but returns the current UTC date and time, as a " +"naive :class:`.datetime` object. An aware current UTC datetime can be " +"obtained by calling ``datetime.now(timezone.utc)``. See also :meth:`now`." +msgstr "" +"C'est semblable à :meth:`now`, mais renvoie la date et l'heure UTC " +"courantes, comme un objet :class:`.datetime` naïf. Un *datetime* UTC courant " +"avisé peut être obtenu en appelant ``datetime.now(timezone.utc)``. Voir " +"aussi :meth:`now`." + +#: library/datetime.rst:889 +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 " +"UTC. As such, the recommended way to create an object representing the " +"current time in UTC is by calling ``datetime.now(timezone.utc)``." +msgstr "" +"Parce que les objets naïfs ``datetime`` sont traités par de nombreuses " +"méthodes ``datetime`` comme des heures locales, il est préférable d'utiliser " +"les dates connues pour représenter les heures en UTC. En tant que tel, le " +"moyen recommandé pour créer un objet représentant l'heure actuelle en UTC " +"est d'appeler ``datetime.now(timezone.utc)``." + +#: library/datetime.rst:897 +msgid "" +"Return the local date and time corresponding to the POSIX timestamp, such as " +"is returned by :func:`time.time`. If optional argument *tz* is ``None`` or " +"not specified, the timestamp is converted to the platform's local date and " +"time, and the returned :class:`.datetime` object is naive." +msgstr "" +"Renvoie la date et l'heure locales correspondant à l'horodatage (*timestamp* " +"en anglais) *POSIX*, comme renvoyé par :func:`time.time`. Si l'argument " +"optionnel *tz* est ``None`` ou n'est pas spécifié, l'horodatage est converti " +"vers la date et l'heure locales de la plateforme, et l'objet :class:`." +"datetime` renvoyé est naïf." + +#: library/datetime.rst:902 +msgid "" +"If *tz* is not ``None``, it must be an instance of a :class:`tzinfo` " +"subclass, and the timestamp is converted to *tz*’s time zone." +msgstr "" +"Si *tz* n'est pas ``None``, il doit être une instance d'une sous-classe :" +"class:`tzinfo`, et l'horodatage (*timestamp* en anglais) est converti vers " +"le fuseau horaire *tz*." + +#: library/datetime.rst:905 +msgid "" +":meth:`fromtimestamp` may raise :exc:`OverflowError`, if the timestamp is " +"out of the range of values supported by the platform C :c:func:`localtime` " +"or :c:func:`gmtime` functions, and :exc:`OSError` on :c:func:`localtime` or :" +"c:func:`gmtime` failure. It's common for this to be restricted to years in " +"1970 through 2038. Note that on non-POSIX systems that include leap seconds " +"in their notion of a timestamp, leap seconds are ignored by :meth:" +"`fromtimestamp`, and then it's possible to have two timestamps differing by " +"a second that yield identical :class:`.datetime` objects. This method is " +"preferred over :meth:`utcfromtimestamp`." +msgstr "" +":meth:`fromtimestamp` peut lever une :exc:`OverflowError`, si l'horodatage " +"est en dehors de l'intervalle de valeurs gérées par les fonctions C :c:func:" +"`localtime` ou :c:func:`gmtime` de la plateforme, et une :exc:`OSError` en " +"cas d'échec de :c:func:`localtime` ou :c:func:`gmtime`. Il est courant " +"d'être restreint aux années de 1970 à 2038. Notez que sur les systèmes non " +"*POSIX* qui incluent les secondes intercalaires dans leur notion " +"d'horodatage, les secondes intercalaires sont ignorées par :meth:" +"`fromtimestamp`, et il est alors possible d'avoir deux horodatages différant " +"d'une seconde produisant un objet :class:`.datetime` identique. Cette " +"méthode est préférée à :meth:`utcfromtimestamp`." + +#: library/datetime.rst:916 +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` " +"or :c:func:`gmtime` functions. Raise :exc:`OSError` instead of :exc:" +"`ValueError` on :c:func:`localtime` or :c:func:`gmtime` failure." +msgstr "" +"Lève une :exc:`OverflowError` plutôt qu'une :exc:`ValueError` si " +"l'horodatage est en dehors de l'intervalle de valeurs gérées par les " +"fonctions C :c:func:`localtime` ou :c:func:`gmtime` de la plateforme. Lève " +"une :exc:`OSError` plutôt qu'une :exc:`ValueError` en cas d'échec de :c:func:" +"`localtime` ou :c:func:`gmtime`." + +#: library/datetime.rst:923 +msgid ":meth:`fromtimestamp` may return instances with :attr:`.fold` set to 1." +msgstr "" +":meth:`fromtimestamp` peut renvoyer des instances avec l'attribut :attr:`." +"fold` à 1." + +#: library/datetime.rst:928 +msgid "" +"Return the UTC :class:`.datetime` corresponding to the POSIX timestamp, " +"with :attr:`.tzinfo` ``None``. (The resulting object is naive.)" +msgstr "" +"Renvoie la classe UTC :class:`.datetime` correspondant à l'horodatage POSIX, " +"avec :attr:`.tzinfo` ``None`` (l'objet résultant est naïf)." + +#: library/datetime.rst:931 +msgid "" +"This may raise :exc:`OverflowError`, if the timestamp is out of the range of " +"values supported by the platform C :c:func:`gmtime` function, and :exc:" +"`OSError` on :c:func:`gmtime` failure. It's common for this to be restricted " +"to years in 1970 through 2038." +msgstr "" +"Cela peut lever une :exc:`OverflowError`, si l'horodatage est en dehors de " +"l'intervalle de valeurs gérées par la fonction C :c:func:`gmtime` de la " +"plateforme, et une :exc:`OSError` en cas d'échec de :c:func:`gmtime`. Il est " +"courant d'être restreint aux années de 1970 à 2038." + +#: library/datetime.rst:936 +msgid "To get an aware :class:`.datetime` object, call :meth:`fromtimestamp`::" +msgstr "" +"Pour obtenir un objet :class:`.datetime` avisé, appelez :meth:" +"`fromtimestamp` ::" + +#: library/datetime.rst:940 +msgid "" +"On the POSIX compliant platforms, it is equivalent to the following " +"expression::" +msgstr "" +"Sur les plateformes respectant *POSIX*, cela est équivalent à l'expression " +"suivante ::" + +#: library/datetime.rst:945 +msgid "" +"except the latter formula always supports the full years range: between :" +"const:`MINYEAR` and :const:`MAXYEAR` inclusive." +msgstr "" +"excepté que la dernière formule gère l'intervalle complet des années entre :" +"const:`MINYEAR` et :const:`MAXYEAR` incluses." + +#: library/datetime.rst:950 +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 " +"UTC. As such, the recommended way to create an object representing a " +"specific timestamp in UTC is by calling ``datetime.fromtimestamp(timestamp, " +"tz=timezone.utc)``." +msgstr "" +"Parce que les objets naïfs ``datetime`` sont traités par de nombreuses " +"méthodes ``datetime`` comme des heures locales, il est préférable d'utiliser " +"les dates connues pour représenter les heures en UTC. En tant que tel, le " +"moyen recommandé pour créer un objet représentant un horodatage spécifique " +"en UTC est d'appeler ``datetime.fromtimestamp(timestamp, tz=timezone.utc)``." + +#: library/datetime.rst:956 +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:`gmtime` " +"function. Raise :exc:`OSError` instead of :exc:`ValueError` on :c:func:" +"`gmtime` failure." +msgstr "" +"Lève une :exc:`OverflowError` plutôt qu'une :exc:`ValueError` si " +"l'horodatage est en dehors de l'intervalle de valeurs gérées par la fonction " +"C :c:func:`gmtime` de la plateforme. Lève une :exc:`OSError` plutôt qu'une :" +"exc:`ValueError` en cas d'échec de :c:func:`gmtime`." + +#: library/datetime.rst:965 +msgid "" +"Return the :class:`.datetime` corresponding to the proleptic Gregorian " +"ordinal, where January 1 of year 1 has ordinal 1. :exc:`ValueError` is " +"raised unless ``1 <= ordinal <= datetime.max.toordinal()``. The hour, " +"minute, second and microsecond of the result are all 0, and :attr:`.tzinfo` " +"is ``None``." +msgstr "" +"Renvoie le :class:`.datetime` correspondant à l'ordinal du calendrier " +"grégorien proleptique, où le 1er janvier de l'an 1 a l'ordinal 1. Une :exc:" +"`ValueError` est levée à moins que ``1 <= ordinal <= datetime.max." +"toordinal()``. Les heures, minutes, secondes et microsecondes du résultat " +"valent toutes 0, et :attr:`.tzinfo` est ``None``." + +#: library/datetime.rst:973 +msgid "" +"Return a new :class:`.datetime` object whose date components are equal to " +"the given :class:`date` object's, and whose time components are equal to the " +"given :class:`.time` object's. If the *tzinfo* argument is provided, its " +"value is used to set the :attr:`.tzinfo` attribute of the result, otherwise " +"the :attr:`~.time.tzinfo` attribute of the *time* argument is used." +msgstr "" +"Renvoie un nouvel objet :class:`.datetime` dont les composants de date sont " +"égaux à ceux de l'objet :class:`date` donné, et dont les composants de temps " +"sont égaux à ceux de l'objet :class:`time` donné. Si l'argument *tzinfo* est " +"fourni, sa valeur est utilisée pour initialiser l'attribut :attr:`.tzinfo` " +"du résultat, autrement l'attribut :attr:`~.time.tzinfo` de l'argument *time* " +"est utilisé." + +#: library/datetime.rst:980 +msgid "" +"For any :class:`.datetime` object *d*, ``d == datetime.combine(d.date(), d." +"time(), d.tzinfo)``. If date is a :class:`.datetime` object, its time " +"components and :attr:`.tzinfo` attributes are ignored." +msgstr "" +"Pour tout objet :class:`.datetime` *d*`, ``d == datetime.combine(d.date(), d." +"time(), d.tzinfo)``. Si *date* est un objet :class:`.datetime`, ses " +"composants de temps et attributs :attr:`.tzinfo` sont ignorés." + +#: library/datetime.rst:985 +msgid "Added the *tzinfo* argument." +msgstr "Ajout de l'argument *tzinfo*." + +#: library/datetime.rst:991 +msgid "" +"Return a :class:`.datetime` corresponding to a *date_string* in one of the " +"formats emitted by :meth:`date.isoformat` and :meth:`datetime.isoformat`." +msgstr "" +"Renvoie une :class:`.datetime` correspondant à *date_string* dans le format " +"émis par :meth:`date.isoformat` et :meth:`datetime.isoformat`." + +#: library/datetime.rst:994 +msgid "Specifically, this function supports strings in the format:" +msgstr "" +"Plus précisément, cette fonction prend en charge les chaînes de caractères " +"dans le format :" + +#: library/datetime.rst:1000 +msgid "where ``*`` can match any single character." +msgstr "où ``*`` peut correspondre à n'importe quel caractère." + +#: library/datetime.rst:1004 +msgid "" +"This does *not* support parsing arbitrary ISO 8601 strings - it is only " +"intended as the inverse operation of :meth:`datetime.isoformat`. A more full-" +"featured ISO 8601 parser, ``dateutil.parser.isoparse`` is available in the " +"third-party package `dateutil `__." +msgstr "" +"Ceci ne prend pas en charge l'analyse arbitraire des chaînes de caractères " +"ISO 8601 - il est uniquement destiné à l'opération réciproque de :meth:" +"`datetime.isoformat`. Un analyseur ISO 8601 plus complet, ``dateutil.parser." +"isoparse`` est disponible dans le paquet tiers `dateutil `__." + +#: library/datetime.rst:1426 library/datetime.rst:1773 +msgid "Examples::" +msgstr "Exemples ::" + +#: 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 " +"with their normal default values. This is the inverse of the function :meth:" +"`datetime.isocalendar`." +msgstr "" +"Renvoie une classe :class:`.datetime` correspondant à la date du calendrier " +"ISO spécifiée par année, semaine et jour. Les composantes ne relevant pas de " +"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:1037 +msgid "" +"Return a :class:`.datetime` corresponding to *date_string*, parsed according " +"to *format*." +msgstr "" +"Renvoie une classe :class:`.datetime` correspondant à *date_string*, " +"analysée selon *format*." + +#: library/datetime.rst:1040 +msgid "This is equivalent to::" +msgstr "C’est équivalent à ::" + +#: 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. " +"For a complete list of formatting directives, see :ref:`strftime-strptime-" +"behavior`." +msgstr "" +"Une :exc:`ValueError` est levée si *date_string* et *format* ne peuvent être " +"analysés par :func:`time.strptime` ou si elle renvoie une valeur qui n'est " +"pas un *n*-uplet de temps. Pour une liste complète des directives de " +"formatage, voir :ref:`strftime-strptime-behavior`." + +#: library/datetime.rst:1055 +msgid "" +"The earliest representable :class:`.datetime`, ``datetime(MINYEAR, 1, 1, " +"tzinfo=None)``." +msgstr "" +"Le plus ancien :class:`.datetime` représentable, ``datetime(MINYEAR, 1, 1, " +"tzinfo=None)``." + +#: library/datetime.rst:1061 +msgid "" +"The latest representable :class:`.datetime`, ``datetime(MAXYEAR, 12, 31, 23, " +"59, 59, 999999, tzinfo=None)``." +msgstr "" +"Le dernier :class:`.datetime` représentable, ``datetime(MAXYEAR, 12, 31, 23, " +"59, 59, 999999, tzinfo=None)``." + +#: library/datetime.rst:1067 +msgid "" +"The smallest possible difference between non-equal :class:`.datetime` " +"objects, ``timedelta(microseconds=1)``." +msgstr "" +"La plus petite différence possible entre deux objets :class:`.datetime` non-" +"égaux, ``timedelta(microseconds=1)``." + +#: library/datetime.rst:1693 +msgid "In ``range(24)``." +msgstr "Dans ``range(24)``." + +#: library/datetime.rst:1100 library/datetime.rst:1703 +msgid "In ``range(60)``." +msgstr "Dans ``range(60)``." + +#: library/datetime.rst:1708 +msgid "In ``range(1000000)``." +msgstr "Dans ``range(1000000)``." + +#: library/datetime.rst:1110 +msgid "" +"The object passed as the *tzinfo* argument to the :class:`.datetime` " +"constructor, or ``None`` if none was passed." +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: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 " +"daylight saving time or when the UTC offset for the current zone is " +"decreased for political reasons.) The value 0 (1) represents the earlier " +"(later) of the two moments with the same wall time representation." +msgstr "" +"Dans ``[0, 1]``. Utilisé pour désambiguïser les heures dans un intervalle " +"répété. (Un intervalle répété apparaît quand l'horloge est retardée à la fin " +"de l'heure d'été ou quand le décalage horaire UTC du fuseau courant est " +"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:1129 +msgid "``datetime2 = datetime1 + timedelta``" +msgstr "``datetime2 = datetime1 + timedelta``" + +#: library/datetime.rst:2310 library/datetime.rst:2327 +#: library/datetime.rst:2392 library/datetime.rst:2401 +msgid "\\(1)" +msgstr "\\(1)" + +#: library/datetime.rst:1131 +msgid "``datetime2 = datetime1 - timedelta``" +msgstr "``datetime2 = datetime1 - timedelta``" + +#: library/datetime.rst:2343 +msgid "\\(2)" +msgstr "\\(2)" + +#: library/datetime.rst:1133 +msgid "``timedelta = datetime1 - datetime2``" +msgstr "``timedelta = datetime1 - datetime2``" + +#: library/datetime.rst:1135 +msgid "``datetime1 < datetime2``" +msgstr "``datetime1 < datetime2``" + +#: library/datetime.rst:1135 +msgid "Compares :class:`.datetime` to :class:`.datetime`. (4)" +msgstr "Compare :class:`.datetime` à :class:`.datetime`. (4)" + +#: library/datetime.rst:1140 +#, fuzzy +msgid "" +"datetime2 is a duration of timedelta removed from datetime1, moving forward " +"in time if ``timedelta.days`` > 0, or backward if ``timedelta.days`` < 0. " +"The result has the same :attr:`~.datetime.tzinfo` attribute as the input " +"datetime, and datetime2 - datetime1 == timedelta after. :exc:`OverflowError` " +"is raised if datetime2.year would be smaller than :const:`MINYEAR` or larger " +"than :const:`MAXYEAR`. Note that no time zone adjustments are done even if " +"the input is an aware object." +msgstr "" +"*datetime2* est décalé d'une durée *timedelta* par rapport à *datetime1*, en " +"avant dans le temps si ``timedelta.days > 0``, ou en arrière si ``timedelta." +"days < 0``. Le résultat a le même attribut :attr:`~.datetime.tzinfo` que le " +"*datetime* d'entrée, et *datetime2 - datetime1 == timedelta* après " +"l'opération. Une :exc:`OverflowError` est levée si *datetime2.year* devait " +"être inférieure à :const:`MINYEAR` ou supérieure à :const:`MAXYEAR`. Notez " +"qu'aucun ajustement de fuseau horaire n'est réalisé même si l'entrée est " +"avisée." + +#: 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 " +"input datetime, and no time zone adjustments are done even if the input is " +"aware." +msgstr "" +"Calcule *datetime2* tel que ``datetime2 + timedelta == datetime1``. Comme " +"pour l'addition, le résultat a le même attribut :attr:`~.datetime.tzinfo` " +"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:1154 +#, fuzzy +msgid "" +"Subtraction of a :class:`.datetime` from a :class:`.datetime` is defined " +"only if both operands are naive, or if both are aware. If one is aware and " +"the other is naive, :exc:`TypeError` is raised." +msgstr "" +"La soustraction d'un :class:`.datetime` à un autre :class:`.datetime` n'est " +"définie que si les deux opérandes sont naïfs, ou s'ils sont les deux " +"avisés. Si l'un est avisé et que l'autre est naïf, une :exc:`TypeError` est " +"levée." + +#: library/datetime.rst:1158 +#, fuzzy +msgid "" +"If both are naive, or both are aware and have the same :attr:`~.datetime." +"tzinfo` attribute, the :attr:`~.datetime.tzinfo` attributes are ignored, and " +"the result is a :class:`timedelta` object *t* such that ``datetime2 + t == " +"datetime1``. No time zone adjustments are done in this case." +msgstr "" +"Si les deux sont naïfs, ou que les deux sont avisés et ont le même attribut :" +"attr:`~.datetime.tzinfo`, les attributs :attr:`~.datetime.tzinfo` sont " +"ignorés, et le résultat est un objet :class:`timedelta` *t* tel que " +"``datetime2 + t == datetime1``. Aucun ajustement de fuseau horaire n'a lieu " +"dans ce cas." + +#: library/datetime.rst:1163 +#, fuzzy +msgid "" +"If both are aware and have different :attr:`~.datetime.tzinfo` attributes, " +"``a-b`` acts as if *a* and *b* were first converted to naive UTC datetimes " +"first. The result is ``(a.replace(tzinfo=None) - a.utcoffset()) - (b." +"replace(tzinfo=None) - b.utcoffset())`` except that the implementation never " +"overflows." +msgstr "" +"Si les deux sont avisés mais ont des attributs :attr:`~.datetime.tzinfo` " +"différents, ``a-b`` agit comme si *a* et *b* étaient premièrement convertis " +"vers des *datetimes* UTC naïfs. Le résultat est ``(a.replace(tzinfo=None) - " +"a.utcoffset()) - (b.replace(tzinfo=None) - b.utcoffset())`` à l'exception " +"que l'implémentation ne produit jamais de débordement." + +#: library/datetime.rst:1169 +msgid "" +"*datetime1* is considered less than *datetime2* when *datetime1* precedes " +"*datetime2* in time." +msgstr "" +"*datetime1* est considéré inférieur à *datetime2* quand il le précède dans " +"le temps." + +#: library/datetime.rst:1172 +#, fuzzy +msgid "" +"If one comparand is naive and the other is aware, :exc:`TypeError` is raised " +"if an order comparison is attempted. For equality comparisons, naive " +"instances are never equal to aware instances." +msgstr "" +"Si un opérande est naïf et l'autre avisé, une :exc:`TypeError` est levée si " +"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:1176 +#, fuzzy +msgid "" +"If both comparands are aware, and have the same :attr:`~.datetime.tzinfo` " +"attribute, the common :attr:`~.datetime.tzinfo` attribute is ignored and the " +"base datetimes are compared. If both comparands are aware and have " +"different :attr:`~.datetime.tzinfo` attributes, the comparands are first " +"adjusted by subtracting their UTC offsets (obtained from ``self." +"utcoffset()``)." +msgstr "" +"Si les deux opérandes sont avisés, et ont le même attribut :attr:`~.datetime." +"tzinfo`, l'attribut commun :attr:`~.datetime.tzinfo` est ignoré et les " +"*datetimes* de base sont comparés. Si les deux opérandes sont avisés et ont " +"des attributs :attr:`~.datetime.tzinfo` différents, les opérandes sont " +"premièrement ajustés en soustrayant leurs décalages UTC (obtenus depuis " +"``self.utcoffset()``)." + +#: library/datetime.rst:1182 +#, fuzzy +msgid "" +"Equality comparisons between aware and naive :class:`.datetime` instances " +"don't raise :exc:`TypeError`." +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:1188 +#, fuzzy +msgid "" +"In order to stop comparison from falling back to the default scheme of " +"comparing object addresses, datetime comparison normally raises :exc:" +"`TypeError` if the other comparand isn't also a :class:`.datetime` object. " +"However, ``NotImplemented`` is returned instead if the other comparand has " +"a :meth:`timetuple` attribute. This hook gives other kinds of date objects a " +"chance at implementing mixed-type comparison. If not, when a :class:`." +"datetime` object is compared to an object of a different type, :exc:" +"`TypeError` is raised unless the comparison is ``==`` or ``!=``. The latter " +"cases return :const:`False` or :const:`True`, respectively." +msgstr "" +"Afin d'empêcher la comparaison de retomber sur le schéma par défaut de " +"comparaison des adresses des objets, la comparaison *datetime* lève " +"normalement une :exc:`TypeError` si l'autre opérande n'est pas aussi un " +"objet :class:`.datetime`. Cependant, ``NotImplemented`` est renvoyé à la " +"place si l'autre opérande a un attribut :meth:`timetuple`. Cela permet à " +"d'autres types d'objets dates d'implémenter la comparaison entre types " +"mixtes. Sinon, quand un objet :class:`.datetime` est comparé à un objet " +"d'un type différent, une :exc:`TypeError` est levée à moins que la " +"comparaison soit ``==`` ou ``!=``. Ces derniers cas renvoient " +"respectivement :const:`False` et :const:`True`." + +#: 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:1207 +#, fuzzy +msgid "" +"Return :class:`.time` object with same hour, minute, second, microsecond and " +"fold. :attr:`.tzinfo` is ``None``. See also method :meth:`timetz`." +msgstr "" +"Renvoie un objet :class:`.time` avec les mêmes heure, minute, seconde, " +"microseconde et *fold*. :attr:`.tzinfo` est ``None``. Voir aussi la " +"méthode :meth:`timetz`." + +#: 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:1216 +#, fuzzy +msgid "" +"Return :class:`.time` object with same hour, minute, second, microsecond, " +"fold, and tzinfo attributes. See also method :meth:`time`." +msgstr "" +"Renvoie un objet :class:`.time` avec les mêmes attributs heure, minute, " +"seconde, microseconde, *fold* et *tzinfo*. Voir aussi la méthode :meth:" +"`time`." + +#: library/datetime.rst:1227 +#, fuzzy +msgid "" +"Return a datetime with the same attributes, except for those attributes " +"given new values by whichever keyword arguments are specified. Note that " +"``tzinfo=None`` can be specified to create a naive datetime from an aware " +"datetime with no conversion of date and time data." +msgstr "" +"Renvoie un *datetime* avec les mêmes attributs, exceptés ceux dont de " +"nouvelles valeurs sont données par les arguments nommés correspondant. " +"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: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 " +"*self*, but in *tz*'s local time." +msgstr "" +"Renvoie un objet :class:`.datetime` avec un nouvel attribut :attr:`.tzinfo` " +"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:1242 +#, fuzzy +msgid "" +"If provided, *tz* must be an instance of a :class:`tzinfo` subclass, and " +"its :meth:`utcoffset` and :meth:`dst` methods must not return ``None``. If " +"*self* is naive, it is presumed to represent time in the system timezone." +msgstr "" +"Si fourni, *tz* doit être une instance d'une sous-classe :class:`tzinfo`, et " +"ses méthodes :meth:`utcoffset` et :meth:`dst` ne doivent pas renvoyer " +"``None``. Si *self* est naïf, Python considère que le temps est exprimé " +"dans le fuseau horaire du système." + +#: library/datetime.rst:1246 +#, fuzzy +msgid "" +"If called without arguments (or with ``tz=None``) the system local timezone " +"is assumed for the target timezone. The ``.tzinfo`` attribute of the " +"converted datetime instance will be set to an instance of :class:`timezone` " +"with the zone name and offset obtained from the OS." +msgstr "" +"Si appelé sans arguments (ou si ``tz=None``) le fuseau horaire local du " +"système est utilisé comme fuseau horaire cible. L'attribut ``.tzinfo`` de " +"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: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 " +"in the timezone *tz*, representing the same UTC time as *self*: after " +"``astz = dt.astimezone(tz)``, ``astz - astz.utcoffset()`` will have the same " +"date and time data as ``dt - dt.utcoffset()``." +msgstr "" +"Si ``self.tzinfo`` est *tz*, ``self.astimezone(tz)`` est égal à *self* : " +"aucun ajustement de date ou d'heure n'est réalisé. Sinon le résultat est le " +"temps local dans le fuseau *tz* représentant le même temps UTC que *self* : " +"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:1257 +#, fuzzy +msgid "" +"If you merely want to attach a time zone object *tz* to a datetime *dt* " +"without adjustment of date and time data, use ``dt.replace(tzinfo=tz)``. If " +"you merely want to remove the time zone object from an aware datetime *dt* " +"without conversion of date and time data, use ``dt.replace(tzinfo=None)``." +msgstr "" +"Si vous voulez seulement associer un fuseau horaire *tz* à un *datetime* " +"*dt* sans ajustement des données de date et d'heure, utilisez ``dt." +"replace(tzinfo=tz)``. Si vous voulez seulement supprimer le fuseau horaire " +"d'un *datetime* *dt* avisé sans conversion des données de date et d'heure, " +"utilisez ``dt.replace(tzinfo=None)``." + +#: 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`. " +"Ignoring error cases, :meth:`astimezone` acts like::" +msgstr "" +"Notez que la méthode par défaut :meth:`tzinfo.fromutc` peut être redéfinie " +"dans une sous-classe :class:`tzinfo` pour affecter le résultat renvoyé par :" +"meth:`astimezone`. En ignorant les cas d'erreurs, :meth:`astimezone` se " +"comporte comme ::" + +#: library/datetime.rst:1274 +msgid "*tz* now can be omitted." +msgstr "*tz* peut maintenant être omis." + +#: library/datetime.rst:1277 +msgid "" +"The :meth:`astimezone` method can now be called on naive instances that are " +"presumed to represent system local time." +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: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 " +"``None`` or a :class:`timedelta` object with magnitude less than one day." +msgstr "" +"Si :attr:`.tzinfo` est ``None``, renvoie ``None``, sinon renvoie ``self." +"tzinfo.utcoffset(self)``, et lève une exception si l'expression précédente " +"ne renvoie pas ``None`` ou un objet :class:`timedelta` d'une magnitude " +"inférieure à un jour." + +#: 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: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`` " +"or a :class:`timedelta` object with magnitude less than one day." +msgstr "" +"Si :attr:`.tzinfo` est ``None``, renvoie ``None``, sinon renvoie ``self." +"tzinfo.dst(self)``, et lève une exception si l'expression précédente ne " +"renvoie pas ``None`` ou un objet :class:`timedelta` d'une magnitude " +"inférieure à un jour." + +#: 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: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 " +"a string object," +msgstr "" +"Si :attr:`.tzinfo` est ``None``, renvoie ``None``, sinon renvoie ``self." +"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:1319 +#, fuzzy +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. The :" +"attr:`tm_isdst` flag of the result is set according to the :meth:`dst` " +"method: :attr:`.tzinfo` is ``None`` or :meth:`dst` returns ``None``, :attr:" +"`tm_isdst` is set to ``-1``; else if :meth:`dst` returns a non-zero value, :" +"attr:`tm_isdst` is set to ``1``; else :attr:`tm_isdst` is set to ``0``." +msgstr "" +"où ``yday = d.toordinal() - date(d.year, 1, 1).toordinal() + 1`` est le " +"numéro de jour dans l'année courante commençant avec ``1`` pour le 1\\ :sup:" +"`er` janvier. L'option :attr:`tm_isdist` du résultat est attribuée selon la " +"méthode :meth:`dst` : si :attr:`.tzinfo` est ``None`` ou que :meth:`dst` " +"renvoie ``None``, :attr:`tm_isdst` est mise à ``-1`` ; sinon, si :meth:`dst` " +"renvoie une valeur non nulle, :attr:`tm_isdst` est mise à ``1`` ; sinon :" +"attr:`tm_isdst` est mise à ``0``." + +#: library/datetime.rst:1330 +#, fuzzy +msgid "" +"If :class:`.datetime` instance *d* is naive, this is the same as ``d." +"timetuple()`` except that :attr:`tm_isdst` is forced to 0 regardless of what " +"``d.dst()`` returns. DST is never in effect for a UTC time." +msgstr "" +"Si l'instance de :class:`.datetime` *d* est naïve, cela est équivalent à ``d." +"timetuple()``, excepté que :attr:`tm_isdst` est forcé à 0 sans tenir compte " +"de ce que renvoie ``d.dst()``. L'heure d'été n'est jamais effective pour un " +"temps UTC." + +#: library/datetime.rst:1334 +#, fuzzy +msgid "" +"If *d* is aware, *d* is normalized to UTC time, by subtracting ``d." +"utcoffset()``, and a :class:`time.struct_time` for the normalized time is " +"returned. :attr:`tm_isdst` is forced to 0. Note that an :exc:`OverflowError` " +"may be raised if *d*.year was ``MINYEAR`` or ``MAXYEAR`` and UTC adjustment " +"spills over a year boundary." +msgstr "" +"Si *d* est avisé, il est normalisé vers un temps UTC, en lui soustrayant ``d." +"utcoffset()``, et un :class:`time.struct_time` est renvoyé pour le temps " +"normalisé. :attr:`tm_isdst` est forcé à 0. Notez qu'une :exc:" +"`OverflowError` peut être levée si *d.year* vaut ``MINYEAR``ou ``MAXYEAR`` " +"et que l'ajustement UTC fait déborder la limite de l'année." + +#: library/datetime.rst:1343 +#, fuzzy +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 " +"UTC; as a result, using :meth:`datetime.utctimetuple` may give misleading " +"results. If you have a naive ``datetime`` representing UTC, use ``datetime." +"replace(tzinfo=timezone.utc)`` to make it aware, at which point you can use :" +"meth:`.datetime.timetuple`." +msgstr "" +"Comme les objets ``datetime`` naïfs sont traités par de nombreuses méthodes " +"``datetime`` comme des heures locales, il est préférable d'utiliser les " +"``datetime`` avisés pour représenter les heures en UTC ; par conséquent, " +"l'utilisation de ``utcfromtimetuple`` peut donner des résultats trompeurs. " +"Si vous disposez d'une ``datetime`` naïve représentant l'heure UTC, utilisez " +"``datetime.replace(tzinfo=timezone.utc)`` pour la rendre avisée, puis vous " +"pouvez utiliser :meth:`.datetime.timetuple`." + +#: library/datetime.rst:1352 +msgid "" +"Return the proleptic Gregorian ordinal of the date. The same as ``self." +"date().toordinal()``." +msgstr "" +"Renvoie l'ordinal du calendrier grégorien proleptique de cette date. " +"Identique à ``self.date().toordinal()``." + +#: 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." +"time`." +msgstr "" +"Renvoie l'horodatage *POSIX* correspondant à l'instance :class:`.datetime`. " +"La valeur renvoyée est un :class:`float` similaire à ceux renvoyés par :func:" +"`time.time`." + +#: library/datetime.rst:1361 +#, fuzzy +msgid "" +"Naive :class:`.datetime` instances are assumed to represent local time and " +"this method relies on the platform C :c:func:`mktime` function to perform " +"the conversion. Since :class:`.datetime` supports wider range of values " +"than :c:func:`mktime` on many platforms, this method may raise :exc:" +"`OverflowError` for times far in the past or far in the future." +msgstr "" +"Les instances naïves de :class:`.datetime` sont supposées représenter un " +"temps local et cette méthode se base sur la fonction C :c:func:`mktime` de " +"la plateforme pour opérer la conversion. Comme :class:`.datetime` gère un " +"intervalle de valeurs plus large que :c:func:`mktime` sur beaucoup de " +"plateformes, cette méthode peut lever une :exc:`OverflowError` pour les " +"temps trop éloignés dans le passé ou le futur." + +#: 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:1375 +msgid "" +"The :meth:`timestamp` method uses the :attr:`.fold` attribute to " +"disambiguate the times during a repeated interval." +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:1381 +#, fuzzy +msgid "" +"There is no method to obtain the POSIX timestamp directly from a naive :" +"class:`.datetime` instance representing UTC time. If your application uses " +"this convention and your system timezone is not set to UTC, you can obtain " +"the POSIX timestamp by supplying ``tzinfo=timezone.utc``::" +msgstr "" +"Il n'y a pas de méthode pour obtenir l'horodatage (*timestamp* en anglais) " +"*POSIX* directement depuis une instance :class:`.datetime` naïve " +"représentant un temps UTC. Si votre application utilise cette convention et " +"que le fuseau horaire de votre système est UTC, vous pouvez obtenir " +"l'horodatage *POSIX* en fournissant ``tzinfo=timezone.utc`` ::" + +#: library/datetime.rst:1389 +msgid "or by calculating the timestamp directly::" +msgstr "ou en calculant l'horodatage (*timestamp* en anglais) directement ::" + +#: 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`." +msgstr "" +"Renvoie le jour de la semaine sous forme de nombre, où lundi vaut 0 et " +"dimanche vaut 6. Identique à ``self.date().weekday()``. Voir aussi :meth:" +"`isoweekday`." + +#: 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:" +"`isocalendar`." +msgstr "" +"Renvoie le jour de la semaine sous forme de nombre, où lundi vaut 1 et " +"dimanche vaut 7. Identique à ``self.date().isoweekday()``. Voir aussi :meth:" +"`weekday`, :meth:`isocalendar`." + +#: library/datetime.rst:1408 +msgid "" +"Return a :term:`named tuple` with three components: ``year``, ``week`` and " +"``weekday``. The same as ``self.date().isocalendar()``." +msgstr "" +"Renvoie un :term:`n-uplet nommé` de 3 éléments : ``year``, " +"``week`` et ``weekday``. Identique à ``self.date().isocalendar()``." + +#: 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: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: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:1419 +msgid "" +"If :meth:`utcoffset` does not return ``None``, a string is appended, giving " +"the UTC offset:" +msgstr "" +"Si :meth:`utcoffset` ne renvoie pas ``None``, une chaîne est ajoutée, " +"donnant le décalage UTC :" + +#: library/datetime.rst:1422 +msgid "" +"``YYYY-MM-DDTHH:MM:SS.ffffff+HH:MM[:SS[.ffffff]]``, if :attr:`microsecond` " +"is not 0" +msgstr "" +"``YYYY-MM-DDTHH:MM:SS.ffffff+HH:MM[:SS[.ffffff]]``, si :attr:`microsecond` " +"ne vaut pas 0" + +#: 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: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::" +msgstr "" +"L'argument optionnel *sep* (par défaut ``'T'``) est un séparateur d'un " +"caractère, placé entre les portions du résultat correspondant à la date et à " +"l'heure. Par exemple ::" + +#: 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 " +"of the following:" +msgstr "" +"L'argument optionnel *timespec* spécifie le nombre de composants " +"additionnels de temps à inclure (par défaut ``'auto'``). Il peut valoir " +"l'une des valeurs suivantes :" + +#: library/datetime.rst:1813 +msgid "" +"``'auto'``: Same as ``'seconds'`` if :attr:`microsecond` is 0, same as " +"``'microseconds'`` otherwise." +msgstr "" +"``'auto'`` : Identique à ``'seconds'`` si :attr:`microsecond` vaut 0, à " +"``'microseconds'`` sinon." + +#: 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: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:1817 +msgid "" +"``'seconds'``: Include :attr:`hour`, :attr:`minute`, and :attr:`second` in " +"``HH:MM:SS`` format." +msgstr "" +"``'seconds'`` : Inclut :attr:`hour`, :attr:`minute` et :attr:`second` au " +"format ``HH:MM:SS``." + +#: library/datetime.rst:1819 +msgid "" +"``'milliseconds'``: Include full time, but truncate fractional second part " +"to milliseconds. ``HH:MM:SS.sss`` format." +msgstr "" +"``'milliseconds'`` : Inclut le temps complet, mais tronque la partie " +"fractionnaire des millisecondes, au format ``HH:MM:SS.sss``." + +#: 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:1825 +msgid "Excluded time components are truncated, not rounded." +msgstr "Les composants de temps exclus sont tronqués et non arrondis." + +#: 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:1840 +msgid "Added the *timespec* argument." +msgstr "Ajout de l'argument *timespec*." + +#: library/datetime.rst:1482 +msgid "" +"For a :class:`.datetime` instance *d*, ``str(d)`` is equivalent to ``d." +"isoformat(' ')``." +msgstr "" +"Pour une instance *d* de :class:`.datetime`, ``str(d)`` est équivalent à ``d." +"isoformat(' ')``." + +#: 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:1494 +msgid "" +"The output string will *not* include time zone information, regardless of " +"whether the input is aware or naive." +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:1501 +#, fuzzy +msgid "" +"on platforms where the native C :c:func:`ctime` function (which :func:`time." +"ctime` invokes, but which :meth:`datetime.ctime` does not invoke) conforms " +"to the C standard." +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:1507 +#, fuzzy +msgid "" +"Return a string representing the date and time, controlled by an explicit " +"format string. For a complete list of formatting directives, see :ref:" +"`strftime-strptime-behavior`." +msgstr "" +"Renvoie une chaîne représentant la date et l'heure, contrôlée par une chaîne " +"de format explicite. Pour une liste complète des directives de formatage, " +"voir :ref:`strftime-strptime-behavior`." + +#: library/datetime.rst:1514 +#, fuzzy +msgid "" +"Same as :meth:`.datetime.strftime`. This makes it possible to specify a " +"format string for a :class:`.datetime` object in :ref:`formatted string " +"literals ` and when using :meth:`str.format`. For a complete list " +"of formatting directives, see :ref:`strftime-strptime-behavior`." +msgstr "" +"Identique à :meth:`.datetime.strftime`. Cela permet de spécifier une chaîne " +"de format pour un objet :class:`.datetime` dans une :ref:`chaîne de " +"formatage littérale ` et en utilisant :meth:`str.format`. Pour " +"une liste complète des directives de formatage, voir :ref:`strftime-strptime-" +"behavior`." + +#: library/datetime.rst:1521 +msgid "Examples of Usage: :class:`.datetime`" +msgstr "Exemple d'utilisation de la classe :class:`.datetime` :" + +#: 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: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 " +"+4:30 UTC thereafter::" +msgstr "" +"L'exemple ci-dessous définit une sous-classe :class:`tzinfo` qui regroupe " +"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:1623 +msgid "Usage of ``KabulTz`` from above::" +msgstr "Utilisation de ``KabulTz`` cité plus haut ::" + +#: library/datetime.rst:1649 +msgid ":class:`.time` Objects" +msgstr "Objets :class:`.time`" + +#: library/datetime.rst:1651 +#, fuzzy +msgid "" +"A :class:`time` object represents a (local) time of day, independent of any " +"particular day, and subject to adjustment via a :class:`tzinfo` object." +msgstr "" +"Un objet :class:`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:1656 +#, fuzzy +msgid "" +"All arguments are optional. *tzinfo* may be ``None``, or an instance of a :" +"class:`tzinfo` subclass. The remaining arguments must be integers in the " +"following ranges:" +msgstr "" +"Tous les arguments sont optionnels. *tzinfo* peut être ``None`` ou une " +"instance d'une sous-classe :class:`tzinfo`. Les autres arguments doivent " +"être des nombres entiers, dans les intervalles suivants :" + +#: library/datetime.rst:1666 +#, fuzzy +msgid "" +"If an argument outside those ranges is given, :exc:`ValueError` is raised. " +"All default to ``0`` except *tzinfo*, which defaults to :const:`None`." +msgstr "" +"Si un argument est fourni en dehors de ces bornes, une :exc:`ValueError` est " +"levée. Ils valent tous ``0`` par défaut, à l'exception de *tzinfo* qui " +"vaut :const:`None`." + +#: 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: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:1684 +msgid "" +"The smallest possible difference between non-equal :class:`.time` objects, " +"``timedelta(microseconds=1)``, although note that arithmetic on :class:`." +"time` objects is not supported." +msgstr "" +"La plus petite différence possible entre deux objets :class:`.time` non-" +"égaux, ``timedelta(microseconds=1)``, notez cependant que les objets :class:" +"`.time` n'implémentent pas d'opérations arithmétiques." + +#: library/datetime.rst:1713 +msgid "" +"The object passed as the tzinfo argument to the :class:`.time` constructor, " +"or ``None`` if none was passed." +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:1727 +#, fuzzy +msgid "" +":class:`.time` objects support comparison of :class:`.time` to :class:`." +"time`, where *a* is considered less than *b* when *a* precedes *b* in time. " +"If one comparand is naive and the other is aware, :exc:`TypeError` is raised " +"if an order comparison is attempted. For equality comparisons, naive " +"instances are never equal to aware instances." +msgstr "" +"Les objets :class:`.time` gèrent la comparaison d'un :class:`.time` avec un " +"autre :class:`.time`, où *a* est considéré inférieur à *b* s'il le précède " +"dans le temps. Si un opérande est naïf et l'autre avisé, et qu'une relation " +"d'ordre est attendue, une :exc:`TypeError` est levée. Pour les égalités, les " +"instances naïves ne sont jamais égales aux instances avisées." + +#: library/datetime.rst:1733 +#, fuzzy +msgid "" +"If both comparands are aware, and have the same :attr:`~time.tzinfo` " +"attribute, the common :attr:`~time.tzinfo` attribute is ignored and the base " +"times are compared. If both comparands are aware and have different :attr:" +"`~time.tzinfo` attributes, the comparands are first adjusted by subtracting " +"their UTC offsets (obtained from ``self.utcoffset()``). In order to stop " +"mixed-type comparisons from falling back to the default comparison by object " +"address, when a :class:`.time` object is compared to an object of a " +"different type, :exc:`TypeError` is raised unless the comparison is ``==`` " +"or ``!=``. The latter cases return :const:`False` or :const:`True`, " +"respectively." +msgstr "" +"Si les deux opérandes sont avisés, et ont le même attribut :attr:`~time." +"tzinfo`, l'attribut commun :attr:`~time.tzinfo` est ignoré et les temps de " +"base sont comparés. Si les deux opérandes sont avisés et ont des attributs :" +"attr:`~time.tzinfo` différents, ils sont d'abord ajustés en leur soustrayant " +"leurs décalages UTC (obtenus à l'aide de ``self.utcoffset()``). Afin " +"d'empêcher les comparaisons de types mixtes de retomber sur la comparaison " +"par défaut par l'adresse de l'objet, quand un objet :class:`.time` est " +"comparé à un objet de type différent, une :exc:`TypeError` est levée à moins " +"que la comparaison soit ``==`` ou ``!=``. Ces derniers cas renvoient " +"respectivement :const:`False` et :const:`True`." + +#: library/datetime.rst:1743 +#, fuzzy +msgid "" +"Equality comparisons between aware and naive :class:`~datetime.time` " +"instances don't raise :exc:`TypeError`." +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: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:1749 +#, fuzzy +msgid "" +"Before Python 3.5, a :class:`.time` object was considered to be false if it " +"represented midnight in UTC. This behavior was considered obscure and error-" +"prone and has been removed in Python 3.5. See :issue:`13936` for full " +"details." +msgstr "" +"Avant Python 3.5, un objet :class:`.time` était considéré comme faux s'il " +"représentait minuit en UTC. Ce comportement était considéré comme obscur et " +"propice aux erreurs, il a été supprimé en Python 3.5. Voir :issue:`13936` " +"pour les détails complets." + +#: library/datetime.rst:1756 +msgid "Other constructor:" +msgstr "Autre constructeur :" + +#: library/datetime.rst:1760 +#, fuzzy +msgid "" +"Return a :class:`.time` corresponding to a *time_string* in one of the " +"formats emitted by :meth:`time.isoformat`. Specifically, this function " +"supports strings in the format:" +msgstr "" +"Renvoie une :class:`time` correspondant à *time_string* dans le format émis " +"par :meth:`time.isoformat`. Spécifiquement, cette fonction gère des chaînes " +"dans le format :" + +#: library/datetime.rst:1770 +#, fuzzy +msgid "" +"This does *not* support parsing arbitrary ISO 8601 strings. It is only " +"intended as the inverse operation of :meth:`time.isoformat`." +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:1791 +#, fuzzy +msgid "" +"Return a :class:`.time` with the same value, except for those attributes " +"given new values by whichever keyword arguments are specified. Note that " +"``tzinfo=None`` can be specified to create a naive :class:`.time` from an " +"aware :class:`.time`, without conversion of the time data." +msgstr "" +"Renvoie un objet :class:`.time` avec la même valeur, à l'exception des " +"attributs dont une nouvelle valeur est spécifiée par les arguments nommés. " +"Notez que ``tzinfo=None`` peut être spécifié pour créer une instance :class:" +"`.time` naïve à partir d'une instance :class:`.time` avisée, sans conversion " +"des données de temps." + +#: 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: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:1805 +msgid "``HH:MM:SS``, if :attr:`microsecond` is 0" +msgstr "``HH:MM:SS``, si :attr:`microsecond` vaut 0" + +#: library/datetime.rst:1806 +msgid "" +"``HH:MM:SS.ffffff+HH:MM[:SS[.ffffff]]``, if :meth:`utcoffset` does not " +"return ``None``" +msgstr "" +"``HH:MM:SS.ffffff+HH:MM[:SS[.ffffff]]``, si :meth:`utcoffset` ne renvoie pas " +"``None``" + +#: library/datetime.rst:1807 +msgid "" +"``HH:MM:SS+HH:MM[:SS[.ffffff]]``, if :attr:`microsecond` is 0 and :meth:" +"`utcoffset` does not return ``None``" +msgstr "" +"``HH:MM:SS+HH:MM[:SS[.ffffff]]``, si :attr:`microsecond` vaut 0 et :meth:" +"`utcoffset` ne renvoie pas ``None``" + +#: 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: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:1851 +#, fuzzy +msgid "" +"Return a string representing the time, controlled by an explicit format " +"string. For a complete list of formatting directives, see :ref:`strftime-" +"strptime-behavior`." +msgstr "" +"Renvoie une chaîne de caractères représentant l'heure, contrôlée par une " +"chaîne de formatage explicite. Pour une liste complète des directives de " +"formatage, voir :ref:`strftime-strptime-behavior`." + +#: library/datetime.rst:1858 +#, fuzzy +msgid "" +"Same as :meth:`.time.strftime`. This makes it possible to specify a format " +"string for a :class:`.time` object in :ref:`formatted string literals ` and when using :meth:`str.format`. For a complete list of " +"formatting directives, see :ref:`strftime-strptime-behavior`." +msgstr "" +"Identique à :meth:`.time.strftime`. Cela permet de spécifier une chaîne de " +"formatage pour un objet :class:`.time` dans une :ref:`chaîne de formatage " +"littérale ` et à l'utilisation de :meth:`str.format`. Pour une " +"liste complète des directives de formatage, voir :ref:`strftime-strptime-" +"behavior`." + +#: 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 " +"``None`` or a :class:`timedelta` object with magnitude less than one day." +msgstr "" +"Si :attr:`.tzinfo` est ``None``, renvoie ``None``, sinon renvoie ``self." +"tzinfo.utcoffset(None)``, et lève une exception si l'expression précédente " +"ne renvoie pas ``None`` ou un objet :class:`timedelta` d'une magnitude " +"inférieure à un jour." + +#: 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``, " +"or a :class:`timedelta` object with magnitude less than one day." +msgstr "" +"Si :attr:`.tzinfo` est ``None``, renvoie ``None``, sinon renvoie ``self." +"tzinfo.dst(None)``, et lève une exception si l'expression précédente ne " +"renvoie pas ``None`` ou un objet :class:`timedelta` d'une magnitude " +"inférieure à un jour." + +#: 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`` " +"or a string object." +msgstr "" +"Si :attr:`.tzinfo` est ``None``, renvoie ``None``, sinon renvoie ``self." +"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:1891 +msgid "Examples of Usage: :class:`.time`" +msgstr "Exemples d'utilisation de :class:`.time`" + +#: 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:1924 +msgid ":class:`tzinfo` Objects" +msgstr "Objets :class:`tzinfo`" + +#: 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 " +"information about a particular time zone." +msgstr "" +"Il s'agit d'une classe de base abstraite, ce qui signifie que cette classe " +"ne doit pas être instanciée directement. Définissez une sous-classe de :" +"class:`tzinfo` pour capturer des informations sur un fuseau horaire " +"particulier." + +#: 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 " +"objects view their attributes as being in local time, and the :class:" +"`tzinfo` object supports methods revealing offset of local time from UTC, " +"the name of the time zone, and DST offset, all relative to a date or time " +"object passed to them." +msgstr "" +"Une instance (d'une sous-classe concrète) de :class:`tzinfo` peut être " +"passée aux constructeurs des objets :class:`.datetime` et :class:`.time`. " +"Les objets en question voient leurs attributs comme étant en temps local, et " +"l'objet :class:`.tzinfo` contient des méthodes pour obtenir le décalage du " +"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:1938 +#, fuzzy +msgid "" +"You need to derive a concrete subclass, and (at least) supply " +"implementations of the standard :class:`tzinfo` methods needed by the :class:" +"`.datetime` methods you use. The :mod:`datetime` module provides :class:" +"`timezone`, a simple concrete subclass of :class:`tzinfo` which can " +"represent timezones with fixed offset from UTC such as UTC itself or North " +"American EST and EDT." +msgstr "" +"Vous devez en dériver une sous-classe concrète et (au minimum) fournir des " +"implémentations aux méthodes standard :class:`tzinfo` requises par les " +"méthodes de :class:`.datetime` que vous utilisez. Le module :mod:`datetime` " +"fournit une simple sous-classe concrète de :class:`tzinfo`, :class:" +"`timezone`, qui peut représenter des fuseaux horaires avec des décalages " +"fixes par rapport à UTC, tels qu'UTC lui-même ou les fuseaux nord-américains " +"EST et EDT." + +#: library/datetime.rst:1945 +#, fuzzy +msgid "" +"Special requirement for pickling: A :class:`tzinfo` subclass must have an :" +"meth:`__init__` method that can be called with no arguments, otherwise it " +"can be pickled but possibly not unpickled again. This is a technical " +"requirement that may be relaxed in the future." +msgstr "" +"Prérequis spécifique au *picklng* : Une sous-classe :class:`tzinfo` doit " +"avoir une méthode :meth:`__init__` qui peut être appelée sans arguments, " +"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:1950 +#, fuzzy +msgid "" +"A concrete subclass of :class:`tzinfo` may need to implement the following " +"methods. Exactly which methods are needed depends on the uses made of aware :" +"mod:`datetime` objects. If in doubt, simply implement all of them." +msgstr "" +"Une sous-classe concrète de :class:`tzinfo` peut devoir implémenter les " +"méthodes suivantes. Les méthodes réellement nécessaires dépendent de " +"l'utilisation qui est faite des objets :mod:`datetime` avisés. Dans le " +"doute, implémentez-les toutes." + +#: 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." +msgstr "" +"Renvoie le décalage de l'heure locale par rapport à UTC, sous la forme d'un " +"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:1960 +#, fuzzy +msgid "" +"This represents the *total* offset from UTC; for example, if a :class:" +"`tzinfo` object represents both time zone and DST adjustments, :meth:" +"`utcoffset` should return their sum. If the UTC offset isn't known, return " +"``None``. Else the value returned must be a :class:`timedelta` object " +"strictly between ``-timedelta(hours=24)`` and ``timedelta(hours=24)`` (the " +"magnitude of the offset must be less than one day). Most implementations of :" +"meth:`utcoffset` will probably look like one of these two::" +msgstr "" +"Cela représente le décalage *total* par rapport à UTC ; par exemple, si un " +"objet :class:`tzinfo` représente à la fois un fuseau horaire et son " +"ajustement à l'heure d'été, :meth:`utcoffset` devrait renvoyer leur somme. " +"Si le décalage UTC n'est pas connu, renvoie ``None``. Sinon, la valeur " +"renvoyée doit être un objet :class:`timedelta` compris strictement entre ``-" +"timedelta(hours=24)`` et ``timedelta(hours=24)`` (l'amplitude du décalage " +"doit être inférieure à un jour). La plupart des implémentations de :meth:" +"`utcoffset` ressembleront probablement à l'une des deux suivantes ::" + +#: library/datetime.rst:1971 +msgid "" +"If :meth:`utcoffset` does not return ``None``, :meth:`dst` should not return " +"``None`` either." +msgstr "" +"Si :meth:`utcoffset` ne renvoie pas ``None``, :meth:`dst` ne doit pas non " +"plus renvoyer ``None``." + +#: library/datetime.rst:1974 +msgid "" +"The default implementation of :meth:`utcoffset` raises :exc:" +"`NotImplementedError`." +msgstr "" +"L'implémentation par défaut de :meth:`utcoffset` lève une :exc:" +"`NotImplementedError`." + +#: 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." +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:1987 +#, fuzzy +msgid "" +"Return ``timedelta(0)`` if DST is not in effect. If DST is in effect, return " +"the offset as a :class:`timedelta` object (see :meth:`utcoffset` for " +"details). Note that DST offset, if applicable, has already been added to the " +"UTC offset returned by :meth:`utcoffset`, so there's no need to consult :" +"meth:`dst` unless you're interested in obtaining DST info separately. For " +"example, :meth:`datetime.timetuple` calls its :attr:`~.datetime.tzinfo` " +"attribute's :meth:`dst` method to determine how the :attr:`tm_isdst` flag " +"should be set, and :meth:`tzinfo.fromutc` calls :meth:`dst` to account for " +"DST changes when crossing time zones." +msgstr "" +"Renvoie ``timedelta(0)`` si l'heure d'été n'est pas effective. Si elle est " +"effective, renvoie un décalage sous forme d'un objet :class:`timedelta` " +"(voir :meth:`utcoffset` pour les détails). Notez que ce décalage, si " +"applicable, est déjà compris dans le décalage UTC renvoyé par :meth:" +"`utcoffset`, il n'est donc pas nécessaire de faire appel à :meth:`dst` à " +"moins que vous ne souhaitiez obtenir les informations séparément. Par " +"exemple, :meth:`datetime.timetuple` appelle la méthode :meth:`dst` de son " +"attribut :attr:`~.datetime.tzinfo` pour déterminer si l'option :attr:" +"`tm_isdst` doit être activée, et :meth:`tzinfo.fromutc` fait appel à :meth:" +"`dst` pour tenir compte des heures d'été quand elle traverse des fuseaux " +"horaires." + +#: 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:" +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:2000 +msgid "``tz.utcoffset(dt) - tz.dst(dt)``" +msgstr "``tz.utcoffset(dt) - tz.dst(dt)``" + +#: library/datetime.rst:2002 +#, fuzzy +msgid "" +"must return the same result for every :class:`.datetime` *dt* with ``dt." +"tzinfo == tz`` For sane :class:`tzinfo` subclasses, this expression yields " +"the time zone's \"standard offset\", which should not depend on the date or " +"the time, but only on geographic location. The implementation of :meth:" +"`datetime.astimezone` relies on this, but cannot detect violations; it's the " +"programmer's responsibility to ensure it. If a :class:`tzinfo` subclass " +"cannot guarantee this, it may be able to override the default implementation " +"of :meth:`tzinfo.fromutc` to work correctly with :meth:`astimezone` " +"regardless." +msgstr "" +"doit renvoyer le même résultat pour tout objet :class:`.datetime` *dt* avec " +"``dt.tzinfo == tz`` Pour les sous-classes saines de :class:`tzinfo`, cette " +"expression calcule le « décalage standard » du fuseau horaire, qui ne doit " +"pas dépendre de la date ou de l'heure, mais seulement de la position " +"géographique. L'implémentation de :meth:`datetime.astimezone` se base là-" +"dessus, mais ne peut pas détecter les violations ; il est de la " +"responsabilité du programmeur de l'assurer. Si une sous-classe :class:" +"`tzinfo` ne le garantit pas, il doit être possible de redéfinir " +"l'implémentation par défaut de :meth:`tzinfo.fromutc` pour tout de même " +"fonctionner correctement avec :meth:`astimezone`." + +#: library/datetime.rst:2011 +msgid "" +"Most implementations of :meth:`dst` will probably look like one of these " +"two::" +msgstr "" +"La plupart des implémentations de :meth:`dst` ressembleront probablement à " +"l'une des deux suivantes ::" + +#: library/datetime.rst:2017 +msgid "or::" +msgstr "ou ::" + +#: 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:2037 +#, fuzzy +msgid "" +"Return the time zone name corresponding to the :class:`.datetime` object " +"*dt*, as a string. Nothing about string names is defined by the :mod:" +"`datetime` module, and there's no requirement that it mean anything in " +"particular. For example, \"GMT\", \"UTC\", \"-500\", \"-5:00\", \"EDT\", " +"\"US/Eastern\", \"America/New York\" are all valid replies. Return ``None`` " +"if a string name isn't known. Note that this is a method rather than a fixed " +"string primarily because some :class:`tzinfo` subclasses will wish to return " +"different names depending on the specific value of *dt* passed, especially " +"if the :class:`tzinfo` class is accounting for daylight time." +msgstr "" +"Renvoie le nom du fuseau horaire correspondant à l'objet :class:`.datetime` " +"*dt*, sous forme d'une chaîne de caractères. Rien n'est défini sur les noms " +"par le module :mod:`datetime`, et il n'est pas nécessaire que ces noms " +"signifient quelque chose en particulier. Par exemple, « *GMT* », « *UTC* », " +"« *-500* », « *-5:00* », « *EDT* », « *US/Eastern* » et « *America/New " +"York* » sont toutes des valeurs de retour valides. Renvoie ``None`` si un " +"nom est inconnu. Notez qu'il s'agit d'une méthode et non d'une chaîne fixée " +"en amont, parce que les sous-classes de :class:`tzinfo` peuvent souhaiter " +"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:2047 +msgid "" +"The default implementation of :meth:`tzname` raises :exc:" +"`NotImplementedError`." +msgstr "" +"L'implémentation par défaut de :meth:`tzname` lève une :exc:" +"`NotImplementedError`." + +#: library/datetime.rst:2050 +#, fuzzy +msgid "" +"These methods are called by a :class:`.datetime` or :class:`.time` object, " +"in response to their methods of the same names. A :class:`.datetime` object " +"passes itself as the argument, and a :class:`.time` object passes ``None`` " +"as the argument. A :class:`tzinfo` subclass's methods should therefore be " +"prepared to accept a *dt* argument of ``None``, or of class :class:`." +"datetime`." +msgstr "" +"Ces méthodes sont appelées par les objets :class:`.datetime` et :class:`." +"time`, en réponse à leurs méthodes aux mêmes noms. Un objet :class:`." +"datetime` se passe lui-même en tant qu'argument, et un objet :class:`.time` " +"passe ``None``. Les méthodes des sous-classes :class:`tzinfo` doivent alors " +"être prêtes à recevoir un argument ``None`` pour *dt*, ou une instance de :" +"class:`.datetime`." + +#: library/datetime.rst:2056 +#, fuzzy +msgid "" +"When ``None`` is passed, it's up to the class designer to decide the best " +"response. For example, returning ``None`` is appropriate if the class wishes " +"to say that time objects don't participate in the :class:`tzinfo` protocols. " +"It may be more useful for ``utcoffset(None)`` to return the standard UTC " +"offset, as there is no other convention for discovering the standard offset." +msgstr "" +"Quand ``None`` est passé, il est de la responsabilité du *designer* de la " +"classe de choisir la meilleure réponse. Par exemple, renvoyer ``None`` est " +"approprié si la classe souhaite signaler que les objets de temps ne " +"participent pas au protocole :class:`tzinfo`. Il peut être plus utile pour " +"``utcoffset(None)`` de renvoyer le décalage UTC standard, comme il n'existe " +"aucune autre convention pour obtenir ce décalage." + +#: library/datetime.rst:2062 +#, fuzzy +msgid "" +"When a :class:`.datetime` object is passed in response to a :class:`." +"datetime` method, ``dt.tzinfo`` is the same object as *self*. :class:" +"`tzinfo` methods can rely on this, unless user code calls :class:`tzinfo` " +"methods directly. The intent is that the :class:`tzinfo` methods interpret " +"*dt* as being in local time, and not need worry about objects in other " +"timezones." +msgstr "" +"Quand un objet :class:`.datetime` est passé en réponse à une méthode de :" +"class:`.datetime`, ``dt.tzinfo`` est le même objet que *self*. Les méthodes " +"de :class:`tzinfo` peuvent se baser là-dessus, à moins que le code " +"utilisateur appelle directement des méthodes de :class:`tzinfo`. L'intention " +"est que les méthodes de :class:`tzinfo` interprètent *dt* comme étant le " +"temps local, et n'aient pas à se soucier des objets dans d'autres fuseaux " +"horaires." + +#: library/datetime.rst:2068 +msgid "" +"There is one more :class:`tzinfo` method that a subclass may wish to " +"override:" +msgstr "" +"Il y a une dernière méthode de :class:`tzinfo` que les sous-classes peuvent " +"vouloir redéfinir :" + +#: library/datetime.rst:2073 +#, fuzzy +msgid "" +"This is called from the default :class:`datetime.astimezone()` " +"implementation. When called from that, ``dt.tzinfo`` is *self*, and *dt*'s " +"date and time data are to be viewed as expressing a UTC time. The purpose " +"of :meth:`fromutc` is to adjust the date and time data, returning an " +"equivalent datetime in *self*'s local time." +msgstr "" +"Elle est appelée par l'implémentation par défaut de :class:`datetime." +"astimezone()`. Lors d'un appel depuis cette méthode, ``dt.tzinfo`` vaut " +"*self* et les données de date et d'heure de *dt* sont vues comme exprimant " +"un horodatage UTC. Le rôle de :meth:`fromutc` est d'ajuster les données de " +"date et d'heure, renvoyant un objet *datetime* équivalent à *self*, dans le " +"temps local." + +#: library/datetime.rst:2079 +#, fuzzy +msgid "" +"Most :class:`tzinfo` subclasses should be able to inherit the default :meth:" +"`fromutc` implementation without problems. It's strong enough to handle " +"fixed-offset time zones, and time zones accounting for both standard and " +"daylight time, and the latter even if the DST transition times differ in " +"different years. An example of a time zone the default :meth:`fromutc` " +"implementation may not handle correctly in all cases is one where the " +"standard offset (from UTC) depends on the specific date and time passed, " +"which can happen for political reasons. The default implementations of :meth:" +"`astimezone` and :meth:`fromutc` may not produce the result you want if the " +"result is one of the hours straddling the moment the standard offset changes." +msgstr "" +"La plupart des sous-classes :class:`tzinfo` doivent être en mesure d'hériter " +"sans problème de l'implémentation par défaut de :meth:`fromutc`. Elle est " +"suffisamment robuste pour gérer les fuseaux horaires à décalage fixe, et les " +"fuseaux représentant à la fois des heures standards et d'été, et ce même si " +"le décalage de l'heure d'été est différent suivant les années. Un exemple de " +"fuseau horaire qui ne serait pas géré correctement dans tous les cas par " +"l'implémentation par défaut de :meth:`fromutc` en est un où le décalage " +"standard (par rapport à UTC) dépend de valeurs spécifiques de date et " +"d'heure passées, ce qui peut arriver pour des raisons politiques. Les " +"implémentations par défaut de :meth:`astimezone` et :meth:`fromutc` peuvent " +"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:2090 +msgid "" +"Skipping code for error cases, the default :meth:`fromutc` implementation " +"acts like::" +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:2108 +msgid "" +"In the following :download:`tzinfo_examples.py <../includes/tzinfo_examples." +"py>` file there are some examples of :class:`tzinfo` classes:" +msgstr "" +"Dans le fichier :download:`tzinfo_examples.py <../includes/tzinfo_examples." +"py>` il y a des exemples de :class:`tzinfo` classes:" + +#: library/datetime.rst:2114 +#, fuzzy +msgid "" +"Note that there are unavoidable subtleties twice per year in a :class:" +"`tzinfo` subclass accounting for both standard and daylight time, at the DST " +"transition points. For concreteness, consider US Eastern (UTC -0500), where " +"EDT begins the minute after 1:59 (EST) on the second Sunday in March, and " +"ends the minute after 1:59 (EDT) on the first Sunday in November::" +msgstr "" +"Notez que, deux fois par an, on rencontre des subtilités inévitables dans " +"les sous-classes de :class:`tzinfo` représentant à la fois des heures " +"standard et d'été, au passage de l'une à l'autre. Concrètement, considérez " +"le fuseau de l'est des États-Unis (UTC -0500), où EDT (heure d'été) débute à " +"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:2128 +#, fuzzy +msgid "" +"When DST starts (the \"start\" line), the local wall clock leaps from 1:59 " +"to 3:00. A wall time of the form 2:MM doesn't really make sense on that day, " +"so ``astimezone(Eastern)`` won't deliver a result with ``hour == 2`` on the " +"day DST begins. For example, at the Spring forward transition of 2016, we " +"get::" +msgstr "" +"Quand l'heure d'été débute (la ligne « *start* »), l'horloge locale passe de " +"1:59 à 3:00. Une heure de la forme 2:MM n'a pas vraiment de sens ce jour là, " +"donc ``astimezone(Eastern)`` ne fournira pas de résultat avec ``hour == 2`` " +"pour le jour où débute l'heure d'été. Par exemple, lors du changement " +"d'heure du printemps 2016, nous obtenons ::" + +#: library/datetime.rst:2147 +#, fuzzy +msgid "" +"When DST ends (the \"end\" line), there's a potentially worse problem: " +"there's an hour that can't be spelled unambiguously in local wall time: the " +"last hour of daylight time. In Eastern, that's times of the form 5:MM UTC on " +"the day daylight time ends. The local wall clock leaps from 1:59 (daylight " +"time) back to 1:00 (standard time) again. Local times of the form 1:MM are " +"ambiguous. :meth:`astimezone` mimics the local clock's behavior by mapping " +"two adjacent UTC hours into the same local hour then. In the Eastern " +"example, UTC times of the form 5:MM and 6:MM both map to 1:MM when converted " +"to Eastern, but earlier times have the :attr:`~datetime.fold` attribute set " +"to 0 and the later times have it set to 1. For example, at the Fall back " +"transition of 2016, we get::" +msgstr "" +"Quand l'heure d'été se termine (la ligne « *end* »), il y a potentiellement " +"un problème pire que cela : il y a une heure qui ne peut pas être exprimée " +"sans ambiguïté en temps local : la dernière heure de l'heure d'été. Dans " +"l'est des États-Unis, l'heure d'été se termine sur les heures de la forme 5:" +"MM UTC. L'horloge locale passe de 1:59 (heure d'été) à 1:00 (heure d'hiver) " +"à nouveau. Les heures locales de la forme 1:MM sont ambiguës. :meth:" +"`astimezone` imite le comportement des horloges locales en associant deux " +"heures UTC adjacentes à la même heure locale. Dans notre exemple, les " +"horodatages UTC de la forme 5:MM et 6:MM sont tous deux associés à 1:MM " +"quand ils sont convertis vers ce fuseau, mais les horodatages les plus " +"anciens ont l'attribut :attr:`~datetime.fold` à 0 et les plus récents l'ont " +"à 1. Par exemple, lors du changement d'heure de l'automne 2016, nous " +"obtenons ::" + +#: library/datetime.rst:2169 +#, fuzzy +msgid "" +"Note that the :class:`.datetime` instances that differ only by the value of " +"the :attr:`~datetime.fold` attribute are considered equal in comparisons." +msgstr "" +"Notez que deux instances :class:`datetime` qui ne diffèrent que par la " +"valeur de leur attribut :attr:`~datetime.fold` sont considérées égales dans " +"les comparaisons." + +#: 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 :" +"class:`tzinfo` subclasses; there are no ambiguities when using :class:" +"`timezone`, or any other fixed-offset :class:`tzinfo` subclass (such as a " +"class representing only EST (fixed offset -5 hours), or only EDT (fixed " +"offset -4 hours))." +msgstr "" +"Les applications qui ne peuvent pas gérer ces ambiguïtés doivent vérifier " +"explicitement la valeur de l'attribut :attr:`~datetime.fold` ou éviter " +"d'utiliser des sous-classes :class:`tzinfo` hybrides ; il n'y a aucune " +"ambiguïté lors de l'utilisation de la classe :class:`timezone`, ou toute " +"autre sous-classe de :class:`tzinfo` à décalage fixe (comme une classe " +"représentant uniquement le fuseau EST (de décalage fixe *-5h*) ou uniquement " +"EDT (*-4h*))." + +#: library/datetime.rst:2186 +msgid ":mod:`zoneinfo`" +msgstr ":mod:`zoneinfo`" + +#: library/datetime.rst:2181 +#, fuzzy +msgid "" +"The :mod:`datetime` module has a basic :class:`timezone` class (for handling " +"arbitrary fixed offsets from UTC) and its :attr:`timezone.utc` attribute (a " +"UTC timezone instance)." +msgstr "" +"Le module :mod:`datetime` contient une classe élémentaire :class:`timezone` " +"pour gérer des décalages fixes par rapport à UTC et :attr:`timezone.utc` " +"comme instance du fuseau horaire UTC." + +#: library/datetime.rst:2185 +#, fuzzy +msgid "" +"``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:2192 +msgid "`IANA timezone database `_" +msgstr "" +"`Base de données des fuseaux horaires de l'IANA `_" + +#: 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 " +"locations around the globe. It is updated periodically to reflect changes " +"made by political bodies to time zone boundaries, UTC offsets, and daylight-" +"saving rules." +msgstr "" +"La *Time Zone Database* (souvent appelée *tz*, *tzdata* ou *zoneinfo*) " +"contient les codes et les données représentant l'historique du temps local " +"pour un grand nombre d'emplacements représentatifs autour du globe. Elle est " +"mise à jour périodiquement, pour refléter les changements opérés par des " +"politiques sur les bornes du fuseau, les décalages UTC, et les règles de " +"passage à l'heure d'été." + +#: library/datetime.rst:2199 +msgid ":class:`timezone` Objects" +msgstr "Objets :class:`timezone`" + +#: 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." +msgstr "" +"La classe :class:`timezone` est une sous-classe de :class:`tzinfo`, dont " +"chaque instance représente un fuseau horaire défini par un décalage fixe par " +"rapport à UTC." + +#: library/datetime.rst:2205 +#, fuzzy +msgid "" +"Objects of this class cannot be used to represent timezone information in " +"the locations where different offsets are used in different days of the year " +"or where historical changes have been made to civil time." +msgstr "" +"Les objets de cette classe ne peuvent pas être utilisés pour représenter les " +"informations de fuseaux horaires dans des emplacements où plusieurs " +"décalages sont utilisés au cours de l'année ni où le déroulement du temps " +"civil a fait l'objet d'ajustements." + +#: library/datetime.rst:2212 +#, fuzzy +msgid "" +"The *offset* argument must be specified as a :class:`timedelta` object " +"representing the difference between the local time and UTC. It must be " +"strictly between ``-timedelta(hours=24)`` and ``timedelta(hours=24)``, " +"otherwise :exc:`ValueError` is raised." +msgstr "" +"L'argument *offset* doit être spécifié comme un objet :class:`timedelta` " +"représentant la différence entre le temps local et UTC. Il doit être " +"strictement compris entre ``-timedelta(hours=24)`` et " +"``timedelta(hours=24)``, autrement une :exc:`ValueError` est levée." + +#: library/datetime.rst:2217 +#, fuzzy +msgid "" +"The *name* argument is optional. If specified it must be a string that will " +"be used as the value returned by the :meth:`datetime.tzname` method." +msgstr "" +"L'argument *name* est optionnel. S'il est spécifié, il doit être une chaîne " +"de caractères qui sera utilisée comme valeur de retour de la méthode :meth:" +"`datetime.tzname`." + +#: library/datetime.rst:2239 +msgid "" +"Return the fixed value specified when the :class:`timezone` instance is " +"constructed." +msgstr "" +"Renvoie la valeur fixe spécifiée lorsque l'instance :class:`timezone` est " +"construite." + +#: library/datetime.rst:2231 +#, fuzzy +msgid "" +"The *dt* argument is ignored. The return value is a :class:`timedelta` " +"instance equal to the difference between the local time and UTC." +msgstr "" +"L'argument *dt* est ignoré. La valeur de retour est une instance :class:" +"`timedelta` égale à la différence entre le temps local et UTC." + +#: library/datetime.rst:2242 +#, fuzzy +msgid "" +"If *name* is not provided in the constructor, the name returned by " +"``tzname(dt)`` is generated from the value of the ``offset`` as follows. If " +"*offset* is ``timedelta(0)``, the name is \"UTC\", otherwise it is a string " +"in the format ``UTC±HH:MM``, where ± is the sign of ``offset``, HH and MM " +"are two digits of ``offset.hours`` and ``offset.minutes`` respectively." +msgstr "" +"Si *name* n'est pas fourni au constructeur, le nom renvoyé par " +"``tzname(dt)`` est généré comme suit à partir de la valeur de ``offset``. " +"Si *offset* vaut ``timedelta(0)``, le nom sera « UTC », autrement le nom " +"sera une chaîne de la forme ``UTC±HH:MM``, où ± est le signe d'``offset``, " +"et HH et MM sont respectivement les représentations à deux chiffres de " +"``offset.hours`` et ``offset.minutes``." + +#: library/datetime.rst:2248 +#, fuzzy +msgid "" +"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:2255 +msgid "Always returns ``None``." +msgstr "Renvoie toujours ``None``." + +#: library/datetime.rst:2259 +msgid "" +"Return ``dt + offset``. The *dt* argument must be an aware :class:`." +"datetime` instance, with ``tzinfo`` set to ``self``." +msgstr "" +"Renvoie ``dt + offset``. L'argument *dt* doit être une instance avisée de :" +"class:`.datetime`, avec ``tzinfo`` valant ``self``." + +#: library/datetime.rst:2266 +msgid "The UTC timezone, ``timezone(timedelta(0))``." +msgstr "Le fuseau horaire UTC, ``timezone(timedelta(0))``." + +#: library/datetime.rst:2275 +msgid ":meth:`strftime` and :meth:`strptime` Behavior" +msgstr "Comportement de :meth:`strftime` et :meth:`strptime`" + +#: library/datetime.rst:2277 +#, fuzzy +msgid "" +":class:`date`, :class:`.datetime`, and :class:`.time` objects all support a " +"``strftime(format)`` method, to create a string representing the time under " +"the control of an explicit format string." +msgstr "" +"Les objets :class:`date`, :class:`.datetime` et :class:`.time` comportent " +"tous une méthode ``strftime(format)``, pour créer une représentation du " +"temps sous forme d'une chaîne de caractères, contrôlée par une chaîne de " +"formatage explicite." + +#: 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 " +"corresponding format string." +msgstr "" +"Inversement, la méthode de classe :meth:`datetime.strptime` crée un objet :" +"class:`.datetime` à partir d'une chaîne représentant une date et une heure, " +"et une chaîne de format correspondante." + +#: library/datetime.rst:2285 +msgid "" +"The table below provides a high-level comparison of :meth:`strftime` versus :" +"meth:`strptime`:" +msgstr "" +"Le tableau ci-dessous fournit une comparaison de haut niveau entre :meth:" +"`strftime` et :meth:`strptime` :" + +#: library/datetime.rst:2289 +msgid "``strftime``" +msgstr "``strftime``" + +#: library/datetime.rst:2289 +msgid "``strptime``" +msgstr "``strptime``" + +#: library/datetime.rst:2291 +msgid "Usage" +msgstr "Utilisation" + +#: 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: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:2293 +msgid "Type of method" +msgstr "Type de méthode" + +#: library/datetime.rst:2293 +msgid "Instance method" +msgstr "Méthode d'instance" + +#: library/datetime.rst:2293 +msgid "Class method" +msgstr "Méthode de classe" + +#: library/datetime.rst:2295 +msgid "Method of" +msgstr "Méthode de" + +#: library/datetime.rst:2295 +msgid ":class:`date`; :class:`.datetime`; :class:`.time`" +msgstr ":class:`date` ; :class:`.datetime` ; :class:`.time`" + +#: library/datetime.rst:2295 +msgid ":class:`.datetime`" +msgstr ":class:`.datetime`" + +#: library/datetime.rst:2297 +msgid "Signature" +msgstr "Signature" + +#: library/datetime.rst:2297 +msgid "``strftime(format)``" +msgstr "``strftime(format)``" + +#: library/datetime.rst:2297 +msgid "``strptime(date_string, format)``" +msgstr "``strptime(date_string, format)``" + +#: 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: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." +msgstr "" +"La liste suivante est la liste de tous les codes de formatage requis par le " +"standard C (version 1989), ils fonctionnent sur toutes les plateformes " +"possédant une implémentation de C standard." + +#: library/datetime.rst:2411 +msgid "Directive" +msgstr "Directive" + +#: library/datetime.rst:2411 +msgid "Meaning" +msgstr "Signification" + +#: library/datetime.rst:2411 +msgid "Example" +msgstr "Exemple" + +#: library/datetime.rst:2411 +msgid "Notes" +msgstr "Notes" + +#: library/datetime.rst:2310 +msgid "``%a``" +msgstr "``%a``" + +#: library/datetime.rst:2310 +msgid "Weekday as locale's abbreviated name." +msgstr "Jour de la semaine abrégé dans la langue locale." + +#: library/datetime.rst:0 +msgid "Sun, Mon, ..., Sat (en_US);" +msgstr "Sun, Mon, ..., Sat (en_US);" + +#: library/datetime.rst:0 +msgid "So, Mo, ..., Sa (de_DE)" +msgstr "Lu, Ma, ..., Di (*fr_FR*)" + +#: library/datetime.rst:2315 +msgid "``%A``" +msgstr "``%A``" + +#: library/datetime.rst:2315 +msgid "Weekday as locale's full name." +msgstr "Jour de la semaine complet dans la langue locale." + +#: library/datetime.rst:0 +msgid "Sunday, Monday, ..., Saturday (en_US);" +msgstr "*Sunday*, *Monday*, ..., *Saturday* (*en_US*);" + +#: library/datetime.rst:0 +msgid "Sonntag, Montag, ..., Samstag (de_DE)" +msgstr "Lundi, Mardi, ..., Dimanche (*fr_FR*)" + +#: library/datetime.rst:2320 +msgid "``%w``" +msgstr "``%w``" + +#: 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:2320 +msgid "0, 1, ..., 6" +msgstr "0, 1, ..., 6" + +#: library/datetime.rst:2324 +msgid "``%d``" +msgstr "``%d``" + +#: 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:2324 +msgid "01, 02, ..., 31" +msgstr "01, 02, ..., 31" + +#: library/datetime.rst:2337 library/datetime.rst:2346 +#: library/datetime.rst:2355 library/datetime.rst:2373 +msgid "\\(9)" +msgstr "\\(9)" + +#: library/datetime.rst:2327 +msgid "``%b``" +msgstr "``%b``" + +#: library/datetime.rst:2327 +msgid "Month as locale's abbreviated name." +msgstr "Nom du mois abrégé dans la langue locale." + +#: library/datetime.rst:0 +msgid "Jan, Feb, ..., Dec (en_US);" +msgstr "Jan, Feb, ..., Dec (*en_US*);" + +#: library/datetime.rst:0 +msgid "Jan, Feb, ..., Dez (de_DE)" +msgstr "janv., févr., ..., déc. (*fr_FR*)" + +#: library/datetime.rst:2332 +msgid "``%B``" +msgstr "``%B``" + +#: library/datetime.rst:2332 +msgid "Month as locale's full name." +msgstr "Nom complet du mois dans la langue locale." + +#: library/datetime.rst:0 +msgid "January, February, ..., December (en_US);" +msgstr "*January*, *February*, ..., *December* (*en_US*);" + +#: library/datetime.rst:0 +msgid "Januar, Februar, ..., Dezember (de_DE)" +msgstr "janvier, février, ..., décembre (*fr_FR*)" + +#: library/datetime.rst:2337 +msgid "``%m``" +msgstr "``%m``" + +#: library/datetime.rst:2337 +msgid "Month as a zero-padded decimal number." +msgstr "Numéro du mois sur deux chiffres." + +#: library/datetime.rst:2349 +msgid "01, 02, ..., 12" +msgstr "01, 02, ..., 12" + +#: library/datetime.rst:2340 +msgid "``%y``" +msgstr "``%y``" + +#: 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:2340 +msgid "00, 01, ..., 99" +msgstr "00, 01, ..., 99" + +#: library/datetime.rst:2343 +msgid "``%Y``" +msgstr "``%Y``" + +#: library/datetime.rst:2343 +msgid "Year with century as a decimal number." +msgstr "Année complète sur quatre chiffres." + +#: library/datetime.rst:2413 +msgid "0001, 0002, ..., 2013, 2014, ..., 9998, 9999" +msgstr "0001, 0002, ..., 2013, 2014, ..., 9998, 9999" + +#: library/datetime.rst:2346 +msgid "``%H``" +msgstr "``%H``" + +#: 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:2346 +msgid "00, 01, ..., 23" +msgstr "00, 01, ..., 23" + +#: library/datetime.rst:2349 +msgid "``%I``" +msgstr "``%I``" + +#: 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:2352 +msgid "``%p``" +msgstr "``%p``" + +#: library/datetime.rst:2352 +msgid "Locale's equivalent of either AM or PM." +msgstr "Équivalent local à AM/PM." + +#: library/datetime.rst:0 +msgid "AM, PM (en_US);" +msgstr "AM, PM (en_US);" + +#: library/datetime.rst:0 +msgid "am, pm (de_DE)" +msgstr "am, pm (de_DE)" + +#: library/datetime.rst:2352 +msgid "\\(1), \\(3)" +msgstr "\\(1), \\(3)" + +#: library/datetime.rst:2355 +msgid "``%M``" +msgstr "``%M``" + +#: library/datetime.rst:2355 +msgid "Minute as a zero-padded decimal number." +msgstr "Minutes sur deux chiffres." + +#: library/datetime.rst:2358 +msgid "00, 01, ..., 59" +msgstr "00, 01, ..., 59" + +#: library/datetime.rst:2358 +msgid "``%S``" +msgstr "``%S``" + +#: library/datetime.rst:2358 +msgid "Second as a zero-padded decimal number." +msgstr "Secondes sur deux chiffres." + +#: library/datetime.rst:2358 +msgid "\\(4), \\(9)" +msgstr "\\(4), \\(9)" + +#: library/datetime.rst:2361 +msgid "``%f``" +msgstr "``%f``" + +#: library/datetime.rst:2361 +#, fuzzy +msgid "Microsecond as a decimal number, zero-padded to 6 digits." +msgstr "Microsecondes sur 6 chiffres." + +#: library/datetime.rst:2361 +msgid "000000, 000001, ..., 999999" +msgstr "000000, 000001, ..., 999999" + +#: library/datetime.rst:2361 +msgid "\\(5)" +msgstr "\\(5)" + +#: library/datetime.rst:2529 +msgid "``%z``" +msgstr "``%z``" + +#: library/datetime.rst:2365 +msgid "" +"UTC offset in the form ``±HHMM[SS[.ffffff]]`` (empty string if the object is " +"naive)." +msgstr "" +"Décalage horaire UTC sous la forme ``±HHMM[SS[.ffffff]]`` (chaîne vide si " +"l'instance est naïve)." + +#: library/datetime.rst:2365 +msgid "(empty), +0000, -0400, +1030, +063415, -030712.345216" +msgstr "(vide), +0000, -0400, +1030, +063415, -030712.345216" + +#: library/datetime.rst:2370 +msgid "\\(6)" +msgstr "\\(6)" + +#: library/datetime.rst:2553 +msgid "``%Z``" +msgstr "``%Z``" + +#: 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:2370 +msgid "(empty), UTC, GMT" +msgstr "(vide), UTC, GMT" + +#: library/datetime.rst:2373 +msgid "``%j``" +msgstr "``%j``" + +#: 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:2373 +msgid "001, 002, ..., 366" +msgstr "001, 002, ..., 366" + +#: library/datetime.rst:2376 +msgid "``%U``" +msgstr "``%U``" + +#: library/datetime.rst:2376 +#, fuzzy +msgid "" +"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 "" +"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 " +"dimanche sont considérés comme appartenant à la semaine 0." + +#: library/datetime.rst:2384 +msgid "00, 01, ..., 53" +msgstr "00, 01, ..., 53" + +#: library/datetime.rst:2384 +msgid "\\(7), \\(9)" +msgstr "\\(7), \\(9)" + +#: library/datetime.rst:2384 +msgid "``%W``" +msgstr "``%W``" + +#: library/datetime.rst:2384 +#, fuzzy +msgid "" +"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ù dimanche est considéré comme le " +"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:2392 +msgid "``%c``" +msgstr "``%c``" + +#: library/datetime.rst:2392 +msgid "Locale's appropriate date and time representation." +msgstr "Représentation locale de la date et de l'heure." + +#: library/datetime.rst:0 +msgid "Tue Aug 16 21:30:00 1988 (en_US);" +msgstr "Tue Aug 16 21:30:00 1988 (*en_US*);" + +#: library/datetime.rst:0 +msgid "Di 16 Aug 21:30:00 1988 (de_DE)" +msgstr "mar. 16 août 1988 21:30:00 (*fr_FR*)" + +#: library/datetime.rst:2397 +msgid "``%x``" +msgstr "``%x``" + +#: library/datetime.rst:2397 +msgid "Locale's appropriate date representation." +msgstr "Représentation locale de la date." + +#: library/datetime.rst:0 +msgid "08/16/88 (None);" +msgstr "08/16/88 (None);" + +#: library/datetime.rst:0 +msgid "08/16/1988 (en_US);" +msgstr "08/16/1988 (*en_US*);" + +#: library/datetime.rst:0 +msgid "16.08.1988 (de_DE)" +msgstr "16/08/1988 (*fr_FR*)" + +#: library/datetime.rst:2401 +msgid "``%X``" +msgstr "``%X``" + +#: library/datetime.rst:2401 +msgid "Locale's appropriate time representation." +msgstr "Représentation locale de l'heure." + +#: library/datetime.rst:0 +msgid "21:30:00 (en_US);" +msgstr "21:30:00 (*en_US*) ;" + +#: library/datetime.rst:0 +msgid "21:30:00 (de_DE)" +msgstr "21:30:00 (*fr_FR*)" + +#: library/datetime.rst:2404 +msgid "``%%``" +msgstr "``%%``" + +#: library/datetime.rst:2404 +msgid "A literal ``'%'`` character." +msgstr "Un caractère ``'%'`` littéral." + +#: library/datetime.rst:2404 +msgid "%" +msgstr "%" + +#: 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." +msgstr "" +"Plusieurs directives supplémentaires non requises par la norme C89 sont " +"incluses pour des raisons de commodité. Ces paramètres correspondent tous " +"aux valeurs de date de la norme ISO 8601." + +#: library/datetime.rst:2413 +msgid "``%G``" +msgstr "``%G``" + +#: library/datetime.rst:2413 +msgid "" +"ISO 8601 year with century representing the year that contains the greater " +"part of the ISO week (``%V``)." +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:2413 +msgid "\\(8)" +msgstr "\\(8)" + +#: library/datetime.rst:2418 +msgid "``%u``" +msgstr "``%u``" + +#: 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:2418 +msgid "1, 2, ..., 7" +msgstr "1, 2, ..., 7" + +#: library/datetime.rst:2421 +msgid "``%V``" +msgstr "``%V``" + +#: 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." +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:2421 +msgid "01, 02, ..., 53" +msgstr "01, 02, ..., 53" + +#: library/datetime.rst:2421 +msgid "\\(8), \\(9)" +msgstr "\\(8), \\(9)" + +#: library/datetime.rst:2428 +#, fuzzy +msgid "" +"These may not be available on all platforms when used with the :meth:" +"`strftime` method. The ISO 8601 year and ISO 8601 week directives are not " +"interchangeable with the year and week number directives above. Calling :" +"meth:`strptime` with incomplete or ambiguous ISO 8601 directives will raise " +"a :exc:`ValueError`." +msgstr "" +"Elles peuvent ne pas être disponibles sur toutes les plateformes quand elles " +"sont utilisées avec la méthode :meth:`strftime`. Les directives ISO 8601 " +"d'année et de semaine ne sont pas interchangeables avec les 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: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. 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 " +"bibliothèque C de la plateforme, et les variations sont courantes. Pour voir " +"un ensemble complet des codes de formatage implémentés par votre plateforme, " +"consultez la documentation de :manpage:`strftime(3)`." + +#: library/datetime.rst:2439 +msgid "``%G``, ``%u`` and ``%V`` were added." +msgstr "``%G``, ``%u`` et ``%V`` ont été ajoutés." + +#: library/datetime.rst:2443 +msgid "Technical Detail" +msgstr "Détail technique" + +#: library/datetime.rst:2445 +#, fuzzy +msgid "" +"Broadly speaking, ``d.strftime(fmt)`` acts like the :mod:`time` module's " +"``time.strftime(fmt, d.timetuple())`` although not all objects support a :" +"meth:`timetuple` method." +msgstr "" +"Grossièrement, ``d.strftime(fmt)`` se comporte comme 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: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 " +"string will be pulled from the default value. [#]_" +msgstr "" +"Pour la méthode :meth:`datetime.strptime`, la valeur par défaut est " +"``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:2453 +msgid "Using ``datetime.strptime(date_string, format)`` is equivalent to::" +msgstr "" +"L'utilisation de ``datetime.strptime(date_string, format)`` équivaut à ::" + +#: 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 " +"by ``time.strptime``." +msgstr "" +"sauf lorsque le format inclut des composantes de sous-secondes ou des " +"informations de décalage de fuseau horaire, qui sont prises en charge dans " +"``datetime.strptime`` mais pas par ``time.strptime``." + +#: library/datetime.rst:2461 +#, fuzzy +msgid "" +"For :class:`.time` objects, the format codes for year, month, and day should " +"not be used, as :class:`time` objects have no such values. If they're used " +"anyway, ``1900`` is substituted for the year, and ``1`` for the month and " +"day." +msgstr "" +"Pour les objets :class:`.time`, les codes de formatage pour l'année, le mois " +"et le jour ne devraient pas être utilisés, puisque les objets :class:`time` " +"ne possèdent pas de telles valeurs. S'ils sont tout de même utilisés, " +"``1900`` est utilisé pour l'année, et ``1`` pour le mois et le jour." + +#: library/datetime.rst:2465 +#, fuzzy +msgid "" +"For :class:`date` objects, the format codes for hours, minutes, seconds, and " +"microseconds should not be used, as :class:`date` objects have no such " +"values. If they're used anyway, ``0`` is substituted for them." +msgstr "" +"Pour les objets :class:`date`, les codes de formatage pour les heures, " +"minutes, secondes et microsecondes ne devraient pas être utilisés, puisque " +"les objets :class:`date` ne possèdent pas de telles valeurs. S'ils sont tout " +"de même utilisés, la valeur ``0`` est utilisée." + +#: 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 " +"also platform-dependent. On some platforms such code points are preserved " +"intact in the output, while on others ``strftime`` may raise :exc:" +"`UnicodeError` or return an empty string instead." +msgstr "" +"Pour la même raison, la gestion des chaînes contenant des caractères (ou " +"points) Unicode qui ne peuvent pas être représentés dans la *locale* " +"actuelle dépend aussi de la plateforme. Sur certaines plateformes, ces " +"caractères sont conservés tels quels dans la sortie, alors que sur d'autres " +"plateformes ``strftime`` lève une :exc:`UnicodeError` ou renvoie une chaîne " +"vide." + +#: 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 " +"example, \"month/day/year\" versus \"day/month/year\"), and the output may " +"contain Unicode characters encoded using the locale's default encoding (for " +"example, if the current locale is ``ja_JP``, the default encoding could be " +"any one of ``eucJP``, ``SJIS``, or ``utf-8``; use :meth:`locale.getlocale` " +"to determine the current locale's encoding)." +msgstr "" +"Comme le format dépend de la locale courante, les assomptions sur la valeur " +"de retour doivent être prises soigneusement. L'ordre des champs variera (par " +"exemple, « mois/jour/année » versus « année/mois/jour »), et le retour " +"pourrait contenir des caractères Unicode encodés en utilisant l'encodage par " +"défaut de la locale (par exemple, si la locale courante est ``ja_JP``, " +"l'encodage par défaut pourrait être ``eucJP``, ``SJIS`` ou ``utf-8`` ; " +"utilisez :meth:`locale.getlocale` pour déterminer l'encodage de la locale " +"courante)." + +#: 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." +msgstr "" +"La méthode :meth:`strptime` peut analyser toutes les années de l'intervalle " +"[1, 9999], mais toutes les années < 1000 doivent être représentées sur " +"quatre chiffres." + +#: library/datetime.rst:2490 +msgid "" +"In previous versions, :meth:`strftime` method was restricted to years >= " +"1900." +msgstr "" +"Dans les versions précédentes, la méthode :meth:`strftime` était limitée aux " +"années >= 1900." + +#: 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: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 " +"hour." +msgstr "" +"Quand utilisée avec la méthode :meth:`strptime`, la directive ``%p`` " +"n'affecte l'heure extraite que si la directive ``%I`` est utilisée pour " +"analyser l'heure." + +#: library/datetime.rst:2503 +msgid "" +"Unlike the :mod:`time` module, the :mod:`datetime` module does not support " +"leap seconds." +msgstr "" +"À l'inverse du module :mod:`time`, le module :mod:`datetime` ne gère pas les " +"secondes intercalaires." + +#: library/datetime.rst:2507 +#, fuzzy +msgid "" +"When used with the :meth:`strptime` method, the ``%f`` directive accepts " +"from one to six digits and zero pads on the right. ``%f`` is an extension to " +"the set of format characters in the C standard (but implemented separately " +"in datetime objects, and therefore always available)." +msgstr "" +"Quand elle est utilisée avec la méthode :meth:`strptime`, la directive " +"``%f`` accepte un nombre de 1 à 6 chiffres, où des zéros seront ajoutés à " +"droite. ``%f`` est une extension de l'ensemble des 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:2514 +msgid "" +"For a naive object, the ``%z`` and ``%Z`` format codes are replaced by empty " +"strings." +msgstr "" +"Pour les objets naïfs, les codes de formatage ``%z`` et ``%Z`` sont " +"remplacés par des chaînes vides." + +#: library/datetime.rst:2517 +msgid "For an aware object:" +msgstr "Pour un objet avisé :" + +#: library/datetime.rst:2520 +#, fuzzy +msgid "" +":meth:`utcoffset` is transformed into a string of the form ``±HHMM[SS[." +"ffffff]]``, where ``HH`` is a 2-digit string giving the number of UTC offset " +"hours, ``MM`` is a 2-digit string giving the number of UTC offset minutes, " +"``SS`` is a 2-digit string giving the number of UTC offset seconds and " +"``ffffff`` is a 6-digit string giving the number of UTC offset microseconds. " +"The ``ffffff`` part is omitted when the offset is a whole number of seconds " +"and both the ``ffffff`` and the ``SS`` part is omitted when the offset is a " +"whole number of minutes. For example, if :meth:`utcoffset` returns " +"``timedelta(hours=-3, minutes=-30)``, ``%z`` is replaced with the string " +"``'-0330'``." +msgstr "" +"Le résultat de :meth:`utcoffset` est transformé en une chaîne sous la forme " +"``±HHMM[SS[.uuuuuu]]``, où ``HH`` est une chaîne de deux chiffres donnant le " +"nombre d'heures du décalage UTC, où ``MM`` est une chaîne de deux chiffres " +"donnant le nombre de minutes du décalage UTC, où ``SS`` est une chaîne de " +"deux chiffres donnant le nombre de secondes du décalage UTC et où ``ffffff`` " +"est une chaîne de six chiffres donnant le nombre en micro-secondes du " +"décalage UTC. La partie ``ffffff`` est omise lorsque le décalage est un " +"nombre entier de secondes et les parties ``ffffff`` et ``SS`` sont omises " +"lorsque le décalage est un nombre entier de minutes. Par exemple, si :meth:" +"`utcoffset` renvoie ``timedelta(hours=-3, minutes=-30)``, ``%z`` est " +"remplacé par la chaîne `'-0330'``." + +#: 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 " +"seconds. For example, ``'+01:00:00'`` will be parsed as an offset of one " +"hour. In addition, providing ``'Z'`` is identical to ``'+00:00'``." +msgstr "" +"Quand la directive ``%z`` est soumise à la méthode :meth:`strptime`, le " +"décalage UTC peut avoir une colonne comme séparateur entre les heures, " +"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:2542 +#, fuzzy +msgid "" +"In :meth:`strftime`, ``%Z`` is replaced by an empty string if :meth:`tzname` " +"returns ``None``; otherwise ``%Z`` is replaced by the returned value, which " +"must be a string." +msgstr "" +"Si :meth:`tzname` renvoie ``None``, ``%Z`` est remplacé par une chaîne vide " +"dans :meth:`strftime`. Autrement ``%Z`` est remplacé par la valeur renvoyée, " +"qui doit être une chaîne." + +#: 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: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:2549 +msgid "the hard-coded values ``UTC`` and ``GMT``" +msgstr "les valeurs ``UTC`` et ``GMT`` codés en dur" + +#: 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 " +"values." +msgstr "" +"Ainsi, quelqu'un qui vit au Japon peut avoir comme valeurs valides ``JST``, " +"``UTC`` et ``GMT``, mais probablement pas ``EST``. Les valeurs invalides " +"lèvent ``ValueError``." + +#: library/datetime.rst:2555 +#, fuzzy +msgid "" +"When the ``%z`` directive is provided to the :meth:`strptime` method, an " +"aware :class:`.datetime` object will be produced. The ``tzinfo`` of the " +"result will be set to a :class:`timezone` instance." +msgstr "" +"Quand la directive ``%z`` est fournie à la méthode :meth:`strptime`, un " +"objet :class:`.datetime` avisé est construit. L'attribut ``tzinfo`` du " +"résultat aura pour valeur une instance de :class:`timezone`." + +#: 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 " +"specified." +msgstr "" +"Quand ces directives sont utilisées avec la méthode :meth:`strptime`, ``%U`` " +"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: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:" +"`strptime` format string. Also note that ``%G`` and ``%Y`` are not " +"interchangeable." +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." + +#: library/datetime.rst:2572 +#, fuzzy +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." + +#: library/datetime.rst:2577 +msgid "Footnotes" +msgstr "Notes" + +#: 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:2580 +#, fuzzy +msgid "" +"This matches the definition of the \"proleptic Gregorian\" calendar in " +"Dershowitz and Reingold's book *Calendrical Calculations*, where it's the " +"base calendar for all computations. See the book for algorithms for " +"converting between proleptic Gregorian ordinals and many other calendar " +"systems." +msgstr "" +"Cela correspond à la définition du calendrier « grégorien proleptique » dans " +"le livre *Calendrical Calculations* de Dershowitz et Reingold, où il est la " +"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:2586 +#, fuzzy +msgid "" +"See R. H. van Gent's `guide to the mathematics of the ISO 8601 calendar " +"`_ for a good explanation." +msgstr "" +"Voir R. H. van Gent `guide des mathématiques du calendrier ISO 8601 `_ pour une bonne " +"explication." + +#: library/datetime.rst:2590 +msgid "" +"Passing ``datetime.strptime('Feb 29', '%b %d')`` will fail since ``1900`` is " +"not a leap year." +msgstr "" +"Passer ``datetime.strptime(‘Feb 29’, ‘%b %d’)`` ne marchera pas car ``1900`` " +"n’est pas une année bissextile." + +#~ 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 "`dateutil.tz `_" +#~ msgstr "`dateutil.tz `_" + +#~ 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, " +#~ "jour de la semaine ISO)." diff --git a/library/dbm.po b/library/dbm.po new file mode 100644 index 0000000000..fe713f37bf --- /dev/null +++ b/library/dbm.po @@ -0,0 +1,441 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-04-05 10:05+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \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" + +#: library/dbm.rst:2 +msgid ":mod:`dbm` --- Interfaces to Unix \"databases\"" +msgstr "" + +#: library/dbm.rst:7 +#, fuzzy +msgid "**Source code:** :source:`Lib/dbm/__init__.py`" +msgstr "**Source code:** :source:`Lib/html/__init__.py`" + +#: library/dbm.rst:11 +msgid "" +":mod:`dbm` is a generic interface to variants of the DBM database --- :mod:" +"`dbm.gnu` or :mod:`dbm.ndbm`. If none of these modules is installed, the " +"slow-but-simple implementation in module :mod:`dbm.dumb` will be used. " +"There is a `third party interface `_ to the Oracle Berkeley DB." +msgstr "" + +#: library/dbm.rst:20 +msgid "" +"A tuple containing the exceptions that can be raised by each of the " +"supported modules, with a unique exception also named :exc:`dbm.error` as " +"the first item --- the latter is used when :exc:`dbm.error` is raised." +msgstr "" + +#: library/dbm.rst:27 +msgid "" +"This function attempts to guess which of the several simple database modules " +"available --- :mod:`dbm.gnu`, :mod:`dbm.ndbm` or :mod:`dbm.dumb` --- should " +"be used to open a given file." +msgstr "" + +#: library/dbm.rst:31 +msgid "" +"Returns one of the following values: ``None`` if the file can't be opened " +"because it's unreadable or doesn't exist; the empty string (``''``) if the " +"file's format can't be guessed; or a string containing the required module " +"name, such as ``'dbm.ndbm'`` or ``'dbm.gnu'``." +msgstr "" + +#: library/dbm.rst:39 +msgid "Open the database file *file* and return a corresponding object." +msgstr "" + +#: library/dbm.rst:41 +msgid "" +"If the database file already exists, the :func:`whichdb` function is used to " +"determine its type and the appropriate module is used; if it does not exist, " +"the first module listed above that can be imported is used." +msgstr "" + +#: library/dbm.rst:161 library/dbm.rst:346 +msgid "The optional *flag* argument can be:" +msgstr "" + +#: library/dbm.rst:164 library/dbm.rst:279 library/dbm.rst:349 +msgid "Value" +msgstr "Valeur" + +#: library/dbm.rst:164 library/dbm.rst:279 library/dbm.rst:349 +msgid "Meaning" +msgstr "Signification" + +#: library/dbm.rst:166 library/dbm.rst:351 +msgid "``'r'``" +msgstr "``'r'``" + +#: library/dbm.rst:166 library/dbm.rst:351 +msgid "Open existing database for reading only (default)" +msgstr "" + +#: library/dbm.rst:169 library/dbm.rst:354 +msgid "``'w'``" +msgstr "``'w'``" + +#: library/dbm.rst:169 library/dbm.rst:354 +msgid "Open existing database for reading and writing" +msgstr "" + +#: library/dbm.rst:172 library/dbm.rst:357 +msgid "``'c'``" +msgstr "``'c'``" + +#: library/dbm.rst:172 library/dbm.rst:357 +msgid "Open database for reading and writing, creating it if it doesn't exist" +msgstr "" + +#: library/dbm.rst:175 library/dbm.rst:360 +msgid "``'n'``" +msgstr "``'n'``" + +#: library/dbm.rst:175 library/dbm.rst:360 +msgid "Always create a new, empty database, open for reading and writing" +msgstr "" + +#: library/dbm.rst:294 library/dbm.rst:364 +msgid "" +"The optional *mode* argument is the Unix mode of the file, used only when " +"the database has to be created. It defaults to octal ``0o666`` (and will be " +"modified by the prevailing umask)." +msgstr "" + +#: library/dbm.rst:68 +msgid "" +"The object returned by :func:`.open` supports the same basic functionality " +"as dictionaries; keys and their corresponding values can be stored, " +"retrieved, and deleted, and the :keyword:`in` operator and the :meth:`keys` " +"method are available, as well as :meth:`get` and :meth:`setdefault`." +msgstr "" + +#: library/dbm.rst:73 +msgid "" +":meth:`get` and :meth:`setdefault` are now available in all database modules." +msgstr "" + +#: library/dbm.rst:76 +msgid "" +"Deleting a key from a read-only database raises database module specific " +"error instead of :exc:`KeyError`." +msgstr "" + +#: library/dbm.rst:80 +msgid "" +"Key and values are always stored as bytes. This means that when strings are " +"used they are implicitly converted to the default encoding before being " +"stored." +msgstr "" + +#: library/dbm.rst:84 +msgid "" +"These objects also support being used in a :keyword:`with` statement, which " +"will automatically close them when done." +msgstr "" + +#: library/dbm.rst:87 +msgid "" +"Added native support for the context management protocol to the objects " +"returned by :func:`.open`." +msgstr "" + +#: library/dbm.rst:91 +msgid "" +"The following example records some hostnames and a corresponding title, and " +"then prints out the contents of the database::" +msgstr "" + +#: library/dbm.rst:121 +msgid "Module :mod:`shelve`" +msgstr "Module :mod:`shelve`" + +#: library/dbm.rst:122 +msgid "Persistence module which stores non-string data." +msgstr "" + +#: library/dbm.rst:125 +msgid "The individual submodules are described in the following sections." +msgstr "" + +#: library/dbm.rst:129 +msgid ":mod:`dbm.gnu` --- GNU's reinterpretation of dbm" +msgstr "" + +#: library/dbm.rst:135 +#, fuzzy +msgid "**Source code:** :source:`Lib/dbm/gnu.py`" +msgstr "**Code source :** :source:`Lib/bdb.py`" + +#: library/dbm.rst:139 +msgid "" +"This module is quite similar to the :mod:`dbm` module, but uses the GNU " +"library ``gdbm`` instead to provide some additional functionality. Please " +"note that the file formats created by :mod:`dbm.gnu` and :mod:`dbm.ndbm` are " +"incompatible." +msgstr "" + +#: library/dbm.rst:143 +msgid "" +"The :mod:`dbm.gnu` module provides an interface to the GNU DBM library. " +"``dbm.gnu.gdbm`` objects behave like mappings (dictionaries), except that " +"keys and values are always converted to bytes before storing. Printing a " +"``gdbm`` object doesn't print the keys and values, and the :meth:`items` " +"and :meth:`values` methods are not supported." +msgstr "" + +#: library/dbm.rst:152 +msgid "" +"Raised on :mod:`dbm.gnu`-specific errors, such as I/O errors. :exc:" +"`KeyError` is raised for general mapping errors like specifying an incorrect " +"key." +msgstr "" + +#: library/dbm.rst:158 +msgid "" +"Open a ``gdbm`` database and return a :class:`gdbm` object. The *filename* " +"argument is the name of the database file." +msgstr "" + +#: library/dbm.rst:179 +msgid "" +"The following additional characters may be appended to the flag to control " +"how the database is opened:" +msgstr "" + +#: library/dbm.rst:185 +msgid "``'f'``" +msgstr "``'f'``" + +#: library/dbm.rst:185 +msgid "" +"Open the database in fast mode. Writes to the database will not be " +"synchronized." +msgstr "" + +#: library/dbm.rst:188 +msgid "``'s'``" +msgstr "``'s'``" + +#: library/dbm.rst:188 +msgid "" +"Synchronized mode. This will cause changes to the database to be immediately " +"written to the file." +msgstr "" + +#: library/dbm.rst:192 +msgid "``'u'``" +msgstr "``'u'``" + +#: library/dbm.rst:192 +msgid "Do not lock database." +msgstr "" + +#: library/dbm.rst:195 +msgid "" +"Not all flags are valid for all versions of ``gdbm``. The module constant :" +"const:`open_flags` is a string of supported flag characters. The exception :" +"exc:`error` is raised if an invalid flag is specified." +msgstr "" + +#: library/dbm.rst:199 +msgid "" +"The optional *mode* argument is the Unix mode of the file, used only when " +"the database has to be created. It defaults to octal ``0o666``." +msgstr "" + +#: library/dbm.rst:202 +msgid "" +"In addition to the dictionary-like methods, ``gdbm`` objects have the " +"following methods:" +msgstr "" + +#: library/dbm.rst:207 +msgid "" +"It's possible to loop over every key in the database using this method and " +"the :meth:`nextkey` method. The traversal is ordered by ``gdbm``'s internal " +"hash values, and won't be sorted by the key values. This method returns the " +"starting key." +msgstr "" + +#: library/dbm.rst:214 +msgid "" +"Returns the key that follows *key* in the traversal. The following code " +"prints every key in the database ``db``, without having to create a list in " +"memory that contains them all::" +msgstr "" + +#: library/dbm.rst:225 +msgid "" +"If you have carried out a lot of deletions and would like to shrink the " +"space used by the ``gdbm`` file, this routine will reorganize the database. " +"``gdbm`` objects will not shorten the length of a database file except by " +"using this reorganization; otherwise, deleted file space will be kept and " +"reused as new (key, value) pairs are added." +msgstr "" + +#: library/dbm.rst:233 +msgid "" +"When the database has been opened in fast mode, this method forces any " +"unwritten data to be written to the disk." +msgstr "" + +#: library/dbm.rst:238 +msgid "Close the ``gdbm`` database." +msgstr "" + +#: library/dbm.rst:241 +msgid ":mod:`dbm.ndbm` --- Interface based on ndbm" +msgstr "" + +#: library/dbm.rst:247 +#, fuzzy +msgid "**Source code:** :source:`Lib/dbm/ndbm.py`" +msgstr "**Code source :** :source:`Lib/bdb.py`" + +#: library/dbm.rst:251 +msgid "" +"The :mod:`dbm.ndbm` module provides an interface to the Unix \"(n)dbm\" " +"library. Dbm objects behave like mappings (dictionaries), except that keys " +"and values are always stored as bytes. Printing a ``dbm`` object doesn't " +"print the keys and values, and the :meth:`items` and :meth:`values` methods " +"are not supported." +msgstr "" + +#: library/dbm.rst:256 +msgid "" +"This module can be used with the \"classic\" ndbm interface or the GNU GDBM " +"compatibility interface. On Unix, the :program:`configure` script will " +"attempt to locate the appropriate header file to simplify building this " +"module." +msgstr "" + +#: library/dbm.rst:262 +msgid "" +"Raised on :mod:`dbm.ndbm`-specific errors, such as I/O errors. :exc:" +"`KeyError` is raised for general mapping errors like specifying an incorrect " +"key." +msgstr "" + +#: library/dbm.rst:268 +msgid "Name of the ``ndbm`` implementation library used." +msgstr "" + +#: library/dbm.rst:273 +msgid "" +"Open a dbm database and return a ``ndbm`` object. The *filename* argument " +"is the name of the database file (without the :file:`.dir` or :file:`.pag` " +"extensions)." +msgstr "" + +#: library/dbm.rst:276 +msgid "The optional *flag* argument must be one of these values:" +msgstr "" + +#: library/dbm.rst:298 +msgid "" +"In addition to the dictionary-like methods, ``ndbm`` objects provide the " +"following method:" +msgstr "" + +#: library/dbm.rst:303 +msgid "Close the ``ndbm`` database." +msgstr "" + +#: library/dbm.rst:307 +msgid ":mod:`dbm.dumb` --- Portable DBM implementation" +msgstr "" + +#: library/dbm.rst:312 +#, fuzzy +msgid "**Source code:** :source:`Lib/dbm/dumb.py`" +msgstr "**Code source :** :source:`Lib/bdb.py`" + +#: library/dbm.rst:318 +msgid "" +"The :mod:`dbm.dumb` module is intended as a last resort fallback for the :" +"mod:`dbm` module when a more robust module is not available. The :mod:`dbm." +"dumb` module is not written for speed and is not nearly as heavily used as " +"the other database modules." +msgstr "" + +#: library/dbm.rst:325 +msgid "" +"The :mod:`dbm.dumb` module provides a persistent dictionary-like interface " +"which is written entirely in Python. Unlike other modules such as :mod:`dbm." +"gnu` no external library is required. As with other persistent mappings, " +"the keys and values are always stored as bytes." +msgstr "" + +#: library/dbm.rst:330 +msgid "The module defines the following:" +msgstr "Le module définit :" + +#: library/dbm.rst:335 +msgid "" +"Raised on :mod:`dbm.dumb`-specific errors, such as I/O errors. :exc:" +"`KeyError` is raised for general mapping errors like specifying an incorrect " +"key." +msgstr "" + +#: library/dbm.rst:341 +msgid "" +"Open a ``dumbdbm`` database and return a dumbdbm object. The *filename* " +"argument is the basename of the database file (without any specific " +"extensions). When a dumbdbm database is created, files with :file:`.dat` " +"and :file:`.dir` extensions are created." +msgstr "" + +#: library/dbm.rst:369 +#, fuzzy +msgid "" +"It is possible to crash the Python interpreter when loading a database with " +"a sufficiently large/complex entry due to stack depth limitations in " +"Python's AST compiler." +msgstr "" +"Il est possible de faire planter l'interpréteur Python avec des chaînes " +"suffisamment grandes ou complexes lors de la compilation d'un objet AST dû à " +"la limitation de la profondeur de la pile d'appels." + +#: library/dbm.rst:373 +msgid "" +":func:`.open` always creates a new database when the flag has the value " +"``'n'``." +msgstr "" + +#: library/dbm.rst:377 +msgid "" +"A database opened with flags ``'r'`` is now read-only. Opening with flags " +"``'r'`` and ``'w'`` no longer creates a database if it does not exist." +msgstr "" + +#: library/dbm.rst:382 +msgid "" +"In addition to the methods provided by the :class:`collections.abc." +"MutableMapping` class, :class:`dumbdbm` objects provide the following " +"methods:" +msgstr "" + +#: library/dbm.rst:388 +msgid "" +"Synchronize the on-disk directory and data files. This method is called by " +"the :meth:`Shelve.sync` method." +msgstr "" + +#: library/dbm.rst:393 +msgid "Close the ``dumbdbm`` database." +msgstr "" diff --git a/library/debug.po b/library/debug.po new file mode 100644 index 0000000000..fdfd80d7b4 --- /dev/null +++ b/library/debug.po @@ -0,0 +1,38 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +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-10-31 11:32+0100\n" +"Last-Translator: Cléo Buck \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" + +#: library/debug.rst:3 +msgid "Debugging and Profiling" +msgstr "Débogueur et instrumentation" + +#: library/debug.rst:5 +msgid "" +"These libraries help you with Python development: the debugger enables you " +"to step through code, analyze stack frames and set breakpoints etc., and the " +"profilers run code and give you a detailed breakdown of execution times, " +"allowing you to identify bottlenecks in your programs. Auditing events " +"provide visibility into runtime behaviors that would otherwise require " +"intrusive debugging or patching." +msgstr "" +"Ces bibliothèques sont là pour vous aider lors du développement en Python : " +"Le débogueur vous permet d'avancer pas à pas dans le code, d'analyser la " +"pile d'appel, de placer des points d'arrêts, … Les outils d'instrumentation " +"exécutent du code et vous donnent un rapport détaillé du temps d'exécution, " +"vous permettant d'identifier les goulots d'étranglement dans vos programmes. " +"Les événements d'audit fournissent une visibilité sur les comportements " +"d'exécution qui nécessiteraient autrement un débogage ou une correction " +"intrusifs." diff --git a/library/decimal.po b/library/decimal.po new file mode 100644 index 0000000000..b668163885 --- /dev/null +++ b/library/decimal.po @@ -0,0 +1,2274 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-22 22:57+0100\n" +"PO-Revision-Date: 2022-10-18 15:52+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.4.1\n" + +#: library/decimal.rst:2 +msgid ":mod:`decimal` --- Decimal fixed point and floating point arithmetic" +msgstr ":mod:`decimal` — Arithmétique décimale en virgule fixe et flottante" + +#: library/decimal.rst:15 +msgid "**Source code:** :source:`Lib/decimal.py`" +msgstr "**Code source :** :source:`Lib/decimal.py`" + +#: library/decimal.rst:33 +#, fuzzy +msgid "" +"The :mod:`decimal` module provides support for fast correctly rounded " +"decimal floating point arithmetic. It offers several advantages over the :" +"class:`float` datatype:" +msgstr "" +"Le module :mod:`decimal` fournit une arithmétique en virgule flottante " +"rapide et produisant des arrondis mathématiquement corrects. Il possède " +"plusieurs avantages en comparaison au type :class:`float` :" + +#: library/decimal.rst:37 +msgid "" +"Decimal \"is based on a floating-point model which was designed with people " +"in mind, and necessarily has a paramount guiding principle -- computers must " +"provide an arithmetic that works in the same way as the arithmetic that " +"people learn at school.\" -- excerpt from the decimal arithmetic " +"specification." +msgstr "" +"Le module ``decimal`` « est basé sur un modèle en virgule flottante conçu " +"pour les humains, qui suit ce principe directeur : l'ordinateur doit fournir " +"un modèle de calcul qui fonctionne de la même manière que le calcul qu'on " +"apprend à l'école » -- extrait (traduit) de la spécification de " +"l'arithmétique décimale." + +#: library/decimal.rst:42 +#, fuzzy +msgid "" +"Decimal numbers can be represented exactly. In contrast, numbers like " +"``1.1`` and ``2.2`` do not have exact representations in binary floating " +"point. End users typically would not expect ``1.1 + 2.2`` to display as " +"``3.3000000000000003`` as it does with binary floating point." +msgstr "" +"Les nombres décimaux peuvent être représentés exactement en base décimale " +"flottante. En revanche, des nombres tels que :const:`1.1` ou :const:`1.2` " +"n'ont pas de représentation exacte en base binaire flottante. L'utilisateur " +"final ne s'attend typiquement pas à obtenir :const:`3.3000000000000003` " +"lorsqu'il saisit ``1.1 + 2.2``, ce qui se passe en arithmétique binaire à " +"virgule flottante." + +#: library/decimal.rst:47 +#, fuzzy +msgid "" +"The exactness carries over into arithmetic. In decimal floating point, " +"``0.1 + 0.1 + 0.1 - 0.3`` is exactly equal to zero. In binary floating " +"point, the result is ``5.5511151231257827e-017``. While near to zero, the " +"differences prevent reliable equality testing and differences can " +"accumulate. For this reason, decimal is preferred in accounting applications " +"which have strict equality invariants." +msgstr "" +"Ces inexactitudes ont des conséquences en arithmétique. En base décimale à " +"virgule flottante, ``0.1 + 0.1 + 0.1 - 0.3`` est exactement égal à zéro. En " +"virgule flottante binaire, l'ordinateur l'évalue à :const:" +"`5.5511151231257827e-017`. Bien que très proche de zéro, cette différence " +"induit des erreurs lors des tests d'égalité, erreurs qui peuvent " +"s'accumuler. Pour ces raisons ``decimal`` est le module utilisé pour des " +"applications comptables ayant des contraintes strictes de fiabilité." + +#: library/decimal.rst:54 +#, fuzzy +msgid "" +"The decimal module incorporates a notion of significant places so that " +"``1.30 + 1.20`` is ``2.50``. The trailing zero is kept to indicate " +"significance. This is the customary presentation for monetary applications. " +"For multiplication, the \"schoolbook\" approach uses all the figures in the " +"multiplicands. For instance, ``1.3 * 1.2`` gives ``1.56`` while ``1.30 * " +"1.20`` gives ``1.5600``." +msgstr "" +"Le module ``decimal`` incorpore la notion de chiffres significatifs, tels " +"que ``1.30 + 1.20`` est égal à :const:`2.50`. Le dernier zéro n'est conservé " +"que pour respecter le nombre de chiffres significatifs. C'est également " +"l'affichage préféré pour représenter des sommes d'argent. Pour la " +"multiplication, l'approche « scolaire » utilise tout les chiffres présents " +"dans les facteurs. Par exemple, ``1.3 * 1.2`` donnerait :const:`1.56` tandis " +"que ``1.30 * 1.20`` donnerait :const:`1.5600`." + +#: library/decimal.rst:61 +msgid "" +"Unlike hardware based binary floating point, the decimal module has a user " +"alterable precision (defaulting to 28 places) which can be as large as " +"needed for a given problem:" +msgstr "" +"Contrairement à l'arithmétique en virgule flottante binaire, le module " +"``decimal`` possède un paramètre de précision ajustable (par défaut à 28 " +"chiffres significatifs) qui peut être aussi élevée que nécessaire pour un " +"problème donné :" + +#: library/decimal.rst:73 +msgid "" +"Both binary and decimal floating point are implemented in terms of published " +"standards. While the built-in float type exposes only a modest portion of " +"its capabilities, the decimal module exposes all required parts of the " +"standard. When needed, the programmer has full control over rounding and " +"signal handling. This includes an option to enforce exact arithmetic by " +"using exceptions to block any inexact operations." +msgstr "" +"L'arithmétique binaire et décimale en virgule flottante sont implémentées " +"selon des standards publiés. Alors que le type ``float`` n'expose qu'une " +"faible portion de ses capacités, le module ``decimal`` expose tous les " +"composants nécessaires du standard. Lorsque nécessaire, le développeur a un " +"contrôle total de la gestion de signal et de l'arrondi. Cela inclut la " +"possibilité de forcer une arithmétique exacte en utilisant des exceptions " +"pour bloquer toute opération inexacte." + +#: library/decimal.rst:80 +msgid "" +"The decimal module was designed to support \"without prejudice, both exact " +"unrounded decimal arithmetic (sometimes called fixed-point arithmetic) and " +"rounded floating-point arithmetic.\" -- excerpt from the decimal arithmetic " +"specification." +msgstr "" +"Le module ``decimal`` a été conçu pour gérer « sans préjugé, à la fois une " +"arithmétique décimale non-arrondie (aussi appelée arithmétique en virgule " +"fixe) et à la fois une arithmétique en virgule flottante. » (extrait traduit " +"de la spécification de l'arithmétique décimale)." + +#: library/decimal.rst:85 +msgid "" +"The module design is centered around three concepts: the decimal number, " +"the context for arithmetic, and signals." +msgstr "" +"Le module est conçu autour de trois concepts : le nombre décimal, le " +"contexte arithmétique et les signaux." + +#: library/decimal.rst:88 +#, fuzzy +msgid "" +"A decimal number is immutable. It has a sign, coefficient digits, and an " +"exponent. To preserve significance, the coefficient digits do not truncate " +"trailing zeros. Decimals also include special values such as ``Infinity``, " +"``-Infinity``, and ``NaN``. The standard also differentiates ``-0`` from " +"``+0``." +msgstr "" +"Un ``Decimal`` est immuable. Il a un signe, un coefficient, et un exposant. " +"Pour préserver le nombre de chiffres significatifs, les zéros en fin de " +"chaîne ne sont pas tronqués. Les décimaux incluent aussi des valeurs " +"spéciales telles que :const:`Infinity`, :const:`-Infinity`, et :const:`NaN`. " +"Le standard fait également la différence entre :const:`-0` et :const:`+0`." + +#: library/decimal.rst:94 +msgid "" +"The context for arithmetic is an environment specifying precision, rounding " +"rules, limits on exponents, flags indicating the results of operations, and " +"trap enablers which determine whether signals are treated as exceptions. " +"Rounding options include :const:`ROUND_CEILING`, :const:`ROUND_DOWN`, :const:" +"`ROUND_FLOOR`, :const:`ROUND_HALF_DOWN`, :const:`ROUND_HALF_EVEN`, :const:" +"`ROUND_HALF_UP`, :const:`ROUND_UP`, and :const:`ROUND_05UP`." +msgstr "" +"Le contexte de l'arithmétique est un environnement qui permet de configurer " +"une précision, une règle pour l'arrondi, des limites sur l'exposant, des " +"options indiquant le résultat des opérations et si les signaux (remontés " +"lors d'opérations illégales) sont traités comme des exceptions Python. Les " +"options d'arrondi incluent :const:`ROUND_CEILING`, :const:`ROUND_DOWN`, :" +"const:`ROUND_FLOOR`, :const:`ROUND_HALF_DOWN`, :const:`ROUND_HALF_EVEN`, :" +"const:`ROUND_HALF_UP`, :const:`ROUND_UP`, et :const:`ROUND_05UP`." + +#: library/decimal.rst:101 +msgid "" +"Signals are groups of exceptional conditions arising during the course of " +"computation. Depending on the needs of the application, signals may be " +"ignored, considered as informational, or treated as exceptions. The signals " +"in the decimal module are: :const:`Clamped`, :const:`InvalidOperation`, :" +"const:`DivisionByZero`, :const:`Inexact`, :const:`Rounded`, :const:" +"`Subnormal`, :const:`Overflow`, :const:`Underflow` and :const:" +"`FloatOperation`." +msgstr "" +"Les signaux sont des groupes de conditions exceptionnelles qui surviennent " +"durant le calcul. Selon les besoins de l'application, les signaux peuvent " +"être ignorés, considérés comme de l'information, ou bien traités comme des " +"exceptions. Les signaux dans le module ``decimal`` sont : :const:`Clamped`, :" +"const:`InvalidOperation`, :const:`DivisionByZero`, :const:`Inexact`, :const:" +"`Rounded`, :const:`Subnormal`, :const:`Overflow`, :const:`Underflow` et :" +"const:`FloatOperation`." + +#: library/decimal.rst:108 +msgid "" +"For each signal there is a flag and a trap enabler. When a signal is " +"encountered, its flag is set to one, then, if the trap enabler is set to " +"one, an exception is raised. Flags are sticky, so the user needs to reset " +"them before monitoring a calculation." +msgstr "" +"Chaque signal est configurable indépendamment. Quand une opération illégale " +"survient, le signal est mis à ``1``, puis s'il est configuré pour, une " +"exception est levée. La mise à ``1`` est persistante, l'utilisateur doit " +"donc les remettre à zéro avant de commencer un calcul qu'il souhaite " +"surveiller." + +#: library/decimal.rst:116 +#, fuzzy +msgid "" +"IBM's General Decimal Arithmetic Specification, `The General Decimal " +"Arithmetic Specification `_." +msgstr "" +"La spécification d'IBM sur l'arithmétique décimale : `The General Decimal " +"Arithmetic Specification `_." + +#: library/decimal.rst:125 +msgid "Quick-start Tutorial" +msgstr "Introduction pratique" + +#: library/decimal.rst:127 +msgid "" +"The usual start to using decimals is importing the module, viewing the " +"current context with :func:`getcontext` and, if necessary, setting new " +"values for precision, rounding, or enabled traps::" +msgstr "" +"Commençons par importer le module, regarder le contexte actuel avec :func:" +"`getcontext`, et si nécessaire configurer la précision, l'arrondi, et la " +"gestion des signaux ::" + +#: library/decimal.rst:139 +#, fuzzy +msgid "" +"Decimal instances can be constructed from integers, strings, floats, or " +"tuples. Construction from an integer or a float performs an exact conversion " +"of the value of that integer or float. Decimal numbers include special " +"values such as ``NaN`` which stands for \"Not a number\", positive and " +"negative ``Infinity``, and ``-0``::" +msgstr "" +"Les instances de ``Decimal`` peuvent être construites avec des ``int``, des " +"``str``, des ``floats`` ou des ``tuples``. La construction depuis un entier " +"ou un ``float`` effectue la conversion exacte de cet entier ou de ce " +"``float``. Les nombres décimaux incluent des valeurs spéciales telles que :" +"const:`NaN` qui signifie en anglais « *Not a number* », en français « pas un " +"nombre », des :const:`Infinity` positifs ou négatifs et :const:`-0` ::" + +#: library/decimal.rst:163 +msgid "" +"If the :exc:`FloatOperation` signal is trapped, accidental mixing of " +"decimals and floats in constructors or ordering comparisons raises an " +"exception::" +msgstr "" +"Si un signal :exc:`FloatOperation` est détecté, un mélange accidentel " +"d'objets ``Decimal`` et de ``float`` dans les constructeurs ou des " +"opérations de comparaisons, une exception est levée ::" + +#: library/decimal.rst:182 +msgid "" +"The significance of a new Decimal is determined solely by the number of " +"digits input. Context precision and rounding only come into play during " +"arithmetic operations." +msgstr "" +"Le nombre de chiffres significatifs d'un nouvel objet ``Decimal`` est " +"déterminé entièrement par le nombre de chiffres saisis. La précision et les " +"règles d'arrondis n'interviennent que lors d'opérations arithmétiques." + +#: library/decimal.rst:199 +msgid "" +"If the internal limits of the C version are exceeded, constructing a decimal " +"raises :class:`InvalidOperation`::" +msgstr "" +"Si les limites internes de la version en C sont dépassées, la construction " +"d'un objet décimal lève l'exception :class:`InvalidOperation` ::" + +#: library/decimal.rst:209 +msgid "" +"Decimals interact well with much of the rest of Python. Here is a small " +"decimal floating point flying circus:" +msgstr "" +"Les objets ``Decimal`` interagissent très bien avec le reste de Python. " +"Voici quelques exemple d'opérations avec des décimaux :" + +#: library/decimal.rst:241 +msgid "And some mathematical functions are also available to Decimal:" +msgstr "" +"Et certaines fonctions mathématiques sont également disponibles sur des " +"instances de ``Decimal`` :" + +#: library/decimal.rst:253 +#, fuzzy +msgid "" +"The :meth:`~Decimal.quantize` method rounds a number to a fixed exponent. " +"This method is useful for monetary applications that often round results to " +"a fixed number of places:" +msgstr "" +"La méthode :meth:`quantize` arrondit un nombre à un exposant fixe. Cette " +"méthode est utile pour des applications monétaires qui arrondissent souvent " +"un résultat à un nombre de chiffres significatifs exact :" + +#: library/decimal.rst:262 +msgid "" +"As shown above, the :func:`getcontext` function accesses the current context " +"and allows the settings to be changed. This approach meets the needs of " +"most applications." +msgstr "" +"Comme montré plus haut, la fonction :func:`getcontext` accède au contexte " +"actuel et permet de modifier les paramètres. Cette approche répond aux " +"besoins de la plupart des applications." + +#: library/decimal.rst:266 +msgid "" +"For more advanced work, it may be useful to create alternate contexts using " +"the Context() constructor. To make an alternate active, use the :func:" +"`setcontext` function." +msgstr "" +"Pour un travail plus avancé, il peut être utile de créer des contextes " +"alternatifs en utilisant le constructeur de ``Context``. Pour activer cet " +"objet ``Context``, utilisez la fonction :func:`setcontext`." + +#: library/decimal.rst:270 +msgid "" +"In accordance with the standard, the :mod:`decimal` module provides two " +"ready to use standard contexts, :const:`BasicContext` and :const:" +"`ExtendedContext`. The former is especially useful for debugging because " +"many of the traps are enabled:" +msgstr "" +"En accord avec le standard, le module :mod:`decimal` fournit des objets " +"Context standards, :const:`BasicContext` et :const:`ExtendedContext`. Le " +"premier est particulièrement utile pour le débogage car beaucoup des pièges " +"sont activés dans cet objet." + +#: library/decimal.rst:299 +#, fuzzy +msgid "" +"Contexts also have signal flags for monitoring exceptional conditions " +"encountered during computations. The flags remain set until explicitly " +"cleared, so it is best to clear the flags before each set of monitored " +"computations by using the :meth:`~Context.clear_flags` method. ::" +msgstr "" +"Les objets ``Context`` ont aussi des options pour détecter des opérations " +"illégales lors des calculs. Ces options restent activées jusqu'à ce qu'elles " +"soit remises à zéro de manière explicite. Il convient donc de remettre à " +"zéro ces options avant chaque inspection de chaque calcul, avec la méthode :" +"meth:`clear_flags`. ::" + +#: library/decimal.rst:312 +#, fuzzy +msgid "" +"The *flags* entry shows that the rational approximation to pi was rounded " +"(digits beyond the context precision were thrown away) and that the result " +"is inexact (some of the discarded digits were non-zero)." +msgstr "" +"Les options montrent que l'approximation de :const:`Pi` par une fraction a " +"été arrondie (les chiffres au delà de la précision spécifiée par l'objet " +"Context ont été tronqués) et que le résultat est différent (certains des " +"chiffres tronqués étaient différents de zéro)." + +#: library/decimal.rst:316 +#, fuzzy +msgid "" +"Individual traps are set using the dictionary in the :attr:`~Context.traps` " +"attribute of a context:" +msgstr "" +"L'activation des pièges se fait en utilisant un dictionnaire dans " +"l'attribut :attr:`traps` de l'objet Context :" + +#: library/decimal.rst:331 +msgid "" +"Most programs adjust the current context only once, at the beginning of the " +"program. And, in many applications, data is converted to :class:`Decimal` " +"with a single cast inside a loop. With context set and decimals created, " +"the bulk of the program manipulates the data no differently than with other " +"Python numeric types." +msgstr "" +"La plupart des applications n'ajustent l'objet ``Context`` qu'une seule " +"fois, au démarrage. Et, dans beaucoup d'applications, les données sont " +"convertie une fois pour toutes en :class:`Decimal`. Une fois le ``Context`` " +"initialisé, et les objets ``Decimal`` créés, l'essentiel du programme " +"manipule la donnée de la même manière qu'avec les autres types numériques " +"Python." + +#: library/decimal.rst:343 +msgid "Decimal objects" +msgstr "Les objets Decimal" + +#: library/decimal.rst:348 +msgid "Construct a new :class:`Decimal` object based from *value*." +msgstr "Construire un nouvel objet :class:`Decimal` à partir de *value*." + +#: library/decimal.rst:350 +msgid "" +"*value* can be an integer, string, tuple, :class:`float`, or another :class:" +"`Decimal` object. If no *value* is given, returns ``Decimal('0')``. If " +"*value* is a string, it should conform to the decimal numeric string syntax " +"after leading and trailing whitespace characters, as well as underscores " +"throughout, are removed::" +msgstr "" +"*value* peut être un entier, une chaîne de caractères, un *n*-uplet, :class:" +"`float`, ou une autre instance de :class:`Decimal`. Si *value* n'est pas " +"fourni, le constructeur renvoie ``Decimal('0')``. Si *value* est une chaîne " +"de caractère, elle doit correspondre à la syntaxe décimale en dehors des " +"espaces de début et de fin, ou des tirets bas, qui sont enlevés ::" + +#: library/decimal.rst:366 +msgid "" +"Other Unicode decimal digits are also permitted where ``digit`` appears " +"above. These include decimal digits from various other alphabets (for " +"example, Arabic-Indic and Devanāgarī digits) along with the fullwidth digits " +"``'\\uff10'`` through ``'\\uff19'``." +msgstr "" +"Les chiffres codés en Unicode sont aussi autorisés, là ou ``digit`` " +"apparaît. Cela inclut des chiffres décimaux venant d'autres alphabets (par " +"exemple les chiffres indo-arabes ou Devanagari) ainsi que les chiffres de " +"pleine largeur ``'\\uff10'`` jusqu'à ``'\\uff19'``." + +#: library/decimal.rst:371 +#, fuzzy +msgid "" +"If *value* is a :class:`tuple`, it should have three components, a sign " +"(``0`` for positive or ``1`` for negative), a :class:`tuple` of digits, and " +"an integer exponent. For example, ``Decimal((0, (1, 4, 1, 4), -3))`` returns " +"``Decimal('1.414')``." +msgstr "" +"Si *value* est un :class:`tuple`, il doit avoir 3 éléments, le signe (:const:" +"`0` pour positif ou :const:`1` pour négatif), un :class:`tuple` de chiffres, " +"et un entier représentant l'exposant. Par exemple, ``Decimal((0, (1, 4, 1, " +"4), -3))`` construit l'objet ``Decimal('1.414')``." + +#: library/decimal.rst:376 +msgid "" +"If *value* is a :class:`float`, the binary floating point value is " +"losslessly converted to its exact decimal equivalent. This conversion can " +"often require 53 or more digits of precision. For example, " +"``Decimal(float('1.1'))`` converts to " +"``Decimal('1.100000000000000088817841970012523233890533447265625')``." +msgstr "" +"Si *value* est un :class:`float`, la valeur en binaire flottant est " +"convertie exactement à son équivalent décimal. Cette conversion peut parfois " +"nécessiter 53 chiffres significatifs ou plus. Par exemple, " +"``Decimal(float('1.1'))`` devient " +"``Decimal('1.100000000000000088817841970012523233890533447265625')``." + +#: library/decimal.rst:382 +msgid "" +"The *context* precision does not affect how many digits are stored. That is " +"determined exclusively by the number of digits in *value*. For example, " +"``Decimal('3.00000')`` records all five zeros even if the context precision " +"is only three." +msgstr "" +"La précision spécifiée dans Context n'affecte pas le nombre de chiffres " +"stockés. Cette valeur est déterminée exclusivement par le nombre de chiffres " +"dans *value*. Par exemple, ``Decimal('3.00000')`` enregistre les 5 zéros " +"même si la précision du contexte est de 3." + +#: library/decimal.rst:387 +#, fuzzy +msgid "" +"The purpose of the *context* argument is determining what to do if *value* " +"is a malformed string. If the context traps :const:`InvalidOperation`, an " +"exception is raised; otherwise, the constructor returns a new Decimal with " +"the value of ``NaN``." +msgstr "" +"L'objectif de l'argument *context* est de déterminer ce que Python doit " +"faire si *value* est une chaîne avec un mauvais format. Si l'option :const:" +"`InvalidOperation` est activée, une exception est levée, sinon le " +"constructeur renvoie un objet ``Decimal`` avec la valeur :const:`NaN`." + +#: library/decimal.rst:392 +msgid "Once constructed, :class:`Decimal` objects are immutable." +msgstr "Une fois construit, les objets :class:`Decimal` sont immuables." + +#: library/decimal.rst:394 +msgid "" +"The argument to the constructor is now permitted to be a :class:`float` " +"instance." +msgstr "" +"L'argument du constructeur peut désormais être un objet :class:`float`." + +#: library/decimal.rst:398 +msgid "" +":class:`float` arguments raise an exception if the :exc:`FloatOperation` " +"trap is set. By default the trap is off." +msgstr "" +"Un argument :class:`float` lève une exception si l'option :exc:" +"`FloatOperation` est activé. Par défaut l'option ne l'est pas." + +#: library/decimal.rst:402 +msgid "" +"Underscores are allowed for grouping, as with integral and floating-point " +"literals in code." +msgstr "" +"Les tirets bas sont autorisés pour regrouper, tout comme pour l'arithmétique " +"en virgule fixe et flottante." + +#: library/decimal.rst:406 +msgid "" +"Decimal floating point objects share many properties with the other built-in " +"numeric types such as :class:`float` and :class:`int`. All of the usual " +"math operations and special methods apply. Likewise, decimal objects can be " +"copied, pickled, printed, used as dictionary keys, used as set elements, " +"compared, sorted, and coerced to another type (such as :class:`float` or :" +"class:`int`)." +msgstr "" +"Les objets ``Decimal`` partagent beaucoup de propriétés avec les autres " +"types numériques natifs tels que :class:`float` et :class:`int`. Toutes les " +"opérations mathématiques et méthodes sont conservées. De même les objets " +"``Decimal`` peuvent être copiés, sérialisés via le module ``pickle``, " +"affichés, utilisés comme clé de dictionnaire, éléments d'ensembles, " +"comparés, classés, et convertis vers un autre type (tel que :class:`float` " +"ou :class:`int`)." + +#: library/decimal.rst:413 +msgid "" +"There are some small differences between arithmetic on Decimal objects and " +"arithmetic on integers and floats. When the remainder operator ``%`` is " +"applied to Decimal objects, the sign of the result is the sign of the " +"*dividend* rather than the sign of the divisor::" +msgstr "" +"Il existe quelques différences mineures entre l'arithmétique entre les " +"objets décimaux et l'arithmétique avec les entiers et les ``float``. Quand " +"l'opérateur modulo ``%`` est appliqué sur des objets décimaux, le signe du " +"résultat est le signe du *dividend* plutôt que le signe du diviseur ::" + +#: library/decimal.rst:423 +msgid "" +"The integer division operator ``//`` behaves analogously, returning the " +"integer part of the true quotient (truncating towards zero) rather than its " +"floor, so as to preserve the usual identity ``x == (x // y) * y + x % y``::" +msgstr "" +"L'opérateur division entière, ``//`` se comporte de la même manière, " +"retournant la partie entière du quotient, plutôt que son arrondi, de manière " +"à préserver l'identité d'Euclide ``x == (x // y) * y + x % y`` ::" + +#: library/decimal.rst:432 +msgid "" +"The ``%`` and ``//`` operators implement the ``remainder`` and ``divide-" +"integer`` operations (respectively) as described in the specification." +msgstr "" +"Les opérateurs ``//`` et ``%`` implémentent la division entière et le reste " +"(ou modulo), respectivement, tel que décrit dans la spécification." + +#: library/decimal.rst:436 +msgid "" +"Decimal objects cannot generally be combined with floats or instances of :" +"class:`fractions.Fraction` in arithmetic operations: an attempt to add a :" +"class:`Decimal` to a :class:`float`, for example, will raise a :exc:" +"`TypeError`. However, it is possible to use Python's comparison operators " +"to compare a :class:`Decimal` instance ``x`` with another number ``y``. " +"This avoids confusing results when doing equality comparisons between " +"numbers of different types." +msgstr "" +"Les objets ``Decimal`` ne peuvent généralement pas être combinés avec des " +"``float`` ou des objets :class:`fractions.Fraction` lors d'opérations " +"arithmétiques : tout addition entre un :class:`Decimal` avec un :class:" +"`float`, par exemple, lève une exception :exc:`TypeError`. Cependant, il est " +"possible d'utiliser les opérateurs de comparaison entre instances de :class:" +"`Decimal` avec les autres types numériques. Cela évite d'avoir des résultats " +"absurdes lors des tests d'égalité entre différents types." + +#: library/decimal.rst:444 +msgid "" +"Mixed-type comparisons between :class:`Decimal` instances and other numeric " +"types are now fully supported." +msgstr "" +"Les comparaisons inter-types entre :class:`Decimal` et les autres types " +"numériques sont désormais intégralement gérés." + +#: library/decimal.rst:448 +msgid "" +"In addition to the standard numeric properties, decimal floating point " +"objects also have a number of specialized methods:" +msgstr "" + +#: library/decimal.rst:454 +msgid "" +"Return the adjusted exponent after shifting out the coefficient's rightmost " +"digits until only the lead digit remains: ``Decimal('321e+5').adjusted()`` " +"returns seven. Used for determining the position of the most significant " +"digit with respect to the decimal point." +msgstr "" + +#: library/decimal.rst:461 +msgid "" +"Return a pair ``(n, d)`` of integers that represent the given :class:" +"`Decimal` instance as a fraction, in lowest terms and with a positive " +"denominator::" +msgstr "" + +#: library/decimal.rst:468 +msgid "" +"The conversion is exact. Raise OverflowError on infinities and ValueError " +"on NaNs." +msgstr "" +"La conversion est exacte. Lève une ``OverflowError`` sur l'infini et " +"``ValueError`` sur les ``Nan``'s." + +#: library/decimal.rst:475 +msgid "" +"Return a :term:`named tuple` representation of the number: " +"``DecimalTuple(sign, digits, exponent)``." +msgstr "" + +#: library/decimal.rst:481 +msgid "" +"Return the canonical encoding of the argument. Currently, the encoding of " +"a :class:`Decimal` instance is always canonical, so this operation returns " +"its argument unchanged." +msgstr "" + +#: library/decimal.rst:487 +msgid "" +"Compare the values of two Decimal instances. :meth:`compare` returns a " +"Decimal instance, and if either operand is a NaN then the result is a NaN::" +msgstr "" + +#: library/decimal.rst:498 +msgid "" +"This operation is identical to the :meth:`compare` method, except that all " +"NaNs signal. That is, if neither operand is a signaling NaN then any quiet " +"NaN operand is treated as though it were a signaling NaN." +msgstr "" + +#: library/decimal.rst:504 +msgid "" +"Compare two operands using their abstract representation rather than their " +"numerical value. Similar to the :meth:`compare` method, but the result " +"gives a total ordering on :class:`Decimal` instances. Two :class:`Decimal` " +"instances with the same numeric value but different representations compare " +"unequal in this ordering:" +msgstr "" + +#: library/decimal.rst:513 +msgid "" +"Quiet and signaling NaNs are also included in the total ordering. The " +"result of this function is ``Decimal('0')`` if both operands have the same " +"representation, ``Decimal('-1')`` if the first operand is lower in the total " +"order than the second, and ``Decimal('1')`` if the first operand is higher " +"in the total order than the second operand. See the specification for " +"details of the total order." +msgstr "" + +#: library/decimal.rst:531 library/decimal.rst:835 +msgid "" +"This operation is unaffected by context and is quiet: no flags are changed " +"and no rounding is performed. As an exception, the C version may raise " +"InvalidOperation if the second operand cannot be converted exactly." +msgstr "" + +#: library/decimal.rst:526 +msgid "" +"Compare two operands using their abstract representation rather than their " +"value as in :meth:`compare_total`, but ignoring the sign of each operand. " +"``x.compare_total_mag(y)`` is equivalent to ``x.copy_abs().compare_total(y." +"copy_abs())``." +msgstr "" + +#: library/decimal.rst:537 +msgid "" +"Just returns self, this method is only to comply with the Decimal " +"Specification." +msgstr "" + +#: library/decimal.rst:542 +msgid "" +"Return the absolute value of the argument. This operation is unaffected by " +"the context and is quiet: no flags are changed and no rounding is performed." +msgstr "" + +#: library/decimal.rst:548 +msgid "" +"Return the negation of the argument. This operation is unaffected by the " +"context and is quiet: no flags are changed and no rounding is performed." +msgstr "" + +#: library/decimal.rst:553 +msgid "" +"Return a copy of the first operand with the sign set to be the same as the " +"sign of the second operand. For example:" +msgstr "" + +#: library/decimal.rst:565 +msgid "" +"Return the value of the (natural) exponential function ``e**x`` at the given " +"number. The result is correctly rounded using the :const:`ROUND_HALF_EVEN` " +"rounding mode." +msgstr "" + +#: library/decimal.rst:576 +msgid "" +"Alternative constructor that only accepts instances of :class:`float` or :" +"class:`int`." +msgstr "" + +#: library/decimal.rst:579 +msgid "" +"Note ``Decimal.from_float(0.1)`` is not the same as ``Decimal('0.1')``. " +"Since 0.1 is not exactly representable in binary floating point, the value " +"is stored as the nearest representable value which is " +"``0x1.999999999999ap-4``. That equivalent value in decimal is " +"``0.1000000000000000055511151231257827021181583404541015625``." +msgstr "" + +#: library/decimal.rst:585 +msgid "" +"From Python 3.2 onwards, a :class:`Decimal` instance can also be constructed " +"directly from a :class:`float`." +msgstr "" + +#: library/decimal.rst:603 +msgid "" +"Fused multiply-add. Return self*other+third with no rounding of the " +"intermediate product self*other." +msgstr "" + +#: library/decimal.rst:611 +msgid "" +"Return :const:`True` if the argument is canonical and :const:`False` " +"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:617 +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:622 +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:627 +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:632 +msgid "" +"Return :const:`True` if the argument is a *normal* finite number. Return :" +"const:`False` if the argument is zero, subnormal, infinite or a NaN." +msgstr "" + +#: library/decimal.rst:637 +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:642 +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:647 +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:652 +msgid "" +"Return :const:`True` if the argument is subnormal, and :const:`False` " +"otherwise." +msgstr "" + +#: library/decimal.rst:657 +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:662 +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:667 +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:672 +msgid "" +"For a nonzero number, return the adjusted exponent of its operand as a :" +"class:`Decimal` instance. If the operand is a zero then ``Decimal('-" +"Infinity')`` is returned and the :const:`DivisionByZero` flag is raised. If " +"the operand is an infinity then ``Decimal('Infinity')`` is returned." +msgstr "" + +#: library/decimal.rst:680 +msgid "" +":meth:`logical_and` is a logical operation which takes two *logical " +"operands* (see :ref:`logical_operands_label`). The result is the digit-wise " +"``and`` of the two operands." +msgstr "" + +#: library/decimal.rst:686 +msgid "" +":meth:`logical_invert` is a logical operation. The result is the digit-wise " +"inversion of the operand." +msgstr "" + +#: library/decimal.rst:691 +msgid "" +":meth:`logical_or` is a logical operation which takes two *logical operands* " +"(see :ref:`logical_operands_label`). The result is the digit-wise ``or`` of " +"the two operands." +msgstr "" + +#: library/decimal.rst:697 +msgid "" +":meth:`logical_xor` is a logical operation which takes two *logical " +"operands* (see :ref:`logical_operands_label`). The result is the digit-wise " +"exclusive or of the two operands." +msgstr "" + +#: library/decimal.rst:703 +msgid "" +"Like ``max(self, other)`` except that the context rounding rule is applied " +"before returning and that ``NaN`` values are either signaled or ignored " +"(depending on the context and whether they are signaling or quiet)." +msgstr "" + +#: library/decimal.rst:710 +msgid "" +"Similar to the :meth:`.max` method, but the comparison is done using the " +"absolute values of the operands." +msgstr "" + +#: library/decimal.rst:715 +msgid "" +"Like ``min(self, other)`` except that the context rounding rule is applied " +"before returning and that ``NaN`` values are either signaled or ignored " +"(depending on the context and whether they are signaling or quiet)." +msgstr "" + +#: library/decimal.rst:722 +msgid "" +"Similar to the :meth:`.min` method, but the comparison is done using the " +"absolute values of the operands." +msgstr "" + +#: library/decimal.rst:727 +msgid "" +"Return the largest number representable in the given context (or in the " +"current thread's context if no context is given) that is smaller than the " +"given operand." +msgstr "" + +#: library/decimal.rst:733 +msgid "" +"Return the smallest number representable in the given context (or in the " +"current thread's context if no context is given) that is larger than the " +"given operand." +msgstr "" + +#: library/decimal.rst:739 +msgid "" +"If the two operands are unequal, return the number closest to the first " +"operand in the direction of the second operand. If both operands are " +"numerically equal, return a copy of the first operand with the sign set to " +"be the same as the sign of the second operand." +msgstr "" + +#: library/decimal.rst:746 +msgid "" +"Normalize the number by stripping the rightmost trailing zeros and " +"converting any result equal to ``Decimal('0')`` to ``Decimal('0e0')``. Used " +"for producing canonical values for attributes of an equivalence class. For " +"example, ``Decimal('32.100')`` and ``Decimal('0.321000e+2')`` both normalize " +"to the equivalent value ``Decimal('32.1')``." +msgstr "" + +#: library/decimal.rst:755 +msgid "" +"Return a string describing the *class* of the operand. The returned value " +"is one of the following ten strings." +msgstr "" + +# Élément d'une liste, d'où le ; final +#: library/decimal.rst:758 +msgid "``\"-Infinity\"``, indicating that the operand is negative infinity." +msgstr "``\"-Infinity\"``, indiquant que l'opérande est l'infini négatif ;" + +#: library/decimal.rst:759 +msgid "" +"``\"-Normal\"``, indicating that the operand is a negative normal number." +msgstr "" + +#: library/decimal.rst:760 +msgid "" +"``\"-Subnormal\"``, indicating that the operand is negative and subnormal." +msgstr "" + +# Élément d'une liste, d'où le ; final +#: library/decimal.rst:761 +msgid "``\"-Zero\"``, indicating that the operand is a negative zero." +msgstr "``\"-Zero\"``, indiquant que l'opérande est un zéro négatif ;" + +# Élément d'une liste, d'où le ; final +#: library/decimal.rst:762 +msgid "``\"+Zero\"``, indicating that the operand is a positive zero." +msgstr "``\"+Zero\"``, indiquant que l'opérande est un zéro positif ;" + +#: library/decimal.rst:763 +msgid "" +"``\"+Subnormal\"``, indicating that the operand is positive and subnormal." +msgstr "" + +#: library/decimal.rst:764 +msgid "" +"``\"+Normal\"``, indicating that the operand is a positive normal number." +msgstr "" + +# Élément d'une liste, d'où le ; final +#: library/decimal.rst:765 +msgid "``\"+Infinity\"``, indicating that the operand is positive infinity." +msgstr "``\"+Infinity\"``, indiquant que l'opérande est l'infini positif ;" + +# Élément d'une liste, d'où le ; final +#: library/decimal.rst:766 +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:767 +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:771 +msgid "" +"Return a value equal to the first operand after rounding and having the " +"exponent of the second operand." +msgstr "" + +#: library/decimal.rst:777 +msgid "" +"Unlike other operations, if the length of the coefficient after the quantize " +"operation would be greater than precision, then an :const:`InvalidOperation` " +"is signaled. This guarantees that, unless there is an error condition, the " +"quantized exponent is always equal to that of the right-hand operand." +msgstr "" + +#: library/decimal.rst:783 +msgid "" +"Also unlike other operations, quantize never signals Underflow, even if the " +"result is subnormal and inexact." +msgstr "" + +#: library/decimal.rst:786 +msgid "" +"If the exponent of the second operand is larger than that of the first then " +"rounding may be necessary. In this case, the rounding mode is determined by " +"the ``rounding`` argument if given, else by the given ``context`` argument; " +"if neither argument is given the rounding mode of the current thread's " +"context is used." +msgstr "" + +#: library/decimal.rst:792 +msgid "" +"An error is returned whenever the resulting exponent is greater than :attr:" +"`~Context.Emax` or less than :meth:`~Context.Etiny`." +msgstr "" + +#: library/decimal.rst:797 +msgid "" +"Return ``Decimal(10)``, the radix (base) in which the :class:`Decimal` class " +"does all its arithmetic. Included for compatibility with the specification." +msgstr "" + +#: library/decimal.rst:803 +msgid "" +"Return the remainder from dividing *self* by *other*. This differs from " +"``self % other`` in that the sign of the remainder is chosen so as to " +"minimize its absolute value. More precisely, the return value is ``self - n " +"* other`` where ``n`` is the integer nearest to the exact value of ``self / " +"other``, and if two integers are equally near then the even one is chosen." +msgstr "" + +#: library/decimal.rst:810 +msgid "If the result is zero then its sign will be the sign of *self*." +msgstr "" + +#: library/decimal.rst:821 +msgid "" +"Return the result of rotating the digits of the first operand by an amount " +"specified by the second operand. The second operand must be an integer in " +"the range -precision through precision. The absolute value of the second " +"operand gives the number of places to rotate. If the second operand is " +"positive then rotation is to the left; otherwise rotation is to the right. " +"The coefficient of the first operand is padded on the left with zeros to " +"length precision if necessary. The sign and exponent of the first operand " +"are unchanged." +msgstr "" + +#: library/decimal.rst:832 +msgid "" +"Test whether self and other have the same exponent or whether both are " +"``NaN``." +msgstr "" + +#: library/decimal.rst:841 +msgid "" +"Return the first operand with exponent adjusted by the second. Equivalently, " +"return the first operand multiplied by ``10**other``. The second operand " +"must be an integer." +msgstr "" + +#: library/decimal.rst:847 +msgid "" +"Return the result of shifting the digits of the first operand by an amount " +"specified by the second operand. The second operand must be an integer in " +"the range -precision through precision. The absolute value of the second " +"operand gives the number of places to shift. If the second operand is " +"positive then the shift is to the left; otherwise the shift is to the " +"right. Digits shifted into the coefficient are zeros. The sign and " +"exponent of the first operand are unchanged." +msgstr "" + +#: library/decimal.rst:857 +msgid "Return the square root of the argument to full precision." +msgstr "" + +#: library/decimal.rst:1441 +msgid "" +"Convert to a string, using engineering notation if an exponent is needed." +msgstr "" + +#: library/decimal.rst:1443 +msgid "" +"Engineering notation has an exponent which is a multiple of 3. This can " +"leave up to 3 digits to the left of the decimal place and may require the " +"addition of either one or two trailing zeros." +msgstr "" + +#: library/decimal.rst:868 +msgid "" +"For example, this converts ``Decimal('123E+1')`` to ``Decimal('1.23E+3')``." +msgstr "" + +#: library/decimal.rst:872 +msgid "" +"Identical to the :meth:`to_integral_value` method. The ``to_integral`` name " +"has been kept for compatibility with older versions." +msgstr "" + +#: library/decimal.rst:877 +msgid "" +"Round to the nearest integer, signaling :const:`Inexact` or :const:`Rounded` " +"as appropriate if rounding occurs. The rounding mode is determined by the " +"``rounding`` parameter if given, else by the given ``context``. If neither " +"parameter is given then the rounding mode of the current context is used." +msgstr "" + +#: library/decimal.rst:885 +msgid "" +"Round to the nearest integer without signaling :const:`Inexact` or :const:" +"`Rounded`. If given, applies *rounding*; otherwise, uses the rounding " +"method in either the supplied *context* or the current context." +msgstr "" + +#: library/decimal.rst:893 +msgid "Logical operands" +msgstr "" + +#: library/decimal.rst:895 +msgid "" +"The :meth:`~Decimal.logical_and`, :meth:`~Decimal.logical_invert`, :meth:" +"`~Decimal.logical_or`, and :meth:`~Decimal.logical_xor` methods expect their " +"arguments to be *logical operands*. A *logical operand* is a :class:" +"`Decimal` instance whose exponent and sign are both zero, and whose digits " +"are all either ``0`` or ``1``." +msgstr "" + +#: library/decimal.rst:907 +msgid "Context objects" +msgstr "" + +#: library/decimal.rst:909 +msgid "" +"Contexts are environments for arithmetic operations. They govern precision, " +"set rules for rounding, determine which signals are treated as exceptions, " +"and limit the range for exponents." +msgstr "" + +#: library/decimal.rst:913 +msgid "" +"Each thread has its own current context which is accessed or changed using " +"the :func:`getcontext` and :func:`setcontext` functions:" +msgstr "" + +#: library/decimal.rst:919 +msgid "Return the current context for the active thread." +msgstr "" + +#: library/decimal.rst:924 +msgid "Set the current context for the active thread to *c*." +msgstr "" + +#: library/decimal.rst:926 +msgid "" +"You can also use the :keyword:`with` statement and the :func:`localcontext` " +"function to temporarily change the active context." +msgstr "" + +#: library/decimal.rst:931 +msgid "" +"Return a context manager that will set the current context for the active " +"thread to a copy of *ctx* on entry to the with-statement and restore the " +"previous context when exiting the with-statement. If no context is " +"specified, a copy of the current context is used." +msgstr "" + +#: library/decimal.rst:936 +msgid "" +"For example, the following code sets the current decimal precision to 42 " +"places, performs a calculation, and then automatically restores the previous " +"context::" +msgstr "" + +#: library/decimal.rst:946 +msgid "" +"New contexts can also be created using the :class:`Context` constructor " +"described below. In addition, the module provides three pre-made contexts:" +msgstr "" + +#: library/decimal.rst:952 +msgid "" +"This is a standard context defined by the General Decimal Arithmetic " +"Specification. Precision is set to nine. Rounding is set to :const:" +"`ROUND_HALF_UP`. All flags are cleared. All traps are enabled (treated as " +"exceptions) except :const:`Inexact`, :const:`Rounded`, and :const:" +"`Subnormal`." +msgstr "" + +#: library/decimal.rst:958 +msgid "" +"Because many of the traps are enabled, this context is useful for debugging." +msgstr "" + +#: library/decimal.rst:963 +msgid "" +"This is a standard context defined by the General Decimal Arithmetic " +"Specification. Precision is set to nine. Rounding is set to :const:" +"`ROUND_HALF_EVEN`. All flags are cleared. No traps are enabled (so that " +"exceptions are not raised during computations)." +msgstr "" + +#: library/decimal.rst:968 +msgid "" +"Because the traps are disabled, this context is useful for applications that " +"prefer to have result value of ``NaN`` or ``Infinity`` instead of raising " +"exceptions. This allows an application to complete a run in the presence of " +"conditions that would otherwise halt the program." +msgstr "" + +#: library/decimal.rst:976 +msgid "" +"This context is used by the :class:`Context` constructor as a prototype for " +"new contexts. Changing a field (such a precision) has the effect of " +"changing the default for new contexts created by the :class:`Context` " +"constructor." +msgstr "" + +#: library/decimal.rst:980 +msgid "" +"This context is most useful in multi-threaded environments. Changing one of " +"the fields before threads are started has the effect of setting system-wide " +"defaults. Changing the fields after threads have started is not recommended " +"as it would require thread synchronization to prevent race conditions." +msgstr "" + +#: library/decimal.rst:985 +msgid "" +"In single threaded environments, it is preferable to not use this context at " +"all. Instead, simply create contexts explicitly as described below." +msgstr "" + +#: library/decimal.rst:988 +msgid "" +"The default values are :attr:`Context.prec`\\ =\\ ``28``, :attr:`Context." +"rounding`\\ =\\ :const:`ROUND_HALF_EVEN`, and enabled traps for :class:" +"`Overflow`, :class:`InvalidOperation`, and :class:`DivisionByZero`." +msgstr "" + +#: library/decimal.rst:993 +msgid "" +"In addition to the three supplied contexts, new contexts can be created with " +"the :class:`Context` constructor." +msgstr "" + +#: library/decimal.rst:999 +msgid "" +"Creates a new context. If a field is not specified or is :const:`None`, the " +"default values are copied from the :const:`DefaultContext`. If the *flags* " +"field is not specified or is :const:`None`, all flags are cleared." +msgstr "" + +#: library/decimal.rst:1003 +msgid "" +"*prec* is an integer in the range [``1``, :const:`MAX_PREC`] that sets the " +"precision for arithmetic operations in the context." +msgstr "" + +#: library/decimal.rst:1006 +msgid "" +"The *rounding* option is one of the constants listed in the section " +"`Rounding Modes`_." +msgstr "" + +#: library/decimal.rst:1009 +msgid "" +"The *traps* and *flags* fields list any signals to be set. Generally, new " +"contexts should only set traps and leave the flags clear." +msgstr "" + +#: library/decimal.rst:1012 +msgid "" +"The *Emin* and *Emax* fields are integers specifying the outer limits " +"allowable for exponents. *Emin* must be in the range [:const:`MIN_EMIN`, " +"``0``], *Emax* in the range [``0``, :const:`MAX_EMAX`]." +msgstr "" + +#: library/decimal.rst:1016 +msgid "" +"The *capitals* field is either ``0`` or ``1`` (the default). If set to " +"``1``, exponents are printed with a capital ``E``; otherwise, a lowercase " +"``e`` is used: ``Decimal('6.02e+23')``." +msgstr "" + +#: library/decimal.rst:1020 +msgid "" +"The *clamp* field is either ``0`` (the default) or ``1``. If set to ``1``, " +"the exponent ``e`` of a :class:`Decimal` instance representable in this " +"context is strictly limited to the range ``Emin - prec + 1 <= e <= Emax - " +"prec + 1``. If *clamp* is ``0`` then a weaker condition holds: the adjusted " +"exponent of the :class:`Decimal` instance is at most :attr:`~Context.Emax`. " +"When *clamp* is ``1``, a large normal number will, where possible, have its " +"exponent reduced and a corresponding number of zeros added to its " +"coefficient, in order to fit the exponent constraints; this preserves the " +"value of the number but loses information about significant trailing zeros. " +"For example::" +msgstr "" + +#: library/decimal.rst:1035 +msgid "" +"A *clamp* value of ``1`` allows compatibility with the fixed-width decimal " +"interchange formats specified in IEEE 754." +msgstr "" + +#: library/decimal.rst:1038 +msgid "" +"The :class:`Context` class defines several general purpose methods as well " +"as a large number of methods for doing arithmetic directly in a given " +"context. In addition, for each of the :class:`Decimal` methods described " +"above (with the exception of the :meth:`~Decimal.adjusted` and :meth:" +"`~Decimal.as_tuple` methods) there is a corresponding :class:`Context` " +"method. For example, for a :class:`Context` instance ``C`` and :class:" +"`Decimal` instance ``x``, ``C.exp(x)`` is equivalent to ``x." +"exp(context=C)``. Each :class:`Context` method accepts a Python integer (an " +"instance of :class:`int`) anywhere that a Decimal instance is accepted." +msgstr "" + +#: library/decimal.rst:1051 +msgid "Resets all of the flags to ``0``." +msgstr "" + +#: library/decimal.rst:1055 +msgid "Resets all of the traps to ``0``." +msgstr "" + +#: library/decimal.rst:1061 +msgid "Return a duplicate of the context." +msgstr "" + +#: library/decimal.rst:1065 +msgid "Return a copy of the Decimal instance num." +msgstr "" + +#: library/decimal.rst:1069 +msgid "" +"Creates a new Decimal instance from *num* but using *self* as context. " +"Unlike the :class:`Decimal` constructor, the context precision, rounding " +"method, flags, and traps are applied to the conversion." +msgstr "" + +#: library/decimal.rst:1073 +msgid "" +"This is useful because constants are often given to a greater precision than " +"is needed by the application. Another benefit is that rounding immediately " +"eliminates unintended effects from digits beyond the current precision. In " +"the following example, using unrounded inputs means that adding zero to a " +"sum can change the result:" +msgstr "" + +#: library/decimal.rst:1087 +msgid "" +"This method implements the to-number operation of the IBM specification. If " +"the argument is a string, no leading or trailing whitespace or underscores " +"are permitted." +msgstr "" + +#: library/decimal.rst:1093 +msgid "" +"Creates a new Decimal instance from a float *f* but rounding using *self* as " +"the context. Unlike the :meth:`Decimal.from_float` class method, the " +"context precision, rounding method, flags, and traps are applied to the " +"conversion." +msgstr "" + +#: library/decimal.rst:1113 +msgid "" +"Returns a value equal to ``Emin - prec + 1`` which is the minimum exponent " +"value for subnormal results. When underflow occurs, the exponent is set to :" +"const:`Etiny`." +msgstr "" + +#: library/decimal.rst:1119 +msgid "Returns a value equal to ``Emax - prec + 1``." +msgstr "" + +#: library/decimal.rst:1121 +msgid "" +"The usual approach to working with decimals is to create :class:`Decimal` " +"instances and then apply arithmetic operations which take place within the " +"current context for the active thread. An alternative approach is to use " +"context methods for calculating within a specific context. The methods are " +"similar to those for the :class:`Decimal` class and are only briefly " +"recounted here." +msgstr "" + +#: library/decimal.rst:1131 +msgid "Returns the absolute value of *x*." +msgstr "Renvoie la valeur absolue de *x*." + +#: library/decimal.rst:1136 +msgid "Return the sum of *x* and *y*." +msgstr "Renvoie la somme de *x* et *y*." + +#: library/decimal.rst:1141 +msgid "Returns the same Decimal object *x*." +msgstr "" + +#: library/decimal.rst:1146 +msgid "Compares *x* and *y* numerically." +msgstr "" + +#: library/decimal.rst:1151 +msgid "Compares the values of the two operands numerically." +msgstr "" + +#: library/decimal.rst:1156 +msgid "Compares two operands using their abstract representation." +msgstr "" + +#: library/decimal.rst:1161 +msgid "" +"Compares two operands using their abstract representation, ignoring sign." +msgstr "" + +#: library/decimal.rst:1166 +msgid "Returns a copy of *x* with the sign set to 0." +msgstr "" + +#: library/decimal.rst:1171 +msgid "Returns a copy of *x* with the sign inverted." +msgstr "Renvoie une copie de *x* mais de signe opposé." + +#: library/decimal.rst:1176 +msgid "Copies the sign from *y* to *x*." +msgstr "Copie le signe de *y* vers *x*." + +#: library/decimal.rst:1181 +msgid "Return *x* divided by *y*." +msgstr "Renvoie *x* divisé par *y*." + +#: library/decimal.rst:1186 +msgid "Return *x* divided by *y*, truncated to an integer." +msgstr "Renvoie *x* divisé par *y*, tronqué comme entier." + +#: library/decimal.rst:1191 +msgid "Divides two numbers and returns the integer part of the result." +msgstr "Renvoie la partie entière de la division entre deux nombres." + +#: library/decimal.rst:1196 +msgid "Returns ``e ** x``." +msgstr "Renvoie ``e ** x``." + +#: library/decimal.rst:1201 +msgid "Returns *x* multiplied by *y*, plus *z*." +msgstr "Renvoie *x* multiplié par *y*, plus *z*." + +#: library/decimal.rst:1206 +msgid "Returns ``True`` if *x* is canonical; otherwise returns ``False``." +msgstr "" + +#: library/decimal.rst:1211 +msgid "Returns ``True`` if *x* is finite; otherwise returns ``False``." +msgstr "" + +#: library/decimal.rst:1216 +msgid "Returns ``True`` if *x* is infinite; otherwise returns ``False``." +msgstr "Renvoie ``True`` si *x* est infini et ``False`` sinon." + +#: library/decimal.rst:1221 +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:1226 +msgid "" +"Returns ``True`` if *x* is a normal number; otherwise returns ``False``." +msgstr "" + +#: library/decimal.rst:1231 +msgid "Returns ``True`` if *x* is a quiet NaN; otherwise returns ``False``." +msgstr "Renvoie ``True`` si *x* est un NaN silencieux et ``False`` sinon." + +#: library/decimal.rst:1236 +msgid "Returns ``True`` if *x* is negative; otherwise returns ``False``." +msgstr "Renvoie ``True`` si *x* est négatif et ``False`` sinon." + +#: library/decimal.rst:1241 +msgid "" +"Returns ``True`` if *x* is a signaling NaN; otherwise returns ``False``." +msgstr "Renvoie ``True`` si *x* est un NaN signalétique et ``False`` sinon." + +#: library/decimal.rst:1246 +msgid "Returns ``True`` if *x* is subnormal; otherwise returns ``False``." +msgstr "" + +#: library/decimal.rst:1251 +msgid "Returns ``True`` if *x* is a zero; otherwise returns ``False``." +msgstr "Renvoie ``True`` si *x* est un zéro et ``False`` sinon." + +#: library/decimal.rst:1256 +msgid "Returns the natural (base e) logarithm of *x*." +msgstr "Renvoie le logarithme naturel (en base e) de *x*." + +#: library/decimal.rst:1261 +msgid "Returns the base 10 logarithm of *x*." +msgstr "Renvoie le logarithme en base 10 de *x*." + +#: library/decimal.rst:1266 +msgid "Returns the exponent of the magnitude of the operand's MSD." +msgstr "" + +#: library/decimal.rst:1271 +msgid "Applies the logical operation *and* between each operand's digits." +msgstr "" + +#: library/decimal.rst:1276 +msgid "Invert all the digits in *x*." +msgstr "" + +#: library/decimal.rst:1281 +msgid "Applies the logical operation *or* between each operand's digits." +msgstr "" + +#: library/decimal.rst:1286 +msgid "Applies the logical operation *xor* between each operand's digits." +msgstr "" + +#: library/decimal.rst:1291 +msgid "Compares two values numerically and returns the maximum." +msgstr "Renvoie le maximum entre les deux valeurs numériques." + +#: library/decimal.rst:1306 +msgid "Compares the values numerically with their sign ignored." +msgstr "" + +#: library/decimal.rst:1301 +msgid "Compares two values numerically and returns the minimum." +msgstr "" + +#: library/decimal.rst:1311 +msgid "Minus corresponds to the unary prefix minus operator in Python." +msgstr "" + +#: library/decimal.rst:1316 +msgid "Return the product of *x* and *y*." +msgstr "Renvoie la multiplication de *x* avec *y*." + +#: library/decimal.rst:1321 +msgid "Returns the largest representable number smaller than *x*." +msgstr "" + +#: library/decimal.rst:1326 +msgid "Returns the smallest representable number larger than *x*." +msgstr "" + +#: library/decimal.rst:1331 +msgid "Returns the number closest to *x*, in direction towards *y*." +msgstr "" + +#: library/decimal.rst:1336 +msgid "Reduces *x* to its simplest form." +msgstr "Réduit *x* à sa forme la plus simple." + +#: library/decimal.rst:1341 +msgid "Returns an indication of the class of *x*." +msgstr "" + +#: library/decimal.rst:1346 +msgid "" +"Plus corresponds to the unary prefix plus operator in Python. This " +"operation applies the context precision and rounding, so it is *not* an " +"identity operation." +msgstr "" + +#: library/decimal.rst:1353 +msgid "Return ``x`` to the power of ``y``, reduced modulo ``modulo`` if given." +msgstr "" + +#: library/decimal.rst:1355 +msgid "" +"With two arguments, compute ``x**y``. If ``x`` is negative then ``y`` must " +"be integral. The result will be inexact unless ``y`` is integral and the " +"result is finite and can be expressed exactly in 'precision' digits. The " +"rounding mode of the context is used. Results are always correctly rounded " +"in the Python version." +msgstr "" + +#: library/decimal.rst:1361 +msgid "" +"``Decimal(0) ** Decimal(0)`` results in ``InvalidOperation``, and if " +"``InvalidOperation`` is not trapped, then results in ``Decimal('NaN')``." +msgstr "" + +#: library/decimal.rst:1364 +msgid "" +"The C module computes :meth:`power` in terms of the correctly rounded :meth:" +"`exp` and :meth:`ln` functions. The result is well-defined but only \"almost " +"always correctly rounded\"." +msgstr "" + +#: library/decimal.rst:1369 +msgid "" +"With three arguments, compute ``(x**y) % modulo``. For the three argument " +"form, the following restrictions on the arguments hold:" +msgstr "" + +#: library/decimal.rst:1372 +msgid "all three arguments must be integral" +msgstr "" + +# Élément d'une liste, d'où le ; final +#: library/decimal.rst:1373 +msgid "``y`` must be nonnegative" +msgstr "``y`` ne doit pas être négatif ;" + +# Élément d'une liste, d'où le ; final +#: library/decimal.rst:1374 +msgid "at least one of ``x`` or ``y`` must be nonzero" +msgstr "au moins l'un de ``x`` ou ``y`` doit être différent de zéro ;" + +#: library/decimal.rst:1375 +msgid "``modulo`` must be nonzero and have at most 'precision' digits" +msgstr "" + +#: library/decimal.rst:1377 +msgid "" +"The value resulting from ``Context.power(x, y, modulo)`` is equal to the " +"value that would be obtained by computing ``(x**y) % modulo`` with unbounded " +"precision, but is computed more efficiently. The exponent of the result is " +"zero, regardless of the exponents of ``x``, ``y`` and ``modulo``. The " +"result is always exact." +msgstr "" + +#: library/decimal.rst:1387 +msgid "Returns a value equal to *x* (rounded), having the exponent of *y*." +msgstr "" + +#: library/decimal.rst:1392 +msgid "Just returns 10, as this is Decimal, :)" +msgstr "Renvoie 10 car c'est Decimal, :)" + +#: library/decimal.rst:1397 +msgid "Returns the remainder from integer division." +msgstr "Donne le reste de la division entière." + +#: library/decimal.rst:1399 +msgid "" +"The sign of the result, if non-zero, is the same as that of the original " +"dividend." +msgstr "" + +#: library/decimal.rst:1405 +msgid "" +"Returns ``x - y * n``, where *n* is the integer nearest the exact value of " +"``x / y`` (if the result is 0 then its sign will be the sign of *x*)." +msgstr "" + +#: library/decimal.rst:1411 +msgid "Returns a rotated copy of *x*, *y* times." +msgstr "" + +#: library/decimal.rst:1416 +msgid "Returns ``True`` if the two operands have the same exponent." +msgstr "Renvoie ``True`` si les deux opérandes ont le même exposant." + +#: library/decimal.rst:1421 +msgid "Returns the first operand after adding the second value its exp." +msgstr "" + +#: library/decimal.rst:1426 +msgid "Returns a shifted copy of *x*, *y* times." +msgstr "" + +#: library/decimal.rst:1431 +msgid "Square root of a non-negative number to context precision." +msgstr "" + +#: library/decimal.rst:1436 +msgid "Return the difference between *x* and *y*." +msgstr "" + +#: library/decimal.rst:1450 +msgid "Rounds to an integer." +msgstr "" + +#: library/decimal.rst:1455 +msgid "Converts a number to a string using scientific notation." +msgstr "" + +#: library/decimal.rst:1462 +msgid "Constants" +msgstr "Constantes" + +#: library/decimal.rst:1464 +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:1468 +msgid "32-bit" +msgstr "32-bit" + +#: library/decimal.rst:1468 +msgid "64-bit" +msgstr "64-bit" + +#: library/decimal.rst:1472 +#, fuzzy +msgid "``425000000``" +msgstr ":const:`425000000`" + +#: library/decimal.rst:1472 +#, fuzzy +msgid "``999999999999999999``" +msgstr ":const:`999999999999999999`" + +#: library/decimal.rst:1474 +#, fuzzy +msgid "``-425000000``" +msgstr ":const:`-425000000`" + +#: library/decimal.rst:1474 +#, fuzzy +msgid "``-999999999999999999``" +msgstr ":const:`-999999999999999999`" + +#: library/decimal.rst:1476 +#, fuzzy +msgid "``-849999999``" +msgstr ":const:`-849999999`" + +#: library/decimal.rst:1476 +#, fuzzy +msgid "``-1999999999999999997``" +msgstr ":const:`-1999999999999999997`" + +#: library/decimal.rst:1482 +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:1488 +msgid "" +"The default value is ``True``. If Python is :option:`configured using the --" +"without-decimal-contextvar option <--without-decimal-contextvar>`, the C " +"version uses a thread-local rather than a coroutine-local context and the " +"value is ``False``. This is slightly faster in some nested context " +"scenarios." +msgstr "" + +#: library/decimal.rst:1493 +msgid "backported to 3.7 and 3.8." +msgstr "" + +#: library/decimal.rst:1497 +msgid "Rounding modes" +msgstr "Modes d'arrondi" + +#: library/decimal.rst:1501 +msgid "Round towards ``Infinity``." +msgstr "" + +#: library/decimal.rst:1505 +msgid "Round towards zero." +msgstr "" + +#: library/decimal.rst:1509 +msgid "Round towards ``-Infinity``." +msgstr "" + +#: library/decimal.rst:1513 +msgid "Round to nearest with ties going towards zero." +msgstr "" + +#: library/decimal.rst:1517 +msgid "Round to nearest with ties going to nearest even integer." +msgstr "" + +#: library/decimal.rst:1521 +msgid "Round to nearest with ties going away from zero." +msgstr "" + +#: library/decimal.rst:1525 +msgid "Round away from zero." +msgstr "" + +#: library/decimal.rst:1529 +msgid "" +"Round away from zero if last digit after rounding towards zero would have " +"been 0 or 5; otherwise round towards zero." +msgstr "" + +#: library/decimal.rst:1536 +msgid "Signals" +msgstr "Signaux" + +#: library/decimal.rst:1538 +msgid "" +"Signals represent conditions that arise during computation. Each corresponds " +"to one context flag and one context trap enabler." +msgstr "" + +#: library/decimal.rst:1541 +msgid "" +"The context flag is set whenever the condition is encountered. After the " +"computation, flags may be checked for informational purposes (for instance, " +"to determine whether a computation was exact). After checking the flags, be " +"sure to clear all flags before starting the next computation." +msgstr "" + +#: library/decimal.rst:1546 +msgid "" +"If the context's trap enabler is set for the signal, then the condition " +"causes a Python exception to be raised. For example, if the :class:" +"`DivisionByZero` trap is set, then a :exc:`DivisionByZero` exception is " +"raised upon encountering the condition." +msgstr "" + +#: library/decimal.rst:1554 +msgid "Altered an exponent to fit representation constraints." +msgstr "" + +#: library/decimal.rst:1556 +msgid "" +"Typically, clamping occurs when an exponent falls outside the context's :" +"attr:`~Context.Emin` and :attr:`~Context.Emax` limits. If possible, the " +"exponent is reduced to fit by adding zeros to the coefficient." +msgstr "" + +#: library/decimal.rst:1563 +msgid "Base class for other signals and a subclass of :exc:`ArithmeticError`." +msgstr "" + +#: library/decimal.rst:1568 +msgid "Signals the division of a non-infinite number by zero." +msgstr "" + +#: library/decimal.rst:1570 +msgid "" +"Can occur with division, modulo division, or when raising a number to a " +"negative power. If this signal is not trapped, returns ``Infinity`` or ``-" +"Infinity`` with the sign determined by the inputs to the calculation." +msgstr "" + +#: library/decimal.rst:1577 +msgid "Indicates that rounding occurred and the result is not exact." +msgstr "" + +#: library/decimal.rst:1579 +msgid "" +"Signals when non-zero digits were discarded during rounding. The rounded " +"result is returned. The signal flag or trap is used to detect when results " +"are inexact." +msgstr "" + +#: library/decimal.rst:1586 +msgid "An invalid operation was performed." +msgstr "" + +#: library/decimal.rst:1588 +msgid "" +"Indicates that an operation was requested that does not make sense. If not " +"trapped, returns ``NaN``. Possible causes include::" +msgstr "" + +#: library/decimal.rst:1604 +msgid "Numerical overflow." +msgstr "Débordement numérique." + +#: library/decimal.rst:1606 +msgid "" +"Indicates the exponent is larger than :attr:`Context.Emax` after rounding " +"has occurred. If not trapped, the result depends on the rounding mode, " +"either pulling inward to the largest representable finite number or rounding " +"outward to ``Infinity``. In either case, :class:`Inexact` and :class:" +"`Rounded` are also signaled." +msgstr "" + +#: library/decimal.rst:1615 +msgid "Rounding occurred though possibly no information was lost." +msgstr "" + +#: library/decimal.rst:1617 +msgid "" +"Signaled whenever rounding discards digits; even if those digits are zero " +"(such as rounding ``5.00`` to ``5.0``). If not trapped, returns the result " +"unchanged. This signal is used to detect loss of significant digits." +msgstr "" + +#: library/decimal.rst:1625 +msgid "Exponent was lower than :attr:`~Context.Emin` prior to rounding." +msgstr "" + +#: library/decimal.rst:1627 +msgid "" +"Occurs when an operation result is subnormal (the exponent is too small). If " +"not trapped, returns the result unchanged." +msgstr "" + +#: library/decimal.rst:1633 +msgid "Numerical underflow with result rounded to zero." +msgstr "" + +#: library/decimal.rst:1635 +msgid "" +"Occurs when a subnormal result is pushed to zero by rounding. :class:" +"`Inexact` and :class:`Subnormal` are also signaled." +msgstr "" + +#: library/decimal.rst:1641 +msgid "Enable stricter semantics for mixing floats and Decimals." +msgstr "" + +#: library/decimal.rst:1643 +msgid "" +"If the signal is not trapped (default), mixing floats and Decimals is " +"permitted in the :class:`~decimal.Decimal` constructor, :meth:`~decimal." +"Context.create_decimal` and all comparison operators. Both conversion and " +"comparisons are exact. Any occurrence of a mixed operation is silently " +"recorded by setting :exc:`FloatOperation` in the context flags. Explicit " +"conversions with :meth:`~decimal.Decimal.from_float` or :meth:`~decimal." +"Context.create_decimal_from_float` do not set the flag." +msgstr "" + +#: library/decimal.rst:1651 +msgid "" +"Otherwise (the signal is trapped), only equality comparisons and explicit " +"conversions are silent. All other mixed operations raise :exc:" +"`FloatOperation`." +msgstr "" + +#: library/decimal.rst:1655 +msgid "The following table summarizes the hierarchy of signals::" +msgstr "" + +#: library/decimal.rst:1676 +msgid "Floating Point Notes" +msgstr "" + +#: library/decimal.rst:1680 +msgid "Mitigating round-off error with increased precision" +msgstr "" + +#: library/decimal.rst:1682 +msgid "" +"The use of decimal floating point eliminates decimal representation error " +"(making it possible to represent ``0.1`` exactly); however, some operations " +"can still incur round-off error when non-zero digits exceed the fixed " +"precision." +msgstr "" + +#: library/decimal.rst:1686 +msgid "" +"The effects of round-off error can be amplified by the addition or " +"subtraction of nearly offsetting quantities resulting in loss of " +"significance. Knuth provides two instructive examples where rounded " +"floating point arithmetic with insufficient precision causes the breakdown " +"of the associative and distributive properties of addition:" +msgstr "" + +#: library/decimal.rst:1710 +msgid "" +"The :mod:`decimal` module makes it possible to restore the identities by " +"expanding the precision sufficiently to avoid loss of significance:" +msgstr "" + +#: library/decimal.rst:1730 +msgid "Special values" +msgstr "" + +#: library/decimal.rst:1732 +msgid "" +"The number system for the :mod:`decimal` module provides special values " +"including ``NaN``, ``sNaN``, ``-Infinity``, ``Infinity``, and two zeros, " +"``+0`` and ``-0``." +msgstr "" + +#: library/decimal.rst:1736 +msgid "" +"Infinities can be constructed directly with: ``Decimal('Infinity')``. Also, " +"they can arise from dividing by zero when the :exc:`DivisionByZero` signal " +"is not trapped. Likewise, when the :exc:`Overflow` signal is not trapped, " +"infinity can result from rounding beyond the limits of the largest " +"representable number." +msgstr "" + +#: library/decimal.rst:1741 +msgid "" +"The infinities are signed (affine) and can be used in arithmetic operations " +"where they get treated as very large, indeterminate numbers. For instance, " +"adding a constant to infinity gives another infinite result." +msgstr "" + +#: library/decimal.rst:1745 +msgid "" +"Some operations are indeterminate and return ``NaN``, or if the :exc:" +"`InvalidOperation` signal is trapped, raise an exception. For example, " +"``0/0`` returns ``NaN`` which means \"not a number\". This variety of " +"``NaN`` is quiet and, once created, will flow through other computations " +"always resulting in another ``NaN``. This behavior can be useful for a " +"series of computations that occasionally have missing inputs --- it allows " +"the calculation to proceed while flagging specific results as invalid." +msgstr "" + +#: library/decimal.rst:1753 +msgid "" +"A variant is ``sNaN`` which signals rather than remaining quiet after every " +"operation. This is a useful return value when an invalid result needs to " +"interrupt a calculation for special handling." +msgstr "" + +#: library/decimal.rst:1757 +msgid "" +"The behavior of Python's comparison operators can be a little surprising " +"where a ``NaN`` is involved. A test for equality where one of the operands " +"is a quiet or signaling ``NaN`` always returns :const:`False` (even when " +"doing ``Decimal('NaN')==Decimal('NaN')``), while a test for inequality " +"always returns :const:`True`. An attempt to compare two Decimals using any " +"of the ``<``, ``<=``, ``>`` or ``>=`` operators will raise the :exc:" +"`InvalidOperation` signal if either operand is a ``NaN``, and return :const:" +"`False` if this signal is not trapped. Note that the General Decimal " +"Arithmetic specification does not specify the behavior of direct " +"comparisons; these rules for comparisons involving a ``NaN`` were taken from " +"the IEEE 854 standard (see Table 3 in section 5.7). To ensure strict " +"standards-compliance, use the :meth:`~Decimal.compare` and :meth:`~Decimal." +"compare_signal` methods instead." +msgstr "" + +#: library/decimal.rst:1770 +msgid "" +"The signed zeros can result from calculations that underflow. They keep the " +"sign that would have resulted if the calculation had been carried out to " +"greater precision. Since their magnitude is zero, both positive and " +"negative zeros are treated as equal and their sign is informational." +msgstr "" + +#: library/decimal.rst:1775 +msgid "" +"In addition to the two signed zeros which are distinct yet equal, there are " +"various representations of zero with differing precisions yet equivalent in " +"value. This takes a bit of getting used to. For an eye accustomed to " +"normalized floating point representations, it is not immediately obvious " +"that the following calculation returns a value equal to zero:" +msgstr "" + +#: library/decimal.rst:1790 +msgid "Working with threads" +msgstr "" + +#: library/decimal.rst:1792 +msgid "" +"The :func:`getcontext` function accesses a different :class:`Context` object " +"for each thread. Having separate thread contexts means that threads may " +"make changes (such as ``getcontext().prec=10``) without interfering with " +"other threads." +msgstr "" + +#: library/decimal.rst:1796 +msgid "" +"Likewise, the :func:`setcontext` function automatically assigns its target " +"to the current thread." +msgstr "" + +#: library/decimal.rst:1799 +msgid "" +"If :func:`setcontext` has not been called before :func:`getcontext`, then :" +"func:`getcontext` will automatically create a new context for use in the " +"current thread." +msgstr "" + +#: library/decimal.rst:1803 +msgid "" +"The new context is copied from a prototype context called *DefaultContext*. " +"To control the defaults so that each thread will use the same values " +"throughout the application, directly modify the *DefaultContext* object. " +"This should be done *before* any threads are started so that there won't be " +"a race condition between threads calling :func:`getcontext`. For example::" +msgstr "" + +#: library/decimal.rst:1828 +msgid "Recipes" +msgstr "Cas pratiques" + +#: library/decimal.rst:1830 +msgid "" +"Here are a few recipes that serve as utility functions and that demonstrate " +"ways to work with the :class:`Decimal` class::" +msgstr "" + +#: library/decimal.rst:1985 +msgid "Decimal FAQ" +msgstr "FAQ *decimal*" + +#: library/decimal.rst:1987 +msgid "" +"Q. It is cumbersome to type ``decimal.Decimal('1234.5')``. Is there a way " +"to minimize typing when using the interactive interpreter?" +msgstr "" +"Q. C'est fastidieux de taper ``decimal.Decimal('1234.5')``. Y a-t-il un " +"moyen de réduire la frappe quand on utilise l'interpréteur interactif ?" + +#: library/decimal.rst:1990 +msgid "A. Some users abbreviate the constructor to just a single letter:" +msgstr "" +"R. Certains utilisateurs abrègent le constructeur en une seule lettre :" + +#: library/decimal.rst:1996 +msgid "" +"Q. In a fixed-point application with two decimal places, some inputs have " +"many places and need to be rounded. Others are not supposed to have excess " +"digits and need to be validated. What methods should be used?" +msgstr "" + +#: library/decimal.rst:2000 +msgid "" +"A. The :meth:`~Decimal.quantize` method rounds to a fixed number of decimal " +"places. If the :const:`Inexact` trap is set, it is also useful for " +"validation:" +msgstr "" + +#: library/decimal.rst:2018 +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:2021 +#, fuzzy +msgid "" +"A. Some operations like addition, subtraction, and multiplication by an " +"integer will automatically preserve fixed point. Others operations, like " +"division and non-integer multiplication, will change the number of decimal " +"places and need to be followed-up with a :meth:`~Decimal.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:2039 +#, fuzzy +msgid "" +"In developing fixed-point applications, it is convenient to define functions " +"to handle the :meth:`~Decimal.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:2052 +msgid "" +"Q. There are many ways to express the same value. The numbers ``200``, " +"``200.000``, ``2E2``, and ``.02E+4`` all have the same value at various " +"precisions. Is there a way to transform them to a single recognizable " +"canonical value?" +msgstr "" + +#: library/decimal.rst:2057 +msgid "" +"A. The :meth:`~Decimal.normalize` method maps all equivalent values to a " +"single representative:" +msgstr "" + +#: library/decimal.rst:2064 +msgid "" +"Q. Some decimal values always print with exponential notation. Is there a " +"way to get a non-exponential representation?" +msgstr "" + +#: library/decimal.rst:2067 +msgid "" +"A. For some values, exponential notation is the only way to express the " +"number of significant places in the coefficient. For example, expressing " +"``5.0E+3`` as ``5000`` keeps the value constant but cannot show the " +"original's two-place significance." +msgstr "" + +#: library/decimal.rst:2072 +msgid "" +"If an application does not care about tracking significance, it is easy to " +"remove the exponent and trailing zeroes, losing significance, but keeping " +"the value unchanged:" +msgstr "" + +#: library/decimal.rst:2082 +msgid "Q. Is there a way to convert a regular float to a :class:`Decimal`?" +msgstr "" + +#: library/decimal.rst:2084 +msgid "" +"A. Yes, any binary floating point number can be exactly expressed as a " +"Decimal though an exact conversion may take more precision than intuition " +"would suggest:" +msgstr "" + +#: library/decimal.rst:2093 +msgid "" +"Q. Within a complex calculation, how can I make sure that I haven't gotten a " +"spurious result because of insufficient precision or rounding anomalies." +msgstr "" + +#: library/decimal.rst:2096 +msgid "" +"A. The decimal module makes it easy to test results. A best practice is to " +"re-run calculations using greater precision and with various rounding modes. " +"Widely differing results indicate insufficient precision, rounding mode " +"issues, ill-conditioned inputs, or a numerically unstable algorithm." +msgstr "" + +#: library/decimal.rst:2101 +msgid "" +"Q. I noticed that context precision is applied to the results of operations " +"but not to the inputs. Is there anything to watch out for when mixing " +"values of different precisions?" +msgstr "" + +#: library/decimal.rst:2105 +msgid "" +"A. Yes. The principle is that all values are considered to be exact and so " +"is the arithmetic on those values. Only the results are rounded. The " +"advantage for inputs is that \"what you type is what you get\". A " +"disadvantage is that the results can look odd if you forget that the inputs " +"haven't been rounded:" +msgstr "" + +#: library/decimal.rst:2118 +msgid "" +"The solution is either to increase precision or to force rounding of inputs " +"using the unary plus operation:" +msgstr "" + +#: library/decimal.rst:2127 +msgid "" +"Alternatively, inputs can be rounded upon creation using the :meth:`Context." +"create_decimal` method:" +msgstr "" + +#: library/decimal.rst:2133 +msgid "Q. Is the CPython implementation fast for large numbers?" +msgstr "" + +#: library/decimal.rst:2135 +msgid "" +"A. Yes. In the CPython and PyPy3 implementations, the C/CFFI versions of " +"the decimal module integrate the high speed `libmpdec `_ library for arbitrary precision " +"correctly rounded decimal floating point arithmetic [#]_. ``libmpdec`` uses " +"`Karatsuba multiplication `_ for medium-sized numbers and the `Number Theoretic " +"Transform `_ for very " +"large numbers." +msgstr "" + +#: library/decimal.rst:2145 +msgid "" +"The context must be adapted for exact arbitrary precision arithmetic. :attr:" +"`~Context.Emin` and :attr:`~Context.Emax` should always be set to the " +"maximum values, :attr:`~Context.clamp` should always be 0 (the default). " +"Setting :attr:`~Context.prec` requires some care." +msgstr "" + +#: library/decimal.rst:2149 +msgid "" +"The easiest approach for trying out bignum arithmetic is to use the maximum " +"value for :attr:`~Context.prec` as well [#]_::" +msgstr "" + +#: library/decimal.rst:2158 +msgid "" +"For inexact results, :attr:`MAX_PREC` is far too large on 64-bit platforms " +"and the available memory will be insufficient::" +msgstr "" + +#: library/decimal.rst:2166 +msgid "" +"On systems with overallocation (e.g. Linux), a more sophisticated approach " +"is to adjust :attr:`~Context.prec` to the amount of available RAM. Suppose " +"that you have 8GB of RAM and expect 10 simultaneous operands using a maximum " +"of 500MB each::" +msgstr "" + +#: library/decimal.rst:2190 +msgid "" +"In general (and especially on systems without overallocation), it is " +"recommended to estimate even tighter bounds and set the :attr:`Inexact` trap " +"if all calculations are expected to be exact." +msgstr "" + +#: library/decimal.rst:2199 +msgid "" +"This approach now works for all exact results except for non-integer powers." +msgstr "" diff --git a/library/development.po b/library/development.po new file mode 100644 index 0000000000..52c605237a --- /dev/null +++ b/library/development.po @@ -0,0 +1,48 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +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-09-29 15:32+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.0.2\n" + +#: library/development.rst:5 +msgid "Development Tools" +msgstr "Outils de développement" + +#: library/development.rst:7 +msgid "" +"The modules described in this chapter help you write software. For example, " +"the :mod:`pydoc` module takes a module and generates documentation based on " +"the module's contents. The :mod:`doctest` and :mod:`unittest` modules " +"contains frameworks for writing unit tests that automatically exercise code " +"and verify that the expected output is produced. :program:`2to3` can " +"translate Python 2.x source code into valid Python 3.x code." +msgstr "" +"Les modules décrits dans ce chapitre vous aident à écrire des logiciels. " +"Par exemple, le module :mod:`pydoc` prend un module et génère de la " +"documentation basée sur son contenu. Les modules :mod:`doctest` et :mod:" +"`unittest` contiennent des cades applicatifs pour écrire des tests unitaires " +"qui permettent de valider automatiquement le code en vérifiant que chaque " +"résultat attendu est produit. Le programme :program:`2to3` peut traduire du " +"code Python 2.x en Python 3.x." + +#: library/development.rst:14 +msgid "The list of modules described in this chapter is:" +msgstr "La liste des modules documentés dans ce chapitre est :" + +#~ msgid "" +#~ "See also the Python development mode: the :option:`-X` ``dev`` option " +#~ "and :envvar:`PYTHONDEVMODE` environment variable." +#~ msgstr "" +#~ "Regardez aussi le \"mode développement\" de Python : l'option :option:`-" +#~ "X` ``dev`` et la variable d'environnement :envvar:`PYTHONDEVMODE`." diff --git a/library/devmode.po b/library/devmode.po new file mode 100644 index 0000000000..4a067470d9 --- /dev/null +++ b/library/devmode.po @@ -0,0 +1,288 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-09-23 16:16+0200\n" +"PO-Revision-Date: 2020-07-20 15:08+0200\n" +"Last-Translator: FULL NAME \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" + +#: library/devmode.rst:4 +msgid "Python Development Mode" +msgstr "" + +#: library/devmode.rst:8 +msgid "" +"The Python Development Mode introduces additional runtime checks that are " +"too expensive to be enabled by default. It should not be more verbose than " +"the default if the code is correct; new warnings are only emitted when an " +"issue is detected." +msgstr "" + +#: library/devmode.rst:13 +msgid "" +"It can be enabled using the :option:`-X dev <-X>` command line option or by " +"setting the :envvar:`PYTHONDEVMODE` environment variable to ``1``." +msgstr "" + +#: library/devmode.rst:16 +msgid "See also :ref:`Python debug build `." +msgstr "" + +#: library/devmode.rst:19 +msgid "Effects of the Python Development Mode" +msgstr "" + +#: library/devmode.rst:21 +msgid "" +"Enabling the Python Development Mode is similar to the following command, " +"but with additional effects described below::" +msgstr "" + +#: library/devmode.rst:26 +msgid "Effects of the Python Development Mode:" +msgstr "" + +#: library/devmode.rst:28 +msgid "" +"Add ``default`` :ref:`warning filter `. The " +"following warnings are shown:" +msgstr "" + +#: library/devmode.rst:31 +msgid ":exc:`DeprecationWarning`" +msgstr ":exc:`DeprecationWarning`" + +#: library/devmode.rst:32 +msgid ":exc:`ImportWarning`" +msgstr ":exc:`ImportWarning`" + +#: library/devmode.rst:33 +msgid ":exc:`PendingDeprecationWarning`" +msgstr ":exc:`PendingDeprecationWarning`" + +#: library/devmode.rst:34 +msgid ":exc:`ResourceWarning`" +msgstr ":exc:`ResourceWarning`" + +#: library/devmode.rst:36 +msgid "" +"Normally, the above warnings are filtered by the default :ref:`warning " +"filters `." +msgstr "" + +#: library/devmode.rst:39 +msgid "" +"It behaves as if the :option:`-W default <-W>` command line option is used." +msgstr "" + +#: library/devmode.rst:41 +msgid "" +"Use the :option:`-W error <-W>` command line option or set the :envvar:" +"`PYTHONWARNINGS` environment variable to ``error`` to treat warnings as " +"errors." +msgstr "" + +#: library/devmode.rst:45 +msgid "Install debug hooks on memory allocators to check for:" +msgstr "" + +#: library/devmode.rst:47 +msgid "Buffer underflow" +msgstr "" + +#: library/devmode.rst:48 +msgid "Buffer overflow" +msgstr "" + +#: library/devmode.rst:49 +msgid "Memory allocator API violation" +msgstr "" + +#: library/devmode.rst:50 +msgid "Unsafe usage of the GIL" +msgstr "" + +#: library/devmode.rst:52 +msgid "See the :c:func:`PyMem_SetupDebugHooks` C function." +msgstr "" + +#: library/devmode.rst:54 +msgid "" +"It behaves as if the :envvar:`PYTHONMALLOC` environment variable is set to " +"``debug``." +msgstr "" + +#: library/devmode.rst:57 +msgid "" +"To enable the Python Development Mode without installing debug hooks on " +"memory allocators, set the :envvar:`PYTHONMALLOC` environment variable to " +"``default``." +msgstr "" + +#: library/devmode.rst:61 +msgid "" +"Call :func:`faulthandler.enable` at Python startup to install handlers for " +"the :const:`SIGSEGV`, :const:`SIGFPE`, :const:`SIGABRT`, :const:`SIGBUS` " +"and :const:`SIGILL` signals to dump the Python traceback on a crash." +msgstr "" + +#: library/devmode.rst:65 +msgid "" +"It behaves as if the :option:`-X faulthandler <-X>` command line option is " +"used or if the :envvar:`PYTHONFAULTHANDLER` environment variable is set to " +"``1``." +msgstr "" + +#: library/devmode.rst:69 +msgid "" +"Enable :ref:`asyncio debug mode `. For example, :mod:" +"`asyncio` checks for coroutines that were not awaited and logs them." +msgstr "" + +#: library/devmode.rst:72 +msgid "" +"It behaves as if the :envvar:`PYTHONASYNCIODEBUG` environment variable is " +"set to ``1``." +msgstr "" + +#: library/devmode.rst:75 +msgid "" +"Check the *encoding* and *errors* arguments for string encoding and decoding " +"operations. Examples: :func:`open`, :meth:`str.encode` and :meth:`bytes." +"decode`." +msgstr "" + +#: library/devmode.rst:79 +msgid "" +"By default, for best performance, the *errors* argument is only checked at " +"the first encoding/decoding error and the *encoding* argument is sometimes " +"ignored for empty strings." +msgstr "" + +#: library/devmode.rst:83 +msgid "The :class:`io.IOBase` destructor logs ``close()`` exceptions." +msgstr "" + +#: library/devmode.rst:84 +msgid "" +"Set the :attr:`~sys.flags.dev_mode` attribute of :attr:`sys.flags` to " +"``True``." +msgstr "" +"Définit l'attribut :attr:`~sys.flags.dev_mode` de :attr:`sys.flags` à " +"``True``" + +#: library/devmode.rst:87 +msgid "" +"The Python Development Mode does not enable the :mod:`tracemalloc` module by " +"default, because the overhead cost (to performance and memory) would be too " +"large. Enabling the :mod:`tracemalloc` module provides additional " +"information on the origin of some errors. For example, :exc:" +"`ResourceWarning` logs the traceback where the resource was allocated, and a " +"buffer overflow error logs the traceback where the memory block was " +"allocated." +msgstr "" + +#: library/devmode.rst:94 +msgid "" +"The Python Development Mode does not prevent the :option:`-O` command line " +"option from removing :keyword:`assert` statements nor from setting :const:" +"`__debug__` to ``False``." +msgstr "" + +#: library/devmode.rst:98 +msgid "" +"The Python Development Mode can only be enabled at the Python startup. Its " +"value can be read from :data:`sys.flags.dev_mode `." +msgstr "" + +#: library/devmode.rst:101 +msgid "The :class:`io.IOBase` destructor now logs ``close()`` exceptions." +msgstr "" + +#: library/devmode.rst:104 +msgid "" +"The *encoding* and *errors* arguments are now checked for string encoding " +"and decoding operations." +msgstr "" + +#: library/devmode.rst:110 +msgid "ResourceWarning Example" +msgstr "" + +#: library/devmode.rst:112 +msgid "" +"Example of a script counting the number of lines of the text file specified " +"in the command line::" +msgstr "" + +#: library/devmode.rst:126 +msgid "" +"The script does not close the file explicitly. By default, Python does not " +"emit any warning. Example using README.txt, which has 269 lines:" +msgstr "" + +#: library/devmode.rst:134 +msgid "" +"Enabling the Python Development Mode displays a :exc:`ResourceWarning` " +"warning:" +msgstr "" + +#: library/devmode.rst:144 +msgid "" +"In addition, enabling :mod:`tracemalloc` shows the line where the file was " +"opened:" +msgstr "" + +#: library/devmode.rst:159 +msgid "" +"The fix is to close explicitly the file. Example using a context manager::" +msgstr "" + +#: library/devmode.rst:167 +msgid "" +"Not closing a resource explicitly can leave a resource open for way longer " +"than expected; it can cause severe issues upon exiting Python. It is bad in " +"CPython, but it is even worse in PyPy. Closing resources explicitly makes an " +"application more deterministic and more reliable." +msgstr "" + +#: library/devmode.rst:174 +msgid "Bad file descriptor error example" +msgstr "" + +#: library/devmode.rst:176 +msgid "Script displaying the first line of itself::" +msgstr "" + +#: library/devmode.rst:189 +msgid "By default, Python does not emit any warning:" +msgstr "" + +#: library/devmode.rst:196 +msgid "" +"The Python Development Mode shows a :exc:`ResourceWarning` and logs a \"Bad " +"file descriptor\" error when finalizing the file object:" +msgstr "" + +#: library/devmode.rst:212 +msgid "" +"``os.close(fp.fileno())`` closes the file descriptor. When the file object " +"finalizer tries to close the file descriptor again, it fails with the ``Bad " +"file descriptor`` error. A file descriptor must be closed only once. In the " +"worst case scenario, closing it twice can lead to a crash (see :issue:" +"`18748` for an example)." +msgstr "" + +#: library/devmode.rst:218 +msgid "" +"The fix is to remove the ``os.close(fp.fileno())`` line, or open the file " +"with ``closefd=False``." +msgstr "" diff --git a/library/dialog.po b/library/dialog.po new file mode 100644 index 0000000000..fdbf32a3f3 --- /dev/null +++ b/library/dialog.po @@ -0,0 +1,283 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +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: 2020-07-20 15:08+0200\n" +"Last-Translator: FULL NAME \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" + +#: library/dialog.rst:2 +msgid "Tkinter Dialogs" +msgstr "" + +#: library/dialog.rst:5 +msgid ":mod:`tkinter.simpledialog` --- Standard Tkinter input dialogs" +msgstr "" + +#: library/dialog.rst:11 +msgid "**Source code:** :source:`Lib/tkinter/simpledialog.py`" +msgstr "" + +#: library/dialog.rst:15 +msgid "" +"The :mod:`tkinter.simpledialog` module contains convenience classes and " +"functions for creating simple modal dialogs to get a value from the user." +msgstr "" + +#: library/dialog.rst:23 +msgid "" +"The above three functions provide dialogs that prompt the user to enter a " +"value of the desired type." +msgstr "" + +#: library/dialog.rst:28 +msgid "The base class for custom dialogs." +msgstr "" + +#: library/dialog.rst:32 +msgid "" +"Override to construct the dialog's interface and return the widget that " +"should have initial focus." +msgstr "" + +#: library/dialog.rst:37 +msgid "" +"Default behaviour adds OK and Cancel buttons. Override for custom button " +"layouts." +msgstr "" + +#: library/dialog.rst:43 +msgid ":mod:`tkinter.filedialog` --- File selection dialogs" +msgstr "" + +#: library/dialog.rst:49 +msgid "**Source code:** :source:`Lib/tkinter/filedialog.py`" +msgstr "" + +#: library/dialog.rst:53 +msgid "" +"The :mod:`tkinter.filedialog` module provides classes and factory functions " +"for creating file/directory selection windows." +msgstr "" + +#: library/dialog.rst:57 +msgid "Native Load/Save Dialogs" +msgstr "" + +#: library/dialog.rst:59 +msgid "" +"The following classes and functions provide file dialog windows that combine " +"a native look-and-feel with configuration options to customize behaviour. " +"The following keyword arguments are applicable to the classes and functions " +"listed below:" +msgstr "" + +#: library/dialog.rst:0 +msgid "*parent* - the window to place the dialog on top of" +msgstr "" + +#: library/dialog.rst:0 +msgid "*title* - the title of the window" +msgstr "" + +#: library/dialog.rst:0 +msgid "*initialdir* - the directory that the dialog starts in" +msgstr "" + +#: library/dialog.rst:0 +msgid "*initialfile* - the file selected upon opening of the dialog" +msgstr "" + +#: library/dialog.rst:0 +msgid "" +"*filetypes* - a sequence of (label, pattern) tuples, '*' wildcard is allowed" +msgstr "" + +#: library/dialog.rst:0 +msgid "*defaultextension* - default extension to append to file (save dialogs)" +msgstr "" + +#: library/dialog.rst:0 +msgid "*multiple* - when true, selection of multiple items is allowed" +msgstr "" + +#: library/dialog.rst:79 +msgid "**Static factory functions**" +msgstr "" + +#: library/dialog.rst:81 +msgid "" +"The below functions when called create a modal, native look-and-feel dialog, " +"wait for the user's selection, then return the selected value(s) or ``None`` " +"to the caller." +msgstr "" + +#: library/dialog.rst:88 +msgid "" +"The above two functions create an :class:`Open` dialog and return the opened " +"file object(s) in read-only mode." +msgstr "" + +#: library/dialog.rst:93 +msgid "" +"Create a :class:`SaveAs` dialog and return a file object opened in write-" +"only mode." +msgstr "" + +#: library/dialog.rst:98 +msgid "" +"The above two functions create an :class:`Open` dialog and return the " +"selected filename(s) that correspond to existing file(s)." +msgstr "" + +#: library/dialog.rst:103 +msgid "Create a :class:`SaveAs` dialog and return the selected filename." +msgstr "" + +#: library/dialog.rst:107 +msgid "Prompt user to select a directory." +msgstr "" + +#: library/dialog.rst:108 +msgid "Additional keyword option:" +msgstr "" + +#: library/dialog.rst:109 +msgid "*mustexist* - determines if selection must be an existing directory." +msgstr "" + +#: library/dialog.rst:114 +msgid "" +"The above two classes provide native dialog windows for saving and loading " +"files." +msgstr "" + +#: library/dialog.rst:117 +msgid "**Convenience classes**" +msgstr "" + +#: library/dialog.rst:119 +msgid "" +"The below classes are used for creating file/directory windows from scratch. " +"These do not emulate the native look-and-feel of the platform." +msgstr "" + +#: library/dialog.rst:124 +msgid "Create a dialog prompting the user to select a directory." +msgstr "" + +#: library/dialog.rst:126 +msgid "" +"The *FileDialog* class should be subclassed for custom event handling and " +"behaviour." +msgstr "" + +#: library/dialog.rst:131 +msgid "Create a basic file selection dialog." +msgstr "" + +#: library/dialog.rst:135 +msgid "Trigger the termination of the dialog window." +msgstr "" + +#: library/dialog.rst:139 +msgid "Event handler for double-click event on directory." +msgstr "" + +#: library/dialog.rst:143 +msgid "Event handler for click event on directory." +msgstr "" + +#: library/dialog.rst:147 +msgid "Event handler for double-click event on file." +msgstr "" + +#: library/dialog.rst:151 +msgid "Event handler for single-click event on file." +msgstr "" + +#: library/dialog.rst:155 +msgid "Filter the files by directory." +msgstr "" + +#: library/dialog.rst:159 +msgid "Retrieve the file filter currently in use." +msgstr "" + +#: library/dialog.rst:163 +msgid "Retrieve the currently selected item." +msgstr "" + +#: library/dialog.rst:167 +msgid "Render dialog and start event loop." +msgstr "" + +#: library/dialog.rst:171 +msgid "Exit dialog returning current selection." +msgstr "" + +#: library/dialog.rst:175 +msgid "Exit dialog returning filename, if any." +msgstr "" + +#: library/dialog.rst:179 +msgid "Set the file filter." +msgstr "" + +#: library/dialog.rst:183 +msgid "Update the current file selection to *file*." +msgstr "" + +#: library/dialog.rst:188 +msgid "" +"A subclass of FileDialog that creates a dialog window for selecting an " +"existing file." +msgstr "" + +#: library/dialog.rst:193 +msgid "" +"Test that a file is provided and that the selection indicates an already " +"existing file." +msgstr "" + +#: library/dialog.rst:198 +msgid "" +"A subclass of FileDialog that creates a dialog window for selecting a " +"destination file." +msgstr "" + +#: library/dialog.rst:203 +msgid "" +"Test whether or not the selection points to a valid file that is not a " +"directory. Confirmation is required if an already existing file is selected." +msgstr "" + +#: library/dialog.rst:208 +msgid ":mod:`tkinter.commondialog` --- Dialog window templates" +msgstr "" + +#: library/dialog.rst:214 +msgid "**Source code:** :source:`Lib/tkinter/commondialog.py`" +msgstr "" + +#: library/dialog.rst:218 +msgid "" +"The :mod:`tkinter.commondialog` module provides the :class:`Dialog` class " +"that is the base class for dialogs defined in other supporting modules." +msgstr "" + +#: library/dialog.rst:225 +msgid "Render the Dialog window." +msgstr "" + +#: library/dialog.rst:230 +msgid "Modules :mod:`tkinter.messagebox`, :ref:`tut-files`" +msgstr "" diff --git a/library/difflib.po b/library/difflib.po new file mode 100644 index 0000000000..bb81a16a39 --- /dev/null +++ b/library/difflib.po @@ -0,0 +1,937 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-18 15:46+0200\n" +"PO-Revision-Date: 2022-10-18 12:28+0200\n" +"Last-Translator: Loc Cosnier \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" +"Plural-Forms: nplurals=2; plural=(n > 1)\n" +"X-Generator: Gtranslator 3.36.0\n" + +#: library/difflib.rst:2 +msgid ":mod:`difflib` --- Helpers for computing deltas" +msgstr ":mod:`difflib` — Utilitaires pour le calcul des deltas" + +#: library/difflib.rst:11 +msgid "**Source code:** :source:`Lib/difflib.py`" +msgstr "**Code source:** :source:`Lib/difflib.py`" + +#: library/difflib.rst:20 +#, fuzzy +msgid "" +"This module provides classes and functions for comparing sequences. It can " +"be used for example, for comparing files, and can produce information about " +"file differences in various formats, including HTML and context and unified " +"diffs. For comparing directories and files, see also, the :mod:`filecmp` " +"module." +msgstr "" +"Ce module fournit des classes et des fonctions permettant de comparer des " +"séquences. Il peut être utilisé, par exemple, pour comparer des fichiers et " +"peut produire des informations sur les différences dans divers formats, y " +"compris HTML et les différences contextuelles et unifiées. Pour la " +"comparaison de répertoires et de fichiers, voir aussi le module :mod:" +"`filecmp`." + +#: library/difflib.rst:29 +msgid "" +"This is a flexible class for comparing pairs of sequences of any type, so " +"long as the sequence elements are :term:`hashable`. The basic algorithm " +"predates, and is a little fancier than, an algorithm published in the late " +"1980's by Ratcliff and Obershelp under the hyperbolic name \"gestalt pattern " +"matching.\" The idea is to find the longest contiguous matching subsequence " +"that contains no \"junk\" elements; these \"junk\" elements are ones that " +"are uninteresting in some sense, such as blank lines or whitespace. " +"(Handling junk is an extension to the Ratcliff and Obershelp algorithm.) The " +"same idea is then applied recursively to the pieces of the sequences to the " +"left and to the right of the matching subsequence. This does not yield " +"minimal edit sequences, but does tend to yield matches that \"look right\" " +"to people." +msgstr "" +"C'est une classe flexible permettant de comparer des séquences deux à deux " +"de n'importe quel type, tant que les éléments des séquences sont :term:" +"`hachables `. L'algorithme de base est antérieur, et un peu plus " +"sophistiqué, à un algorithme publié à la fin des années 1980 par Ratcliff et " +"Obershelp sous le nom hyperbolique de *gestalt pattern matching*. L'idée est " +"de trouver la plus longue sous-séquence d'appariement contiguë qui ne " +"contient pas d'éléments « indésirables » ; ces éléments « indésirables » " +"sont ceux qui sont inintéressants dans un certain sens, comme les lignes " +"blanches ou les espaces. (Le traitement des éléments indésirables est une " +"extension de l'algorithme de Ratcliff et Obershelp). La même idée est " +"ensuite appliquée récursivement aux morceaux des séquences à gauche et à " +"droite de la sous-séquence correspondante. Cela ne donne pas des séquences " +"de montage minimales, mais tend à donner des correspondances qui « semblent " +"correctes » pour les gens." + +#: library/difflib.rst:41 +msgid "" +"**Timing:** The basic Ratcliff-Obershelp algorithm is cubic time in the " +"worst case and quadratic time in the expected case. :class:`SequenceMatcher` " +"is quadratic time for the worst case and has expected-case behavior " +"dependent in a complicated way on how many elements the sequences have in " +"common; best case time is linear." +msgstr "" +"**Compléxité temporelle :** l'algorithme de base de Ratcliff-Obershelp est " +"de complexité cubique dans le pire cas et de complexité quadratique dans le " +"cas attendu. :class:`SequenceMatcher` est de complexité quadratique pour le " +"pire cas et son comportement dans le cas attendu dépend de façon complexe du " +"nombre d'éléments que les séquences ont en commun ; le temps dans le " +"meilleur cas est linéaire." + +#: library/difflib.rst:47 +msgid "" +"**Automatic junk heuristic:** :class:`SequenceMatcher` supports a heuristic " +"that automatically treats certain sequence items as junk. The heuristic " +"counts how many times each individual item appears in the sequence. If an " +"item's duplicates (after the first one) account for more than 1% of the " +"sequence and the sequence is at least 200 items long, this item is marked as " +"\"popular\" and is treated as junk for the purpose of sequence matching. " +"This heuristic can be turned off by setting the ``autojunk`` argument to " +"``False`` when creating the :class:`SequenceMatcher`." +msgstr "" +"**Heuristique automatique des indésirables:** :class:`SequenceMatcher` " +"utilise une heuristique qui traite automatiquement certains éléments de la " +"séquence comme indésirables. L'heuristique compte combien de fois chaque " +"élément individuel apparaît dans la séquence. Si les doublons d'un élément " +"(après le premier) représentent plus de 1 % de la séquence et que la " +"séquence compte au moins 200 éléments, cet élément est marqué comme " +"« populaire » et est traité comme indésirable aux fins de la comparaison des " +"séquences. Cette heuristique peut être désactivée en réglant l'argument " +"``autojunk`` sur ``False`` lors de la création de la classe :class:" +"`SequenceMatcher`." + +#: library/difflib.rst:388 +msgid "The *autojunk* parameter." +msgstr "Le paramètre *autojunk*." + +#: library/difflib.rst:61 +msgid "" +"This is a class for comparing sequences of lines of text, and producing " +"human-readable differences or deltas. Differ uses :class:`SequenceMatcher` " +"both to compare sequences of lines, and to compare sequences of characters " +"within similar (near-matching) lines." +msgstr "" +"Il s'agit d'une classe permettant de comparer des séquences de lignes de " +"texte et de produire des différences ou deltas humainement lisibles. " +"*Differ* utilise :class:`SequenceMatcher` à la fois pour comparer des " +"séquences de lignes, et pour comparer des séquences de caractères dans des " +"lignes similaires (quasi-correspondantes)." + +#: library/difflib.rst:66 +msgid "Each line of a :class:`Differ` delta begins with a two-letter code:" +msgstr "" +"Chaque ligne d'un delta :class:`Differ` commence par un code de deux " +"lettres :" + +#: library/difflib.rst:69 +msgid "Code" +msgstr "Code" + +#: library/difflib.rst:498 +msgid "Meaning" +msgstr "Signification" + +#: library/difflib.rst:71 +msgid "``'- '``" +msgstr "``'- '``" + +#: library/difflib.rst:71 +msgid "line unique to sequence 1" +msgstr "ligne n'appartenant qu'à la séquence 1" + +#: library/difflib.rst:73 +msgid "``'+ '``" +msgstr "``'+ '``" + +#: library/difflib.rst:73 +msgid "line unique to sequence 2" +msgstr "ligne n'appartenant qu'à la séquence 2" + +#: library/difflib.rst:75 +msgid "``' '``" +msgstr "``' '``" + +#: library/difflib.rst:75 +msgid "line common to both sequences" +msgstr "ligne commune aux deux séquences" + +#: library/difflib.rst:77 +msgid "``'? '``" +msgstr "``'? '``" + +#: library/difflib.rst:77 +msgid "line not present in either input sequence" +msgstr "ligne non présente dans l'une ou l'autre des séquences d'entrée" + +#: library/difflib.rst:80 +msgid "" +"Lines beginning with '``?``' attempt to guide the eye to intraline " +"differences, and were not present in either input sequence. These lines can " +"be confusing if the sequences contain tab characters." +msgstr "" +"Les lignes commençant par ``'?'`` tentent de guider l'œil vers les " +"différences intralignes, et n'étaient présentes dans aucune des séquences " +"d'entrée. Ces lignes peuvent être déroutantes si les séquences contiennent " +"des caractères de tabulation." + +#: library/difflib.rst:87 +msgid "" +"This class can be used to create an HTML table (or a complete HTML file " +"containing the table) showing a side by side, line by line comparison of " +"text with inter-line and intra-line change highlights. The table can be " +"generated in either full or contextual difference mode." +msgstr "" +"Cette classe peut être utilisée pour créer un tableau HTML (ou un fichier " +"HTML complet contenant le tableau) montrant une comparaison côte à côte, " +"ligne par ligne, du texte avec les changements inter-lignes et intralignes. " +"Le tableau peut être généré en mode de différence complet ou contextuel." + +#: library/difflib.rst:92 +msgid "The constructor for this class is:" +msgstr "Le constructeur pour cette classe est :" + +#: library/difflib.rst:97 +msgid "Initializes instance of :class:`HtmlDiff`." +msgstr "Initialise l'instance de :class:`HtmlDiff`." + +#: library/difflib.rst:99 +msgid "" +"*tabsize* is an optional keyword argument to specify tab stop spacing and " +"defaults to ``8``." +msgstr "" +"*tabsize* est argument nommé optionnel pour spécifier l'espacement des " +"tabulations et sa valeur par défaut est ``8``." + +#: library/difflib.rst:102 +msgid "" +"*wrapcolumn* is an optional keyword to specify column number where lines are " +"broken and wrapped, defaults to ``None`` where lines are not wrapped." +msgstr "" +"*wrapcolumn* est un argument nommé optionnel pour spécifier le numéro de la " +"colonne où les lignes sont coupées pour être ré-agencées, la valeur par " +"défaut est ``None`` lorsque les lignes ne sont pas ré-agencées." + +#: library/difflib.rst:105 +msgid "" +"*linejunk* and *charjunk* are optional keyword arguments passed into :func:" +"`ndiff` (used by :class:`HtmlDiff` to generate the side by side HTML " +"differences). See :func:`ndiff` documentation for argument default values " +"and descriptions." +msgstr "" +"*linejunk* et *charjunk* sont des arguments nommés optionnels passés dans :" +"func:`ndiff` (utilisés par :class:`HtmlDiff` pour générer les différences " +"HTML côte à côte). Voir la documentation de :func:`ndiff` pour les valeurs " +"par défaut des arguments et les descriptions." + +#: library/difflib.rst:109 +msgid "The following methods are public:" +msgstr "Les méthodes suivantes sont publiques :" + +#: library/difflib.rst:114 +msgid "" +"Compares *fromlines* and *tolines* (lists of strings) and returns a string " +"which is a complete HTML file containing a table showing line by line " +"differences with inter-line and intra-line changes highlighted." +msgstr "" +"Compare *fromlines* et *tolines* (listes de chaînes de caractères) et " +"renvoie une chaîne de caractères qui est un fichier HTML complet contenant " +"un tableau montrant les différences ligne par ligne avec les changements " +"inter-lignes et intralignes mis en évidence." + +#: library/difflib.rst:118 +msgid "" +"*fromdesc* and *todesc* are optional keyword arguments to specify from/to " +"file column header strings (both default to an empty string)." +msgstr "" +"*fromdesc* et *todesc* sont des arguments nommés optionnels pour spécifier " +"les chaînes d'en-tête des colonnes *from/to* du fichier (les deux sont des " +"chaînes vides par défaut)." + +#: library/difflib.rst:121 +msgid "" +"*context* and *numlines* are both optional keyword arguments. Set *context* " +"to ``True`` when contextual differences are to be shown, else the default is " +"``False`` to show the full files. *numlines* defaults to ``5``. When " +"*context* is ``True`` *numlines* controls the number of context lines which " +"surround the difference highlights. When *context* is ``False`` *numlines* " +"controls the number of lines which are shown before a difference highlight " +"when using the \"next\" hyperlinks (setting to zero would cause the \"next\" " +"hyperlinks to place the next difference highlight at the top of the browser " +"without any leading context)." +msgstr "" +"*context* et *numlines* sont tous deux des arguments nommés facultatifs. " +"Mettre *context* à ``True`` lorsque les différences contextuelles doivent " +"être affichées, sinon la valeur par défaut est ``False`` pour afficher les " +"fichiers complets. Les *numlines* ont pour valeur par défaut ``5``. Lorsque " +"*context* est ``True``, *numlines* contrôle le nombre de lignes de contexte " +"qui entourent les différences mise en évidence. Lorsque *context* est " +"``False``, *numlines* contrôle le nombre de lignes qui sont affichées avant " +"un surlignage de différence lors de l'utilisation des hyperliens " +"« suivants » (un réglage à zéro ferait en sorte que les hyperliens " +"« suivants » placeraient le surlignage de différence suivant en haut du " +"navigateur sans aucun contexte introductif)." + +#: library/difflib.rst:132 +msgid "" +"*fromdesc* and *todesc* are interpreted as unescaped HTML and should be " +"properly escaped while receiving input from untrusted sources." +msgstr "" +"*fromdesc* et *todesc* sont interprétés comme du HTML non échappé et doivent " +"être correctement échappés lors de la réception de données provenant de " +"sources non fiables." + +#: library/difflib.rst:135 +msgid "" +"*charset* keyword-only argument was added. The default charset of HTML " +"document changed from ``'ISO-8859-1'`` to ``'utf-8'``." +msgstr "" +"l'argument nommé *charset* a été ajouté. Le jeu de caractères par défaut du " +"document HTML est passé de ``'ISO-8859-1'`` à ``'utf-8'``." + +#: library/difflib.rst:141 +msgid "" +"Compares *fromlines* and *tolines* (lists of strings) and returns a string " +"which is a complete HTML table showing line by line differences with inter-" +"line and intra-line changes highlighted." +msgstr "" +"Compare *fromlines* et *tolines* (listes de chaînes) et renvoie une chaîne " +"qui est un tableau HTML complet montrant les différences ligne par ligne " +"avec les changements inter-lignes et intralignes mis en évidence." + +#: library/difflib.rst:145 +msgid "" +"The arguments for this method are the same as those for the :meth:" +"`make_file` method." +msgstr "" +"Les arguments pour cette méthode sont les mêmes que ceux de la méthode :meth:" +"`make_file`." + +#: library/difflib.rst:148 +msgid "" +":file:`Tools/scripts/diff.py` is a command-line front-end to this class and " +"contains a good example of its use." +msgstr "" +":file:`Tools/scripts/diff.py` est un frontal en ligne de commande de cette " +"classe et contient un bon exemple de son utilisation." + +#: library/difflib.rst:154 +msgid "" +"Compare *a* and *b* (lists of strings); return a delta (a :term:`generator` " +"generating the delta lines) in context diff format." +msgstr "" +"Compare *a* et *b* (listes de chaînes de caractères) ; renvoie un delta (un :" +"term:`generateur ` générant les lignes delta) dans un format de " +"différence de contexte." + +#: library/difflib.rst:157 +#, fuzzy +msgid "" +"Context diffs are a compact way of showing just the lines that have changed " +"plus a few lines of context. The changes are shown in a before/after " +"style. The number of context lines is set by *n* which defaults to three." +msgstr "" +"Les différences de contexte sont une façon compacte de montrer seulement les " +"lignes qui ont changé plus quelques lignes de contexte. Les changements " +"sont affichés dans un style avant/après. Le nombre de lignes de contexte " +"est défini par *n*, qui est de trois par défaut." + +#: library/difflib.rst:161 +msgid "" +"By default, the diff control lines (those with ``***`` or ``---``) are " +"created with a trailing newline. This is helpful so that inputs created " +"from :func:`io.IOBase.readlines` result in diffs that are suitable for use " +"with :func:`io.IOBase.writelines` since both the inputs and outputs have " +"trailing newlines." +msgstr "" +"Par défaut, les lignes de contrôle de la différence (celles avec ``***`` ou " +"``---``) sont créées avec un saut de ligne à la fin. Ceci est utile pour que " +"les entrées créées à partir de :func:`io.IOBase.readlines` résultent en des " +"différences qui peuvent être utilisées avec :func:`io.IOBase.writelines` " +"puisque les entrées et les sorties ont des nouvelles lignes de fin." + +#: library/difflib.rst:298 +msgid "" +"For inputs that do not have trailing newlines, set the *lineterm* argument " +"to ``\"\"`` so that the output will be uniformly newline free." +msgstr "" +"Pour les entrées qui n'ont pas de retour à la ligne, mettre l'argument " +"*lineterm* à ``\"\"`` afin que la sortie soit uniformément sans retour à la " +"ligne." + +#: library/difflib.rst:301 +msgid "" +"The context diff format normally has a header for filenames and modification " +"times. Any or all of these may be specified using strings for *fromfile*, " +"*tofile*, *fromfiledate*, and *tofiledate*. The modification times are " +"normally expressed in the ISO 8601 format. If not specified, the strings " +"default to blanks." +msgstr "" +"Le format de contexte de différence comporte normalement un en-tête pour les " +"noms de fichiers et les heures de modification. Tout ou partie de ces " +"éléments peuvent être spécifiés en utilisant les chaînes de caractères " +"*fromfile*, *tofile*, *fromfiledate* et *tofiledate*. Les heures de " +"modification sont normalement exprimées dans le format ISO 8601. Si elles ne " +"sont pas spécifiées, les chaînes de caractères sont par défaut vierges." + +#: library/difflib.rst:322 +msgid "See :ref:`difflib-interface` for a more detailed example." +msgstr "" +"Voir :ref:`une interface de ligne de commandes pour difflib ` pour un exemple plus détaillé." + +#: library/difflib.rst:198 +msgid "" +"Return a list of the best \"good enough\" matches. *word* is a sequence for " +"which close matches are desired (typically a string), and *possibilities* is " +"a list of sequences against which to match *word* (typically a list of " +"strings)." +msgstr "" + +#: library/difflib.rst:202 +msgid "" +"Optional argument *n* (default ``3``) is the maximum number of close matches " +"to return; *n* must be greater than ``0``." +msgstr "" + +#: library/difflib.rst:205 +msgid "" +"Optional argument *cutoff* (default ``0.6``) is a float in the range [0, 1]. " +"Possibilities that don't score at least that similar to *word* are ignored." +msgstr "" + +#: library/difflib.rst:208 +msgid "" +"The best (no more than *n*) matches among the possibilities are returned in " +"a list, sorted by similarity score, most similar first." +msgstr "" + +#: library/difflib.rst:224 +msgid "" +"Compare *a* and *b* (lists of strings); return a :class:`Differ`\\ -style " +"delta (a :term:`generator` generating the delta lines)." +msgstr "" + +#: library/difflib.rst:227 +msgid "" +"Optional keyword parameters *linejunk* and *charjunk* are filtering " +"functions (or ``None``):" +msgstr "" + +#: library/difflib.rst:230 +msgid "" +"*linejunk*: A function that accepts a single string argument, and returns " +"true if the string is junk, or false if not. The default is ``None``. There " +"is also a module-level function :func:`IS_LINE_JUNK`, which filters out " +"lines without visible characters, except for at most one pound character " +"(``'#'``) -- however the underlying :class:`SequenceMatcher` class does a " +"dynamic analysis of which lines are so frequent as to constitute noise, and " +"this usually works better than using this function." +msgstr "" + +#: library/difflib.rst:238 +msgid "" +"*charjunk*: A function that accepts a character (a string of length 1), and " +"returns if the character is junk, or false if not. The default is module-" +"level function :func:`IS_CHARACTER_JUNK`, which filters out whitespace " +"characters (a blank or tab; it's a bad idea to include newline in this!)." +msgstr "" + +#: library/difflib.rst:243 +msgid "" +":file:`Tools/scripts/ndiff.py` is a command-line front-end to this function." +msgstr "" + +#: library/difflib.rst:261 +msgid "Return one of the two sequences that generated a delta." +msgstr "" + +#: library/difflib.rst:263 +msgid "" +"Given a *sequence* produced by :meth:`Differ.compare` or :func:`ndiff`, " +"extract lines originating from file 1 or 2 (parameter *which*), stripping " +"off line prefixes." +msgstr "" + +#: library/difflib.rst:267 +msgid "Example:" +msgstr "Exemple :" + +#: library/difflib.rst:284 +msgid "" +"Compare *a* and *b* (lists of strings); return a delta (a :term:`generator` " +"generating the delta lines) in unified diff format." +msgstr "" + +#: library/difflib.rst:287 +msgid "" +"Unified diffs are a compact way of showing just the lines that have changed " +"plus a few lines of context. The changes are shown in an inline style " +"(instead of separate before/after blocks). The number of context lines is " +"set by *n* which defaults to three." +msgstr "" + +#: library/difflib.rst:292 +msgid "" +"By default, the diff control lines (those with ``---``, ``+++``, or ``@@``) " +"are created with a trailing newline. This is helpful so that inputs created " +"from :func:`io.IOBase.readlines` result in diffs that are suitable for use " +"with :func:`io.IOBase.writelines` since both the inputs and outputs have " +"trailing newlines." +msgstr "" + +#: library/difflib.rst:326 +msgid "" +"Compare *a* and *b* (lists of bytes objects) using *dfunc*; yield a sequence " +"of delta lines (also bytes) in the format returned by *dfunc*. *dfunc* must " +"be a callable, typically either :func:`unified_diff` or :func:`context_diff`." +msgstr "" + +#: library/difflib.rst:331 +msgid "" +"Allows you to compare data with unknown or inconsistent encoding. All inputs " +"except *n* must be bytes objects, not str. Works by losslessly converting " +"all inputs (except *n*) to str, and calling ``dfunc(a, b, fromfile, tofile, " +"fromfiledate, tofiledate, n, lineterm)``. The output of *dfunc* is then " +"converted back to bytes, so the delta lines that you receive have the same " +"unknown/inconsistent encodings as *a* and *b*." +msgstr "" + +#: library/difflib.rst:342 +msgid "" +"Return ``True`` for ignorable lines. The line *line* is ignorable if *line* " +"is blank or contains a single ``'#'``, otherwise it is not ignorable. Used " +"as a default for parameter *linejunk* in :func:`ndiff` in older versions." +msgstr "" + +#: library/difflib.rst:349 +msgid "" +"Return ``True`` for ignorable characters. The character *ch* is ignorable " +"if *ch* is a space or tab, otherwise it is not ignorable. Used as a default " +"for parameter *charjunk* in :func:`ndiff`." +msgstr "" + +#: library/difflib.rst:357 +msgid "" +"`Pattern Matching: The Gestalt Approach `_" +msgstr "" + +#: library/difflib.rst:357 +msgid "" +"Discussion of a similar algorithm by John W. Ratcliff and D. E. Metzener. " +"This was published in `Dr. Dobb's Journal `_ in " +"July, 1988." +msgstr "" + +#: library/difflib.rst:364 +msgid "SequenceMatcher Objects" +msgstr "" + +#: library/difflib.rst:366 +msgid "The :class:`SequenceMatcher` class has this constructor:" +msgstr "" + +#: library/difflib.rst:371 +msgid "" +"Optional argument *isjunk* must be ``None`` (the default) or a one-argument " +"function that takes a sequence element and returns true if and only if the " +"element is \"junk\" and should be ignored. Passing ``None`` for *isjunk* is " +"equivalent to passing ``lambda x: False``; in other words, no elements are " +"ignored. For example, pass::" +msgstr "" + +#: library/difflib.rst:379 +msgid "" +"if you're comparing lines as sequences of characters, and don't want to " +"synch up on blanks or hard tabs." +msgstr "" + +#: library/difflib.rst:382 +msgid "" +"The optional arguments *a* and *b* are sequences to be compared; both " +"default to empty strings. The elements of both sequences must be :term:" +"`hashable`." +msgstr "" + +#: library/difflib.rst:385 +msgid "" +"The optional argument *autojunk* can be used to disable the automatic junk " +"heuristic." +msgstr "" + +#: library/difflib.rst:391 +msgid "" +"SequenceMatcher objects get three data attributes: *bjunk* is the set of " +"elements of *b* for which *isjunk* is ``True``; *bpopular* is the set of non-" +"junk elements considered popular by the heuristic (if it is not disabled); " +"*b2j* is a dict mapping the remaining elements of *b* to a list of positions " +"where they occur. All three are reset whenever *b* is reset with :meth:" +"`set_seqs` or :meth:`set_seq2`." +msgstr "" + +#: library/difflib.rst:398 +msgid "The *bjunk* and *bpopular* attributes." +msgstr "" + +#: library/difflib.rst:401 +msgid ":class:`SequenceMatcher` objects have the following methods:" +msgstr "" + +#: library/difflib.rst:405 +msgid "Set the two sequences to be compared." +msgstr "" + +#: library/difflib.rst:407 +msgid "" +":class:`SequenceMatcher` computes and caches detailed information about the " +"second sequence, so if you want to compare one sequence against many " +"sequences, use :meth:`set_seq2` to set the commonly used sequence once and " +"call :meth:`set_seq1` repeatedly, once for each of the other sequences." +msgstr "" + +#: library/difflib.rst:415 +msgid "" +"Set the first sequence to be compared. The second sequence to be compared " +"is not changed." +msgstr "" + +#: library/difflib.rst:421 +msgid "" +"Set the second sequence to be compared. The first sequence to be compared " +"is not changed." +msgstr "" + +#: library/difflib.rst:427 +msgid "Find longest matching block in ``a[alo:ahi]`` and ``b[blo:bhi]``." +msgstr "" + +#: library/difflib.rst:429 +msgid "" +"If *isjunk* was omitted or ``None``, :meth:`find_longest_match` returns " +"``(i, j, k)`` such that ``a[i:i+k]`` is equal to ``b[j:j+k]``, where ``alo " +"<= i <= i+k <= ahi`` and ``blo <= j <= j+k <= bhi``. For all ``(i', j', " +"k')`` meeting those conditions, the additional conditions ``k >= k'``, ``i " +"<= i'``, and if ``i == i'``, ``j <= j'`` are also met. In other words, of " +"all maximal matching blocks, return one that starts earliest in *a*, and of " +"all those maximal matching blocks that start earliest in *a*, return the one " +"that starts earliest in *b*." +msgstr "" + +#: library/difflib.rst:442 +msgid "" +"If *isjunk* was provided, first the longest matching block is determined as " +"above, but with the additional restriction that no junk element appears in " +"the block. Then that block is extended as far as possible by matching " +"(only) junk elements on both sides. So the resulting block never matches on " +"junk except as identical junk happens to be adjacent to an interesting match." +msgstr "" + +#: library/difflib.rst:449 +msgid "" +"Here's the same example as before, but considering blanks to be junk. That " +"prevents ``' abcd'`` from matching the ``' abcd'`` at the tail end of the " +"second sequence directly. Instead only the ``'abcd'`` can match, and " +"matches the leftmost ``'abcd'`` in the second sequence:" +msgstr "" + +#: library/difflib.rst:458 +msgid "If no blocks match, this returns ``(alo, blo, 0)``." +msgstr "" + +#: library/difflib.rst:460 +msgid "This method returns a :term:`named tuple` ``Match(a, b, size)``." +msgstr "" + +#: library/difflib.rst:462 +msgid "Added default arguments." +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*." +msgstr "" + +#: library/difflib.rst:473 +msgid "" +"The last triple is a dummy, and has the value ``(len(a), len(b), 0)``. It " +"is the only triple with ``n == 0``. If ``(i, j, n)`` and ``(i', j', n')`` " +"are adjacent triples in the list, and the second is not the last triple in " +"the list, then ``i+n < i'`` or ``j+n < j'``; in other words, adjacent " +"triples always describe non-adjacent equal blocks." +msgstr "" + +#: library/difflib.rst:490 +msgid "" +"Return list of 5-tuples describing how to turn *a* into *b*. Each tuple is " +"of the form ``(tag, i1, i2, j1, j2)``. The first tuple has ``i1 == j1 == " +"0``, and remaining tuples have *i1* equal to the *i2* from the preceding " +"tuple, and, likewise, *j1* equal to the previous *j2*." +msgstr "" + +#: library/difflib.rst:495 +msgid "The *tag* values are strings, with these meanings:" +msgstr "" + +#: library/difflib.rst:498 +msgid "Value" +msgstr "Valeur" + +#: library/difflib.rst:500 +msgid "``'replace'``" +msgstr "``'replace'``" + +#: library/difflib.rst:500 +msgid "``a[i1:i2]`` should be replaced by ``b[j1:j2]``." +msgstr "" + +#: library/difflib.rst:503 +msgid "``'delete'``" +msgstr "``'delete'``" + +#: library/difflib.rst:503 +msgid "``a[i1:i2]`` should be deleted. Note that ``j1 == j2`` in this case." +msgstr "" + +#: library/difflib.rst:506 +msgid "``'insert'``" +msgstr "``'insert'``" + +#: library/difflib.rst:506 +msgid "" +"``b[j1:j2]`` should be inserted at ``a[i1:i1]``. Note that ``i1 == i2`` in " +"this case." +msgstr "" + +#: library/difflib.rst:510 +msgid "``'equal'``" +msgstr "``'equal'``" + +#: library/difflib.rst:510 +msgid "``a[i1:i2] == b[j1:j2]`` (the sub-sequences are equal)." +msgstr "" + +#: library/difflib.rst:514 +msgid "For example::" +msgstr "Par exemple ::" + +#: library/difflib.rst:531 +msgid "Return a :term:`generator` of groups with up to *n* lines of context." +msgstr "" + +#: library/difflib.rst:533 +msgid "" +"Starting with the groups returned by :meth:`get_opcodes`, this method splits " +"out smaller change clusters and eliminates intervening ranges which have no " +"changes." +msgstr "" + +#: library/difflib.rst:537 +msgid "The groups are returned in the same format as :meth:`get_opcodes`." +msgstr "" + +#: library/difflib.rst:542 +msgid "" +"Return a measure of the sequences' similarity as a float in the range [0, 1]." +msgstr "" + +#: library/difflib.rst:545 +msgid "" +"Where T is the total number of elements in both sequences, and M is the " +"number of matches, this is 2.0\\*M / T. Note that this is ``1.0`` if the " +"sequences are identical, and ``0.0`` if they have nothing in common." +msgstr "" + +#: library/difflib.rst:549 +msgid "" +"This is expensive to compute if :meth:`get_matching_blocks` or :meth:" +"`get_opcodes` hasn't already been called, in which case you may want to try :" +"meth:`quick_ratio` or :meth:`real_quick_ratio` first to get an upper bound." +msgstr "" + +#: library/difflib.rst:556 +msgid "" +"Caution: The result of a :meth:`ratio` call may depend on the order of the " +"arguments. For instance::" +msgstr "" + +#: library/difflib.rst:567 +msgid "Return an upper bound on :meth:`ratio` relatively quickly." +msgstr "" + +#: library/difflib.rst:572 +msgid "Return an upper bound on :meth:`ratio` very quickly." +msgstr "" + +#: library/difflib.rst:575 +msgid "" +"The three methods that return the ratio of matching to total characters can " +"give different results due to differing levels of approximation, although :" +"meth:`quick_ratio` and :meth:`real_quick_ratio` are always at least as large " +"as :meth:`ratio`:" +msgstr "" + +#: library/difflib.rst:592 +msgid "SequenceMatcher Examples" +msgstr "" + +#: library/difflib.rst:594 +msgid "This example compares two strings, considering blanks to be \"junk\":" +msgstr "" + +#: library/difflib.rst:600 +msgid "" +":meth:`ratio` returns a float in [0, 1], measuring the similarity of the " +"sequences. As a rule of thumb, a :meth:`ratio` value over 0.6 means the " +"sequences are close matches:" +msgstr "" + +#: library/difflib.rst:607 +msgid "" +"If you're only interested in where the sequences match, :meth:" +"`get_matching_blocks` is handy:" +msgstr "" + +#: library/difflib.rst:616 +msgid "" +"Note that the last tuple returned by :meth:`get_matching_blocks` is always a " +"dummy, ``(len(a), len(b), 0)``, and this is the only case in which the last " +"tuple element (number of elements matched) is ``0``." +msgstr "" + +#: library/difflib.rst:620 +msgid "" +"If you want to know how to change the first sequence into the second, use :" +"meth:`get_opcodes`:" +msgstr "" + +#: library/difflib.rst:631 +msgid "" +"The :func:`get_close_matches` function in this module which shows how simple " +"code building on :class:`SequenceMatcher` can be used to do useful work." +msgstr "" + +#: library/difflib.rst:635 +msgid "" +"`Simple version control recipe `_ for a small application built with :class:`SequenceMatcher`." +msgstr "" + +#: library/difflib.rst:643 +msgid "Differ Objects" +msgstr "" + +#: library/difflib.rst:645 +msgid "" +"Note that :class:`Differ`\\ -generated deltas make no claim to be " +"**minimal** diffs. To the contrary, minimal diffs are often counter-" +"intuitive, because they synch up anywhere possible, sometimes accidental " +"matches 100 pages apart. Restricting synch points to contiguous matches " +"preserves some notion of locality, at the occasional cost of producing a " +"longer diff." +msgstr "" + +#: library/difflib.rst:651 +msgid "The :class:`Differ` class has this constructor:" +msgstr "" + +#: library/difflib.rst:657 +msgid "" +"Optional keyword parameters *linejunk* and *charjunk* are for filter " +"functions (or ``None``):" +msgstr "" + +#: library/difflib.rst:660 +msgid "" +"*linejunk*: A function that accepts a single string argument, and returns " +"true if the string is junk. The default is ``None``, meaning that no line " +"is considered junk." +msgstr "" + +#: library/difflib.rst:664 +msgid "" +"*charjunk*: A function that accepts a single character argument (a string of " +"length 1), and returns true if the character is junk. The default is " +"``None``, meaning that no character is considered junk." +msgstr "" + +#: library/difflib.rst:668 +msgid "" +"These junk-filtering functions speed up matching to find differences and do " +"not cause any differing lines or characters to be ignored. Read the " +"description of the :meth:`~SequenceMatcher.find_longest_match` method's " +"*isjunk* parameter for an explanation." +msgstr "" + +#: library/difflib.rst:674 +msgid "" +":class:`Differ` objects are used (deltas generated) via a single method:" +msgstr "" + +#: library/difflib.rst:679 +msgid "" +"Compare two sequences of lines, and generate the delta (a sequence of lines)." +msgstr "" + +#: library/difflib.rst:681 +msgid "" +"Each sequence must contain individual single-line strings ending with " +"newlines. Such sequences can be obtained from the :meth:`~io.IOBase." +"readlines` method of file-like objects. The delta generated also consists " +"of newline-terminated strings, ready to be printed as-is via the :meth:`~io." +"IOBase.writelines` method of a file-like object." +msgstr "" + +#: library/difflib.rst:692 +msgid "Differ Example" +msgstr "" + +#: library/difflib.rst:694 +msgid "" +"This example compares two texts. First we set up the texts, sequences of " +"individual single-line strings ending with newlines (such sequences can also " +"be obtained from the :meth:`~io.BaseIO.readlines` method of file-like " +"objects):" +msgstr "" + +#: library/difflib.rst:713 +msgid "Next we instantiate a Differ object:" +msgstr "" + +#: library/difflib.rst:717 +msgid "" +"Note that when instantiating a :class:`Differ` object we may pass functions " +"to filter out line and character \"junk.\" See the :meth:`Differ` " +"constructor for details." +msgstr "" + +#: library/difflib.rst:721 +msgid "Finally, we compare the two:" +msgstr "" + +#: library/difflib.rst:725 +msgid "``result`` is a list of strings, so let's pretty-print it:" +msgstr "" + +#: library/difflib.rst:740 +msgid "As a single multi-line string it looks like this:" +msgstr "" + +#: library/difflib.rst:759 +msgid "A command-line interface to difflib" +msgstr "" + +#: library/difflib.rst:761 +msgid "" +"This example shows how to use difflib to create a ``diff``-like utility. It " +"is also contained in the Python source distribution, as :file:`Tools/scripts/" +"diff.py`." +msgstr "" diff --git a/library/dis.po b/library/dis.po new file mode 100644 index 0000000000..bbbd8b63bf --- /dev/null +++ b/library/dis.po @@ -0,0 +1,1404 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-18 15:46+0200\n" +"PO-Revision-Date: 2019-07-18 21:03+0200\n" +"Last-Translator: Aya Keddam \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" + +#: library/dis.rst:2 +msgid ":mod:`dis` --- Disassembler for Python bytecode" +msgstr ":mod:`dis` – Désassembleur pour le code intermédiaire de Python" + +#: library/dis.rst:7 +msgid "**Source code:** :source:`Lib/dis.py`" +msgstr "**Code source :** :source:`Lib/dis.py`" + +#: library/dis.rst:11 +msgid "" +"The :mod:`dis` module supports the analysis of CPython :term:`bytecode` by " +"disassembling it. The CPython bytecode which this module takes as an input " +"is defined in the file :file:`Include/opcode.h` and used by the compiler and " +"the interpreter." +msgstr "" +"La bibliothèque :mod:`dis` supporte l'analyse du :term:`bytecode` CPython " +"en le désassemblant. Le code intermédiaire CPython, que cette bibliothèque " +"prend en paramètre, est défini dans le fichier :file:`Include/opcode.h` et " +"est utilisé par le compilateur et l'interpréteur." + +#: library/dis.rst:18 +msgid "" +"Bytecode is an implementation detail of the CPython interpreter. No " +"guarantees are made that bytecode will not be added, removed, or changed " +"between versions of Python. Use of this module should not be considered to " +"work across Python VMs or Python releases." +msgstr "" +"Le code intermédiaire est un détail d'implémentation de l'interpréteur " +"CPython. Il n'y a pas de garantie que le code intermédiaire sera ajouté, " +"retiré, ou modifié dans les différentes versions de Python. L'utilisation de " +"cette bibliothèque ne fonctionne pas nécessairement sur les machines " +"virtuelles Python ni les différentes versions de Python." + +#: library/dis.rst:23 +msgid "" +"Use 2 bytes for each instruction. Previously the number of bytes varied by " +"instruction." +msgstr "" +"Utilisez 2 bits pour chaque instruction. Avant, le nombre de bits variait " +"par instruction." + +#: library/dis.rst:27 +msgid "" +"The argument of jump, exception handling and loop instructions is now the " +"instruction offset rather than the byte offset." +msgstr "" + +#: library/dis.rst:32 +msgid "Example: Given the function :func:`myfunc`::" +msgstr "Exemple : Etant donné la fonction :func:`myfunc` ::" + +#: library/dis.rst:37 +msgid "" +"the following command can be used to display the disassembly of :func:" +"`myfunc`::" +msgstr "" +"la commande suivante peut-être utilisé pour afficher le désassemblage de :" +"func:`myfunc` ::" + +#: library/dis.rst:46 +msgid "(The \"2\" is a line number)." +msgstr "(Le \"2\" est un numéro de ligne)." + +#: library/dis.rst:49 +msgid "Bytecode analysis" +msgstr "Analyse du code intermédiaire" + +#: library/dis.rst:53 +msgid "" +"The bytecode analysis API allows pieces of Python code to be wrapped in a :" +"class:`Bytecode` object that provides easy access to details of the compiled " +"code." +msgstr "" +"L'analyse de l'*API* code intermédiaire permet de rassembler des blocs de " +"code en Python dans une classe :class:`Bytecode`, qui permet un accès facile " +"aux détails du code compilé." + +#: library/dis.rst:60 +msgid "" +"Analyse the bytecode corresponding to a function, generator, asynchronous " +"generator, coroutine, method, string of source code, or a code object (as " +"returned by :func:`compile`)." +msgstr "" +"Analyse le code intermédiaire correspondant à une fonction, un générateur, " +"un générateur asynchrone, une coroutine, une méthode, une chaîne de " +"caractères du code source, ou bien une classe (comme retourne la fonction :" +"func:`compile`)." + +#: library/dis.rst:64 +msgid "" +"This is a convenience wrapper around many of the functions listed below, " +"most notably :func:`get_instructions`, as iterating over a :class:`Bytecode` " +"instance yields the bytecode operations as :class:`Instruction` instances." +msgstr "" +"Ceci est *wrapper* sur plusieurs fonctions de la liste ci-dessous, " +"notamment :func:`get_instructions`, étant donné qu'une itération sur une " +"instance de la classe :class:`Bytecode` rend les opérations du code " +"intermédiaire des instances de :class:`Instruction`." + +#: library/dis.rst:229 +msgid "" +"If *first_line* is not ``None``, it indicates the line number that should be " +"reported for the first source line in the disassembled code. Otherwise, the " +"source line information (if any) is taken directly from the disassembled " +"code object." +msgstr "" +"Si *first_line* ne vaut pas ``None``, elle indique le nombre de la ligne qui " +"doit être considérée comme première ligne source dans le code désassemblé. " +"Autrement, les informations sur la ligne source sont prises directement à " +"partir de la classe du code désassemblé." + +#: library/dis.rst:73 +msgid "" +"If *current_offset* is not ``None``, it refers to an instruction offset in " +"the disassembled code. Setting this means :meth:`.dis` will display a " +"\"current instruction\" marker against the specified opcode." +msgstr "" +"Si la valeur de *current_offset* est différente de ``None``, c'est une " +"référence à un offset d'une instruction dans le code désassemblé. Cela veut " +"dire que :meth:`.dis` va générer un marqueur de \" l'instruction en cours\" " +"contre le code d'opération donné." + +#: library/dis.rst:79 +msgid "" +"Construct a :class:`Bytecode` instance from the given traceback, setting " +"*current_offset* to the instruction responsible for the exception." +msgstr "" +"Construisez une instance :class:`Bytecode` à partir de la trace d'appel, en " +"mettant *current_offet* à l'instruction responsable de l'exception." + +#: library/dis.rst:84 +msgid "The compiled code object." +msgstr "Le code compilé objet." + +#: library/dis.rst:88 +msgid "The first source line of the code object (if available)" +msgstr "La première ligne source du code objet (si disponible)" + +#: library/dis.rst:92 +msgid "" +"Return a formatted view of the bytecode operations (the same as printed by :" +"func:`dis.dis`, but returned as a multi-line string)." +msgstr "" +"Retourne une vue formatée des opérations du code intermédiaire (la même que " +"celle envoyée par :func:`dis.dis`, mais comme une chaîne de caractères de " +"plusieurs lignes )." + +#: library/dis.rst:97 +msgid "" +"Return a formatted multi-line string with detailed information about the " +"code object, like :func:`code_info`." +msgstr "" +"Retourne une chaîne de caractères de plusieurs lignes formatée avec des " +"informations détaillées sur l'objet code comme :func:`code_info`." + +#: library/dis.rst:134 library/dis.rst:180 +msgid "This can now handle coroutine and asynchronous generator objects." +msgstr "" +"Cette version supporte la coroutine et les objets générateurs asynchrones." + +#: library/dis.rst:103 +msgid "Example::" +msgstr "Exemple ::" + +#: library/dis.rst:116 +msgid "Analysis functions" +msgstr "Analyse de fonctions" + +#: library/dis.rst:118 +msgid "" +"The :mod:`dis` module also defines the following analysis functions that " +"convert the input directly to the desired output. They can be useful if only " +"a single operation is being performed, so the intermediate analysis object " +"isn't useful:" +msgstr "" +"La bibliothèque :mod:`dis` comprend également l'analyse des fonctions " +"suivantes, qui envoient l'entrée directement à la sortie souhaitée. Elles " +"peuvent être utiles si il n'y a qu'une seule opération à effectuer, la " +"représentation intermédiaire objet n'étant donc pas utile dans ce cas:" + +#: library/dis.rst:124 +msgid "" +"Return a formatted multi-line string with detailed code object information " +"for the supplied function, generator, asynchronous generator, coroutine, " +"method, source code string or code object." +msgstr "" +"Retourne une chaîne de caractères de plusieurs lignes formatée avec des " +"informations détaillées sur l'objet code pour les fonctions données, les " +"générateurs asynchrone, coroutine, la méthode, la chaine de caractères du " +"code source ou objet." + +#: library/dis.rst:128 +msgid "" +"Note that the exact contents of code info strings are highly implementation " +"dependent and they may change arbitrarily across Python VMs or Python " +"releases." +msgstr "" +"Il est à noter que le contenu exact des chaînes de caractères figurant dans " +"les informations du code dépendent fortement sur l'implémentation, et " +"peuvent changer arbitrairement sous machines virtuelles Python ou les " +"versions de Python." + +#: library/dis.rst:140 +msgid "" +"Print detailed code object information for the supplied function, method, " +"source code string or code object to *file* (or ``sys.stdout`` if *file* is " +"not specified)." +msgstr "" +"Affiche des informations détaillées sur le code de la fonction fournie, la " +"méthode, la chaîne de caractère du code source ou du code objet à *file* (ou " +"bien ``sys.stdout`` si *file* n'est pas spécifié)." + +#: library/dis.rst:144 +msgid "" +"This is a convenient shorthand for ``print(code_info(x), file=file)``, " +"intended for interactive exploration at the interpreter prompt." +msgstr "" +"Ceci est un raccourci convenable de ``print(code_info(x), file=file)``, " +"principalement fait pour l'exploration interactive sur l'invite de " +"l'interpréteur." + +#: library/dis.rst:174 library/dis.rst:217 +msgid "Added *file* parameter." +msgstr "Ajout du paramètre *file*." + +#: library/dis.rst:155 +msgid "" +"Disassemble the *x* object. *x* can denote either a module, a class, a " +"method, a function, a generator, an asynchronous generator, a coroutine, a " +"code object, a string of source code or a byte sequence of raw bytecode. For " +"a module, it disassembles all functions. For a class, it disassembles all " +"methods (including class and static methods). For a code object or sequence " +"of raw bytecode, it prints one line per bytecode instruction. It also " +"recursively disassembles nested code objects (the code of comprehensions, " +"generator expressions and nested functions, and the code used for building " +"nested classes). Strings are first compiled to code objects with the :func:" +"`compile` built-in function before being disassembled. If no object is " +"provided, this function disassembles the last traceback." +msgstr "" +"Désassemble l'objet *x*. *x* peut être une bibliothèque , une classe, une " +"méthode, une fonction, un générateur, un générateur asynchrone, une " +"coroutine, un code objet, une chaine de caractères du coude source ou une " +"séquence de bits du code intermédiaire brut. Pour une bibliothèque , elle " +"désassemble toutes les fonctions. Pour une classe, elle désassemble toutes " +"les méthodes (y compris les classes et méthodes statiques). Pour un code " +"objet ou une séquence de code intermédiaire brut, elle affiche une ligne par " +"instruction code intermédiaire. Aussi, elle désassemble les codes objets " +"internes récursivement (le code en compréhension, les expressions des " +"générateurs et les fonctions imbriquées, et le code utilisé pour la " +"construction des classes internes). Les chaînes de caractères sont d'abord " +"compilées pour coder des objets avec les fonctions intégrées de :func:" +"`compile` avant qu'elles ne soient désassemblées. Si aucun objet n'est " +"fourni, cette fonction désassemble les dernières traces d'appel." + +#: library/dis.rst:190 library/dis.rst:214 +msgid "" +"The disassembly is written as text to the supplied *file* argument if " +"provided and to ``sys.stdout`` otherwise." +msgstr "" +"Le désassemblage est envoyé sous forme de texte à l'argument du fichier " +"*file* si il est fourni, et à ``sys.stdout`` sinon." + +#: library/dis.rst:171 +msgid "" +"The maximal depth of recursion is limited by *depth* unless it is ``None``. " +"``depth=0`` means no recursion." +msgstr "" +"La profondeur maximale de récursion est limitée par *depth* sauf si elle " +"correspond à ``None``. ``depth=0`` indique qu'il n'y a pas de récursion." + +#: library/dis.rst:177 +msgid "Implemented recursive disassembling and added *depth* parameter." +msgstr "" +"Le désassemblage récursif a été implémenté, et le paramètre *depth* a été " +"ajouté." + +#: library/dis.rst:186 +msgid "" +"Disassemble the top-of-stack function of a traceback, using the last " +"traceback if none was passed. The instruction causing the exception is " +"indicated." +msgstr "" +"Désassemble la fonction du haut de la pile des traces d'appels, en utilisant " +"la dernière trace d'appels si rien n'a été envoyé. L'instruction à l'origine " +"de l'exception est indiquée." + +#: library/dis.rst:200 +msgid "" +"Disassemble a code object, indicating the last instruction if *lasti* was " +"provided. The output is divided in the following columns:" +msgstr "" +"Désassemble un code objet, en indiquant la dernière instruction si *lasti* " +"est fournie. La sortie est répartie sur les colonnes suivantes :" + +#: library/dis.rst:203 +msgid "the line number, for the first instruction of each line" +msgstr "le numéro de ligne, pour la première instruction de chaque ligne" + +#: library/dis.rst:204 +msgid "the current instruction, indicated as ``-->``," +msgstr "l'instruction en cours, indiquée par ``-->``," + +#: library/dis.rst:205 +msgid "a labelled instruction, indicated with ``>>``," +msgstr "une instruction libellée, indiquée par ``> >``," + +#: library/dis.rst:206 +msgid "the address of the instruction," +msgstr "l'adresse de l'instruction," + +#: library/dis.rst:207 +msgid "the operation code name," +msgstr "le nom de le code d'opération," + +#: library/dis.rst:208 +msgid "operation parameters, and" +msgstr "paramètres de l'opération, et" + +#: library/dis.rst:209 +msgid "interpretation of the parameters in parentheses." +msgstr "interprétation des paramètres entre parenthèses." + +#: library/dis.rst:211 +msgid "" +"The parameter interpretation recognizes local and global variable names, " +"constant values, branch targets, and compare operators." +msgstr "" +"L'interprétation du paramètre reconnaît les noms des variables locales et " +"globales, des valeurs constantes, des branchements cibles, et des opérateurs " +"de comparaison." + +#: library/dis.rst:223 +msgid "" +"Return an iterator over the instructions in the supplied function, method, " +"source code string or code object." +msgstr "" +"Retourne un itérateur sur les instructions dans la fonction fournie, la " +"méthode, les chaînes de caractères du code source ou objet." + +#: library/dis.rst:226 +msgid "" +"The iterator generates a series of :class:`Instruction` named tuples giving " +"the details of each operation in the supplied code." +msgstr "" +"Cet itérateur génère une série de *n*-uplets de :class:`Instruction` qui " +"donnent les détails de chacune des opérations dans le code fourni." + +#: library/dis.rst:239 +msgid "" +"This generator function uses the ``co_lines`` method of the code object " +"*code* to find the offsets which are starts of lines in the source code. " +"They are generated as ``(offset, lineno)`` pairs." +msgstr "" + +#: library/dis.rst:243 +msgid "Line numbers can be decreasing. Before, they were always increasing." +msgstr "" +"Les numéros de lignes peuvent être décroissants. Avant, ils étaient toujours " +"croissants." + +#: library/dis.rst:246 +msgid "" +"The :pep:`626` ``co_lines`` method is used instead of the ``co_firstlineno`` " +"and ``co_lnotab`` attributes of the code object." +msgstr "" + +#: library/dis.rst:253 +msgid "" +"Detect all offsets in the raw compiled bytecode string *code* which are jump " +"targets, and return a list of these offsets." +msgstr "" + +#: library/dis.rst:259 +msgid "Compute the stack effect of *opcode* with argument *oparg*." +msgstr "" + +#: library/dis.rst:261 +msgid "" +"If the code has a jump target and *jump* is ``True``, :func:`~stack_effect` " +"will return the stack effect of jumping. If *jump* is ``False``, it will " +"return the stack effect of not jumping. And if *jump* is ``None`` (default), " +"it will return the maximal stack effect of both cases." +msgstr "" + +#: library/dis.rst:268 +#, fuzzy +msgid "Added *jump* parameter." +msgstr "Ajout du paramètre *file*." + +#: library/dis.rst:275 +msgid "Python Bytecode Instructions" +msgstr "Les instructions du code intermédiaire en Python" + +#: library/dis.rst:277 +msgid "" +"The :func:`get_instructions` function and :class:`Bytecode` class provide " +"details of bytecode instructions as :class:`Instruction` instances:" +msgstr "" +"La fonction :func:`get_instructions` et la méthode :class:`Bytecode` fournit " +"des détails sur le code intermédiaire des instructions comme :class:" +"`Instruction` instances:" + +#: library/dis.rst:282 +msgid "Details for a bytecode operation" +msgstr "Détails sur le code intermédiaire de l'opération" + +#: library/dis.rst:286 +msgid "" +"numeric code for operation, corresponding to the opcode values listed below " +"and the bytecode values in the :ref:`opcode_collections`." +msgstr "" +"code numérique pour l'opération, correspondant aux valeurs de l'*opcode* ci-" +"dessous et les valeurs du code intermédiaire dans la :ref:" +"`opcode_collections`." + +#: library/dis.rst:292 +msgid "human readable name for operation" +msgstr "nom lisible/compréhensible de l'opération" + +#: library/dis.rst:297 +msgid "numeric argument to operation (if any), otherwise ``None``" +msgstr "le cas échéant, argument numérique de l'opération sinon ``None``" + +#: library/dis.rst:302 +msgid "resolved arg value (if known), otherwise same as arg" +msgstr "" + +#: library/dis.rst:307 +msgid "human readable description of operation argument" +msgstr "" + +#: library/dis.rst:312 +msgid "start index of operation within bytecode sequence" +msgstr "" + +#: library/dis.rst:317 +msgid "line started by this opcode (if any), otherwise ``None``" +msgstr "" + +#: library/dis.rst:322 +msgid "``True`` if other code jumps to here, otherwise ``False``" +msgstr "" + +#: library/dis.rst:327 +msgid "" +"The Python compiler currently generates the following bytecode instructions." +msgstr "" + +#: library/dis.rst:330 +msgid "**General instructions**" +msgstr "" + +#: library/dis.rst:334 +msgid "Do nothing code. Used as a placeholder by the bytecode optimizer." +msgstr "" + +#: library/dis.rst:339 +msgid "Removes the top-of-stack (TOS) item." +msgstr "" + +#: library/dis.rst:344 +msgid "Swaps the two top-most stack items." +msgstr "" + +#: library/dis.rst:349 +msgid "" +"Lifts second and third stack item one position up, moves top down to " +"position three." +msgstr "" + +#: library/dis.rst:355 +msgid "" +"Lifts second, third and fourth stack items one position up, moves top down " +"to position four." +msgstr "" + +#: library/dis.rst:363 +msgid "Duplicates the reference on top of the stack." +msgstr "" + +#: library/dis.rst:370 +msgid "" +"Duplicates the two references on top of the stack, leaving them in the same " +"order." +msgstr "" + +#: library/dis.rst:376 +msgid "**Unary operations**" +msgstr "" + +#: library/dis.rst:378 +msgid "" +"Unary operations take the top of the stack, apply the operation, and push " +"the result back on the stack." +msgstr "" + +#: library/dis.rst:383 +msgid "Implements ``TOS = +TOS``." +msgstr "" + +#: library/dis.rst:388 +msgid "Implements ``TOS = -TOS``." +msgstr "" + +#: library/dis.rst:393 +msgid "Implements ``TOS = not TOS``." +msgstr "" + +#: library/dis.rst:398 +msgid "Implements ``TOS = ~TOS``." +msgstr "" + +#: library/dis.rst:403 +msgid "Implements ``TOS = iter(TOS)``." +msgstr "" + +#: library/dis.rst:408 +msgid "" +"If ``TOS`` is a :term:`generator iterator` or :term:`coroutine` object it is " +"left as is. Otherwise, implements ``TOS = iter(TOS)``." +msgstr "" + +#: library/dis.rst:414 +msgid "**Binary operations**" +msgstr "" + +#: library/dis.rst:416 +msgid "" +"Binary operations remove the top of the stack (TOS) and the second top-most " +"stack item (TOS1) from the stack. They perform the operation, and put the " +"result back on the stack." +msgstr "" + +#: library/dis.rst:422 +msgid "Implements ``TOS = TOS1 ** TOS``." +msgstr "" + +#: library/dis.rst:427 +msgid "Implements ``TOS = TOS1 * TOS``." +msgstr "" + +#: library/dis.rst:432 +msgid "Implements ``TOS = TOS1 @ TOS``." +msgstr "" + +#: library/dis.rst:439 +msgid "Implements ``TOS = TOS1 // TOS``." +msgstr "" + +#: library/dis.rst:444 +msgid "Implements ``TOS = TOS1 / TOS``." +msgstr "" + +#: library/dis.rst:449 +msgid "Implements ``TOS = TOS1 % TOS``." +msgstr "" + +#: library/dis.rst:454 +msgid "Implements ``TOS = TOS1 + TOS``." +msgstr "" + +#: library/dis.rst:459 +msgid "Implements ``TOS = TOS1 - TOS``." +msgstr "" + +#: library/dis.rst:464 +msgid "Implements ``TOS = TOS1[TOS]``." +msgstr "" + +#: library/dis.rst:469 +msgid "Implements ``TOS = TOS1 << TOS``." +msgstr "" + +#: library/dis.rst:474 +msgid "Implements ``TOS = TOS1 >> TOS``." +msgstr "" + +#: library/dis.rst:479 +msgid "Implements ``TOS = TOS1 & TOS``." +msgstr "" + +#: library/dis.rst:484 +msgid "Implements ``TOS = TOS1 ^ TOS``." +msgstr "" + +#: library/dis.rst:489 +msgid "Implements ``TOS = TOS1 | TOS``." +msgstr "" + +#: library/dis.rst:492 +msgid "**In-place operations**" +msgstr "" + +#: library/dis.rst:494 +msgid "" +"In-place operations are like binary operations, in that they remove TOS and " +"TOS1, and push the result back on the stack, but the operation is done in-" +"place when TOS1 supports it, and the resulting TOS may be (but does not have " +"to be) the original TOS1." +msgstr "" + +#: library/dis.rst:501 +msgid "Implements in-place ``TOS = TOS1 ** TOS``." +msgstr "" + +#: library/dis.rst:506 +msgid "Implements in-place ``TOS = TOS1 * TOS``." +msgstr "" + +#: library/dis.rst:511 +msgid "Implements in-place ``TOS = TOS1 @ TOS``." +msgstr "" + +#: library/dis.rst:518 +msgid "Implements in-place ``TOS = TOS1 // TOS``." +msgstr "" + +#: library/dis.rst:523 +msgid "Implements in-place ``TOS = TOS1 / TOS``." +msgstr "" + +#: library/dis.rst:528 +msgid "Implements in-place ``TOS = TOS1 % TOS``." +msgstr "" + +#: library/dis.rst:533 +msgid "Implements in-place ``TOS = TOS1 + TOS``." +msgstr "" + +#: library/dis.rst:538 +msgid "Implements in-place ``TOS = TOS1 - TOS``." +msgstr "" + +#: library/dis.rst:543 +msgid "Implements in-place ``TOS = TOS1 << TOS``." +msgstr "" + +#: library/dis.rst:548 +msgid "Implements in-place ``TOS = TOS1 >> TOS``." +msgstr "" + +#: library/dis.rst:553 +msgid "Implements in-place ``TOS = TOS1 & TOS``." +msgstr "" + +#: library/dis.rst:558 +msgid "Implements in-place ``TOS = TOS1 ^ TOS``." +msgstr "" + +#: library/dis.rst:563 +msgid "Implements in-place ``TOS = TOS1 | TOS``." +msgstr "" + +#: library/dis.rst:568 +msgid "Implements ``TOS1[TOS] = TOS2``." +msgstr "" + +#: library/dis.rst:573 +msgid "Implements ``del TOS1[TOS]``." +msgstr "" + +#: library/dis.rst:576 +msgid "**Coroutine opcodes**" +msgstr "" + +#: library/dis.rst:580 +msgid "" +"Implements ``TOS = get_awaitable(TOS)``, where ``get_awaitable(o)`` returns " +"``o`` if ``o`` is a coroutine object or a generator object with the " +"CO_ITERABLE_COROUTINE flag, or resolves ``o.__await__``." +msgstr "" + +#: library/dis.rst:590 +msgid "Implements ``TOS = TOS.__aiter__()``." +msgstr "" + +#: library/dis.rst:593 +msgid "Returning awaitable objects from ``__aiter__`` is no longer supported." +msgstr "" + +#: library/dis.rst:600 +msgid "" +"Pushes ``get_awaitable(TOS.__anext__())`` to the stack. See " +"``GET_AWAITABLE`` for details about ``get_awaitable``." +msgstr "" + +#: library/dis.rst:608 +msgid "" +"Terminates an :keyword:`async for` loop. Handles an exception raised when " +"awaiting a next item. If TOS is :exc:`StopAsyncIteration` pop 7 values from " +"the stack and restore the exception state using the second three of them. " +"Otherwise re-raise the exception using the three values from the stack. An " +"exception handler block is removed from the block stack." +msgstr "" + +#: library/dis.rst:619 +msgid "" +"Resolves ``__aenter__`` and ``__aexit__`` from the object on top of the " +"stack. Pushes ``__aexit__`` and result of ``__aenter__()`` to the stack." +msgstr "" + +#: library/dis.rst:627 +msgid "Creates a new frame object." +msgstr "" + +#: library/dis.rst:633 +msgid "**Miscellaneous opcodes**" +msgstr "" + +#: library/dis.rst:637 +msgid "" +"Implements the expression statement for the interactive mode. TOS is " +"removed from the stack and printed. In non-interactive mode, an expression " +"statement is terminated with :opcode:`POP_TOP`." +msgstr "" + +#: library/dis.rst:644 +msgid "" +"Calls ``set.add(TOS1[-i], TOS)``. Used to implement set comprehensions." +msgstr "" + +#: library/dis.rst:649 +msgid "" +"Calls ``list.append(TOS1[-i], TOS)``. Used to implement list comprehensions." +msgstr "" + +#: library/dis.rst:654 +msgid "" +"Calls ``dict.__setitem__(TOS1[-i], TOS1, TOS)``. Used to implement dict " +"comprehensions." +msgstr "" + +#: library/dis.rst:658 +msgid "Map value is TOS and map key is TOS1. Before, those were reversed." +msgstr "" + +#: library/dis.rst:661 +msgid "" +"For all of the :opcode:`SET_ADD`, :opcode:`LIST_APPEND` and :opcode:" +"`MAP_ADD` instructions, while the added value or key/value pair is popped " +"off, the container object remains on the stack so that it is available for " +"further iterations of the loop." +msgstr "" + +#: library/dis.rst:669 +msgid "Returns with TOS to the caller of the function." +msgstr "" + +#: library/dis.rst:674 +msgid "Pops TOS and yields it from a :term:`generator`." +msgstr "" + +#: library/dis.rst:679 +msgid "Pops TOS and delegates to it as a subiterator from a :term:`generator`." +msgstr "" + +#: library/dis.rst:686 +msgid "" +"Checks whether ``__annotations__`` is defined in ``locals()``, if not it is " +"set up to an empty ``dict``. This opcode is only emitted if a class or " +"module body contains :term:`variable annotations ` " +"statically." +msgstr "" + +#: library/dis.rst:696 +msgid "" +"Loads all symbols not starting with ``'_'`` directly from the module TOS to " +"the local namespace. The module is popped after loading all names. This " +"opcode implements ``from module import *``." +msgstr "" + +#: library/dis.rst:703 +msgid "" +"Removes one block from the block stack. Per frame, there is a stack of " +"blocks, denoting :keyword:`try` statements, and such." +msgstr "" + +#: library/dis.rst:709 +msgid "" +"Removes one block from the block stack. The popped block must be an " +"exception handler block, as implicitly created when entering an except " +"handler. In addition to popping extraneous values from the frame stack, the " +"last three popped values are used to restore the exception state." +msgstr "" + +#: library/dis.rst:717 +msgid "" +"Re-raises the exception currently on top of the stack. If oparg is non-zero, " +"restores ``f_lasti`` of the current frame to its value when the exception " +"was raised." +msgstr "" + +#: library/dis.rst:725 +msgid "" +"Calls the function in position 7 on the stack with the top three items on " +"the stack as arguments. Used to implement the call ``context_manager." +"__exit__(*exc_info())`` when an exception has occurred in a :keyword:`with` " +"statement." +msgstr "" + +#: library/dis.rst:735 +msgid "" +"Pushes :exc:`AssertionError` onto the stack. Used by the :keyword:`assert` " +"statement." +msgstr "" + +#: library/dis.rst:743 +msgid "" +"Pushes :func:`builtins.__build_class__` onto the stack. It is later called " +"by :opcode:`CALL_FUNCTION` to construct a class." +msgstr "" + +#: library/dis.rst:749 +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_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`), " +"or store it in (a) variable(s) (:opcode:`STORE_FAST`, :opcode:`STORE_NAME`, " +"or :opcode:`UNPACK_SEQUENCE`)." +msgstr "" + +#: library/dis.rst:763 +msgid "" +"TOS is a tuple of mapping keys, and TOS1 is the match subject. Replace TOS " +"with a :class:`dict` formed from the items of TOS1, but without any of the " +"keys in TOS." +msgstr "" + +#: library/dis.rst:772 +msgid "Push ``len(TOS)`` onto the stack." +msgstr "" + +#: library/dis.rst:779 +msgid "" +"If TOS is an instance of :class:`collections.abc.Mapping` (or, more " +"technically: if it has the :const:`Py_TPFLAGS_MAPPING` flag set in its :c:" +"member:`~PyTypeObject.tp_flags`), push ``True`` onto the stack. Otherwise, " +"push ``False``." +msgstr "" + +#: library/dis.rst:789 +msgid "" +"If TOS is an instance of :class:`collections.abc.Sequence` and is *not* an " +"instance of :class:`str`/:class:`bytes`/:class:`bytearray` (or, more " +"technically: if it has the :const:`Py_TPFLAGS_SEQUENCE` flag set in its :c:" +"member:`~PyTypeObject.tp_flags`), push ``True`` onto the stack. Otherwise, " +"push ``False``." +msgstr "" + +#: library/dis.rst:799 +msgid "" +"TOS is a tuple of mapping keys, and TOS1 is the match subject. If TOS1 " +"contains all of the keys in TOS, push a :class:`tuple` containing the " +"corresponding values, followed by ``True``. Otherwise, push ``None``, " +"followed by ``False``." +msgstr "" + +#: library/dis.rst:807 +msgid "All of the following opcodes use their arguments." +msgstr "" + +#: library/dis.rst:811 +msgid "" +"Implements ``name = TOS``. *namei* is the index of *name* in the attribute :" +"attr:`co_names` of the code object. The compiler tries to use :opcode:" +"`STORE_FAST` or :opcode:`STORE_GLOBAL` if possible." +msgstr "" + +#: library/dis.rst:818 +msgid "" +"Implements ``del name``, where *namei* is the index into :attr:`co_names` " +"attribute of the code object." +msgstr "" + +#: library/dis.rst:824 +msgid "" +"Unpacks TOS into *count* individual values, which are put onto the stack " +"right-to-left." +msgstr "" + +#: library/dis.rst:830 +msgid "" +"Implements assignment with a starred target: Unpacks an iterable in TOS into " +"individual values, where the total number of values can be smaller than the " +"number of items in the iterable: one of the new values will be a list of all " +"leftover items." +msgstr "" + +#: library/dis.rst:835 +msgid "" +"The low byte of *counts* is the number of values before the list value, the " +"high byte of *counts* the number of values after it. The resulting values " +"are put onto the stack right-to-left." +msgstr "" + +#: library/dis.rst:842 +msgid "" +"Implements ``TOS.name = TOS1``, where *namei* is the index of name in :attr:" +"`co_names`." +msgstr "" + +#: library/dis.rst:848 +msgid "" +"Implements ``del TOS.name``, using *namei* as index into :attr:`co_names`." +msgstr "" + +#: library/dis.rst:853 +msgid "Works as :opcode:`STORE_NAME`, but stores the name as a global." +msgstr "" + +#: library/dis.rst:858 +msgid "Works as :opcode:`DELETE_NAME`, but deletes a global name." +msgstr "" + +#: library/dis.rst:863 +msgid "Pushes ``co_consts[consti]`` onto the stack." +msgstr "" + +#: library/dis.rst:868 +msgid "Pushes the value associated with ``co_names[namei]`` onto the stack." +msgstr "" + +#: library/dis.rst:873 +msgid "" +"Creates a tuple consuming *count* items from the stack, and pushes the " +"resulting tuple onto the stack." +msgstr "" + +#: library/dis.rst:879 +msgid "Works as :opcode:`BUILD_TUPLE`, but creates a list." +msgstr "" + +#: library/dis.rst:884 +msgid "Works as :opcode:`BUILD_TUPLE`, but creates a set." +msgstr "" + +#: library/dis.rst:889 +msgid "" +"Pushes a new dictionary object onto the stack. Pops ``2 * count`` items so " +"that the dictionary holds *count* entries: ``{..., TOS3: TOS2, TOS1: TOS}``." +msgstr "" + +#: library/dis.rst:893 +msgid "" +"The dictionary is created from stack items instead of creating an empty " +"dictionary pre-sized to hold *count* items." +msgstr "" + +#: library/dis.rst:900 +msgid "" +"The version of :opcode:`BUILD_MAP` specialized for constant keys. Pops the " +"top element on the stack which contains a tuple of keys, then starting from " +"``TOS1``, pops *count* values to form values in the built dictionary." +msgstr "" + +#: library/dis.rst:909 +msgid "" +"Concatenates *count* strings from the stack and pushes the resulting string " +"onto the stack." +msgstr "" + +#: library/dis.rst:917 +msgid "" +"Pops a list from the stack and pushes a tuple containing the same values." +msgstr "" + +#: library/dis.rst:924 +msgid "Calls ``list.extend(TOS1[-i], TOS)``. Used to build lists." +msgstr "" + +#: library/dis.rst:931 +msgid "Calls ``set.update(TOS1[-i], TOS)``. Used to build sets." +msgstr "" + +#: library/dis.rst:938 +msgid "Calls ``dict.update(TOS1[-i], TOS)``. Used to build dicts." +msgstr "" + +#: library/dis.rst:945 +msgid "Like :opcode:`DICT_UPDATE` but raises an exception for duplicate keys." +msgstr "" + +#: library/dis.rst:952 +msgid "Replaces TOS with ``getattr(TOS, co_names[namei])``." +msgstr "" + +#: library/dis.rst:957 +msgid "" +"Performs a Boolean operation. The operation name can be found in " +"``cmp_op[opname]``." +msgstr "" + +#: library/dis.rst:963 +msgid "Performs ``is`` comparison, or ``is not`` if ``invert`` is 1." +msgstr "" + +#: library/dis.rst:970 +msgid "Performs ``in`` comparison, or ``not in`` if ``invert`` is 1." +msgstr "" + +#: library/dis.rst:977 +msgid "" +"Imports the module ``co_names[namei]``. TOS and TOS1 are popped and provide " +"the *fromlist* and *level* arguments of :func:`__import__`. The module " +"object is pushed onto the stack. The current namespace is not affected: for " +"a proper import statement, a subsequent :opcode:`STORE_FAST` instruction " +"modifies the namespace." +msgstr "" + +#: library/dis.rst:986 +msgid "" +"Loads the attribute ``co_names[namei]`` from the module found in TOS. The " +"resulting object is pushed onto the stack, to be subsequently stored by a :" +"opcode:`STORE_FAST` instruction." +msgstr "" + +#: library/dis.rst:993 +msgid "Increments bytecode counter by *delta*." +msgstr "" + +#: library/dis.rst:998 +msgid "If TOS is true, sets the bytecode counter to *target*. TOS is popped." +msgstr "" + +#: library/dis.rst:1005 +msgid "If TOS is false, sets the bytecode counter to *target*. TOS is popped." +msgstr "" + +#: library/dis.rst:1011 +msgid "" +"Tests whether the second value on the stack is an exception matching TOS, " +"and jumps if it is not. Pops two values from the stack." +msgstr "" + +#: library/dis.rst:1019 +msgid "" +"If TOS is true, sets the bytecode counter to *target* and leaves TOS on the " +"stack. Otherwise (TOS is false), TOS is popped." +msgstr "" + +#: library/dis.rst:1027 +msgid "" +"If TOS is false, sets the bytecode counter to *target* and leaves TOS on the " +"stack. Otherwise (TOS is true), TOS is popped." +msgstr "" + +#: library/dis.rst:1035 +msgid "Set bytecode counter to *target*." +msgstr "" + +#: library/dis.rst:1040 +msgid "" +"TOS is an :term:`iterator`. Call its :meth:`~iterator.__next__` method. If " +"this yields a new value, push it on the stack (leaving the iterator below " +"it). If the iterator indicates it is exhausted, TOS is popped, and the byte " +"code counter is incremented by *delta*." +msgstr "" + +#: library/dis.rst:1048 +msgid "Loads the global named ``co_names[namei]`` onto the stack." +msgstr "" + +#: library/dis.rst:1053 +msgid "" +"Pushes a try block from a try-finally or try-except clause onto the block " +"stack. *delta* points to the finally block or the first except block." +msgstr "" + +#: library/dis.rst:1059 +msgid "" +"Pushes a reference to the local ``co_varnames[var_num]`` onto the stack." +msgstr "" + +#: library/dis.rst:1064 +msgid "Stores TOS into the local ``co_varnames[var_num]``." +msgstr "" + +#: library/dis.rst:1069 +msgid "Deletes local ``co_varnames[var_num]``." +msgstr "" + +#: library/dis.rst:1074 +msgid "" +"Pushes a reference to the cell contained in slot *i* of the cell and free " +"variable storage. The name of the variable is ``co_cellvars[i]`` if *i* is " +"less than the length of *co_cellvars*. Otherwise it is ``co_freevars[i - " +"len(co_cellvars)]``." +msgstr "" + +#: library/dis.rst:1082 +msgid "" +"Loads the cell contained in slot *i* of the cell and free variable storage. " +"Pushes a reference to the object the cell contains on the stack." +msgstr "" + +#: library/dis.rst:1088 +msgid "" +"Much like :opcode:`LOAD_DEREF` but first checks the locals dictionary before " +"consulting the cell. This is used for loading free variables in class " +"bodies." +msgstr "" + +#: library/dis.rst:1097 +msgid "" +"Stores TOS into the cell contained in slot *i* of the cell and free variable " +"storage." +msgstr "" + +#: library/dis.rst:1103 +msgid "" +"Empties the cell contained in slot *i* of the cell and free variable " +"storage. Used by the :keyword:`del` statement." +msgstr "" + +#: library/dis.rst:1111 +msgid "" +"Raises an exception using one of the 3 forms of the ``raise`` statement, " +"depending on the value of *argc*:" +msgstr "" + +#: library/dis.rst:1114 +msgid "0: ``raise`` (re-raise previous exception)" +msgstr "" + +#: library/dis.rst:1115 +msgid "1: ``raise TOS`` (raise exception instance or type at ``TOS``)" +msgstr "" + +#: library/dis.rst:1116 +msgid "" +"2: ``raise TOS1 from TOS`` (raise exception instance or type at ``TOS1`` " +"with ``__cause__`` set to ``TOS``)" +msgstr "" + +#: library/dis.rst:1122 +msgid "" +"Calls a callable object with positional arguments. *argc* indicates the " +"number of positional arguments. The top of the stack contains positional " +"arguments, with the right-most argument on top. Below the arguments is a " +"callable object to call. ``CALL_FUNCTION`` pops all arguments and the " +"callable object off the stack, calls the callable object with those " +"arguments, and pushes the return value returned by the callable object." +msgstr "" + +#: library/dis.rst:1130 +msgid "This opcode is used only for calls with positional arguments." +msgstr "" + +#: library/dis.rst:1136 +msgid "" +"Calls a callable object with positional (if any) and keyword arguments. " +"*argc* indicates the total number of positional and keyword arguments. The " +"top element on the stack contains a tuple with the names of the keyword " +"arguments, which must be strings. Below that are the values for the keyword " +"arguments, in the order corresponding to the tuple. Below that are " +"positional arguments, with the right-most parameter on top. Below the " +"arguments is a callable object to call. ``CALL_FUNCTION_KW`` pops all " +"arguments and the callable object off the stack, calls the callable object " +"with those arguments, and pushes the return value returned by the callable " +"object." +msgstr "" + +#: library/dis.rst:1148 +msgid "" +"Keyword arguments are packed in a tuple instead of a dictionary, *argc* " +"indicates the total number of arguments." +msgstr "" + +#: library/dis.rst:1155 +msgid "" +"Calls a callable object with variable set of positional and keyword " +"arguments. If the lowest bit of *flags* is set, the top of the stack " +"contains a mapping object containing additional keyword arguments. Before " +"the callable is called, the mapping object and iterable object are each " +"\"unpacked\" and their contents passed in as keyword and positional " +"arguments respectively. ``CALL_FUNCTION_EX`` pops all arguments and the " +"callable object off the stack, calls the callable object with those " +"arguments, and pushes the return value returned by the callable object." +msgstr "" + +#: library/dis.rst:1170 +msgid "" +"Loads a method named ``co_names[namei]`` from the TOS object. TOS is popped. " +"This bytecode distinguishes two cases: if TOS has a method with the correct " +"name, the bytecode pushes the unbound method and TOS. TOS will be used as " +"the first argument (``self``) by :opcode:`CALL_METHOD` when calling the " +"unbound method. Otherwise, ``NULL`` and the object return by the attribute " +"lookup are pushed." +msgstr "" + +#: library/dis.rst:1182 +msgid "" +"Calls a method. *argc* is the number of positional arguments. Keyword " +"arguments are not supported. This opcode is designed to be used with :" +"opcode:`LOAD_METHOD`. Positional arguments are on top of the stack. Below " +"them, the two items described in :opcode:`LOAD_METHOD` are on the stack " +"(either ``self`` and an unbound method object or ``NULL`` and an arbitrary " +"callable). All of them are popped and the return value is pushed." +msgstr "" + +#: library/dis.rst:1194 +msgid "" +"Pushes a new function object on the stack. From bottom to top, the consumed " +"stack must consist of values if the argument carries a specified flag value" +msgstr "" + +#: library/dis.rst:1197 +msgid "" +"``0x01`` a tuple of default values for positional-only and positional-or-" +"keyword parameters in positional order" +msgstr "" + +#: library/dis.rst:1199 +msgid "``0x02`` a dictionary of keyword-only parameters' default values" +msgstr "" + +#: library/dis.rst:1200 +msgid "``0x04`` a tuple of strings containing parameters' annotations" +msgstr "" + +#: library/dis.rst:1201 +msgid "``0x08`` a tuple containing cells for free variables, making a closure" +msgstr "" + +#: library/dis.rst:1202 +msgid "the code associated with the function (at TOS1)" +msgstr "" + +#: library/dis.rst:1203 +msgid "the :term:`qualified name` of the function (at TOS)" +msgstr "" + +#: library/dis.rst:1205 +msgid "Flag value ``0x04`` is a tuple of strings instead of dictionary" +msgstr "" + +#: library/dis.rst:1212 +msgid "" +"Pushes a slice object on the stack. *argc* must be 2 or 3. If it is 2, " +"``slice(TOS1, TOS)`` is pushed; if it is 3, ``slice(TOS2, TOS1, TOS)`` is " +"pushed. See the :func:`slice` built-in function for more information." +msgstr "" + +#: library/dis.rst:1219 +msgid "" +"Prefixes any opcode which has an argument too big to fit into the default " +"one byte. *ext* holds an additional byte which act as higher bits in the " +"argument. For each opcode, at most three prefixal ``EXTENDED_ARG`` are " +"allowed, forming an argument from two-byte to four-byte." +msgstr "" + +#: library/dis.rst:1227 +msgid "" +"Used for implementing formatted literal strings (f-strings). Pops an " +"optional *fmt_spec* from the stack, then a required *value*. *flags* is " +"interpreted as follows:" +msgstr "" + +#: library/dis.rst:1231 +msgid "``(flags & 0x03) == 0x00``: *value* is formatted as-is." +msgstr "" + +#: library/dis.rst:1232 +msgid "" +"``(flags & 0x03) == 0x01``: call :func:`str` on *value* before formatting it." +msgstr "" + +#: library/dis.rst:1234 +msgid "" +"``(flags & 0x03) == 0x02``: call :func:`repr` on *value* before formatting " +"it." +msgstr "" + +#: library/dis.rst:1236 +msgid "" +"``(flags & 0x03) == 0x03``: call :func:`ascii` on *value* before formatting " +"it." +msgstr "" + +#: library/dis.rst:1238 +msgid "" +"``(flags & 0x04) == 0x04``: pop *fmt_spec* from the stack and use it, else " +"use an empty *fmt_spec*." +msgstr "" + +#: library/dis.rst:1241 +msgid "" +"Formatting is performed using :c:func:`PyObject_Format`. The result is " +"pushed on the stack." +msgstr "" + +#: library/dis.rst:1249 +msgid "" +"TOS is a tuple of keyword attribute names, TOS1 is the class being matched " +"against, and TOS2 is the match subject. *count* is the number of positional " +"sub-patterns." +msgstr "" + +#: library/dis.rst:1253 +msgid "" +"Pop TOS. If TOS2 is an instance of TOS1 and has the positional and keyword " +"attributes required by *count* and TOS, set TOS to ``True`` and TOS1 to a " +"tuple of extracted attributes. Otherwise, set TOS to ``False``." +msgstr "" + +#: library/dis.rst:1261 +msgid "" +"Pops TOS. The ``kind`` operand corresponds to the type of generator or " +"coroutine. The legal kinds are 0 for generator, 1 for coroutine, and 2 for " +"async generator." +msgstr "" + +#: library/dis.rst:1270 +msgid "" +"Lift the top *count* stack items one position up, and move TOS down to " +"position *count*." +msgstr "" + +#: library/dis.rst:1278 +msgid "" +"This is not really an opcode. It identifies the dividing line between " +"opcodes which don't use their argument and those that do (``< " +"HAVE_ARGUMENT`` and ``>= HAVE_ARGUMENT``, respectively)." +msgstr "" + +#: library/dis.rst:1282 +msgid "" +"Now every instruction has an argument, but opcodes ``< HAVE_ARGUMENT`` " +"ignore it. Before, only opcodes ``>= HAVE_ARGUMENT`` had an argument." +msgstr "" + +#: library/dis.rst:1290 +msgid "Opcode collections" +msgstr "" + +#: library/dis.rst:1292 +msgid "" +"These collections are provided for automatic introspection of bytecode " +"instructions:" +msgstr "" + +#: library/dis.rst:1297 +msgid "Sequence of operation names, indexable using the bytecode." +msgstr "" + +#: library/dis.rst:1302 +msgid "Dictionary mapping operation names to bytecodes." +msgstr "" + +#: library/dis.rst:1307 +msgid "Sequence of all compare operation names." +msgstr "" + +#: library/dis.rst:1312 +msgid "Sequence of bytecodes that access a constant." +msgstr "" + +#: library/dis.rst:1317 +msgid "" +"Sequence of bytecodes that access a free variable (note that 'free' in this " +"context refers to names in the current scope that are referenced by inner " +"scopes or names in outer scopes that are referenced from this scope. It " +"does *not* include references to global or builtin scopes)." +msgstr "" + +#: library/dis.rst:1325 +msgid "Sequence of bytecodes that access an attribute by name." +msgstr "" + +#: library/dis.rst:1330 +msgid "Sequence of bytecodes that have a relative jump target." +msgstr "" + +#: library/dis.rst:1335 +msgid "Sequence of bytecodes that have an absolute jump target." +msgstr "" + +#: library/dis.rst:1340 +msgid "Sequence of bytecodes that access a local variable." +msgstr "" + +#: library/dis.rst:1345 +msgid "Sequence of bytecodes of Boolean operations." +msgstr "" diff --git a/library/distribution.po b/library/distribution.po new file mode 100644 index 0000000000..047e28bcec --- /dev/null +++ b/library/distribution.po @@ -0,0 +1,31 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +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-06-10 15:33+0200\n" +"Last-Translator: FULL NAME \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" + +#: library/distribution.rst:3 +msgid "Software Packaging and Distribution" +msgstr "Paquets et distribution de paquets logiciels" + +#: library/distribution.rst:5 +msgid "" +"These libraries help you with publishing and installing Python software. " +"While these modules are designed to work in conjunction with the `Python " +"Package Index `__, they can also be used with a local " +"index server, or without any index server at all." +msgstr "" +"Ces bibliothèques vous aident lors de la publication et l'installation de " +"logiciels Python. Bien que ces modules sont conçus pour fonctionner avec le " +"`Python Package Index `__, ils peuvent aussi être utilisés " +"avec un serveur local, ou sans serveur." diff --git a/library/distutils.po b/library/distutils.po new file mode 100644 index 0000000000..b31a7207c2 --- /dev/null +++ b/library/distutils.po @@ -0,0 +1,120 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-09-23 16:16+0200\n" +"PO-Revision-Date: 2018-09-28 12:38+0200\n" +"Last-Translator: Julien Palard \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 1.6.10\n" + +#: library/distutils.rst:2 +msgid ":mod:`distutils` --- Building and installing Python modules" +msgstr ":mod:`distutils` — Création et installation des modules Python" + +#: library/distutils.rst:12 +msgid "" +":mod:`distutils` is deprecated with removal planned for Python 3.12. See " +"the :ref:`What's New ` entry for more information." +msgstr "" + +#: library/distutils.rst:17 +msgid "" +"The :mod:`distutils` package provides support for building and installing " +"additional modules into a Python installation. The new modules may be " +"either 100%-pure Python, or may be extension modules written in C, or may be " +"collections of Python packages which include modules coded in both Python " +"and C." +msgstr "" +"Le package :mod:`distutils` fournit le support pour la création et " +"l'installation de modules supplémentaires dans une installation Python. Les " +"nouveaux modules peuvent être soit en Python pur à 100%, soit des modules " +"d'extension écrits en C, soit des collections de paquets Python qui incluent " +"des modules codés en C et en Python." + +#: library/distutils.rst:22 +msgid "" +"Most Python users will *not* want to use this module directly, but instead " +"use the cross-version tools maintained by the Python Packaging Authority. In " +"particular, `setuptools `__ is " +"an enhanced alternative to :mod:`distutils` that provides:" +msgstr "" +"La plupart des utilisateurs de Python ne voudront *pas* utiliser ce module " +"directement, mais plutôt les outils cross-version maintenus par la *Python " +"Packaging Authority*. En particulier, `setuptools `__ est une alternative améliorée à :mod:" +"`distutils` qui fournit :" + +#: library/distutils.rst:28 +msgid "support for declaring project dependencies" +msgstr "support pour la déclaration des dépendances de projets" + +#: library/distutils.rst:29 +msgid "" +"additional mechanisms for configuring which files to include in source " +"releases (including plugins for integration with version control systems)" +msgstr "" +"mécanismes supplémentaires pour configurer quels fichiers inclure dans les " +"distributions source (y compris les extensions pour l'intégration avec les " +"systèmes de contrôle de version)" + +#: library/distutils.rst:31 +msgid "" +"the ability to declare project \"entry points\", which can be used as the " +"basis for application plugin systems" +msgstr "" +"la possibilité de déclarer les \"points d'entrée\" du projet, qui peuvent " +"être utilisés comme base pour les systèmes d'extensions" + +#: library/distutils.rst:33 +msgid "" +"the ability to automatically generate Windows command line executables at " +"installation time rather than needing to prebuild them" +msgstr "" +"la possibilité de générer automatiquement des exécutables en ligne de " +"commande Windows au moment de l'installation plutôt que de devoir les pré-" +"construire" + +#: library/distutils.rst:35 +msgid "consistent behaviour across all supported Python versions" +msgstr "comportement cohérent entre toutes les versions Python supportées" + +#: library/distutils.rst:37 +msgid "" +"The recommended `pip `__ installer runs all ``setup." +"py`` scripts with ``setuptools``, even if the script itself only imports " +"``distutils``. Refer to the `Python Packaging User Guide `_ for more information." +msgstr "" +"Le programme d'installation recommandé `pip `__ " +"exécute tous les scripts ``setup. py`` avec ``setuptools``, même si le " +"script lui-même n'importe que ``distutils``. Pour plus d'informations, " +"reportez-vous au `Python Packaging User Guide `_." + +#: library/distutils.rst:43 +msgid "" +"For the benefits of packaging tool authors and users seeking a deeper " +"understanding of the details of the current packaging and distribution " +"system, the legacy :mod:`distutils` based user documentation and API " +"reference remain available:" +msgstr "" +"À destination des auteurs et utilisateurs d'outils d'empaquetage cherchant " +"une compréhension plus approfondie des détails du système actuel de création " +"de paquets et de leur distribution, la documentation utilisateur historique " +"de :mod:`distutils` la référence de son API restent disponibles :" + +#: library/distutils.rst:48 +msgid ":ref:`install-index`" +msgstr ":ref:`install-index`" + +#: library/distutils.rst:49 +msgid ":ref:`distutils-index`" +msgstr ":ref:`distutils-index`" diff --git a/library/doctest.po b/library/doctest.po new file mode 100644 index 0000000000..3c53e58458 --- /dev/null +++ b/library/doctest.po @@ -0,0 +1,2764 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-18 15:46+0200\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 ":mod:`doctest` — Exemples de tests interactifs en Python" + +#: library/doctest.rst:12 +msgid "**Source code:** :source:`Lib/doctest.py`" +msgstr "**Code source :** :source:`Lib/doctest.py`" + +#: library/doctest.rst:16 +msgid "" +"The :mod:`doctest` module searches for pieces of text that look like " +"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 "" +"To write tutorial documentation for a package, liberally illustrated with " +"input-output examples. Depending on whether the examples or the expository " +"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 "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 "" +"There's no output! That's normal, and it means all the examples worked. " +"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 "Et ainsi de suite, jusqu'à ce qu'on atteigne :" + +#: library/doctest.rst:133 +msgid "" +"That's all you need to know to start making productive use of :mod:" +"`doctest`! Jump in. The following sections provide full details. Note that " +"there are many examples of doctests in the standard Python test suite and " +"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 "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 ":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 "" +"This won't display anything unless an example fails, in which case the " +"failing example(s) and the cause(s) of the failure(s) are printed to stdout, " +"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 "À 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 "" +"You can force verbose mode by passing ``verbose=True`` to :func:`testmod`, " +"or prohibit it by passing ``verbose=False``. In either of those cases, " +"``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 "" +"There is also a command line shortcut for running :func:`testmod`. You can " +"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 "" +"This will import :file:`example.py` as a standalone module and run :func:" +"`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 "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 "" +"That short script executes and verifies any interactive Python examples " +"contained in the file :file:`example.txt`. The file content is treated as " +"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 "" +"As with :func:`testmod`, :func:`testfile` won't display anything unless an " +"example fails. If an example does fail, then the failing example(s) and the " +"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 "" +"By default, :func:`testfile` looks for files in the calling module's " +"directory. See section :ref:`doctest-basic-api` for a description of the " +"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 "" +"There is also a command line shortcut for running :func:`testfile`. You can " +"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 "Comment ça marche" + +#: library/doctest.rst:264 +msgid "" +"This section examines in detail how doctest works: which docstrings it looks " +"at, how it finds interactive examples, what execution context it uses, how " +"it handles exceptions, and how option flags can be used to control its " +"behavior. This is the information that you need to know to write doctest " +"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 "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 "" +"In addition, if ``M.__test__`` exists and \"is true\", it must be a dict, " +"and each entry maps a (string) name to a function object, class object, or " +"string. Function and class object docstrings found from ``M.__test__`` are " +"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:295 +msgid "How are Docstring Examples Recognized?" +msgstr "Comment les exemples *docstring* sont-ils identifiés ?" + +#: library/doctest.rst:297 +msgid "" +"In most cases a copy-and-paste of an interactive console session works fine, " +"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:322 +msgid "" +"Any expected output must immediately follow the final ``'>>> '`` or ``'... " +"'`` 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:326 +msgid "The fine print:" +msgstr "En détail :" + +#: library/doctest.rst:328 +msgid "" +"Expected output cannot contain an all-whitespace line, since such a line is " +"taken to signal the end of expected output. If expected output does contain " +"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:333 +msgid "" +"All hard tab characters are expanded to spaces, using 8-column tab stops. " +"Tabs in output generated by the tested code are not modified. Because any " +"hard tabs in the sample output *are* expanded, this means that if the code " +"output includes hard tabs, the only way the doctest can pass is if the :" +"const:`NORMALIZE_WHITESPACE` option or :ref:`directive ` " +"is in effect. Alternatively, the test can be rewritten to capture the output " +"and compare it to an expected value as part of the test. This handling of " +"tabs in the source was arrived at through trial and error, and has proven to " +"be the least error prone way of handling them. It is possible to use a " +"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:345 +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:348 +msgid "" +"If you continue a line via backslashing in an interactive session, or for " +"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:357 +msgid "" +"Otherwise, the backslash will be interpreted as part of the string. For " +"example, the ``\\n`` above would be interpreted as a newline character. " +"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:366 +msgid "The starting column doesn't matter::" +msgstr "La colonne de départ n'a pas d'importance ::" + +#: library/doctest.rst:373 +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:380 +msgid "What's the Execution Context?" +msgstr "Quel est le contexte d'exécution ?" + +#: library/doctest.rst:382 +msgid "" +"By default, each time :mod:`doctest` finds a docstring to test, it uses a " +"*shallow copy* of :mod:`M`'s globals, so that running tests doesn't change " +"the module's real globals, and so that one test in :mod:`M` can't leave " +"behind crumbs that accidentally allow another test to work. This means " +"examples can freely use any names defined at top-level in :mod:`M`, and " +"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:390 +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:397 +msgid "What About Exceptions?" +msgstr "Qu'en est-il des exceptions ?" + +#: library/doctest.rst:399 +msgid "" +"No problem, provided that the traceback is the only output produced by the " +"example: just paste in the traceback. [#]_ Since tracebacks contain details " +"that are likely to change rapidly (for example, exact file paths and line " +"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:405 +msgid "Simple example::" +msgstr "Exemple simple ::" + +#: library/doctest.rst:412 +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:415 +msgid "" +"The expected output for an exception must start with a traceback header, " +"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:422 +msgid "" +"The traceback header is followed by an optional traceback stack, whose " +"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:426 +msgid "" +"The traceback stack is followed by the most interesting part: the line(s) " +"containing the exception type and detail. This is usually the last line of " +"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:438 +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:441 +msgid "" +"Best practice is to omit the traceback stack, unless it adds significant " +"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:451 +msgid "" +"Note that tracebacks are treated very specially. In particular, in the " +"rewritten example, the use of ``...`` is independent of doctest's :const:" +"`ELLIPSIS` option. The ellipsis in that example could be left out, or could " +"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:457 +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:459 +msgid "" +"Doctest can't guess whether your expected output came from an exception " +"traceback or from ordinary printing. So, e.g., an example that expects " +"``ValueError: 42 is prime`` will pass whether :exc:`ValueError` is actually " +"raised or if the example merely prints that traceback text. In practice, " +"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:466 +msgid "" +"Each line of the traceback stack (if present) must be indented further than " +"the first line of the example, *or* start with a non-alphanumeric character. " +"The first line following the traceback header indented the same and starting " +"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:472 +msgid "" +"When the :const:`IGNORE_EXCEPTION_DETAIL` doctest option is specified, " +"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:476 +msgid "" +"The interactive shell omits the traceback header line for some :exc:" +"`SyntaxError`\\ s. But doctest uses the traceback header line to " +"distinguish exceptions from non-exceptions. So in the rare case where you " +"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:484 +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:493 +msgid "" +"Since the lines showing the position of the error come before the exception " +"type and detail, they are not checked by doctest. For example, the " +"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:509 +msgid "Option Flags" +msgstr "Options de ligne de commande" + +#: library/doctest.rst:511 +msgid "" +"A number of option flags control various aspects of doctest's behavior. " +"Symbolic names for the flags are supplied as module constants, which can be :" +"ref:`bitwise ORed ` together and passed to various functions. The " +"names can also be used in :ref:`doctest directives `, " +"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:517 +msgid "The ``-o`` command line option." +msgstr "L'option de ligne de commande ``-o``." + +#: library/doctest.rst:520 +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:526 +msgid "" +"By default, if an expected output block contains just ``1``, an actual " +"output block containing just ``1`` or just ``True`` is considered to be a " +"match, and similarly for ``0`` versus ``False``. When :const:" +"`DONT_ACCEPT_TRUE_FOR_1` is specified, neither substitution is allowed. The " +"default behavior caters to that Python changed the return type of many " +"functions from integer to boolean; doctests expecting \"little integer\" " +"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:538 +msgid "" +"By default, if an expected output block contains a line containing only the " +"string ````, then that line will match a blank line in the actual " +"output. Because a genuinely blank line delimits the expected output, this " +"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:547 +msgid "" +"When specified, all sequences of whitespace (blanks and newlines) are " +"treated as equal. Any sequence of whitespace within the expected output " +"will match any sequence of whitespace within the actual output. By default, " +"whitespace must match exactly. :const:`NORMALIZE_WHITESPACE` is especially " +"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:558 +msgid "" +"When specified, an ellipsis marker (``...``) in the expected output can " +"match any substring in the actual output. This includes substrings that " +"span line boundaries, and empty substrings, so it's best to keep usage of " +"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:567 +msgid "" +"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:571 +msgid "" +"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:593 +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 the " +"module name is present or matches exactly." +msgstr "" + +#: library/doctest.rst:597 +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:604 +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, " +"and an example should be included for documentation purposes, but should not " +"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:610 +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:615 +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:617 +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:622 +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:628 +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:634 +msgid "" +"When specified, differences are computed by ``difflib.Differ``, using the " +"same algorithm as the popular :file:`ndiff.py` utility. This is the only " +"method that marks differences within lines as well as across lines. For " +"example, if a line of expected output contains digit ``1`` where actual " +"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:643 +msgid "" +"When specified, display the first failing example in each doctest, but " +"suppress output for all remaining examples. This will prevent doctest from " +"reporting correct examples that break because of earlier failures; but it " +"might also hide incorrect examples that fail independently of the first " +"failure. When :const:`REPORT_ONLY_FIRST_FAILURE` is specified, the " +"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:654 +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:659 +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:667 +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:670 +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:676 +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 :" +"class:`OutputChecker` or :class:`DocTestRunner` to create new options that " +"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:692 +msgid "Directives" +msgstr "Instructions" + +#: library/doctest.rst:694 +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:705 +#, 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:709 +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:712 +#, fuzzy +msgid "For example, this test passes:" +msgstr "Par exemple, ce test réussit ::" + +#: library/doctest.rst:721 +#, fuzzy +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:732 +#, fuzzy +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:741 +#, fuzzy +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:751 +#, fuzzy +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:762 +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 " +"directive) is usually the only meaningful choice. However, option flags can " +"also be passed to functions that run doctests, establishing different " +"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:772 +msgid "Warnings" +msgstr "Avertissements" + +#: library/doctest.rst:774 +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 " +"probably surprise you a few times, as you learn exactly what Python does and " +"doesn't guarantee about output. For example, when printing a set, Python " +"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:783 +msgid "is vulnerable! One workaround is to do ::" +msgstr "est vulnérable ! Une alternative est de faire ::" + +#: library/doctest.rst:788 +msgid "instead. Another is to do ::" +msgstr "à la place. Une autre façon de faire est ::" + +#: library/doctest.rst:794 +msgid "There are others, but you get the idea." +msgstr "Il y en a d'autres, mais vous saisissez l'idée." + +#: library/doctest.rst:796 +#, fuzzy +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:806 +#, fuzzy +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:814 +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:825 +#, 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:831 +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:838 +msgid "Basic API" +msgstr "API de base" + +#: library/doctest.rst:840 +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:848 +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:851 +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:854 +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:857 +msgid "" +"If *module_relative* is ``True`` (the default), then *filename* specifies an " +"OS-independent module-relative path. By default, this path is relative to " +"the calling module's directory; but if the *package* argument is specified, " +"then it is relative to that package. To ensure OS-independence, *filename* " +"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:864 +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:868 +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:871 +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-" +"relative filename. If no package is specified, then the calling module's " +"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:877 +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:882 +msgid "" +"Optional argument *extraglobs* gives a dict merged into the globals used to " +"execute examples. This works like :meth:`dict.update`: if *globs* and " +"*extraglobs* have a common key, the associated value in *extraglobs* appears " +"in the combined dict. By default, or if ``None``, no extra globals are " +"used. This is an advanced feature that allows parameterization of " +"doctests. For example, a doctest can be written for a base class, using a " +"generic name for the class, then reused to test any number of subclasses by " +"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:891 +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:895 +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:899 +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:903 +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:1048 +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:1052 +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:918 +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:921 +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:925 +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:930 +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:932 +msgid "Return ``(failure_count, test_count)``." +msgstr "Renvoie ``(failure_count, test_count)``." + +#: library/doctest.rst:934 +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:937 +msgid "" +"Optional argument *exclude_empty* defaults to false. If true, objects for " +"which no doctests are found are excluded from consideration. The default is " +"a backward compatibility hack, so that code still using :meth:`doctest." +"master.summarize` in conjunction with :func:`testmod` continues to get " +"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:944 +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:951 +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:954 +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:956 +msgid "" +"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:959 +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:962 +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:966 +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:972 +msgid "Unittest API" +msgstr "API de tests unitaires" + +#: library/doctest.rst:974 +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 " +"can be used to create :mod:`unittest` test suites from modules and text " +"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:988 +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:994 +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:997 +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 " +"any file fails, then the synthesized unit test fails, and a :exc:" +"`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:1003 +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:1005 +msgid "Options may be provided as keyword arguments:" +msgstr "Les options peuvent être fournies comme des options lettrées :" + +#: library/doctest.rst:1007 +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:1010 +msgid "" +"If *module_relative* is ``True`` (the default), then each filename in " +"*paths* specifies an OS-independent module-relative path. By default, this " +"path is relative to the calling module's directory; but if the *package* " +"argument is specified, then it is relative to that package. To ensure OS-" +"independence, each filename 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* 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:1018 +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:1022 +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-" +"relative filenames in *paths*. If no package is specified, then the calling " +"module's 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 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:1029 +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:1034 +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:1073 +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:1043 +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:1055 +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:1061 +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:1063 +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, " +"then the synthesized unit test fails, and a :exc:`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 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:1069 +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:1077 +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:1080 +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:1083 +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:1086 +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:1088 +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:1093 +msgid "" +"Under the covers, :func:`DocTestSuite` creates a :class:`unittest.TestSuite` " +"out of :class:`doctest.DocTestCase` instances, and :class:`DocTestCase` is a " +"subclass of :class:`unittest.TestCase`. :class:`DocTestCase` isn't " +"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:1099 +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:1103 +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 :" +"mod:`doctest` functions yourself, you can control the :mod:`doctest` options " +"in use directly, by passing option flags to :mod:`doctest` functions. " +"However, if you're writing a :mod:`unittest` framework, :mod:`unittest` " +"ultimately controls when and how tests get run. The framework author " +"typically wants to control :mod:`doctest` reporting options (perhaps, e.g., " +"specified by command line options), but there's no way to pass options " +"through :mod:`unittest` to :mod:`doctest` test runners." +msgstr "" +"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:1113 +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:1119 +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:1121 +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:1124 +msgid "" +"This is a module-global setting, and affects all future doctests run by " +"module :mod:`unittest`: the :meth:`runTest` method of :class:`DocTestCase` " +"looks at the option flags specified for the test case when the :class:" +"`DocTestCase` instance was constructed. If no reporting flags were " +"specified (which is the typical and expected case), :mod:`doctest`'s :mod:" +"`unittest` reporting flags are :ref:`bitwise ORed ` into the option " +"flags, and the option flags so augmented are passed to the :class:" +"`DocTestRunner` instance created to run the doctest. If any reporting flags " +"were specified when the :class:`DocTestCase` instance was constructed, :mod:" +"`doctest`'s :mod:`unittest` reporting flags are ignored." +msgstr "" +"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:1135 +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:1142 +msgid "Advanced API" +msgstr "API avancé" + +#: library/doctest.rst:1144 +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 " +"you require more fine-grained control over testing, or wish to extend " +"doctest's capabilities, then you should use the advanced API." +msgstr "" + +#: library/doctest.rst:1149 +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:1152 +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:1155 +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:1158 +msgid "" +"Additional processing classes are defined to find, parse, and run, and check " +"doctest examples:" +msgstr "" + +#: library/doctest.rst:1161 +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:1165 +msgid "" +":class:`DocTestParser`: Creates a :class:`DocTest` object from a string " +"(such as an object's docstring)." +msgstr "" + +#: library/doctest.rst:1168 +msgid "" +":class:`DocTestRunner`: Executes the examples in a :class:`DocTest`, and " +"uses an :class:`OutputChecker` to verify their output." +msgstr "" + +#: library/doctest.rst:1171 +msgid "" +":class:`OutputChecker`: Compares the actual output from a doctest example " +"with the expected output, and decides whether they match." +msgstr "" + +#: library/doctest.rst:1174 +msgid "" +"The relationships among these processing classes are summarized in the " +"following diagram::" +msgstr "" + +#: library/doctest.rst:1190 +msgid "DocTest Objects" +msgstr "Objets *doctest*" + +#: library/doctest.rst:1195 +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:1199 +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:1205 +msgid "" +"A list of :class:`Example` objects encoding the individual interactive " +"Python examples that should be run by this test." +msgstr "" + +#: library/doctest.rst:1211 +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 " +"the examples (such as binding new variables) will be reflected in :attr:" +"`globs` after the test is run." +msgstr "" + +#: library/doctest.rst:1219 +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:1225 +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:1232 +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:1239 +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:1246 +msgid "Example Objects" +msgstr "Exemples d'objets" + +#: library/doctest.rst:1251 +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:1256 +msgid "" +":class:`Example` defines the following attributes. They are initialized by " +"the constructor, and should not be modified directly." +msgstr "" + +#: library/doctest.rst:1262 +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:1269 +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 " +"newline unless no output is expected, in which case it's an empty string. " +"The constructor adds a newline when necessary." +msgstr "" + +#: library/doctest.rst:1277 +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 " +"exception. This exception message is compared against the return value of :" +"func:`traceback.format_exception_only`. :attr:`exc_msg` ends with a newline " +"unless it's ``None``. The constructor adds a newline if needed." +msgstr "" + +#: library/doctest.rst:1286 +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:1293 +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:1299 +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 " +"contained in this dictionary are left at their default value (as specified " +"by the :class:`DocTestRunner`'s :attr:`optionflags`). By default, no options " +"are set." +msgstr "" + +#: library/doctest.rst:1308 +msgid "DocTestFinder objects" +msgstr "Objets *DocTestFinder*" + +#: library/doctest.rst:1313 +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 " +"contained objects. :class:`DocTest`\\ s can be extracted from modules, " +"classes, functions, methods, staticmethods, classmethods, and properties." +msgstr "" + +#: library/doctest.rst:1318 +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:1321 +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:1324 +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:1327 +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:1331 +msgid ":class:`DocTestFinder` defines the following method:" +msgstr "La classe :class:`DocTestFinder` définit la méthode suivante :" + +#: library/doctest.rst:1336 +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:1339 +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:1343 +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 " +"will attempt to automatically determine the correct module. The object's " +"module is used:" +msgstr "" + +#: library/doctest.rst:1347 +msgid "As a default namespace, if *globs* is not specified." +msgstr "" + +#: library/doctest.rst:1349 +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:1353 +msgid "To find the name of the file containing the object." +msgstr "Afin de trouver le nom du fichier contenant l'objet." + +#: library/doctest.rst:1355 +msgid "To help find the line number of the object within its file." +msgstr "" + +#: library/doctest.rst:1357 +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 " +"``False``, or is ``None`` but cannot be found automatically, then all " +"objects are considered to belong to the (non-existent) module, so all " +"contained objects will (recursively) be searched for doctests." +msgstr "" + +#: library/doctest.rst:1363 +msgid "" +"The globals for each :class:`DocTest` is formed by combining *globs* and " +"*extraglobs* (bindings in *extraglobs* override bindings in *globs*). A new " +"shallow copy of the globals dictionary is created for each :class:`DocTest`. " +"If *globs* is not specified, then it defaults to the module's *__dict__*, if " +"specified, or ``{}`` otherwise. If *extraglobs* is not specified, then it " +"defaults to ``{}``." +msgstr "" + +#: library/doctest.rst:1374 +msgid "DocTestParser objects" +msgstr "Objets *DocTestParser*" + +#: library/doctest.rst:1379 +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:1451 +msgid ":class:`DocTestParser` defines the following methods:" +msgstr "La classe :class:`DocTestFinder` définit les méthodes suivantes :" + +#: library/doctest.rst:1388 +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:1391 +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:1398 +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 " +"argument *name* is a name identifying this string, and is only used for " +"error messages." +msgstr "" + +#: library/doctest.rst:1405 +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 " +"the :class:`Example`\\ s are 0-based. The optional argument *name* is a " +"name identifying this string, and is only used for error messages." +msgstr "" + +#: library/doctest.rst:1414 +msgid "DocTestRunner objects" +msgstr "Objets *DocTestRunner*" + +#: library/doctest.rst:1419 +msgid "" +"A processing class used to execute and verify the interactive examples in a :" +"class:`DocTest`." +msgstr "" + +#: library/doctest.rst:1422 +msgid "" +"The comparison between expected outputs and actual outputs is done by an :" +"class:`OutputChecker`. This comparison may be customized with a number of " +"option flags; see section :ref:`doctest-options` for more information. If " +"the option flags are insufficient, then the comparison may also be " +"customized by passing a subclass of :class:`OutputChecker` to the " +"constructor." +msgstr "" + +#: library/doctest.rst:1428 +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 " +"be called with strings that should be displayed. It defaults to ``sys." +"stdout.write``. If capturing the output is not sufficient, then the display " +"output can be also customized by subclassing DocTestRunner, and overriding " +"the methods :meth:`report_start`, :meth:`report_success`, :meth:" +"`report_unexpected_exception`, and :meth:`report_failure`." +msgstr "" + +#: library/doctest.rst:1436 +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:1440 +msgid "" +"The optional keyword argument *verbose* controls the :class:" +"`DocTestRunner`'s verbosity. If *verbose* is ``True``, then information is " +"printed about each example, as it is run. If *verbose* is ``False``, then " +"only failures are printed. If *verbose* is unspecified, or ``None``, then " +"verbose output is used iff the command-line switch ``-v`` is used." +msgstr "" + +#: library/doctest.rst:1446 +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:1456 +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:1460 +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:1467 +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:1482 +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:1478 +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:1489 +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:1493 +msgid "" +"*example* is the example about to be processed. *exc_info* is a tuple " +"containing information about the unexpected exception (as returned by :func:" +"`sys.exc_info`). *test* is the test containing *example*. *out* is the " +"output function that was passed to :meth:`DocTestRunner.run`." +msgstr "" + +#: library/doctest.rst:1501 +msgid "" +"Run the examples in *test* (a :class:`DocTest` object), and display the " +"results using the writer function *out*." +msgstr "" + +#: library/doctest.rst:1504 +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, " +"to help with garbage collection. If you would like to examine the namespace " +"after the test completes, then use *clear_globs=False*." +msgstr "" + +#: library/doctest.rst:1509 +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:1513 +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:1520 +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:1523 +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:1530 +msgid "OutputChecker objects" +msgstr "Objets *OutputChecker*" + +#: library/doctest.rst:1535 +msgid "" +"A class used to check the whether the actual output from a doctest example " +"matches the expected output. :class:`OutputChecker` defines two methods: :" +"meth:`check_output`, which compares a given pair of outputs, and returns " +"``True`` if they match; and :meth:`output_difference`, which returns a " +"string describing the differences between two outputs." +msgstr "" + +#: library/doctest.rst:1542 +msgid ":class:`OutputChecker` defines the following methods:" +msgstr "La classe :class:`OutputChecker` définit les méthodes suivantes :" + +#: library/doctest.rst:1546 +msgid "" +"Return ``True`` iff the actual output from an example (*got*) matches the " +"expected output (*want*). These strings are always considered to match if " +"they are identical; but depending on what option flags the test runner is " +"using, several non-exact match types are also possible. See section :ref:" +"`doctest-options` for more information about option flags." +msgstr "" + +#: library/doctest.rst:1555 +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:1563 +msgid "Debugging" +msgstr "Débogage" + +#: library/doctest.rst:1565 +msgid "Doctest provides several mechanisms for debugging doctest examples:" +msgstr "" +"*Doctest* fournit plusieurs mécanismes pour déboguer des exemples *doctest* :" + +#: library/doctest.rst:1567 +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:1570 +msgid "" +"The :class:`DebugRunner` class is a subclass of :class:`DocTestRunner` that " +"raises an exception for the first failing example, containing information " +"about that example. This information can be used to perform post-mortem " +"debugging on the example." +msgstr "" + +#: library/doctest.rst:1575 +msgid "" +"The :mod:`unittest` cases generated by :func:`DocTestSuite` support the :" +"meth:`debug` method defined by :class:`unittest.TestCase`." +msgstr "" + +#: library/doctest.rst:1578 +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 " +"inspect current values of variables, and so on. For example, suppose :file:" +"`a.py` contains just this module docstring::" +msgstr "" + +#: library/doctest.rst:1593 +msgid "Then an interactive Python session may look like this::" +msgstr "Alors une séance interactive de Python peut ressembler à ceci ::" + +#: library/doctest.rst:1626 +msgid "" +"Functions that convert doctests to Python code, and possibly run the " +"synthesized code under the debugger:" +msgstr "" + +#: library/doctest.rst:1632 +msgid "Convert text with examples to a script." +msgstr "Convertit du texte contenant des exemples en un script." + +#: library/doctest.rst:1634 +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 " +"regular code, and everything else is converted to Python comments. The " +"generated script is returned as a string. For example, ::" +msgstr "" + +#: library/doctest.rst:1649 +#, fuzzy +msgid "displays::" +msgstr "affiche ::" + +#: library/doctest.rst:1659 +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:1666 +msgid "Convert the doctest for an object to a script." +msgstr "Convertit en script l'objet *doctest*." + +#: library/doctest.rst:1668 +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 " +"(within the module) of the object with the doctests of interest. The result " +"is a string, containing the object's docstring converted to a Python script, " +"as described for :func:`script_from_examples` above. For example, if " +"module :file:`a.py` contains a top-level function :func:`f`, then ::" +msgstr "" + +#: library/doctest.rst:1678 +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:1684 +msgid "Debug the doctests for an object." +msgstr "Débogue les *doctests* pour un objet." + +#: library/doctest.rst:1686 +msgid "" +"The *module* and *name* arguments are the same as for function :func:" +"`testsource` above. The synthesized Python script for the named object's " +"docstring is written to a temporary file, and then that file is run under " +"the control of the Python debugger, :mod:`pdb`." +msgstr "" + +#: library/doctest.rst:1691 +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:1694 +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 " +"gets involved only if the script terminates via raising an unhandled " +"exception. If it does, then post-mortem debugging is invoked, via :func:" +"`pdb.post_mortem`, passing the traceback object from the unhandled " +"exception. If *pm* is not specified, or is false, the script is run under " +"the debugger from the start, via passing an appropriate :func:`exec` call " +"to :func:`pdb.run`." +msgstr "" + +#: library/doctest.rst:1705 +msgid "Debug the doctests in a string." +msgstr "Débogue les *doctests* dans une chaîne de caractères." + +#: library/doctest.rst:1707 +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:1710 +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:1712 +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:1717 +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 " +"here. See the source code, and especially :class:`DebugRunner`'s docstring " +"(which is a doctest!) for more details:" +msgstr "" + +#: library/doctest.rst:1725 +msgid "" +"A subclass of :class:`DocTestRunner` that raises an exception as soon as a " +"failure is encountered. If an unexpected exception occurs, an :exc:" +"`UnexpectedException` exception is raised, containing the test, the example, " +"and the original exception. If the output doesn't match, then a :exc:" +"`DocTestFailure` exception is raised, containing the test, the example, and " +"the actual output." +msgstr "" + +#: library/doctest.rst:1732 +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:1735 +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:1740 +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:1744 +msgid ":exc:`DocTestFailure` defines the following attributes:" +msgstr ":exc:`DocTestFailure` définit les attributs suivants :" + +#: library/doctest.rst:1773 +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:1778 +msgid "The :class:`Example` that failed." +msgstr "L'exemple :class:`Example` qui a échoué." + +#: library/doctest.rst:1759 +msgid "The example's actual output." +msgstr "La sortie obtenue par l'exécution de l'exemple." + +#: library/doctest.rst:1764 +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:1768 +msgid ":exc:`UnexpectedException` defines the following attributes:" +msgstr ":exc:`UnexpectedException` définit les attributs suivants :" + +#: library/doctest.rst:1783 +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:1790 +msgid "Soapbox" +msgstr "Éditorial" + +#: library/doctest.rst:1792 +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:1795 +msgid "Checking examples in docstrings." +msgstr "Vérifier les exemples dans les *docstrings*." + +#: library/doctest.rst:1797 +msgid "Regression testing." +msgstr "Test de régression." + +#: library/doctest.rst:1799 +msgid "Executable documentation / literate testing." +msgstr "De la documentation exécutable / des tests littéraires." + +#: library/doctest.rst:1801 +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:1805 +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. " +"Examples should add genuine value to the documentation. A good example can " +"often be worth many words. If done with care, the examples will be " +"invaluable for your users, and will pay back the time it takes to collect " +"them many times over as the years go by and things change. I'm still amazed " +"at how often one of my :mod:`doctest` examples stops working after a " +"\"harmless\" change." +msgstr "" + +#: library/doctest.rst:1813 +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 " +"becomes much easier to keep track of what's actually being tested, and why. " +"When a test fails, good prose can make it much easier to figure out what the " +"problem is, and how it should be fixed. It's true that you could write " +"extensive comments in code-based testing, but few programmers do. Many have " +"found that using doctest approaches instead leads to much clearer tests. " +"Perhaps this is simply because doctest makes writing prose a little easier " +"than writing code, while writing comments in code is a little harder. I " +"think it goes deeper than just that: the natural attitude when writing a " +"doctest-based test is that you want to explain the fine points of your " +"software, and illustrate them with examples. This in turn naturally leads to " +"test files that start with the simplest features, and logically progress to " +"complications and edge cases. A coherent narrative is the result, instead " +"of a collection of isolated functions that test isolated bits of " +"functionality seemingly at random. It's a different attitude, and produces " +"different results, blurring the distinction between testing and explaining." +msgstr "" + +#: library/doctest.rst:1831 +msgid "" +"Regression testing is best confined to dedicated objects or files. There " +"are several options for organizing tests:" +msgstr "" + +#: library/doctest.rst:1834 +msgid "" +"Write text files containing test cases as interactive examples, and test the " +"files using :func:`testfile` or :func:`DocFileSuite`. This is recommended, " +"although is easiest to do for new projects, designed from the start to use " +"doctest." +msgstr "" + +#: library/doctest.rst:1839 +msgid "" +"Define functions named ``_regrtest_topic`` that consist of single " +"docstrings, containing test cases for the named topics. These functions can " +"be included in the same file as the module, or separated out into a separate " +"test file." +msgstr "" + +#: library/doctest.rst:1843 +msgid "" +"Define a ``__test__`` dictionary mapping from regression test topics to " +"docstrings containing test cases." +msgstr "" + +#: library/doctest.rst:1846 +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:1868 +msgid "Footnotes" +msgstr "Notes" + +#: library/doctest.rst:1869 +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)." + +#~ 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." diff --git a/library/email.charset.po b/library/email.charset.po new file mode 100644 index 0000000000..1f0555fb70 --- /dev/null +++ b/library/email.charset.po @@ -0,0 +1,294 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-05-21 16:37+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \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" + +#: library/email.charset.rst:2 +msgid ":mod:`email.charset`: Representing character sets" +msgstr "" + +#: library/email.charset.rst:7 +#, fuzzy +msgid "**Source code:** :source:`Lib/email/charset.py`" +msgstr "**Code source :** :source:`Lib/email/parser.py`" + +#: library/email.charset.rst:11 +msgid "" +"This module is part of the legacy (``Compat32``) email API. In the new API " +"only the aliases table is used." +msgstr "" + +#: library/email.charset.rst:14 +msgid "" +"The remaining text in this section is the original documentation of the " +"module." +msgstr "" +"Le texte restant de cette section est la documentation originale de ce " +"module." + +#: library/email.charset.rst:16 +msgid "" +"This module provides a class :class:`Charset` for representing character " +"sets and character set conversions in email messages, as well as a character " +"set registry and several convenience methods for manipulating this registry. " +"Instances of :class:`Charset` are used in several other modules within the :" +"mod:`email` package." +msgstr "" + +#: library/email.charset.rst:22 +msgid "Import this class from the :mod:`email.charset` module." +msgstr "" + +#: library/email.charset.rst:27 +msgid "Map character sets to their email properties." +msgstr "" + +#: library/email.charset.rst:29 +msgid "" +"This class provides information about the requirements imposed on email for " +"a specific character set. It also provides convenience routines for " +"converting between character sets, given the availability of the applicable " +"codecs. Given a character set, it will do its best to provide information " +"on how to use that character set in an email message in an RFC-compliant way." +msgstr "" + +#: library/email.charset.rst:35 +msgid "" +"Certain character sets must be encoded with quoted-printable or base64 when " +"used in email headers or bodies. Certain character sets must be converted " +"outright, and are not allowed in email." +msgstr "" + +#: library/email.charset.rst:39 +msgid "" +"Optional *input_charset* is as described below; it is always coerced to " +"lower case. After being alias normalized it is also used as a lookup into " +"the registry of character sets to find out the header encoding, body " +"encoding, and output conversion codec to be used for the character set. For " +"example, if *input_charset* is ``iso-8859-1``, then headers and bodies will " +"be encoded using quoted-printable and no output conversion codec is " +"necessary. If *input_charset* is ``euc-jp``, then headers will be encoded " +"with base64, bodies will not be encoded, but output text will be converted " +"from the ``euc-jp`` character set to the ``iso-2022-jp`` character set." +msgstr "" + +#: library/email.charset.rst:49 +msgid ":class:`Charset` instances have the following data attributes:" +msgstr "" + +#: library/email.charset.rst:53 +msgid "" +"The initial character set specified. Common aliases are converted to their " +"*official* email names (e.g. ``latin_1`` is converted to ``iso-8859-1``). " +"Defaults to 7-bit ``us-ascii``." +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 " +"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." +"SHORTEST`` is not allowed for *body_encoding*." +msgstr "" + +#: library/email.charset.rst:76 +msgid "" +"Some character sets must be converted before they can be used in email " +"headers or bodies. If the *input_charset* is one of them, this attribute " +"will contain the name of the character set output will be converted to. " +"Otherwise, it will be ``None``." +msgstr "" + +#: library/email.charset.rst:84 +msgid "" +"The name of the Python codec used to convert the *input_charset* to " +"Unicode. If no conversion codec is necessary, this attribute will be " +"``None``." +msgstr "" + +#: library/email.charset.rst:91 +msgid "" +"The name of the Python codec used to convert Unicode to the " +"*output_charset*. If no conversion codec is necessary, this attribute will " +"have the same value as the *input_codec*." +msgstr "" + +#: library/email.charset.rst:96 +msgid ":class:`Charset` instances also have the following methods:" +msgstr "" + +#: library/email.charset.rst:100 +msgid "Return the content transfer encoding used for body encoding." +msgstr "" + +#: library/email.charset.rst:102 +msgid "" +"This is either the string ``quoted-printable`` or ``base64`` depending on " +"the encoding used, or it is a function, in which case you should call the " +"function with a single argument, the Message object being encoded. The " +"function should then set the :mailheader:`Content-Transfer-Encoding` header " +"itself to whatever is appropriate." +msgstr "" + +#: library/email.charset.rst:108 +msgid "" +"Returns the string ``quoted-printable`` if *body_encoding* is ``QP``, " +"returns the string ``base64`` if *body_encoding* is ``BASE64``, and returns " +"the string ``7bit`` otherwise." +msgstr "" + +#: library/email.charset.rst:115 +msgid "Return the output character set." +msgstr "" + +#: library/email.charset.rst:117 +msgid "" +"This is the *output_charset* attribute if that is not ``None``, otherwise it " +"is *input_charset*." +msgstr "" + +#: library/email.charset.rst:123 +msgid "Header-encode the string *string*." +msgstr "" + +#: library/email.charset.rst:125 +msgid "" +"The type of encoding (base64 or quoted-printable) will be based on the " +"*header_encoding* attribute." +msgstr "" + +#: library/email.charset.rst:131 +msgid "Header-encode a *string* by converting it first to bytes." +msgstr "" + +#: library/email.charset.rst:133 +msgid "" +"This is similar to :meth:`header_encode` except that the string is fit into " +"maximum line lengths as given by the argument *maxlengths*, which must be an " +"iterator: each element returned from this iterator will provide the next " +"maximum line length." +msgstr "" + +#: library/email.charset.rst:141 +msgid "Body-encode the string *string*." +msgstr "" + +#: library/email.charset.rst:143 +msgid "" +"The type of encoding (base64 or quoted-printable) will be based on the " +"*body_encoding* attribute." +msgstr "" + +#: library/email.charset.rst:146 +msgid "" +"The :class:`Charset` class also provides a number of methods to support " +"standard operations and built-in functions." +msgstr "" + +#: library/email.charset.rst:152 +msgid "" +"Returns *input_charset* as a string coerced to lower case. :meth:`__repr__` " +"is an alias for :meth:`__str__`." +msgstr "" + +#: library/email.charset.rst:158 +msgid "" +"This method allows you to compare two :class:`Charset` instances for " +"equality." +msgstr "" + +#: library/email.charset.rst:164 +msgid "" +"This method allows you to compare two :class:`Charset` instances for " +"inequality." +msgstr "" + +#: library/email.charset.rst:167 +msgid "" +"The :mod:`email.charset` module also provides the following functions for " +"adding new entries to the global character set, alias, and codec registries:" +msgstr "" + +#: library/email.charset.rst:173 +msgid "Add character properties to the global registry." +msgstr "" + +#: library/email.charset.rst:175 +msgid "" +"*charset* is the input character set, and must be the canonical name of a " +"character set." +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 " +"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." +msgstr "" + +#: library/email.charset.rst:184 +msgid "" +"Optional *output_charset* is the character set that the output should be in. " +"Conversions will proceed from input charset, to Unicode, to the output " +"charset when the method :meth:`Charset.convert` is called. The default is " +"to output in the same character set as the input." +msgstr "" + +#: library/email.charset.rst:189 +msgid "" +"Both *input_charset* and *output_charset* must have Unicode codec entries in " +"the module's character set-to-codec mapping; use :func:`add_codec` to add " +"codecs the module does not know about. See the :mod:`codecs` module's " +"documentation for more information." +msgstr "" + +#: library/email.charset.rst:194 +msgid "" +"The global character set registry is kept in the module global dictionary " +"``CHARSETS``." +msgstr "" + +#: library/email.charset.rst:200 +msgid "" +"Add a character set alias. *alias* is the alias name, e.g. ``latin-1``. " +"*canonical* is the character set's canonical name, e.g. ``iso-8859-1``." +msgstr "" + +#: library/email.charset.rst:203 +msgid "" +"The global charset alias registry is kept in the module global dictionary " +"``ALIASES``." +msgstr "" + +#: library/email.charset.rst:209 +msgid "" +"Add a codec that map characters in the given character set to and from " +"Unicode." +msgstr "" + +#: library/email.charset.rst:211 +msgid "" +"*charset* is the canonical name of a character set. *codecname* is the name " +"of a Python codec, as appropriate for the second argument to the :class:" +"`str`'s :meth:`~str.encode` method." +msgstr "" diff --git a/library/email.compat32-message.po b/library/email.compat32-message.po new file mode 100644 index 0000000000..9e00ce1bb0 --- /dev/null +++ b/library/email.compat32-message.po @@ -0,0 +1,822 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-18 15:46+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \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" + +#: library/email.compat32-message.rst:4 +msgid "" +":mod:`email.message.Message`: Representing an email message using the :data:" +"`~email.policy.compat32` API" +msgstr "" + +#: library/email.compat32-message.rst:12 +msgid "" +"The :class:`Message` class is very similar to the :class:`~email.message." +"EmailMessage` class, without the methods added by that class, and with the " +"default behavior of certain other methods being slightly different. We also " +"document here some methods that, while supported by the :class:`~email." +"message.EmailMessage` class, are not recommended unless you are dealing with " +"legacy code." +msgstr "" + +#: library/email.compat32-message.rst:19 +msgid "The philosophy and structure of the two classes is otherwise the same." +msgstr "" + +#: library/email.compat32-message.rst:21 +msgid "" +"This document describes the behavior under the default (for :class:" +"`Message`) policy :attr:`~email.policy.Compat32`. If you are going to use " +"another policy, you should be using the :class:`~email.message.EmailMessage` " +"class instead." +msgstr "" + +#: library/email.compat32-message.rst:25 +msgid "" +"An email message consists of *headers* and a *payload*. Headers must be :" +"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 " +"and their own payload. The latter type of payload is indicated by the " +"message having a MIME type such as :mimetype:`multipart/\\*` or :mimetype:" +"`message/rfc822`." +msgstr "" + +#: library/email.compat32-message.rst:34 +msgid "" +"The conceptual model provided by a :class:`Message` object is that of an " +"ordered dictionary of headers with additional methods for accessing both " +"specialized information from the headers, for accessing the payload, for " +"generating a serialized version of the message, and for recursively walking " +"over the object tree. Note that duplicate headers are supported but special " +"methods must be used to access them." +msgstr "" + +#: library/email.compat32-message.rst:41 +msgid "" +"The :class:`Message` pseudo-dictionary is indexed by the header names, which " +"must be ASCII values. The values of the dictionary are strings that are " +"supposed to contain only ASCII characters; there is some special handling " +"for non-ASCII input, but it doesn't always produce the correct results. " +"Headers are stored and returned in case-preserving form, but field names are " +"matched case-insensitively. There may also be a single envelope header, " +"also known as the *Unix-From* header or the ``From_`` header. The *payload* " +"is either a string or bytes, in the case of simple message objects, or a " +"list of :class:`Message` objects, for MIME container documents (e.g. :" +"mimetype:`multipart/\\*` and :mimetype:`message/rfc822`)." +msgstr "" + +#: library/email.compat32-message.rst:52 +msgid "Here are the methods of the :class:`Message` class:" +msgstr "" + +#: library/email.compat32-message.rst:57 +msgid "" +"If *policy* is specified (it must be an instance of a :mod:`~email.policy` " +"class) use the rules it specifies to update and serialize the representation " +"of the message. If *policy* is not set, use the :class:`compat32 ` policy, which maintains backward compatibility with the " +"Python 3.2 version of the email package. For more information see the :mod:" +"`~email.policy` documentation." +msgstr "" + +#: library/email.compat32-message.rst:64 +msgid "The *policy* keyword argument was added." +msgstr "" + +#: library/email.compat32-message.rst:69 +msgid "" +"Return the entire message flattened as a string. When optional *unixfrom* " +"is true, the envelope header is included in the returned string. *unixfrom* " +"defaults to ``False``. For backward compatibility reasons, *maxheaderlen* " +"defaults to ``0``, so if you want a different value you must override it " +"explicitly (the value specified for *max_line_length* in the policy will be " +"ignored by this method). The *policy* argument may be used to override the " +"default policy obtained from the message instance. This can be used to " +"control some of the formatting produced by the method, since the specified " +"*policy* will be passed to the ``Generator``." +msgstr "" + +#: library/email.compat32-message.rst:79 library/email.compat32-message.rst:121 +msgid "" +"Flattening the message may trigger changes to the :class:`Message` if " +"defaults need to be filled in to complete the transformation to a string " +"(for example, MIME boundaries may be generated or modified)." +msgstr "" + +#: library/email.compat32-message.rst:83 +msgid "" +"Note that this method is provided as a convenience and may not always format " +"the message the way you want. For example, by default it does not do the " +"mangling of lines that begin with ``From`` that is required by the Unix mbox " +"format. For more flexibility, instantiate a :class:`~email.generator." +"Generator` instance and use its :meth:`~email.generator.Generator.flatten` " +"method directly. For example::" +msgstr "" + +#: library/email.compat32-message.rst:97 +msgid "" +"If the message object contains binary data that is not encoded according to " +"RFC standards, the non-compliant data will be replaced by unicode \"unknown " +"character\" code points. (See also :meth:`.as_bytes` and :class:`~email." +"generator.BytesGenerator`.)" +msgstr "" + +#: library/email.compat32-message.rst:102 +msgid "the *policy* keyword argument was added." +msgstr "" + +#: library/email.compat32-message.rst:107 +msgid "" +"Equivalent to :meth:`.as_string()`. Allows ``str(msg)`` to produce a string " +"containing the formatted message." +msgstr "" + +#: library/email.compat32-message.rst:113 +msgid "" +"Return the entire message flattened as a bytes object. When optional " +"*unixfrom* is true, the envelope header is included in the returned string. " +"*unixfrom* defaults to ``False``. The *policy* argument may be used to " +"override the default policy obtained from the message instance. This can be " +"used to control some of the formatting produced by the method, since the " +"specified *policy* will be passed to the ``BytesGenerator``." +msgstr "" + +#: library/email.compat32-message.rst:125 +msgid "" +"Note that this method is provided as a convenience and may not always format " +"the message the way you want. For example, by default it does not do the " +"mangling of lines that begin with ``From`` that is required by the Unix mbox " +"format. For more flexibility, instantiate a :class:`~email.generator." +"BytesGenerator` instance and use its :meth:`~email.generator.BytesGenerator." +"flatten` method directly. For example::" +msgstr "" + +#: library/email.compat32-message.rst:145 +msgid "" +"Equivalent to :meth:`.as_bytes()`. Allows ``bytes(msg)`` to produce a bytes " +"object containing the formatted message." +msgstr "" + +#: library/email.compat32-message.rst:153 +msgid "" +"Return ``True`` if the message's payload is a list of sub-\\ :class:" +"`Message` objects, otherwise return ``False``. When :meth:`is_multipart` " +"returns ``False``, the payload should be a string object (which might be a " +"CTE encoded binary payload). (Note that :meth:`is_multipart` returning " +"``True`` does not necessarily mean that \"msg.get_content_maintype() == " +"'multipart'\" will return the ``True``. For example, ``is_multipart`` will " +"return ``True`` when the :class:`Message` is of type ``message/rfc822``.)" +msgstr "" + +#: library/email.compat32-message.rst:165 +msgid "" +"Set the message's envelope header to *unixfrom*, which should be a string." +msgstr "" + +#: library/email.compat32-message.rst:170 +msgid "" +"Return the message's envelope header. Defaults to ``None`` if the envelope " +"header was never set." +msgstr "" + +#: library/email.compat32-message.rst:176 +msgid "" +"Add the given *payload* to the current payload, which must be ``None`` or a " +"list of :class:`Message` objects before the call. After the call, the " +"payload will always be a list of :class:`Message` objects. If you want to " +"set the payload to a scalar object (e.g. a string), use :meth:`set_payload` " +"instead." +msgstr "" + +#: library/email.compat32-message.rst:182 +msgid "" +"This is a legacy method. On the :class:`~email.emailmessage.EmailMessage` " +"class its functionality is replaced by :meth:`~email.message.EmailMessage." +"set_content` and the related ``make`` and ``add`` methods." +msgstr "" + +#: library/email.compat32-message.rst:190 +msgid "" +"Return the current payload, which will be a list of :class:`Message` objects " +"when :meth:`is_multipart` is ``True``, or a string when :meth:`is_multipart` " +"is ``False``. If the payload is a list and you mutate the list object, you " +"modify the message's payload in place." +msgstr "" + +#: library/email.compat32-message.rst:195 +msgid "" +"With optional argument *i*, :meth:`get_payload` will return the *i*-th " +"element of the payload, counting from zero, if :meth:`is_multipart` is " +"``True``. An :exc:`IndexError` will be raised if *i* is less than 0 or " +"greater than or equal to the number of items in the payload. If the payload " +"is a string (i.e. :meth:`is_multipart` is ``False``) and *i* is given, a :" +"exc:`TypeError` is raised." +msgstr "" + +#: library/email.compat32-message.rst:202 +msgid "" +"Optional *decode* is a flag indicating whether the payload should be decoded " +"or not, according to the :mailheader:`Content-Transfer-Encoding` header. " +"When ``True`` and the message is not a multipart, the payload will be " +"decoded if this header's value is ``quoted-printable`` or ``base64``. If " +"some other encoding is used, or :mailheader:`Content-Transfer-Encoding` " +"header is missing, the payload is returned as-is (undecoded). In all cases " +"the returned value is binary data. If the message is a multipart and the " +"*decode* flag is ``True``, then ``None`` is returned. If the payload is " +"base64 and it was not perfectly formed (missing padding, characters outside " +"the base64 alphabet), then an appropriate defect will be added to the " +"message's defect property (:class:`~email.errors.InvalidBase64PaddingDefect` " +"or :class:`~email.errors.InvalidBase64CharactersDefect`, respectively)." +msgstr "" + +#: library/email.compat32-message.rst:216 +msgid "" +"When *decode* is ``False`` (the default) the body is returned as a string " +"without decoding the :mailheader:`Content-Transfer-Encoding`. However, for " +"a :mailheader:`Content-Transfer-Encoding` of 8bit, an attempt is made to " +"decode the original bytes using the ``charset`` specified by the :mailheader:" +"`Content-Type` header, using the ``replace`` error handler. If no " +"``charset`` is specified, or if the ``charset`` given is not recognized by " +"the email package, the body is decoded using the default ASCII charset." +msgstr "" + +#: library/email.compat32-message.rst:225 +msgid "" +"This is a legacy method. On the :class:`~email.emailmessage.EmailMessage` " +"class its functionality is replaced by :meth:`~email.message.EmailMessage." +"get_content` and :meth:`~email.message.EmailMessage.iter_parts`." +msgstr "" + +#: library/email.compat32-message.rst:233 +msgid "" +"Set the entire message object's payload to *payload*. It is the client's " +"responsibility to ensure the payload invariants. Optional *charset* sets " +"the message's default character set; see :meth:`set_charset` for details." +msgstr "" + +#: library/email.compat32-message.rst:237 +msgid "" +"This is a legacy method. On the :class:`~email.emailmessage.EmailMessage` " +"class its functionality is replaced by :meth:`~email.message.EmailMessage." +"set_content`." +msgstr "" + +#: library/email.compat32-message.rst:244 +msgid "" +"Set the character set of the payload to *charset*, which can either be a :" +"class:`~email.charset.Charset` instance (see :mod:`email.charset`), a string " +"naming a character set, or ``None``. If it is a string, it will be " +"converted to a :class:`~email.charset.Charset` instance. If *charset* is " +"``None``, the ``charset`` parameter will be removed from the :mailheader:" +"`Content-Type` header (the message will not be otherwise modified). " +"Anything else will generate a :exc:`TypeError`." +msgstr "" + +#: library/email.compat32-message.rst:252 +msgid "" +"If there is no existing :mailheader:`MIME-Version` header one will be " +"added. If there is no existing :mailheader:`Content-Type` header, one will " +"be added with a value of :mimetype:`text/plain`. Whether the :mailheader:" +"`Content-Type` header already exists or not, its ``charset`` parameter will " +"be set to *charset.output_charset*. If *charset.input_charset* and " +"*charset.output_charset* differ, the payload will be re-encoded to the " +"*output_charset*. If there is no existing :mailheader:`Content-Transfer-" +"Encoding` header, then the payload will be transfer-encoded, if needed, " +"using the specified :class:`~email.charset.Charset`, and a header with the " +"appropriate value will be added. If a :mailheader:`Content-Transfer-" +"Encoding` header already exists, the payload is assumed to already be " +"correctly encoded using that :mailheader:`Content-Transfer-Encoding` and is " +"not modified." +msgstr "" + +#: library/email.compat32-message.rst:266 +msgid "" +"This is a legacy method. On the :class:`~email.emailmessage.EmailMessage` " +"class its functionality is replaced by the *charset* parameter of the :meth:" +"`email.emailmessage.EmailMessage.set_content` method." +msgstr "" + +#: library/email.compat32-message.rst:274 +msgid "" +"Return the :class:`~email.charset.Charset` instance associated with the " +"message's payload." +msgstr "" + +#: library/email.compat32-message.rst:277 +msgid "" +"This is a legacy method. On the :class:`~email.emailmessage.EmailMessage` " +"class it always returns ``None``." +msgstr "" + +#: library/email.compat32-message.rst:282 +msgid "" +"The following methods implement a mapping-like interface for accessing the " +"message's :rfc:`2822` headers. Note that there are some semantic " +"differences between these methods and a normal mapping (i.e. dictionary) " +"interface. For example, in a dictionary there are no duplicate keys, but " +"here there may be duplicate message headers. Also, in dictionaries there is " +"no guaranteed order to the keys returned by :meth:`keys`, but in a :class:" +"`Message` object, headers are always returned in the order they appeared in " +"the original message, or were added to the message later. Any header " +"deleted and then re-added are always appended to the end of the header list." +msgstr "" + +#: library/email.compat32-message.rst:292 +msgid "" +"These semantic differences are intentional and are biased toward maximal " +"convenience." +msgstr "" + +#: library/email.compat32-message.rst:295 +msgid "" +"Note that in all cases, any envelope header present in the message is not " +"included in the mapping interface." +msgstr "" + +#: library/email.compat32-message.rst:298 +msgid "" +"In a model generated from bytes, any header values that (in contravention of " +"the RFCs) contain non-ASCII bytes will, when retrieved through this " +"interface, be represented as :class:`~email.header.Header` objects with a " +"charset of ``unknown-8bit``." +msgstr "" + +#: library/email.compat32-message.rst:306 +msgid "Return the total number of headers, including duplicates." +msgstr "" + +#: library/email.compat32-message.rst:311 +msgid "" +"Return ``True`` if the message object has a field named *name*. Matching is " +"done case-insensitively and *name* should not include the trailing colon. " +"Used for the ``in`` operator, e.g.::" +msgstr "" + +#: library/email.compat32-message.rst:321 +msgid "" +"Return the value of the named header field. *name* should not include the " +"colon field separator. If the header is missing, ``None`` is returned; a :" +"exc:`KeyError` is never raised." +msgstr "" + +#: library/email.compat32-message.rst:325 +msgid "" +"Note that if the named field appears more than once in the message's " +"headers, exactly which of those field values will be returned is undefined. " +"Use the :meth:`get_all` method to get the values of all the extant named " +"headers." +msgstr "" + +#: library/email.compat32-message.rst:333 +msgid "" +"Add a header to the message with field name *name* and value *val*. The " +"field is appended to the end of the message's existing fields." +msgstr "" + +#: library/email.compat32-message.rst:336 +msgid "" +"Note that this does *not* overwrite or delete any existing header with the " +"same name. If you want to ensure that the new header is the only one " +"present in the message with field name *name*, delete the field first, e.g.::" +msgstr "" + +#: library/email.compat32-message.rst:346 +msgid "" +"Delete all occurrences of the field with name *name* from the message's " +"headers. No exception is raised if the named field isn't present in the " +"headers." +msgstr "" + +#: library/email.compat32-message.rst:353 +msgid "Return a list of all the message's header field names." +msgstr "" + +#: library/email.compat32-message.rst:358 +msgid "Return a list of all the message's field values." +msgstr "" + +#: library/email.compat32-message.rst:363 +msgid "" +"Return a list of 2-tuples containing all the message's field headers and " +"values." +msgstr "" + +#: library/email.compat32-message.rst:369 +msgid "" +"Return the value of the named header field. This is identical to :meth:" +"`__getitem__` except that optional *failobj* is returned if the named header " +"is missing (defaults to ``None``)." +msgstr "" + +#: library/email.compat32-message.rst:373 +msgid "Here are some additional useful methods:" +msgstr "" + +#: library/email.compat32-message.rst:378 +msgid "" +"Return a list of all the values for the field named *name*. If there are no " +"such named headers in the message, *failobj* is returned (defaults to " +"``None``)." +msgstr "" + +#: library/email.compat32-message.rst:385 +msgid "" +"Extended header setting. This method is similar to :meth:`__setitem__` " +"except that additional header parameters can be provided as keyword " +"arguments. *_name* is the header field to add and *_value* is the *primary* " +"value for the header." +msgstr "" + +#: library/email.compat32-message.rst:390 +msgid "" +"For each item in the keyword argument dictionary *_params*, the key is taken " +"as the parameter name, with underscores converted to dashes (since dashes " +"are illegal in Python identifiers). Normally, the parameter will be added " +"as ``key=\"value\"`` unless the value is ``None``, in which case only the " +"key will be added. If the value contains non-ASCII characters, it can be " +"specified as a three tuple in the format ``(CHARSET, LANGUAGE, VALUE)``, " +"where ``CHARSET`` is a string naming the charset to be used to encode the " +"value, ``LANGUAGE`` can usually be set to ``None`` or the empty string (see :" +"rfc:`2231` for other possibilities), and ``VALUE`` is the string value " +"containing non-ASCII code points. If a three tuple is not passed and the " +"value contains non-ASCII characters, it is automatically encoded in :rfc:" +"`2231` format using a ``CHARSET`` of ``utf-8`` and a ``LANGUAGE`` of " +"``None``." +msgstr "" + +#: library/email.compat32-message.rst:404 +msgid "Here's an example::" +msgstr "" + +#: library/email.compat32-message.rst:408 +msgid "This will add a header that looks like ::" +msgstr "" + +#: library/email.compat32-message.rst:412 +msgid "An example with non-ASCII characters::" +msgstr "" + +#: library/email.compat32-message.rst:417 +msgid "Which produces ::" +msgstr "" + +#: library/email.compat32-message.rst:424 +msgid "" +"Replace a header. Replace the first header found in the message that " +"matches *_name*, retaining header order and field name case. If no matching " +"header was found, a :exc:`KeyError` is raised." +msgstr "" + +#: library/email.compat32-message.rst:431 +msgid "" +"Return the message's content type. The returned string is coerced to lower " +"case of the form :mimetype:`maintype/subtype`. If there was no :mailheader:" +"`Content-Type` header in the message the default type as given by :meth:" +"`get_default_type` will be returned. Since according to :rfc:`2045`, " +"messages always have a default type, :meth:`get_content_type` will always " +"return a value." +msgstr "" + +#: library/email.compat32-message.rst:438 +msgid "" +":rfc:`2045` defines a message's default type to be :mimetype:`text/plain` " +"unless it appears inside a :mimetype:`multipart/digest` container, in which " +"case it would be :mimetype:`message/rfc822`. If the :mailheader:`Content-" +"Type` header has an invalid type specification, :rfc:`2045` mandates that " +"the default type be :mimetype:`text/plain`." +msgstr "" + +#: library/email.compat32-message.rst:447 +msgid "" +"Return the message's main content type. This is the :mimetype:`maintype` " +"part of the string returned by :meth:`get_content_type`." +msgstr "" + +#: library/email.compat32-message.rst:453 +msgid "" +"Return the message's sub-content type. This is the :mimetype:`subtype` part " +"of the string returned by :meth:`get_content_type`." +msgstr "" + +#: library/email.compat32-message.rst:459 +msgid "" +"Return the default content type. Most messages have a default content type " +"of :mimetype:`text/plain`, except for messages that are subparts of :" +"mimetype:`multipart/digest` containers. Such subparts have a default " +"content type of :mimetype:`message/rfc822`." +msgstr "" + +#: library/email.compat32-message.rst:467 +msgid "" +"Set the default content type. *ctype* should either be :mimetype:`text/" +"plain` or :mimetype:`message/rfc822`, although this is not enforced. The " +"default content type is not stored in the :mailheader:`Content-Type` header." +msgstr "" + +#: library/email.compat32-message.rst:475 +msgid "" +"Return the message's :mailheader:`Content-Type` parameters, as a list. The " +"elements of the returned list are 2-tuples of key/value pairs, as split on " +"the ``'='`` sign. The left hand side of the ``'='`` is the key, while the " +"right hand side is the value. If there is no ``'='`` sign in the parameter " +"the value is the empty string, otherwise the value is as described in :meth:" +"`get_param` and is unquoted if optional *unquote* is ``True`` (the default)." +msgstr "" + +#: library/email.compat32-message.rst:483 +msgid "" +"Optional *failobj* is the object to return if there is no :mailheader:" +"`Content-Type` header. Optional *header* is the header to search instead " +"of :mailheader:`Content-Type`." +msgstr "" + +#: library/email.compat32-message.rst:487 +#: library/email.compat32-message.rst:525 +msgid "" +"This is a legacy method. On the :class:`~email.emailmessage.EmailMessage` " +"class its functionality is replaced by the *params* property of the " +"individual header objects returned by the header access methods." +msgstr "" + +#: library/email.compat32-message.rst:495 +msgid "" +"Return the value of the :mailheader:`Content-Type` header's parameter " +"*param* as a string. If the message has no :mailheader:`Content-Type` " +"header or if there is no such parameter, then *failobj* is returned " +"(defaults to ``None``)." +msgstr "" + +#: library/email.compat32-message.rst:500 +msgid "" +"Optional *header* if given, specifies the message header to use instead of :" +"mailheader:`Content-Type`." +msgstr "" + +#: library/email.compat32-message.rst:503 +msgid "" +"Parameter keys are always compared case insensitively. The return value can " +"either be a string, or a 3-tuple if the parameter was :rfc:`2231` encoded. " +"When it's a 3-tuple, the elements of the value are of the form ``(CHARSET, " +"LANGUAGE, VALUE)``. Note that both ``CHARSET`` and ``LANGUAGE`` can be " +"``None``, in which case you should consider ``VALUE`` to be encoded in the " +"``us-ascii`` charset. You can usually ignore ``LANGUAGE``." +msgstr "" + +#: library/email.compat32-message.rst:511 +msgid "" +"If your application doesn't care whether the parameter was encoded as in :" +"rfc:`2231`, you can collapse the parameter value by calling :func:`email." +"utils.collapse_rfc2231_value`, passing in the return value from :meth:" +"`get_param`. This will return a suitably decoded Unicode string when the " +"value is a tuple, or the original string unquoted if it isn't. For example::" +msgstr "" + +#: library/email.compat32-message.rst:521 +msgid "" +"In any case, the parameter value (either the returned string, or the " +"``VALUE`` item in the 3-tuple) is always unquoted, unless *unquote* is set " +"to ``False``." +msgstr "" + +#: library/email.compat32-message.rst:534 +msgid "" +"Set a parameter in the :mailheader:`Content-Type` header. If the parameter " +"already exists in the header, its value will be replaced with *value*. If " +"the :mailheader:`Content-Type` header as not yet been defined for this " +"message, it will be set to :mimetype:`text/plain` and the new parameter " +"value will be appended as per :rfc:`2045`." +msgstr "" + +#: library/email.compat32-message.rst:540 +msgid "" +"Optional *header* specifies an alternative header to :mailheader:`Content-" +"Type`, and all parameters will be quoted as necessary unless optional " +"*requote* is ``False`` (the default is ``True``)." +msgstr "" + +#: library/email.compat32-message.rst:544 +msgid "" +"If optional *charset* is specified, the parameter will be encoded according " +"to :rfc:`2231`. Optional *language* specifies the RFC 2231 language, " +"defaulting to the empty string. Both *charset* and *language* should be " +"strings." +msgstr "" + +#: library/email.compat32-message.rst:549 +msgid "" +"If *replace* is ``False`` (the default) the header is moved to the end of " +"the list of headers. If *replace* is ``True``, the header will be updated " +"in place." +msgstr "" + +#: library/email.compat32-message.rst:553 +msgid "``replace`` keyword was added." +msgstr "" + +#: library/email.compat32-message.rst:558 +msgid "" +"Remove the given parameter completely from the :mailheader:`Content-Type` " +"header. The header will be re-written in place without the parameter or its " +"value. All values will be quoted as necessary unless *requote* is ``False`` " +"(the default is ``True``). Optional *header* specifies an alternative to :" +"mailheader:`Content-Type`." +msgstr "" + +#: library/email.compat32-message.rst:567 +msgid "" +"Set the main type and subtype for the :mailheader:`Content-Type` header. " +"*type* must be a string in the form :mimetype:`maintype/subtype`, otherwise " +"a :exc:`ValueError` is raised." +msgstr "" + +#: library/email.compat32-message.rst:571 +msgid "" +"This method replaces the :mailheader:`Content-Type` header, keeping all the " +"parameters in place. If *requote* is ``False``, this leaves the existing " +"header's quoting as is, otherwise the parameters will be quoted (the " +"default)." +msgstr "" + +#: library/email.compat32-message.rst:576 +msgid "" +"An alternative header can be specified in the *header* argument. When the :" +"mailheader:`Content-Type` header is set a :mailheader:`MIME-Version` header " +"is also added." +msgstr "" + +#: library/email.compat32-message.rst:580 +msgid "" +"This is a legacy method. On the :class:`~email.emailmessage.EmailMessage` " +"class its functionality is replaced by the ``make_`` and ``add_`` methods." +msgstr "" + +#: library/email.compat32-message.rst:587 +msgid "" +"Return the value of the ``filename`` parameter of the :mailheader:`Content-" +"Disposition` header of the message. If the header does not have a " +"``filename`` parameter, this method falls back to looking for the ``name`` " +"parameter on the :mailheader:`Content-Type` header. If neither is found, or " +"the header is missing, then *failobj* is returned. The returned string will " +"always be unquoted as per :func:`email.utils.unquote`." +msgstr "" + +#: library/email.compat32-message.rst:598 +msgid "" +"Return the value of the ``boundary`` parameter of the :mailheader:`Content-" +"Type` header of the message, or *failobj* if either the header is missing, " +"or has no ``boundary`` parameter. The returned string will always be " +"unquoted as per :func:`email.utils.unquote`." +msgstr "" + +#: library/email.compat32-message.rst:606 +msgid "" +"Set the ``boundary`` parameter of the :mailheader:`Content-Type` header to " +"*boundary*. :meth:`set_boundary` will always quote *boundary* if " +"necessary. A :exc:`~email.errors.HeaderParseError` is raised if the message " +"object has no :mailheader:`Content-Type` header." +msgstr "" + +#: library/email.compat32-message.rst:611 +msgid "" +"Note that using this method is subtly different than deleting the old :" +"mailheader:`Content-Type` header and adding a new one with the new boundary " +"via :meth:`add_header`, because :meth:`set_boundary` preserves the order of " +"the :mailheader:`Content-Type` header in the list of headers. However, it " +"does *not* preserve any continuation lines which may have been present in " +"the original :mailheader:`Content-Type` header." +msgstr "" + +#: library/email.compat32-message.rst:621 +msgid "" +"Return the ``charset`` parameter of the :mailheader:`Content-Type` header, " +"coerced to lower case. If there is no :mailheader:`Content-Type` header, or " +"if that header has no ``charset`` parameter, *failobj* is returned." +msgstr "" + +#: library/email.compat32-message.rst:625 +msgid "" +"Note that this method differs from :meth:`get_charset` which returns the :" +"class:`~email.charset.Charset` instance for the default encoding of the " +"message body." +msgstr "" + +#: library/email.compat32-message.rst:631 +msgid "" +"Return a list containing the character set names in the message. If the " +"message is a :mimetype:`multipart`, then the list will contain one element " +"for each subpart in the payload, otherwise, it will be a list of length 1." +msgstr "" + +#: library/email.compat32-message.rst:635 +msgid "" +"Each item in the list will be a string which is the value of the ``charset`` " +"parameter in the :mailheader:`Content-Type` header for the represented " +"subpart. However, if the subpart has no :mailheader:`Content-Type` header, " +"no ``charset`` parameter, or is not of the :mimetype:`text` main MIME type, " +"then that item in the returned list will be *failobj*." +msgstr "" + +#: library/email.compat32-message.rst:645 +msgid "" +"Return the lowercased value (without parameters) of the message's :" +"mailheader:`Content-Disposition` header if it has one, or ``None``. The " +"possible values for this method are *inline*, *attachment* or ``None`` if " +"the message follows :rfc:`2183`." +msgstr "" + +#: library/email.compat32-message.rst:654 +msgid "" +"The :meth:`walk` method is an all-purpose generator which can be used to " +"iterate over all the parts and subparts of a message object tree, in depth-" +"first traversal order. You will typically use :meth:`walk` as the iterator " +"in a ``for`` loop; each iteration returns the next subpart." +msgstr "" + +#: library/email.compat32-message.rst:659 +msgid "" +"Here's an example that prints the MIME type of every part of a multipart " +"message structure:" +msgstr "" + +#: library/email.compat32-message.rst:685 +msgid "" +"``walk`` iterates over the subparts of any part where :meth:`is_multipart` " +"returns ``True``, even though ``msg.get_content_maintype() == 'multipart'`` " +"may return ``False``. We can see this in our example by making use of the " +"``_structure`` debug helper function:" +msgstr "" + +#: library/email.compat32-message.rst:712 +msgid "" +"Here the ``message`` parts are not ``multiparts``, but they do contain " +"subparts. ``is_multipart()`` returns ``True`` and ``walk`` descends into the " +"subparts." +msgstr "" + +#: library/email.compat32-message.rst:717 +msgid "" +":class:`Message` objects can also optionally contain two instance " +"attributes, which can be used when generating the plain text of a MIME " +"message." +msgstr "" + +#: library/email.compat32-message.rst:723 +msgid "" +"The format of a MIME document allows for some text between the blank line " +"following the headers, and the first multipart boundary string. Normally, " +"this text is never visible in a MIME-aware mail reader because it falls " +"outside the standard MIME armor. However, when viewing the raw text of the " +"message, or when viewing the message in a non-MIME aware reader, this text " +"can become visible." +msgstr "" + +#: library/email.compat32-message.rst:730 +msgid "" +"The *preamble* attribute contains this leading extra-armor text for MIME " +"documents. When the :class:`~email.parser.Parser` discovers some text after " +"the headers but before the first boundary string, it assigns this text to " +"the message's *preamble* attribute. When the :class:`~email.generator." +"Generator` is writing out the plain text representation of a MIME message, " +"and it finds the message has a *preamble* attribute, it will write this text " +"in the area between the headers and the first boundary. See :mod:`email." +"parser` and :mod:`email.generator` for details." +msgstr "" + +#: library/email.compat32-message.rst:740 +msgid "" +"Note that if the message object has no preamble, the *preamble* attribute " +"will be ``None``." +msgstr "" + +#: library/email.compat32-message.rst:746 +msgid "" +"The *epilogue* attribute acts the same way as the *preamble* attribute, " +"except that it contains text that appears between the last boundary and the " +"end of the message." +msgstr "" + +#: library/email.compat32-message.rst:750 +msgid "" +"You do not need to set the epilogue to the empty string in order for the :" +"class:`~email.generator.Generator` to print a newline at the end of the file." +msgstr "" + +#: library/email.compat32-message.rst:757 +msgid "" +"The *defects* attribute contains a list of all the problems found when " +"parsing this message. See :mod:`email.errors` for a detailed description of " +"the possible parsing defects." +msgstr "" diff --git a/library/email.contentmanager.po b/library/email.contentmanager.po new file mode 100644 index 0000000000..90d02dbad6 --- /dev/null +++ b/library/email.contentmanager.po @@ -0,0 +1,278 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +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: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \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" + +#: library/email.contentmanager.rst:2 +msgid ":mod:`email.contentmanager`: Managing MIME Content" +msgstr "" + +#: library/email.contentmanager.rst:10 +msgid "**Source code:** :source:`Lib/email/contentmanager.py`" +msgstr "" + +#: library/email.contentmanager.rst:14 +msgid "[1]_" +msgstr "" + +#: library/email.contentmanager.rst:19 +msgid "" +"Base class for content managers. Provides the standard registry mechanisms " +"to register converters between MIME content and other representations, as " +"well as the ``get_content`` and ``set_content`` dispatch methods." +msgstr "" + +#: library/email.contentmanager.rst:26 +msgid "" +"Look up a handler function based on the ``mimetype`` of *msg* (see next " +"paragraph), call it, passing through all arguments, and return the result of " +"the call. The expectation is that the handler will extract the payload from " +"*msg* and return an object that encodes information about the extracted data." +msgstr "" + +#: library/email.contentmanager.rst:32 +msgid "" +"To find the handler, look for the following keys in the registry, stopping " +"with the first one found:" +msgstr "" + +#: library/email.contentmanager.rst:35 +msgid "the string representing the full MIME type (``maintype/subtype``)" +msgstr "" + +#: library/email.contentmanager.rst:36 +msgid "the string representing the ``maintype``" +msgstr "" + +#: library/email.contentmanager.rst:37 +msgid "the empty string" +msgstr "" + +#: library/email.contentmanager.rst:39 +msgid "" +"If none of these keys produce a handler, raise a :exc:`KeyError` for the " +"full MIME type." +msgstr "" + +#: library/email.contentmanager.rst:45 +msgid "" +"If the ``maintype`` is ``multipart``, raise a :exc:`TypeError`; otherwise " +"look up a handler function based on the type of *obj* (see next paragraph), " +"call :meth:`~email.message.EmailMessage.clear_content` on the *msg*, and " +"call the handler function, passing through all arguments. The expectation " +"is that the handler will transform and store *obj* into *msg*, possibly " +"making other changes to *msg* as well, such as adding various MIME headers " +"to encode information needed to interpret the stored data." +msgstr "" + +#: library/email.contentmanager.rst:54 +msgid "" +"To find the handler, obtain the type of *obj* (``typ = type(obj)``), and " +"look for the following keys in the registry, stopping with the first one " +"found:" +msgstr "" + +#: library/email.contentmanager.rst:58 +msgid "the type itself (``typ``)" +msgstr "" + +#: library/email.contentmanager.rst:59 +msgid "" +"the type's fully qualified name (``typ.__module__ + '.' + typ." +"__qualname__``)." +msgstr "" + +#: library/email.contentmanager.rst:61 +msgid "the type's qualname (``typ.__qualname__``)" +msgstr "" + +#: library/email.contentmanager.rst:62 +msgid "the type's name (``typ.__name__``)." +msgstr "" + +#: library/email.contentmanager.rst:64 +msgid "" +"If none of the above match, repeat all of the checks above for each of the " +"types in the :term:`MRO` (``typ.__mro__``). Finally, if no other key yields " +"a handler, check for a handler for the key ``None``. If there is no handler " +"for ``None``, raise a :exc:`KeyError` for the fully qualified name of the " +"type." +msgstr "" + +#: library/email.contentmanager.rst:70 +msgid "" +"Also add a :mailheader:`MIME-Version` header if one is not present (see " +"also :class:`.MIMEPart`)." +msgstr "" + +#: library/email.contentmanager.rst:76 +msgid "" +"Record the function *handler* as the handler for *key*. For the possible " +"values of *key*, see :meth:`get_content`." +msgstr "" + +#: library/email.contentmanager.rst:82 +msgid "" +"Record *handler* as the function to call when an object of a type matching " +"*typekey* is passed to :meth:`set_content`. For the possible values of " +"*typekey*, see :meth:`set_content`." +msgstr "" + +#: library/email.contentmanager.rst:88 +msgid "Content Manager Instances" +msgstr "" + +#: library/email.contentmanager.rst:90 +msgid "" +"Currently the email package provides only one concrete content manager, :" +"data:`raw_data_manager`, although more may be added in the future. :data:" +"`raw_data_manager` is the :attr:`~email.policy.EmailPolicy.content_manager` " +"provided by :attr:`~email.policy.EmailPolicy` and its derivatives." +msgstr "" + +#: library/email.contentmanager.rst:99 +msgid "" +"This content manager provides only a minimum interface beyond that provided " +"by :class:`~email.message.Message` itself: it deals only with text, raw " +"byte strings, and :class:`~email.message.Message` objects. Nevertheless, it " +"provides significant advantages compared to the base API: ``get_content`` on " +"a text part will return a unicode string without the application needing to " +"manually decode it, ``set_content`` provides a rich set of options for " +"controlling the headers added to a part and controlling the content transfer " +"encoding, and it enables the use of the various ``add_`` methods, thereby " +"simplifying the creation of multipart messages." +msgstr "" + +#: library/email.contentmanager.rst:111 +msgid "" +"Return the payload of the part as either a string (for ``text`` parts), an :" +"class:`~email.message.EmailMessage` object (for ``message/rfc822`` parts), " +"or a ``bytes`` object (for all other non-multipart types). Raise a :exc:" +"`KeyError` if called on a ``multipart``. If the part is a ``text`` part and " +"*errors* is specified, use it as the error handler when decoding the payload " +"to unicode. The default error handler is ``replace``." +msgstr "" + +#: library/email.contentmanager.rst:130 +msgid "Add headers and payload to *msg*:" +msgstr "" + +#: library/email.contentmanager.rst:132 +msgid "" +"Add a :mailheader:`Content-Type` header with a ``maintype/subtype`` value." +msgstr "" + +#: library/email.contentmanager.rst:135 +msgid "" +"For ``str``, set the MIME ``maintype`` to ``text``, and set the subtype to " +"*subtype* if it is specified, or ``plain`` if it is not." +msgstr "" + +#: library/email.contentmanager.rst:137 +msgid "" +"For ``bytes``, use the specified *maintype* and *subtype*, or raise a :exc:" +"`TypeError` if they are not specified." +msgstr "" + +#: library/email.contentmanager.rst:139 +msgid "" +"For :class:`~email.message.EmailMessage` objects, set the maintype to " +"``message``, and set the subtype to *subtype* if it is specified or " +"``rfc822`` if it is not. If *subtype* is ``partial``, raise an error " +"(``bytes`` objects must be used to construct ``message/partial`` parts)." +msgstr "" + +#: library/email.contentmanager.rst:145 +msgid "" +"If *charset* is provided (which is valid only for ``str``), encode the " +"string to bytes using the specified character set. The default is " +"``utf-8``. If the specified *charset* is a known alias for a standard MIME " +"charset name, use the standard charset instead." +msgstr "" + +#: library/email.contentmanager.rst:150 +msgid "" +"If *cte* is set, encode the payload using the specified content transfer " +"encoding, and set the :mailheader:`Content-Transfer-Encoding` header to that " +"value. Possible values for *cte* are ``quoted-printable``, ``base64``, " +"``7bit``, ``8bit``, and ``binary``. If the input cannot be encoded in the " +"specified encoding (for example, specifying a *cte* of ``7bit`` for an input " +"that contains non-ASCII values), raise a :exc:`ValueError`." +msgstr "" + +#: library/email.contentmanager.rst:158 +msgid "" +"For ``str`` objects, if *cte* is not set use heuristics to determine the " +"most compact encoding." +msgstr "" + +#: library/email.contentmanager.rst:160 +msgid "" +"For :class:`~email.message.EmailMessage`, per :rfc:`2046`, raise an error if " +"a *cte* of ``quoted-printable`` or ``base64`` is requested for *subtype* " +"``rfc822``, and for any *cte* other than ``7bit`` for *subtype* ``external-" +"body``. For ``message/rfc822``, use ``8bit`` if *cte* is not specified. " +"For all other values of *subtype*, use ``7bit``." +msgstr "" + +#: library/email.contentmanager.rst:167 +msgid "" +"A *cte* of ``binary`` does not actually work correctly yet. The " +"``EmailMessage`` object as modified by ``set_content`` is correct, but :" +"class:`~email.generator.BytesGenerator` does not serialize it correctly." +msgstr "" + +#: library/email.contentmanager.rst:172 +msgid "" +"If *disposition* is set, use it as the value of the :mailheader:`Content-" +"Disposition` header. If not specified, and *filename* is specified, add the " +"header with the value ``attachment``. If *disposition* is not specified and " +"*filename* is also not specified, do not add the header. The only valid " +"values for *disposition* are ``attachment`` and ``inline``." +msgstr "" + +#: library/email.contentmanager.rst:179 +msgid "" +"If *filename* is specified, use it as the value of the ``filename`` " +"parameter of the :mailheader:`Content-Disposition` header." +msgstr "" + +#: library/email.contentmanager.rst:182 +msgid "" +"If *cid* is specified, add a :mailheader:`Content-ID` header with *cid* as " +"its value." +msgstr "" + +#: library/email.contentmanager.rst:185 +msgid "" +"If *params* is specified, iterate its ``items`` method and use the resulting " +"``(key, value)`` pairs to set additional parameters on the :mailheader:" +"`Content-Type` header." +msgstr "" + +#: library/email.contentmanager.rst:189 +msgid "" +"If *headers* is specified and is a list of strings of the form ``headername: " +"headervalue`` or a list of ``header`` objects (distinguished from strings by " +"having a ``name`` attribute), add the headers to *msg*." +msgstr "" + +#: library/email.contentmanager.rst:196 +msgid "Footnotes" +msgstr "Notes" + +#: library/email.contentmanager.rst:197 +msgid "" +"Originally added in 3.4 as a :term:`provisional module `" +msgstr "" diff --git a/library/email.encoders.po b/library/email.encoders.po new file mode 100644 index 0000000000..b54990fc26 --- /dev/null +++ b/library/email.encoders.po @@ -0,0 +1,159 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +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: 2022-10-18 12:35+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/email.encoders.rst:2 +msgid ":mod:`email.encoders`: Encoders" +msgstr ":mod:`email.encoders` : Encodeurs" + +#: library/email.encoders.rst:7 +msgid "**Source code:** :source:`Lib/email/encoders.py`" +msgstr "**Code source :** :source:`Lib/email/encoders.py`" + +#: library/email.encoders.rst:11 +msgid "" +"This module is part of the legacy (``Compat32``) email API. In the new API " +"the functionality is provided by the *cte* parameter of the :meth:`~email." +"message.EmailMessage.set_content` method." +msgstr "" +"Ce module fait partie du code patrimonial (``Compat32``) de l'API mail. Dans " +"la nouvelle API la fonctionnalité est fournie par le paramètre *cte* de la " +"méthode :meth:`~email.message.EmailMessage.set_content`." + +#: library/email.encoders.rst:15 +msgid "" +"This module is deprecated in Python 3. The functions provided here should " +"not be called explicitly since the :class:`~email.mime.text.MIMEText` class " +"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 "" +"The remaining text in this section is the original documentation of the " +"module." +msgstr "" +"Le texte restant de cette section est la documentation originale de ce " +"module." + +#: library/email.encoders.rst:22 +msgid "" +"When creating :class:`~email.message.Message` objects from scratch, you " +"often need to encode the payloads for transport through compliant mail " +"servers. This is especially true for :mimetype:`image/\\*` and :mimetype:" +"`text/\\*` type messages containing binary data." +msgstr "" +"Au moment de la création d'objets :class:`~email.message.Message` à la main, " +"il est souvent nécessaire d'encoder les charges utiles pour le transport à " +"travers des serveurs mail conformes. C'est particulièrement vrai pour les " +"messages de type :mimetype:`image/\\*` et :mimetype:`text/\\*` contenant des " +"données binaires." + +#: library/email.encoders.rst:27 +msgid "" +"The :mod:`email` package provides some convenient encoders in its :mod:" +"`encoders` module. These encoders are actually used by the :class:`~email." +"mime.audio.MIMEAudio` and :class:`~email.mime.image.MIMEImage` class " +"constructors to provide default encodings. All encoder functions take " +"exactly one argument, the message object to encode. They usually extract " +"the payload, encode it, and reset the payload to this newly encoded value. " +"They should also set the :mailheader:`Content-Transfer-Encoding` header as " +"appropriate." +msgstr "" +"Le paquet :mod:`email` fournit quelques encodeurs pratiques dans son " +"module :mod:`encoders`. Ces encodeurs sont d'ailleurs utilisés par les " +"constructeurs des classes :class:`~email.mime.audio.MIMEAudio` et :class:" +"`~email.mime.image.MIMEImage` afin de fournir des encodages par défaut. " +"Toutes les fonctions d'encodage prennent exactement un argument, l'objet " +"message à encoder. Généralement, elles extraient la charge utile, l'encode, " +"puis change la charge utile pour la nouvelle valeur encodée. Elles devraient " +"également assigner l'en-tête :mailheader:`Content-Transfer-Encoding` si " +"besoin." + +#: library/email.encoders.rst:35 +msgid "" +"Note that these functions are not meaningful for a multipart message. They " +"must be applied to individual subparts instead, and will raise a :exc:" +"`TypeError` if passed a message whose type is multipart." +msgstr "" +"À noter que ces fonctions n'ont pas de sens dans le cadre d'un message en " +"plusieurs parties. Elles doivent à la place être appliquées aux sous-parties " +"individuelles, et lèvent :exc:`TypeError` si on leur passe un message en " +"plusieurs parties." + +#: library/email.encoders.rst:39 +msgid "Here are the encoding functions provided:" +msgstr "Voici les fonctions d'encodages fournies :" + +#: library/email.encoders.rst:44 +msgid "" +"Encodes the payload into quoted-printable form and sets the :mailheader:" +"`Content-Transfer-Encoding` header to ``quoted-printable`` [#]_. This is a " +"good encoding to use when most of your payload is normal printable data, but " +"contains a few unprintable characters." +msgstr "" +"Encode la charge utile au format Quoted-Printable, et assigne ``quoted-" +"printable`` [#]_ à l'en-tête :mailheader:`Content-Transfer-Encoding`. C'est " +"un bon encodage à utiliser quand la majorité de la charge utile contient " +"essentiellement des données imprimables, à l'exceptions de quelques " +"caractères." + +#: library/email.encoders.rst:52 +msgid "" +"Encodes the payload into base64 form and sets the :mailheader:`Content-" +"Transfer-Encoding` header to ``base64``. This is a good encoding to use " +"when most of your payload is unprintable data since it is a more compact " +"form than quoted-printable. The drawback of base64 encoding is that it " +"renders the text non-human readable." +msgstr "" +"Encode la charge utile au format *base64*, et assigne ``base64`` à l'en-" +"tête :mailheader:`Content-Transfer-Encoding`. C'est un bon encodage à " +"utiliser quand la majorité de la charge utile est non imprimable puisque " +"c'est une forme plus compacte que *quoted-printable*." + +#: library/email.encoders.rst:61 +msgid "" +"This doesn't actually modify the message's payload, but it does set the :" +"mailheader:`Content-Transfer-Encoding` header to either ``7bit`` or ``8bit`` " +"as appropriate, based on the payload data." +msgstr "" +"Ceci ne modifie pas effectivement la charge utile du message, mais va bien " +"en revanche assigner la valeur ``7bit`` ou ``8bit`` à l'en-tête :mailheader:" +"`Content-Transfer-Encoding` selon la nature de la charge utile." + +#: library/email.encoders.rst:68 +msgid "" +"This does nothing; it doesn't even set the :mailheader:`Content-Transfer-" +"Encoding` header." +msgstr "" +"Ceci ne fait rien; et ne va même pas changer la valeur de l'en-tête :" +"mailheader:`Content-Transfer-Encoding`." + +#: library/email.encoders.rst:72 +msgid "Footnotes" +msgstr "Notes" + +#: library/email.encoders.rst:73 +msgid "" +"Note that encoding with :meth:`encode_quopri` also encodes all tabs and " +"space characters in the data." +msgstr "" +"À noter que l'encodage avec :meth:`encode_quopri` encode également tous les " +"caractères tabulation et espace." diff --git a/library/email.errors.po b/library/email.errors.po new file mode 100644 index 0000000000..948fd29ead --- /dev/null +++ b/library/email.errors.po @@ -0,0 +1,244 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-09-23 16:16+0200\n" +"PO-Revision-Date: 2021-11-06 21:40+0100\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 3.0\n" + +#: library/email.errors.rst:2 +msgid ":mod:`email.errors`: Exception and Defect classes" +msgstr ":mod:`email.errors` : exceptions et classes pour les anomalies" + +#: library/email.errors.rst:7 +msgid "**Source code:** :source:`Lib/email/errors.py`" +msgstr "**Code source :** :source:`Lib/email/errors.py`" + +#: library/email.errors.rst:11 +msgid "" +"The following exception classes are defined in the :mod:`email.errors` " +"module:" +msgstr "" +"Les classes d'exception suivantes sont définies dans le module :mod:`email." +"errors` :" + +#: library/email.errors.rst:16 +msgid "" +"This is the base class for all exceptions that the :mod:`email` package can " +"raise. It is derived from the standard :exc:`Exception` class and defines " +"no additional methods." +msgstr "" +"Exception de base, dont héritent toutes les exceptions du paquet :mod:" +"`email`. Cette classe hérite de la classe native :exc:`Exception` et ne " +"définit aucune méthode additionnelle." + +#: library/email.errors.rst:23 +msgid "" +"This is the base class for exceptions raised by the :class:`~email.parser." +"Parser` class. It is derived from :exc:`MessageError`. This class is also " +"used internally by the parser used by :mod:`~email.headerregistry`." +msgstr "" +"Exception de base pour les exceptions levées par la classe :class:`~email." +"parser.Parser`. Elle hérite de :exc:`MessageError`. Cette classe est aussi " +"utilisée en interne par l'analyseur de :mod:`~email.headerregistry`." + +#: library/email.errors.rst:31 +msgid "" +"Raised under some error conditions when parsing the :rfc:`5322` headers of a " +"message, this class is derived from :exc:`MessageParseError`. The :meth:" +"`~email.message.EmailMessage.set_boundary` method will raise this error if " +"the content type is unknown when the method is called. :class:`~email.header." +"Header` may raise this error for certain base64 decoding errors, and when an " +"attempt is made to create a header that appears to contain an embedded " +"header (that is, there is what is supposed to be a continuation line that " +"has no leading whitespace and looks like a header)." +msgstr "" +"Cette exception, dérivée de :exc:`MessageParseError`, est levée sous " +"différentes conditions lors de l'analyse des en-têtes :rfc:`5322` du " +"message. Lorsque la méthode :meth:`~email.message.EmailMessage." +"set_boundary` est invoquée, elle lève cette erreur si le type du contenu est " +"inconnu. La classe :class:`~email.header.Header` lève cette exception pour " +"certains types d'erreurs provenant du décodage base64. Elle la lève aussi " +"quand un en-tête est créé et qu'il semble contenir un en-tête imbriqué, " +"c'est-à-dire que la ligne qui suit ressemble à un en-tête et ne commence pas " +"par des caractères d'espacement." + +#: library/email.errors.rst:43 +msgid "Deprecated and no longer used." +msgstr "Obsolète, n'est plus utilisé." + +#: library/email.errors.rst:48 +msgid "" +"Raised when a payload is added to a :class:`~email.message.Message` object " +"using :meth:`add_payload`, but the payload is already a scalar and the " +"message's :mailheader:`Content-Type` main type is not either :mimetype:" +"`multipart` or missing. :exc:`MultipartConversionError` multiply inherits " +"from :exc:`MessageError` and the built-in :exc:`TypeError`." +msgstr "" +"Cette exception est levée quand le contenu, que la méthode :meth:" +"`add_payload` essaie d'ajouter à l'objet :class:`~email.message.Message`, " +"est déjà un scalaire et que le type principal du message :mailheader:" +"`Content-Type` est manquant ou différent de :mimetype:`multipart`. :exc:" +"`MultipartConversionError` hérite à la fois de :exc:`MessageError` et de :" +"exc:`TypeError`." + +#: library/email.errors.rst:54 +msgid "" +"Since :meth:`Message.add_payload` is deprecated, this exception is rarely " +"raised in practice. However the exception may also be raised if the :meth:" +"`~email.message.Message.attach` method is called on an instance of a class " +"derived from :class:`~email.mime.nonmultipart.MIMENonMultipart` (e.g. :class:" +"`~email.mime.image.MIMEImage`)." +msgstr "" +"Comme la méthode :meth:`Message.add_payload` est obsolète, cette exception " +"est rarement utilisée. Néanmoins, elle peut être levée si la méthode :meth:" +"`~email.message.Message.attach` est invoquée sur une instance de classe " +"dérivée de :class:`~email.mime.nonmultipart.MIMENonMultipart` (p. ex. :class:" +"`~email.mime.image.MIMEImage`)." + +#: library/email.errors.rst:62 +msgid "" +"Here is the list of the defects that the :class:`~email.parser.FeedParser` " +"can find while parsing messages. Note that the defects are added to the " +"message where the problem was found, so for example, if a message nested " +"inside a :mimetype:`multipart/alternative` had a malformed header, that " +"nested message object would have a defect, but the containing messages would " +"not." +msgstr "" +"Voici la liste des anomalies que peut identifier :class:`~email.parser." +"FeedParser` pendant l'analyse des messages. Notez que les anomalies sont " +"signalées à l'endroit où elles sont détectées : par exemple, dans le cas " +"d'une malformation de l'en-tête d'un message imbriqué dans un message de " +"type :mimetype:`multipart/alternative`, l'anomalie est signalée sur le " +"message imbriqué seulement." + +#: library/email.errors.rst:68 +msgid "" +"All defect classes are subclassed from :class:`email.errors.MessageDefect`." +msgstr "" +"Toutes les anomalies sont des sous-classes de :class:`email.errors." +"MessageDefect`." + +#: library/email.errors.rst:70 +msgid "" +":class:`NoBoundaryInMultipartDefect` -- A message claimed to be a multipart, " +"but had no :mimetype:`boundary` parameter." +msgstr "" +":class:`NoBoundaryInMultipartDefect` — Un message qui prétend être composite " +"(*multipart* en anglais), mais qui ne contient pas de séparateur :mimetype:" +"`boundary`." + +#: library/email.errors.rst:73 +msgid "" +":class:`StartBoundaryNotFoundDefect` -- The start boundary claimed in the :" +"mailheader:`Content-Type` header was never found." +msgstr "" +":class:`StartBoundaryNotFoundDefect` — Le message ne contient pas le " +"séparateur de départ indiqué dans le :mailheader:`Content-Type`." + +#: library/email.errors.rst:76 +msgid "" +":class:`CloseBoundaryNotFoundDefect` -- A start boundary was found, but no " +"corresponding close boundary was ever found." +msgstr "" +":class:`CloseBoundaryNotFoundDefect` — Le séparateur de départ a été trouvé, " +"mais pas le séparateur de fin correspondant." + +#: library/email.errors.rst:81 +msgid "" +":class:`FirstHeaderLineIsContinuationDefect` -- The message had a " +"continuation line as its first header line." +msgstr "" +":class:`FirstHeaderLineIsContinuationDefect` — La première ligne de l'en-" +"tête du message est une ligne de continuation." + +#: library/email.errors.rst:84 +msgid "" +":class:`MisplacedEnvelopeHeaderDefect` - A \"Unix From\" header was found in " +"the middle of a header block." +msgstr "" +":class:`MisplacedEnvelopeHeaderDefect` — Un en-tête *Unix From* est présent " +"à l'intérieur d'un bloc d'en-tête." + +#: library/email.errors.rst:87 +msgid "" +":class:`MissingHeaderBodySeparatorDefect` - A line was found while parsing " +"headers that had no leading white space but contained no ':'. Parsing " +"continues assuming that the line represents the first line of the body." +msgstr "" +":class:`MissingHeaderBodySeparatorDefect` — Une ligne d'en-tête ne contient " +"pas de caractères d'espacement au début et aucun « : ». L'analyse continue " +"en supposant qu'il s'agit donc de la première ligne du corps du message." + +#: library/email.errors.rst:93 +msgid "" +":class:`MalformedHeaderDefect` -- A header was found that was missing a " +"colon, or was otherwise malformed." +msgstr "" +":class:`MalformedHeaderDefect` -- Un en-tête est mal formé ou il manque un " +"« : »." + +#: library/email.errors.rst:96 +msgid "This defect has not been used for several Python versions." +msgstr "Cette anomalie est obsolète depuis plusieurs versions de Python." + +#: library/email.errors.rst:99 +msgid "" +":class:`MultipartInvariantViolationDefect` -- A message claimed to be a :" +"mimetype:`multipart`, but no subparts were found. Note that when a message " +"has this defect, its :meth:`~email.message.Message.is_multipart` method may " +"return ``False`` even though its content type claims to be :mimetype:" +"`multipart`." +msgstr "" +":class:`MultipartInvariantViolationDefect` — Le message indique être de " +"type :mimetype:`multipart`, mais aucune pièce jointe n'a été trouvée. Notez " +"que, dans ce cas, la méthode :meth:`~email.message.Message.is_multipart` " +"peut renvoyer ``False`` même si le type de contenu est :mimetype:`multipart`." + +#: library/email.errors.rst:104 +msgid "" +":class:`InvalidBase64PaddingDefect` -- When decoding a block of base64 " +"encoded bytes, the padding was not correct. Enough padding is added to " +"perform the decode, but the resulting decoded bytes may be invalid." +msgstr "" +":class:`InvalidBase64PaddingDefect` — Remplissage incorrect d'un bloc " +"d'octets encodés en base64. Des caractères de remplissage ont été ajoutés " +"pour permettre le décodage, mais le résultat du décodage peut être invalide." + +#: library/email.errors.rst:108 +msgid "" +":class:`InvalidBase64CharactersDefect` -- When decoding a block of base64 " +"encoded bytes, characters outside the base64 alphabet were encountered. The " +"characters are ignored, but the resulting decoded bytes may be invalid." +msgstr "" +":class:`InvalidBase64CharactersDefect` — Des caractères n'appartenant pas à " +"l'alphabet base64 ont été rencontrés lors du décodage d'un bloc d'octets " +"encodés en base64. Les caractères ont été ignorés, mais le résultat du " +"décodage peut être invalide." + +#: library/email.errors.rst:112 +msgid "" +":class:`InvalidBase64LengthDefect` -- When decoding a block of base64 " +"encoded bytes, the number of non-padding base64 characters was invalid (1 " +"more than a multiple of 4). The encoded block was kept as-is." +msgstr "" +":class:`InvalidBase64LengthDefect` — Le nombre de caractères (autres que de " +"remplissage) d'un bloc d'octets encodés en base64 est invalide (1 de plus " +"qu'un multiple de 4). Le bloc encodé n'a pas été modifié." + +#: library/email.errors.rst:116 +msgid "" +":class:`InvalidDateDefect` -- When decoding an invalid or unparsable date " +"field. The original value is kept as-is." +msgstr "" +":class:`InvalidDateDefect` — Le champ de date est invalide. La valeur est " +"laissée telle-quelle." diff --git a/library/email.examples.po b/library/email.examples.po new file mode 100644 index 0000000000..8abcb29863 --- /dev/null +++ b/library/email.examples.po @@ -0,0 +1,104 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +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-09-28 13:01+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.0.5\n" + +#: library/email.examples.rst:4 +msgid ":mod:`email`: Examples" +msgstr ":mod:`email`: Exemples" + +#: library/email.examples.rst:6 +msgid "" +"Here are a few examples of how to use the :mod:`email` package to read, " +"write, and send simple email messages, as well as more complex MIME messages." +msgstr "" +"Cette page contient quelques exemples de l'utilisation du package :mod:" +"`email` pour lire, écrire, et envoyer de simples messages mail, ainsi que " +"des messages MIME plus complexes." + +#: library/email.examples.rst:9 +msgid "" +"First, let's see how to create and send a simple text message (both the text " +"content and the addresses may contain unicode characters):" +msgstr "" +"Premièrement, regardons comment créer et envoyer un message avec simplement " +"du texte (le contenu textuel et les adresses peuvent tous deux contenir des " +"caractères Unicodes) :" + +#: library/email.examples.rst:15 +msgid "" +"Parsing :rfc:`822` headers can easily be done by the using the classes from " +"the :mod:`~email.parser` module:" +msgstr "" +"Analyser des entêtes :rfc:`822` peut être aisément réalisé en utilisant les " +"classes du module :mod:`~email.parser` :" + +#: library/email.examples.rst:21 +msgid "" +"Here's an example of how to send a MIME message containing a bunch of family " +"pictures that may be residing in a directory:" +msgstr "" +"Voici un exemple de l'envoi d'un message MIME contenant une série de photos " +"de famille qui sont stockés ensemble dans un dossier :" + +#: library/email.examples.rst:27 +msgid "" +"Here's an example of how to send the entire contents of a directory as an " +"email message: [1]_" +msgstr "" +"Voici un exemple d'envoi du contenu d'un dossier entier en tant que message " +"mail : [1]_" + +#: library/email.examples.rst:33 +msgid "" +"Here's an example of how to unpack a MIME message like the one above, into a " +"directory of files:" +msgstr "" +"Voici un message de comment décomposer un message MIME comme celui ci dessus " +"en tant que fichiers dans un dossier :" + +#: library/email.examples.rst:39 +msgid "" +"Here's an example of how to create an HTML message with an alternative plain " +"text version. To make things a bit more interesting, we include a related " +"image in the html part, and we save a copy of what we are going to send to " +"disk, as well as sending it." +msgstr "" +"Voici un exemple de création d'un message HTML avec une version en texte " +"comme alternative. Pour rendre les choses un peu plus intéressantes, nous " +"incluons aussi une image dans la partie HTML, nous sauvons une copie du " +"message sur le disque, et nous l'envoyons." + +#: library/email.examples.rst:47 +msgid "" +"If we were sent the message from the last example, here is one way we could " +"process it:" +msgstr "" +"Si on nous avait envoyé le message de l'exemple précédent, voici la manière " +"avec laquelle nous pourrions le traiter :" + +#: library/email.examples.rst:52 +msgid "Up to the prompt, the output from the above is:" +msgstr "La sortie textuelle du code ci dessus est :" + +#: library/email.examples.rst:66 +msgid "Footnotes" +msgstr "Notes" + +#: library/email.examples.rst:67 +msgid "" +"Thanks to Matthew Dixon Cowles for the original inspiration and examples." +msgstr "" +"Merci à Matthew Dixon Cowles pour l'inspiration originale et les exemples." diff --git a/library/email.generator.po b/library/email.generator.po new file mode 100644 index 0000000000..9c762aacb4 --- /dev/null +++ b/library/email.generator.po @@ -0,0 +1,327 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-18 15:46+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \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" + +#: library/email.generator.rst:2 +msgid ":mod:`email.generator`: Generating MIME documents" +msgstr "" + +#: library/email.generator.rst:7 +#, fuzzy +msgid "**Source code:** :source:`Lib/email/generator.py`" +msgstr "**Code source :** :source:`Lib/email/iterators.py`" + +#: library/email.generator.rst:11 +msgid "" +"One of the most common tasks is to generate the flat (serialized) version of " +"the email message represented by a message object structure. You will need " +"to do this if you want to send your message via :meth:`smtplib.SMTP." +"sendmail` or the :mod:`nntplib` module, or print the message on the " +"console. Taking a message object structure and producing a serialized " +"representation is the job of the generator classes." +msgstr "" + +#: library/email.generator.rst:18 +msgid "" +"As with the :mod:`email.parser` module, you aren't limited to the " +"functionality of the bundled generator; you could write one from scratch " +"yourself. However the bundled generator knows how to generate most email in " +"a standards-compliant way, should handle MIME and non-MIME email messages " +"just fine, and is designed so that the bytes-oriented parsing and generation " +"operations are inverses, assuming the same non-transforming :mod:`~email." +"policy` is used for both. That is, parsing the serialized byte stream via " +"the :class:`~email.parser.BytesParser` class and then regenerating the " +"serialized byte stream using :class:`BytesGenerator` should produce output " +"identical to the input [#]_. (On the other hand, using the generator on an :" +"class:`~email.message.EmailMessage` constructed by program may result in " +"changes to the :class:`~email.message.EmailMessage` object as defaults are " +"filled in.)" +msgstr "" + +#: library/email.generator.rst:32 +msgid "" +"The :class:`Generator` class can be used to flatten a message into a text " +"(as opposed to binary) serialized representation, but since Unicode cannot " +"represent binary data directly, the message is of necessity transformed into " +"something that contains only ASCII characters, using the standard email RFC " +"Content Transfer Encoding techniques for encoding email messages for " +"transport over channels that are not \"8 bit clean\"." +msgstr "" + +#: library/email.generator.rst:39 +msgid "" +"To accommodate reproducible processing of SMIME-signed messages :class:" +"`Generator` disables header folding for message parts of type ``multipart/" +"signed`` and all subparts." +msgstr "" + +#: library/email.generator.rst:47 +msgid "" +"Return a :class:`BytesGenerator` object that will write any message provided " +"to the :meth:`flatten` method, or any surrogateescape encoded text provided " +"to the :meth:`write` method, to the :term:`file-like object` *outfp*. " +"*outfp* must support a ``write`` method that accepts binary data." +msgstr "" + +#: library/email.generator.rst:153 +msgid "" +"If optional *mangle_from_* is ``True``, put a ``>`` character in front of " +"any line in the body that starts with the exact string ``\"From \"``, that " +"is ``From`` followed by a space at the beginning of a line. *mangle_from_* " +"defaults to the value of the :attr:`~email.policy.Policy.mangle_from_` " +"setting of the *policy* (which is ``True`` for the :data:`~email.policy." +"compat32` policy and ``False`` for all others). *mangle_from_* is intended " +"for use when messages are stored in Unix mbox format (see :mod:`mailbox` and " +"`WHY THE CONTENT-LENGTH FORMAT IS BAD `_)." +msgstr "" + +#: library/email.generator.rst:163 +msgid "" +"If *maxheaderlen* is not ``None``, refold any header lines that are longer " +"than *maxheaderlen*, or if ``0``, do not rewrap any headers. If " +"*manheaderlen* is ``None`` (the default), wrap headers and other message " +"lines according to the *policy* settings." +msgstr "" + +#: library/email.generator.rst:168 +msgid "" +"If *policy* is specified, use that policy to control message generation. If " +"*policy* is ``None`` (the default), use the policy associated with the :" +"class:`~email.message.Message` or :class:`~email.message.EmailMessage` " +"object passed to ``flatten`` to control the message generation. See :mod:" +"`email.policy` for details on what *policy* controls." +msgstr "" + +#: library/email.generator.rst:174 +msgid "Added the *policy* keyword." +msgstr "" + +#: library/email.generator.rst:176 +msgid "" +"The default behavior of the *mangle_from_* and *maxheaderlen* parameters is " +"to follow the policy." +msgstr "" + +#: library/email.generator.rst:83 +msgid "" +"Print the textual representation of the message object structure rooted at " +"*msg* to the output file specified when the :class:`BytesGenerator` instance " +"was created." +msgstr "" + +#: library/email.generator.rst:87 +msgid "" +"If the :mod:`~email.policy` option :attr:`~email.policy.Policy.cte_type` is " +"``8bit`` (the default), copy any headers in the original parsed message that " +"have not been modified to the output with any bytes with the high bit set " +"reproduced as in the original, and preserve the non-ASCII :mailheader:" +"`Content-Transfer-Encoding` of any body parts that have them. If " +"``cte_type`` is ``7bit``, convert the bytes with the high bit set as needed " +"using an ASCII-compatible :mailheader:`Content-Transfer-Encoding`. That is, " +"transform parts with non-ASCII :mailheader:`Content-Transfer-Encoding` (:" +"mailheader:`Content-Transfer-Encoding: 8bit`) to an ASCII compatible :" +"mailheader:`Content-Transfer-Encoding`, and encode RFC-invalid non-ASCII " +"bytes in headers using the MIME ``unknown-8bit`` character set, thus " +"rendering them RFC-compliant." +msgstr "" + +#: library/email.generator.rst:104 library/email.generator.rst:197 +msgid "" +"If *unixfrom* is ``True``, print the envelope header delimiter used by the " +"Unix mailbox format (see :mod:`mailbox`) before the first of the :rfc:`5322` " +"headers of the root message object. If the root object has no envelope " +"header, craft a standard one. The default is ``False``. Note that for " +"subparts, no envelope header is ever printed." +msgstr "" + +#: library/email.generator.rst:110 library/email.generator.rst:203 +msgid "" +"If *linesep* is not ``None``, use it as the separator character between all " +"the lines of the flattened message. If *linesep* is ``None`` (the default), " +"use the value specified in the *policy*." +msgstr "" + +#: library/email.generator.rst:119 +msgid "" +"Return an independent clone of this :class:`BytesGenerator` instance with " +"the exact same option settings, and *fp* as the new *outfp*." +msgstr "" + +#: library/email.generator.rst:125 +msgid "" +"Encode *s* using the ``ASCII`` codec and the ``surrogateescape`` error " +"handler, and pass it to the *write* method of the *outfp* passed to the :" +"class:`BytesGenerator`'s constructor." +msgstr "" + +#: library/email.generator.rst:130 +msgid "" +"As a convenience, :class:`~email.message.EmailMessage` provides the methods :" +"meth:`~email.message.EmailMessage.as_bytes` and ``bytes(aMessage)`` (a.k.a. :" +"meth:`~email.message.EmailMessage.__bytes__`), which simplify the generation " +"of a serialized binary representation of a message object. For more detail, " +"see :mod:`email.message`." +msgstr "" + +#: library/email.generator.rst:137 +msgid "" +"Because strings cannot represent binary data, the :class:`Generator` class " +"must convert any binary data in any message it flattens to an ASCII " +"compatible format, by converting them to an ASCII compatible :mailheader:" +"`Content-Transfer_Encoding`. Using the terminology of the email RFCs, you " +"can think of this as :class:`Generator` serializing to an I/O stream that is " +"not \"8 bit clean\". In other words, most applications will want to be " +"using :class:`BytesGenerator`, and not :class:`Generator`." +msgstr "" + +#: library/email.generator.rst:148 +msgid "" +"Return a :class:`Generator` object that will write any message provided to " +"the :meth:`flatten` method, or any text provided to the :meth:`write` " +"method, to the :term:`file-like object` *outfp*. *outfp* must support a " +"``write`` method that accepts string data." +msgstr "" + +#: library/email.generator.rst:182 +msgid "" +"Print the textual representation of the message object structure rooted at " +"*msg* to the output file specified when the :class:`Generator` instance was " +"created." +msgstr "" + +#: library/email.generator.rst:186 +msgid "" +"If the :mod:`~email.policy` option :attr:`~email.policy.Policy.cte_type` is " +"``8bit``, generate the message as if the option were set to ``7bit``. (This " +"is required because strings cannot represent non-ASCII bytes.) Convert any " +"bytes with the high bit set as needed using an ASCII-compatible :mailheader:" +"`Content-Transfer-Encoding`. That is, transform parts with non-ASCII :" +"mailheader:`Content-Transfer-Encoding` (:mailheader:`Content-Transfer-" +"Encoding: 8bit`) to an ASCII compatible :mailheader:`Content-Transfer-" +"Encoding`, and encode RFC-invalid non-ASCII bytes in headers using the MIME " +"``unknown-8bit`` character set, thus rendering them RFC-compliant." +msgstr "" + +#: library/email.generator.rst:209 +msgid "" +"Added support for re-encoding ``8bit`` message bodies, and the *linesep* " +"argument." +msgstr "" + +#: library/email.generator.rst:216 +msgid "" +"Return an independent clone of this :class:`Generator` instance with the " +"exact same options, and *fp* as the new *outfp*." +msgstr "" + +#: library/email.generator.rst:222 +msgid "" +"Write *s* to the *write* method of the *outfp* passed to the :class:" +"`Generator`'s constructor. This provides just enough file-like API for :" +"class:`Generator` instances to be used in the :func:`print` function." +msgstr "" + +#: library/email.generator.rst:228 +msgid "" +"As a convenience, :class:`~email.message.EmailMessage` provides the methods :" +"meth:`~email.message.EmailMessage.as_string` and ``str(aMessage)`` (a.k.a. :" +"meth:`~email.message.EmailMessage.__str__`), which simplify the generation " +"of a formatted string representation of a message object. For more detail, " +"see :mod:`email.message`." +msgstr "" + +#: library/email.generator.rst:235 +msgid "" +"The :mod:`email.generator` module also provides a derived class, :class:" +"`DecodedGenerator`, which is like the :class:`Generator` base class, except " +"that non-\\ :mimetype:`text` parts are not serialized, but are instead " +"represented in the output stream by a string derived from a template filled " +"in with information about the part." +msgstr "" + +#: library/email.generator.rst:244 +msgid "" +"Act like :class:`Generator`, except that for any subpart of the message " +"passed to :meth:`Generator.flatten`, if the subpart is of main type :" +"mimetype:`text`, print the decoded payload of the subpart, and if the main " +"type is not :mimetype:`text`, instead of printing it fill in the string " +"*fmt* using information from the part and print the resulting filled-in " +"string." +msgstr "" + +#: library/email.generator.rst:251 +msgid "" +"To fill in *fmt*, execute ``fmt % part_info``, where ``part_info`` is a " +"dictionary composed of the following keys and values:" +msgstr "" + +#: library/email.generator.rst:254 +msgid "``type`` -- Full MIME type of the non-\\ :mimetype:`text` part" +msgstr "" + +#: library/email.generator.rst:256 +msgid "``maintype`` -- Main MIME type of the non-\\ :mimetype:`text` part" +msgstr "" + +#: library/email.generator.rst:258 +msgid "``subtype`` -- Sub-MIME type of the non-\\ :mimetype:`text` part" +msgstr "" + +#: library/email.generator.rst:260 +msgid "``filename`` -- Filename of the non-\\ :mimetype:`text` part" +msgstr "" + +#: library/email.generator.rst:262 +msgid "" +"``description`` -- Description associated with the non-\\ :mimetype:`text` " +"part" +msgstr "" + +#: library/email.generator.rst:264 +msgid "" +"``encoding`` -- Content transfer encoding of the non-\\ :mimetype:`text` part" +msgstr "" + +#: library/email.generator.rst:266 +msgid "If *fmt* is ``None``, use the following default *fmt*:" +msgstr "" + +#: library/email.generator.rst:268 +msgid "" +"\"[Non-text (%(type)s) part of message omitted, filename %(filename)s]\"" +msgstr "" + +#: library/email.generator.rst:270 +msgid "" +"Optional *_mangle_from_* and *maxheaderlen* are as with the :class:" +"`Generator` base class." +msgstr "" + +#: library/email.generator.rst:275 +msgid "Footnotes" +msgstr "Notes" + +#: library/email.generator.rst:276 +msgid "" +"This statement assumes that you use the appropriate setting for " +"``unixfrom``, and that there are no :mod:`policy` settings calling for " +"automatic adjustments (for example, :attr:`~email.policy.Policy." +"refold_source` must be ``none``, which is *not* the default). It is also " +"not 100% true, since if the message does not conform to the RFC standards " +"occasionally information about the exact original text is lost during " +"parsing error recovery. It is a goal to fix these latter edge cases when " +"possible." +msgstr "" diff --git a/library/email.header.po b/library/email.header.po new file mode 100644 index 0000000000..ee5c13ab2a --- /dev/null +++ b/library/email.header.po @@ -0,0 +1,287 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-03-18 17:06+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \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" + +#: library/email.header.rst:2 +msgid ":mod:`email.header`: Internationalized headers" +msgstr "" + +#: library/email.header.rst:7 +#, fuzzy +msgid "**Source code:** :source:`Lib/email/header.py`" +msgstr "**Code source :** :source:`Lib/email/encoders.py`" + +#: library/email.header.rst:11 +msgid "" +"This module is part of the legacy (``Compat32``) email API. In the current " +"API encoding and decoding of headers is handled transparently by the " +"dictionary-like API of the :class:`~email.message.EmailMessage` class. In " +"addition to uses in legacy code, this module can be useful in applications " +"that need to completely control the character sets used when encoding " +"headers." +msgstr "" + +#: library/email.header.rst:17 +msgid "" +"The remaining text in this section is the original documentation of the " +"module." +msgstr "" +"Le texte restant de cette section est la documentation originale de ce " +"module." + +#: library/email.header.rst:19 +msgid "" +":rfc:`2822` is the base standard that describes the format of email " +"messages. It derives from the older :rfc:`822` standard which came into " +"widespread use at a time when most email was composed of ASCII characters " +"only. :rfc:`2822` is a specification written assuming email contains only 7-" +"bit ASCII characters." +msgstr "" + +#: library/email.header.rst:24 +msgid "" +"Of course, as email has been deployed worldwide, it has become " +"internationalized, such that language specific character sets can now be " +"used in email messages. The base standard still requires email messages to " +"be transferred using only 7-bit ASCII characters, so a slew of RFCs have " +"been written describing how to encode email containing non-ASCII characters " +"into :rfc:`2822`\\ -compliant format. These RFCs include :rfc:`2045`, :rfc:" +"`2046`, :rfc:`2047`, and :rfc:`2231`. The :mod:`email` package supports " +"these standards in its :mod:`email.header` and :mod:`email.charset` modules." +msgstr "" + +#: library/email.header.rst:33 +msgid "" +"If you want to include non-ASCII characters in your email headers, say in " +"the :mailheader:`Subject` or :mailheader:`To` fields, you should use the :" +"class:`Header` class and assign the field in the :class:`~email.message." +"Message` object to an instance of :class:`Header` instead of using a string " +"for the header value. Import the :class:`Header` class from the :mod:`email." +"header` module. For example::" +msgstr "" + +#: library/email.header.rst:50 +msgid "" +"Notice here how we wanted the :mailheader:`Subject` field to contain a non-" +"ASCII character? We did this by creating a :class:`Header` instance and " +"passing in the character set that the byte string was encoded in. When the " +"subsequent :class:`~email.message.Message` instance was flattened, the :" +"mailheader:`Subject` field was properly :rfc:`2047` encoded. MIME-aware " +"mail readers would show this header using the embedded ISO-8859-1 character." +msgstr "" + +#: library/email.header.rst:57 +msgid "Here is the :class:`Header` class description:" +msgstr "" + +#: library/email.header.rst:62 +msgid "" +"Create a MIME-compliant header that can contain strings in different " +"character sets." +msgstr "" + +#: library/email.header.rst:65 +msgid "" +"Optional *s* is the initial header value. If ``None`` (the default), the " +"initial header value is not set. You can later append to the header with :" +"meth:`append` method calls. *s* may be an instance of :class:`bytes` or :" +"class:`str`, but see the :meth:`append` documentation for semantics." +msgstr "" + +#: library/email.header.rst:70 +msgid "" +"Optional *charset* serves two purposes: it has the same meaning as the " +"*charset* argument to the :meth:`append` method. It also sets the default " +"character set for all subsequent :meth:`append` calls that omit the " +"*charset* argument. If *charset* is not provided in the constructor (the " +"default), the ``us-ascii`` character set is used both as *s*'s initial " +"charset and as the default for subsequent :meth:`append` calls." +msgstr "" + +#: library/email.header.rst:77 +msgid "" +"The maximum line length can be specified explicitly via *maxlinelen*. For " +"splitting the first line to a shorter value (to account for the field header " +"which isn't included in *s*, e.g. :mailheader:`Subject`) pass in the name of " +"the field in *header_name*. The default *maxlinelen* is 76, and the default " +"value for *header_name* is ``None``, meaning it is not taken into account " +"for the first line of a long, split header." +msgstr "" + +#: library/email.header.rst:84 +msgid "" +"Optional *continuation_ws* must be :rfc:`2822`\\ -compliant folding " +"whitespace, and is usually either a space or a hard tab character. This " +"character will be prepended to continuation lines. *continuation_ws* " +"defaults to a single space character." +msgstr "" + +#: library/email.header.rst:89 +msgid "" +"Optional *errors* is passed straight through to the :meth:`append` method." +msgstr "" + +#: library/email.header.rst:94 +msgid "Append the string *s* to the MIME header." +msgstr "" + +#: library/email.header.rst:96 +msgid "" +"Optional *charset*, if given, should be a :class:`~email.charset.Charset` " +"instance (see :mod:`email.charset`) or the name of a character set, which " +"will be converted to a :class:`~email.charset.Charset` instance. A value of " +"``None`` (the default) means that the *charset* given in the constructor is " +"used." +msgstr "" + +#: library/email.header.rst:102 +msgid "" +"*s* may be an instance of :class:`bytes` or :class:`str`. If it is an " +"instance of :class:`bytes`, then *charset* is the encoding of that byte " +"string, and a :exc:`UnicodeError` will be raised if the string cannot be " +"decoded with that character set." +msgstr "" + +#: library/email.header.rst:107 +msgid "" +"If *s* is an instance of :class:`str`, then *charset* is a hint specifying " +"the character set of the characters in the string." +msgstr "" + +#: library/email.header.rst:110 +msgid "" +"In either case, when producing an :rfc:`2822`\\ -compliant header using :rfc:" +"`2047` rules, the string will be encoded using the output codec of the " +"charset. If the string cannot be encoded using the output codec, a " +"UnicodeError will be raised." +msgstr "" + +#: library/email.header.rst:115 +msgid "" +"Optional *errors* is passed as the errors argument to the decode call if *s* " +"is a byte string." +msgstr "" + +#: library/email.header.rst:121 +msgid "" +"Encode a message header into an RFC-compliant format, possibly wrapping long " +"lines and encapsulating non-ASCII parts in base64 or quoted-printable " +"encodings." +msgstr "" + +#: library/email.header.rst:125 +msgid "" +"Optional *splitchars* is a string containing characters which should be " +"given extra weight by the splitting algorithm during normal header " +"wrapping. This is in very rough support of :RFC:`2822`\\'s 'higher level " +"syntactic breaks': split points preceded by a splitchar are preferred " +"during line splitting, with the characters preferred in the order in which " +"they appear in the string. Space and tab may be included in the string to " +"indicate whether preference should be given to one over the other as a split " +"point when other split chars do not appear in the line being split. " +"Splitchars does not affect :RFC:`2047` encoded lines." +msgstr "" + +#: library/email.header.rst:135 +msgid "" +"*maxlinelen*, if given, overrides the instance's value for the maximum line " +"length." +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." +msgstr "" + +#: library/email.header.rst:143 +msgid "Added the *linesep* argument." +msgstr "" + +#: library/email.header.rst:147 +msgid "" +"The :class:`Header` class also provides a number of methods to support " +"standard operators and built-in functions." +msgstr "" + +#: library/email.header.rst:152 +msgid "" +"Returns an approximation of the :class:`Header` as a string, using an " +"unlimited line length. All pieces are converted to unicode using the " +"specified encoding and joined together appropriately. Any pieces with a " +"charset of ``'unknown-8bit'`` are decoded as ASCII using the ``'replace'`` " +"error handler." +msgstr "" + +#: library/email.header.rst:158 +msgid "Added handling for the ``'unknown-8bit'`` charset." +msgstr "" + +#: library/email.header.rst:164 +msgid "" +"This method allows you to compare two :class:`Header` instances for equality." +msgstr "" + +#: library/email.header.rst:170 +msgid "" +"This method allows you to compare two :class:`Header` instances for " +"inequality." +msgstr "" + +#: library/email.header.rst:173 +msgid "" +"The :mod:`email.header` module also provides the following convenient " +"functions." +msgstr "" + +#: library/email.header.rst:178 +msgid "" +"Decode a message header value without converting the character set. The " +"header value is in *header*." +msgstr "" + +#: library/email.header.rst:181 +msgid "" +"This function returns a list of ``(decoded_string, charset)`` pairs " +"containing each of the decoded parts of the header. *charset* is ``None`` " +"for non-encoded parts of the header, otherwise a lower case string " +"containing the name of the character set specified in the encoded string." +msgstr "" + +#: library/email.header.rst:186 +msgid "Here's an example::" +msgstr "" + +#: library/email.header.rst:195 +msgid "" +"Create a :class:`Header` instance from a sequence of pairs as returned by :" +"func:`decode_header`." +msgstr "" + +#: library/email.header.rst:198 +msgid "" +":func:`decode_header` takes a header value string and returns a sequence of " +"pairs of the format ``(decoded_string, charset)`` where *charset* is the " +"name of the character set." +msgstr "" + +#: library/email.header.rst:202 +msgid "" +"This function takes one of those sequence of pairs and returns a :class:" +"`Header` instance. Optional *maxlinelen*, *header_name*, and " +"*continuation_ws* are as in the :class:`Header` constructor." +msgstr "" diff --git a/library/email.headerregistry.po b/library/email.headerregistry.po new file mode 100644 index 0000000000..c5eeadd12d --- /dev/null +++ b/library/email.headerregistry.po @@ -0,0 +1,635 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-18 15:46+0200\n" +"PO-Revision-Date: 2019-09-06 13:49+0200\n" +"Last-Translator: FULL NAME \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" + +#: library/email.headerregistry.rst:2 +msgid ":mod:`email.headerregistry`: Custom Header Objects" +msgstr "" + +#: library/email.headerregistry.rst:10 +msgid "**Source code:** :source:`Lib/email/headerregistry.py`" +msgstr "" + +#: library/email.headerregistry.rst:14 +msgid "[1]_" +msgstr "" + +#: library/email.headerregistry.rst:16 +msgid "" +"Headers are represented by customized subclasses of :class:`str`. The " +"particular class used to represent a given header is determined by the :attr:" +"`~email.policy.EmailPolicy.header_factory` of the :mod:`~email.policy` in " +"effect when the headers are created. This section documents the particular " +"``header_factory`` implemented by the email package for handling :RFC:`5322` " +"compliant email messages, which not only provides customized header objects " +"for various header types, but also provides an extension mechanism for " +"applications to add their own custom header types." +msgstr "" + +#: library/email.headerregistry.rst:25 +msgid "" +"When using any of the policy objects derived from :data:`~email.policy." +"EmailPolicy`, all headers are produced by :class:`.HeaderRegistry` and have :" +"class:`.BaseHeader` as their last base class. Each header class has an " +"additional base class that is determined by the type of the header. For " +"example, many headers have the class :class:`.UnstructuredHeader` as their " +"other base class. The specialized second class for a header is determined " +"by the name of the header, using a lookup table stored in the :class:`." +"HeaderRegistry`. All of this is managed transparently for the typical " +"application program, but interfaces are provided for modifying the default " +"behavior for use by more complex applications." +msgstr "" + +#: library/email.headerregistry.rst:36 +msgid "" +"The sections below first document the header base classes and their " +"attributes, followed by the API for modifying the behavior of :class:`." +"HeaderRegistry`, and finally the support classes used to represent the data " +"parsed from structured headers." +msgstr "" + +#: library/email.headerregistry.rst:44 +msgid "" +"*name* and *value* are passed to ``BaseHeader`` from the :attr:`~email." +"policy.EmailPolicy.header_factory` call. The string value of any header " +"object is the *value* fully decoded to unicode." +msgstr "" + +#: library/email.headerregistry.rst:48 +msgid "This base class defines the following read-only properties:" +msgstr "" + +#: library/email.headerregistry.rst:53 +msgid "" +"The name of the header (the portion of the field before the ':'). This is " +"exactly the value passed in the :attr:`~email.policy.EmailPolicy." +"header_factory` call for *name*; that is, case is preserved." +msgstr "" + +#: library/email.headerregistry.rst:61 +msgid "" +"A tuple of :exc:`~email.errors.HeaderDefect` instances reporting any RFC " +"compliance problems found during parsing. The email package tries to be " +"complete about detecting compliance issues. See the :mod:`~email.errors` " +"module for a discussion of the types of defects that may be reported." +msgstr "" + +#: library/email.headerregistry.rst:69 +msgid "" +"The maximum number of headers of this type that can have the same ``name``. " +"A value of ``None`` means unlimited. The ``BaseHeader`` value for this " +"attribute is ``None``; it is expected that specialized header classes will " +"override this value as needed." +msgstr "" + +#: library/email.headerregistry.rst:74 +msgid "" +"``BaseHeader`` also provides the following method, which is called by the " +"email library code and should not in general be called by application " +"programs:" +msgstr "" + +#: library/email.headerregistry.rst:80 +msgid "" +"Return a string containing :attr:`~email.policy.Policy.linesep` characters " +"as required to correctly fold the header according to *policy*. A :attr:" +"`~email.policy.Policy.cte_type` of ``8bit`` will be treated as if it were " +"``7bit``, since headers may not contain arbitrary binary data. If :attr:" +"`~email.policy.EmailPolicy.utf8` is ``False``, non-ASCII data will be :rfc:" +"`2047` encoded." +msgstr "" + +#: library/email.headerregistry.rst:88 +msgid "" +"``BaseHeader`` by itself cannot be used to create a header object. It " +"defines a protocol that each specialized header cooperates with in order to " +"produce the header object. Specifically, ``BaseHeader`` requires that the " +"specialized class provide a :func:`classmethod` named ``parse``. This " +"method is called as follows::" +msgstr "" + +#: library/email.headerregistry.rst:96 +msgid "" +"``kwds`` is a dictionary containing one pre-initialized key, ``defects``. " +"``defects`` is an empty list. The parse method should append any detected " +"defects to this list. On return, the ``kwds`` dictionary *must* contain " +"values for at least the keys ``decoded`` and ``defects``. ``decoded`` " +"should be the string value for the header (that is, the header value fully " +"decoded to unicode). The parse method should assume that *string* may " +"contain content-transfer-encoded parts, but should correctly handle all " +"valid unicode characters as well so that it can parse un-encoded header " +"values." +msgstr "" + +#: library/email.headerregistry.rst:105 +msgid "" +"``BaseHeader``'s ``__new__`` then creates the header instance, and calls its " +"``init`` method. The specialized class only needs to provide an ``init`` " +"method if it wishes to set additional attributes beyond those provided by " +"``BaseHeader`` itself. Such an ``init`` method should look like this::" +msgstr "" + +#: library/email.headerregistry.rst:114 +msgid "" +"That is, anything extra that the specialized class puts in to the ``kwds`` " +"dictionary should be removed and handled, and the remaining contents of " +"``kw`` (and ``args``) passed to the ``BaseHeader`` ``init`` method." +msgstr "" + +#: library/email.headerregistry.rst:121 +msgid "" +"An \"unstructured\" header is the default type of header in :rfc:`5322`. Any " +"header that does not have a specified syntax is treated as unstructured. " +"The classic example of an unstructured header is the :mailheader:`Subject` " +"header." +msgstr "" + +#: library/email.headerregistry.rst:126 +msgid "" +"In :rfc:`5322`, an unstructured header is a run of arbitrary text in the " +"ASCII character set. :rfc:`2047`, however, has an :rfc:`5322` compatible " +"mechanism for encoding non-ASCII text as ASCII characters within a header " +"value. When a *value* containing encoded words is passed to the " +"constructor, the ``UnstructuredHeader`` parser converts such encoded words " +"into unicode, following the :rfc:`2047` rules for unstructured text. The " +"parser uses heuristics to attempt to decode certain non-compliant encoded " +"words. Defects are registered in such cases, as well as defects for issues " +"such as invalid characters within the encoded words or the non-encoded text." +msgstr "" + +#: library/email.headerregistry.rst:136 +msgid "This header type provides no additional attributes." +msgstr "" + +#: library/email.headerregistry.rst:141 +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\"." +msgstr "" + +#: library/email.headerregistry.rst:146 library/email.headerregistry.rst:188 +msgid "This header type provides the following additional attributes:" +msgstr "" + +#: library/email.headerregistry.rst:150 +msgid "" +"If the header value can be recognized as a valid date of one form or " +"another, this attribute will contain a :class:`~datetime.datetime` instance " +"representing that date. If the timezone of the input date is specified as " +"``-0000`` (indicating it is in UTC but contains no information about the " +"source timezone), then :attr:`.datetime` will be a naive :class:`~datetime." +"datetime`. If a specific timezone offset is found (including ``+0000``), " +"then :attr:`.datetime` will contain an aware ``datetime`` that uses :class:" +"`datetime.timezone` to record the timezone offset." +msgstr "" + +#: library/email.headerregistry.rst:160 +msgid "" +"The ``decoded`` value of the header is determined by formatting the " +"``datetime`` according to the :rfc:`5322` rules; that is, it is set to::" +msgstr "" + +#: library/email.headerregistry.rst:165 +msgid "" +"When creating a ``DateHeader``, *value* may be :class:`~datetime.datetime` " +"instance. This means, for example, that the following code is valid and " +"does what one would expect::" +msgstr "" + +#: library/email.headerregistry.rst:171 +msgid "" +"Because this is a naive ``datetime`` it will be interpreted as a UTC " +"timestamp, and the resulting value will have a timezone of ``-0000``. Much " +"more useful is to use the :func:`~email.utils.localtime` function from the :" +"mod:`~email.utils` module::" +msgstr "" + +#: library/email.headerregistry.rst:178 +msgid "" +"This example sets the date header to the current time and date using the " +"current timezone offset." +msgstr "" + +#: library/email.headerregistry.rst:184 +msgid "" +"Address headers are one of the most complex structured header types. The " +"``AddressHeader`` class provides a generic interface to any address header." +msgstr "" + +#: library/email.headerregistry.rst:193 +msgid "" +"A tuple of :class:`.Group` objects encoding the addresses and groups found " +"in the header value. Addresses that are not part of a group are represented " +"in this list as single-address ``Groups`` whose :attr:`~.Group.display_name` " +"is ``None``." +msgstr "" + +#: library/email.headerregistry.rst:201 +msgid "" +"A tuple of :class:`.Address` objects encoding all of the individual " +"addresses from the header value. If the header value contains any groups, " +"the individual addresses from the group are included in the list at the " +"point where the group occurs in the value (that is, the list of addresses is " +"\"flattened\" into a one dimensional list)." +msgstr "" + +#: library/email.headerregistry.rst:207 +msgid "" +"The ``decoded`` value of the header will have all encoded words decoded to " +"unicode. :class:`~encodings.idna` encoded domain names are also decoded to " +"unicode. The ``decoded`` value is set by :attr:`~str.join`\\ ing the :class:" +"`str` value of the elements of the ``groups`` attribute with ``', '``." +msgstr "" + +#: library/email.headerregistry.rst:213 +msgid "" +"A list of :class:`.Address` and :class:`.Group` objects in any combination " +"may be used to set the value of an address header. ``Group`` objects whose " +"``display_name`` is ``None`` will be interpreted as single addresses, which " +"allows an address list to be copied with groups intact by using the list " +"obtained from the ``groups`` attribute of the source header." +msgstr "" + +#: library/email.headerregistry.rst:222 +msgid "" +"A subclass of :class:`.AddressHeader` that adds one additional attribute:" +msgstr "" + +#: library/email.headerregistry.rst:228 +msgid "" +"The single address encoded by the header value. If the header value " +"actually contains more than one address (which would be a violation of the " +"RFC under the default :mod:`~email.policy`), accessing this attribute will " +"result in a :exc:`ValueError`." +msgstr "" + +#: library/email.headerregistry.rst:234 +msgid "" +"Many of the above classes also have a ``Unique`` variant (for example, " +"``UniqueUnstructuredHeader``). The only difference is that in the " +"``Unique`` variant, :attr:`~.BaseHeader.max_count` is set to 1." +msgstr "" + +#: library/email.headerregistry.rst:241 +msgid "" +"There is really only one valid value for the :mailheader:`MIME-Version` " +"header, and that is ``1.0``. For future proofing, this header class " +"supports other valid version numbers. If a version number has a valid value " +"per :rfc:`2045`, then the header object will have non-``None`` values for " +"the following attributes:" +msgstr "" + +#: library/email.headerregistry.rst:249 +msgid "" +"The version number as a string, with any whitespace and/or comments removed." +msgstr "" + +#: library/email.headerregistry.rst:254 +msgid "The major version number as an integer" +msgstr "" + +#: library/email.headerregistry.rst:258 +msgid "The minor version number as an integer" +msgstr "" + +#: library/email.headerregistry.rst:263 +msgid "" +"MIME headers all start with the prefix 'Content-'. Each specific header has " +"a certain value, described under the class for that header. Some can also " +"take a list of supplemental parameters, which have a common format. This " +"class serves as a base for all the MIME headers that take parameters." +msgstr "" + +#: library/email.headerregistry.rst:270 +msgid "A dictionary mapping parameter names to parameter values." +msgstr "" + +#: library/email.headerregistry.rst:275 +msgid "" +"A :class:`ParameterizedMIMEHeader` class that handles the :mailheader:" +"`Content-Type` header." +msgstr "" + +#: library/email.headerregistry.rst:280 +msgid "The content type string, in the form ``maintype/subtype``." +msgstr "" + +#: library/email.headerregistry.rst:289 +msgid "" +"A :class:`ParameterizedMIMEHeader` class that handles the :mailheader:" +"`Content-Disposition` header." +msgstr "" + +#: library/email.headerregistry.rst:294 +msgid "``inline`` and ``attachment`` are the only valid values in common use." +msgstr "" + +#: library/email.headerregistry.rst:299 +msgid "Handles the :mailheader:`Content-Transfer-Encoding` header." +msgstr "" + +#: library/email.headerregistry.rst:303 +msgid "" +"Valid values are ``7bit``, ``8bit``, ``base64``, and ``quoted-printable``. " +"See :rfc:`2045` for more information." +msgstr "" + +#: library/email.headerregistry.rst:312 +msgid "" +"This is the factory used by :class:`~email.policy.EmailPolicy` by default. " +"``HeaderRegistry`` builds the class used to create a header instance " +"dynamically, using *base_class* and a specialized class retrieved from a " +"registry that it holds. When a given header name does not appear in the " +"registry, the class specified by *default_class* is used as the specialized " +"class. When *use_default_map* is ``True`` (the default), the standard " +"mapping of header names to classes is copied in to the registry during " +"initialization. *base_class* is always the last class in the generated " +"class's ``__bases__`` list." +msgstr "" + +#: library/email.headerregistry.rst:322 +msgid "The default mappings are:" +msgstr "" + +#: library/email.headerregistry.rst:0 +msgid "subject" +msgstr "" + +#: library/email.headerregistry.rst:324 +msgid "UniqueUnstructuredHeader" +msgstr "UniqueUnstructuredHeader" + +#: library/email.headerregistry.rst:0 +msgid "date" +msgstr "" + +#: library/email.headerregistry.rst:325 library/email.headerregistry.rst:327 +msgid "UniqueDateHeader" +msgstr "UniqueDateHeader" + +#: library/email.headerregistry.rst:0 +msgid "resent-date" +msgstr "" + +#: library/email.headerregistry.rst:326 +msgid "DateHeader" +msgstr "DateHeader" + +#: library/email.headerregistry.rst:0 +msgid "orig-date" +msgstr "" + +#: library/email.headerregistry.rst:0 +msgid "sender" +msgstr "" + +#: library/email.headerregistry.rst:328 +msgid "UniqueSingleAddressHeader" +msgstr "UniqueSingleAddressHeader" + +#: library/email.headerregistry.rst:0 +msgid "resent-sender" +msgstr "" + +#: library/email.headerregistry.rst:329 +msgid "SingleAddressHeader" +msgstr "SingleAddressHeader" + +#: library/email.headerregistry.rst:0 +msgid "to" +msgstr "" + +#: library/email.headerregistry.rst:330 library/email.headerregistry.rst:332 +#: library/email.headerregistry.rst:334 library/email.headerregistry.rst:336 +#: library/email.headerregistry.rst:338 +msgid "UniqueAddressHeader" +msgstr "UniqueAddressHeader" + +#: library/email.headerregistry.rst:0 +msgid "resent-to" +msgstr "" + +#: library/email.headerregistry.rst:331 library/email.headerregistry.rst:333 +#: library/email.headerregistry.rst:335 library/email.headerregistry.rst:337 +msgid "AddressHeader" +msgstr "AddressHeader" + +#: library/email.headerregistry.rst:0 +msgid "cc" +msgstr "" + +#: library/email.headerregistry.rst:0 +msgid "resent-cc" +msgstr "" + +#: library/email.headerregistry.rst:0 +msgid "bcc" +msgstr "" + +#: library/email.headerregistry.rst:0 +msgid "resent-bcc" +msgstr "" + +#: library/email.headerregistry.rst:0 +msgid "from" +msgstr "" + +#: library/email.headerregistry.rst:0 +msgid "resent-from" +msgstr "" + +#: library/email.headerregistry.rst:0 +msgid "reply-to" +msgstr "" + +#: library/email.headerregistry.rst:0 +msgid "mime-version" +msgstr "" + +#: library/email.headerregistry.rst:339 +msgid "MIMEVersionHeader" +msgstr "" + +#: library/email.headerregistry.rst:0 +msgid "content-type" +msgstr "" + +#: library/email.headerregistry.rst:340 +msgid "ContentTypeHeader" +msgstr "ContentTypeHeader" + +#: library/email.headerregistry.rst:0 +msgid "content-disposition" +msgstr "" + +#: library/email.headerregistry.rst:341 +msgid "ContentDispositionHeader" +msgstr "" + +#: library/email.headerregistry.rst:0 +msgid "content-transfer-encoding" +msgstr "" + +#: library/email.headerregistry.rst:342 +msgid "ContentTransferEncodingHeader" +msgstr "" + +#: library/email.headerregistry.rst:0 +msgid "message-id" +msgstr "" + +#: library/email.headerregistry.rst:343 +msgid "MessageIDHeader" +msgstr "MessageIDHeader" + +#: library/email.headerregistry.rst:345 +msgid "``HeaderRegistry`` has the following methods:" +msgstr "" + +#: library/email.headerregistry.rst:350 +msgid "" +"*name* is the name of the header to be mapped. It will be converted to " +"lower case in the registry. *cls* is the specialized class to be used, " +"along with *base_class*, to create the class used to instantiate headers " +"that match *name*." +msgstr "" + +#: library/email.headerregistry.rst:358 +msgid "Construct and return a class to handle creating a *name* header." +msgstr "" + +#: library/email.headerregistry.rst:363 +msgid "" +"Retrieves the specialized header associated with *name* from the registry " +"(using *default_class* if *name* does not appear in the registry) and " +"composes it with *base_class* to produce a class, calls the constructed " +"class's constructor, passing it the same argument list, and finally returns " +"the class instance created thereby." +msgstr "" + +#: library/email.headerregistry.rst:370 +msgid "" +"The following classes are the classes used to represent data parsed from " +"structured headers and can, in general, be used by an application program to " +"construct structured values to assign to specific headers." +msgstr "" + +#: library/email.headerregistry.rst:377 +msgid "" +"The class used to represent an email address. The general form of an " +"address is::" +msgstr "" + +#: library/email.headerregistry.rst:382 +msgid "or::" +msgstr "ou ::" + +#: library/email.headerregistry.rst:386 +msgid "" +"where each part must conform to specific syntax rules spelled out in :rfc:" +"`5322`." +msgstr "" + +#: library/email.headerregistry.rst:389 +msgid "" +"As a convenience *addr_spec* can be specified instead of *username* and " +"*domain*, in which case *username* and *domain* will be parsed from the " +"*addr_spec*. An *addr_spec* must be a properly RFC quoted string; if it is " +"not ``Address`` will raise an error. Unicode characters are allowed and " +"will be property encoded when serialized. However, per the RFCs, unicode is " +"*not* allowed in the username portion of the address." +msgstr "" + +#: library/email.headerregistry.rst:398 +msgid "" +"The display name portion of the address, if any, with all quoting removed. " +"If the address does not have a display name, this attribute will be an empty " +"string." +msgstr "" + +#: library/email.headerregistry.rst:404 +msgid "The ``username`` portion of the address, with all quoting removed." +msgstr "" + +#: library/email.headerregistry.rst:408 +msgid "The ``domain`` portion of the address." +msgstr "" + +#: library/email.headerregistry.rst:412 +msgid "" +"The ``username@domain`` portion of the address, correctly quoted for use as " +"a bare address (the second form shown above). This attribute is not mutable." +msgstr "" + +#: library/email.headerregistry.rst:418 +msgid "" +"The ``str`` value of the object is the address quoted according to :rfc:" +"`5322` rules, but with no Content Transfer Encoding of any non-ASCII " +"characters." +msgstr "" + +#: library/email.headerregistry.rst:422 +msgid "" +"To support SMTP (:rfc:`5321`), ``Address`` handles one special case: if " +"``username`` and ``domain`` are both the empty string (or ``None``), then " +"the string value of the ``Address`` is ``<>``." +msgstr "" + +#: library/email.headerregistry.rst:429 +msgid "" +"The class used to represent an address group. The general form of an " +"address group is::" +msgstr "" + +#: library/email.headerregistry.rst:434 +msgid "" +"As a convenience for processing lists of addresses that consist of a mixture " +"of groups and single addresses, a ``Group`` may also be used to represent " +"single addresses that are not part of a group by setting *display_name* to " +"``None`` and providing a list of the single address as *addresses*." +msgstr "" + +#: library/email.headerregistry.rst:441 +msgid "" +"The ``display_name`` of the group. If it is ``None`` and there is exactly " +"one ``Address`` in ``addresses``, then the ``Group`` represents a single " +"address that is not in a group." +msgstr "" + +#: library/email.headerregistry.rst:447 +msgid "" +"A possibly empty tuple of :class:`.Address` objects representing the " +"addresses in the group." +msgstr "" + +#: library/email.headerregistry.rst:452 +msgid "" +"The ``str`` value of a ``Group`` is formatted according to :rfc:`5322`, but " +"with no Content Transfer Encoding of any non-ASCII characters. If " +"``display_name`` is none and there is a single ``Address`` in the " +"``addresses`` list, the ``str`` value will be the same as the ``str`` of " +"that single ``Address``." +msgstr "" + +#: library/email.headerregistry.rst:460 +msgid "Footnotes" +msgstr "Notes" + +#: library/email.headerregistry.rst:461 +msgid "" +"Originally added in 3.3 as a :term:`provisional module `" +msgstr "" diff --git a/library/email.iterators.po b/library/email.iterators.po new file mode 100644 index 0000000000..e7f887ec2f --- /dev/null +++ b/library/email.iterators.po @@ -0,0 +1,117 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +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-06-20 19:13+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.0.5\n" + +#: library/email.iterators.rst:2 +msgid ":mod:`email.iterators`: Iterators" +msgstr ":mod:`email.iterators`: Itérateurs" + +#: library/email.iterators.rst:7 +msgid "**Source code:** :source:`Lib/email/iterators.py`" +msgstr "**Code source :** :source:`Lib/email/iterators.py`" + +#: library/email.iterators.rst:11 +msgid "" +"Iterating over a message object tree is fairly easy with the :meth:`Message." +"walk ` method. The :mod:`email.iterators` " +"module provides some useful higher level iterations over message object " +"trees." +msgstr "" +"Itérer sur l'arborescence d'un objet message est plutôt simple avec la " +"méthode :meth:`Message.walk `. Le module :mod:" +"`email.iterators` fournit des fonctionnalités d'itérations de plus haut " +"niveau sur les arbres d'objets messages." + +#: library/email.iterators.rst:19 +msgid "" +"This iterates over all the payloads in all the subparts of *msg*, returning " +"the string payloads line-by-line. It skips over all the subpart headers, " +"and it skips over any subpart with a payload that isn't a Python string. " +"This is somewhat equivalent to reading the flat text representation of the " +"message from a file using :meth:`~io.TextIOBase.readline`, skipping over all " +"the intervening headers." +msgstr "" +"Cette fonction permet d'itérer sur tous les contenus de tous les éléments de " +"*msg*, en retournant les contenus sous forme de chaînes de caractères ligne " +"par ligne. Il saute les entêtes des sous éléments, et tous les sous éléments " +"dont le contenu n'est pas une chaîne de caractères Python. C'est en quelque " +"sorte équivalent à une lecture plate d'une représentation textuelle du " +"message à partir d'un fichier en utilisant :meth:`~io.TextIOBase.readline`, " +"et en sautant toutes les entêtes intermédiaires." + +#: library/email.iterators.rst:26 +msgid "" +"Optional *decode* is passed through to :meth:`Message.get_payload `." +msgstr "" +"Le paramètre optionnel *decode* est transmis à la méthode :meth:`Message." +"get_payload `." + +#: library/email.iterators.rst:32 +msgid "" +"This iterates over all the subparts of *msg*, returning only those subparts " +"that match the MIME type specified by *maintype* and *subtype*." +msgstr "" +"Cette fonction permet d'itérer sur tous les sous éléments de *msg*, en " +"retournant seulement les sous éléments qui correspondent au type MIME " +"spécifié par *maintype* et *subtype*." + +#: library/email.iterators.rst:35 +msgid "" +"Note that *subtype* is optional; if omitted, then subpart MIME type matching " +"is done only with the main type. *maintype* is optional too; it defaults " +"to :mimetype:`text`." +msgstr "" +"Notez que le paramètre *subtype* est optionnel ; s'il n'est pas présent, " +"alors le type MIME du sous élément est seulement composé du type principal. " +"*maintype* est également optionnel ; sa valeur par défaut est :mimetype:" +"`text`." + +#: library/email.iterators.rst:39 +msgid "" +"Thus, by default :func:`typed_subpart_iterator` returns each subpart that " +"has a MIME type of :mimetype:`text/\\*`." +msgstr "" +"En conséquence, par défaut, :func:`typed_subpart_iterator` retourne chaque " +"sous élément qui a un type MIME de type :mimetype:`text/\\*`." + +#: library/email.iterators.rst:43 +msgid "" +"The following function has been added as a useful debugging tool. It should " +"*not* be considered part of the supported public interface for the package." +msgstr "" +"La fonction suivante a été ajouté en tant qu'un outil de débogage. Elle *ne " +"devrait pas* être considérée comme une interface publique supportée pour ce " +"paquet." + +#: library/email.iterators.rst:48 +msgid "" +"Prints an indented representation of the content types of the message object " +"structure. For example:" +msgstr "" +"Affiche une représentation indentée des types de contenu de la structure de " +"l'objet message. Par exemple :" + +#: library/email.iterators.rst:81 +msgid "" +"Optional *fp* is a file-like object to print the output to. It must be " +"suitable for Python's :func:`print` function. *level* is used internally. " +"*include_default*, if true, prints the default type as well." +msgstr "" +"Le paramètre optionnel *fp* est un objet fichier-compatible dans lequel on " +"peut écrire le flux de sortie. Il doit être approprié pour la fonction de " +"Python :func:`print`. *level* est utilisé en interne. *include_default*, si " +"vrai, affiche aussi le type par défaut." diff --git a/library/email.message.po b/library/email.message.po new file mode 100644 index 0000000000..90c75ed4e4 --- /dev/null +++ b/library/email.message.po @@ -0,0 +1,817 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +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" +"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" + +#: library/email.message.rst:2 +msgid ":mod:`email.message`: Representing an email message" +msgstr "" + +#: library/email.message.rst:10 +#, fuzzy +msgid "**Source code:** :source:`Lib/email/message.py`" +msgstr "**Code source :** :source:`Lib/email/parser.py`" + +#: library/email.message.rst:14 +msgid "[1]_" +msgstr "" + +#: library/email.message.rst:16 +msgid "" +"The central class in the :mod:`email` package is the :class:`EmailMessage` " +"class, imported from the :mod:`email.message` module. It is the base class " +"for the :mod:`email` object model. :class:`EmailMessage` provides the core " +"functionality for setting and querying header fields, for accessing message " +"bodies, and for creating or modifying structured messages." +msgstr "" + +#: library/email.message.rst:22 +msgid "" +"An email message consists of *headers* and a *payload* (which is also " +"referred to as the *content*). Headers are :rfc:`5322` or :rfc:`6532` style " +"field 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 and " +"their own payload. The latter type of payload is indicated by the message " +"having a MIME type such as :mimetype:`multipart/\\*` or :mimetype:`message/" +"rfc822`." +msgstr "" + +#: library/email.message.rst:31 +msgid "" +"The conceptual model provided by an :class:`EmailMessage` object is that of " +"an ordered dictionary of headers coupled with a *payload* that represents " +"the :rfc:`5322` body of the message, which might be a list of sub-" +"``EmailMessage`` objects. In addition to the normal dictionary methods for " +"accessing the header names and values, there are methods for accessing " +"specialized information from the headers (for example the MIME content " +"type), for operating on the payload, for generating a serialized version of " +"the message, and for recursively walking over the object tree." +msgstr "" + +#: library/email.message.rst:40 +msgid "" +"The :class:`EmailMessage` dictionary-like interface is indexed by the header " +"names, which must be ASCII values. The values of the dictionary are strings " +"with some extra methods. Headers are stored and returned in case-preserving " +"form, but field names are matched case-insensitively. Unlike a real dict, " +"there is an ordering to the keys, and there can be duplicate keys. " +"Additional methods are provided for working with headers that have duplicate " +"keys." +msgstr "" + +#: library/email.message.rst:47 +msgid "" +"The *payload* is either a string or bytes object, in the case of simple " +"message objects, or a list of :class:`EmailMessage` objects, for MIME " +"container documents such as :mimetype:`multipart/\\*` and :mimetype:`message/" +"rfc822` message objects." +msgstr "" + +#: library/email.message.rst:55 +msgid "" +"If *policy* is specified use the rules it specifies to update and serialize " +"the representation of the message. If *policy* is not set, use the :class:" +"`~email.policy.default` policy, which follows the rules of the email RFCs " +"except for line endings (instead of the RFC mandated ``\\r\\n``, it uses the " +"Python standard ``\\n`` line endings). For more information see the :mod:" +"`~email.policy` documentation." +msgstr "" + +#: library/email.message.rst:64 +msgid "" +"Return the entire message flattened as a string. When optional *unixfrom* " +"is true, the envelope header is included in the returned string. *unixfrom* " +"defaults to ``False``. For backward compatibility with the base :class:" +"`~email.message.Message` class *maxheaderlen* is accepted, but defaults to " +"``None``, which means that by default the line length is controlled by the :" +"attr:`~email.policy.EmailPolicy.max_line_length` of the policy. The " +"*policy* argument may be used to override the default policy obtained from " +"the message instance. This can be used to control some of the formatting " +"produced by the method, since the specified *policy* will be passed to the :" +"class:`~email.generator.Generator`." +msgstr "" + +#: library/email.message.rst:114 +msgid "" +"Flattening the message may trigger changes to the :class:`EmailMessage` if " +"defaults need to be filled in to complete the transformation to a string " +"(for example, MIME boundaries may be generated or modified)." +msgstr "" + +#: library/email.message.rst:80 +msgid "" +"Note that this method is provided as a convenience and may not be the most " +"useful way to serialize messages in your application, especially if you are " +"dealing with multiple messages. See :class:`email.generator.Generator` for " +"a more flexible API for serializing messages. Note also that this method is " +"restricted to producing messages serialized as \"7 bit clean\" when :attr:" +"`~email.policy.EmailPolicy.utf8` is ``False``, which is the default." +msgstr "" + +#: library/email.message.rst:88 +msgid "" +"the default behavior when *maxheaderlen* is not specified was changed from " +"defaulting to 0 to defaulting to the value of *max_line_length* from the " +"policy." +msgstr "" + +#: library/email.message.rst:95 +msgid "" +"Equivalent to ``as_string(policy=self.policy.clone(utf8=True))``. Allows " +"``str(msg)`` to produce a string containing the serialized message in a " +"readable format." +msgstr "" + +#: library/email.message.rst:99 +msgid "" +"the method was changed to use ``utf8=True``, thus producing an :rfc:`6531`-" +"like message representation, instead of being a direct alias for :meth:" +"`as_string`." +msgstr "" + +#: library/email.message.rst:106 +msgid "" +"Return the entire message flattened as a bytes object. When optional " +"*unixfrom* is true, the envelope header is included in the returned string. " +"*unixfrom* defaults to ``False``. The *policy* argument may be used to " +"override the default policy obtained from the message instance. This can be " +"used to control some of the formatting produced by the method, since the " +"specified *policy* will be passed to the :class:`~email.generator." +"BytesGenerator`." +msgstr "" + +#: library/email.message.rst:118 +msgid "" +"Note that this method is provided as a convenience and may not be the most " +"useful way to serialize messages in your application, especially if you are " +"dealing with multiple messages. See :class:`email.generator.BytesGenerator` " +"for a more flexible API for serializing messages." +msgstr "" + +#: library/email.message.rst:127 +msgid "" +"Equivalent to :meth:`.as_bytes()`. Allows ``bytes(msg)`` to produce a bytes " +"object containing the serialized message." +msgstr "" + +#: library/email.message.rst:133 +msgid "" +"Return ``True`` if the message's payload is a list of sub-\\ :class:" +"`EmailMessage` objects, otherwise return ``False``. When :meth:" +"`is_multipart` returns ``False``, the payload should be a string object " +"(which might be a CTE encoded binary payload). Note that :meth:" +"`is_multipart` returning ``True`` does not necessarily mean that \"msg." +"get_content_maintype() == 'multipart'\" will return the ``True``. For " +"example, ``is_multipart`` will return ``True`` when the :class:" +"`EmailMessage` is of type ``message/rfc822``." +msgstr "" + +#: library/email.message.rst:145 +msgid "" +"Set the message's envelope header to *unixfrom*, which should be a string. " +"(See :class:`~mailbox.mboxMessage` for a brief description of this header.)" +msgstr "" + +#: library/email.message.rst:152 +msgid "" +"Return the message's envelope header. Defaults to ``None`` if the envelope " +"header was never set." +msgstr "" + +#: library/email.message.rst:156 +msgid "" +"The following methods implement the mapping-like interface for accessing the " +"message's headers. Note that there are some semantic differences between " +"these methods and a normal mapping (i.e. dictionary) interface. For " +"example, in a dictionary there are no duplicate keys, but here there may be " +"duplicate message headers. Also, in dictionaries there is no guaranteed " +"order to the keys returned by :meth:`keys`, but in an :class:`EmailMessage` " +"object, headers are always returned in the order they appeared in the " +"original message, or in which they were added to the message later. Any " +"header deleted and then re-added is always appended to the end of the header " +"list." +msgstr "" + +#: library/email.message.rst:167 +msgid "" +"These semantic differences are intentional and are biased toward convenience " +"in the most common use cases." +msgstr "" + +#: library/email.message.rst:170 +msgid "" +"Note that in all cases, any envelope header present in the message is not " +"included in the mapping interface." +msgstr "" + +#: library/email.message.rst:176 +msgid "Return the total number of headers, including duplicates." +msgstr "" + +#: library/email.message.rst:181 +msgid "" +"Return ``True`` if the message object has a field named *name*. Matching is " +"done without regard to case and *name* does not include the trailing colon. " +"Used for the ``in`` operator. For example::" +msgstr "" + +#: library/email.message.rst:191 +msgid "" +"Return the value of the named header field. *name* does not include the " +"colon field separator. If the header is missing, ``None`` is returned; a :" +"exc:`KeyError` is never raised." +msgstr "" + +#: library/email.message.rst:195 +msgid "" +"Note that if the named field appears more than once in the message's " +"headers, exactly which of those field values will be returned is undefined. " +"Use the :meth:`get_all` method to get the values of all the extant headers " +"named *name*." +msgstr "" + +#: library/email.message.rst:200 +msgid "" +"Using the standard (non-``compat32``) policies, the returned value is an " +"instance of a subclass of :class:`email.headerregistry.BaseHeader`." +msgstr "" + +#: library/email.message.rst:206 +msgid "" +"Add a header to the message with field name *name* and value *val*. The " +"field is appended to the end of the message's existing headers." +msgstr "" + +#: library/email.message.rst:209 +msgid "" +"Note that this does *not* overwrite or delete any existing header with the " +"same name. If you want to ensure that the new header is the only one " +"present in the message with field name *name*, delete the field first, e.g.::" +msgstr "" + +#: library/email.message.rst:216 +msgid "" +"If the :mod:`policy` defines certain headers to be unique (as the standard " +"policies do), this method may raise a :exc:`ValueError` when an attempt is " +"made to assign a value to such a header when one already exists. This " +"behavior is intentional for consistency's sake, but do not depend on it as " +"we may choose to make such assignments do an automatic deletion of the " +"existing header in the future." +msgstr "" + +#: library/email.message.rst:226 +msgid "" +"Delete all occurrences of the field with name *name* from the message's " +"headers. No exception is raised if the named field isn't present in the " +"headers." +msgstr "" + +#: library/email.message.rst:233 +msgid "Return a list of all the message's header field names." +msgstr "" + +#: library/email.message.rst:238 +msgid "Return a list of all the message's field values." +msgstr "" + +#: library/email.message.rst:243 +msgid "" +"Return a list of 2-tuples containing all the message's field headers and " +"values." +msgstr "" + +#: library/email.message.rst:249 +msgid "" +"Return the value of the named header field. This is identical to :meth:" +"`__getitem__` except that optional *failobj* is returned if the named header " +"is missing (*failobj* defaults to ``None``)." +msgstr "" + +#: library/email.message.rst:254 +msgid "Here are some additional useful header related methods:" +msgstr "" + +#: library/email.message.rst:259 +msgid "" +"Return a list of all the values for the field named *name*. If there are no " +"such named headers in the message, *failobj* is returned (defaults to " +"``None``)." +msgstr "" + +#: library/email.message.rst:266 +msgid "" +"Extended header setting. This method is similar to :meth:`__setitem__` " +"except that additional header parameters can be provided as keyword " +"arguments. *_name* is the header field to add and *_value* is the *primary* " +"value for the header." +msgstr "" + +#: library/email.message.rst:271 +msgid "" +"For each item in the keyword argument dictionary *_params*, the key is taken " +"as the parameter name, with underscores converted to dashes (since dashes " +"are illegal in Python identifiers). Normally, the parameter will be added " +"as ``key=\"value\"`` unless the value is ``None``, in which case only the " +"key will be added." +msgstr "" + +#: library/email.message.rst:277 +msgid "" +"If the value contains non-ASCII characters, the charset and language may be " +"explicitly controlled by specifying the value as a three tuple in the format " +"``(CHARSET, LANGUAGE, VALUE)``, where ``CHARSET`` is a string naming the " +"charset to be used to encode the value, ``LANGUAGE`` can usually be set to " +"``None`` or the empty string (see :rfc:`2231` for other possibilities), and " +"``VALUE`` is the string value containing non-ASCII code points. If a three " +"tuple is not passed and the value contains non-ASCII characters, it is " +"automatically encoded in :rfc:`2231` format using a ``CHARSET`` of ``utf-8`` " +"and a ``LANGUAGE`` of ``None``." +msgstr "" + +#: library/email.message.rst:287 +msgid "Here is an example::" +msgstr "Voici un exemple ::" + +#: library/email.message.rst:291 +msgid "This will add a header that looks like ::" +msgstr "" + +#: library/email.message.rst:295 +msgid "An example of the extended interface with non-ASCII characters::" +msgstr "" + +#: library/email.message.rst:303 +msgid "" +"Replace a header. Replace the first header found in the message that " +"matches *_name*, retaining header order and field name case of the original " +"header. If no matching header is found, raise a :exc:`KeyError`." +msgstr "" + +#: library/email.message.rst:311 +msgid "" +"Return the message's content type, coerced to lower case of the form :" +"mimetype:`maintype/subtype`. If there is no :mailheader:`Content-Type` " +"header in the message return the value returned by :meth:" +"`get_default_type`. If the :mailheader:`Content-Type` header is invalid, " +"return ``text/plain``." +msgstr "" + +#: library/email.message.rst:317 +msgid "" +"(According to :rfc:`2045`, messages always have a default type, :meth:" +"`get_content_type` will always return a value. :rfc:`2045` defines a " +"message's default type to be :mimetype:`text/plain` unless it appears inside " +"a :mimetype:`multipart/digest` container, in which case it would be :" +"mimetype:`message/rfc822`. If the :mailheader:`Content-Type` header has an " +"invalid type specification, :rfc:`2045` mandates that the default type be :" +"mimetype:`text/plain`.)" +msgstr "" + +#: library/email.message.rst:328 +msgid "" +"Return the message's main content type. This is the :mimetype:`maintype` " +"part of the string returned by :meth:`get_content_type`." +msgstr "" + +#: library/email.message.rst:334 +msgid "" +"Return the message's sub-content type. This is the :mimetype:`subtype` part " +"of the string returned by :meth:`get_content_type`." +msgstr "" + +#: library/email.message.rst:340 +msgid "" +"Return the default content type. Most messages have a default content type " +"of :mimetype:`text/plain`, except for messages that are subparts of :" +"mimetype:`multipart/digest` containers. Such subparts have a default " +"content type of :mimetype:`message/rfc822`." +msgstr "" + +#: library/email.message.rst:348 +msgid "" +"Set the default content type. *ctype* should either be :mimetype:`text/" +"plain` or :mimetype:`message/rfc822`, although this is not enforced. The " +"default content type is not stored in the :mailheader:`Content-Type` header, " +"so it only affects the return value of the ``get_content_type`` methods when " +"no :mailheader:`Content-Type` header is present in the message." +msgstr "" + +#: library/email.message.rst:359 +msgid "" +"Set a parameter in the :mailheader:`Content-Type` header. If the parameter " +"already exists in the header, replace its value with *value*. When *header* " +"is ``Content-Type`` (the default) and the header does not yet exist in the " +"message, add it, set its value to :mimetype:`text/plain`, and append the new " +"parameter value. Optional *header* specifies an alternative header to :" +"mailheader:`Content-Type`." +msgstr "" + +#: library/email.message.rst:366 +msgid "" +"If the value contains non-ASCII characters, the charset and language may be " +"explicitly specified using the optional *charset* and *language* " +"parameters. Optional *language* specifies the :rfc:`2231` language, " +"defaulting to the empty string. Both *charset* and *language* should be " +"strings. The default is to use the ``utf8`` *charset* and ``None`` for the " +"*language*." +msgstr "" + +#: library/email.message.rst:373 +msgid "" +"If *replace* is ``False`` (the default) the header is moved to the end of " +"the list of headers. If *replace* is ``True``, the header will be updated " +"in place." +msgstr "" + +#: library/email.message.rst:394 +msgid "" +"Use of the *requote* parameter with :class:`EmailMessage` objects is " +"deprecated." +msgstr "" + +#: library/email.message.rst:380 +msgid "" +"Note that existing parameter values of headers may be accessed through the :" +"attr:`~email.headerregistry.BaseHeader.params` attribute of the header value " +"(for example, ``msg['Content-Type'].params['charset']``)." +msgstr "" + +#: library/email.message.rst:384 +msgid "``replace`` keyword was added." +msgstr "" + +#: library/email.message.rst:389 +msgid "" +"Remove the given parameter completely from the :mailheader:`Content-Type` " +"header. The header will be re-written in place without the parameter or its " +"value. Optional *header* specifies an alternative to :mailheader:`Content-" +"Type`." +msgstr "" + +#: library/email.message.rst:400 +msgid "" +"Return the value of the ``filename`` parameter of the :mailheader:`Content-" +"Disposition` header of the message. If the header does not have a " +"``filename`` parameter, this method falls back to looking for the ``name`` " +"parameter on the :mailheader:`Content-Type` header. If neither is found, or " +"the header is missing, then *failobj* is returned. The returned string will " +"always be unquoted as per :func:`email.utils.unquote`." +msgstr "" + +#: library/email.message.rst:411 +msgid "" +"Return the value of the ``boundary`` parameter of the :mailheader:`Content-" +"Type` header of the message, or *failobj* if either the header is missing, " +"or has no ``boundary`` parameter. The returned string will always be " +"unquoted as per :func:`email.utils.unquote`." +msgstr "" + +#: library/email.message.rst:419 +msgid "" +"Set the ``boundary`` parameter of the :mailheader:`Content-Type` header to " +"*boundary*. :meth:`set_boundary` will always quote *boundary* if " +"necessary. A :exc:`~email.errors.HeaderParseError` is raised if the message " +"object has no :mailheader:`Content-Type` header." +msgstr "" + +#: library/email.message.rst:424 +msgid "" +"Note that using this method is subtly different from deleting the old :" +"mailheader:`Content-Type` header and adding a new one with the new boundary " +"via :meth:`add_header`, because :meth:`set_boundary` preserves the order of " +"the :mailheader:`Content-Type` header in the list of headers." +msgstr "" + +#: library/email.message.rst:433 +msgid "" +"Return the ``charset`` parameter of the :mailheader:`Content-Type` header, " +"coerced to lower case. If there is no :mailheader:`Content-Type` header, or " +"if that header has no ``charset`` parameter, *failobj* is returned." +msgstr "" + +#: library/email.message.rst:440 +msgid "" +"Return a list containing the character set names in the message. If the " +"message is a :mimetype:`multipart`, then the list will contain one element " +"for each subpart in the payload, otherwise, it will be a list of length 1." +msgstr "" + +#: library/email.message.rst:444 +msgid "" +"Each item in the list will be a string which is the value of the ``charset`` " +"parameter in the :mailheader:`Content-Type` header for the represented " +"subpart. If the subpart has no :mailheader:`Content-Type` header, no " +"``charset`` parameter, or is not of the :mimetype:`text` main MIME type, " +"then that item in the returned list will be *failobj*." +msgstr "" + +#: library/email.message.rst:453 +msgid "" +"Return ``True`` if there is a :mailheader:`Content-Disposition` header and " +"its (case insensitive) value is ``attachment``, ``False`` otherwise." +msgstr "" + +#: library/email.message.rst:456 +msgid "" +"is_attachment is now a method instead of a property, for consistency with :" +"meth:`~email.message.Message.is_multipart`." +msgstr "" + +#: library/email.message.rst:463 +msgid "" +"Return the lowercased value (without parameters) of the message's :" +"mailheader:`Content-Disposition` header if it has one, or ``None``. The " +"possible values for this method are *inline*, *attachment* or ``None`` if " +"the message follows :rfc:`2183`." +msgstr "" + +#: library/email.message.rst:471 +msgid "" +"The following methods relate to interrogating and manipulating the content " +"(payload) of the message." +msgstr "" + +#: library/email.message.rst:477 +msgid "" +"The :meth:`walk` method is an all-purpose generator which can be used to " +"iterate over all the parts and subparts of a message object tree, in depth-" +"first traversal order. You will typically use :meth:`walk` as the iterator " +"in a ``for`` loop; each iteration returns the next subpart." +msgstr "" + +#: library/email.message.rst:482 +msgid "" +"Here's an example that prints the MIME type of every part of a multipart " +"message structure:" +msgstr "" + +#: library/email.message.rst:503 +msgid "" +"``walk`` iterates over the subparts of any part where :meth:`is_multipart` " +"returns ``True``, even though ``msg.get_content_maintype() == 'multipart'`` " +"may return ``False``. We can see this in our example by making use of the " +"``_structure`` debug helper function:" +msgstr "" + +#: library/email.message.rst:531 +msgid "" +"Here the ``message`` parts are not ``multiparts``, but they do contain " +"subparts. ``is_multipart()`` returns ``True`` and ``walk`` descends into the " +"subparts." +msgstr "" + +#: library/email.message.rst:538 +msgid "" +"Return the MIME part that is the best candidate to be the \"body\" of the " +"message." +msgstr "" + +#: library/email.message.rst:541 +msgid "" +"*preferencelist* must be a sequence of strings from the set ``related``, " +"``html``, and ``plain``, and indicates the order of preference for the " +"content type of the part returned." +msgstr "" + +#: library/email.message.rst:545 +msgid "" +"Start looking for candidate matches with the object on which the " +"``get_body`` method is called." +msgstr "" + +#: library/email.message.rst:548 +msgid "" +"If ``related`` is not included in *preferencelist*, consider the root part " +"(or subpart of the root part) of any related encountered as a candidate if " +"the (sub-)part matches a preference." +msgstr "" + +#: library/email.message.rst:552 +msgid "" +"When encountering a ``multipart/related``, check the ``start`` parameter and " +"if a part with a matching :mailheader:`Content-ID` is found, consider only " +"it when looking for candidate matches. Otherwise consider only the first " +"(default root) part of the ``multipart/related``." +msgstr "" + +#: library/email.message.rst:557 +msgid "" +"If a part has a :mailheader:`Content-Disposition` header, only consider the " +"part a candidate match if the value of the header is ``inline``." +msgstr "" + +#: library/email.message.rst:560 +msgid "" +"If none of the candidates matches any of the preferences in " +"*preferencelist*, return ``None``." +msgstr "" + +#: library/email.message.rst:563 +msgid "" +"Notes: (1) For most applications the only *preferencelist* combinations that " +"really make sense are ``('plain',)``, ``('html', 'plain')``, and the default " +"``('related', 'html', 'plain')``. (2) Because matching starts with the " +"object on which ``get_body`` is called, calling ``get_body`` on a " +"``multipart/related`` will return the object itself unless *preferencelist* " +"has a non-default value. (3) Messages (or message parts) that do not specify " +"a :mailheader:`Content-Type` or whose :mailheader:`Content-Type` header is " +"invalid will be treated as if they are of type ``text/plain``, which may " +"occasionally cause ``get_body`` to return unexpected results." +msgstr "" + +#: library/email.message.rst:577 +msgid "" +"Return an iterator over all of the immediate sub-parts of the message that " +"are not candidate \"body\" parts. That is, skip the first occurrence of " +"each of ``text/plain``, ``text/html``, ``multipart/related``, or ``multipart/" +"alternative`` (unless they are explicitly marked as attachments via :" +"mailheader:`Content-Disposition: attachment`), and return all remaining " +"parts. When applied directly to a ``multipart/related``, return an iterator " +"over the all the related parts except the root part (ie: the part pointed to " +"by the ``start`` parameter, or the first part if there is no ``start`` " +"parameter or the ``start`` parameter doesn't match the :mailheader:`Content-" +"ID` of any of the parts). When applied directly to a ``multipart/" +"alternative`` or a non-``multipart``, return an empty iterator." +msgstr "" + +#: library/email.message.rst:593 +msgid "" +"Return an iterator over all of the immediate sub-parts of the message, which " +"will be empty for a non-``multipart``. (See also :meth:`~email.message." +"EmailMessage.walk`.)" +msgstr "" + +#: library/email.message.rst:600 +msgid "" +"Call the :meth:`~email.contentmanager.ContentManager.get_content` method of " +"the *content_manager*, passing self as the message object, and passing along " +"any other arguments or keywords as additional arguments. If " +"*content_manager* is not specified, use the ``content_manager`` specified by " +"the current :mod:`~email.policy`." +msgstr "" + +#: library/email.message.rst:609 +msgid "" +"Call the :meth:`~email.contentmanager.ContentManager.set_content` method of " +"the *content_manager*, passing self as the message object, and passing along " +"any other arguments or keywords as additional arguments. If " +"*content_manager* is not specified, use the ``content_manager`` specified by " +"the current :mod:`~email.policy`." +msgstr "" + +#: library/email.message.rst:618 +msgid "" +"Convert a non-``multipart`` message into a ``multipart/related`` message, " +"moving any existing :mailheader:`Content-` headers and payload into a (new) " +"first part of the ``multipart``. If *boundary* is specified, use it as the " +"boundary string in the multipart, otherwise leave the boundary to be " +"automatically created when it is needed (for example, when the message is " +"serialized)." +msgstr "" + +#: library/email.message.rst:628 +msgid "" +"Convert a non-``multipart`` or a ``multipart/related`` into a ``multipart/" +"alternative``, moving any existing :mailheader:`Content-` headers and " +"payload into a (new) first part of the ``multipart``. If *boundary* is " +"specified, use it as the boundary string in the multipart, otherwise leave " +"the boundary to be automatically created when it is needed (for example, " +"when the message is serialized)." +msgstr "" + +#: library/email.message.rst:638 +msgid "" +"Convert a non-``multipart``, a ``multipart/related``, or a ``multipart-" +"alternative`` into a ``multipart/mixed``, moving any existing :mailheader:" +"`Content-` headers and payload into a (new) first part of the " +"``multipart``. If *boundary* is specified, use it as the boundary string in " +"the multipart, otherwise leave the boundary to be automatically created when " +"it is needed (for example, when the message is serialized)." +msgstr "" + +#: library/email.message.rst:648 +msgid "" +"If the message is a ``multipart/related``, create a new message object, pass " +"all of the arguments to its :meth:`set_content` method, and :meth:`~email." +"message.Message.attach` it to the ``multipart``. If the message is a non-" +"``multipart``, call :meth:`make_related` and then proceed as above. If the " +"message is any other type of ``multipart``, raise a :exc:`TypeError`. If " +"*content_manager* is not specified, use the ``content_manager`` specified by " +"the current :mod:`~email.policy`. If the added part has no :mailheader:" +"`Content-Disposition` header, add one with the value ``inline``." +msgstr "" + +#: library/email.message.rst:661 +msgid "" +"If the message is a ``multipart/alternative``, create a new message object, " +"pass all of the arguments to its :meth:`set_content` method, and :meth:" +"`~email.message.Message.attach` it to the ``multipart``. If the message is " +"a non-``multipart`` or ``multipart/related``, call :meth:`make_alternative` " +"and then proceed as above. If the message is any other type of " +"``multipart``, raise a :exc:`TypeError`. If *content_manager* is not " +"specified, use the ``content_manager`` specified by the current :mod:`~email." +"policy`." +msgstr "" + +#: library/email.message.rst:673 +msgid "" +"If the message is a ``multipart/mixed``, create a new message object, pass " +"all of the arguments to its :meth:`set_content` method, and :meth:`~email." +"message.Message.attach` it to the ``multipart``. If the message is a non-" +"``multipart``, ``multipart/related``, or ``multipart/alternative``, call :" +"meth:`make_mixed` and then proceed as above. If *content_manager* is not " +"specified, use the ``content_manager`` specified by the current :mod:`~email." +"policy`. If the added part has no :mailheader:`Content-Disposition` header, " +"add one with the value ``attachment``. This method can be used both for " +"explicit attachments (:mailheader:`Content-Disposition: attachment`) and " +"``inline`` attachments (:mailheader:`Content-Disposition: inline`), by " +"passing appropriate options to the ``content_manager``." +msgstr "" + +#: library/email.message.rst:689 +msgid "Remove the payload and all of the headers." +msgstr "" + +#: library/email.message.rst:694 +msgid "" +"Remove the payload and all of the :exc:`Content-` headers, leaving all other " +"headers intact and in their original order." +msgstr "" + +#: library/email.message.rst:698 +msgid ":class:`EmailMessage` objects have the following instance attributes:" +msgstr "" + +#: library/email.message.rst:703 +msgid "" +"The format of a MIME document allows for some text between the blank line " +"following the headers, and the first multipart boundary string. Normally, " +"this text is never visible in a MIME-aware mail reader because it falls " +"outside the standard MIME armor. However, when viewing the raw text of the " +"message, or when viewing the message in a non-MIME aware reader, this text " +"can become visible." +msgstr "" + +#: library/email.message.rst:710 +msgid "" +"The *preamble* attribute contains this leading extra-armor text for MIME " +"documents. When the :class:`~email.parser.Parser` discovers some text after " +"the headers but before the first boundary string, it assigns this text to " +"the message's *preamble* attribute. When the :class:`~email.generator." +"Generator` is writing out the plain text representation of a MIME message, " +"and it finds the message has a *preamble* attribute, it will write this text " +"in the area between the headers and the first boundary. See :mod:`email." +"parser` and :mod:`email.generator` for details." +msgstr "" + +#: library/email.message.rst:720 +msgid "" +"Note that if the message object has no preamble, the *preamble* attribute " +"will be ``None``." +msgstr "" + +#: library/email.message.rst:726 +msgid "" +"The *epilogue* attribute acts the same way as the *preamble* attribute, " +"except that it contains text that appears between the last boundary and the " +"end of the message. As with the :attr:`~EmailMessage.preamble`, if there is " +"no epilog text this attribute will be ``None``." +msgstr "" + +#: library/email.message.rst:734 +msgid "" +"The *defects* attribute contains a list of all the problems found when " +"parsing this message. See :mod:`email.errors` for a detailed description of " +"the possible parsing defects." +msgstr "" + +#: library/email.message.rst:741 +msgid "" +"This class represents a subpart of a MIME message. It is identical to :" +"class:`EmailMessage`, except that no :mailheader:`MIME-Version` headers are " +"added when :meth:`~EmailMessage.set_content` is called, since sub-parts do " +"not need their own :mailheader:`MIME-Version` headers." +msgstr "" + +#: library/email.message.rst:748 +msgid "Footnotes" +msgstr "Notes" + +#: library/email.message.rst:749 +msgid "" +"Originally added in 3.4 as a :term:`provisional module `. Docs for legacy message class moved to :ref:`compat32_message`." +msgstr "" diff --git a/library/email.mime.po b/library/email.mime.po new file mode 100644 index 0000000000..db0e1404c7 --- /dev/null +++ b/library/email.mime.po @@ -0,0 +1,295 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-22 22:57+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \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" + +#: library/email.mime.rst:2 +msgid ":mod:`email.mime`: Creating email and MIME objects from scratch" +msgstr "" + +#: library/email.mime.rst:7 +msgid "**Source code:** :source:`Lib/email/mime/`" +msgstr "" + +#: library/email.mime.rst:11 +msgid "" +"This module is part of the legacy (``Compat32``) email API. Its " +"functionality is partially replaced by the :mod:`~email.contentmanager` in " +"the new API, but in certain applications these classes may still be useful, " +"even in non-legacy code." +msgstr "" + +#: library/email.mime.rst:16 +msgid "" +"Ordinarily, you get a message object structure by passing a file or some " +"text to a parser, which parses the text and returns the root message " +"object. However you can also build a complete message structure from " +"scratch, or even individual :class:`~email.message.Message` objects by " +"hand. In fact, you can also take an existing structure and add new :class:" +"`~email.message.Message` objects, move them around, etc. This makes a very " +"convenient interface for slicing-and-dicing MIME messages." +msgstr "" + +#: library/email.mime.rst:24 +msgid "" +"You can create a new object structure by creating :class:`~email.message." +"Message` instances, adding attachments and all the appropriate headers " +"manually. For MIME messages though, the :mod:`email` package provides some " +"convenient subclasses to make things easier." +msgstr "" + +#: library/email.mime.rst:29 +msgid "Here are the classes:" +msgstr "" + +#: library/email.mime.rst:35 +msgid "Module: :mod:`email.mime.base`" +msgstr "Module : :mod:`email.mime.base`" + +#: library/email.mime.rst:37 +msgid "" +"This is the base class for all the MIME-specific subclasses of :class:" +"`~email.message.Message`. Ordinarily you won't create instances " +"specifically of :class:`MIMEBase`, although you could. :class:`MIMEBase` is " +"provided primarily as a convenient base class for more specific MIME-aware " +"subclasses." +msgstr "" + +#: library/email.mime.rst:43 +msgid "" +"*_maintype* is the :mailheader:`Content-Type` major type (e.g. :mimetype:" +"`text` or :mimetype:`image`), and *_subtype* is the :mailheader:`Content-" +"Type` minor type (e.g. :mimetype:`plain` or :mimetype:`gif`). *_params* is " +"a parameter key/value dictionary and is passed directly to :meth:`Message." +"add_header `." +msgstr "" + +#: library/email.mime.rst:49 +msgid "" +"If *policy* is specified, (defaults to the :class:`compat32 ` policy) it will be passed to :class:`~email.message.Message`." +msgstr "" + +#: library/email.mime.rst:53 +msgid "" +"The :class:`MIMEBase` class always adds a :mailheader:`Content-Type` header " +"(based on *_maintype*, *_subtype*, and *_params*), and a :mailheader:`MIME-" +"Version` header (always set to ``1.0``)." +msgstr "" + +#: library/email.mime.rst:104 library/email.mime.rst:169 +#: library/email.mime.rst:224 library/email.mime.rst:258 +msgid "Added *policy* keyword-only parameter." +msgstr "" + +#: library/email.mime.rst:65 +msgid "Module: :mod:`email.mime.nonmultipart`" +msgstr "Module : :mod:`email.mime.nonmultipart`" + +#: library/email.mime.rst:67 +msgid "" +"A subclass of :class:`~email.mime.base.MIMEBase`, this is an intermediate " +"base class for MIME messages that are not :mimetype:`multipart`. The " +"primary purpose of this class is to prevent the use of the :meth:`~email." +"message.Message.attach` method, which only makes sense for :mimetype:" +"`multipart` messages. If :meth:`~email.message.Message.attach` is called, " +"a :exc:`~email.errors.MultipartConversionError` exception is raised." +msgstr "" + +#: library/email.mime.rst:80 +msgid "Module: :mod:`email.mime.multipart`" +msgstr "Module : :mod:`email.mime.multipart`" + +#: library/email.mime.rst:82 +msgid "" +"A subclass of :class:`~email.mime.base.MIMEBase`, this is an intermediate " +"base class for MIME messages that are :mimetype:`multipart`. Optional " +"*_subtype* defaults to :mimetype:`mixed`, but can be used to specify the " +"subtype of the message. A :mailheader:`Content-Type` header of :mimetype:" +"`multipart/_subtype` will be added to the message object. A :mailheader:" +"`MIME-Version` header will also be added." +msgstr "" + +#: library/email.mime.rst:89 +msgid "" +"Optional *boundary* is the multipart boundary string. When ``None`` (the " +"default), the boundary is calculated when needed (for example, when the " +"message is serialized)." +msgstr "" + +#: library/email.mime.rst:93 +msgid "" +"*_subparts* is a sequence of initial subparts for the payload. It must be " +"possible to convert this sequence to a list. You can always attach new " +"subparts to the message by using the :meth:`Message.attach ` method." +msgstr "" + +#: library/email.mime.rst:131 library/email.mime.rst:199 +#: library/email.mime.rst:253 +msgid "" +"Optional *policy* argument defaults to :class:`compat32 `." +msgstr "" + +#: library/email.mime.rst:100 +msgid "" +"Additional parameters for the :mailheader:`Content-Type` header are taken " +"from the keyword arguments, or passed into the *_params* argument, which is " +"a keyword dictionary." +msgstr "" + +#: library/email.mime.rst:113 +msgid "Module: :mod:`email.mime.application`" +msgstr "Module : :mod:`email.mime.application`" + +#: library/email.mime.rst:115 +msgid "" +"A subclass of :class:`~email.mime.nonmultipart.MIMENonMultipart`, the :class:" +"`MIMEApplication` class is used to represent MIME message objects of major " +"type :mimetype:`application`. *_data* contains the bytes for the raw " +"application data. Optional *_subtype* specifies the MIME subtype and " +"defaults to :mimetype:`octet-stream`." +msgstr "" + +#: library/email.mime.rst:121 +msgid "" +"Optional *_encoder* is a callable (i.e. function) which will perform the " +"actual encoding of the data for transport. This callable takes one " +"argument, which is the :class:`MIMEApplication` instance. It should use :" +"meth:`~email.message.Message.get_payload` and :meth:`~email.message.Message." +"set_payload` to change the payload to encoded form. It should also add any :" +"mailheader:`Content-Transfer-Encoding` or other headers to the message " +"object as necessary. The default encoding is base64. See the :mod:`email." +"encoders` module for a list of the built-in encoders." +msgstr "" + +#: library/email.mime.rst:167 +msgid "*_params* are passed straight through to the base class constructor." +msgstr "" + +#: library/email.mime.rst:144 +msgid "Module: :mod:`email.mime.audio`" +msgstr "Module : :mod:`email.mime.audio`" + +#: library/email.mime.rst:146 +msgid "" +"A subclass of :class:`~email.mime.nonmultipart.MIMENonMultipart`, the :class:" +"`MIMEAudio` class is used to create MIME message objects of major type :" +"mimetype:`audio`. *_audiodata* contains the bytes for the raw audio data. " +"If this data can be decoded by the standard Python module :mod:`sndhdr`, " +"then the subtype will be automatically included in the :mailheader:`Content-" +"Type` header. Otherwise you can explicitly specify the audio subtype via the " +"*_subtype* argument. If the minor type could not be guessed and *_subtype* " +"was not given, then :exc:`TypeError` is raised." +msgstr "" + +#: library/email.mime.rst:155 +msgid "" +"Optional *_encoder* is a callable (i.e. function) which will perform the " +"actual encoding of the audio data for transport. This callable takes one " +"argument, which is the :class:`MIMEAudio` instance. It should use :meth:" +"`~email.message.Message.get_payload` and :meth:`~email.message.Message." +"set_payload` to change the payload to encoded form. It should also add any :" +"mailheader:`Content-Transfer-Encoding` or other headers to the message " +"object as necessary. The default encoding is base64. See the :mod:`email." +"encoders` module for a list of the built-in encoders." +msgstr "" + +#: library/email.mime.rst:178 +msgid "Module: :mod:`email.mime.image`" +msgstr "Module : :mod:`email.mime.image`" + +#: library/email.mime.rst:180 +msgid "" +"A subclass of :class:`~email.mime.nonmultipart.MIMENonMultipart`, the :class:" +"`MIMEImage` class is used to create MIME message objects of major type :" +"mimetype:`image`. *_imagedata* contains the bytes for the raw image data. " +"If this data can be decoded by the standard Python module :mod:`imghdr`, " +"then the subtype will be automatically included in the :mailheader:`Content-" +"Type` header. Otherwise you can explicitly specify the image subtype via the " +"*_subtype* argument. If the minor type could not be guessed and *_subtype* " +"was not given, then :exc:`TypeError` is raised." +msgstr "" + +#: library/email.mime.rst:189 +msgid "" +"Optional *_encoder* is a callable (i.e. function) which will perform the " +"actual encoding of the image data for transport. This callable takes one " +"argument, which is the :class:`MIMEImage` instance. It should use :meth:" +"`~email.message.Message.get_payload` and :meth:`~email.message.Message." +"set_payload` to change the payload to encoded form. It should also add any :" +"mailheader:`Content-Transfer-Encoding` or other headers to the message " +"object as necessary. The default encoding is base64. See the :mod:`email." +"encoders` module for a list of the built-in encoders." +msgstr "" + +#: library/email.mime.rst:201 +msgid "" +"*_params* are passed straight through to the :class:`~email.mime.base." +"MIMEBase` constructor." +msgstr "" + +#: library/email.mime.rst:211 +msgid "Module: :mod:`email.mime.message`" +msgstr "Module : :mod:`email.mime.message`" + +#: library/email.mime.rst:213 +msgid "" +"A subclass of :class:`~email.mime.nonmultipart.MIMENonMultipart`, the :class:" +"`MIMEMessage` class is used to create MIME objects of main type :mimetype:" +"`message`. *_msg* is used as the payload, and must be an instance of class :" +"class:`~email.message.Message` (or a subclass thereof), otherwise a :exc:" +"`TypeError` is raised." +msgstr "" + +#: library/email.mime.rst:219 +msgid "" +"Optional *_subtype* sets the subtype of the message; it defaults to :" +"mimetype:`rfc822`." +msgstr "" + +#: library/email.mime.rst:231 +msgid "Module: :mod:`email.mime.text`" +msgstr "Module : :mod:`email.mime.text`" + +#: library/email.mime.rst:233 +msgid "" +"A subclass of :class:`~email.mime.nonmultipart.MIMENonMultipart`, the :class:" +"`MIMEText` class is used to create MIME objects of major type :mimetype:" +"`text`. *_text* is the string for the payload. *_subtype* is the minor type " +"and defaults to :mimetype:`plain`. *_charset* is the character set of the " +"text and is passed as an argument to the :class:`~email.mime.nonmultipart." +"MIMENonMultipart` constructor; it defaults to ``us-ascii`` if the string " +"contains only ``ascii`` code points, and ``utf-8`` otherwise. The " +"*_charset* parameter accepts either a string or a :class:`~email.charset." +"Charset` instance." +msgstr "" + +#: library/email.mime.rst:243 +msgid "" +"Unless the *_charset* argument is explicitly set to ``None``, the MIMEText " +"object created will have both a :mailheader:`Content-Type` header with a " +"``charset`` parameter, and a :mailheader:`Content-Transfer-Encoding` " +"header. This means that a subsequent ``set_payload`` call will not result " +"in an encoded payload, even if a charset is passed in the ``set_payload`` " +"command. You can \"reset\" this behavior by deleting the ``Content-Transfer-" +"Encoding`` header, after which a ``set_payload`` call will automatically " +"encode the new payload (and add a new :mailheader:`Content-Transfer-" +"Encoding` header)." +msgstr "" + +#: library/email.mime.rst:255 +msgid "*_charset* also accepts :class:`~email.charset.Charset` instances." +msgstr "" diff --git a/library/email.parser.po b/library/email.parser.po new file mode 100644 index 0000000000..34bbc08e90 --- /dev/null +++ b/library/email.parser.po @@ -0,0 +1,376 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-04-05 10:05+0200\n" +"PO-Revision-Date: 2019-05-08 16:44+0200\n" +"Last-Translator: Mathieu Dupuy \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" + +#: library/email.parser.rst:2 +msgid ":mod:`email.parser`: Parsing email messages" +msgstr ":mod:`email.parser` : Analyser des e-mails" + +#: library/email.parser.rst:7 +msgid "**Source code:** :source:`Lib/email/parser.py`" +msgstr "**Code source :** :source:`Lib/email/parser.py`" + +#: library/email.parser.rst:11 +msgid "" +"Message object structures can be created in one of two ways: they can be " +"created from whole cloth by creating an :class:`~email.message.EmailMessage` " +"object, adding headers using the dictionary interface, and adding payload(s) " +"using :meth:`~email.message.EmailMessage.set_content` and related methods, " +"or they can be created by parsing a serialized representation of the email " +"message." +msgstr "" +"Les instances de messages peuvent être créées de deux façons : elles peuvent " +"être créées de toutes pièces en créant un objet :class:`~email.message." +"message.EmailMessage`, en ajoutant des en-têtes en utilisant l'interface de " +"dictionnaire, et en ajoutant un ou plusieurs corps de message en utilisant :" +"meth:`~email.message.message.EmailMessage.set_content` et les méthodes " +"associées, ou ils peuvent être créées en analysant une représentation " +"sérialisée de l'e-mail." + +#: library/email.parser.rst:18 +msgid "" +"The :mod:`email` package provides a standard parser that understands most " +"email document structures, including MIME documents. You can pass the " +"parser a bytes, string or file object, and the parser will return to you the " +"root :class:`~email.message.EmailMessage` instance of the object structure. " +"For simple, non-MIME messages the payload of this root object will likely be " +"a string containing the text of the message. For MIME messages, the root " +"object will return ``True`` from its :meth:`~email.message.EmailMessage." +"is_multipart` method, and the subparts can be accessed via the payload " +"manipulation methods, such as :meth:`~email.message.EmailMessage.get_body`, :" +"meth:`~email.message.EmailMessage.iter_parts`, and :meth:`~email.message." +"EmailMessage.walk`." +msgstr "" + +#: library/email.parser.rst:30 +msgid "" +"There are actually two parser interfaces available for use, the :class:" +"`Parser` API and the incremental :class:`FeedParser` API. The :class:" +"`Parser` API is most useful if you have the entire text of the message in " +"memory, or if the entire message lives in a file on the file system. :class:" +"`FeedParser` is more appropriate when you are reading the message from a " +"stream which might block waiting for more input (such as reading an email " +"message from a socket). The :class:`FeedParser` can consume and parse the " +"message incrementally, and only returns the root object when you close the " +"parser." +msgstr "" + +#: library/email.parser.rst:39 +msgid "" +"Note that the parser can be extended in limited ways, and of course you can " +"implement your own parser completely from scratch. All of the logic that " +"connects the :mod:`email` package's bundled parser and the :class:`~email." +"message.EmailMessage` class is embodied in the :mod:`policy` class, so a " +"custom parser can create message object trees any way it finds necessary by " +"implementing custom versions of the appropriate :mod:`policy` methods." +msgstr "" + +#: library/email.parser.rst:49 +msgid "FeedParser API" +msgstr "API *FeedParser*" + +#: library/email.parser.rst:51 +msgid "" +"The :class:`BytesFeedParser`, imported from the :mod:`email.feedparser` " +"module, provides an API that is conducive to incremental parsing of email " +"messages, such as would be necessary when reading the text of an email " +"message from a source that can block (such as a socket). The :class:" +"`BytesFeedParser` can of course be used to parse an email message fully " +"contained in a :term:`bytes-like object`, string, or file, but the :class:" +"`BytesParser` API may be more convenient for such use cases. The semantics " +"and results of the two parser APIs are identical." +msgstr "" + +#: library/email.parser.rst:60 +msgid "" +"The :class:`BytesFeedParser`'s API is simple; you create an instance, feed " +"it a bunch of bytes until there's no more to feed it, then close the parser " +"to retrieve the root message object. The :class:`BytesFeedParser` is " +"extremely accurate when parsing standards-compliant messages, and it does a " +"very good job of parsing non-compliant messages, providing information about " +"how a message was deemed broken. It will populate a message object's :attr:" +"`~email.message.EmailMessage.defects` attribute with a list of any problems " +"it found in a message. See the :mod:`email.errors` module for the list of " +"defects that it can find." +msgstr "" + +#: library/email.parser.rst:70 +msgid "Here is the API for the :class:`BytesFeedParser`:" +msgstr "Voici l’API pour :class:`BytesFeedParser` ::" + +#: library/email.parser.rst:75 +msgid "" +"Create a :class:`BytesFeedParser` instance. Optional *_factory* is a no-" +"argument callable; if not specified use the :attr:`~email.policy.Policy." +"message_factory` from the *policy*. Call *_factory* whenever a new message " +"object is needed." +msgstr "" + +#: library/email.parser.rst:80 +msgid "" +"If *policy* is specified use the rules it specifies to update the " +"representation of the message. If *policy* is not set, use the :class:" +"`compat32 ` policy, which maintains backward " +"compatibility with the Python 3.2 version of the email package and provides :" +"class:`~email.message.Message` as the default factory. All other policies " +"provide :class:`~email.message.EmailMessage` as the default *_factory*. For " +"more information on what else *policy* controls, see the :mod:`~email." +"policy` documentation." +msgstr "" + +#: library/email.parser.rst:145 +msgid "" +"Note: **The policy keyword should always be specified**; The default will " +"change to :data:`email.policy.default` in a future version of Python." +msgstr "" + +#: library/email.parser.rst:122 +msgid "Added the *policy* keyword." +msgstr "" + +#: library/email.parser.rst:95 +msgid "*_factory* defaults to the policy ``message_factory``." +msgstr "" + +#: library/email.parser.rst:100 +msgid "" +"Feed the parser some more data. *data* should be a :term:`bytes-like " +"object` containing one or more lines. The lines can be partial and the " +"parser will stitch such partial lines together properly. The lines can have " +"any of the three common line endings: carriage return, newline, or carriage " +"return and newline (they can even be mixed)." +msgstr "" + +#: library/email.parser.rst:109 +msgid "" +"Complete the parsing of all previously fed data and return the root message " +"object. It is undefined what happens if :meth:`~feed` is called after this " +"method has been called." +msgstr "" + +#: library/email.parser.rst:116 +msgid "" +"Works like :class:`BytesFeedParser` except that the input to the :meth:" +"`~BytesFeedParser.feed` method must be a string. This is of limited " +"utility, since the only way for such a message to be valid is for it to " +"contain only ASCII text or, if :attr:`~email.policy.Policy.utf8` is " +"``True``, no binary attachments." +msgstr "" + +#: library/email.parser.rst:126 +msgid "Parser API" +msgstr "API de *Parser*" + +#: library/email.parser.rst:128 +msgid "" +"The :class:`BytesParser` class, imported from the :mod:`email.parser` " +"module, provides an API that can be used to parse a message when the " +"complete contents of the message are available in a :term:`bytes-like " +"object` or file. The :mod:`email.parser` module also provides :class:" +"`Parser` for parsing strings, and header-only parsers, :class:" +"`BytesHeaderParser` and :class:`HeaderParser`, which can be used if you're " +"only interested in the headers of the message. :class:`BytesHeaderParser` " +"and :class:`HeaderParser` can be much faster in these situations, since they " +"do not attempt to parse the message body, instead setting the payload to the " +"raw body." +msgstr "" + +#: library/email.parser.rst:141 +msgid "" +"Create a :class:`BytesParser` instance. The *_class* and *policy* arguments " +"have the same meaning and semantics as the *_factory* and *policy* arguments " +"of :class:`BytesFeedParser`." +msgstr "" + +#: library/email.parser.rst:148 +msgid "" +"Removed the *strict* argument that was deprecated in 2.4. Added the " +"*policy* keyword." +msgstr "" + +#: library/email.parser.rst:200 library/email.parser.rst:280 +msgid "*_class* defaults to the policy ``message_factory``." +msgstr "" + +#: library/email.parser.rst:156 +msgid "" +"Read all the data from the binary file-like object *fp*, parse the resulting " +"bytes, and return the message object. *fp* must support both the :meth:`~io." +"IOBase.readline` and the :meth:`~io.IOBase.read` methods." +msgstr "" + +#: library/email.parser.rst:161 +msgid "" +"The bytes contained in *fp* must be formatted as a block of :rfc:`5322` (or, " +"if :attr:`~email.policy.Policy.utf8` is ``True``, :rfc:`6532`) style headers " +"and header continuation lines, optionally preceded by an envelope header. " +"The header block is terminated either by the end of the data or by a blank " +"line. Following the header block is the body of the message (which may " +"contain MIME-encoded subparts, including subparts with a :mailheader:" +"`Content-Transfer-Encoding` of ``8bit``)." +msgstr "" + +#: library/email.parser.rst:169 +msgid "" +"Optional *headersonly* is a flag specifying whether to stop parsing after " +"reading the headers or not. The default is ``False``, meaning it parses the " +"entire contents of the file." +msgstr "" + +#: library/email.parser.rst:176 +msgid "" +"Similar to the :meth:`parse` method, except it takes a :term:`bytes-like " +"object` instead of a file-like object. Calling this method on a :term:" +"`bytes-like object` is equivalent to wrapping *bytes* in a :class:`~io." +"BytesIO` instance first and calling :meth:`parse`." +msgstr "" + +#: library/email.parser.rst:221 +msgid "Optional *headersonly* is as with the :meth:`parse` method." +msgstr "" + +#: library/email.parser.rst:188 +msgid "" +"Exactly like :class:`BytesParser`, except that *headersonly* defaults to " +"``True``." +msgstr "" + +#: library/email.parser.rst:196 +msgid "" +"This class is parallel to :class:`BytesParser`, but handles string input." +msgstr "" + +#: library/email.parser.rst:245 library/email.parser.rst:268 +#: library/email.parser.rst:278 +msgid "Removed the *strict* argument. Added the *policy* keyword." +msgstr "" + +#: library/email.parser.rst:205 +msgid "" +"Read all the data from the text-mode file-like object *fp*, parse the " +"resulting text, and return the root message object. *fp* must support both " +"the :meth:`~io.TextIOBase.readline` and the :meth:`~io.TextIOBase.read` " +"methods on file-like objects." +msgstr "" + +#: library/email.parser.rst:210 +msgid "" +"Other than the text mode requirement, this method operates like :meth:" +"`BytesParser.parse`." +msgstr "" + +#: library/email.parser.rst:216 +msgid "" +"Similar to the :meth:`parse` method, except it takes a string object instead " +"of a file-like object. Calling this method on a string is equivalent to " +"wrapping *text* in a :class:`~io.StringIO` instance first and calling :meth:" +"`parse`." +msgstr "" + +#: library/email.parser.rst:226 +msgid "" +"Exactly like :class:`Parser`, except that *headersonly* defaults to ``True``." +msgstr "" + +#: library/email.parser.rst:230 +msgid "" +"Since creating a message object structure from a string or a file object is " +"such a common task, four functions are provided as a convenience. They are " +"available in the top-level :mod:`email` package namespace." +msgstr "" + +#: library/email.parser.rst:239 +msgid "" +"Return a message object structure from a :term:`bytes-like object`. This is " +"equivalent to ``BytesParser().parsebytes(s)``. Optional *_class* and " +"*policy* are interpreted as with the :class:`~email.parser.BytesParser` " +"class constructor." +msgstr "" + +#: library/email.parser.rst:252 +msgid "" +"Return a message object structure tree from an open binary :term:`file " +"object`. This is equivalent to ``BytesParser().parse(fp)``. *_class* and " +"*policy* are interpreted as with the :class:`~email.parser.BytesParser` " +"class constructor." +msgstr "" + +#: library/email.parser.rst:264 +msgid "" +"Return a message object structure from a string. This is equivalent to " +"``Parser().parsestr(s)``. *_class* and *policy* are interpreted as with " +"the :class:`~email.parser.Parser` class constructor." +msgstr "" + +#: library/email.parser.rst:274 +msgid "" +"Return a message object structure tree from an open :term:`file object`. " +"This is equivalent to ``Parser().parse(fp)``. *_class* and *policy* are " +"interpreted as with the :class:`~email.parser.Parser` class constructor." +msgstr "" + +#: library/email.parser.rst:283 +msgid "" +"Here's an example of how you might use :func:`message_from_bytes` at an " +"interactive Python prompt::" +msgstr "" + +#: library/email.parser.rst:291 +msgid "Additional notes" +msgstr "Notes complémentaires" + +#: library/email.parser.rst:293 +msgid "Here are some notes on the parsing semantics:" +msgstr "Voici des remarques sur la sémantique d'analyse ::" + +#: library/email.parser.rst:295 +msgid "" +"Most non-\\ :mimetype:`multipart` type messages are parsed as a single " +"message object with a string payload. These objects will return ``False`` " +"for :meth:`~email.message.EmailMessage.is_multipart`, and :meth:`~email." +"message.EmailMessage.iter_parts` will yield an empty list." +msgstr "" + +#: library/email.parser.rst:300 +msgid "" +"All :mimetype:`multipart` type messages will be parsed as a container " +"message object with a list of sub-message objects for their payload. The " +"outer container message will return ``True`` for :meth:`~email.message." +"EmailMessage.is_multipart`, and :meth:`~email.message.EmailMessage." +"iter_parts` will yield a list of subparts." +msgstr "" + +#: library/email.parser.rst:306 +msgid "" +"Most messages with a content type of :mimetype:`message/\\*` (such as :" +"mimetype:`message/delivery-status` and :mimetype:`message/rfc822`) will also " +"be parsed as container object containing a list payload of length 1. Their :" +"meth:`~email.message.EmailMessage.is_multipart` method will return ``True``. " +"The single element yielded by :meth:`~email.message.EmailMessage.iter_parts` " +"will be a sub-message object." +msgstr "" + +#: library/email.parser.rst:313 +msgid "" +"Some non-standards-compliant messages may not be internally consistent about " +"their :mimetype:`multipart`\\ -edness. Such messages may have a :mailheader:" +"`Content-Type` header of type :mimetype:`multipart`, but their :meth:`~email." +"message.EmailMessage.is_multipart` method may return ``False``. If such " +"messages were parsed with the :class:`~email.parser.FeedParser`, they will " +"have an instance of the :class:`~email.errors." +"MultipartInvariantViolationDefect` class in their *defects* attribute list. " +"See :mod:`email.errors` for details." +msgstr "" diff --git a/library/email.po b/library/email.po new file mode 100644 index 0000000000..ab5181ce61 --- /dev/null +++ b/library/email.po @@ -0,0 +1,288 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-09-23 16:16+0200\n" +"PO-Revision-Date: 2021-09-06 21:25+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/email.rst:2 +msgid ":mod:`email` --- An email and MIME handling package" +msgstr ":mod:`email` — Un paquet de gestion des e-mails et MIME" + +#: library/email.rst:11 +msgid "**Source code:** :source:`Lib/email/__init__.py`" +msgstr "**Code source:** :source:`Lib/email/__init__.py`" + +#: library/email.rst:15 +msgid "" +"The :mod:`email` package is a library for managing email messages. It is " +"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:`5322` and :rfc:`6532`, as " +"well as such MIME-related RFCs as :rfc:`2045`, :rfc:`2046`, :rfc:`2047`, :" +"rfc:`2183`, and :rfc:`2231`." +msgstr "" +"Le paquet :mod:`email` est une bibliothèque pour gérer les e-mails. Il est " +"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:`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`." + +#: library/email.rst:23 +msgid "" +"The overall structure of the email package can be divided into three major " +"components, plus a fourth component that controls the behavior of the other " +"components." +msgstr "" +"Ce paquet peut être divisé entre trois composants majeurs, et un quatrième " +"composant qui contrôle le comportement des trois autres." + +#: library/email.rst:27 +msgid "" +"The central component of the package is an \"object model\" that represents " +"email messages. An application interacts with the package primarily through " +"the object model interface defined in the :mod:`~email.message` sub-module. " +"The application can use this API to ask questions about an existing email, " +"to construct a new email, or to add or remove email subcomponents that " +"themselves use the same object model interface. That is, following the " +"nature of email messages and their MIME subcomponents, the email object " +"model is a tree structure of objects that all provide the :class:`~email." +"message.EmailMessage` API." +msgstr "" +"Le composant central du paquet est un \"modèle d'objet\" qui représente les " +"messages. Une application interagit avec le paquet, dans un premier temps, à " +"travers l'interface de modèle d'objet définie dans le sous-module :mod:" +"`~email.message`. L'application peut utiliser cette API pour poser des " +"questions à propos d'un mail existant, pour créer un nouvel e-mail, ou " +"ajouter ou retirer des sous-composants d'e-mail qui utilisent la même " +"interface de modèle d'objet. Suivant la nature des messages et leurs sous-" +"composants MIME, le modèle d'objet d'e-mail est une structure arborescente " +"d'objets qui fournit tout à l'API de :class:`~email.message.EmailMessage`." + +#: library/email.rst:37 +msgid "" +"The other two major components of the package are the :mod:`~email.parser` " +"and the :mod:`~email.generator`. The parser takes the serialized version of " +"an email message (a stream of bytes) and converts it into a tree of :class:" +"`~email.message.EmailMessage` objects. The generator takes an :class:" +"`~email.message.EmailMessage` and turns it back into a serialized byte " +"stream. (The parser and generator also handle streams of text characters, " +"but this usage is discouraged as it is too easy to end up with messages that " +"are not valid in one way or another.)" +msgstr "" +"Les deux autres composants majeurs de ce paquet sont l'analyseur (:mod:" +"`~email.parser`) et le générateur (:mod:`~email.generator`). L'analyseur " +"prend la version sérialisée d'un e-mail (un flux d'octets) et le convertit " +"en une arborescence d'objets :class:`~email.message.EmailMessage`. Le " +"générateur prend un objet :class:`~email.message.EmailMessage` et le " +"retransforme en un flux d'octets sérialisé (l'analyseur et le générateur " +"gèrent aussi des suites de caractères textuels, mais cette utilisation est " +"déconseillée car il est très facile de finir avec des messages invalides " +"d'une manière ou d'une autre)." + +#: library/email.rst:46 +msgid "" +"The control component is the :mod:`~email.policy` module. Every :class:" +"`~email.message.EmailMessage`, every :mod:`~email.generator`, and every :mod:" +"`~email.parser` has an associated :mod:`~email.policy` object that controls " +"its behavior. Usually an application only needs to specify the policy when " +"an :class:`~email.message.EmailMessage` is created, either by directly " +"instantiating an :class:`~email.message.EmailMessage` to create a new " +"email, or by parsing an input stream using a :mod:`~email.parser`. But the " +"policy can be changed when the message is serialized using a :mod:`~email." +"generator`. This allows, for example, a generic email message to be parsed " +"from disk, but to serialize it using standard SMTP settings when sending it " +"to an email server." +msgstr "" +"Le composant de contrôle est le module :mod:`~email.policy`. Chaque :class:" +"`~email.message.EmailMessage`, chaque :mod:`~email.generator` et chaque :mod:" +"`~email.parser` possède un objet associé :mod:`~email.policy` qui contrôle " +"son comportement. Habituellement une application n'a besoin de spécifier la " +"politique que quand un :class:`~email.message.EmailMessage` est créé, soit " +"en instanciant directement un :class:`~email.message.EmailMessage` pour " +"créer un nouvel e-mail, soit lors de l'analyse d'un flux entrant en " +"utilisant un :mod:`~email.parser`. Mais la politique peut être changée quand " +"le message est sérialisé en utilisant un :mod:`~email.generator`. Cela " +"permet, par exemple, d'analyser un message e-mail générique du disque, puis " +"de le sérialiser en utilisant une configuration SMTP standard quand on " +"l'envoie vers un serveur d'e-mail." + +#: library/email.rst:58 +msgid "" +"The email package does its best to hide the details of the various governing " +"RFCs from the application. Conceptually the application should be able to " +"treat the email message as a structured tree of unicode text and binary " +"attachments, without having to worry about how these are represented when " +"serialized. In practice, however, it is often necessary to be aware of at " +"least some of the rules governing MIME messages and their structure, " +"specifically the names and nature of the MIME \"content types\" and how they " +"identify multipart documents. For the most part this knowledge should only " +"be required for more complex applications, and even then it should only be " +"the high level structure in question, and not the details of how those " +"structures are represented. Since MIME content types are used widely in " +"modern internet software (not just email), this will be a familiar concept " +"to many programmers." +msgstr "" +"Le paquet *email* fait son maximum pour cacher les détails des différentes " +"RFCs de référence à l'application. Conceptuellement, l'application doit être " +"capable de traiter l'e-mail comme une arborescence structurée de texte " +"Unicode et de pièces jointes binaires, sans avoir à se préoccuper de leur " +"représentation sérialisée. Dans la pratique, cependant, il est souvent " +"nécessaire d'être conscient d'au moins quelques règles relatives aux " +"messages MIME et à leur structure, en particulier les noms et natures des " +"\"types de contenus\" et comment ils identifient les documents à plusieurs " +"parties. Pour la plupart, cette connaissance devrait seulement être " +"nécessaire pour des applications plus complexes, et même là, il devrait être " +"question des structures de haut niveau et non des détails sur la manière " +"dont elles sont représentées. Comme les types de contenus MIME sont " +"couramment utilisés dans les logiciels internet modernes (et non uniquement " +"les e-mails), les développeurs sont généralement familiers de ce concept." + +#: library/email.rst:71 +msgid "" +"The following sections describe the functionality of the :mod:`email` " +"package. We start with the :mod:`~email.message` object model, which is the " +"primary interface an application will use, and follow that with the :mod:" +"`~email.parser` and :mod:`~email.generator` components. Then we cover the :" +"mod:`~email.policy` controls, which completes the treatment of the main " +"components of the library." +msgstr "" +"La section suivante décrit les fonctionnalités du paquet :mod:`email`. Nous " +"commençons avec le modèle d'objet :mod:`~email.message`, qui est la " +"principale interface qu'une application utilise, et continuons avec les " +"composants :mod:`~email.parser` et :mod:`~email.generator`. Ensuite, nous " +"couvrons les contrôles :mod:`~email.policy`, qui complètent le traitement " +"des principaux composants de la bibliothèque." + +#: library/email.rst:78 +msgid "" +"The next three sections cover the exceptions the package may raise and the " +"defects (non-compliance with the RFCs) that the :mod:`~email.parser` may " +"detect. Then we cover the :mod:`~email.headerregistry` and the :mod:`~email." +"contentmanager` sub-components, which provide tools for doing more detailed " +"manipulation of headers and payloads, respectively. Both of these " +"components contain features relevant to consuming and producing non-trivial " +"messages, but also document their extensibility APIs, which will be of " +"interest to advanced applications." +msgstr "" +"Les trois prochaines sections couvrent les exceptions que le paquet peut " +"rencontrer et les imperfections (non-respect des RFCs) que le module :mod:" +"`~email.parser` peut détecter. Ensuite nous couvrons les sous-composants :" +"mod:`~email.headerregistry` et :mod:`~email.contentmanager`, qui fournissent " +"des outils pour faire des manipulations plus détaillées des en-têtes et du " +"contenu, respectivement. Les deux composants contiennent des fonctionnalités " +"adaptées pour traiter et produire des messages qui sortent de l'ordinaire, " +"et elles documentent aussi leurs API pour pouvoir les étendre, ce qui ne " +"manquera pas d'intéresser les applications avancées." + +#: library/email.rst:87 +msgid "" +"Following those is a set of examples of using the fundamental parts of the " +"APIs covered in the preceding sections." +msgstr "" +"Ci-dessous se trouve un ensemble d'exemples d'utilisations des éléments " +"fondamentaux des API couvertes dans les sections précédentes." + +#: library/email.rst:90 +msgid "" +"The foregoing represent the modern (unicode friendly) API of the email " +"package. The remaining sections, starting with the :class:`~email.message." +"Message` class, cover the legacy :data:`~email.policy.compat32` API that " +"deals much more directly with the details of how email messages are " +"represented. The :data:`~email.policy.compat32` API does *not* hide the " +"details of the RFCs from the application, but for applications that need to " +"operate at that level, they can be useful tools. This documentation is also " +"relevant for applications that are still using the :mod:`~email.policy." +"compat32` API for backward compatibility reasons." +msgstr "" +"Ce que nous venons d'aborder constitue l'API moderne (compatible Unicode) du " +"paquet *email*. Les sections restantes, commençant par la classe :class:" +"`~email.message.Message`, couvrent l'API héritée :data:`~email.policy." +"compat32` qui traite beaucoup plus directement des détails sur la manière " +"dont les e-mails sont représentés. L'API :data:`~email.policy.compat32` ne " +"cache *pas* les détails des RFCs à l'application, mais pour les applications " +"qui requièrent d'opérer à ce niveau, elle peut être un outil pratique. Cette " +"documentation est aussi pertinente pour les applications qui utilisent " +"toujours l'API :mod:`~email.policy.compat32` pour des raisons de " +"rétrocompatibilité." + +#: library/email.rst:100 +msgid "" +"Docs reorganized and rewritten to promote the new :class:`~email.message." +"EmailMessage`/:class:`~email.policy.EmailPolicy` API." +msgstr "" +"Documents réorganisés et réécrits pour promouvoir la nouvelle API :class:" +"`~email.message.EmailMessage`/:class:`~email.policy.EmailPolicy`." + +#: library/email.rst:105 +msgid "Contents of the :mod:`email` package documentation:" +msgstr "Contenus de la documentation du paquet :mod:`email` :" + +#: library/email.rst:120 +msgid "Legacy API:" +msgstr "API héritée :" + +#: library/email.rst:136 +msgid "Module :mod:`smtplib`" +msgstr "Module :mod:`smtplib`" + +#: library/email.rst:136 +msgid "SMTP (Simple Mail Transport Protocol) client" +msgstr "Client SMTP (*Simple Mail Transport Protocol*)" + +#: library/email.rst:139 +msgid "Module :mod:`poplib`" +msgstr "Module :mod:`poplib`" + +#: library/email.rst:139 +msgid "POP (Post Office Protocol) client" +msgstr "Client POP (*Post Office Protocol*)" + +#: library/email.rst:142 +msgid "Module :mod:`imaplib`" +msgstr "Module :mod:`imaplib`" + +#: library/email.rst:142 +msgid "IMAP (Internet Message Access Protocol) client" +msgstr "Client IMAP (*Internet Message Access Protocol*)" + +#: library/email.rst:145 +msgid "Module :mod:`nntplib`" +msgstr "Module :mod:`nntplib`" + +#: library/email.rst:145 +msgid "NNTP (Net News Transport Protocol) client" +msgstr "Client NNTP (*Net News Transport Protocol*)" + +#: library/email.rst:149 +msgid "Module :mod:`mailbox`" +msgstr "Module :mod:`mailbox`" + +#: library/email.rst:148 +msgid "" +"Tools for creating, reading, and managing collections of messages on disk " +"using a variety standard formats." +msgstr "" +"Outils pour créer, lire et gérer des messages regroupés sur disque en " +"utilisant des formats standards variés." + +#: library/email.rst:151 +msgid "Module :mod:`smtpd`" +msgstr "Module :mod:`smtpd`" + +#: library/email.rst:152 +msgid "SMTP server framework (primarily useful for testing)" +msgstr "Cadriciel pour serveur SMTP (principalement utile pour tester)" diff --git a/library/email.policy.po b/library/email.policy.po new file mode 100644 index 0000000000..4d4317c016 --- /dev/null +++ b/library/email.policy.po @@ -0,0 +1,734 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-04-05 10:05+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \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" + +#: library/email.policy.rst:2 +msgid ":mod:`email.policy`: Policy Objects" +msgstr "" + +#: library/email.policy.rst:12 +msgid "**Source code:** :source:`Lib/email/policy.py`" +msgstr "" + +#: library/email.policy.rst:16 +msgid "" +"The :mod:`email` package's prime focus is the handling of email messages as " +"described by the various email and MIME RFCs. However, the general format " +"of email messages (a block of header fields each consisting of a name " +"followed by a colon followed by a value, the whole block followed by a blank " +"line and an arbitrary 'body'), is a format that has found utility outside of " +"the realm of email. Some of these uses conform fairly closely to the main " +"email RFCs, some do not. Even when working with email, there are times when " +"it is desirable to break strict compliance with the RFCs, such as generating " +"emails that interoperate with email servers that do not themselves follow " +"the standards, or that implement extensions you want to use in ways that " +"violate the standards." +msgstr "" + +#: library/email.policy.rst:28 +msgid "" +"Policy objects give the email package the flexibility to handle all these " +"disparate use cases." +msgstr "" + +#: library/email.policy.rst:31 +msgid "" +"A :class:`Policy` object encapsulates a set of attributes and methods that " +"control the behavior of various components of the email package during use. :" +"class:`Policy` instances can be passed to various classes and methods in the " +"email package to alter the default behavior. The settable values and their " +"defaults are described below." +msgstr "" + +#: library/email.policy.rst:37 +msgid "" +"There is a default policy used by all classes in the email package. For all " +"of the :mod:`~email.parser` classes and the related convenience functions, " +"and for the :class:`~email.message.Message` class, this is the :class:" +"`Compat32` policy, via its corresponding pre-defined instance :const:" +"`compat32`. This policy provides for complete backward compatibility (in " +"some cases, including bug compatibility) with the pre-Python3.3 version of " +"the email package." +msgstr "" + +#: library/email.policy.rst:44 +msgid "" +"This default value for the *policy* keyword to :class:`~email.message." +"EmailMessage` is the :class:`EmailPolicy` policy, via its pre-defined " +"instance :data:`~default`." +msgstr "" + +#: library/email.policy.rst:48 +msgid "" +"When a :class:`~email.message.Message` or :class:`~email.message." +"EmailMessage` object is created, it acquires a policy. If the message is " +"created by a :mod:`~email.parser`, a policy passed to the parser will be the " +"policy used by the message it creates. If the message is created by the " +"program, then the policy can be specified when it is created. When a " +"message is passed to a :mod:`~email.generator`, the generator uses the " +"policy from the message by default, but you can also pass a specific policy " +"to the generator that will override the one stored on the message object." +msgstr "" + +#: library/email.policy.rst:57 +msgid "" +"The default value for the *policy* keyword for the :mod:`email.parser` " +"classes and the parser convenience functions **will be changing** in a " +"future version of Python. Therefore you should **always specify explicitly " +"which policy you want to use** when calling any of the classes and functions " +"described in the :mod:`~email.parser` module." +msgstr "" + +#: library/email.policy.rst:63 +msgid "" +"The first part of this documentation covers the features of :class:`Policy`, " +"an :term:`abstract base class` that defines the features that are common to " +"all policy objects, including :const:`compat32`. This includes certain hook " +"methods that are called internally by the email package, which a custom " +"policy could override to obtain different behavior. The second part " +"describes the concrete classes :class:`EmailPolicy` and :class:`Compat32`, " +"which implement the hooks that provide the standard behavior and the " +"backward compatible behavior and features, respectively." +msgstr "" + +#: library/email.policy.rst:72 +msgid "" +":class:`Policy` instances are immutable, but they can be cloned, accepting " +"the same keyword arguments as the class constructor and returning a new :" +"class:`Policy` instance that is a copy of the original but with the " +"specified attributes values changed." +msgstr "" + +#: library/email.policy.rst:77 +msgid "" +"As an example, the following code could be used to read an email message " +"from a file on disk and pass it to the system ``sendmail`` program on a Unix " +"system:" +msgstr "" + +#: library/email.policy.rst:113 +msgid "" +"Here we are telling :class:`~email.generator.BytesGenerator` to use the RFC " +"correct line separator characters when creating the binary string to feed " +"into ``sendmail's`` ``stdin``, where the default policy would use ``\\n`` " +"line separators." +msgstr "" + +#: library/email.policy.rst:118 +msgid "" +"Some email package methods accept a *policy* keyword argument, allowing the " +"policy to be overridden for that method. For example, the following code " +"uses the :meth:`~email.message.Message.as_bytes` method of the *msg* object " +"from the previous example and writes the message to a file using the native " +"line separators for the platform on which it is running::" +msgstr "" + +#: library/email.policy.rst:129 +msgid "" +"Policy objects can also be combined using the addition operator, producing a " +"policy object whose settings are a combination of the non-default values of " +"the summed objects::" +msgstr "" + +#: library/email.policy.rst:137 +msgid "" +"This operation is not commutative; that is, the order in which the objects " +"are added matters. To illustrate::" +msgstr "" + +#: library/email.policy.rst:152 +msgid "" +"This is the :term:`abstract base class` for all policy classes. It provides " +"default implementations for a couple of trivial methods, as well as the " +"implementation of the immutability property, the :meth:`clone` method, and " +"the constructor semantics." +msgstr "" + +#: library/email.policy.rst:157 +msgid "" +"The constructor of a policy class can be passed various keyword arguments. " +"The arguments that may be specified are any non-method properties on this " +"class, plus any additional non-method properties on the concrete class. A " +"value specified in the constructor will override the default value for the " +"corresponding attribute." +msgstr "" + +#: library/email.policy.rst:163 +msgid "" +"This class defines the following properties, and thus values for the " +"following may be passed in the constructor of any policy class:" +msgstr "" + +#: library/email.policy.rst:169 +msgid "" +"The maximum length of any line in the serialized output, not counting the " +"end of line character(s). Default is 78, per :rfc:`5322`. A value of ``0`` " +"or :const:`None` indicates that no line wrapping should be done at all." +msgstr "" + +#: library/email.policy.rst:177 +msgid "" +"The string to be used to terminate lines in serialized output. The default " +"is ``\\n`` because that's the internal end-of-line discipline used by " +"Python, though ``\\r\\n`` is required by the RFCs." +msgstr "" + +#: library/email.policy.rst:184 +msgid "" +"Controls the type of Content Transfer Encodings that may be or are required " +"to be used. The possible values are:" +msgstr "" + +#: library/email.policy.rst:190 +msgid "``7bit``" +msgstr "``7bit``" + +#: library/email.policy.rst:190 +msgid "" +"all data must be \"7 bit clean\" (ASCII-only). This means that where " +"necessary data will be encoded using either quoted-printable or base64 " +"encoding." +msgstr "" + +#: library/email.policy.rst:194 +msgid "``8bit``" +msgstr "``8bit``" + +#: library/email.policy.rst:194 +msgid "" +"data is not constrained to be 7 bit clean. Data in headers is still " +"required to be ASCII-only and so will be encoded (see :meth:`fold_binary` " +"and :attr:`~EmailPolicy.utf8` below for exceptions), but body parts may use " +"the ``8bit`` CTE." +msgstr "" + +#: library/email.policy.rst:200 +msgid "" +"A ``cte_type`` value of ``8bit`` only works with ``BytesGenerator``, not " +"``Generator``, because strings cannot contain binary data. If a " +"``Generator`` is operating under a policy that specifies ``cte_type=8bit``, " +"it will act as if ``cte_type`` is ``7bit``." +msgstr "" + +#: library/email.policy.rst:208 +msgid "" +"If :const:`True`, any defects encountered will be raised as errors. If :" +"const:`False` (the default), defects will be passed to the :meth:" +"`register_defect` method." +msgstr "" + +#: library/email.policy.rst:215 +msgid "" +"If :const:`True`, lines starting with *\"From \"* in the body are escaped by " +"putting a ``>`` in front of them. This parameter is used when the message is " +"being serialized by a generator. Default: :const:`False`." +msgstr "" + +#: library/email.policy.rst:220 +msgid "The *mangle_from_* parameter." +msgstr "" + +#: library/email.policy.rst:226 +msgid "" +"A factory function for constructing a new empty message object. Used by the " +"parser when building messages. Defaults to ``None``, in which case :class:" +"`~email.message.Message` is used." +msgstr "" + +#: library/email.policy.rst:232 +msgid "" +"The following :class:`Policy` method is intended to be called by code using " +"the email library to create policy instances with custom settings:" +msgstr "" + +#: library/email.policy.rst:238 +msgid "" +"Return a new :class:`Policy` instance whose attributes have the same values " +"as the current instance, except where those attributes are given new values " +"by the keyword arguments." +msgstr "" + +#: library/email.policy.rst:243 +msgid "" +"The remaining :class:`Policy` methods are called by the email package code, " +"and are not intended to be called by an application using the email package. " +"A custom policy must implement all of these methods." +msgstr "" + +#: library/email.policy.rst:250 +msgid "" +"Handle a *defect* found on *obj*. When the email package calls this method, " +"*defect* will always be a subclass of :class:`~email.errors.Defect`." +msgstr "" + +#: library/email.policy.rst:254 +msgid "" +"The default implementation checks the :attr:`raise_on_defect` flag. If it " +"is ``True``, *defect* is raised as an exception. If it is ``False`` (the " +"default), *obj* and *defect* are passed to :meth:`register_defect`." +msgstr "" + +#: library/email.policy.rst:261 +msgid "" +"Register a *defect* on *obj*. In the email package, *defect* will always be " +"a subclass of :class:`~email.errors.Defect`." +msgstr "" + +#: library/email.policy.rst:264 +msgid "" +"The default implementation calls the ``append`` method of the ``defects`` " +"attribute of *obj*. When the email package calls :attr:`handle_defect`, " +"*obj* will normally have a ``defects`` attribute that has an ``append`` " +"method. Custom object types used with the email package (for example, " +"custom ``Message`` objects) should also provide such an attribute, otherwise " +"defects in parsed messages will raise unexpected errors." +msgstr "" + +#: library/email.policy.rst:274 +msgid "Return the maximum allowed number of headers named *name*." +msgstr "" + +#: library/email.policy.rst:276 +msgid "" +"Called when a header is added to an :class:`~email.message.EmailMessage` or :" +"class:`~email.message.Message` object. If the returned value is not ``0`` " +"or ``None``, and there are already a number of headers with the name *name* " +"greater than or equal to the value returned, a :exc:`ValueError` is raised." +msgstr "" + +#: library/email.policy.rst:282 +msgid "" +"Because the default behavior of ``Message.__setitem__`` is to append the " +"value to the list of headers, it is easy to create duplicate headers without " +"realizing it. This method allows certain headers to be limited in the " +"number of instances of that header that may be added to a ``Message`` " +"programmatically. (The limit is not observed by the parser, which will " +"faithfully produce as many headers as exist in the message being parsed.)" +msgstr "" + +#: library/email.policy.rst:290 +msgid "The default implementation returns ``None`` for all header names." +msgstr "" + +#: library/email.policy.rst:295 +msgid "" +"The email package calls this method with a list of strings, each string " +"ending with the line separation characters found in the source being " +"parsed. The first line includes the field header name and separator. All " +"whitespace in the source is preserved. The method should return the " +"``(name, value)`` tuple that is to be stored in the ``Message`` to represent " +"the parsed header." +msgstr "" + +#: library/email.policy.rst:302 +msgid "" +"If an implementation wishes to retain compatibility with the existing email " +"package policies, *name* should be the case preserved name (all characters " +"up to the '``:``' separator), while *value* should be the unfolded value " +"(all line separator characters removed, but whitespace kept intact), " +"stripped of leading whitespace." +msgstr "" + +#: library/email.policy.rst:308 +msgid "*sourcelines* may contain surrogateescaped binary data." +msgstr "" + +#: library/email.policy.rst:326 library/email.policy.rst:342 +msgid "There is no default implementation" +msgstr "" + +#: library/email.policy.rst:315 +msgid "" +"The email package calls this method with the name and value provided by the " +"application program when the application program is modifying a ``Message`` " +"programmatically (as opposed to a ``Message`` created by a parser). The " +"method should return the ``(name, value)`` tuple that is to be stored in the " +"``Message`` to represent the header." +msgstr "" + +#: library/email.policy.rst:321 +msgid "" +"If an implementation wishes to retain compatibility with the existing email " +"package policies, the *name* and *value* should be strings or string " +"subclasses that do not change the content of the passed in arguments." +msgstr "" + +#: library/email.policy.rst:331 +msgid "" +"The email package calls this method with the *name* and *value* currently " +"stored in the ``Message`` when that header is requested by the application " +"program, and whatever the method returns is what is passed back to the " +"application as the value of the header being retrieved. Note that there may " +"be more than one header with the same name stored in the ``Message``; the " +"method is passed the specific name and value of the header destined to be " +"returned to the application." +msgstr "" + +#: library/email.policy.rst:339 +msgid "" +"*value* may contain surrogateescaped binary data. There should be no " +"surrogateescaped binary data in the value returned by the method." +msgstr "" + +#: library/email.policy.rst:347 +msgid "" +"The email package calls this method with the *name* and *value* currently " +"stored in the ``Message`` for a given header. The method should return a " +"string that represents that header \"folded\" correctly (according to the " +"policy settings) by composing the *name* with the *value* and inserting :" +"attr:`linesep` characters at the appropriate places. See :rfc:`5322` for a " +"discussion of the rules for folding email headers." +msgstr "" + +#: library/email.policy.rst:354 +msgid "" +"*value* may contain surrogateescaped binary data. There should be no " +"surrogateescaped binary data in the string returned by the method." +msgstr "" + +#: library/email.policy.rst:360 +msgid "" +"The same as :meth:`fold`, except that the returned value should be a bytes " +"object rather than a string." +msgstr "" + +#: library/email.policy.rst:363 +msgid "" +"*value* may contain surrogateescaped binary data. These could be converted " +"back into binary data in the returned bytes object." +msgstr "" + +#: library/email.policy.rst:370 +msgid "" +"This concrete :class:`Policy` provides behavior that is intended to be fully " +"compliant with the current email RFCs. These include (but are not limited " +"to) :rfc:`5322`, :rfc:`2047`, and the current MIME RFCs." +msgstr "" + +#: library/email.policy.rst:374 +msgid "" +"This policy adds new header parsing and folding algorithms. Instead of " +"simple strings, headers are ``str`` subclasses with attributes that depend " +"on the type of the field. The parsing and folding algorithm fully " +"implement :rfc:`2047` and :rfc:`5322`." +msgstr "" + +#: library/email.policy.rst:379 +msgid "" +"The default value for the :attr:`~email.policy.Policy.message_factory` " +"attribute is :class:`~email.message.EmailMessage`." +msgstr "" + +#: library/email.policy.rst:382 +msgid "" +"In addition to the settable attributes listed above that apply to all " +"policies, this policy adds the following additional attributes:" +msgstr "" + +#: library/email.policy.rst:385 +msgid "[1]_" +msgstr "" + +#: library/email.policy.rst:390 +msgid "" +"If ``False``, follow :rfc:`5322`, supporting non-ASCII characters in headers " +"by encoding them as \"encoded words\". If ``True``, follow :rfc:`6532` and " +"use ``utf-8`` encoding for headers. Messages formatted in this way may be " +"passed to SMTP servers that support the ``SMTPUTF8`` extension (:rfc:`6531`)." +msgstr "" + +#: library/email.policy.rst:399 +msgid "" +"If the value for a header in the ``Message`` object originated from a :mod:" +"`~email.parser` (as opposed to being set by a program), this attribute " +"indicates whether or not a generator should refold that value when " +"transforming the message back into serialized form. The possible values are:" +msgstr "" + +#: library/email.policy.rst:406 +msgid "``none``" +msgstr "``none``" + +#: library/email.policy.rst:406 +msgid "all source values use original folding" +msgstr "" + +#: library/email.policy.rst:408 +msgid "``long``" +msgstr "``long``" + +#: library/email.policy.rst:408 +msgid "" +"source values that have any line that is longer than ``max_line_length`` " +"will be refolded" +msgstr "" + +#: library/email.policy.rst:411 +msgid "``all``" +msgstr "``all``" + +#: library/email.policy.rst:411 +msgid "all values are refolded." +msgstr "" + +#: library/email.policy.rst:414 +msgid "The default is ``long``." +msgstr "" + +#: library/email.policy.rst:419 +msgid "" +"A callable that takes two arguments, ``name`` and ``value``, where ``name`` " +"is a header field name and ``value`` is an unfolded header field value, and " +"returns a string subclass that represents that header. A default " +"``header_factory`` (see :mod:`~email.headerregistry`) is provided that " +"supports custom parsing for the various address and date :RFC:`5322` header " +"field types, and the major MIME header field stypes. Support for additional " +"custom parsing will be added in the future." +msgstr "" + +#: library/email.policy.rst:430 +msgid "" +"An object with at least two methods: get_content and set_content. When the :" +"meth:`~email.message.EmailMessage.get_content` or :meth:`~email.message." +"EmailMessage.set_content` method of an :class:`~email.message.EmailMessage` " +"object is called, it calls the corresponding method of this object, passing " +"it the message object as its first argument, and any arguments or keywords " +"that were passed to it as additional arguments. By default " +"``content_manager`` is set to :data:`~email.contentmanager.raw_data_manager`." +msgstr "" + +#: library/email.policy.rst:600 +msgid "" +"The class provides the following concrete implementations of the abstract " +"methods of :class:`Policy`:" +msgstr "" + +#: library/email.policy.rst:448 +msgid "" +"Returns the value of the :attr:`~email.headerregistry.BaseHeader.max_count` " +"attribute of the specialized class used to represent the header with the " +"given name." +msgstr "" + +#: library/email.policy.rst:606 +msgid "" +"The name is parsed as everything up to the '``:``' and returned unmodified. " +"The value is determined by stripping leading whitespace off the remainder of " +"the first line, joining all subsequent lines together, and stripping any " +"trailing carriage return or linefeed characters." +msgstr "" + +#: library/email.policy.rst:464 +msgid "" +"The name is returned unchanged. If the input value has a ``name`` attribute " +"and it matches *name* ignoring case, the value is returned unchanged. " +"Otherwise the *name* and *value* are passed to ``header_factory``, and the " +"resulting header object is returned as the value. In this case a " +"``ValueError`` is raised if the input value contains CR or LF characters." +msgstr "" + +#: library/email.policy.rst:474 +msgid "" +"If the value has a ``name`` attribute, it is returned to unmodified. " +"Otherwise the *name*, and the *value* with any CR or LF characters removed, " +"are passed to the ``header_factory``, and the resulting header object is " +"returned. Any surrogateescaped bytes get turned into the unicode unknown-" +"character glyph." +msgstr "" + +#: library/email.policy.rst:483 +msgid "" +"Header folding is controlled by the :attr:`refold_source` policy setting. A " +"value is considered to be a 'source value' if and only if it does not have a " +"``name`` attribute (having a ``name`` attribute means it is a header object " +"of some sort). If a source value needs to be refolded according to the " +"policy, it is converted into a header object by passing the *name* and the " +"*value* with any CR and LF characters removed to the ``header_factory``. " +"Folding of a header object is done by calling its ``fold`` method with the " +"current policy." +msgstr "" + +#: library/email.policy.rst:492 +msgid "" +"Source values are split into lines using :meth:`~str.splitlines`. If the " +"value is not to be refolded, the lines are rejoined using the ``linesep`` " +"from the policy and returned. The exception is lines containing non-ascii " +"binary data. In that case the value is refolded regardless of the " +"``refold_source`` setting, which causes the binary data to be CTE encoded " +"using the ``unknown-8bit`` charset." +msgstr "" + +#: library/email.policy.rst:502 +msgid "" +"The same as :meth:`fold` if :attr:`~Policy.cte_type` is ``7bit``, except " +"that the returned value is bytes." +msgstr "" + +#: library/email.policy.rst:505 +msgid "" +"If :attr:`~Policy.cte_type` is ``8bit``, non-ASCII binary data is converted " +"back into bytes. Headers with binary data are not refolded, regardless of " +"the ``refold_header`` setting, since there is no way to know whether the " +"binary data consists of single byte characters or multibyte characters." +msgstr "" + +#: library/email.policy.rst:512 +msgid "" +"The following instances of :class:`EmailPolicy` provide defaults suitable " +"for specific application domains. Note that in the future the behavior of " +"these instances (in particular the ``HTTP`` instance) may be adjusted to " +"conform even more closely to the RFCs relevant to their domains." +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``." +msgstr "" + +#: library/email.policy.rst:527 +msgid "" +"Suitable for serializing messages in conformance with the email RFCs. Like " +"``default``, but with ``linesep`` set to ``\\r\\n``, which is RFC compliant." +msgstr "" + +#: library/email.policy.rst:534 +msgid "" +"The same as ``SMTP`` except that :attr:`~EmailPolicy.utf8` is ``True``. " +"Useful for serializing messages to a message store without using encoded " +"words in the headers. Should only be used for SMTP transmission if the " +"sender or recipient addresses have non-ASCII characters (the :meth:`smtplib." +"SMTP.send_message` method handles this automatically)." +msgstr "" + +#: library/email.policy.rst:543 +msgid "" +"Suitable for serializing headers with for use in HTTP traffic. Like " +"``SMTP`` except that ``max_line_length`` is set to ``None`` (unlimited)." +msgstr "" + +#: library/email.policy.rst:549 +msgid "" +"Convenience instance. The same as ``default`` except that " +"``raise_on_defect`` is set to ``True``. This allows any policy to be made " +"strict by writing::" +msgstr "" + +#: library/email.policy.rst:556 +msgid "" +"With all of these :class:`EmailPolicies <.EmailPolicy>`, the effective API " +"of the email package is changed from the Python 3.2 API in the following " +"ways:" +msgstr "" + +#: library/email.policy.rst:559 +msgid "" +"Setting a header on a :class:`~email.message.Message` results in that header " +"being parsed and a header object created." +msgstr "" + +#: library/email.policy.rst:562 +msgid "" +"Fetching a header value from a :class:`~email.message.Message` results in " +"that header being parsed and a header object created and returned." +msgstr "" + +#: library/email.policy.rst:566 +msgid "" +"Any header object, or any header that is refolded due to the policy " +"settings, is folded using an algorithm that fully implements the RFC folding " +"algorithms, including knowing where encoded words are required and allowed." +msgstr "" + +#: library/email.policy.rst:571 +msgid "" +"From the application view, this means that any header obtained through the :" +"class:`~email.message.EmailMessage` is a header object with extra " +"attributes, whose string value is the fully decoded unicode value of the " +"header. Likewise, a header may be assigned a new value, or a new header " +"created, using a unicode string, and the policy will take care of converting " +"the unicode string into the correct RFC encoded form." +msgstr "" + +#: library/email.policy.rst:578 +msgid "" +"The header objects and their attributes are described in :mod:`~email." +"headerregistry`." +msgstr "" + +#: library/email.policy.rst:585 +msgid "" +"This concrete :class:`Policy` is the backward compatibility policy. It " +"replicates the behavior of the email package in Python 3.2. The :mod:" +"`~email.policy` module also defines an instance of this class, :const:" +"`compat32`, that is used as the default policy. Thus the default behavior " +"of the email package is to maintain compatibility with Python 3.2." +msgstr "" + +#: library/email.policy.rst:591 +msgid "" +"The following attributes have values that are different from the :class:" +"`Policy` default:" +msgstr "" + +#: library/email.policy.rst:597 +msgid "The default is ``True``." +msgstr "" + +#: library/email.policy.rst:614 +msgid "The name and value are returned unmodified." +msgstr "" + +#: library/email.policy.rst:619 +msgid "" +"If the value contains binary data, it is converted into a :class:`~email." +"header.Header` object using the ``unknown-8bit`` charset. Otherwise it is " +"returned unmodified." +msgstr "" + +#: library/email.policy.rst:626 +msgid "" +"Headers are folded using the :class:`~email.header.Header` folding " +"algorithm, which preserves existing line breaks in the value, and wraps each " +"resulting line to the ``max_line_length``. Non-ASCII binary data are CTE " +"encoded using the ``unknown-8bit`` charset." +msgstr "" + +#: library/email.policy.rst:634 +msgid "" +"Headers are folded using the :class:`~email.header.Header` folding " +"algorithm, which preserves existing line breaks in the value, and wraps each " +"resulting line to the ``max_line_length``. If ``cte_type`` is ``7bit``, non-" +"ascii binary data is CTE encoded using the ``unknown-8bit`` charset. " +"Otherwise the original source header is used, with its existing line breaks " +"and any (RFC invalid) binary data it may contain." +msgstr "" + +#: library/email.policy.rst:644 +msgid "" +"An instance of :class:`Compat32`, providing backward compatibility with the " +"behavior of the email package in Python 3.2." +msgstr "" + +#: library/email.policy.rst:649 +msgid "Footnotes" +msgstr "Notes" + +#: library/email.policy.rst:650 +msgid "" +"Originally added in 3.3 as a :term:`provisional feature `." +msgstr "" diff --git a/library/email.utils.po b/library/email.utils.po new file mode 100644 index 0000000000..14d7ec7958 --- /dev/null +++ b/library/email.utils.po @@ -0,0 +1,246 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-09-23 16:16+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \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" + +#: library/email.utils.rst:2 +msgid ":mod:`email.utils`: Miscellaneous utilities" +msgstr "" + +#: library/email.utils.rst:7 +#, fuzzy +msgid "**Source code:** :source:`Lib/email/utils.py`" +msgstr "**Code source :** :source:`Lib/email/parser.py`" + +#: library/email.utils.rst:11 +msgid "" +"There are a couple of useful utilities provided in the :mod:`email.utils` " +"module:" +msgstr "" + +#: library/email.utils.rst:16 +msgid "" +"Return local time as an aware datetime object. If called without arguments, " +"return current time. Otherwise *dt* argument should be a :class:`~datetime." +"datetime` instance, and it is converted to the local time zone according to " +"the system time zone database. If *dt* is naive (that is, ``dt.tzinfo`` is " +"``None``), it is assumed to be in local time. In this case, a positive or " +"zero value for *isdst* causes ``localtime`` to presume initially that summer " +"time (for example, Daylight Saving Time) is or is not (respectively) in " +"effect for the specified time. A negative value for *isdst* causes the " +"``localtime`` to attempt to divine whether summer time is in effect for the " +"specified time." +msgstr "" + +#: library/email.utils.rst:32 +msgid "" +"Returns a string suitable for an :rfc:`2822`\\ -compliant :mailheader:" +"`Message-ID` header. Optional *idstring* if given, is a string used to " +"strengthen the uniqueness of the message id. Optional *domain* if given " +"provides the portion of the msgid after the '@'. The default is the local " +"hostname. It is not normally necessary to override this default, but may be " +"useful certain cases, such as a constructing distributed system that uses a " +"consistent domain name across multiple hosts." +msgstr "" + +#: library/email.utils.rst:40 +msgid "Added the *domain* keyword." +msgstr "" + +#: library/email.utils.rst:44 +msgid "" +"The remaining functions are part of the legacy (``Compat32``) email API. " +"There is no need to directly use these with the new API, since the parsing " +"and formatting they provide is done automatically by the header parsing " +"machinery of the new API." +msgstr "" + +#: library/email.utils.rst:52 +msgid "" +"Return a new string with backslashes in *str* replaced by two backslashes, " +"and double quotes replaced by backslash-double quote." +msgstr "" + +#: library/email.utils.rst:58 +msgid "" +"Return a new string which is an *unquoted* version of *str*. If *str* ends " +"and begins with double quotes, they are stripped off. Likewise if *str* " +"ends and begins with angle brackets, they are stripped off." +msgstr "" + +#: library/email.utils.rst:65 +msgid "" +"Parse address -- which should be the value of some address-containing field " +"such as :mailheader:`To` or :mailheader:`Cc` -- into its constituent " +"*realname* and *email address* parts. Returns a tuple of that information, " +"unless the parse fails, in which case a 2-tuple of ``('', '')`` is returned." +msgstr "" + +#: library/email.utils.rst:73 +msgid "" +"The inverse of :meth:`parseaddr`, this takes a 2-tuple of the form " +"``(realname, email_address)`` and returns the string value suitable for a :" +"mailheader:`To` or :mailheader:`Cc` header. If the first element of *pair* " +"is false, then the second element is returned unmodified." +msgstr "" + +#: library/email.utils.rst:78 +msgid "" +"Optional *charset* is the character set that will be used in the :rfc:`2047` " +"encoding of the ``realname`` if the ``realname`` contains non-ASCII " +"characters. Can be an instance of :class:`str` or a :class:`~email.charset." +"Charset`. Defaults to ``utf-8``." +msgstr "" + +#: library/email.utils.rst:83 +msgid "Added the *charset* option." +msgstr "" + +#: library/email.utils.rst:89 +msgid "" +"This method returns a list of 2-tuples of the form returned by " +"``parseaddr()``. *fieldvalues* is a sequence of header field values as might " +"be returned by :meth:`Message.get_all `. " +"Here's a simple example that gets all the recipients of a message::" +msgstr "" + +#: library/email.utils.rst:105 +msgid "" +"Attempts to parse a date according to the rules in :rfc:`2822`. however, " +"some mailers don't follow that format as specified, so :func:`parsedate` " +"tries to guess correctly in such cases. *date* is a string containing an :" +"rfc:`2822` date, such as ``\"Mon, 20 Nov 1995 19:12:08 -0500\"``. If it " +"succeeds in parsing the date, :func:`parsedate` returns a 9-tuple that can " +"be passed directly to :func:`time.mktime`; otherwise ``None`` will be " +"returned. Note that indexes 6, 7, and 8 of the result tuple are not usable." +msgstr "" + +#: library/email.utils.rst:116 +msgid "" +"Performs the same function as :func:`parsedate`, but returns either ``None`` " +"or a 10-tuple; the first 9 elements make up a tuple that can be passed " +"directly to :func:`time.mktime`, and the tenth is the offset of the date's " +"timezone from UTC (which is the official term for Greenwich Mean Time) " +"[#]_. If the input string has no timezone, the last element of the tuple " +"returned is ``0``, which represents UTC. Note that indexes 6, 7, and 8 of " +"the result tuple are not usable." +msgstr "" + +#: library/email.utils.rst:126 +msgid "" +"The inverse of :func:`format_datetime`. Performs the same function as :func:" +"`parsedate`, but on success returns a :mod:`~datetime.datetime`; otherwise " +"``ValueError`` is raised if *date* contains an invalid value such as an hour " +"greater than 23 or a timezone offset not between -24 and 24 hours. If the " +"input date has a timezone of ``-0000``, the ``datetime`` will be a naive " +"``datetime``, and if the date is conforming to the RFCs it will represent a " +"time in UTC but with no indication of the actual source timezone of the " +"message the date comes from. If the input date has any other valid timezone " +"offset, the ``datetime`` will be an aware ``datetime`` with the " +"corresponding a :class:`~datetime.timezone` :class:`~datetime.tzinfo`." +msgstr "" + +#: library/email.utils.rst:142 +msgid "" +"Turn a 10-tuple as returned by :func:`parsedate_tz` into a UTC timestamp " +"(seconds since the Epoch). If the timezone item in the tuple is ``None``, " +"assume local time." +msgstr "" + +#: library/email.utils.rst:149 +msgid "Returns a date string as per :rfc:`2822`, e.g.::" +msgstr "" + +#: library/email.utils.rst:153 +msgid "" +"Optional *timeval* if given is a floating point time value as accepted by :" +"func:`time.gmtime` and :func:`time.localtime`, otherwise the current time is " +"used." +msgstr "" + +#: library/email.utils.rst:157 +msgid "" +"Optional *localtime* is a flag that when ``True``, interprets *timeval*, and " +"returns a date relative to the local timezone instead of UTC, properly " +"taking daylight savings time into account. The default is ``False`` meaning " +"UTC is used." +msgstr "" + +#: library/email.utils.rst:162 +msgid "" +"Optional *usegmt* is a flag that when ``True``, outputs a date string with " +"the timezone as an ascii string ``GMT``, rather than a numeric ``-0000``. " +"This is needed for some protocols (such as HTTP). This only applies when " +"*localtime* is ``False``. The default is ``False``." +msgstr "" + +#: library/email.utils.rst:170 +msgid "" +"Like ``formatdate``, but the input is a :mod:`datetime` instance. If it is " +"a naive datetime, it is assumed to be \"UTC with no information about the " +"source timezone\", and the conventional ``-0000`` is used for the timezone. " +"If it is an aware ``datetime``, then the numeric timezone offset is used. If " +"it is an aware timezone with offset zero, then *usegmt* may be set to " +"``True``, in which case the string ``GMT`` is used instead of the numeric " +"timezone offset. This provides a way to generate standards conformant HTTP " +"date headers." +msgstr "" + +#: library/email.utils.rst:184 +msgid "Decode the string *s* according to :rfc:`2231`." +msgstr "" + +#: library/email.utils.rst:189 +msgid "" +"Encode the string *s* according to :rfc:`2231`. Optional *charset* and " +"*language*, if given is the character set name and language name to use. If " +"neither is given, *s* is returned as-is. If *charset* is given but " +"*language* is not, the string is encoded using the empty string for " +"*language*." +msgstr "" + +#: library/email.utils.rst:197 +msgid "" +"When a header parameter is encoded in :rfc:`2231` format, :meth:`Message." +"get_param ` may return a 3-tuple containing " +"the character set, language, and value. :func:`collapse_rfc2231_value` " +"turns this into a unicode string. Optional *errors* is passed to the " +"*errors* argument of :class:`str`'s :func:`~str.encode` method; it defaults " +"to ``'replace'``. Optional *fallback_charset* specifies the character set " +"to use if the one in the :rfc:`2231` header is not known by Python; it " +"defaults to ``'us-ascii'``." +msgstr "" + +#: library/email.utils.rst:206 +msgid "" +"For convenience, if the *value* passed to :func:`collapse_rfc2231_value` is " +"not a tuple, it should be a string and it is returned unquoted." +msgstr "" + +#: library/email.utils.rst:212 +msgid "" +"Decode parameters list according to :rfc:`2231`. *params* is a sequence of " +"2-tuples containing elements of the form ``(content-type, string-value)``." +msgstr "" + +#: library/email.utils.rst:217 +msgid "Footnotes" +msgstr "Notes" + +#: library/email.utils.rst:218 +msgid "" +"Note that the sign of the timezone offset is the opposite of the sign of the " +"``time.timezone`` variable for the same timezone; the latter variable " +"follows the POSIX standard while this module follows :rfc:`2822`." +msgstr "" diff --git a/library/ensurepip.po b/library/ensurepip.po new file mode 100644 index 0000000000..8a9fa271d5 --- /dev/null +++ b/library/ensurepip.po @@ -0,0 +1,284 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-22 22:57+0100\n" +"PO-Revision-Date: 2021-10-17 12:41+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 3.0\n" + +#: library/ensurepip.rst:2 +msgid ":mod:`ensurepip` --- Bootstrapping the ``pip`` installer" +msgstr ":mod:`ensurepip` — Amorçage de l'installateur ``pip``" + +#: library/ensurepip.rst:10 +msgid "**Source code:** :source:`Lib/ensurepip`" +msgstr "" + +#: library/ensurepip.rst:14 +msgid "" +"The :mod:`ensurepip` package provides support for bootstrapping the ``pip`` " +"installer into an existing Python installation or virtual environment. This " +"bootstrapping approach reflects the fact that ``pip`` is an independent " +"project with its own release cycle, and the latest available stable version " +"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:21 +msgid "" +"In most cases, end users of Python shouldn't need to invoke this module " +"directly (as ``pip`` should be bootstrapped by default), but it may be " +"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:29 +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:36 +msgid ":ref:`installing-index`" +msgstr ":ref:`installing-index`" + +#: library/ensurepip.rst:36 +msgid "The end user guide for installing Python packages" +msgstr "Guide de l'utilisateur final pour installer des paquets Python" + +#: library/ensurepip.rst:38 +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:39 +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:43 +msgid "Command line interface" +msgstr "Interface en ligne de commande" + +#: library/ensurepip.rst:45 +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:47 +msgid "The simplest possible invocation is::" +msgstr "L'invocation la plus simple est ::" + +#: library/ensurepip.rst:51 +msgid "" +"This invocation will install ``pip`` if it is not already installed, but " +"otherwise does nothing. To ensure the installed version of ``pip`` is at " +"least as recent as the one available in ``ensurepip``, pass the ``--" +"upgrade`` option::" +msgstr "" +"Cette commande installe ``pip`` s'il n'est pas déjà présent. Sinon, elle ne " +"fait rien. Pour s'assurer que la version de ``pip`` est au moins aussi " +"récente que celle embarquée dans ``ensurepip``, passer l'option ``--" +"upgrade`` ::" + +#: library/ensurepip.rst:58 +msgid "" +"By default, ``pip`` is installed into the current virtual environment (if " +"one is active) or into the system site packages (if there is no active " +"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:63 +msgid "" +"``--root ``: Installs ``pip`` relative to the given root directory " +"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:66 +msgid "" +"``--user``: Installs ``pip`` into the user site packages directory rather " +"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:70 +msgid "" +"By default, the scripts ``pipX`` and ``pipX.Y`` will be installed (where X.Y " +"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:75 +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:78 +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:81 +msgid "" +"Providing both of the script selection options will trigger an exception." +msgstr "Combiner ces deux options conduit à une exception." + +#: library/ensurepip.rst:85 +msgid "Module API" +msgstr "API du module" + +#: library/ensurepip.rst:87 +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:91 +msgid "" +"Returns a string specifying the available version of pip that will be " +"installed when bootstrapping an environment." +msgstr "" +"Renvoie, sous forme de chaîne, la version de ``pip`` qui serait installée " +"par ``ensurepip``." + +#: library/ensurepip.rst:98 +msgid "Bootstraps ``pip`` into the current or designated environment." +msgstr "" +"Amorce ``pip`` dans l'environnement courant ou un environnement spécifique." + +#: library/ensurepip.rst:100 +msgid "" +"*root* specifies an alternative root directory to install relative to. If " +"*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:104 +msgid "" +"*upgrade* indicates whether or not to upgrade an existing installation of an " +"earlier version of ``pip`` to the available version." +msgstr "" +"*upgrade* indique s'il faut ou non effectuer la mise à jour d'une éventuelle " +"version plus ancienne de ``pip`` déjà installée vers la version embarquée " +"dans ``ensurepip``." + +#: library/ensurepip.rst:107 +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:110 +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:113 +msgid "If *altinstall* is set, then ``pipX`` will *not* be installed." +msgstr "Si *altinstall* vaut vrai, ``pipX`` n'est pas créée." + +#: library/ensurepip.rst:115 +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:118 +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:121 +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:124 +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:128 +msgid "" +"The bootstrapping process has side effects on both ``sys.path`` and ``os." +"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:134 +msgid "" +"The bootstrapping process may install additional modules required by " +"``pip``, but other software should not assume those dependencies will always " +"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 new file mode 100644 index 0000000000..c1504b4a39 --- /dev/null +++ b/library/enum.po @@ -0,0 +1,1385 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-03-18 17:06+0100\n" +"PO-Revision-Date: 2022-10-18 15:58+0200\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 3.0.1\n" + +#: library/enum.rst:2 +msgid ":mod:`enum` --- Support for enumerations" +msgstr ":mod:`enum` — Énumérations" + +#: library/enum.rst:14 +msgid "**Source code:** :source:`Lib/enum.py`" +msgstr "**Code source :** :source:`Lib/enum.py`" + +#: library/enum.rst:18 +msgid "" +"An enumeration is a set of symbolic names (members) bound to unique, " +"constant values. Within an enumeration, the members can be compared by " +"identity, and the enumeration itself can be iterated over." +msgstr "" +"Une énumération est un ensemble de noms symboliques, appelés *membres*, liés " +"à des valeurs constantes et uniques. Au sein d'une énumération, les membres " +"peuvent être comparés et il est possible d'itérer sur l'énumération elle-" +"même." + +#: library/enum.rst:22 +msgid "Case of Enum Members" +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" +msgstr "Contenu du module" + +#: library/enum.rst:32 +msgid "" +"This module defines four enumeration classes that can be used to define " +"unique sets of names and values: :class:`Enum`, :class:`IntEnum`, :class:" +"`Flag`, and :class:`IntFlag`. It also defines one decorator, :func:" +"`unique`, and one helper, :class:`auto`." +msgstr "" +"Ce module définit quatre classes d'énumération qui permettent de définir des " +"ensembles uniques de noms et de valeurs : :class:`Enum`, :class:`IntEnum`, :" +"class:`Flag` et :class:`IntFlag`. Il fournit également un décorateur, :func:" +"`unique`, ainsi qu'une classe utilitaire, :class:`auto`." + +#: library/enum.rst:39 +msgid "" +"Base class for creating enumerated constants. See section `Functional API`_ " +"for an alternate construction syntax." +msgstr "" +"Classe de base pour créer une énumération de constantes. Voir la section " +"`API par fonction`_ pour une syntaxe alternative de construction." + +#: library/enum.rst:44 +msgid "" +"Base class for creating enumerated constants that are also subclasses of :" +"class:`int`." +msgstr "" +"Classe de base pour créer une énumération de constantes qui sont également " +"des sous-classes de :class:`int`." + +#: library/enum.rst:49 +msgid "" +"Base class for creating enumerated constants that can be combined using the " +"bitwise operators without losing their :class:`IntFlag` membership. :class:" +"`IntFlag` members are also subclasses of :class:`int`." +msgstr "" +"Classe de base pour créer une énumération de constantes pouvant être " +"combinées avec des opérateurs de comparaison bit-à-bit, sans perdre leur " +"qualité de :class:`IntFlag`. Les membres de :class:`IntFlag` sont aussi des " +"sous-classes de :class:`int`." + +#: library/enum.rst:55 +msgid "" +"Base class for creating enumerated constants that can be combined using the " +"bitwise operations without losing their :class:`Flag` membership." +msgstr "" +"Classe de base pour créer une énumération de constantes pouvant être " +"combinées avec des opérateurs de comparaison bit-à-bit, sans perdre leur " +"qualité de :class:`Flag`." + +#: library/enum.rst:61 +msgid "" +"Enum class decorator that ensures only one name is bound to any one value." +msgstr "" +"Décorateur de classe qui garantit qu'une valeur ne puisse être associée qu'à " +"un seul nom." + +#: library/enum.rst:65 +msgid "" +"Instances are replaced with an appropriate value for Enum members. By " +"default, the initial value starts at 1." +msgstr "" +"Les instances sont remplacées par une valeur appropriée pour les membres de " +"l'énumération. Par défaut, la valeur initiale démarre à 1." + +#: library/enum.rst:67 +msgid "``Flag``, ``IntFlag``, ``auto``" +msgstr "``Flag``, ``IntFlag``, ``auto``" + +#: library/enum.rst:71 +msgid "Creating an Enum" +msgstr "Création d'une *Enum*" + +#: library/enum.rst:73 +msgid "" +"Enumerations are created using the :keyword:`class` syntax, which makes them " +"easy to read and write. An alternative creation method is described in " +"`Functional API`_. To define an enumeration, subclass :class:`Enum` as " +"follows::" +msgstr "" +"Une énumération est créée comme une :keyword:`class`, ce qui la rend facile " +"à lire et à écrire. Une autre méthode de création est décrite dans `API par " +"fonction`_. Pour définir une énumération, il faut hériter de :class:`Enum` " +"de la manière suivante ::" + +#: library/enum.rst:85 +msgid "Enum member values" +msgstr "Valeurs des membres d'une *Enum*" + +#: library/enum.rst:87 +msgid "" +"Member values can be anything: :class:`int`, :class:`str`, etc.. If the " +"exact value is unimportant you may use :class:`auto` instances and an " +"appropriate value will be chosen for you. Care must be taken if you mix :" +"class:`auto` with other values." +msgstr "" +"La valeur d'un membre peut être de n'importe quel type : :class:`int`, :" +"class:`str`, etc. Si la valeur exacte n'a pas d'importance, utilisez des " +"instances de :class:`auto` et une valeur appropriée sera choisie pour vous. " +"Soyez vigilant si vous mélangez :class:`auto` avec d'autres valeurs." + +#: library/enum.rst:92 +msgid "Nomenclature" +msgstr "Nomenclature" + +#: library/enum.rst:94 +msgid "The class :class:`Color` is an *enumeration* (or *enum*)" +msgstr "La classe :class:`Color` est une *énumération* (ou un *enum*)." + +#: library/enum.rst:95 +msgid "" +"The attributes :attr:`Color.RED`, :attr:`Color.GREEN`, etc., are " +"*enumeration members* (or *enum members*) and are functionally constants." +msgstr "" +"Les attributs :attr:`Color.RED`, :attr:`Color.GREEN`, etc., sont les " +"*membres de l'énumération* (ou les *membres de l'enum*) et sont " +"fonctionnellement des constantes." + +#: library/enum.rst:97 +msgid "" +"The enum members have *names* and *values* (the name of :attr:`Color.RED` is " +"``RED``, the value of :attr:`Color.BLUE` is ``3``, etc.)" +msgstr "" +"Les membres de *l'enum* ont chacun un *nom* et une *valeur* ; le nom de :" +"attr:`Color.RED` est ``RED``, la valeur de :attr:`Color.BLUE` est ``3``, etc." + +#: library/enum.rst:103 +msgid "" +"Even though we use the :keyword:`class` syntax to create Enums, Enums are " +"not normal Python classes. See `How are Enums different?`_ for more details." +msgstr "" +"Même si on utilise la syntaxe en :keyword:`class` pour créer des " +"énumérations, les *Enums* ne sont pas des vraies classes Python. Voir `En " +"quoi les Enums sont différentes ?`_ pour plus de détails." + +#: library/enum.rst:107 +msgid "Enumeration members have human readable string representations::" +msgstr "" +"Les membres d'une énumération ont une représentation en chaîne de caractères " +"compréhensible par un humain ::" + +#: library/enum.rst:112 +msgid "...while their ``repr`` has more information::" +msgstr "… tandis que leur ``repr`` contient plus d'informations ::" + +#: library/enum.rst:117 +msgid "The *type* of an enumeration member is the enumeration it belongs to::" +msgstr "Le *type* d'un membre est l'énumération auquel ce membre appartient ::" + +#: library/enum.rst:125 +msgid "Enum members also have a property that contains just their item name::" +msgstr "Les membres ont également un attribut qui contient leur nom ::" + +#: library/enum.rst:130 +msgid "Enumerations support iteration, in definition order::" +msgstr "" +"Les énumérations sont itérables, l'ordre d'itération est celui dans lequel " +"les membres sont déclarés ::" + +#: library/enum.rst:146 +msgid "" +"Enumeration members are hashable, so they can be used in dictionaries and " +"sets::" +msgstr "" +"Les membres d'une énumération sont hachables, ils peuvent ainsi être " +"utilisés dans des dictionnaires ou des ensembles ::" + +#: library/enum.rst:156 +msgid "Programmatic access to enumeration members and their attributes" +msgstr "Accès dynamique aux membres et à leurs attributs" + +#: library/enum.rst:158 +msgid "" +"Sometimes it's useful to access members in enumerations programmatically (i." +"e. situations where ``Color.RED`` won't do because the exact color is not " +"known at program-writing time). ``Enum`` allows such access::" +msgstr "" +"Il est parfois utile de pouvoir accéder dynamiquement aux membres d'une " +"énumération (p. ex. dans des situations où il ne suffit pas d'utiliser " +"``Color.RED`` car la couleur précise n'est pas connue à l'écriture du " +"programme). ``Enum`` permet de tels accès ::" + +#: library/enum.rst:167 +msgid "If you want to access enum members by *name*, use item access::" +msgstr "" +"Pour accéder aux membres par leur *nom*, utilisez l'accès par indexation ::" + +#: library/enum.rst:174 +msgid "If you have an enum member and need its :attr:`name` or :attr:`value`::" +msgstr "Pour obtenir l'attribut :attr:`name` ou :attr:`value` d'un membre ::" + +#: library/enum.rst:184 +msgid "Duplicating enum members and values" +msgstr "Duplication de membres et de valeurs" + +#: library/enum.rst:186 +msgid "Having two enum members with the same name is invalid::" +msgstr "" +"Il n'est pas possible d'avoir deux membres du même nom dans un *enum* ::" + +#: library/enum.rst:196 +msgid "" +"However, two enum members are allowed to have the same value. Given two " +"members A and B with the same value (and A defined first), B is an alias to " +"A. By-value lookup of the value of A and B will return A. By-name lookup " +"of B will also return A::" +msgstr "" +"Cependant deux membres peuvent avoir la même valeur. Si deux membres A et B " +"ont la même valeur (et que A est défini en premier), B sera un alias de A. " +"Un accès par valeur avec la valeur commune à A et B renverra A. Un accès à B " +"par nom renverra aussi A ::" + +#: library/enum.rst:216 +msgid "" +"Attempting to create a member with the same name as an already defined " +"attribute (another member, a method, etc.) or attempting to create an " +"attribute with the same name as a member is not allowed." +msgstr "" +"Il est interdit de créer un membre avec le même nom qu'un attribut déjà " +"défini (un autre membre, une méthode, etc.) ou de créer un attribut avec le " +"nom d'un membre." + +#: library/enum.rst:222 +msgid "Ensuring unique enumeration values" +msgstr "Coercition d'unicité des valeurs d'une énumération" + +#: library/enum.rst:224 +msgid "" +"By default, enumerations allow multiple names as aliases for the same value. " +"When this behavior isn't desired, the following decorator can be used to " +"ensure each value is used only once in the enumeration:" +msgstr "" +"Par défaut, les énumérations autorisent les alias de nom pour une même " +"valeur. Quand ce comportement n'est pas désiré, il faut utiliser le " +"décorateur suivant pour s'assurer que chaque valeur n'est utilisée qu'une " +"seule fois au sein de l'énumération : ::" + +#: library/enum.rst:230 +msgid "" +"A :keyword:`class` decorator specifically for enumerations. It searches an " +"enumeration's :attr:`__members__` gathering any aliases it finds; if any are " +"found :exc:`ValueError` is raised with the details::" +msgstr "" +"Un décorateur de :keyword:`class` spécifique aux énumérations. Il examine " +"l'attribut :attr:`__members__` d'une énumération et recherche des alias ; " +"s'il en trouve, l'exception :exc:`ValueError` est levée avec des détails ::" + +#: library/enum.rst:248 +msgid "Using automatic values" +msgstr "Valeurs automatiques" + +#: library/enum.rst:250 +msgid "If the exact value is unimportant you can use :class:`auto`::" +msgstr "" +"Si la valeur exacte n'a pas d'importance, vous pouvez utiliser :class:" +"`auto` ::" + +#: library/enum.rst:261 +msgid "" +"The values are chosen by :func:`_generate_next_value_`, which can be " +"overridden::" +msgstr "" +"Les valeurs sont déterminées par :func:`_generate_next_value_`, qui peut " +"être redéfinie ::" + +#: library/enum.rst:279 +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 :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" +msgstr "Itération" + +#: library/enum.rst:290 +msgid "Iterating over the members of an enum does not provide the aliases::" +msgstr "Itérer sur les membres d'une énumération ne parcourt pas les alias ::" + +#: library/enum.rst:295 +msgid "" +"The special attribute ``__members__`` is a read-only ordered mapping of " +"names to members. It includes all names defined in the enumeration, " +"including the aliases::" +msgstr "" +"L'attribut spécial ``__members__`` est un dictionnaire en lecture seule " +"ordonné qui fait correspondre les noms aux membres. Il inclut tous les noms " +"définis dans l'énumération, alias compris ::" + +#: library/enum.rst:307 +msgid "" +"The ``__members__`` attribute can be used for detailed programmatic access " +"to the enumeration members. For example, finding all the aliases::" +msgstr "" +"L'attribut ``__members__`` peut servir à accéder dynamiquement aux membres " +"de l'énumération. Par exemple, pour trouver tous les alias ::" + +#: library/enum.rst:315 +msgid "Comparisons" +msgstr "Comparaisons" + +#: library/enum.rst:317 +msgid "Enumeration members are compared by identity::" +msgstr "Les membres d'une énumération sont comparés par identité ::" + +#: library/enum.rst:326 +msgid "" +"Ordered comparisons between enumeration values are *not* supported. Enum " +"members are not integers (but see `IntEnum`_ below)::" +msgstr "" +"Les comparaisons d'ordre entre les valeurs d'une énumération n'existent " +"*pas* ; les membres d'un *enum* ne sont pas des entiers (voir cependant " +"`IntEnum`_ ci-dessous) ::" + +#: library/enum.rst:334 +msgid "Equality comparisons are defined though::" +msgstr "A contrario, les comparaisons d'égalité existent ::" + +#: library/enum.rst:343 +msgid "" +"Comparisons against non-enumeration values will always compare not equal " +"(again, :class:`IntEnum` was explicitly designed to behave differently, see " +"below)::" +msgstr "" +"Les comparaisons avec des valeurs ne provenant pas d'énumérations sont " +"toujours fausses (ici encore, :class:`IntEnum` a été conçue pour fonctionner " +"différemment, voir ci-dessous) ::" + +#: library/enum.rst:352 +msgid "Allowed members and attributes of enumerations" +msgstr "Membres et attributs autorisés dans une énumération" + +#: library/enum.rst:354 +msgid "" +"The examples above use integers for enumeration values. Using integers is " +"short and handy (and provided by default by the `Functional API`_), but not " +"strictly enforced. In the vast majority of use-cases, one doesn't care what " +"the actual value of an enumeration is. But if the value *is* important, " +"enumerations can have arbitrary values." +msgstr "" +"Les exemples précédents utilisent des entiers pour énumérer les valeurs. " +"C'est un choix concis et pratique (et implémenté par défaut dans l'`API par " +"fonction`_), mais ce n'est pas une obligation. Dans la majorité des cas, il " +"importe peu de connaître la valeur réelle d'une énumération. Il est " +"toutefois possible de donner une valeur arbitraire aux énumérations, si " +"cette valeur est *vraiment* significative." + +#: library/enum.rst:360 +msgid "" +"Enumerations are Python classes, and can have methods and special methods as " +"usual. If we have this enumeration::" +msgstr "" +"Les énumérations sont des classes Python et peuvent donc avoir des méthodes " +"et des méthodes spéciales. L'énumération suivante ::" + +#: library/enum.rst:380 +msgid "Then::" +msgstr "Amène ::" + +#: library/enum.rst:389 +msgid "" +"The rules for what is allowed are as follows: names that start and end with " +"a single underscore are reserved by enum and cannot be used; all other " +"attributes defined within an enumeration will become members of this " +"enumeration, with the exception of special methods (:meth:`__str__`, :meth:" +"`__add__`, etc.), descriptors (methods are also descriptors), and variable " +"names listed in :attr:`_ignore_`." +msgstr "" +"Les règles pour ce qui est autorisé sont les suivantes : les noms qui " +"commencent et finissent avec un seul tiret bas sont réservés par *enum* et " +"ne peuvent pas être utilisés ; tous les autres attributs définis dans " +"l'énumération en deviendront des membres, à l'exception des méthodes " +"spéciales (:meth:`__str__`, :meth:`__add__`, etc.), des descripteurs (les " +"méthodes sont aussi des descripteurs) et des noms de variable listés dans :" +"attr:`_ignore_`." + +#: library/enum.rst:396 +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 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" +msgstr "Restrictions sur l'héritage" + +#: library/enum.rst:404 +msgid "" +"A new :class:`Enum` class must have one base Enum class, up to one concrete " +"data type, and as many :class:`object`-based mixin classes as needed. The " +"order of these base classes is::" +msgstr "" +"Une nouvelle classe :class:`Enum` doit avoir une classe *Enum* de base, au " +"plus un type de données concret et autant de classes de mélange (basées sur :" +"class:`object`) que nécessaire. L'ordre de ces classes de base est le " +"suivant ::" + +#: library/enum.rst:411 +msgid "" +"Also, subclassing an enumeration is allowed only if the enumeration does not " +"define any members. So this is forbidden::" +msgstr "" +"Hériter d'une énumération n'est permis que si cette énumération ne définit " +"aucun membre. Le code suivant n'est pas autorisé ::" + +#: library/enum.rst:421 +msgid "But this is allowed::" +msgstr "Mais celui-ci est correct ::" + +#: library/enum.rst:432 +msgid "" +"Allowing subclassing of enums that define members would lead to a violation " +"of some important invariants of types and instances. On the other hand, it " +"makes sense to allow sharing some common behavior between a group of " +"enumerations. (See `OrderedEnum`_ for an example.)" +msgstr "" +"Autoriser l'héritage d'*enums* définissant des membres violerait des " +"invariants sur les types et les instances. D'un autre côté, il est logique " +"d'autoriser un groupe d'énumérations à partager un comportement commun (voir " +"par exemple `OrderedEnum`_)." + +#: library/enum.rst:439 +msgid "Pickling" +msgstr "Sérialisation" + +#: library/enum.rst:441 +msgid "Enumerations can be pickled and unpickled::" +msgstr "Les énumérations peuvent être sérialisées et déserialisées ::" + +#: library/enum.rst:448 +msgid "" +"The usual restrictions for pickling apply: picklable enums must be defined " +"in the top level of a module, since unpickling requires them to be " +"importable from that module." +msgstr "" +"Les restrictions habituelles de sérialisation s'appliquent : les *enums* à " +"sérialiser doivent être déclarés dans l'espace de nom de haut niveau du " +"module, car la déserialisation nécessite que ces *enums* puissent être " +"importés depuis ce module." + +#: library/enum.rst:454 +msgid "" +"With pickle protocol version 4 it is possible to easily pickle enums nested " +"in other classes." +msgstr "" +"Depuis la version 4 du protocole de *pickle*, il est possible de sérialiser " +"facilement des *enums* imbriqués dans d'autres classes." + +#: library/enum.rst:457 +msgid "" +"It is possible to modify how Enum members are pickled/unpickled by defining :" +"meth:`__reduce_ex__` in the enumeration class." +msgstr "" +"Redéfinir la méthode :meth:`__reduce_ex__` permet de modifier la " +"sérialisation ou la dé-sérialisation des membres d'une énumération." + +#: library/enum.rst:462 +msgid "Functional API" +msgstr "API par fonction" + +#: library/enum.rst:464 +msgid "" +"The :class:`Enum` class is callable, providing the following functional API::" +msgstr "" +"La :class:`Enum` est appelable et implémente l'API par fonction suivante ::" + +#: library/enum.rst:476 +msgid "" +"The semantics of this API resemble :class:`~collections.namedtuple`. The " +"first argument of the call to :class:`Enum` is the name of the enumeration." +msgstr "" +"La sémantique de cette API est similaire à :class:`~collections.namedtuple`. " +"Le premier argument de l'appel à :class:`Enum` est le nom de l'énumération." + +#: library/enum.rst:479 +msgid "" +"The second argument is the *source* of enumeration member names. It can be " +"a whitespace-separated string of names, a sequence of names, a sequence of 2-" +"tuples with key/value pairs, or a mapping (e.g. dictionary) of names to " +"values. The last two options enable assigning arbitrary values to " +"enumerations; the others auto-assign increasing integers starting with 1 " +"(use the ``start`` parameter to specify a different starting value). A new " +"class derived from :class:`Enum` is returned. In other words, the above " +"assignment to :class:`Animal` is equivalent to::" +msgstr "" +"Le second argument est la *source* des noms des membres de l'énumération. Il " +"peut être une chaîne de caractères contenant les noms séparés par des " +"espaces, une séquence de noms, une séquence de couples clé / valeur ou un " +"dictionnaire (p. ex. un *dict*) de valeurs indexées par des noms. Les deux " +"dernières options permettent d'affecter des valeurs arbitraires aux " +"énumérations ; les autres affectent automatiquement des entiers en " +"commençant par 1 (le paramètre ``start`` permet de changer la valeur de " +"départ). Ceci renvoie une nouvelle classe dérivée de :class:`Enum`. En " +"d'autres termes, la déclaration de :class:`Animal` ci-dessus équivaut à ::" + +#: library/enum.rst:495 +msgid "" +"The reason for defaulting to ``1`` as the starting number and not ``0`` is " +"that ``0`` is ``False`` in a boolean sense, but enum members all evaluate to " +"``True``." +msgstr "" +"La valeur de départ par défaut est ``1`` et non ``0`` car ``0`` au sens " +"booléen vaut ``False`` alors que tous les membres d'une *enum* valent " +"``True``." + +#: library/enum.rst:499 +msgid "" +"Pickling enums created with the functional API can be tricky as frame stack " +"implementation details are used to try and figure out which module the " +"enumeration is being created in (e.g. it will fail if you use a utility " +"function in separate module, and also may not work on IronPython or Jython). " +"The solution is to specify the module name explicitly as follows::" +msgstr "" +"La sérialisation d'énumérations créées avec l'API en fonction peut être " +"source de problèmes, car celle-ci repose sur des détails d'implémentation de " +"l'affichage de la pile d'appel pour tenter de déterminer dans quel module " +"l'énumération est créée (p. ex. elle échouera avec les fonctions utilitaires " +"provenant d'un module séparé et peut ne pas fonctionner avec IronPython ou " +"Jython). La solution consiste à préciser explicitement le nom du module " +"comme ceci ::" + +#: library/enum.rst:509 +msgid "" +"If ``module`` is not supplied, and Enum cannot determine what it is, the new " +"Enum members will not be unpicklable; to keep errors closer to the source, " +"pickling will be disabled." +msgstr "" +"Si ``module`` n'est pas fourni et que *Enum* ne peut pas le deviner, les " +"nouveaux membres de *l'Enum* ne seront pas déserialisables ; pour garder les " +"erreurs au plus près de leur origine, la sérialisation sera désactivée." + +#: library/enum.rst:513 +msgid "" +"The new pickle protocol 4 also, in some circumstances, relies on :attr:" +"`~definition.__qualname__` being set to the location where pickle will be " +"able to find the class. For example, if the class was made available in " +"class SomeData in the global scope::" +msgstr "" +"Le nouveau protocole version 4 de *pickle* se base lui aussi, dans certains " +"cas, sur le fait que :attr:`~definition.__qualname__` pointe sur l'endroit " +"où *pickle* peut trouver la classe. Par exemple, si la classe était " +"disponible depuis la classe *SomeData* dans l'espace de nom de plus haut " +"niveau ::" + +#: library/enum.rst:520 +msgid "The complete signature is::" +msgstr "La signature complète est la suivante ::" + +#: library/enum.rst:0 +msgid "value" +msgstr "value" + +#: library/enum.rst:524 +msgid "What the new Enum class will record as its name." +msgstr "Le nom de la la nouvelle classe *Enum*." + +#: library/enum.rst:0 +msgid "names" +msgstr "names" + +#: library/enum.rst:526 +msgid "" +"The Enum members. This can be a whitespace or comma separated string " +"(values will start at 1 unless otherwise specified)::" +msgstr "" +"Les membres de l'énumération. Une chaîne de caractères séparés par des " +"espaces ou des virgules (la valeur de départ est fixée à 1, sauf si " +"spécifiée autrement) ::" + +#: library/enum.rst:531 +msgid "or an iterator of names::" +msgstr "ou un itérateur sur les noms ::" + +#: library/enum.rst:535 +msgid "or an iterator of (name, value) pairs::" +msgstr "ou un itérateur sur les *n*-uplets (nom, valeur) ::" + +#: library/enum.rst:539 +msgid "or a mapping::" +msgstr "ou une correspondance ::" + +#: library/enum.rst:0 +msgid "module" +msgstr "module" + +#: library/enum.rst:543 +msgid "name of module where new Enum class can be found." +msgstr "nom du module dans lequel la classe *Enum* se trouve." + +#: library/enum.rst:0 +msgid "qualname" +msgstr "qualname" + +#: library/enum.rst:545 +msgid "where in module new Enum class can be found." +msgstr "localisation de la nouvelle classe *Enum* dans le module." + +#: library/enum.rst:0 +msgid "type" +msgstr "type" + +#: library/enum.rst:547 +msgid "type to mix in to new Enum class." +msgstr "le type à mélanger dans la nouvelle classe *Enum*." + +#: library/enum.rst:0 +msgid "start" +msgstr "start" + +#: library/enum.rst:549 +msgid "number to start counting at if only names are passed in." +msgstr "index de départ si uniquement des noms sont passés." + +#: library/enum.rst:551 +msgid "The *start* parameter was added." +msgstr "Ajout du paramètre *start*." + +#: library/enum.rst:556 +msgid "Derived Enumerations" +msgstr "Énumérations dérivées" + +#: library/enum.rst:559 +msgid "IntEnum" +msgstr "IntEnum" + +#: library/enum.rst:561 +msgid "" +"The first variation of :class:`Enum` that is provided is also a subclass of :" +"class:`int`. Members of an :class:`IntEnum` can be compared to integers; by " +"extension, integer enumerations of different types can also be compared to " +"each other::" +msgstr "" +"La première version dérivée de :class:`Enum` qui existe est aussi une sous-" +"classe de :class:`int`. Les membres de :class:`IntEnum` peuvent être " +"comparés à des entiers et, par extension, les comparaisons entre des " +"énumérations entières de type différent sont possibles ::" + +#: library/enum.rst:582 +msgid "" +"However, they still can't be compared to standard :class:`Enum` " +"enumerations::" +msgstr "" +"Elles ne peuvent cependant toujours pas être comparées à des énumérations " +"standards de :class:`Enum` ::" + +#: library/enum.rst:595 +msgid "" +":class:`IntEnum` values behave like integers in other ways you'd expect::" +msgstr "" +"Les valeurs de :class:`IntEnum` se comportent comme des entiers, comme on " +"pouvait s'y attendre ::" + +#: library/enum.rst:606 +msgid "IntFlag" +msgstr "IntFlag" + +#: library/enum.rst:608 +msgid "" +"The next variation of :class:`Enum` provided, :class:`IntFlag`, is also " +"based on :class:`int`. The difference being :class:`IntFlag` members can be " +"combined using the bitwise operators (&, \\|, ^, ~) and the result is still " +"an :class:`IntFlag` member. However, as the name implies, :class:`IntFlag` " +"members also subclass :class:`int` and can be used wherever an :class:`int` " +"is used. Any operation on an :class:`IntFlag` member besides the bit-wise " +"operations will lose the :class:`IntFlag` membership." +msgstr "" +"La version dérivée suivante de :class:`Enum` est :class:`IntFlag`. Elle est " +"aussi basée sur :class:`int`, à la différence près que les membres de :class:" +"`IntFlag` peuvent être combinés en utilisant les opérateurs bit-à-bit (&, " +"\\|, ^, ~) et que le résultat reste un membre de :class:`IntFlag`. " +"Cependant, comme le nom l'indique, les membres d'une classe :class:`IntFlag` " +"héritent aussi de :class:`int` et peuvent être utilisés là où un :class:" +"`int` est utilisé. Toute opération sur un membre d'une classe :class:" +"`IntFlag`, autre qu'un opérateur bit-à-bit lui fait perdre sa qualité de :" +"class:`IntFlag`." + +#: library/enum.rst:618 +msgid "Sample :class:`IntFlag` class::" +msgstr "Exemple d'une classe :class:`IntFlag` ::" + +#: library/enum.rst:634 +msgid "It is also possible to name the combinations::" +msgstr "Il est aussi possible de nommer les combinaisons ::" + +#: library/enum.rst:646 +msgid "" +"Another important difference between :class:`IntFlag` and :class:`Enum` is " +"that if no flags are set (the value is 0), its boolean evaluation is :data:" +"`False`::" +msgstr "" +"Une autre différence importante entre :class:`IntFlag` et :class:`Enum` est " +"que, si aucune option n'est activée (la valeur vaut 0), son évaluation " +"booléenne est :data:`False` ::" + +#: library/enum.rst:654 +msgid "" +"Because :class:`IntFlag` members are also subclasses of :class:`int` they " +"can be combined with them::" +msgstr "" +"Comme les membres d'une classe :class:`IntFlag` héritent aussi de :class:" +"`int`, ils peuvent être combinés avec eux ::" + +#: library/enum.rst:662 +msgid "Flag" +msgstr "Option" + +#: library/enum.rst:664 +msgid "" +"The last variation is :class:`Flag`. Like :class:`IntFlag`, :class:`Flag` " +"members can be combined using the bitwise operators (&, \\|, ^, ~). Unlike :" +"class:`IntFlag`, they cannot be combined with, nor compared against, any " +"other :class:`Flag` enumeration, nor :class:`int`. While it is possible to " +"specify the values directly it is recommended to use :class:`auto` as the " +"value and let :class:`Flag` select an appropriate value." +msgstr "" +"La dernière version dérivée est la classe :class:`Flag`. Comme :class:" +"`IntFlag`, les membres d'une classe :class:`Flag` peuvent être combinés en " +"utilisant les opérateurs de comparaison bit-à-bit. Cependant, à la " +"différence de :class:`IntFlag`, ils ne peuvent ni être combinés, ni être " +"comparés avec une autre énumération :class:`Flag`, ni avec :class:`int`. " +"Bien qu'il soit possible de définir directement les valeurs, il est " +"recommandé d'utiliser :class:`auto` comme valeur et de laisser :class:`Flag` " +"choisir une valeur appropriée." + +#: library/enum.rst:673 +msgid "" +"Like :class:`IntFlag`, if a combination of :class:`Flag` members results in " +"no flags being set, the boolean evaluation is :data:`False`::" +msgstr "" +"Comme avec :class:`IntFlag`, si une combinaison de membres d'une classe :" +"class:`Flag` n'active aucune option, l'évaluation booléenne de la " +"comparaison est :data:`False` ::" + +#: library/enum.rst:687 +msgid "" +"Individual flags should have values that are powers of two (1, 2, 4, " +"8, ...), while combinations of flags won't::" +msgstr "" +"Les options de base doivent avoir des puissances de deux pour valeurs (1, 2, " +"4, 8, ...) mais pas les combinaisons ::" + +#: library/enum.rst:699 +msgid "" +"Giving a name to the \"no flags set\" condition does not change its boolean " +"value::" +msgstr "" +"Donner un nom à la valeur « aucune option activée » ne change pas sa valeur " +"booléenne ::" + +#: library/enum.rst:715 +msgid "" +"For the majority of new code, :class:`Enum` and :class:`Flag` are strongly " +"recommended, since :class:`IntEnum` and :class:`IntFlag` break some semantic " +"promises of an enumeration (by being comparable to integers, and thus by " +"transitivity to other unrelated enumerations). :class:`IntEnum` and :class:" +"`IntFlag` should be used only in cases where :class:`Enum` and :class:`Flag` " +"will not do; for example, when integer constants are replaced with " +"enumerations, or for interoperability with other systems." +msgstr "" +"Dans la plupart des cas, il est fortement recommandé d'utiliser :class:" +"`Enum` et :class:`Flag` pour écrire du code nouveau, car :class:`IntEnum` " +"et :class:`IntFlag` violent certains principes sémantiques d'une énumération " +"(en pouvant être comparées à des entiers et donc, par transitivité, à " +"d'autres énumérations). :class:`IntEnum` et :class:`IntFlag` ne doivent être " +"utilisées que dans les cas où :class:`Enum` et :class:`Flag` ne suffisent " +"pas ; par exemple quand des constantes entières sont remplacées par des " +"énumérations, ou pour l’interopérabilité avec d'autres systèmes." + +#: library/enum.rst:725 +msgid "Others" +msgstr "Autres" + +#: library/enum.rst:727 +msgid "" +"While :class:`IntEnum` is part of the :mod:`enum` module, it would be very " +"simple to implement independently::" +msgstr "" +"Bien que :class:`IntEnum` fasse partie du module :mod:`enum`, elle serait " +"très simple à implémenter hors de ce module ::" + +#: library/enum.rst:733 +msgid "" +"This demonstrates how similar derived enumerations can be defined; for " +"example a :class:`StrEnum` that mixes in :class:`str` instead of :class:" +"`int`." +msgstr "" +"Ceci montre comment définir des énumérations dérivées similaires ; par " +"exemple une classe :class:`StrEnum` qui dériverait de :class:`str` au lieu " +"de :class:`int`." + +#: library/enum.rst:736 +msgid "Some rules:" +msgstr "Quelques règles :" + +#: library/enum.rst:738 +msgid "" +"When subclassing :class:`Enum`, mix-in types must appear before :class:" +"`Enum` itself in the sequence of bases, as in the :class:`IntEnum` example " +"above." +msgstr "" +"Pour hériter de :class:`Enum`, les types de mélange doivent être placés " +"avant la classe :class:`Enum` elle-même dans la liste des classes de base, " +"comme dans l'exemple de :class:`IntEnum` ci-dessus." + +#: library/enum.rst:741 +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:" +"`int` above. This restriction does not apply to mix-ins which only add " +"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 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 "" +"When another data type is mixed in, the :attr:`value` attribute is *not the " +"same* as the enum member itself, although it is equivalent and will compare " +"equal." +msgstr "" +"Quand un autre type de données est mélangé, l'attribut :attr:`value` n'est " +"*pas* identique au membre de l'énumération lui-même, bien qu'ils soient " +"équivalents et égaux en comparaison." + +#: 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." +msgstr "" +"Formatage de style *%* : ``%s`` et ``%r`` appellent respectivement les " +"méthodes :meth:`__str__` et :meth:`__repr__` de la classe :class:`Enum` ; " +"les autres codes, comme ``%i`` ou ``%h`` pour *IntEnum*, s'appliquent au " +"membre comme si celui-ci était converti en son type de mélange." + +#: library/enum.rst:751 +msgid "" +":ref:`Formatted string literals `, :meth:`str.format`, and :func:" +"`format` will use the mixed-in type's :meth:`__format__` unless :meth:" +"`__str__` or :meth:`__format__` is overridden in the subclass, in which case " +"the overridden methods or :class:`Enum` methods will be used. Use the !s " +"and !r format codes to force usage of the :class:`Enum` class's :meth:" +"`__str__` and :meth:`__repr__` methods." +msgstr "" +"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__`" +msgstr "Quand utiliser :meth:`__new__` ou :meth:`__init__`" + +#: library/enum.rst:761 +msgid "" +":meth:`__new__` must be used whenever you want to customize the actual value " +"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 "" +"For example, if you want to pass several items to the constructor, but only " +"want one of them to be the value::" +msgstr "" +"Par exemple, si vous voulez passer plusieurs éléments au constructeur, mais " +"qu'un seul d'entre eux soit la valeur ::" + +#: library/enum.rst:791 +msgid "Interesting examples" +msgstr "Exemples intéressants" + +#: library/enum.rst:793 +msgid "" +"While :class:`Enum`, :class:`IntEnum`, :class:`IntFlag`, and :class:`Flag` " +"are expected to cover the majority of use-cases, they cannot cover them " +"all. Here are recipes for some different types of enumerations that can be " +"used directly, or as examples for creating one's own." +msgstr "" +"Bien que :class:`Enum`, :class:`IntEnum`, :class:`IntFlag` et :class:`Flag` " +"soient conçues pour répondre à la majorité des besoins, elles ne peuvent " +"répondre à tous. Voici quelques recettes d'énumération qui peuvent être " +"réutilisées telles quelles, ou peuvent servir d'exemple pour développer vos " +"propres énumérations." + +#: library/enum.rst:800 +msgid "Omitting values" +msgstr "Omettre les valeurs" + +#: library/enum.rst:802 +msgid "" +"In many use-cases one doesn't care what the actual value of an enumeration " +"is. There are several ways to define this type of simple enumeration:" +msgstr "" +"Dans de nombreux cas, la valeur réelle de l'énumération n'a pas " +"d'importance. Il y a plusieurs façons de définir ce type d'énumération " +"simple :" + +#: library/enum.rst:805 +msgid "use instances of :class:`auto` for the value" +msgstr "affecter des instances de :class:`auto` aux valeurs" + +#: library/enum.rst:806 +msgid "use instances of :class:`object` as the value" +msgstr "affecter des instances de :class:`object` aux valeurs" + +#: library/enum.rst:807 +msgid "use a descriptive string as the value" +msgstr "affecter des chaînes de caractères aux valeurs pour les décrire" + +#: library/enum.rst:808 +msgid "" +"use a tuple as the value and a custom :meth:`__new__` to replace the tuple " +"with an :class:`int` value" +msgstr "" +"affecter un *n*-uplet aux valeurs et définir une méthode :meth:`__new__` " +"pour remplacer les *n*-uplets avec un :class:`int`" + +#: library/enum.rst:811 +msgid "" +"Using any of these methods signifies to the user that these values are not " +"important, and also enables one to add, remove, or reorder members without " +"having to renumber the remaining members." +msgstr "" +"Utiliser une de ces méthodes indique à l'utilisateur que les valeurs n'ont " +"pas d'importance. Cela permet aussi d'ajouter, de supprimer ou de ré-" +"ordonner les membres sans avoir à ré-énumérer les membres existants." + +#: library/enum.rst:815 +msgid "" +"Whichever method you choose, you should provide a :meth:`repr` that also " +"hides the (unimportant) value::" +msgstr "" +"Quelle que soit la méthode choisie, il faut fournir une méthode :meth:`repr` " +"qui masque les valeurs (pas importantes de toute façon) ::" + +#: library/enum.rst:825 +msgid "Using :class:`auto`" +msgstr "Avec :class:`auto`" + +#: library/enum.rst:827 +msgid "Using :class:`auto` would look like::" +msgstr "On utilise :class:`auto` de la manière suivante ::" + +#: library/enum.rst:839 +msgid "Using :class:`object`" +msgstr "Avec :class:`object`" + +#: library/enum.rst:841 +msgid "Using :class:`object` would look like::" +msgstr "On utilise :class:`object` de la manière suivante ::" + +#: library/enum.rst:853 +msgid "Using a descriptive string" +msgstr "Avec une chaîne de caractères de description" + +#: library/enum.rst:855 +msgid "Using a string as the value would look like::" +msgstr "On utilise une chaîne de caractères de la manière suivante ::" + +#: library/enum.rst:869 +msgid "Using a custom :meth:`__new__`" +msgstr "Avec une méthode ad-hoc :meth:`__new__`" + +#: library/enum.rst:871 +msgid "Using an auto-numbering :meth:`__new__` would look like::" +msgstr "" +"On utilise une méthode :meth:`__new__` d'énumération de la manière " +"suivante ::" + +#: library/enum.rst:890 +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 "" +"The :meth:`__new__` method, if defined, is used during creation of the Enum " +"members; it is then replaced by Enum's :meth:`__new__` which is used after " +"class creation for lookup of existing members." +msgstr "" +"La méthode :meth:`__new__`, si définie, est appelée à la création des " +"membres de l'énumération ; elle est ensuite remplacée par la méthode :meth:" +"`__new__` de *Enum*, qui est utilisée après la création de la classe pour la " +"recherche des membres existants." + +#: library/enum.rst:925 +msgid "OrderedEnum" +msgstr "OrderedEnum" + +#: library/enum.rst:927 +msgid "" +"An ordered enumeration that is not based on :class:`IntEnum` and so " +"maintains the normal :class:`Enum` invariants (such as not being comparable " +"to other enumerations)::" +msgstr "" +"Une énumération ordonnée qui n'est pas basée sur :class:`IntEnum` et qui, " +"par conséquent, respecte les invariants classiques de :class:`Enum` (comme " +"par exemple l'impossibilité de pouvoir être comparée à d'autres " +"énumérations) ::" + +#: library/enum.rst:961 +msgid "DuplicateFreeEnum" +msgstr "DuplicateFreeEnum" + +#: library/enum.rst:963 +msgid "" +"Raises an error if a duplicate member name is found instead of creating an " +"alias::" +msgstr "" +"Lève une erreur si un membre est dupliqué, plutôt que de créer un alias ::" + +#: library/enum.rst:988 +msgid "" +"This is a useful example for subclassing Enum to add or change other " +"behaviors as well as disallowing aliases. If the only desired change is " +"disallowing aliases, the :func:`unique` decorator can be used instead." +msgstr "" +"Cet exemple d'héritage de *Enum* est intéressant pour ajouter ou modifier " +"des comportements comme interdire les alias. Si vous ne souhaitez " +"qu'interdire les alias, il suffit d'utiliser le décorateur :func:`unique`." + +#: library/enum.rst:994 +msgid "Planet" +msgstr "Planet" + +#: library/enum.rst:996 +msgid "" +"If :meth:`__new__` or :meth:`__init__` is defined the value of the enum " +"member will be passed to those methods::" +msgstr "" +"Si :meth:`__new__` ou :meth:`__init__` sont définies, la valeur du membre de " +"l'énumération sera passée à ces méthodes ::" + +#: library/enum.rst:1024 +msgid "TimePeriod" +msgstr "TimePeriod" + +#: library/enum.rst:1026 +msgid "An example to show the :attr:`_ignore_` attribute in use::" +msgstr "Exemple d'utilisation de l'attribut :attr:`_ignore_` ::" + +#: library/enum.rst:1043 +msgid "How are Enums different?" +msgstr "En quoi les *Enums* sont différentes ?" + +#: library/enum.rst:1045 +msgid "" +"Enums have a custom metaclass that affects many aspects of both derived Enum " +"classes and their instances (members)." +msgstr "" +"Les *enums* ont une métaclasse spéciale qui affecte de nombreux aspects des " +"classes dérivées de *Enum* et de leurs instances (membres)." + +#: library/enum.rst:1050 +msgid "Enum Classes" +msgstr "Classes *Enum*" + +#: library/enum.rst:1052 +msgid "" +"The :class:`EnumMeta` metaclass is responsible for providing the :meth:" +"`__contains__`, :meth:`__dir__`, :meth:`__iter__` and other methods that " +"allow one to do things with an :class:`Enum` class that fail on a typical " +"class, such as `list(Color)` or `some_enum_var in Color`. :class:`EnumMeta` " +"is responsible for ensuring that various other methods on the final :class:" +"`Enum` class are correct (such as :meth:`__new__`, :meth:`__getnewargs__`, :" +"meth:`__str__` and :meth:`__repr__`)." +msgstr "" +"La métaclasse :class:`EnumMeta` se charge de fournir les méthodes :meth:" +"`__contains__`, :meth:`__dir__`, :meth:`__iter__` etc. qui permettent de " +"faire des opérations sur une classe :class:`Enum` qui ne fonctionneraient " +"pas sur une classe standard, comme ``list(Color)`` ou ``some_enum_var in " +"Color``. :class:`EnumMeta` garantit que les autres méthodes de la classe " +"finale :class:`Enum` sont correctes (comme :meth:`__new__`, :meth:" +"`__getnewargs__`, :meth:`__str__` et :meth:`__repr__`)." + +#: library/enum.rst:1062 +msgid "Enum Members (aka instances)" +msgstr "Membres d'Enum (c.-à-d. instances)" + +#: library/enum.rst:1064 +msgid "" +"The most interesting thing about Enum members is that they are singletons. :" +"class:`EnumMeta` creates them all while it is creating the :class:`Enum` " +"class itself, and then puts a custom :meth:`__new__` in place to ensure that " +"no new ones are ever instantiated by returning only the existing member " +"instances." +msgstr "" +"Il est intéressant de souligner que les membres d'une *Enum* sont des " +"singletons. La classe :class:`EnumMeta` les crée tous au moment de la " +"création de la classe :class:`Enum` elle-même et implémente une méthode :" +"meth:`__new__` spécifique. Cette méthode renvoie toujours les instances de " +"membres déjà existantes pour être sûr de ne jamais en instancier de " +"nouvelles." + +#: library/enum.rst:1072 +msgid "Finer Points" +msgstr "Aspects approfondis" + +#: library/enum.rst:1075 +msgid "Supported ``__dunder__`` names" +msgstr "Noms de la forme ``__dunder__`` disponibles" + +#: library/enum.rst:1077 +msgid "" +":attr:`__members__` is a read-only ordered mapping of ``member_name``:" +"``member`` items. It is only available on the class." +msgstr "" +":attr:`__members__` est un dictionnaire en lecture seule ordonné d'éléments " +"``nom_du_membre`` / ``membre``. Il n'est disponible que depuis la classe." + +#: library/enum.rst:1080 +msgid "" +":meth:`__new__`, if specified, must create and return the enum members; it " +"is also a very good idea to set the member's :attr:`_value_` appropriately. " +"Once all the members are created it is no longer used." +msgstr "" +"La méthode :meth:`__new__`, si elle est définie, doit créer et renvoyer les " +"membres de l'énumération ; affecter correctement l'attribut :attr:`_value_` " +"du membre est également conseillé. Une fois que tous les membres ont été " +"créés, cette méthode n'est plus utilisée." + +#: library/enum.rst:1086 +msgid "Supported ``_sunder_`` names" +msgstr "Noms de la forme ``_sunder_`` disponibles" + +#: library/enum.rst:1088 +msgid "``_name_`` -- name of the member" +msgstr "``_name_`` -- nom du membre" + +#: library/enum.rst:1089 +msgid "" +"``_value_`` -- value of the member; can be set / modified in ``__new__``" +msgstr "" +"``_value_`` -- valeur du membre ; il est possible d'y accéder ou de la muer " +"dans ``__new__``" + +#: library/enum.rst:1091 +msgid "" +"``_missing_`` -- a lookup function used when a value is not found; may be " +"overridden" +msgstr "" +"``_missing_`` -- une fonction de recherche qui est appelée quand la valeur " +"n'est pas trouvée ; elle peut être redéfinie" + +#: library/enum.rst:1093 +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 d'une :func:`list` ou " +"d'une :func:`str`, qui ne seront pas convertis en membres et seront " +"supprimés de la classe résultante" + +#: library/enum.rst:1096 +msgid "" +"``_order_`` -- used in Python 2/3 code to ensure member order is consistent " +"(class attribute, removed during class creation)" +msgstr "" +"``_order_`` -- utilisé en Python 2 ou 3 pour s'assurer que l'ordre des " +"membres est cohérent (attribut de classe, supprimé durant la création de la " +"classe)" + +#: library/enum.rst:1098 +msgid "" +"``_generate_next_value_`` -- used by the `Functional API`_ and by :class:" +"`auto` to get an appropriate value for an enum member; may be overridden" +msgstr "" +"``_generate_next_value_`` -- utilisée par l' `API par fonction`_ et par :" +"class:`auto` pour obtenir une valeur appropriée à affecter à un membre de " +"*l'enum* ; elle peut être redéfinie" + +#: library/enum.rst:1102 +msgid "``_missing_``, ``_order_``, ``_generate_next_value_``" +msgstr "``_missing_``, ``_order_``, ``_generate_next_value_``" + +#: library/enum.rst:1103 +msgid "``_ignore_``" +msgstr "``_ignore_``" + +#: library/enum.rst:1105 +msgid "" +"To help keep Python 2 / Python 3 code in sync an :attr:`_order_` attribute " +"can be provided. It will be checked against the actual order of the " +"enumeration and raise an error if the two do not match::" +msgstr "" +"Pour faciliter la transition de Python 2 en Python 3, l'attribut :attr:" +"`_order_` peut être défini. Il sera comparé au véritable ordre de " +"l'énumération et lève une erreur si les deux ne correspondent pas ::" + +#: library/enum.rst:1121 +msgid "" +"In Python 2 code the :attr:`_order_` attribute is necessary as definition " +"order is lost before it can be recorded." +msgstr "" +"En Python 2, l'attribut :attr:`_order_` est indispensable car l'ordre de la " +"définition est perdu avant de pouvoir être enregistré." + +#: library/enum.rst:1126 +msgid "_Private__names" +msgstr "_Noms__privés" + +#: library/enum.rst:1128 +msgid "" +":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.10 will issue a :exc:" +"`DeprecationWarning`." +msgstr "" +"Les :ref:`noms privés ` seront des attributs " +"habituels avec Python 3.11 et non plus des erreurs ou membres (selon si le " +"nom termine par tiret bas ou non). Utiliser ces noms avec Python 3.10 lèvera " +"un :exc:`DeprecationWarning`." + +#: library/enum.rst:1134 +msgid "``Enum`` member type" +msgstr "Type des membres de ``Enum``" + +#: library/enum.rst:1136 +msgid "" +":class:`Enum` members are instances of their :class:`Enum` class, and are " +"normally accessed as ``EnumClass.member``. Under certain circumstances they " +"can also be accessed as ``EnumClass.member.member``, but you should never do " +"this as that lookup may fail or, worse, return something besides the :class:" +"`Enum` member you are looking for (this is another good reason to use all-" +"uppercase names for members)::" +msgstr "" +"Les membres de :class:`Enum` sont des instances de leur classe :class:" +"`Enum`. On y accède normalement par ``ClasseEnum.membre``. Dans certains " +"cas, on peut également y accéder par ``ClasseEnum.membre.membre``, mais ceci " +"est fortement déconseillé car cette indirection est susceptible d'échouer, " +"ou pire, de ne pas renvoyer le membre de la classe :class:`Enum` désiré " +"(c'est une autre bonne raison pour définir tous les noms des membres en " +"majuscules) ::" + +#: 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: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 " +"type's rules; otherwise, all members evaluate as :data:`True`. To make your " +"own Enum's boolean evaluation depend on the member's value add the following " +"to your class::" +msgstr "" +"Les membres d'une classe :class:`Enum` mélangée avec un type non dérivé de :" +"class:`Enum` (comme :class:`int`, :class:`str`, etc.) sont évalués selon les " +"règles du type de mélange. Sinon, tous les membres valent :data:`True`. Pour " +"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:1172 +msgid ":class:`Enum` classes always evaluate as :data:`True`." +msgstr "Les classes :class:`Enum` valent toujours :data:`True`." + +#: library/enum.rst:1176 +msgid "``Enum`` classes with methods" +msgstr "Classes ``Enum`` avec des méthodes" + +#: 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 " +"not of the class::" +msgstr "" +"Si votre classe :class:`Enum` contient des méthodes supplémentaires, comme " +"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:1189 +msgid "Combining members of ``Flag``" +msgstr "Combinaison de membres de ``Flag``" + +#: 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::" +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)`` will produce something " +"like ````." +msgstr "" +"En 3.11, les combinaisons non-nommées de ``Flag`` ne renverront que les " +"*flags* canoniques (*flags* associés à une unique valeur). Donc ``Color(7)`` " +"renverra ````." diff --git a/library/errno.po b/library/errno.po new file mode 100644 index 0000000000..577d4f5bf9 --- /dev/null +++ b/library/errno.po @@ -0,0 +1,663 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-04-05 10:05+0200\n" +"PO-Revision-Date: 2019-06-10 15:48+0200\n" +"Last-Translator: Dylan Gouin \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\n" + +#: library/errno.rst:2 +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 all-" +"inclusive." +msgstr "" +"Ce module met à disposition des symboles du système standard ``errno``. La " +"valeur de chaque symbole est la valeur entière correspondante. Les noms et " +"les descriptions sont empruntés à :file:`linux/include/errno.h`, qui devrait " +"être assez exhaustif." + +#: library/errno.rst:17 +msgid "" +"Dictionary providing a mapping from the errno value to the string name in " +"the underlying system. For instance, ``errno.errorcode[errno.EPERM]`` maps " +"to ``'EPERM'``." +msgstr "" +"Dictionnaire associant la valeur *errno* au nom de chaîne dans le système " +"sous-jacent. Par exemple, ``errno.errorcode[errno.EPERM]`` correspond à " +"``'EPERM'``." + +#: library/errno.rst:21 +msgid "" +"To translate a numeric error code to an error message, use :func:`os." +"strerror`." +msgstr "" +"Pour traduire un code d'erreur en message d'erreur, utilisez :func:`os." +"strerror`." + +#: library/errno.rst:23 +msgid "" +"Of the following list, symbols that are not used on the current platform are " +"not defined by the module. The specific list of defined symbols is " +"available as ``errno.errorcode.keys()``. Symbols available can include:" +msgstr "" +"De la liste suivante, les symboles qui ne sont pas utilisés dans la " +"plateforme actuelle ne sont pas définis par le module. La liste spécifique " +"des symboles définis est disponible comme ``errno.errorcode.keys()``. Les " +"symboles disponibles font partie de cette liste :" + +#: library/errno.rst:30 +#, 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: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: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 +#, 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:54 +msgid "I/O error" +msgstr "Erreur d'entrée-sortie" + +#: library/errno.rst:59 +msgid "No such device or address" +msgstr "Dispositif ou adresse inexistant" + +#: library/errno.rst:64 +msgid "Arg list too long" +msgstr "Liste d'arguments trop longue" + +#: library/errno.rst:69 +msgid "Exec format error" +msgstr "Erreur de format d'exécution" + +#: library/errno.rst:74 +msgid "Bad file number" +msgstr "Mauvais descripteur de fichier" + +#: 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: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:90 +msgid "Out of memory" +msgstr "Mémoire insuffisante" + +#: 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:101 +msgid "Bad address" +msgstr "Mauvaise adresse" + +#: library/errno.rst:106 +msgid "Block device required" +msgstr "Dispositif de bloc requis" + +#: library/errno.rst:111 +msgid "Device or resource busy" +msgstr "Dispositif ou ressource occupé" + +#: 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:122 +msgid "Cross-device link" +msgstr "Lien inapproprié" + +#: library/errno.rst:127 +msgid "No such device" +msgstr "Dispositif inexistant" + +#: 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:149 +msgid "File table overflow" +msgstr "Plus de descripteur de fichier disponible" + +#: library/errno.rst:154 +msgid "Too many open files" +msgstr "Trop de fichiers ouverts" + +#: library/errno.rst:159 +msgid "Not a typewriter" +msgstr "Opération de contrôle d'entrée-sortie invalide" + +#: library/errno.rst:164 +msgid "Text file busy" +msgstr "Fichier texte occupé" + +#: library/errno.rst:169 +msgid "File too large" +msgstr "Fichier trop grand" + +#: library/errno.rst:174 +msgid "No space left on device" +msgstr "Plus de place sur le dispositif" + +#: library/errno.rst:179 +msgid "Illegal seek" +msgstr "Recherche invalide" + +#: library/errno.rst:184 +msgid "Read-only file system" +msgstr "Système de fichiers en lecture seule" + +#: library/errno.rst:189 +msgid "Too many links" +msgstr "Trop de liens symboliques" + +#: 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: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:205 +msgid "Math result not representable" +msgstr "Résultat mathématique non représentable" + +#: library/errno.rst:210 +msgid "Resource deadlock would occur" +msgstr "Un interblocage se produirait sur cette ressource" + +#: library/errno.rst:215 +msgid "File name too long" +msgstr "Nom de fichier trop long" + +#: library/errno.rst:220 +msgid "No record locks available" +msgstr "Plus de verrou de fichier disponible" + +#: library/errno.rst:225 +msgid "Function not implemented" +msgstr "Fonction non implémentée" + +#: library/errno.rst:230 +msgid "Directory not empty" +msgstr "Dossier non vide" + +#: library/errno.rst:235 +msgid "Too many symbolic links encountered" +msgstr "Trop de liens symboliques trouvés" + +#: 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:246 +msgid "No message of desired type" +msgstr "Pas de message du type voulu" + +#: library/errno.rst:251 +msgid "Identifier removed" +msgstr "Identifiant supprimé" + +#: library/errno.rst:256 +msgid "Channel number out of range" +msgstr "Le numéro de canal est hors des limites" + +#: library/errno.rst:261 +msgid "Level 2 not synchronized" +msgstr "Le niveau 2 n'est pas synchronisé" + +#: library/errno.rst:266 +msgid "Level 3 halted" +msgstr "Niveau 3 stoppé" + +#: library/errno.rst:271 +msgid "Level 3 reset" +msgstr "Niveau 3 réinitialisé" + +#: library/errno.rst:276 +msgid "Link number out of range" +msgstr "Le numéro du lien est hors des limites" + +#: library/errno.rst:281 +msgid "Protocol driver not attached" +msgstr "Le pilote de protocole n'est pas attaché" + +#: library/errno.rst:286 +msgid "No CSI structure available" +msgstr "Pas de structure *CSI* disponible" + +#: library/errno.rst:291 +msgid "Level 2 halted" +msgstr "Niveau 2 stoppé" + +#: library/errno.rst:296 +msgid "Invalid exchange" +msgstr "Échange invalide" + +#: library/errno.rst:301 +msgid "Invalid request descriptor" +msgstr "Descripteur de requête invalide" + +#: library/errno.rst:306 +msgid "Exchange full" +msgstr "Échange complet" + +#: library/errno.rst:311 +msgid "No anode" +msgstr "Pas de *anode*" + +#: library/errno.rst:316 +msgid "Invalid request code" +msgstr "Code de requête invalide" + +#: library/errno.rst:321 +msgid "Invalid slot" +msgstr "*Slot* invalide" + +#: library/errno.rst:326 +msgid "File locking deadlock error" +msgstr "Interblocage lors du verrouillage de fichier" + +#: library/errno.rst:331 +msgid "Bad font file format" +msgstr "Mauvais format de fichier de police" + +#: library/errno.rst:336 +msgid "Device not a stream" +msgstr "Le périphérique n'est pas un flux" + +#: library/errno.rst:341 +msgid "No data available" +msgstr "Pas de donnée disponible" + +#: library/errno.rst:346 +msgid "Timer expired" +msgstr "Délai maximal atteint" + +#: library/errno.rst:351 +msgid "Out of streams resources" +msgstr "Pas assez de ressources de type flux" + +#: library/errno.rst:356 +msgid "Machine is not on the network" +msgstr "Machine hors réseau" + +#: library/errno.rst:361 +msgid "Package not installed" +msgstr "Paquet non installé" + +#: library/errno.rst:366 +msgid "Object is remote" +msgstr "L'objet est distant" + +#: library/errno.rst:371 +msgid "Link has been severed" +msgstr "Lien coupé" + +#: library/errno.rst:376 +msgid "Advertise error" +msgstr "Erreur d'annonce" + +#: library/errno.rst:381 +msgid "Srmount error" +msgstr "Erreur *Srmount*" + +#: library/errno.rst:386 +msgid "Communication error on send" +msgstr "Erreur de communication lors de l'envoi" + +#: library/errno.rst:391 +msgid "Protocol error" +msgstr "Erreur de protocole" + +#: library/errno.rst:396 +msgid "Multihop attempted" +msgstr "Transfert à sauts multiples essayé" + +#: library/errno.rst:401 +msgid "RFS specific error" +msgstr "erreur spécifique *RFS*" + +#: library/errno.rst:406 +msgid "Not a data message" +msgstr "Pas un message de données" + +#: 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:416 +msgid "Name not unique on network" +msgstr "Nom non-unique dans le réseau" + +#: library/errno.rst:421 +msgid "File descriptor in bad state" +msgstr "Descripteur de fichier en mauvais état" + +#: library/errno.rst:426 +msgid "Remote address changed" +msgstr "Adresse distante changée" + +#: 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:436 +msgid "Accessing a corrupted shared library" +msgstr "Accès à une bibliothèque partagée corrompue" + +#: library/errno.rst:441 +msgid ".lib section in a.out corrupted" +msgstr "Section *.lib* de *a.out* corrompue" + +#: 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:451 +msgid "Cannot exec a shared library directly" +msgstr "Impossible d'exécuter directement une bibliothèque partagée" + +#: library/errno.rst:456 +msgid "Illegal byte sequence" +msgstr "Séquence de *bytes* illégale" + +#: library/errno.rst:461 +msgid "Interrupted system call should be restarted" +msgstr "Appel système interrompu qui devrait être relancé" + +#: library/errno.rst:466 +msgid "Streams pipe error" +msgstr "Erreur d’enchaînement de flux" + +#: library/errno.rst:471 +msgid "Too many users" +msgstr "Trop d'utilisateurs" + +#: 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:481 +msgid "Destination address required" +msgstr "Adresse de destination obligatoire" + +#: library/errno.rst:486 +msgid "Message too long" +msgstr "Message trop long" + +#: library/errno.rst:491 +msgid "Protocol wrong type for socket" +msgstr "Mauvais type de protocole pour ce connecteur" + +#: library/errno.rst:496 +msgid "Protocol not available" +msgstr "Protocole pas disponible" + +#: library/errno.rst:501 +msgid "Protocol not supported" +msgstr "Protocole non géré" + +#: library/errno.rst:506 +msgid "Socket type not supported" +msgstr "Type de connecteur non géré" + +#: 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:516 +msgid "Protocol family not supported" +msgstr "Famille de protocole non gérée" + +#: 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:526 +msgid "Address already in use" +msgstr "Adresse déjà utilisée" + +#: library/errno.rst:531 +msgid "Cannot assign requested address" +msgstr "Impossible d'assigner l'adresse demandée" + +#: library/errno.rst:536 +msgid "Network is down" +msgstr "Le réseau est désactivé" + +#: library/errno.rst:541 +msgid "Network is unreachable" +msgstr "Réseau inaccessible" + +#: library/errno.rst:546 +msgid "Network dropped connection because of reset" +msgstr "Connexion annulée par le réseau" + +#: 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: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:563 +msgid "No buffer space available" +msgstr "Plus d'espace tampon disponible" + +#: library/errno.rst:568 +msgid "Transport endpoint is already connected" +msgstr "L'interface de connexion est déjà connectée" + +#: library/errno.rst:573 +msgid "Transport endpoint is not connected" +msgstr "L'interface de connexion n'est pas connectée" + +#: 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:584 +msgid "Too many references: cannot splice" +msgstr "Trop de descripteurs : impossible d'effectuer la liaison" + +#: 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: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:601 +msgid "Host is down" +msgstr "Hôte éteint" + +#: library/errno.rst:606 +msgid "No route to host" +msgstr "Pas de route vers l'hôte" + +#: 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: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:623 +msgid "Stale NFS file handle" +msgstr "Descripteur de fichier NFS corrompu" + +#: library/errno.rst:628 +msgid "Structure needs cleaning" +msgstr "La structure a besoin d'être nettoyée" + +#: library/errno.rst:633 +msgid "Not a XENIX named type file" +msgstr "N'est pas un fichier nommé du type *XENIX*" + +#: library/errno.rst:638 +msgid "No XENIX semaphores available" +msgstr "Pas de sémaphore *XENIX* disponible" + +#: library/errno.rst:643 +msgid "Is a named type file" +msgstr "Est un fichier nommé" + +#: library/errno.rst:648 +msgid "Remote I/O error" +msgstr "Erreur d'entrées-sorties distante" + +#: 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 new file mode 100644 index 0000000000..e303ce8e79 --- /dev/null +++ b/library/exceptions.po @@ -0,0 +1,1421 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-05-21 16:37+0200\n" +"PO-Revision-Date: 2022-04-07 23:15-0600\n" +"Last-Translator: Yannick Gingras \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 3.0\n" + +#: library/exceptions.rst:4 +msgid "Built-in Exceptions" +msgstr "Exceptions natives" + +#: library/exceptions.rst:10 +msgid "" +"In Python, all exceptions must be instances of a class that derives from :" +"class:`BaseException`. In a :keyword:`try` statement with an :keyword:" +"`except` clause that mentions a particular class, that clause also handles " +"any exception classes derived from that class (but not exception classes " +"from which *it* is derived). Two exception classes that are not related via " +"subclassing are never equivalent, even if they have the same name." +msgstr "" +"En python, une exception est une instance d'une classe héritée de :class:" +"`BaseException`. Dans un bloc :keyword:`try`, la clause :keyword:`except` " +"traite non seulement la classe d'exception qu'elle mentionne, mais aussi " +"toutes les classes dérivées de cette classe (contrairement à ses classes " +"mères). Deux classes qui ne sont pas liées par héritage ne sont jamais " +"équivalentes, même si elles ont le même nom." + +#: 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 " +"explaining the code). The associated value is usually passed as arguments " +"to the exception class's constructor." +msgstr "" +"Les exceptions natives présentes ci-dessous peuvent être levées par " +"l'interpréteur ou par les fonctions natives. Sauf mention contraire, une " +"\"valeur associée\" indique la cause de l'erreur. Cela peut être une chaîne " +"ou un *n*-uplet contenant plusieurs éléments d'information (e.g., un code " +"d'erreur ou un message explicatif). Cette valeur associée est généralement " +"donnée en argument du constructeur de la classe." + +#: library/exceptions.rst:26 +msgid "" +"User code can raise built-in exceptions. This can be used to test an " +"exception handler or to report an error condition \"just like\" the " +"situation in which the interpreter raises the same exception; but beware " +"that there is nothing to prevent user code from raising an inappropriate " +"error." +msgstr "" +"Du code utilisateur peut lever des exceptions natives. Cela peut être " +"utilisé pour tester un gestionnaire d'exception ou pour rapporter une " +"condition d'erreur \"comme si\" c'était l'interpréteur qui levait cette " +"exception ; mais attention car rien n'empêche du code utilisateur de lever " +"une erreur inappropriée." + +#: library/exceptions.rst:31 +msgid "" +"The built-in exception classes can be subclassed to define new exceptions; " +"programmers are encouraged to derive new exceptions from the :exc:" +"`Exception` class or one of its subclasses, and not from :exc:" +"`BaseException`. More information on defining exceptions is available in " +"the Python Tutorial under :ref:`tut-userexceptions`." +msgstr "" +"Les classes d'exception natives peuvent être héritées pour définir de " +"nouvelles exceptions ; les programmeurs sont encouragés à faire dériver les " +"nouvelles exceptions de la classe :exc:`Exception` ou d'une de ses sous-" +"classes, et non de :exc:`BaseException`. Plus d'informations sur la " +"définition des exceptions sont disponibles dans le Tutoriel Python au " +"chapitre :ref:`tut-userexceptions`." + +#: 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 (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:62 +msgid "" +"The default traceback display code shows these chained exceptions in " +"addition to the traceback for the exception itself. An explicitly chained " +"exception in :attr:`__cause__` is always shown when present. An implicitly " +"chained exception in :attr:`__context__` is shown only if :attr:`__cause__` " +"is :const:`None` and :attr:`__suppress_context__` is false." +msgstr "" +"Le code d'affichage par défaut de la trace d'appels montre ces exceptions " +"chaînées en plus de la trace de l'exception elle-même. Si elle est présente, " +"une exception chaînée explicitement dans :attr:`__cause__` est toujours " +"affichée. Une exception implicitement chaînée dans :attr:`__context__` n'est " +"affichée que si :attr:`__cause__` est :const:`None` et :attr:" +"`__suppress_context__` est faux." + +#: 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 " +"exception that was raised." +msgstr "" +"Dans les deux cas, l'exception elle-même est toujours affichée après toutes " +"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: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 " +"de base 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:95 +msgid "" +"The following exceptions are used mostly as base classes for other " +"exceptions." +msgstr "" +"Les exceptions suivantes sont utilisées principalement en tant que classes " +"de base pour d'autres exceptions." + +#: 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 :" +"func:`str` is called on an instance of this class, the representation of the " +"argument(s) to the instance are returned, or the empty string when there " +"were no arguments." +msgstr "" +"La classe de base pour toutes les exceptions natives. Elle n'est pas vouée à " +"être héritée directement par des classes utilisateur (pour cela, utilisez :" +"exc:`Exception`). Si :func:`str` est appelée sur une instance de cette " +"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: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 " +"assign a special meaning to the elements of this tuple, while others are " +"usually called only with a single string giving an error message." +msgstr "" +"Le *n*-uplet d'arguments donné au constructeur d'exception. Certaines " +"exceptions natives (comme :exc:`OSError`) attendent un certain nombre " +"d'arguments et attribuent une signification spéciale aux éléments de ce *n*-" +"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:114 +msgid "" +"This method sets *tb* as the new traceback for the exception and returns the " +"exception object. It was more commonly used before the exception chaining " +"features of :pep:`3134` became available. The following example shows how " +"we can convert an instance of ``SomeException`` into an instance of " +"``OtherException`` while preserving the traceback. Once raised, the current " +"frame is pushed onto the traceback of the ``OtherException``, as would have " +"happened to the traceback of the original ``SomeException`` had we allowed " +"it to propagate to the caller. ::" +msgstr "" +"Cette méthode affecte *tb* comme la nouvelle trace d'appels de l'exception " +"et renvoie l'objet exception. Elle était utilisée de façon plus courante " +"avant que la fonctionnalité de chaînage des exceptions de la :pep:`3134` " +"devienne disponible. L'exemple suivant démontre comment convertir une " +"instance de ``SomeException`` en une instance de ``OtherException`` tout en " +"préservant la pile d'appels. Une fois l'exception levée, le cadre courant " +"est empilé sur la trace d'appels de ``OtherException``, comme cela se serait " +"produit pour la trace d'appels de ``SomeException`` si on l'avait laissée se " +"propager jusqu'à l'appelant ::" + +#: library/exceptions.rst:132 +msgid "" +"All built-in, non-system-exiting exceptions are derived from this class. " +"All user-defined exceptions should also be derived from this class." +msgstr "" +"Toutes les exceptions natives, qui n'entraînent pas une sortie du système " +"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:138 +msgid "" +"The base class for those built-in exceptions that are raised for various " +"arithmetic errors: :exc:`OverflowError`, :exc:`ZeroDivisionError`, :exc:" +"`FloatingPointError`." +msgstr "" +"La classe de base pour les exceptions natives qui sont levées pour diverses " +"erreurs arithmétiques : :exc:`OverflowError`, :exc:`ZeroDivisionError`, :exc:" +"`FloatingPointError`." + +#: library/exceptions.rst:145 +msgid "" +"Raised when a :ref:`buffer ` related operation cannot be " +"performed." +msgstr "" +"Levée lorsqu'une opération liée à un :ref:`tampon ` ne peut " +"pas être exécutée." + +#: library/exceptions.rst:151 +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`. " +"This can be raised directly by :func:`codecs.lookup`." +msgstr "" +"La classe de base pour les exceptions qui sont levées lorsqu'une clé ou un " +"index utilisé sur un tableau de correspondances ou une séquence est " +"invalide : :exc:`IndexError`, :exc:`KeyError`. Peut être levée directement " +"par :func:`codecs.lookup`." + +#: library/exceptions.rst:157 +msgid "Concrete exceptions" +msgstr "Exceptions concrètes" + +#: library/exceptions.rst:159 +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:165 +msgid "Raised when an :keyword:`assert` statement fails." +msgstr "Levée lorsqu'une instruction :keyword:`assert` échoue." + +#: library/exceptions.rst:170 +msgid "" +"Raised when an attribute reference (see :ref:`attribute-references`) or " +"assignment fails. (When an object does not support attribute references or " +"attribute assignments at all, :exc:`TypeError` is raised.)" +msgstr "" +"Levée lorsqu'une référence ou une assignation d'attribut (voir :ref:" +"`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:174 +msgid "" +"The :attr:`name` and :attr:`obj` attributes can be set using keyword-only " +"arguments to the constructor. When set they represent the name of the " +"attribute that was attempted to be accessed and the object that was accessed " +"for said attribute, respectively." +msgstr "" +"Les attributs :attr:`name` et :attr:`obj` peuvent être définis uniquement à " +"l'aide d'arguments nommés passés au constructeur. Lorsqu'ils sont définis, " +"ils représentent respectivement le nom de l'attribut pour lequel il y a eu " +"une tentative d'accès et l'objet qui a été accédé pour cet attribut." + +#: library/exceptions.rst:179 +msgid "Added the :attr:`name` and :attr:`obj` attributes." +msgstr "Ajout des attributs :attr:`name` et :attr:`obj`." + +#: library/exceptions.rst:184 +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." +"IOBase.readline` methods return an empty string when they hit EOF.)" +msgstr "" +"Levée lorsque la fonction :func:`input` atteint une condition de fin de " +"fichier (EOF) sans lire aucune donnée. (N.B. : les méthodes :meth:`io.IOBase." +"read` et :meth:`io.IOBase.readline` retournent une chaîne vide lorsqu'elles " +"atteignent EOF.)" + +#: library/exceptions.rst:191 +msgid "Not currently used." +msgstr "N’est pas utilisé pour le moment." + +#: library/exceptions.rst:196 +msgid "" +"Raised when a :term:`generator` or :term:`coroutine` is closed; see :meth:" +"`generator.close` and :meth:`coroutine.close`. It directly inherits from :" +"exc:`BaseException` instead of :exc:`Exception` since it is technically not " +"an error." +msgstr "" +"Levée lorsqu'un :term:`generator` ou une :term:`coroutine` est fermé, voir :" +"meth:`generator.close` et :meth:`coroutine.close`. Elle hérite directement " +"de :exc:`BaseException` au lieu de :exc:`Exception` puisqu'il ne s'agit pas " +"techniquement d'une erreur." + +#: library/exceptions.rst:204 +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 " +"name that cannot be found." +msgstr "" +"Levée lorsque l'instruction :keyword:`import` a des problèmes pour essayer " +"de charger un module. Également levée lorsque Python ne trouve pas un nom " +"dans ``from ... import``." + +#: library/exceptions.rst:208 +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 " +"that was attempted to be imported and the path to any file which triggered " +"the exception, respectively." +msgstr "" +"Les attributs :attr:`name` et :attr:`path` peuvent être définis uniquement à " +"l'aide d'arguments nommés passés au constructeur. Lorsqu'ils sont définis, " +"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:213 +msgid "Added the :attr:`name` and :attr:`path` attributes." +msgstr "Ajout des attributs :attr:`name` et :attr:`path`." + +#: library/exceptions.rst:218 +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 :" +"data:`sys.modules`." +msgstr "" +"Une sous-classe de :exc:`ImportError` qui est levée par :keyword:`import` " +"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:227 +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 " +"integer, :exc:`TypeError` is raised.)" +msgstr "" +"Levée lorsqu'un indice de séquence est hors de la plage. (Les indices de " +"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:236 +msgid "" +"Raised when a mapping (dictionary) key is not found in the set of existing " +"keys." +msgstr "" +"Levée lorsqu'une clef (de dictionnaire) n'est pas trouvée dans l'ensemble " +"des clefs existantes." + +#: library/exceptions.rst:243 +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. " +"The exception inherits from :exc:`BaseException` so as to not be " +"accidentally caught by code that catches :exc:`Exception` and thus prevent " +"the interpreter from exiting." +msgstr "" +"Levée lorsque l'utilisateur appuie sur la touche d'interruption " +"(normalement :kbd:`Control-C` or :kbd:`Delete`). Pendant l'exécution, un " +"contrôle des interruptions est effectué régulièrement. L'exception hérite " +"de :exc:`BaseException` afin de ne pas être accidentellement interceptée par " +"du code qui intercepte :exc:`Exception` et ainsi empêcher l'interpréteur de " +"quitter." + +#: library/exceptions.rst:251 +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:261 +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 " +"indicating what kind of (internal) operation ran out of memory. Note that " +"because of the underlying memory management architecture (C's :c:func:" +"`malloc` function), the interpreter may not always be able to completely " +"recover from this situation; it nevertheless raises an exception so that a " +"stack traceback can be printed, in case a run-away program was the cause." +msgstr "" +"Levée lorsqu'une opération est à court de mémoire mais que la situation peut " +"encore être rattrapée (en supprimant certains objets). La valeur associée " +"est une chaîne de caractères indiquant quel type d'opération (interne) est à " +"court de mémoire. À noter qu'en raison de l'architecture interne de gestion " +"de la mémoire (la fonction :c:func:`malloc` du C), l'interpréteur peut ne " +"pas toujours être capable de rattraper cette situation ; il lève néanmoins " +"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:272 +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 " +"the name that could not be found." +msgstr "" +"Levée lorsqu'un nom local ou global n'est pas trouvé. Ceci ne s'applique " +"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:276 +msgid "" +"The :attr:`name` attribute can be set using a keyword-only argument to the " +"constructor. When set it represent the name of the variable that was " +"attempted to be accessed." +msgstr "" +"L'attribut :attr:`name` doit être défini uniquement à l'aide d'un argument " +"nommé passé au constructeur. Lorsqu'il est défini, il représente le nom de " +"la variable pour laquelle il y a eu une tentative d'accès." + +#: library/exceptions.rst:280 +msgid "Added the :attr:`name` attribute." +msgstr "Ajout de l'attribut :attr:`name`." + +#: library/exceptions.rst:286 +msgid "" +"This exception is derived from :exc:`RuntimeError`. In user defined base " +"classes, abstract methods should raise this exception when they require " +"derived classes to override the method, or while the class is being " +"developed to indicate that the real implementation still needs to be added." +msgstr "" +"Cette exception est dérivée de :exc:`RuntimeError`. Dans les classes de base " +"définies par l'utilisateur, les méthodes abstraites devraient lever cette " +"exception lorsqu'elles nécessitent des classes dérivées pour remplacer la " +"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:293 +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 " +"undefined or, if a subclass, set it to :data:`None`." +msgstr "" +"Elle ne devrait pas être utilisée pour indiquer qu'un opérateur ou qu'une " +"méthode n'est pas destiné à être pris en charge du tout – dans ce cas, " +"évitez de définir l'opérateur ou la méthode, ou s'il s'agit d'une sous-" +"classe, assignez-le à :data:`None`." + +#: library/exceptions.rst:299 +msgid "" +"``NotImplementedError`` and ``NotImplemented`` are not interchangeable, even " +"though they have similar names and purposes. See :data:`NotImplemented` for " +"details on when to use it." +msgstr "" +"``NotImplementedError`` et ``NotImplemented`` ne sont pas interchangeables, " +"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:308 +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)." +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:312 +msgid "" +"The second form of the constructor sets the corresponding attributes, " +"described below. The attributes default to :const:`None` if not specified. " +"For backwards compatibility, if three arguments are passed, the :attr:" +"`~BaseException.args` attribute contains only a 2-tuple of the first two " +"constructor arguments." +msgstr "" +"La deuxième forme du constructeur définit les attributs correspondants, " +"décrits ci-dessous. Les attributs par défaut sont :const:`None` si non " +"spécifiés. Pour la rétrocompatibilité, si trois arguments sont passés, " +"l'attribut :attr:`~BaseException.args` contient seulement une paire avec les " +"valeurs des deux premiers arguments du constructeur." + +#: library/exceptions.rst:318 +msgid "" +"The constructor often actually returns a subclass of :exc:`OSError`, as " +"described in `OS exceptions`_ below. The particular subclass depends on the " +"final :attr:`.errno` value. This behaviour only occurs when constructing :" +"exc:`OSError` directly or via an alias, and is not inherited when " +"subclassing." +msgstr "" +"Le constructeur retourne souvent une sous-classe d':exc:`OSError`, comme " +"décrit dans `OS exceptions`_ ci-dessous. La sous-classe particulière dépend " +"de la valeur finale d':attr:`.errno`. Ce comportement ne se produit que lors " +"de la construction d':exc:`OSError` directement ou via un alias, et n'est " +"pas hérité lors du sous-classement." + +#: library/exceptions.rst:326 +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:330 +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 " +"native error code." +msgstr "" +"Sous Windows, cela donne le code d'erreur Windows natif. L'attribut :attr:`." +"errno` est alors une traduction approximative, en termes POSIX, de ce code " +"d'erreur natif." + +#: library/exceptions.rst:334 +msgid "" +"Under Windows, if the *winerror* constructor argument is an integer, the :" +"attr:`.errno` attribute is determined from the Windows error code, and the " +"*errno* argument is ignored. On other platforms, the *winerror* argument is " +"ignored, and the :attr:`winerror` attribute does not exist." +msgstr "" +"Sous Windows, si l'argument du constructeur *winerror* est un entier, " +"l'attribut :attr:`.errno` est déterminé à partir du code d'erreur Windows, " +"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:342 +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:" +"`FormatMessage` under Windows." +msgstr "" +"Le message d'erreur correspondant, tel que fourni par le système " +"d'exploitation. Il est formaté par les fonctions C :c:func:`perror` sous " +"POSIX, et :c:func:`FormatMessage` sous Windows." + +#: library/exceptions.rst:350 +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. " +"For functions that involve two file system paths (such as :func:`os." +"rename`), :attr:`filename2` corresponds to the second file name passed to " +"the function." +msgstr "" +"Pour les exceptions qui font référence à un chemin d'accès au système de " +"fichiers (comme :func:`open` ou :func:`os.unlink`), :attr:`filename` est le " +"nom du fichier transmis à la fonction. Pour les fonctions qui font référence " +"à 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:357 +msgid "" +":exc:`EnvironmentError`, :exc:`IOError`, :exc:`WindowsError`, :exc:`socket." +"error`, :exc:`select.error` and :exc:`mmap.error` have been merged into :exc:" +"`OSError`, and the constructor may return a subclass." +msgstr "" +":exc:`EnvironmentError`, :exc:`IOError`, :exc:`WindowsError`, :exc:`socket." +"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:363 +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 :term:" +"`filesystem encoding and error handler`. Also, the *filename2* constructor " +"argument and attribute was added." +msgstr "" +"L'attribut :attr:`filename` est maintenant le nom du fichier originel passé " +"à la fonction, au lieu du nom encodé ou décodé à partir du :term:" +"`gestionnaire d'encodage et d'erreur du système de fichiers `. De plus, l'argument du constructeur et " +"attribut *filename2* a été ajouté." + +#: library/exceptions.rst:372 +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:" +"`MemoryError` than give up). However, for historical reasons, OverflowError " +"is sometimes raised for integers that are outside a required range. " +"Because of the lack of standardization of floating point exception handling " +"in C, most floating point operations are not checked." +msgstr "" +"Levée lorsque le résultat d'une opération arithmétique est trop grand pour " +"être représenté. Cela ne peut pas se produire pour les entiers (qui " +"préfèrent lever :exc:`MemoryError` plutôt que d'abandonner). Cependant, pour " +"des raisons historiques, ``OverflowError`` est parfois levée pour des " +"entiers qui sont en dehors d'une plage requise. En raison de l'absence de " +"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:382 +msgid "" +"This exception is derived from :exc:`RuntimeError`. It is raised when the " +"interpreter detects that the maximum recursion depth (see :func:`sys." +"getrecursionlimit`) is exceeded." +msgstr "" +"Cette exception est dérivée de :exc:`RuntimeError`. Elle est levée lorsque " +"l'interpréteur détecte que la profondeur de récursivité maximale (voir :func:" +"`sys.getrecursionlimit`) est dépassée." + +#: library/exceptions.rst:386 +msgid "Previously, a plain :exc:`RuntimeError` was raised." +msgstr "Auparavant, une simple :exc:`RuntimeError` était levée." + +#: library/exceptions.rst:392 +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 " +"after it has been garbage collected. For more information on weak " +"references, see the :mod:`weakref` module." +msgstr "" +"Cette exception est levée lorsqu'un pointeur faible d'un objet proxy, créé " +"par la fonction :func:`weakref.proxy`, est utilisé pour accéder à un " +"attribut du référent après qu'il ait été récupéré par le ramasse-miettes. " +"Pour plus d'informations sur les pointeurs faibles, voir le module :mod:" +"`weakref`." + +#: library/exceptions.rst:400 +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 " +"wrong." +msgstr "" +"Levée lorsqu'une erreur qui n'appartient à aucune des autres catégories est " +"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:407 +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 " +"produced by the iterator." +msgstr "" +"Levée par la fonction native :func:`next` et la méthode :meth:`~iterator." +"__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:411 +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`." +msgstr "" +"L'objet exception a un unique attribut :attr:`value`, qui est donné en " +"argument lors de la construction de l'exception, et vaut :const:`None` par " +"défaut." + +#: library/exceptions.rst:415 +msgid "" +"When a :term:`generator` or :term:`coroutine` function returns, a new :exc:" +"`StopIteration` instance is raised, and the value returned by the function " +"is used as the :attr:`value` parameter to the constructor of the exception." +msgstr "" +"Lorsqu'une fonction de type :term:`generator` ou :term:`coroutine` retourne " +"une valeur, une nouvelle instance de :exc:`StopIteration` est levée, et la " +"valeur retournée par la fonction est passée au paramètre :attr:`value` du " +"constructeur de l'exception." + +#: library/exceptions.rst:420 +msgid "" +"If a generator code directly or indirectly raises :exc:`StopIteration`, it " +"is converted into a :exc:`RuntimeError` (retaining the :exc:`StopIteration` " +"as the new exception's cause)." +msgstr "" +"Si le code d'un générateur lève, directement ou indirectement, une :exc:" +"`StopIteration`, elle est convertie en :exc:`RuntimeError` (en conservant :" +"exc:`StopIteration` comme cause de la nouvelle exception)." + +#: library/exceptions.rst:424 +msgid "" +"Added ``value`` attribute and the ability for generator functions to use it " +"to return a value." +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:428 +msgid "" +"Introduced the RuntimeError transformation via ``from __future__ import " +"generator_stop``, see :pep:`479`." +msgstr "" +"Introduit la transformation des erreurs ``RuntimeError`` via ``from " +"__future__ import generator_stop``, cf. :pep:`479`." + +#: library/exceptions.rst:432 +msgid "" +"Enable :pep:`479` for all code by default: a :exc:`StopIteration` error " +"raised in a generator is transformed into a :exc:`RuntimeError`." +msgstr "" +"Active :pep:`479` pour tout le code par défaut : quand une erreur :exc:" +"`StopIteration` est levée dans un générateur elle est transformée en une :" +"exc:`RuntimeError`." + +#: library/exceptions.rst:438 +msgid "" +"Must be raised by :meth:`__anext__` method of an :term:`asynchronous " +"iterator` object to stop the iteration." +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:445 +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:" +"`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:`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:451 +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:456 +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:460 +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:465 +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:470 +msgid "The source code text involved in the error." +msgstr "Le texte du code source impliqué dans l'erreur." + +#: library/exceptions.rst:474 +msgid "" +"Which line number in the file the error occurred ends in. This is 1-indexed: " +"the first line in the file has a ``lineno`` of 1." +msgstr "" +"Le numéro de la dernière ligne produisant l'erreur. L'indiçage commence à " +"1 : ``lineno`` vaut 1 pour la première ligne du fichier." + +#: library/exceptions.rst:479 +msgid "" +"The column in the end line where the error occurred finishes. This is 1-" +"indexed: the first character in the line has an ``offset`` of 1." +msgstr "" +"Le numéro de la dernière colonne (de la dernière ligne) produisant l'erreur. " +"L'indiçage commence à 1 : ``offset`` vaut 1 pour le premier caractère de la " +"ligne." + +#: library/exceptions.rst:482 +msgid "" +"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, 2, '(a b)\\n', 1, 5))." +msgstr "" +"Pour les erreurs dans les chaînes de formatage *f-strings*, le message " +"commence par « f-string: » et les champs *offset* sont les décalages dans un " +"texte construit à partir de l’expression de remplacement. Par exemple, " +"compiler ``f'Bad {a b} field'`` produit cet attribut *args* : ``('f-" +"string: ...', ('', 1, 2, '(a b)\\n', 1, 5)).``" + +#: library/exceptions.rst:487 +msgid "Added the :attr:`end_lineno` and :attr:`end_offset` attributes." +msgstr "Ajout des attributs :attr:`end_lineno` et :attr:`end_offset`." + +#: library/exceptions.rst:492 +msgid "" +"Base class for syntax errors related to incorrect indentation. This is a " +"subclass of :exc:`SyntaxError`." +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:498 +msgid "" +"Raised when indentation contains an inconsistent use of tabs and spaces. " +"This is a subclass of :exc:`IndentationError`." +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:504 +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 " +"a string indicating what went wrong (in low-level terms)." +msgstr "" +"Levée lorsque l'interpréteur trouve une erreur interne, mais que la " +"situation ne semble pas si grave au point de lui faire abandonner tout " +"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:508 +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." +"version``; it is also printed at the start of an interactive Python " +"session), the exact error message (the exception's associated value) and if " +"possible the source of the program that triggered the error." +msgstr "" +"Vous devriez le signaler à l'auteur ou au responsable de votre interpréteur " +"Python. Assurez-vous de signaler la version de l'interpréteur (``sys." +"version`` ; elle est également affichée au lancement d'une session " +"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:517 +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 " +"accidentally caught by code that catches :exc:`Exception`. This allows the " +"exception to properly propagate up and cause the interpreter to exit. When " +"it is not handled, the Python interpreter exits; no stack traceback is " +"printed. The constructor accepts the same optional argument passed to :func:" +"`sys.exit`. If the value is an integer, it specifies the system exit status " +"(passed to C's :c:func:`exit` function); if it is ``None``, the exit status " +"is zero; if it has another type (such as a string), the object's value is " +"printed and the exit status is one." +msgstr "" +"Cette exception est levée par la fonction :func:`sys.exit`. Elle hérite de :" +"exc:`BaseException` au lieu d':exc:`Exception` pour ne pas qu'elle soit " +"interceptée accidentellement par du code qui intercepte :exc:`Exception`. " +"Cela permet à l'exception de se propager correctement et de faire quitter " +"l'interpréteur. Lorsqu'elle n'est pas gérée, l'interpréteur Python quitte ; " +"aucune trace d'appels n'est affichée. Le constructeur accepte le même " +"argument optionnel passé à :func:`sys.exit`. Si la valeur est un entier, " +"elle spécifie l'état de sortie du système (passé à la fonction C :c:func:" +"`exit`) ; si elle est ``None``, l'état de sortie est zéro ; si elle a un " +"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:528 +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 " +"executed, and so that a debugger can execute a script without running the " +"risk of losing control. The :func:`os._exit` function can be used if it is " +"absolutely positively necessary to exit immediately (for example, in the " +"child process after a call to :func:`os.fork`)." +msgstr "" +"Un appel à :func:`sys.exit` est traduit en une exception pour que les " +"gestionnaires de nettoyage (les clauses :keyword:`finally` des instructions :" +"keyword:`try`) puissent être exécutés, et pour qu'un débogueur puisse " +"exécuter un script sans courir le risque de perdre le contrôle. La fonction :" +"func:`os._exit` peut être utilisée s'il est absolument nécessaire de sortir " +"immédiatement (par exemple, dans le processus enfant après un appel à :func:" +"`os.fork`)." + +#: library/exceptions.rst:537 +msgid "" +"The exit status or error message that is passed to the constructor. " +"(Defaults to ``None``.)" +msgstr "" +"L'état de sortie ou le message d'erreur passé au constructeur. (``None`` par " +"défaut.)" + +#: library/exceptions.rst:543 +msgid "" +"Raised when an operation or function is applied to an object of " +"inappropriate type. The associated value is a string giving details about " +"the type mismatch." +msgstr "" +"Levée lorsqu'une opération ou fonction est appliquée à un objet d'un type " +"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:546 +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 " +"object is meant to support a given operation but has not yet provided an " +"implementation, :exc:`NotImplementedError` is the proper exception to raise." +msgstr "" +"Cette exception peut être levée par du code utilisateur pour indiquer qu'une " +"tentative d'opération sur un objet n'est pas prise en charge, et n'est pas " +"censée l'être. Si un objet est destiné à prendre en charge une opération " +"donnée mais n'a pas encore fourni une implémentation, lever :exc:" +"`NotImplementedError` est plus approprié." + +#: library/exceptions.rst:551 +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 " +"arguments with the wrong value (e.g. a number outside expected boundaries) " +"should result in a :exc:`ValueError`." +msgstr "" +"Le passage d'arguments du mauvais type (e.g. passer une :class:`list` quand " +"un :class:`int` est attendu) devrait résulter en un :exc:`TypeError`, mais " +"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:558 +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:" +"`NameError`." +msgstr "" +"Levée lorsqu'une référence est faite à une variable locale dans une fonction " +"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:565 +msgid "" +"Raised when a Unicode-related encoding or decoding error occurs. It is a " +"subclass of :exc:`ValueError`." +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:568 +msgid "" +":exc:`UnicodeError` has attributes that describe the encoding or decoding " +"error. For example, ``err.object[err.start:err.end]`` gives the particular " +"invalid input that the codec failed on." +msgstr "" +":exc:`UnicodeError` a des attributs qui décrivent l'erreur d'encodage ou de " +"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:574 +msgid "The name of the encoding that raised the error." +msgstr "Le nom de l'encodage qui a provoqué l'erreur." + +#: library/exceptions.rst:578 +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:582 +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:586 +msgid "The first index of invalid data in :attr:`object`." +msgstr "Le premier index des données invalides dans :attr:`object`." + +#: library/exceptions.rst:590 +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:595 +msgid "" +"Raised when a Unicode-related error occurs during encoding. It is a " +"subclass of :exc:`UnicodeError`." +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:601 +msgid "" +"Raised when a Unicode-related error occurs during decoding. It is a " +"subclass of :exc:`UnicodeError`." +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:607 +msgid "" +"Raised when a Unicode-related error occurs during translating. It is a " +"subclass of :exc:`UnicodeError`." +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:613 +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 " +"more precise exception such as :exc:`IndexError`." +msgstr "" +"Levée lorsqu'une opération ou fonction native reçoit un argument qui possède " +"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:620 +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 " +"operation." +msgstr "" +"Levée lorsque le second argument d'une opération de division ou d'un modulo " +"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:625 +msgid "" +"The following exceptions are kept for compatibility with previous versions; " +"starting from Python 3.3, they are aliases of :exc:`OSError`." +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:634 +msgid "Only available on Windows." +msgstr "Seulement disponible sous Windows." + +#: library/exceptions.rst:638 +msgid "OS exceptions" +msgstr "Exceptions système" + +#: library/exceptions.rst:640 +msgid "" +"The following exceptions are subclasses of :exc:`OSError`, they get raised " +"depending on the system error code." +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:645 +msgid "" +"Raised when an operation would block on an object (e.g. socket) set for non-" +"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` :py:" +"data:`~errno.EAGAIN`, :py:data:`~errno.EALREADY`, :py:data:`~errno." +"EWOULDBLOCK` et :py:data:`~errno.EINPROGRESS`." + +#: library/exceptions.rst:650 +msgid "" +"In addition to those of :exc:`OSError`, :exc:`BlockingIOError` can have one " +"more attribute:" +msgstr "" +"En plus de ceux de :exc:`OSError`, :exc:`BlockingIOError` peut avoir un " +"attribut de plus :" + +#: library/exceptions.rst:655 +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 " +"from the :mod:`io` module." +msgstr "" +"Un nombre entier contenant le nombre de caractères écrits dans le flux avant " +"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:661 +msgid "" +"Raised when an operation on a child process failed. Corresponds to :c:data:" +"`errno` :py:data:`~errno.ECHILD`." +msgstr "" +"Levée lorsqu'une opération sur un processus enfant a échoué. Correspond à :c:" +"data:`errno` :py:data:`~errno.ECHILD`." + +#: library/exceptions.rst:666 +msgid "A base class for connection-related issues." +msgstr "Une classe de base pour les problèmes de connexion." + +#: library/exceptions.rst:668 +msgid "" +"Subclasses are :exc:`BrokenPipeError`, :exc:`ConnectionAbortedError`, :exc:" +"`ConnectionRefusedError` and :exc:`ConnectionResetError`." +msgstr "" +"Les sous-classes sont :exc:`BrokenPipeError`, :exc:" +"`ConnectionAbortedError`, :exc:`ConnectionRefusedError` et :exc:" +"`ConnectionResetError`." + +#: library/exceptions.rst:673 +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` :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` :py:data:`~errno.EPIPE` et :py:data:`~errno." +"ESHUTDOWN`." + +#: library/exceptions.rst:680 +msgid "" +"A subclass of :exc:`ConnectionError`, raised when a connection attempt is " +"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` :py:data:" +"`~errno.ECONNABORTED`." + +#: library/exceptions.rst:686 +msgid "" +"A subclass of :exc:`ConnectionError`, raised when a connection attempt is " +"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` :py:data:" +"`~errno.ECONNREFUSED`." + +#: library/exceptions.rst:692 +msgid "" +"A subclass of :exc:`ConnectionError`, raised when a connection is reset by " +"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` :py:data:`~errno." +"ECONNRESET`." + +#: library/exceptions.rst:698 +msgid "" +"Raised when trying to create a file or directory which already exists. " +"Corresponds to :c:data:`errno` :py:data:`~errno.EEXIST`." +msgstr "" +"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:703 +msgid "" +"Raised when a file or directory is requested but doesn't exist. Corresponds " +"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` :py:data:`~errno.ENOENT`." + +#: library/exceptions.rst:708 +msgid "" +"Raised when a system call is interrupted by an incoming signal. Corresponds " +"to :c:data:`errno` :py:data:`~errno.EINTR`." +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:711 +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 " +"rationale), instead of raising :exc:`InterruptedError`." +msgstr "" +"Python relance maintenant les appels système lorsqu'ils sont interrompus par " +"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:718 +msgid "" +"Raised when a file operation (such as :func:`os.remove`) is requested on a " +"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` :py:data:`~errno." +"EISDIR`." + +#: library/exceptions.rst:724 +msgid "" +"Raised when a directory operation (such as :func:`os.listdir`) is requested " +"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. 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:732 +msgid "" +"Raised when trying to run an operation without the adequate access rights - " +"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` :py:data:`~errno.EACCES` et :py:data:`~errno.EPERM`." + +#: library/exceptions.rst:738 +msgid "" +"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` :" +"py:data:`~errno.ESRCH`." + +#: library/exceptions.rst:743 +msgid "" +"Raised when a system function timed out at the system level. Corresponds to :" +"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` :py:data:`~errno.ETIMEDOUT`." + +#: library/exceptions.rst:746 +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:752 +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:758 +msgid "Warnings" +msgstr "Avertissements" + +#: library/exceptions.rst:760 +msgid "" +"The following exceptions are used as warning categories; see the :ref:" +"`warning-categories` documentation for more details." +msgstr "" +"Les exceptions suivantes sont utilisées comme catégories d'avertissement ; " +"voir :mod:`warning-categories` pour plus d'informations." + +#: library/exceptions.rst:765 +msgid "Base class for warning categories." +msgstr "Classe de base pour les catégories d'avertissement." + +#: library/exceptions.rst:770 +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:775 +msgid "" +"Base class for warnings about deprecated features when those warnings are " +"intended for other Python developers." +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:778 +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:798 +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:787 +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." +msgstr "" +"Classe de base pour les avertissements d'obsolescence programmée. Ils " +"indiquent que la fonctionnalité peut encore être utilisée actuellement, mais " +"qu'elle sera supprimée dans le futur." + +#: library/exceptions.rst:791 +msgid "" +"This class is rarely used as emitting a warning about a possible upcoming " +"deprecation is unusual, and :exc:`DeprecationWarning` is preferred for " +"already active deprecations." +msgstr "" +"Cette classe est rarement utilisée car émettre un avertissement à propos " +"d’une obsolescence à venir est inhabituel, et :exc:`DeprecationWarning` est " +"préféré pour les obsolescences actuelles." + +#: library/exceptions.rst:821 library/exceptions.rst:848 +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:803 +msgid "Base class for warnings about dubious syntax." +msgstr "Classe de base pour les avertissements sur de la syntaxe douteuse." + +#: library/exceptions.rst:808 +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:813 +msgid "" +"Base class for warnings about deprecated features when those warnings are " +"intended for end users of applications that are written in Python." +msgstr "" +"Classe de base pour les avertissements à propos de fonctionnalités qui " +"seront obsolètes dans le futur quand ces avertissements destinés aux " +"utilisateurs finaux des applications écrites en Python." + +#: library/exceptions.rst:819 +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:827 +msgid "Base class for warnings related to Unicode." +msgstr "Classe de base pour les avertissements liés à l'Unicode." + +#: library/exceptions.rst:832 +msgid "Base class for warnings related to encodings." +msgstr "Classe de base pour les avertissements liés à l'encodage des chaînes." + +#: library/exceptions.rst:834 +msgid "See :ref:`io-encoding-warning` for details." +msgstr "Voir :ref:`io-encoding-warning` pour plus d'informations." + +#: library/exceptions.rst:841 +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:846 +msgid "Base class for warnings related to resource usage." +msgstr "" +"Classe de base pour les avertissements liés à l'utilisation des ressources." + +#: library/exceptions.rst:856 +msgid "Exception hierarchy" +msgstr "Hiérarchie des exceptions" + +#: library/exceptions.rst:858 +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 "" +#~ "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::" +#~ msgstr "" +#~ "Cette méthode définit *tb* en tant que nouvelle trace d'appels pour " +#~ "l'exception et retourne l'objet exception. Elle est généralement utilisée " +#~ "dans du code de gestion d'exceptions comme ceci ::" + +#~ 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." +#~ msgstr "" +#~ "Classe de base pour les avertissements liés à l'utilisation de " +#~ "ressources. Ignorée par les filtres d’avertissements par défaut." diff --git a/library/faulthandler.po b/library/faulthandler.po new file mode 100644 index 0000000000..7b1a7538e2 --- /dev/null +++ b/library/faulthandler.po @@ -0,0 +1,249 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-22 22:57+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \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" + +#: library/faulthandler.rst:2 +msgid ":mod:`faulthandler` --- Dump the Python traceback" +msgstr "" + +#: library/faulthandler.rst:11 +msgid "" +"This module contains functions to dump Python tracebacks explicitly, on a " +"fault, after a timeout, or on a user signal. Call :func:`faulthandler." +"enable` to install fault handlers for the :const:`SIGSEGV`, :const:" +"`SIGFPE`, :const:`SIGABRT`, :const:`SIGBUS`, and :const:`SIGILL` signals. " +"You can also enable them at startup by setting the :envvar:" +"`PYTHONFAULTHANDLER` environment variable or by using the :option:`-X` " +"``faulthandler`` command line option." +msgstr "" + +#: library/faulthandler.rst:18 +msgid "" +"The fault handler is compatible with system fault handlers like Apport or " +"the Windows fault handler. The module uses an alternative stack for signal " +"handlers if the :c:func:`sigaltstack` function is available. This allows it " +"to dump the traceback even on a stack overflow." +msgstr "" + +#: library/faulthandler.rst:23 +msgid "" +"The fault handler is called on catastrophic cases and therefore can only use " +"signal-safe functions (e.g. it cannot allocate memory on the heap). Because " +"of this limitation traceback dumping is minimal compared to normal Python " +"tracebacks:" +msgstr "" + +#: library/faulthandler.rst:28 +msgid "" +"Only ASCII is supported. The ``backslashreplace`` error handler is used on " +"encoding." +msgstr "" + +#: library/faulthandler.rst:30 +msgid "Each string is limited to 500 characters." +msgstr "" + +#: library/faulthandler.rst:31 +msgid "" +"Only the filename, the function name and the line number are displayed. (no " +"source code)" +msgstr "" + +#: library/faulthandler.rst:33 +msgid "It is limited to 100 frames and 100 threads." +msgstr "" + +#: library/faulthandler.rst:34 +msgid "The order is reversed: the most recent call is shown first." +msgstr "" + +#: library/faulthandler.rst:36 +msgid "" +"By default, the Python traceback is written to :data:`sys.stderr`. To see " +"tracebacks, applications must be run in the terminal. A log file can " +"alternatively be passed to :func:`faulthandler.enable`." +msgstr "" + +#: library/faulthandler.rst:40 +msgid "" +"The module is implemented in C, so tracebacks can be dumped on a crash or " +"when Python is deadlocked." +msgstr "" + +#: library/faulthandler.rst:43 +msgid "" +"The :ref:`Python Development Mode ` calls :func:`faulthandler." +"enable` at Python startup." +msgstr "" + +#: library/faulthandler.rst:49 +msgid "Module :mod:`pdb`" +msgstr "" + +#: library/faulthandler.rst:49 +msgid "Interactive source code debugger for Python programs." +msgstr "" + +#: library/faulthandler.rst:51 +msgid "Module :mod:`traceback`" +msgstr "" + +#: library/faulthandler.rst:52 +msgid "" +"Standard interface to extract, format and print stack traces of Python " +"programs." +msgstr "" + +#: library/faulthandler.rst:55 +msgid "Dumping the traceback" +msgstr "" + +#: library/faulthandler.rst:59 +msgid "" +"Dump the tracebacks of all threads into *file*. If *all_threads* is " +"``False``, dump only the current thread." +msgstr "" + +#: library/faulthandler.rst:62 +msgid "" +":func:`traceback.print_tb`, which can be used to print a traceback object." +msgstr "" + +#: library/faulthandler.rst:82 library/faulthandler.rst:146 +msgid "Added support for passing file descriptor to this function." +msgstr "" + +#: library/faulthandler.rst:69 +msgid "Fault handler state" +msgstr "" + +#: library/faulthandler.rst:73 +msgid "" +"Enable the fault handler: install handlers for the :const:`SIGSEGV`, :const:" +"`SIGFPE`, :const:`SIGABRT`, :const:`SIGBUS` and :const:`SIGILL` signals to " +"dump the Python traceback. If *all_threads* is ``True``, produce tracebacks " +"for every running thread. Otherwise, dump only the current thread." +msgstr "" + +#: library/faulthandler.rst:79 +msgid "" +"The *file* must be kept open until the fault handler is disabled: see :ref:" +"`issue with file descriptors `." +msgstr "" + +#: library/faulthandler.rst:85 +msgid "On Windows, a handler for Windows exception is also installed." +msgstr "" + +#: library/faulthandler.rst:88 +msgid "" +"The dump now mentions if a garbage collector collection is running if " +"*all_threads* is true." +msgstr "" + +#: library/faulthandler.rst:94 +msgid "" +"Disable the fault handler: uninstall the signal handlers installed by :func:" +"`enable`." +msgstr "" + +#: library/faulthandler.rst:99 +msgid "Check if the fault handler is enabled." +msgstr "" + +#: library/faulthandler.rst:103 +msgid "Dumping the tracebacks after a timeout" +msgstr "" + +#: library/faulthandler.rst:107 +msgid "" +"Dump the tracebacks of all threads, after a timeout of *timeout* seconds, or " +"every *timeout* seconds if *repeat* is ``True``. If *exit* is ``True``, " +"call :c:func:`_exit` with status=1 after dumping the tracebacks. (Note :c:" +"func:`_exit` exits the process immediately, which means it doesn't do any " +"cleanup like flushing file buffers.) If the function is called twice, the " +"new call replaces previous parameters and resets the timeout. The timer has " +"a sub-second resolution." +msgstr "" + +#: library/faulthandler.rst:115 +msgid "" +"The *file* must be kept open until the traceback is dumped or :func:" +"`cancel_dump_traceback_later` is called: see :ref:`issue with file " +"descriptors `." +msgstr "" + +#: library/faulthandler.rst:119 +msgid "This function is implemented using a watchdog thread." +msgstr "" + +#: library/faulthandler.rst:121 +msgid "This function is now always available." +msgstr "" + +#: library/faulthandler.rst:129 +msgid "Cancel the last call to :func:`dump_traceback_later`." +msgstr "" + +#: library/faulthandler.rst:133 +msgid "Dumping the traceback on a user signal" +msgstr "" + +#: library/faulthandler.rst:137 +msgid "" +"Register a user signal: install a handler for the *signum* signal to dump " +"the traceback of all threads, or of the current thread if *all_threads* is " +"``False``, into *file*. Call the previous handler if chain is ``True``." +msgstr "" + +#: library/faulthandler.rst:141 +msgid "" +"The *file* must be kept open until the signal is unregistered by :func:" +"`unregister`: see :ref:`issue with file descriptors `." +msgstr "" + +#: library/faulthandler.rst:155 +msgid "Not available on Windows." +msgstr "" + +#: library/faulthandler.rst:151 +msgid "" +"Unregister a user signal: uninstall the handler of the *signum* signal " +"installed by :func:`register`. Return ``True`` if the signal was registered, " +"``False`` otherwise." +msgstr "" + +#: library/faulthandler.rst:161 +msgid "Issue with file descriptors" +msgstr "" + +#: library/faulthandler.rst:163 +msgid "" +":func:`enable`, :func:`dump_traceback_later` and :func:`register` keep the " +"file descriptor of their *file* argument. If the file is closed and its file " +"descriptor is reused by a new file, or if :func:`os.dup2` is used to replace " +"the file descriptor, the traceback will be written into a different file. " +"Call these functions again each time that the file is replaced." +msgstr "" + +#: library/faulthandler.rst:171 +msgid "Example" +msgstr "Exemple" + +#: library/faulthandler.rst:173 +msgid "" +"Example of a segmentation fault on Linux with and without enabling the fault " +"handler:" +msgstr "" diff --git a/library/fcntl.po b/library/fcntl.po new file mode 100644 index 0000000000..e620a578b9 --- /dev/null +++ b/library/fcntl.po @@ -0,0 +1,270 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-05-21 16:37+0200\n" +"PO-Revision-Date: 2017-08-10 00:59+0200\n" +"Last-Translator: Julien Palard \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 1.8.11\n" + +#: library/fcntl.rst:2 +msgid ":mod:`fcntl` --- The ``fcntl`` and ``ioctl`` system calls" +msgstr "" + +#: library/fcntl.rst:16 +msgid "" +"This module performs file control and I/O control on file descriptors. It is " +"an interface to the :c:func:`fcntl` and :c:func:`ioctl` Unix routines. For " +"a complete description of these calls, see :manpage:`fcntl(2)` and :manpage:" +"`ioctl(2)` Unix manual pages." +msgstr "" + +#: library/fcntl.rst:21 +msgid "" +"All functions in this module take a file descriptor *fd* as their first " +"argument. This can be an integer file descriptor, such as returned by ``sys." +"stdin.fileno()``, or an :class:`io.IOBase` object, such as ``sys.stdin`` " +"itself, which provides a :meth:`~io.IOBase.fileno` that returns a genuine " +"file descriptor." +msgstr "" + +#: library/fcntl.rst:27 +msgid "" +"Operations in this module used to raise an :exc:`IOError` where they now " +"raise an :exc:`OSError`." +msgstr "" + +#: library/fcntl.rst:31 +msgid "" +"The fcntl module now contains ``F_ADD_SEALS``, ``F_GET_SEALS``, and " +"``F_SEAL_*`` constants for sealing of :func:`os.memfd_create` file " +"descriptors." +msgstr "" + +#: library/fcntl.rst:36 +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 are used when working with open file description locks." +msgstr "" + +#: library/fcntl.rst:43 +msgid "" +"On Linux >= 2.6.11, the fcntl module exposes the ``F_GETPIPE_SZ`` and " +"``F_SETPIPE_SZ`` constants, which allow to check and modify a pipe's size " +"respectively." +msgstr "" + +#: library/fcntl.rst:48 +msgid "The module defines the following functions:" +msgstr "Le module définit les fonctions suivantes :" + +#: library/fcntl.rst:53 +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 " +"for *cmd* are operating system dependent, and are available as constants in " +"the :mod:`fcntl` module, using the same names as used in the relevant C " +"header files. The argument *arg* can either be an integer value, or a :class:" +"`bytes` object. With an integer value, the return value of this function is " +"the integer return value of the C :c:func:`fcntl` call. When the argument " +"is bytes it represents a binary structure, e.g. created by :func:`struct." +"pack`. The binary data is copied to a buffer whose address is passed to the " +"C :c:func:`fcntl` call. The return value after a successful call is the " +"contents of the buffer, converted to a :class:`bytes` object. The length of " +"the returned object will be the same as the length of the *arg* argument. " +"This is limited to 1024 bytes. If the information returned in the buffer by " +"the operating system is larger than 1024 bytes, this is most likely to " +"result in a segmentation violation or a more subtle data corruption." +msgstr "" + +#: library/fcntl.rst:70 +msgid "If the :c:func:`fcntl` fails, an :exc:`OSError` is raised." +msgstr "" + +#: library/fcntl.rst:72 +msgid "" +"Raises an :ref:`auditing event ` ``fcntl.fcntl`` with arguments " +"``fd``, ``cmd``, ``arg``." +msgstr "" + +#: library/fcntl.rst:77 +msgid "" +"This function is identical to the :func:`~fcntl.fcntl` function, except that " +"the argument handling is even more complicated." +msgstr "" + +#: library/fcntl.rst:80 +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 " +"found in the :mod:`termios` module, under the same names as used in the " +"relevant C header files." +msgstr "" + +#: library/fcntl.rst:85 +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:89 +msgid "" +"In all but the last case, behaviour is as for the :func:`~fcntl.fcntl` " +"function." +msgstr "" + +#: library/fcntl.rst:92 +msgid "" +"If a mutable buffer is passed, then the behaviour is determined by the value " +"of the *mutate_flag* parameter." +msgstr "" + +#: library/fcntl.rst:95 +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 " +"-- so long as the buffer you pass is at least as long as what the operating " +"system wants to put there, things should work." +msgstr "" + +#: library/fcntl.rst:100 +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 " +"is passed back to the calling Python, and the buffer's new contents reflect " +"the action of the :func:`ioctl`. This is a slight simplification, because " +"if the supplied buffer is less than 1024 bytes long it is first copied into " +"a static buffer 1024 bytes long which is then passed to :func:`ioctl` and " +"copied back into the supplied buffer." +msgstr "" + +#: library/fcntl.rst:108 +msgid "If the :c:func:`ioctl` fails, an :exc:`OSError` exception is raised." +msgstr "" + +#: library/fcntl.rst:110 +msgid "An example::" +msgstr "Un exemple ::" + +#: library/fcntl.rst:123 +msgid "" +"Raises an :ref:`auditing event ` ``fcntl.ioctl`` with arguments " +"``fd``, ``request``, ``arg``." +msgstr "" + +#: library/fcntl.rst:128 +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 " +"Unix manual :manpage:`flock(2)` for details. (On some systems, this " +"function is emulated using :c:func:`fcntl`.)" +msgstr "" + +#: library/fcntl.rst:133 +msgid "If the :c:func:`flock` fails, an :exc:`OSError` exception is raised." +msgstr "" + +#: library/fcntl.rst:135 +msgid "" +"Raises an :ref:`auditing event ` ``fcntl.flock`` with arguments " +"``fd``, ``operation``." +msgstr "" + +#: library/fcntl.rst:140 +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." +"fileno` method are accepted as well) of the file to lock or unlock, and " +"*cmd* is one of the following values:" +msgstr "" + +#: library/fcntl.rst:145 +msgid ":const:`LOCK_UN` -- unlock" +msgstr "" + +#: library/fcntl.rst:146 +msgid ":const:`LOCK_SH` -- acquire a shared lock" +msgstr "" + +#: library/fcntl.rst:147 +msgid ":const:`LOCK_EX` -- acquire an exclusive lock" +msgstr "" + +#: library/fcntl.rst:149 +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:" +"`LOCK_NB` is used and the lock cannot be acquired, an :exc:`OSError` will be " +"raised and the exception will have an *errno* attribute set to :const:" +"`EACCES` or :const:`EAGAIN` (depending on the operating system; for " +"portability, check for both values). On at least some systems, :const:" +"`LOCK_EX` can only be used if the file descriptor refers to a file opened " +"for writing." +msgstr "" + +#: library/fcntl.rst:158 +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:162 +msgid ":const:`0` -- relative to the start of the file (:data:`os.SEEK_SET`)" +msgstr "" + +#: library/fcntl.rst:163 +msgid "" +":const:`1` -- relative to the current buffer position (:data:`os.SEEK_CUR`)" +msgstr "" + +#: library/fcntl.rst:164 +msgid ":const:`2` -- relative to the end of the file (:data:`os.SEEK_END`)" +msgstr "" + +#: library/fcntl.rst:166 +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:170 +msgid "" +"Raises an :ref:`auditing event ` ``fcntl.lockf`` with arguments " +"``fd``, ``cmd``, ``len``, ``start``, ``whence``." +msgstr "" + +#: library/fcntl.rst:172 +msgid "Examples (all on a SVR4 compliant system)::" +msgstr "" + +#: library/fcntl.rst:182 +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. " +"The structure lay-out for the *lockdata* variable is system dependent --- " +"therefore using the :func:`flock` call may be better." +msgstr "" + +#: library/fcntl.rst:193 +msgid "Module :mod:`os`" +msgstr "Module :mod:`os`" + +#: library/fcntl.rst:191 +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 " +"provides an alternative to the :func:`lockf` and :func:`flock` functions." +msgstr "" diff --git a/library/filecmp.po b/library/filecmp.po new file mode 100644 index 0000000000..34a8d4b6db --- /dev/null +++ b/library/filecmp.po @@ -0,0 +1,298 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-09-23 16:16+0200\n" +"PO-Revision-Date: 2019-05-23 20:39+0200\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.1\n" + +#: library/filecmp.rst:2 +msgid ":mod:`filecmp` --- File and Directory Comparisons" +msgstr ":mod:`filecmp` – Comparaisons de fichiers et de répertoires" + +#: library/filecmp.rst:9 +msgid "**Source code:** :source:`Lib/filecmp.py`" +msgstr "**Code source :** :source:`Lib/filecmp.py`" + +#: library/filecmp.rst:13 +msgid "" +"The :mod:`filecmp` module defines functions to compare files and " +"directories, with various optional time/correctness trade-offs. For " +"comparing files, see also the :mod:`difflib` module." +msgstr "" +"Le module :mod:`filecmp` définit les fonctions permettant de comparer les " +"fichiers et les répertoires, avec différents compromis optionnels durée / " +"exactitude. Pour comparer des fichiers, voir aussi le module :mod:`difflib`." + +#: library/filecmp.rst:17 +msgid "The :mod:`filecmp` module defines the following functions:" +msgstr "Le module :mod:`filecmp` définit les fonctions suivantes :" + +#: library/filecmp.rst:22 +msgid "" +"Compare the files named *f1* and *f2*, returning ``True`` if they seem " +"equal, ``False`` otherwise." +msgstr "" +"Compare les fichiers nommés *f1* et *f2* , renvoie ``True`` s’ils semblent " +"égaux, ``False`` sinon." + +#: library/filecmp.rst:25 +#, fuzzy +msgid "" +"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: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." +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: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 " +"changes. The entire cache may be cleared using :func:`clear_cache`." +msgstr "" +"Cette fonction utilise un cache pour les comparaisons antérieures et les " +"résultats, les entrées du cache étant invalidées si les informations :func:" +"`os.stat()` du fichier sont modifiées. La totalité du cache peut être " +"effacée avec :func:`clear_cache()`." + +#: library/filecmp.rst:41 +msgid "" +"Compare the files in the two directories *dir1* and *dir2* whose names are " +"given by *common*." +msgstr "" +"Compare les fichiers des deux répertoires *dir1* et *dir2* dont les noms " +"sont donnés par *common*." + +#: 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 " +"those that don't, and *errors* lists the names of files which could not be " +"compared. Files are listed in *errors* if they don't exist in one of the " +"directories, the user lacks permission to read them or if the comparison " +"could not be done for some other reason." +msgstr "" +"Renvoie trois listes de noms de fichiers : *match* , *mismatch*, *errors*. " +"*match* contient la liste des fichiers qui correspondent, *mismatch* " +"contient les noms de ceux qui ne correspondent pas et *errors* répertorie " +"les noms des fichiers qui n'ont pas pu être comparés. Les fichiers sont " +"répertoriés dans *errors* s'ils n'existent pas dans l'un des répertoires, si " +"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:51 +msgid "" +"The *shallow* parameter has the same meaning and default value as for :func:" +"`filecmp.cmp`." +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: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 " +"one of the three returned lists." +msgstr "" +"Par exemple, ``cmpfiles('a', 'b', ['c', 'd/e'])`` compare ``a/c`` et ``b/" +"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: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 " +"underlying filesystem." +msgstr "" +"Efface le cache *filecmp*. Cela peut être utile si un fichier est comparé " +"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:71 +msgid "The :class:`dircmp` class" +msgstr "La classe :class:`dircmp`" + +#: 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:" +"`filecmp.DEFAULT_IGNORES`. *hide* is a list of names to hide, and defaults " +"to ``[os.curdir, os.pardir]``." +msgstr "" +"Construit un nouvel objet de comparaison de répertoires, pour comparer les " +"répertoires *a* et *b*. *ignore* est une liste de noms à ignorer, par défaut " +"à :attr:`filecmp.DEFAULT_IGNORES`. *hide* est une liste de noms à cacher, " +"par défaut à ``[os.curdir, os.pardir]``." + +#: library/filecmp.rst:80 +msgid "" +"The :class:`dircmp` class compares files by doing *shallow* comparisons as " +"described for :func:`filecmp.cmp`." +msgstr "" +"La classe :class:`dircmp` compare les fichiers en faisant des comparaisons " +"*superficielles* comme décrit pour :func:`filecmp.cmp`." + +#: 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: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: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:96 +msgid "" +"Print a comparison between *a* and *b* and common subdirectories " +"(recursively)." +msgstr "" +"Affiche une comparaison entre a et b et les sous-répertoires communs " +"(récursivement)." + +#: 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 " +"compared." +msgstr "" +"La classe :class:`dircmp` offre un certain nombre d'attributs intéressants " +"qui peuvent être utilisés pour obtenir diverses informations sur les " +"arborescences de répertoires comparées." + +#: 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 " +"to compute are used." +msgstr "" +"Notez que, via les points d'ancrage :meth:`__getattr__`, tous les attributs " +"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:110 +msgid "The directory *a*." +msgstr "Le répertoire *a*." + +#: library/filecmp.rst:115 +msgid "The directory *b*." +msgstr "Le répertoire *b*." + +#: 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: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: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:135 +msgid "Files and subdirectories only in *a*." +msgstr "Fichiers et sous-répertoires uniquement dans *a*." + +#: library/filecmp.rst:140 +msgid "Files and subdirectories only in *b*." +msgstr "Fichiers et sous-répertoires uniquement dans *b*." + +#: library/filecmp.rst:145 +msgid "Subdirectories in both *a* and *b*." +msgstr "Sous-répertoires à la fois dans *a* et *b*." + +#: library/filecmp.rst:150 +msgid "Files in both *a* and *b*." +msgstr "Fichiers à la fois dans *a* et *b*." + +#: 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." +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:161 +msgid "" +"Files which are identical in both *a* and *b*, using the class's file " +"comparison operator." +msgstr "" +"Fichiers identiques dans *a* et *b*, en utilisant l'opérateur de comparaison " +"de fichiers de la classe." + +#: library/filecmp.rst:167 +msgid "" +"Files which are in both *a* and *b*, whose contents differ according to the " +"class's file comparison operator." +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: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:178 +#, fuzzy +msgid "" +"A dictionary mapping names in :attr:`common_dirs` to :class:`dircmp` " +"instances (or MyDirCmp instances if this instance is of type MyDirCmp, a " +"subclass of :class:`dircmp`)." +msgstr "" +"Un dictionnaire faisant correspondre les noms dans :attr:`common_dirs` vers " +"des objets :class:`dircmp`." + +#: library/filecmp.rst:182 +msgid "" +"Previously entries were always :class:`dircmp` instances. Now entries are " +"the same type as *self*, if *self* is a subclass of :class:`dircmp`." +msgstr "" + +#: library/filecmp.rst:191 +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:194 +msgid "" +"Here is a simplified example of using the ``subdirs`` attribute to search " +"recursively through two directories to show common different files::" +msgstr "" +"Voici un exemple simplifié d'utilisation de l'attribut ``subdirs`` pour " +"effectuer une recherche récursive dans deux répertoires afin d'afficher des " +"fichiers communs différents ::" diff --git a/library/fileformats.po b/library/fileformats.po new file mode 100644 index 0000000000..b3450fe984 --- /dev/null +++ b/library/fileformats.po @@ -0,0 +1,27 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +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: 2017-09-24 21:35+0200\n" +"Last-Translator: FULL NAME \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" + +#: library/fileformats.rst:5 +msgid "File Formats" +msgstr "Formats de fichiers" + +#: library/fileformats.rst:7 +msgid "" +"The modules described in this chapter parse various miscellaneous file " +"formats that aren't markup languages and are not related to e-mail." +msgstr "" +"Les modules décrits dans ce chapitre lisent divers formats de fichier qui ne " +"sont ni des langages balisés ni relatifs aux e-mails." diff --git a/library/fileinput.po b/library/fileinput.po new file mode 100644 index 0000000000..df74f3452e --- /dev/null +++ b/library/fileinput.po @@ -0,0 +1,414 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-05-21 16:37+0200\n" +"PO-Revision-Date: 2021-09-19 23:19+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/fileinput.rst:2 +msgid ":mod:`fileinput` --- Iterate over lines from multiple input streams" +msgstr ":mod:`fileinput` — Parcourt les lignes provenant de plusieurs entrées" + +#: library/fileinput.rst:10 +msgid "**Source code:** :source:`Lib/fileinput.py`" +msgstr "**Code source :** :source:`Lib/fileinput.py`" + +#: library/fileinput.rst:14 +msgid "" +"This module implements a helper class and functions to quickly write a loop " +"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 "Ce module s'utilise le plus couramment comme ceci :" + +#: library/fileinput.rst:24 +msgid "" +"This iterates over the lines of all files listed in ``sys.argv[1:]``, " +"defaulting to ``sys.stdin`` if the list is empty. If a filename is ``'-'``, " +"it is also replaced by ``sys.stdin`` and the optional arguments *mode* and " +"*openhook* are ignored. To specify an alternative list of filenames, pass " +"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 "" +"All files are opened in text mode by default, but you can override this by " +"specifying the *mode* parameter in the call to :func:`.input` or :class:" +"`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 +msgid ":exc:`IOError` used to be raised; it is now an alias of :exc:`OSError`." +msgstr "" +":exc:`IOError` était levée auparavant, elle est devenue un alias de :exc:" +"`OSError`." + +#: library/fileinput.rst:38 +msgid "" +"If ``sys.stdin`` is used more than once, the second and further use will " +"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 "" +"Empty files are opened and immediately closed; the only time their presence " +"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 +#, fuzzy +msgid "" +"You can control how files are opened by providing an opening hook via the " +"*openhook* parameter to :func:`fileinput.input` or :class:`FileInput()`. The " +"hook must be a function that takes two arguments, *filename* and *mode*, and " +"returns an accordingly opened file-like object. If *encoding* and/or " +"*errors* are specified, they will be passed to the hook as additional " +"keyword arguments. This module provides a :func:`hook_compressed` to support " +"compressed files." +msgstr "" +"Le paramètre *openhook* donne le contrôle sur la manière dont les fichiers " +"sont ouverts par :func:`fileinput.input` ou :class:`FileInput()`. Il s'agit " +"d'un point d'entrée automatique (*hook* en anglais). S'il est précisé, sa " +"valeur doit être une fonction, qui est appelée avec les arguments *filename* " +"et *mode* pour renvoyer un objet fichier-compatible ouvert selon *mode*. Ce " +"module contient deux fonctions prédéfinies qui peuvent être passées pour " +"*openhook*." + +#: library/fileinput.rst:56 +msgid "The following function is the primary interface of this module:" +msgstr "La fonction suivante constitue l'interface principale du module :" + +#: library/fileinput.rst:61 +msgid "" +"Create an instance of the :class:`FileInput` class. The instance will be " +"used as global state for the functions of this module, and is also returned " +"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:66 +msgid "" +"The :class:`FileInput` instance can be used as a context manager in the :" +"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:171 +msgid "Can be used as a context manager." +msgstr "prise en charge du protocole de gestionnaire de contexte." + +#: library/fileinput.rst:77 +msgid "The keyword parameters *mode* and *openhook* are now keyword-only." +msgstr "les paramètres *mode* et *openhook* doivent être nommés." + +#: library/fileinput.rst:183 library/fileinput.rst:213 +#, fuzzy +msgid "The keyword-only parameter *encoding* and *errors* are added." +msgstr "" +"les paramètres *mode* et *openhook* doivent impérativement être nommés." + +#: library/fileinput.rst:84 +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:90 +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:96 +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:102 +msgid "" +"Return the cumulative line number of the line that has just been read. " +"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:109 +msgid "" +"Return the line number in the current file. 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 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:116 +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:122 +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:128 +msgid "" +"Close the current file so that the next iteration will read the first line " +"from the next file (if any); lines not read from the file will not count " +"towards the cumulative line count. The filename is not changed until after " +"the first line of the next file has been read. Before the first line has " +"been read, this function has no effect; it cannot be used to skip the first " +"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:138 +msgid "Close the sequence." +msgstr "" +"Ferme le fichier courant et termine la lecture en sautant les fichiers " +"suivants." + +#: library/fileinput.rst:140 +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:146 +msgid "" +"Class :class:`FileInput` is the implementation; its methods :meth:" +"`filename`, :meth:`fileno`, :meth:`lineno`, :meth:`filelineno`, :meth:" +"`isfirstline`, :meth:`isstdin`, :meth:`nextfile` and :meth:`close` " +"correspond to the functions of the same name in the module. In addition it " +"has a :meth:`~io.TextIOBase.readline` method which returns the next input " +"line, and a :meth:`__getitem__` method which implements the sequence " +"behavior. The sequence must be accessed in strictly sequential order; random " +"access and :meth:`~io.TextIOBase.readline` cannot be mixed." +msgstr "" +":class:`FileInput` est l'implémentation principale du module. Ses méthodes :" +"meth:`filename`, :meth:`fileno`, :meth:`lineno`, :meth:`filelineno`, :meth:" +"`isfirstline`, :meth:`isstdin`, :meth:`nextfile` et :meth:`close` " +"correspondent aux fonctions du même nom au niveau du module. Elle possède " +"également une méthode :meth:`~io.TextIOBase.readline`, qui lit une nouvelle " +"ligne et la renvoie, ainsi qu'une méthode :meth:`__getitem__` qui permet " +"l'accès à un indice. Il faut lire les éléments de la séquence strictement " +"dans l'ordre (l'accès à un indice arbitraire n'étant pas compatible avec :" +"meth:`~io.TextIOBase.readline`)." + +#: library/fileinput.rst:155 +msgid "" +"With *mode* you can specify which file mode will be passed to :func:`open`. " +"It must be one of ``'r'``, ``'rU'``, ``'U'`` and ``'rb'``." +msgstr "" +"Le paramètre *mode* permet de préciser le mode d'ouverture des fichiers. Il " +"est passé directement à :func:`open`. Les valeurs possibles sont ``'r'``, " +"``'rU'``, ``'U'`` et ``'rb'``." + +#: library/fileinput.rst:158 +msgid "" +"The *openhook*, when given, must be a function that takes two arguments, " +"*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:162 +msgid "" +"You can specify *encoding* and *errors* that is passed to :func:`open` or " +"*openhook*." +msgstr "" + +#: library/fileinput.rst:164 +msgid "" +"A :class:`FileInput` instance can be used as a context manager in the :" +"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:174 +msgid "The ``'rU'`` and ``'U'`` modes." +msgstr "modes ``'rU'`` et ``'U'``." + +#: library/fileinput.rst:177 +msgid "Support for :meth:`__getitem__` method is deprecated." +msgstr "accès à un indice avec :meth:`__getitem__`." + +#: library/fileinput.rst:180 +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:187 +msgid "" +"**Optional in-place filtering:** if the keyword argument ``inplace=True`` is " +"passed to :func:`fileinput.input` or to the :class:`FileInput` constructor, " +"the file is moved to a backup file and standard output is directed to the " +"input file (if a file of the same name as the backup file already exists, it " +"will be replaced silently). This makes it possible to write a filter that " +"rewrites its input file in place. If the *backup* parameter is given " +"(typically as ``backup='.'``), it specifies the extension " +"for the backup file, and the backup file remains around; by default, the " +"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:199 +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:203 +msgid "" +"Transparently opens files compressed with gzip and bzip2 (recognized by the " +"extensions ``'.gz'`` and ``'.bz2'``) using the :mod:`gzip` and :mod:`bz2` " +"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:208 +msgid "" +"The *encoding* and *errors* values are passed to :class:`io.TextIOWrapper` " +"for compressed files and open for normal files." +msgstr "" + +#: library/fileinput.rst:211 +#, fuzzy +msgid "" +"Usage example: ``fi = fileinput.FileInput(openhook=fileinput." +"hook_compressed, encoding=\"utf-8\")``" +msgstr "" +"Exemple d'utilisation : ``fi = fileinput.FileInput(openhook=fileinput." +"hook_compressed)``." + +#: library/fileinput.rst:219 +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:222 +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:226 +msgid "Added the optional *errors* parameter." +msgstr "ajout du paramètre facultatif *errors*." + +#: library/fileinput.rst:229 +msgid "" +"This function is deprecated since :func:`fileinput.input` and :class:" +"`FileInput` now have *encoding* and *errors* parameters." +msgstr "" diff --git a/library/filesys.po b/library/filesys.po new file mode 100644 index 0000000000..ec13874873 --- /dev/null +++ b/library/filesys.po @@ -0,0 +1,67 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +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-09-28 11:33+0200\n" +"Last-Translator: Julien Palard \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 1.8.11\n" + +#: library/filesys.rst:5 +msgid "File and Directory Access" +msgstr "Accès aux Fichiers et aux Dossiers" + +#: library/filesys.rst:7 +msgid "" +"The modules described in this chapter deal with disk files and directories. " +"For example, there are modules for reading the properties of files, " +"manipulating paths in a portable way, and creating temporary files. The " +"full list of modules in this chapter is:" +msgstr "" +"Les modules décrits dans ce chapitre servent à accéder aux fichiers et aux " +"dossiers. Des modules, par exemple, pour lire les propriétés des fichiers, " +"manipuler des chemins de manière portable, et créer des fichiers " +"temporaires. La liste exhaustive des modules de ce chapitre est :" + +#: library/filesys.rst:31 +msgid "Module :mod:`os`" +msgstr "Module :mod:`os`" + +#: library/filesys.rst:30 +msgid "" +"Operating system interfaces, including functions to work with files at a " +"lower level than Python :term:`file objects `." +msgstr "" +"Interfaces du système d'exploitation, incluant des fonctions pour travailler " +"avec des fichiers dans un niveau plus bas que les :term:`objets fichiers " +"` de Python." + +#: library/filesys.rst:35 +msgid "Module :mod:`io`" +msgstr "Module :mod:`io`" + +#: library/filesys.rst:34 +msgid "" +"Python's built-in I/O library, including both abstract classes and some " +"concrete classes such as file I/O." +msgstr "" +"Bibliothèque d'entrées/sorties native de Python, incluant des classes " +"abstraites et concrètes tel que les I/O sur les fichiers." + +#: library/filesys.rst:37 +msgid "Built-in function :func:`open`" +msgstr "Fonction native :func:`open`" + +#: library/filesys.rst:38 +msgid "The standard way to open files for reading and writing with Python." +msgstr "" +"Le moyen classique pour ouvrir des fichiers pour les lire ou y écrire avec " +"Python." diff --git a/library/fnmatch.po b/library/fnmatch.po new file mode 100644 index 0000000000..73943cbdb5 --- /dev/null +++ b/library/fnmatch.po @@ -0,0 +1,160 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +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: 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.4.1\n" + +#: library/fnmatch.rst:2 +msgid ":mod:`fnmatch` --- Unix filename pattern matching" +msgstr ":mod:`fnmatch` — Filtrage par motif des noms de fichiers Unix" + +#: library/fnmatch.rst:7 +msgid "**Source code:** :source:`Lib/fnmatch.py`" +msgstr "**Code source :** :source:`Lib/fnmatch.py`" + +#: library/fnmatch.rst:15 +msgid "" +"This module provides support for Unix shell-style wildcards, which are *not* " +"the same as regular expressions (which are documented in the :mod:`re` " +"module). The special characters used in shell-style wildcards are:" +msgstr "" +"Ce module fournit la gestion des caractères de remplacement de style shell " +"Unix, qui ne sont *pas* identiques à ceux utilisés dans les expressions " +"régulières (documentés dans le module :mod:`re`). Les caractères spéciaux " +"utilisés comme caractères de remplacement de style shell sont :" + +#: library/fnmatch.rst:27 +msgid "Pattern" +msgstr "Motif" + +#: library/fnmatch.rst:27 +msgid "Meaning" +msgstr "Signification" + +#: library/fnmatch.rst:29 +msgid "``*``" +msgstr "``*``" + +#: library/fnmatch.rst:29 +msgid "matches everything" +msgstr "reconnaît n'importe quoi" + +#: library/fnmatch.rst:31 +msgid "``?``" +msgstr "``?``" + +#: library/fnmatch.rst:31 +msgid "matches any single character" +msgstr "reconnaît n'importe quel caractère unique" + +#: library/fnmatch.rst:33 +msgid "``[seq]``" +msgstr "``[seq]``" + +#: library/fnmatch.rst:33 +msgid "matches any character in *seq*" +msgstr "reconnaît n'importe quel caractère dans *seq*" + +#: library/fnmatch.rst:35 +msgid "``[!seq]``" +msgstr "``[!seq]``" + +#: library/fnmatch.rst:35 +msgid "matches any character not in *seq*" +msgstr "reconnaît n'importe quel caractère qui n'est pas dans *seq*" + +#: library/fnmatch.rst:38 +msgid "" +"For a literal match, wrap the meta-characters in brackets. For example, " +"``'[?]'`` matches the character ``'?'``." +msgstr "" +"Pour une correspondance littérale, il faut entourer le métacaractère par des " +"crochets. Par exemple, ``'[?]'`` reconnaît le caractère ``'?'``." + +#: library/fnmatch.rst:43 +msgid "" +"Note that the filename separator (``'/'`` on Unix) is *not* special to this " +"module. See module :mod:`glob` for pathname expansion (:mod:`glob` uses :" +"func:`.filter` to match pathname segments). Similarly, filenames starting " +"with a period are not special for this module, and are matched by the ``*`` " +"and ``?`` patterns." +msgstr "" +"Notons que le séparateur de nom de fichiers (``'/'`` sous Unix) n'est *pas* " +"traité de manière spéciale par ce module. Voir le module :mod:`glob` pour la " +"recherche de chemins (:mod:`glob` utilise :func:`.filter` pour reconnaître " +"les composants d'un chemin). De la même manière, les noms de fichiers " +"commençant par un point ne sont pas traités de manière spéciale par ce " +"module, et sont reconnus par les motifs ``*`` et ``?``." + +#: library/fnmatch.rst:52 +msgid "" +"Test whether the *filename* string matches the *pattern* string, returning :" +"const:`True` or :const:`False`. Both parameters are case-normalized using :" +"func:`os.path.normcase`. :func:`fnmatchcase` can be used to perform a case-" +"sensitive comparison, regardless of whether that's standard for the " +"operating system." +msgstr "" +"Teste si la chaîne de caractères *filename* correspond au motif *pattern*, " +"en renvoyant :const:`True` ou :const:`False`. La casse de chacun des " +"paramètres peut être normalisée en utilisant :func:`os.path.normcase`. :func:" +"`fnmatchcase` peut être utilisée pour réaliser une comparaison sensible à la " +"casse, indépendamment du système d'exploitation." + +#: library/fnmatch.rst:58 +msgid "" +"This example will print all file names in the current directory with the " +"extension ``.txt``::" +msgstr "" +"Cet exemple affiche tous les noms de fichiers du répertoire courant ayant " +"pour extension ``.txt`` ::" + +#: library/fnmatch.rst:71 +msgid "" +"Test whether *filename* matches *pattern*, returning :const:`True` or :const:" +"`False`; the comparison is case-sensitive and does not apply :func:`os.path." +"normcase`." +msgstr "" +"Teste si *filename* correspond au motif *pattern*, en renvoyant :const:" +"`True` ou :const:`False` ; la comparaison est sensible à la casse et " +"n'utilise pas la fonction :func:`os.path.normcase`." + +#: library/fnmatch.rst:78 +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)]``, " +"but implemented more efficiently." +msgstr "" +"Renvoie un sous-ensemble de la liste *names* correspondant au motif " +"*pattern*. Similaire à ``[n for n in names if fnmatch(n, pattern)]``, mais " +"implémenté plus efficacement." + +#: library/fnmatch.rst:84 +msgid "" +"Return the shell-style *pattern* converted to a regular expression for using " +"with :func:`re.match`." +msgstr "" +"Renvoie le motif *pattern*, de style shell, converti en une expression " +"régulière utilisable avec :func:`re.match`." + +#: library/fnmatch.rst:87 +msgid "Example:" +msgstr "Exemple :" + +#: library/fnmatch.rst:101 +msgid "Module :mod:`glob`" +msgstr "Module :mod:`glob`" + +#: library/fnmatch.rst:102 +msgid "Unix shell-style path expansion." +msgstr "Recherche de chemins de style shell Unix." diff --git a/library/fractions.po b/library/fractions.po new file mode 100644 index 0000000000..73f51a3e97 --- /dev/null +++ b/library/fractions.po @@ -0,0 +1,250 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-22 22:57+0100\n" +"PO-Revision-Date: 2022-10-18 15:57+0200\n" +"Last-Translator: Loc Cosnier \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" +"Plural-Forms: nplurals=2; plural=(n > 1)\n" +"X-Generator: Gtranslator 3.38.0\n" + +#: library/fractions.rst:2 +msgid ":mod:`fractions` --- Rational numbers" +msgstr ":mod:`fractions` — Nombres rationnels" + +#: library/fractions.rst:10 +msgid "**Source code:** :source:`Lib/fractions.py`" +msgstr "**Code source :** :source:`Lib/fractions.py`" + +#: library/fractions.rst:14 +msgid "" +"The :mod:`fractions` module provides support for rational number arithmetic." +msgstr "" +"Le module :mod:`fractions` fournit un support de l'arithmétique des nombres " +"rationnels." + +#: library/fractions.rst:17 +msgid "" +"A Fraction instance can be constructed from a pair of integers, from another " +"rational number, or from a string." +msgstr "" +"Une instance de *Fraction* peut être construite depuis une paire d'entiers, " +"depuis un autre nombre rationnel, ou depuis une chaîne de caractères." + +#: library/fractions.rst:26 +msgid "" +"The first version requires that *numerator* and *denominator* are instances " +"of :class:`numbers.Rational` and returns a new :class:`Fraction` instance " +"with value ``numerator/denominator``. If *denominator* is :const:`0`, it " +"raises a :exc:`ZeroDivisionError`. The second version requires that " +"*other_fraction* is an instance of :class:`numbers.Rational` and returns a :" +"class:`Fraction` instance with the same value. The next two versions accept " +"either a :class:`float` or a :class:`decimal.Decimal` instance, and return " +"a :class:`Fraction` instance with exactly the same value. Note that due to " +"the usual issues with binary floating-point (see :ref:`tut-fp-issues`), the " +"argument to ``Fraction(1.1)`` is not exactly equal to 11/10, and so " +"``Fraction(1.1)`` does *not* return ``Fraction(11, 10)`` as one might " +"expect. (But see the documentation for the :meth:`limit_denominator` method " +"below.) The last version of the constructor expects a string or unicode " +"instance. The usual form for this instance is::" +msgstr "" +"La première version demande que *numerator* et *denominator* soient des " +"instance de :class:`numbers.Rational` et renvoie une instance de :class:" +"`Fraction` valant ``numerator/denominator``. Si *denominator* vaut :const:" +"`0`, une :exc:`ZeroDivisionError` est levée. La seconde version demande que " +"*other_fraction* soit une instance de :class:`numbers.Rational` et renvoie " +"une instance de :class:`Fraction` avec la même valeur. Les deux versions " +"suivantes acceptent un :class:`float` ou une instance de :class:`decimal." +"Decimal`, et renvoient une instance de :class:`Fraction` avec exactement la " +"même valeur. Notez que les problèmes usuels des virgules flottantes " +"binaires (voir :ref:`tut-fp-issues`) font que ``Fraction(1.1)`` n'est pas " +"exactement égal à 11/10, et donc ``Fraction(1.1)`` ne renvoie *pas* " +"``Fraction(11, 10)`` comme on pourrait le penser. (Mais référez-vous à la " +"documentation de la méthode :meth:`limit_denominator` ci-dessous.) La " +"dernière version du constructeur attend une chaîne de caractères ou Unicode. " +"La représentation habituelle de cette forme est ::" + +#: library/fractions.rst:43 +msgid "" +"where the optional ``sign`` may be either '+' or '-' and ``numerator`` and " +"``denominator`` (if present) are strings of decimal digits. In addition, " +"any string that represents a finite value and is accepted by the :class:" +"`float` constructor is also accepted by the :class:`Fraction` constructor. " +"In either form the input string may also have leading and/or trailing " +"whitespace. Here are some examples::" +msgstr "" +"où le ``sign`` optionnel peut être soit ``+`` soit ``-``, et ``numerator`` " +"et ``denominator`` (si présent) sont des chaînes de chiffres décimaux. De " +"plus, toute chaîne qui représente une valeur finie et acceptée par le " +"constructeur de :class:`float` est aussi acceptée par celui de :class:" +"`Fraction`. Dans ces deux formes, la chaîne d'entrée peut aussi contenir " +"des espaces en début ou en fin de chaîne. Voici quelques exemples ::" + +#: library/fractions.rst:77 +#, fuzzy +msgid "" +"The :class:`Fraction` class inherits from the abstract base class :class:" +"`numbers.Rational`, and implements all of the methods and operations from " +"that class. :class:`Fraction` instances are :term:`hashable`, and should be " +"treated as immutable. In addition, :class:`Fraction` has the following " +"properties and methods:" +msgstr "" +"La classe :class:`Fraction` hérite de la classe abstraite :class:`numbers." +"Rational`, et implémente toutes les méthodes et opérations de cette classe. " +"Les instances de :class:`Fraction` sont hachables, et doivent être traitées " +"comme immuables. En plus de cela, :class:`Fraction` possède les propriétés " +"et méthodes suivantes :" + +#: library/fractions.rst:83 +msgid "" +"The :class:`Fraction` constructor now accepts :class:`float` and :class:" +"`decimal.Decimal` instances." +msgstr "" +"Le constructeur de :class:`Fraction` accepte maintenant des instances de :" +"class:`float` et :class:`decimal.Decimal`." + +#: library/fractions.rst:87 +msgid "" +"The :func:`math.gcd` function is now used to normalize the *numerator* and " +"*denominator*. :func:`math.gcd` always return a :class:`int` type. " +"Previously, the GCD type depended on *numerator* and *denominator*." +msgstr "" +"La fonction :func:`math.gcd` est maintenant utilisée pour normaliser le " +"*numerator* et le *denominator*. :func:`math.gcd` renvoie toujours un type :" +"class:`int`. Auparavant, le type du PGCD dépendait du *numerator* et du " +"*denominator*." + +#: library/fractions.rst:94 +msgid "Numerator of the Fraction in lowest term." +msgstr "Numérateur de la fraction irréductible." + +#: library/fractions.rst:98 +msgid "Denominator of the Fraction in lowest term." +msgstr "Dénominateur de la fraction irréductible." + +#: library/fractions.rst:103 +msgid "" +"Return a tuple of two integers, whose ratio is equal to the Fraction and " +"with a positive denominator." +msgstr "" +"Renvoie un *n*-uplet de deux entiers, dont le quotient est égal à la " +"fraction et dont le dénominateur est positif." + +#: library/fractions.rst:110 +msgid "" +"Alternative constructor which only accepts instances of :class:`float` or :" +"class:`numbers.Integral`. Beware that ``Fraction.from_float(0.3)`` is not " +"the same value as ``Fraction(3, 10)``." +msgstr "" +"Ce constructeur alternatif accepte (uniquement) des nombres à virgule " +"flottante, de classe :class:`float`, ou plus généralement des instances de :" +"class:`numbers.Integral`. Attention, ``Fraction.from_float(0.3)`` est " +"différent de ``Fraction(3, 10)``." + +#: library/fractions.rst:116 +msgid "" +"From Python 3.2 onwards, you can also construct a :class:`Fraction` instance " +"directly from a :class:`float`." +msgstr "" +"Depuis Python 3.2, vous pouvez aussi construire une instance de :class:" +"`Fraction` directement depuis un :class:`float`." + +#: library/fractions.rst:122 +msgid "" +"Alternative constructor which only accepts instances of :class:`decimal." +"Decimal` or :class:`numbers.Integral`." +msgstr "" +"Ce constructeur alternatif accepte (uniquement) les instances de :class:" +"`decimal.Decimal` ou :class:`numbers.Integral`." + +#: library/fractions.rst:127 +msgid "" +"From Python 3.2 onwards, you can also construct a :class:`Fraction` instance " +"directly from a :class:`decimal.Decimal` instance." +msgstr "" +"Depuis Python 3.2, vous pouvez aussi construire une instance de :class:" +"`Fraction` directement depuis une instance de :class:`decimal.Decimal`." + +#: library/fractions.rst:134 +msgid "" +"Finds and returns the closest :class:`Fraction` to ``self`` that has " +"denominator at most max_denominator. This method is useful for finding " +"rational approximations to a given floating-point number:" +msgstr "" +"Trouve et renvoie la :class:`Fraction` la plus proche de ``self`` qui a au " +"plus *max_denominator* comme dénominateur. Cette méthode est utile pour " +"trouver des approximations rationnelles de nombres flottants donnés :" + +#: library/fractions.rst:142 +msgid "or for recovering a rational number that's represented as a float:" +msgstr "ou pour retrouver un nombre rationnel représenté par un flottant :" + +#: library/fractions.rst:155 +msgid "" +"Returns the greatest :class:`int` ``<= self``. This method can also be " +"accessed through the :func:`math.floor` function:" +msgstr "" +"Renvoie le plus grand :class:`int` ``<= self``. Cette méthode peut aussi " +"être utilisée à travers la fonction :func:`math.floor`." + +#: library/fractions.rst:165 +msgid "" +"Returns the least :class:`int` ``>= self``. This method can also be " +"accessed through the :func:`math.ceil` function." +msgstr "" +"Renvoie le plus petit :class:`int` ``>= self``. Cette méthode peut aussi " +"être utilisée à travers la fonction :func:`math.ceil`." + +#: library/fractions.rst:172 +msgid "" +"The first version returns the nearest :class:`int` to ``self``, rounding " +"half to even. The second version rounds ``self`` to the nearest multiple of " +"``Fraction(1, 10**ndigits)`` (logically, if ``ndigits`` is negative), again " +"rounding half toward even. This method can also be accessed through the :" +"func:`round` function." +msgstr "" +"La première version renvoie l':class:`int` le plus proche de ``self``, " +"arrondissant les demis au nombre pair le plus proche. La seconde version " +"arrondit ``self`` au plus proche multiple de ``Fraction(1, 10**ndigits)`` " +"(logiquement, si ``ndigits`` est négatif), arrondissant toujours les demis " +"au nombre pair le plus proche. Cette méthode peut aussi être utilisée à via " +"la fonction :func:`round`." + +#: library/fractions.rst:181 +msgid "Module :mod:`numbers`" +msgstr "Module :mod:`numbers`" + +#: library/fractions.rst:182 +msgid "The abstract base classes making up the numeric tower." +msgstr "Les classes abstraites représentant la hiérarchie des nombres." + +#~ msgid "" +#~ "This class method constructs a :class:`Fraction` representing the exact " +#~ "value of *dec*, which must be a :class:`decimal.Decimal` instance." +#~ msgstr "" +#~ "Cette méthode de classe construit un objet :class:`Fraction` représentant " +#~ "la valeur exacte de *dec*, qui doit être de type :class:`decimal.Decimal`." + +#~ msgid "" +#~ "Return the greatest common divisor of the integers *a* and *b*. If " +#~ "either *a* or *b* is nonzero, then the absolute value of ``gcd(a, b)`` is " +#~ "the largest integer that divides both *a* and *b*. ``gcd(a,b)`` has the " +#~ "same sign as *b* if *b* is nonzero; otherwise it takes the sign of *a*. " +#~ "``gcd(0, 0)`` returns ``0``." +#~ msgstr "" +#~ "Renvoie le plus grand diviseur commun (PGCD) des entiers *a* et *b*. Si " +#~ "*a* et *b* sont tous deux non nuls, alors la valeur absolue de ``gcd(a, " +#~ "b)`` est le plus grand entier qui divise à la fois *a* et *b*. ``gcd(a," +#~ "b)`` a le même signe que *b* si *b* n'est pas nul ; autrement il prend le " +#~ "signe de *a*. ``gcd(0, 0)`` renvoie ``0``." + +#~ msgid "Use :func:`math.gcd` instead." +#~ msgstr "Utilisez plutôt :func:`math.gcd`." diff --git a/library/frameworks.po b/library/frameworks.po new file mode 100644 index 0000000000..c04813c004 --- /dev/null +++ b/library/frameworks.po @@ -0,0 +1,34 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +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: 2017-11-07 22:57+0100\n" +"Last-Translator: Julien Palard \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" + +#: library/frameworks.rst:5 +msgid "Program Frameworks" +msgstr "Cadriciels d'applications" + +#: library/frameworks.rst:7 +msgid "" +"The modules described in this chapter are frameworks that will largely " +"dictate the structure of your program. Currently the modules described " +"here are all oriented toward writing command-line interfaces." +msgstr "" +"Les modules décrits dans ce chapitre sont des cadriciels (*frameworks*, en " +"anglais) qui encadreront la structure de vos programmes. Actuellement tous " +"les modules décrits ici sont destinés à écrire des interfaces en ligne de " +"commande." + +#: library/frameworks.rst:11 +msgid "The full list of modules described in this chapter is:" +msgstr "La liste complète des modules décrits dans ce chapitre est :" diff --git a/library/ftplib.po b/library/ftplib.po new file mode 100644 index 0000000000..6d06978c0f --- /dev/null +++ b/library/ftplib.po @@ -0,0 +1,482 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-04-05 10:05+0200\n" +"PO-Revision-Date: 2022-10-20 16:07+0100\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 3.0.1\n" + +#: library/ftplib.rst:2 +msgid ":mod:`ftplib` --- FTP protocol client" +msgstr ":mod:`ftplib` — Le protocole client FTP" + +#: library/ftplib.rst:7 +msgid "**Source code:** :source:`Lib/ftplib.py`" +msgstr "**Code source :** :source:`Lib/ftplib.py`" + +#: library/ftplib.rst:15 +msgid "" +"This module defines the class :class:`FTP` and a few related items. The :" +"class:`FTP` class implements the client side of the FTP protocol. You can " +"use this to write Python programs that perform a variety of automated FTP " +"jobs, such as mirroring other FTP servers. It is also used by the module :" +"mod:`urllib.request` to handle URLs that use FTP. For more information on " +"FTP (File Transfer Protocol), see internet :rfc:`959`." +msgstr "" +"Ce module définit la classe :class:`FTP` et quelques éléments associés. La " +"classe :class:`FTP` implémente le côté client du protocole FTP. Vous pouvez " +"l'utiliser pour écrire des programmes Python qui effectuent diverses tâches " +"automatisées telles que la synchronisation d'autres serveurs FTP. Il est " +"aussi utilisé par le module :mod:`urllib.request` pour gérer les URL qui " +"utilisent FTP. Pour plus d'informations sur FTP (File Transfer Protocol), " +"voir la :rfc:`959`." + +#: library/ftplib.rst:22 +msgid "The default encoding is UTF-8, following :rfc:`2640`." +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 "Voici un exemple de session utilisant le module :mod:`ftplib` ::" + +#: library/ftplib.rst:46 +msgid "The module defines the following items:" +msgstr "Le module définit les éléments suivants :" + +#: 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 " +"the method call ``login(user, passwd, acct)`` is made (where *passwd* and " +"*acct* default to the empty string when not given). The optional *timeout* " +"parameter specifies a timeout in seconds for blocking operations like the " +"connection attempt (if is not specified, the global default timeout setting " +"will be used). *source_address* is a 2-tuple ``(host, port)`` for the socket " +"to bind to as its source address before connecting. The *encoding* parameter " +"specifies the encoding for directories and filenames." +msgstr "" + +#: 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: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:103 library/ftplib.rst:212 +msgid "*source_address* parameter was added." +msgstr "" + +#: 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 " +"*encoding* parameter was added, and the default was changed from Latin-1 to " +"UTF-8 to follow :rfc:`2640`." +msgstr "" + +#: 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 " +"connection before authenticating. Securing the data connection requires the " +"user to explicitly ask for it by calling the :meth:`prot_p` method. " +"*context* is a :class:`ssl.SSLContext` object which allows bundling SSL " +"configuration options, certificates and private keys into a single " +"(potentially long-lived) structure. Please read :ref:`ssl-security` for " +"best practices." +msgstr "" + +#: 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: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: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:124 +msgid "Here's a sample session using the :class:`FTP_TLS` class::" +msgstr "Voici un exemple de session utilisant la classe :class:`FTP_TLS` ::" + +#: library/ftplib.rst:137 +msgid "Exception raised when an unexpected reply is received from the server." +msgstr "Exception levée lorsqu'une réponse inattendue est reçue du serveur." + +#: 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: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: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: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 " +"opposed to programming errors made by the caller). This set includes the " +"four exceptions listed above as well as :exc:`OSError` and :exc:`EOFError`." +msgstr "" + +#: library/ftplib.rst:171 +msgid "Module :mod:`netrc`" +msgstr "" + +#: 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:178 +msgid "FTP Objects" +msgstr "" + +#: 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 " +"followed by ``lines`` for the text version or ``binary`` for the binary " +"version." +msgstr "" + +#: library/ftplib.rst:184 +msgid ":class:`FTP` instances have the following methods:" +msgstr "" +"Les instances de la classe :class:`FTP` possèdent les méthodes suivantes :" + +#: 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 " +"of ``1`` produces a moderate amount of debugging output, generally a single " +"line per request. A value of ``2`` or higher produces the maximum amount of " +"debugging output, logging each line sent and received on the control " +"connection." +msgstr "" + +#: 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 " +"a different port number. This function should be called only once for each " +"instance; it should not be called at all if a host was given when the " +"instance was created. All other methods can only be used after a connection " +"has been made. The optional *timeout* parameter specifies a timeout in " +"seconds for the connection attempt. If no *timeout* is passed, the global " +"default timeout setting will be used. *source_address* is a 2-tuple ``(host, " +"port)`` for the socket to bind to as its source address before connecting." +msgstr "" + +#: library/ftplib.rst:210 +msgid "" +"Raises an :ref:`auditing event ` ``ftplib.connect`` with arguments " +"``self``, ``host``, ``port``." +msgstr "" + +#: 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: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 " +"``'anonymous'``. If *user* is ``'anonymous'``, the default *passwd* is " +"``'anonymous@'``. This function should be called only once for each " +"instance, after a connection has been established; it should not be called " +"at all if a host and user were given when the instance was created. Most " +"FTP commands are only allowed after the client has logged in. The *acct* " +"parameter supplies \"accounting information\"; few systems implement this." +msgstr "" + +#: 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:243 +msgid "" +"Send a simple command string to the server and return the response string." +msgstr "" + +#: library/ftplib.rst:254 +msgid "" +"Raises an :ref:`auditing event ` ``ftplib.sendcmd`` with arguments " +"``self``, ``cmd``." +msgstr "" + +#: 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:259 +msgid "" +"Retrieve a file in binary transfer mode. *cmd* should be an appropriate " +"``RETR`` command: ``'RETR filename'``. The *callback* function is called for " +"each block of data received, with a single bytes argument giving the data " +"block. The optional *blocksize* argument specifies the maximum chunk size to " +"read on the low-level socket object created to do the actual transfer (which " +"will also be the largest size of the data blocks passed to *callback*). A " +"reasonable default is chosen. *rest* means the same thing as in the :meth:" +"`transfercmd` method." +msgstr "" + +#: 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 " +"``RETR`` command (see :meth:`retrbinary`) or a command such as ``LIST`` or " +"``NLST`` (usually just the string ``'LIST'``). ``LIST`` retrieves a list of " +"files and information about those files. ``NLST`` retrieves a list of file " +"names. The *callback* function is called for each line with a string " +"argument containing the line with the trailing CRLF stripped. The default " +"*callback* prints the line to ``sys.stdout``." +msgstr "" + +#: 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:290 +msgid "" +"Store a file in binary transfer mode. *cmd* should be an appropriate " +"``STOR`` command: ``\"STOR filename\"``. *fp* is a :term:`file object` " +"(opened in binary mode) which is read until EOF using its :meth:`~io.IOBase." +"read` method in blocks of size *blocksize* to provide the data to be stored. " +"The *blocksize* argument defaults to 8192. *callback* is an optional single " +"parameter callable that is called on each block of data after it is sent. " +"*rest* means the same thing as in the :meth:`transfercmd` method." +msgstr "" + +#: library/ftplib.rst:298 +msgid "*rest* parameter added." +msgstr "" + +#: 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 " +"object` *fp* (opened in binary mode) using its :meth:`~io.IOBase.readline` " +"method to provide the data to be stored. *callback* is an optional single " +"parameter callable that is called on each line after it is sent." +msgstr "" + +#: 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 " +"*cmd*, and accept the connection. If the server is passive, send an " +"``EPSV`` or ``PASV`` command, connect to it, and start the transfer " +"command. Either way, return the socket for the connection." +msgstr "" + +#: 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 " +"requested file, telling the server to restart sending the file's bytes at " +"the requested offset, skipping over the initial bytes. Note however that " +"the :meth:`transfercmd` method converts *rest* to a string with the " +"*encoding* parameter specified at initialization, but no check is performed " +"on the string's contents. If the server does not recognize the ``REST`` " +"command, an :exc:`error_reply` exception will be raised. If this happens, " +"simply call :meth:`transfercmd` without a *rest* argument." +msgstr "" + +#: 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, " +"``None`` will be returned as the expected size. *cmd* and *rest* means the " +"same thing as in :meth:`transfercmd`." +msgstr "" + +#: 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 " +"a list of strings representing the type of information desired (e.g. " +"``[\"type\", \"size\", \"perm\"]``). Return a generator object yielding a " +"tuple of two elements for every file found in path. First element is the " +"file name, the second one is a dictionary containing facts about the file " +"name. Content of this dictionary might be limited by the *facts* argument " +"but server is not guaranteed to return all requested facts." +msgstr "" + +#: 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: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: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 " +"is the current server directory). Multiple arguments can be used to pass " +"non-standard options to the ``LIST`` command. If the last argument is a " +"function, it is used as a *callback* function as for :meth:`retrlines`; the " +"default prints to ``sys.stdout``. This method returns ``None``." +msgstr "" + +#: 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: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:388 +msgid "Set the current directory on the server." +msgstr "" + +#: library/ftplib.rst:393 +msgid "Create a new directory on the server." +msgstr "Crée un nouveau dossier sur le serveur." + +#: library/ftplib.rst:398 +msgid "Return the pathname of the current directory on the server." +msgstr "Renvoie le chemin d'accès au répertoire courant sur le serveur." + +#: library/ftplib.rst:403 +msgid "Remove the directory named *dirname* on the server." +msgstr "Supprime le dossier portant le nom *dirname* sur le serveur." + +#: 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 " +"returned. Note that the ``SIZE`` command is not standardized, but is " +"supported by many common server implementations." +msgstr "" + +#: 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 " +"server responds with an error to the ``QUIT`` command. This implies a call " +"to the :meth:`close` method which renders the :class:`FTP` instance useless " +"for subsequent calls (see below)." +msgstr "" + +#: 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`. " +"After this call the :class:`FTP` instance should not be used any more (after " +"a call to :meth:`close` or :meth:`~FTP.quit` you cannot reopen the " +"connection by issuing another :meth:`login` method)." +msgstr "" + +#: library/ftplib.rst:433 +msgid "FTP_TLS Objects" +msgstr "" + +#: library/ftplib.rst:435 +msgid "" +":class:`FTP_TLS` class inherits from :class:`FTP`, defining these additional " +"objects:" +msgstr "" + +#: library/ftplib.rst:439 +msgid "The SSL version to use (defaults to :attr:`ssl.PROTOCOL_SSLv23`)." +msgstr "" + +#: 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: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: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:461 +msgid "Set up secure data connection." +msgstr "Établit une connexion de données sécurisée." + +#: library/ftplib.rst:465 +msgid "Set up clear text data connection." +msgstr "Établit une connexion de données non sécurisées." diff --git a/library/functional.po b/library/functional.po new file mode 100644 index 0000000000..617de83bbb --- /dev/null +++ b/library/functional.po @@ -0,0 +1,32 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +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-02-15 00:43+0100\n" +"Last-Translator: Julien Palard \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" + +#: library/functional.rst:3 +msgid "Functional Programming Modules" +msgstr "Modules de programmation fonctionnelle" + +#: library/functional.rst:5 +msgid "" +"The modules described in this chapter provide functions and classes that " +"support a functional programming style, and general operations on callables." +msgstr "" +"Les modules décrits dans ce chapitre fournissent des fonctions et des " +"classes permettant d'adopter un style fonctionnel, ainsi que des " +"manipulations sur des appelables." + +#: library/functional.rst:8 +msgid "The following modules are documented in this chapter:" +msgstr "Les modules suivants sont documentés dans ce chapitre :" diff --git a/library/functions.po b/library/functions.po new file mode 100644 index 0000000000..9edb29c3e8 --- /dev/null +++ b/library/functions.po @@ -0,0 +1,3755 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-22 22:57+0100\n" +"PO-Revision-Date: 2023-04-26 20:31+0200\n" +"Last-Translator: Mathieu Dupuy\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" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" +"X-Generator: Poedit 3.2.2\n" + +#: library/functions.rst:11 +msgid "Built-in Functions" +msgstr "Fonctions natives" + +#: library/functions.rst:7 +msgid "" +"The Python interpreter has a number of functions and types built into it " +"that are always available. They are listed here in alphabetical order." +msgstr "" +"L'interpréteur Python propose quelques fonctions et types natifs qui sont " +"toujours disponibles. Ils sont listés ici par ordre alphabétique." + +#: library/functions.rst:0 +msgid "**A**" +msgstr "**A**" + +#: library/functions.rst:0 +msgid ":func:`abs`" +msgstr ":func:`abs`" + +#: library/functions.rst:0 +msgid ":func:`aiter`" +msgstr ":func:`aiter`" + +#: library/functions.rst:0 +msgid ":func:`all`" +msgstr ":func:`all`" + +#: library/functions.rst:0 +msgid ":func:`any`" +msgstr ":func:`any`" + +#: library/functions.rst:0 +msgid ":func:`anext`" +msgstr ":func:`anext`" + +#: library/functions.rst:0 +msgid ":func:`ascii`" +msgstr ":func:`ascii`" + +#: library/functions.rst:0 +msgid "**B**" +msgstr "**B**" + +#: library/functions.rst:0 +msgid ":func:`bin`" +msgstr ":func:`bin`" + +#: library/functions.rst:0 +msgid ":func:`bool`" +msgstr ":func:`bool`" + +#: library/functions.rst:0 +msgid ":func:`breakpoint`" +msgstr ":func:`breakpoint`" + +#: library/functions.rst:0 +msgid "|func-bytearray|_" +msgstr "|func-bytearray|_" + +#: library/functions.rst:0 +msgid "|func-bytes|_" +msgstr "|func-bytes|_" + +#: library/functions.rst:0 +msgid "**C**" +msgstr "*C**" + +#: library/functions.rst:0 +msgid ":func:`callable`" +msgstr ":func:`callable`" + +#: library/functions.rst:0 +msgid ":func:`chr`" +msgstr ":func:`chr`" + +#: library/functions.rst:0 +msgid ":func:`classmethod`" +msgstr ":func:`classmethod`" + +#: library/functions.rst:0 +msgid ":func:`compile`" +msgstr ":func:`compile`" + +#: library/functions.rst:0 +msgid ":func:`complex`" +msgstr ":func:`complex`" + +#: library/functions.rst:0 +msgid "**D**" +msgstr "**D**" + +#: library/functions.rst:0 +msgid ":func:`delattr`" +msgstr ":func:`delattr`" + +#: library/functions.rst:0 +msgid "|func-dict|_" +msgstr "|func-dict|_" + +#: library/functions.rst:0 +msgid ":func:`dir`" +msgstr ":func:`dir`" + +#: library/functions.rst:0 +msgid ":func:`divmod`" +msgstr ":func:`divmod`" + +#: library/functions.rst:0 +msgid "**E**" +msgstr "**E**" + +#: library/functions.rst:0 +msgid ":func:`enumerate`" +msgstr ":func:`enumerate`" + +#: library/functions.rst:0 +msgid ":func:`eval`" +msgstr ":func:`eval`" + +#: library/functions.rst:0 +msgid ":func:`exec`" +msgstr ":func:`exec`" + +#: library/functions.rst:0 +msgid "**F**" +msgstr "**F**" + +#: library/functions.rst:0 +msgid ":func:`filter`" +msgstr ":func:`filter`" + +#: library/functions.rst:0 +msgid ":func:`float`" +msgstr ":func:`float`" + +#: library/functions.rst:0 +msgid ":func:`format`" +msgstr ":func:`format`" + +#: library/functions.rst:0 +msgid "|func-frozenset|_" +msgstr "|func-frozenset|_" + +#: library/functions.rst:0 +msgid "**G**" +msgstr "**G**" + +#: library/functions.rst:0 +msgid ":func:`getattr`" +msgstr ":func:`getattr`" + +#: library/functions.rst:0 +msgid ":func:`globals`" +msgstr ":func:`globals`" + +#: library/functions.rst:0 +msgid "**H**" +msgstr "**H**" + +#: library/functions.rst:0 +msgid ":func:`hasattr`" +msgstr ":func:`hasattr`" + +#: library/functions.rst:0 +msgid ":func:`hash`" +msgstr ":func:`hash`" + +#: library/functions.rst:0 +msgid ":func:`help`" +msgstr ":func:`help`" + +#: library/functions.rst:0 +msgid ":func:`hex`" +msgstr ":func:`hex`" + +#: library/functions.rst:0 +msgid "**I**" +msgstr "**I**" + +#: library/functions.rst:0 +msgid ":func:`id`" +msgstr ":func:`id`" + +#: library/functions.rst:0 +msgid ":func:`input`" +msgstr ":func:`input`" + +#: library/functions.rst:0 +msgid ":func:`int`" +msgstr ":func:`int`" + +#: library/functions.rst:0 +msgid ":func:`isinstance`" +msgstr ":func:`isinstance`" + +#: library/functions.rst:0 +msgid ":func:`issubclass`" +msgstr ":func:`issubclass`" + +#: library/functions.rst:0 +msgid ":func:`iter`" +msgstr ":func:`iter`" + +#: library/functions.rst:0 +msgid "**L**" +msgstr "**L**" + +#: library/functions.rst:0 +msgid ":func:`len`" +msgstr ":func:`len`" + +#: library/functions.rst:0 +msgid "|func-list|_" +msgstr "|func-list|_" + +#: library/functions.rst:0 +msgid ":func:`locals`" +msgstr ":func:`locals`" + +#: library/functions.rst:0 +msgid "**M**" +msgstr "**M**" + +#: library/functions.rst:0 +msgid ":func:`map`" +msgstr ":func:`map`" + +#: library/functions.rst:0 +msgid ":func:`max`" +msgstr ":func:`max`" + +#: library/functions.rst:0 +msgid "|func-memoryview|_" +msgstr "|func-memoryview|_" + +#: library/functions.rst:0 +msgid ":func:`min`" +msgstr ":func:`min`" + +#: library/functions.rst:0 +msgid "**N**" +msgstr "**N**" + +#: library/functions.rst:0 +msgid ":func:`next`" +msgstr ":func:`next`" + +#: library/functions.rst:0 +msgid "**O**" +msgstr "**O**" + +#: library/functions.rst:0 +msgid ":func:`object`" +msgstr ":func:`object`" + +#: library/functions.rst:0 +msgid ":func:`oct`" +msgstr ":func:`oct`" + +#: library/functions.rst:0 +msgid ":func:`open`" +msgstr ":func:`open`" + +#: library/functions.rst:0 +msgid ":func:`ord`" +msgstr ":func:`ord`" + +#: library/functions.rst:0 +msgid "**P**" +msgstr "**P**" + +#: library/functions.rst:0 +msgid ":func:`pow`" +msgstr ":func:`pow`" + +#: library/functions.rst:0 +msgid ":func:`print`" +msgstr ":func:`print`" + +#: library/functions.rst:0 +msgid ":func:`property`" +msgstr ":func:`property`" + +#: library/functions.rst:0 +msgid "**R**" +msgstr "**R**" + +#: library/functions.rst:0 +msgid "|func-range|_" +msgstr "|func-range|_" + +#: library/functions.rst:0 +msgid ":func:`repr`" +msgstr ":func:`repr`" + +#: library/functions.rst:0 +msgid ":func:`reversed`" +msgstr ":func:`reversed`" + +#: library/functions.rst:0 +msgid ":func:`round`" +msgstr ":func:`round`" + +#: library/functions.rst:0 +msgid "**S**" +msgstr "**S**" + +#: library/functions.rst:0 +msgid "|func-set|_" +msgstr "|func-set|_" + +#: library/functions.rst:0 +msgid ":func:`setattr`" +msgstr ":func:`setattr`" + +#: library/functions.rst:0 +msgid ":func:`slice`" +msgstr ":func:`slice`" + +#: library/functions.rst:0 +msgid ":func:`sorted`" +msgstr ":func:`sorted`" + +#: library/functions.rst:0 +msgid ":func:`staticmethod`" +msgstr ":func:`staticmethod`" + +#: library/functions.rst:0 +msgid "|func-str|_" +msgstr "|func-str|_" + +#: library/functions.rst:0 +msgid ":func:`sum`" +msgstr ":func:`sum`" + +#: library/functions.rst:0 +msgid ":func:`super`" +msgstr ":func:`super`" + +#: library/functions.rst:0 +msgid "**T**" +msgstr "**T**" + +#: library/functions.rst:0 +msgid "|func-tuple|_" +msgstr "|func-tuple|_" + +#: library/functions.rst:0 +msgid ":func:`type`" +msgstr ":func:`type`" + +#: library/functions.rst:0 +msgid "**V**" +msgstr "**V**" + +#: library/functions.rst:0 +msgid ":func:`vars`" +msgstr ":func:`vars`" + +#: library/functions.rst:0 +msgid "**Z**" +msgstr "**Z**" + +#: library/functions.rst:0 +msgid ":func:`zip`" +msgstr ":func:`zip`" + +#: library/functions.rst:0 +msgid "**_**" +msgstr "**_**" + +#: library/functions.rst:0 +msgid ":func:`__import__`" +msgstr ":func:`__import__`" + +#: library/functions.rst:59 +msgid "" +"Return the absolute value of a number. The argument may be an integer, a " +"floating point number, or an object implementing :meth:`__abs__`. If the " +"argument is a complex number, its magnitude is returned." +msgstr "" +"Renvoie la valeur absolue d'un nombre. L'argument peut être un nombre " +"entier, un nombre à virgule flottante, ou tout objet définissant :meth:" +"`__abs__`. Si l'argument est un nombre complexe, son module est renvoyé." + +#: library/functions.rst:66 +msgid "" +"Return an :term:`asynchronous iterator` for an :term:`asynchronous " +"iterable`. Equivalent to calling ``x.__aiter__()``." +msgstr "" +"Renvoie un :term:`itérateur asynchrone ` pour l':term:" +"`itérable asynchrone ` donné. Équivaut à appeler ``x." +"__aiter__()``." + +#: library/functions.rst:69 +msgid "Note: Unlike :func:`iter`, :func:`aiter` has no 2-argument variant." +msgstr "" +"Remarque : contrairement à :func:`iter`, :func:`aiter` n'a pas de variante à " +"2 arguments." + +#: library/functions.rst:75 +msgid "" +"Return ``True`` if all elements of the *iterable* are true (or if the " +"iterable is empty). Equivalent to::" +msgstr "" +"Renvoie ``True`` si tous les éléments de *iterable* sont vrais (ou s'il est " +"vide). Équivaut à ::" + +#: library/functions.rst:87 +msgid "" +"When awaited, return the next item from the given :term:`asynchronous " +"iterator`, or *default* if given and the iterator is exhausted." +msgstr "" +"Lorsqu'il est attendu, renvoie l'élément suivant à partir de l':term:" +"`itérateur asynchrone ` donné, ou *default* s'il est " +"fourni et que l'itérateur est épuisé." + +#: library/functions.rst:90 +msgid "" +"This is the async variant of the :func:`next` builtin, and behaves similarly." +msgstr "" +"Il s'agit de la variante asynchrone de la fonction native :func:`next` et " +"elle se comporte de la même manière." + +#: library/functions.rst:93 +msgid "" +"This calls the :meth:`~object.__anext__` method of *async_iterator*, " +"returning an :term:`awaitable`. Awaiting this returns the next value of the " +"iterator. If *default* is given, it is returned if the iterator is " +"exhausted, otherwise :exc:`StopAsyncIteration` is raised." +msgstr "" +"Renvoie un :term:`attendable ` en appelant la méthode :meth:" +"`~object.__anext__` de *async_iterator*. L'attente renvoie la prochaine " +"valeur de l'itérateur. Si *default* est fourni, il est renvoyé si " +"l'itérateur est épuisé, sinon :exc:`StopAsyncIteration` est levée." + +#: library/functions.rst:102 +msgid "" +"Return ``True`` if any element of the *iterable* is true. If the iterable " +"is empty, return ``False``. Equivalent to::" +msgstr "" +"Renvoie ``True`` si au moins un élément de *iterable* est vrai. ``False`` " +"est renvoyé dans le cas où *iterable* est vide. Équivaut à ::" + +#: library/functions.rst:114 +#, fuzzy +msgid "" +"As :func:`repr`, return a string containing a printable representation of an " +"object, but escape the non-ASCII characters in the string returned by :func:" +"`repr` using ``\\x``, ``\\u``, or ``\\U`` escapes. This generates a string " +"similar to that returned by :func:`repr` in Python 2." +msgstr "" +"Renvoie, tout comme :func:`repr`, une chaîne contenant une représentation " +"d'un objet destinée à l'affichage, mais en transformant les caractères non " +"ASCII renvoyés par :func:`repr` par l'utilisation de séquences d'échappement " +"``\\x``, ``\\u`` ou ``\\U``. Cela génère une chaîne similaire à ce que " +"renvoie :func:`repr` dans Python 2." + +#: library/functions.rst:122 +msgid "" +"Convert an integer number to a binary string prefixed with \"0b\". The " +"result is a valid Python expression. If *x* is not a Python :class:`int` " +"object, it has to define an :meth:`__index__` method that returns an " +"integer. Some examples:" +msgstr "" +"Convertit un nombre entier en binaire dans une chaîne avec le préfixe " +"``0b``. Le résultat est une expression Python valide. Si *x* n'est pas un :" +"class:`int`, il doit définir une méthode :meth:`__index__` donnant un nombre " +"entier. Voici quelques exemples :" + +#: library/functions.rst:132 +msgid "" +"If the prefix \"0b\" is desired or not, you can use either of the following " +"ways." +msgstr "" +"Vous pouvez contrôler l'affichage du préfixe ``\"0b\"`` à l'aide d'un des " +"moyens suivants." + +#: library/functions.rst:811 library/functions.rst:1119 +msgid "See also :func:`format` for more information." +msgstr "Voir aussi :func:`format` pour plus d'informations." + +#: library/functions.rst:144 +#, fuzzy +msgid "" +"Return a Boolean value, i.e. one of ``True`` or ``False``. *x* is converted " +"using the standard :ref:`truth testing procedure `. If *x* is false " +"or omitted, this returns ``False``; otherwise, it returns ``True``. The :" +"class:`bool` class is a subclass of :class:`int` (see :ref:`typesnumeric`). " +"It cannot be subclassed further. Its only instances are ``False`` and " +"``True`` (see :ref:`bltin-boolean-values`)." +msgstr "" +"Renvoie une valeur booléenne, c'est-à-dire soit ``True``, soit ``False``. " +"*x* est converti en utilisant la :ref:`procédure standard d'évaluation de " +"valeur de vérité `. Si *x* est faux, ou omis, elle renvoie ``False``, " +"sinon, elle renvoie ``True``. La classe :class:`bool` hérite de la classe :" +"class:`int` (voir :ref:`typesnumeric`). Il n'est pas possible d'en hériter, " +"ses seules instances sont ``False`` et ``True`` (voir :ref:`bltin-boolean-" +"values`)." + +#: library/functions.rst:678 library/functions.rst:899 +msgid "*x* is now a positional-only parameter." +msgstr "*x* est désormais un argument exclusivement optionnel." + +#: library/functions.rst:158 +msgid "" +"This function drops you into the debugger at the call site. Specifically, " +"it calls :func:`sys.breakpointhook`, passing ``args`` and ``kws`` straight " +"through. By default, ``sys.breakpointhook()`` calls :func:`pdb.set_trace()` " +"expecting no arguments. In this case, it is purely a convenience function " +"so you don't have to explicitly import :mod:`pdb` or type as much code to " +"enter the debugger. However, :func:`sys.breakpointhook` can be set to some " +"other function and :func:`breakpoint` will automatically call that, allowing " +"you to drop into the debugger of choice. If :func:`sys.breakpointhook` is " +"not accessible, this function will raise :exc:`RuntimeError`." +msgstr "" +"Cette fonction vous place dans le débogueur lorsqu'elle est appelée. Plus " +"précisément, elle appelle :func:`sys.breakpointhook`, en lui passant les " +"arguments ``args`` et ``kws``. Par défaut, ``sys.breakpointhook()`` appelle :" +"func:`pdb.set_trace()` qui n'attend aucun argument. Dans ce cas, c'est " +"purement une fonction de commodité donc vous n'avez pas à importer " +"explicitement :mod:`pdb` ou à taper plus de code pour entrer dans le " +"débogueur. Cependant, il est possible d'affecter une autre fonction à :func:" +"`sys.breakpointhook`, que :func:`breakpoint` appellera automatiquement, vous " +"permettant ainsi de basculer dans le débogueur de votre choix. Si :func:`sys." +"breakpointhook` n'est pas accessible, cette fonction lève :exc:" +"`RuntimeError`." + +#: library/functions.rst:170 +msgid "" +"Raises an :ref:`auditing event ` ``builtins.breakpoint`` with " +"argument ``breakpointhook``." +msgstr "" +"Lève un :ref:`évènement d'audit ` ``builtins.breakpoint`` avec " +"l'argument ``breakpointhook``." + +#: library/functions.rst:178 +msgid "" +"Return a new array of bytes. The :class:`bytearray` class is a mutable " +"sequence of integers in the range 0 <= x < 256. It has most of the usual " +"methods of mutable sequences, described in :ref:`typesseq-mutable`, as well " +"as most methods that the :class:`bytes` type has, see :ref:`bytes-methods`." +msgstr "" +"Renvoie un nouveau tableau d'octets. La classe :class:`bytearray` est une " +"séquence muable de nombres entiers dans l'intervalle 0 <= x < 256. Il " +"possède la plupart des méthodes des séquences variables, décrites dans :ref:" +"`typesseq-mutable`, ainsi que la plupart des méthodes de la classe :class:" +"`bytes`, voir :ref:`bytes-methods`." + +#: library/functions.rst:183 +msgid "" +"The optional *source* parameter can be used to initialize the array in a few " +"different ways:" +msgstr "" +"Le paramètre optionnel *source* peut être utilisé pour initialiser le " +"tableau de plusieurs façons :" + +#: library/functions.rst:186 +msgid "" +"If it is a *string*, you must also give the *encoding* (and optionally, " +"*errors*) parameters; :func:`bytearray` then converts the string to bytes " +"using :meth:`str.encode`." +msgstr "" +"si c'est une *chaîne*, vous devez aussi donner le paramètre *encoding* pour " +"l'encodage (et éventuellement *errors*). La fonction :func:`bytearray` " +"convertit ensuite la chaîne en octets via la méthode :meth:`str.encode` ;" + +#: library/functions.rst:190 +msgid "" +"If it is an *integer*, the array will have that size and will be initialized " +"with null bytes." +msgstr "" +"si c'est un *entier*, le tableau a cette taille et est initialisé d'octets " +"*null* ;" + +#: library/functions.rst:193 +#, 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 à :ref:`l'interface tampon `, un " +"tampon en lecture seule de l'objet est utilisé pour initialiser le tableau ;" + +#: library/functions.rst:196 +msgid "" +"If it is an *iterable*, it must be an iterable of integers in the range ``0 " +"<= x < 256``, which are used as the initial contents of the array." +msgstr "" +"si c'est un *itérable*, il doit itérer sur des nombres entier dans " +"l'intervalle ``0 <= x < 256``, qui sont utilisés pour initialiser le contenu " +"du tableau." + +#: library/functions.rst:199 +msgid "Without an argument, an array of size 0 is created." +msgstr "Sans argument, un tableau vide est créé." + +#: library/functions.rst:201 +msgid "See also :ref:`binaryseq` and :ref:`typebytearray`." +msgstr "Voir :ref:`binaryseq` et :ref:`typebytearray`." + +#: library/functions.rst:208 +msgid "" +"Return a new \"bytes\" object which is an immutable sequence of integers in " +"the range ``0 <= x < 256``. :class:`bytes` is an immutable version of :" +"class:`bytearray` -- it has the same non-mutating methods and the same " +"indexing and slicing behavior." +msgstr "" +"Renvoie un nouvel objet *bytes*, qui est une séquence immuable de nombres " +"entiers dans l'intervalle ``0 <= x < 256``. Un :class:`bytes` est une " +"version immuable de :class:`bytearray` — avec les mêmes méthodes d'accès, et " +"le même comportement lors de l'indexation ou du découpage." + +#: library/functions.rst:213 +msgid "" +"Accordingly, constructor arguments are interpreted as for :func:`bytearray`." +msgstr "" +"En conséquence, les arguments du constructeur sont les mêmes que pour :func:" +"`bytearray`." + +#: library/functions.rst:215 +msgid "Bytes objects can also be created with literals, see :ref:`strings`." +msgstr "" +"Les objets *bytes* peuvent aussi être créés à partir de littéraux, voir :ref:" +"`strings`." + +#: library/functions.rst:217 +msgid "See also :ref:`binaryseq`, :ref:`typebytes`, and :ref:`bytes-methods`." +msgstr "" +"Voir aussi :ref:`binaryseq`, :ref:`typebytes`, et :ref:`bytes-methods`." + +#: library/functions.rst:222 +msgid "" +"Return :const:`True` if the *object* argument appears callable, :const:" +"`False` if not. If this returns ``True``, it is still possible that a call " +"fails, but if it is ``False``, calling *object* will never succeed. Note " +"that classes are callable (calling a class returns a new instance); " +"instances are callable if their class has a :meth:`__call__` method." +msgstr "" +"Renvoie :const:`True` si l'argument *object* semble être appelable, sinon :" +"const:`False`. Lorsqu'elle renvoie ``True``, il est toujours possible qu'un " +"appel échoue. Cependant, lorsqu'elle renvoie ``False``, il n'est jamais " +"possible d'appeler *object*. Notez qu'une classe est toujours appelable " +"(appeler une classe donne une nouvelle instance) ; une instance n'est " +"appelable que si sa classe définit une méthode :meth:`__call__`." + +#: library/functions.rst:228 +msgid "" +"This function was first removed in Python 3.0 and then brought back in " +"Python 3.2." +msgstr "" +"cette fonction a d'abord été supprimée avec Python 3.0 puis elle a été " +"remise dans Python 3.2." + +#: library/functions.rst:235 +msgid "" +"Return the string representing a character whose Unicode code point is the " +"integer *i*. For example, ``chr(97)`` returns the string ``'a'``, while " +"``chr(8364)`` returns the string ``'€'``. This is the inverse of :func:`ord`." +msgstr "" +"Renvoie la chaîne représentant un caractère dont le code de caractère " +"Unicode est le nombre entier *i*. Par exemple, ``chr(97)`` renvoie la chaîne " +"de caractères ``'a'``, tandis que ``chr(8364)`` renvoie ``'€'``. Il s'agit " +"de l'inverse de :func:`ord`." + +#: library/functions.rst:239 +msgid "" +"The valid range for the argument is from 0 through 1,114,111 (0x10FFFF in " +"base 16). :exc:`ValueError` will be raised if *i* is outside that range." +msgstr "" +"L'intervalle valide pour cet argument est de ``0`` à ``1114111`` " +"(``0x10FFFF`` en base 16). Une exception :exc:`ValueError` est levée si *i* " +"est en dehors de l'intervalle." + +#: library/functions.rst:245 +msgid "Transform a method into a class method." +msgstr "Transforme une méthode en méthode de classe." + +#: library/functions.rst:247 +#, fuzzy +msgid "" +"A class method receives the class as an implicit first argument, just like " +"an instance method receives the instance. To declare a class method, use " +"this idiom::" +msgstr "" +"Une méthode de classe reçoit implicitement la classe en premier argument, " +"tout comme une méthode d'instance reçoit l'instance. Voici comment déclarer " +"une méthode de classe ::" + +#: library/functions.rst:255 +msgid "" +"The ``@classmethod`` form is a function :term:`decorator` -- see :ref:" +"`function` for details." +msgstr "" +"La forme ``@classmethod`` est un :term:`décorateur ` de fonction " +"— consultez :ref:`function` pour plus de détails." + +#: library/functions.rst:258 +msgid "" +"A class method can be called either on the class (such as ``C.f()``) or on " +"an instance (such as ``C().f()``). The instance is ignored except for its " +"class. If a class method is called for a derived class, the derived class " +"object is passed as the implied first argument." +msgstr "" +"Elle peut être appelée soit sur la classe (comme ``C.f()``) ou sur une " +"instance (comme ``C().f()``). L'instance est ignorée, sauf pour déterminer " +"sa classe. Si la méthode est appelée sur une instance de classe fille, c'est " +"la classe fille qui sera donnée en premier argument implicite." + +#: library/functions.rst:263 +msgid "" +"Class methods are different than C++ or Java static methods. If you want " +"those, see :func:`staticmethod` in this section. For more information on " +"class methods, see :ref:`types`." +msgstr "" +"Les méthodes de classe sont différentes des méthodes statiques du C++ ou du " +"Java. Si ce sont elles dont vous avez besoin, regardez du côté de :func:" +"`staticmethod` dans cette section. Voir aussi :ref:`types`." + +#: library/functions.rst:267 +msgid "" +"Class methods can now wrap other :term:`descriptors ` such as :" +"func:`property`." +msgstr "" +"les méthodes de classe peuvent encapsuler d'autres :term:`descripteurs " +"` comme :func:`property`." + +#: library/functions.rst:271 +msgid "" +"Class methods now inherit the method attributes (``__module__``, " +"``__name__``, ``__qualname__``, ``__doc__`` and ``__annotations__``) and " +"have a new ``__wrapped__`` attribute." +msgstr "" +"les méthodes de classe peuvent maintenant hériter des attributs des méthodes " +"(``__module__``, ``__name__``, ``__qualname__``, ``__doc__`` et " +"``__annotations__``) et ont un nouvel attribut ``__wrapped__``." + +#: library/functions.rst:278 +msgid "" +"Compile the *source* into a code or AST object. Code objects can be " +"executed by :func:`exec` or :func:`eval`. *source* can either be a normal " +"string, a byte string, or an AST object. Refer to the :mod:`ast` module " +"documentation for information on how to work with AST objects." +msgstr "" +"Compile *source* en un objet code ou objet AST. Les objets code peuvent être " +"exécutés par :func:`exec` ou :func:`eval`. *source* peut être une chaîne, " +"une chaîne d'octets, ou un objet AST. Consultez la documentation du module :" +"mod:`ast` pour des informations sur la manipulation d'objets AST." + +#: library/functions.rst:283 +msgid "" +"The *filename* argument should give the file from which the code was read; " +"pass some recognizable value if it wasn't read from a file (``''`` " +"is commonly used)." +msgstr "" +"L'argument *filename* doit désigner le fichier depuis lequel le code a été " +"lu. Donnez quelque chose de reconnaissable lorsqu'il n'a pas été lu depuis " +"un fichier (typiquement ``\"\"``)." + +#: library/functions.rst:287 +msgid "" +"The *mode* argument specifies what kind of code must be compiled; it can be " +"``'exec'`` if *source* consists of a sequence of statements, ``'eval'`` if " +"it consists of a single expression, or ``'single'`` if it consists of a " +"single interactive statement (in the latter case, expression statements that " +"evaluate to something other than ``None`` will be printed)." +msgstr "" +"L'argument *mode* indique quel type de code doit être compilé : ``'exec'`` " +"si *source* est une suite d'instructions, ``'eval'`` pour une seule " +"expression, ou ``'single'`` s'il ne contient qu'une instruction interactive " +"(dans ce dernier cas, les résultats d'expressions donnant autre chose que " +"``None`` sont affichés)." + +#: library/functions.rst:293 +msgid "" +"The optional arguments *flags* and *dont_inherit* control which :ref:" +"`compiler options ` should be activated and which :ref:" +"`future features ` should be allowed. If neither is present (or both " +"are zero) the code is compiled with the same flags that affect the code that " +"is calling :func:`compile`. If the *flags* argument is given and " +"*dont_inherit* is not (or is zero) then the compiler options and the future " +"statements specified by the *flags* argument are used in addition to those " +"that would be used anyway. If *dont_inherit* is a non-zero integer then the " +"*flags* argument is it -- the flags (future features and compiler options) " +"in the surrounding code are ignored." +msgstr "" +"Les arguments optionnels *flags* et *dont_inherit* contrôlent quelles :ref:" +"`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é tel quel — les *flags* " +"(instructions futures et options de compilation) valables pour le code " +"encadrant *compile* sont ignorés." + +#: library/functions.rst:304 +msgid "" +"Compiler options and future statements are specified by bits which can be " +"bitwise ORed together to specify multiple options. The bitfield required to " +"specify a given future feature can be found as the :attr:`~__future__." +"_Feature.compiler_flag` attribute on the :class:`~__future__._Feature` " +"instance in the :mod:`__future__` module. :ref:`Compiler 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 " +"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__`. Les :ref:`options du " +"compilateur ` se trouvent dans le module :mod:`ast`, " +"avec le préfixe ``PyCF_``." + +#: library/functions.rst:312 +msgid "" +"The argument *optimize* specifies the optimization level of the compiler; " +"the default value of ``-1`` selects the optimization level of the " +"interpreter as given by :option:`-O` options. Explicit levels are ``0`` (no " +"optimization; ``__debug__`` is true), ``1`` (asserts are removed, " +"``__debug__`` is false) or ``2`` (docstrings are removed too)." +msgstr "" +"L'argument *optimize* indique le niveau d'optimisation du compilateur. La " +"valeur par défaut est ``-1`` qui prend le niveau d'optimisation de " +"l'interpréteur tel que reçu via l'option :option:`-O`. Les niveaux " +"explicites sont : ``0`` (pas d'optimisation, ``__debug__`` est ``True``), " +"``1`` (les ``assert`` sont supprimés, ``__debug__`` est ``False``) ou ``2`` " +"(les *docstrings* sont également supprimées)." + +#: library/functions.rst:318 +msgid "" +"This function raises :exc:`SyntaxError` if the compiled source is invalid, " +"and :exc:`ValueError` if the source contains null bytes." +msgstr "" +"Cette fonction lève une :exc:`SyntaxError` si la source n'est pas valide, " +"et :exc:`ValueError` si la source contient des octets *null*." + +#: library/functions.rst:321 +msgid "" +"If you want to parse Python code into its AST representation, see :func:`ast." +"parse`." +msgstr "" +"Si vous voulez transformer du code Python en sa représentation AST, voyez :" +"func:`ast.parse`." + +#: library/functions.rst:324 +#, fuzzy +msgid "" +"Raises an :ref:`auditing event ` ``compile`` with arguments " +"``source``, ``filename``." +msgstr "" +"Lève un :ref:`évènement d'audit ` ``compile`` avec les arguments " +"``source`` et ``filename``." + +#: library/functions.rst:326 +msgid "" +"Raises an :ref:`auditing event ` ``compile`` with arguments " +"``source`` and ``filename``. This event may also be raised by implicit " +"compilation." +msgstr "" +"Lève un :ref:`évènement d'audit ` ``compile`` avec les arguments " +"``source`` et ``filename``. Cet événement peut également être levé par une " +"compilation implicite." + +#: library/functions.rst:332 +msgid "" +"When compiling a string with multi-line code in ``'single'`` or ``'eval'`` " +"mode, input must be terminated by at least one newline character. This is " +"to facilitate detection of incomplete and complete statements in the :mod:" +"`code` module." +msgstr "" +"Lors de la compilation d'une chaîne de plusieurs lignes de code avec les " +"modes ``'single'`` ou ``'eval'``, celles-ci doivent être terminées par au " +"moins un retour à la ligne. Cela permet de faciliter la distinction entre " +"les instructions complètes et incomplètes dans le module :mod:`code`." + +#: library/functions.rst:339 +msgid "" +"It is possible to crash the Python interpreter with a sufficiently large/" +"complex string when compiling to an AST object due to stack depth " +"limitations in Python's AST compiler." +msgstr "" +"Il est possible de faire planter l'interpréteur Python avec des chaînes " +"suffisamment grandes ou complexes lors de la compilation d'un objet AST. " +"Ceci est dû à limitation de la profondeur de la pile d'appels." + +#: library/functions.rst:343 +#, fuzzy +msgid "" +"Allowed use of Windows and Mac newlines. Also, input in ``'exec'`` mode " +"does not have to end in a newline anymore. Added the *optimize* parameter." +msgstr "" +"autorise l'utilisation de retours à la ligne Mac et Windows. Par ailleurs, " +"la chaîne donnée à ``'exec'`` n'a plus besoin de terminer par un retour à la " +"ligne. Ajout du paramètre *optimize*." + +#: library/functions.rst:347 +msgid "" +"Previously, :exc:`TypeError` was raised when null bytes were encountered in " +"*source*." +msgstr "" +"précédemment, l'exception :exc:`TypeError` était levée quand un caractère " +"nul était rencontré dans *source*." + +#: library/functions.rst:351 +msgid "" +"``ast.PyCF_ALLOW_TOP_LEVEL_AWAIT`` can now be passed in flags to enable " +"support for top-level ``await``, ``async for``, and ``async with``." +msgstr "" +"``ast.PyCF_ALLOW_TOP_LEVEL_AWAIT`` peut maintenant être passée à *flags* " +"pour permettre une gestion de ``await``, ``async for``, et ``async with`` de " +"haut niveau." + +#: library/functions.rst:358 +msgid "" +"Return a complex number with the value *real* + *imag*\\*1j or convert a " +"string or number to a complex number. If the first parameter is a string, " +"it will be interpreted as a complex number and the function must be called " +"without a second parameter. The second parameter can never be a string. " +"Each argument may be any numeric type (including complex). If *imag* is " +"omitted, it defaults to zero and the constructor serves as a numeric " +"conversion like :class:`int` and :class:`float`. If both arguments are " +"omitted, returns ``0j``." +msgstr "" +"Renvoie un nombre complexe de valeur ``real + imag*1j``, ou convertit une " +"chaîne ou un nombre en nombre complexe. Si le premier paramètre est une " +"chaîne, il sera interprété comme un nombre complexe et la fonction doit être " +"appelée sans second paramètre. Le second paramètre ne peut jamais être une " +"chaîne. Chaque argument peut être de n'importe quel type numérique (même " +"complexe). Si *imag* est omis, sa valeur par défaut est zéro, le " +"constructeur effectue alors une simple conversion numérique comme le font :" +"class:`int` ou :class:`float`. Si aucun argument n'est fourni, renvoie " +"``0j``." + +#: library/functions.rst:367 +msgid "" +"For a general Python object ``x``, ``complex(x)`` delegates to ``x." +"__complex__()``. If ``__complex__()`` is not defined then it falls back to :" +"meth:`__float__`. If ``__float__()`` is not defined then it falls back to :" +"meth:`__index__`." +msgstr "" +"Pour un objet Python général ``x``, ``complex(x)`` délègue à ``x." +"__complex__()``. Si ``__complex__()`` n'est pas défini, alors il délègue à :" +"meth:`__float__`. Si ``__float__()`` n'est pas défini, alors il délègue à :" +"meth:`__index__`." + +#: library/functions.rst:374 +msgid "" +"When converting from a string, the string must not contain whitespace around " +"the central ``+`` or ``-`` operator. For example, ``complex('1+2j')`` is " +"fine, but ``complex('1 + 2j')`` raises :exc:`ValueError`." +msgstr "" +"Lors de la conversion depuis une chaîne, elle ne doit pas contenir d'espaces " +"autour des opérateurs binaires ``+`` ou ``-``. Par exemple " +"``complex('1+2j')`` est correct, mais ``complex('1 + 2j')`` lève une :exc:" +"`ValueError`." + +#: library/functions.rst:379 +msgid "The complex type is described in :ref:`typesnumeric`." +msgstr "Le type complexe est décrit dans :ref:`typesnumeric`." + +#: library/functions.rst:675 library/functions.rst:896 +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 " +"expressions littérales." + +#: library/functions.rst:384 +msgid "" +"Falls back to :meth:`__index__` if :meth:`__complex__` and :meth:`__float__` " +"are not defined." +msgstr "" +"revient à :meth:`__index__` si :meth:`__complex__` et :meth:`__float__` ne " +"sont pas définies." + +#: library/functions.rst:391 +msgid "" +"This is a relative of :func:`setattr`. The arguments are an object and a " +"string. The string must be the name of one of the object's attributes. The " +"function deletes the named attribute, provided the object allows it. For " +"example, ``delattr(x, 'foobar')`` is equivalent to ``del x.foobar``. *name* " +"need not be a Python identifier (see :func:`setattr`)." +msgstr "" +"C'est une cousine de :func:`setattr`. Les arguments sont un objet et une " +"chaîne. La chaîne doit être le nom de l'un des attributs de l'objet. La " +"fonction supprime l'attribut nommé, si l'objet l'y autorise. Par exemple " +"``delattr(x, 'foobar')`` est l'équivalent de ``del x.foobar``. *name* n'a " +"pas besoin d'être un identifiant Python (voir :func:`setattr`)." + +#: library/functions.rst:404 +msgid "" +"Create a new dictionary. The :class:`dict` object is the dictionary class. " +"See :class:`dict` and :ref:`typesmapping` for documentation about this class." +msgstr "" +"Créé un nouveau dictionnaire. L'objet :class:`dict` est la classe du " +"dictionnaire. Voir :class:`dict` et :ref:`typesmapping` pour vous documenter " +"sur cette classe." + +#: library/functions.rst:407 +msgid "" +"For other containers see the built-in :class:`list`, :class:`set`, and :" +"class:`tuple` classes, as well as the :mod:`collections` module." +msgstr "" +"Pour les autres conteneurs, voir les classes natives :class:`list`, :class:" +"`set`, et :class:`tuple`, ainsi que le module :mod:`collections`." + +#: library/functions.rst:413 +msgid "" +"Without arguments, return the list of names in the current local scope. " +"With an argument, attempt to return a list of valid attributes for that " +"object." +msgstr "" +"Sans argument, elle donne la liste des noms dans l'espace de nommage local. " +"Avec un argument, elle essaye de donner une liste d'attributs valides pour " +"cet objet." + +#: library/functions.rst:416 +msgid "" +"If the object has a method named :meth:`__dir__`, this method will be called " +"and must return the list of attributes. This allows objects that implement a " +"custom :func:`__getattr__` or :func:`__getattribute__` function to customize " +"the way :func:`dir` reports their attributes." +msgstr "" +"Si l'objet a une méthode :meth:`__dir__`, elle est appelée et doit donner " +"une liste d'attributs. Cela permet aux objets implémentant :func:" +"`__getattr__` ou :func:`__getattribute__` de personnaliser ce que donnera :" +"func:`dir`." + +#: library/functions.rst:421 +msgid "" +"If the object does not provide :meth:`__dir__`, the function tries its best " +"to gather information from the object's :attr:`~object.__dict__` attribute, " +"if defined, and from its type object. The resulting list is not necessarily " +"complete and may be inaccurate when the object has a custom :func:" +"`__getattr__`." +msgstr "" +"Si l'objet ne fournit pas de méthode :meth:`__dir__`, la fonction fait de " +"son mieux en rassemblant les informations de l'attribut :attr:`~object." +"__dict__` de l'objet, s'il est défini, et depuis son type. La liste " +"résultante n'est pas nécessairement complète, et peut être erronée quand " +"l'objet a une :func:`__getattr__` personnalisée." + +#: library/functions.rst:426 +msgid "" +"The default :func:`dir` mechanism behaves differently with different types " +"of objects, as it attempts to produce the most relevant, rather than " +"complete, information:" +msgstr "" +"Le mécanisme par défaut de :func:`dir` se comporte différemment avec " +"différents types d'objets, car elle préfère donner une information " +"pertinente plutôt qu'exhaustive :" + +#: library/functions.rst:430 +msgid "" +"If the object is a module object, the list contains the names of the " +"module's attributes." +msgstr "" +"si l'objet est un module, la liste contiendra les noms des attributs du " +"module ;" + +#: library/functions.rst:433 +msgid "" +"If the object is a type or class object, the list contains the names of its " +"attributes, and recursively of the attributes of its bases." +msgstr "" +"si l'objet est un type ou une classe, la liste contiendra les noms de ses " +"attributs et, récursivement, des attributs de ses parents ;" + +#: library/functions.rst:436 +msgid "" +"Otherwise, the list contains the object's attributes' names, the names of " +"its class's attributes, and recursively of the attributes of its class's " +"base classes." +msgstr "" +"autrement, la liste contient les noms des attributs de l'objet, le nom des " +"attributs de la classe, et récursivement des attributs des parents de la " +"classe." + +#: library/functions.rst:440 +msgid "The resulting list is sorted alphabetically. For example:" +msgstr "La liste donnée est triée par ordre alphabétique, par exemple :" + +#: library/functions.rst:459 +msgid "" +"Because :func:`dir` is supplied primarily as a convenience for use at an " +"interactive prompt, it tries to supply an interesting set of names more than " +"it tries to supply a rigorously or consistently defined set of names, and " +"its detailed behavior may change across releases. For example, metaclass " +"attributes are not in the result list when the argument is a class." +msgstr "" +"Étant donné que :func:`dir` est d'abord fournie pour son côté pratique en " +"mode interactif, elle a tendance à fournir un ensemble de noms pertinents " +"plutôt qu'un ensemble exhaustif et rigoureusement défini, son comportement " +"peut aussi changer d'une version à l'autre. Par exemple, les attributs de " +"méta-classes ne sont pas donnés lorsque l'argument est une classe." + +#: library/functions.rst:469 +msgid "" +"Take two (non-complex) numbers as arguments and return a pair of numbers " +"consisting of their quotient and remainder when using integer division. " +"With mixed operand types, the rules for binary arithmetic operators apply. " +"For integers, the result is the same as ``(a // b, a % b)``. For floating " +"point numbers the result is ``(q, a % b)``, where *q* is usually ``math." +"floor(a / b)`` but may be 1 less than that. In any case ``q * b + a % b`` " +"is very close to *a*, if ``a % b`` is non-zero it has the same sign as *b*, " +"and ``0 <= abs(a % b) < abs(b)``." +msgstr "" +"Prend deux nombres (qui ne sont pas des nombres complexes) et renvoie leur " +"quotient et reste de leur division entière sous forme d'une paire de " +"nombres. Avec des opérandes de types différents, les règles des opérateurs " +"binaires s'appliquent. Pour deux entiers le résultat est le même que ``(a // " +"b, a % b)``. Pour des nombres à virgule flottante le résultat est ``(q, a % " +"b)``, où *q* est généralement ``math.floor(a / b)`` mais peut valoir 1 de " +"moins. Dans tous les cas ``q * b + a % b`` est très proche de *a*. Si ``a % " +"b`` est différent de zéro, il a le même signe que *b* et ``0 <= abs(a % b) < " +"abs(b)``." + +#: library/functions.rst:481 +msgid "" +"Return an enumerate object. *iterable* must be a sequence, an :term:" +"`iterator`, or some other object which supports iteration. The :meth:" +"`~iterator.__next__` method of the iterator returned by :func:`enumerate` " +"returns a tuple containing a count (from *start* which defaults to 0) and " +"the values obtained from iterating over *iterable*." +msgstr "" +"Renvoie un objet énumérant. *iterable* doit être une séquence, un :term:" +"`itérateur `, ou tout autre objet prenant en charge l'itération. " +"La méthode :meth:`~iterator.__next__` de l'itérateur donné par :func:" +"`enumerate` renvoie un *n*-uplet contenant un compte (démarrant à *start*, 0 " +"par défaut) et les valeurs obtenues de l'itération sur *iterable*." + +#: library/functions.rst:493 +msgid "Equivalent to::" +msgstr "Équivalent à ::" + +#: library/functions.rst:504 +msgid "" +"The arguments are a string and optional globals and locals. If provided, " +"*globals* must be a dictionary. If provided, *locals* can be any mapping " +"object." +msgstr "" +"Les arguments sont : une chaîne, et optionnellement des locales et des " +"globales. S'il est fourni, *globals* doit être un dictionnaire. S'il est " +"fourni, *locals* peut être n'importe quel objet *mapping*." + +#: library/functions.rst:508 +msgid "" +"The *expression* argument is parsed and evaluated as a Python expression " +"(technically speaking, a condition list) using the *globals* and *locals* " +"dictionaries as global and local namespace. If the *globals* dictionary is " +"present and does not contain a value for the key ``__builtins__``, a " +"reference to the dictionary of the built-in module :mod:`builtins` is " +"inserted under that key before *expression* is parsed. That way you can " +"control what builtins are available to the executed code by inserting your " +"own ``__builtins__`` dictionary into *globals* before passing it to :func:" +"`eval`. If the *locals* dictionary is omitted it defaults to the *globals* " +"dictionary. If both dictionaries are omitted, the expression is executed " +"with the *globals* and *locals* in the environment where :func:`eval` is " +"called. Note, *eval()* does not have access to the :term:`nested scopes " +"` (non-locals) in the enclosing environment." +msgstr "" +"L'argument *expression* est analysé et évalué comme une expression Python " +"(techniquement, une *condition list*) en utilisant les dictionnaires " +"*globals* et *locals* comme espaces de nommage global et local. Si le " +"dictionnaire *globals* est présent mais ne contient pas de valeur pour la " +"clé ``__builtins__``, une référence au dictionnaire du module :mod:" +"`builtins` y est insérée avant qu'*expression* ne soit évaluée. Ainsi, vous " +"pouvez contrôler quels objets natifs sont disponibles pour le code à " +"exécuter en insérant votre propre dictionnaire ``__builtins__`` dans " +"*globals* avant de le passer à :func:`eval`. Si le dictionnaire *locals* est " +"omis, sa valeur par défaut est le dictionnaire *globals*. Si les deux " +"dictionnaires sont omis, l'expression est exécutée avec les dictionnaires " +"*globals* et *locals* dans l'environnement où :func:`eval` est appelée. " +"Notez que *eval()* n'a pas accès aux :term:`portées imbriquées ` (non locales) dans l'environnement englobant." + +#: library/functions.rst:523 +msgid "" +"The return value is the result of the evaluated expression. Syntax errors " +"are reported as exceptions. Example:" +msgstr "" +"La valeur de retour est le résultat de l'expression évaluée. Les erreurs de " +"syntaxe sont signalées comme des exceptions. Exemple :" + +#: library/functions.rst:530 +msgid "" +"This function can also be used to execute arbitrary code objects (such as " +"those created by :func:`compile`). In this case, pass a code object instead " +"of a string. If the code object has been compiled with ``'exec'`` as the " +"*mode* argument, :func:`eval`\\'s return value will be ``None``." +msgstr "" +"Cette fonction peut aussi être utilisée pour exécuter n'importe quel objet " +"code (tels que ceux créés par :func:`compile`). Dans ce cas, donnez un objet " +"code plutôt qu'une chaîne. Si l'objet code a été compilé avec l'argument " +"*mode* à ``'exec'``, :func:`eval` renvoie ``None``." + +#: library/functions.rst:535 +#, fuzzy +msgid "" +"Hints: dynamic execution of statements is supported by the :func:`exec` " +"function. The :func:`globals` and :func:`locals` functions return the " +"current global and local dictionary, respectively, which may be useful to " +"pass around for use by :func:`eval` or :func:`exec`." +msgstr "" +"Conseils : l'exécution dynamique d'instructions est gérée par la fonction :" +"func:`exec`. Les fonctions :func:`globals` et :func:`locals` renvoient " +"respectivement les dictionnaires globaux et locaux, qui peuvent être utiles " +"lors de l'usage de :func:`eval` et :func:`exec`." + +#: library/functions.rst:540 +msgid "" +"If the given source is a string, then leading and trailing spaces and tabs " +"are stripped." +msgstr "" +"Si la source donnée est une chaîne, les espaces de début et de fin et les " +"tabulations sont supprimées." + +#: library/functions.rst:543 +msgid "" +"See :func:`ast.literal_eval` for a function that can safely evaluate strings " +"with expressions containing only literals." +msgstr "" +"Utilisez :func:`ast.literal_eval` si vous avez besoin d'une fonction qui " +"peut évaluer en toute sécurité des chaînes avec des expressions ne contenant " +"que des valeurs littérales." + +#: library/functions.rst:582 +#, fuzzy +msgid "" +"Raises an :ref:`auditing event ` ``exec`` with argument " +"``code_object``." +msgstr "" +"Lève un :ref:`évènement d'audit ` ``exec`` avec l'argument " +"``code_object``." + +#: library/functions.rst:584 +msgid "" +"Raises an :ref:`auditing event ` ``exec`` with the code object as " +"the argument. Code compilation events may also be raised." +msgstr "" +"Lève un :ref:`évènement d'audit ` ``exec`` avec l'objet de code " +"comme argument. Les événements de compilation de code peuvent également être " +"levés." + +#: library/functions.rst:555 +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 :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``." +msgstr "" +"Cette fonction permet l'exécution dynamique de code Python. *object* doit " +"être soit une chaîne soit un objet code. Si c'est une chaîne, elle est " +"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 :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:566 +msgid "" +"In all cases, if the optional parts are omitted, the code is executed in the " +"current scope. If only *globals* is provided, it must be a dictionary (and " +"not a subclass of dictionary), which will be used for both the global and " +"the local variables. If *globals* and *locals* are given, they are used for " +"the global and local variables, respectively. If provided, *locals* can be " +"any mapping object. Remember that at the module level, globals and locals " +"are the same dictionary. If exec gets two separate objects as *globals* and " +"*locals*, the code will be executed as if it were embedded in a class " +"definition." +msgstr "" +"Dans tous les cas, si les arguments optionnels sont omis, le code est " +"exécuté dans le contexte actuel. Si seul *globals* est fourni, il doit être " +"un dictionnaire (et pas une sous-classe de dictionnaire) utilisé pour les " +"variables globales et locales. Si les deux sont fournis, ils sont utilisés " +"respectivement pour les variables globales et locales. *locales* peut être " +"n'importe quel objet de correspondance. Souvenez-vous qu'au niveau d'un " +"module, les dictionnaires des locales et des globales ne sont qu'un. Si " +"``exec`` reçoit deux objets distincts dans *globals* et *locals*, le code " +"est exécuté comme s'il était inclus dans une définition de classe." + +#: library/functions.rst:576 +msgid "" +"If the *globals* dictionary does not contain a value for the key " +"``__builtins__``, a reference to the dictionary of the built-in module :mod:" +"`builtins` is inserted under that key. That way you can control what " +"builtins are available to the executed code by inserting your own " +"``__builtins__`` dictionary into *globals* before passing it to :func:`exec`." +msgstr "" +"Si le dictionnaire *globals* ne contient pas de valeur pour la clé " +"``__builtins__``, une référence au dictionnaire du module :mod:`builtins` y " +"est inséré. Cela vous permet de contrôler quelles fonctions natives sont " +"exposées au code exécuté en insérant votre propre dictionnaire " +"``__builtins__`` dans *globals* avant de le donner à :func:`exec`." + +#: library/functions.rst:589 +msgid "" +"The built-in functions :func:`globals` and :func:`locals` return the current " +"global and local dictionary, respectively, which may be useful to pass " +"around for use as the second and third argument to :func:`exec`." +msgstr "" +"Les fonctions natives :func:`globals` et :func:`locals` renvoient " +"respectivement les dictionnaires globaux et locaux, qui peuvent être utiles " +"en deuxième et troisième argument de :func:`exec`." + +#: library/functions.rst:595 +msgid "" +"The default *locals* act as described for function :func:`locals` below: " +"modifications to the default *locals* dictionary should not be attempted. " +"Pass an explicit *locals* dictionary if you need to see effects of the code " +"on *locals* after function :func:`exec` returns." +msgstr "" +"La valeur par défaut pour *locals* se comporte comme la fonction :func:" +"`locals` : il est déconseillé de modifier le dictionnaire *locals* par " +"défaut. Donnez un dictionnaire explicitement à *locals* si vous désirez " +"observer l'effet du code sur les variables locales, après que :func:`exec` " +"soit terminée." + +#: library/functions.rst:603 +msgid "" +"Construct an iterator from those elements of *iterable* for which *function* " +"returns true. *iterable* may be either a sequence, a container which " +"supports iteration, or an iterator. If *function* is ``None``, the identity " +"function is assumed, that is, all elements of *iterable* that are false are " +"removed." +msgstr "" +"Construit un itérateur depuis les éléments d'*iterable* pour lesquels " +"*function* renvoie ``True``. *iterable* peut aussi bien être une séquence, " +"un conteneur qui prend en charge l'itération, ou un itérateur. Si *function* " +"est ``None``, la fonction identité est prise, c'est-à-dire que tous les " +"éléments faux d'*iterable* sont supprimés." + +#: library/functions.rst:609 +msgid "" +"Note that ``filter(function, iterable)`` is equivalent to the generator " +"expression ``(item for item in iterable if function(item))`` if function is " +"not ``None`` and ``(item for item in iterable if item)`` if function is " +"``None``." +msgstr "" +"Notez que ``filter(function, iterable)`` est l'équivalent du générateur " +"``(item for item in iterable if function(item))`` si *function* n'est pas " +"``None``, et de ``(item for item in iterable if item)`` si *function* est " +"``None``." + +#: library/functions.rst:614 +msgid "" +"See :func:`itertools.filterfalse` for the complementary function that " +"returns elements of *iterable* for which *function* returns false." +msgstr "" +"Voir :func:`itertools.filterfalse` pour la fonction complémentaire qui donne " +"les éléments d'*iterable* pour lesquels *function* renvoie ``False``." + +#: library/functions.rst:624 +msgid "Return a floating point number constructed from a number or string *x*." +msgstr "" +"Renvoie un nombre a virgule flottante depuis un nombre ou une chaîne *x*." + +#: library/functions.rst:626 +msgid "" +"If the argument is a string, it should contain a decimal number, optionally " +"preceded by a sign, and optionally embedded in whitespace. The optional " +"sign may be ``'+'`` or ``'-'``; a ``'+'`` sign has no effect on the value " +"produced. The argument may also be a string representing a NaN (not-a-" +"number), or positive or negative infinity. More precisely, the input must " +"conform to the ``floatvalue`` production rule in the following grammar, " +"after leading and trailing whitespace characters are removed:" +msgstr "" +"Si l'argument est une chaîne, elle doit contenir un nombre décimal, " +"éventuellement précédé d'un signe, et pouvant être entouré d'espaces. Le " +"signe optionnel peut être ``'+'`` ou ``'-'``. Un signe ``'+'`` n'a pas " +"d'effet sur la valeur produite. L'argument peut aussi être une chaîne " +"représentant un *NaN* (*Not-a-Number* ou *pas un nombre* en français), " +"l'infini positif, ou l'infini négatif. Plus précisément, l'argument doit se " +"conformer à ``floatvalue`` tel que défini la grammaire suivante, après que " +"les espaces en début et fin de chaîne aient été retirées :" + +#: library/functions.rst:644 +msgid "" +"Here ``digit`` is a Unicode decimal digit (character in the Unicode general " +"category ``Nd``). Case is not significant, so, for example, \"inf\", " +"\"Inf\", \"INFINITY\", and \"iNfINity\" are all acceptable spellings for " +"positive infinity." +msgstr "" +"Ici ``digit`` est un chiffre décimal Unicode (caractère de la catégorie " +"générale Unicode ``Nd``). La casse n'y est pas significative, donc, par " +"exemple, ``\"inf\"``, ``\" Inf\"``, ``\"INFINITY\"`` et ``\" iNfiNity\"`` " +"sont tous des orthographes valides pour un infini positif." + +#: library/functions.rst:649 +msgid "" +"Otherwise, if the argument is an integer or a floating point number, a " +"floating point number with the same value (within Python's floating point " +"precision) is returned. If the argument is outside the range of a Python " +"float, an :exc:`OverflowError` will be raised." +msgstr "" +"Autrement, si l'argument est un entier ou un nombre à virgule flottante, un " +"nombre à virgule flottante de même valeur (en accord avec la précision des " +"nombres à virgule flottante de Python) est donné. Si l'argument est en " +"dehors de l'intervalle d'un nombre a virgule flottante pour Python, :exc:" +"`OverflowError` est levée." + +#: library/functions.rst:654 +msgid "" +"For a general Python object ``x``, ``float(x)`` delegates to ``x." +"__float__()``. If ``__float__()`` is not defined then it falls back to :" +"meth:`__index__`." +msgstr "" +"Pour un objet Python général ``x``, ``float(x)`` est délégué à ``x." +"__float__()``. Si ``__float__()`` n'est pas défini alors il est délégué à :" +"meth:`__index__`." + +#: library/functions.rst:658 +msgid "If no argument is given, ``0.0`` is returned." +msgstr "Sans argument, ``0.0`` est renvoyé." + +#: library/functions.rst:660 +msgid "Examples::" +msgstr "Exemples ::" + +#: library/functions.rst:673 +msgid "The float type is described in :ref:`typesnumeric`." +msgstr "Le type *float* est décrit dans :ref:`typesnumeric`." + +#: library/functions.rst:681 +msgid "Falls back to :meth:`__index__` if :meth:`__float__` is not defined." +msgstr "revient à :meth:`__index__` si :meth:`__float__` n'est pas définie." + +#: library/functions.rst:691 +msgid "" +"Convert a *value* to a \"formatted\" representation, as controlled by " +"*format_spec*. The interpretation of *format_spec* will depend on the type " +"of the *value* argument; however, there is a standard formatting syntax that " +"is used by most built-in types: :ref:`formatspec`." +msgstr "" +"Convertit une valeur en sa représentation « formatée », contrôlée par " +"*format_spec*. L'interprétation de *format_spec* dépend du type de la " +"valeur. Cependant, il existe une syntaxe standard utilisée par la plupart " +"des types natifs : :ref:`formatspec`." + +#: library/functions.rst:696 +msgid "" +"The default *format_spec* is an empty string which usually gives the same " +"effect as calling :func:`str(value) `." +msgstr "" +"Par défaut, *format_spec* est une chaîne vide. Dans ce cas, appeler cette " +"fonction a généralement le même effet qu'appeler :func:`str(value) `." + +#: library/functions.rst:699 +msgid "" +"A call to ``format(value, format_spec)`` is translated to ``type(value)." +"__format__(value, format_spec)`` which bypasses the instance dictionary when " +"searching for the value's :meth:`__format__` method. A :exc:`TypeError` " +"exception is raised if the method search reaches :mod:`object` and the " +"*format_spec* is non-empty, or if either the *format_spec* or the return " +"value are not strings." +msgstr "" +"Un appel à ``format(value, format_spec)`` est transformé en ``type(value)." +"__format__(value, format_spec)``, qui contourne le dictionnaire de " +"l'instance lors de la recherche de la méthode :meth:`__fornat__`. Une " +"exception :exc:`TypeError` est levée si la recherche de la méthode atteint :" +"mod:`object` et que *format_spec* n'est pas vide, ou si *format_spec* ou le " +"résultat ne sont pas des chaînes de caractères." + +#: library/functions.rst:706 +msgid "" +"``object().__format__(format_spec)`` raises :exc:`TypeError` if " +"*format_spec* is not an empty string." +msgstr "" +"``object().__format__(format_spec)`` lève :exc:`TypeError` si *format_spec* " +"n'est pas une chaîne vide." + +#: library/functions.rst:715 +msgid "" +"Return a new :class:`frozenset` object, optionally with elements taken from " +"*iterable*. ``frozenset`` is a built-in class. See :class:`frozenset` and :" +"ref:`types-set` for documentation about this class." +msgstr "" +"Renvoie un nouveau :class:`frozenset`, dont les objets sont éventuellement " +"tirés d'*iterable*. ``frozenset`` est une classe native. Voir :class:" +"`frozenset` et :ref:`types-set` pour la documentation sur cette classe." + +#: library/functions.rst:719 +msgid "" +"For other containers see the built-in :class:`set`, :class:`list`, :class:" +"`tuple`, and :class:`dict` classes, as well as the :mod:`collections` module." +msgstr "" +"Pour d'autres conteneurs, voyez les classes natives :class:`set`, :class:" +"`list`, :class:`tuple`, et :class:`dict`, ainsi que le module :mod:" +"`collections`." + +#: library/functions.rst:726 +msgid "" +"Return the value of the named attribute of *object*. *name* must be a " +"string. If the string is the name of one of the object's attributes, the " +"result is the value of that attribute. For example, ``getattr(x, " +"'foobar')`` is equivalent to ``x.foobar``. If the named attribute does not " +"exist, *default* is returned if provided, otherwise :exc:`AttributeError` is " +"raised. *name* need not be a Python identifier (see :func:`setattr`)." +msgstr "" +"Renvoie la valeur de l'attribut nommé *name* de l'objet *object*. *name* " +"doit être une chaîne. Si la chaîne est le nom d'un des attributs de l'objet, " +"le résultat est la valeur de cet attribut. Par exemple, ``getattr(x, " +"'foobar')`` est équivalent à ``x.foobar``. Si l'attribut n'existe pas, mais " +"que *default* est fourni, celui-ci est renvoyé. Sinon l'exception :exc:" +"`AttributeError` est levée. *name* n'a pas besoin d'être un identifiant " +"Python (voir :func:`setattr`)." + +#: library/functions.rst:735 +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 retrieve it with :func:" +"`getattr`." +msgstr "" +"é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:743 +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:750 +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 " +"it raises an :exc:`AttributeError` or not.)" +msgstr "" +"Les arguments sont : un objet et une chaîne de caractères. Le résultat est " +"``True`` si la chaîne est le nom d'un des attributs de l'objet, sinon " +"``False`` (l'implémentation appelle ``getattr(object, name)`` et regarde si " +"une exception :exc:`AttributeError` a été levée)." + +#: library/functions.rst:758 +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 " +"dictionary lookup. Numeric values that compare equal have the same hash " +"value (even if they are of different types, as is the case for 1 and 1.0)." +msgstr "" +"Renvoie la valeur de hachage d'un objet (s'il en a une). Les valeurs de " +"hachage sont des entiers. Elles sont utilisées pour comparer rapidement des " +"clés de dictionnaire lors de leur recherche. Les valeurs numériques égales " +"ont la même valeur de hachage (même si leurs types sont différents, comme " +"pour ``1`` et ``1.0``)." + +#: library/functions.rst:765 +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 :" +"meth:`__hash__` for details." +msgstr "" +"Pour les objets dont la méthode :meth:`__hash__` est implémentée, notez que :" +"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:771 +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 " +"interpreter console. If the argument is a string, then the string is looked " +"up as the name of a module, function, class, method, keyword, or " +"documentation topic, and a help page is printed on the console. If the " +"argument is any other kind of object, a help page on the object is generated." +msgstr "" +"Invoque le système d'aide natif (cette fonction est destinée à l'usage en " +"mode interactif). Si aucun argument n'est fourni, le système d'aide démarre " +"dans l'interpréteur. Si l'argument est une chaîne, celle-ci est recherchée " +"comme le nom d'un module, d'une fonction, d'une classe, d'une méthode, d'un " +"mot clé, ou d'un sujet de documentation, et une page d'aide est affichée sur " +"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:778 +#, fuzzy +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 " +"positional-only. For more info, see :ref:`the FAQ entry on positional-only " +"parameters `." +msgstr "" +"Notez que si une barre oblique (/) apparaît dans la liste des paramètres " +"d'une fonction lorsque vous appelez :func:`help`, cela signifie que les " +"paramètres placés avant la barre oblique sont strictement positionnels. Pour " +"plus d'informations, voir :ref:`La FAQ sur les arguments positionnels `." + +#: library/functions.rst:783 +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:785 +msgid "" +"Changes to :mod:`pydoc` and :mod:`inspect` mean that the reported signatures " +"for callables are now more comprehensive and consistent." +msgstr "" +"les changements aux modules :mod:`pydoc` et :mod:`inspect` rendent les " +"signatures des appelables plus compréhensibles et cohérentes." + +#: library/functions.rst:792 +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 :" +"meth:`__index__` method that returns an integer. Some examples:" +msgstr "" +"Convertit un entier en chaîne hexadécimale préfixée de ``0x``. Si *x* n'est " +"pas un :class:`int`, il doit définir une méthode :meth:`__index__` qui " +"renvoie un entier. Quelques exemples :" + +#: library/functions.rst:801 +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 " +"ways:" +msgstr "" +"Si vous voulez convertir un nombre entier en chaîne hexadécimale, en " +"majuscule ou non, préfixée ou non, vous pouvez utiliser l'une des méthodes " +"suivantes :" + +#: library/functions.rst:813 +msgid "" +"See also :func:`int` for converting a hexadecimal string to an integer using " +"a base of 16." +msgstr "" +"Voir aussi :func:`int` pour convertir une chaîne hexadécimale en un entier " +"(en affectant 16 à l'argument *base*)." + +#: library/functions.rst:818 +msgid "" +"To obtain a hexadecimal string representation for a float, use the :meth:" +"`float.hex` method." +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:824 +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. " +"Two objects with non-overlapping lifetimes may have the same :func:`id` " +"value." +msgstr "" +"Renvoie l'« identité » d'un objet. C'est un nombre entier garanti unique et " +"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:829 +msgid "This is the address of the object in memory." +msgstr "c'est l'adresse de l'objet en mémoire." + +#: library/functions.rst:831 +#, fuzzy +msgid "" +"Raises an :ref:`auditing event ` ``builtins.id`` with argument " +"``id``." +msgstr "" +"Lève un :ref:`évènement d'audit ` ``builtins.id`` avec l'argument " +"``id``." + +#: library/functions.rst:836 +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, " +"converts it to a string (stripping a trailing newline), and returns that. " +"When EOF is read, :exc:`EOFError` is raised. Example::" +msgstr "" +"Si l'argument *prompt* est donné, il est écrit sur la sortie standard sans " +"le retour à la ligne final. La fonction lit ensuite une ligne sur l'entrée " +"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:846 +msgid "" +"If the :mod:`readline` module was loaded, then :func:`input` will use it to " +"provide elaborate line editing and history features." +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:849 +msgid "" +"Raises an :ref:`auditing event ` ``builtins.input`` with argument " +"``prompt``." +msgstr "" +"Lève un :ref:`évènement d'audit ` ``builtins.input`` avec " +"l'argument ``prompt``." + +#: library/functions.rst:851 +msgid "" +"Raises an :ref:`auditing event ` ``builtins.input`` with argument " +"``prompt`` before reading input" +msgstr "" +"Lève un :ref:`auditing event ` ``builtins.input`` avec l'argument " +"``prompt`` avant de lire l'entrée." + +#: library/functions.rst:854 +msgid "" +"Raises an :ref:`auditing event ` ``builtins.input/result`` with " +"argument ``result``." +msgstr "" +"Lève un :ref:`évènement d'audit ` ``builtins.input/result`` avec " +"l'argument ``result``." + +#: library/functions.rst:856 +msgid "" +"Raises an :ref:`auditing event ` ``builtins.input/result`` with " +"the result after successfully reading input." +msgstr "" +"Lève un :ref:`événement d'audit ` ``builtins.input/result`` avec " +"le résultat après avoir lu avec succès l'entrée." + +#: library/functions.rst:863 +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)`` " +"returns ``x.__int__()``. If *x* defines :meth:`__index__`, it returns ``x." +"__index__()``. If *x* defines :meth:`__trunc__`, it returns ``x." +"__trunc__()``. For floating point numbers, this truncates towards zero." +msgstr "" +"Renvoie un entier construit depuis un nombre ou une chaîne *x*, ou ``0`` si " +"aucun argument n'est fourni. Si *x* définit une méthode :meth:`__int__`, " +"``int(x)`` renvoie ``x.__int__()``. Si *x* définit :meth:`__index__`, " +"``int(x)`` renvoie ``x.__index__()`` Si *x* définit :meth:`__trunc__`, " +"``int(x)`` renvoie ``x.__trunc__()``. Les nombres à virgule flottante sont " +"tronqués vers zéro." + +#: library/functions.rst:870 +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 integer in " +"radix *base*. Optionally, the string can be preceded by ``+`` or ``-`` " +"(with no space in between), have leading zeros, be surrounded by whitespace, " +"and have single underscores interspersed between digits." +msgstr "" + +#: library/functions.rst:876 +msgid "" +"A base-n integer string contains digits, each representing a value from 0 to " +"n-1. The values 0--9 can be represented by any Unicode decimal digit. The " +"values 10--35 can be represented by ``a`` to ``z`` (or ``A`` to ``Z``). The " +"default *base* is 10. The allowed bases are 0 and 2--36. Base-2, -8, and -16 " +"strings can be optionally prefixed with ``0b``/``0B``, ``0o``/``0O``, or " +"``0x``/``0X``, as with integer literals in code. For base 0, the string is " +"interpreted in a similar way to an :ref:`integer literal in code " +"`, in that the actual base is 2, 8, 10, or 16 as determined by the " +"prefix. Base 0 also disallows leading zeros: ``int('010', 0)`` is not legal, " +"while ``int('010')`` and ``int('010', 8)`` are." +msgstr "" +"Une chaine représentant un entier en base *n* contient des chiffres, chacun " +"représentant une valeur de 0 à n-1. Les valeurs 0 à 9 peuvent être " +"représentées par n'importe lequel des chiffres décimaux Unicode. Les valeurs " +"de 10 à 35 peuvent être représentées par ``a`` jusqu'à ``z`` (ou ``A`` à " +"``Z``). La *base* par défaut est 10. Les valeurs autorisées pour *base* sont " +"0 et 2 à 36. Les littéraux en base 2, 8, et 16 peuvent être préfixés avec " +"``0b``/``0B``, ``0o``/``0O``, ou ``0x``/``0X`` tout comme les littéraux dans " +"le code. Fournir 0 comme *base* demande d'interpréter exactement comme un :" +"ref:`entier littéral dans du code ` Python, donc la base sera 2, " +"8, 10, ou 16 en fonction du préfixe. Indiquer 0 comme base interdit les " +"zéros en tête, ainsi ``int('010', 0)`` n'est pas légal, alors que " +"``int('010')`` l'est tout comme ``int('010', 8)``." + +#: library/functions.rst:887 +msgid "The integer type is described in :ref:`typesnumeric`." +msgstr "Le type des entiers est décrit dans :ref:`typesnumeric`." + +#: library/functions.rst:889 +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 " +"obtain an integer for the base. Previous versions used :meth:`base.__int__ " +"` instead of :meth:`base.__index__ `." +msgstr "" +"si *base* n'est pas une instance d':class:`int` et que *base* a une méthode :" +"meth:`base.__index__ `, cette méthode est appelée pour " +"obtenir un entier pour cette base. Les versions précédentes utilisaient :" +"meth:`base.__int__ ` au lieu de :meth:`base.__index__ " +"`." + +#: library/functions.rst:902 +msgid "Falls back to :meth:`__index__` if :meth:`__int__` is not defined." +msgstr "Revient à :meth:`__index__` si :meth:`__int__` n'est pas définie." + +#: library/functions.rst:905 +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:916 +#, fuzzy +msgid "" +"Return ``True`` if the *object* argument is an instance of the *classinfo* " +"argument, or of a (direct, indirect, or :term:`virtual `) subclass thereof. If *object* is not an object of the given type, " +"the function always returns ``False``. If *classinfo* is a tuple of type " +"objects (or recursively, other such tuples) or a :ref:`types-union` of " +"multiple types, return ``True`` if *object* is an instance of any of the " +"types. If *classinfo* is not a type or tuple of types and such tuples, a :" +"exc:`TypeError` exception is raised." +msgstr "" +"Renvoie ``True`` si *object* est une instance de *classinfo*, ou d'une de " +"ses classes filles, directe, indirecte, ou :term:`abstraite `. Si *object* n'est pas un objet du type donné, la fonction renvoie " +"toujours ``False``. Si *classinfo* est un *n*-uplet de types (ou " +"récursivement, d'autres *n*-uplets), renvoie ``True`` si *object* est une " +"instance de n'importe quel de ces types. Si *classinfo* n'est ni un type ni " +"un *n*-uplet de types (et récursivement), une exception :exc:`TypeError` est " +"levée." + +#: library/functions.rst:940 +msgid "*classinfo* can be a :ref:`types-union`." +msgstr "" + +#: library/functions.rst:932 +#, fuzzy +msgid "" +"Return ``True`` if *class* is a subclass (direct, indirect, or :term:" +"`virtual `) of *classinfo*. A class is considered a " +"subclass of itself. *classinfo* may be a tuple of class objects (or " +"recursively, other such tuples) or a :ref:`types-union`, 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 " +"considérée sous-classe d'elle-même. *classinfo* peut être un *n*-uplet de " +"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:946 +#, fuzzy +msgid "" +"Return an :term:`iterator` object. The first argument is interpreted very " +"differently depending on the presence of the second argument. Without a " +"second argument, *object* must be a collection object which supports the :" +"term:`iterable` protocol (the :meth:`__iter__` method), or it must support " +"the sequence protocol (the :meth:`__getitem__` method with integer arguments " +"starting at ``0``). If it does not support either of those protocols, :exc:" +"`TypeError` is raised. If the second argument, *sentinel*, is given, then " +"*object* must be a callable object. The iterator created in this case will " +"call *object* with no arguments for each call to its :meth:`~iterator." +"__next__` method; if the value returned is equal to *sentinel*, :exc:" +"`StopIteration` will be raised, otherwise the value will be returned." +msgstr "" +"Renvoie un objet :term:`itérateur `. La signification du premier " +"argument dépend grandement de la présence du second. Sans cet argument, " +"*object* doit être une collection d'objets prenant en charge le protocole " +"d'itération (la méthode :meth:`__iter__`) ou le protocole des séquences (la " +"méthode :meth:`getitem`, avec des nombres entiers commençant par ``0`` comme " +"argument). S'il ne gère aucun de ces protocoles, :exc:`TypeError` est levée. " +"Si le second argument *sentinel* est fourni, *object* doit être appelable. " +"L'itérateur créé dans ce cas appelle *object* sans argument à chaque appel " +"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:959 +msgid "See also :ref:`typeiter`." +msgstr "Voir aussi :ref:`typeiter`." + +#: library/functions.rst:961 +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 " +"file until the end of file is reached::" +msgstr "" +"Une autre application utile de la deuxième forme de :func:`iter` est de " +"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:973 +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 " +"(such as a dictionary, set, or frozen set)." +msgstr "" +"Renvoie la longueur (nombre d'éléments) d'un objet. L'argument peut être une " +"séquence (telle qu'une chaîne de caractères ou d'octets, un *n*-uplet, une " +"liste ou un intervalle) ou une collection (telle qu'un dictionnaire, un " +"ensemble ou un ensemble figé)." + +#: library/functions.rst:979 +msgid "" +"``len`` raises :exc:`OverflowError` on lengths larger than :data:`sys." +"maxsize`, such as :class:`range(2 ** 100) `." +msgstr "" + +#: library/functions.rst:987 +msgid "" +"Rather than being a function, :class:`list` is actually a mutable sequence " +"type, as documented in :ref:`typesseq-list` and :ref:`typesseq`." +msgstr "" +"Contrairement aux apparences, :class:`list` n'est pas une fonction mais un " +"type séquentiel muable, comme décrit dans :ref:`typesseq-list` et :ref:" +"`typesseq`." + +#: library/functions.rst:993 +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 " +"blocks, but not in class blocks. Note that at the module level, :func:" +"`locals` and :func:`globals` are the same dictionary." +msgstr "" +"Met à jour et renvoie un dictionnaire représentant la table des symboles " +"locaux. Les variables libres sont renvoyées par la fonction :func:`locals` " +"lorsque celle-ci est appelée dans le corps d'une fonction, mais pas dans le " +"corps d'une classe. Notez qu’au niveau d’un module, :func:`locals` et :func:" +"`globals` sont le même dictionnaire." + +#: library/functions.rst:999 +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." +msgstr "" +"Le contenu de ce dictionnaire ne doit pas être modifié ; les changements " +"n'affectent pas les valeurs des variables locales ou libres utilisées par " +"l'interpréteur." + +#: library/functions.rst:1004 +msgid "" +"Return an iterator that applies *function* to every item of *iterable*, " +"yielding the results. If additional *iterable* arguments are passed, " +"*function* must take that many arguments and is applied to the items from " +"all iterables in parallel. With multiple iterables, the iterator stops when " +"the shortest iterable is exhausted. For cases where the function inputs are " +"already arranged into argument tuples, see :func:`itertools.starmap`\\." +msgstr "" +"Renvoie un itérateur appliquant *function* à chaque élément de *iterable*, " +"et donnant ses résultats au fur et à mesure avec ``yield``. Si d'autres " +"*iterable* sont fournis, *function* doit prendre autant d'arguments, et sera " +"appelée avec les éléments de tous les itérables en parallèle. Avec plusieurs " +"itérables, l'itération s'arrête avec l'itérable le plus court. Pour les cas " +"où les arguments sont déjà rangés sous forme de *n*-uplets, voir :func:" +"`itertools.starmap`." + +#: library/functions.rst:1015 +msgid "" +"Return the largest item in an iterable or the largest of two or more " +"arguments." +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:1018 +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 " +"arguments are provided, the largest of the positional arguments is returned." +msgstr "" +"Si un seul argument positionnel est fourni, il doit être :term:`itérable " +"`. Le plus grand élément de l'itérable est renvoyé. Si au moins " +"deux arguments positionnels sont fournis, l'argument le plus grand sera " +"renvoyé." + +#: library/functions.rst:1060 +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 " +"*default* argument specifies an object to return if the provided iterable is " +"empty. If the iterable is empty and *default* is not provided, a :exc:" +"`ValueError` is raised." +msgstr "" +"Elle accepte deux arguments nommés optionnels. L'argument *key* spécifie une " +"fonction à un argument permettant de trier comme pour :meth:`list.sort`. " +"L'argument *default* fournit quant à lui un objet à donner si l'itérable " +"fourni est vide. Si l'itérable est vide et que *default* n'est pas fourni, :" +"exc:`ValueError` est levée." + +#: library/functions.rst:1029 +msgid "" +"If multiple items are maximal, the function returns the first one " +"encountered. This is consistent with other sort-stability preserving tools " +"such as ``sorted(iterable, key=keyfunc, reverse=True)[0]`` and ``heapq." +"nlargest(1, iterable, key=keyfunc)``." +msgstr "" +"Si plusieurs éléments représentent la plus grande valeur, le premier " +"rencontré est renvoyé. C'est cohérent avec d'autres outils préservant une " +"stabilité lors du tri, tels que ``sorted(iterable, key=keyfunc, reverse=True)" +"[0]`` et ``heapq.nlargest(1, iterable, key=keyfunc)``." + +#: library/functions.rst:1071 +msgid "The *default* keyword-only argument." +msgstr "L'argument nommé (et seulement donné par son nom) *default*." + +#: library/functions.rst:1074 +msgid "The *key* can be ``None``." +msgstr "l'argument *key* peut être ``None``." + +#: library/functions.rst:1045 +msgid "" +"Return a \"memory view\" object created from the given argument. See :ref:" +"`typememoryview` for more information." +msgstr "" +"Renvoie une « vue mémoire » (*memory view*) créée depuis l'argument. Voir :" +"ref:`typememoryview` pour plus d'informations." + +#: library/functions.rst:1052 +msgid "" +"Return the smallest item in an iterable or the smallest of two or more " +"arguments." +msgstr "" +"Renvoie le plus petit élément d'un itérable ou le plus petit d'au moins deux " +"arguments." + +#: library/functions.rst:1055 +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 " +"arguments are provided, the smallest of the positional arguments is returned." +msgstr "" +"Si un seul argument est fourni, il doit être :term:`itérable `. Le " +"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:1066 +msgid "" +"If multiple items are minimal, the function returns the first one " +"encountered. This is consistent with other sort-stability preserving tools " +"such as ``sorted(iterable, key=keyfunc)[0]`` and ``heapq.nsmallest(1, " +"iterable, key=keyfunc)``." +msgstr "" +"Si plusieurs éléments sont minimaux, la fonction renvoie le premier " +"rencontré. C'est cohérent avec d'autres outils préservant une stabilité lors " +"du tri, tels que ``sorted(iterable, key=keyfunc)[0]`` et ``heapq." +"nsmallest(1, iterable, key=keyfunc)``." + +#: library/functions.rst:1080 +#, fuzzy +msgid "" +"Retrieve the next item from the :term:`iterator` by calling its :meth:" +"`~iterator.__next__` method. If *default* is given, it is returned if the " +"iterator is exhausted, otherwise :exc:`StopIteration` is raised." +msgstr "" +"Donne l'élément suivant d'*iterator* en appelant sa méthode :meth:`~iterator." +"__next__`. Si *default* est fourni, il sera renvoyé si l'itérateur est " +"épuisé, sinon :exc:`StopIteration` est levée." + +#: library/functions.rst:1087 +#, fuzzy +msgid "" +"Return a new featureless object. :class:`object` is a base for all classes. " +"It has methods that are common to all instances of Python classes. This " +"function does not accept any arguments." +msgstr "" +"Renvoie un objet vide. :class:`object` est la classe parente de toutes les " +"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:1093 +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." +msgstr "" +":class:`object` n'a *pas* d'attribut :attr:`~object.__dict__`, vous ne " +"pouvez donc pas assigner d'attributs arbitraires à une instance d':class:" +"`object`." + +#: library/functions.rst:1099 +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` " +"object, it has to define an :meth:`__index__` method that returns an " +"integer. For example:" +msgstr "" +"Convertit un entier en sa représentation octale dans une chaîne préfixée de " +"``0o``. Le résultat est une expression Python valide. Si *x* n'est pas un " +"objet :class:`int`, il doit définir une méthode :meth:`__index__` qui donne " +"un entier, par exemple :" + +#: library/functions.rst:1109 +#, fuzzy +msgid "" +"If you want to convert an integer number to an octal string either with the " +"prefix \"0o\" or not, you can use either of the following ways." +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:1126 +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 " +"examples of how to use this function." +msgstr "" +"Ouvre *file* et donne un :term:`objet fichier ` correspondant. " +"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:1130 +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 " +"integer file descriptor of the file to be wrapped. (If a file descriptor is " +"given, it is closed when the returned I/O object is closed unless *closefd* " +"is set to ``False``.)" +msgstr "" +"*file* est un :term:`objet simili-chemin ` donnant le " +"chemin (absolu ou relatif au répertoire courant) du fichier à ouvrir ou un " +"nombre entier représentant le descripteur de fichier à envelopper (si un " +"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:1136 +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. " +"Other common values are ``'w'`` for writing (truncating the file if it " +"already exists), ``'x'`` for exclusive creation, and ``'a'`` for appending " +"(which on *some* Unix systems, means that *all* writes append to the end of " +"the file regardless of the current seek position). In text mode, if " +"*encoding* is not specified the encoding used is platform-dependent: " +"``locale.getpreferredencoding(False)`` is called to get the current locale " +"encoding. (For reading and writing raw bytes use binary mode and leave " +"*encoding* unspecified.) The available modes are:" +msgstr "" +"*mode* est une chaîne optionnelle permettant de spécifier dans quel mode le " +"fichier est ouvert. Par défaut, *mode* vaut ``'r'`` qui signifie « ouvrir en " +"lecture pour du texte ». ``'w'`` est aussi une valeur classique, permettant " +"d'écrire (en effaçant le contenu du fichier s'il existe), ainsi que ``'x'`` " +"permettant une création exclusive et ``'a'`` pour ajouter à la fin du " +"fichier (ce qui, sur certains systèmes Unix, signifie que *toutes* les " +"écritures seront des ajouts en fin de fichier, sans tenir compte de la " +"position demandée). En mode texte, si *encoding* n'est pas spécifié, " +"l'encodage utilisé dépend de la plate-forme : ``locale." +"getpreferredencoding(False)`` est appelée pour obtenir l'encodage défini par " +"les paramètres régionaux (pour lire et écrire des octets bruts, utilisez le " +"mode binaire sans préciser *encoding* non spécifié). Les modes disponibles " +"sont :" + +#: library/functions.rst:1153 +msgid "Character" +msgstr "Caractère" + +#: library/functions.rst:1153 +msgid "Meaning" +msgstr "Signification" + +#: library/functions.rst:1155 +msgid "``'r'``" +msgstr "``'r'``" + +#: library/functions.rst:1155 +msgid "open for reading (default)" +msgstr "ouvre en lecture (par défaut)" + +#: library/functions.rst:1156 +msgid "``'w'``" +msgstr "``'w'``" + +#: library/functions.rst:1156 +msgid "open for writing, truncating the file first" +msgstr "ouvre en écriture, en effaçant le contenu du fichier" + +#: library/functions.rst:1157 +msgid "``'x'``" +msgstr "``'x'``" + +#: library/functions.rst:1157 +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:1158 +msgid "``'a'``" +msgstr "``'a'``" + +#: library/functions.rst:1158 +msgid "open for writing, appending to the end of file if it exists" +msgstr "ouvre en écriture, ajoutant à la fin du fichier s'il existe" + +#: library/functions.rst:1159 +msgid "``'b'``" +msgstr "``'b'``" + +#: library/functions.rst:1159 +msgid "binary mode" +msgstr "mode binaire" + +#: library/functions.rst:1160 +msgid "``'t'``" +msgstr "``'t'``" + +#: library/functions.rst:1160 +msgid "text mode (default)" +msgstr "mode texte (par défaut)" + +#: library/functions.rst:1161 +msgid "``'+'``" +msgstr "``'+'``" + +#: library/functions.rst:1161 +msgid "open for updating (reading and writing)" +msgstr "ouvre en modification (lecture et écriture)" + +#: library/functions.rst:1164 +msgid "" +"The default mode is ``'r'`` (open for reading text, a synonym of ``'rt'``). " +"Modes ``'w+'`` and ``'w+b'`` open and truncate the file. Modes ``'r+'`` and " +"``'r+b'`` open the file with no truncation." +msgstr "" +"Le mode par défaut est ``'r'`` (ouverture pour lire du texte, synonyme de " +"``'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:1168 +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* " +"argument) return contents as :class:`bytes` objects without any decoding. " +"In text mode (the default, or when ``'t'`` is included in the *mode* " +"argument), the contents of the file are returned as :class:`str`, the bytes " +"having been first decoded using a platform-dependent encoding or using the " +"specified *encoding* if given." +msgstr "" +"Comme mentionné dans :ref:`io-overview`, Python fait la différence entre les " +"entrées-sorties binaires et textes. Les fichiers ouverts en mode binaire " +"(avec ``'b'`` dans *mode*) donnent leur contenu sous forme de :class:`bytes` " +"sans décodage. En mode texte (par défaut, ou lorsque ``'t'`` est dans le " +"*mode*), le contenu du fichier est donné sous forme de :class:`str`, les " +"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:1176 +msgid "" +"There is an additional mode character permitted, ``'U'``, which no longer " +"has any effect, and is considered deprecated. It previously enabled :term:" +"`universal newlines` in text mode, which became the default behavior in " +"Python 3.0. Refer to the documentation of the :ref:`newline ` parameter for further details." +msgstr "" +"Il y a un mode « caractères » supplémentaire autorisé, ``’U’``, qui n'a plus " +"d'effet, et est considéré comme obsolète. Auparavant, il activait les :term:" +"`retours à la ligne universels ` en mode texte, qui est " +"devenu le comportement par défaut dans Python 3.0. Référez-vous à la " +"documentation du paramètre :ref:`newline ` pour plus " +"de détails." + +#: library/functions.rst:1184 +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 " +"platform-independent." +msgstr "" +"Python ne dépend pas de la représentation du fichier texte du système sous-" +"jacent. Tout le traitement est effectué par Python lui-même, et est ainsi " +"indépendant de la plate-forme." + +#: library/functions.rst:1188 +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. 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 " +"tampon. 0 pour désactiver l’espace tampon (seulement autorisé en mode " +"binaire), 1 pour avoir un *buffer* travaillant ligne par ligne (seulement " +"disponible en mode texte), ou un entier supérieur à 1 pour donner la taille " +"en octets d’un tampon de taille fixe. Notez que spécifier une taille de " +"tampon de cette manière s'applique aux E/S binaires, mais que " +"``TextIOWrapper`` (c'est-à-dire les fichiers ouverts avec ``mode='r+'``) " +"aurait un autre tampon. Pour désactiver la mise en mémoire tampon dans " +"``TextIOWrapper``, envisagez d'utiliser le drapeau ``write_through`` pour :" +"func:`io.TextIOWrapper.reconfigure`.Sans l’argument *buffering*, les " +"comportements par défaut sont les suivants :" + +#: library/functions.rst:1198 +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 " +"size\" and falling back on :attr:`io.DEFAULT_BUFFER_SIZE`. On many systems, " +"the buffer will typically be 4096 or 8192 bytes long." +msgstr "" +"Les fichiers binaires sont mis dans un tampon de taille fixe, dont la taille " +"est choisie par une heuristique essayant de déterminer la taille des blocs " +"du système sous-jacent, ou en utilisant par défaut :attr:`io." +"DEFAULT_BUFFER_SIZE`. Sur de nombreux systèmes, le tampon sera de 4096 ou " +"8192 octets." + +#: library/functions.rst:1203 +msgid "" +"\"Interactive\" text files (files for which :meth:`~io.IOBase.isatty` " +"returns ``True``) use line buffering. Other text files use the policy " +"described above for binary files." +msgstr "" +"Les fichiers texte « interactifs » (fichiers pour lesquels :meth:`io.IOBase." +"isatty` renvoie ``True``) utilisent un tampon par lignes. Les autres " +"fichiers texte sont traités comme les fichiers binaires." + +#: library/functions.rst:1207 +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 " +"dependent (whatever :func:`locale.getpreferredencoding` returns), but any :" +"term:`text encoding` supported by Python can be used. See the :mod:`codecs` " +"module for the list of supported encodings." +msgstr "" +"*encoding* est le nom de l'encodage utilisé pour encoder ou décoder le " +"fichier. Il doit seulement être utilisé en mode texte. L'encodage par défaut " +"dépend de la plateforme (ce que :func:`locale.getpreferredencoding` donne), " +"mais n'importe quel :term:`encodage de texte ` pris en charge " +"par Python peut être utilisé. Voir :mod:`codecs` pour une liste des " +"encodages pris en charge." + +#: library/functions.rst:1214 +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 " +"standard error handlers are available (listed under :ref:`error-handlers`), " +"though any error handling name that has been registered with :func:`codecs." +"register_error` is also valid. The standard names include:" +msgstr "" +"*errors* est une chaîne facultative spécifiant comment les erreurs " +"d'encodage et de décodage sont gérées, ce n'est pas utilisable en mode " +"binaire. De nombreux gestionnaires d'erreurs standards sont disponibles " +"(listés sous :ref:`error-handlers`), aussi, tout nom de gestionnaire " +"d'erreur enregistré avec :func:`codecs.register_error` est aussi un argument " +"valide. Les noms standards sont :" + +#: library/functions.rst:1222 +msgid "" +"``'strict'`` to raise a :exc:`ValueError` exception if there is an encoding " +"error. The default value of ``None`` has the same effect." +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:1226 +msgid "" +"``'ignore'`` ignores errors. Note that ignoring encoding errors can lead to " +"data loss." +msgstr "" +"``'ignore'`` ignore les erreurs. Notez qu'ignorer les erreurs d'encodage " +"peut mener à des pertes de données." + +#: library/functions.rst:1229 +msgid "" +"``'replace'`` causes a replacement marker (such as ``'?'``) to be inserted " +"where there is malformed data." +msgstr "" +"``'replace'`` insère un marqueur de substitution (tel que ``'?'``) en place " +"des données mal formées." + +#: library/functions.rst:1232 +#, fuzzy +msgid "" +"``'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*. " +"Ces codes caractères privés seront ensuite transformés dans les mêmes octets " +"erronés si le gestionnaire d'erreur ``surrogateescape`` est utilisé lors de " +"l'écriture de la donnée. C'est utile pour traiter des fichiers d'un encodage " +"inconnu." + +#: library/functions.rst:1239 +msgid "" +"``'xmlcharrefreplace'`` is only supported when writing to a file. Characters " +"not supported by the encoding are replaced with the appropriate XML " +"character reference ``&#nnn;``." +msgstr "" +"``'xmlcharrefreplace'`` est seulement pris en charge à l'écriture vers un " +"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:1243 +msgid "" +"``'backslashreplace'`` replaces malformed data by Python's backslashed " +"escape sequences." +msgstr "" +"``'backslashreplace'`` remplace les données mal formées par des séquences " +"d'échappement Python (utilisant des barres obliques inverses)." + +#: library/functions.rst:1246 +msgid "" +"``'namereplace'`` (also only supported when writing) replaces unsupported " +"characters with ``\\N{...}`` escape sequences." +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:1254 +#, fuzzy +msgid "" +"*newline* determines how to parse newline characters from the stream. It can " +"be ``None``, ``''``, ``'\\n'``, ``'\\r'``, and ``'\\r\\n'``. It works as " +"follows:" +msgstr "" +"*newline* contrôle comment le mode :term:`retours à la ligne universels " +"` fonctionne (seulement en mode texte). Il peut être " +"``None``, ``''``, ``'\\n'``, ``'\\r'``, et ``'\\r\\n'``. Il fonctionne comme " +"suit :" + +#: library/functions.rst:1258 +msgid "" +"When reading input from the stream, if *newline* is ``None``, universal " +"newlines mode is enabled. Lines in the input can end in ``'\\n'``, " +"``'\\r'``, or ``'\\r\\n'``, and these are translated into ``'\\n'`` before " +"being returned to the caller. If it is ``''``, universal newlines mode is " +"enabled, but line endings are returned to the caller untranslated. If it " +"has any of the other legal values, input lines are only terminated by the " +"given string, and the line ending is returned to the caller untranslated." +msgstr "" +"Lors de la lecture, si *newline* est ``None``, le mode *universal newlines* " +"est activé. Les lignes lues peuvent se terminer par ``'\\n'``, ``'\\r'``, ou " +"``'\\r\\n'``, et sont remplacées par ``'\\n'``, avant d'être renvoyées à " +"l'appelant. S'il vaut ``''``, le mode *universal newline* est activé mais " +"les fins de ligne ne sont pas remplacées. S'il a n'importe quelle autre " +"valeur autorisée, les lignes sont seulement terminées par la chaîne donnée, " +"qui est rendue telle quelle." + +#: library/functions.rst:1266 +msgid "" +"When writing output to the stream, if *newline* is ``None``, any ``'\\n'`` " +"characters written are translated to the system default line separator, :" +"data:`os.linesep`. If *newline* is ``''`` or ``'\\n'``, no translation " +"takes place. If *newline* is any of the other legal values, any ``'\\n'`` " +"characters written are translated to the given string." +msgstr "" +"Lors de l'écriture, si *newline* est ``None``, chaque ``'\\n'`` est remplacé " +"par le séparateur de lignes par défaut du système :data:`os.linesep`. Si " +"*newline* est ``''`` ou ``'\\n'`` aucun remplacement n'est effectué. Si " +"*newline* est un autre caractère valide, chaque ``'\\n'`` sera remplacé par " +"la chaîne donnée." + +#: library/functions.rst:1272 +#, fuzzy +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 " +"closed. If a filename is given *closefd* must be ``True`` (the default); " +"otherwise, an error will be raised." +msgstr "" +"Si *closefd* est ``False`` et qu'un descripteur de fichier est fourni plutôt " +"qu'un nom de fichier, le descripteur de fichier sera laissé ouvert lorsque " +"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:1277 +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 " +"*opener* with (*file*, *flags*). *opener* must return an open file " +"descriptor (passing :mod:`os.open` as *opener* results in functionality " +"similar to passing ``None``)." +msgstr "" +"Un *opener* personnalisé peut être utilisé en fournissant un appelable comme " +"*opener*. Le descripteur de fichier de cet objet fichier sera alors obtenu " +"en appelant *opener* avec (*file*, *flags*). *opener* doit renvoyer un " +"descripteur de fichier ouvert (fournir :mod:`os.open` en tant qu'*opener* " +"aura le même effet que donner ``None``)." + +#: library/functions.rst:1283 +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:1285 +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::" +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:1298 +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 " +"mode (``'w'``, ``'r'``, ``'wt'``, ``'rt'``, etc.), it returns a subclass of :" +"class:`io.TextIOBase` (specifically :class:`io.TextIOWrapper`). When used " +"to open a file in a binary mode with buffering, the returned class is a " +"subclass of :class:`io.BufferedIOBase`. The exact class varies: in read " +"binary mode, it returns an :class:`io.BufferedReader`; in write binary and " +"append binary modes, it returns an :class:`io.BufferedWriter`, and in read/" +"write mode, it returns an :class:`io.BufferedRandom`. When buffering is " +"disabled, the raw stream, a subclass of :class:`io.RawIOBase`, :class:`io." +"FileIO`, is returned." +msgstr "" +"Le type d'\\ :term:`objet fichier ` renvoyé par la fonction :" +"func:`open` dépend du mode. Lorsque :func:`open` est utilisé pour ouvrir un " +"fichier en mode texte (``w``, ``r``, ``wt``, ``rt``, etc.), il renvoie une " +"classe fille de :class:`io.TextIOBase` (spécifiquement : :class:`io." +"TextIOWrapper`). Lors de l'ouverture d'un fichier en mode binaire avec " +"tampon, la classe renvoyée sera une fille de :class:`io.BufferedIOBase`. La " +"classe exacte varie : en lecture en mode binaire elle renvoie une :class:`io." +"BufferedReader`, en écriture et ajout en mode binaire c'est une :class:`io." +"BufferedWriter`, et en lecture-écriture, c'est une :class:`io." +"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:1319 +#, fuzzy +msgid "" +"See also the file handling modules, such as :mod:`fileinput`, :mod:`io` " +"(where :func:`open` is declared), :mod:`os`, :mod:`os.path`, :mod:" +"`tempfile`, and :mod:`shutil`." +msgstr "" +"Consultez aussi les modules de gestion de fichiers tels que :mod:" +"`fileinput`, :mod:`io` (où :func:`open` est déclarée), :mod:`os`, :mod:`os." +"path`, :mod:`tmpfile`, et :mod:`shutil`." + +#: library/functions.rst:1323 +msgid "" +"Raises an :ref:`auditing event ` ``open`` with arguments ``file``, " +"``mode``, ``flags``." +msgstr "" +"Lève un :ref:`évènement d'audit ` ``open`` avec les arguments " +"``file``, ``mode`` et ``flags``." + +#: library/functions.rst:1325 +msgid "" +"The ``mode`` and ``flags`` arguments may have been modified or inferred from " +"the original call." +msgstr "" +"Les arguments ``mode`` et ``flags`` peuvent avoir été modifiés ou déduits de " +"l'appel original." + +#: library/functions.rst:1331 +msgid "The *opener* parameter was added." +msgstr "ajout du paramètre *opener*." + +#: library/functions.rst:1332 +msgid "The ``'x'`` mode was added." +msgstr "ajout du mode ``'x'``." + +#: library/functions.rst:1333 +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:1334 +msgid "" +":exc:`FileExistsError` is now raised if the file opened in exclusive " +"creation mode (``'x'``) already exists." +msgstr "" +":exc:`FileExistsError` est maintenant levée si le fichier ouvert en mode " +"création exclusive (``'x'``) existe déjà." + +#: library/functions.rst:1340 +msgid "The file is now non-inheritable." +msgstr "Il n'est plus possible d'hériter de *file*." + +#: library/functions.rst:1344 +msgid "The ``'U'`` mode." +msgstr "Le mode ``'U'``." + +#: library/functions.rst:1349 +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 :" +"exc:`InterruptedError` exception (see :pep:`475` for the rationale)." +msgstr "" +"Si l'appel système est interrompu et que le gestionnaire de signal ne lève " +"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:1352 +msgid "The ``'namereplace'`` error handler was added." +msgstr "ajout du gestionnaire d'erreurs ``'namereplace'``." + +#: library/functions.rst:1357 +msgid "Support added to accept objects implementing :class:`os.PathLike`." +msgstr "prise en charge des objets implémentant :class:`os.PathLike`." + +#: library/functions.rst:1358 +msgid "" +"On Windows, opening a console buffer may return a subclass of :class:`io." +"RawIOBase` other than :class:`io.FileIO`." +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:1363 +msgid "" +"Given a string representing one Unicode character, return an integer " +"representing the Unicode code point of that character. For example, " +"``ord('a')`` returns the integer ``97`` and ``ord('€')`` (Euro sign) returns " +"``8364``. This is the inverse of :func:`chr`." +msgstr "" +"Renvoie le nombre entier représentant le code Unicode du caractère " +"représenté par la chaîne donnée. Par exemple, ``ord('a')`` renvoie le nombre " +"entier ``97`` et ``ord('€')`` (symbole euro) renvoie ``8364``. Il s'agit de " +"l'inverse de :func:`chr`." + +#: library/functions.rst:1371 +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) % " +"mod``). The two-argument form ``pow(base, exp)`` is equivalent to using the " +"power operator: ``base**exp``." +msgstr "" +"Renvoie *base* puissance *exp* et, si *mod* est présent, donne *base* " +"puissance *exp* modulo *mod* (calculé de manière plus efficiente que " +"``pow(base, exp) % mod``). La forme à deux arguments ``pow(base, exp)`` est " +"équivalente à l'opérateur puissance : ``base**exp``." + +#: library/functions.rst:1376 +#, 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, ``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 " +"arithmétiques binaires s'appliquent. Pour des opérandes de type :class:" +"`int`, le résultat sera de même type que les opérandes (après coercition) " +"sauf si le second argument est négatif, dans ce cas, les arguments sont " +"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:1386 +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 " +"*exp* is negative, *base* must be relatively prime to *mod*. In that case, " +"``pow(inv_base, -exp, mod)`` is returned, where *inv_base* is an inverse to " +"*base* modulo *mod*." +msgstr "" +"Pour des opérandes *base* et *exp* de type :class:`int`, si *mod* est " +"présent, *mod* doit également être de type entier et *mod* doit être non " +"nul. Si *mod* est présent et que *exp* est négatif, *base* et *mod* doivent " +"ê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:1392 +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:1399 +msgid "" +"For :class:`int` operands, the three-argument form of ``pow`` now allows the " +"second argument to be negative, permitting computation of modular inverses." +msgstr "" +"Pour les opérandes :class:`int`, la forme à trois arguments de ``pow`` " +"permet maintenant au deuxième argument d'être négatif, permettant le calcul " +"des inverses modulaires." + +#: library/functions.rst:1404 +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:1411 +#, fuzzy +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 " +"keyword arguments." +msgstr "" +"Écrit *objects* dans le flux texte *file*, séparés par *sep* et suivis de " +"*end*. Les arguments *sep*, *end*, *file*, et *flush*, s'ils sont présents, " +"doivent être nommés." + +#: library/functions.rst:1415 +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* " +"and *end* must be strings; they can also be ``None``, which means to use the " +"default values. If no *objects* are given, :func:`print` will just write " +"*end*." +msgstr "" +"Tous les arguments positionnels sont convertis en chaîne comme le fait :func:" +"`str`, puis écrits sur le flux, séparés par *sep* et terminés par *end*. " +"*sep* et *end* doivent être des chaînes, ou ``None``, indiquant de prendre " +"les valeurs par défaut. Si aucun *objects* n'est donné :func:`print` écris " +"seulement *end*." + +#: library/functions.rst:1421 +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 " +"arguments are converted to text strings, :func:`print` cannot be used with " +"binary mode file objects. For these, use ``file.write(...)`` instead." +msgstr "" +"L'argument *file* doit être un objet avec une méthode ``write(string)`` ; " +"s'il n'est pas fourni, ou vaut ``None``, :data:`sys.stdout` sera utilisé. " +"Puisque les arguments affichés sont convertis en chaîne, :func:`print` ne " +"peut pas être utilisé avec des fichiers ouverts en mode binaire. Pour ceux-" +"ci utilisez plutôt ``file.write(...)``." + +#: library/functions.rst:1426 +#, fuzzy +msgid "" +"Whether the output is buffered is usually determined by *file*, but if the " +"*flush* keyword argument is true, the stream is forcibly flushed." +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:1429 +msgid "Added the *flush* keyword argument." +msgstr "ajout de l'argument nommé *flush*." + +#: library/functions.rst:1435 +msgid "Return a property attribute." +msgstr "Renvoie un attribut propriété." + +#: library/functions.rst:1437 +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 " +"attribute value. And *doc* creates a docstring for the attribute." +msgstr "" +"*fget* est une fonction permettant d'obtenir la valeur d'un attribut. *fset* " +"est une fonction pour en définir la valeur. *fdel* quant à elle permet de " +"supprimer la valeur d'un attribut, et *doc* créé une *docstring* pour " +"l'attribut." + +#: library/functions.rst:1441 +msgid "A typical use is to define a managed attribute ``x``::" +msgstr "Une utilisation courante : définir un attribut managé ``x`` ::" + +#: library/functions.rst:1458 +#, fuzzy +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." +msgstr "" +"Si *c* est une instance de *C*, ``c.x`` appelle l'accesseur (*getter* en " +"anglais), ``c.x = value`` invoque le mutateur (*setter*), et ``del x`` le " +"destructeur (*deleter*)." + +#: library/functions.rst:1461 +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 " +"possible to create read-only properties easily using :func:`property` as a :" +"term:`decorator`::" +msgstr "" +"S'il est donné, *doc* sera la *docstring* de l'attribut. Autrement la " +"propriété copiera celle de *fget* (si elle existe). Cela rend possible la " +"création de propriétés en lecture seule en utilisant simplement :func:" +"`property` comme un :term:`décorateur ` ::" + +#: library/functions.rst:1474 +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.\"" +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:1478 +msgid "" +"A property object has :attr:`~property.getter`, :attr:`~property.setter`, " +"and :attr:`~property.deleter` methods usable as decorators that create a " +"copy of the property with the corresponding accessor function set to the " +"decorated function. This is best explained with an example::" +msgstr "" +"Un objet propriété a les méthodes :attr:`~property.getter`, :attr:`~property." +"setter` et :attr:`~property.deleter` utilisables comme décorateurs créant " +"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:1500 +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 " +"case.)" +msgstr "" +"Ce code est l'exact équivalent du premier exemple. Soyez attentifs à bien " +"donner aux fonctions additionnelles le même nom que la propriété (``x`` dans " +"ce cas)." + +#: library/functions.rst:1504 +msgid "" +"The returned property object also has the attributes ``fget``, ``fset``, and " +"``fdel`` corresponding to the constructor arguments." +msgstr "" +"L'objet propriété renvoyé à aussi les attributs ``fget``, ``fset`` et " +"``fdel`` correspondants aux arguments du constructeur." + +#: library/functions.rst:1507 +msgid "The docstrings of property objects are now writeable." +msgstr "Les *docstrings* des objets propriété peuvent maintenant être écrits." + +#: library/functions.rst:1516 +msgid "" +"Rather than being a function, :class:`range` is actually an immutable " +"sequence type, as documented in :ref:`typesseq-range` and :ref:`typesseq`." +msgstr "" +"Contrairement aux apparences, :class:`range` n'est pas une fonction mais un " +"type de séquence immuable, comme décrit dans :ref:`typesseq-range` et :ref:" +"`typesseq`." + +#: library/functions.rst:1522 +#, fuzzy +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 " +"yield an object with the same value when passed to :func:`eval`; otherwise, " +"the representation is a string enclosed in angle brackets that contains the " +"name of the type of the object together with additional information often " +"including the name and address of the object. A class can control what this " +"function returns for its instances by defining a :meth:`__repr__` method. " +"If :func:`sys.displayhook` is not accessible, this function will raise :exc:" +"`RuntimeError`." +msgstr "" +"Renvoie une chaîne contenant une représentation affichable de l'objet. Pour " +"de nombreux types, cette fonction essaye de renvoyer une chaîne qui donnera " +"à son tour un objet de même valeur lorsqu'elle est passée à :func:`eval`, " +"sinon la représentation sera une chaîne entourée de chevrons contenant le " +"nom du type et quelques informations supplémentaires, souvent le nom et " +"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:1535 +msgid "" +"Return a reverse :term:`iterator`. *seq* must be an object which has a :" +"meth:`__reversed__` method or supports the sequence protocol (the :meth:" +"`__len__` method and the :meth:`__getitem__` method with integer arguments " +"starting at ``0``)." +msgstr "" +"Renvoie un :term:`itérateur ` inversé. *seq* doit être un objet " +"ayant une méthode :meth:`__reverse__` ou prenant en charge le protocole " +"séquence (la méthode :meth:`__len__` et la méthode :meth:`__getitem__` avec " +"des arguments entiers commençant à zéro)." + +#: library/functions.rst:1543 +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 " +"input." +msgstr "" +"Renvoie *number* arrondi avec une précision de *ndigits* chiffres après la " +"virgule. Si *ndigits* est omis (ou est ``None``), l'entier le plus proche " +"est renvoyé." + +#: library/functions.rst:1547 +#, fuzzy +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 " +"equally close, rounding is done toward the even choice (so, for example, " +"both ``round(0.5)`` and ``round(-0.5)`` are ``0``, and ``round(1.5)`` is " +"``2``). Any integer value is valid for *ndigits* (positive, zero, or " +"negative). The return value is an integer if *ndigits* is omitted or " +"``None``. Otherwise, the return value has the same type as *number*." +msgstr "" +"Pour les types natifs supportant :func:`round`, les valeurs sont arrondies " +"au multiple de 10 puissance moins *ndigits*, si deux multiples sont " +"équidistants, l'arrondi se fait vers la valeur paire (par exemple " +"``round(0.5)`` et ``round(-0.5)`` valent tous les deux ``0``, et " +"``round(1.5)`` vaut ``2``). *ndigits* accepte tout nombre entier (positif, " +"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:1556 +msgid "" +"For a general Python object ``number``, ``round`` delegates to ``number." +"__round__``." +msgstr "" +"Pour tout autre objet Python ``number``, ``round`` délègue à ``number." +"__round__``." + +#: library/functions.rst:1561 +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 " +"not a bug: it's a result of the fact that most decimal fractions can't be " +"represented exactly as a float. See :ref:`tut-fp-issues` for more " +"information." +msgstr "" +"Le comportement de :func:`round` avec les nombres à virgule flottante peut " +"être surprenant : par exemple ``round(2.675, 2)`` donne ``2.67`` au lieu de " +"``2.68``. Ce n'est pas un bogue, mais dû au fait que la plupart des " +"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:1572 +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-" +"set` for documentation about this class." +msgstr "" +"Renvoie un nouveau :class:`set`, dont les éléments peuvent être extraits " +"d'*iterable*. ``set`` est une classe native. Voir :class:`set` et :ref:" +"`types-set` pour la documentation de cette classe." + +#: library/functions.rst:1576 +msgid "" +"For other containers see the built-in :class:`frozenset`, :class:`list`, :" +"class:`tuple`, and :class:`dict` classes, as well as the :mod:`collections` " +"module." +msgstr "" +"D'autres conteneurs existent, comme : :class:`frozenset`, :class:`list`, :" +"class:`tuple`, et :class:`dict`, ainsi que le module :mod:`collections`." + +#: library/functions.rst:1583 +#, fuzzy +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 a new attribute. The function assigns the value to the attribute, " +"provided the object allows it. For example, ``setattr(x, 'foobar', 123)`` " +"is equivalent to ``x.foobar = 123``." +msgstr "" +"C'est le complément de :func:`getattr`. Les arguments sont : un objet, une " +"chaîne, et une valeur de type arbitraire. La chaîne peut nommer un attribut " +"existant ou un nouvel attribut. La fonction assigne la valeur à l'attribut, " +"si l'objet l'autorise. Par exemple, ``setattr(x, 'foobar', 123)`` équivaut à " +"``x.foobar = 123``." + +#: library/functions.rst:1589 +msgid "" +"*name* need not be a Python identifier as defined in :ref:`identifiers` " +"unless the object chooses to enforce that, for example in a custom :meth:" +"`~object.__getattribute__` or via :attr:`~object.__slots__`. An attribute " +"whose name is not an identifier will not be accessible using the dot " +"notation, but is accessible through :func:`getattr` etc.." +msgstr "" + +#: library/functions.rst:1597 +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:1606 +#, 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 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* " +"valent ``None`` par défaut. Les objets « tranches » ont les attributs " +"suivants en lecture seule : :attr:`~slice.start`, :attr:`~slice.stop`, et :" +"attr:`~slice.step` qui valent simplement les trois arguments (ou leurs " +"valeurs par défaut). Ils n'ont pas d'autre fonctionnalité explicite, " +"cependant ils sont utilisés par *Numerical Python* et d'autres bibliothèques " +"tierces. Les objets « tranches » sont aussi générés par la notation par " +"indice étendue. Par exemple ``a[start:stop:step]`` ou ``a[start:stop, i]``. " +"Voir :func:`itertools.islice` pour une version alternative renvoyant un " +"itérateur." + +#: library/functions.rst:1619 +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:1621 +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:1623 +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." +"lower``). The default value is ``None`` (compare the elements directly)." +msgstr "" +"*key* spécifie une fonction d'un argument utilisé pour extraire une clé de " +"comparaison de chaque élément de l'itérable (par exemple, ``key=str." +"lower``). La valeur par défaut est ``None`` (compare les éléments " +"directement)." + +#: library/functions.rst:1627 +msgid "" +"*reverse* is a boolean value. If set to ``True``, then the list elements " +"are sorted as if each comparison were reversed." +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:1630 +msgid "" +"Use :func:`functools.cmp_to_key` to convert an old-style *cmp* function to a " +"*key* function." +msgstr "" +"Utilisez :func:`functools.cmp_to_key` pour convertir l'ancienne notation " +"*cmp* en une fonction *key*." + +#: library/functions.rst:1633 +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 " +"compare equal --- this is helpful for sorting in multiple passes (for " +"example, sort by department, then by salary grade)." +msgstr "" +"La fonction native :func:`sorted` est garantie stable. Un tri est stable " +"s'il garantit de ne pas changer l'ordre relatif des éléments égaux entre " +"eux. C'est utile pour trier en plusieurs passes (par exemple par département " +"puis par salaire)." + +#: library/functions.rst:1638 +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:1647 +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:1651 +msgid "Transform a method into a static method." +msgstr "Transforme une méthode en méthode statique." + +#: library/functions.rst:1653 +msgid "" +"A static method does not receive an implicit first argument. To declare a " +"static method, use this idiom::" +msgstr "" +"Une méthode statique ne reçoit pas de premier argument implicitement. Voilà " +"comment déclarer une méthode statique ::" + +#: library/functions.rst:1660 +msgid "" +"The ``@staticmethod`` form is a function :term:`decorator` -- see :ref:" +"`function` for details." +msgstr "" +"La forme ``@staticmethod`` est un :term:`décorateur ` de " +"fonction. Consultez :ref:`function` pour plus de détails." + +#: library/functions.rst:1663 +#, fuzzy +msgid "" +"A static method can be called either on the class (such as ``C.f()``) or on " +"an instance (such as ``C().f()``). Moreover, they can be called as regular " +"functions (such as ``f()``)." +msgstr "" +"Une méthode statique peut être appelée sur une classe (par exemple, ``C." +"f()``) comme sur une instance (par exemple, ``C().f()``). De plus, elles " +"peuvent être appelées comme des fonctions régulières (comme ``f()``)." + +#: library/functions.rst:1667 +#, fuzzy +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 " +"class constructors." +msgstr "" +"Les méthodes statiques en Python sont similaires à celles trouvées en Java " +"ou en C++. Consultez :func:`classmethod` pour une variante utile pour créer " +"des constructeurs alternatifs." + +#: library/functions.rst:1671 +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 " +"cases where you need a reference to a function from a class body and you " +"want to avoid the automatic transformation to instance method. For these " +"cases, use this idiom::" +msgstr "" +"Comme pour tous les décorateurs, il est possible d'appeler ``staticmethod`` " +"comme une simple fonction, et faire quelque chose de son résultat. Ça peut " +"être nécessaire dans le cas où vous voudriez une référence à la fonction " +"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:1683 +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:1685 +msgid "" +"Static methods now inherit the method attributes (``__module__``, " +"``__name__``, ``__qualname__``, ``__doc__`` and ``__annotations__``), have a " +"new ``__wrapped__`` attribute, and are now callable as regular functions." +msgstr "" + +#: library/functions.rst:1700 +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:1702 +msgid "" +"``str`` is the built-in string :term:`class`. For general information about " +"strings, see :ref:`textseq`." +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:1708 +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 " +"is not allowed to be a string." +msgstr "" +"Additionne *start* et les éléments d'un *iterable* de gauche à droite et en " +"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:1712 +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 ``''." +"join(sequence)``. To add floating point values with extended precision, " +"see :func:`math.fsum`\\. To concatenate a series of iterables, consider " +"using :func:`itertools.chain`." +msgstr "" +"Pour certains cas, il existe de bonnes alternatives à :func:`sum`. La bonne " +"méthode, et rapide, de concaténer une séquence de chaînes est d'appeler ``''." +"join(séquence)``. Pour additionner des nombres à virgule flottante avec une " +"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:1718 +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:1723 +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 " +"been overridden in a class." +msgstr "" +"Renvoie un objet mandataire (*proxy object* en anglais) déléguant les appels " +"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:1727 +msgid "" +"The *object-or-type* determines the :term:`method resolution order` to be " +"searched. The search starts from the class right after the *type*." +msgstr "" +"Le *object-or-type* détermine quel :term:`ordre de résolution des méthodes " +"` est utilisé pour la recherche. La recherche " +"commence à partir de la classe qui suit immédiatement le *type*." + +#: library/functions.rst:1731 +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` " +"searches ``C -> A -> object``." +msgstr "" +"Par exemple, si :attr:`~class.__mro__` de *object-or-type* est ``D -> B -> C " +"-> A -> object`` et la valeur de *type* est ``B``, alors :func:`super` " +"recherche ``C -> A -> object``." + +#: library/functions.rst:1735 +msgid "" +"The :attr:`~class.__mro__` attribute of the *object-or-type* lists the " +"method resolution search order used by both :func:`getattr` and :func:" +"`super`. The attribute is dynamic and can change whenever the inheritance " +"hierarchy is updated." +msgstr "" +"L'attribut :attr:`~class.__mro__` de *object-or-type* liste l'ordre de " +"recherche de la méthode de résolution utilisée par :func:`getattr` et :func:" +"`super`. L'attribut est dynamique et peut changer lorsque la hiérarchie " +"d'héritage est modifiée." + +#: library/functions.rst:1740 +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. " +"If the second argument is a type, ``issubclass(type2, type)`` must be true " +"(this is useful for classmethods)." +msgstr "" +"Si le second argument est omis, l'objet *super* obtenu n'est pas lié. Si le " +"second argument est un objet, ``isinstance(obj, type)`` doit être vrai. Si " +"le second argument est un type, ``issubclass(type2, type)`` doit être vrai " +"(c'est utile pour les méthodes de classe)." + +#: library/functions.rst:1745 +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 " +"naming them explicitly, thus making the code more maintainable. This use " +"closely parallels the use of *super* in other programming languages." +msgstr "" +"Il existe deux autres cas d'usage typiques pour *super*. Dans une hiérarchie " +"de classes à héritage simple, *super* peut être utilisé pour obtenir la " +"classe parente sans avoir à la nommer explicitement, rendant le code plus " +"maintenable. Cet usage se rapproche de l'usage de *super* dans d'autres " +"langages de programmation." + +#: library/functions.rst:1750 +#, 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 " +"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 " +"retrouve ni dans les langages compilés statiquement, ni dans les langages ne " +"gérant que l'héritage simple. Cela rend possible d'implémenter un héritage " +"en diamant dans lequel plusieurs classes parentes implémentent la même " +"méthode. Une bonne conception implique que chaque méthode doit avoir la même " +"signature lors de leur appel dans tous les cas (parce que l'ordre des appels " +"est déterminée à l'exécution, parce que l'ordre s'adapte aux changements " +"dans la hiérarchie, et parce que l'ordre peut inclure des classes sœurs " +"inconnues avant l'exécution)." + +#: library/functions.rst:1760 +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:1767 +msgid "" +"In addition to method lookups, :func:`super` also works for attribute " +"lookups. One possible use case for this is calling :term:`descriptors " +"` in a parent or sibling class." +msgstr "" +"En plus de la recherche de méthodes, :func:`super` fonctionne également pour " +"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:1771 +msgid "" +"Note that :func:`super` is implemented as part of the binding process for " +"explicit dotted attribute lookups such as ``super().__getitem__(name)``. It " +"does so by implementing its own :meth:`__getattribute__` method for " +"searching classes in a predictable order that supports cooperative multiple " +"inheritance. Accordingly, :func:`super` is undefined for implicit lookups " +"using statements or operators such as ``super()[name]``." +msgstr "" +"Notez que :func:`super` fait partie de l'implémentation du processus de " +"liaison de recherche d'attributs pointés explicitement comme ``super()." +"__getitem__(name)``. Il le fait en implémentant sa propre méthode :meth:" +"`__getattribute__` pour rechercher les classes dans un ordre prévisible " +"supportant l'héritage multiple coopératif. En conséquence, :func:`super` " +"n'est pas défini pour les recherches implicites via des instructions ou des " +"opérateurs tels que ``super()[name]``." + +#: library/functions.rst:1778 +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 " +"arguments exactly and makes the appropriate references. The zero argument " +"form only works inside a class definition, as the compiler fills in the " +"necessary details to correctly retrieve the class being defined, as well as " +"accessing the current instance for ordinary methods." +msgstr "" +"Notez aussi que, en dehors de sa forme sans arguments, :func:`super` peut " +"être utilisée en dehors des méthodes. La forme à deux arguments est précise " +"et donne tous les arguments exactement, donnant les références appropriées. " +"La forme sans arguments fonctionne seulement à l'intérieur d'une définition " +"de classe, puisque c'est le compilateur qui donne les détails nécessaires à " +"propos de la classe en cours de définition, ainsi qu'accéder à l'instance " +"courante pour les méthodes ordinaires." + +#: library/functions.rst:1785 +msgid "" +"For practical suggestions on how to design cooperative classes using :func:" +"`super`, see `guide to using super() `_." +msgstr "" +"Pour des suggestions pratiques sur la conception de classes coopératives " +"utilisant :func:`super`, consultez `guide to using super() `_." + +#: library/functions.rst:1794 +msgid "" +"Rather than being a function, :class:`tuple` is actually an immutable " +"sequence type, as documented in :ref:`typesseq-tuple` and :ref:`typesseq`." +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:1803 +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." +"__class__ `." +msgstr "" +"Avec un argument, renvoie le type d'*object*. La valeur renvoyée est un " +"objet type et généralement la même que la valeur de l'attribut :attr:`object." +"__class__ `." + +#: library/functions.rst:1807 +msgid "" +"The :func:`isinstance` built-in function is recommended for testing the type " +"of an object, because it takes subclasses into account." +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:1811 +#, fuzzy +msgid "" +"With three arguments, return a new type object. This is essentially a " +"dynamic form of the :keyword:`class` statement. The *name* string is the " +"class name and becomes the :attr:`~definition.__name__` attribute. The " +"*bases* tuple contains the base classes and becomes the :attr:`~class." +"__bases__` attribute; if empty, :class:`object`, the ultimate base of all " +"classes, is added. The *dict* dictionary contains attribute and method " +"definitions for the class body; it may be copied or wrapped before becoming " +"the :attr:`~object.__dict__` attribute. The following two statements create " +"identical :class:`type` objects:" +msgstr "" +"Avec trois arguments, renvoie un nouveau type. C'est essentiellement une " +"forme dynamique de l'instruction :keyword:`class`. La chaîne *name* est le " +"nom de la classe et deviendra l'attribut :attr:`~definition.__name__` ; le " +"*n*-uplet *bases* contient les classes mères et deviendra l'attribut :attr:" +"`~class.__bases__`. S'il est vide, :class:`object`, la classe mère ultime de " +"toutes les classes, est ajoutée. Le dictionnaire *dict* est l'espace de " +"nommage contenant les définitions du corps de la classe, il est copié ou " +"encapsulé vers un dictionnaire standard pour devenir l'attribut :attr:" +"`~object.__dict__`. Par exemple, les deux instructions suivantes créent deux " +"instances identiques de :class:`type` :" + +#: library/functions.rst:1826 +msgid "See also :ref:`bltin-type-objects`." +msgstr "Voir aussi :ref:`bltin-type-objects`." + +#: library/functions.rst:1828 +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:1833 +#, fuzzy +msgid "See also :ref:`class-customization`." +msgstr "Voir aussi :ref:`class-customization`." + +#: library/functions.rst:1835 +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." +msgstr "" +"Les sous-classes de :class:`type` qui ne redéfinissent pas ``type.__new__`` " +"ne doivent plus utiliser la forme à un argument pour récupérer le type d'un " +"objet." + +#: library/functions.rst:1841 +msgid "" +"Return the :attr:`~object.__dict__` attribute for a module, class, instance, " +"or any other object with a :attr:`~object.__dict__` attribute." +msgstr "" +"Renvoie l'attribut :attr:`~object.__dict__` d'un module, d'une classe, d'une " +"instance ou de n'importe quel objet avec un attribut :attr:`~object." +"__dict__`." + +#: library/functions.rst:1844 +msgid "" +"Objects such as modules and instances have an updateable :attr:`~object." +"__dict__` attribute; however, other objects may have write restrictions on " +"their :attr:`~object.__dict__` attributes (for example, classes use a :class:" +"`types.MappingProxyType` to prevent direct dictionary updates)." +msgstr "" +"Certains objets, comme les modules et les instances, ont un attribut :attr:" +"`~object.__dict__` modifiable ; cependant, d'autres objets peuvent avoir des " +"restrictions en écriture sur leurs attributs :attr:`~object.__dict__` (par " +"exemple, les classes utilisent un :class:`types.MappingProxyType` pour " +"éviter les modifications directes du dictionnaire)." + +#: library/functions.rst:1849 +msgid "" +"Without an argument, :func:`vars` acts like :func:`locals`. Note, the " +"locals dictionary is only useful for reads since updates to the locals " +"dictionary are ignored." +msgstr "" +"Sans argument, :func:`vars` se comporte comme :func:`locals`. Notez que le " +"dictionnaire des variables locales n'est utile qu'en lecture, car ses " +"écritures sont ignorées." + +#: library/functions.rst:1853 +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:1859 +msgid "" +"Iterate over several iterables in parallel, producing tuples with an item " +"from each one." +msgstr "" + +#: library/functions.rst:1862 +#, fuzzy +msgid "Example::" +msgstr "Exemple ::" + +#: library/functions.rst:1871 +msgid "" +"More formally: :func:`zip` returns an iterator of tuples, where the *i*-th " +"tuple contains the *i*-th element from each of the argument iterables." +msgstr "" + +#: library/functions.rst:1874 +msgid "" +"Another way to think of :func:`zip` is that it turns rows into columns, and " +"columns into rows. This is similar to `transposing a matrix `_." +msgstr "" + +#: library/functions.rst:1878 +msgid "" +":func:`zip` is lazy: The elements won't be processed until the iterable is " +"iterated on, e.g. by a :keyword:`!for` loop or by wrapping in a :class:" +"`list`." +msgstr "" + +#: library/functions.rst:1882 +msgid "" +"One thing to consider is that the iterables passed to :func:`zip` could have " +"different lengths; sometimes by design, and sometimes because of a bug in " +"the code that prepared these iterables. Python offers three different " +"approaches to dealing with this issue:" +msgstr "" + +#: library/functions.rst:1887 +msgid "" +"By default, :func:`zip` stops when the shortest iterable is exhausted. It " +"will ignore the remaining items in the longer iterables, cutting off the " +"result to the length of the shortest iterable::" +msgstr "" + +#: library/functions.rst:1894 +msgid "" +":func:`zip` is often used in cases where the iterables are assumed to be of " +"equal length. In such cases, it's recommended to use the ``strict=True`` " +"option. Its output is the same as regular :func:`zip`::" +msgstr "" + +#: library/functions.rst:1901 +msgid "" +"Unlike the default behavior, it raises a :exc:`ValueError` if one iterable " +"is exhausted before the others:" +msgstr "" + +#: library/functions.rst:1919 +msgid "" +"Without the ``strict=True`` argument, any bug that results in iterables of " +"different lengths will be silenced, possibly manifesting as a hard-to-find " +"bug in another part of the program." +msgstr "" + +#: library/functions.rst:1923 +msgid "" +"Shorter iterables can be padded with a constant value to make all the " +"iterables have the same length. This is done by :func:`itertools." +"zip_longest`." +msgstr "" + +#: library/functions.rst:1927 +msgid "" +"Edge cases: With a single iterable argument, :func:`zip` returns an iterator " +"of 1-tuples. With no arguments, it returns an empty iterator." +msgstr "" + +#: library/functions.rst:1930 +msgid "Tips and tricks:" +msgstr "" + +#: library/functions.rst:1932 +#, fuzzy +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 " +"using ``zip(*[iter(s)]*n, strict=True)``. This repeats the *same* iterator " +"``n`` times so that each output tuple has the result of ``n`` calls to the " +"iterator. This has the effect of dividing the input into n-length chunks." +msgstr "" +"Il est garanti que les itérables soient évalués de gauche à droite. Cela " +"rend possible de grouper une séquence de données en groupes de taille *n* " +"via ``zip(*[iter(s)]*n, strict=True)``. Cela duplique le *même* itérateur " +"``n`` fois ; par conséquent le *n*-uplet obtenu contient le résultat de " +"``n`` appels à l'itérateur. Cela a pour effet de diviser la séquence en " +"morceaux de taille *n*." + +#: library/functions.rst:1938 +msgid "" +":func:`zip` in conjunction with the ``*`` operator can be used to unzip a " +"list::" +msgstr "" +":func:`zip` peut être utilisée conjointement avec l'opérateur ``*`` pour " +"dézipper une liste ::" + +#: library/functions.rst:1949 +#, fuzzy +msgid "Added the ``strict`` argument." +msgstr "ajout de l'argument ``strict``." + +#: library/functions.rst:1961 +msgid "" +"This is an advanced function that is not needed in everyday Python " +"programming, unlike :func:`importlib.import_module`." +msgstr "" +"C'est une fonction avancée qui n'est pas fréquemment nécessaire, " +"contrairement à :func:`importlib.import_module`." + +#: library/functions.rst:1964 +msgid "" +"This function is invoked by the :keyword:`import` statement. It can be " +"replaced (by importing the :mod:`builtins` module and assigning to " +"``builtins.__import__``) in order to change semantics of the :keyword:`!" +"import` statement, but doing so is **strongly** discouraged as it is usually " +"simpler to use import hooks (see :pep:`302`) to attain the same goals and " +"does not cause issues with code which assumes the default import " +"implementation is in use. Direct use of :func:`__import__` is also " +"discouraged in favor of :func:`importlib.import_module`." +msgstr "" +"Cette fonction est invoquée via l'instruction :keyword:`import`. Elle peut " +"être remplacée (en important le module :mod:`builtins` et en y remplaçant " +"``builtins.__import__``) afin de changer la sémantique de l'instruction :" +"keyword:`!import`, mais c'est extrêmement déconseillé, car il est plus " +"simple d'utiliser des points d'entrée pour les importations (*import hooks*, " +"voir la :pep:`302`) pour le même résultat sans perturber du code s'attendant " +"à 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:1973 +#, fuzzy +msgid "" +"The function imports the module *name*, potentially using the given " +"*globals* and *locals* to determine how to interpret the name in a package " +"context. The *fromlist* gives the names of objects or submodules that should " +"be imported from the module given by *name*. The standard implementation " +"does not use its *locals* argument at all and uses its *globals* only to " +"determine the package context of the :keyword:`import` statement." +msgstr "" +"La fonction importe le module *name*, utilisant potentiellement *globals* et " +"*locals* pour déterminer comment interpréter le nom dans le contexte d'un " +"paquet. *fromlist* donne le nom des objets ou sous-modules qui devraient " +"être importés du module *name*. L'implémentation standard n'utilise pas " +"l'argument *locals* et n'utilise *globals* que pour déterminer le contexte " +"du paquet de l'instruction :keyword:`import`." + +#: library/functions.rst:1980 +msgid "" +"*level* specifies whether to use absolute or relative imports. ``0`` (the " +"default) means only perform absolute imports. Positive values for *level* " +"indicate the number of parent directories to search relative to the " +"directory of the module calling :func:`__import__` (see :pep:`328` for the " +"details)." +msgstr "" +"*level* permet de choisir entre importation absolue ou relative. ``0`` (par " +"défaut) force à effectuer uniquement des importations absolues. Une valeur " +"positive indique le nombre de dossiers parents relativement au dossier du " +"module appelant :func:`__import__` (voir la :pep:`328`)." + +#: library/functions.rst:1986 +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 " +"module named by *name*. However, when a non-empty *fromlist* argument is " +"given, the module named by *name* is returned." +msgstr "" +"Lorsque la variable *name* est de la forme ``package.module``, normalement, " +"le paquet de plus haut niveau (le nom jusqu'au premier point) est renvoyé, " +"et *pas* le module nommé par *name*. Cependant, lorsqu'un argument " +"*fromlist* est fourni, le module nommé par *name* est renvoyé." + +#: library/functions.rst:1991 +msgid "" +"For example, the statement ``import spam`` results in bytecode resembling " +"the following code::" +msgstr "" +"Par exemple, l'instruction ``import spam`` renvoie un code intermédiaire " +"(*bytecode* en anglais) ressemblant au code suivant ::" + +#: library/functions.rst:1996 +msgid "The statement ``import spam.ham`` results in this call::" +msgstr "L'instruction ``import spam.ham`` appelle ::" + +#: library/functions.rst:2000 +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." +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:2003 +msgid "" +"On the other hand, the statement ``from spam.ham import eggs, sausage as " +"saus`` results in ::" +msgstr "" +"En revanche, l'instruction ``from spam.ham import eggs, sausage as saus`` " +"donne ::" + +#: library/functions.rst:2010 +msgid "" +"Here, the ``spam.ham`` module is returned from :func:`__import__`. From " +"this object, the names to import are retrieved and assigned to their " +"respective names." +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:2014 +msgid "" +"If you simply want to import a module (potentially within a package) by " +"name, use :func:`importlib.import_module`." +msgstr "" +"Si vous voulez simplement importer un module (potentiellement dans un " +"paquet) par son nom, utilisez :func:`importlib.import_module`." + +#: library/functions.rst:2017 +msgid "" +"Negative values for *level* are no longer supported (which also changes the " +"default value to 0)." +msgstr "" +"les valeurs négatives pour *level* ne sont plus prises en charge (et sa " +"valeur par défaut est 0)." + +#: library/functions.rst:2021 +msgid "" +"When the command line options :option:`-E` or :option:`-I` are being used, " +"the environment variable :envvar:`PYTHONCASEOK` is now ignored." +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:2026 +msgid "Footnotes" +msgstr "Notes" + +#: library/functions.rst:2027 +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 " +"mode to convert Windows or Mac-style newlines." +msgstr "" +"Notez que l'analyseur n'accepte que des fin de lignes de style Unix. Si vous " +"lisez le code depuis un fichier, assurez-vous d'utiliser la conversion de " +"retours à la ligne pour convertir les fin de lignes Windows et Mac." + +#~ 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." + +#~ 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 " +#~ "stops when the shortest input iterable is exhausted. With a single " +#~ "iterable argument, it returns an iterator of 1-tuples. With no " +#~ "arguments, it returns an empty iterator. Equivalent to::" +#~ msgstr "" +#~ "Renvoie un itérateur de *n*-uplets, où le *i*\\ :sup:`e` *n*-uplet " +#~ "contient le *i*\\ :sup:`e` élément de chacune des séquences ou itérables " +#~ "fournis. L'itérateur s'arrête lorsque le plus petit itérable fourni est " +#~ "épuisé. Avec 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 à ::" + +#~ 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 values are important, use :func:`itertools.zip_longest` instead." +#~ msgstr "" +#~ ":func:`zip` ne doit être utilisée avec des itérables de longueurs " +#~ "différentes que lorsque les dernières données des itérables les plus " +#~ "longs peuvent être ignorées. Si ces valeurs sont importantes, utilisez " +#~ "plutôt :func:`itertools.zip_longest`." + +#~ msgid "" +#~ "The optional argument *flags* also controls whether the compiled source " +#~ "is allowed to contain top-level ``await``, ``async for`` and ``async " +#~ "with``. When the bit ``ast.PyCF_ALLOW_TOP_LEVEL_AWAIT`` is set, the " +#~ "return code object has ``CO_COROUTINE`` set in ``co_code``, and can be " +#~ "interactively executed via ``await eval(code_object)``." +#~ msgstr "" +#~ "L'argument optionnel *flags* contrôle également si la source compilée est " +#~ "autorisée à contenir des ``await``, des ``async for`` et des ``async " +#~ "with`` de haut niveau. Lorsque le bit ``ast.PyCF_ALLOW_TOP_LEVEL_AWAIT`` " +#~ "est activé, l'objet code renvoyé a ``CO_COROUTINE`` activé dans " +#~ "``co_code``, et peut être exécuté de manière interactive via ``await " +#~ "eval(code_object)``." + +#~ msgid "For more information on class methods, see :ref:`types`." +#~ msgstr "" +#~ "Pour plus d'informations sur les méthodes de classe, consultez :ref:" +#~ "`types`." diff --git a/library/functools.po b/library/functools.po new file mode 100644 index 0000000000..b9be2a7398 --- /dev/null +++ b/library/functools.po @@ -0,0 +1,810 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-22 22:57+0100\n" +"PO-Revision-Date: 2022-10-18 15:58+0200\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" + +#: library/functools.rst:2 +msgid "" +":mod:`functools` --- Higher-order functions and operations on callable " +"objects" +msgstr "" +":mod:`functools` — Fonctions d'ordre supérieur et opérations sur des objets " +"appelables" + +#: library/functools.rst:14 +msgid "**Source code:** :source:`Lib/functools.py`" +msgstr "**Code source :** :source:`Lib/functools.py`" + +#: library/functools.rst:23 +msgid "" +"The :mod:`functools` module is for higher-order functions: functions that " +"act on or return other functions. In general, any callable object can be " +"treated as a function for the purposes of this module." +msgstr "" +"Le module :mod:`functools` concerne les fonctions d'ordre supérieur : des " +"fonctions qui agissent sur, ou renvoient, d'autres fonctions. En général, " +"tout objet appelable peut être considéré comme une fonction dans la " +"description de ce module." + +#: library/functools.rst:27 +msgid "The :mod:`functools` module defines the following functions:" +msgstr "Le module :mod:`functools` définit les fonctions suivantes :" + +#: library/functools.rst:31 +msgid "" +"Simple lightweight unbounded function cache. Sometimes called `\"memoize\" " +"`_." +msgstr "" +"Fonction de cache très simple et sans limite de taille. Cette technique est " +"parfois appelée `« mémoïsation » `_." + +#: library/functools.rst:34 +msgid "" +"Returns the same as ``lru_cache(maxsize=None)``, creating a thin wrapper " +"around a dictionary lookup for the function arguments. Because it never " +"needs to evict old values, this is smaller and faster than :func:" +"`lru_cache()` with a size limit." +msgstr "" +"Identique à ``lru_cache(maxsize=None)``. Crée une surcouche légère avec une " +"recherche dans un dictionnaire indexé par les arguments de la fonction. " +"Comme elle ne nettoie jamais les anciennes entrées, elle est plus simple et " +"plus rapide que :func:`lru_cache()` avec une limite." + +#: library/functools.rst:264 +msgid "For example::" +msgstr "Par exemple ::" + +#: library/functools.rst:57 +msgid "" +"Transform a method of a class into a property whose value is computed once " +"and then cached as a normal attribute for the life of the instance. Similar " +"to :func:`property`, with the addition of caching. Useful for expensive " +"computed properties of instances that are otherwise effectively immutable." +msgstr "" + +#: library/functools.rst:127 library/functools.rst:356 +msgid "Example::" +msgstr "Exemple ::" + +#: library/functools.rst:73 +msgid "" +"The mechanics of :func:`cached_property` are somewhat different from :func:" +"`property`. A regular property blocks attribute writes unless a setter is " +"defined. In contrast, a *cached_property* allows writes." +msgstr "" + +#: library/functools.rst:77 +msgid "" +"The *cached_property* decorator only runs on lookups and only when an " +"attribute of the same name doesn't exist. When it does run, the " +"*cached_property* writes to the attribute with the same name. Subsequent " +"attribute reads and writes take precedence over the *cached_property* method " +"and it works like a normal attribute." +msgstr "" + +#: library/functools.rst:83 +msgid "" +"The cached value can be cleared by deleting the attribute. This allows the " +"*cached_property* method to run again." +msgstr "" + +#: library/functools.rst:86 +msgid "" +"Note, this decorator interferes with the operation of :pep:`412` key-sharing " +"dictionaries. This means that instance dictionaries can take more space " +"than usual." +msgstr "" + +#: library/functools.rst:90 +msgid "" +"Also, this decorator requires that the ``__dict__`` attribute on each " +"instance be a mutable mapping. This means it will not work with some types, " +"such as metaclasses (since the ``__dict__`` attributes on type instances are " +"read-only proxies for the class namespace), and those that specify " +"``__slots__`` without including ``__dict__`` as one of the defined slots (as " +"such classes don't provide a ``__dict__`` attribute at all)." +msgstr "" + +#: library/functools.rst:97 +msgid "" +"If a mutable mapping is not available or if space-efficient key sharing is " +"desired, an effect similar to :func:`cached_property` can be achieved by a " +"stacking :func:`property` on top of :func:`cache`::" +msgstr "" + +#: library/functools.rst:115 +msgid "" +"Transform an old-style comparison function to a :term:`key function`. Used " +"with tools that accept key functions (such as :func:`sorted`, :func:`min`, :" +"func:`max`, :func:`heapq.nlargest`, :func:`heapq.nsmallest`, :func:" +"`itertools.groupby`). This function is primarily used as a transition tool " +"for programs being converted from Python 2 which supported the use of " +"comparison functions." +msgstr "" +"Transforme une fonction de comparaison à l'ancienne en une :term:`fonction " +"clé`. Utilisé avec des outils qui acceptent des fonctions clef (comme :func:" +"`sorted`, :func:`min`, :func:`max`, :func:`heapq.nlargest`, :func:`heapq." +"nsmallest`, :func:`itertools.groupby`). Cette fonction est destinée au " +"portage de fonctions python 2 utilisant des fonctions de comparaison vers " +"Python 3." + +#: library/functools.rst:122 +#, fuzzy +msgid "" +"A comparison function is any callable that accepts two arguments, compares " +"them, and returns a negative number for less-than, zero for equality, or a " +"positive number for greater-than. A key function is a callable that accepts " +"one argument and returns another value to be used as the sort key." +msgstr "" +"Une fonction de comparaison est un appelable qui prend deux arguments, les " +"compare, et renvoie un nombre négatif pour l'infériorité, zéro pour " +"l'égalité ou un nombre positif pour la supériorité. Une fonction de clé est " +"un appelable qui prend un argument et retourne une autre valeur qui sera " +"utilisée comme clé de tri." + +#: library/functools.rst:131 +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/functools.rst:139 +msgid "" +"Decorator to wrap a function with a memoizing callable that saves up to the " +"*maxsize* most recent calls. It can save time when an expensive or I/O " +"bound function is periodically called with the same arguments." +msgstr "" +"Décorateur qui englobe une fonction avec un appelable mémoïsant qui " +"enregistre jusqu'à *maxsize* appels récents. Cela peut gagner du temps quand " +"une fonction coûteuse en ressources est souvent appelée avec les mêmes " +"arguments." + +#: library/functools.rst:143 +#, fuzzy +msgid "" +"Since a dictionary is used to cache results, the positional and keyword " +"arguments to the function must be :term:`hashable`." +msgstr "" +"Comme un dictionnaire est utilisé pour mettre en cache les résultats, les " +"arguments positionnels et nommés de la fonction doivent être hachables." + +#: library/functools.rst:146 +msgid "" +"Distinct argument patterns may be considered to be distinct calls with " +"separate cache entries. For example, `f(a=1, b=2)` and `f(b=2, a=1)` differ " +"in their keyword argument order and may have two separate cache entries." +msgstr "" +"Des agencements différents des arguments peuvent être considérés comme des " +"appels différents avec chacun leur propre entrée dans le cache. Par exemple, " +"``f(a=1, b=2)`` et ``f(b=2, a=1)`` n'ont pas leurs arguments dans le même " +"ordre et peuvent donc avoir des entrées distinctes dans le cache." + +#: library/functools.rst:151 +msgid "" +"If *user_function* is specified, it must be a callable. This allows the " +"*lru_cache* decorator to be applied directly to a user function, leaving the " +"*maxsize* at its default value of 128::" +msgstr "" +"Si *user_function* est défini, ce doit être un appelable. Ceci permet à " +"*lru_cache* d'être appliqué directement sur une fonction de l'utilisateur, " +"sans préciser *maxsize* (qui est alors défini à sa valeur par défaut, 128) ::" + +#: library/functools.rst:159 +msgid "" +"If *maxsize* is set to ``None``, the LRU feature is disabled and the cache " +"can grow without bound." +msgstr "" +"Si *maxsize* est à ``None``, la fonctionnalité LRU est désactivée et le " +"cache peut grossir sans limite." + +#: library/functools.rst:162 +#, fuzzy +msgid "" +"If *typed* is set to true, function arguments of different types will be " +"cached separately. If *typed* is false, the implementation will usually " +"regard them as equivalent calls and only cache a single result. (Some types " +"such as *str* and *int* may be cached separately even when *typed* is false.)" +msgstr "" +"Si *typed* est vrai, les arguments de différents types seront mis en cache " +"séparément. Par exemple, ``f(3)`` et ``f(3.0)`` seront considérés comme des " +"appels distincts avec des résultats distincts." + +#: library/functools.rst:168 +msgid "" +"Note, type specificity applies only to the function's immediate arguments " +"rather than their contents. The scalar arguments, ``Decimal(42)`` and " +"``Fraction(42)`` are be treated as distinct calls with distinct results. In " +"contrast, the tuple arguments ``('answer', Decimal(42))`` and ``('answer', " +"Fraction(42))`` are treated as equivalent." +msgstr "" + +#: library/functools.rst:174 +msgid "" +"The wrapped function is instrumented with a :func:`cache_parameters` " +"function that returns a new :class:`dict` showing the values for *maxsize* " +"and *typed*. This is for information purposes only. Mutating the values " +"has no effect." +msgstr "" +"La fonction encapsulée est initialisée par la fonction :func:" +"`cache_parameters` qui renvoie un :class:`dict` contenant les valeurs de " +"*maxsize* et de *typed*. Cela ne sert qu'au débogage, changer ces valeurs " +"n'a pas d'incidence." + +#: library/functools.rst:179 +#, fuzzy +msgid "" +"To help measure the effectiveness of the cache and tune the *maxsize* " +"parameter, the wrapped function is instrumented with a :func:`cache_info` " +"function that returns a :term:`named tuple` showing *hits*, *misses*, " +"*maxsize* and *currsize*." +msgstr "" +"Pour aider à mesurer l'efficacité du cache et ajuster le paramètre " +"*maxsize*, la fonction englobée est surveillée avec une fonction :func:" +"`cache_info` qui renvoie un :term:`named tuple` affichant les *hits*, " +"*misses*, *maxsize* et *currsize*. Dans un environnement *multithread*, les " +"succès et échecs d'appel du cache sont approximatifs." + +#: library/functools.rst:184 +msgid "" +"The decorator also provides a :func:`cache_clear` function for clearing or " +"invalidating the cache." +msgstr "" +"Le décorateur fournit également une fonction :func:`cache_clear` pour vider " +"ou invalider le cache." + +#: library/functools.rst:187 +msgid "" +"The original underlying function is accessible through the :attr:" +"`__wrapped__` attribute. This is useful for introspection, for bypassing " +"the cache, or for rewrapping the function with a different cache." +msgstr "" +"La fonction sous-jacente originale est accessible à travers l'attribut :attr:" +"`__wrapped__`. Ceci est utile pour l'introspection, pour outrepasser le " +"cache, ou pour ré-englober la fonction avec un cache différent." + +#: library/functools.rst:191 +msgid "" +"The cache keeps references to the arguments and return values until they age " +"out of the cache or until the cache is cleared." +msgstr "" + +#: library/functools.rst:194 +msgid "" +"An `LRU (least recently used) cache `_ works best when the " +"most recent calls are the best predictors of upcoming calls (for example, " +"the most popular articles on a news server tend to change each day). The " +"cache's size limit assures that the cache does not grow without bound on " +"long-running processes such as web servers." +msgstr "" +"Un `cache LRU (*least recently used*) `_ " +"fonctionne de manière optimale lorsque les appels récents sont les prochains " +"appels les plus probables (par exemple, les articles les plus lus d'un " +"serveur d'actualités ont tendance à ne changer que d'un jour à l'autre). La " +"taille limite du cache permet de s'assurer que le cache ne grossisse pas " +"sans limite dans les processus à longue durée de vie comme les serveurs Web." + +#: library/functools.rst:201 +msgid "" +"In general, the LRU cache should only be used when you want to reuse " +"previously computed values. Accordingly, it doesn't make sense to cache " +"functions with side-effects, functions that need to create distinct mutable " +"objects on each call, or impure functions such as time() or random()." +msgstr "" +"En général, le cache LRU ne doit être utilisé que quand vous voulez ré-" +"utiliser les valeurs déjà calculées. Ainsi, cela n'a pas de sens de mettre " +"un cache sur une fonction qui a des effets de bord, qui doit créer un objet " +"mutable distinct à chaque appel ou des fonctions *impures* telles que ``!" +"time()`` ou ``!random()``." + +#: library/functools.rst:206 +msgid "Example of an LRU cache for static web content::" +msgstr "Exemple d'un cache LRU pour du contenu web statique ::" + +#: library/functools.rst:225 +msgid "" +"Example of efficiently computing `Fibonacci numbers `_ using a cache to implement a `dynamic " +"programming `_ technique::" +msgstr "" +"Exemple de calcul efficace de `la suite de Fibonacci `_ en utilisant un cache pour implémenter la " +"technique de `programmation dynamique `_ ::" + +#: library/functools.rst:245 +msgid "Added the *typed* option." +msgstr "L'option *typed* a été ajoutée." + +#: library/functools.rst:248 +msgid "Added the *user_function* option." +msgstr "Ajout de l'option *user_function*." + +#: library/functools.rst:251 +msgid "Added the function :func:`cache_parameters`" +msgstr "Ajout de la fonction :func:`cache_parameters`" + +#: library/functools.rst:256 +msgid "" +"Given a class defining one or more rich comparison ordering methods, this " +"class decorator supplies the rest. This simplifies the effort involved in " +"specifying all of the possible rich comparison operations:" +msgstr "" +"A partir d'une classe définissant une ou plusieurs méthodes de comparaison " +"riches, ce décorateur de classe fournit le reste. Ceci simplifie l'effort à " +"fournir dans la spécification de toutes les opérations de comparaison riche :" + +#: library/functools.rst:260 +msgid "" +"The class must define one of :meth:`__lt__`, :meth:`__le__`, :meth:`__gt__`, " +"or :meth:`__ge__`. In addition, the class should supply an :meth:`__eq__` " +"method." +msgstr "" +"La classe doit définir au moins une de ces méthodes :meth:`__lt__`, :meth:" +"`__le__`, :meth:`__gt__`, or :meth:`__ge__`. De plus, la classe doit fournir " +"une méthode :meth:`__eq__`." + +#: library/functools.rst:284 +msgid "" +"While this decorator makes it easy to create well behaved totally ordered " +"types, it *does* come at the cost of slower execution and more complex stack " +"traces for the derived comparison methods. If performance benchmarking " +"indicates this is a bottleneck for a given application, implementing all six " +"rich comparison methods instead is likely to provide an easy speed boost." +msgstr "" +"Même si ce décorateur permet de créer des types ordonnables facilement, cela " +"vient avec un *coût* d'exécution et des traces d'exécution complexes pour " +"les méthodes de comparaison dérivées. Si des tests de performances le " +"révèlent comme un goulot d'étranglement, l'implémentation manuelle des six " +"méthodes de comparaison riches résoudra normalement vos problèmes de " +"rapidité." + +#: library/functools.rst:293 +msgid "" +"This decorator makes no attempt to override methods that have been declared " +"in the class *or its superclasses*. Meaning that if a superclass defines a " +"comparison operator, *total_ordering* will not implement it again, even if " +"the original method is abstract." +msgstr "" + +#: library/functools.rst:300 +msgid "" +"Returning NotImplemented from the underlying comparison function for " +"unrecognised types is now supported." +msgstr "" +"Retourner NotImplemented dans les fonction de comparaison sous-jacentes pour " +"les types non reconnus est maintenant supporté." + +#: library/functools.rst:306 +msgid "" +"Return a new :ref:`partial object` which when called will " +"behave like *func* called with the positional arguments *args* and keyword " +"arguments *keywords*. If more arguments are supplied to the call, they are " +"appended to *args*. If additional keyword arguments are supplied, they " +"extend and override *keywords*. Roughly equivalent to::" +msgstr "" +"Retourne un nouvel :ref:`objet partiel ` qui, quand il est " +"appelé, fonctionne comme *func* appelée avec les arguments positionnels " +"*args* et les arguments nommés *keywords*. Si plus d'arguments sont fournis " +"à l'appel, ils sont ajoutés à *args*. Si plus d'arguments nommés sont " +"fournis, ils étendent et surchargent *keywords*. À peu près équivalent à ::" + +#: library/functools.rst:322 +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:" +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 " +"nouvel objet avec une signature simplifiée. Par exemple, :func:`partial` " +"peut être utilisé pour créer un appelable qui se comporte comme la fonction :" +"func:`int` ou l'argument *base* est deux par défaut :" + +#: library/functools.rst:337 +msgid "" +"Return a new :class:`partialmethod` descriptor which behaves like :class:" +"`partial` except that it is designed to be used as a method definition " +"rather than being directly callable." +msgstr "" +"Retourne un nouveau descripteur :class:`partialmethod` qui se comporte " +"comme :class:`partial` sauf qu'il est fait pour être utilisé comme une " +"définition de méthode plutôt que d'être appelé directement." + +#: library/functools.rst:341 +msgid "" +"*func* must be a :term:`descriptor` or a callable (objects which are both, " +"like normal functions, are handled as descriptors)." +msgstr "" +"*func* doit être un :term:`descriptor` ou un appelable (les objets qui sont " +"les deux, comme les fonction normales, sont gérés comme des descripteurs)." + +#: library/functools.rst:344 +msgid "" +"When *func* is a descriptor (such as a normal Python function, :func:" +"`classmethod`, :func:`staticmethod`, :func:`abstractmethod` or another " +"instance of :class:`partialmethod`), calls to ``__get__`` are delegated to " +"the underlying descriptor, and an appropriate :ref:`partial object` returned as the result." +msgstr "" +"Quand *func* est un descripteur (comme une fonction Python normale, :func:" +"`classmethod`, :func:`staticmethod`, :func:`abstractmethod` ou une autre " +"instance de :class:`partialmethod`), les appels à ``__get__`` sont délégués " +"au descripteur sous-jacent, et un :ref:`objet partiel ` " +"approprié est renvoyé comme résultat." + +#: library/functools.rst:350 +msgid "" +"When *func* is a non-descriptor callable, an appropriate bound method is " +"created dynamically. This behaves like a normal Python function when used as " +"a method: the *self* argument will be inserted as the first positional " +"argument, even before the *args* and *keywords* supplied to the :class:" +"`partialmethod` constructor." +msgstr "" +"Quand *func* est un appelable non-descripteur, une méthode liée appropriée " +"est crée dynamiquement. Elle se comporte comme une fonction Python normale " +"quand elle est utilisée comme méthode : l'argument *self* sera inséré comme " +"premier argument positionnel, avant les *args* et *keywords* fournis au " +"constructeur :class:`partialmethod`." + +#: library/functools.rst:381 +msgid "" +"Apply *function* of two arguments cumulatively to the items of *iterable*, " +"from left to right, so as to reduce the iterable to a single value. For " +"example, ``reduce(lambda x, y: x+y, [1, 2, 3, 4, 5])`` calculates " +"``((((1+2)+3)+4)+5)``. The left argument, *x*, is the accumulated value and " +"the right argument, *y*, is the update value from the *iterable*. If the " +"optional *initializer* is present, it is placed before the items of the " +"iterable in the calculation, and serves as a default when the iterable is " +"empty. If *initializer* is not given and *iterable* contains only one item, " +"the first item is returned." +msgstr "" +"Applique *function* avec deux arguments cumulativement aux éléments de " +"*iterable*, de gauche à droite, pour réduire la séquence à une valeur " +"unique. Par exemple, ``reduce(lambda x, y: x+y, [1, 2, 3, 4, 5])`` calcule " +"``((((1+2)+3)+4)+5)``. L'argument de gauche, *x*, est la valeur de cumul et " +"celui de droite, *y*, est la valeur mise à jour depuis *iterable*. Si " +"l'argument optionnel *initializer* est présent, il est placé avant les " +"éléments de la séquence dans le calcul, et sert de valeur par défaut quand " +"la séquence est vide. Si *initializer* n'est pas renseigné et que *iterable* " +"ne contient qu'un élément, le premier élément est renvoyé." + +#: library/functools.rst:390 +msgid "Roughly equivalent to::" +msgstr "À peu près équivalent à ::" + +#: library/functools.rst:402 +msgid "" +"See :func:`itertools.accumulate` for an iterator that yields all " +"intermediate values." +msgstr "" +"Voir :func:`itertools.accumulate` pour un itérateur qui génère toutes les " +"valeurs intermédiaires." + +#: library/functools.rst:407 +msgid "" +"Transform a function into a :term:`single-dispatch ` :term:" +"`generic function`." +msgstr "" +"Transforme une fonction en une :term:`fonction générique ` :term:`single-dispatch `." + +#: library/functools.rst:410 +#, fuzzy +msgid "" +"To define a generic function, decorate it with the ``@singledispatch`` " +"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:421 +#, fuzzy +msgid "" +"To add overloaded implementations to the function, use the :func:`register` " +"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. " +"Pour les fonctions annotées avec des types, le décorateur infère le type du " +"premier argument automatiquement ::" + +#: library/functools.rst:439 +msgid "" +"For code which doesn't use type annotations, the appropriate type argument " +"can be passed explicitly to the decorator itself::" +msgstr "" +"Pour le code qui n’utilise pas les indications de type, le type souhaité " +"peut être passé explicitement en argument au décorateur ::" + +#: library/functools.rst:450 +#, fuzzy +msgid "" +"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:458 +#, fuzzy +msgid "" +"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 " +"unitaires pour chaque variante indépendamment ::" + +#: library/functools.rst:472 +msgid "" +"When called, the generic function dispatches on the type of the first " +"argument::" +msgstr "" +"Quand elle est appelée, la fonction générique distribue sur le type du " +"premier argument ::" + +#: library/functools.rst:492 +#, 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 :" +"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 " +"plus générique. La fonction originale est décorée avec ``@singledispatch`` " +"est enregistrée pour le type d'``object``, et elle sera utilisée si aucune " +"implémentation n'est trouvée." + +#: library/functools.rst:498 +msgid "" +"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:513 +#, fuzzy +msgid "" +"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:521 +msgid "" +"To access all registered implementations, use the read-only ``registry`` " +"attribute::" +msgstr "" +"Pour accéder à toutes les implémentations enregistrées, utiliser l'attribut " +"en lecture seule ``registry`` ::" + +#: library/functools.rst:535 +#, 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:541 +msgid "" +"Transform a method into a :term:`single-dispatch ` :term:" +"`generic function`." +msgstr "" +"Transforme une méthode en une :term:`fonction générique ` :" +"term:`single-dispatch `." + +#: library/functools.rst:544 +#, fuzzy +msgid "" +"To define a generic method, decorate it with the ``@singledispatchmethod`` " +"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:562 +msgid "" +"``@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:584 +msgid "" +"The same pattern can be used for other similar decorators: :func:" +"`@staticmethod`, :func:`@abstractmethod`, " +"and others." +msgstr "" + +#: library/functools.rst:593 +msgid "" +"Update a *wrapper* function to look like the *wrapped* function. The " +"optional arguments are tuples to specify which attributes of the original " +"function are assigned directly to the matching attributes on the wrapper " +"function and which attributes of the wrapper function are updated with the " +"corresponding attributes from the original function. The default values for " +"these arguments are the module level constants ``WRAPPER_ASSIGNMENTS`` " +"(which assigns to the wrapper function's ``__module__``, ``__name__``, " +"``__qualname__``, ``__annotations__`` and ``__doc__``, the documentation " +"string) and ``WRAPPER_UPDATES`` (which updates the wrapper function's " +"``__dict__``, i.e. the instance dictionary)." +msgstr "" +"Met à jour la fonction *wrapper* pour ressembler à la fonction *wrapped*. " +"Les arguments optionnels sont des *n*-uplets pour spécifier quels attributs " +"de la fonction originale sont assignés directement aux attributs " +"correspondants sur la fonction englobante et quels attributs de la fonction " +"englobante sont mis à jour avec les attributs de la fonction originale. Les " +"valeurs par défaut de ces arguments sont les constantes au niveau du module " +"``WRAPPER_ASSIGNMENTS`` (qui assigne ``__module__``, ``__name__``, " +"``__qualname__``, ``__annotations__`` et ``__doc__``, la chaîne de " +"documentation, depuis la fonction englobante) et ``WRAPPER_UPDATES`` (qui " +"met à jour le ``__dict__`` de la fonction englobante, c'est-à-dire le " +"dictionnaire de l'instance)." + +#: library/functools.rst:603 +msgid "" +"To allow access to the original function for introspection and other " +"purposes (e.g. bypassing a caching decorator such as :func:`lru_cache`), " +"this function automatically adds a ``__wrapped__`` attribute to the wrapper " +"that refers to the function being wrapped." +msgstr "" +"Pour autoriser l'accès à la fonction originale pour l'introspection ou à " +"d'autres fins (par ex. outrepasser l'accès à un décorateur de cache comme :" +"func:`lru_cache`), cette fonction ajoute automatiquement un attribut " +"``__wrapped__`` qui référence la fonction englobée." + +#: library/functools.rst:608 +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 " +"function is not updated, the metadata of the returned function will reflect " +"the wrapper definition rather than the original function definition, which " +"is typically less than helpful." +msgstr "" +"La principale utilisation de cette fonction est dans les :term:`décorateurs " +"` qui renvoient une nouvelle fonction. Si la fonction crée n'est " +"pas mise à jour, ses métadonnées refléteront sa définition dans le " +"décorateur, au lieu de la définition originale, métadonnées souvent bien " +"moins utiles." + +#: library/functools.rst:614 +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 " +"being wrapped are ignored (i.e. this function will not attempt to set them " +"on the wrapper function). :exc:`AttributeError` is still raised if the " +"wrapper function itself is missing any attributes named in *updated*." +msgstr "" +":func:`update_wrapper` peut être utilisé avec des appelables autres que des " +"fonctions. Tout attribut défini dans *assigned* ou *updated* qui ne sont pas " +"l'objet englobé sont ignorés (cette fonction n'essaiera pas de les définir " +"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:620 +msgid "Automatic addition of the ``__wrapped__`` attribute." +msgstr "Ajout automatique de l'attribut ``__wrapped__``." + +#: library/functools.rst:623 +msgid "Copying of the ``__annotations__`` attribute by default." +msgstr "Copie de l'attribut ``__annotations__`` par défaut." + +#: library/functools.rst:626 +msgid "Missing attributes no longer trigger an :exc:`AttributeError`." +msgstr "" +"Les attributs manquants ne lèvent plus d'exception :exc:`AttributeError`." + +#: library/functools.rst:629 +msgid "" +"The ``__wrapped__`` attribute now always refers to the wrapped function, " +"even if that function defined a ``__wrapped__`` attribute. (see :issue:" +"`17482`)" +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:637 +msgid "" +"This is a convenience function for invoking :func:`update_wrapper` as a " +"function decorator when defining a wrapper function. It is equivalent to " +"``partial(update_wrapper, wrapped=wrapped, assigned=assigned, " +"updated=updated)``. For example::" +msgstr "" +"Ceci est une fonction d'aide pour appeler :func:`update_wrapper` comme " +"décorateur de fonction lors de la définition d'une fonction englobante. " +"C'est équivalent à ``partial(update_wrapper, wrapped=wrapped, " +"assigned=assigned, updated=updated)``. Par exemple ::" + +#: library/functools.rst:663 +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:" +"`example` would have been lost." +msgstr "" +"Sans l'utilisation de cette usine à décorateur, le nom de la fonction " +"d'exemple aurait été ``'wrapper'``, et la chaîne de documentation de la " +"fonction :func:`example` originale aurait été perdue." + +#: library/functools.rst:671 +msgid ":class:`partial` Objects" +msgstr "Objets :class:`partial`" + +#: library/functools.rst:673 +msgid "" +":class:`partial` objects are callable objects created by :func:`partial`. " +"They have three read-only attributes:" +msgstr "" +"Les objets :class:`partial` sont des objets appelables créés par :func:" +"`partial`. Ils ont trois attributs en lecture seule :" + +#: library/functools.rst:679 +msgid "" +"A callable object or function. Calls to the :class:`partial` object will be " +"forwarded to :attr:`func` with new arguments and keywords." +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:685 +msgid "" +"The leftmost positional arguments that will be prepended to the positional " +"arguments provided to a :class:`partial` object call." +msgstr "" +"Les arguments positionnels qui seront ajoutés avant les arguments fournis " +"lors de l'appel d'un objet :class:`partial`." + +#: library/functools.rst:691 +msgid "" +"The keyword arguments that will be supplied when the :class:`partial` object " +"is called." +msgstr "" +"Les arguments nommés qui seront fournis quand l'objet :class:`partial` est " +"appelé." + +#: library/functools.rst:694 +msgid "" +":class:`partial` objects are like :class:`function` objects in that they are " +"callable, weak referencable, and can have attributes. There are some " +"important differences. For instance, the :attr:`~definition.__name__` and :" +"attr:`__doc__` attributes are not created automatically. Also, :class:" +"`partial` objects defined in classes behave like static methods and do not " +"transform into bound methods during instance attribute look-up." +msgstr "" +"Les objets :class:`partial` sont comme des objets :class:`function` de par " +"le fait qu'il sont appelables, référençables, et peuvent avoir des " +"attributs. Il y a cependant des différences importantes. Par exemple, les " +"attributs :attr:`~definition.__name__` et :attr:`__doc__` ne sont pas créés " +"automatiquement. De plus, les objets :class:`partial` définis dans les " +"classes se comportent comme des méthodes statiques et ne se transforment pas " +"en méthodes liées durant la recherche d'attributs dans l'instance." diff --git a/library/gc.po b/library/gc.po new file mode 100644 index 0000000000..84a6f0356f --- /dev/null +++ b/library/gc.po @@ -0,0 +1,512 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-09-23 16:16+0200\n" +"PO-Revision-Date: 2021-09-07 00:51+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/gc.rst:2 +msgid ":mod:`gc` --- Garbage Collector interface" +msgstr ":mod:`gc` — Interface du ramasse-miettes" + +#: library/gc.rst:12 +msgid "" +"This module provides an interface to the optional garbage collector. It " +"provides the ability to disable the collector, tune the collection " +"frequency, and set debugging options. It also provides access to " +"unreachable objects that the collector found but cannot free. Since the " +"collector supplements the reference counting already used in Python, you can " +"disable the collector if you are sure your program does not create reference " +"cycles. Automatic collection can be disabled by calling ``gc.disable()``. " +"To debug a leaking program call ``gc.set_debug(gc.DEBUG_LEAK)``. Notice that " +"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 +msgid "The :mod:`gc` module provides the following functions:" +msgstr "Le module :mod:`gc` contient les fonctions suivantes :" + +#: library/gc.rst:28 +msgid "Enable automatic garbage collection." +msgstr "Active le ramasse-miettes." + +#: library/gc.rst:33 +msgid "Disable automatic garbage collection." +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 "" +"With no arguments, run a full collection. The optional argument " +"*generation* may be an integer specifying which generation to collect (from " +"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 "" +"The free lists maintained for a number of built-in types are cleared " +"whenever a full collection or collection of the highest generation (2) is " +"run. Not all items in some free lists may be freed due to the particular " +"implementation, in particular :class:`float`." +msgstr "" + +#: library/gc.rst:56 +msgid "" +"Set the garbage collection debugging flags. Debugging information will be " +"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 "Renvoie les options de débogage actives." + +#: library/gc.rst:68 +msgid "" +"Returns a list of all objects tracked by the collector, excluding the list " +"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 "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 "" +"Return a list of three per-generation dictionaries containing collection " +"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 "" +"``uncollectable`` is the total number of objects which were found to be " +"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 "" +"The GC classifies objects into three generations depending on how many " +"collection sweeps they have survived. New objects are placed in the " +"youngest generation (generation ``0``). If an object survives a collection " +"it is moved into the next older generation. Since generation ``2`` is the " +"oldest generation, objects in that generation remain there after a " +"collection. In order to decide when to run, the collector keeps track of " +"the number object allocations and deallocations since the last collection. " +"When the number of allocations minus the number of deallocations exceeds " +"*threshold0*, collection starts. Initially only generation ``0`` is " +"examined. If generation ``0`` has been examined more than *threshold1* " +"times since generation ``1`` has been examined, then generation ``1`` is " +"examined as well. With the third generation, things are a bit more " +"complicated, see `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 "" +"Return the list of objects that directly refer to any of objs. This function " +"will only locate those containers which support garbage collection; " +"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 "" +"Note that objects which have already been dereferenced, but which live in " +"cycles and have not yet been collected by the garbage collector can be " +"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 "" +"Care must be taken when using objects returned by :func:`get_referrers` " +"because some of them could still be under construction and hence in a " +"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 "" +"Return a list of objects directly referred to by any of the arguments. The " +"referents returned are those objects visited by the arguments' C-level :c:" +"member:`~PyTypeObject.tp_traverse` methods (if any), and may not be all " +"objects actually directly reachable. :c:member:`~PyTypeObject.tp_traverse` " +"methods are supported only by objects that support garbage collection, and " +"are only required to visit objects that may be involved in a cycle. So, for " +"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 "" +"Returns ``True`` if the object is currently tracked by the garbage " +"collector, ``False`` otherwise. As a general rule, instances of atomic " +"types aren't tracked and instances of non-atomic types (containers, user-" +"defined objects...) are. However, some type-specific optimizations can be " +"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 "" +"Freeze all the objects tracked by gc - move them to a permanent generation " +"and ignore all the future collections. This can be used before a POSIX " +"fork() call to make the gc copy-on-write friendly or to speed up collection. " +"Also collection before a POSIX fork() call may free pages for future " +"allocation which can cause copy-on-write too so it's advised to disable gc " +"in parent process and freeze before fork and enable gc in child process." +msgstr "" + +#: library/gc.rst:221 +msgid "" +"Unfreeze the objects in the permanent generation, put them back into the " +"oldest generation." +msgstr "" + +#: library/gc.rst:229 +msgid "Return the number of objects in the permanent generation." +msgstr "" + +#: library/gc.rst:234 +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 "" +"A list of objects which the collector found to be unreachable but could not " +"be freed (uncollectable objects). Starting with Python 3.4, this list " +"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 "" +"If this list is non-empty at :term:`interpreter shutdown`, a :exc:" +"`ResourceWarning` is emitted, which is silent by default. If :const:" +"`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 "" +"A list of callbacks that will be invoked by the garbage collector before and " +"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 "*phase* peut prendre deux valeurs :" + +#: library/gc.rst:265 +msgid "\"start\": The garbage collection is about to start." +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 "``\"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 "Affiche des informations sur les objets détruits." + +#: library/gc.rst:309 +msgid "" +"Print information of uncollectable objects found (objects which are not " +"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 "" +"The debugging flags necessary for the collector to print information about a " +"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/getopt.po b/library/getopt.po new file mode 100644 index 0000000000..34546067ec --- /dev/null +++ b/library/getopt.po @@ -0,0 +1,212 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +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: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \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" + +#: library/getopt.rst:2 +msgid ":mod:`getopt` --- C-style parser for command line options" +msgstr "" +":mod:`getopt` – Analyseur de style C pour les options de ligne de commande" + +#: library/getopt.rst:8 +msgid "**Source code:** :source:`Lib/getopt.py`" +msgstr "**Code source :** :source:`Lib/getopt.py`" + +#: library/getopt.rst:12 +msgid "" +"The :mod:`getopt` module is a parser for command line options whose API is " +"designed to be familiar to users of the C :c:func:`getopt` function. Users " +"who are unfamiliar with the C :c:func:`getopt` function or who would like to " +"write less code and get better help and error messages should consider using " +"the :mod:`argparse` module instead." +msgstr "" +"Le module :mod:`getopt` est un analyseur pour les options de ligne de " +"commande dont l’API est conçue pour être familière aux utilisateurs de la " +"fonction C :c:func:`getopt`. Les utilisateurs qui ne connaissent pas la " +"fonction :c:func:`getopt` ou qui aimeraient écrire moins de code, obtenir " +"une meilleure aide et de meilleurs messages d’erreur devraient utiliser le " +"module :mod:`argparse`." + +#: library/getopt.rst:20 +msgid "" +"This module helps scripts to parse the command line arguments in ``sys." +"argv``. It supports the same conventions as the Unix :c:func:`getopt` " +"function (including the special meanings of arguments of the form '``-``' " +"and '``--``'). Long options similar to those supported by GNU software may " +"be used as well via an optional third argument." +msgstr "" +"Ce module aide les scripts à analyser les arguments de ligne de commande " +"contenus dans ``sys.argv``. Il prend en charge les mêmes conventions que la " +"fonction UNIX :c:func:`getopt` (y compris les significations spéciales des " +"arguments de la forme ``-`` et ``--``). De longues options similaires à " +"celles prises en charge par le logiciel GNU peuvent également être utilisées " +"via un troisième argument facultatif." + +#: library/getopt.rst:26 +msgid "This module provides two functions and an exception:" +msgstr "Ce module fournit deux fonctions et une exception :" + +#: library/getopt.rst:32 +msgid "" +"Parses command line options and parameter list. *args* is the argument list " +"to be parsed, without the leading reference to the running program. " +"Typically, this means ``sys.argv[1:]``. *shortopts* is the string of option " +"letters that the script wants to recognize, with options that require an " +"argument followed by a colon (``':'``; i.e., the same format that Unix :c:" +"func:`getopt` uses)." +msgstr "" +"Analyse les options de ligne de commande et la liste des paramètres. *args* " +"est la liste d’arguments à analyser, sans la référence principale au " +"programme en cours d’exécution. En général, cela signifie ``sys.argv[1:]`` " +"(donc que le premier argument contenant le nom du programme n’est pas dans " +"la liste). *shortopts* est la chaîne de lettres d’options que le script doit " +"reconnaître, avec des options qui requièrent un argument suivi d’un signe " +"deux-points (``:``, donc le même format que la version Unix de :c:func:" +"`getopt` utilise)." + +#: library/getopt.rst:40 +msgid "" +"Unlike GNU :c:func:`getopt`, after a non-option argument, all further " +"arguments are considered also non-options. This is similar to the way non-" +"GNU Unix systems work." +msgstr "" +"Contrairement au :c:func:`getopt` GNU, après un argument n'appartenant pas à " +"une option, aucun argument ne sera considéré comme appartenant à une option. " +"Ceci est similaire à la façon dont les systèmes UNIX non-GNU fonctionnent." + +#: library/getopt.rst:44 +msgid "" +"*longopts*, if specified, must be a list of strings with the names of the " +"long options which should be supported. The leading ``'--'`` characters " +"should not be included in the option name. Long options which require an " +"argument should be followed by an equal sign (``'='``). Optional arguments " +"are not supported. To accept only long options, *shortopts* should be an " +"empty string. Long options on the command line can be recognized so long as " +"they provide a prefix of the option name that matches exactly one of the " +"accepted options. For example, if *longopts* is ``['foo', 'frob']``, the " +"option ``--fo`` will match as ``--foo``, but ``--f`` will not match " +"uniquely, so :exc:`GetoptError` will be raised." +msgstr "" +"*longopts*, si spécifié, doit être une liste de chaînes avec les noms des " +"options longues qui doivent être prises en charge. Le premier ``'--'`` ne " +"dois pas figurer dans le nom de l’option. Les options longues qui requièrent " +"un argument doivent être suivies d’un signe égal (``'='``). Les arguments " +"facultatifs ne sont pas pris en charge. Pour accepter uniquement les options " +"longues, *shortopts* doit être une chaîne vide. Les options longues sur la " +"ligne de commande peuvent être reconnues tant qu’elles fournissent un " +"préfixe du nom de l’option qui correspond exactement à l’une des options " +"acceptées. Par exemple, si *longopts* est ``['foo', 'frob']``, l’option ``--" +"fo`` correspondra à ``--foo``, mais ``--f`` ne correspondra pas de façon " +"unique, donc :exc:`GetoptError` sera levé." + +#: library/getopt.rst:55 +msgid "" +"The return value consists of two elements: the first is a list of ``(option, " +"value)`` pairs; the second is the list of program arguments left after the " +"option list was stripped (this is a trailing slice of *args*). Each option-" +"and-value pair returned has the option as its first element, prefixed with a " +"hyphen for short options (e.g., ``'-x'``) or two hyphens for long options (e." +"g., ``'--long-option'``), and the option argument as its second element, or " +"an empty string if the option has no argument. The options occur in the " +"list in the same order in which they were found, thus allowing multiple " +"occurrences. Long and short options may be mixed." +msgstr "" +"La valeur de retour se compose de deux éléments : le premier est une liste " +"de paires ``(option, value)``, la deuxième est la liste des arguments de " +"programme laissés après que la liste d’options est été dépouillée (il s’agit " +"d’une tranche de fin de *args*). Chaque paire option-valeur retournée a " +"l’option comme premier élément, préfixée avec un trait d'union pour les " +"options courtes (par exemple, ``'-x'``) ou deux tirets pour les options " +"longues (par exemple, ``'--long-option'``), et l’argument option comme " +"deuxième élément, ou une chaîne vide si le option n’a aucun argument. Les " +"options se trouvent dans la liste dans l’ordre dans lequel elles ont été " +"trouvées, permettant ainsi plusieurs occurrences. Les options longues et " +"courtes peuvent être mélangées." + +#: library/getopt.rst:68 +msgid "" +"This function works like :func:`getopt`, except that GNU style scanning mode " +"is used by default. This means that option and non-option arguments may be " +"intermixed. The :func:`getopt` function stops processing options as soon as " +"a non-option argument is encountered." +msgstr "" +"Cette fonction fonctionne comme :func:`getopt`, sauf que le mode de *scan* " +"GNU est utilisé par défaut. Cela signifie que les arguments option et non-" +"option peuvent être **intermixés**. La fonction :func:`getopt` arrête le " +"traitement des options dès qu’un argument de non-option est rencontré." + +#: library/getopt.rst:73 +msgid "" +"If the first character of the option string is ``'+'``, or if the " +"environment variable :envvar:`POSIXLY_CORRECT` is set, then option " +"processing stops as soon as a non-option argument is encountered." +msgstr "" +"Si le premier caractère de la chaîne d’options est ``+``, ou si la variable " +"d’environnement :envvar:`POSIXLY_CORRECT` est définie, le traitement des " +"options s’arrête dès qu’un argument non-option est rencontré." + +#: library/getopt.rst:80 +msgid "" +"This is raised when an unrecognized option is found in the argument list or " +"when an option requiring an argument is given none. The argument to the " +"exception is a string indicating the cause of the error. For long options, " +"an argument given to an option which does not require one will also cause " +"this exception to be raised. The attributes :attr:`msg` and :attr:`opt` " +"give the error message and related option; if there is no specific option to " +"which the exception relates, :attr:`opt` is an empty string." +msgstr "" +"Cette exception est levée lorsqu’une option non reconnue est trouvée dans la " +"liste d’arguments ou lorsqu’une option nécessitant un argument n’en a pas " +"reçu. L’argument de l’exception est une chaîne de caractères indiquant la " +"cause de l’erreur. Pour les options longues, un argument donné à une option " +"qui n’en exige pas un entraîne également le levage de cette exception. Les " +"attributs :attr:`msg` et :attr:`opt` donnent le message d’erreur et l’option " +"connexe. S’il n’existe aucune option spécifique à laquelle l’exception se " +"rapporte, :attr:`opt` est une chaîne vide." + +#: library/getopt.rst:91 +msgid "Alias for :exc:`GetoptError`; for backward compatibility." +msgstr "Alias pour :exc:`GetoptError` ; pour la rétrocompatibilité." + +#: library/getopt.rst:93 +msgid "An example using only Unix style options:" +msgstr "Un exemple utilisant uniquement les options de style UNIX :" + +#: library/getopt.rst:105 +msgid "Using long option names is equally easy:" +msgstr "L’utilisation de noms d’options longs est tout aussi simple :" + +#: library/getopt.rst:118 +msgid "In a script, typical usage is something like this::" +msgstr "Dans un script, l’utilisation typique ressemble à ceci ::" + +#: library/getopt.rst:147 +msgid "" +"Note that an equivalent command line interface could be produced with less " +"code and more informative help and error messages by using the :mod:" +"`argparse` module::" +msgstr "" +"Notez qu’une interface de ligne de commande équivalente peut être produite " +"avec moins de code et des messages d’erreur et d’aide plus informatifs à " +"l’aide du module :mod:`argparse` module ::" + +#: library/getopt.rst:162 +msgid "Module :mod:`argparse`" +msgstr "Module :mod:`argparse`" + +#: library/getopt.rst:163 +msgid "Alternative command line option and argument parsing library." +msgstr "" +"Option de ligne de commande alternative et bibliothèque d’analyse " +"d’arguments." diff --git a/library/getpass.po b/library/getpass.po new file mode 100644 index 0000000000..603d937815 --- /dev/null +++ b/library/getpass.po @@ -0,0 +1,91 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +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-09-28 12:39+0200\n" +"Last-Translator: Paquerette \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" + +#: library/getpass.rst:2 +msgid ":mod:`getpass` --- Portable password input" +msgstr "Saisie de mot de passe portable" + +#: library/getpass.rst:11 +msgid "**Source code:** :source:`Lib/getpass.py`" +msgstr "**Source code:** :source:`Lib/getpass.py`" + +#: library/getpass.rst:15 +msgid "The :mod:`getpass` module provides two functions:" +msgstr "Le module :mod:`getpass` fournit 2 fonctions:" + +#: library/getpass.rst:20 +msgid "" +"Prompt the user for a password without echoing. The user is prompted using " +"the string *prompt*, which defaults to ``'Password: '``. On Unix, the " +"prompt is written to the file-like object *stream* using the replace error " +"handler if needed. *stream* defaults to the controlling terminal (:file:`/" +"dev/tty`) or if that is unavailable to ``sys.stderr`` (this argument is " +"ignored on Windows)." +msgstr "" +"Affiche une demande de mot de passe sans renvoyer d'écho. L'utilisateur est " +"invité en utilisant la string *prompt*, avec en valeur par défaut " +"``'Password: '``. Avec Unix, l'invite est écrite dans l'objet fichier " +"*stream* en utilisant si besoin le *replace error handler*. *stream* sera " +"par défaut le terminal de contrôle (:file:`/dev/tty`), ou si celui ci n'est " +"pas disponible ce sera ``sys.stderr`` (cet argument sera ignoré sur Windows)." + +#: library/getpass.rst:27 +msgid "" +"If echo free input is unavailable getpass() falls back to printing a warning " +"message to *stream* and reading from ``sys.stdin`` and issuing a :exc:" +"`GetPassWarning`." +msgstr "" +"Si aucune saisie en mode sans affichage n'est disponible, ``getpass()`` se " +"résoudra à afficher un message d'avertissement vers *stream*, puis lire " +"l'entrée depuis ``sys.stdin``, en levant une :exc:`GetPassWarning`." + +#: library/getpass.rst:32 +msgid "" +"If you call getpass from within IDLE, the input may be done in the terminal " +"you launched IDLE from rather than the idle window itself." +msgstr "" +"Si vous appelez *getpass* depuis IDLE, la saisie peut être faite dans le " +"terminal depuis lequel IDLE a été lancé, plutôt que dans la fenêtre d'IDLE." + +#: library/getpass.rst:37 +msgid "A :exc:`UserWarning` subclass issued when password input may be echoed." +msgstr "" +"Une sous classe d'exception :exc:`UserWarning` est levée quand le mot de " +"passe saisi pourrait être affiché." + +#: library/getpass.rst:42 +msgid "Return the \"login name\" of the user." +msgstr "Renvoie le *login name* de l'utilisateur." + +#: library/getpass.rst:44 +msgid "" +"This function checks the environment variables :envvar:`LOGNAME`, :envvar:" +"`USER`, :envvar:`LNAME` and :envvar:`USERNAME`, in order, and returns the " +"value of the first one which is set to a non-empty string. If none are set, " +"the login name from the password database is returned on systems which " +"support the :mod:`pwd` module, otherwise, an exception is raised." +msgstr "" +"Cette fonction examine les variables d'environnement :envvar:`LOGNAME`, :" +"envvar:`USER`, :envvar:`LNAME` et :envvar:`USERNAME`, dans cet ordre, et " +"renvoie la valeur de la première qui a comme valeur une string non vide. Si " +"aucune des variables n'est renseignée, dans le cas de systèmes qui prennent " +"en charge le module :mod:`pwd`, le *login name* de la base de données des " +"mots de passes est renvoyé, pour les autres systèmes une exception est levée." + +#: library/getpass.rst:51 +msgid "" +"In general, this function should be preferred over :func:`os.getlogin()`." +msgstr "En général, préférez cette fonction à :func:`os.getlogin()`." diff --git a/library/gettext.po b/library/gettext.po new file mode 100644 index 0000000000..ee0710d677 --- /dev/null +++ b/library/gettext.po @@ -0,0 +1,1165 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-18 15:46+0200\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.4.3\n" + +#: library/gettext.rst:2 +msgid ":mod:`gettext` --- Multilingual internationalization services" +msgstr ":mod:`gettext` — Services d'internationalisation multilingue" + +#: library/gettext.rst:10 +msgid "**Source code:** :source:`Lib/gettext.py`" +msgstr "**Code source :** :source:`Lib/gettext.py`" + +#: library/gettext.rst:14 +msgid "" +"The :mod:`gettext` module provides internationalization (I18N) and " +"localization (L10N) services for your Python modules and applications. It " +"supports both the GNU :program:`gettext` message catalog API and a higher " +"level, class-based API that may be more appropriate for Python files. The " +"interface described below allows you to write your module and application " +"messages in one natural language, and provide a catalog of translated " +"messages for running under different natural languages." +msgstr "" +"Le module :mod:`gettext` fournit un service d'internationalisation (*I18N*) " +"et de localisation linguistique (*L10N*) pour vos modules et applications " +"Python. Il est compatible avec l'API du catalogue de messages GNU :program:" +"`gettext` et à un plus haut niveau, avec l'API basée sur les classes qui " +"serait peut-être plus adaptée aux fichiers Python. L'interface décrite ci-" +"dessous vous permet d'écrire les textes de vos modules et applications dans " +"une langue naturelle, puis de fournir un catalogue de traductions pour les " +"lancer ensuite dans d'autres langues naturelles." + +#: library/gettext.rst:22 +msgid "" +"Some hints on localizing your Python modules and applications are also given." +msgstr "" +"Quelques astuces sur la localisation de vos modules et applications Python " +"sont également données." + +#: library/gettext.rst:26 +msgid "GNU :program:`gettext` API" +msgstr "API GNU :program:`gettext`" + +#: library/gettext.rst:28 +msgid "" +"The :mod:`gettext` module defines the following API, which is very similar " +"to the GNU :program:`gettext` API. If you use this API you will affect the " +"translation of your entire application globally. Often this is what you " +"want if your application is monolingual, with the choice of language " +"dependent on the locale of your user. If you are localizing a Python " +"module, or if your application needs to switch languages on the fly, you " +"probably want to use the class-based API instead." +msgstr "" +"Le module :mod:`gettext` définit l'API suivante, qui est très proche de " +"l'API de GNU :program:`gettext`. Si vous utilisez cette API, cela affectera " +"la traduction de toute votre application. C'est souvent le comportement " +"attendu si votre application est monolingue, avec le choix de la langue qui " +"dépend des paramètres linguistiques de l'utilisateur. Si vous localisez un " +"module Python ou si votre application a besoin de changer de langue à la " +"volée, il est plus judicieux d'utiliser l'API basée sur des classes." + +#: library/gettext.rst:39 +msgid "" +"Bind the *domain* to the locale directory *localedir*. More concretely, :" +"mod:`gettext` will look for binary :file:`.mo` files for the given domain " +"using the path (on Unix): :file:`{localedir}/{language}/LC_MESSAGES/{domain}." +"mo`, where *language* is searched for in the environment variables :envvar:" +"`LANGUAGE`, :envvar:`LC_ALL`, :envvar:`LC_MESSAGES`, and :envvar:`LANG` " +"respectively." +msgstr "" +"Lie *domain* au répertoire *localedir* des localisations. Plus " +"spécifiquement, :mod:`gettext` va chercher les fichiers binaires :file:`.mo` " +"pour un domaine donné, en utilisant le chemin suivant (sous Unix) : :file:" +"`{localedir}/{language}/LC_MESSAGES/{domain}.mo`, où *language* est " +"recherché dans l'une des variables d'environnement suivantes : :envvar:" +"`LANGUAGE`, :envvar:`LC_ALL`, :envvar:`LC_MESSAGES` et :envvar:`LANG`." + +#: library/gettext.rst:45 +msgid "" +"If *localedir* is omitted or ``None``, then the current binding for *domain* " +"is returned. [#]_" +msgstr "" +"Si *localedir* n'est pas renseigné ou vaut ``None``, alors le lien actuel de " +"*domain* est renvoyé. [#]_" + +#: library/gettext.rst:51 +msgid "" +"Bind the *domain* to *codeset*, changing the encoding of byte strings " +"returned by the :func:`lgettext`, :func:`ldgettext`, :func:`lngettext` and :" +"func:`ldngettext` functions. If *codeset* is omitted, then the current " +"binding is returned." +msgstr "" +"Lie *domain* à *codeset*, en changeant l'encodage des chaînes d'octets " +"retournées par les fonctions :func:`lgettext`, :func:`ldgettext`, :func:" +"`lngettext` et :func:`ldngettext`. Si *codeset* n'est pas renseigné, alors " +"le lien actuel est renvoyé." + +#: library/gettext.rst:61 +msgid "" +"Change or query the current global domain. If *domain* is ``None``, then " +"the current global domain is returned, otherwise the global domain is set to " +"*domain*, which is returned." +msgstr "" +"Change ou interroge le domaine global actuel. Si *domain* vaut ``None``, " +"alors le domaine global actuel est renvoyé. Sinon, le domaine global est " +"positionné à *domain*, puis renvoyé." + +#: library/gettext.rst:69 +msgid "" +"Return the localized translation of *message*, based on the current global " +"domain, language, and locale directory. This function is usually aliased " +"as :func:`_` in the local namespace (see examples below)." +msgstr "" +"Renvoie la traduction localisée de *message*, en se basant sur le domaine " +"global actuel, la langue et le répertoire des localisations. Cette fonction " +"est typiquement renommée :func:`_` dans le namespace courant (voir les " +"exemples ci-dessous)." + +#: library/gettext.rst:76 +msgid "" +"Like :func:`.gettext`, but look the message up in the specified *domain*." +msgstr "" +"Comme :func:`gettext`, mais cherche le message dans le domaine spécifié." + +#: library/gettext.rst:81 +msgid "" +"Like :func:`.gettext`, but consider plural forms. If a translation is found, " +"apply the plural formula to *n*, and return the resulting message (some " +"languages have more than two plural forms). If no translation is found, " +"return *singular* if *n* is 1; return *plural* otherwise." +msgstr "" +"Comme :func:`gettext`, mais prend en compte les formes au pluriel. Si une " +"traduction a été trouvée, utilise la formule pour trouver le pluriel à *n* " +"et renvoie le message généré (quelques langues ont plus de deux formes au " +"pluriel). Si aucune traduction n'a été trouvée, renvoie *singular* si *n* " +"vaut 1, *plural* sinon." + +#: library/gettext.rst:86 +msgid "" +"The Plural formula is taken from the catalog header. It is a C or Python " +"expression that has a free variable *n*; the expression evaluates to the " +"index of the plural in the catalog. See `the GNU gettext documentation " +"`__ for the " +"precise syntax to be used in :file:`.po` files and the formulas for a " +"variety of languages." +msgstr "" +"La formule pour trouver le pluriel est récupérée dans l'entête du " +"catalogue. C'est une expression en C ou en Python qui a une variable libre " +"*n* et qui évalue l'index du pluriel dans le catalogue. Voir `la " +"documentation de GNU gettext `__ pour la syntaxe précise à utiliser dans les fichiers :file:" +"`.po` et pour les formules dans différents langues." + +#: library/gettext.rst:96 +msgid "" +"Like :func:`ngettext`, but look the message up in the specified *domain*." +msgstr "" +"Comme :func:`ngettext`, mais cherche le message dans le domaine spécifié." + +#: library/gettext.rst:104 +msgid "" +"Similar to the corresponding functions without the ``p`` in the prefix (that " +"is, :func:`gettext`, :func:`dgettext`, :func:`ngettext`, :func:`dngettext`), " +"but the translation is restricted to the given message *context*." +msgstr "" +"Semblable aux fonctions correspondantes sans le ``p`` dans le préfixe (c'est-" +"à-dire :func:`gettext`, :func:`dgettext`, :func:`ngettext` et :func:" +"`dngettext`), mais la traduction est limitée au *context* du message donné." + +#: library/gettext.rst:116 +msgid "" +"Equivalent to the corresponding functions without the ``l`` prefix (:func:`." +"gettext`, :func:`dgettext`, :func:`ngettext` and :func:`dngettext`), but the " +"translation is returned as a byte string encoded in the preferred system " +"encoding if no other encoding was explicitly set with :func:" +"`bind_textdomain_codeset`." +msgstr "" +"Équivalent aux fonctions correspondantes non préfixées par ``l`` (:func:`." +"gettext`, :func:`dgettext`, :func:`ngettext` et :func:`dngettext`), mais la " +"traduction est retournée en tant que chaîne d'octets, encodée avec " +"l'encodage du système si aucun autre n'a été explicitement défini avec :func:" +"`bind_textdomain_codeset`." + +#: library/gettext.rst:124 +msgid "" +"These functions should be avoided in Python 3, because they return encoded " +"bytes. It's much better to use alternatives which return Unicode strings " +"instead, since most Python applications will want to manipulate human " +"readable text as strings instead of bytes. Further, it's possible that you " +"may get unexpected Unicode-related exceptions if there are encoding problems " +"with the translated strings." +msgstr "" +"Ces fonctions sont à éviter en Python 3 car elles renvoient des octets " +"encodés. Il est préférable d'utiliser des alternatives qui renvoient de " +"l'Unicode, puisque beaucoup d'applications Python voudront manipuler du " +"texte lisible par des humains plutôt que des octets. En outre, il est " +"possible que vous obteniez des exceptions non prévues liées à Unicode s'il y " +"a des soucis d'encodage avec les chaînes de caractères traduites." + +#: library/gettext.rst:134 +msgid "" +"Note that GNU :program:`gettext` also defines a :func:`dcgettext` method, " +"but this was deemed not useful and so it is currently unimplemented." +msgstr "" +"Notez que GNU :program:`gettext` a aussi une méthode :func:`dcgettext`, mais " +"elle a été considérée comme inutile et donc actuellement marquée comme non " +"implémentée." + +#: library/gettext.rst:137 +msgid "Here's an example of typical usage for this API::" +msgstr "Voici un exemple classique d'utilisation de cette API ::" + +#: library/gettext.rst:148 +msgid "Class-based API" +msgstr "API basée sur les classes" + +#: library/gettext.rst:150 +msgid "" +"The class-based API of the :mod:`gettext` module gives you more flexibility " +"and greater convenience than the GNU :program:`gettext` API. It is the " +"recommended way of localizing your Python applications and modules. :mod:`!" +"gettext` defines a :class:`GNUTranslations` class which implements the " +"parsing of GNU :file:`.mo` format files, and has methods for returning " +"strings. Instances of this class can also install themselves in the built-in " +"namespace as the function :func:`_`." +msgstr "" +"L'API du module :mod:`gettext` basée sur les classes vous donne plus de " +"flexibilité et est plus pratique que l'API de GNU :program:`gettext`. Son " +"utilisation est recommandée pour localiser vos applications et modules " +"Python. :mod:`!gettext` définit une classe :class:`GNUTranslations` qui " +"analyse syntaxiquement les fichiers au format GNU :file:`.mo`, et qui " +"possède des méthodes pour renvoyer des chaînes de caractères. Les instances " +"de cette classe \"translations\" peuvent également s'installer dans l'espace " +"de nommage natif en tant que fonction :func:`_`." + +#: library/gettext.rst:160 +msgid "" +"This function implements the standard :file:`.mo` file search algorithm. It " +"takes a *domain*, identical to what :func:`textdomain` takes. Optional " +"*localedir* is as in :func:`bindtextdomain`. Optional *languages* is a list " +"of strings, where each string is a language code." +msgstr "" +"Cette fonction implémente l'algorithme standard de recherche de fichier :" +"file:`mo`. Il prend en entrée un *domain*, tout comme la fonction :func:" +"`textdomain`. Le paramètre optionnel *localedir* est le même que celui de :" +"func:`bindtextdomain`. Le paramètre optionnel *langages* est une liste de " +"chaînes de caractères correspondants au code d'une langue." + +#: library/gettext.rst:165 +msgid "" +"If *localedir* is not given, then the default system locale directory is " +"used. [#]_ If *languages* is not given, then the following environment " +"variables are searched: :envvar:`LANGUAGE`, :envvar:`LC_ALL`, :envvar:" +"`LC_MESSAGES`, and :envvar:`LANG`. The first one returning a non-empty " +"value is used for the *languages* variable. The environment variables should " +"contain a colon separated list of languages, which will be split on the " +"colon to produce the expected list of language code strings." +msgstr "" +"Si *localedir* n'est pas renseigné, alors le répertoire de la locale par " +"défaut du système est utilisé. [#]_ Si *languages* n'est pas renseigné, " +"alors les variables d'environnement suivantes sont utilisées : :envvar:" +"`LANGUAGE`, :envvar:`LC_ALL`, :envvar:`LC_MESSAGES` et :envvar:`LANG`. La " +"première à renvoyer une valeur non vide est alors utilisée pour " +"*languages*. Ces variables d'environnement doivent contenir une liste de " +"langues, séparées par des deux-points, qui sera utilisée pour générer la " +"liste des codes de langues attendue." + +#: library/gettext.rst:173 +msgid "" +":func:`find` then expands and normalizes the languages, and then iterates " +"through them, searching for an existing file built of these components:" +msgstr "" +"Recherche avec :func:`find`, découvre et normalise les langues, puis itère " +"sur la liste obtenue afin de trouver un fichier de traduction existant et " +"correspondant :" + +#: library/gettext.rst:176 +msgid ":file:`{localedir}/{language}/LC_MESSAGES/{domain}.mo`" +msgstr ":file:`{localedir}/{language}/LC_MESSAGES/{domain}.mo`" + +#: library/gettext.rst:178 +msgid "" +"The first such file name that exists is returned by :func:`find`. If no such " +"file is found, then ``None`` is returned. If *all* is given, it returns a " +"list of all file names, in the order in which they appear in the languages " +"list or the environment variables." +msgstr "" +"Le premier nom de fichier trouvé est renvoyé par :func:`find`. Si aucun " +"fichier n'a été trouvé, alors ``None`` est renvoyé. Si *all* est vrai, est " +"renvoyée la liste de tous les noms de fichiers, dans l'ordre dans lequel ils " +"apparaissent dans *languages* ou dans les variables d'environnement." + +#: library/gettext.rst:186 +msgid "" +"Return a :class:`*Translations` instance based on the *domain*, *localedir*, " +"and *languages*, which are first passed to :func:`find` to get a list of the " +"associated :file:`.mo` file paths. Instances with identical :file:`.mo` " +"file names are cached. The actual class instantiated is *class_* if " +"provided, otherwise :class:`GNUTranslations`. The class's constructor must " +"take a single :term:`file object` argument. If provided, *codeset* will " +"change the charset used to encode translated strings in the :meth:" +"`~NullTranslations.lgettext` and :meth:`~NullTranslations.lngettext` methods." +msgstr "" +"Renvoie une instance de la classe :class:`*Translations` en se basant sur " +"*domain*, *localedir* et *languages*, qui sont d'abord passés en argument " +"de :func:`find` afin d'obtenir une liste de chemin des fichiers :file:`.mo` " +"associés. Les instances avec des noms de fichiers :file:`.mo` identiques " +"sont mises en cache. La classe réellement instanciée est soit *class_* si " +"renseigné, soit une classe :class:`GNUTranslations`. Le constructeur de " +"cette classe doit prendre en argument un seul :term:`file object`. Si " +"renseigné, *codeset* modifiera le jeu de caractères utilisé pour encoder les " +"chaînes de caractères traduites, dans les méthodes :meth:`~NullTranslations." +"lgettext` et :meth:`~NullTranslations.lngettext`." + +#: library/gettext.rst:196 +msgid "" +"If multiple files are found, later files are used as fallbacks for earlier " +"ones. To allow setting the fallback, :func:`copy.copy` is used to clone each " +"translation object from the cache; the actual instance data is still shared " +"with the cache." +msgstr "" +"Si plusieurs fichiers ont été trouvés, les derniers sont utilisés comme " +"substitut des premiers. Pour rendre possible cette substitution, :func:" +"`copy.copy` est utilisé pour copier chaque objet traduit depuis le cache ; " +"les vraies données de l'instance étant toujours recopiées dans le cache." + +#: library/gettext.rst:201 +msgid "" +"If no :file:`.mo` file is found, this function raises :exc:`OSError` if " +"*fallback* is false (which is the default), and returns a :class:" +"`NullTranslations` instance if *fallback* is true." +msgstr "" +"Si aucun fichier :file:`.mo` n'a été trouvé, soit *fallback* vaut *False* " +"(valeur par défaut) et une exception :exc:`OSError` est levée, soit " +"*fallback* vaut *True* et une instance :class:`NullTranslations` est " +"renvoyée." + +#: library/gettext.rst:205 +msgid ":exc:`IOError` used to be raised instead of :exc:`OSError`." +msgstr "" +"Avant, c'était l'exception :exc:`IOError` qui était levée, au lieu de :exc:" +"`OSError`." + +#: library/gettext.rst:232 +msgid "The *codeset* parameter." +msgstr "Le paramètre *codeset*." + +#: library/gettext.rst:214 +msgid "" +"This installs the function :func:`_` in Python's builtins namespace, based " +"on *domain*, *localedir*, and *codeset* which are passed to the function :" +"func:`translation`." +msgstr "" +"Positionne la fonction :func:`_` dans l'espace de nommage natif de Python, " +"en se basant sur *domain*, *localedir* et *codeset*, qui sont passés en " +"argument de la fonction :func:`translation`." + +#: library/gettext.rst:218 +msgid "" +"For the *names* parameter, please see the description of the translation " +"object's :meth:`~NullTranslations.install` method." +msgstr "" +"Concernant le paramètre *names*, se référer à la description de la méthode :" +"meth:`~NullTranslations.install`." + +#: library/gettext.rst:221 +msgid "" +"As seen below, you usually mark the strings in your application that are " +"candidates for translation, by wrapping them in a call to the :func:`_` " +"function, like this::" +msgstr "" +"Habituellement, la fonction :func:`_` est appliquée aux chaînes de " +"caractères qui doivent être traduites comme suit ::" + +#: library/gettext.rst:227 +msgid "" +"For convenience, you want the :func:`_` function to be installed in Python's " +"builtins namespace, so it is easily accessible in all modules of your " +"application." +msgstr "" +"Pour plus de confort, il vaut mieux positionner la fonction :func:`_` dans " +"l'espace de nommage natif de Python pour la rendre plus accessible dans tous " +"les modules de votre application." + +#: library/gettext.rst:236 +msgid "The :class:`NullTranslations` class" +msgstr "La classe :class:`NullTranslations`" + +#: library/gettext.rst:238 +msgid "" +"Translation classes are what actually implement the translation of original " +"source file message strings to translated message strings. The base class " +"used by all translation classes is :class:`NullTranslations`; this provides " +"the basic interface you can use to write your own specialized translation " +"classes. Here are the methods of :class:`!NullTranslations`:" +msgstr "" +"Les classes de traduction implémentent le fait de passer d'une chaîne de " +"caractères du fichier original à traduire à la traduction de celle-ci. La " +"classe de base utilisée est :class:`NullTranslations`. C'est l'interface de " +"base à utiliser lorsque vous souhaitez écrire vos propres classes " +"spécifiques à la traduction. Voici les méthodes de :class:`!" +"NullTranslations` :" + +#: library/gettext.rst:247 +msgid "" +"Takes an optional :term:`file object` *fp*, which is ignored by the base " +"class. Initializes \"protected\" instance variables *_info* and *_charset* " +"which are set by derived classes, as well as *_fallback*, which is set " +"through :meth:`add_fallback`. It then calls ``self._parse(fp)`` if *fp* is " +"not ``None``." +msgstr "" +"Prend un paramètre optionnel un :term:`file object` *fp*, qui est ignoré par " +"la classe de base. Initialise les variables d'instance \"protégées\" " +"*_info* et *_chardet*, définies par des classes dérivées, tout comme " +"*_fallback* qui est définie au travers de :meth:`add_fallback`. Puis " +"appelle ``self._parse(fp)`` si *fp* ne vaut pas ``None``." + +#: library/gettext.rst:255 +msgid "" +"No-op in the base class, this method takes file object *fp*, and reads the " +"data from the file, initializing its message catalog. If you have an " +"unsupported message catalog file format, you should override this method to " +"parse your format." +msgstr "" +"Cette méthode, non exécutée dans la classe de base, prend en paramètre un " +"objet fichier *fp* et lit les données de ce dernier. Si vous avez un " +"catalogue de messages dont le format n'est pas pris en charge, vous devriez " +"surcharger cette méthode pour analyser votre format." + +#: library/gettext.rst:263 +msgid "" +"Add *fallback* as the fallback object for the current translation object. A " +"translation object should consult the fallback if it cannot provide a " +"translation for a given message." +msgstr "" +"Ajoute *fallback* comme objet de substitution pour l'objet de traduction " +"courant. Un objet de traduction devrait interroger cet objet de " +"substitution s'il ne peut fournir une traduction pour un message donné." + +#: library/gettext.rst:270 +msgid "" +"If a fallback has been set, forward :meth:`!gettext` to the fallback. " +"Otherwise, return *message*. Overridden in derived classes." +msgstr "" +"Si un objet de substitution a été défini, transmet :meth:`!gettext` à celui-" +"ci. Sinon, renvoie *message*. Surchargé dans les classes dérivées." + +#: library/gettext.rst:276 +msgid "" +"If a fallback has been set, forward :meth:`!ngettext` to the fallback. " +"Otherwise, return *singular* if *n* is 1; return *plural* otherwise. " +"Overridden in derived classes." +msgstr "" +"Si un objet de substitution a été défini, transmet :meth:`!ngettext` à celui-" +"ci. Sinon, renvoie *singular* si *n* vaut 1, *plural* sinon. Surchargé " +"dans les classes dérivées." + +#: library/gettext.rst:283 +msgid "" +"If a fallback has been set, forward :meth:`pgettext` to the fallback. " +"Otherwise, return the translated message. Overridden in derived classes." +msgstr "" +"Si un objet de substitution a été défini, transmet :meth:`pgettext` à celui-" +"ci. Sinon, renvoie le message traduit. Surchargé dans les classes dérivées." + +#: library/gettext.rst:291 +msgid "" +"If a fallback has been set, forward :meth:`npgettext` to the fallback. " +"Otherwise, return the translated message. Overridden in derived classes." +msgstr "" +"Si un objet de substitution a été défini, transmet :meth:`npgettext` à celui-" +"ci. Sinon, renvoie le message traduit. Surchargé dans les classes dérivées." + +#: library/gettext.rst:300 +msgid "" +"Equivalent to :meth:`.gettext` and :meth:`.ngettext`, but the translation is " +"returned as a byte string encoded in the preferred system encoding if no " +"encoding was explicitly set with :meth:`set_output_charset`. Overridden in " +"derived classes." +msgstr "" +"Équivalent de :meth:`.gettext` et :meth:`.ngettext`, mais la traduction est " +"renvoyée sous la forme d'une chaîne d'octets, encodée avec l'encodage du " +"système si aucun autre n'a été défini avec :meth:`set_output_charset`. " +"Surchargé dans les classes dérivées." + +#: library/gettext.rst:463 +msgid "" +"These methods should be avoided in Python 3. See the warning for the :func:" +"`lgettext` function." +msgstr "" +"L'utilisation de ces méthodes doivent être évitée en Python 3. Voir " +"l'avertissement de la fonction :func:`lgettext`." + +#: library/gettext.rst:315 +msgid "" +"Return the \"protected\" :attr:`_info` variable, a dictionary containing the " +"metadata found in the message catalog file." +msgstr "" +"Renvoie l'attribut \"protégé\" :attr:`_info`, dictionnaire contenant les " +"métadonnées trouvées dans le fichier de catalogue de messages." + +#: library/gettext.rst:321 +msgid "Return the encoding of the message catalog file." +msgstr "Renvoie l'encodage du fichier du catalogue de messages." + +#: library/gettext.rst:326 +msgid "" +"Return the encoding used to return translated messages in :meth:`.lgettext` " +"and :meth:`.lngettext`." +msgstr "" +"Renvoie l'encodage utilisé par :meth:`.lgettext` et :meth:`.lngettext` pour " +"la traduction des messages." + +#: library/gettext.rst:334 +msgid "Change the encoding used to return translated messages." +msgstr "Modifie l'encodage utilisé pour la traduction des messages." + +#: library/gettext.rst:341 +msgid "" +"This method installs :meth:`.gettext` into the built-in namespace, binding " +"it to ``_``." +msgstr "" +"Cette méthode positionne :meth:`.gettext` dans l'espace de nommage natif, en " +"le liant à ``_``." + +#: library/gettext.rst:344 +msgid "" +"If the *names* parameter is given, it must be a sequence containing the " +"names of functions you want to install in the builtins namespace in addition " +"to :func:`_`. Supported names are ``'gettext'``, ``'ngettext'``, " +"``'pgettext'``, ``'npgettext'``, ``'lgettext'``, and ``'lngettext'``." +msgstr "" +"Si le paramètre *names* est renseigné, celui-ci doit être une séquence " +"contenant les noms des fonctions que vous souhaitez positionner dans " +"l'espace de nommage natif, en plus de :func:`_`. Les noms pris en charge " +"sont ``'gettext'``, ``'ngettext'``, ``'pgettext'``, ``'npgettext'``, " +"``'lgettext'`` et ``'lngettext'``." + +#: library/gettext.rst:349 +msgid "" +"Note that this is only one way, albeit the most convenient way, to make the :" +"func:`_` function available to your application. Because it affects the " +"entire application globally, and specifically the built-in namespace, " +"localized modules should never install :func:`_`. Instead, they should use " +"this code to make :func:`_` available to their module::" +msgstr "" +"Notez que ce n'est là qu'un moyen parmi d'autres, quoique le plus pratique, " +"pour rendre la fonction :func:`_` accessible à votre application. Puisque " +"cela affecte toute l'application, et plus particulièrement l'espace de " +"nommage natif, les modules localisés ne devraient jamais y positionner :func:" +"`_`. Au lieu de cela, ces derniers doivent plutôt utiliser le code suivant " +"pour rendre :func:`_` accessible par leurs modules ::" + +#: library/gettext.rst:359 +msgid "" +"This puts :func:`_` only in the module's global namespace and so only " +"affects calls within this module." +msgstr "" +"Cela met :func:`_` dans l'espace de nommage global du module uniquement et " +"donc n'affectera ses appels que dans ce module." + +#: library/gettext.rst:362 +msgid "Added ``'pgettext'`` and ``'npgettext'``." +msgstr "Ajout de ``'pgettext'`` et ``'npgettext'``." + +#: library/gettext.rst:367 +msgid "The :class:`GNUTranslations` class" +msgstr "La classe :class:`GNUTranslations`" + +#: library/gettext.rst:369 +msgid "" +"The :mod:`gettext` module provides one additional class derived from :class:" +"`NullTranslations`: :class:`GNUTranslations`. This class overrides :meth:" +"`_parse` to enable reading GNU :program:`gettext` format :file:`.mo` files " +"in both big-endian and little-endian format." +msgstr "" +"Le module :mod:`gettext` fournit une classe supplémentaire qui hérite de :" +"class:`NullTranslations` : :class:`GNUTranslations`. Cette classe " +"surcharge :meth:`_parse` pour permettre de lire les fichiers GNU :program:" +"`gettext` :file:`.mo` au format petit et gros-boutiste." + +#: library/gettext.rst:374 +msgid "" +":class:`GNUTranslations` parses optional metadata out of the translation " +"catalog. It is convention with GNU :program:`gettext` to include metadata as " +"the translation for the empty string. This metadata is in :rfc:`822`\\ -" +"style ``key: value`` pairs, and should contain the ``Project-Id-Version`` " +"key. If the key ``Content-Type`` is found, then the ``charset`` property is " +"used to initialize the \"protected\" :attr:`_charset` instance variable, " +"defaulting to ``None`` if not found. If the charset encoding is specified, " +"then all message ids and message strings read from the catalog are converted " +"to Unicode using this encoding, else ASCII is assumed." +msgstr "" +":class:`GNUTranslations` analyse les métadonnées optionnelles du catalogue " +"de traduction. Il est d'usage avec GNU :program:`gettext` d'utiliser une " +"métadonnée pour traduire la chaîne vide. Cette métadonnée est un ensemble de " +"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 " +"(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é." + +#: library/gettext.rst:384 +msgid "" +"Since message ids are read as Unicode strings too, all :meth:`*gettext` " +"methods will assume message ids as Unicode strings, not byte strings." +msgstr "" +"Et puisque les identifiants des messages sont également lus comme des " +"chaînes Unicode, toutes les méthodes :meth:`*gettext` les considéreront " +"ainsi, et pas comme des chaînes d'octets." + +#: library/gettext.rst:387 +msgid "" +"The entire set of key/value pairs are placed into a dictionary and set as " +"the \"protected\" :attr:`_info` instance variable." +msgstr "" +"La totalité des paires clef / valeur est insérée dans un dictionnaire et " +"représente la variable d'instance \"protégée\" :attr:`_info`." + +#: library/gettext.rst:390 +msgid "" +"If the :file:`.mo` file's magic number is invalid, the major version number " +"is unexpected, or if other problems occur while reading the file, " +"instantiating a :class:`GNUTranslations` class can raise :exc:`OSError`." +msgstr "" +"Si le nombre magique du fichier :file:`.mo` est invalide, le numéro de la " +"version majeure inattendu, ou si d'autres problèmes apparaissent durant la " +"lecture du fichier, instancier une classe :class:`GNUTranslations` peut " +"lever une exception :exc:`OSError`." + +#: library/gettext.rst:396 +msgid "" +"The following methods are overridden from the base class implementation:" +msgstr "" +"Les méthodes suivantes, provenant de l'implémentation de la classe de base, " +"ont été surchargée :" + +#: library/gettext.rst:400 +msgid "" +"Look up the *message* id in the catalog and return the corresponding message " +"string, as a Unicode string. If there is no entry in the catalog for the " +"*message* id, and a fallback has been set, the look up is forwarded to the " +"fallback's :meth:`~NullTranslations.gettext` method. Otherwise, the " +"*message* id is returned." +msgstr "" +"Recherche l'identifiant de *message* dans le catalogue et renvoie le message " +"de la chaîne de caractères correspondante comme une chaîne Unicode. Si " +"aucun identifiant n'a été trouvé pour *message* et qu'un substitut a été " +"défini, la recherche est transmise à la méthode :meth:`~NullTranslations." +"gettext` du substitut. Sinon, l'identifiant de *message* est renvoyé." + +#: library/gettext.rst:409 +msgid "" +"Do a plural-forms lookup of a message id. *singular* is used as the message " +"id for purposes of lookup in the catalog, while *n* is used to determine " +"which plural form to use. The returned message string is a Unicode string." +msgstr "" +"Effectue une recherche sur les formes plurielles de l'identifiant d'un " +"message. *singular* est utilisé pour la recherche de l'identifiant dans le " +"catalogue, alors que *n* permet de savoir quelle forme plurielle utiliser. " +"La chaîne de caractère du message renvoyée est une chaîne Unicode." + +#: library/gettext.rst:413 +msgid "" +"If the message id is not found in the catalog, and a fallback is specified, " +"the request is forwarded to the fallback's :meth:`~NullTranslations." +"ngettext` method. Otherwise, when *n* is 1 *singular* is returned, and " +"*plural* is returned in all other cases." +msgstr "" +"Si l'identifiant du message n'est pas trouvé dans le catalogue et qu'un " +"substitut a été spécifié, la requête est transmise à la méthode :meth:" +"`~NullTranslations.ngettext` du substitut. Sinon, est renvoyé *singular* " +"lorsque *n* vaut 1, *plural* dans tous les autres cas." + +#: library/gettext.rst:418 +msgid "Here is an example::" +msgstr "Voici un exemple ::" + +#: library/gettext.rst:430 +msgid "" +"Look up the *context* and *message* id in the catalog and return the " +"corresponding message string, as a Unicode string. If there is no entry in " +"the catalog for the *message* id and *context*, and a fallback has been set, " +"the look up is forwarded to the fallback's :meth:`pgettext` method. " +"Otherwise, the *message* id is returned." +msgstr "" +"Recherche le *contexte* et l'identifiant de *message* dans le catalogue et " +"renvoie le message de la chaîne de caractères correspondante comme une " +"chaîne Unicode. Si aucun identifiant n'a été trouvé pour l'identifiant du " +"*message* et du *context* et qu'un substitut a été défini, la recherche est " +"transmise à la méthode :meth:`pgettext` du substitut. Sinon, l'identifiant " +"de *message* est renvoyé." + +#: library/gettext.rst:441 +msgid "" +"Do a plural-forms lookup of a message id. *singular* is used as the message " +"id for purposes of lookup in the catalog, while *n* is used to determine " +"which plural form to use." +msgstr "" +"Effectue une recherche sur les formes plurielles de l'identifiant d'un " +"message. *singular* est utilisé pour la recherche de l'identifiant dans le " +"catalogue, alors que *n* permet de savoir quelle forme plurielle utiliser." + +#: library/gettext.rst:445 +msgid "" +"If the message id for *context* is not found in the catalog, and a fallback " +"is specified, the request is forwarded to the fallback's :meth:`npgettext` " +"method. Otherwise, when *n* is 1 *singular* is returned, and *plural* is " +"returned in all other cases." +msgstr "" +"Si l'identifiant du message pour le *context* n'est pas trouvé dans le " +"catalogue et qu'un substitut a été spécifié, la requête est transmise à la " +"méthode :meth:`npgettext` du substitut. Sinon, est renvoyé *singular* " +"lorsque *n* vaut 1, *plural* dans tous les autres cas." + +#: library/gettext.rst:456 +msgid "" +"Equivalent to :meth:`.gettext` and :meth:`.ngettext`, but the translation is " +"returned as a byte string encoded in the preferred system encoding if no " +"encoding was explicitly set with :meth:`~NullTranslations." +"set_output_charset`." +msgstr "" +"Équivalent de :meth:`.gettext` et :meth:`.ngettext`, mais la traduction est " +"renvoyée sous la forme d'une chaîne d'octets, encodée avec l'encodage du " +"système si aucun autre n'a été défini avec :meth:`~NullTranslations." +"set_output_charset`." + +#: library/gettext.rst:470 +msgid "Solaris message catalog support" +msgstr "Support du catalogue de message de Solaris" + +#: library/gettext.rst:472 +msgid "" +"The Solaris operating system defines its own binary :file:`.mo` file format, " +"but since no documentation can be found on this format, it is not supported " +"at this time." +msgstr "" +"Le système d'exploitation Solaris possède son propre format de fichier " +"binaire :file:`.mo`, mais pour l'heure, puisqu'on ne peut trouver de " +"documentation sur ce format, il n'est pas géré." + +#: library/gettext.rst:478 +msgid "The Catalog constructor" +msgstr "Le constructeur *Catalog*" + +#: library/gettext.rst:482 +msgid "" +"GNOME uses a version of the :mod:`gettext` module by James Henstridge, but " +"this version has a slightly different API. Its documented usage was::" +msgstr "" +"GNOME utilise une version du module :mod:`gettext` de James Henstridge, mais " +"qui a une API légèrement différente. D'après la documentation, elle " +"s'utilise ainsi ::" + +#: library/gettext.rst:490 +msgid "" +"For compatibility with this older module, the function :func:`Catalog` is an " +"alias for the :func:`translation` function described above." +msgstr "" +"Pour des raisons de compatibilité avec cet ancien module, la fonction :func:" +"`Catalog` est un alias de la fonction :func:`translation` décrite ci-dessous." + +#: library/gettext.rst:493 +msgid "" +"One difference between this module and Henstridge's: his catalog objects " +"supported access through a mapping API, but this appears to be unused and so " +"is not currently supported." +msgstr "" +"Une différence entre ce module et celui de Henstridge : les objets de son " +"catalogue étaient accessibles depuis un schéma de l'API, mais cela semblait " +"ne pas être utilisé et donc n'est pas pris en charge." + +#: library/gettext.rst:499 +msgid "Internationalizing your programs and modules" +msgstr "Internationaliser vos programmes et modules" + +#: library/gettext.rst:501 +msgid "" +"Internationalization (I18N) refers to the operation by which a program is " +"made aware of multiple languages. Localization (L10N) refers to the " +"adaptation of your program, once internationalized, to the local language " +"and cultural habits. In order to provide multilingual messages for your " +"Python programs, you need to take the following steps:" +msgstr "" +"L'internationalisation (*I18N*) consiste à permettre à un programme de " +"recevoir des traductions dans plusieurs langues. La localisation (*L10N*) " +"consiste à adapter un programme à la langue et aux habitudes culturelles " +"locales, une fois celui-ci internationalisé. Afin de fournir du texte " +"multilingue à votre programme Python, les étapes suivantes sont nécessaires :" + +#: library/gettext.rst:507 +msgid "" +"prepare your program or module by specially marking translatable strings" +msgstr "" +"préparer votre programme ou module en marquant spécifiquement les chaînes à " +"traduire" + +#: library/gettext.rst:509 +msgid "" +"run a suite of tools over your marked files to generate raw messages catalogs" +msgstr "" +"lancer une suite d'outils sur les fichiers contenant des chaînes à traduire " +"pour générer des catalogues de messages brut" + +#: library/gettext.rst:511 +msgid "create language-specific translations of the message catalogs" +msgstr "" +"créer les traductions spécifiques à une langue des catalogues de messages" + +#: library/gettext.rst:513 +msgid "" +"use the :mod:`gettext` module so that message strings are properly translated" +msgstr "" +"utiliser le module :mod:`gettext` pour que les chaînes de caractères soient " +"bien traduites" + +#: library/gettext.rst:515 +msgid "" +"In order to prepare your code for I18N, you need to look at all the strings " +"in your files. Any string that needs to be translated should be marked by " +"wrapping it in ``_('...')`` --- that is, a call to the function :func:`_`. " +"For example::" +msgstr "" +"Afin de préparer votre code à être traduit (*I18N*), vous devrez rechercher " +"toutes les chaînes de caractères de vos fichiers. À chaque chaîne de " +"caractères à traduire doit être appliqué le marqueur ``_('...')`` --- c'est-" +"à-dire en appelant la fonction :func:`_`. Par exemple ::" + +#: library/gettext.rst:524 +msgid "" +"In this example, the string ``'writing a log message'`` is marked as a " +"candidate for translation, while the strings ``'mylog.txt'`` and ``'w'`` are " +"not." +msgstr "" +"Dans cet exemple, la chaîne ``'writing a log message'`` est maquée comme " +"traduite, contrairement aux chaînes ``'mylog.txt'`` et ``'w'``." + +#: library/gettext.rst:527 +#, fuzzy +msgid "" +"There are a few tools to extract the strings meant for translation. The " +"original GNU :program:`gettext` only supported C or C++ source code but its " +"extended version :program:`xgettext` scans code written in a number of " +"languages, including Python, to find strings marked as translatable. `Babel " +"`__ is a Python internationalization library that " +"includes a :file:`pybabel` script to extract and compile message catalogs. " +"François Pinard's program called :program:`xpot` does a similar job and is " +"available as part of his `po-utils package `__." +msgstr "" +"Il existe quelques outils pour extraire les chaînes de caractères destinées " +"à la traduction. Le programme d'origine GNU :program:`gettext` ne prenait " +"en charge que les codes sources en C ou C++, mais sa version étendue :" +"program:`xgettext` peut lire du code écrit dans de nombreux langages, dont " +"le Python, afin de trouver les chaînes notées comme traduisibles. `Babel " +"`__ est une bibliothèque en Python " +"d'internationalisation, qui inclut un script :file:`pybabel` permettant " +"d'extraire et de compiler des catalogues de messages. Le programme de " +"François Pinard, nommé :program:`xpot`, fait de même et est disponible dans " +"son `paquet po-utils `__." + +#: library/gettext.rst:537 +msgid "" +"(Python also includes pure-Python versions of these programs, called :" +"program:`pygettext.py` and :program:`msgfmt.py`; some Python distributions " +"will install them for you. :program:`pygettext.py` is similar to :program:" +"`xgettext`, but only understands Python source code and cannot handle other " +"programming languages such as C or C++. :program:`pygettext.py` supports a " +"command-line interface similar to :program:`xgettext`; for details on its " +"use, run ``pygettext.py --help``. :program:`msgfmt.py` is binary compatible " +"with GNU :program:`msgfmt`. With these two programs, you may not need the " +"GNU :program:`gettext` package to internationalize your Python applications.)" +msgstr "" +"(Python inclut également des versions en Python de ces programmes, :program:" +"`pygettext.py` et :program:`msgfmt.py`, que certaines distributions Python " +"installeront pour vous. :program:`pygettext.py` est similaire à :program:" +"`xgettext`, mais ne comprend que le code source écrit en Python et ne peut " +"prendre en charge d'autres langages de programmation tels que le C ou C++. :" +"program:`pygettext.py` possède une interface en ligne de commande similaire " +"à celle de :program:`xgettext` --- pour plus de détails sur son utilisation, " +"exécuter ``pygettext.py --help``. :program:`msgfmt.py` est compatible avec " +"GNU :program:`msgfmt`. Avec ces deux programmes, vous ne devriez pas avoir " +"besoin du paquet GNU :program:`gettext` pour internationaliser vos " +"applications en Python.)" + +#: library/gettext.rst:549 +msgid "" +":program:`xgettext`, :program:`pygettext`, and similar tools generate :file:" +"`.po` files that are message catalogs. They are structured human-readable " +"files that contain every marked string in the source code, along with a " +"placeholder for the translated versions of these strings." +msgstr "" +":program:`xgettext`, :program:`pygettext` et d'autres outils similaires " +"génèrent des fichiers :file:`.po` représentant les catalogues de messages. " +"Il s'agit de fichiers structurés et lisibles par un être humain, qui " +"contiennent toutes les chaînes du code source marquées comme traduisible, " +"ainsi que leur traduction à utiliser." + +#: library/gettext.rst:555 +msgid "" +"Copies of these :file:`.po` files are then handed over to the individual " +"human translators who write translations for every supported natural " +"language. They send back the completed language-specific versions as a :" +"file:`.po` file that's compiled into a machine-readable :file:" +"`.mo` binary catalog file using the :program:`msgfmt` program. The :file:`." +"mo` files are used by the :mod:`gettext` module for the actual translation " +"processing at run-time." +msgstr "" +"Les copies de ces fichiers :file:`.po` sont ensuite remises à des êtres " +"humains qui traduisent le contenu pour chaque langue naturelle prise en " +"charge. Pour chacune des langues, ces derniers renvoient la version " +"complétée sous la forme d'un fichier :file:`.po` qui a été " +"compilé dans un fichier binaire :file:`.mo` représentant le catalogue " +"lisible par une machine à l'aide du programme :program:`msgfmt`. Les " +"fichiers :file:`.mo` sont utilisés par le module :mod:`gettext` pour la " +"traduction lors de l'exécution." + +#: library/gettext.rst:564 +msgid "" +"How you use the :mod:`gettext` module in your code depends on whether you " +"are internationalizing a single module or your entire application. The next " +"two sections will discuss each case." +msgstr "" +"La façon dont vous utilisez le module :mod:`gettext` dans votre code dépend " +"de si vous internationalisez un seul module ou l'ensemble de votre " +"application. Les deux sections suivantes traitent chacune des cas." + +#: library/gettext.rst:570 +msgid "Localizing your module" +msgstr "Localiser votre module" + +#: library/gettext.rst:572 +msgid "" +"If you are localizing your module, you must take care not to make global " +"changes, e.g. to the built-in namespace. You should not use the GNU :program:" +"`gettext` API but instead the class-based API." +msgstr "" +"Si vous localisez votre module, veillez à ne pas faire de changements " +"globaux, e.g. dans l'espace de nommage natif. Vous ne devriez pas utiliser " +"l’API GNU :program:`gettext` mais plutôt celle basée sur les classes." + +#: library/gettext.rst:576 +msgid "" +"Let's say your module is called \"spam\" and the module's various natural " +"language translation :file:`.mo` files reside in :file:`/usr/share/locale` " +"in GNU :program:`gettext` format. Here's what you would put at the top of " +"your module::" +msgstr "" +"Disons que votre module s'appelle \"spam\" et que les fichiers :file:`.mo` " +"de traduction dans les différentes langues naturelles soient dans :file:`/" +"usr/share/locale` au format GNU :program:`gettext`. Voici ce que vous " +"pouvez alors mettre en haut de votre module ::" + +#: library/gettext.rst:587 +msgid "Localizing your application" +msgstr "Localiser votre application" + +#: library/gettext.rst:589 +msgid "" +"If you are localizing your application, you can install the :func:`_` " +"function globally into the built-in namespace, usually in the main driver " +"file of your application. This will let all your application-specific files " +"just use ``_('...')`` without having to explicitly install it in each file." +msgstr "" +"Si vous localisez votre application, vous pouvez positionner la fonction :" +"func:`_` de manière globale dans l'espace de nommage natif, généralement " +"dans le fichier principal de votre application. Cela permettra à tous les " +"fichiers de votre application de n'utiliser que ``_('...')`` sans devoir le " +"redéfinir explicitement dans chaque fichier." + +#: library/gettext.rst:594 +msgid "" +"In the simple case then, you need only add the following bit of code to the " +"main driver file of your application::" +msgstr "" +"Dans ce cas, vous n'aurez à ajouter que le bout de code suivant au fichier " +"principal de votre application ::" + +#: library/gettext.rst:600 +msgid "" +"If you need to set the locale directory, you can pass it into the :func:" +"`install` function::" +msgstr "" +"Si vous avez besoin de définir le dossier des localisations, vous pouvez le " +"mettre en argument de la fonction :func:`install` ::" + +#: library/gettext.rst:608 +msgid "Changing languages on the fly" +msgstr "Changer de langue à la volée" + +#: library/gettext.rst:610 +msgid "" +"If your program needs to support many languages at the same time, you may " +"want to create multiple translation instances and then switch between them " +"explicitly, like so::" +msgstr "" +"Si votre programme a besoin de prendre en charge plusieurs langues en même " +"temps, vous pouvez créer plusieurs instances de traduction, puis basculer " +"entre elles de façon explicite, comme ceci ::" + +#: library/gettext.rst:631 +msgid "Deferred translations" +msgstr "Traductions différées" + +#: library/gettext.rst:633 +msgid "" +"In most coding situations, strings are translated where they are coded. " +"Occasionally however, you need to mark strings for translation, but defer " +"actual translation until later. A classic example is::" +msgstr "" +"Dans la plupart des cas, en programmation, les chaînes de caractères sont " +"traduites à l'endroit où on les écrit. Cependant, il peut arriver que vous " +"ayez besoin de traduire une chaîne de caractères un peu plus loin. Un " +"exemple classique est ::" + +#: library/gettext.rst:646 +msgid "" +"Here, you want to mark the strings in the ``animals`` list as being " +"translatable, but you don't actually want to translate them until they are " +"printed." +msgstr "" +"Ici, vous voulez marquer les chaînes de caractères de la liste ``animals`` " +"comme étant traduisibles, mais ne les traduire qu'au moment de les afficher." + +#: library/gettext.rst:650 +msgid "Here is one way you can handle this situation::" +msgstr "Voici un moyen de gérer ce cas ::" + +#: library/gettext.rst:666 +msgid "" +"This works because the dummy definition of :func:`_` simply returns the " +"string unchanged. And this dummy definition will temporarily override any " +"definition of :func:`_` in the built-in namespace (until the :keyword:`del` " +"command). Take care, though if you have a previous definition of :func:`_` " +"in the local namespace." +msgstr "" +"Cela fonctionne car la définition factice de :func:`_` renvoie simplement la " +"chaîne de caractères passée en entrée. Et cette définition factice va " +"temporairement outrepasser toute autre définition de :func:`_` dans l'espace " +"de nommage natif (jusqu'à l'utilisation de la commande :keyword:`del`). " +"Attention toutefois si vous avez déjà une autre définition de :func:`_` dans " +"l'espace de nommage local." + +#: library/gettext.rst:672 +msgid "" +"Note that the second use of :func:`_` will not identify \"a\" as being " +"translatable to the :program:`gettext` program, because the parameter is not " +"a string literal." +msgstr "" +"À noter qu'à la deuxième utilisation de :func:`_`, \"a\" ne sera pas vue " +"comme traduisible par le programme :program:`gettext` car ce n'est pas un " +"chaîne au sens propre." + +#: library/gettext.rst:676 +msgid "Another way to handle this is with the following example::" +msgstr "Voici une autre solution ::" + +#: library/gettext.rst:690 +msgid "" +"In this case, you are marking translatable strings with the function :func:" +"`N_`, which won't conflict with any definition of :func:`_`. However, you " +"will need to teach your message extraction program to look for translatable " +"strings marked with :func:`N_`. :program:`xgettext`, :program:`pygettext`, " +"``pybabel extract``, and :program:`xpot` all support this through the use of " +"the :option:`!-k` command-line switch. The choice of :func:`N_` here is " +"totally arbitrary; it could have just as easily been :func:" +"`MarkThisStringForTranslation`." +msgstr "" +"Dans ce cas, les chaînes à traduire sont identifiées avec la fonction :func:" +"`N_`, qui n'entre pas en conflit avec définition de :func:`_`. Cependant, " +"il faudra apprendre à votre programme d'extraction de messages à rechercher " +"les chaînes de caractères à traduire parmi celles ayant le marqueur :func:" +"`N_`. :program:`xgettext`, :program:`pygettext`, ``pybabel extract`` et :" +"program:`xpot` prennent tous en charge cela grâce à l'option en ligne de " +"commande :option:`!-k`. Le choix du nom :func:`N_` ici est totalement " +"arbitraire et aurait très bien pu être :func:`MarqueurDeTraduction`." + +#: library/gettext.rst:701 +msgid "Acknowledgements" +msgstr "Remerciements" + +#: library/gettext.rst:703 +msgid "" +"The following people contributed code, feedback, design suggestions, " +"previous implementations, and valuable experience to the creation of this " +"module:" +msgstr "" +"Les personnes suivantes ont contribué au code, ont fait des retours, ont " +"participé aux suggestions de conception et aux implémentations précédentes, " +"et ont partagé leur expérience précieuse pour la création de ce module :" + +#: library/gettext.rst:706 +msgid "Peter Funk" +msgstr "Peter Funk" + +#: library/gettext.rst:708 +msgid "James Henstridge" +msgstr "James Henstridge" + +#: library/gettext.rst:710 +msgid "Juan David Ibáñez Palomar" +msgstr "Juan David Ibáñez Palomar" + +#: library/gettext.rst:712 +msgid "Marc-André Lemburg" +msgstr "Marc-André Lemburg" + +#: library/gettext.rst:714 +msgid "Martin von Löwis" +msgstr "Martin von Löwis" + +#: library/gettext.rst:716 +msgid "François Pinard" +msgstr "François Pinard" + +#: library/gettext.rst:718 +msgid "Barry Warsaw" +msgstr "Barry Warsaw" + +#: library/gettext.rst:720 +msgid "Gustavo Niemeyer" +msgstr "Gustavo Niemeyer" + +#: library/gettext.rst:723 +msgid "Footnotes" +msgstr "Notes" + +#: library/gettext.rst:724 +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/" +"locale`. The :mod:`gettext` module does not try to support these system " +"dependent defaults; instead its default is :file:`{sys.base_prefix}/share/" +"locale` (see :data:`sys.base_prefix`). For this reason, it is always best to " +"call :func:`bindtextdomain` with an explicit absolute path at the start of " +"your application." +msgstr "" +"Le dossier par défaut pour les localisations dépend du système : par " +"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.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." +msgstr "Voir la note de :func:`bindtextdomain` ci-dessus." diff --git a/library/glob.po b/library/glob.po new file mode 100644 index 0000000000..6c6e7413f0 --- /dev/null +++ b/library/glob.po @@ -0,0 +1,210 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-18 15:46+0200\n" +"PO-Revision-Date: 2022-02-11 13:53+0100\n" +"Last-Translator: Arnaud Fréalle \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 3.0\n" + +#: library/glob.rst:2 +msgid ":mod:`glob` --- Unix style pathname pattern expansion" +msgstr ":mod:`glob` — Recherche de chemins de style Unix selon certains motifs" + +#: library/glob.rst:7 +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." +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 " +"renvoyés dans un ordre arbitraire. Aucun remplacement du tilde n'est " +"réalisé, mais les caractères ``*``, ``?``, et les caractères ``[]`` " +"exprimant un intervalle sont correctement renvoyés. Cette opération est " +"réalisée en utilisant les fonctions :func:`os.scandir` et :func:`fnmatch." +"fnmatch` de concert, et sans invoquer une sous-commande. Notons qu'à la " +"différence de :func:`fnmatch.fnmatch`, :mod:`glob` traite les noms de " +"fichiers commençant par un point (``.``) comme des cas spéciaux. (Pour " +"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: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 ``'?'``." +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: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:44 +#, fuzzy +msgid "" +"Return a possibly empty list of path names that match *pathname*, which must " +"be a string containing a path specification. *pathname* can be either " +"absolute (like :file:`/usr/src/Python-1.5/Makefile`) or relative (like :file:" +"`../../Tools/\\*/\\*.gif`), and can contain shell-style wildcards. Broken " +"symlinks are included in the results (as in the shell). Whether or not the " +"results are sorted depends on the file system. If a file that satisfies " +"conditions is removed or added during the call of this function, whether a " +"path name for that file be included is unspecified." +msgstr "" +"Renvoie une liste, potentiellement vide, de chemins correspondant au motif " +"*pathname*, qui doit être une chaîne de caractères contenant la " +"spécification du chemin. *pathname* peut être soit absolu (comme :file:`/usr/" +"src/Python-1.5/Makefile`) soit relatif (comme :file:`../../Tools/\\*/\\*." +"gif`), et contenir un caractère de remplacement de style shell. Les liens " +"symboliques cassés sont aussi inclus dans les résultats (comme pour le " +"shell). Le fait que les résultats soient triés ou non dépend du système de " +"fichiers." + +#: library/glob.rst:53 +msgid "" +"If *root_dir* is not ``None``, it should be a :term:`path-like object` " +"specifying the root directory for searching. It has the same effect on :" +"func:`glob` as changing the current directory before calling it. If " +"*pathname* is relative, the result will contain paths relative to *root_dir*." +msgstr "" +"Si *root_dir* n'est pas ``None``, cela doit être un :term:`objet simili-" +"chemin ` spécifiant le dossier racine de la recherche. " +"Cela a le même effet sur :func:`glob` que de changer le dossier courant " +"avant l'appel de la fonction. Si *pathname* est relatif, les chemins du " +"résultat seront relatifs au *root_dir* ." + +#: library/glob.rst:59 +msgid "" +"This function can support :ref:`paths relative to directory descriptors " +"` with the *dir_fd* parameter." +msgstr "" +"Cette fonction prend en charge les :ref:`chemins relatifs aux descripteurs " +"de dossier ` avec le paramètre *dir_fd*." + +#: library/glob.rst:65 +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, " +"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:89 +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:90 +msgid "" +"Raises an :ref:`auditing event ` ``glob.glob/2`` with arguments " +"``pathname``, ``recursive``, ``root_dir``, ``dir_fd``." +msgstr "" +"Lève un :ref:`évènement d'audit ` ``glob.glob/2`` avec les " +"arguments ``pathname``, ``recursive``, ``root_dir``, ``dir_fd``." + +#: library/glob.rst:74 +msgid "" +"Using the \"``**``\" pattern in large directory trees may consume an " +"inordinate amount of time." +msgstr "" +"Utiliser le motif \"``**``\" dans de grandes arborescences de dossier peut " +"consommer une quantité de temps démesurée." + +#: library/glob.rst:92 +msgid "Support for recursive globs using \"``**``\"." +msgstr "Prise en charge des chemins récursifs utilisant le motif \"``**``\"." + +#: library/glob.rst:95 +msgid "Added the *root_dir* and *dir_fd* parameters." +msgstr "Paramètres *root_dir* et *dir_fd* ajoutés." + +#: library/glob.rst:86 +msgid "" +"Return an :term:`iterator` which yields the same values as :func:`glob` " +"without actually storing them all simultaneously." +msgstr "" +"Renvoie un :term:`itérateur ` qui produit les mêmes valeurs que :" +"func:`glob`, sans toutes les charger en mémoire simultanément." + +#: library/glob.rst:101 +msgid "" +"Escape all special characters (``'?'``, ``'*'`` and ``'['``). This is useful " +"if you want to match an arbitrary literal string that may have special " +"characters in it. Special characters in drive/UNC sharepoints are not " +"escaped, e.g. on Windows ``escape('//?/c:/Quo vadis?.txt')`` returns ``'//?/" +"c:/Quo vadis[?].txt'``." +msgstr "" +"Échappe tous les caractères spéciaux (``'?'``, ``'*'`` et ``'['``). Cela est " +"utile pour reconnaître une chaîne de caractère littérale arbitraire qui " +"contiendrait ce type de caractères. Les caractères spéciaux dans les disques " +"et répertoires partagés (chemins UNC) ne sont pas échappés, e.g. sous " +"Windows ``escape('//?/c:/Quo vadis?.txt')`` renvoie ``'//?/c:/Quo vadis[?]." +"txt'``." + +#: library/glob.rst:110 +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 " +"contains only the file :file:`3.txt`. :func:`glob` will produce the " +"following results. Notice how any leading components of the path are " +"preserved. ::" +msgstr "" +"Par exemple, considérons un répertoire contenant les fichiers suivants : :" +"file:`1.gif`, :file:`2.txt`, :file:`card.gif` et un sous-répertoire :file:" +"`sub` contenant seulement le fichier :file:`3.txt`. :func:`glob` produit " +"les résultats suivants. Notons que les composantes principales des chemins " +"sont préservées. ::" + +#: library/glob.rst:128 +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 :" +"file:`.card.gif`::" +msgstr "" +"Si le répertoire contient des fichiers commençant par ``.``, ils ne sont pas " +"reconnus par défaut. Par exemple, considérons un répertoire contenant :file:" +"`card.gif` et :file:`.card.gif` ::" + +#: library/glob.rst:140 +msgid "Module :mod:`fnmatch`" +msgstr "Module :mod:`fnmatch`" + +#: library/glob.rst:141 +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 new file mode 100644 index 0000000000..2b29ebb658 --- /dev/null +++ b/library/graphlib.po @@ -0,0 +1,312 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-22 22:57+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \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" + +#: 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 "**Code source:** :source:`Lib/graphlib.py`" + +#: library/graphlib.rst:20 +#, fuzzy +msgid "" +"Provides functionality to topologically sort a graph of :term:`hashable` " +"nodes." +msgstr "" +"Fournit les fonctionnalités pour trier topologiquement un graphe de nœuds " +"hachables." + +#: library/graphlib.rst:22 +msgid "" +"A topological order is a linear ordering of the vertices in a graph such " +"that for every directed edge u -> v from vertex u to vertex v, vertex u " +"comes before vertex v in the ordering. For instance, the vertices of the " +"graph may represent tasks to be performed, and the edges may represent " +"constraints that one task must be performed before another; in this example, " +"a topological ordering is just a valid sequence for the tasks. A complete " +"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 "" +"If the optional *graph* argument is provided it must be a dictionary " +"representing a directed acyclic graph where the keys are nodes and the " +"values are iterables of all predecessors of that node in the graph (the " +"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 "ajouter d'autres nœuds au graphe ;" + +#: library/graphlib.rst:43 +msgid "Call :meth:`~TopologicalSorter.prepare` on the graph." +msgstr "appeler :meth:`~TopologicalSorter.prepare` sur le graphe ;" + +#: library/graphlib.rst:44 +msgid "" +"While :meth:`~TopologicalSorter.is_active` is ``True``, iterate over the " +"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 "" +"In case just an immediate sorting of the nodes in the graph is required and " +"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 +#, fuzzy +msgid "" +"Add a new node and its predecessors to the graph. Both the *node* and all " +"elements in *predecessors* must be :term:`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 "" +"It is possible to add a node with no dependencies (*predecessors* is not " +"provided) or to provide a dependency twice. If a node that has not been " +"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 "" +"Mark the graph as finished and check for cycles in the graph. If any cycle " +"is detected, :exc:`CycleError` will be raised, but :meth:`~TopologicalSorter." +"get_ready` can still be used to obtain as many nodes as possible until " +"cycles block more progress. After a call to this function, the graph cannot " +"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 "" +"Returns ``True`` if more progress can be made and ``False`` otherwise. " +"Progress can be made if cycles do not block the resolution and either there " +"are still nodes ready that haven't yet been returned by :meth:" +"`TopologicalSorter.get_ready` or the number of nodes marked :meth:" +"`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 "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 "" +"Marks a set of nodes returned by :meth:`TopologicalSorter.get_ready` as " +"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 "" +"Raises :exc:`ValueError` if any node in *nodes* has already been marked as " +"processed by a previous call to this method or if a node was not added to " +"the graph by using :meth:`TopologicalSorter.add`, if called without calling :" +"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 "" +"Returns a ``tuple`` with all the nodes that are ready. Initially it returns " +"all nodes with no predecessors, and once those are marked as processed by " +"calling :meth:`TopologicalSorter.done`, further calls will return all new " +"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 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: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: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:192 +msgid "If any cycle is detected, :exc:`CycleError` will be raised." +msgstr "Si un circuit est détecté alors une :exc:`CycleError` est levée." + +#: library/graphlib.rst:198 +msgid "Exceptions" +msgstr "Exceptions" + +#: library/graphlib.rst:199 +msgid "The :mod:`graphlib` module defines the following exception classes:" +msgstr "Le module :mod:`graphlib` définit les classes d'exceptions suivantes :" + +#: 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: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 " +"list of nodes, such that each node is, in the graph, an immediate " +"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 new file mode 100644 index 0000000000..26a523e5e2 --- /dev/null +++ b/library/grp.po @@ -0,0 +1,149 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-18 15:46+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \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" + +#: library/grp.rst:2 +msgid ":mod:`grp` --- The group database" +msgstr "" + +#: library/grp.rst:10 +msgid "" +"This module provides access to the Unix group database. It is available on " +"all Unix versions." +msgstr "" + +#: library/grp.rst:13 +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 ````):" +msgstr "" + +#: library/grp.rst:18 +msgid "Index" +msgstr "Index" + +#: library/grp.rst:18 +msgid "Attribute" +msgstr "Attribut" + +#: library/grp.rst:18 +msgid "Meaning" +msgstr "Signification" + +#: library/grp.rst:20 +msgid "0" +msgstr "0" + +#: library/grp.rst:20 +msgid "gr_name" +msgstr "gr_name" + +#: library/grp.rst:20 +msgid "the name of the group" +msgstr "" + +#: library/grp.rst:22 +msgid "1" +msgstr "1" + +#: library/grp.rst:22 +msgid "gr_passwd" +msgstr "gr_passwd" + +#: library/grp.rst:22 +msgid "the (encrypted) group password; often empty" +msgstr "" + +#: library/grp.rst:25 +msgid "2" +msgstr "2" + +#: library/grp.rst:25 +msgid "gr_gid" +msgstr "gr_gid" + +#: library/grp.rst:25 +msgid "the numerical group ID" +msgstr "" + +#: library/grp.rst:27 +msgid "3" +msgstr "3" + +#: library/grp.rst:27 +msgid "gr_mem" +msgstr "gr_mem" + +#: library/grp.rst:27 +msgid "all the group member's user names" +msgstr "" + +#: library/grp.rst:31 +msgid "" +"The gid is an integer, name and password are strings, and the member list is " +"a list of strings. (Note that most users are not explicitly listed as " +"members of the group they are in according to the password database. Check " +"both databases to get complete membership information. Also note that a " +"``gr_name`` that starts with a ``+`` or ``-`` is likely to be a YP/NIS " +"reference and may not be accessible via :func:`getgrnam` or :func:" +"`getgrgid`.)" +msgstr "" + +#: library/grp.rst:38 +msgid "It defines the following items:" +msgstr "" + +#: library/grp.rst:43 +msgid "" +"Return the group database entry for the given numeric group ID. :exc:" +"`KeyError` is raised if the entry asked for cannot be found." +msgstr "" + +#: library/grp.rst:46 +msgid "" +":exc:`TypeError` is raised for non-integer arguments like floats or strings." +msgstr "" + +#: library/grp.rst:51 +msgid "" +"Return the group database entry for the given group name. :exc:`KeyError` is " +"raised if the entry asked for cannot be found." +msgstr "" + +#: library/grp.rst:57 +msgid "Return a list of all available group entries, in arbitrary order." +msgstr "" + +#: library/grp.rst:63 +msgid "Module :mod:`pwd`" +msgstr "Module :mod:`pwd`" + +#: library/grp.rst:63 +#, fuzzy +msgid "An interface to the user database, similar to this." +msgstr "Interface pour la base de données des groupes, similaire à celle-ci." + +#: library/grp.rst:65 +#, fuzzy +msgid "Module :mod:`spwd`" +msgstr "Module :mod:`pwd`" + +#: library/grp.rst:66 +#, fuzzy +msgid "An interface to the shadow password database, similar to this." +msgstr "" +"Interface pour la base de données (normale) des mots de passe, semblable à " +"ceci." diff --git a/library/gzip.po b/library/gzip.po new file mode 100644 index 0000000000..ae86d39ddb --- /dev/null +++ b/library/gzip.po @@ -0,0 +1,450 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +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: 2018-10-07 15:03+0200\n" +"Last-Translator: Lomanic \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 1.8.11\n" + +#: library/gzip.rst:2 +msgid ":mod:`gzip` --- Support for :program:`gzip` files" +msgstr ":mod:`gzip` — Support pour les fichiers :program:`gzip`" + +#: library/gzip.rst:7 +msgid "**Source code:** :source:`Lib/gzip.py`" +msgstr "**Code source :** :source:`Lib/gzip.py`" + +#: library/gzip.rst:11 +msgid "" +"This module provides a simple interface to compress and decompress files " +"just like the GNU programs :program:`gzip` and :program:`gunzip` would." +msgstr "" +"Ce module fournit une interface simple pour compresser et décompresser des " +"fichiers tout comme le font les programmes GNU :program:`gzip` et :program:" +"`gunzip`." + +#: library/gzip.rst:14 +msgid "The data compression is provided by the :mod:`zlib` module." +msgstr "La compression de données est fournie par le module :mod:`zlib`." + +#: library/gzip.rst:16 +msgid "" +"The :mod:`gzip` module provides the :class:`GzipFile` class, as well as the :" +"func:`.open`, :func:`compress` and :func:`decompress` convenience functions. " +"The :class:`GzipFile` class reads and writes :program:`gzip`\\ -format " +"files, automatically compressing or decompressing the data so that it looks " +"like an ordinary :term:`file object`." +msgstr "" +"Le module :mod:`gzip` fournit la classe :class:`GzipFile` ainsi que les " +"fonctions pratiques :func:`.open`, :func:`compress` et :func:`decompress`. " +"La classe :class:`GzipFile` lit et écrit des fichiers au format :program:" +"`gzip`, compressant et décompressant automatiquement les données pour " +"qu'elles aient l'apparence d'un objet :term:`file object` ordinaire." + +#: library/gzip.rst:22 +msgid "" +"Note that additional file formats which can be decompressed by the :program:" +"`gzip` and :program:`gunzip` programs, such as those produced by :program:" +"`compress` and :program:`pack`, are not supported by this module." +msgstr "" +"Notez que les formats de fichier supplémentaires qui peuvent être " +"décompressés par les programmes :program:`gzip` et :program:`gunzip`, comme " +"ceux produits par le programmes :program:`compress` et :program:`pack`, ne " +"sont pas gérés par ce module." + +#: library/gzip.rst:26 +msgid "The module defines the following items:" +msgstr "Le module définit les éléments suivants :" + +#: library/gzip.rst:31 +msgid "" +"Open a gzip-compressed file in binary or text mode, returning a :term:`file " +"object`." +msgstr "" +"Ouvre un fichier compressé en *gzip* en mode binaire ou texte, renvoie un " +"objet :term:`file object`." + +#: library/gzip.rst:34 +msgid "" +"The *filename* argument can be an actual filename (a :class:`str` or :class:" +"`bytes` object), or an existing file object to read from or write to." +msgstr "" +"L'argument *filename* peut être un nom de fichier (un objet :class:`str` ou :" +"class:`bytes`) ou un objet fichier existant que l'on peut lire, ou où l'on " +"peut écrire." + +#: library/gzip.rst:37 +msgid "" +"The *mode* argument can be any of ``'r'``, ``'rb'``, ``'a'``, ``'ab'``, " +"``'w'``, ``'wb'``, ``'x'`` or ``'xb'`` for binary mode, or ``'rt'``, " +"``'at'``, ``'wt'``, or ``'xt'`` for text mode. The default is ``'rb'``." +msgstr "" +"L'argument *mode* peut-être ``'r'``, ``'rb'``, ``'a'``, ``'ab'``, ``'w'``, " +"``'wb'``, ``'x'`` ou ``'xb'`` pour le mode binaire ou ``'rt'``, ``'at'``, " +"``'wt'``, ou ``'xt'`` pour le mode texte. Le mode par défaut est ``'rb'``." + +#: library/gzip.rst:41 +msgid "" +"The *compresslevel* argument is an integer from 0 to 9, as for the :class:" +"`GzipFile` constructor." +msgstr "" +"L'argument *compresslevel* est un entier de 0 à 9, comme pour le " +"constructeur de la classe :class:`GzipFile`." + +#: library/gzip.rst:44 +msgid "" +"For binary mode, this function is equivalent to the :class:`GzipFile` " +"constructor: ``GzipFile(filename, mode, compresslevel)``. In this case, the " +"*encoding*, *errors* and *newline* arguments must not be provided." +msgstr "" +"En mode binaire, cette fonction est équivalente au constructeur de la " +"classe :class:`GzipFile` : ``GzipFile(filename, mode, compresslevel)``. Dans " +"ce cas, les arguments *encoding*, *errors* et *newline* ne doivent pas être " +"fournis." + +#: library/gzip.rst:48 +msgid "" +"For text mode, a :class:`GzipFile` object is created, and wrapped in an :" +"class:`io.TextIOWrapper` instance with the specified encoding, error " +"handling behavior, and line ending(s)." +msgstr "" +"En mode texte, un objet :class:`GzipFile` est créé et empaqueté dans une " +"instance de :class:`io.TextIOWrapper` avec l'encodage, la gestion d'erreur " +"et les fins de ligne spécifiés." + +#: library/gzip.rst:52 +msgid "" +"Added support for *filename* being a file object, support for text mode, and " +"the *encoding*, *errors* and *newline* arguments." +msgstr "" +"Ajout de la prise en charge de *filename* en tant qu'objet *file*, du mode " +"texte et des arguments *encoding*, *errors* et *newline*." + +#: library/gzip.rst:56 +msgid "Added support for the ``'x'``, ``'xb'`` and ``'xt'`` modes." +msgstr "Ajout de la prise en charge des modes ``'x'``, ``'xb'`` et ``'xt'``." + +#: library/gzip.rst:165 +msgid "Accepts a :term:`path-like object`." +msgstr "Accepte un :term:`path-like object`." + +#: library/gzip.rst:64 +msgid "" +"An exception raised for invalid gzip files. It inherits :exc:`OSError`. :" +"exc:`EOFError` and :exc:`zlib.error` can also be raised for invalid gzip " +"files." +msgstr "" + +#: library/gzip.rst:72 +msgid "" +"Constructor for the :class:`GzipFile` class, which simulates most of the " +"methods of a :term:`file object`, with the exception of the :meth:`truncate` " +"method. At least one of *fileobj* and *filename* must be given a non-" +"trivial value." +msgstr "" +"Constructeur de la classe :class:`GzipFile` qui simule la plupart des " +"méthodes d'un objet :term:`file object` à l'exception de la méthode :meth:" +"`truncate`. Au moins un des arguments *fileobj* et *filename* doit avoir une " +"valeur non triviale." + +#: library/gzip.rst:77 +msgid "" +"The new class instance is based on *fileobj*, which can be a regular file, " +"an :class:`io.BytesIO` object, or any other object which simulates a file. " +"It defaults to ``None``, in which case *filename* is opened to provide a " +"file object." +msgstr "" +"La nouvelle instance de classe est basée sur *fileobj* qui peut être un " +"fichier usuel, un objet :class:`io.BytesIO` ou tout autre objet qui simule " +"un fichier. *fileobj* est par défaut à *None*, dans ce cas *filename* est " +"ouvert afin de fournir un objet fichier." + +#: library/gzip.rst:82 +msgid "" +"When *fileobj* is not ``None``, the *filename* argument is only used to be " +"included in the :program:`gzip` file header, which may include the original " +"filename of the uncompressed file. It defaults to the filename of " +"*fileobj*, if discernible; otherwise, it defaults to the empty string, and " +"in this case the original filename is not included in the header." +msgstr "" +"Quand *fileobj* n'est pas à ``None``, l'argument *filename* est uniquement " +"utilisé pour être inclus dans l'entête du fichier :program:`gzip`, qui peut " +"inclure le nom original du fichier décompressé. Il est par défaut défini " +"avec le nom de fichier de *fileobj* s'il est discernable, sinon il est par " +"défaut défini à une chaîne de caractères vide et dans ce cas le nom du " +"fichier orignal n'est pas inclus dans l'entête." + +#: library/gzip.rst:88 +#, fuzzy +msgid "" +"The *mode* argument can be any of ``'r'``, ``'rb'``, ``'a'``, ``'ab'``, " +"``'w'``, ``'wb'``, ``'x'``, or ``'xb'``, depending on whether the file will " +"be read or written. The default is the mode of *fileobj* if discernible; " +"otherwise, the default is ``'rb'``. In future Python releases the mode of " +"*fileobj* will not be used. It is better to always specify *mode* for " +"writing." +msgstr "" +"L'argument *mode* peut-être ``'r'``, ``'rb'``, ``'a'``, ``'ab'``, ``'w'``, " +"``'wb'``, ``'x'``, ou ``'xb'``, selon que le fichier va être lu ou écrit. " +"Par défaut prend la valeur du mode de *fileobj* si discernable ; sinon, la " +"valeur par défaut est ``'rb'``." + +#: library/gzip.rst:94 +msgid "" +"Note that the file is always opened in binary mode. To open a compressed " +"file in text mode, use :func:`.open` (or wrap your :class:`GzipFile` with " +"an :class:`io.TextIOWrapper`)." +msgstr "" +"Notez que le fichier est toujours ouvert en mode binaire. Pour ouvrir un " +"fichier compressé en mode texte, utilisez la fonction :func:`.open` (ou " +"empaquetez votre classe :class:`GzipFile` avec un :class:`io.TextIOWrapper`)." + +#: library/gzip.rst:98 +msgid "" +"The *compresslevel* argument is an integer from ``0`` to ``9`` controlling " +"the level of compression; ``1`` is fastest and produces the least " +"compression, and ``9`` is slowest and produces the most compression. ``0`` " +"is no compression. The default is ``9``." +msgstr "" +"L'argument *compresslevel* est un entier de ``0`` à ``9`` contrôlant le " +"niveau de compression, ``1`` est le plus rapide et produit la compression la " +"plus faible et ``9`` est le plus rapide et produit la compression la plus " +"élevée. ``0`` désactive la compression. Par défaut à ``9``." + +#: library/gzip.rst:103 +msgid "" +"The *mtime* argument is an optional numeric timestamp to be written to the " +"last modification time field in the stream when compressing. It should only " +"be provided in compression mode. If omitted or ``None``, the current time " +"is used. See the :attr:`mtime` attribute for more details." +msgstr "" +"L'argument *mtime* est un *timestamp* numérique optionnel à écrire dans le " +"champ de date de dernière modification du flux durant la compression. Il ne " +"doit être défini qu'en mode compression. S'il est omis ou ``None``, la date " +"courante est utilisée. Voir l'attribut :attr:`mtime` pour plus de détails." + +#: library/gzip.rst:108 +msgid "" +"Calling a :class:`GzipFile` object's :meth:`close` method does not close " +"*fileobj*, since you might wish to append more material after the compressed " +"data. This also allows you to pass an :class:`io.BytesIO` object opened for " +"writing as *fileobj*, and retrieve the resulting memory buffer using the :" +"class:`io.BytesIO` object's :meth:`~io.BytesIO.getvalue` method." +msgstr "" +"Appeler la méthode :meth:`close` d'un objet :class:`GzipFile` ne ferme pas " +"*fileobj*, puisque vous pourriez avoir besoin d'ajouter des informations " +"après les données compressées. Cela vous permet aussi de passer un objet :" +"class:`io.BytesIO` ouvert en écriture en tant que *fileobj* et récupérer le " +"tampon mémoire final en utilisant la méthode :meth:`~io.BytesIO.getvalue` de " +"l'objet :class:`io.BytesIO`." + +#: library/gzip.rst:114 +msgid "" +":class:`GzipFile` supports the :class:`io.BufferedIOBase` interface, " +"including iteration and the :keyword:`with` statement. Only the :meth:" +"`truncate` method isn't implemented." +msgstr "" +":La classe :class:`GzipFile` implémente l'interface :class:`io." +"BufferedIOBase`, incluant l'itération, la déclaration :keyword:`with`. La " +"méthode :meth:`truncate` est la seule non implémentée." + +#: library/gzip.rst:118 +msgid ":class:`GzipFile` also provides the following method and attribute:" +msgstr "" +"La classe :class:`GzipFile` fournit aussi la méthode et l'attribut suivant :" + +#: library/gzip.rst:122 +msgid "" +"Read *n* uncompressed bytes without advancing the file position. At most one " +"single read on the compressed stream is done to satisfy the call. The " +"number of bytes returned may be more or less than requested." +msgstr "" +"Lit *n* octets non compressés sans avancer la position dans le fichier. Au " +"plus une seule lecture sur le flux compressé est faite pour satisfaire " +"l'appel. Le nombre d'octets retournés peut être supérieur ou inférieur au " +"nombre demandé." + +#: library/gzip.rst:127 +msgid "" +"While calling :meth:`peek` does not change the file position of the :class:" +"`GzipFile`, it may change the position of the underlying file object (e.g. " +"if the :class:`GzipFile` was constructed with the *fileobj* parameter)." +msgstr "" +"Bien que l'appel à :meth:`peek` ne change pas la position dans le fichier de " +"l'objet :class:`GzipFile`, il peut changer la position de l'objet de fichier " +"sous-jacent (par exemple, si l'instance de :class:`GzipFile` a été " +"construite avec le paramètre *fileobj*)." + +#: library/gzip.rst:136 +msgid "" +"When decompressing, the value of the last modification time field in the " +"most recently read header may be read from this attribute, as an integer. " +"The initial value before reading any headers is ``None``." +msgstr "" +"Lors de la décompression, la valeur du champ de date de dernière " +"modification dans le dernier en-tête lu peut être lue à partir de cet " +"attribut, comme un entier. La valeur initiale avant lecture d'un en-tête est " +"``None``." + +#: library/gzip.rst:140 +msgid "" +"All :program:`gzip` compressed streams are required to contain this " +"timestamp field. Some programs, such as :program:`gunzip`\\ , make use of " +"the timestamp. The format is the same as the return value of :func:`time." +"time` and the :attr:`~os.stat_result.st_mtime` attribute of the object " +"returned by :func:`os.stat`." +msgstr "" +"Tous les flux compressés en :program:`gzip` doivent contenir ce champ " +"*timestamp*. Certains programmes, comme :program:`gunzip`\\ , utilisent ce " +"*timestamp*. Ce format est le même que la valeur retour de :func:`time.time` " +"et l'attribut :attr:`~os.stat_result.st_mtime` de l'objet retourné par :func:" +"`os.stat`." + +#: library/gzip.rst:146 +msgid "" +"Support for the :keyword:`with` statement was added, along with the *mtime* " +"constructor argument and :attr:`mtime` attribute." +msgstr "" +"Ajout de la prise en charge du mot-clef :keyword:`with`, ainsi que de " +"l'argument *mtime* du constructeur et de l'attribut :attr:`mtime`." + +#: library/gzip.rst:150 +msgid "Support for zero-padded and unseekable files was added." +msgstr "" +"Ajout de la prise en charge des fichiers non navigables ou commençant par " +"des octets nuls." + +#: library/gzip.rst:153 +msgid "The :meth:`io.BufferedIOBase.read1` method is now implemented." +msgstr "La méthode :meth:`io.BufferedIOBase.read1` est désormais implémentée." + +#: library/gzip.rst:156 +msgid "Added support for the ``'x'`` and ``'xb'`` modes." +msgstr "Ajout de la prise en charge des modes ``'x'`` et ``'xb'``." + +#: library/gzip.rst:159 +msgid "" +"Added support for writing arbitrary :term:`bytes-like objects `. The :meth:`~io.BufferedIOBase.read` method now accepts an argument " +"of ``None``." +msgstr "" +"Ajout de la prise en charge de l'écriture d'objets :term:`bytes-like objects " +"` arbitraires. La méthode :meth:`~io.BufferedIOBase.read` " +"accepte désormais un argument de valeur ``None``." + +#: library/gzip.rst:168 +msgid "" +"Opening :class:`GzipFile` for writing without specifying the *mode* argument " +"is deprecated." +msgstr "" + +#: library/gzip.rst:175 +#, fuzzy +msgid "" +"Compress the *data*, returning a :class:`bytes` object containing the " +"compressed data. *compresslevel* and *mtime* have the same meaning as in " +"the :class:`GzipFile` constructor above." +msgstr "" +"Compresse les données *data*, renvoie un objet :class:`bytes` contenant les " +"données compressées. L'argument *compresslevel* a la même signification que " +"dans le constructeur de la classe :class:`GzipFile` ci-dessus." + +#: library/gzip.rst:180 +msgid "Added the *mtime* parameter for reproducible output." +msgstr "" + +#: library/gzip.rst:185 +msgid "" +"Decompress the *data*, returning a :class:`bytes` object containing the " +"uncompressed data." +msgstr "" +"Décompresse les données *data*, retourne un objet :class:`bytes` contenant " +"les données décompressées." + +#: library/gzip.rst:194 +msgid "Examples of usage" +msgstr "Exemples d'utilisation" + +#: library/gzip.rst:196 +msgid "Example of how to read a compressed file::" +msgstr "Exemple montrant comment lire un fichier compressé ::" + +#: library/gzip.rst:202 +msgid "Example of how to create a compressed GZIP file::" +msgstr "Exemple montrant comment créer un fichier GZIP ::" + +#: library/gzip.rst:209 +msgid "Example of how to GZIP compress an existing file::" +msgstr "" +"Exemple montrant comment compresser dans un GZIP un fichier existant ::" + +#: library/gzip.rst:217 +msgid "Example of how to GZIP compress a binary string::" +msgstr "" +"Exemple montrant comment compresser dans un GZIP un binaire dans une " +"chaîne ::" + +#: library/gzip.rst:226 +msgid "Module :mod:`zlib`" +msgstr "Module :mod:`zlib`" + +#: library/gzip.rst:226 +msgid "" +"The basic data compression module needed to support the :program:`gzip` file " +"format." +msgstr "" +"Le module de compression de données de base nécessaire pour gérer le format " +"de fichier :program:`gzip`." + +#: library/gzip.rst:233 +msgid "Command Line Interface" +msgstr "Interface en ligne de commande" + +#: library/gzip.rst:235 +msgid "" +"The :mod:`gzip` module provides a simple command line interface to compress " +"or decompress files." +msgstr "" + +#: library/gzip.rst:238 +msgid "Once executed the :mod:`gzip` module keeps the input file(s)." +msgstr "" + +#: library/gzip.rst:242 +msgid "" +"Add a new command line interface with a usage. By default, when you will " +"execute the CLI, the default compression level is 6." +msgstr "" + +#: library/gzip.rst:246 +msgid "Command line options" +msgstr "Options de la ligne de commande" + +#: library/gzip.rst:250 +msgid "If *file* is not specified, read from :attr:`sys.stdin`." +msgstr "" + +#: library/gzip.rst:254 +msgid "Indicates the fastest compression method (less compression)." +msgstr "" + +#: library/gzip.rst:258 +msgid "Indicates the slowest compression method (best compression)." +msgstr "" + +#: library/gzip.rst:262 +msgid "Decompress the given file." +msgstr "" + +#: library/gzip.rst:266 +msgid "Show the help message." +msgstr "Affiche le message d'aide." diff --git a/library/hashlib.po b/library/hashlib.po new file mode 100644 index 0000000000..25a1f4229a --- /dev/null +++ b/library/hashlib.po @@ -0,0 +1,1131 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-22 22:57+0100\n" +"PO-Revision-Date: 2022-10-18 15:55+0200\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.3\n" + +#: library/hashlib.rst:2 +msgid ":mod:`hashlib` --- Secure hashes and message digests" +msgstr "" +":mod:`hashlib` --- Algorithmes de hachage sécurisés et synthèse de messages" + +#: library/hashlib.rst:10 +msgid "**Source code:** :source:`Lib/hashlib.py`" +msgstr "**Code source :** :source:`Lib/hashlib.py`" + +#: library/hashlib.rst:23 +msgid "" +"This module implements a common interface to many different secure hash and " +"message digest algorithms. Included are the FIPS secure hash algorithms " +"SHA1, SHA224, SHA256, SHA384, and SHA512 (defined in FIPS 180-2) as well as " +"RSA's MD5 algorithm (defined in internet :rfc:`1321`). The terms \"secure " +"hash\" and \"message digest\" are interchangeable. Older algorithms were " +"called message digests. The modern term is secure hash." +msgstr "" +"Ce module implémente une interface commune à différents algorithmes de " +"hachage sécurisés et de synthèse de messages. Sont inclus les algorithmes " +"standards FIPS de hachage SHA1, SHA224, SHA256, SHA384, et SHA512 (définis " +"dans FIPS 180-2) ainsi que l'algorithme MD5 de RSA (défini par la :rfc:" +"`1321`). Les termes \"algorithmes de hachage sécurisé\" et \"algorithme de " +"synthèse de message\" sont interchangeables. Les anciens algorithmes étaient " +"appelés\" algorithmes de synthèse de messages\". Le terme moderne est " +"\"algorithme de hachage sécurisé\"." + +#: library/hashlib.rst:32 +msgid "" +"If you want the adler32 or crc32 hash functions, they are available in the :" +"mod:`zlib` module." +msgstr "" +"Si vous préférez utiliser les fonctions de hachage *adler32* ou *crc32*, " +"elles sont disponibles dans le module :mod:`zlib`." + +#: library/hashlib.rst:37 +msgid "" +"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." + +#: library/hashlib.rst:44 +msgid "Hash algorithms" +msgstr "Algorithmes de hachage" + +#: library/hashlib.rst:46 +msgid "" +"There is one constructor method named for each type of :dfn:`hash`. All " +"return a hash object with the same simple interface. For example: use :func:" +"`sha256` to create a SHA-256 hash object. You can now feed this object with :" +"term:`bytes-like objects ` (normally :class:`bytes`) " +"using the :meth:`update` method. At any point you can ask it for the :dfn:" +"`digest` of the concatenation of the data fed to it so far using the :meth:" +"`digest` or :meth:`hexdigest` methods." +msgstr "" +"Il y a un constructeur nommé selon chaque type de :dfn:`hash`. Tous " +"retournent un objet haché avec la même interface. Par exemple : utilisez :" +"func:`sha256` pour créer un objet haché de type SHA-256. Vous pouvez " +"maintenant utiliser cet objet :term:`bytes-like objects ` " +"(normalement des :class:`bytes`) en utilisant la méthode :meth:`update`. À " +"tout moment vous pouvez demander le :dfn:`digest` de la concaténation des " +"données fournies en utilisant les méthodes :meth:`digest` ou :meth:" +"`hexdigest`." + +#: library/hashlib.rst:56 +msgid "" +"For better multithreading performance, the Python :term:`GIL` is released " +"for data larger than 2047 bytes at object creation or on update." +msgstr "" +"Pour de meilleures performances avec de multiples fils d'exécution, le :term:" +"`GIL` Python est relâché pour des données dont la taille est supérieure à " +"2047 octets lors de leur création ou leur mise à jour." + +#: library/hashlib.rst:61 +msgid "" +"Feeding string objects into :meth:`update` is not supported, as hashes work " +"on bytes, not on characters." +msgstr "" +"Fournir des objets chaînes de caractères à la méthode :meth:`update` n'est " +"pas implémenté, comme les fonctions de hachages travaillent sur des *bytes* " +"et pas sur des caractères." + +#: library/hashlib.rst:66 +#, fuzzy +msgid "" +"Constructors for hash algorithms that are always present in this module are :" +"func:`sha1`, :func:`sha224`, :func:`sha256`, :func:`sha384`, :func:" +"`sha512`, :func:`blake2b`, and :func:`blake2s`. :func:`md5` is normally " +"available as well, though it may be missing or blocked if you are using a " +"rare \"FIPS compliant\" build of Python. Additional algorithms may also be " +"available depending upon the OpenSSL library that Python uses on your " +"platform. On most platforms the :func:`sha3_224`, :func:`sha3_256`, :func:" +"`sha3_384`, :func:`sha3_512`, :func:`shake_128`, :func:`shake_256` are also " +"available." +msgstr "" +"Les constructeurs pour les algorithmes de hachage qui sont toujours présents " +"dans ce module sont :func:`sha1`, :func:`sha224`, :func:`sha256`, :func:" +"`sha384`, :func:`sha512`, :func:`blake2b`, et :func:`blake2s`. :func:`md5` " +"est normalement disponible aussi, mais il peut être manquant si vous " +"utilisez une forme rare de Python \"conforme FIPS\" . Des algorithmes " +"additionnels peuvent aussi être disponibles dépendant de la librairie " +"OpenSSL que Python utilise sur votre plate-forme. Sur la plupart des plates-" +"formes les fonctions :func:`sha3_224`, :func:`sha3_256`, :func:`sha3_384`, :" +"func:`sha3_512`, :func:`shake_128`, :func:`shake_256` sont aussi disponibles." + +#: library/hashlib.rst:76 +msgid "" +"SHA3 (Keccak) and SHAKE constructors :func:`sha3_224`, :func:`sha3_256`, :" +"func:`sha3_384`, :func:`sha3_512`, :func:`shake_128`, :func:`shake_256`." +msgstr "" +"Les constructeurs SHA3 (Keccak) et SHAKE :func:`sha3_224`, :func:" +"`sha3_256`, :func:`sha3_384`, :func:`sha3_512`, :func:`shake_128`, :func:" +"`shake_256`." + +#: library/hashlib.rst:80 +msgid ":func:`blake2b` and :func:`blake2s` were added." +msgstr "Les fonctions :func:`blake2b` et :func:`blake2s` ont été ajoutées." + +#: 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 " +"hashing algorithms in restricted environments. ``False`` indicates that the " +"hashing algorithm is not used in a security context, e.g. as a non-" +"cryptographic one-way compression function." +msgstr "" + +#: library/hashlib.rst:92 +msgid "Hashlib now uses SHA3 and SHAKE from OpenSSL 1.1.1 and newer." +msgstr "" + +#: library/hashlib.rst:94 +msgid "" +"For example, to obtain the digest of the byte string ``b'Nobody inspects the " +"spammish repetition'``::" +msgstr "" +"Par exemple, pour obtenir l'empreinte de la chaîne ``b'Nobody inspects the " +"spammish repetition'`` ::" + +#: library/hashlib.rst:108 +msgid "More condensed:" +msgstr "En plus condensé ::" + +#: 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 " +"above listed hashes as well as any other algorithms that your OpenSSL " +"library may offer. The named constructors are much faster than :func:`new` " +"and should be preferred." +msgstr "" +"Est un constructeur générique qui prend comme premier paramètre le nom de " +"l'algorithme désiré (*name*) . Il existe pour permettre l'accès aux " +"algorithmes listés ci-dessus ainsi qu'aux autres algorithmes que votre " +"librairie OpenSSL peut offrir. Les constructeurs nommés sont beaucoup plus " +"rapides que :func:`new` et doivent être privilégiés." + +#: 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:128 +msgid "Hashlib provides the following constant attributes:" +msgstr "*Hashlib* fournit les constantes suivantes ::" + +#: 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 " +"some upstream vendors offering an odd \"FIPS compliant\" Python build that " +"excludes it." +msgstr "" +"Un ensemble contenant les noms des algorithmes de hachage garantis d'être " +"implémentés par ce module sur toutes les plate-formes. Notez que *md5* est " +"dans cette liste malgré certains éditeurs qui offrent une implémentation " +"Python de la librairie compatible FIPS l'excluant." + +#: 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 :" +"func:`new`. :attr:`algorithms_guaranteed` will always be a subset. The " +"same algorithm may appear multiple times in this set under different names " +"(thanks to OpenSSL)." +msgstr "" +"Un ensemble contenant les noms des algorithmes de hachage disponibles dans " +"l'interpréteur Python. Ces noms sont reconnus lorsqu'ils sont passés à la " +"fonction :func:`new`. :attr:`algorithms_guaranteed` est toujours un sous-" +"ensemble. Le même algorithme peut apparaître plusieurs fois dans cet " +"ensemble sous un nom différent (grâce à OpenSSL)." + +#: library/hashlib.rst:149 +msgid "" +"The following values are provided as constant attributes of the hash objects " +"returned by the constructors:" +msgstr "" +"Les valeurs suivantes sont fournis en tant qu'attributs constants des objets " +"hachés retournés par les constructeurs ::" + +#: 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: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:161 +msgid "A hash object has the following attributes:" +msgstr "L'objet haché possède les attributs suivants ::" + +#: 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." +msgstr "" +"Le nom canonique de cet objet haché, toujours en minuscule et toujours " +"transmissible à la fonction :func:`new` pour créer un autre objet haché de " +"ce type." + +#: 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 " +"platforms." +msgstr "" +"L'attribut *name* est présent dans CPython depuis sa création, mais n'était " +"pas spécifié formellement jusqu'à Python 3.4, il peut ne pas exister sur " +"certaines plate-formes." + +#: 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: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: " +"``m.update(a); m.update(b)`` is equivalent to ``m.update(a+b)``." +msgstr "" +"Met à jour l'objet haché avec :term:`bytes-like object`. Les appels répétés " +"sont équivalent à la concaténation de tous les arguments : ``m.update(a); m." +"update(b)`` est équivalent à ``m.update(a+b)``." + +#: 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 " +"supplied by OpenSSL." +msgstr "" +"Le GIL Python est relâché pour permettre aux autres fils d'exécution de " +"tourner pendant que la fonction de hachage met à jour des données plus " +"larges que 2047 octets, lorsque les algorithmes fournis par OpenSSL sont " +"utilisés." + +#: 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 " +"in the whole range from 0 to 255." +msgstr "" +"Renvoie le *digest* des données passées à la méthode :meth:`update`. C'est " +"un objet de type *bytes* de taille :attr:`digest_size` qui contient des " +"octets dans l'intervalle 0 à 255." + +#: 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 " +"exchange the value safely in email or other non-binary environments." +msgstr "" +"Comme la méthode :meth:`digest` sauf que le *digest* renvoyé est une chaîne " +"de caractères de longueur double, contenant seulement des chiffres " +"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: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." +msgstr "" +"Renvoie une copie (\"clone\") de l'objet haché. Cela peut être utilisé pour " +"calculer efficacement les *digests* de données partageant des sous-chaînes " +"communes." + +#: library/hashlib.rst:210 +msgid "SHAKE variable length digests" +msgstr "Synthèse de messages de taille variable SHAKE" + +#: 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 " +"such, their digest methods require a length. Maximum length is not limited " +"by the SHAKE algorithm." +msgstr "" +"Les algorithmes :func:`shake_128` et :func:`shake_256` fournissent des " +"messages de longueur variable avec des ``longueurs_en_bits // 2`` jusqu'à " +"128 ou 256 bits de sécurité. Leurs méthodes *digests* requièrent une " +"longueur. Les longueurs maximales ne sont pas limitées par l'algorithme " +"SHAKE." + +#: 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 " +"range from 0 to 255." +msgstr "" +"Renvoie le *digest* des données passées à la méthode :meth:`update`. C'est " +"un objet de type *bytes* de taille *length* qui contient des octets dans " +"l'intervalle 0 à 255." + +#: library/hashlib.rst:232 +msgid "Key derivation" +msgstr "Dérivation de clé" + +#: 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 `_." +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 " +"``sha1(password)`` ne sont pas résistants aux attaques par force brute. Une " +"bonne fonction de hachage doit être paramétrable, lente, et inclure un `sel " +"`_." + +#: library/hashlib.rst:242 +msgid "" +"The function provides PKCS#5 password-based key derivation function 2. It " +"uses HMAC as pseudorandom function." +msgstr "" +"La fonction fournit une fonction de dérivation PKCS#5 (*Public Key " +"Cryptographic Standards #5 v2.0*). Elle utilise HMAC comme fonction de " +"pseudo-aléatoire." + +#: 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 " +"buffers of bytes. Applications and libraries should limit *password* to a " +"sensible length (e.g. 1024). *salt* should be about 16 or more bytes from a " +"proper source, e.g. :func:`os.urandom`." +msgstr "" +"La chaîne de caractères *hash_name* est le nom de l'algorithme de hachage " +"désiré pour le HMAC, par exemple ``\"sha1\"`` ou ``\"sha256\"``. *password* " +"et *salt* sont interprétés comme des tampons d'octets. Les applications et " +"bibliothèques doivent limiter *password* à une longueur raisonnable (comme " +"``1024``). *salt* doit être de 16 octets ou plus provenant d'une source " +"correcte, e.g. :func:`os.urandom`." + +#: library/hashlib.rst:251 +msgid "" +"The number of *iterations* should be chosen based on the hash algorithm and " +"computing power. As of 2022, hundreds of thousands of iterations of SHA-256 " +"are suggested. For rationale as to why and how to choose what is best for " +"your application, read *Appendix A.2.2* of NIST-SP-800-132_. The answers on " +"the `stackexchange pbkdf2 iterations question`_ explain in detail." +msgstr "" + +#: library/hashlib.rst:257 +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." +msgstr "" +"*dklen* est la longueur de la clé dérivée. Si *dklen* vaut ``None`` alors la " +"taille du message de l'algorithme de hachage *hash_name* est utilisé, e.g. " +"64 pour SHA-512." + +#: library/hashlib.rst:270 +msgid "" +"A fast implementation of *pbkdf2_hmac* is available with OpenSSL. The " +"Python implementation uses an inline version of :mod:`hmac`. It is about " +"three times slower and doesn't release the GIL." +msgstr "" +"Une implémentation rapide de *pbkdf2_hmac* est disponible avec OpenSSL. " +"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:276 +msgid "" +"Slow Python implementation of *pbkdf2_hmac* is deprecated. In the future the " +"function will only be available when Python is compiled with OpenSSL." +msgstr "" + +#: library/hashlib.rst:282 +msgid "" +"The function provides scrypt password-based key derivation function as " +"defined in :rfc:`7914`." +msgstr "" +"La fonction fournit la fonction de dérivation de clé *scrypt* comme définie " +"dans :rfc:`7914`." + +#: library/hashlib.rst:285 +msgid "" +"*password* and *salt* must be :term:`bytes-like objects `. Applications and libraries should limit *password* to a sensible " +"length (e.g. 1024). *salt* should be about 16 or more bytes from a proper " +"source, e.g. :func:`os.urandom`." +msgstr "" +"*password* et *salt* doivent être des :term:`bytes-like objects `. Les applications et bibliothèques doivent limiter *password* à une " +"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:290 +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). " +"*dklen* is the length of the derived key." +msgstr "" +"*n* est le facteur de coût CPU/Mémoire, *r* la taille de bloc, *p* le " +"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:298 +msgid "BLAKE2" +msgstr "BLAKE2" + +#: library/hashlib.rst:305 +msgid "" +"BLAKE2_ is a cryptographic hash function defined in :rfc:`7693` that comes " +"in two flavors:" +msgstr "" +"BLAKE2_ est une fonction de hachage cryptographique définie dans la :rfc:" +"`7693` et disponible en deux versions ::" + +#: library/hashlib.rst:308 +msgid "" +"**BLAKE2b**, optimized for 64-bit platforms and produces digests of any size " +"between 1 and 64 bytes," +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:311 +msgid "" +"**BLAKE2s**, optimized for 8- to 32-bit platforms and produces digests of " +"any size between 1 and 32 bytes." +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:314 +msgid "" +"BLAKE2 supports **keyed mode** (a faster and simpler replacement for HMAC_), " +"**salted hashing**, **personalization**, and **tree hashing**." +msgstr "" +"BLAKE2 gère diverses fonctionnalités **keyed mode** (un remplacement plus " +"rapide et plus simple pour HMAC_), **salted hashing**, **personalization**, " +"et **tree hashing**." + +#: library/hashlib.rst:317 +msgid "" +"Hash objects from this module follow the API of standard library's :mod:" +"`hashlib` objects." +msgstr "" +"Les objets hachés de ce module suivent l'API des objets du module :mod:" +"`hashlib` de la librairie standard." + +#: library/hashlib.rst:322 +msgid "Creating hash objects" +msgstr "Création d'objets hachés" + +#: library/hashlib.rst:324 +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:338 +msgid "" +"These functions return the corresponding hash objects for calculating " +"BLAKE2b or BLAKE2s. They optionally take these general parameters:" +msgstr "" +"Ces fonctions produisent l'objet haché correspondant aux calculs de BLAKE2b " +"ou BLAKE2s. Elles prennent ces paramètres optionnels ::" + +#: library/hashlib.rst:341 +msgid "" +"*data*: initial chunk of data to hash, which must be :term:`bytes-like " +"object`. It can be passed only as positional argument." +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:344 +msgid "*digest_size*: size of output digest in bytes." +msgstr "*digest_size*: taille en sortie du message en octets." + +#: library/hashlib.rst:346 +msgid "" +"*key*: key for keyed hashing (up to 64 bytes for BLAKE2b, up to 32 bytes for " +"BLAKE2s)." +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:349 +msgid "" +"*salt*: salt for randomized hashing (up to 16 bytes for BLAKE2b, up to 8 " +"bytes for BLAKE2s)." +msgstr "" +"*salt*: sel pour le hachage randomisé *randomized hashing* (jusqu'à 16 " +"octets pour BLAKE2b, jusqu'à 8 octets pour BLAKE2s)." + +#: library/hashlib.rst:352 +msgid "" +"*person*: personalization string (up to 16 bytes for BLAKE2b, up to 8 bytes " +"for BLAKE2s)." +msgstr "" +"*person*: chaîne de personnalisation (jusqu'à 16 octets pour BLAKE2b, " +"jusqu'à 8 octets pour BLAKE2s)." + +#: library/hashlib.rst:355 +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:358 +msgid "Hash" +msgstr "Hash" + +#: library/hashlib.rst:358 +msgid "digest_size" +msgstr "digest_size" + +#: library/hashlib.rst:358 +msgid "len(key)" +msgstr "len(key)" + +#: library/hashlib.rst:358 +msgid "len(salt)" +msgstr "len(salt)" + +#: library/hashlib.rst:358 +msgid "len(person)" +msgstr "len(person)" + +#: library/hashlib.rst:360 +msgid "BLAKE2b" +msgstr "BLAKE2b" + +#: library/hashlib.rst:360 +msgid "64" +msgstr "64" + +#: library/hashlib.rst:360 +msgid "16" +msgstr "16" + +#: library/hashlib.rst:361 +msgid "BLAKE2s" +msgstr "BLAKE2s" + +#: library/hashlib.rst:361 +msgid "32" +msgstr "32" + +#: library/hashlib.rst:361 +msgid "8" +msgstr "8" + +#: library/hashlib.rst:366 +msgid "" +"BLAKE2 specification defines constant lengths for salt and personalization " +"parameters, however, for convenience, this implementation accepts byte " +"strings of any size up to the specified length. If the length of the " +"parameter is less than specified, it is padded with zeros, thus, for " +"example, ``b'salt'`` and ``b'salt\\x00'`` is the same value. (This is not " +"the case for *key*.)" +msgstr "" +"Les spécifications de BLAKE2 définissent des longueurs constantes pour les " +"sel et chaînes de personnalisation, toutefois, par commodité, cette " +"implémentation accepte des chaînes *byte* de n'importe quelle taille jusqu'à " +"la longueur spécifiée. Si la longueur du paramètre est moindre par rapport à " +"celle spécifiée, il est complété par des zéros, ainsi, par exemple, " +"``b'salt'`` et ``b'salt\\x00'`` sont la même valeur (Ce n'est pas le cas " +"pour *key*.)" + +#: library/hashlib.rst:373 +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:375 +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:377 +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:379 +msgid "" +"*depth*: maximal depth of tree (1 to 255, 255 if unlimited, 1 in sequential " +"mode)." +msgstr "" +"*depth*: profondeur maximale de l'arbre (1 à 255, 255 si illimité, 1 en mode " +"séquentiel)." + +#: library/hashlib.rst:382 +#, fuzzy +msgid "" +"*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:385 +#, 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)." +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:388 +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:390 +msgid "" +"*inner_size*: inner digest size (0 to 64 for BLAKE2b, 0 to 32 for BLAKE2s, 0 " +"in sequential mode)." +msgstr "" +"*inner_size*: taille interne du message (0 à 64 pour BLAKE2b, 0 à 32 pour " +"BLAKE2s, 0 en mode séquentiel)." + +#: library/hashlib.rst:393 +#, fuzzy +msgid "" +"*last_node*: boolean indicating whether the processed node is the last one " +"(``False`` for sequential mode)." +msgstr "" +"*last_node*: booléen indiquant si le nœud traité est le dernier (``False`` " +"pour le mode séquentiel)." + +#: library/hashlib.rst:399 +msgid "" +"See section 2.10 in `BLAKE2 specification `_ for comprehensive review of tree hashing." +msgstr "" +"Voir section 2.10 dans `BLAKE2 specification `_ pour une approche compréhensive du *tree hashing*." + +#: library/hashlib.rst:405 +msgid "Constants" +msgstr "Constantes" + +#: library/hashlib.rst:410 +msgid "Salt length (maximum length accepted by constructors)." +msgstr "Longueur du sel (longueur maximale acceptée par les constructeurs)." + +#: library/hashlib.rst:416 +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:422 +msgid "Maximum key size." +msgstr "Taille maximale de clé." + +#: library/hashlib.rst:428 +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:432 +msgid "Examples" +msgstr "Exemples" + +#: library/hashlib.rst:435 +msgid "Simple hashing" +msgstr "Hachage simple" + +#: library/hashlib.rst:437 +msgid "" +"To calculate hash of some data, you should first construct a hash object by " +"calling the appropriate constructor function (:func:`blake2b` or :func:" +"`blake2s`), then update it with the data by calling :meth:`update` on the " +"object, and, finally, get the digest out of the object by calling :meth:" +"`digest` (or :meth:`hexdigest` for hex-encoded string)." +msgstr "" +"Pour calculer les *hash* de certaines données, vous devez d'abord construire " +"un objet haché en appelant la fonction constructeur appropriée (:func:" +"`blake2b` or :func:`blake2s`), ensuite le mettre à jour avec les données en " +"appelant la méthode :meth:`update` sur l'objet, et, pour finir, récupérer " +"l'empreinte du message en appelant la méthode :meth:`digest` (ou :meth:" +"`hexdigest` pour les chaînes hexadécimales)." + +#: library/hashlib.rst:450 +msgid "" +"As a shortcut, you can pass the first chunk of data to update directly to " +"the constructor as the positional argument:" +msgstr "" +"Pour raccourcir, vous pouvez passer directement au constructeur, comme " +"argument positionnel, le premier morceau du message à mettre à jour ::" + +#: library/hashlib.rst:457 +msgid "" +"You can call :meth:`hash.update` as many times as you need to iteratively " +"update the hash:" +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:470 +msgid "Using different digest sizes" +msgstr "Usage de tailles d'empreintes différentes" + +#: library/hashlib.rst:472 +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 " +"changing the size of output, we can tell BLAKE2b to produce 20-byte digests:" +msgstr "" +"BLAKE2 permet de configurer la taille des empreintes jusqu'à 64 octets pour " +"BLAKE2b et jusqu'à 32 octets pour BLAKE2s. Par exemple, pour remplacer SHA-1 " +"par BLAKE2b sans changer la taille de la sortie, nous pouvons dire à BLAKE2b " +"de produire une empreinte de 20 octets ::" + +#: library/hashlib.rst:486 +msgid "" +"Hash objects with different digest sizes have completely different outputs " +"(shorter hashes are *not* prefixes of longer hashes); BLAKE2b and BLAKE2s " +"produce different outputs even if the output length is the same:" +msgstr "" +"Les objets hachés avec différentes tailles d'empreintes ont des sorties " +"complètement différentes (les *hash* plus courts *ne sont pas* des préfixes " +"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:502 +msgid "Keyed hashing" +msgstr "Code d'authentification de message" + +#: library/hashlib.rst:504 +#, 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." +msgstr "" +"Le hachage avec clé (*keyed hashing* en anglais) est une alternative plus " +"simple et plus rapide à un `code d’authentification d’une empreinte " +"cryptographique de message avec clé `_ (HMAC). BLAKE2 peut être utilisé de " +"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:510 +msgid "" +"This example shows how to get a (hex-encoded) 128-bit authentication code " +"for message ``b'message data'`` with key ``b'pseudorandom key'``::" +msgstr "" +"Cet exemple montre comment obtenir un code d'authentification de message de " +"128-bit (en hexadécimal) pour un message ``b'message data'`` avec la clé " +"``b'pseudorandom key'`` ::" + +#: library/hashlib.rst:520 +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::" +msgstr "" +"Comme exemple pratique, une application web peut chiffrer symétriquement les " +"*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:549 +msgid "" +"Even though there's a native keyed hashing mode, BLAKE2 can, of course, be " +"used in HMAC construction with :mod:`hmac` module::" +msgstr "" +"Même s'il possède en natif la création de code d'authentification de message " +"(MAC), BLAKE2 peut, bien sûr, être utilisé pour construire un HMAC en " +"combinaison du module :mod:`hmac` ::" + +#: library/hashlib.rst:560 +msgid "Randomized hashing" +msgstr "Hachage randomisé" + +#: library/hashlib.rst:562 +msgid "" +"By setting *salt* parameter users can introduce randomization to the hash " +"function. Randomized hashing is useful for protecting against collision " +"attacks on the hash function used in digital signatures." +msgstr "" +"En définissant le paramètre *salt* les utilisateurs peuvent introduire de " +"l'aléatoire dans la fonction de hachage. Le hachage randomisé est utile pour " +"se protéger des attaques par collisions sur les fonctions de hachage " +"utilisées dans les signatures numériques." + +#: library/hashlib.rst:566 +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, " +"the message signer. If the message preparer is able to find cryptographic " +"hash function collisions (i.e., two messages producing the same hash value), " +"then they might prepare meaningful versions of the message that would " +"produce the same hash value and digital signature, but with different " +"results (e.g., transferring $1,000,000 to an account, rather than $10). " +"Cryptographic hash functions have been designed with collision resistance as " +"a major goal, but the current concentration on attacking cryptographic hash " +"functions may result in a given cryptographic hash function providing less " +"collision resistance than expected. Randomized hashing offers the signer " +"additional protection by reducing the likelihood that a preparer can " +"generate two or more messages that ultimately yield the same hash value " +"during the digital signature generation process --- even if it is practical " +"to find collisions for the hash function. However, the use of randomized " +"hashing may reduce the amount of security provided by a digital signature " +"when all portions of the message are prepared by the signer." +msgstr "" +"Le hachage aléatoire est conçu pour les situations où une partie, le " +"préparateur du message, génère tout ou partie d'un message à signer par une " +"seconde partie, le signataire du message. Si le préparateur du message est " +"capable de trouver des collisions sur la fonction cryptographique de hachage " +"(c.-à-d. deux messages produisant la même valeur une fois hachés), alors ils " +"peuvent préparer des versions significatives du message qui produiront les " +"mêmes *hachs* et même signature mais avec des résultats différents (e.g. " +"transférer 1000000$ sur un compte plutôt que 10$). Les fonctions " +"cryptographiques de hachage ont été conçues dans le but de résister aux " +"collisions, mais la concentration actuelle d'attaques sur les fonctions de " +"hachage peut avoir pour conséquence qu'une fonction de hachage donnée soit " +"moins résistante qu'attendu. Le hachage aléatoire offre au signataire une " +"protection supplémentaire en réduisant la probabilité que le préparateur " +"puisse générer deux messages ou plus qui renverront la même valeur haché " +"lors du processus de génération de la signature --- même s'il est pratique " +"de trouver des collisions sur la fonction de hachage. Toutefois, " +"l'utilisation du hachage aléatoire peut réduire le niveau de sécurité fourni " +"par une signature numérique lorsque tous les morceaux du message sont " +"préparés par le signataire." + +#: library/hashlib.rst:585 +msgid "" +"(`NIST SP-800-106 \"Randomized Hashing for Digital Signatures\" `_)" +msgstr "" +"(`NIST SP-800-106 \"Randomized Hashing for Digital Signatures\" `_, article en anglais)" + +#: library/hashlib.rst:588 +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." +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:593 +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 " +"passwords. See `BLAKE2 FAQ `_ for more information." +msgstr "" +"*Salted hashing* (ou juste hachage) avec BLAKE2 ou toute autre fonction de " +"hachage générique, comme SHA-256, ne convient pas pour le chiffrement des " +"mots de passe. Voir `BLAKE2 FAQ `_ pour plus " +"d'informations." + +#: library/hashlib.rst:616 +msgid "Personalization" +msgstr "Personnalisation" + +#: library/hashlib.rst:618 +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 " +"hash function:" +msgstr "" +"Parfois il est utile de forcer une fonction de hachage à produire " +"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:622 +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 " +"protocol can be used in an entirely different part because two hash " +"computations were done on similar or related data, and the attacker can " +"force the application to make the hash inputs the same. Personalizing each " +"hash function used in the protocol summarily stops this type of attack." +msgstr "" +"Nous recommandons que tous les développeurs d'application considèrent " +"sérieusement de faire cela ; nous avons vu de nombreux protocoles où un " +"*hash* était calculé à un endroit du protocole pour être utilisé à un autre " +"endroit car deux calculs de *hash* étaient réalisés sur des données " +"similaires ou liées, et qu'un attaquant peut forcer une application à " +"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:629 +#, fuzzy +msgid "" +"(`The Skein Hash Function Family `_, p. 21)" +msgstr "" +"(`The Skein Hash Function Family `_, p. 21, article en anglais)" + +#: library/hashlib.rst:633 +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:647 +msgid "" +"Personalization together with the keyed mode can also be used to derive " +"different keys from a single one." +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:661 +msgid "Tree mode" +msgstr "Mode Arbre" + +#: library/hashlib.rst:663 +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:669 +msgid "" +"This example uses 64-byte internal digests, and returns the 32-byte final " +"digest::" +msgstr "" +"Cet exemple utilise en interne des empreintes de 64 octets, et produit " +"finalement des empreintes 32 octets ::" + +#: library/hashlib.rst:699 +msgid "Credits" +msgstr "Crédits" + +#: library/hashlib.rst:701 +msgid "" +"BLAKE2_ was designed by *Jean-Philippe Aumasson*, *Samuel Neves*, *Zooko " +"Wilcox-O'Hearn*, and *Christian Winnerlein* based on SHA-3_ finalist BLAKE_ " +"created by *Jean-Philippe Aumasson*, *Luca Henzen*, *Willi Meier*, and " +"*Raphael C.-W. Phan*." +msgstr "" +"BLAKE2_ a été conçu par *Jean-Philippe Aumasson*, *Samuel Neves*, *Zooko " +"Wilcox-O'Hearn*, et *Christian Winnerlein* basé sur SHA-3_ finaliste BLAKE_ " +"créé par *Jean-Philippe Aumasson*, *Luca Henzen*, *Willi Meier*, et *Raphael " +"C.-W. Phan*." + +#: library/hashlib.rst:706 +msgid "" +"It uses core algorithm from ChaCha_ cipher designed by *Daniel J. " +"Bernstein*." +msgstr "" +"Il utilise le cœur de l'algorithme de chiffrement de ChaCha_ conçu par " +"*Daniel J. Bernstein*." + +#: library/hashlib.rst:708 +msgid "" +"The stdlib implementation is based on pyblake2_ module. It was written by " +"*Dmitry Chestnykh* based on C implementation written by *Samuel Neves*. The " +"documentation was copied from pyblake2_ and written by *Dmitry Chestnykh*." +msgstr "" +"L'implémentation dans la librairie standard est basée sur le module " +"pyblake2_. Il a été écrit par *Dmitry Chestnykh* et basé sur " +"l'implémentation C écrite par *Samuel Neves*. La documentation a été copiée " +"depuis pyblake2_ et écrite par *Dmitry Chestnykh*." + +#: library/hashlib.rst:712 +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:714 +msgid "" +"The following public domain dedication applies for both C hash function " +"implementation, extension code, and this documentation:" +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:717 +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 " +"worldwide. This software is distributed without any warranty." +msgstr "" +"Tout en restant dans les limites de la loi, le(s) auteur(s) a (ont) consacré " +"tous les droits d’auteur et droits connexes et voisins de ce logiciel au " +"domaine public dans le monde entier. Ce logiciel est distribué sans aucune " +"garantie." + +#: library/hashlib.rst:721 +msgid "" +"You should have received a copy of the CC0 Public Domain Dedication along " +"with this software. If not, see https://creativecommons.org/publicdomain/" +"zero/1.0/." +msgstr "" +"Vous devriez recevoir avec ce logiciel une copie de la licence *CC0 Public " +"Domain Dedication*. Sinon, voir https://creativecommons.org/publicdomain/" +"zero/1.0/." + +#: library/hashlib.rst:725 +msgid "" +"The following people have helped with development or contributed their " +"changes to the project and the public domain according to the Creative " +"Commons Public Domain Dedication 1.0 Universal:" +msgstr "" +"Les personnes suivantes ont aidé au développement ou contribué aux " +"modification du projet et au domaine public selon la licence Creative " +"Commons Public Domain Dedication 1.0 Universal ::" + +#: library/hashlib.rst:729 +msgid "*Alexandr Sokolovskiy*" +msgstr "*Alexandr Sokolovskiy*" + +#: library/hashlib.rst:744 +msgid "Module :mod:`hmac`" +msgstr "Module :mod:`hmac`" + +#: library/hashlib.rst:744 +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:747 +msgid "Module :mod:`base64`" +msgstr "Module :mod:`base64`" + +#: library/hashlib.rst:747 +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:750 +msgid "https://blake2.net/" +msgstr "https://blake2.net/" + +#: library/hashlib.rst:750 +msgid "Official BLAKE2 website." +msgstr "Site officiel de BLAKE2." + +#: library/hashlib.rst:753 +msgid "" +"https://csrc.nist.gov/csrc/media/publications/fips/180/2/archive/2002-08-01/" +"documents/fips180-2.pdf" +msgstr "" +"https://csrc.nist.gov/csrc/media/publications/fips/180/2/archive/2002-08-01/" +"documents/fips180-2.pdf" + +#: library/hashlib.rst:753 +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:757 +msgid "" +"https://en.wikipedia.org/wiki/" +"Cryptographic_hash_function#Cryptographic_hash_algorithms" +msgstr "" +"https://en.wikipedia.org/wiki/" +"Cryptographic_hash_function#Cryptographic_hash_algorithms" + +#: library/hashlib.rst:756 +msgid "" +"Wikipedia article with information on which algorithms have known issues and " +"what that means regarding their use." +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:760 +#, fuzzy +msgid "https://www.ietf.org/rfc/rfc8018.txt" +msgstr "https://www.ietf.org/rfc/rfc2898.txt" + +#: library/hashlib.rst:760 +#, fuzzy +msgid "PKCS #5: Password-Based Cryptography Specification Version 2.1" +msgstr "PKCS #5: Password-Based Cryptography Specification Version 2.0" + +#: library/hashlib.rst:762 +msgid "" +"https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf" +msgstr "" + +#: library/hashlib.rst:763 +msgid "NIST Recommendation for Password-Based Key Derivation." +msgstr "" + +#~ 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 suggested." +#~ msgstr "" +#~ "Le nombre d'*iterations* doit être choisi sur la base de l'algorithme de " +#~ "hachage et de la puissance de calcul. En 2013, au moins 100000 itérations " +#~ "de SHA-256 sont recommandées." + +#~ msgid ":ref:`Availability `: OpenSSL 1.1+." +#~ msgstr ":ref:`Disponibilité ` : OpenSSL 1.1+." diff --git a/library/heapq.po b/library/heapq.po new file mode 100644 index 0000000000..32fcab25f2 --- /dev/null +++ b/library/heapq.po @@ -0,0 +1,566 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-03-18 17:06+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.4.2\n" + +#: library/heapq.rst:2 +msgid ":mod:`heapq` --- Heap queue algorithm" +msgstr ":mod:`heapq` — File de priorité basée sur un tas" + +#: library/heapq.rst:12 +msgid "**Source code:** :source:`Lib/heapq.py`" +msgstr "**Code source :** :source:`Lib/heapq.py`" + +#: library/heapq.rst:16 +msgid "" +"This module provides an implementation of the heap queue algorithm, also " +"known as the priority queue algorithm." +msgstr "" +"Ce module expose une implémentation de l'algorithme de file de priorité, " +"basée sur un tas." + +#: library/heapq.rst:19 +msgid "" +"Heaps are binary trees for which every parent node has a value less than or " +"equal to any of its children. This implementation uses arrays for which " +"``heap[k] <= heap[2*k+1]`` and ``heap[k] <= heap[2*k+2]`` for all *k*, " +"counting elements from zero. For the sake of comparison, non-existing " +"elements are considered to be infinite. The interesting property of a heap " +"is that its smallest element is always the root, ``heap[0]``." +msgstr "" +"Les tas sont des arbres binaires pour lesquels chaque valeur portée par un " +"nœud est inférieure ou égale à celle de ses deux fils. Cette implémentation " +"utilise des tableaux pour lesquels ``tas[k] <= tas[2*k+1]`` et ``tas[k] <= " +"tas[2*k+2]`` pour tout *k*, en commençant la numérotation à zéro. Pour " +"contenter l'opérateur de comparaison, les éléments inexistants sont " +"considérés comme porteur d'une valeur infinie. L'intérêt du tas est que son " +"plus petit élément est toujours la racine, ``tas[0]``." + +#: library/heapq.rst:26 +msgid "" +"The API below differs from textbook heap algorithms in two aspects: (a) We " +"use zero-based indexing. This makes the relationship between the index for " +"a node and the indexes for its children slightly less obvious, but is more " +"suitable since Python uses zero-based indexing. (b) Our pop method returns " +"the smallest item, not the largest (called a \"min heap\" in textbooks; a " +"\"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 " +"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 " +"la littérature car il permet le classement sans tampon)." + +#: library/heapq.rst:33 +msgid "" +"These two make it possible to view the heap as a regular Python list without " +"surprises: ``heap[0]`` is the smallest item, and ``heap.sort()`` maintains " +"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 et ``heap.sort()`` " +"conserve l'invariant du tas !" + +#: library/heapq.rst:37 +msgid "" +"To create a heap, use a list initialized to ``[]``, or you can transform a " +"populated list into a heap via function :func:`heapify`." +msgstr "" +"Pour créer un tas, utilisez une liste initialisée à ``[]`` ou bien utilisez " +"une liste existante et transformez la en tas à l'aide de la fonction :func:" +"`heapify`." + +#: library/heapq.rst:40 +msgid "The following functions are provided:" +msgstr "Les fonctions suivantes sont fournies :" + +#: library/heapq.rst:45 +msgid "Push the value *item* onto the *heap*, maintaining the heap invariant." +msgstr "" +"Introduit la valeur *item* dans le tas *heap*, en conservant l'invariance du " +"tas." + +#: library/heapq.rst:50 +msgid "" +"Pop and return the smallest item from the *heap*, maintaining the heap " +"invariant. If the heap is empty, :exc:`IndexError` is raised. To access " +"the smallest item without popping it, use ``heap[0]``." +msgstr "" +"Extraie le plus petit élément de *heap* en préservant l'invariant du tas. Si " +"le tas est vide, une exception :exc:`IndexError` est levée. Pour accéder au " +"plus petit élément sans le retirer, utilisez ``heap[0]``." + +#: library/heapq.rst:57 +msgid "" +"Push *item* on the heap, then pop and return the smallest item from the " +"*heap*. The combined action runs more efficiently than :func:`heappush` " +"followed by a separate call to :func:`heappop`." +msgstr "" +"Introduit l'élément *item* dans le tas, puis extraie le plus petit élément " +"de *heap*. Cette action combinée est plus efficace que :func:`heappush` " +"suivie par un appel séparé à :func:`heappop`." + +#: library/heapq.rst:64 +msgid "Transform list *x* into a heap, in-place, in linear time." +msgstr "" +"Transforme une liste *x* en un tas, sans utiliser de tampon et en temps " +"linéaire." + +#: library/heapq.rst:69 +msgid "" +"Pop and return the smallest item from the *heap*, and also push the new " +"*item*. The heap size doesn't change. If the heap is empty, :exc:" +"`IndexError` is raised." +msgstr "" +"Extraie le plus petit élément de *heap* et introduit le nouvel élément " +"*item*. La taille du tas ne change pas. Si le tas est vide, une exception :" +"exc:`IndexError` est levée." + +#: library/heapq.rst:72 +msgid "" +"This one step operation is more efficient than a :func:`heappop` followed " +"by :func:`heappush` and can be more appropriate when using a fixed-size " +"heap. The pop/push combination always returns an element from the heap and " +"replaces it with *item*." +msgstr "" +"Cette opération en une étape est plus efficace qu'un appel à :func:`heappop` " +"suivi d'un appel à :func:`heappush` et est plus appropriée lorsque le tas " +"est de taille fixe. La combinaison *pop*/*push* renvoie toujours un élément " +"du tas et le remplace par *item*." + +#: library/heapq.rst:77 +msgid "" +"The value returned may be larger than the *item* added. If that isn't " +"desired, consider using :func:`heappushpop` instead. Its push/pop " +"combination returns the smaller of the two values, leaving the larger value " +"on the heap." +msgstr "" +"La valeur renvoyée peut être plus grande que l'élément *item* ajouté. Si " +"cela n'est pas souhaitable, utilisez plutôt :func:`heappushpop` à la place. " +"Sa combinaison *push*/*pop* renvoie le plus petit élément des deux valeurs " +"et laisse la plus grande sur le tas." + +#: library/heapq.rst:83 +msgid "The module also offers three general purpose functions based on heaps." +msgstr "" +"Ce module contient également trois fonctions génériques utilisant les tas." + +#: library/heapq.rst:88 +msgid "" +"Merge multiple sorted inputs into a single sorted output (for example, merge " +"timestamped entries from multiple log files). Returns an :term:`iterator` " +"over the sorted values." +msgstr "" +"Fusionne plusieurs entrées ordonnées en une unique sortie ordonnée (par " +"exemple, fusionne des entrées datées provenant de multiples journaux " +"applicatifs). Renvoie un :term:`iterator` sur les valeurs ordonnées." + +#: library/heapq.rst:92 +msgid "" +"Similar to ``sorted(itertools.chain(*iterables))`` but returns an iterable, " +"does not pull the data into memory all at once, and assumes that each of the " +"input streams is already sorted (smallest to largest)." +msgstr "" +"Similaire à ``sorted(itertools.chain(*iterables))`` mais renvoie un " +"itérable, ne stocke pas toutes les données en mémoire en une fois et suppose " +"que chaque flux d'entrée est déjà classé (en ordre croissant)." + +#: library/heapq.rst:96 +msgid "" +"Has two optional arguments which must be specified as keyword arguments." +msgstr "A deux arguments optionnels qui doivent être fournis par mot clef." + +#: library/heapq.rst:98 +msgid "" +"*key* specifies a :term:`key function` of one argument that is used to " +"extract a comparison key from each input element. The default value is " +"``None`` (compare the elements directly)." +msgstr "" +"*key* spécifie une :term:`key function` d'un argument utilisée pour extraire " +"une clef de comparaison de chaque élément de la liste. La valeur par défaut " +"est ``None`` (compare les éléments directement)." + +#: library/heapq.rst:102 +msgid "" +"*reverse* is a boolean value. If set to ``True``, then the input elements " +"are merged as if each comparison were reversed. To achieve behavior similar " +"to ``sorted(itertools.chain(*iterables), reverse=True)``, all iterables must " +"be sorted from largest to smallest." +msgstr "" +"*reverse* est une valeur booléenne. Si elle est ``True``, la liste " +"d'éléments est fusionnée comme si toutes les comparaisons étaient inversées. " +"Pour obtenir un comportement similaire à ``sorted(itertools." +"chain(*iterables), reverse=True)``, tous les itérables doivent être classés " +"par ordre décroissant." + +#: library/heapq.rst:107 +msgid "Added the optional *key* and *reverse* parameters." +msgstr "Ajout des paramètres optionnels *key* et *reverse*." + +#: library/heapq.rst:113 +msgid "" +"Return a list with the *n* largest elements from the dataset defined by " +"*iterable*. *key*, if provided, specifies a function of one argument that " +"is used to extract a comparison key from each element in *iterable* (for " +"example, ``key=str.lower``). Equivalent to: ``sorted(iterable, key=key, " +"reverse=True)[:n]``." +msgstr "" +"Renvoie une liste contenant les *n* plus grands éléments du jeu de données " +"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]``." + +#: library/heapq.rst:122 +msgid "" +"Return a list with the *n* smallest elements from the dataset defined by " +"*iterable*. *key*, if provided, specifies a function of one argument that " +"is used to extract a comparison key from each element in *iterable* (for " +"example, ``key=str.lower``). Equivalent to: ``sorted(iterable, key=key)[:" +"n]``." +msgstr "" +"Renvoie une liste contenant les *n* plus petits éléments du jeu de données " +"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]``." + +#: library/heapq.rst:128 +msgid "" +"The latter two functions perform best for smaller values of *n*. For larger " +"values, it is more efficient to use the :func:`sorted` function. Also, when " +"``n==1``, it is more efficient to use the built-in :func:`min` and :func:" +"`max` functions. If repeated usage of these functions is required, consider " +"turning the iterable into an actual heap." +msgstr "" +"Les deux fonctions précédentes sont les plus efficaces pour des petites " +"valeurs de *n*. Pour de grandes valeurs, il est préférable d'utiliser la " +"fonction :func:`sorted`. En outre, lorsque ``n==1``, il est plus efficace " +"d'utiliser les fonctions natives :func:`min` et :func:`max`. Si vous devez " +"utiliser ces fonctions de façon répétée, il est préférable de transformer " +"l'itérable en tas." + +#: library/heapq.rst:136 +msgid "Basic Examples" +msgstr "Exemples simples" + +#: library/heapq.rst:138 +msgid "" +"A `heapsort `_ can be implemented by " +"pushing all values onto a heap and then popping off the smallest values one " +"at a time::" +msgstr "" +"Un `tri par tas `_ peut être " +"implémenté en introduisant toutes les valeurs dans un tas puis en effectuant " +"l'extraction des éléments un par un ::" + +#: library/heapq.rst:151 +msgid "" +"This is similar to ``sorted(iterable)``, but unlike :func:`sorted`, this " +"implementation is not stable." +msgstr "" +"Ceci est similaire à ``sorted(iterable)`` mais, contrairement à :func:" +"`sorted`, cette implémentation n'est pas stable." + +#: library/heapq.rst:154 +msgid "" +"Heap elements can be tuples. This is useful for assigning comparison values " +"(such as task priorities) alongside the main record being tracked::" +msgstr "" +"Les éléments d'un tas peuvent être des *n*-uplets. C'est pratique pour " +"assigner des valeurs de comparaison (par exemple, des priorités de tâches) " +"en plus de l'élément qui est suivi ::" + +#: library/heapq.rst:167 +msgid "Priority Queue Implementation Notes" +msgstr "Notes d'implémentation de la file de priorité" + +#: library/heapq.rst:169 +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 :" + +#: 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 ?" + +#: library/heapq.rst:175 +msgid "" +"Tuple comparison breaks for (priority, task) pairs if the priorities are " +"equal and the tasks do not have a default comparison order." +msgstr "" +"La comparaison des couples (priorité, tâche) échoue si les priorités sont " +"identiques et que les tâches n'ont pas de relation d'ordre par défaut." + +#: library/heapq.rst:178 +msgid "" +"If the priority of a task changes, how do you move it to a new position in " +"the heap?" +msgstr "" +"Si la priorité d'une tâche change, comment la déplacer à sa nouvelle " +"position dans le tas ?" + +#: library/heapq.rst:181 +msgid "" +"Or if a pending task needs to be deleted, how do you find it and remove it " +"from the queue?" +msgstr "" +"Si une tâche en attente doit être supprimée, comment la trouver et la " +"supprimer de la file ?" + +#: library/heapq.rst:184 +msgid "" +"A solution to the first two challenges is to store entries as 3-element list " +"including the priority, an entry count, and the task. The entry count " +"serves as a tie-breaker so that two tasks with the same priority are " +"returned in the order they were added. And since no two entry counts are the " +"same, the tuple comparison will never attempt to directly compare two tasks." +msgstr "" +"Une solution aux deux premiers problèmes consiste à stocker les entrées sous " +"forme de liste à 3 éléments incluant la priorité, le numéro d'ajout et la " +"tâche. Le numéro d'ajout sert à briser les égalités de telle sorte que deux " +"tâches avec la même priorité sont renvoyées dans l'ordre de leur insertion. " +"Puisque deux tâches ne peuvent jamais avoir le même numéro d'ajout, la " +"comparaison des triplets ne va jamais chercher à comparer des tâches entre " +"elles." + +#: library/heapq.rst:190 +msgid "" +"Another solution to the problem of non-comparable tasks is to create a " +"wrapper class that ignores the task item and only compares the priority " +"field::" +msgstr "" +"Une autre solution au fait que les tâches ne possèdent pas de relation " +"d'ordre est de créer une classe d'encapsulation qui ignore l'élément tâche " +"et ne compare que le champ priorité ::" + +#: library/heapq.rst:201 +msgid "" +"The remaining challenges revolve around finding a pending task and making " +"changes to its priority or removing it entirely. Finding a task can be done " +"with a dictionary pointing to an entry in the queue." +msgstr "" +"Le problème restant consiste à trouver une tâche en attente et modifier sa " +"priorité ou la supprimer. Trouver une tâche peut être réalisé à l'aide d'un " +"dictionnaire pointant vers une entrée dans la file." + +#: library/heapq.rst:205 +msgid "" +"Removing the entry or changing its priority is more difficult because it " +"would break the heap structure invariants. So, a possible solution is to " +"mark the entry as removed and add a new entry with the revised priority::" +msgstr "" +"Supprimer une entrée ou changer sa priorité est plus difficile puisque cela " +"romprait l'invariant de la structure de tas. Une solution possible est de " +"marquer l'entrée comme supprimée et d'ajouter une nouvelle entrée avec sa " +"priorité modifiée ::" + +#: library/heapq.rst:239 +msgid "Theory" +msgstr "Théorie" + +#: library/heapq.rst:241 +msgid "" +"Heaps are arrays for which ``a[k] <= a[2*k+1]`` and ``a[k] <= a[2*k+2]`` for " +"all *k*, counting elements from 0. For the sake of comparison, non-existing " +"elements are considered to be infinite. The interesting property of a heap " +"is that ``a[0]`` is always its smallest element." +msgstr "" +"Les tas sont des tableaux pour lesquels ``a[k] <= a[2*k+1]`` et ``a[k] <= " +"a[2*k+2]`` pour tout *k* en comptant les éléments à partir de 0. Pour " +"simplifier la comparaison, les éléments inexistants sont considérés comme " +"étant infinis. L'intérêt des tas est que ``a[0]`` est toujours leur plus " +"petit élément." + +#: library/heapq.rst:246 +msgid "" +"The strange invariant above is meant to be an efficient memory " +"representation for a tournament. The numbers below are *k*, not ``a[k]``::" +msgstr "" +"L'invariant étrange ci-dessus est une représentation efficace en mémoire " +"d'un tournoi. Les nombres ci-dessous sont *k* et non ``a[k]`` ::" + +#: library/heapq.rst:259 +msgid "" +"In the tree above, each cell *k* is topping ``2*k+1`` and ``2*k+2``. In a " +"usual binary tournament we see in sports, each cell is the winner over the " +"two cells it tops, and we can trace the winner down the tree to see all " +"opponents s/he had. However, in many computer applications of such " +"tournaments, we do not need to trace the history of a winner. To be more " +"memory efficient, when a winner is promoted, we try to replace it by " +"something else at a lower level, and the rule becomes that a cell and the " +"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." + +#: library/heapq.rst:268 +msgid "" +"If this heap invariant is protected at all time, index 0 is clearly the " +"overall winner. The simplest algorithmic way to remove it and find the " +"\"next\" winner is to move some loser (let's say cell 30 in the diagram " +"above) into the 0 position, and then percolate this new 0 down the tree, " +"exchanging values, until the invariant is re-established. This is clearly " +"logarithmic on the total number of items in the tree. By iterating over all " +"items, you get an O(n log n) sort." +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 " +"(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 " +"approche a un coût logarithmique par rapport au nombre total d'éléments dans " +"l'arbre. En itérant sur tous les éléments, le classement s'effectue en O(n " +"log n) opérations." + +#: 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 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é " +"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 " +"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 " +"implémenter un ordonnanceur (et c'est ce que j'ai utilisé pour mon " +"séquenceur MIDI ☺)." + +#: library/heapq.rst:284 +msgid "" +"Various structures for implementing schedulers have been extensively " +"studied, and heaps are good for this, as they are reasonably speedy, the " +"speed is almost constant, and the worst case is not much different than the " +"average case. However, there are other representations which are more " +"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 " +"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." + +#: library/heapq.rst:290 +msgid "" +"Heaps are also very useful in big disk sorts. You most probably all know " +"that a big sort implies producing \"runs\" (which are pre-sorted sequences, " +"whose size is usually related to the amount of CPU memory), followed by a " +"merging passes for these runs, which merging is often very cleverly " +"organised [#]_. It is very important that the initial sort produces the " +"longest runs possible. Tournaments are a good way to achieve that. If, " +"using all the memory available to hold a tournament, you replace and " +"percolate items that happen to fit the current run, you'll produce runs " +"which are twice the size of the memory for random input, and much better for " +"input fuzzily ordered." +msgstr "" +"Les tas sont également très utiles pour ordonner les données sur de gros " +"disques. Vous savez probablement qu'un gros tri implique la production de " +"séquences pré-classées (dont la taille est généralement liée à la quantité " +"de mémoire CPU disponible), suivie par une passe de fusion qui est " +"généralement organisée de façon très intelligente [#]_. Il est très " +"important que le classement initial produise des séquences les plus longues " +"possibles. Les tournois sont une bonne façon d'arriver à ce résultat. Si, en " +"utilisant toute la mémoire disponible pour stocker un tournoi, vous " +"remplacez et faites percoler les éléments qui s'avèrent acceptables pour la " +"séquence courante, vous produirez des séquences d'une taille égale au double " +"de la mémoire pour une entrée aléatoire et bien mieux pour une entrée " +"approximativement triée." + +#: library/heapq.rst:300 +msgid "" +"Moreover, if you output the 0'th item on disk and get an input which may not " +"fit in the current tournament (because the value \"wins\" over the last " +"output value), it cannot fit in the heap, so the size of the heap " +"decreases. The freed memory could be cleverly reused immediately for " +"progressively building a second heap, which grows at exactly the same rate " +"the first heap is melting. When the first heap completely vanishes, you " +"switch heaps and start a new run. Clever and quite effective!" +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 " +"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 !" + +#: library/heapq.rst:308 +msgid "" +"In a word, heaps are useful memory structures to know. I use them in a few " +"applications, and I think it is good to keep a 'heap' module around. :-)" +msgstr "" +"Pour résumer, les tas sont des structures de données qu'il est bon de " +"connaître. Je les utilise dans quelques applications et je pense qu'il est " +"bon de garder le module *heap* sous le coude. ☺" + +#: library/heapq.rst:312 +msgid "Footnotes" +msgstr "Notes" + +#: library/heapq.rst:313 +msgid "" +"The disk balancing algorithms which are current, nowadays, are more annoying " +"than clever, and this is a consequence of the seeking capabilities of the " +"disks. On devices which cannot seek, like big tape drives, the story was " +"quite different, and one had to be very clever to ensure (far in advance) " +"that each tape movement will be the most effective possible (that is, will " +"best participate at \"progressing\" the merge). Some tapes were even able " +"to read backwards, and this was also used to avoid the rewinding time. " +"Believe me, real good tape sorts were quite spectacular to watch! From all " +"times, sorting has always been a Great Art! :-)" +msgstr "" +"Les algorithmes de répartition de charge pour les disques, courants de nos " +"jours, sont plus embêtants qu'utiles, en raison de la capacité des disques à " +"réaliser des accès aléatoires. Sur les périphériques qui ne peuvent faire " +"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 " +"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 ! ☺" diff --git a/library/hmac.po b/library/hmac.po new file mode 100644 index 0000000000..a2cb9a639c --- /dev/null +++ b/library/hmac.po @@ -0,0 +1,248 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-18 15:46+0200\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.4.1\n" + +#: library/hmac.rst:2 +msgid ":mod:`hmac` --- Keyed-Hashing for Message Authentication" +msgstr "" +":mod:`hmac` — Authentification de messages par hachage en combinaison avec " +"une clé secrète" + +#: library/hmac.rst:10 +msgid "**Source code:** :source:`Lib/hmac.py`" +msgstr "**Code source :** :source:`Lib/hmac.py`" + +#: library/hmac.rst:14 +msgid "This module implements the HMAC algorithm as described by :rfc:`2104`." +msgstr "" +"Ce module implémente l'algorithme HMAC tel que décrit par la :rfc:`2104`." + +#: library/hmac.rst:19 +msgid "" +"Return a new hmac object. *key* is a bytes or bytearray object giving the " +"secret key. If *msg* is present, the method call ``update(msg)`` is made. " +"*digestmod* is the digest name, digest constructor or module for the HMAC " +"object to use. It may be any name suitable to :func:`hashlib.new`. Despite " +"its argument position, it is required." +msgstr "" +"Renvoie un nouvel objet HMAC. *key* est un objet *byte* ou *bytearray* " +"représentant la clé secrète. Si *msg* est présent, un appel à " +"``update(msg)`` est effectué. *digestmod* permet de choisir l’algorithme à " +"utiliser par l’objet HMAC, il accepte un nom de fonction de hachage (peut " +"être tout ce qui convient à :func:`hashlib.new`), un constructeur de " +"fonction de hachage ou un module implémentant la PEP 247. Bien qu’il soit " +"après *msg*, *digestmod* est un paramètre obligatoire." + +#: library/hmac.rst:25 +msgid "" +"Parameter *key* can be a bytes or bytearray object. Parameter *msg* can be " +"of any type supported by :mod:`hashlib`. Parameter *digestmod* can be the " +"name of a hash algorithm." +msgstr "" +"Le paramètre *key* peut être un *byte* ou un objet *bytearray*. Le paramètre " +"*msg* peut être de n'importe quel type pris en charge par :mod:`hashlib`. Le " +"paramètre *digestmod* peut être le nom d'un algorithme de hachage." + +#: library/hmac.rst:33 +msgid "" +"MD5 as implicit default digest for *digestmod* is deprecated. The digestmod " +"parameter is now required. Pass it as a keyword argument to avoid " +"awkwardness when you do not have an initial msg." +msgstr "" +"MD5 en tant qu’algorithme cryptographique par défaut implicite pour " +"*digestmod* est obsolète. Le paramètre *digestmod* est maintenant requis. " +"Passez-le en argument nommé pour éviter la bizarrerie que ça donnerait quand " +"vous n'avez pas un *msg* initial." + +#: library/hmac.rst:38 +msgid "" +"Return digest of *msg* for given secret *key* and *digest*. The function is " +"equivalent to ``HMAC(key, msg, digest).digest()``, but uses an optimized C " +"or inline implementation, which is faster for messages that fit into memory. " +"The parameters *key*, *msg*, and *digest* have the same meaning as in :func:" +"`~hmac.new`." +msgstr "" +"Renvoie le code d'authentification de *msg*, pour la clé secrète *key* et à " +"l'algorithme *digest* donné. La fonction est équivalente à ``HMAC(key, msg, " +"digest).digest()``, mais elle utilise une implémentation optimisée en C ou " +"*inline*, qui est plus rapide pour les messages dont la taille leur permet " +"de tenir en mémoire vive. Les paramètres *key*, *msg* et *digest* ont la " +"même signification que pour :func:`~hmac.new`." + +#: library/hmac.rst:44 +msgid "" +"CPython implementation detail, the optimized C implementation is only used " +"when *digest* is a string and name of a digest algorithm, which is supported " +"by OpenSSL." +msgstr "" +"Détail d'implémentation CPython, l'implémentation C optimisée n'est utilisée " +"que lorsque le *digest* est une chaîne de caractères et le nom d'un " +"algorithme de hachage implémenté dans OpenSSL." + +#: library/hmac.rst:51 +msgid "An HMAC object has the following methods:" +msgstr "Un objet HMAC a les méthodes suivantes :" + +#: library/hmac.rst:55 +msgid "" +"Update the hmac object with *msg*. Repeated calls are equivalent to a " +"single call with the concatenation of all the arguments: ``m.update(a); m." +"update(b)`` is equivalent to ``m.update(a + b)``." +msgstr "" +"Met à jour l'objet HMAC avec *msg*. Des appels répétés sont équivalents à un " +"seul appel avec la concaténation de tous les arguments : ``m.update(a); m." +"update(b)`` est équivalent à ``m.update(a + b)``." + +#: library/hmac.rst:59 +msgid "Parameter *msg* can be of any type supported by :mod:`hashlib`." +msgstr "" +"Le paramètre *msg* peut être de n'importe quel type géré par :mod:`hashlib`." + +#: library/hmac.rst:65 +msgid "" +"Return the digest of the bytes passed to the :meth:`update` method so far. " +"This bytes object will be the same length as the *digest_size* of the digest " +"given to the constructor. It may contain non-ASCII bytes, including NUL " +"bytes." +msgstr "" +"Renvoie le condensat des octets passés à la méthode :meth:`update` jusque " +"là. L'objet *bytes* renvoyé sera de la même longueur que la *digest_size* de " +"la fonction de hachage donnée au constructeur. Il peut contenir des octets " +"qui ne sont pas dans la table ASCII, y compris des octets NUL." + +#: library/hmac.rst:72 +#, fuzzy +msgid "" +"When comparing the output of :meth:`digest` to an externally supplied digest " +"during a verification routine, it is recommended to use the :func:" +"`compare_digest` function instead of the ``==`` operator to reduce the " +"vulnerability to timing attacks." +msgstr "" +"Si vous devez vérifier la sortie de :meth:`digest` avec un condensat obtenu " +"par ailleurs par un service extérieur durant une routine de vérification, il " +"est recommandé d'utiliser la fonction :func:`compare_digest` au lieu de " +"l'opérateur ``==`` afin de réduire la vulnérabilité aux attaques temporelles." + +#: library/hmac.rst:80 +msgid "" +"Like :meth:`digest` except the digest is returned as a string twice the " +"length containing only hexadecimal digits. This may be used to exchange the " +"value safely in email or other non-binary environments." +msgstr "" +"Comme :meth:`digest` sauf que ce condensat est renvoyé en tant que chaîne de " +"caractères de taille doublée contenant seulement des chiffres hexadécimaux. " +"Cela permet d’échanger le résultat sans problèmes par e-mail ou dans " +"d'autres environnements ne gérant pas les données binaires." + +#: library/hmac.rst:86 +#, fuzzy +msgid "" +"When comparing the output of :meth:`hexdigest` to an externally supplied " +"digest during a verification routine, it is recommended to use the :func:" +"`compare_digest` function instead of the ``==`` operator to reduce the " +"vulnerability to timing attacks." +msgstr "" +"Si l'on compare la sortie de :meth:`hexdigest` avec celle d'un condensat " +"connu obtenu par un service extérieur durant une routine de vérification, il " +"est recommandé d'utiliser la fonction :func:`compare_digest` au lieu de " +"l'opérateur ``==`` afin de réduire la vulnérabilité aux attaques basées sur " +"les temps de réponse." + +#: library/hmac.rst:94 +msgid "" +"Return a copy (\"clone\") of the hmac object. This can be used to " +"efficiently compute the digests of strings that share a common initial " +"substring." +msgstr "" +"Renvoie une copie (un clone) de l'objet HMAC. C'est utile pour calculer de " +"manière efficace les empreintes cryptographiques de chaînes de caractères " +"qui ont en commun une sous-chaîne initiale." + +#: library/hmac.rst:98 +msgid "A hash object has the following attributes:" +msgstr "" +"Un objet *code d'authentification de message* (HMAC) possède les attributs " +"suivants :" + +#: library/hmac.rst:102 +msgid "The size of the resulting HMAC digest in bytes." +msgstr "" +"La taille du code d'authentification (c.-à-d. de l'empreinte " +"cryptographique) en octets." + +#: library/hmac.rst:106 +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/hmac.rst:112 +msgid "The canonical name of this HMAC, always lowercase, e.g. ``hmac-md5``." +msgstr "" +"Le nom canonique de ce HMAC, toujours en lettres minuscules, par exemple " +"``hmac-md5``." + +#: library/hmac.rst:119 +msgid "" +"The undocumented attributes ``HMAC.digest_cons``, ``HMAC.inner``, and ``HMAC." +"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:" +msgstr "Ce module fournit également la fonction utilitaire suivante :" + +#: library/hmac.rst:127 +msgid "" +"Return ``a == b``. This function uses an approach designed to prevent " +"timing analysis by avoiding content-based short circuiting behaviour, making " +"it appropriate for cryptography. *a* and *b* must both be of the same type: " +"either :class:`str` (ASCII only, as e.g. returned by :meth:`HMAC." +"hexdigest`), or a :term:`bytes-like object`." +msgstr "" +"Renvoie ``a == b``. Cette fonction a été conçue pour prévenir les attaques " +"temporelles en évitant l'implémentation de courts-circuits basés sur le " +"contenu, ce qui la rend appropriée pour de la cryptographie. *a* et *b* " +"doivent être du même type : soit :class:`str` (caractères ASCII seulement, " +"comme retourné par :meth:`HMAC.hexdigest` par exemple), ou :term:`bytes-like " +"object`." + +#: library/hmac.rst:135 +msgid "" +"If *a* and *b* are of different lengths, or if an error occurs, a timing " +"attack could theoretically reveal information about the types and lengths of " +"*a* and *b*—but not their values." +msgstr "" +"Si *a* et *b* sont de longueurs différentes ou si une erreur se produit, une " +"attaque temporelle pourrait en théorie obtenir des informations sur les " +"types et longueurs de *a* et de *b*, mais pas sur leurs valeurs." + +#: library/hmac.rst:143 +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`" +msgstr "Module :mod:`hashlib`" + +#: library/hmac.rst:150 +msgid "The Python module providing secure hash functions." +msgstr "Le module Python fournissant des fonctions de hachage sécurisé." diff --git a/library/html.entities.po b/library/html.entities.po new file mode 100644 index 0000000000..9a3d407a60 --- /dev/null +++ b/library/html.entities.po @@ -0,0 +1,81 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-18 15:46+0200\n" +"PO-Revision-Date: 2021-11-06 21:41+0100\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 3.0\n" + +#: library/html.entities.rst:2 +msgid ":mod:`html.entities` --- Definitions of HTML general entities" +msgstr ":mod:`html.entities` — Définitions des entités HTML générales" + +#: library/html.entities.rst:9 +msgid "**Source code:** :source:`Lib/html/entities.py`" +msgstr "**Source code:** :source:`Lib/html/entities.py`" + +#: library/html.entities.rst:13 +msgid "" +"This module defines four dictionaries, :data:`html5`, :data:" +"`name2codepoint`, :data:`codepoint2name`, and :data:`entitydefs`." +msgstr "" +"Ce module définit quatre dictionnaires, :data:`html5`, :data:" +"`name2codepoint`, :data:`codepoint2name`, et :data:`entitydefs`." + +#: library/html.entities.rst:19 +msgid "" +"A dictionary that maps HTML5 named character references [#]_ to the " +"equivalent Unicode character(s), e.g. ``html5['gt;'] == '>'``. Note that the " +"trailing semicolon is included in the name (e.g. ``'gt;'``), however some of " +"the names are accepted by the standard even without the semicolon: in this " +"case the name is present with and without the ``';'``. See also :func:`html." +"unescape`." +msgstr "" +"Un dictionnaire qui fait correspondre les références de caractères nommés " +"HTML5 [#]_ aux caractères Unicode équivalents, e.g. ``html5['gt;'] == '>'``. " +"À noter que le point-virgule en fin de chaîne est inclus dans le nom (e.g. " +"``'gt;'``), toutefois certains noms sont acceptés par le standard même sans " +"le point-virgule: dans ce cas, le nom est présent à la fois avec et sans le " +"``;``. Voir aussi :func:`html.unescape()`." + +#: library/html.entities.rst:31 +msgid "" +"A dictionary mapping XHTML 1.0 entity definitions to their replacement text " +"in ISO Latin-1." +msgstr "" +"Un dictionnaire qui fait correspondre les définitions d'entités XHTML 1.0 " +"avec leur remplacement en ISO Latin-1." + +#: library/html.entities.rst:37 +msgid "A dictionary that maps HTML entity names to the Unicode code points." +msgstr "" +"Un dictionnaire qui fait correspondre les noms d'entités HTML avec les " +"points de code Unicode." + +#: library/html.entities.rst:42 +msgid "A dictionary that maps Unicode code points to HTML entity names." +msgstr "" +"Un dictionnaire qui fait correspondre les points de code Unicode avec les " +"noms d'entités HTML." + +#: library/html.entities.rst:46 +msgid "Footnotes" +msgstr "Notes" + +#: library/html.entities.rst:47 +#, fuzzy +msgid "" +"See https://html.spec.whatwg.org/multipage/named-characters.html#named-" +"character-references" +msgstr "" +"Voir https://html.spec.whatwg.org/multipage/syntax.html#named-character-" +"references" diff --git a/library/html.parser.po b/library/html.parser.po new file mode 100644 index 0000000000..1d0654ae9d --- /dev/null +++ b/library/html.parser.po @@ -0,0 +1,423 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-05-21 16:37+0200\n" +"PO-Revision-Date: 2022-05-08 09:48+0200\n" +"Last-Translator: Thierry Pellé \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" + +#: library/html.parser.rst:2 +msgid ":mod:`html.parser` --- Simple HTML and XHTML parser" +msgstr ":mod:`html.parser`— Un analyseur syntaxique simple pour HTML et XHTML" + +#: library/html.parser.rst:7 +msgid "**Source code:** :source:`Lib/html/parser.py`" +msgstr "**Code source :** :source:`Lib/html/parser.py`" + +#: library/html.parser.rst:15 +msgid "" +"This module defines a class :class:`HTMLParser` which serves as the basis " +"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 "" +"If *convert_charrefs* is ``True`` (the default), all character references " +"(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 "" +"An :class:`.HTMLParser` instance is fed HTML data and calls handler methods " +"when start tags, end tags, text, comments, and other markup elements are " +"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 "" +"This parser does not check that end tags match start tags or call the end-" +"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 "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 "Exemple d'application de l'analyseur HTML" + +#: library/html.parser.rst:44 +msgid "" +"As a basic example, below is a simple HTML parser that uses the :class:" +"`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 "La sortie est alors :" + +#: library/html.parser.rst:83 +msgid ":class:`.HTMLParser` Methods" +msgstr "Méthodes de la classe :class:`.HTMLParser`" + +#: library/html.parser.rst:85 +msgid ":class:`HTMLParser` instances have the following methods:" +msgstr "" +"Les instances de :class:`HTMLParser` disposent des méthodes suivantes :" + +#: library/html.parser.rst:90 +msgid "" +"Feed some text to the parser. It is processed insofar as it consists of " +"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 "" +"Force processing of all buffered data as if it were followed by an end-of-" +"file mark. This method may be redefined by a derived class to define " +"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 +#, fuzzy +msgid "" +"Return the text of the most recently opened start tag. This should not " +"normally be needed for structured processing, but may be useful in dealing " +"with HTML \"as deployed\" or for re-generating input with minimal changes " +"(whitespace between attributes can be preserved, etc.)." +msgstr "" +"Renvoie le texte de la dernière balise ouverte. Pour un traitement " +"structuré, ce ne devrait jamais être nécessaire, mais peut s'avérer utile " +"pour traiter un code HTML de mauvaise qualité (tel qu'on en trouve souvent) " +"ou pour ré-générer la balise avec des changements mineurs (les espaces entre " +"les attributs pouvant être préservés, etc. …)." + +#: library/html.parser.rst:122 +msgid "" +"The following methods are called when data or markup elements are " +"encountered and they are meant to be overridden in a subclass. The base " +"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 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 "" +"The *tag* argument is the name of the tag converted to lower case. The " +"*attrs* argument is a list of ``(name, value)`` pairs containing the " +"attributes found inside the tag's ``<>`` brackets. The *name* will be " +"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 "" +"For instance, for the tag ````, this method " +"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 "L'argument *tag* est le nom de la balise en minuscules." + +#: library/html.parser.rst:153 +msgid "" +"Similar to :meth:`handle_starttag`, but called when the parser encounters an " +"XHTML-style empty tag (````). This method may be overridden by " +"subclasses which require this particular lexical information; the default " +"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 ``