diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 5a1305bad8..ec71c0146f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -15,14 +15,15 @@ jobs: 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 - package: powrap - apt_dependencies: gettext - command: 'powrap --check --quiet --diff $CHANGED_PO_FILES' + 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' @@ -42,9 +43,13 @@ jobs: python-version: '3.9' - name: Install ${{ matrix.tool.package }} run: | - [ -n "${{ matrix.tool.apt_dependencies }}" ] && sudo apt-get update && sudo apt-get install -y ${{ matrix.tool.apt_dependencies }} - python -m pip install --upgrade pip setuptools wheel - python -m pip install ${{ matrix.tool.package }} + 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), ' ') }} @@ -64,14 +69,18 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 30 steps: - - uses: actions/checkout@v2 - - uses: actions/cache@v2 + - uses: actions/checkout@v3 + - uses: actions/cache@v3 with: path: '~/cpython/' key: '1' - - uses: actions/setup-python@v2 + - uses: actions/cache@v3 with: - python-version: '3.9' + path: ~/.cache/pip + key: '1' + - uses: actions/setup-python@v4 + with: + python-version: '3.10' - name: Clone cpython run: | if [ ! -d ~/cpython ]; then @@ -86,9 +95,7 @@ jobs: git -C ~/cpython checkout $(grep ^CPYTHON_CURRENT_COMMIT Makefile| cut -d= -f2) - name: Prepare venv run: | - # If the venv exists but is broken, drop it (happens on Python upgrades): - # see https://github.com/actions/setup-python/issues/170 - [ -d $HOME/cpython/Doc/venv/bin/ -a ! -e $HOME/cpython/Doc/venv/bin/python ] && rm -fr $HOME/cpython/Doc/venv + 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/CONTRIBUTING.rst b/CONTRIBUTING.rst index 0b7ca9e8db..03363622b8 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -1,26 +1,125 @@ Guide de contribution à la documentation via GitHub -=================================================== - -Instructions ------------- +################################################### Prérequis -~~~~~~~~~ +========= + +Outils souhaitables +------------------- + +Pour pouvoir participer à la traduction en commun, il est souhaitable +d'installer : + +- un client ``git`` `Linux `_, `MacOS + `_ ou `Windows `_ ; -- un client ``git`` `Linux `_, `MacOS `_ ou `Windows `_ ; - un éditeur de fichier ``.po`` (comme `Poedit `_). -Équipez-vous aussi de quelques outils pour vous aider dans -votre traduction (voir `Outils utiles pour la traduction`_). +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``. -*fork* personnel sur Github -~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.. code-block:: bash -Pour commencer vous aurez besoin de *forker* le dépôt des sources `python-docs-fr -`_ en cliquant sur son bouton -``Fork``. Ceci crée une copie du projet sur votre compte Github, c'est un endroit -où vous avez le droit de faire des modifications. + 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 : @@ -40,12 +139,14 @@ où vous avez le droit de faire des modifications. git remote add upstream https://github.com/python/python-docs-fr.git -*fork* personnel sur une autre forge -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Sur une autre forge +------------------- -Si vous n'avez pas de compte Github, il est possible *fork* ce dépôt 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. +dépôt puis le peupler. + +Étape par étape : .. code-block:: bash @@ -66,15 +167,49 @@ dépôt. git push -u origin -Réservation d'un fichier -~~~~~~~~~~~~~~~~~~~~~~~~ +Deuxième étape : choisir et réserver le fichier sur lequel travailler +===================================================================== -*Chaque fois que vous commencez un nouveau fichier, suivez cette procédure.* +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. -Ensuite, vous devez trouver un fichier sur lequel travailler -(pour vous aiguiller, lisez la section `Que traduire ?`_). Nous vous conseillons -de choisir, si possible, un fichier traitant d'un sujet que vous maitrisez, cela -vous aidera grandement à produire une traduction de bonne qualité. +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 @@ -82,6 +217,11 @@ 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 : @@ -100,12 +240,15 @@ dans les tickets et les *pull requests*. `irc://irc.libera.chat/#python-docs-fr `_ pour nous le signaler. -Vous êtes maintenant prêt. Chaque fois que vous commencerez un nouveau fichier, -suivez cette procédure : -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. +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 @@ -122,12 +265,12 @@ fichier sur lequel on travaille. Par exemple, si vous travaillez sur git checkout -b library-sys upstream/3.10 -Vous pouvez maintenant travailler sur le fichier. -Si vous utilisez Poedit, n'oubliez pas de configurer votre nom et votre adresse de courriel -(Édition → Préférences → Général). -Vérifiez aussi qu'il est configuré pour passer à la ligne à 79 caractères -(Édition → Préférences → Avancé → Passer à la ligne à 79). +Troisième étape: Traduction +=========================== + +Avec Poedit +--------------- Ici, remplacez « library/sys.po » par le fichier que vous avez choisi précédemment. .. code-block:: bash @@ -138,11 +281,11 @@ Ici, remplacez « library/sys.po » par le fichier que vous avez choisi préc Ou lancez simplement Poedit puis « Fichier » → « Ouvrir ». -Traduction -~~~~~~~~~~ +Vérifications après traduction +------------------------------ -Vous pouvez dès à présent commencer à traduire le fichier en -respectant les `conventions`_ du projet. Pour vous y aider, la commande : +Après avoir modifié les fichiers, vérifiez que vous respectez les +`conventions`_ du projet. Pour vous y aider, la commande : .. code-block:: bash @@ -157,8 +300,9 @@ 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 +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 @@ -174,30 +318,34 @@ documentation local : make serve -La documentation est publiée l'adresse ``_ -(ou tout autre port indiqué par la sortie de la commande précédente). Vous pouvez -recommencer les étapes de cette section autant de fois que nécessaire. +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``. -*pull request* -~~~~~~~~~~~~~~ +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. +* ``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 : +* ``git commit`` permet de les propager : .. code-block:: bash @@ -215,7 +363,7 @@ branche est liée à votre *fork* (et donc que vos futurs ``git pull`` et 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 @@ -243,7 +391,7 @@ GitHub puis relancer ``powrap`` : git push Sur une autre forge -+++++++++++++++++++ +------------------- Quand vous avez poussé vos modifications, il y a plusieurs possibilités. @@ -300,38 +448,10 @@ les plus anciennes par l'`équipe de documentation `_. -Que traduire ? --------------- - -Vous pouvez utiliser `potodo`_, un outil fait pour trouver des fichiers *po* -à traduire. Une fois installé, utilisez la commande ``make todo`` dans votre clone -local. - -Vous pouvez choisir n'importe quel fichier non réservé dans la liste renvoyée. -Elle contient tous les fichiers qui ne sont pas encore complètement traduits, à -l'exception des fichiers de : - -- *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. - -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é remodifié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. 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 @@ -339,7 +459,7 @@ 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 @@ -350,7 +470,7 @@ documentation anglaise, si le rythme l'exige. Il faut aussi chercher des 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 @@ -363,13 +483,13 @@ 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 l'on peut de temps en temps se passer, alors que c'est très +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 @@ -377,20 +497,20 @@ phrase « these objects can be accessed by… » se traduit mieux par « on ac 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 +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 : @@ -421,7 +541,7 @@ mais pas en 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 @@ -432,11 +552,11 @@ 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 à -un concept ou une primitive défini dans le `glossaire Python `_. +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 ```. @@ -445,7 +565,7 @@ 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 », @@ -474,6 +594,7 @@ 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 @@ -545,12 +666,12 @@ 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-fr `_ — communauté python francophone, - `#python-doc `_ — communauté python autour de la documentation anglophone ; - les listes de diffusion relatives à la documentation (courriel) : @@ -559,8 +680,8 @@ Ressources de traduction - 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 francaise pour voir comment le sujet de l'article est 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 ; @@ -575,10 +696,10 @@ 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 @@ -603,7 +724,7 @@ simplement fonctionner : - etc. Comment définir la touche de composition ? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +------------------------------------------ Cela dépend de votre système d'exploitation et de votre clavier. @@ -622,7 +743,7 @@ ajouter l'équivalent de : keycode 115 = Multi_key -Utilisez ``xev`` pour connaitre la bonne correspondance de la touche que vous +Utilisez ``xev`` pour connaître la bonne correspondance de la touche que vous voulez assigner ! Ensuite, dans votre fichier *~/.xsession*, ajoutez : @@ -640,8 +761,8 @@ modifier dans les « Paramètres » → « Clavier » → « Disposition » → ⇒ Sous Windows, vous pouvez utiliser `wincompose `_. -Le cas de « --- », « -- », « ... » -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Le cas de « --- », « -- », « ... » +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ La version anglaise utilise les `smartquotes `_, @@ -657,7 +778,7 @@ Les *smartquotes* sont normalement responsables de la transformation de | « ... » : faites :kbd:`Compose . . .` Le cas de « "…" » -~~~~~~~~~~~~~~~~~ +^^^^^^^^^^^^^^^^^ Les guillemets français ``«`` et ``»`` ne sont pas identiques aux guillemets anglais ``"``. Cependant, Python utilise les guillemets @@ -668,7 +789,7 @@ traduire les guillemets mais pas les délimiteurs de chaîne. | « "…" » : 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. :: ». @@ -684,7 +805,7 @@ En français, nous mettons une espace insécable devant nos deux-points, comme : 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, @@ -695,7 +816,7 @@ 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 @@ -708,7 +829,7 @@ 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 : +- le deuxième paragraphe, lui aussi une énumération : - premier sous-paragraphe, - second sous-paragraphe ; @@ -720,88 +841,3 @@ 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. - -Outils utiles pour la traduction --------------------------------- - -Poutils -~~~~~~~ - -`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 - -Voici le détail des paquets qui nous intéressent dans Poutils : - -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*. - - -Affichage des modifications par Git -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -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. diff --git a/Makefile b/Makefile index e581c68b3e..48251e3c0d 100644 --- a/Makefile +++ b/Makefile @@ -20,7 +20,7 @@ # 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 := 1b37268ef10bd20c30d349b8401c88215c8a6be8 +CPYTHON_CURRENT_COMMIT := 100da7c31aeb3888962bf33c8cc3594272964815 LANGUAGE := fr BRANCH := 3.10 @@ -34,7 +34,28 @@ EXCLUDED := \ library/distutils.po \ library/imp.po \ library/tkinter.tix.po \ - library/test.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 @@ -44,6 +65,7 @@ PYTHON := $(shell which python3) MODE := html POSPELL_TMP_DIR := .pospell/ JOBS := auto +SPHINXERRORHANDLING = -W # Detect OS @@ -68,15 +90,16 @@ all: ensure_prerequisites mkdir -p locales/$(LANGUAGE)/LC_MESSAGES/ $(CP_CMD) -u --parents *.po */*.po locales/$(LANGUAGE)/LC_MESSAGES/ $(MAKE) -C venv/cpython/Doc/ \ - SPHINXOPTS='-j$(JOBS) \ - -D locale_dirs=$(abspath locales) \ + 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 serve' to see them." + @echo "Build success, open file://$(abspath venv/cpython/)/Doc/build/html/index.html or run 'make htmlview' to see them." # We clone cpython/ inside venv/ because venv/ is the only directory @@ -95,14 +118,13 @@ ensure_prerequisites: venv/cpython/.git/HEAD exit 1; \ fi - -.PHONY: serve -serve: - $(MAKE) -C venv/cpython/Doc/ serve +.PHONY: htmlview +htmlview: MODE=htmlview +htmlview: all .PHONY: todo todo: ensure_prerequisites - potodo --exclude venv .venv $(EXCLUDED) + potodo --api-url 'https://git.afpy.org/api/v1/repos/AFPy/python-docs-fr/issues?state=open&type=issues' --exclude venv .venv $(EXCLUDED) .PHONY: wrap wrap: ensure_prerequisites @@ -116,23 +138,51 @@ DESTS = $(addprefix $(POSPELL_TMP_DIR)/,$(addsuffix .out,$(SRCS))) .PHONY: spell spell: ensure_prerequisites $(DESTS) +.PHONY: line-length +line-length: + @echo "Searching for long lines..." + @awk '{if (length(gensub(/శ్రీనివాస్/, ".", "g", $$0)) > 80 && length(gensub(/[^ ]/, "", "g")) > 1) {print FILENAME ":" FNR, "line too long:", $$0; ERRORS+=1}} END {if (ERRORS>0) {exit 1}}' *.po */*.po + +.PHONY: sphinx-lint +sphinx-lint: + @echo "Checking all files using sphinx-lint..." + @sphinx-lint --enable all --disable line-too-long *.po */*.po + $(POSPELL_TMP_DIR)/%.po.out: %.po dict @echo "Pospell checking $<..." - mkdir -p $(@D) + @mkdir -p $(@D) pospell -p dict -l fr_FR $< && touch $@ .PHONY: fuzzy fuzzy: ensure_prerequisites - potodo -f --exclude venv .venv $(EXCLUDED) + potodo --only-fuzzy --api-url 'https://git.afpy.org/api/v1/repos/AFPy/python-docs-fr/issues?state=open&type=issues' --exclude venv .venv $(EXCLUDED) + +.PHONY: check-headers +check-headers: + @grep -L '^# Copyright (C) [0-9-]*, Python Software Foundation' *.po */*.po | while read -r file;\ + do \ + echo "Please update the po comment in $$file"; \ + done + @grep -L '^"Project-Id-Version: Python 3\\n"$$' *.po */*.po | while read -r file;\ + do \ + echo "Please update the 'Project-Id-Version' header in $$file"; \ + done + @grep -L '^"Language: fr\\n"$$' *.po */*.po | while read -r file;\ + do \ + echo "Please update the 'Language' header in $$file"; \ + done + @grep -L '^"Language-Team: FRENCH \\n"' *.po */*.po | while read -r file;\ + do \ + echo "Please update the 'Language-Team' header in $$file"; \ + done .PHONY: verifs -verifs: spell - powrap --check --quiet *.po */*.po +verifs: spell line-length sphinx-lint check-headers .PHONY: clean clean: @echo "Cleaning *.mo and $(POSPELL_TMP_DIR)" - rm -fr $(POSPELL_TMP_DIR) + rm -fr $(POSPELL_TMP_DIR) locales/$(LANGUAGE)/LC_MESSAGES/ find -name '*.mo' -delete @echo "Cleaning build directory" $(MAKE) -C venv/cpython/Doc/ clean diff --git a/about.po b/about.po index abd282341b..e3811998b5 100644 --- a/about.po +++ b/about.po @@ -5,8 +5,8 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" -"PO-Revision-Date: 2018-07-23 17:55+0200\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" @@ -53,25 +53,25 @@ msgstr "" #: about.rst:24 msgid "" -"the `Docutils `_ project for creating " +"the `Docutils `_ project for creating " "reStructuredText and the Docutils suite;" msgstr "" -"le projet `Docutils `_ pour avoir créé " +"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." +"Fredrik Lundh for his Alternative Python Reference project from which Sphinx " +"got many good ideas." msgstr "" -"Fredrik Lundh pour son projet `Alternative Python Reference `_, dont Sphinx a pris beaucoup de bonnes idées." +"Fredrik Lundh pour son projet *Alternative Python Reference*, dont Sphinx a " +"pris beaucoup de bonnes idées." -#: about.rst:32 +#: about.rst:31 msgid "Contributors to the Python Documentation" msgstr "Contributeurs de la documentation Python" -#: about.rst:34 +#: about.rst:33 msgid "" "Many people have contributed to the Python language, the Python standard " "library, and the Python documentation. See :source:`Misc/ACKS` in the " @@ -82,7 +82,7 @@ msgstr "" "sources de la distribution Python pour avoir une liste partielle des " "contributeurs." -#: about.rst:38 +#: about.rst:37 msgid "" "It is only with the input and contributions of the Python community that " "Python has such wonderful documentation -- Thank You!" diff --git a/bugs.po b/bugs.po index cbe3448a51..045b57f2c2 100644 --- a/bugs.po +++ b/bugs.po @@ -5,8 +5,8 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-09-23 16:16+0200\n" -"PO-Revision-Date: 2021-11-06 22:05+0100\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" @@ -61,6 +61,12 @@ msgstr "" #: 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, " @@ -72,11 +78,11 @@ msgstr "" "volontaires, votre requête sera vue, mais elle peut prendre un moment pour " "être traitée." -#: bugs.rst:30 +#: bugs.rst:33 msgid "`Documentation bugs`_" msgstr "`Bogues de documentation`_" -#: bugs.rst:30 +#: bugs.rst:33 msgid "" "A list of documentation bugs that have been submitted to the Python issue " "tracker." @@ -84,18 +90,18 @@ msgstr "" "Liste des bogues de documentation soumis à l'outil de suivi des problèmes " "Python." -#: bugs.rst:33 +#: bugs.rst:36 msgid "`Issue Tracking `_" msgstr "`Outil de suivi des problèmes `_" -#: bugs.rst:33 +#: 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:35 +#: bugs.rst:39 msgid "" "`Helping with Documentation `_" @@ -103,83 +109,98 @@ msgstr "" "`Aider avec la documentation `_" -#: bugs.rst:36 +#: 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:43 +#: bugs.rst:50 msgid "" -"Bug reports for Python itself should be submitted via the Python Bug Tracker " -"(https://bugs.python.org/). The bug tracker offers a web form which allows " -"pertinent information to be entered and submitted to the developers." +"Issue reports for Python itself should be submitted via the GitHub issues " +"tracker (https://github.com/python/cpython/issues). The GitHub issues " +"tracker offers a web form which allows pertinent information to be entered " +"and submitted to the developers." msgstr "" -"Les rapports de bogues pour Python lui-même devraient être soumis via le " -"l'outil de suivi des bogues (*Bug Tracker Python* — http://bugs.python." -"org/). Le gestionnaire de tickets propose un formulaire Web permettant de " -"saisir des informations pertinentes à soumettre aux développeurs." +"Les rapports concernant un problème relatif à Python lui-même doivent être " +"soumis *via* l'outil de suivi des problèmes de GitHub (https://github.com/" +"python/cpython/issues). Le gestionnaire de tickets propose un formulaire Web " +"permettant de saisir des informations pertinentes à soumettre aux " +"développeurs." -#: bugs.rst:47 +#: bugs.rst: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 " +"developers' time, is that you learn what has been done to fix it; it may be " "that the problem has already been fixed for the next release, or additional " "information is needed (in which case you are welcome to provide it if you " -"can!). To do this, search the bug database using the search box on the top " -"of the page." +"can!). To do this, search the tracker using the search box at the top of the " +"page." msgstr "" "La première étape pour remplir un rapport est de déterminer si le problème a " "déjà été rapporté. L'avantage de cette approche, en plus d'économiser du " -"temps aux développeurs, est d'apprendre ce qui a été fait pour le résoudre ; " +"temps aux développeurs, est d'apprendre ce qui a été fait pour le résoudre ; " "il se peut que le problème soit déjà résolu dans la prochaine version, ou " "que des informations complémentaires soient attendues (auquel cas votre " -"contribution est la bienvenue !). Pour ce faire, cherchez dans la base de " -"données de bogues grâce à la boîte de recherche en haut de la page." +"contribution est la bienvenue !). Pour ce faire, cherchez dans le " +"gestionnaire de tickets grâce à la boîte de recherche en haut de la page." -#: bugs.rst:54 +#: bugs.rst:62 msgid "" -"If the problem you're reporting is not already in the bug tracker, go back " -"to the Python Bug Tracker and log in. If you don't already have a tracker " -"account, select the \"Register\" link or, if you use OpenID, one of the " -"OpenID provider logos in the sidebar. It is not possible to submit a bug " -"report anonymously." +"If the problem you're reporting is not already in the list, log in to " +"GitHub. If you don't already have a GitHub account, create a new account " +"using the \"Sign up\" link. It is not possible to submit a bug report " +"anonymously." msgstr "" -"Si le problème que vous soumettez n'est pas déjà dans l'outil de suivi des " -"bogues, revenez au *Python Bug Tracker* et connectez-vous. Si vous n'avez " -"pas déjà un compte pour le *tracker*, cliquez sur le lien « S'enregistrer », " -"ou, si vous utilisez *OpenID*, sur l'un des logos des fournisseurs *OpenID* " -"dans la barre latérale. Il n'est pas possible de soumettre un rapport de " -"bogue de manière anonyme." +"Si le problème que vous soumettez n'est pas déjà dans la liste, connectez-" +"vous à GitHub. Si vous n'avez pas déjà un compte GitHub, créez un nouveau " +"compte en cliquant sur le lien « Sign Up ». Il n'est pas possible de " +"soumettre un rapport de bogue de manière anonyme." -#: bugs.rst:59 +#: bugs.rst:67 msgid "" -"Being now logged in, you can submit a bug. Select the \"Create New\" link " -"in the sidebar to open the bug reporting form." +"Being now logged in, you can submit an issue. Click on the \"New issue\" " +"button in the top bar to report a new issue." msgstr "" -"Une fois identifié, pour pouvez rapporter un bogue. Sélectionnez le lien " -"*Create New* dans la barre latérale pour ouvrir un nouveau formulaire de " -"rapport de bogue." +"Une fois connecté, vous pouvez rapporter un problème. Sélectionnez le bouton " +"*New issue* dans la barre en haut pour ouvrir un nouveau formulaire de " +"rapport." -#: bugs.rst:62 +#: 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 "" -"The submission form has a number of fields. For the \"Title\" field, enter " -"a *very* short description of the problem; less than ten words is good. In " -"the \"Type\" field, select the type of your problem; also select the " -"\"Component\" and \"Versions\" to which the bug relates." +"For the \"Title\" field, enter a *very* short description of the problem; " +"fewer than ten words is good." msgstr "" -"Le formulaire de soumission a un certain nombre de champs. Pour le champ " -"« Titre », saisissez une *très* courte description du problème ; moins de " -"dix mots est approprié. Dans le champ « Type », sélectionnez le type de " -"problème ; sélectionnez aussi « Composant » et « Versions » en rapport avec " -"le bogue." +"Dans le champ *Title*, entrez une *très* brève description du problème " +"rencontré ; tâchez de vous limiter à dix mots." -#: bugs.rst:67 +#: bugs.rst: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 " @@ -192,17 +213,17 @@ msgstr "" "plateforme matérielle et logicielle vous utilisiez (en incluant les " "informations de versions)." -#: bugs.rst:72 +#: bugs.rst:80 msgid "" -"Each bug report will be assigned to a developer who will determine what " -"needs to be done to correct the problem. You will receive an update each " -"time action is taken on the bug." +"Each issue report will be reviewed by a developer who will determine what " +"needs to be done to correct the problem. You will receive an update each " +"time an action is taken on the issue." msgstr "" -"Chaque bogue sera attribué à un développeur qui déterminera ce qui est " +"Chaque rapport sera attribué à un développeur qui déterminera ce qui est " "nécessaire d'entreprendre pour corriger le problème. Vous recevrez une " -"notification à chaque action effectuée sur le bogue." +"notification à chaque action concernant le rapport." -#: bugs.rst:81 +#: bugs.rst:89 msgid "" "`How to Report Bugs Effectively `_" @@ -210,7 +231,7 @@ msgstr "" "`Comment signaler des bogues de manière efficace `_ (en anglais)" -#: bugs.rst:80 +#: 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." @@ -219,7 +240,7 @@ msgstr "" "bogue utile. Il décrit quel genre d'information est utile et pourquoi elle " "est utile." -#: bugs.rst:84 +#: bugs.rst:92 msgid "" "`Bug Writing Guidelines `_" @@ -227,7 +248,7 @@ msgstr "" "`Guide pour la rédaction de rapports de bogues `_" -#: bugs.rst:84 +#: 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." @@ -235,11 +256,11 @@ msgstr "" "Conseils pour écrire un bon rapport de bogue. Certains sont spécifiques au " "projet Mozilla mais présentent des bonnes pratiques générales." -#: bugs.rst:90 +#: bugs.rst:98 msgid "Getting started contributing to Python yourself" msgstr "Commencer à contribuer à Python vous-même" -#: bugs.rst:92 +#: 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 " @@ -253,3 +274,15 @@ msgstr "" "Developer's Guide`_. Si vous avez des questions, le `core-mentorship mailing " "list`_ est un endroit amical pour obtenir des réponses à toutes les " "questions à propos du processus de corrections de bugs dans Python." + +#~ msgid "" +#~ "The submission form has a number of fields. For the \"Title\" field, " +#~ "enter a *very* short description of the problem; less than ten words is " +#~ "good. In the \"Type\" field, select the type of your problem; also " +#~ "select the \"Component\" and \"Versions\" to which the bug relates." +#~ msgstr "" +#~ "Le formulaire de soumission a un certain nombre de champs. Pour le champ " +#~ "« Titre », saisissez une *très* courte description du problème ; moins de " +#~ "dix mots est approprié. Dans le champ « Type », sélectionnez le type de " +#~ "problème ; sélectionnez aussi « Composant » et « Versions » en rapport " +#~ "avec le bogue." diff --git a/c-api/allocation.po b/c-api/allocation.po index 5f14969923..7dfa7cea54 100644 --- a/c-api/allocation.po +++ b/c-api/allocation.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" +"POT-Creation-Date: 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" @@ -20,8 +20,9 @@ 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 " +"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 " diff --git a/c-api/apiabiversion.po b/c-api/apiabiversion.po index 9a724f526a..374251d475 100644 --- a/c-api/apiabiversion.po +++ b/c-api/apiabiversion.po @@ -24,59 +24,52 @@ msgid "" "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 -#, fuzzy msgid "The ``3`` in ``3.4.1a2``." -msgstr "``PY_MAJOR_VERSION`` (le ``3`` dans ``3.4.1a2``)" +msgstr "Le ``3`` dans ``3.4.1a2``.)" #: c-api/apiabiversion.rst:21 -#, fuzzy msgid "The ``4`` in ``3.4.1a2``." -msgstr "``PY_MINOR_VERSION`` (le ``4`` dans ``3.4.1a2``)" +msgstr "Le ``4`` dans ``3.4.1a2``." #: c-api/apiabiversion.rst:25 -#, fuzzy msgid "The ``1`` in ``3.4.1a2``." -msgstr "``PY_MICRO_VERSION`` (le ``1`` dans ``3.4.1a2``)" +msgstr "Le ``1`` dans ``3.4.1a2``.)" #: c-api/apiabiversion.rst:29 -#, fuzzy 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 "" -"``PY_RELEASE_LEVEL`` (``0xA`` pour alpha, ``0xB`` pour bêta, ``0xC`` pour " -"une version candidate et ``0xF`` pour final), dans ce cas c'est alpha." +" 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 -#, fuzzy msgid "The ``2`` in ``3.4.1a2``. Zero for final releases." -msgstr "" -"``PY_RELEASE_SERIAL`` (le ``2`` au ``3.4.1a2``, zéro pour des versions " -"finales)" +msgstr "Le ``2`` dans ``3.4.1a2``. Nul pour des versions finales." #: c-api/apiabiversion.rst:39 -#, fuzzy msgid "The Python version number encoded in a single integer." -msgstr "" -"``PY_VERSION_HEX`` est le numéro de version de Python encodé en un seul " -"entier." +msgstr "Le numéro de version de Python encodé en un seul entier." #: c-api/apiabiversion.rst:41 -#, fuzzy msgid "" "The underlying version information can be found by treating it as a 32 bit " "number in the following manner:" msgstr "" -"Par exemple si le ``PY_VERSION_HEX` est défini à ``0x030401a2``, la " -"version d'information sous-jacente peut être trouvée en la traitant comme un " -"nombre sous 32 bits de la manière suivante:" +"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" @@ -92,95 +85,92 @@ msgstr "Signification" #: c-api/apiabiversion.rst:45 msgid "Value for ``3.4.1a2``" -msgstr "" +msgstr "Valeur pour ``3.4.1a2``" #: c-api/apiabiversion.rst:47 msgid "1" -msgstr "" +msgstr "1" #: c-api/apiabiversion.rst:47 -#, fuzzy msgid "1-8" -msgstr "``1-8``" +msgstr "1-8" #: c-api/apiabiversion.rst:47 msgid "``PY_MAJOR_VERSION``" -msgstr "" +msgstr "``PY_MAJOR_VERSION``" #: c-api/apiabiversion.rst:47 msgid "``0x03``" -msgstr "" +msgstr "``0x03``" #: c-api/apiabiversion.rst:49 msgid "2" -msgstr "" +msgstr "2" #: c-api/apiabiversion.rst:49 -#, fuzzy msgid "9-16" -msgstr "``9-16``" +msgstr "9-16" #: c-api/apiabiversion.rst:49 msgid "``PY_MINOR_VERSION``" -msgstr "" +msgstr "``PY_MINOR_VERSION``" #: c-api/apiabiversion.rst:49 msgid "``0x04``" -msgstr "" +msgstr "``0x04``" #: c-api/apiabiversion.rst:51 msgid "3" -msgstr "" +msgstr "3" #: c-api/apiabiversion.rst:51 -#, fuzzy msgid "17-24" -msgstr "``17-24``" +msgstr "17-24" #: c-api/apiabiversion.rst:51 msgid "``PY_MICRO_VERSION``" -msgstr "" +msgstr "``PY_MICRO_VERSION``" #: c-api/apiabiversion.rst:51 msgid "``0x01``" -msgstr "" +msgstr "``0x01``" #: c-api/apiabiversion.rst:53 msgid "4" -msgstr "" +msgstr "4" #: c-api/apiabiversion.rst:53 -#, fuzzy msgid "25-28" -msgstr "``25-28``" +msgstr "25-28" #: c-api/apiabiversion.rst:53 msgid "``PY_RELEASE_LEVEL``" -msgstr "" +msgstr "``PY_RELEASE_LEVEL``" #: c-api/apiabiversion.rst:53 msgid "``0xA``" -msgstr "" +msgstr "``0xA``" #: c-api/apiabiversion.rst:55 -#, fuzzy msgid "29-32" -msgstr "``29-32``" +msgstr "29-32" #: c-api/apiabiversion.rst:55 msgid "``PY_RELEASE_SERIAL``" -msgstr "" +msgstr "``PY_RELEASE_SERIAL``" #: c-api/apiabiversion.rst:55 msgid "``0x2``" -msgstr "" +msgstr "``0x2``" #: c-api/apiabiversion.rst:58 -#, fuzzy msgid "" "Thus ``3.4.1a2`` is hexversion ``0x030401a2`` and ``3.10.0`` is hexversion " "``0x030a00f0``." -msgstr "Ainsi ``3.4.1a2`` est une hexane-version ``0x030401a2``." +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`." diff --git a/c-api/arg.po b/c-api/arg.po index 3aa819930b..fae360ef57 100644 --- a/c-api/arg.po +++ b/c-api/arg.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-09-23 16:16+0200\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" @@ -82,25 +82,22 @@ msgstr "" "l'*unicode* ou le *bytes* renvoyé." #: c-api/arg.rst:37 -msgid "" -"In general, when a format sets a pointer to a buffer, the buffer is managed " -"by the corresponding Python object, and the buffer shares the lifetime of " -"this object. You won't have to release any memory yourself. The only " -"exceptions are ``es``, ``es#``, ``et`` and ``et#``." +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 "" -"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:42 +#: c-api/arg.rst:41 +#, fuzzy msgid "" -"However, when a :c:type:`Py_buffer` structure gets filled, the underlying " -"buffer is locked 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)." +"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 à " @@ -110,24 +107,43 @@ msgstr "" "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:49 -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: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:51 +#: c-api/arg.rst:61 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`." +"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 "" -"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`." -#: c-api/arg.rst:58 +#: 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 " @@ -136,11 +152,11 @@ msgid "" "otherwise." msgstr "" -#: c-api/arg.rst:83 +#: c-api/arg.rst:98 msgid "``s`` (:class:`str`) [const char \\*]" msgstr "``s`` (:class:`str`) [``const char *``]" -#: c-api/arg.rst:66 +#: 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 " @@ -157,7 +173,7 @@ msgstr "" "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:75 +#: 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 " @@ -170,7 +186,7 @@ msgstr "" "est préférable d'utiliser le format ``O&`` avec :c:func:" "`PyUnicode_FSConverter` en tant que *converter*." -#: c-api/arg.rst:148 +#: c-api/arg.rst:164 msgid "" "Previously, :exc:`TypeError` was raised when embedded null code points were " "encountered in the Python string." @@ -178,11 +194,11 @@ msgstr "" "Auparavant, une :exc:`TypeError` était levée quand la chaîne de caractères " "Python contenait des codes NULL." -#: c-api/arg.rst:89 +#: 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:86 +#: 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 " @@ -195,7 +211,7 @@ msgstr "" "octets NULL. Les objets Unicode sont convertis en chaînes de caractères C en " "utilisant l'encodage ``'utf-8'``." -#: c-api/arg.rst:96 +#: c-api/arg.rst:111 #, fuzzy msgid "" "``s#`` (:class:`str`, read-only :term:`bytes-like object`) [const char \\*, :" @@ -204,12 +220,14 @@ msgstr "" "``s#`` (:class:`str`, :term:`bytes-like object` en lecture seule) [``const " "char \\*``, ``int`` ou :c:type:`Py_ssize_t`]" -#: c-api/arg.rst:92 +#: c-api/arg.rst:107 +#, fuzzy msgid "" -"Like ``s*``, except that it doesn't accept mutable objects. 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." +"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 " @@ -217,11 +235,11 @@ msgstr "" "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:565 +#: 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:99 +#: c-api/arg.rst:114 #, fuzzy msgid "" "Like ``s``, but the Python object may also be ``None``, in which case the C " @@ -230,13 +248,13 @@ msgstr "" "Comme ``s``, mais l'objet Python peut aussi être ``None``, auquel cas le " "pointeur C devient *NULL*." -#: c-api/arg.rst:104 +#: 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:103 +#: 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``." @@ -244,7 +262,7 @@ 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:108 +#: c-api/arg.rst:123 #, fuzzy msgid "" "``z#`` (:class:`str`, read-only :term:`bytes-like object` or ``None``) " @@ -253,7 +271,7 @@ 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 +#: c-api/arg.rst:122 #, fuzzy msgid "" "Like ``s#``, but the Python object may also be ``None``, in which case the C " @@ -262,25 +280,26 @@ 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:118 +#: 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:111 +#: c-api/arg.rst:126 +#, fuzzy msgid "" -"This format converts a bytes-like object to a C pointer to a 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." +"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:116 +#: c-api/arg.rst:132 msgid "" "Previously, :exc:`TypeError` was raised when embedded null bytes were " "encountered in the bytes buffer." @@ -288,17 +307,17 @@ msgstr "" "Auparavant, :exc:`TypeError` était levée lorsque des octets *null* étaient " "rencontrés dans le tampon d'octets." -#: c-api/arg.rst:123 +#: 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:121 +#: 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:127 +#: c-api/arg.rst:143 #, fuzzy msgid "" "``y#`` (read-only :term:`bytes-like object`) [const char \\*, :c:type:" @@ -307,7 +326,7 @@ msgstr "" "``s#`` (:class:`str`, :term:`bytes-like object` en lecture seule) [``const " "char \\*``, ``int`` ou :c:type:`Py_ssize_t`]" -#: c-api/arg.rst:126 +#: c-api/arg.rst:142 msgid "" "This variant on ``s#`` doesn't accept Unicode objects, only bytes-like " "objects." @@ -315,32 +334,32 @@ msgstr "" "Cette variante de ``s#`` n'accepte pas les objets Unicode, uniquement des " "objets assimilés à des octets." -#: c-api/arg.rst:132 +#: c-api/arg.rst:148 msgid "``S`` (:class:`bytes`) [PyBytesObject \\*]" msgstr "``S`` (:class:`bytes`) [``PyBytesObject *``]" -#: c-api/arg.rst:130 +#: 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:type:`PyObject*`." +"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:137 +#: c-api/arg.rst:153 msgid "``Y`` (:class:`bytearray`) [PyByteArrayObject \\*]" msgstr "``Y`` (:class:`bytearray`) [``PyByteArrayObject *``]" -#: c-api/arg.rst:135 +#: 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:type:" +"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é " @@ -348,11 +367,11 @@ msgstr "" "type *bytes*. La variable C doit aussi être déclarée en tant que :c:type:" "`PyObject\\*`." -#: c-api/arg.rst:154 +#: c-api/arg.rst:170 msgid "``u`` (:class:`str`) [const Py_UNICODE \\*]" msgstr "``u`` (:class:`str`) [``const Py_UNICODE *``]" -#: c-api/arg.rst:140 +#: 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` " @@ -370,29 +389,29 @@ msgstr "" "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:172 c-api/arg.rst:180 +#: 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:163 +#: 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:157 +#: 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:171 +#: 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:166 +#: c-api/arg.rst:182 #, fuzzy msgid "" "Like ``u``, but the Python object may also be ``None``, in which case the :c:" @@ -401,14 +420,14 @@ 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:179 +#: 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:174 +#: c-api/arg.rst:190 #, fuzzy msgid "" "Like ``u#``, but the Python object may also be ``None``, in which case the :" @@ -417,27 +436,27 @@ 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:184 +#: c-api/arg.rst:200 msgid "``U`` (:class:`str`) [PyObject \\*]" msgstr "``U`` (:class:`str`) [``PyObject *``]" -#: c-api/arg.rst:182 +#: 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:type:`PyObject*`." +"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:190 +#: 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:187 +#: 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. " @@ -445,28 +464,28 @@ msgid "" "`PyBuffer_Release` when it is done with the buffer." msgstr "" -#: c-api/arg.rst:207 +#: c-api/arg.rst:223 msgid "``es`` (:class:`str`) [const char \\*encoding, char \\*\\*buffer]" msgstr "" -#: c-api/arg.rst:193 +#: 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:196 +#: c-api/arg.rst:212 msgid "" "This format requires two arguments. The first is only used as input, and " -"must be a :c:type:`const char*` which points to the name of an encoding as a " +"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:type:`char**`; the value of the pointer it " +"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:204 +#: 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 " @@ -474,20 +493,20 @@ msgid "" "`PyMem_Free` to free the allocated buffer after use." msgstr "" -#: c-api/arg.rst:212 +#: c-api/arg.rst:228 msgid "" "``et`` (:class:`str`, :class:`bytes` or :class:`bytearray`) [const char " "\\*encoding, char \\*\\*buffer]" msgstr "" -#: c-api/arg.rst:210 +#: 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:243 +#: c-api/arg.rst:259 #, fuzzy msgid "" "``es#`` (:class:`str`) [const char \\*encoding, char \\*\\*buffer, :c:type:" @@ -496,40 +515,40 @@ msgstr "" "``s#`` (:class:`str`, :term:`bytes-like object` en lecture seule) [``const " "char \\*``, ``int`` ou :c:type:`Py_ssize_t`]" -#: c-api/arg.rst:215 +#: 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:219 +#: c-api/arg.rst:235 msgid "" "It requires three arguments. The first is only used as input, and must be " -"a :c:type:`const char*` which points to the name of an encoding as a NUL-" +"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:type:`char**`; the value of the pointer it " +"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:229 +#: c-api/arg.rst:245 msgid "There are two modes of operation:" msgstr "Il existe deux modes de fonctionnement :" -#: c-api/arg.rst:231 +#: 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 " +"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:236 +#: 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 " @@ -538,7 +557,7 @@ msgid "" "the buffer is not large enough, a :exc:`ValueError` will be set." msgstr "" -#: c-api/arg.rst:242 +#: 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." @@ -546,7 +565,7 @@ 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:248 +#: c-api/arg.rst:264 #, fuzzy msgid "" "``et#`` (:class:`str`, :class:`bytes` or :class:`bytearray`) [const char " @@ -555,194 +574,207 @@ msgstr "" "``s#`` (:class:`str`, :term:`bytes-like object` en lecture seule) [``const " "char \\*``, ``int`` ou :c:type:`Py_ssize_t`]" -#: c-api/arg.rst:246 +#: 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:251 +#: c-api/arg.rst:267 msgid "Numbers" msgstr "Les nombres" -#: c-api/arg.rst:255 +#: c-api/arg.rst:271 msgid "``b`` (:class:`int`) [unsigned char]" msgstr "``b`` (:class:`int`) [``unsigned char``]" -#: c-api/arg.rst:254 +#: c-api/arg.rst:270 +#, fuzzy msgid "" "Convert a nonnegative Python integer to an unsigned tiny int, stored in a C :" -"c:type:`unsigned char`." +"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:599 +#: c-api/arg.rst:615 msgid "``B`` (:class:`int`) [unsigned char]" msgstr "``B`` (:class:`int`) [``unsigned char``]" -#: c-api/arg.rst:258 +#: c-api/arg.rst:274 +#, fuzzy msgid "" "Convert a Python integer to a tiny int without overflow checking, stored in " -"a C :c:type:`unsigned char`." +"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:593 +#: c-api/arg.rst:609 msgid "``h`` (:class:`int`) [short int]" msgstr "``h`` (:class:`int`) [``short int``]" -#: c-api/arg.rst:262 -msgid "Convert a Python integer to a C :c:type:`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:602 +#: c-api/arg.rst:618 msgid "``H`` (:class:`int`) [unsigned short int]" msgstr "``H`` (:class:`int`) [``unsigned short int``]" -#: c-api/arg.rst:265 +#: c-api/arg.rst:281 +#, fuzzy msgid "" -"Convert a Python integer to a C :c:type:`unsigned short int`, without " +"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:587 +#: c-api/arg.rst:603 msgid "``i`` (:class:`int`) [int]" msgstr "``i`` (:class:`int`) [``int``]" -#: c-api/arg.rst:269 -msgid "Convert a Python integer to a plain C :c:type:`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:605 +#: c-api/arg.rst:621 msgid "``I`` (:class:`int`) [unsigned int]" msgstr "``I`` (:class:`int`) [``unsigned int``]" -#: c-api/arg.rst:272 +#: c-api/arg.rst:288 +#, fuzzy msgid "" -"Convert a Python integer to a C :c:type:`unsigned int`, without overflow " +"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:596 +#: c-api/arg.rst:612 msgid "``l`` (:class:`int`) [long int]" msgstr "``l`` (:class:`int`) [``long int``]" -#: c-api/arg.rst:276 -msgid "Convert a Python integer to a C :c:type:`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:608 +#: c-api/arg.rst:624 msgid "``k`` (:class:`int`) [unsigned long]" msgstr "``k`` (:class:`int`) [``unsigned long``]" -#: c-api/arg.rst:279 +#: c-api/arg.rst:295 +#, fuzzy msgid "" -"Convert a Python integer to a C :c:type:`unsigned long` without overflow " +"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:611 +#: c-api/arg.rst:627 msgid "``L`` (:class:`int`) [long long]" msgstr "``L`` (:class:`int`) [``long long``]" -#: c-api/arg.rst:283 +#: c-api/arg.rst:299 #, fuzzy -msgid "Convert a Python integer to a C :c:type:`long long`." +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:614 +#: c-api/arg.rst:630 msgid "``K`` (:class:`int`) [unsigned long long]" msgstr "``K`` (:class:`int`) [``unsigned long long``]" -#: c-api/arg.rst:286 +#: c-api/arg.rst:302 #, fuzzy msgid "" -"Convert a Python integer to a C :c:type:`unsigned long long` without " +"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:617 -msgid "``n`` (:class:`int`) [Py_ssize_t]" +#: 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:290 +#: 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:297 +#: 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:293 +#: 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:type:`char`." +"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:296 +#: c-api/arg.rst:312 msgid "Allow :class:`bytearray` objects." msgstr "" -#: c-api/arg.rst:625 +#: 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:300 +#: c-api/arg.rst:316 +#, fuzzy msgid "" "Convert a Python character, represented as a :class:`str` object of length " -"1, to a C :c:type:`int`." +"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:631 +#: c-api/arg.rst:647 msgid "``f`` (:class:`float`) [float]" msgstr "``f`` (:class:`float`) [``float``]" -#: c-api/arg.rst:304 -msgid "Convert a Python floating point number to a C :c:type:`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:628 +#: c-api/arg.rst:644 msgid "``d`` (:class:`float`) [double]" msgstr "``d`` (:class:`float`) [``double``]" -#: c-api/arg.rst:307 -msgid "Convert a Python floating point number to a C :c:type:`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:310 +#: c-api/arg.rst:326 msgid "``D`` (:class:`complex`) [Py_complex]" msgstr "``D`` (:class:`complex`) [``Py_complex``]" -#: c-api/arg.rst:310 +#: 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:313 +#: c-api/arg.rst:329 msgid "Other objects" msgstr "Autres objets" -#: c-api/arg.rst:642 +#: c-api/arg.rst:658 msgid "``O`` (object) [PyObject \\*]" msgstr "``O`` (objet) [``PyObject *``]" -#: c-api/arg.rst:316 +#: c-api/arg.rst:332 #, fuzzy msgid "" "Store a Python object (without any conversion) in a C object pointer. The C " @@ -754,42 +786,42 @@ msgstr "" "référence sur l'objet n'est pas incrémenté. Le pointeur stocké n'est pas " "*NULL*." -#: c-api/arg.rst:325 +#: c-api/arg.rst:341 msgid "``O!`` (object) [*typeobject*, PyObject \\*]" msgstr "``O!`` (objet) [*typeobject*, ``PyObject *``]" -#: c-api/arg.rst:321 +#: 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:type:`PyObject*`) into " +"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:656 +#: c-api/arg.rst:672 msgid "``O&`` (object) [*converter*, *anything*]" msgstr "``O&`` (objet) [*converter*, *anything*]" -#: c-api/arg.rst:330 +#: 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:type:`void *`. The " +"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:337 +#: c-api/arg.rst:353 msgid "" "where *object* is the Python object to be converted and *address* is the :c:" -"type:`void*` argument that was passed to the :c:func:`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." +"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:343 +#: 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 " @@ -798,15 +830,15 @@ msgid "" "value as in the original call." msgstr "" -#: c-api/arg.rst:349 +#: c-api/arg.rst:365 msgid "``Py_CLEANUP_SUPPORTED`` was added." msgstr "``Py_CLEANUP_SUPPORTED`` à été ajouté." -#: c-api/arg.rst:359 +#: c-api/arg.rst:375 msgid "``p`` (:class:`bool`) [int]" msgstr "``p`` (:class:`bool`) [``int``]" -#: c-api/arg.rst:353 +#: 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 " @@ -815,11 +847,11 @@ msgid "" "how Python tests values for truth." msgstr "" -#: c-api/arg.rst:659 +#: c-api/arg.rst:675 msgid "``(items)`` (:class:`tuple`) [*matching-items*]" msgstr "``(items)`` (:class:`tuple`) [*matching-items*]" -#: c-api/arg.rst:362 +#: 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 " @@ -830,7 +862,7 @@ msgstr "" "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:366 +#: 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 --- " @@ -839,7 +871,7 @@ msgid "" "downcasts in C --- your mileage may vary)." msgstr "" -#: c-api/arg.rst:372 +#: 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:" @@ -847,11 +879,11 @@ 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:380 +#: c-api/arg.rst:396 msgid "``|``" msgstr "``|``" -#: c-api/arg.rst:376 +#: 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 " @@ -860,11 +892,11 @@ msgid "" "corresponding C variable(s)." msgstr "" -#: c-api/arg.rst:389 +#: c-api/arg.rst:405 msgid "``$``" msgstr "``$``" -#: c-api/arg.rst:383 +#: 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 " @@ -872,22 +904,22 @@ msgid "" "be specified before ``$`` in the format string." msgstr "" -#: c-api/arg.rst:394 +#: c-api/arg.rst:410 msgid "``:``" msgstr "" -#: c-api/arg.rst:392 +#: 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:399 +#: c-api/arg.rst:415 msgid "``;``" msgstr "" -#: c-api/arg.rst:397 +#: 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 ``;" @@ -897,7 +929,7 @@ msgstr "" "virgule est utilise comme message d'erreur *au lieu* du message d'erreur par " "défaut. ``:`` et ``;`` sont mutuellement exclusifs." -#: c-api/arg.rst:401 +#: 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!" @@ -906,7 +938,7 @@ msgstr "" "à l'appelant sont des références *empruntées* ; ne décrémentez pas leur " "compteur de références !" -#: c-api/arg.rst:404 +#: 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 " @@ -923,35 +955,34 @@ msgstr "" "devraient correspondre à ce qui est spécifié pour l'unité de format " "correspondante." -#: c-api/arg.rst:410 +#: 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 :c:func:`PyArg_Parse\\*` " -"functions return true, otherwise they return false and raise an appropriate " -"exception. When the :c:func:`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." +"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:419 +#: c-api/arg.rst:435 msgid "API Functions" msgstr "Fonction de l'API" -#: c-api/arg.rst:423 +#: 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:430 +#: 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:436 +#: 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``-" @@ -960,26 +991,26 @@ msgid "" "success; on failure, it returns false and raises the appropriate exception." msgstr "" -#: c-api/arg.rst:443 +#: c-api/arg.rst:459 msgid "" "Added support for :ref:`positional-only parameters `." msgstr "" -#: c-api/arg.rst:450 +#: 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:456 +#: 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:466 +#: 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 " @@ -990,7 +1021,7 @@ msgid "" "continue to be used for that purpose." msgstr "" -#: c-api/arg.rst:477 +#: 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 " @@ -999,7 +1030,7 @@ msgid "" "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:type:`PyObject*` variable; these will be filled " +"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 " @@ -1008,31 +1039,31 @@ msgid "" "if there was a failure." msgstr "" -#: c-api/arg.rst:492 +#: 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:508 +#: 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:516 +#: c-api/arg.rst:532 msgid "Building values" msgstr "Construction des valeurs" -#: c-api/arg.rst:520 +#: c-api/arg.rst:536 msgid "" -"Create a new value based on a format string similar to those accepted by " -"the :c:func:`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." +"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:525 +#: 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 " @@ -1041,7 +1072,7 @@ msgid "" "it to return a tuple of size 0 or one, parenthesize the format string." msgstr "" -#: c-api/arg.rst:531 +#: 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. " @@ -1052,7 +1083,7 @@ msgid "" "`Py_BuildValue` returns." msgstr "" -#: c-api/arg.rst:539 +#: 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 " @@ -1060,188 +1091,203 @@ msgid "" "be passed." msgstr "" -#: c-api/arg.rst:543 +#: 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:549 +#: 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:548 +#: 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:554 +#: 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:552 +#: 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:558 +#: c-api/arg.rst:574 msgid "``y`` (:class:`bytes`) [const char \\*]" msgstr "``y`` (:class:`bytes`) [``const char *``]" -#: c-api/arg.rst:557 +#: 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:562 +#: 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:561 +#: 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:581 +#: c-api/arg.rst:597 msgid "Same as ``s``." msgstr "" -#: c-api/arg.rst:568 +#: 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:584 +#: c-api/arg.rst:600 msgid "Same as ``s#``." msgstr "" -#: c-api/arg.rst:573 +#: c-api/arg.rst:589 msgid "``u`` (:class:`str`) [const wchar_t \\*]" msgstr "``u`` (:class:`str`) [``const wchar_t *``]" -#: c-api/arg.rst:571 +#: c-api/arg.rst:587 msgid "" -"Convert a null-terminated :c:type:`wchar_t` buffer of Unicode (UTF-16 or " +"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:578 +#: 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:576 +#: 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:581 +#: 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:584 +#: 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:587 +#: c-api/arg.rst:603 #, fuzzy -msgid "Convert a plain C :c:type:`int` to a Python integer object." +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:590 +#: c-api/arg.rst:606 msgid "``b`` (:class:`int`) [char]" msgstr "``b`` (:class:`int`) [``char``]" -#: c-api/arg.rst:590 -msgid "Convert a plain C :c:type:`char` to a Python integer object." -msgstr "" +#: 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:593 -msgid "Convert a plain C :c:type:`short int` to a Python integer object." -msgstr "" +#: 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:596 -msgid "Convert a C :c:type:`long int` to a Python integer object." +#: 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:599 -msgid "Convert a C :c:type:`unsigned char` to a Python integer object." -msgstr "" +#: 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:602 -msgid "Convert a C :c:type:`unsigned short int` to a Python integer object." -msgstr "" +#: 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:605 +#: c-api/arg.rst:621 #, fuzzy -msgid "Convert a C :c:type:`unsigned int` to a Python integer object." +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:608 -msgid "Convert a C :c:type:`unsigned long` to a Python integer object." -msgstr "" +#: 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:611 +#: c-api/arg.rst:627 #, fuzzy -msgid "Convert a C :c:type:`long long` to a Python integer object." +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:614 -msgid "Convert a C :c:type:`unsigned long long` to a Python integer object." -msgstr "" +#: 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:617 +#: c-api/arg.rst:633 msgid "Convert a C :c:type:`Py_ssize_t` to a Python integer." msgstr "" -#: c-api/arg.rst:621 +#: 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:620 +#: c-api/arg.rst:636 +#, fuzzy msgid "" -"Convert a C :c:type:`int` representing a byte to a Python :class:`bytes` " +"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:624 +#: c-api/arg.rst:640 +#, fuzzy msgid "" -"Convert a C :c:type:`int` representing a character to Python :class:`str` " +"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:628 -msgid "Convert a C :c:type:`double` to a Python floating point number." -msgstr "" +#: 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:631 -msgid "Convert a C :c:type:`float` to a Python floating point number." -msgstr "" +#: 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:634 +#: c-api/arg.rst:650 msgid "``D`` (:class:`complex`) [Py_complex \\*]" msgstr "``D`` (:class:`complex`) [``Py_complex *``]" -#: c-api/arg.rst:634 +#: c-api/arg.rst:650 msgid "Convert a C :c:type:`Py_complex` structure to a Python complex number." msgstr "" -#: c-api/arg.rst:637 +#: 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 " @@ -1251,72 +1297,85 @@ msgid "" "raised yet, :exc:`SystemError` is set." msgstr "" -#: c-api/arg.rst:645 +#: c-api/arg.rst:661 msgid "``S`` (object) [PyObject \\*]" msgstr "``S`` (objet) [``PyObject *``]" -#: c-api/arg.rst:645 +#: c-api/arg.rst:661 msgid "Same as ``O``." msgstr "" -#: c-api/arg.rst:650 +#: c-api/arg.rst:666 msgid "``N`` (object) [PyObject \\*]" msgstr "``N`` (objet) [``PyObject *``]" -#: c-api/arg.rst:648 +#: 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:653 +#: 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:type:" +"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:659 +#: 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:662 +#: c-api/arg.rst:678 msgid "``[items]`` (:class:`list`) [*matching-items*]" msgstr "``[items]`` (:class:`list`) [*matching-items*]" -#: c-api/arg.rst:662 +#: 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:667 +#: c-api/arg.rst:683 msgid "``{items}`` (:class:`dict`) [*matching-items*]" msgstr "``{items}`` (:class:`dict`) [*matching-items*]" -#: c-api/arg.rst:665 +#: 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:669 +#: 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:674 +#: 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 " diff --git a/c-api/buffer.po b/c-api/buffer.po index 2fb3f31a36..dc4feeb0e1 100644 --- a/c-api/buffer.po +++ b/c-api/buffer.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-01 16:00+0200\n" +"POT-Creation-Date: 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" diff --git a/c-api/bytearray.po b/c-api/bytearray.po index bdab1641cf..1d82668d06 100644 --- a/c-api/bytearray.po +++ b/c-api/bytearray.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-01-27 19:26+0100\n" +"POT-Creation-Date: 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" @@ -65,7 +65,7 @@ msgstr "" "Renvoie un nouvel objet *bytearray* depuis n'importe quel objet, *o*, qui " "implémente le :ref:`protocole buffer `." -#: c-api/bytearray.rst:50 +#: c-api/bytearray.rst:48 msgid "" "Create a new bytearray object from *string* and its length, *len*. On " "failure, ``NULL`` is returned." @@ -73,20 +73,20 @@ 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:56 +#: 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:61 +#: 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:66 +#: 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." @@ -95,24 +95,24 @@ msgstr "" "vérifiant que ce n'est pas un pointeur ``NULL``. Le tableau renvoyé a " "toujours un caractère *null* rajouté." -#: c-api/bytearray.rst:73 +#: 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:76 +#: c-api/bytearray.rst:74 msgid "Macros" msgstr "Macros" -#: c-api/bytearray.rst:78 +#: 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:82 +#: 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:87 +#: 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 index a616a8e83f..deca3ebd31 100644 --- a/c-api/bytes.po +++ b/c-api/bytes.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-01-27 19:26+0100\n" +"POT-Creation-Date: 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" @@ -21,7 +21,7 @@ msgstr "Objets *bytes*" #: c-api/bytes.rst:8 msgid "" "These functions raise :exc:`TypeError` when expecting a bytes parameter and " -"are called with a non-bytes parameter." +"called with a non-bytes parameter." msgstr "" #: c-api/bytes.rst:16 @@ -96,7 +96,7 @@ msgstr "Commentaires" #: c-api/bytes.rst:70 msgid ":attr:`%%`" -msgstr "" +msgstr ":attr:`%%`" #: c-api/bytes.rst:70 msgid "*n/a*" @@ -108,7 +108,7 @@ msgstr "" #: c-api/bytes.rst:72 msgid ":attr:`%c`" -msgstr "" +msgstr ":attr:`%c`" #: c-api/bytes.rst:75 c-api/bytes.rst:96 msgid "int" @@ -120,7 +120,7 @@ msgstr "" #: c-api/bytes.rst:75 msgid ":attr:`%d`" -msgstr "" +msgstr ":attr:`%d`" #: c-api/bytes.rst:75 msgid "Equivalent to ``printf(\"%d\")``. [1]_" @@ -128,7 +128,7 @@ msgstr "" #: c-api/bytes.rst:78 msgid ":attr:`%u`" -msgstr "" +msgstr ":attr:`%u`" #: c-api/bytes.rst:78 msgid "unsigned int" @@ -140,7 +140,7 @@ msgstr "" #: c-api/bytes.rst:81 msgid ":attr:`%ld`" -msgstr "" +msgstr ":attr:`%ld`" #: c-api/bytes.rst:81 msgid "long" @@ -152,7 +152,7 @@ msgstr "" #: c-api/bytes.rst:84 msgid ":attr:`%lu`" -msgstr "" +msgstr ":attr:`%lu`" #: c-api/bytes.rst:84 msgid "unsigned long" @@ -164,10 +164,10 @@ msgstr "" #: c-api/bytes.rst:87 msgid ":attr:`%zd`" -msgstr "" +msgstr ":attr:`%zd`" #: c-api/bytes.rst:87 -msgid "Py_ssize_t" +msgid ":c:type:`\\ Py_ssize_t`" msgstr "" #: c-api/bytes.rst:87 @@ -176,7 +176,7 @@ msgstr "" #: c-api/bytes.rst:90 msgid ":attr:`%zu`" -msgstr "" +msgstr ":attr:`%zu`" #: c-api/bytes.rst:90 msgid "size_t" @@ -188,7 +188,7 @@ msgstr "" #: c-api/bytes.rst:93 msgid ":attr:`%i`" -msgstr "" +msgstr ":attr:`%i`" #: c-api/bytes.rst:93 msgid "Equivalent to ``printf(\"%i\")``. [1]_" @@ -196,7 +196,7 @@ msgstr "" #: c-api/bytes.rst:96 msgid ":attr:`%x`" -msgstr "" +msgstr ":attr:`%x`" #: c-api/bytes.rst:96 msgid "Equivalent to ``printf(\"%x\")``. [1]_" @@ -204,7 +204,7 @@ msgstr "" #: c-api/bytes.rst:99 msgid ":attr:`%s`" -msgstr "" +msgstr ":attr:`%s`" #: c-api/bytes.rst:99 msgid "const char\\*" @@ -216,7 +216,7 @@ msgstr "" #: c-api/bytes.rst:102 msgid ":attr:`%p`" -msgstr "" +msgstr ":attr:`%p`" #: c-api/bytes.rst:102 msgid "const void\\*" @@ -224,9 +224,9 @@ msgstr "" #: c-api/bytes.rst:102 msgid "" -"The hex representation of a C pointer. Mostly equivalent to ``printf(\"%p" -"\")`` except that it is guaranteed to start with the literal ``0x`` " -"regardless of what the platform's ``printf`` yields." +"The hex representation of a C pointer. Mostly equivalent to " +"``printf(\"%p\")`` except that it is guaranteed to start with the literal " +"``0x`` regardless of what the platform's ``printf`` yields." msgstr "" #: c-api/bytes.rst:111 @@ -330,7 +330,7 @@ msgid "" "address of an existing bytes object as an lvalue (it may be written into), " "and the new size desired. On success, *\\*bytes* holds the resized bytes " "object and ``0`` is returned; the address in *\\*bytes* may differ from its " -"input value. If the reallocation fails, the original bytes object at *" -"\\*bytes* is deallocated, *\\*bytes* is set to ``NULL``, :exc:`MemoryError` " +"input value. If the reallocation fails, the original bytes object at " +"*\\*bytes* is deallocated, *\\*bytes* is set to ``NULL``, :exc:`MemoryError` " "is set, and ``-1`` is returned." msgstr "" diff --git a/c-api/call.po b/c-api/call.po index a02a8e1a3b..37f5609e90 100644 --- a/c-api/call.po +++ b/c-api/call.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-21 15:04+0200\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" @@ -49,8 +49,8 @@ msgstr "" #: c-api/call.rst:29 msgid "" -"To call an object, use :c:func:`PyObject_Call` or other :ref:`call API `." +"To call an object, use :c:func:`PyObject_Call` or another :ref:`call API " +"`." msgstr "" #: c-api/call.rst:36 @@ -209,12 +209,7 @@ msgid "" "future extensions." msgstr "" -#: c-api/call.rst:161 c-api/call.rst:259 c-api/call.rst:360 c-api/call.rst:391 -#: c-api/call.rst:413 -msgid "This function is not part of the :ref:`limited API `." -msgstr "" - -#: c-api/call.rst:153 +#: 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*. " @@ -222,19 +217,19 @@ msgid "" "function never raises an exception." msgstr "" -#: c-api/call.rst:158 +#: 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:167 +#: 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:170 +#: 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``. " @@ -242,11 +237,11 @@ msgid "" "not fall back to ``tp_call``." msgstr "" -#: c-api/call.rst:183 +#: c-api/call.rst:177 msgid "Object Calling API" msgstr "" -#: c-api/call.rst:185 +#: 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 " @@ -254,130 +249,130 @@ msgid "" "pick one that best fits the format of data you have available." msgstr "" -#: c-api/call.rst:191 +#: c-api/call.rst:185 msgid "" "The following table summarizes the available functions; please see " "individual documentation for details." msgstr "" -#: c-api/call.rst:195 +#: c-api/call.rst:189 msgid "Function" msgstr "Fonction" -#: c-api/call.rst:195 +#: c-api/call.rst:189 msgid "callable" -msgstr "" +msgstr "appelable (*callable*)" -#: c-api/call.rst:195 +#: c-api/call.rst:189 msgid "args" msgstr "" -#: c-api/call.rst:195 +#: c-api/call.rst:189 msgid "kwargs" msgstr "" -#: c-api/call.rst:197 +#: c-api/call.rst:191 msgid ":c:func:`PyObject_Call`" msgstr "" -#: c-api/call.rst:199 c-api/call.rst:203 c-api/call.rst:209 c-api/call.rst:219 +#: 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:197 +#: c-api/call.rst:191 msgid "tuple" msgstr "" -#: c-api/call.rst:219 +#: c-api/call.rst:213 msgid "dict/``NULL``" msgstr "" -#: c-api/call.rst:199 +#: c-api/call.rst:193 msgid ":c:func:`PyObject_CallNoArgs`" msgstr "" -#: c-api/call.rst:201 c-api/call.rst:205 c-api/call.rst:209 c-api/call.rst:213 -#: c-api/call.rst:215 +#: 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:201 +#: c-api/call.rst:195 msgid ":c:func:`PyObject_CallOneArg`" msgstr "" -#: c-api/call.rst:215 +#: c-api/call.rst:209 msgid "1 object" msgstr "" -#: c-api/call.rst:203 +#: c-api/call.rst:197 msgid ":c:func:`PyObject_CallObject`" msgstr "" -#: c-api/call.rst:203 +#: c-api/call.rst:197 msgid "tuple/``NULL``" msgstr "" -#: c-api/call.rst:205 +#: c-api/call.rst:199 msgid ":c:func:`PyObject_CallFunction`" msgstr "" -#: c-api/call.rst:207 +#: c-api/call.rst:201 msgid "format" msgstr "format" -#: c-api/call.rst:207 +#: c-api/call.rst:201 msgid ":c:func:`PyObject_CallMethod`" msgstr "" -#: c-api/call.rst:207 +#: c-api/call.rst:201 msgid "obj + ``char*``" msgstr "" -#: c-api/call.rst:209 +#: c-api/call.rst:203 msgid ":c:func:`PyObject_CallFunctionObjArgs`" msgstr "" -#: c-api/call.rst:211 +#: c-api/call.rst:205 msgid "variadic" msgstr "" -#: c-api/call.rst:211 +#: c-api/call.rst:205 msgid ":c:func:`PyObject_CallMethodObjArgs`" msgstr "" -#: c-api/call.rst:213 c-api/call.rst:215 +#: c-api/call.rst:207 c-api/call.rst:209 msgid "obj + name" msgstr "" -#: c-api/call.rst:213 +#: c-api/call.rst:207 msgid ":c:func:`PyObject_CallMethodNoArgs`" msgstr "" -#: c-api/call.rst:215 +#: c-api/call.rst:209 msgid ":c:func:`PyObject_CallMethodOneArg`" msgstr "" -#: c-api/call.rst:217 +#: c-api/call.rst:211 msgid ":c:func:`PyObject_Vectorcall`" msgstr "" -#: c-api/call.rst:219 c-api/call.rst:221 +#: c-api/call.rst:213 c-api/call.rst:215 msgid "vectorcall" msgstr "" -#: c-api/call.rst:219 +#: c-api/call.rst:213 msgid ":c:func:`PyObject_VectorcallDict`" msgstr "" -#: c-api/call.rst:221 +#: c-api/call.rst:215 msgid ":c:func:`PyObject_VectorcallMethod`" msgstr "" -#: c-api/call.rst:221 +#: c-api/call.rst:215 msgid "arg + name" msgstr "" -#: c-api/call.rst:227 +#: 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*." @@ -386,49 +381,49 @@ msgstr "" "le *n*-uplet *args*, et des arguments nommés donnés par le dictionnaire " "*kwargs*." -#: c-api/call.rst:230 +#: 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:245 c-api/call.rst:269 c-api/call.rst:301 c-api/call.rst:334 -#: c-api/call.rst:357 c-api/call.rst:410 +#: 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:236 +#: 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:242 +#: 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:253 +#: 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:266 +#: 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:284 +#: 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:277 +#: 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` " @@ -436,92 +431,92 @@ msgid "" "are provided." msgstr "" -#: c-api/call.rst:286 +#: c-api/call.rst:278 msgid "" -"Note that if you only pass :c:type:`PyObject *` args, :c:func:" +"Note that if you only pass :c:expr:`PyObject *` args, :c:func:" "`PyObject_CallFunctionObjArgs` is a faster alternative." msgstr "" -#: c-api/call.rst:289 +#: c-api/call.rst:281 msgid "The type of *format* was changed from ``char *``." msgstr "" -#: c-api/call.rst:295 +#: 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:299 +#: c-api/call.rst:291 msgid "The format can be *NULL*, indicating that no arguments are provided." msgstr "" -#: c-api/call.rst:304 +#: c-api/call.rst:296 msgid "" "This is the equivalent of the Python expression: ``obj.name(arg1, " "arg2, ...)``." msgstr "" -#: c-api/call.rst:307 +#: c-api/call.rst:299 msgid "" -"Note that if you only pass :c:type:`PyObject *` args, :c:func:" +"Note that if you only pass :c:expr:`PyObject *` args, :c:func:" "`PyObject_CallMethodObjArgs` is a faster alternative." msgstr "" -#: c-api/call.rst:310 +#: c-api/call.rst:302 msgid "The types of *name* and *format* were changed from ``char *``." msgstr "" -#: c-api/call.rst:316 +#: c-api/call.rst:308 msgid "" -"Call a callable Python object *callable*, with a variable number of :c:type:" +"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:323 +#: c-api/call.rst:315 msgid "" "This is the equivalent of the Python expression: ``callable(arg1, " "arg2, ...)``." msgstr "" -#: c-api/call.rst:329 +#: 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:type:`PyObject *` arguments. The arguments are provided as a " +"number of :c:expr:`PyObject *` arguments. The arguments are provided as a " "variable number of parameters followed by *NULL*." msgstr "" -#: c-api/call.rst:340 +#: 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:353 +#: 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:367 +#: 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:381 +#: 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:385 +#: 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 " @@ -529,7 +524,7 @@ msgid "" "tuple for the positional arguments." msgstr "" -#: c-api/call.rst:397 +#: 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 " @@ -541,17 +536,17 @@ msgid "" "`PyObject_Vectorcall`." msgstr "" -#: c-api/call.rst:406 +#: 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:419 +#: c-api/call.rst:401 msgid "Call Support API" msgstr "" -#: c-api/call.rst:423 +#: 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." diff --git a/c-api/capsule.po b/c-api/capsule.po index 35f1acdf3e..ffb042ea56 100644 --- a/c-api/capsule.po +++ b/c-api/capsule.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-01-27 19:26+0100\n" +"POT-Creation-Date: 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" @@ -28,7 +28,7 @@ msgstr "" #: 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:type:`void*` " +"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 " diff --git a/c-api/complex.po b/c-api/complex.po index a06d5f3e72..68bc4bbbce 100644 --- a/c-api/complex.po +++ b/c-api/complex.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-06-22 09:58+0200\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" @@ -174,13 +174,15 @@ msgstr "" "Renvoie un nouveau :c:type:`PyComplexObject` à partir de *real* et de *imag*." #: c-api/complex.rst:118 -msgid "Return the real part of *op* as a C :c:type:`double`." +#, 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 -msgid "Return the imaginary part of *op* as a C :c:type:`double`." +#, 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." diff --git a/c-api/conversion.po b/c-api/conversion.po index 9da64040c2..af95d132bc 100644 --- a/c-api/conversion.po +++ b/c-api/conversion.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-09-23 16:16+0200\n" +"POT-Creation-Date: 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" @@ -51,58 +51,60 @@ 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``." +"``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:33 +#: c-api/conversion.rst:34 msgid "" "The return value (*rv*) for these functions should be interpreted as follows:" msgstr "" -#: c-api/conversion.rst:35 +#: 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:39 +#: 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:43 +#: 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:48 +#: c-api/conversion.rst:49 msgid "" "The following functions provide locale-independent string to number " "conversions." msgstr "" -#: c-api/conversion.rst:52 +#: c-api/conversion.rst:53 msgid "" -"Convert a string ``s`` to a :c:type:`double`, raising a Python exception on " +"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:58 +#: 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:62 +#: 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 " @@ -111,7 +113,7 @@ msgid "" "ValueError, and return ``-1.0``." msgstr "" -#: c-api/conversion.rst:69 +#: 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 " @@ -122,50 +124,50 @@ msgid "" "the first character after the converted value." msgstr "" -#: c-api/conversion.rst:77 +#: 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:86 +#: c-api/conversion.rst:87 msgid "" -"Convert a :c:type:`double` *val* to a string using supplied *format_code*, " +"Convert a :c:expr:`double` *val* to a string using supplied *format_code*, " "*precision*, and *flags*." msgstr "" -#: c-api/conversion.rst:89 +#: 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:94 +#: 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:97 +#: 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:100 +#: 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:103 +#: 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:107 +#: 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 " @@ -173,20 +175,20 @@ msgid "" "respectively." msgstr "" -#: c-api/conversion.rst:111 +#: 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:120 +#: 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:126 +#: 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." diff --git a/c-api/datetime.po b/c-api/datetime.po index 30a33634f4..d3678e3c6f 100644 --- a/c-api/datetime.po +++ b/c-api/datetime.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-09-23 16:16+0200\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" @@ -207,7 +207,7 @@ msgstr "" "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:137 +#: c-api/datetime.rst:138 msgid "" "Return a :class:`datetime.timezone` object with an unnamed fixed offset " "represented by the *offset* argument." @@ -215,7 +215,7 @@ msgstr "" "Renvoie un objet :class:`datetime.timezone` avec un décalage anonyme fixe " "représenté par l'argument *offset*." -#: c-api/datetime.rst:144 +#: 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*." @@ -223,7 +223,7 @@ 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:150 +#: c-api/datetime.rst:152 #, fuzzy msgid "" "Macros to extract fields from date objects. The argument must be an " @@ -236,19 +236,19 @@ msgstr "" "`PyDateTime_DateTime`). L'argument ne doit pas être *NULL*, et le type n'est " "pas vérifié :" -#: c-api/datetime.rst:157 +#: 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:162 +#: 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:167 +#: 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:170 +#: c-api/datetime.rst:172 #, fuzzy msgid "" "Macros to extract fields from datetime objects. The argument must be an " @@ -259,27 +259,32 @@ msgstr "" "une instance de :c:data:`PyDateTime_DateTime` ou une sous-classe de celle-" "ci. L'argument ne doit pas être *NULL*, et le type n'est pas vérifié :" -#: c-api/datetime.rst:205 +#: 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:210 +#: 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:215 +#: 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:220 +#: 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:224 +#: 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:199 +#: c-api/datetime.rst:210 #, fuzzy msgid "" "Macros to extract fields from time objects. The argument must be an " @@ -290,7 +295,7 @@ msgstr "" "instance de :c:data:`PyDateTime_Time` ou une sous-classe de celle-ci. " "L'argument ne doit pas être *NULL*, et le type n'est pas vérifié :" -#: c-api/datetime.rst:229 +#: c-api/datetime.rst:248 #, fuzzy msgid "" "Macros to extract fields from time delta objects. The argument must be an " @@ -301,26 +306,26 @@ msgstr "" "être une instance de :c:data:`PyDateTime_Delta` ou une sous-classe de celle-" "ci. L'argument ne doit pas être *NULL*, et le type n'est pas vérifié :" -#: c-api/datetime.rst:235 +#: 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:242 +#: 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:249 +#: 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:254 +#: 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:258 +#: 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()`." @@ -328,7 +333,7 @@ msgstr "" "Crée et renvoie un nouvel objet :class:`datetime.datetime` à partir d'un n-" "uplet qui peut être passé à :meth:`datetime.datetime.fromtimestamp()`." -#: c-api/datetime.rst:264 +#: 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()`." diff --git a/c-api/dict.po b/c-api/dict.po index 98d4e69d0e..4ec951e3a1 100644 --- a/c-api/dict.po +++ b/c-api/dict.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-09-23 16:16+0200\n" +"POT-Creation-Date: 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" @@ -84,16 +84,17 @@ msgstr "" #: c-api/dict.rst:75 msgid "" "Insert *val* into the dictionary *p* using *key* as a key. *key* should be " -"a :c:type:`const char*`. The key object is created using " +"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 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." +"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 @@ -132,7 +133,7 @@ msgstr "" #: c-api/dict.rst:120 msgid "" "This is the same as :c:func:`PyDict_GetItem`, but *key* is specified as a :c:" -"type:`const char*`, rather than a :c:type:`PyObject*`." +"expr:`const char*`, rather than a :c:expr:`PyObject*`." msgstr "" #: c-api/dict.rst:123 @@ -180,7 +181,7 @@ msgid "" "`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:type:" +"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 " diff --git a/c-api/exceptions.po b/c-api/exceptions.po index c4e3565fd3..533e9b28e5 100644 --- a/c-api/exceptions.po +++ b/c-api/exceptions.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-09-23 16:16+0200\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" @@ -28,8 +28,8 @@ msgid "" "occurred. Most C API functions don't clear this on success, but will set it " "to indicate the cause of the error on failure. Most C API functions also " "return an error indicator, usually ``NULL`` if they are supposed to return a " -"pointer, or ``-1`` if they return an integer (exception: the :c:func:`PyArg_" -"\\*` functions return ``1`` for success and ``0`` for failure)." +"pointer, or ``-1`` if they return an integer (exception: the ``PyArg_*`` " +"functions return ``1`` for success and ``0`` for failure)." msgstr "" #: c-api/exceptions.rst:20 @@ -219,12 +219,12 @@ msgstr "" #: c-api/exceptions.rst:191 msgid "" "This is a convenience function to raise :exc:`WindowsError`. If called with " -"*ierr* of :c:data:`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 " +"*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 "" @@ -274,25 +274,31 @@ msgstr "" #: c-api/exceptions.rst:258 msgid "" +"Much like :c:func:`PyErr_SetImportError` but this function allows for " +"specifying a subclass of :exc:`ImportError` to raise." +msgstr "" + +#: c-api/exceptions.rst:266 +msgid "" "Set file, line, and offset information for the current exception. If the " "current exception is not a :exc:`SyntaxError`, then it sets additional " "attributes, which make the exception printing subsystem think the exception " "is a :exc:`SyntaxError`." msgstr "" -#: c-api/exceptions.rst:268 +#: c-api/exceptions.rst:276 msgid "" "Like :c:func:`PyErr_SyntaxLocationObject`, but *filename* is a byte string " "decoded from the :term:`filesystem encoding and error handler`." msgstr "" -#: c-api/exceptions.rst:276 +#: c-api/exceptions.rst:284 msgid "" -"Like :c:func:`PyErr_SyntaxLocationEx`, but the col_offset parameter is " +"Like :c:func:`PyErr_SyntaxLocationEx`, but the *col_offset* parameter is " "omitted." msgstr "" -#: c-api/exceptions.rst:282 +#: c-api/exceptions.rst:290 msgid "" "This is a shorthand for ``PyErr_SetString(PyExc_SystemError, message)``, " "where *message* indicates that an internal operation (e.g. a Python/C API " @@ -300,11 +306,11 @@ msgid "" "use." msgstr "" -#: c-api/exceptions.rst:289 +#: c-api/exceptions.rst:297 msgid "Issuing warnings" msgstr "" -#: c-api/exceptions.rst:291 +#: c-api/exceptions.rst:299 msgid "" "Use these functions to issue warnings from C code. They mirror similar " "functions exported by the Python :mod:`warnings` module. They normally " @@ -320,7 +326,7 @@ msgid "" "return an error value)." msgstr "" -#: c-api/exceptions.rst:306 +#: c-api/exceptions.rst:314 msgid "" "Issue a warning message. The *category* argument is a warning category (see " "below) or ``NULL``; the *message* argument is a UTF-8 encoded string. " @@ -330,7 +336,7 @@ msgid "" "`PyErr_WarnEx`, 2 is the function above that, and so forth." msgstr "" -#: c-api/exceptions.rst:313 +#: c-api/exceptions.rst:321 msgid "" "Warning categories must be subclasses of :c:data:`PyExc_Warning`; :c:data:" "`PyExc_Warning` is a subclass of :c:data:`PyExc_Exception`; the default " @@ -339,65 +345,59 @@ msgid "" "enumerated at :ref:`standardwarningcategories`." msgstr "" -#: c-api/exceptions.rst:319 +#: c-api/exceptions.rst:327 msgid "" "For information about warning control, see the documentation for the :mod:" "`warnings` module and the :option:`-W` option in the command line " "documentation. There is no C API for warning control." msgstr "" -#: c-api/exceptions.rst:325 -msgid "" -"Much like :c:func:`PyErr_SetImportError` but this function allows for " -"specifying a subclass of :exc:`ImportError` to raise." -msgstr "" - -#: c-api/exceptions.rst:333 +#: c-api/exceptions.rst:334 msgid "" "Issue a warning message with explicit control over all warning attributes. " "This is a straightforward wrapper around the Python function :func:`warnings." -"warn_explicit`, see there for more information. The *module* and *registry* " +"warn_explicit`; see there for more information. The *module* and *registry* " "arguments may be set to ``NULL`` to get the default effect described there." msgstr "" -#: c-api/exceptions.rst:344 +#: c-api/exceptions.rst:345 msgid "" "Similar to :c:func:`PyErr_WarnExplicitObject` except that *message* and " "*module* are UTF-8 encoded strings, and *filename* is decoded from the :term:" "`filesystem encoding and error handler`." msgstr "" -#: c-api/exceptions.rst:351 +#: c-api/exceptions.rst:352 msgid "" "Function similar to :c:func:`PyErr_WarnEx`, but use :c:func:" "`PyUnicode_FromFormat` to format the warning message. *format* is an ASCII-" "encoded string." msgstr "" -#: c-api/exceptions.rst:360 +#: c-api/exceptions.rst:361 msgid "" "Function similar to :c:func:`PyErr_WarnFormat`, but *category* is :exc:" "`ResourceWarning` and it passes *source* to :func:`warnings.WarningMessage`." msgstr "" -#: c-api/exceptions.rst:367 +#: c-api/exceptions.rst:368 msgid "Querying the error indicator" msgstr "" -#: c-api/exceptions.rst:371 +#: c-api/exceptions.rst:372 msgid "" "Test whether the error indicator is set. If set, return the exception " -"*type* (the first argument to the last call to one of the :c:func:`PyErr_Set" -"\\*` functions or to :c:func:`PyErr_Restore`). If not set, return " -"``NULL``. You do not own a reference to the return value, so you do not " -"need to :c:func:`Py_DECREF` it." +"*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:377 +#: c-api/exceptions.rst:378 msgid "The caller must hold the GIL." msgstr "" -#: c-api/exceptions.rst:381 +#: c-api/exceptions.rst:382 msgid "" "Do not compare the return value to a specific exception; use :c:func:" "`PyErr_ExceptionMatches` instead, shown below. (The comparison could easily " @@ -405,14 +405,14 @@ msgid "" "of a class exception, or it may be a subclass of the expected exception.)" msgstr "" -#: c-api/exceptions.rst:389 +#: c-api/exceptions.rst:390 msgid "" "Equivalent to ``PyErr_GivenExceptionMatches(PyErr_Occurred(), exc)``. This " "should only be called when an exception is actually set; a memory access " "violation will occur if no exception has been raised." msgstr "" -#: c-api/exceptions.rst:396 +#: c-api/exceptions.rst:397 msgid "" "Return true if the *given* exception matches the exception type in *exc*. " "If *exc* is a class object, this also returns true when *given* is an " @@ -420,7 +420,7 @@ msgid "" "tuple (and recursively in subtuples) are searched for a match." msgstr "" -#: c-api/exceptions.rst:404 +#: c-api/exceptions.rst:405 msgid "" "Retrieve the error indicator into three variables whose addresses are " "passed. If the error indicator is not set, set all three variables to " @@ -429,14 +429,14 @@ msgid "" "the type object is not." msgstr "" -#: c-api/exceptions.rst:411 +#: c-api/exceptions.rst:412 msgid "" "This function is normally only used by code that needs to catch exceptions " "or by code that needs to save and restore the error indicator temporarily, e." "g.::" msgstr "" -#: c-api/exceptions.rst:426 +#: c-api/exceptions.rst:427 msgid "" "Set the error indicator from the three objects. If the error indicator is " "already set, it is cleared first. If the objects are ``NULL``, the error " @@ -449,14 +449,14 @@ msgid "" "function. I warned you.)" msgstr "" -#: c-api/exceptions.rst:438 +#: c-api/exceptions.rst:439 msgid "" "This function is normally only used by code that needs to save and restore " "the error indicator temporarily. Use :c:func:`PyErr_Fetch` to save the " "current error indicator." msgstr "" -#: c-api/exceptions.rst:445 +#: c-api/exceptions.rst:446 msgid "" "Under certain circumstances, the values returned by :c:func:`PyErr_Fetch` " "below can be \"unnormalized\", meaning that ``*exc`` is a class object but " @@ -466,14 +466,14 @@ msgid "" "improve performance." msgstr "" -#: c-api/exceptions.rst:453 +#: c-api/exceptions.rst:454 msgid "" "This function *does not* implicitly set the ``__traceback__`` attribute on " "the exception value. If setting the traceback appropriately is desired, the " "following additional snippet is needed::" msgstr "" -#: c-api/exceptions.rst:464 +#: c-api/exceptions.rst:465 msgid "" "Retrieve the exception info, as known from ``sys.exc_info()``. This refers " "to an exception that was *already caught*, not to an exception that was " @@ -481,7 +481,7 @@ msgid "" "may be ``NULL``. Does not modify the exception info state." msgstr "" -#: c-api/exceptions.rst:471 +#: c-api/exceptions.rst:472 msgid "" "This function is not normally used by code that wants to handle exceptions. " "Rather, it can be used when code needs to save and restore the exception " @@ -489,7 +489,7 @@ msgid "" "exception state." msgstr "" -#: c-api/exceptions.rst:481 +#: c-api/exceptions.rst:482 msgid "" "Set the exception info, as known from ``sys.exc_info()``. This refers to an " "exception that was *already caught*, not to an exception that was freshly " @@ -498,7 +498,7 @@ msgid "" "about the three arguments, see :c:func:`PyErr_Restore`." msgstr "" -#: c-api/exceptions.rst:489 +#: c-api/exceptions.rst:490 msgid "" "This function is not normally used by code that wants to handle exceptions. " "Rather, it can be used when code needs to save and restore the exception " @@ -506,15 +506,15 @@ msgid "" "state." msgstr "" -#: c-api/exceptions.rst:498 +#: c-api/exceptions.rst:499 msgid "Signal Handling" msgstr "Traitement des signaux" -#: c-api/exceptions.rst:508 +#: c-api/exceptions.rst:509 msgid "This function interacts with Python's signal handling." msgstr "" -#: c-api/exceptions.rst:510 +#: 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 " @@ -522,7 +522,7 @@ msgid "" "module is supported, this can invoke a signal handler written in Python." msgstr "" -#: c-api/exceptions.rst:515 +#: 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 " @@ -531,44 +531,44 @@ msgid "" "`PyErr_CheckSignals()` invocation)." msgstr "" -#: c-api/exceptions.rst:521 +#: 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:524 +#: 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:528 +#: c-api/exceptions.rst:529 msgid "" "The default Python signal handler for :const:`SIGINT` raises the :exc:" "`KeyboardInterrupt` exception." msgstr "" -#: c-api/exceptions.rst:539 +#: 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:570 +#: 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:553 +#: 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:557 +#: 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 " @@ -576,27 +576,27 @@ msgid "" "interrupt an operation)." msgstr "" -#: c-api/exceptions.rst:562 +#: 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:565 +#: 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:578 +#: 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:582 +#: 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 " @@ -604,15 +604,15 @@ msgid "" "be called from the main thread." msgstr "" -#: c-api/exceptions.rst:587 +#: c-api/exceptions.rst:588 msgid "On Windows, the function now also supports socket handles." msgstr "" -#: c-api/exceptions.rst:592 +#: c-api/exceptions.rst:593 msgid "Exception Classes" msgstr "" -#: c-api/exceptions.rst:596 +#: 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 " @@ -621,7 +621,7 @@ msgid "" "(accessible in C as :c:data:`PyExc_Exception`)." msgstr "" -#: c-api/exceptions.rst:602 +#: 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 " @@ -631,31 +631,31 @@ msgid "" "variables and methods." msgstr "" -#: c-api/exceptions.rst:611 +#: 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:619 +#: c-api/exceptions.rst:620 msgid "Exception Objects" msgstr "Objets exception" -#: c-api/exceptions.rst:623 +#: 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:630 +#: 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:636 +#: 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 " @@ -663,127 +663,127 @@ msgid "" "this returns ``NULL``." msgstr "" -#: c-api/exceptions.rst:644 +#: 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:651 +#: 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:658 +#: 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:662 +#: c-api/exceptions.rst:663 msgid "" ":attr:`__suppress_context__` is implicitly set to ``True`` by this function." msgstr "" -#: c-api/exceptions.rst:668 +#: c-api/exceptions.rst:669 msgid "Unicode Exception Objects" msgstr "Objets exception Unicode" -#: c-api/exceptions.rst:670 +#: c-api/exceptions.rst:671 msgid "" "The following functions are used to create and modify Unicode exceptions " "from C." msgstr "" -#: c-api/exceptions.rst:674 +#: 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:680 +#: 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:694 +#: c-api/exceptions.rst:695 msgid "3.11" -msgstr "" +msgstr "3.11" -#: c-api/exceptions.rst:686 +#: 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:691 +#: 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:696 +#: 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:702 +#: c-api/exceptions.rst:703 msgid "Return the *encoding* attribute of the given exception object." msgstr "" -#: c-api/exceptions.rst:708 +#: c-api/exceptions.rst:709 msgid "Return the *object* attribute of the given exception object." msgstr "" -#: c-api/exceptions.rst:714 +#: 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`` " +"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:722 +#: 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:729 +#: 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 " +"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:737 +#: 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:744 +#: c-api/exceptions.rst:745 msgid "Return the *reason* attribute of the given exception object." msgstr "" -#: c-api/exceptions.rst:750 +#: 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:757 +#: c-api/exceptions.rst:758 msgid "Recursion Control" msgstr "Contrôle de la récursion" -#: c-api/exceptions.rst:759 +#: 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 " @@ -793,42 +793,42 @@ msgid "" "recursion handling." msgstr "" -#: c-api/exceptions.rst:768 +#: 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:770 +#: 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:774 +#: 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:778 +#: 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:790 +#: c-api/exceptions.rst:791 msgid "This function is now also available in the limited API." msgstr "" -#: c-api/exceptions.rst:787 +#: 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:793 +#: 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, :" @@ -837,13 +837,13 @@ msgid "" "Effectively, these are the C equivalent to :func:`reprlib.recursive_repr`." msgstr "" -#: c-api/exceptions.rst:801 +#: 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:804 +#: 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 " @@ -851,483 +851,479 @@ msgid "" "`dict` objects return ``{...}`` and :class:`list` objects return ``[...]``." msgstr "" -#: c-api/exceptions.rst:810 +#: 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:814 +#: 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:819 +#: 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:826 +#: c-api/exceptions.rst:827 msgid "Standard Exceptions" msgstr "Exceptions standards" -#: c-api/exceptions.rst:828 +#: 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:type:`PyObject*`; they are all class objects. For completeness, here are " +"c:expr:`PyObject*`; they are all class objects. For completeness, here are " "all the variables:" msgstr "" -#: c-api/exceptions.rst:1022 c-api/exceptions.rst:1067 +#: c-api/exceptions.rst:1023 c-api/exceptions.rst:1068 msgid "C Name" msgstr "Nom C" -#: c-api/exceptions.rst:1067 +#: c-api/exceptions.rst:1068 msgid "Python Name" msgstr "Nom Python" -#: c-api/exceptions.rst:1022 c-api/exceptions.rst:1067 +#: c-api/exceptions.rst:1023 c-api/exceptions.rst:1068 msgid "Notes" msgstr "Notes" -#: c-api/exceptions.rst:891 +#: c-api/exceptions.rst:892 msgid ":c:data:`PyExc_BaseException`" msgstr ":c:data:`PyExc_BaseException`" -#: c-api/exceptions.rst:891 +#: c-api/exceptions.rst:892 msgid ":exc:`BaseException`" msgstr ":exc:`BaseException`" -#: c-api/exceptions.rst:893 c-api/exceptions.rst:941 c-api/exceptions.rst:1069 -msgid "\\(1)" -msgstr "\\(1)" +#: c-api/exceptions.rst:894 c-api/exceptions.rst:942 c-api/exceptions.rst:954 +msgid "[1]_" +msgstr "" -#: c-api/exceptions.rst:893 +#: c-api/exceptions.rst:894 msgid ":c:data:`PyExc_Exception`" msgstr ":c:data:`PyExc_Exception`" -#: c-api/exceptions.rst:893 +#: c-api/exceptions.rst:894 msgid ":exc:`Exception`" msgstr ":exc:`Exception`" -#: c-api/exceptions.rst:895 +#: c-api/exceptions.rst:896 msgid ":c:data:`PyExc_ArithmeticError`" msgstr ":c:data:`PyExc_ArithmeticError`" -#: c-api/exceptions.rst:895 +#: c-api/exceptions.rst:896 msgid ":exc:`ArithmeticError`" msgstr ":exc:`ArithmeticError`" -#: c-api/exceptions.rst:897 +#: c-api/exceptions.rst:898 msgid ":c:data:`PyExc_AssertionError`" msgstr ":c:data:`PyExc_AssertionError`" -#: c-api/exceptions.rst:897 +#: c-api/exceptions.rst:898 msgid ":exc:`AssertionError`" msgstr ":exc:`AssertionError`" -#: c-api/exceptions.rst:899 +#: c-api/exceptions.rst:900 msgid ":c:data:`PyExc_AttributeError`" msgstr ":c:data:`PyExc_AttributeError`" -#: c-api/exceptions.rst:899 +#: c-api/exceptions.rst:900 msgid ":exc:`AttributeError`" msgstr ":exc:`AttributeError`" -#: c-api/exceptions.rst:901 +#: c-api/exceptions.rst:902 msgid ":c:data:`PyExc_BlockingIOError`" msgstr ":c:data:`PyExc_BlockingIOError`" -#: c-api/exceptions.rst:901 +#: c-api/exceptions.rst:902 msgid ":exc:`BlockingIOError`" msgstr ":exc:`BlockingIOError`" -#: c-api/exceptions.rst:903 +#: c-api/exceptions.rst:904 msgid ":c:data:`PyExc_BrokenPipeError`" msgstr ":c:data:`PyExc_BrokenPipeError`" -#: c-api/exceptions.rst:903 +#: c-api/exceptions.rst:904 msgid ":exc:`BrokenPipeError`" msgstr ":exc:`BrokenPipeError`" -#: c-api/exceptions.rst:905 +#: c-api/exceptions.rst:906 msgid ":c:data:`PyExc_BufferError`" msgstr ":c:data:`PyExc_BufferError`" -#: c-api/exceptions.rst:905 +#: c-api/exceptions.rst:906 msgid ":exc:`BufferError`" msgstr ":exc:`BufferError`" -#: c-api/exceptions.rst:907 +#: c-api/exceptions.rst:908 msgid ":c:data:`PyExc_ChildProcessError`" msgstr ":c:data:`PyExc_ChildProcessError`" -#: c-api/exceptions.rst:907 +#: c-api/exceptions.rst:908 msgid ":exc:`ChildProcessError`" msgstr ":exc:`ChildProcessError`" -#: c-api/exceptions.rst:909 +#: c-api/exceptions.rst:910 msgid ":c:data:`PyExc_ConnectionAbortedError`" msgstr ":c:data:`PyExc_ConnectionAbortedError`" -#: c-api/exceptions.rst:909 +#: c-api/exceptions.rst:910 msgid ":exc:`ConnectionAbortedError`" msgstr ":exc:`ConnectionAbortedError`" -#: c-api/exceptions.rst:911 +#: c-api/exceptions.rst:912 msgid ":c:data:`PyExc_ConnectionError`" msgstr ":c:data:`PyExc_ConnectionError`" -#: c-api/exceptions.rst:911 +#: c-api/exceptions.rst:912 msgid ":exc:`ConnectionError`" msgstr ":exc:`ConnectionError`" -#: c-api/exceptions.rst:913 +#: c-api/exceptions.rst:914 msgid ":c:data:`PyExc_ConnectionRefusedError`" msgstr ":c:data:`PyExc_ConnectionRefusedError`" -#: c-api/exceptions.rst:913 +#: c-api/exceptions.rst:914 msgid ":exc:`ConnectionRefusedError`" msgstr ":exc:`ConnectionRefusedError`" -#: c-api/exceptions.rst:915 +#: c-api/exceptions.rst:916 msgid ":c:data:`PyExc_ConnectionResetError`" msgstr ":c:data:`PyExc_ConnectionResetError`" -#: c-api/exceptions.rst:915 +#: c-api/exceptions.rst:916 msgid ":exc:`ConnectionResetError`" msgstr ":exc:`ConnectionResetError`" -#: c-api/exceptions.rst:917 +#: c-api/exceptions.rst:918 msgid ":c:data:`PyExc_EOFError`" msgstr ":c:data:`PyExc_EOFError`" -#: c-api/exceptions.rst:917 +#: c-api/exceptions.rst:918 msgid ":exc:`EOFError`" msgstr ":exc:`EOFError`" -#: c-api/exceptions.rst:919 +#: c-api/exceptions.rst:920 msgid ":c:data:`PyExc_FileExistsError`" msgstr ":c:data:`PyExc_FileExistsError`" -#: c-api/exceptions.rst:919 +#: c-api/exceptions.rst:920 msgid ":exc:`FileExistsError`" msgstr ":exc:`FileExistsError`" -#: c-api/exceptions.rst:921 +#: c-api/exceptions.rst:922 msgid ":c:data:`PyExc_FileNotFoundError`" msgstr ":c:data:`PyExc_FloatingPointError`" -#: c-api/exceptions.rst:921 +#: c-api/exceptions.rst:922 msgid ":exc:`FileNotFoundError`" msgstr ":exc:`FileNotFoundError`" -#: c-api/exceptions.rst:923 +#: c-api/exceptions.rst:924 msgid ":c:data:`PyExc_FloatingPointError`" msgstr ":c:data:`PyExc_FloatingPointError`" -#: c-api/exceptions.rst:923 +#: c-api/exceptions.rst:924 msgid ":exc:`FloatingPointError`" msgstr ":exc:`FloatingPointError`" -#: c-api/exceptions.rst:925 +#: c-api/exceptions.rst:926 msgid ":c:data:`PyExc_GeneratorExit`" msgstr ":c:data:`PyExc_GeneratorExit`" -#: c-api/exceptions.rst:925 +#: c-api/exceptions.rst:926 msgid ":exc:`GeneratorExit`" msgstr ":exc:`GeneratorExit`" -#: c-api/exceptions.rst:927 +#: c-api/exceptions.rst:928 msgid ":c:data:`PyExc_ImportError`" msgstr ":c:data:`PyExc_ImportError`" -#: c-api/exceptions.rst:927 +#: c-api/exceptions.rst:928 msgid ":exc:`ImportError`" msgstr ":exc:`ImportError`" -#: c-api/exceptions.rst:929 +#: c-api/exceptions.rst:930 msgid ":c:data:`PyExc_IndentationError`" msgstr ":c:data:`PyExc_IndentationError`" -#: c-api/exceptions.rst:929 +#: c-api/exceptions.rst:930 msgid ":exc:`IndentationError`" msgstr ":exc:`IndentationError`" -#: c-api/exceptions.rst:931 +#: c-api/exceptions.rst:932 msgid ":c:data:`PyExc_IndexError`" msgstr ":c:data:`PyExc_IndexError`" -#: c-api/exceptions.rst:931 +#: c-api/exceptions.rst:932 msgid ":exc:`IndexError`" msgstr ":exc:`IndexError`" -#: c-api/exceptions.rst:933 +#: c-api/exceptions.rst:934 msgid ":c:data:`PyExc_InterruptedError`" msgstr ":c:data:`PyExc_InterruptedError`" -#: c-api/exceptions.rst:933 +#: c-api/exceptions.rst:934 msgid ":exc:`InterruptedError`" msgstr ":exc:`InterruptedError`" -#: c-api/exceptions.rst:935 +#: c-api/exceptions.rst:936 msgid ":c:data:`PyExc_IsADirectoryError`" msgstr ":c:data:`PyExc_IsADirectoryError`" -#: c-api/exceptions.rst:935 +#: c-api/exceptions.rst:936 msgid ":exc:`IsADirectoryError`" msgstr ":exc:`IsADirectoryError`" -#: c-api/exceptions.rst:937 +#: c-api/exceptions.rst:938 msgid ":c:data:`PyExc_KeyError`" msgstr ":c:data:`PyExc_KeyError`" -#: c-api/exceptions.rst:937 +#: c-api/exceptions.rst:938 msgid ":exc:`KeyError`" msgstr ":exc:`KeyError`" -#: c-api/exceptions.rst:939 +#: c-api/exceptions.rst:940 msgid ":c:data:`PyExc_KeyboardInterrupt`" msgstr ":c:data:`PyExc_KeyboardInterrupt`" -#: c-api/exceptions.rst:939 +#: c-api/exceptions.rst:940 msgid ":exc:`KeyboardInterrupt`" msgstr ":exc:`KeyboardInterrupt`" -#: c-api/exceptions.rst:941 +#: c-api/exceptions.rst:942 msgid ":c:data:`PyExc_LookupError`" msgstr ":c:data:`PyExc_LookupError`" -#: c-api/exceptions.rst:941 +#: c-api/exceptions.rst:942 msgid ":exc:`LookupError`" msgstr ":exc:`LookupError`" -#: c-api/exceptions.rst:943 +#: c-api/exceptions.rst:944 msgid ":c:data:`PyExc_MemoryError`" msgstr ":c:data:`PyExc_MemoryError`" -#: c-api/exceptions.rst:943 +#: c-api/exceptions.rst:944 msgid ":exc:`MemoryError`" msgstr ":exc:`MemoryError`" -#: c-api/exceptions.rst:945 +#: c-api/exceptions.rst:946 #, fuzzy msgid ":c:data:`PyExc_ModuleNotFoundError`" msgstr ":c:data:`PyExc_ModuleNotFoundError`." -#: c-api/exceptions.rst:945 +#: c-api/exceptions.rst:946 msgid ":exc:`ModuleNotFoundError`" -msgstr "" +msgstr ":exc:`ModuleNotFoundError`" -#: c-api/exceptions.rst:947 +#: c-api/exceptions.rst:948 msgid ":c:data:`PyExc_NameError`" msgstr ":c:data:`PyExc_NameError`" -#: c-api/exceptions.rst:947 +#: c-api/exceptions.rst:948 msgid ":exc:`NameError`" msgstr ":exc:`NameError`" -#: c-api/exceptions.rst:949 +#: c-api/exceptions.rst:950 msgid ":c:data:`PyExc_NotADirectoryError`" msgstr ":c:data:`PyExc_NotADirectoryError`" -#: c-api/exceptions.rst:949 +#: c-api/exceptions.rst:950 msgid ":exc:`NotADirectoryError`" msgstr ":exc:`NotADirectoryError`" -#: c-api/exceptions.rst:951 +#: c-api/exceptions.rst:952 msgid ":c:data:`PyExc_NotImplementedError`" msgstr ":c:data:`PyExc_NotImplementedError`" -#: c-api/exceptions.rst:951 +#: c-api/exceptions.rst:952 msgid ":exc:`NotImplementedError`" msgstr ":exc:`NotImplementedError`" -#: c-api/exceptions.rst:953 +#: c-api/exceptions.rst:954 msgid ":c:data:`PyExc_OSError`" msgstr ":c:data:`PyExc_OSError`" -#: c-api/exceptions.rst:953 +#: c-api/exceptions.rst:954 msgid ":exc:`OSError`" msgstr ":exc:`OSError`" -#: c-api/exceptions.rst:955 +#: c-api/exceptions.rst:956 msgid ":c:data:`PyExc_OverflowError`" msgstr ":c:data:`PyExc_OverflowError`" -#: c-api/exceptions.rst:955 +#: c-api/exceptions.rst:956 msgid ":exc:`OverflowError`" msgstr ":exc:`OverflowError`" -#: c-api/exceptions.rst:957 +#: c-api/exceptions.rst:958 msgid ":c:data:`PyExc_PermissionError`" msgstr ":c:data:`PyExc_PermissionError`" -#: c-api/exceptions.rst:957 +#: c-api/exceptions.rst:958 msgid ":exc:`PermissionError`" msgstr ":exc:`PermissionError`" -#: c-api/exceptions.rst:959 +#: c-api/exceptions.rst:960 msgid ":c:data:`PyExc_ProcessLookupError`" msgstr ":c:data:`PyExc_ProcessLookupError`" -#: c-api/exceptions.rst:959 +#: c-api/exceptions.rst:960 msgid ":exc:`ProcessLookupError`" msgstr ":exc:`ProcessLookupError`" -#: c-api/exceptions.rst:961 +#: c-api/exceptions.rst:962 msgid ":c:data:`PyExc_RecursionError`" msgstr ":c:data:`PyExc_ReferenceError`" -#: c-api/exceptions.rst:961 +#: c-api/exceptions.rst:962 msgid ":exc:`RecursionError`" -msgstr "" +msgstr ":exc:`RecursionError`" -#: c-api/exceptions.rst:963 +#: c-api/exceptions.rst:964 msgid ":c:data:`PyExc_ReferenceError`" msgstr ":c:data:`PyExc_ReferenceError`" -#: c-api/exceptions.rst:963 +#: c-api/exceptions.rst:964 msgid ":exc:`ReferenceError`" msgstr ":exc:`ReferenceError`" -#: c-api/exceptions.rst:963 -msgid "\\(2)" -msgstr "\\(2)" - -#: c-api/exceptions.rst:965 +#: c-api/exceptions.rst:966 msgid ":c:data:`PyExc_RuntimeError`" msgstr ":c:data:`PyExc_RuntimeError`" -#: c-api/exceptions.rst:965 +#: c-api/exceptions.rst:966 msgid ":exc:`RuntimeError`" msgstr ":exc:`RuntimeError`" -#: c-api/exceptions.rst:967 +#: c-api/exceptions.rst:968 msgid ":c:data:`PyExc_StopAsyncIteration`" msgstr ":c:data:`PyExc_StopAsyncIteration`" -#: c-api/exceptions.rst:967 +#: c-api/exceptions.rst:968 msgid ":exc:`StopAsyncIteration`" msgstr ":exc:`StopAsyncIteration`" -#: c-api/exceptions.rst:969 +#: c-api/exceptions.rst:970 msgid ":c:data:`PyExc_StopIteration`" msgstr ":c:data:`PyExc_StopIteration`" -#: c-api/exceptions.rst:969 +#: c-api/exceptions.rst:970 msgid ":exc:`StopIteration`" msgstr ":exc:`StopIteration`" -#: c-api/exceptions.rst:971 +#: c-api/exceptions.rst:972 msgid ":c:data:`PyExc_SyntaxError`" msgstr ":c:data:`PyExc_SyntaxError`" -#: c-api/exceptions.rst:971 +#: c-api/exceptions.rst:972 msgid ":exc:`SyntaxError`" msgstr ":exc:`SyntaxError`" -#: c-api/exceptions.rst:973 +#: c-api/exceptions.rst:974 msgid ":c:data:`PyExc_SystemError`" msgstr ":c:data:`PyExc_SystemError`" -#: c-api/exceptions.rst:973 +#: c-api/exceptions.rst:974 msgid ":exc:`SystemError`" msgstr ":exc:`SystemError`" -#: c-api/exceptions.rst:975 +#: c-api/exceptions.rst:976 msgid ":c:data:`PyExc_SystemExit`" msgstr ":c:data:`PyExc_SystemExit`" -#: c-api/exceptions.rst:975 +#: c-api/exceptions.rst:976 msgid ":exc:`SystemExit`" msgstr ":exc:`SystemExit`" -#: c-api/exceptions.rst:977 +#: c-api/exceptions.rst:978 msgid ":c:data:`PyExc_TabError`" msgstr ":c:data:`PyExc_TabError`" -#: c-api/exceptions.rst:977 +#: c-api/exceptions.rst:978 msgid ":exc:`TabError`" msgstr ":exc:`TabError`" -#: c-api/exceptions.rst:979 +#: c-api/exceptions.rst:980 msgid ":c:data:`PyExc_TimeoutError`" msgstr ":c:data:`PyExc_ImportError`" -#: c-api/exceptions.rst:979 +#: c-api/exceptions.rst:980 msgid ":exc:`TimeoutError`" msgstr ":exc:`TimeoutError`" -#: c-api/exceptions.rst:981 +#: c-api/exceptions.rst:982 msgid ":c:data:`PyExc_TypeError`" msgstr ":c:data:`PyExc_TypeError`" -#: c-api/exceptions.rst:981 +#: c-api/exceptions.rst:982 msgid ":exc:`TypeError`" msgstr ":exc:`TypeError`" -#: c-api/exceptions.rst:983 +#: c-api/exceptions.rst:984 msgid ":c:data:`PyExc_UnboundLocalError`" msgstr ":c:data:`PyExc_UnboundLocalError`" -#: c-api/exceptions.rst:983 +#: c-api/exceptions.rst:984 msgid ":exc:`UnboundLocalError`" msgstr ":exc:`UnboundLocalError`" -#: c-api/exceptions.rst:985 +#: c-api/exceptions.rst:986 msgid ":c:data:`PyExc_UnicodeDecodeError`" msgstr ":c:data:`PyExc_UnicodeDecodeError`" -#: c-api/exceptions.rst:985 +#: c-api/exceptions.rst:986 msgid ":exc:`UnicodeDecodeError`" msgstr ":exc:`UnicodeDecodeError`" -#: c-api/exceptions.rst:987 +#: c-api/exceptions.rst:988 msgid ":c:data:`PyExc_UnicodeEncodeError`" msgstr ":c:data:`PyExc_UnicodeEncodeError`" -#: c-api/exceptions.rst:987 +#: c-api/exceptions.rst:988 msgid ":exc:`UnicodeEncodeError`" msgstr ":exc:`UnicodeEncodeError`" -#: c-api/exceptions.rst:989 +#: c-api/exceptions.rst:990 msgid ":c:data:`PyExc_UnicodeError`" msgstr ":c:data:`PyExc_UnicodeError`" -#: c-api/exceptions.rst:989 +#: c-api/exceptions.rst:990 msgid ":exc:`UnicodeError`" msgstr ":exc:`UnicodeError`" -#: c-api/exceptions.rst:991 +#: c-api/exceptions.rst:992 msgid ":c:data:`PyExc_UnicodeTranslateError`" msgstr ":c:data:`PyExc_UnicodeTranslateError`" -#: c-api/exceptions.rst:991 +#: c-api/exceptions.rst:992 msgid ":exc:`UnicodeTranslateError`" msgstr ":exc:`UnicodeTranslateError`" -#: c-api/exceptions.rst:993 +#: c-api/exceptions.rst:994 msgid ":c:data:`PyExc_ValueError`" msgstr ":c:data:`PyExc_ValueError`" -#: c-api/exceptions.rst:993 +#: c-api/exceptions.rst:994 msgid ":exc:`ValueError`" msgstr ":exc:`ValueError`" -#: c-api/exceptions.rst:995 +#: c-api/exceptions.rst:996 msgid ":c:data:`PyExc_ZeroDivisionError`" msgstr ":c:data:`PyExc_ZeroDivisionError`" -#: c-api/exceptions.rst:995 +#: c-api/exceptions.rst:996 msgid ":exc:`ZeroDivisionError`" msgstr ":exc:`ZeroDivisionError`" -#: c-api/exceptions.rst:998 +#: c-api/exceptions.rst:999 msgid "" ":c:data:`PyExc_BlockingIOError`, :c:data:`PyExc_BrokenPipeError`, :c:data:" "`PyExc_ChildProcessError`, :c:data:`PyExc_ConnectionError`, :c:data:" @@ -1339,156 +1335,169 @@ msgid "" "`PyExc_TimeoutError` were introduced following :pep:`3151`." msgstr "" -#: c-api/exceptions.rst:1008 +#: 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:1011 +#: c-api/exceptions.rst:1012 msgid ":c:data:`PyExc_ModuleNotFoundError`." msgstr ":c:data:`PyExc_ModuleNotFoundError`." -#: c-api/exceptions.rst:1014 +#: c-api/exceptions.rst:1015 msgid "These are compatibility aliases to :c:data:`PyExc_OSError`:" msgstr "" -#: c-api/exceptions.rst:1024 +#: c-api/exceptions.rst:1025 msgid ":c:data:`PyExc_EnvironmentError`" msgstr ":c:data:`PyExc_EnvironmentError`" -#: c-api/exceptions.rst:1026 +#: c-api/exceptions.rst:1027 msgid ":c:data:`PyExc_IOError`" msgstr ":c:data:`PyExc_IOError`" -#: c-api/exceptions.rst:1028 +#: c-api/exceptions.rst:1029 msgid ":c:data:`PyExc_WindowsError`" msgstr ":c:data:`PyExc_WindowsError`" -#: c-api/exceptions.rst:1028 -msgid "\\(3)" -msgstr "\\(3)" +#: c-api/exceptions.rst:1029 +msgid "[2]_" +msgstr "" -#: c-api/exceptions.rst:1031 +#: c-api/exceptions.rst:1032 msgid "These aliases used to be separate exception types." msgstr "" -#: c-api/exceptions.rst:1095 +#: c-api/exceptions.rst:1096 msgid "Notes:" msgstr "Notes :" -#: c-api/exceptions.rst:1037 +#: 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:1040 +#: 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:1046 +#: c-api/exceptions.rst:1047 msgid "Standard Warning Categories" msgstr "" -#: c-api/exceptions.rst:1048 +#: 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:type:`PyObject*`; they are all class objects. For completeness, " +"the type :c:expr:`PyObject*`; they are all class objects. For completeness, " "here are all the variables:" msgstr "" -#: c-api/exceptions.rst:1069 +#: c-api/exceptions.rst:1070 msgid ":c:data:`PyExc_Warning`" msgstr ":c:data:`PyExc_Warning`" -#: c-api/exceptions.rst:1069 +#: c-api/exceptions.rst:1070 msgid ":exc:`Warning`" msgstr ":exc:`Warning`" -#: c-api/exceptions.rst:1071 +#: 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:1071 +#: c-api/exceptions.rst:1072 msgid ":exc:`BytesWarning`" msgstr ":exc:`BytesWarning`" -#: c-api/exceptions.rst:1073 +#: c-api/exceptions.rst:1074 msgid ":c:data:`PyExc_DeprecationWarning`" msgstr ":c:data:`PyExc_DeprecationWarning`" -#: c-api/exceptions.rst:1073 +#: c-api/exceptions.rst:1074 msgid ":exc:`DeprecationWarning`" msgstr ":exc:`DeprecationWarning`" -#: c-api/exceptions.rst:1075 +#: c-api/exceptions.rst:1076 msgid ":c:data:`PyExc_FutureWarning`" msgstr ":c:data:`PyExc_FutureWarning`" -#: c-api/exceptions.rst:1075 +#: c-api/exceptions.rst:1076 msgid ":exc:`FutureWarning`" msgstr ":exc:`FutureWarning`" -#: c-api/exceptions.rst:1077 +#: c-api/exceptions.rst:1078 msgid ":c:data:`PyExc_ImportWarning`" msgstr ":c:data:`PyExc_ImportWarning`" -#: c-api/exceptions.rst:1077 +#: c-api/exceptions.rst:1078 msgid ":exc:`ImportWarning`" msgstr ":exc:`ImportWarning`" -#: c-api/exceptions.rst:1079 +#: c-api/exceptions.rst:1080 msgid ":c:data:`PyExc_PendingDeprecationWarning`" msgstr ":c:data:`PyExc_PendingDeprecationWarning`" -#: c-api/exceptions.rst:1079 +#: c-api/exceptions.rst:1080 msgid ":exc:`PendingDeprecationWarning`" msgstr ":exc:`PendingDeprecationWarning`" -#: c-api/exceptions.rst:1081 +#: c-api/exceptions.rst:1082 msgid ":c:data:`PyExc_ResourceWarning`" msgstr ":c:data:`PyExc_ResourceWarning`" -#: c-api/exceptions.rst:1081 +#: c-api/exceptions.rst:1082 msgid ":exc:`ResourceWarning`" msgstr ":exc:`ResourceWarning`" -#: c-api/exceptions.rst:1083 +#: c-api/exceptions.rst:1084 msgid ":c:data:`PyExc_RuntimeWarning`" msgstr ":c:data:`PyExc_RuntimeWarning`" -#: c-api/exceptions.rst:1083 +#: c-api/exceptions.rst:1084 msgid ":exc:`RuntimeWarning`" msgstr ":exc:`RuntimeWarning`" -#: c-api/exceptions.rst:1085 +#: c-api/exceptions.rst:1086 msgid ":c:data:`PyExc_SyntaxWarning`" msgstr ":c:data:`PyExc_SyntaxWarning`" -#: c-api/exceptions.rst:1085 +#: c-api/exceptions.rst:1086 msgid ":exc:`SyntaxWarning`" msgstr ":exc:`SyntaxWarning`" -#: c-api/exceptions.rst:1087 +#: c-api/exceptions.rst:1088 msgid ":c:data:`PyExc_UnicodeWarning`" msgstr ":c:data:`PyExc_UnicodeWarning`" -#: c-api/exceptions.rst:1087 +#: c-api/exceptions.rst:1088 msgid ":exc:`UnicodeWarning`" msgstr ":exc:`UnicodeWarning`" -#: c-api/exceptions.rst:1089 +#: c-api/exceptions.rst:1090 msgid ":c:data:`PyExc_UserWarning`" msgstr ":c:data:`PyExc_UserWarning`" -#: c-api/exceptions.rst:1089 +#: c-api/exceptions.rst:1090 msgid ":exc:`UserWarning`" msgstr ":exc:`UserWarning`" -#: c-api/exceptions.rst:1092 +#: c-api/exceptions.rst:1093 msgid ":c:data:`PyExc_ResourceWarning`." msgstr ":c:data:`PyExc_ResourceWarning`." -#: c-api/exceptions.rst:1098 +#: 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 index 37f2ce1a5a..d33211c76f 100644 --- a/c-api/file.po +++ b/c-api/file.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-03-19 16:59+0100\n" +"POT-Creation-Date: 2022-10-18 15:46+0200\n" "PO-Revision-Date: 2021-12-11 12:00+0100\n" "Last-Translator: \n" "Language-Team: FRENCH \n" @@ -23,7 +23,7 @@ msgstr "Objets fichiers" #, 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:type:`FILE*`) support " +"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 " @@ -76,8 +76,9 @@ 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:type:`int`. If the " +"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 " @@ -120,7 +121,7 @@ msgstr "" #: c-api/file.rst:68 msgid "" -"The handler is a function of type :c:type:`PyObject *(\\*)(PyObject *path, " +"The handler is a function of type :c:expr:`PyObject *(\\*)(PyObject *path, " "void *userData)`, where *path* is guaranteed to be :c:type:`PyUnicodeObject`." msgstr "" diff --git a/c-api/float.po b/c-api/float.po index 7f8321515e..cd18ca540b 100644 --- a/c-api/float.po +++ b/c-api/float.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-01-27 19:26+0100\n" +"POT-Creation-Date: 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" @@ -72,7 +72,7 @@ msgstr "" #: c-api/float.rst:47 #, fuzzy msgid "" -"Return a C :c:type:`double` representation of the contents of *pyfloat*. If " +"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__`. " @@ -91,8 +91,9 @@ msgid "Use :meth:`__index__` if available." msgstr "" #: c-api/float.rst:60 +#, fuzzy msgid "" -"Return a C :c:type:`double` representation of the contents of *pyfloat*, but " +"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:" @@ -109,16 +110,18 @@ msgstr "" "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:type:" +"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:type:`double`." +"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." diff --git a/c-api/function.po b/c-api/function.po index aaff98580f..2dedf0c20b 100644 --- a/c-api/function.po +++ b/c-api/function.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-09-23 16:16+0200\n" +"POT-Creation-Date: 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" @@ -20,11 +20,11 @@ msgstr "Objets fonctions" #: c-api/function.rst:10 msgid "There are a few functions specific to Python functions." -msgstr "" +msgstr "Certaines fonctions sont spécifiques aux fonctions Python." #: c-api/function.rst:15 msgid "The C structure used for functions." -msgstr "" +msgstr "La structure C utilisée pour les fonctions." #: c-api/function.rst:22 msgid "" @@ -32,6 +32,8 @@ msgid "" "function type. It is exposed to Python programmers as ``types." "FunctionType``." msgstr "" +"C'est une instance de :c:type:`PyTypeObject` et représente le type fonction " +"en Python. Il est exposé aux développeurs comme ``types.FunctionType``." #: c-api/function.rst:28 msgid "" @@ -39,6 +41,9 @@ msgid "" "`PyFunction_Type`). The parameter must not be ``NULL``. This function " "always succeeds." msgstr "" +"Renvoie vrai si *o* est un objet de type fonction (a comme type :c:data:" +"`PyFunction_Type`). Le paramètre ne doit pas être ``NULL``. Cette fonction " +"réussit toujours." #: c-api/function.rst:34 msgid "" @@ -46,6 +51,8 @@ msgid "" "*globals* must be a dictionary with the global variables accessible to the " "function." msgstr "" +"Renvoie une nouvelle fonction associée avec l'objet *code*. *globals* doit " +"être un dictionnaire avec les variables globales accessibles à la fonction." #: c-api/function.rst:37 msgid "" @@ -65,60 +72,77 @@ msgstr "" #: c-api/function.rst:54 msgid "Return the code object associated with the function object *op*." -msgstr "" +msgstr "Renvoie l'objet code associé avec l'objet de la fonction *op*." #: c-api/function.rst:59 msgid "Return the globals dictionary associated with the function object *op*." msgstr "" +"Renvoie le dictionnaire global associé avec l'objet de la fonction *op*." #: c-api/function.rst:64 msgid "" "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 "" +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 index 16110f9095..6935f39282 100644 --- a/c-api/gcsupport.po +++ b/c-api/gcsupport.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-04 18:14+0100\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" @@ -21,11 +21,11 @@ msgstr "" #: c-api/gcsupport.rst:8 msgid "" "Python's support for detecting and collecting garbage which involves " -"circular references requires support from object types which are \"containers" -"\" for other objects which may also be containers. Types which do not store " -"references to other objects, or which only store references to atomic types " -"(such as numbers or strings), do not need to provide any explicit support " -"for garbage collection." +"circular references requires support from object types which are " +"\"containers\" for other objects which may also be containers. Types which " +"do not store references to other objects, or which only store references to " +"atomic types (such as numbers or strings), do not need to provide any " +"explicit support for garbage collection." msgstr "" #: c-api/gcsupport.rst:15 diff --git a/c-api/import.po b/c-api/import.po index c3945cabcd..4303354d0e 100644 --- a/c-api/import.po +++ b/c-api/import.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-09-23 16:16+0200\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" @@ -271,8 +271,9 @@ msgid "" msgstr "" #: c-api/import.rst:264 +#, fuzzy msgid "" -"This pointer is initialized to point to an array of :c:type:`struct _frozen` " +"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 " diff --git a/c-api/init.po b/c-api/init.po index d2233e7b89..a79574f2df 100644 --- a/c-api/init.po +++ b/c-api/init.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-09-23 16:16+0200\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" @@ -542,7 +542,7 @@ 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:type:" +"Use :c:func:`Py_DecodeLocale` to decode a bytes string to get a :c:expr:" "`wchar_*` string." msgstr "" @@ -571,10 +571,10 @@ msgid "" "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 ``--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." +"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 @@ -684,10 +684,10 @@ msgstr "" #: c-api/init.rst:531 msgid "" "The first word (up to the first space character) is the current Python " -"version; the first three characters are the major and minor version " -"separated by a period. The returned string points into static storage; the " -"caller should not modify its value. The value is available to Python code " -"as :data:`sys.version`." +"version; the first characters are the major and minor version separated by a " +"period. The returned string points into static storage; the caller should " +"not modify its value. The value is available to Python code as :data:`sys." +"version`." msgstr "" #: c-api/init.rst:541 @@ -930,11 +930,11 @@ msgstr "" #: c-api/init.rst:803 msgid "" -"Note that the :c:func:`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 :c:func:" -"`PyGILState_\\*` API is unsupported." +"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 @@ -1010,7 +1010,7 @@ 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:type:`PyInterpreterState *`), which " +"public data member is :attr:`interp` (:c:expr:`PyInterpreterState *`), which " "points to this thread's interpreter state." msgstr "" @@ -1380,7 +1380,7 @@ msgstr "" #: c-api/init.rst:1223 msgid "" -"The type of the *id* parameter changed from :c:type:`long` to :c:type:" +"The type of the *id* parameter changed from :c:expr:`long` to :c:expr:" "`unsigned long`." msgstr "" @@ -1574,10 +1574,10 @@ msgstr "" #: c-api/init.rst:1411 msgid "" -"Also note that combining this functionality with :c:func:`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-" +"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 " @@ -1701,7 +1701,7 @@ msgstr "" #: c-api/init.rst:1507 msgid ":const:`PyTrace_CALL`" -msgstr "" +msgstr ":const:`PyTrace_CALL`" #: c-api/init.rst:1512 c-api/init.rst:1523 msgid "Always :c:data:`Py_None`." @@ -1709,7 +1709,7 @@ msgstr "" #: c-api/init.rst:1509 msgid ":const:`PyTrace_EXCEPTION`" -msgstr "" +msgstr ":const:`PyTrace_EXCEPTION`" #: c-api/init.rst:1509 msgid "Exception information as returned by :func:`sys.exc_info`." @@ -1717,11 +1717,11 @@ msgstr "" #: c-api/init.rst:1512 msgid ":const:`PyTrace_LINE`" -msgstr "" +msgstr ":const:`PyTrace_LINE`" #: c-api/init.rst:1514 msgid ":const:`PyTrace_RETURN`" -msgstr "" +msgstr ":const:`PyTrace_RETURN`" #: c-api/init.rst:1514 msgid "" @@ -1730,7 +1730,7 @@ msgstr "" #: c-api/init.rst:1517 msgid ":const:`PyTrace_C_CALL`" -msgstr "" +msgstr ":const:`PyTrace_C_CALL`" #: c-api/init.rst:1519 c-api/init.rst:1521 msgid "Function object being called." @@ -1738,15 +1738,15 @@ msgstr "" #: c-api/init.rst:1519 msgid ":const:`PyTrace_C_EXCEPTION`" -msgstr "" +msgstr ":const:`PyTrace_C_EXCEPTION`" #: c-api/init.rst:1521 msgid ":const:`PyTrace_C_RETURN`" -msgstr "" +msgstr ":const:`PyTrace_C_RETURN`" #: c-api/init.rst:1523 msgid ":const:`PyTrace_OPCODE`" -msgstr "" +msgstr ":const:`PyTrace_OPCODE`" #: c-api/init.rst:1528 msgid "" @@ -1881,7 +1881,7 @@ msgid "" "(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:type:`void*` value per " +"use a thread key and functions to associate a :c:expr:`void*` value per " "thread." msgstr "" @@ -1900,8 +1900,8 @@ msgstr "" #: c-api/init.rst:1669 msgid "" "None of these API functions handle memory management on behalf of the :c:" -"type:`void*` values. You need to allocate and deallocate them yourself. If " -"the :c:type:`void*` values happen to be :c:type:`PyObject*`, these functions " +"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 "" @@ -1913,7 +1913,7 @@ msgstr "" 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:type:`int` to represent thread keys." +"instead of :c:expr:`int` to represent thread keys." msgstr "" #: c-api/init.rst:1685 @@ -1961,12 +1961,12 @@ msgstr "" 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`." +"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`." +"A freed key becomes a dangling pointer. You should reset the key to `NULL`." msgstr "" #: c-api/init.rst:1733 @@ -2007,14 +2007,14 @@ msgstr "" #: c-api/init.rst:1767 msgid "" -"Return a zero value to indicate successfully associating a :c:type:`void*` " +"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:type:`void*` value." +"mapping of the key to a :c:expr:`void*` value." msgstr "" #: c-api/init.rst:1774 msgid "" -"Return the :c:type:`void*` value associated with a TSS key in the current " +"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 "" diff --git a/c-api/init_config.po b/c-api/init_config.po index 4438ae7ba8..5bbbfd3b49 100644 --- a/c-api/init_config.po +++ b/c-api/init_config.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-21 15:04+0200\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" @@ -33,7 +33,7 @@ msgstr "" msgid "" "The :ref:`Python Configuration ` can be used to build a " "customized Python which behaves as the regular Python. For example, " -"environments variables and command line arguments are used to configure " +"environment variables and command line arguments are used to configure " "Python." msgstr "" @@ -41,8 +41,8 @@ msgstr "" msgid "" "The :ref:`Isolated Configuration ` can be used to embed " "Python into an application. It isolates Python from the system. For example, " -"environments variables are ignored, the LC_CTYPE locale is left unchanged " -"and no signal handler is registered." +"environment variables are ignored, the LC_CTYPE locale is left unchanged and " +"no signal handler is registered." msgstr "" #: c-api/init_config.rst:27 @@ -61,9 +61,8 @@ msgid ":pep:`587` \"Python Initialization Configuration\"." msgstr "" #: c-api/init_config.rst:37 -#, fuzzy msgid "Example" -msgstr "Exemple ::" +msgstr "Exemple" #: c-api/init_config.rst:39 msgid "Example of customized Python always running in isolated mode::" @@ -290,7 +289,7 @@ msgid "Default: ``PYMEM_ALLOCATOR_NOT_SET``." msgstr "" #: c-api/init_config.rst:257 -msgid "Set the LC_CTYPE locale to the user preferred locale?" +msgid "Set the LC_CTYPE locale to the user preferred locale." msgstr "" #: c-api/init_config.rst:259 @@ -330,7 +329,7 @@ msgid "" "member:`PyConfig.dev_mode`." msgstr "" -#: c-api/init_config.rst:633 c-api/init_config.rst:1094 +#: c-api/init_config.rst:633 c-api/init_config.rst:1093 msgid "Default: ``-1`` in Python mode, ``0`` in isolated mode." msgstr "" @@ -338,7 +337,7 @@ msgstr "" msgid "Isolated mode: see :c:member:`PyConfig.isolated`." msgstr "" -#: c-api/init_config.rst:798 +#: c-api/init_config.rst:797 msgid "Default: ``0`` in Python mode, ``1`` in isolated mode." msgstr "" @@ -364,16 +363,16 @@ msgid "" "variable value." msgstr "" -#: c-api/init_config.rst:811 +#: 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:770 c-api/init_config.rst:814 -#: c-api/init_config.rst:881 c-api/init_config.rst:990 -#: c-api/init_config.rst:1058 c-api/init_config.rst:1129 +#: 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 "" @@ -391,7 +390,7 @@ msgid "" "use_environment`." msgstr "" -#: c-api/init_config.rst:1103 +#: c-api/init_config.rst:1102 msgid "Default: ``1`` in Python config and ``0`` in isolated config." msgstr "" @@ -461,7 +460,7 @@ msgid "" "`~PyPreConfig.parse_argv` of *preconfig* is non-zero." msgstr "" -#: c-api/init_config.rst:1191 +#: 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`." @@ -569,7 +568,7 @@ msgstr "" msgid "Fields which are already initialized are left unchanged." msgstr "" -#: c-api/init_config.rst:910 +#: 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 " @@ -646,9 +645,9 @@ msgid "" msgstr "" #: c-api/init_config.rst:541 c-api/init_config.rst:561 -#: c-api/init_config.rst:662 c-api/init_config.rst:851 -#: c-api/init_config.rst:967 c-api/init_config.rst:998 -#: c-api/init_config.rst:1018 +#: 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 "" @@ -661,7 +660,7 @@ msgid ":data:`sys.base_exec_prefix`." msgstr "" #: c-api/init_config.rst:555 c-api/init_config.rst:655 -#: c-api/init_config.rst:868 c-api/init_config.rst:951 +#: c-api/init_config.rst:867 c-api/init_config.rst:950 msgid "Part of the :ref:`Python Path Configuration ` output." msgstr "" @@ -697,7 +696,7 @@ msgstr "" msgid "stdin is always opened in buffered mode." msgstr "" -#: c-api/init_config.rst:1046 c-api/init_config.rst:1161 +#: c-api/init_config.rst:1045 c-api/init_config.rst:1160 msgid "Default: ``1``." msgstr "" @@ -784,7 +783,7 @@ msgid "If non-zero, enable the :ref:`Python Development Mode `." msgstr "" #: c-api/init_config.rst:637 -msgid "Dump Python refererences?" +msgid "Dump Python references?" msgstr "" #: c-api/init_config.rst:639 @@ -855,235 +854,235 @@ msgstr "" #: c-api/init_config.rst:691 msgid "" "``\"ascii\"`` if Python detects that ``nl_langinfo(CODESET)`` announces the " -"ASCII encoding (or Roman8 encoding on HP-UX), whereas the ``mbstowcs()`` " -"function decodes from a different encoding (usually Latin1)." +"ASCII encoding, whereas the ``mbstowcs()`` function decodes from a different " +"encoding (usually Latin1)." msgstr "" -#: c-api/init_config.rst:695 +#: c-api/init_config.rst:694 msgid "``\"utf-8\"`` if ``nl_langinfo(CODESET)`` returns an empty string." msgstr "" -#: c-api/init_config.rst:696 +#: c-api/init_config.rst:695 msgid "" "Otherwise, use the :term:`locale encoding`: ``nl_langinfo(CODESET)`` result." msgstr "" -#: c-api/init_config.rst:699 +#: 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:702 +#: c-api/init_config.rst:701 msgid "See also the :c:member:`~PyConfig.filesystem_errors` member." msgstr "" -#: c-api/init_config.rst:706 +#: c-api/init_config.rst:705 msgid "" ":term:`Filesystem error handler `: :" "func:`sys.getfilesystemencodeerrors`." msgstr "" -#: c-api/init_config.rst:709 +#: 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:713 +#: c-api/init_config.rst:712 msgid "On other platforms: use ``\"surrogateescape\"`` by default." msgstr "" -#: c-api/init_config.rst:715 +#: c-api/init_config.rst:714 msgid "Supported error handlers:" msgstr "" -#: c-api/init_config.rst:717 +#: c-api/init_config.rst:716 msgid "``\"strict\"``" msgstr "" -#: c-api/init_config.rst:718 +#: c-api/init_config.rst:717 msgid "``\"surrogateescape\"``" msgstr "" -#: c-api/init_config.rst:719 +#: c-api/init_config.rst:718 msgid "``\"surrogatepass\"`` (only supported with the UTF-8 encoding)" msgstr "" -#: c-api/init_config.rst:721 +#: c-api/init_config.rst:720 msgid "See also the :c:member:`~PyConfig.filesystem_encoding` member." msgstr "" -#: c-api/init_config.rst:726 +#: c-api/init_config.rst:725 msgid "Randomized hash function seed." msgstr "" -#: c-api/init_config.rst:728 +#: 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:731 +#: c-api/init_config.rst:730 msgid "Set by the :envvar:`PYTHONHASHSEED` environment variable." msgstr "" -#: c-api/init_config.rst:733 +#: 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:738 +#: c-api/init_config.rst:737 msgid "Python home directory." msgstr "" -#: c-api/init_config.rst:740 +#: 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:743 +#: c-api/init_config.rst:742 msgid "Set by the :envvar:`PYTHONHOME` environment variable." msgstr "" -#: c-api/init_config.rst:840 c-api/init_config.rst:942 -#: c-api/init_config.rst:969 +#: 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:751 +#: c-api/init_config.rst:750 msgid "If non-zero, profile import time." msgstr "" -#: c-api/init_config.rst:753 +#: 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:760 +#: c-api/init_config.rst:759 msgid "Enter interactive mode after executing a script or a command." msgstr "" -#: c-api/init_config.rst:762 +#: 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:767 +#: 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:774 +#: c-api/init_config.rst:773 msgid "Install Python signal handlers?" msgstr "" -#: c-api/init_config.rst:916 c-api/init_config.rst:1113 +#: 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:780 +#: c-api/init_config.rst:779 msgid "If greater than 0, enable the interactive mode (REPL)." msgstr "" -#: c-api/init_config.rst:782 +#: c-api/init_config.rst:781 msgid "Incremented by the :option:`-i` command line option." msgstr "" -#: c-api/init_config.rst:788 +#: c-api/init_config.rst:787 msgid "If greater than 0, enable isolated mode:" msgstr "" -#: c-api/init_config.rst:790 +#: 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:793 +#: 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:795 +#: 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:800 +#: c-api/init_config.rst:799 msgid "See also :c:member:`PyPreConfig.isolated`." msgstr "" -#: c-api/init_config.rst:804 +#: 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:808 +#: 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:816 +#: 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:820 +#: 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:823 +#: c-api/init_config.rst:822 msgid "Set to ``1`` by the :envvar:`PYTHONMALLOCSTATS` environment variable." msgstr "" -#: c-api/init_config.rst:825 +#: 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:832 +#: c-api/init_config.rst:831 msgid "Platform library directory name: :data:`sys.platlibdir`." msgstr "" -#: c-api/init_config.rst:834 +#: c-api/init_config.rst:833 msgid "Set by the :envvar:`PYTHONPLATLIBDIR` environment variable." msgstr "" -#: c-api/init_config.rst:836 +#: 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" -"\"``)." +"`configure --with-platlibdir option <--with-platlibdir>` (default: " +"``\"lib\"``)." msgstr "" -#: c-api/init_config.rst:846 +#: 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:849 +#: c-api/init_config.rst:848 msgid "Set by the :envvar:`PYTHONPATH` environment variable." msgstr "" -#: c-api/init_config.rst:858 +#: c-api/init_config.rst:857 msgid "Module search paths: :data:`sys.path`." msgstr "" -#: c-api/init_config.rst:860 +#: 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 ` " @@ -1091,41 +1090,41 @@ msgid "" "`~PyConfig.module_search_paths_set` to ``1``." msgstr "" -#: c-api/init_config.rst:865 +#: 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:872 +#: c-api/init_config.rst:871 msgid "Compilation optimization level:" msgstr "" -#: c-api/init_config.rst:874 +#: c-api/init_config.rst:873 msgid "``0``: Peephole optimizer, set ``__debug__`` to ``True``." msgstr "" -#: c-api/init_config.rst:875 +#: c-api/init_config.rst:874 msgid "``1``: Level 0, remove assertions, set ``__debug__`` to ``False``." msgstr "" -#: c-api/init_config.rst:876 +#: c-api/init_config.rst:875 msgid "``2``: Level 1, strip docstrings." msgstr "" -#: c-api/init_config.rst:878 +#: 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:885 +#: 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:888 +#: 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` " @@ -1134,354 +1133,354 @@ msgid "" "parse_argv` is non-zero)." msgstr "" -#: c-api/init_config.rst:895 +#: 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:1148 c-api/init_config.rst:1167 +#: c-api/init_config.rst:1147 c-api/init_config.rst:1166 msgid "Default: empty list." msgstr "" -#: c-api/init_config.rst:904 +#: c-api/init_config.rst:903 msgid "Parse command line arguments?" msgstr "" -#: c-api/init_config.rst:906 +#: 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:918 +#: 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:924 +#: 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:927 +#: 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:934 +#: 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:938 +#: c-api/init_config.rst:937 msgid "It has no effect on Windows." msgstr "" -#: c-api/init_config.rst:946 +#: 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:955 +#: 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:958 +#: c-api/init_config.rst:957 msgid "If :func:`Py_SetProgramName` has been called, use its argument." msgstr "" -#: c-api/init_config.rst:959 +#: c-api/init_config.rst:958 msgid "On macOS, use :envvar:`PYTHONEXECUTABLE` environment variable if set." msgstr "" -#: c-api/init_config.rst:960 +#: 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:962 +#: 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:964 +#: 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:973 +#: c-api/init_config.rst:972 msgid "" "Directory where cached ``.pyc`` files are written: :data:`sys." "pycache_prefix`." msgstr "" -#: c-api/init_config.rst:976 +#: 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:979 +#: c-api/init_config.rst:978 msgid "If ``NULL``, :data:`sys.pycache_prefix` is set to ``None``." msgstr "" -#: c-api/init_config.rst:985 +#: 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:988 +#: c-api/init_config.rst:987 msgid "Incremented by the :option:`-q` command line option." msgstr "" -#: c-api/init_config.rst:994 +#: c-api/init_config.rst:993 msgid "Value of the :option:`-c` command line option." msgstr "" -#: c-api/init_config.rst:1008 c-api/init_config.rst:1016 +#: 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:1002 +#: 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:1005 +#: 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:1014 +#: c-api/init_config.rst:1013 msgid "Value of the :option:`-m` command line option." msgstr "" -#: c-api/init_config.rst:1022 +#: c-api/init_config.rst:1021 msgid "Show total reference count at exit?" msgstr "" -#: c-api/init_config.rst:1024 +#: c-api/init_config.rst:1023 msgid "Set to 1 by :option:`-X showrefcount <-X>` command line option." msgstr "" -#: c-api/init_config.rst:1026 +#: 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:1033 +#: c-api/init_config.rst:1032 msgid "Import the :mod:`site` module at startup?" msgstr "" -#: c-api/init_config.rst:1035 +#: 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:1038 +#: 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:1041 +#: c-api/init_config.rst:1040 msgid "Set to ``0`` by the :option:`-S` command line option." msgstr "" -#: c-api/init_config.rst:1043 +#: 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:1050 +#: 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:1053 +#: 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:1056 +#: c-api/init_config.rst:1055 msgid "Set to ``1`` by the :option:`-x` command line option." msgstr "" -#: c-api/init_config.rst:1063 +#: 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)." +"data:`sys.stderr` (but :data:`sys.stderr` always uses " +"``\"backslashreplace\"`` error handler)." msgstr "" -#: c-api/init_config.rst:1067 +#: 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:1070 +#: c-api/init_config.rst:1069 msgid "" "Use the :envvar:`PYTHONIOENCODING` environment variable if it is non-empty." msgstr "" -#: c-api/init_config.rst:1073 +#: c-api/init_config.rst:1072 msgid "Default encoding:" msgstr "" -#: c-api/init_config.rst:1075 +#: c-api/init_config.rst:1074 msgid "``\"UTF-8\"`` if :c:member:`PyPreConfig.utf8_mode` is non-zero." msgstr "" -#: c-api/init_config.rst:1076 +#: c-api/init_config.rst:1075 msgid "Otherwise, use the :term:`locale encoding`." msgstr "" -#: c-api/init_config.rst:1078 +#: c-api/init_config.rst:1077 msgid "Default error handler:" msgstr "" -#: c-api/init_config.rst:1080 +#: c-api/init_config.rst:1079 msgid "On Windows: use ``\"surrogateescape\"``." msgstr "" -#: c-api/init_config.rst:1081 +#: 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:1083 +#: c-api/init_config.rst:1082 msgid "``\"strict\"`` otherwise." msgstr "" -#: c-api/init_config.rst:1087 +#: c-api/init_config.rst:1086 msgid "Enable tracemalloc?" msgstr "" -#: c-api/init_config.rst:1089 +#: c-api/init_config.rst:1088 msgid "If non-zero, call :func:`tracemalloc.start` at startup." msgstr "" -#: c-api/init_config.rst:1091 +#: 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:1098 +#: c-api/init_config.rst:1097 msgid "Use :ref:`environment variables `?" msgstr "" -#: c-api/init_config.rst:1100 +#: c-api/init_config.rst:1099 msgid "" "If equals to zero, ignore the :ref:`environment variables `." msgstr "" -#: c-api/init_config.rst:1107 +#: 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:1109 +#: 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:1111 +#: c-api/init_config.rst:1110 msgid "Set to ``0`` by the :envvar:`PYTHONNOUSERSITE` environment variable." msgstr "" -#: c-api/init_config.rst:1117 +#: 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:1121 +#: 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:1125 +#: c-api/init_config.rst:1124 msgid "Incremented by the :option:`-v` command line option." msgstr "" -#: c-api/init_config.rst:1127 +#: c-api/init_config.rst:1126 msgid "Set to the :envvar:`PYTHONVERBOSE` environment variable value." msgstr "" -#: c-api/init_config.rst:1133 +#: 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:1136 +#: 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:1141 +#: 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:1144 +#: 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:1152 +#: 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:1155 +#: 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:1158 +#: 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:1165 +#: c-api/init_config.rst:1164 msgid "Values of the :option:`-X` command line options: :data:`sys._xoptions`." msgstr "" -#: c-api/init_config.rst:1169 +#: 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 " @@ -1489,29 +1488,29 @@ msgid "" "c:member:`~PyConfig.argv`." msgstr "" -#: c-api/init_config.rst:1174 +#: 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:1179 +#: c-api/init_config.rst:1178 msgid "The ``show_alloc_count`` field has been removed." msgstr "" -#: c-api/init_config.rst:1183 +#: c-api/init_config.rst:1182 msgid "Initialization with PyConfig" msgstr "" -#: c-api/init_config.rst:1185 +#: c-api/init_config.rst:1184 msgid "Function to initialize Python:" msgstr "" -#: c-api/init_config.rst:1189 +#: c-api/init_config.rst:1188 msgid "Initialize Python from *config* configuration." msgstr "" -#: c-api/init_config.rst:1194 +#: 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 " @@ -1520,42 +1519,42 @@ msgid "" "`PyImport_ExtendInittab` must be called before each Python initialization." msgstr "" -#: c-api/init_config.rst:1201 +#: c-api/init_config.rst:1200 msgid "" "The current configuration (``PyConfig`` type) is stored in " "``PyInterpreterState.config``." msgstr "" -#: c-api/init_config.rst:1204 +#: c-api/init_config.rst:1203 msgid "Example setting the program name::" msgstr "" -#: c-api/init_config.rst:1232 +#: 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:1283 +#: c-api/init_config.rst:1282 msgid "Isolated Configuration" msgstr "" -#: c-api/init_config.rst:1285 +#: 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:1290 +#: c-api/init_config.rst:1289 msgid "" -"This configuration ignores global configuration variables, environments " +"This configuration ignores global configuration variables, environment " "variables, command line arguments (:c:member:`PyConfig.argv` is not parsed) " "and user site directory. The C standard streams (ex: ``stdout``) and the " "LC_CTYPE locale are left unchanged. Signal handlers are not installed." msgstr "" -#: c-api/init_config.rst:1295 +#: 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 " @@ -1563,118 +1562,118 @@ msgid "" "configuration." msgstr "" -#: c-api/init_config.rst:1304 +#: c-api/init_config.rst:1303 msgid "Python Configuration" msgstr "" -#: c-api/init_config.rst:1306 +#: 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:1310 +#: 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:1313 +#: 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:1322 +#: c-api/init_config.rst:1321 msgid "Python Path Configuration" msgstr "" -#: c-api/init_config.rst:1324 +#: c-api/init_config.rst:1323 msgid ":c:type:`PyConfig` contains multiple fields for the path configuration:" msgstr "" -#: c-api/init_config.rst:1326 +#: c-api/init_config.rst:1325 msgid "Path configuration inputs:" msgstr "" -#: c-api/init_config.rst:1328 +#: c-api/init_config.rst:1327 msgid ":c:member:`PyConfig.home`" msgstr "" -#: c-api/init_config.rst:1329 +#: c-api/init_config.rst:1328 msgid ":c:member:`PyConfig.platlibdir`" msgstr "" -#: c-api/init_config.rst:1330 +#: c-api/init_config.rst:1329 msgid ":c:member:`PyConfig.pathconfig_warnings`" msgstr "" -#: c-api/init_config.rst:1331 +#: c-api/init_config.rst:1330 msgid ":c:member:`PyConfig.program_name`" msgstr "" -#: c-api/init_config.rst:1332 +#: c-api/init_config.rst:1331 msgid ":c:member:`PyConfig.pythonpath_env`" msgstr "" -#: c-api/init_config.rst:1333 +#: c-api/init_config.rst:1332 msgid "current working directory: to get absolute paths" msgstr "" -#: c-api/init_config.rst:1334 +#: 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:1336 +#: c-api/init_config.rst:1335 msgid "``__PYVENV_LAUNCHER__`` environment variable" msgstr "" -#: c-api/init_config.rst:1337 +#: 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)." +"(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:1341 +#: c-api/init_config.rst:1340 msgid "Path configuration output fields:" msgstr "" -#: c-api/init_config.rst:1343 +#: c-api/init_config.rst:1342 msgid ":c:member:`PyConfig.base_exec_prefix`" msgstr "" -#: c-api/init_config.rst:1344 +#: c-api/init_config.rst:1343 msgid ":c:member:`PyConfig.base_executable`" msgstr "" -#: c-api/init_config.rst:1345 +#: c-api/init_config.rst:1344 msgid ":c:member:`PyConfig.base_prefix`" msgstr "" -#: c-api/init_config.rst:1346 +#: c-api/init_config.rst:1345 msgid ":c:member:`PyConfig.exec_prefix`" msgstr "" -#: c-api/init_config.rst:1347 +#: c-api/init_config.rst:1346 msgid ":c:member:`PyConfig.executable`" msgstr "" -#: c-api/init_config.rst:1348 +#: 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:1350 +#: c-api/init_config.rst:1349 msgid ":c:member:`PyConfig.prefix`" msgstr "" -#: c-api/init_config.rst:1352 +#: 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." @@ -1683,7 +1682,7 @@ msgid "" "module_search_paths_set` is set to 1." msgstr "" -#: c-api/init_config.rst:1358 +#: 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 " @@ -1693,52 +1692,52 @@ msgid "" "well." msgstr "" -#: c-api/init_config.rst:1365 +#: 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:1368 +#: 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:1372 +#: 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:1374 +#: 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:1377 +#: c-api/init_config.rst:1376 msgid "If :c:member:`~PyConfig.isolated` is zero:" msgstr "" -#: c-api/init_config.rst:1379 +#: 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:1381 +#: 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:1383 +#: c-api/init_config.rst:1382 msgid "Otherwise, prepend an empty string to :data:`sys.path`." msgstr "" -#: c-api/init_config.rst:1385 +#: 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." @@ -1747,156 +1746,156 @@ msgid "" "data:`sys.path`." msgstr "" -#: c-api/init_config.rst:1391 +#: c-api/init_config.rst:1390 msgid "The following configuration files are used by the path configuration:" msgstr "" -#: c-api/init_config.rst:1393 +#: c-api/init_config.rst:1392 msgid "``pyvenv.cfg``" msgstr "" -#: c-api/init_config.rst:1394 +#: c-api/init_config.rst:1393 msgid "``python._pth`` (Windows only)" msgstr "" -#: c-api/init_config.rst:1395 +#: c-api/init_config.rst:1394 msgid "``pybuilddir.txt`` (Unix only)" msgstr "" -#: c-api/init_config.rst:1397 +#: 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:1402 +#: c-api/init_config.rst:1401 msgid "Py_RunMain()" msgstr "" -#: c-api/init_config.rst:1406 +#: 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:1411 +#: 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:1413 +#: 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:1416 +#: 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:1422 +#: c-api/init_config.rst:1421 msgid "Py_GetArgcArgv()" msgstr "" -#: c-api/init_config.rst:1426 +#: c-api/init_config.rst:1425 msgid "Get the original command line arguments, before Python modified them." msgstr "" -#: c-api/init_config.rst:1428 +#: c-api/init_config.rst:1427 msgid "See also :c:member:`PyConfig.orig_argv` member." msgstr "" -#: c-api/init_config.rst:1432 +#: c-api/init_config.rst:1431 msgid "Multi-Phase Initialization Private Provisional API" msgstr "" -#: c-api/init_config.rst:1434 +#: c-api/init_config.rst:1433 msgid "" "This section is a private provisional API introducing multi-phase " -"initialization, the core feature of the :pep:`432`:" +"initialization, the core feature of :pep:`432`:" msgstr "" -#: c-api/init_config.rst:1437 +#: c-api/init_config.rst:1436 msgid "\"Core\" initialization phase, \"bare minimum Python\":" msgstr "" -#: c-api/init_config.rst:1439 +#: c-api/init_config.rst:1438 msgid "Builtin types;" msgstr "" -#: c-api/init_config.rst:1440 +#: c-api/init_config.rst:1439 msgid "Builtin exceptions;" msgstr "" -#: c-api/init_config.rst:1441 +#: c-api/init_config.rst:1440 msgid "Builtin and frozen modules;" msgstr "" -#: c-api/init_config.rst:1442 +#: 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:1445 +#: c-api/init_config.rst:1444 msgid "\"Main\" initialization phase, Python is fully initialized:" msgstr "" -#: c-api/init_config.rst:1447 +#: c-api/init_config.rst:1446 msgid "Install and configure :mod:`importlib`;" msgstr "" -#: c-api/init_config.rst:1448 +#: c-api/init_config.rst:1447 msgid "Apply the :ref:`Path Configuration `;" msgstr "" -#: c-api/init_config.rst:1449 +#: c-api/init_config.rst:1448 msgid "Install signal handlers;" msgstr "" -#: c-api/init_config.rst:1450 +#: 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:1452 +#: c-api/init_config.rst:1451 msgid "" "Enable optional features like :mod:`faulthandler` and :mod:`tracemalloc`;" msgstr "" -#: c-api/init_config.rst:1453 +#: c-api/init_config.rst:1452 msgid "Import the :mod:`site` module;" msgstr "" -#: c-api/init_config.rst:1454 +#: c-api/init_config.rst:1453 msgid "etc." msgstr "" -#: c-api/init_config.rst:1456 +#: c-api/init_config.rst:1455 msgid "Private provisional API:" msgstr "" -#: c-api/init_config.rst:1458 +#: 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:1460 +#: 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:1465 +#: c-api/init_config.rst:1464 msgid "" "Move to the \"Main\" initialization phase, finish the Python initialization." msgstr "" -#: c-api/init_config.rst:1467 +#: 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 " @@ -1905,14 +1904,14 @@ msgid "" "maybe install a custom :data:`sys.meta_path` importer or an import hook, etc." msgstr "" -#: c-api/init_config.rst:1473 +#: 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:1477 +#: 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 " @@ -1920,7 +1919,7 @@ msgid "" "until a proper public API is designed." msgstr "" -#: c-api/init_config.rst:1482 +#: c-api/init_config.rst:1481 msgid "" "Example running Python code between \"Core\" and \"Main\" initialization " "phases::" diff --git a/c-api/intro.po b/c-api/intro.po index 1ff19ede09..2e2cf77bbd 100644 --- a/c-api/intro.po +++ b/c-api/intro.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-09-23 16:16+0200\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" @@ -120,11 +120,11 @@ msgstr "" 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 :envvar:`prefix` and :envvar:" -"`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 :envvar:`prefix` is the installation directory " +"`{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 "" @@ -134,8 +134,8 @@ msgid "" "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 :" -"envvar:`prefix` include the platform specific headers from :envvar:" -"`exec_prefix`." +"option:`prefix <--prefix>` include the platform specific headers from :" +"option:`exec_prefix <--exec-prefix>`." msgstr "" #: c-api/intro.rst:95 @@ -272,13 +272,13 @@ 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:type:`PyObject*`. This type is a pointer to an opaque data " +"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:type:`PyObject*` can " +"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." @@ -491,19 +491,27 @@ 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:type:`int`, :c:type:`long`, :c:type:" -"`double` and :c:type:`char*`. A few structure types are used to describe " +"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:509 +#: c-api/intro.rst:507 +msgid "" +"A signed integral type such that ``sizeof(Py_ssize_t) == sizeof(size_t)``. " +"C99 doesn't define such a thing directly (size_t is an unsigned integral " +"type). See :pep:`353` for details. ``PY_SSIZE_T_MAX`` is the largest " +"positive value of type :c:type:`Py_ssize_t`." +msgstr "" + +#: c-api/intro.rst:516 msgid "Exceptions" msgstr "Exceptions" -#: c-api/intro.rst:511 +#: c-api/intro.rst:518 msgid "" "The Python programmer only needs to deal with exceptions if specific error " "handling is required; unhandled exceptions are automatically propagated to " @@ -512,7 +520,7 @@ msgid "" "stack traceback." msgstr "" -#: c-api/intro.rst:519 +#: c-api/intro.rst:526 msgid "" "For C programmers, however, error checking always has to be explicit. All " "functions in the Python/C API can raise exceptions, unless an explicit claim " @@ -527,7 +535,7 @@ msgid "" "explicitly documented." msgstr "" -#: c-api/intro.rst:534 +#: c-api/intro.rst:541 msgid "" "Exception state is maintained in per-thread storage (this is equivalent to " "using global storage in an unthreaded application). A thread can be in one " @@ -540,7 +548,7 @@ msgid "" "clears the exception state." msgstr "" -#: c-api/intro.rst:544 +#: c-api/intro.rst:551 msgid "" "The full exception state consists of three objects (all of which can be " "``NULL``): the exception type, the corresponding exception value, and the " @@ -553,7 +561,7 @@ msgid "" "``sys.exc_info()`` and friends." msgstr "" -#: c-api/intro.rst:556 +#: c-api/intro.rst:563 msgid "" "Note that starting with Python 1.5, the preferred, thread-safe way to access " "the exception state from Python code is to call the function :func:`sys." @@ -567,7 +575,7 @@ msgid "" "referenced by the stack frames in the traceback." msgstr "" -#: c-api/intro.rst:567 +#: c-api/intro.rst:574 msgid "" "As a general principle, a function that calls another function to perform " "some task should check whether the called function raised an exception, and " @@ -578,7 +586,7 @@ msgid "" "of the error." msgstr "" -#: c-api/intro.rst:576 +#: c-api/intro.rst:583 msgid "" "A simple example of detecting exceptions and passing them on is shown in " "the :c:func:`sum_sequence` example above. It so happens that this example " @@ -587,11 +595,11 @@ msgid "" "why you like Python, we show the equivalent Python code::" msgstr "" -#: c-api/intro.rst:591 +#: c-api/intro.rst:598 msgid "Here is the corresponding C code, in all its glory::" msgstr "" -#: c-api/intro.rst:643 +#: c-api/intro.rst:650 msgid "" "This example represents an endorsed use of the ``goto`` statement in C! It " "illustrates the use of :c:func:`PyErr_ExceptionMatches` and :c:func:" @@ -604,11 +612,11 @@ msgid "" "success after the final call made is successful." msgstr "" -#: c-api/intro.rst:657 +#: c-api/intro.rst:664 msgid "Embedding Python" msgstr "Embarquer Python" -#: c-api/intro.rst:659 +#: c-api/intro.rst:666 msgid "" "The one important task that only embedders (as opposed to extension writers) " "of the Python interpreter have to worry about is the initialization, and " @@ -616,7 +624,7 @@ msgid "" "the interpreter can only be used after the interpreter has been initialized." msgstr "" -#: c-api/intro.rst:672 +#: c-api/intro.rst:679 msgid "" "The basic initialization function is :c:func:`Py_Initialize`. This " "initializes the table of loaded modules, and creates the fundamental " @@ -624,7 +632,7 @@ msgid "" "initializes the module search path (``sys.path``)." msgstr "" -#: c-api/intro.rst:679 +#: c-api/intro.rst:686 msgid "" ":c:func:`Py_Initialize` does not set the \"script argument list\" (``sys." "argv``). If this variable is needed by Python code that will be executed " @@ -632,7 +640,7 @@ msgid "" "argv, updatepath)`` after the call to :c:func:`Py_Initialize`." msgstr "" -#: c-api/intro.rst:684 +#: c-api/intro.rst:691 msgid "" "On most systems (in particular, on Unix and Windows, although the details " "are slightly different), :c:func:`Py_Initialize` calculates the module " @@ -644,7 +652,7 @@ msgid "" "on the shell command search path (the environment variable :envvar:`PATH`)." msgstr "" -#: c-api/intro.rst:693 +#: c-api/intro.rst:700 msgid "" "For instance, if the Python executable is found in :file:`/usr/local/bin/" "python`, it will assume that the libraries are in :file:`/usr/local/lib/" @@ -655,7 +663,7 @@ msgid "" "in front of the standard path by setting :envvar:`PYTHONPATH`." msgstr "" -#: c-api/intro.rst:708 +#: c-api/intro.rst:715 msgid "" "The embedding application can steer the search by calling " "``Py_SetProgramName(file)`` *before* calling :c:func:`Py_Initialize`. Note " @@ -666,7 +674,7 @@ msgid "" "func:`Py_GetProgramFullPath` (all defined in :file:`Modules/getpath.c`)." msgstr "" -#: c-api/intro.rst:718 +#: c-api/intro.rst:725 msgid "" "Sometimes, it is desirable to \"uninitialize\" Python. For instance, the " "application may want to start over (make another call to :c:func:" @@ -680,28 +688,28 @@ msgid "" "released." msgstr "" -#: c-api/intro.rst:732 +#: c-api/intro.rst:739 msgid "Debugging Builds" msgstr "" -#: c-api/intro.rst:734 +#: c-api/intro.rst:741 msgid "" "Python can be built with several macros to enable extra checks of the " "interpreter and extension modules. These checks tend to add a large amount " "of overhead to the runtime so they are not enabled by default." msgstr "" -#: c-api/intro.rst:738 +#: c-api/intro.rst:745 msgid "" "A full list of the various types of debugging builds is in the file :file:" "`Misc/SpecialBuilds.txt` in the Python source distribution. Builds are " "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 " +"most frequently used builds will be described in the remainder of this " "section." msgstr "" -#: c-api/intro.rst:744 +#: c-api/intro.rst:751 msgid "" "Compiling the interpreter with the :c:macro:`Py_DEBUG` macro defined " "produces what is generally meant by :ref:`a debug build of Python `." msgstr "" -#: c-api/intro.rst:755 +#: 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 " @@ -728,7 +736,7 @@ msgid "" "this happens after every statement run by the interpreter.)" msgstr "" -#: c-api/intro.rst:762 +#: c-api/intro.rst:769 msgid "" "Please refer to :file:`Misc/SpecialBuilds.txt` in the Python source " "distribution for more detailed information." diff --git a/c-api/iter.po b/c-api/iter.po index 5a03337779..f910b9223c 100644 --- a/c-api/iter.po +++ b/c-api/iter.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-27 10:27+0100\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" @@ -32,8 +32,8 @@ msgstr "Renvoie vrai si l'objet *o* supporte le protocole d'itération." #: c-api/iter.rst:17 #, fuzzy msgid "" -"Returns non-zero if the object 'obj' provides :class:`AsyncIterator` " -"protocols, and ``0`` otherwise. This function always succeeds." +"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 diff --git a/c-api/long.po b/c-api/long.po index a39c1815da..8ec49d2f49 100644 --- a/c-api/long.po +++ b/c-api/long.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-09-23 16:16+0200\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" @@ -72,13 +72,13 @@ msgstr "" #: c-api/long.rst:43 msgid "" "The current implementation keeps an array of integer objects for all " -"integers between ``-5`` and ``256``, when you create an int in that range " +"integers between ``-5`` and ``256``. When you create an int in that range " "you actually just get back a reference to the existing object." msgstr "" #: c-api/long.rst:50 msgid "" -"Return a new :c:type:`PyLongObject` object from a C :c:type:`unsigned long`, " +"Return a new :c:type:`PyLongObject` object from a C :c:expr:`unsigned long`, " "or ``NULL`` on failure." msgstr "" @@ -96,13 +96,13 @@ msgstr "" #: c-api/long.rst:68 msgid "" -"Return a new :c:type:`PyLongObject` object from a C :c:type:`long long`, or " +"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:type:`unsigned long " +"Return a new :c:type:`PyLongObject` object from a C :c:expr:`unsigned long " "long`, or ``NULL`` on failure." msgstr "" @@ -125,44 +125,51 @@ msgid "" "are no digits, :exc:`ValueError` will be raised." msgstr "" -#: c-api/long.rst:99 +#: 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:107 +#: 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:136 +#: c-api/long.rst:140 msgid "" -"Return a C :c:type:`long` representation of *obj*. If *obj* is not an " +"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:122 +#: c-api/long.rst:126 msgid "" "Raise :exc:`OverflowError` if the value of *obj* is out of range for a :c:" -"type:`long`." +"expr:`long`." msgstr "" -#: c-api/long.rst:145 c-api/long.rst:186 c-api/long.rst:209 +#: 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:147 c-api/long.rst:190 c-api/long.rst:294 +#: 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:150 c-api/long.rst:193 c-api/long.rst:297 +#: 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:140 +#: 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 " @@ -170,20 +177,20 @@ msgid "" "occurs set *\\*overflow* to ``0`` and return ``-1`` as usual." msgstr "" -#: c-api/long.rst:177 +#: c-api/long.rst:181 msgid "" -"Return a C :c:type:`long long` representation of *obj*. If *obj* is not an " +"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:163 +#: c-api/long.rst:167 msgid "" "Raise :exc:`OverflowError` if the value of *obj* is out of range for a :c:" -"type:`long long`." +"expr:`long long`." msgstr "" -#: c-api/long.rst:181 +#: 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 " @@ -191,141 +198,141 @@ msgid "" "occurs set *\\*overflow* to ``0`` and return ``-1`` as usual." msgstr "" -#: c-api/long.rst:203 +#: 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:206 +#: 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:218 +#: c-api/long.rst:222 msgid "" -"Return a C :c:type:`unsigned long` representation of *pylong*. *pylong* " +"Return a C :c:expr:`unsigned long` representation of *pylong*. *pylong* " "must be an instance of :c:type:`PyLongObject`." msgstr "" -#: c-api/long.rst:221 +#: c-api/long.rst:225 msgid "" "Raise :exc:`OverflowError` if the value of *pylong* is out of range for a :c:" -"type:`unsigned long`." +"expr:`unsigned long`." msgstr "" -#: c-api/long.rst:224 +#: c-api/long.rst:228 msgid "" "Returns ``(unsigned long)-1`` on error. Use :c:func:`PyErr_Occurred` to " "disambiguate." msgstr "" -#: c-api/long.rst:234 +#: 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:237 +#: 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:240 +#: c-api/long.rst:244 msgid "" "Returns ``(size_t)-1`` on error. Use :c:func:`PyErr_Occurred` to " "disambiguate." msgstr "" -#: c-api/long.rst:249 +#: c-api/long.rst:253 msgid "" -"Return a C :c:type:`unsigned long long` representation of *pylong*. " +"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:252 +#: c-api/long.rst:256 msgid "" "Raise :exc:`OverflowError` if the value of *pylong* is out of range for an :" -"c:type:`unsigned long long`." +"c:expr:`unsigned long long`." msgstr "" -#: c-api/long.rst:255 +#: 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:258 +#: c-api/long.rst:262 msgid "" "A negative *pylong* now raises :exc:`OverflowError`, not :exc:`TypeError`." msgstr "" -#: c-api/long.rst:264 +#: c-api/long.rst:268 msgid "" -"Return a C :c:type:`unsigned long` representation of *obj*. If *obj* is not " +"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:268 +#: c-api/long.rst:272 msgid "" -"If the value of *obj* is out of range for an :c:type:`unsigned long`, return " +"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:271 +#: c-api/long.rst:275 msgid "" "Returns ``(unsigned long)-1`` on error. Use :c:func:`PyErr_Occurred` to " "disambiguate." msgstr "" -#: c-api/long.rst:283 +#: c-api/long.rst:287 msgid "" -"Return a C :c:type:`unsigned long long` representation of *obj*. If *obj* " +"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:288 +#: c-api/long.rst:292 msgid "" -"If the value of *obj* is out of range for an :c:type:`unsigned long long`, " +"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:291 +#: 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:303 +#: c-api/long.rst:307 msgid "" -"Return a C :c:type:`double` representation of *pylong*. *pylong* must be an " +"Return a C :c:expr:`double` representation of *pylong*. *pylong* must be an " "instance of :c:type:`PyLongObject`." msgstr "" -#: c-api/long.rst:306 +#: c-api/long.rst:310 msgid "" "Raise :exc:`OverflowError` if the value of *pylong* is out of range for a :c:" -"type:`double`." +"expr:`double`." msgstr "" -#: c-api/long.rst:309 +#: c-api/long.rst:313 msgid "" "Returns ``-1.0`` on error. Use :c:func:`PyErr_Occurred` to disambiguate." msgstr "" -#: c-api/long.rst:314 +#: c-api/long.rst:318 msgid "" -"Convert a Python integer *pylong* to a C :c:type:`void` pointer. If *pylong* " +"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:type:`void` pointer for values created with :" +"assured to produce a usable :c:expr:`void` pointer for values created with :" "c:func:`PyLong_FromVoidPtr`." msgstr "" -#: c-api/long.rst:319 +#: 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 index 4f1d3a2386..55bd3511a0 100644 --- a/c-api/mapping.po +++ b/c-api/mapping.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-01 16:00+0200\n" +"POT-Creation-Date: 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" @@ -32,11 +32,13 @@ msgstr "" # → pas correct en VO ! # - "This function always succeeds." équivaut-il à "jamais d'erreur" ? #: c-api/mapping.rst:14 +#, fuzzy msgid "" -"Return ``1`` if the object provides mapping protocol or supports slicing, " -"and ``0`` otherwise. Note that it returns ``1`` for Python classes with a :" -"meth:`__getitem__` method since in general case it is impossible to " -"determine what type of keys it supports. This function always succeeds." +"Return ``1`` if the object provides the mapping protocol or supports " +"slicing, and ``0`` otherwise. Note that it returns ``1`` for Python classes " +"with a :meth:`__getitem__` method, since in general it is impossible to " +"determine what type of keys the class supports. This function always " +"succeeds." msgstr "" "Renvoie ``1`` si l'objet prend en charge le protocole de correspondance ou " "le découpage en tranches et ``0`` sinon. Notez qu'elle renvoie ``1`` pour " diff --git a/c-api/marshal.po b/c-api/marshal.po index 2d2bfca6ec..be0eee8b28 100644 --- a/c-api/marshal.po +++ b/c-api/marshal.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-01 16:00+0200\n" +"POT-Creation-Date: 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" @@ -41,9 +41,9 @@ msgstr "" #: c-api/marshal.rst:24 msgid "" -"Marshal a :c:type:`long` integer, *value*, to *file*. This will only write " +"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:type:`long` type. *version* indicates the file format." +"native :c:expr:`long` type. *version* indicates the file format." msgstr "" #: c-api/marshal.rst:31 @@ -64,9 +64,9 @@ msgstr "" #: c-api/marshal.rst:46 msgid "" -"Return a C :c:type:`long` from the data stream in a :c:type:`FILE*` opened " +"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:type:`long`." +"regardless of the native size of :c:expr:`long`." msgstr "" #: c-api/marshal.rst:60 @@ -77,14 +77,14 @@ msgstr "" #: c-api/marshal.rst:56 msgid "" -"Return a C :c:type:`short` from the data stream in a :c:type:`FILE*` opened " +"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:type:`short`." +"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:type:`FILE*` opened for " +"Return a Python object from the data stream in a :c:expr:`FILE*` opened for " "reading." msgstr "" @@ -96,7 +96,7 @@ msgstr "" #: c-api/marshal.rst:75 msgid "" -"Return a Python object from the data stream in a :c:type:`FILE*` opened for " +"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 " diff --git a/c-api/memory.po b/c-api/memory.po index c06c810c38..773069639c 100644 --- a/c-api/memory.po +++ b/c-api/memory.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-09-23 16:16+0200\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" @@ -82,7 +82,7 @@ msgid "" "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 " +"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 " @@ -109,7 +109,7 @@ msgstr "" msgid "Allocator Domains" msgstr "" -#: c-api/memory.rst:98 +#: 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 " @@ -125,11 +125,11 @@ msgid "" "`PyObject_Malloc` for allocating memory for buffers." msgstr "" -#: c-api/memory.rst:110 +#: c-api/memory.rst:112 msgid "The three allocation domains are:" msgstr "" -#: c-api/memory.rst:112 +#: 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 " @@ -137,20 +137,20 @@ msgid "" "directly to the system." msgstr "" -#: c-api/memory.rst:117 +#: 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:121 +#: 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:124 +#: 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 " @@ -158,18 +158,18 @@ msgid "" "allocated using :c:func:`PyMem_Malloc`." msgstr "" -#: c-api/memory.rst:129 +#: c-api/memory.rst:131 msgid "Raw Memory Interface" msgstr "" -#: c-api/memory.rst:131 +#: 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:135 +#: 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` " @@ -177,60 +177,60 @@ msgid "" "zero bytes." msgstr "" -#: c-api/memory.rst:215 c-api/memory.rst:323 +#: c-api/memory.rst:217 c-api/memory.rst:325 msgid "" -"Allocates *n* bytes and returns a pointer of type :c:type:`void*` to the " +"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:147 +#: 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:225 c-api/memory.rst:333 +#: 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:type:`void*` to the allocated memory, or ``NULL`` if " +"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:158 +#: 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:238 c-api/memory.rst:346 +#: 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:170 +#: 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:174 +#: 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:178 +#: 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:184 +#: 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:" @@ -238,72 +238,72 @@ msgid "" "called before, undefined behavior occurs." msgstr "" -#: c-api/memory.rst:259 c-api/memory.rst:367 +#: c-api/memory.rst:261 c-api/memory.rst:369 msgid "If *p* is ``NULL``, no operation is performed." msgstr "" -#: c-api/memory.rst:195 +#: c-api/memory.rst:197 msgid "Memory Interface" msgstr "" -#: c-api/memory.rst:303 +#: 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:201 +#: c-api/memory.rst:203 msgid "" "The :ref:`default memory allocator ` uses the :" "ref:`pymalloc memory allocator `." msgstr "" -#: c-api/memory.rst:318 +#: c-api/memory.rst:320 msgid "" "The :term:`GIL ` must be held when using these " "functions." msgstr "" -#: c-api/memory.rst:211 +#: c-api/memory.rst:213 msgid "" "The default allocator is now pymalloc instead of system :c:func:`malloc`." msgstr "" -#: c-api/memory.rst:218 +#: 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:229 +#: 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:241 +#: 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:245 +#: 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:248 +#: 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:254 +#: 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:" @@ -311,38 +311,38 @@ msgid "" "undefined behavior occurs." msgstr "" -#: c-api/memory.rst:261 +#: 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:267 +#: 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:type:`TYPE*`. The memory will not " +"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:274 +#: 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:type:`TYPE*`. On " +"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:279 +#: 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:285 +#: c-api/memory.rst:287 msgid "Same as :c:func:`PyMem_Free`." msgstr "" -#: c-api/memory.rst:287 +#: 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 " @@ -350,83 +350,83 @@ msgid "" "across Python versions and is therefore deprecated in extension modules." msgstr "" -#: c-api/memory.rst:292 +#: c-api/memory.rst:294 msgid "``PyMem_MALLOC(size)``" msgstr "" -#: c-api/memory.rst:293 +#: c-api/memory.rst:295 msgid "``PyMem_NEW(type, size)``" msgstr "" -#: c-api/memory.rst:294 +#: c-api/memory.rst:296 msgid "``PyMem_REALLOC(ptr, size)``" msgstr "" -#: c-api/memory.rst:295 +#: c-api/memory.rst:297 msgid "``PyMem_RESIZE(ptr, type, size)``" msgstr "" -#: c-api/memory.rst:296 +#: c-api/memory.rst:298 msgid "``PyMem_FREE(ptr)``" msgstr "" -#: c-api/memory.rst:297 +#: c-api/memory.rst:299 msgid "``PyMem_DEL(ptr)``" msgstr "" -#: c-api/memory.rst:301 +#: c-api/memory.rst:303 msgid "Object allocators" msgstr "" -#: c-api/memory.rst:308 +#: c-api/memory.rst:310 msgid "" "There is no guarantee that the memory returned by these allocators can be " -"successfully casted to a Python object when intercepting the allocating " +"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:313 +#: c-api/memory.rst:315 msgid "" "The :ref:`default object allocator ` uses the :" "ref:`pymalloc memory allocator `." msgstr "" -#: c-api/memory.rst:326 +#: 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:337 +#: 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:349 +#: 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:353 +#: 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:356 +#: 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:362 +#: 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:" @@ -434,276 +434,298 @@ msgid "" "called before, undefined behavior occurs." msgstr "" -#: c-api/memory.rst:373 +#: c-api/memory.rst:375 msgid "Default Memory Allocators" msgstr "" -#: c-api/memory.rst:375 +#: c-api/memory.rst:377 msgid "Default memory allocators:" msgstr "" -#: c-api/memory.rst:378 +#: c-api/memory.rst:380 msgid "Configuration" msgstr "Configuration" -#: c-api/memory.rst:378 +#: c-api/memory.rst:380 msgid "Name" msgstr "Nom" -#: c-api/memory.rst:378 +#: c-api/memory.rst:380 msgid "PyMem_RawMalloc" msgstr "" -#: c-api/memory.rst:378 +#: c-api/memory.rst:380 msgid "PyMem_Malloc" msgstr "" -#: c-api/memory.rst:378 +#: c-api/memory.rst:380 msgid "PyObject_Malloc" msgstr "" -#: c-api/memory.rst:380 +#: c-api/memory.rst:382 msgid "Release build" msgstr "" -#: c-api/memory.rst:380 +#: c-api/memory.rst:382 msgid "``\"pymalloc\"``" msgstr "" -#: c-api/memory.rst:382 +#: c-api/memory.rst:384 msgid "``malloc``" msgstr "" -#: c-api/memory.rst:380 +#: c-api/memory.rst:382 msgid "``pymalloc``" msgstr "" -#: c-api/memory.rst:381 +#: c-api/memory.rst:383 msgid "Debug build" msgstr "" -#: c-api/memory.rst:381 +#: c-api/memory.rst:383 msgid "``\"pymalloc_debug\"``" msgstr "" -#: c-api/memory.rst:383 +#: c-api/memory.rst:385 msgid "``malloc`` + debug" msgstr "" -#: c-api/memory.rst:381 +#: c-api/memory.rst:383 msgid "``pymalloc`` + debug" msgstr "" -#: c-api/memory.rst:382 +#: c-api/memory.rst:384 msgid "Release build, without pymalloc" msgstr "" -#: c-api/memory.rst:382 +#: c-api/memory.rst:384 msgid "``\"malloc\"``" msgstr "" -#: c-api/memory.rst:383 +#: c-api/memory.rst:385 msgid "Debug build, without pymalloc" msgstr "" -#: c-api/memory.rst:383 +#: c-api/memory.rst:385 msgid "``\"malloc_debug\"``" msgstr "" -#: c-api/memory.rst:386 +#: c-api/memory.rst:388 msgid "Legend:" msgstr "" -#: c-api/memory.rst:388 +#: c-api/memory.rst:390 msgid "Name: value for :envvar:`PYTHONMALLOC` environment variable." msgstr "" -#: c-api/memory.rst:389 +#: 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:391 +#: c-api/memory.rst:393 msgid "``pymalloc``: :ref:`pymalloc memory allocator `." msgstr "" -#: c-api/memory.rst:392 +#: c-api/memory.rst:394 msgid "" "\"+ debug\": with :ref:`debug hooks on the Python memory allocators `." msgstr "" -#: c-api/memory.rst:394 +#: c-api/memory.rst:396 msgid "\"Debug build\": :ref:`Python build in debug mode `." msgstr "" -#: c-api/memory.rst:399 +#: c-api/memory.rst:401 msgid "Customize Memory Allocators" msgstr "" -#: c-api/memory.rst:405 +#: c-api/memory.rst:407 msgid "" -"Structure used to describe a memory block allocator. The structure has four " -"fields:" +"Structure used to describe a memory block allocator. The structure has the " +"following fields:" msgstr "" -#: c-api/memory.rst:626 +#: c-api/memory.rst:647 msgid "Field" msgstr "Champ" -#: c-api/memory.rst:626 +#: c-api/memory.rst:647 msgid "Meaning" msgstr "Signification" -#: c-api/memory.rst:628 +#: c-api/memory.rst:649 msgid "``void *ctx``" msgstr "``void *ctx``" -#: c-api/memory.rst:628 +#: c-api/memory.rst:649 msgid "user context passed as first argument" msgstr "" -#: c-api/memory.rst:413 +#: 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:413 +#: c-api/memory.rst:415 msgid "allocate a memory block" msgstr "" -#: c-api/memory.rst:415 +#: c-api/memory.rst:417 msgid "``void* calloc(void *ctx, size_t nelem, size_t elsize)``" msgstr "" -#: c-api/memory.rst:415 +#: c-api/memory.rst:417 msgid "allocate a memory block initialized with zeros" msgstr "" -#: c-api/memory.rst:418 +#: c-api/memory.rst:420 msgid "``void* realloc(void *ctx, void *ptr, size_t new_size)``" msgstr "" -#: c-api/memory.rst:418 +#: c-api/memory.rst:420 msgid "allocate or resize a memory block" msgstr "" -#: c-api/memory.rst:420 +#: c-api/memory.rst:422 msgid "``void free(void *ctx, void *ptr)``" msgstr "``void free(void *ctx, void *ptr)``" -#: c-api/memory.rst:420 +#: c-api/memory.rst:422 msgid "free a memory block" msgstr "" -#: c-api/memory.rst:423 +#: 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:430 +#: c-api/memory.rst:432 msgid "Enum used to identify an allocator domain. Domains:" msgstr "" -#: c-api/memory.rst:443 c-api/memory.rst:452 +#: c-api/memory.rst:445 c-api/memory.rst:454 #, fuzzy msgid "Functions:" msgstr "Fonctions" -#: c-api/memory.rst:436 +#: c-api/memory.rst:438 #, fuzzy msgid ":c:func:`PyMem_RawMalloc`" msgstr ":c:func:`PyMem_RawCalloc`," -#: c-api/memory.rst:437 +#: c-api/memory.rst:439 #, fuzzy msgid ":c:func:`PyMem_RawRealloc`" msgstr ":c:func:`PyMem_RawCalloc`," -#: c-api/memory.rst:438 +#: c-api/memory.rst:440 #, fuzzy msgid ":c:func:`PyMem_RawCalloc`" msgstr ":c:func:`PyMem_RawCalloc`," -#: c-api/memory.rst:439 +#: c-api/memory.rst:441 msgid ":c:func:`PyMem_RawFree`" msgstr "" -#: c-api/memory.rst:445 +#: c-api/memory.rst:447 #, fuzzy msgid ":c:func:`PyMem_Malloc`," msgstr ":c:func:`PyMem_Calloc`," -#: c-api/memory.rst:446 +#: c-api/memory.rst:448 #, fuzzy msgid ":c:func:`PyMem_Realloc`" msgstr ":c:func:`PyMem_Calloc`," -#: c-api/memory.rst:447 +#: c-api/memory.rst:449 #, fuzzy msgid ":c:func:`PyMem_Calloc`" msgstr ":c:func:`PyMem_Calloc`," -#: c-api/memory.rst:448 +#: c-api/memory.rst:450 msgid ":c:func:`PyMem_Free`" msgstr "" -#: c-api/memory.rst:454 +#: c-api/memory.rst:456 msgid ":c:func:`PyObject_Malloc`" msgstr "" -#: c-api/memory.rst:455 +#: c-api/memory.rst:457 msgid ":c:func:`PyObject_Realloc`" msgstr "" -#: c-api/memory.rst:456 +#: c-api/memory.rst:458 msgid ":c:func:`PyObject_Calloc`" msgstr "" -#: c-api/memory.rst:457 +#: c-api/memory.rst:459 msgid ":c:func:`PyObject_Free`" msgstr "" -#: c-api/memory.rst:461 +#: c-api/memory.rst:463 msgid "Get the memory block allocator of the specified domain." msgstr "" -#: c-api/memory.rst:466 +#: c-api/memory.rst:468 msgid "Set the memory block allocator of the specified domain." msgstr "" -#: c-api/memory.rst:468 +#: 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:471 +#: 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:475 +#: 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:482 +#: 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:489 +#: c-api/memory.rst:510 msgid "Debug hooks on the Python memory allocators" msgstr "" -#: c-api/memory.rst:491 +#: 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 " @@ -711,19 +733,19 @@ msgid "" "allocators to detect memory errors." msgstr "" -#: c-api/memory.rst:496 +#: 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:499 +#: 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:502 +#: 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 " @@ -733,32 +755,32 @@ msgid "" "these bytes are unlikely to be valid addresses, floats, or ASCII strings." msgstr "" -#: c-api/memory.rst:509 +#: c-api/memory.rst:530 msgid "Runtime checks:" msgstr "" -#: c-api/memory.rst:511 +#: 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:513 +#: c-api/memory.rst:534 msgid "Detect write before the start of the buffer (buffer underflow)." msgstr "" -#: c-api/memory.rst:514 +#: c-api/memory.rst:535 msgid "Detect write after the end of the buffer (buffer overflow)." msgstr "" -#: c-api/memory.rst:515 +#: 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:520 +#: 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 " @@ -766,59 +788,59 @@ msgid "" "memory block was traced." msgstr "" -#: c-api/memory.rst:525 +#: 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):" +"(``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:532 +#: c-api/memory.rst:553 msgid "``p[-2*S:-S]``" msgstr "" -#: c-api/memory.rst:532 +#: 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:539 +#: c-api/memory.rst:560 msgid "``p[-S]``" msgstr "" -#: c-api/memory.rst:535 +#: c-api/memory.rst:556 msgid "API identifier (ASCII character):" msgstr "" -#: c-api/memory.rst:537 +#: c-api/memory.rst:558 msgid "``'r'`` for :c:data:`PYMEM_DOMAIN_RAW`." msgstr "" -#: c-api/memory.rst:538 +#: c-api/memory.rst:559 msgid "``'m'`` for :c:data:`PYMEM_DOMAIN_MEM`." msgstr "" -#: c-api/memory.rst:539 +#: c-api/memory.rst:560 msgid "``'o'`` for :c:data:`PYMEM_DOMAIN_OBJ`." msgstr "" -#: c-api/memory.rst:542 +#: c-api/memory.rst:563 msgid "``p[-S+1:0]``" msgstr "" -#: c-api/memory.rst:542 +#: c-api/memory.rst:563 msgid "Copies of PYMEM_FORBIDDENBYTE. Used to catch under- writes and reads." msgstr "" -#: c-api/memory.rst:551 +#: c-api/memory.rst:572 msgid "``p[0:N]``" msgstr "" -#: c-api/memory.rst:545 +#: 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 " @@ -829,25 +851,25 @@ msgid "" "bytes are also filled with PYMEM_DEADBYTE." msgstr "" -#: c-api/memory.rst:554 +#: c-api/memory.rst:575 msgid "``p[N:N+S]``" msgstr "" -#: c-api/memory.rst:554 +#: c-api/memory.rst:575 msgid "Copies of PYMEM_FORBIDDENBYTE. Used to catch over- writes and reads." msgstr "" -#: c-api/memory.rst:565 +#: c-api/memory.rst:586 msgid "``p[N+S:N+2*S]``" msgstr "" -#: c-api/memory.rst:557 +#: 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:560 +#: 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, " @@ -857,7 +879,7 @@ msgid "" "incremented, and exists so you can set such a breakpoint easily." msgstr "" -#: c-api/memory.rst:567 +#: 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, " @@ -870,7 +892,7 @@ msgid "" "getting used)." msgstr "" -#: c-api/memory.rst:576 +#: 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:" @@ -879,7 +901,7 @@ msgid "" "`PYMEM_DOMAIN_OBJ` and :c:data:`PYMEM_DOMAIN_MEM` domains are called." msgstr "" -#: c-api/memory.rst:584 +#: c-api/memory.rst:605 msgid "" "Byte patterns ``0xCB`` (``PYMEM_CLEANBYTE``), ``0xDB`` (``PYMEM_DEADBYTE``) " "and ``0xFB`` (``PYMEM_FORBIDDENBYTE``) have been replaced with ``0xCD``, " @@ -887,11 +909,11 @@ msgid "" "``malloc()`` and ``free()``." msgstr "" -#: c-api/memory.rst:594 +#: c-api/memory.rst:615 msgid "The pymalloc allocator" msgstr "" -#: c-api/memory.rst:596 +#: 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 " @@ -900,115 +922,115 @@ msgid "" "512 bytes." msgstr "" -#: c-api/memory.rst:601 +#: 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:605 +#: c-api/memory.rst:626 msgid "The arena allocator uses the following functions:" msgstr "" -#: c-api/memory.rst:607 +#: c-api/memory.rst:628 msgid ":c:func:`VirtualAlloc` and :c:func:`VirtualFree` on Windows," msgstr "" -#: c-api/memory.rst:608 +#: c-api/memory.rst:629 msgid ":c:func:`mmap` and :c:func:`munmap` if available," msgstr "" -#: c-api/memory.rst:609 +#: c-api/memory.rst:630 msgid ":c:func:`malloc` and :c:func:`free` otherwise." msgstr "" -#: c-api/memory.rst:611 +#: 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:616 +#: c-api/memory.rst:637 msgid "Customize pymalloc Arena Allocator" msgstr "" -#: c-api/memory.rst:622 +#: c-api/memory.rst:643 msgid "" "Structure used to describe an arena allocator. The structure has three " "fields:" msgstr "" -#: c-api/memory.rst:630 +#: 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:630 +#: c-api/memory.rst:651 msgid "allocate an arena of size bytes" msgstr "" -#: c-api/memory.rst:632 +#: 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:632 +#: c-api/memory.rst:653 msgid "free an arena" msgstr "" -#: c-api/memory.rst:637 +#: c-api/memory.rst:658 msgid "Get the arena allocator." msgstr "" -#: c-api/memory.rst:641 +#: c-api/memory.rst:662 msgid "Set the arena allocator." msgstr "" -#: c-api/memory.rst:645 +#: c-api/memory.rst:666 msgid "tracemalloc C API" msgstr "" -#: c-api/memory.rst:651 +#: c-api/memory.rst:672 msgid "Track an allocated memory block in the :mod:`tracemalloc` module." msgstr "" -#: c-api/memory.rst:653 +#: 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:656 +#: c-api/memory.rst:677 msgid "If memory block is already tracked, update the existing trace." msgstr "" -#: c-api/memory.rst:660 +#: 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:663 +#: c-api/memory.rst:684 msgid "Return ``-2`` if tracemalloc is disabled, otherwise return ``0``." msgstr "" -#: c-api/memory.rst:669 +#: c-api/memory.rst:690 msgid "Examples" msgstr "Exemples" -#: c-api/memory.rst:671 +#: 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:684 +#: c-api/memory.rst:705 msgid "The same code using the type-oriented function set::" msgstr "" -#: c-api/memory.rst:696 +#: 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 " @@ -1018,14 +1040,14 @@ msgid "" "different allocators operating on different heaps. ::" msgstr "" -#: c-api/memory.rst:711 +#: 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:715 +#: c-api/memory.rst:736 msgid "" "These will be explained in the next chapter on defining and implementing new " "object types in C." diff --git a/c-api/method.po b/c-api/method.po index 4519cfcf4d..7770ba02e1 100644 --- a/c-api/method.po +++ b/c-api/method.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-01-27 19:26+0100\n" +"POT-Creation-Date: 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" @@ -40,7 +40,7 @@ msgstr "" #: c-api/method.rst:30 msgid "" -"Return a new instance method object, with *func* being any callable object " +"Return a new instance method object, with *func* being any callable object. " "*func* is the function that will be called when the instance method is " "called." msgstr "" diff --git a/c-api/module.po b/c-api/module.po index b55782c636..fb3a4cb71d 100644 --- a/c-api/module.po +++ b/c-api/module.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-09-23 16:16+0200\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" @@ -65,9 +65,9 @@ msgstr "" #: c-api/module.rst:67 msgid "" -"It is recommended extensions use other :c:func:`PyModule_\\*` and :c:func:" -"`PyObject_\\*` functions rather than directly manipulate a module's :attr:" -"`~object.__dict__`." +"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 @@ -437,17 +437,17 @@ msgstr "" #: c-api/module.rst:391 msgid "" -"Create a new module object, given the definition in *module* and the " -"ModuleSpec *spec*. This behaves like :c:func:`PyModule_FromDefAndSpec2` " -"with *module_api_version* set to :const:`PYTHON_API_VERSION`." +"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 *module* 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." +"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 @@ -510,7 +510,7 @@ msgstr "" #: c-api/module.rst:506 msgid "Example usage::" -msgstr "" +msgstr "Exemple d'utilisation ::" #: c-api/module.rst:524 msgid "" diff --git a/c-api/number.po b/c-api/number.po index e93d7add02..0ae959fba5 100644 --- a/c-api/number.po +++ b/c-api/number.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-09-23 16:16+0200\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" @@ -55,7 +55,7 @@ msgstr "" #: c-api/number.rst:46 msgid "" "Return the floor of *o1* divided by *o2*, or ``NULL`` on failure. This is " -"equivalent to the \"classic\" division of integers." +"the equivalent of the Python expression ``o1 // o2``." msgstr "" #: c-api/number.rst:52 @@ -64,7 +64,8 @@ msgid "" "by *o2*, or ``NULL`` on failure. The return value is \"approximate\" " "because binary floating point numbers are approximate; it is not possible to " "represent all real numbers in base two. This function can return a floating " -"point value when passed two integers." +"point value when passed two integers. This is the equivalent of the Python " +"expression ``o1 / o2``." msgstr "" #: c-api/number.rst:61 @@ -183,17 +184,18 @@ msgid "" "because binary floating point numbers are approximate; it is not possible to " "represent all real numbers in base two. This function can return a floating " "point value when passed two integers. The operation is done *in-place* when " -"*o1* supports it." +"*o1* supports it. This is the equivalent of the Python statement ``o1 /= " +"o2``." msgstr "" -#: c-api/number.rst:187 +#: c-api/number.rst:188 msgid "" "Returns the remainder of dividing *o1* by *o2*, or ``NULL`` on failure. The " "operation is done *in-place* when *o1* supports it. This is the equivalent " "of the Python statement ``o1 %= o2``." msgstr "" -#: c-api/number.rst:196 +#: c-api/number.rst:197 msgid "" "See the built-in function :func:`pow`. Returns ``NULL`` on failure. The " "operation is done *in-place* when *o1* supports it. This is the equivalent " @@ -203,66 +205,66 @@ msgid "" "an illegal memory access)." msgstr "" -#: c-api/number.rst:205 +#: c-api/number.rst:206 msgid "" "Returns the result of left shifting *o1* by *o2* on success, or ``NULL`` on " "failure. The operation is done *in-place* when *o1* supports it. This is " "the equivalent of the Python statement ``o1 <<= o2``." msgstr "" -#: c-api/number.rst:212 +#: c-api/number.rst:213 msgid "" "Returns the result of right shifting *o1* by *o2* on success, or ``NULL`` on " "failure. The operation is done *in-place* when *o1* supports it. This is " "the equivalent of the Python statement ``o1 >>= o2``." msgstr "" -#: c-api/number.rst:219 +#: c-api/number.rst:220 msgid "" "Returns the \"bitwise and\" of *o1* and *o2* on success and ``NULL`` on " "failure. The operation is done *in-place* when *o1* supports it. This is " "the equivalent of the Python statement ``o1 &= o2``." msgstr "" -#: c-api/number.rst:226 +#: c-api/number.rst:227 msgid "" "Returns the \"bitwise exclusive or\" of *o1* by *o2* on success, or ``NULL`` " "on failure. The operation is done *in-place* when *o1* supports it. This " "is the equivalent of the Python statement ``o1 ^= o2``." msgstr "" -#: c-api/number.rst:233 +#: c-api/number.rst:234 msgid "" "Returns the \"bitwise or\" of *o1* and *o2* on success, or ``NULL`` on " "failure. The operation is done *in-place* when *o1* supports it. This is " "the equivalent of the Python statement ``o1 |= o2``." msgstr "" -#: c-api/number.rst:242 +#: c-api/number.rst:243 msgid "" "Returns the *o* converted to an integer object on success, or ``NULL`` on " "failure. This is the equivalent of the Python expression ``int(o)``." msgstr "" -#: c-api/number.rst:250 +#: c-api/number.rst:251 msgid "" "Returns the *o* converted to a float object on success, or ``NULL`` on " "failure. This is the equivalent of the Python expression ``float(o)``." msgstr "" -#: c-api/number.rst:256 +#: c-api/number.rst:257 msgid "" "Returns the *o* converted to a Python int on success or ``NULL`` with a :exc:" "`TypeError` exception raised on failure." msgstr "" -#: c-api/number.rst:259 +#: 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:266 +#: 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 " @@ -271,25 +273,26 @@ msgid "" "`PyNumber_Index` first." msgstr "" -#: c-api/number.rst:275 +#: c-api/number.rst:276 msgid "" -"Returns *o* converted to a Py_ssize_t value if *o* can be interpreted as an " -"integer. If the call fails, an exception is raised and ``-1`` is returned." +"Returns *o* converted to a :c:type:`Py_ssize_t` value if *o* can be " +"interpreted as an integer. If the call fails, an exception is raised and " +"``-1`` is returned." msgstr "" -#: c-api/number.rst:278 +#: c-api/number.rst:279 msgid "" -"If *o* can be converted to a Python int but the attempt to convert to a " -"Py_ssize_t value would raise an :exc:`OverflowError`, then the *exc* " +"If *o* can be converted to a Python int but the attempt to convert to a :c:" +"type:`Py_ssize_t` value would raise an :exc:`OverflowError`, then the *exc* " "argument is the type of exception that will be raised (usually :exc:" "`IndexError` or :exc:`OverflowError`). If *exc* is ``NULL``, then the " "exception is cleared and the value is clipped to ``PY_SSIZE_T_MIN`` for a " "negative integer or ``PY_SSIZE_T_MAX`` for a positive integer." msgstr "" -#: c-api/number.rst:288 +#: 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." +"Returns ``1`` if *o* is an index integer (has the ``nb_index`` slot of the " +"``tp_as_number`` structure filled in), and ``0`` otherwise. This function " +"always succeeds." msgstr "" diff --git a/c-api/object.po b/c-api/object.po index 2119a1b4e8..4005de3226 100644 --- a/c-api/object.po +++ b/c-api/object.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-09-23 16:16+0200\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" @@ -35,7 +35,7 @@ msgid "" 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)." +"référence de ``NotImplemented`` et le renvoie)." #: c-api/object.rst:24 msgid "" @@ -118,7 +118,7 @@ msgstr "" "attributs d'instance, contrairement aux autres descripteurs. Sinon, une :exc:" "`AttributeError` est levée." -#: c-api/object.rst:90 +#: c-api/object.rst:91 msgid "" "Set the value of the attribute named *attr_name*, for object *o*, to the " "value *v*. Raise an exception and return ``-1`` on failure; return ``0`` on " @@ -132,22 +132,23 @@ msgstr "" #: c-api/object.rst:84 #, fuzzy msgid "" -"If *v* is ``NULL``, the attribute is deleted, however this feature is " -"deprecated in favour of using :c:func:`PyObject_DelAttr`." +"If *v* is ``NULL``, the attribute is deleted. This behaviour is deprecated " +"in favour of using :c:func:`PyObject_DelAttr`, but there are currently no " +"plans to remove it." msgstr "" "Si *v* est *NULL*, l'attribut est supprimé. Cette fonctionnalité est " "obsolète,nous vous conseillons d'utiliser :c:func:`PyObject_DelAttr`." -#: c-api/object.rst:95 +#: c-api/object.rst:96 #, fuzzy msgid "" -"If *v* is ``NULL``, the attribute is deleted, however this feature is " -"deprecated in favour of using :c:func:`PyObject_DelAttrString`." +"If *v* is ``NULL``, the attribute is deleted, but this feature is deprecated " +"in favour of using :c:func:`PyObject_DelAttrString`." msgstr "" "Si *v* est *NULL*, l'attribut est supprimé. Cette fonctionnalité est " "obsolète, nous vous conseillons d'utiliser :c:func:`PyObject_DelAttr`." -#: c-api/object.rst:101 +#: c-api/object.rst:102 msgid "" "Generic attribute setter and deleter function that is meant to be put into a " "type object's :c:member:`~PyTypeObject.tp_setattro` slot. It looks for a " @@ -167,7 +168,7 @@ msgstr "" "attr:`~object.__dict__` de l'objet (si présent). En cas de succès, ``0`` est " "renvoyé, sinon une :exc:`AttributeError` est levée et ``-1`` est renvoyé." -#: c-api/object.rst:119 +#: c-api/object.rst:120 msgid "" "Delete attribute named *attr_name*, for object *o*. Returns ``-1`` on " "failure. This is the equivalent of the Python statement ``del o.attr_name``." @@ -176,7 +177,7 @@ msgstr "" "cas d'échec. Ceci est l'équivalent de l'expression Python ``del o." "attr_name``." -#: c-api/object.rst:125 +#: c-api/object.rst:126 msgid "" "A generic implementation for the getter of a ``__dict__`` descriptor. It " "creates the dictionary if necessary." @@ -184,7 +185,7 @@ msgstr "" "Une implémentation générique de l'accesseur d'un descripteur d'un " "``__dict__``. Crée le dictionnaire si nécessaire." -#: c-api/object.rst:133 +#: c-api/object.rst:134 msgid "" "A generic implementation for the setter of a ``__dict__`` descriptor. This " "implementation does not allow the dictionary to be deleted." @@ -192,7 +193,7 @@ msgstr "" "Une implémentation générique du mutateur d'un descripteur de ``__dict__``. " "Cette implémentation n'autorise pas la suppression du dictionnaire." -#: c-api/object.rst:141 +#: c-api/object.rst:142 #, fuzzy msgid "" "Compare the values of *o1* and *o2* using the operation specified by *opid*, " @@ -211,7 +212,7 @@ msgstr "" "*opid*. Renvoie la valeur de la comparaison en cas de succès, ou *NULL* en " "cas d'échec." -#: c-api/object.rst:151 +#: c-api/object.rst:152 msgid "" "Compare the values of *o1* and *o2* using the operation specified by *opid*, " "which must be one of :const:`Py_LT`, :const:`Py_LE`, :const:`Py_EQ`, :const:" @@ -229,7 +230,7 @@ msgstr "" "l'équivalent de l'expression Python ``o1 op o2``, où ``op`` est l'opérateur " "correspondant à *opid*." -#: c-api/object.rst:160 +#: c-api/object.rst:161 msgid "" "If *o1* and *o2* are the same object, :c:func:`PyObject_RichCompareBool` " "will always return ``1`` for :const:`Py_EQ` and ``0`` for :const:`Py_NE`." @@ -237,7 +238,21 @@ msgstr "" "Si *o1* et *o2* sont le même objet, :c:func:`PyObject_RichCompareBool` " "renvoie toujours ``1`` pour :const:`Py_EQ` et ``0`` pour :const:`Py_NE`." -#: c-api/object.rst:167 +#: c-api/object.rst: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 " @@ -250,7 +265,7 @@ msgstr "" "d'échec. Ceci est l'équivalent de l'expression Python ``repr(o)``. Appelé " "par la fonction native :func:`repr`." -#: c-api/object.rst:195 +#: c-api/object.rst:205 msgid "" "This function now includes a debug assertion to help ensure that it does not " "silently discard an active exception." @@ -258,7 +273,7 @@ msgstr "" "Cette fonction inclut maintenant une assertion de débogage afin d'assurer " "qu'elle ne passe pas sous silence une exception active." -#: c-api/object.rst:179 +#: c-api/object.rst: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:" @@ -268,12 +283,12 @@ msgid "" msgstr "" "Comme :c:Func:`PyObject_Repr`, calcule une représentation en chaîne de " "caractères de l'objet *o*, mais échappe les caractères non ASCII dans la " -"chaîne de caractères renvoyée par :c:Func:`PyObject_Repr` avec' ``\\x``, ``" -"\\u`` ou ``\\U``. Cela génère une chaîne de caractères similaire à celle " +"chaîne de caractères renvoyée par :c:Func:`PyObject_Repr` avec' ``\\x``, " +"``\\u`` ou ``\\U``. Cela génère une chaîne de caractères similaire à celle " "renvoyée par :c:func:`PyObject_Repr` en Python 2. Appelée par la fonction " "native :func:`ascii`." -#: c-api/object.rst:190 +#: c-api/object.rst:200 #, fuzzy msgid "" "Compute a string representation of object *o*. Returns the string " @@ -287,7 +302,7 @@ msgstr "" "par la fonction native :func:`str`, et, par conséquent, par la fonction :" "func:`print`." -#: c-api/object.rst:204 +#: c-api/object.rst:214 #, fuzzy msgid "" "Compute a bytes representation of object *o*. ``NULL`` is returned on " @@ -302,7 +317,7 @@ msgstr "" "entier. Contrairement à ``bytes(o)``, une exception *TypeError* est levée " "lorsque *o* est un entier au lieu d'un objet octet initialisé avec des zéros." -#: c-api/object.rst:213 +#: c-api/object.rst: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``." @@ -310,7 +325,7 @@ msgstr "" "Renvoie ``1`` si la classe *derived* est identique à ou dérivée de la classe " "*cls*, renvoie ``0`` sinon. En cas d'erreur, renvoie ``-1``." -#: c-api/object.rst:235 +#: c-api/object.rst: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``, " @@ -320,7 +335,7 @@ msgstr "" "*cls*. Le résultat sera ``1`` quand au moins une des vérifications renvoie " "``1``, sinon ce sera ``0``." -#: c-api/object.rst:220 +#: c-api/object.rst: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, " @@ -332,7 +347,7 @@ msgstr "" "Sinon, *derived* est une sous-classe de *cls* si c'est une sous-classe " "directe ou indirecte, c'est-à-dire contenue dans ``cls.__mro__``." -#: c-api/object.rst:225 +#: c-api/object.rst: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 " @@ -343,7 +358,7 @@ msgstr "" "les objets peuvent surcharger cela en ayant un attribut :attr:`__bases__` " "(qui doit être un *n*-uplet de classes de bases)." -#: c-api/object.rst:232 +#: c-api/object.rst: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." @@ -352,7 +367,7 @@ msgstr "" "classe de *cls*, ou ``0`` sinon. En cas d'erreur, renvoie ``-1`` et " "initialise une exception." -#: c-api/object.rst:239 +#: c-api/object.rst: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, " @@ -363,7 +378,7 @@ msgstr "" "Sinon, *inst* est une instance *cls* si sa classe est une sous-classe de " "*cls*." -#: c-api/object.rst:243 +#: c-api/object.rst:253 msgid "" "An instance *inst* can override what is considered its class by having a :" "attr:`__class__` attribute." @@ -371,7 +386,7 @@ msgstr "" "Une instance *inst* peut surcharger ce qui est considéré comme sa classe en " "ayant un attribut :attr:`__class__`." -#: c-api/object.rst:246 +#: c-api/object.rst: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 " @@ -381,58 +396,58 @@ msgstr "" "que ses classes de bases sont, en ayant un attribut :attr:`__bases__` (qui " "doit être un *n*-uplet des classes de base)." -#: c-api/object.rst:255 +#: c-api/object.rst: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:258 +#: c-api/object.rst:268 msgid "" -"The return type is now Py_hash_t. This is a signed integer the same size as " -"Py_ssize_t." +"The return type is now Py_hash_t. This is a signed integer the same size " +"as :c:type:`Py_ssize_t`." msgstr "" -#: c-api/object.rst:265 +#: c-api/object.rst:275 msgid "" -"Set a :exc:`TypeError` indicating that ``type(o)`` is not hashable and " -"return ``-1``. This function receives special treatment when stored in a " +"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:273 +#: 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:280 +#: 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:289 +#: 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 common expression ``o-" -">ob_type``, which returns a pointer of type :c:type:`PyTypeObject*`, except " -"when the incremented reference count is needed." +"no reason to use this function instead of the :c:func:`Py_TYPE()` function, " +"which returns a pointer of type :c:expr:`PyTypeObject*`, except when the " +"incremented reference count is needed." msgstr "" -#: c-api/object.rst:300 +#: 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:309 +#: 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, " @@ -440,7 +455,7 @@ msgid "" "``len(o)``." msgstr "" -#: c-api/object.rst:316 +#: 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 " @@ -449,7 +464,7 @@ msgid "" "defaultvalue)``." msgstr "" -#: c-api/object.rst:326 +#: c-api/object.rst:336 #, fuzzy msgid "" "Return element of *o* corresponding to the object *key* or ``NULL`` on " @@ -459,7 +474,7 @@ msgstr "" "l'attribut en cas de succès, ou *NULL* en cas d'échec. Ceci est équivalent à " "l'expression Python ``o.attr_name``." -#: c-api/object.rst:332 +#: c-api/object.rst:342 #, fuzzy msgid "" "Map the object *key* to the value *v*. Raise an exception and return ``-1`` " @@ -471,7 +486,7 @@ msgstr "" "``0`` en cas de succès. Ceci est équivalent à l'instruction Python ``o." "attr_name = v``." -#: c-api/object.rst:340 +#: c-api/object.rst:350 #, fuzzy msgid "" "Remove the mapping for the object *key* from the object *o*. Return ``-1`` " @@ -481,7 +496,7 @@ msgstr "" "Renvoie ``-1`` en cas d'échec. C'est l'équivalent de la commande Python " "``del o[key]``." -#: c-api/object.rst:346 +#: c-api/object.rst:356 msgid "" "This is equivalent to the Python expression ``dir(o)``, returning a " "(possibly empty) list of strings appropriate for the object argument, or " @@ -491,7 +506,7 @@ msgid "" "`PyErr_Occurred` will return false." msgstr "" -#: c-api/object.rst:355 +#: 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 " @@ -499,7 +514,7 @@ msgid "" "object cannot be iterated." msgstr "" -#: c-api/object.rst:363 +#: 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. " @@ -556,10 +571,6 @@ msgstr "" #~ "par le *n*-uplet *args*. Si aucun argument n'est nécessaire, alors *args* " #~ "peut être égal à *NULL*." -#~ msgid "" -#~ "This is the equivalent of the Python expression: ``callable(*args)``." -#~ msgstr "Ceci est l'équivalent de l'expression Python : ``callable(*args)``." - #, fuzzy #~ msgid "" #~ "Call a callable Python object *callable*, with a variable number of C " diff --git a/c-api/refcounting.po b/c-api/refcounting.po index bc47906495..cafe207847 100644 --- a/c-api/refcounting.po +++ b/c-api/refcounting.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-09-23 16:16+0200\n" +"POT-Creation-Date: 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" @@ -23,10 +23,12 @@ 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 "" +msgstr "Incrémente le compteur de références de l'objet *o*." #: c-api/refcounting.rst:18 msgid "" @@ -34,82 +36,102 @@ msgid "" "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 "" +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 "" +msgstr "Par exemple ::" #: c-api/refcounting.rst:50 msgid "can be written as::" -msgstr "" +msgstr "peut s'écrire ::" #: c-api/refcounting.rst:54 msgid "See also :c:func:`Py_INCREF`." -msgstr "" +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 "" +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 "" +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 "" +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 "" @@ -123,6 +145,15 @@ msgid "" "update the list data structure, and then call :c:func:`Py_DECREF` for the " "temporary variable." msgstr "" +"La fonction de dés-allocation peut invoquer du code Python arbitraire (par " +"exemple quand une instance d'une classe avec une méthode :meth:`__del__` est " +"supprimée). Le code exécuté a accès à toutes les variables Python globales " +"mais les exceptions lors de l'exécution de ce code ne sont pas propagées. " +"Tous les objets qui peuvent être atteints à partir d'une variable globale " +"doivent être dans un état cohérent avant d'appeler :c:func:`Py_DECREF`. Par " +"exemple le code pour supprimer un élément d'une liste doit copier une " +"référence à l'objet dans une variable temporaire, mettre à jour la liste, et " +"enfin appeler :c:func:`Py_DECREF` avec la variable temporaire." #: c-api/refcounting.rst:95 msgid "" @@ -130,6 +161,10 @@ msgid "" "in which case the macro has no effect; otherwise the effect is the same as " "for :c:func:`Py_DECREF`, and the same warning applies." msgstr "" +"Décrémente le compteur de références de l'objet *o*. L'objet peut être " +"``NULL``, dans ce cas la macro n'a pas d'effet. Dans le cas contraire le " +"comportement est identique à :c:func:`Py_DECREF` et les mêmes avertissements " +"sont de rigueur." #: c-api/refcounting.rst:102 msgid "" @@ -140,24 +175,46 @@ msgid "" "object passed because the macro carefully uses a temporary variable and sets " "the argument to ``NULL`` before decrementing its reference count." msgstr "" +"Décrémente le compteur de références de l'objet *o*. L'objet peut être " +"``NULL``, dans ce cas la macro n'a pas d'effet. Dans le cas contraire le " +"comportement est identique à :c:func:`Py_DECREF`, puis l'argument est mis à " +"``NULL``. L'avertissement au sujet de l'objet passé en argument à :c:func:" +"`Py_DECREF` ne s'applique pas car la macro utilise une variable temporaire " +"et met l'objet à ``NULL`` avant de décrémenter le compteur de références." #: c-api/refcounting.rst: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:113 +#: c-api/refcounting.rst:120 msgid "" -"The following functions are for runtime dynamic embedding of Python: " -"``Py_IncRef(PyObject *o)``, ``Py_DecRef(PyObject *o)``. They are simply " -"exported function versions of :c:func:`Py_XINCREF` and :c:func:`Py_XDECREF`, " -"respectively." +"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:118 +#: 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 index 5865046002..d04aea96ae 100644 --- a/c-api/reflection.po +++ b/c-api/reflection.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-09-23 16:16+0200\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" @@ -60,12 +60,14 @@ msgstr "" #: c-api/reflection.rst:36 msgid "Get the *frame* next outer frame." -msgstr "" +msgstr "Renvoie la *frame* encadrant immédiatement à *frame*." #: c-api/reflection.rst:38 msgid "" "Return a :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``." @@ -73,11 +75,11 @@ msgstr "" #: c-api/reflection.rst:47 msgid "Get the *frame* code." -msgstr "" +msgstr "Obtenir le code *frame*." #: c-api/reflection.rst:49 msgid "Return a :term:`strong reference`." -msgstr "" +msgstr "Renvoie un :term:`strong reference`." #: c-api/reflection.rst:51 msgid "" @@ -105,6 +107,6 @@ msgid "" msgstr "" "Renvoie une description en chaîne de caractères, en fonction du type de " "*func*. Les valeurs renvoyées peuvent être ``\"()\"`` pour les fonction et " -"les méthodes, ``\\\" constructor\\\"``, ``\\\" instance\\\"``, ``\\\" object" -"\\\"``. Concaténé avec le résultat de :c:func:`PyEval_GetFuncName`, le " +"les méthodes, ``\\\" constructor\\\"``, ``\\\" instance\\\"``, ``\\\" " +"object\\\"``. Concaténé avec le résultat de :c:func:`PyEval_GetFuncName`, le " "résultat sera une description de *func*" diff --git a/c-api/sequence.po b/c-api/sequence.po index 15b5b657ac..ffe90e73c4 100644 --- a/c-api/sequence.po +++ b/c-api/sequence.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" +"POT-Creation-Date: 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" @@ -20,11 +20,11 @@ msgstr "" #: c-api/sequence.rst:11 msgid "" -"Return ``1`` if the object provides sequence protocol, and ``0`` otherwise. " -"Note that it returns ``1`` for Python classes with a :meth:`__getitem__` " -"method unless they are :class:`dict` subclasses since in general case it is " -"impossible to determine what the type of keys it supports. This function " -"always succeeds." +"Return ``1`` if the object provides the sequence protocol, and ``0`` " +"otherwise. Note that it returns ``1`` for Python classes with a :meth:" +"`__getitem__` method, unless they are :class:`dict` subclasses, since in " +"general it is impossible to determine what type of keys the class supports. " +"This function always succeeds." msgstr "" #: c-api/sequence.rst:23 @@ -85,8 +85,8 @@ msgstr "" #: c-api/sequence.rst:72 msgid "" -"If *v* is ``NULL``, the element is deleted, however this feature is " -"deprecated in favour of using :c:func:`PySequence_DelItem`." +"If *v* is ``NULL``, the element is deleted, but this feature is deprecated " +"in favour of using :c:func:`PySequence_DelItem`." msgstr "" #: c-api/sequence.rst:78 @@ -166,8 +166,8 @@ msgstr "" #: c-api/sequence.rst:148 msgid "" "Returns the length of *o*, assuming that *o* was returned by :c:func:" -"`PySequence_Fast` and that *o* is not ``NULL``. The size can also be gotten " -"by calling :c:func:`PySequence_Size` on *o*, but :c:func:" +"`PySequence_Fast` and that *o* is not ``NULL``. The size can also be " +"retrieved by calling :c:func:`PySequence_Size` on *o*, but :c:func:" "`PySequence_Fast_GET_SIZE` is faster because it can assume *o* is a list or " "tuple." msgstr "" diff --git a/c-api/set.po b/c-api/set.po index 8fdc3857d8..d970a92949 100644 --- a/c-api/set.po +++ b/c-api/set.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-09-23 16:16+0200\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" @@ -21,14 +21,14 @@ msgstr "" #: c-api/set.rst:15 msgid "" "This section details the public API for :class:`set` and :class:`frozenset` " -"objects. Any functionality not listed below is best accessed using the " -"either the abstract object protocol (including :c:func:" -"`PyObject_CallMethod`, :c:func:`PyObject_RichCompareBool`, :c:func:" -"`PyObject_Hash`, :c:func:`PyObject_Repr`, :c:func:`PyObject_IsTrue`, :c:func:" -"`PyObject_Print`, and :c:func:`PyObject_GetIter`) or the abstract number " -"protocol (including :c:func:`PyNumber_And`, :c:func:`PyNumber_Subtract`, :c:" -"func:`PyNumber_Or`, :c:func:`PyNumber_Xor`, :c:func:`PyNumber_InPlaceAnd`, :" -"c:func:`PyNumber_InPlaceSubtract`, :c:func:`PyNumber_InPlaceOr`, and :c:func:" +"objects. Any functionality not listed below is best accessed using either " +"the abstract object protocol (including :c:func:`PyObject_CallMethod`, :c:" +"func:`PyObject_RichCompareBool`, :c:func:`PyObject_Hash`, :c:func:" +"`PyObject_Repr`, :c:func:`PyObject_IsTrue`, :c:func:`PyObject_Print`, and :c:" +"func:`PyObject_GetIter`) or the abstract number protocol (including :c:func:" +"`PyNumber_And`, :c:func:`PyNumber_Subtract`, :c:func:`PyNumber_Or`, :c:func:" +"`PyNumber_Xor`, :c:func:`PyNumber_InPlaceAnd`, :c:func:" +"`PyNumber_InPlaceSubtract`, :c:func:`PyNumber_InPlaceOr`, and :c:func:" "`PyNumber_InPlaceXor`)." msgstr "" @@ -39,9 +39,9 @@ msgid "" "`PyDictObject` in that it is a fixed size for small sets (much like tuple " "storage) and will point to a separate, variable sized block of memory for " "medium and large sized sets (much like list storage). None of the fields of " -"this structure should be considered public and are subject to change. All " -"access should be done through the documented API rather than by manipulating " -"the values in the structure." +"this structure should be considered public and all are subject to change. " +"All access should be done through the documented API rather than by " +"manipulating the values in the structure." msgstr "" #: c-api/set.rst:40 @@ -151,7 +151,7 @@ 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 " +"instances (like :c:func:`PyTuple_SetItem` it can be used to fill in the " "values of brand new frozensets before they are exposed to other code). " "Return ``0`` on success or ``-1`` on failure. Raise a :exc:`TypeError` if " "the *key* is unhashable. Raise a :exc:`MemoryError` if there is no room to " diff --git a/c-api/stable.po b/c-api/stable.po index 0e0c260777..e1f58647f1 100644 --- a/c-api/stable.po +++ b/c-api/stable.po @@ -16,10 +16,9 @@ msgstr "" #: c-api/stable.rst:7 msgid "C API Stability" -msgstr "" +msgstr "Stabilité de l’API C" #: c-api/stable.rst:9 -#, fuzzy 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 " @@ -27,10 +26,12 @@ msgid "" "API. Changing existing API or removing API is only done after a deprecation " "period or to fix serious issues." msgstr "" -"L'API C de Python change à chaque version. La majorité de ces changement " -"n'affecte cependant pas la compatibilité du code source. Typiquement, des " -"API sont ajoutées, mais ni modifiées ni supprimées (bien que certaines " -"interfaces puissent être supprimées, après avoir d'abord été dépréciées)." +"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 "" @@ -40,12 +41,20 @@ msgid "" "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" @@ -58,6 +67,11 @@ msgid "" "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 "" @@ -66,6 +80,11 @@ msgid "" "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 "" @@ -73,12 +92,17 @@ msgid "" "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 "" @@ -88,6 +112,11 @@ msgid "" "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 "" @@ -95,12 +124,19 @@ msgid "" "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 "" @@ -108,6 +144,9 @@ msgid "" "``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 "" @@ -117,6 +156,12 @@ msgid "" "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 "" @@ -124,16 +169,23 @@ msgid "" "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 "" +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 "" @@ -141,6 +193,10 @@ msgid "" "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 "" @@ -149,6 +205,11 @@ msgid "" "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 "" @@ -159,10 +220,17 @@ msgid "" "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 "" +msgstr "Inconvénients de l’API restreinte" #: c-api/stable.rst:103 msgid "" @@ -171,6 +239,10 @@ msgid "" "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 "" @@ -181,18 +253,31 @@ msgid "" "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 "" @@ -201,6 +286,11 @@ msgid "" "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 "" @@ -210,10 +300,15 @@ msgid "" "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 "" +msgstr "Considérations relatives aux plateformes" #: c-api/stable.rst:138 msgid "" @@ -222,6 +317,11 @@ msgid "" "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 "" @@ -230,14 +330,19 @@ msgid "" "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 "" +msgstr "Contenu de l’API restreinte" #: c-api/stable.rst:156 msgid "Currently, the Limited API includes the following items:" -msgstr "" +msgstr "Pour le moment l’API restreinte inclut les éléments suivants :" #~ msgid "" #~ "Unfortunately, the API compatibility does not extend to binary " diff --git a/c-api/structures.po b/c-api/structures.po index e367819a4d..c086cb1092 100644 --- a/c-api/structures.po +++ b/c-api/structures.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-09-23 16:16+0200\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" @@ -45,7 +45,7 @@ msgid "" "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:type:`PyObject*`. Access to the members must be done by using the " +"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 "" @@ -111,7 +111,7 @@ msgid "Return a :term:`borrowed reference`." msgstr "" #: c-api/structures.rst:102 -msgid "The :c:func:`Py_SET_TYPE` function must be used to set an object type." +msgid "Use the :c:func:`Py_SET_TYPE` function to set an object type." msgstr "" #: c-api/structures.rst:107 @@ -143,7 +143,7 @@ msgid "Get the size of the Python object *o*." msgstr "" #: c-api/structures.rst:140 -msgid "The :c:func:`Py_SET_SIZE` function must be used to set an object size." +msgid "Use the :c:func:`Py_SET_SIZE` function to set an object size." msgstr "" #: c-api/structures.rst:145 @@ -170,7 +170,7 @@ 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:type:`PyObject*` parameters and return " +"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 " @@ -212,95 +212,54 @@ msgid "" "has four fields:" msgstr "" -#: c-api/structures.rst:397 c-api/structures.rst:493 -msgid "Field" -msgstr "Champ" - -#: c-api/structures.rst:397 c-api/structures.rst:493 -msgid "C Type" -msgstr "Type C" - -#: c-api/structures.rst:397 c-api/structures.rst:493 -msgid "Meaning" -msgstr "Signification" - -#: c-api/structures.rst:241 -msgid ":attr:`ml_name`" -msgstr "" - -#: c-api/structures.rst:249 c-api/structures.rst:412 c-api/structures.rst:495 -#: c-api/structures.rst:503 -msgid "const char \\*" -msgstr "" - -#: c-api/structures.rst:241 +#: c-api/structures.rst:240 msgid "name of the method" msgstr "" -#: c-api/structures.rst:243 -msgid ":attr:`ml_meth`" -msgstr "" - -#: c-api/structures.rst:243 -msgid "PyCFunction" -msgstr "PyCFunction" - -#: c-api/structures.rst:243 +#: c-api/structures.rst:244 msgid "pointer to the C implementation" msgstr "" -#: c-api/structures.rst:246 -msgid ":attr:`ml_flags`" +#: c-api/structures.rst:248 +msgid "flags bits indicating how the call should be constructed" msgstr "" -#: c-api/structures.rst:401 c-api/structures.rst:424 -msgid "int" -msgstr "*int*" - -#: c-api/structures.rst:246 -msgid "flag bits indicating how the call should be constructed" -msgstr "" - -#: c-api/structures.rst:249 -msgid ":attr:`ml_doc`" -msgstr "" - -#: c-api/structures.rst:412 +#: c-api/structures.rst:411 msgid "points to the contents of the docstring" msgstr "" -#: c-api/structures.rst:253 +#: c-api/structures.rst:254 msgid "" -"The :attr:`ml_meth` is a C function pointer. The functions may be of " -"different types, but they always return :c:type:`PyObject*`. If the " +"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:type:`PyObject*`, it is common that the method " +"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:260 +#: c-api/structures.rst:261 msgid "" -"The :attr:`ml_flags` field is a bitfield which can include the following " +"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:264 +#: c-api/structures.rst:265 msgid "There are these calling conventions:" msgstr "" -#: c-api/structures.rst:268 +#: 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:type:`PyObject*` values. The " +"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:278 +#: 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 " @@ -309,50 +268,46 @@ msgid "" "using :c:func:`PyArg_ParseTupleAndKeywords`." msgstr "" -#: c-api/structures.rst:287 +#: 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:type:`PyObject*` values indicating 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:297 +#: c-api/structures.rst:298 msgid "``METH_FASTCALL`` is now part of the stable ABI." msgstr "" -#: c-api/structures.rst:302 +#: 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:type:`PyObject*` parameter which is a tuple " +"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:312 -msgid "This is not part of the :ref:`limited API `." -msgstr "" - -#: c-api/structures.rst:319 +#: 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:323 +#: 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:332 +#: 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 " @@ -361,16 +316,16 @@ msgid "" "the second parameter will be ``NULL``." msgstr "" -#: c-api/structures.rst:341 +#: 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:type:`PyObject*` parameter representing the single " +"parameter, and a :c:expr:`PyObject*` parameter representing the single " "argument." msgstr "" -#: c-api/structures.rst:347 +#: 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 " @@ -378,27 +333,27 @@ msgid "" "any given method." msgstr "" -#: c-api/structures.rst:357 +#: 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:367 +#: 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:371 +#: 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:377 +#: 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 " @@ -411,193 +366,213 @@ msgid "" "calls." msgstr "" -#: c-api/structures.rst:389 +#: c-api/structures.rst:388 msgid "Accessing attributes of extension types" msgstr "" -#: c-api/structures.rst:393 +#: 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:399 +#: 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:399 +#: c-api/structures.rst:398 msgid "name of the member" msgstr "" -#: c-api/structures.rst:401 +#: c-api/structures.rst:400 msgid ":attr:`!type`" -msgstr "" +msgstr ":attr:`!type`" + +#: c-api/structures.rst:407 c-api/structures.rst:423 +msgid "int" +msgstr "*int*" -#: c-api/structures.rst:401 +#: c-api/structures.rst:400 msgid "the type of the member in the C struct" msgstr "" -#: c-api/structures.rst:404 +#: c-api/structures.rst:403 msgid ":attr:`offset`" -msgstr "" +msgstr ":attr:`offset`" -#: c-api/structures.rst:440 +#: c-api/structures.rst:439 msgid "Py_ssize_t" msgstr "" -#: c-api/structures.rst:404 +#: 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:408 +#: c-api/structures.rst:407 msgid ":attr:`flags`" -msgstr "" +msgstr ":attr:`flags`" -#: c-api/structures.rst:408 +#: c-api/structures.rst:407 msgid "flag bits indicating if the field should be read-only or writable" msgstr "" -#: c-api/structures.rst:412 +#: c-api/structures.rst:411 msgid ":attr:`doc`" -msgstr "" +msgstr ":attr:`doc`" -#: c-api/structures.rst:416 +#: 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:421 +#: c-api/structures.rst:420 msgid "Macro name" msgstr "" -#: c-api/structures.rst:421 +#: c-api/structures.rst:420 msgid "C type" msgstr "Type C" -#: c-api/structures.rst:423 +#: c-api/structures.rst:422 msgid "T_SHORT" msgstr "" -#: c-api/structures.rst:423 +#: c-api/structures.rst:422 msgid "short" msgstr "" -#: c-api/structures.rst:424 +#: c-api/structures.rst:423 msgid "T_INT" msgstr "" -#: c-api/structures.rst:425 +#: c-api/structures.rst:424 msgid "T_LONG" msgstr "" -#: c-api/structures.rst:425 +#: c-api/structures.rst:424 msgid "long" msgstr "" -#: c-api/structures.rst:426 +#: c-api/structures.rst:425 msgid "T_FLOAT" msgstr "" -#: c-api/structures.rst:426 +#: c-api/structures.rst:425 msgid "float" msgstr "*float*" -#: c-api/structures.rst:427 +#: c-api/structures.rst:426 msgid "T_DOUBLE" msgstr "" -#: c-api/structures.rst:427 +#: c-api/structures.rst:426 msgid "double" msgstr "double" -#: c-api/structures.rst:428 +#: c-api/structures.rst:427 msgid "T_STRING" msgstr "" -#: c-api/structures.rst:429 +#: c-api/structures.rst:428 msgid "T_OBJECT" msgstr "" -#: c-api/structures.rst:430 +#: c-api/structures.rst:429 msgid "PyObject \\*" msgstr "PyObject \\*" -#: c-api/structures.rst:430 +#: c-api/structures.rst:429 msgid "T_OBJECT_EX" msgstr "" -#: c-api/structures.rst:431 +#: c-api/structures.rst:430 msgid "T_CHAR" msgstr "" -#: c-api/structures.rst:432 c-api/structures.rst:437 +#: c-api/structures.rst:431 c-api/structures.rst:436 msgid "char" msgstr "char" -#: c-api/structures.rst:432 +#: c-api/structures.rst:431 msgid "T_BYTE" msgstr "" -#: c-api/structures.rst:433 +#: c-api/structures.rst:432 msgid "T_UBYTE" msgstr "" -#: c-api/structures.rst:433 +#: c-api/structures.rst:432 msgid "unsigned char" msgstr "``unsigned char``" -#: c-api/structures.rst:434 +#: c-api/structures.rst:433 msgid "T_UINT" msgstr "" -#: c-api/structures.rst:434 +#: c-api/structures.rst:433 msgid "unsigned int" msgstr "``unsigned int``" -#: c-api/structures.rst:435 +#: c-api/structures.rst:434 msgid "T_USHORT" msgstr "" -#: c-api/structures.rst:435 +#: c-api/structures.rst:434 msgid "unsigned short" msgstr "``unsigned short``" -#: c-api/structures.rst:436 +#: c-api/structures.rst:435 msgid "T_ULONG" msgstr "" -#: c-api/structures.rst:436 +#: c-api/structures.rst:435 msgid "unsigned long" msgstr "``unsigned long``" -#: c-api/structures.rst:437 +#: c-api/structures.rst:436 msgid "T_BOOL" msgstr "" -#: c-api/structures.rst:438 +#: c-api/structures.rst:437 msgid "T_LONGLONG" msgstr "" -#: c-api/structures.rst:438 +#: c-api/structures.rst:437 msgid "long long" msgstr "" -#: c-api/structures.rst:439 +#: c-api/structures.rst:438 msgid "T_ULONGLONG" msgstr "" -#: c-api/structures.rst:439 +#: c-api/structures.rst:438 msgid "unsigned long long" msgstr "``unsigned long long``" -#: c-api/structures.rst:440 +#: c-api/structures.rst:439 msgid "T_PYSSIZET" msgstr "" -#: c-api/structures.rst:443 +#: 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:" @@ -607,7 +582,7 @@ msgid "" "than :c:macro:`T_OBJECT`." msgstr "" -#: c-api/structures.rst:450 +#: 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:" @@ -616,7 +591,7 @@ msgid "" "are set to ``NULL``)." msgstr "" -#: c-api/structures.rst:458 +#: 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 " @@ -627,100 +602,115 @@ msgid "" "``T_PYSSIZET`` and ``READONLY``, for example::" msgstr "" -#: c-api/structures.rst:475 +#: 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:482 +#: 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:489 +#: 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:495 +#: c-api/structures.rst:494 msgid "name" -msgstr "" +msgstr "nom" -#: c-api/structures.rst:495 +#: c-api/structures.rst:494 msgid "attribute name" msgstr "" -#: c-api/structures.rst:497 +#: c-api/structures.rst:496 msgid "get" msgstr "" -#: c-api/structures.rst:497 +#: c-api/structures.rst:496 msgid "getter" msgstr "" -#: c-api/structures.rst:497 -msgid "C Function to get the attribute" +#: c-api/structures.rst:496 +msgid "C function to get the attribute" msgstr "" -#: c-api/structures.rst:499 +#: c-api/structures.rst:498 msgid "set" msgstr "" -#: c-api/structures.rst:499 +#: c-api/structures.rst:498 msgid "setter" msgstr "" -#: c-api/structures.rst:499 +#: 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:503 +#: c-api/structures.rst:502 msgid "doc" msgstr "" -#: c-api/structures.rst:503 +#: c-api/structures.rst:502 msgid "optional docstring" msgstr "" -#: c-api/structures.rst:505 +#: c-api/structures.rst:504 msgid "closure" msgstr "" -#: c-api/structures.rst:505 +#: c-api/structures.rst:504 msgid "void \\*" msgstr "" -#: c-api/structures.rst:505 +#: c-api/structures.rst:504 msgid "" "optional function pointer, providing additional data for getter and setter" msgstr "" -#: c-api/structures.rst:510 +#: c-api/structures.rst:509 msgid "" -"The ``get`` function takes one :c:type:`PyObject*` parameter (the instance) " +"The ``get`` function takes one :c:expr:`PyObject*` parameter (the instance) " "and a function pointer (the associated ``closure``)::" msgstr "" -#: c-api/structures.rst:515 +#: 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:518 +#: c-api/structures.rst:517 msgid "" -"``set`` functions take two :c:type:`PyObject*` parameters (the instance and " +"``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:523 +#: 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 index 35d52c6c27..beba8891ff 100644 --- a/c-api/sys.po +++ b/c-api/sys.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-09-23 16:16+0200\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" @@ -118,7 +118,7 @@ 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:" -"type:`void (\\*)(int)`." +"expr:`void (\\*)(int)`." msgstr "" #: c-api/sys.rst:114 @@ -126,7 +126,7 @@ 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:type:`void (\\*)(int)`." +"`PyOS_sighandler_t` is a typedef alias for :c:expr:`void (\\*)(int)`." msgstr "" #: c-api/sys.rst:122 @@ -147,8 +147,8 @@ msgstr "" 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 " +"`, 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 "" @@ -197,7 +197,7 @@ msgid "" "`." msgstr "" -#: c-api/sys.rst:208 +#: c-api/sys.rst:166 msgid "" "The function now uses the UTF-8 encoding on Windows if :c:data:" "`Py_LegacyWindowsFSEncodingFlag` is zero;" @@ -215,7 +215,7 @@ msgstr "" msgid "" "Return a pointer to a newly allocated byte string, use :c:func:`PyMem_Free` " "to free the memory. Return ``NULL`` on encoding error or memory allocation " -"error" +"error." msgstr "" #: c-api/sys.rst:182 @@ -236,6 +236,12 @@ msgid "" "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 "" @@ -367,8 +373,8 @@ msgstr "" #: c-api/sys.rst:325 msgid "" -"Note that ``#`` format characters should always be treated as " -"``Py_ssize_t``, regardless of whether ``PY_SSIZE_T_CLEAN`` was defined." +"Note that ``#`` format characters should always be treated as :c:type:" +"`Py_ssize_t`, regardless of whether ``PY_SSIZE_T_CLEAN`` was defined." msgstr "" #: c-api/sys.rst:328 @@ -377,14 +383,14 @@ msgstr "" #: c-api/sys.rst:334 msgid "" -"Require ``Py_ssize_t`` for ``#`` format characters. Previously, an " +"Require :c:type:`Py_ssize_t` for ``#`` format characters. Previously, an " "unavoidable deprecation warning was raised." msgstr "" #: c-api/sys.rst:340 msgid "" "Append the callable *hook* to the list of active auditing hooks. Return zero " -"for success and non-zero on failure. If the runtime has been initialized, " +"on success and non-zero on failure. If the runtime has been initialized, " "also set an error on failure. Hooks added through this API are called for " "all interpreters created by the runtime." msgstr "" @@ -406,7 +412,7 @@ msgstr "" #: c-api/sys.rst:355 msgid "" -"The hook function is of type :c:type:`int (*)(const char *event, PyObject " +"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." diff --git a/c-api/tuple.po b/c-api/tuple.po index 59c89730a2..3be93d4b2c 100644 --- a/c-api/tuple.po +++ b/c-api/tuple.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-09-23 16:16+0200\n" +"POT-Creation-Date: 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" @@ -218,7 +218,7 @@ 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:type:`PyObject*`. The index in the :attr:" +"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 "" diff --git a/c-api/type.po b/c-api/type.po index d19afb6194..d741ef3dc0 100644 --- a/c-api/type.po +++ b/c-api/type.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-09-23 16:16+0200\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" @@ -49,7 +49,7 @@ 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 " +"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 "" @@ -356,7 +356,7 @@ msgid "" msgstr "" #: c-api/type.rst:275 -msgid "Slots in :c:type:`PyBufferProcs` in may be set in the unlimited API." +msgid "Slots in :c:type:`PyBufferProcs` may be set in the unlimited API." msgstr "" #: c-api/type.rst:279 diff --git a/c-api/typehints.po b/c-api/typehints.po index 10b81e0280..5ba8daa27b 100644 --- a/c-api/typehints.po +++ b/c-api/typehints.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-09-23 16:16+0200\n" +"POT-Creation-Date: 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" @@ -30,8 +30,8 @@ msgid "" "Create a :ref:`GenericAlias ` object. Equivalent to " "calling the Python class :class:`types.GenericAlias`. The *origin* and " "*args* arguments set the ``GenericAlias``\\ 's ``__origin__`` and " -"``__args__`` attributes respectively. *origin* should be a :c:type:" -"`PyTypeObject*`, and *args* can be a :c:type:`PyTupleObject*` or any " +"``__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 " diff --git a/c-api/typeobj.po b/c-api/typeobj.po index 711799c92f..2f7311a9d3 100644 --- a/c-api/typeobj.po +++ b/c-api/typeobj.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-27 10:27+0100\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" @@ -22,11 +22,11 @@ msgstr "Objets type" msgid "" "Perhaps one of the most important structures of the Python object system is " "the structure that defines a new type: the :c:type:`PyTypeObject` " -"structure. Type objects can be handled using any of the :c:func:`PyObject_" -"\\*` or :c:func:`PyType_\\*` functions, but do not offer much that's " -"interesting to most Python applications. These objects are fundamental to " -"how objects behave, so they are very important to the interpreter itself and " -"to any extension module that implements new types." +"structure. Type objects can be handled using any of the ``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 @@ -58,7 +58,7 @@ msgstr "" msgid "PyTypeObject Slot [#slots]_" msgstr "" -#: c-api/typeobj.rst:193 +#: c-api/typeobj.rst:199 msgid ":ref:`Type `" msgstr "" @@ -112,8 +112,8 @@ 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:408 -msgid "Py_ssize_t" +#: c-api/typeobj.rst:414 +msgid ":c:type:`Py_ssize_t`" msgstr "" #: c-api/typeobj.rst:48 @@ -124,7 +124,7 @@ msgstr "" msgid ":c:member:`~PyTypeObject.tp_dealloc`" msgstr "" -#: c-api/typeobj.rst:142 c-api/typeobj.rst:338 +#: c-api/typeobj.rst:142 c-api/typeobj.rst:344 msgid ":c:type:`destructor`" msgstr "" @@ -136,7 +136,7 @@ msgstr "" msgid "(:c:member:`~PyTypeObject.tp_getattr`)" msgstr "" -#: c-api/typeobj.rst:362 +#: c-api/typeobj.rst:368 msgid ":c:type:`getattrfunc`" msgstr "" @@ -153,7 +153,7 @@ msgstr "" msgid "(:c:member:`~PyTypeObject.tp_setattr`)" msgstr "" -#: c-api/typeobj.rst:367 +#: c-api/typeobj.rst:373 msgid ":c:type:`setattrfunc`" msgstr "" @@ -171,7 +171,7 @@ msgstr "" #: c-api/typeobj.rst:64 c-api/typeobj.rst:68 msgid ":ref:`sub-slots`" -msgstr "" +msgstr ":ref:`sub-slots`" #: c-api/typeobj.rst:64 c-api/typeobj.rst:68 c-api/typeobj.rst:82 msgid "%" @@ -181,7 +181,7 @@ msgstr "%" msgid ":c:member:`~PyTypeObject.tp_repr`" msgstr "" -#: c-api/typeobj.rst:74 c-api/typeobj.rst:360 +#: c-api/typeobj.rst:74 c-api/typeobj.rst:366 msgid ":c:type:`reprfunc`" msgstr "" @@ -217,7 +217,7 @@ msgstr "" msgid ":c:member:`~PyTypeObject.tp_hash`" msgstr "" -#: c-api/typeobj.rst:396 +#: c-api/typeobj.rst:402 msgid ":c:type:`hashfunc`" msgstr "" @@ -229,7 +229,7 @@ msgstr "" msgid ":c:member:`~PyTypeObject.tp_call`" msgstr "" -#: c-api/typeobj.rst:229 c-api/typeobj.rst:432 +#: c-api/typeobj.rst:235 c-api/typeobj.rst:438 msgid ":c:type:`ternaryfunc`" msgstr "" @@ -249,7 +249,7 @@ msgstr "" msgid ":c:member:`~PyTypeObject.tp_getattro`" msgstr "" -#: c-api/typeobj.rst:373 +#: c-api/typeobj.rst:379 msgid ":c:type:`getattrofunc`" msgstr "" @@ -257,7 +257,7 @@ msgstr "" msgid ":c:member:`~PyTypeObject.tp_setattro`" msgstr "" -#: c-api/typeobj.rst:378 +#: c-api/typeobj.rst:384 msgid ":c:type:`setattrofunc`" msgstr "" @@ -294,7 +294,7 @@ msgstr "__doc__" msgid ":c:member:`~PyTypeObject.tp_traverse`" msgstr "" -#: c-api/typeobj.rst:342 +#: c-api/typeobj.rst:348 msgid ":c:type:`traverseproc`" msgstr "" @@ -302,7 +302,7 @@ msgstr "" msgid ":c:member:`~PyTypeObject.tp_clear`" msgstr "" -#: c-api/typeobj.rst:130 c-api/typeobj.rst:421 +#: c-api/typeobj.rst:130 c-api/typeobj.rst:427 msgid ":c:type:`inquiry`" msgstr "" @@ -310,7 +310,7 @@ msgstr "" msgid ":c:member:`~PyTypeObject.tp_richcompare`" msgstr "" -#: c-api/typeobj.rst:398 +#: c-api/typeobj.rst:404 msgid ":c:type:`richcmpfunc`" msgstr "" @@ -326,7 +326,7 @@ msgstr "" msgid ":c:member:`~PyTypeObject.tp_iter`" msgstr "" -#: c-api/typeobj.rst:404 +#: c-api/typeobj.rst:410 msgid ":c:type:`getiterfunc`" msgstr "" @@ -338,7 +338,7 @@ msgstr "" msgid ":c:member:`~PyTypeObject.tp_iternext`" msgstr "" -#: c-api/typeobj.rst:406 +#: c-api/typeobj.rst:412 msgid ":c:type:`iternextfunc`" msgstr "" @@ -387,9 +387,9 @@ 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:360 c-api/typeobj.rst:373 -#: c-api/typeobj.rst:396 c-api/typeobj.rst:404 c-api/typeobj.rst:408 -#: c-api/typeobj.rst:427 c-api/typeobj.rst:438 +#: 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 "" @@ -401,7 +401,7 @@ msgstr "" msgid ":c:member:`~PyTypeObject.tp_descr_get`" msgstr "" -#: c-api/typeobj.rst:384 +#: c-api/typeobj.rst:390 msgid ":c:type:`descrgetfunc`" msgstr "" @@ -413,7 +413,7 @@ msgstr "" msgid ":c:member:`~PyTypeObject.tp_descr_set`" msgstr "" -#: c-api/typeobj.rst:390 +#: c-api/typeobj.rst:396 msgid ":c:type:`descrsetfunc`" msgstr "" @@ -429,7 +429,7 @@ msgstr "" msgid ":c:member:`~PyTypeObject.tp_init`" msgstr "" -#: c-api/typeobj.rst:354 +#: c-api/typeobj.rst:360 msgid ":c:type:`initproc`" msgstr "" @@ -441,7 +441,7 @@ msgstr "" msgid ":c:member:`~PyTypeObject.tp_alloc`" msgstr "" -#: c-api/typeobj.rst:333 +#: c-api/typeobj.rst:339 msgid ":c:type:`allocfunc`" msgstr "" @@ -449,7 +449,7 @@ msgstr "" msgid ":c:member:`~PyTypeObject.tp_new`" msgstr "" -#: c-api/typeobj.rst:348 +#: c-api/typeobj.rst:354 msgid ":c:type:`newfunc`" msgstr "" @@ -461,7 +461,7 @@ msgstr "" msgid ":c:member:`~PyTypeObject.tp_free`" msgstr "" -#: c-api/typeobj.rst:340 +#: c-api/typeobj.rst:346 msgid ":c:type:`freefunc`" msgstr "" @@ -533,511 +533,523 @@ msgstr "" msgid ":c:type:`vectorcallfunc`" msgstr "" -#: c-api/typeobj.rst:152 +#: c-api/typeobj.rst:153 msgid "" -"A slot name in parentheses indicates it is (effectively) deprecated. Names " -"in angle brackets should be treated as read-only. Names in square brackets " -"are for internal use only. \"\" (as a prefix) means the field is required " -"(must be non-``NULL``)." +"**()**: A slot name in parentheses indicates it is (effectively) deprecated." msgstr "" -#: c-api/typeobj.rst:156 -msgid "Columns:" +#: 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 "**\"O\"**: set on :c:type:`PyBaseObject_Type`" +msgid "**[]**: Names in square brackets are for internal use only." msgstr "" #: c-api/typeobj.rst:160 -msgid "**\"T\"**: set on :c:type:`PyType_Type`" +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:172 +#: c-api/typeobj.rst:178 msgid "**\"I\"**: inheritance" msgstr "" -#: c-api/typeobj.rst:181 +#: c-api/typeobj.rst:187 msgid "" "Note that some slots are effectively inherited through the normal attribute " "lookup chain." msgstr "" -#: c-api/typeobj.rst:187 +#: c-api/typeobj.rst:193 msgid "sub-slots" msgstr "" -#: c-api/typeobj.rst:193 +#: c-api/typeobj.rst:199 msgid "Slot" msgstr "" -#: c-api/typeobj.rst:193 +#: c-api/typeobj.rst:199 #, fuzzy msgid "special methods" msgstr "méthode spéciale" -#: c-api/typeobj.rst:196 +#: c-api/typeobj.rst:202 msgid ":c:member:`~PyAsyncMethods.am_await`" msgstr "" -#: c-api/typeobj.rst:198 c-api/typeobj.rst:234 c-api/typeobj.rst:238 -#: c-api/typeobj.rst:269 c-api/typeobj.rst:283 c-api/typeobj.rst:423 +#: 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:196 +#: c-api/typeobj.rst:202 msgid "__await__" msgstr "" -#: c-api/typeobj.rst:198 +#: c-api/typeobj.rst:204 msgid ":c:member:`~PyAsyncMethods.am_aiter`" msgstr "" -#: c-api/typeobj.rst:198 +#: c-api/typeobj.rst:204 msgid "__aiter__" msgstr "" -#: c-api/typeobj.rst:200 +#: c-api/typeobj.rst:206 msgid ":c:member:`~PyAsyncMethods.am_anext`" msgstr "" -#: c-api/typeobj.rst:200 +#: c-api/typeobj.rst:206 msgid "__anext__" msgstr "" -#: c-api/typeobj.rst:202 +#: c-api/typeobj.rst:208 msgid ":c:member:`~PyAsyncMethods.am_send`" msgstr "" -#: c-api/typeobj.rst:202 +#: c-api/typeobj.rst:208 msgid ":c:type:`sendfunc`" msgstr "" -#: c-api/typeobj.rst:206 +#: c-api/typeobj.rst:212 msgid ":c:member:`~PyNumberMethods.nb_add`" msgstr "" -#: c-api/typeobj.rst:209 c-api/typeobj.rst:214 c-api/typeobj.rst:219 -#: c-api/typeobj.rst:224 c-api/typeobj.rst:244 c-api/typeobj.rst:249 -#: c-api/typeobj.rst:254 c-api/typeobj.rst:259 c-api/typeobj.rst:264 -#: c-api/typeobj.rst:275 c-api/typeobj.rst:279 c-api/typeobj.rst:285 -#: c-api/typeobj.rst:294 c-api/typeobj.rst:314 c-api/typeobj.rst:427 +#: 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:206 +#: c-api/typeobj.rst:212 msgid "__add__ __radd__" msgstr "" -#: c-api/typeobj.rst:209 +#: c-api/typeobj.rst:215 msgid ":c:member:`~PyNumberMethods.nb_inplace_add`" msgstr "" -#: c-api/typeobj.rst:314 +#: c-api/typeobj.rst:320 msgid "__iadd__" msgstr "" -#: c-api/typeobj.rst:211 +#: c-api/typeobj.rst:217 msgid ":c:member:`~PyNumberMethods.nb_subtract`" msgstr "" -#: c-api/typeobj.rst:211 +#: c-api/typeobj.rst:217 msgid "__sub__ __rsub__" msgstr "" -#: c-api/typeobj.rst:214 +#: c-api/typeobj.rst:220 msgid ":c:member:`~PyNumberMethods.nb_inplace_subtract`" msgstr "" -#: c-api/typeobj.rst:214 +#: c-api/typeobj.rst:220 msgid "__isub__" msgstr "" -#: c-api/typeobj.rst:216 +#: c-api/typeobj.rst:222 msgid ":c:member:`~PyNumberMethods.nb_multiply`" msgstr "" -#: c-api/typeobj.rst:216 +#: c-api/typeobj.rst:222 msgid "__mul__ __rmul__" msgstr "" -#: c-api/typeobj.rst:219 +#: c-api/typeobj.rst:225 msgid ":c:member:`~PyNumberMethods.nb_inplace_multiply`" msgstr "" -#: c-api/typeobj.rst:316 +#: c-api/typeobj.rst:322 msgid "__imul__" msgstr "" -#: c-api/typeobj.rst:221 +#: c-api/typeobj.rst:227 msgid ":c:member:`~PyNumberMethods.nb_remainder`" msgstr "" -#: c-api/typeobj.rst:221 +#: c-api/typeobj.rst:227 msgid "__mod__ __rmod__" msgstr "" -#: c-api/typeobj.rst:224 +#: c-api/typeobj.rst:230 msgid ":c:member:`~PyNumberMethods.nb_inplace_remainder`" msgstr "" -#: c-api/typeobj.rst:224 +#: c-api/typeobj.rst:230 msgid "__imod__" msgstr "" -#: c-api/typeobj.rst:226 +#: c-api/typeobj.rst:232 msgid ":c:member:`~PyNumberMethods.nb_divmod`" msgstr "" -#: c-api/typeobj.rst:226 +#: c-api/typeobj.rst:232 msgid "__divmod__ __rdivmod__" msgstr "" -#: c-api/typeobj.rst:229 +#: c-api/typeobj.rst:235 msgid ":c:member:`~PyNumberMethods.nb_power`" msgstr "" -#: c-api/typeobj.rst:229 +#: c-api/typeobj.rst:235 msgid "__pow__ __rpow__" msgstr "" -#: c-api/typeobj.rst:232 +#: c-api/typeobj.rst:238 msgid ":c:member:`~PyNumberMethods.nb_inplace_power`" msgstr "" -#: c-api/typeobj.rst:232 +#: c-api/typeobj.rst:238 msgid "__ipow__" msgstr "" -#: c-api/typeobj.rst:234 +#: c-api/typeobj.rst:240 msgid ":c:member:`~PyNumberMethods.nb_negative`" msgstr "" -#: c-api/typeobj.rst:234 +#: c-api/typeobj.rst:240 msgid "__neg__" msgstr "" -#: c-api/typeobj.rst:236 +#: c-api/typeobj.rst:242 msgid ":c:member:`~PyNumberMethods.nb_positive`" msgstr "" -#: c-api/typeobj.rst:236 +#: c-api/typeobj.rst:242 msgid "__pos__" msgstr "" -#: c-api/typeobj.rst:238 +#: c-api/typeobj.rst:244 msgid ":c:member:`~PyNumberMethods.nb_absolute`" msgstr "" -#: c-api/typeobj.rst:238 +#: c-api/typeobj.rst:244 msgid "__abs__" msgstr "" -#: c-api/typeobj.rst:240 +#: c-api/typeobj.rst:246 msgid ":c:member:`~PyNumberMethods.nb_bool`" msgstr "" -#: c-api/typeobj.rst:240 +#: c-api/typeobj.rst:246 msgid "__bool__" msgstr "" -#: c-api/typeobj.rst:242 +#: c-api/typeobj.rst:248 msgid ":c:member:`~PyNumberMethods.nb_invert`" msgstr "" -#: c-api/typeobj.rst:242 +#: c-api/typeobj.rst:248 msgid "__invert__" msgstr "" -#: c-api/typeobj.rst:244 +#: c-api/typeobj.rst:250 msgid ":c:member:`~PyNumberMethods.nb_lshift`" msgstr "" -#: c-api/typeobj.rst:244 +#: c-api/typeobj.rst:250 msgid "__lshift__ __rlshift__" msgstr "" -#: c-api/typeobj.rst:247 +#: c-api/typeobj.rst:253 msgid ":c:member:`~PyNumberMethods.nb_inplace_lshift`" msgstr "" -#: c-api/typeobj.rst:247 +#: c-api/typeobj.rst:253 msgid "__ilshift__" msgstr "" -#: c-api/typeobj.rst:249 +#: c-api/typeobj.rst:255 msgid ":c:member:`~PyNumberMethods.nb_rshift`" msgstr "" -#: c-api/typeobj.rst:249 +#: c-api/typeobj.rst:255 msgid "__rshift__ __rrshift__" msgstr "" -#: c-api/typeobj.rst:252 +#: c-api/typeobj.rst:258 msgid ":c:member:`~PyNumberMethods.nb_inplace_rshift`" msgstr "" -#: c-api/typeobj.rst:252 +#: c-api/typeobj.rst:258 msgid "__irshift__" msgstr "" -#: c-api/typeobj.rst:254 +#: c-api/typeobj.rst:260 msgid ":c:member:`~PyNumberMethods.nb_and`" msgstr "" -#: c-api/typeobj.rst:254 +#: c-api/typeobj.rst:260 msgid "__and__ __rand__" msgstr "" -#: c-api/typeobj.rst:257 +#: c-api/typeobj.rst:263 msgid ":c:member:`~PyNumberMethods.nb_inplace_and`" msgstr "" -#: c-api/typeobj.rst:257 +#: c-api/typeobj.rst:263 msgid "__iand__" msgstr "" -#: c-api/typeobj.rst:259 +#: c-api/typeobj.rst:265 msgid ":c:member:`~PyNumberMethods.nb_xor`" msgstr "" -#: c-api/typeobj.rst:259 +#: c-api/typeobj.rst:265 msgid "__xor__ __rxor__" msgstr "" -#: c-api/typeobj.rst:262 +#: c-api/typeobj.rst:268 msgid ":c:member:`~PyNumberMethods.nb_inplace_xor`" msgstr "" -#: c-api/typeobj.rst:262 +#: c-api/typeobj.rst:268 msgid "__ixor__" msgstr "" -#: c-api/typeobj.rst:264 +#: c-api/typeobj.rst:270 msgid ":c:member:`~PyNumberMethods.nb_or`" msgstr "" -#: c-api/typeobj.rst:264 +#: c-api/typeobj.rst:270 msgid "__or__ __ror__" msgstr "" -#: c-api/typeobj.rst:267 +#: c-api/typeobj.rst:273 msgid ":c:member:`~PyNumberMethods.nb_inplace_or`" msgstr "" -#: c-api/typeobj.rst:267 +#: c-api/typeobj.rst:273 msgid "__ior__" msgstr "" -#: c-api/typeobj.rst:269 +#: c-api/typeobj.rst:275 msgid ":c:member:`~PyNumberMethods.nb_int`" msgstr "" -#: c-api/typeobj.rst:269 +#: c-api/typeobj.rst:275 msgid "__int__" msgstr "" -#: c-api/typeobj.rst:271 +#: c-api/typeobj.rst:277 msgid ":c:member:`~PyNumberMethods.nb_reserved`" msgstr "" -#: c-api/typeobj.rst:338 c-api/typeobj.rst:0 c-api/typeobj.rst:421 +#: c-api/typeobj.rst:344 c-api/typeobj.rst:0 c-api/typeobj.rst:427 msgid "void *" msgstr "" -#: c-api/typeobj.rst:273 +#: c-api/typeobj.rst:279 msgid ":c:member:`~PyNumberMethods.nb_float`" msgstr "" -#: c-api/typeobj.rst:273 +#: c-api/typeobj.rst:279 msgid "__float__" msgstr "" -#: c-api/typeobj.rst:275 +#: c-api/typeobj.rst:281 msgid ":c:member:`~PyNumberMethods.nb_floor_divide`" msgstr "" -#: c-api/typeobj.rst:275 +#: c-api/typeobj.rst:281 msgid "__floordiv__" msgstr "" -#: c-api/typeobj.rst:277 +#: c-api/typeobj.rst:283 msgid ":c:member:`~PyNumberMethods.nb_inplace_floor_divide`" msgstr "" -#: c-api/typeobj.rst:277 +#: c-api/typeobj.rst:283 msgid "__ifloordiv__" msgstr "" -#: c-api/typeobj.rst:279 +#: c-api/typeobj.rst:285 msgid ":c:member:`~PyNumberMethods.nb_true_divide`" msgstr "" -#: c-api/typeobj.rst:279 +#: c-api/typeobj.rst:285 msgid "__truediv__" msgstr "" -#: c-api/typeobj.rst:281 +#: c-api/typeobj.rst:287 msgid ":c:member:`~PyNumberMethods.nb_inplace_true_divide`" msgstr "" -#: c-api/typeobj.rst:281 +#: c-api/typeobj.rst:287 msgid "__itruediv__" msgstr "" -#: c-api/typeobj.rst:283 +#: c-api/typeobj.rst:289 msgid ":c:member:`~PyNumberMethods.nb_index`" msgstr "" -#: c-api/typeobj.rst:283 +#: c-api/typeobj.rst:289 msgid "__index__" msgstr "" -#: c-api/typeobj.rst:285 +#: c-api/typeobj.rst:291 msgid ":c:member:`~PyNumberMethods.nb_matrix_multiply`" msgstr "" -#: c-api/typeobj.rst:285 +#: c-api/typeobj.rst:291 msgid "__matmul__ __rmatmul__" msgstr "" -#: c-api/typeobj.rst:288 +#: c-api/typeobj.rst:294 msgid ":c:member:`~PyNumberMethods.nb_inplace_matrix_multiply`" msgstr "" -#: c-api/typeobj.rst:288 +#: c-api/typeobj.rst:294 msgid "__imatmul__" msgstr "" -#: c-api/typeobj.rst:292 +#: c-api/typeobj.rst:298 msgid ":c:member:`~PyMappingMethods.mp_length`" msgstr "" -#: c-api/typeobj.rst:301 c-api/typeobj.rst:408 +#: c-api/typeobj.rst:307 c-api/typeobj.rst:414 msgid ":c:type:`lenfunc`" msgstr "" -#: c-api/typeobj.rst:301 +#: c-api/typeobj.rst:307 msgid "__len__" msgstr "" -#: c-api/typeobj.rst:294 +#: c-api/typeobj.rst:300 msgid ":c:member:`~PyMappingMethods.mp_subscript`" msgstr "" -#: c-api/typeobj.rst:307 +#: c-api/typeobj.rst:313 msgid "__getitem__" msgstr "" -#: c-api/typeobj.rst:296 +#: c-api/typeobj.rst:302 msgid ":c:member:`~PyMappingMethods.mp_ass_subscript`" msgstr "" -#: c-api/typeobj.rst:453 +#: c-api/typeobj.rst:460 msgid ":c:type:`objobjargproc`" msgstr "" -#: c-api/typeobj.rst:296 +#: c-api/typeobj.rst:302 msgid "__setitem__, __delitem__" msgstr "" -#: c-api/typeobj.rst:301 +#: c-api/typeobj.rst:307 msgid ":c:member:`~PySequenceMethods.sq_length`" msgstr "" -#: c-api/typeobj.rst:303 +#: c-api/typeobj.rst:309 msgid ":c:member:`~PySequenceMethods.sq_concat`" msgstr "" -#: c-api/typeobj.rst:303 +#: c-api/typeobj.rst:309 msgid "__add__" msgstr "" -#: c-api/typeobj.rst:305 +#: c-api/typeobj.rst:311 msgid ":c:member:`~PySequenceMethods.sq_repeat`" msgstr "" -#: c-api/typeobj.rst:307 c-api/typeobj.rst:438 +#: c-api/typeobj.rst:313 c-api/typeobj.rst:444 msgid ":c:type:`ssizeargfunc`" msgstr "" -#: c-api/typeobj.rst:305 +#: c-api/typeobj.rst:311 msgid "__mul__" msgstr "" -#: c-api/typeobj.rst:307 +#: c-api/typeobj.rst:313 msgid ":c:member:`~PySequenceMethods.sq_item`" msgstr "" -#: c-api/typeobj.rst:309 +#: c-api/typeobj.rst:315 msgid ":c:member:`~PySequenceMethods.sq_ass_item`" msgstr "" -#: c-api/typeobj.rst:443 +#: c-api/typeobj.rst:449 msgid ":c:type:`ssizeobjargproc`" msgstr "" -#: c-api/typeobj.rst:309 +#: c-api/typeobj.rst:315 msgid "__setitem__ __delitem__" msgstr "" -#: c-api/typeobj.rst:312 +#: c-api/typeobj.rst:318 msgid ":c:member:`~PySequenceMethods.sq_contains`" msgstr "" -#: c-api/typeobj.rst:448 +#: c-api/typeobj.rst:455 msgid ":c:type:`objobjproc`" msgstr "" -#: c-api/typeobj.rst:312 +#: c-api/typeobj.rst:318 msgid "__contains__" msgstr "" -#: c-api/typeobj.rst:314 +#: c-api/typeobj.rst:320 msgid ":c:member:`~PySequenceMethods.sq_inplace_concat`" msgstr "" -#: c-api/typeobj.rst:316 +#: c-api/typeobj.rst:322 msgid ":c:member:`~PySequenceMethods.sq_inplace_repeat`" msgstr "" -#: c-api/typeobj.rst:320 +#: c-api/typeobj.rst:326 msgid ":c:member:`~PyBufferProcs.bf_getbuffer`" msgstr "" -#: c-api/typeobj.rst:320 +#: c-api/typeobj.rst:326 msgid ":c:func:`getbufferproc`" msgstr "" -#: c-api/typeobj.rst:322 +#: c-api/typeobj.rst:328 msgid ":c:member:`~PyBufferProcs.bf_releasebuffer`" msgstr "" -#: c-api/typeobj.rst:322 +#: c-api/typeobj.rst:328 msgid ":c:func:`releasebufferproc`" msgstr "" -#: c-api/typeobj.rst:328 +#: c-api/typeobj.rst:334 msgid "slot typedefs" msgstr "" -#: c-api/typeobj.rst:331 +#: c-api/typeobj.rst:337 msgid "typedef" msgstr "" -#: c-api/typeobj.rst:331 +#: c-api/typeobj.rst:337 msgid "Parameter Types" msgstr "" -#: c-api/typeobj.rst:331 +#: c-api/typeobj.rst:337 msgid "Return Type" msgstr "" -#: c-api/typeobj.rst:340 c-api/typeobj.rst:416 +#: c-api/typeobj.rst:346 c-api/typeobj.rst:422 msgid "void" msgstr "" @@ -1045,16 +1057,16 @@ msgstr "" msgid ":c:type:`visitproc`" msgstr "" -#: c-api/typeobj.rst:354 c-api/typeobj.rst:378 c-api/typeobj.rst:0 -#: c-api/typeobj.rst:421 c-api/typeobj.rst:448 c-api/typeobj.rst:453 +#: 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:396 +#: c-api/typeobj.rst:402 msgid "Py_hash_t" msgstr "" -#: c-api/typeobj.rst:410 +#: c-api/typeobj.rst:416 msgid ":c:type:`getbufferproc`" msgstr "" @@ -1062,41 +1074,40 @@ msgstr "" msgid ":c:type:`Py_buffer` *" msgstr "" -#: c-api/typeobj.rst:416 +#: c-api/typeobj.rst:422 msgid ":c:type:`releasebufferproc`" msgstr "" -#: c-api/typeobj.rst:460 +#: c-api/typeobj.rst:467 msgid "See :ref:`slot-typedefs` below for more detail." msgstr "" -#: c-api/typeobj.rst:464 +#: c-api/typeobj.rst:471 msgid "PyTypeObject Definition" msgstr "" -#: c-api/typeobj.rst:466 +#: 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:476 +#: c-api/typeobj.rst:483 #, fuzzy msgid "PyObject Slots" msgstr "Objets type" -#: c-api/typeobj.rst:478 +#: 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." +"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:487 +#: 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 " @@ -1106,25 +1117,25 @@ msgid "" "as references." msgstr "" -#: c-api/typeobj.rst:517 c-api/typeobj.rst:553 c-api/typeobj.rst:640 -#: c-api/typeobj.rst:742 c-api/typeobj.rst:778 c-api/typeobj.rst:820 -#: c-api/typeobj.rst:849 c-api/typeobj.rst:894 c-api/typeobj.rst:932 -#: c-api/typeobj.rst:979 c-api/typeobj.rst:1014 c-api/typeobj.rst:1062 -#: c-api/typeobj.rst:1082 c-api/typeobj.rst:1114 c-api/typeobj.rst:1184 -#: c-api/typeobj.rst:1218 c-api/typeobj.rst:1259 c-api/typeobj.rst:1343 -#: c-api/typeobj.rst:1469 c-api/typeobj.rst:1531 c-api/typeobj.rst:1567 -#: c-api/typeobj.rst:1596 c-api/typeobj.rst:1646 c-api/typeobj.rst:1690 -#: c-api/typeobj.rst:1781 c-api/typeobj.rst:1839 c-api/typeobj.rst:1893 -#: c-api/typeobj.rst:1921 c-api/typeobj.rst:1940 c-api/typeobj.rst:1964 -#: c-api/typeobj.rst:2019 +#: 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:555 c-api/typeobj.rst:599 +#: c-api/typeobj.rst:562 c-api/typeobj.rst:606 msgid "This field is not inherited by subtypes." msgstr "" -#: c-api/typeobj.rst:501 +#: 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 " @@ -1136,7 +1147,7 @@ msgid "" "doing anything else. This is typically done like this::" msgstr "" -#: c-api/typeobj.rst:512 +#: 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 " @@ -1144,27 +1155,27 @@ msgid "" "will not change this field if it is non-zero." msgstr "" -#: c-api/typeobj.rst:700 c-api/typeobj.rst:914 c-api/typeobj.rst:1533 -#: c-api/typeobj.rst:1674 c-api/typeobj.rst:1783 c-api/typeobj.rst:2004 +#: 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:525 +#: 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:528 +#: 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." +"object into a doubly linked list of *all* live objects on the heap." msgstr "" -#: c-api/typeobj.rst:534 +#: 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 " @@ -1172,27 +1183,27 @@ msgid "" "`PYTHONDUMPREFS` is set." msgstr "" -#: c-api/typeobj.rst:541 +#: c-api/typeobj.rst:548 msgid "These fields are not inherited by subtypes." msgstr "" -#: c-api/typeobj.rst:545 +#: c-api/typeobj.rst:552 msgid "PyVarObject Slots" msgstr "" -#: c-api/typeobj.rst:549 +#: 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:559 +#: c-api/typeobj.rst:566 #, fuzzy msgid "PyTypeObject Slots" msgstr "Objets type" -#: c-api/typeobj.rst:561 +#: 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 " @@ -1200,7 +1211,7 @@ msgid "" "`PyBaseObject_Type` and :c:type:`PyType_Type` effectively act as defaults.)" msgstr "" -#: c-api/typeobj.rst:568 +#: 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 " @@ -1212,14 +1223,14 @@ msgid "" "tp_name` initializer ``\"P.Q.M.T\"``." msgstr "" -#: c-api/typeobj.rst:576 +#: 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:581 +#: 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 " @@ -1227,7 +1238,7 @@ msgid "" "last dot is made accessible as the :attr:`~definition.__name__` attribute." msgstr "" -#: c-api/typeobj.rst:587 +#: 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:" @@ -1237,19 +1248,19 @@ msgid "" "created with pydoc." msgstr "" -#: c-api/typeobj.rst:593 +#: 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:605 +#: c-api/typeobj.rst:612 msgid "" "These fields allow calculating the size in bytes of instances of the type." msgstr "" -#: c-api/typeobj.rst:607 +#: 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 " @@ -1258,7 +1269,7 @@ msgid "" "in :c:member:`~PyTypeObject.tp_basicsize`." msgstr "" -#: c-api/typeobj.rst:612 +#: 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." @@ -1272,7 +1283,7 @@ msgid "" "instances, yet those instances have a meaningful :attr:`ob_size` field)." msgstr "" -#: c-api/typeobj.rst:623 +#: 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 " @@ -1284,7 +1295,7 @@ msgid "" "size." msgstr "" -#: c-api/typeobj.rst:631 +#: 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:" @@ -1295,12 +1306,12 @@ msgid "" "alignment requirement for ``double``)." msgstr "" -#: c-api/typeobj.rst:638 +#: c-api/typeobj.rst:645 msgid "" "For any type with variable-length instances, this field must not be ``NULL``." msgstr "" -#: c-api/typeobj.rst:642 +#: 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 " @@ -1308,7 +1319,7 @@ msgid "" "subtype (though this depends on the implementation of the base type)." msgstr "" -#: c-api/typeobj.rst:650 +#: 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 " @@ -1316,7 +1327,7 @@ msgid "" "The function signature is::" msgstr "" -#: c-api/typeobj.rst:656 +#: 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, " @@ -1334,14 +1345,14 @@ msgid "" "allocated using :c:func:`PyObject_GC_New` or :c:func:`PyObject_GC_NewVar`." msgstr "" -#: c-api/typeobj.rst:671 +#: 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:683 +#: 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 " @@ -1349,28 +1360,28 @@ msgid "" "recommended way to achieve this is:" msgstr "" -#: c-api/typeobj.rst:705 +#: 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:710 +#: 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:714 +#: 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:718 +#: 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 " @@ -1378,7 +1389,7 @@ msgid "" "`PyVectorcall_Call`." msgstr "" -#: c-api/typeobj.rst:725 +#: 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 " @@ -1386,20 +1397,13 @@ msgid "" "function." msgstr "" -#: c-api/typeobj.rst:732 -msgid "" -"The semantics of the ``tp_vectorcall_offset`` slot are provisional and " -"expected to be finalized in Python 3.9. If you use vectorcall, plan for " -"updating your code for Python 3.9." -msgstr "" - -#: c-api/typeobj.rst:738 +#: 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:744 +#: 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 " @@ -1408,11 +1412,11 @@ msgid "" "for :ref:`heap types ` (including subclasses defined in Python)." msgstr "" -#: c-api/typeobj.rst:755 +#: c-api/typeobj.rst:756 msgid "An optional pointer to the get-attribute-string function." msgstr "" -#: c-api/typeobj.rst:757 +#: 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, " @@ -1420,11 +1424,11 @@ msgid "" "attribute name." msgstr "" -#: c-api/typeobj.rst:955 +#: c-api/typeobj.rst:956 msgid "Group: :attr:`tp_getattr`, :attr:`tp_getattro`" msgstr "" -#: c-api/typeobj.rst:765 +#: 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` " @@ -1433,12 +1437,12 @@ msgid "" "tp_getattro` are both ``NULL``." msgstr "" -#: c-api/typeobj.rst:968 +#: c-api/typeobj.rst:969 msgid "" "An optional pointer to the function for setting and deleting attributes." msgstr "" -#: c-api/typeobj.rst:774 +#: 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, " @@ -1446,11 +1450,11 @@ msgid "" "attribute name." msgstr "" -#: c-api/typeobj.rst:981 +#: c-api/typeobj.rst:982 msgid "Group: :attr:`tp_setattr`, :attr:`tp_setattro`" msgstr "" -#: c-api/typeobj.rst:782 +#: 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` " @@ -1459,34 +1463,34 @@ msgid "" "tp_setattro` are both ``NULL``." msgstr "" -#: c-api/typeobj.rst:789 +#: 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:793 +#: c-api/typeobj.rst:794 msgid "Formerly known as ``tp_compare`` and ``tp_reserved``." msgstr "" -#: c-api/typeobj.rst:798 +#: 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:806 +#: 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:809 +#: c-api/typeobj.rst:810 msgid "The signature is the same as for :c:func:`PyObject_Repr`::" msgstr "" -#: c-api/typeobj.rst:813 +#: 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 " @@ -1495,83 +1499,83 @@ msgid "" "``'>'`` from which both the type and the value of the object can be deduced." msgstr "" -#: c-api/typeobj.rst:936 c-api/typeobj.rst:987 c-api/typeobj.rst:1478 -#: c-api/typeobj.rst:1651 c-api/typeobj.rst:1785 c-api/typeobj.rst:1845 -#: c-api/typeobj.rst:1897 +#: 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:826 +#: 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:833 +#: 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:839 +#: 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:845 +#: 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:851 +#: 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:857 +#: 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:863 +#: 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:871 +#: 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:874 +#: c-api/typeobj.rst:875 msgid "The signature is the same as for :c:func:`PyObject_Hash`::" msgstr "" -#: c-api/typeobj.rst:878 +#: 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:882 +#: 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:886 +#: 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 " @@ -1582,11 +1586,11 @@ msgid "" "`PyObject_HashNotImplemented`." msgstr "" -#: c-api/typeobj.rst:1471 +#: c-api/typeobj.rst:1483 msgid "Group: :attr:`tp_hash`, :attr:`tp_richcompare`" msgstr "" -#: c-api/typeobj.rst:898 +#: 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." @@ -1595,14 +1599,14 @@ msgid "" "are both ``NULL``." msgstr "" -#: c-api/typeobj.rst:906 +#: 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:919 +#: 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 " @@ -1611,11 +1615,11 @@ msgid "" "this handler.)" msgstr "" -#: c-api/typeobj.rst:924 +#: c-api/typeobj.rst:925 msgid "The signature is the same as for :c:func:`PyObject_Str`::" msgstr "" -#: c-api/typeobj.rst:928 +#: 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 " @@ -1623,28 +1627,28 @@ msgid "" "function." msgstr "" -#: c-api/typeobj.rst:938 +#: 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:944 +#: c-api/typeobj.rst:945 msgid "An optional pointer to the get-attribute function." msgstr "" -#: c-api/typeobj.rst:946 +#: c-api/typeobj.rst:947 msgid "The signature is the same as for :c:func:`PyObject_GetAttr`::" msgstr "" -#: c-api/typeobj.rst:950 +#: 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:957 +#: 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` " @@ -1653,15 +1657,15 @@ msgid "" "tp_getattro` are both ``NULL``." msgstr "" -#: c-api/typeobj.rst:963 +#: c-api/typeobj.rst:964 msgid ":c:type:`PyBaseObject_Type` uses :c:func:`PyObject_GenericGetAttr`." msgstr "" -#: c-api/typeobj.rst:970 +#: c-api/typeobj.rst:971 msgid "The signature is the same as for :c:func:`PyObject_SetAttr`::" msgstr "" -#: c-api/typeobj.rst:974 +#: 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:" @@ -1669,7 +1673,7 @@ msgid "" "attributes." msgstr "" -#: c-api/typeobj.rst:983 +#: 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` " @@ -1678,24 +1682,24 @@ msgid "" "tp_setattro` are both ``NULL``." msgstr "" -#: c-api/typeobj.rst:989 +#: c-api/typeobj.rst:990 msgid ":c:type:`PyBaseObject_Type` uses :c:func:`PyObject_GenericSetAttr`." msgstr "" -#: c-api/typeobj.rst:994 +#: 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:1000 +#: 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:1006 +#: 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 " @@ -1707,7 +1711,7 @@ msgid "" "accessed and must be considered to have a zero or ``NULL`` value instead." msgstr "" -#: c-api/typeobj.rst:1016 +#: 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 " @@ -1722,17 +1726,17 @@ msgid "" "the subtype exist and have ``NULL`` values." msgstr "" -#: c-api/typeobj.rst:1031 +#: c-api/typeobj.rst:1032 msgid "" ":c:type:`PyBaseObject_Type` uses ``Py_TPFLAGS_DEFAULT | " "Py_TPFLAGS_BASETYPE``." msgstr "" -#: c-api/typeobj.rst:1034 +#: c-api/typeobj.rst:1035 msgid "**Bit Masks:**" msgstr "" -#: c-api/typeobj.rst:1036 +#: 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." @@ -1741,7 +1745,7 @@ msgid "" "zero." msgstr "" -#: c-api/typeobj.rst:1043 +#: 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 " @@ -1752,30 +1756,30 @@ msgid "" "gets INCREF'ed or DECREF'ed)." msgstr "" -#: c-api/typeobj.rst:1064 c-api/typeobj.rst:1084 c-api/typeobj.rst:1116 +#: c-api/typeobj.rst:1065 c-api/typeobj.rst:1085 c-api/typeobj.rst:1117 msgid "???" msgstr "" -#: c-api/typeobj.rst:1058 +#: 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:1069 +#: 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:1079 +#: 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:1089 +#: 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 " @@ -1785,12 +1789,12 @@ msgid "" "tp_clear` are present in the type object." msgstr "" -#: c-api/typeobj.rst:1345 c-api/typeobj.rst:1412 +#: 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:1100 +#: 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:" @@ -1799,48 +1803,48 @@ msgid "" "``NULL`` values." msgstr "" -#: c-api/typeobj.rst:1110 +#: 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:1121 +#: c-api/typeobj.rst:1122 msgid "This bit indicates that objects behave like unbound methods." msgstr "" -#: c-api/typeobj.rst:1123 +#: c-api/typeobj.rst:1124 msgid "If this flag is set for ``type(meth)``, then:" msgstr "" -#: c-api/typeobj.rst:1125 +#: 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:1128 +#: c-api/typeobj.rst:1129 msgid "" "``meth.__get__(None, cls)(*args, **kwds)`` must be equivalent to " "``meth(*args, **kwds)``." msgstr "" -#: c-api/typeobj.rst:1131 +#: 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:1139 +#: 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:1156 +#: 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 " @@ -1850,68 +1854,82 @@ msgid "" "behave differently depending on what kind of check is used." msgstr "" -#: c-api/typeobj.rst:1167 +#: 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:1172 +#: 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:1180 +#: 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:1186 +#: 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:1194 +#: 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:1196 +#: c-api/typeobj.rst:1197 msgid "" ":c:func:`PyType_Ready` automatically applies this flag to :ref:`static types " "`." msgstr "" -#: c-api/typeobj.rst:1220 +#: c-api/typeobj.rst:1202 msgid "This flag is not inherited." msgstr "" -#: c-api/typeobj.rst:1207 +#: 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:1211 +#: 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:1214 +#: 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:1227 +#: 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 " @@ -1919,23 +1937,23 @@ msgid "" "unset when registering :class:`collections.abc.Sequence`." msgstr "" -#: c-api/typeobj.rst:1256 +#: c-api/typeobj.rst:1268 msgid "" ":const:`Py_TPFLAGS_MAPPING` and :const:`Py_TPFLAGS_SEQUENCE` are mutually " -"exclusive; it is an error enable both flags simultaneously." +"exclusive; it is an error to enable both flags simultaneously." msgstr "" -#: c-api/typeobj.rst:1239 +#: 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:1264 +#: c-api/typeobj.rst:1276 msgid ":pep:`634` -- Structural Pattern Matching: Specification" -msgstr "" +msgstr ":pep:`634` — Spécifications pour le filtrage par motif" -#: c-api/typeobj.rst:1249 +#: 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 " @@ -1943,37 +1961,37 @@ msgid "" "unset when registering :class:`collections.abc.Mapping`." msgstr "" -#: c-api/typeobj.rst:1261 +#: 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:1271 +#: 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:1277 +#: c-api/typeobj.rst:1289 msgid "This field is *not* inherited by subtypes." msgstr "" -#: c-api/typeobj.rst:1282 +#: 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:1407 +#: 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:1290 +#: 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:" @@ -1983,7 +2001,7 @@ msgid "" "`_thread` extension module::" msgstr "" -#: c-api/typeobj.rst:1305 +#: 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`` " @@ -1991,14 +2009,14 @@ msgid "" "part of a reference cycle." msgstr "" -#: c-api/typeobj.rst:1309 +#: 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:1314 +#: 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 ` hold a reference to " "their type. Their traversal function must therefore either visit :c:func:" @@ -2027,14 +2045,14 @@ msgid "" "superclass). If they do not, the type object may not be garbage-collected." msgstr "" -#: c-api/typeobj.rst:1338 +#: 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:1347 +#: 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:" @@ -2042,14 +2060,14 @@ msgid "" "are all inherited from the base type if they are all zero in the subtype." msgstr "" -#: c-api/typeobj.rst:1355 +#: 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:1360 +#: 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 " @@ -2064,7 +2082,7 @@ msgid "" "good reason to avoid implementing :c:member:`~PyTypeObject.tp_clear`." msgstr "" -#: c-api/typeobj.rst:1370 +#: 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, " @@ -2072,7 +2090,7 @@ msgid "" "example::" msgstr "" -#: c-api/typeobj.rst:1384 +#: 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 " @@ -2087,7 +2105,7 @@ msgid "" "in a safe order." msgstr "" -#: c-api/typeobj.rst:1395 +#: 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 " @@ -2095,7 +2113,7 @@ msgid "" "is not involved and :c:member:`~PyTypeObject.tp_dealloc` is called directly." msgstr "" -#: c-api/typeobj.rst:1401 +#: 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 " @@ -2105,7 +2123,7 @@ msgid "" "invoke :c:member:`~PyTypeObject.tp_clear`." msgstr "" -#: c-api/typeobj.rst:1414 +#: 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:" @@ -2113,18 +2131,18 @@ msgid "" "are all inherited from the base type if they are all zero in the subtype." msgstr "" -#: c-api/typeobj.rst:1422 +#: c-api/typeobj.rst:1434 msgid "" "An optional pointer to the rich comparison function, whose signature is::" msgstr "" -#: c-api/typeobj.rst:1426 +#: 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:1429 +#: 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 " @@ -2132,74 +2150,74 @@ msgid "" "set an exception condition." msgstr "" -#: c-api/typeobj.rst:1434 +#: 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:1438 +#: c-api/typeobj.rst:1450 msgid "Constant" msgstr "Constante" -#: c-api/typeobj.rst:1438 +#: c-api/typeobj.rst:1450 msgid "Comparison" msgstr "Comparaison" -#: c-api/typeobj.rst:1440 +#: c-api/typeobj.rst:1452 msgid ":const:`Py_LT`" -msgstr "" +msgstr ":const:`Py_LT`" -#: c-api/typeobj.rst:1440 +#: c-api/typeobj.rst:1452 msgid "``<``" msgstr "``<``" -#: c-api/typeobj.rst:1442 +#: c-api/typeobj.rst:1454 msgid ":const:`Py_LE`" -msgstr "" +msgstr ":const:`Py_LE`" -#: c-api/typeobj.rst:1442 +#: c-api/typeobj.rst:1454 msgid "``<=``" msgstr "``<=``" -#: c-api/typeobj.rst:1444 +#: c-api/typeobj.rst:1456 msgid ":const:`Py_EQ`" -msgstr "" +msgstr ":const:`Py_EQ`" -#: c-api/typeobj.rst:1444 +#: c-api/typeobj.rst:1456 msgid "``==``" msgstr "``==``" -#: c-api/typeobj.rst:1446 +#: c-api/typeobj.rst:1458 msgid ":const:`Py_NE`" -msgstr "" +msgstr ":const:`Py_NE`" -#: c-api/typeobj.rst:1446 +#: c-api/typeobj.rst:1458 msgid "``!=``" msgstr "``!=``" -#: c-api/typeobj.rst:1448 +#: c-api/typeobj.rst:1460 msgid ":const:`Py_GT`" -msgstr "" +msgstr ":const:`Py_GT`" -#: c-api/typeobj.rst:1448 +#: c-api/typeobj.rst:1460 msgid "``>``" msgstr "``>``" -#: c-api/typeobj.rst:1450 +#: c-api/typeobj.rst:1462 msgid ":const:`Py_GE`" -msgstr "" +msgstr ":const:`Py_GE`" -#: c-api/typeobj.rst:1450 +#: c-api/typeobj.rst:1462 msgid "``>=``" msgstr "``>=``" -#: c-api/typeobj.rst:1453 +#: c-api/typeobj.rst:1465 msgid "" "The following macro is defined to ease writing rich comparison functions:" msgstr "" -#: c-api/typeobj.rst:1457 +#: 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 " @@ -2207,15 +2225,15 @@ msgid "" "specifies the requested operation, as for :c:func:`PyObject_RichCompare`." msgstr "" -#: c-api/typeobj.rst:1463 +#: c-api/typeobj.rst:1475 msgid "The return value's reference count is properly incremented." msgstr "" -#: c-api/typeobj.rst:1465 +#: c-api/typeobj.rst:1477 msgid "On error, sets an exception and returns ``NULL`` from the function." msgstr "" -#: c-api/typeobj.rst:1473 +#: 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:" @@ -2223,7 +2241,7 @@ msgid "" "tp_richcompare` and :c:member:`~PyTypeObject.tp_hash` are both ``NULL``." msgstr "" -#: c-api/typeobj.rst:1480 +#: 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 " @@ -2231,23 +2249,23 @@ msgid "" "will not be able to participate in any comparisons." msgstr "" -#: c-api/typeobj.rst:1489 +#: 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 :c:func:`PyWeakref_\\*` " -"functions. The instance structure needs to include a field of type :c:type:" +"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:1496 +#: 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:1501 +#: 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 " @@ -2256,7 +2274,7 @@ msgid "" "not be a problem." msgstr "" -#: c-api/typeobj.rst:1506 +#: 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 " @@ -2265,7 +2283,7 @@ msgid "" "tp_weaklistoffset` of that slot's offset." msgstr "" -#: c-api/typeobj.rst:1511 +#: 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 " @@ -2273,31 +2291,31 @@ msgid "" "`~PyTypeObject.tp_weaklistoffset`." msgstr "" -#: c-api/typeobj.rst:1516 +#: 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:1523 +#: 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:1527 +#: c-api/typeobj.rst:1539 msgid "This function has the same signature as :c:func:`PyObject_GetIter`::" msgstr "" -#: c-api/typeobj.rst:1538 +#: 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:1543 +#: 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, " @@ -2305,74 +2323,74 @@ msgid "" "this type are iterators." msgstr "" -#: c-api/typeobj.rst:1548 +#: 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:1552 +#: c-api/typeobj.rst:1564 msgid "This function has the same signature as :c:func:`PyIter_Next`." msgstr "" -#: c-api/typeobj.rst:1561 +#: 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:1564 +#: 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:1569 +#: 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:1575 +#: 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:1579 +#: 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:1584 +#: 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:1590 +#: 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:1593 +#: 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:1598 +#: 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:1604 +#: 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 " @@ -2380,7 +2398,7 @@ msgid "" "metatype." msgstr "" -#: c-api/typeobj.rst:1612 +#: 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 " @@ -2388,7 +2406,7 @@ msgid "" "valid C99 address constants." msgstr "" -#: c-api/typeobj.rst:1617 +#: 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. " @@ -2396,27 +2414,27 @@ msgid "" "strictly standard conforming in this particular behavior." msgstr "" -#: c-api/typeobj.rst:1623 +#: 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:1628 +#: c-api/typeobj.rst:1640 msgid "This field is not inherited by subtypes (obviously)." msgstr "" -#: c-api/typeobj.rst:1632 +#: 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:1638 +#: c-api/typeobj.rst:1650 msgid "The type's dictionary is stored here by :c:func:`PyType_Ready`." msgstr "" -#: c-api/typeobj.rst:1640 +#: 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 " @@ -2425,43 +2443,43 @@ msgid "" "they don't correspond to overloaded operations (like :meth:`__add__`)." msgstr "" -#: c-api/typeobj.rst:1648 +#: 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:1653 +#: 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:1658 +#: 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:1664 +#: c-api/typeobj.rst:1676 msgid "An optional pointer to a \"descriptor get\" function." msgstr "" -#: c-api/typeobj.rst:1682 c-api/typeobj.rst:1794 c-api/typeobj.rst:1818 +#: 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:1679 +#: 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:1686 +#: c-api/typeobj.rst:1698 msgid "The *value* argument is set to ``NULL`` to delete the value." msgstr "" -#: c-api/typeobj.rst:1697 +#: 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 " @@ -2469,13 +2487,13 @@ msgid "" "func:`PyObject_GenericGetAttr`." msgstr "" -#: c-api/typeobj.rst:1702 +#: 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:1705 +#: 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, " @@ -2491,13 +2509,13 @@ msgid "" "the very end of the structure." msgstr "" -#: c-api/typeobj.rst:1717 +#: 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:1724 +#: 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 " @@ -2507,7 +2525,7 @@ msgid "" "it is done for you by :c:func:`_PyObject_GetDictPtr`.)" msgstr "" -#: c-api/typeobj.rst:1732 +#: 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 " @@ -2516,7 +2534,7 @@ msgid "" "should not be a problem." msgstr "" -#: c-api/typeobj.rst:1737 +#: 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, " @@ -2524,14 +2542,14 @@ msgid "" "`~PyTypeObject.tp_dictoffset` is set to that slot's offset." msgstr "" -#: c-api/typeobj.rst:1742 +#: 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:1745 +#: 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. " @@ -2539,17 +2557,17 @@ msgid "" "though.)" msgstr "" -#: c-api/typeobj.rst:1751 +#: 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:1757 +#: c-api/typeobj.rst:1769 msgid "An optional pointer to an instance initialization function." msgstr "" -#: c-api/typeobj.rst:1759 +#: 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:" @@ -2557,14 +2575,14 @@ msgid "" "meth:`__init__` method again." msgstr "" -#: c-api/typeobj.rst:1768 +#: 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:1772 +#: 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 :" @@ -2576,43 +2594,43 @@ msgid "" "subtype's :c:member:`~PyTypeObject.tp_init` is called." msgstr "" -#: c-api/typeobj.rst:1779 +#: c-api/typeobj.rst:1791 msgid "Returns ``0`` on success, ``-1`` and sets an exception on error." msgstr "" -#: c-api/typeobj.rst:1787 +#: c-api/typeobj.rst:1799 msgid "" "For :ref:`static types ` this field does not have a default." msgstr "" -#: c-api/typeobj.rst:1792 +#: c-api/typeobj.rst:1804 msgid "An optional pointer to an instance allocation function." msgstr "" -#: c-api/typeobj.rst:1800 +#: 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:1805 +#: 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:1809 +#: 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:1816 +#: c-api/typeobj.rst:1828 msgid "An optional pointer to an instance creation function." msgstr "" -#: c-api/typeobj.rst:1822 +#: 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 " @@ -2621,7 +2639,7 @@ msgid "" "that type (but not an unrelated type)." msgstr "" -#: c-api/typeobj.rst:1828 +#: 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 " @@ -2633,20 +2651,20 @@ msgid "" "be deferred to :c:member:`~PyTypeObject.tp_init`." msgstr "" -#: c-api/typeobj.rst:1836 +#: 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:1841 +#: 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:1847 +#: 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 " @@ -2654,39 +2672,39 @@ msgid "" "factory function." msgstr "" -#: c-api/typeobj.rst:1855 +#: c-api/typeobj.rst:1867 msgid "" "An optional pointer to an instance deallocation function. Its signature is::" msgstr "" -#: c-api/typeobj.rst:1859 +#: c-api/typeobj.rst:1871 msgid "" "An initializer that is compatible with this signature is :c:func:" "`PyObject_Free`." msgstr "" -#: c-api/typeobj.rst:1863 +#: 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:1868 +#: 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:1872 +#: c-api/typeobj.rst:1884 msgid "For static subtypes, :c:type:`PyBaseObject_Type` uses PyObject_Del." msgstr "" -#: c-api/typeobj.rst:1877 +#: c-api/typeobj.rst:1889 msgid "An optional pointer to a function called by the garbage collector." msgstr "" -#: c-api/typeobj.rst:1879 +#: 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 " @@ -2698,74 +2716,88 @@ msgid "" "instance. The signature is::" msgstr "" -#: c-api/typeobj.rst:1889 +#: 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:1899 +#: 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:1905 +#: c-api/typeobj.rst:1917 msgid "Tuple of base types." msgstr "" -#: c-api/typeobj.rst:1907 +#: 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 "" -"This is set for types created by a class statement. It should be ``NULL`` " -"for statically defined types." +"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:1933 c-api/typeobj.rst:1952 c-api/typeobj.rst:1966 +#: 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:1917 +#: 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:1923 +#: 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:1929 +#: c-api/typeobj.rst:1954 msgid "Unused. Internal use only." msgstr "" -#: c-api/typeobj.rst:1938 +#: c-api/typeobj.rst:1963 msgid "List of weak references to subclasses. Internal use only." msgstr "" -#: c-api/typeobj.rst:1947 +#: 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:1957 +#: c-api/typeobj.rst:1982 msgid "" "This field is deprecated. Use :c:member:`~PyTypeObject.tp_finalize` instead." msgstr "" -#: c-api/typeobj.rst:1962 +#: c-api/typeobj.rst:1987 msgid "Used to index into the method cache. Internal use only." msgstr "" -#: c-api/typeobj.rst:1971 +#: c-api/typeobj.rst:1996 msgid "" "An optional pointer to an instance finalization function. Its signature is::" msgstr "" -#: c-api/typeobj.rst:1975 +#: 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 " @@ -2775,24 +2807,38 @@ msgid "" "object in a sane state." msgstr "" -#: c-api/typeobj.rst:1982 +#: 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:1999 +#: c-api/typeobj.rst:2024 msgid "" -"For this field to be taken into account (even through inheritance), you must " -"also set the :const:`Py_TPFLAGS_HAVE_FINALIZE` flags bit." +"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:2008 +#: c-api/typeobj.rst:2047 msgid "\"Safe object finalization\" (:pep:`442`)" msgstr "" -#: c-api/typeobj.rst:2013 +#: 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__``. " @@ -2800,74 +2846,61 @@ msgid "" "attr:`__new__` and :attr:`__init__` is used." msgstr "" -#: c-api/typeobj.rst:2021 +#: c-api/typeobj.rst:2060 msgid "This field is never inherited." msgstr "" -#: c-api/typeobj.rst:2023 +#: 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:2026 -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:2040 +#: c-api/typeobj.rst:2068 msgid "Static Types" msgstr "" -#: c-api/typeobj.rst:2042 +#: 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:2046 +#: c-api/typeobj.rst:2074 msgid "" "This results in types that are limited relative to types defined in Python:" msgstr "" -#: c-api/typeobj.rst:2048 +#: 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:2050 +#: 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:2052 +#: 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:2056 +#: c-api/typeobj.rst:2084 msgid "" -"Also, since :c:type:`PyTypeObject` is not part of the :ref:`stable ABI " -"`, any extension modules using static types must be compiled for a " -"specific Python minor version." +"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:2064 +#: c-api/typeobj.rst:2092 msgid "Heap Types" msgstr "" -#: c-api/typeobj.rst:2066 +#: 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 " @@ -2875,29 +2908,29 @@ msgid "" "`Py_TPFLAGS_HEAPTYPE` flag set." msgstr "" -#: c-api/typeobj.rst:2071 +#: 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:2079 +#: c-api/typeobj.rst:2107 msgid "Number Object Structures" msgstr "" -#: c-api/typeobj.rst:2086 +#: 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:2416 +#: c-api/typeobj.rst:2444 msgid "Here is the structure definition::" msgstr "" -#: c-api/typeobj.rst:2139 +#: 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 " @@ -2907,30 +2940,30 @@ msgid "" "and set an exception." msgstr "" -#: c-api/typeobj.rst:2148 +#: 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:2193 +#: c-api/typeobj.rst:2221 msgid "Mapping Object Structures" msgstr "" -#: c-api/typeobj.rst:2200 +#: 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:2205 +#: 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:2211 +#: 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:`!" @@ -2938,7 +2971,7 @@ msgid "" "`PyMapping_Check` function to return ``1``, it can be ``NULL`` otherwise." msgstr "" -#: c-api/typeobj.rst:2219 +#: 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:" @@ -2948,17 +2981,17 @@ msgid "" "deletion." msgstr "" -#: c-api/typeobj.rst:2230 +#: c-api/typeobj.rst:2258 msgid "Sequence Object Structures" msgstr "" -#: c-api/typeobj.rst:2237 +#: 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:2242 +#: 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 " @@ -2966,21 +2999,21 @@ msgid "" "member:`~PySequenceMethods.sq_ass_item` slots." msgstr "" -#: c-api/typeobj.rst:2249 +#: 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:2255 +#: 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:2261 +#: 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 " @@ -2989,7 +3022,7 @@ msgid "" "``1``, it can be ``NULL`` otherwise." msgstr "" -#: c-api/typeobj.rst:2267 +#: 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 " @@ -2997,7 +3030,7 @@ msgid "" "the index is passed as is to the function." msgstr "" -#: c-api/typeobj.rst:2274 +#: 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:" @@ -3006,14 +3039,14 @@ msgid "" "``NULL`` if the object does not support item assignment and deletion." msgstr "" -#: c-api/typeobj.rst:2283 +#: 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:2290 +#: 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 " @@ -3023,7 +3056,7 @@ msgid "" "c:member:`~PyNumberMethods.nb_inplace_add` slot." msgstr "" -#: c-api/typeobj.rst:2299 +#: 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 " @@ -3033,70 +3066,70 @@ msgid "" "via the :c:member:`~PyNumberMethods.nb_inplace_multiply` slot." msgstr "" -#: c-api/typeobj.rst:2310 +#: c-api/typeobj.rst:2338 msgid "Buffer Object Structures" msgstr "" -#: c-api/typeobj.rst:2318 +#: 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:2373 c-api/typeobj.rst:2438 c-api/typeobj.rst:2458 +#: 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:2328 +#: 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:2332 +#: c-api/typeobj.rst:2360 msgid "" "Check if the request can be met. If not, raise :c:data:`PyExc_BufferError`, " -"set :c:data:`view->obj` to ``NULL`` and return ``-1``." +"set :c:expr:`view->obj` to ``NULL`` and return ``-1``." msgstr "" -#: c-api/typeobj.rst:2335 +#: c-api/typeobj.rst:2363 msgid "Fill in the requested fields." msgstr "" -#: c-api/typeobj.rst:2337 +#: c-api/typeobj.rst:2365 msgid "Increment an internal counter for the number of exports." msgstr "" -#: c-api/typeobj.rst:2339 +#: c-api/typeobj.rst:2367 msgid "" -"Set :c:data:`view->obj` to *exporter* and increment :c:data:`view->obj`." +"Set :c:expr:`view->obj` to *exporter* and increment :c:expr:`view->obj`." msgstr "" -#: c-api/typeobj.rst:2341 +#: c-api/typeobj.rst:2369 msgid "Return ``0``." msgstr "" -#: c-api/typeobj.rst:2343 +#: 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:2346 +#: c-api/typeobj.rst:2374 msgid "" "Re-export: Each member of the tree acts as the exporting object and sets :c:" -"data:`view->obj` to a new reference to itself." +"expr:`view->obj` to a new reference to itself." msgstr "" -#: c-api/typeobj.rst:2349 +#: c-api/typeobj.rst:2377 msgid "" "Redirect: The buffer request is redirected to the root object of the tree. " -"Here, :c:data:`view->obj` will be a new reference to the root object." +"Here, :c:expr:`view->obj` will be a new reference to the root object." msgstr "" -#: c-api/typeobj.rst:2353 +#: 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 " @@ -3104,7 +3137,7 @@ msgid "" "types>`." msgstr "" -#: c-api/typeobj.rst:2358 +#: 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:" @@ -3113,19 +3146,19 @@ msgid "" "internal` are read-only for the consumer." msgstr "" -#: c-api/typeobj.rst:2365 +#: 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:2368 +#: 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:2377 +#: 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 " @@ -3133,15 +3166,15 @@ msgid "" "these optional steps:" msgstr "" -#: c-api/typeobj.rst:2382 +#: c-api/typeobj.rst:2410 msgid "Decrement an internal counter for the number of exports." msgstr "" -#: c-api/typeobj.rst:2384 +#: c-api/typeobj.rst:2412 msgid "If the counter is ``0``, free all memory associated with *view*." msgstr "" -#: c-api/typeobj.rst:2386 +#: 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 " @@ -3149,67 +3182,68 @@ msgid "" "*view* argument." msgstr "" -#: c-api/typeobj.rst:2392 +#: c-api/typeobj.rst:2420 msgid "" -"This function MUST NOT decrement :c:data:`view->obj`, since that is done " +"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:2397 +#: 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:2405 +#: c-api/typeobj.rst:2433 msgid "Async Object Structures" msgstr "" -#: c-api/typeobj.rst:2413 +#: 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:2431 +#: 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:2434 +#: 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:2442 +#: c-api/typeobj.rst:2470 msgid "" -"Must return an :term:`awaitable` object. See :meth:`__anext__` for details." +"Must return an :term:`asynchronous iterator` object. See :meth:`__anext__` " +"for details." msgstr "" -#: c-api/typeobj.rst:2444 +#: 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:2453 +#: 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:2462 +#: 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:2471 +#: c-api/typeobj.rst:2500 msgid "Slot Type typedefs" msgstr "" -#: c-api/typeobj.rst:2475 +#: 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 " @@ -3223,80 +3257,80 @@ msgid "" "member:`~PyTypeObject.tp_basicsize`." msgstr "" -#: c-api/typeobj.rst:2485 +#: 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:2492 +#: c-api/typeobj.rst:2521 msgid "See :c:member:`~PyTypeObject.tp_free`." msgstr "" -#: c-api/typeobj.rst:2496 +#: c-api/typeobj.rst:2525 msgid "See :c:member:`~PyTypeObject.tp_new`." msgstr "" -#: c-api/typeobj.rst:2500 +#: c-api/typeobj.rst:2529 msgid "See :c:member:`~PyTypeObject.tp_init`." msgstr "" -#: c-api/typeobj.rst:2504 +#: c-api/typeobj.rst:2533 msgid "See :c:member:`~PyTypeObject.tp_repr`." msgstr "" -#: c-api/typeobj.rst:2517 +#: c-api/typeobj.rst:2546 msgid "Return the value of the named attribute for the object." msgstr "" -#: c-api/typeobj.rst:2523 +#: 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:2519 +#: c-api/typeobj.rst:2548 msgid "See :c:member:`~PyTypeObject.tp_getattro`." msgstr "" -#: c-api/typeobj.rst:2526 +#: c-api/typeobj.rst:2555 msgid "See :c:member:`~PyTypeObject.tp_setattro`." msgstr "" -#: c-api/typeobj.rst:2530 -msgid "See :c:member:`~PyTypeObject.tp_descrget`." +#: c-api/typeobj.rst:2559 +msgid "See :c:member:`~PyTypeObject.tp_descr_get`." msgstr "" -#: c-api/typeobj.rst:2534 -msgid "See :c:member:`~PyTypeObject.tp_descrset`." +#: c-api/typeobj.rst:2563 +msgid "See :c:member:`~PyTypeObject.tp_descr_set`." msgstr "" -#: c-api/typeobj.rst:2538 +#: c-api/typeobj.rst:2567 msgid "See :c:member:`~PyTypeObject.tp_hash`." msgstr "" -#: c-api/typeobj.rst:2542 +#: c-api/typeobj.rst:2571 msgid "See :c:member:`~PyTypeObject.tp_richcompare`." msgstr "" -#: c-api/typeobj.rst:2546 +#: c-api/typeobj.rst:2575 msgid "See :c:member:`~PyTypeObject.tp_iter`." msgstr "" -#: c-api/typeobj.rst:2550 +#: c-api/typeobj.rst:2579 msgid "See :c:member:`~PyTypeObject.tp_iternext`." msgstr "" -#: c-api/typeobj.rst:2564 +#: c-api/typeobj.rst:2593 msgid "See :c:member:`~PyAsyncMethods.am_send`." msgstr "" -#: c-api/typeobj.rst:2580 +#: c-api/typeobj.rst:2609 msgid "Examples" msgstr "Exemples" -#: c-api/typeobj.rst:2582 +#: 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 " @@ -3304,33 +3338,33 @@ msgid "" "and :ref:`new-types-topics`." msgstr "" -#: c-api/typeobj.rst:2587 +#: c-api/typeobj.rst:2616 msgid "A basic :ref:`static type `::" msgstr "" -#: c-api/typeobj.rst:2604 +#: 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:2648 +#: c-api/typeobj.rst:2677 msgid "A type that supports weakrefs, instance dicts, and hashing::" msgstr "" -#: c-api/typeobj.rst:2675 +#: 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:2694 +#: c-api/typeobj.rst:2723 msgid "" "The simplest :ref:`static type ` with fixed-length instances::" msgstr "" -#: c-api/typeobj.rst:2705 +#: c-api/typeobj.rst:2734 msgid "" "The simplest :ref:`static type ` with variable-length " "instances::" diff --git a/c-api/unicode.po b/c-api/unicode.po index 37ca35fa87..e9bbe2915e 100644 --- a/c-api/unicode.po +++ b/c-api/unicode.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-09-23 16:16+0200\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" @@ -16,11 +16,11 @@ msgstr "" #: c-api/unicode.rst:6 msgid "Unicode Objects and Codecs" -msgstr "" +msgstr "Objets Unicode et Codecs" #: c-api/unicode.rst:12 msgid "Unicode Objects" -msgstr "" +msgstr "Objets Unicode" #: c-api/unicode.rst:14 msgid "" @@ -31,19 +31,31 @@ msgid "" "65536; otherwise, code points must be below 1114112 (which is the full " "Unicode range)." msgstr "" +"Depuis l'implémentation de :pep:`393` dans Python 3.3, les objets Unicode " +"utilisent une variété de représentations internes, pour permettre de gérer " +"l'intervalle complet des caractères Unicode en restant efficace en termes de " +"mémoire. Il y a des cas spéciaux pour les chaînes où tous les points de code " +"sont inférieurs à 128, 256, ou 65536 ; sinon, les points de code doivent " +"être inférieurs à 1114112 (qui est l'intervalle Unicode complet)." #: c-api/unicode.rst:20 msgid "" -":c:type:`Py_UNICODE*` and UTF-8 representations are created on demand and " -"cached in the Unicode object. The :c:type:`Py_UNICODE*` representation is " +":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 "" @@ -51,14 +63,21 @@ msgid "" "Unicode API. They use the most efficient representation allowed by the " "implementation." msgstr "" +"Les objets Unicode « canoniques » sont tous les objets créés par une API " +"Unicode non-dépréciée. Ils utilisent la représentation la plus efficace " +"permise par l'implémentation." #: c-api/unicode.rst:31 msgid "" "\"legacy\" Unicode objects have been created through one of the deprecated " -"APIs (typically :c:func:`PyUnicode_FromUnicode`) and only bear the :c:type:" +"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 "" @@ -66,16 +85,21 @@ msgid "" "APIs. All Unicode objects will be \"canonical\" since then. See :pep:`623` " "for more information." msgstr "" +"Les objets Unicode « historiques » vont être supprimés de Python 3.12 avec " +"les APIs dépréciées. Tous les objets Unicode vont être « canoniques » à " +"partir de là. Voir :pep:`623` pour plus d'information." #: c-api/unicode.rst:43 msgid "Unicode Type" -msgstr "" +msgstr "Type Unicode" #: c-api/unicode.rst:45 msgid "" "These are the basic Unicode object types used for the Unicode implementation " "in Python:" msgstr "" +"Voici les types d'objets Unicode utilisés pour l'implémentation Unicode en " +"Python :" #: c-api/unicode.rst:52 msgid "" @@ -83,12 +107,17 @@ msgid "" "characters of 32 bits, 16 bits and 8 bits, respectively. When dealing with " "single Unicode characters, use :c:type:`Py_UCS4`." msgstr "" +"Voici les *typedefs* pour les types entiers non signés suffisamment large " +"pour contenir des caractères de 32 bits, 16 bits et 8 bits, respectivement. " +"Pour traiter des caractères uniques, utilisez :c:type:`Py_UCS4`." #: c-api/unicode.rst:61 msgid "" -"This is a typedef of :c:type:`wchar_t`, which is a 16-bit type or 32-bit " +"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 "" @@ -96,6 +125,9 @@ msgid "" "whether you selected a \"narrow\" or \"wide\" Unicode version of Python at " "build time." msgstr "" +"Dans les versions précédentes, ceci était un type 16-bit ou un type 32-bit " +"selon que vous choisissiez une version Unicode *narrow* ou *wide* de Python " +"à la compilation." #: c-api/unicode.rst:74 msgid "" @@ -198,9 +230,9 @@ msgstr "" #: c-api/unicode.rst:194 msgid "" -"Read a character from a Unicode object *o*, which must be in the \"canonical" -"\" representation. This is less efficient than :c:func:`PyUnicode_READ` if " -"you do multiple consecutive reads." +"Read a character from a Unicode object *o*, which must be in the " +"\"canonical\" representation. This is less efficient than :c:func:" +"`PyUnicode_READ` if you do multiple consecutive reads." msgstr "" #: c-api/unicode.rst:203 @@ -235,7 +267,7 @@ msgid "" "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:type:`const char *`. The *o* argument has to be a Unicode " +"pointer to :c:expr:`const char *`. The *o* argument has to be a Unicode " "object (not checked)." msgstr "" @@ -472,7 +504,7 @@ msgstr "Commentaires" #: c-api/unicode.rst:464 msgid ":attr:`%%`" -msgstr "" +msgstr ":attr:`%%`" #: c-api/unicode.rst:464 msgid "*n/a*" @@ -484,7 +516,7 @@ msgstr "" #: c-api/unicode.rst:466 msgid ":attr:`%c`" -msgstr "" +msgstr ":attr:`%c`" #: c-api/unicode.rst:469 c-api/unicode.rst:505 msgid "int" @@ -496,7 +528,7 @@ msgstr "" #: c-api/unicode.rst:469 msgid ":attr:`%d`" -msgstr "" +msgstr ":attr:`%d`" #: c-api/unicode.rst:469 msgid "Equivalent to ``printf(\"%d\")``. [1]_" @@ -504,7 +536,7 @@ msgstr "" #: c-api/unicode.rst:472 msgid ":attr:`%u`" -msgstr "" +msgstr ":attr:`%u`" #: c-api/unicode.rst:472 msgid "unsigned int" @@ -516,7 +548,7 @@ msgstr "" #: c-api/unicode.rst:475 msgid ":attr:`%ld`" -msgstr "" +msgstr ":attr:`%ld`" #: c-api/unicode.rst:478 msgid "long" @@ -528,7 +560,7 @@ msgstr "" #: c-api/unicode.rst:478 msgid ":attr:`%li`" -msgstr "" +msgstr ":attr:`%li`" #: c-api/unicode.rst:478 msgid "Equivalent to ``printf(\"%li\")``. [1]_" @@ -536,7 +568,7 @@ msgstr "" #: c-api/unicode.rst:481 msgid ":attr:`%lu`" -msgstr "" +msgstr ":attr:`%lu`" #: c-api/unicode.rst:481 msgid "unsigned long" @@ -548,7 +580,7 @@ msgstr "" #: c-api/unicode.rst:484 msgid ":attr:`%lld`" -msgstr "" +msgstr ":attr:`%lld`" #: c-api/unicode.rst:487 msgid "long long" @@ -560,7 +592,7 @@ msgstr "" #: c-api/unicode.rst:487 msgid ":attr:`%lli`" -msgstr "" +msgstr ":attr:`%lli`" #: c-api/unicode.rst:487 msgid "Equivalent to ``printf(\"%lli\")``. [1]_" @@ -568,7 +600,7 @@ msgstr "" #: c-api/unicode.rst:490 msgid ":attr:`%llu`" -msgstr "" +msgstr ":attr:`%llu`" #: c-api/unicode.rst:490 msgid "unsigned long long" @@ -580,10 +612,10 @@ msgstr "" #: c-api/unicode.rst:493 msgid ":attr:`%zd`" -msgstr "" +msgstr ":attr:`%zd`" #: c-api/unicode.rst:496 -msgid "Py_ssize_t" +msgid ":c:type:`\\ Py_ssize_t`" msgstr "" #: c-api/unicode.rst:493 @@ -592,7 +624,7 @@ msgstr "" #: c-api/unicode.rst:496 msgid ":attr:`%zi`" -msgstr "" +msgstr ":attr:`%zi`" #: c-api/unicode.rst:496 msgid "Equivalent to ``printf(\"%zi\")``. [1]_" @@ -600,7 +632,7 @@ msgstr "" #: c-api/unicode.rst:499 msgid ":attr:`%zu`" -msgstr "" +msgstr ":attr:`%zu`" #: c-api/unicode.rst:499 msgid "size_t" @@ -612,7 +644,7 @@ msgstr "" #: c-api/unicode.rst:502 msgid ":attr:`%i`" -msgstr "" +msgstr ":attr:`%i`" #: c-api/unicode.rst:502 msgid "Equivalent to ``printf(\"%i\")``. [1]_" @@ -620,7 +652,7 @@ msgstr "" #: c-api/unicode.rst:505 msgid ":attr:`%x`" -msgstr "" +msgstr ":attr:`%x`" #: c-api/unicode.rst:505 msgid "Equivalent to ``printf(\"%x\")``. [1]_" @@ -628,7 +660,7 @@ msgstr "" #: c-api/unicode.rst:508 msgid ":attr:`%s`" -msgstr "" +msgstr ":attr:`%s`" #: c-api/unicode.rst:508 msgid "const char\\*" @@ -640,7 +672,7 @@ msgstr "" #: c-api/unicode.rst:511 msgid ":attr:`%p`" -msgstr "" +msgstr ":attr:`%p`" #: c-api/unicode.rst:511 msgid "const void\\*" @@ -648,14 +680,14 @@ msgstr "" #: c-api/unicode.rst:511 msgid "" -"The hex representation of a C pointer. Mostly equivalent to ``printf(\"%p" -"\")`` except that it is guaranteed to start with the literal ``0x`` " -"regardless of what the platform's ``printf`` yields." +"The hex representation of a C pointer. Mostly equivalent to " +"``printf(\"%p\")`` except that it is guaranteed to start with the literal " +"``0x`` regardless of what the platform's ``printf`` yields." msgstr "" #: c-api/unicode.rst:519 msgid ":attr:`%A`" -msgstr "" +msgstr ":attr:`%A`" #: c-api/unicode.rst:522 c-api/unicode.rst:534 msgid "PyObject\\*" @@ -667,7 +699,7 @@ msgstr "" #: c-api/unicode.rst:522 msgid ":attr:`%U`" -msgstr "" +msgstr ":attr:`%U`" #: c-api/unicode.rst:522 #, fuzzy @@ -676,7 +708,7 @@ msgstr "Un objet Unicode." #: c-api/unicode.rst:524 msgid ":attr:`%V`" -msgstr "" +msgstr ":attr:`%V`" #: c-api/unicode.rst:524 msgid "PyObject\\*, const char\\*" @@ -691,7 +723,7 @@ msgstr "" #: c-api/unicode.rst:531 msgid ":attr:`%S`" -msgstr "" +msgstr ":attr:`%S`" #: c-api/unicode.rst:531 msgid "The result of calling :c:func:`PyObject_Str`." @@ -699,7 +731,7 @@ msgstr "" #: c-api/unicode.rst:534 msgid ":attr:`%R`" -msgstr "" +msgstr ":attr:`%R`" #: c-api/unicode.rst:534 msgid "The result of calling :c:func:`PyObject_Repr`." @@ -736,8 +768,8 @@ msgstr "" #: c-api/unicode.rst:557 msgid "" -"Support width and precision formatter for ``\"%s\"``, ``\"%A\"``, ``\"%U" -"\"``, ``\"%V\"``, ``\"%S\"``, ``\"%R\"`` added." +"Support width and precision formatter for ``\"%s\"``, ``\"%A\"``, " +"``\"%U\"``, ``\"%V\"``, ``\"%S\"``, ``\"%R\"`` added." msgstr "" #: c-api/unicode.rst:564 @@ -784,8 +816,8 @@ msgstr "" #: c-api/unicode.rst:610 msgid "" -"Fill a string with a character: write *fill_char* into ``unicode[start:start" -"+length]``." +"Fill a string with a character: write *fill_char* into ``unicode[start:" +"start+length]``." msgstr "" #: c-api/unicode.rst:613 @@ -887,7 +919,7 @@ 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: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 " @@ -919,7 +951,7 @@ msgstr "" 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:type:`Py_UNICODE*` string may contain embedded null code " +"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 "" @@ -955,9 +987,9 @@ 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 " +"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 "" @@ -993,10 +1025,10 @@ 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." +"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 @@ -1036,7 +1068,7 @@ 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:type:`PyBytesObject*` which must be released when it " +"*result* must be a :c:expr:`PyBytesObject*` which must be released when it " "is no longer used." msgstr "" @@ -1056,7 +1088,7 @@ 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:type:`PyUnicodeObject*` " +"objects are output as-is. *result* must be a :c:expr:`PyUnicodeObject*` " "which must be released when it is no longer used." msgstr "" @@ -1113,26 +1145,26 @@ msgid "wchar_t Support" msgstr "" #: c-api/unicode.rst:942 -msgid ":c:type:`wchar_t` support for platforms which support it:" +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:type:`wchar_t` buffer *w* of the given " +"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:type:`wchar_t` buffer *w*. At " -"most *size* :c:type:`wchar_t` characters are copied (excluding a possibly " -"trailing null termination character). Return the number of :c:type:" +"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:type:`wchar_t*` string may or may not be null-terminated. It " -"is the responsibility of the caller to make sure that the :c:type:`wchar_t*` " +"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:type:`wchar_t*` string might contain null characters, which " +"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 "" @@ -1141,23 +1173,23 @@ 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:type:`wchar_t` string " +"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:type:" +"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 " +"`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:type:`wchar_t*` " +"Raises a :exc:`ValueError` if *size* is ``NULL`` and the :c:expr:`wchar_t*` " "string contains null characters." msgstr "" @@ -1198,7 +1230,7 @@ msgstr "" #: c-api/unicode.rst:1011 msgid "" -"The codecs all use a similar interface. Only deviation from the following " +"The codecs all use a similar interface. Only deviations from the following " "generic ones are documented for simplicity." msgstr "" @@ -1237,7 +1269,7 @@ msgid "" "``NULL`` if an exception was raised by the codec." msgstr "" -#: c-api/unicode.rst:1312 +#: c-api/unicode.rst:1313 msgid "" "Part of the old-style :c:type:`Py_UNICODE` API; please migrate to using :c:" "func:`PyUnicode_AsEncodedString`." @@ -1291,57 +1323,59 @@ msgstr "" msgid "" "This caches the UTF-8 representation of the string in the Unicode object, " "and subsequent calls will return a pointer to the same buffer. The caller " -"is not responsible for deallocating the buffer." +"is not responsible for deallocating the buffer. The buffer is deallocated " +"and pointers to it become invalid when the Unicode object is garbage " +"collected." msgstr "" -#: c-api/unicode.rst:1113 +#: c-api/unicode.rst:1114 msgid "The return type is now ``const char *`` rather of ``char *``." msgstr "" -#: c-api/unicode.rst:1103 +#: c-api/unicode.rst:1104 msgid "This function is a part of the :ref:`limited API `." msgstr "" -#: c-api/unicode.rst:1109 +#: c-api/unicode.rst:1110 msgid "As :c:func:`PyUnicode_AsUTF8AndSize`, but does not store the size." msgstr "" -#: c-api/unicode.rst:1119 +#: 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:1126 +#: 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:1130 +#: c-api/unicode.rst:1131 msgid "UTF-32 Codecs" msgstr "" -#: c-api/unicode.rst:1132 +#: c-api/unicode.rst:1133 msgid "These are the UTF-32 codec APIs:" msgstr "" -#: c-api/unicode.rst:1138 +#: 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:1215 +#: 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:1149 +#: 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 " @@ -1349,21 +1383,21 @@ msgid "" "``-1`` or ``1``, any byte order mark is copied to the output." msgstr "" -#: c-api/unicode.rst:1228 +#: 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:1231 +#: c-api/unicode.rst:1232 msgid "If *byteorder* is ``NULL``, the codec starts in native order mode." msgstr "" -#: c-api/unicode.rst:1195 c-api/unicode.rst:1270 +#: 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:1165 +#: 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 " @@ -1372,53 +1406,53 @@ msgid "" "number of bytes that have been decoded will be stored in *consumed*." msgstr "" -#: c-api/unicode.rst:1174 +#: 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:1182 +#: 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:1263 +#: 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:1192 +#: 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:1199 +#: 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:1203 +#: c-api/unicode.rst:1204 msgid "UTF-16 Codecs" msgstr "" -#: c-api/unicode.rst:1205 +#: c-api/unicode.rst:1206 msgid "These are the UTF-16 codec APIs:" msgstr "" -#: c-api/unicode.rst:1211 +#: 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:1222 +#: 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 " @@ -1427,7 +1461,13 @@ msgid "" "result in either a ``\\ufeff`` or a ``\\ufffe`` character)." msgstr "" -#: c-api/unicode.rst:1239 +#: 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 " @@ -1437,47 +1477,47 @@ msgid "" "*consumed*." msgstr "" -#: c-api/unicode.rst:1248 +#: 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:1256 +#: 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:1266 +#: 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:1274 +#: 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:1278 +#: c-api/unicode.rst:1279 msgid "UTF-7 Codecs" msgstr "" -#: c-api/unicode.rst:1280 +#: c-api/unicode.rst:1281 msgid "These are the UTF-7 codec APIs:" msgstr "" -#: c-api/unicode.rst:1285 +#: 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:1292 +#: 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 " @@ -1485,14 +1525,14 @@ msgid "" "of bytes that have been decoded will be stored in *consumed*." msgstr "" -#: c-api/unicode.rst:1301 +#: 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:1305 +#: 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 " @@ -1500,173 +1540,173 @@ msgid "" "the Python \"utf-7\" codec." msgstr "" -#: c-api/unicode.rst:1316 +#: c-api/unicode.rst:1317 msgid "Unicode-Escape Codecs" msgstr "" -#: c-api/unicode.rst:1318 +#: c-api/unicode.rst:1319 msgid "These are the \"Unicode Escape\" codec APIs:" msgstr "" -#: c-api/unicode.rst:1324 +#: 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:1330 +#: 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:1337 +#: 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:1342 +#: 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:1346 +#: c-api/unicode.rst:1347 msgid "Raw-Unicode-Escape Codecs" msgstr "" -#: c-api/unicode.rst:1348 +#: c-api/unicode.rst:1349 msgid "These are the \"Raw Unicode Escape\" codec APIs:" msgstr "" -#: c-api/unicode.rst:1354 +#: 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:1360 +#: 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:1368 +#: 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:1374 +#: 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:1378 +#: c-api/unicode.rst:1379 msgid "Latin-1 Codecs" msgstr "" -#: c-api/unicode.rst:1380 +#: 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:1386 +#: 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:1392 +#: 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:1399 +#: 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:1406 +#: 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:1410 +#: c-api/unicode.rst:1411 msgid "ASCII Codecs" msgstr "" -#: c-api/unicode.rst:1412 +#: 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:1418 +#: 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:1424 +#: 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:1431 +#: 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:1438 +#: 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:1442 +#: c-api/unicode.rst:1443 msgid "Character Map Codecs" msgstr "" -#: c-api/unicode.rst:1444 +#: 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 mapping to " +"codecs included in the :mod:`encodings` package). The codec uses mappings to " "encode and decode characters. The mapping objects provided must support " "the :meth:`__getitem__` mapping interface; dictionaries and sequences work " "well." msgstr "" -#: c-api/unicode.rst:1450 +#: c-api/unicode.rst:1451 msgid "These are the mapping codec APIs:" msgstr "" -#: c-api/unicode.rst:1455 +#: 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:1459 +#: 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 " @@ -1676,14 +1716,14 @@ msgid "" "treated as undefined mappings and cause an error." msgstr "" -#: c-api/unicode.rst:1470 +#: 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:1474 +#: 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 " @@ -1691,68 +1731,68 @@ msgid "" "``None`` are treated as \"undefined mapping\" and cause an error." msgstr "" -#: c-api/unicode.rst:1483 +#: 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:1490 +#: 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:1493 +#: c-api/unicode.rst:1494 msgid "The following codec API is special in that maps Unicode to Unicode." msgstr "" -#: c-api/unicode.rst:1497 +#: 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:1501 +#: 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:1504 +#: 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:1508 +#: 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:1515 +#: 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:1522 +#: 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:1526 +#: c-api/unicode.rst:1527 msgid "MBCS codecs for Windows" msgstr "" -#: c-api/unicode.rst:1528 +#: 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 " @@ -1760,13 +1800,13 @@ msgid "" "is defined by the user settings on the machine running the codec." msgstr "" -#: c-api/unicode.rst:1535 +#: 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:1542 +#: 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 " @@ -1774,58 +1814,58 @@ msgid "" "will be stored in *consumed*." msgstr "" -#: c-api/unicode.rst:1550 +#: 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:1557 +#: 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:1566 +#: 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:1573 +#: 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:1577 +#: c-api/unicode.rst:1578 msgid "Methods & Slots" msgstr "" -#: c-api/unicode.rst:1583 +#: c-api/unicode.rst:1584 msgid "Methods and Slot Functions" msgstr "" -#: c-api/unicode.rst:1585 +#: 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:1589 +#: c-api/unicode.rst:1590 msgid "They all return ``NULL`` or ``-1`` if an exception occurs." msgstr "" -#: c-api/unicode.rst:1594 +#: c-api/unicode.rst:1595 msgid "Concat two strings giving a new Unicode string." msgstr "" -#: c-api/unicode.rst:1599 +#: 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 " @@ -1834,27 +1874,27 @@ msgid "" "list." msgstr "" -#: c-api/unicode.rst:1607 +#: 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 " +"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:1614 +#: 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:1621 +#: 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:1629 +#: 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* " @@ -1863,7 +1903,7 @@ msgid "" "indicates that an error occurred and an exception has been set." msgstr "" -#: c-api/unicode.rst:1639 +#: 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, " @@ -1872,36 +1912,36 @@ msgid "" "``-2`` indicates that an error occurred and an exception has been set." msgstr "" -#: c-api/unicode.rst:1647 +#: c-api/unicode.rst:1648 msgid "*start* and *end* are now adjusted to behave like ``str[start:end]``." msgstr "" -#: c-api/unicode.rst:1654 +#: 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:1661 +#: 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:1668 +#: 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:1671 +#: 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:1677 +#: 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 " @@ -1909,56 +1949,56 @@ msgid "" "string as ISO-8859-1 if it contains non-ASCII characters." msgstr "" -#: c-api/unicode.rst:1682 +#: c-api/unicode.rst:1683 msgid "This function does not raise exceptions." msgstr "" -#: c-api/unicode.rst:1687 +#: c-api/unicode.rst:1688 msgid "Rich compare two Unicode strings and return one of the following:" msgstr "" -#: c-api/unicode.rst:1689 +#: c-api/unicode.rst:1690 msgid "``NULL`` in case an exception was raised" msgstr "" -#: c-api/unicode.rst:1690 +#: c-api/unicode.rst:1691 msgid ":const:`Py_True` or :const:`Py_False` for successful comparisons" msgstr "" -#: c-api/unicode.rst:1691 +#: c-api/unicode.rst:1692 msgid ":const:`Py_NotImplemented` in case the type combination is unknown" msgstr "" -#: c-api/unicode.rst:1693 +#: 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:1699 +#: 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:1705 +#: c-api/unicode.rst:1706 msgid "" "Check whether *element* is contained in *container* and return true or false " "accordingly." msgstr "" -#: c-api/unicode.rst:1708 +#: 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:1714 +#: 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 " +"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 " @@ -1966,7 +2006,7 @@ msgid "" "the object after the call if and only if you owned it before the call.)" msgstr "" -#: c-api/unicode.rst:1727 +#: 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 " diff --git a/c-api/veryhigh.po b/c-api/veryhigh.po index 243e2dc615..93c436db1b 100644 --- a/c-api/veryhigh.po +++ b/c-api/veryhigh.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-09-23 16:16+0200\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" @@ -35,12 +35,12 @@ msgstr "" #: c-api/veryhigh.rst:19 msgid "" -"Note also that several of these functions take :c:type:`FILE*` parameters. " -"One particular issue which needs to be handled carefully is that the :c:type:" +"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:type:`FILE*` parameters are only passed to these functions if " +"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 "" @@ -94,16 +94,17 @@ msgid "" "`PyRun_InteractiveLoop`, otherwise return the result of :c:func:" "`PyRun_SimpleFile`. *filename* is decoded from the filesystem encoding (:" "func:`sys.getfilesystemencoding`). If *filename* is ``NULL``, this function " -"uses ``\"???\"`` as the filename." +"uses ``\"???\"`` as the filename. If *closeit* is true, the file is closed " +"before ``PyRun_SimpleFileExFlags()`` returns." msgstr "" -#: c-api/veryhigh.rst:82 +#: c-api/veryhigh.rst:84 msgid "" "This is a simplified interface to :c:func:`PyRun_SimpleStringFlags` below, " -"leaving the :c:type:`PyCompilerFlags`\\* argument set to ``NULL``." +"leaving the :c:struct:`PyCompilerFlags`\\* argument set to ``NULL``." msgstr "" -#: c-api/veryhigh.rst:88 +#: c-api/veryhigh.rst:90 msgid "" "Executes the Python source code from *command* in the :mod:`__main__` module " "according to the *flags* argument. If :mod:`__main__` does not already " @@ -112,26 +113,26 @@ msgid "" "information. For the meaning of *flags*, see below." msgstr "" -#: c-api/veryhigh.rst:94 +#: c-api/veryhigh.rst:96 msgid "" "Note that if an otherwise unhandled :exc:`SystemExit` is raised, this " "function will not return ``-1``, but exit the process, as long as " "``Py_InspectFlag`` is not set." msgstr "" -#: c-api/veryhigh.rst:101 +#: c-api/veryhigh.rst:103 msgid "" "This is a simplified interface to :c:func:`PyRun_SimpleFileExFlags` below, " "leaving *closeit* set to ``0`` and *flags* set to ``NULL``." msgstr "" -#: c-api/veryhigh.rst:107 +#: c-api/veryhigh.rst:109 msgid "" "This is a simplified interface to :c:func:`PyRun_SimpleFileExFlags` below, " "leaving *flags* set to ``NULL``." msgstr "" -#: c-api/veryhigh.rst:113 +#: c-api/veryhigh.rst:115 msgid "" "Similar to :c:func:`PyRun_SimpleStringFlags`, but the Python source code is " "read from *fp* instead of an in-memory string. *filename* should be the name " @@ -140,20 +141,20 @@ msgid "" "``PyRun_SimpleFileExFlags()`` returns." msgstr "" -#: c-api/veryhigh.rst:120 +#: c-api/veryhigh.rst:122 msgid "" -"On Windows, *fp* should be opened as binary mode (e.g. ``fopen(filename, \"rb" -"\")``). Otherwise, Python may not handle script file with LF line ending " +"On Windows, *fp* should be opened as binary mode (e.g. ``fopen(filename, " +"\"rb\")``). Otherwise, Python may not handle script file with LF line ending " "correctly." msgstr "" -#: c-api/veryhigh.rst:126 +#: c-api/veryhigh.rst:128 msgid "" "This is a simplified interface to :c:func:`PyRun_InteractiveOneFlags` below, " "leaving *flags* set to ``NULL``." msgstr "" -#: c-api/veryhigh.rst:132 +#: c-api/veryhigh.rst:134 msgid "" "Read and execute a single statement from a file associated with an " "interactive device according to the *flags* argument. The user will be " @@ -161,7 +162,7 @@ msgid "" "term:`filesystem encoding and error handler`." msgstr "" -#: c-api/veryhigh.rst:137 +#: c-api/veryhigh.rst:139 msgid "" "Returns ``0`` when the input was executed successfully, ``-1`` if there was " "an exception, or an error code from the :file:`errcode.h` include file " @@ -170,13 +171,13 @@ msgid "" "specifically if needed.)" msgstr "" -#: c-api/veryhigh.rst:146 +#: c-api/veryhigh.rst:148 msgid "" "This is a simplified interface to :c:func:`PyRun_InteractiveLoopFlags` " "below, leaving *flags* set to ``NULL``." msgstr "" -#: c-api/veryhigh.rst:152 +#: c-api/veryhigh.rst:154 msgid "" "Read and execute statements from a file associated with an interactive " "device until EOF is reached. The user will be prompted using ``sys.ps1`` " @@ -184,7 +185,7 @@ msgid "" "and error handler`. Returns ``0`` at EOF or a negative number upon failure." msgstr "" -#: c-api/veryhigh.rst:160 +#: 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 " @@ -194,7 +195,7 @@ msgid "" "the Python source code." msgstr "" -#: c-api/veryhigh.rst:171 +#: 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 " @@ -205,26 +206,26 @@ msgid "" "line-editing and tab-completion features." msgstr "" -#: c-api/veryhigh.rst:180 +#: 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:183 +#: 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:190 +#: 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:196 +#: 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 " @@ -233,31 +234,31 @@ msgid "" "token that should be used to parse the source code." msgstr "" -#: c-api/veryhigh.rst:202 +#: 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:208 +#: 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:214 +#: 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:220 +#: 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:226 +#: 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 " @@ -266,19 +267,19 @@ msgid "" "`PyRun_FileExFlags` returns." msgstr "" -#: c-api/veryhigh.rst:235 +#: 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:241 +#: 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:247 +#: 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 " @@ -289,7 +290,7 @@ msgid "" "returns ``NULL`` if the code cannot be parsed or compiled." msgstr "" -#: c-api/veryhigh.rst:255 +#: 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 " @@ -298,20 +299,20 @@ msgid "" "or ``2`` (docstrings are removed too)." msgstr "" -#: c-api/veryhigh.rst:266 +#: 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:273 +#: 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:280 +#: 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, " @@ -320,7 +321,7 @@ msgid "" "only_parameter>` arguments and a closure tuple of cells." msgstr "" -#: c-api/veryhigh.rst:289 +#: c-api/veryhigh.rst:291 #, fuzzy msgid "" "The C structure of the objects used to describe frame objects. The fields of " @@ -329,13 +330,13 @@ msgstr "" "La structure C utilisée pour décrire les objets *Code*. Les attributs de " "cette structure sont sujets à changer à tout moment." -#: c-api/veryhigh.rst:295 +#: 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:301 +#: 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 " @@ -345,7 +346,7 @@ msgid "" "of generator objects." msgstr "" -#: c-api/veryhigh.rst:308 +#: 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." @@ -353,33 +354,33 @@ msgstr "" "Cette fonction inclut maintenant une assertion de débogage afin d'assurer " "qu'elle ne passe pas sous silence une exception active." -#: c-api/veryhigh.rst:315 +#: 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:323 +#: 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:331 +#: 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:340 +#: 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:347 +#: 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 " @@ -387,34 +388,34 @@ msgid "" "case, ``from __future__ import`` can modify *flags*." msgstr "" -#: c-api/veryhigh.rst:352 +#: 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:358 +#: c-api/veryhigh.rst:360 msgid "Compiler flags." msgstr "" -#: c-api/veryhigh.rst:362 +#: 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:365 +#: 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:368 +#: c-api/veryhigh.rst:370 msgid "Added *cf_feature_version* field." msgstr "" -#: c-api/veryhigh.rst:374 +#: 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`." diff --git a/c-api/weakref.po b/c-api/weakref.po index e110ae1742..c87980a274 100644 --- a/c-api/weakref.po +++ b/c-api/weakref.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-09-23 16:16+0200\n" +"POT-Creation-Date: 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" @@ -58,7 +58,7 @@ msgid "" "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 " +"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 " @@ -81,7 +81,7 @@ msgid "" "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, " +"*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 " diff --git a/copyright.po b/copyright.po index 96aaceeadc..0876ef0034 100644 --- a/copyright.po +++ b/copyright.po @@ -5,15 +5,15 @@ 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-01-28 14:22+0100\n" -"Last-Translator: Jules Lasne \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 2.4.2\n" +"X-Generator: Poedit 3.0.1\n" #: copyright.rst:3 msgid "Copyright" @@ -24,9 +24,10 @@ msgid "Python and this documentation is:" msgstr "Python et cette documentation sont :" #: copyright.rst:7 -msgid "Copyright © 2001-2021 Python Software Foundation. All rights reserved." +#, fuzzy +msgid "Copyright © 2001-2023 Python Software Foundation. All rights reserved." msgstr "" -"Copyright © 2001-2021 Python Software Foundation. Tous droits réservés." +"Copyright © 2001-2022 Python Software Foundation. Tous droits réservés." #: copyright.rst:9 msgid "Copyright © 2000 BeOpen.com. All rights reserved." diff --git a/dict b/dict index 618f9089c9..e577577936 100644 --- a/dict +++ b/dict @@ -25,6 +25,7 @@ c99 chacha20 cadriciel cadriciels +capturants catucci cobjects composabilité @@ -36,6 +37,7 @@ contribués coroutine coroutines cpython +CSV curryfication cython d'allocateurs @@ -66,6 +68,7 @@ désérialisées Distutils encodable ethnomathématiques +Excel farrugia finaliseur frederik diff --git a/distutils/apiref.po b/distutils/apiref.po index 03cc69f0f0..09b0fad9c7 100644 --- a/distutils/apiref.po +++ b/distutils/apiref.po @@ -5,8 +5,8 @@ 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 12:30+0100\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" @@ -1369,8 +1369,8 @@ msgid "" "component). These are on top of the system default and those supplied to :" "meth:`add_library_dir` and/or :meth:`set_library_dirs`. " "*runtime_library_dirs* is a list of directories that will be embedded into " -"the shared library and used to search for other shared libraries that \\*it" -"\\* depends on at run-time. (This may only be relevant on Unix.)" +"the shared library and used to search for other shared libraries that " +"\\*it\\* depends on at run-time. (This may only be relevant on Unix.)" msgstr "" "*library_dirs*, s'il est fourni, doit être une liste de répertoires à " "rechercher pour les bibliothèques qui ont été spécifiées comme des " @@ -2143,10 +2143,11 @@ msgid "" 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 `AIX Version`, `Release and " -"Technology Level` (premier champ), `Build Date` (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 la `Release` étaient renvoyés." +"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:" @@ -2252,8 +2253,9 @@ msgstr "" "environ``." #: distutils/apiref.rst:1201 +#, fuzzy msgid "" -"Note that this is not a fully-fledged string interpolation function. A valid " +"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 "" @@ -2554,7 +2556,7 @@ msgid "" "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 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." diff --git a/distutils/builtdist.po b/distutils/builtdist.po index 3596c6fa56..83ffe935bf 100644 --- a/distutils/builtdist.po +++ b/distutils/builtdist.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-09-23 16:16+0200\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" @@ -39,12 +39,12 @@ msgid "" "word is already spoken for in Python. (And \"installer\" is a term specific " "to the world of mainstream desktop systems.)" msgstr "" -"Une \"distribution compilée\" vous fait 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)." +"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 "" @@ -324,12 +324,12 @@ msgstr "" msgid "" "You don't have to use the :command:`bdist` command with the :option:`!--" "formats` option; you can also use the command that directly implements the " -"format you're interested in. Some of these :command:`bdist` \"sub-commands" -"\" actually generate several similar formats; for instance, the :command:" -"`bdist_dumb` command generates all the \"dumb\" archive formats (``tar``, " -"``gztar``, ``bztar``, ``xztar``, ``ztar``, and ``zip``), and :command:" -"`bdist_rpm` generates both binary and source RPMs. The :command:`bdist` sub-" -"commands, and the formats generated by each, are:" +"format you're interested in. Some of these :command:`bdist` \"sub-" +"commands\" actually generate several similar formats; for instance, the :" +"command:`bdist_dumb` command generates all the \"dumb\" archive formats " +"(``tar``, ``gztar``, ``bztar``, ``xztar``, ``ztar``, and ``zip``), and :" +"command:`bdist_rpm` generates both binary and source RPMs. The :command:" +"`bdist` sub-commands, and the formats generated by each, are:" msgstr "" "Vous ne devez pas utiliser la commande :command:`bdist` avec l'option :" "option:`!--formats` ; Vous pouvez également utiliser la commande qui " @@ -371,11 +371,11 @@ msgstr ":command:`bdist_msi`" #: distutils/builtdist.rst:141 msgid "msi" -msgstr "`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." +msgstr "``bdist_msi`` est obsolète depuis Python 3.9." #: distutils/builtdist.rst:147 msgid "" diff --git a/distutils/introduction.po b/distutils/introduction.po index 552c200e83..69e6b28596 100644 --- a/distutils/introduction.po +++ b/distutils/introduction.po @@ -5,8 +5,8 @@ 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 12:42+0100\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" @@ -119,7 +119,7 @@ msgstr "" "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. " +"de la compilation et de l'installation du module." #: distutils/introduction.rst:58 msgid "" @@ -150,7 +150,7 @@ msgid "" 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) ; " +"(une liste de purs modules Python, dans ce cas) ;" #: distutils/introduction.rst:76 msgid "" @@ -325,13 +325,13 @@ msgid "" "(Note that currently, the Distutils only handles C/C++ extensions for " "Python.)" msgstr "" -"un module écrit dans un langage de bas niveau de l'implémentation Python: C/C" -"++ pour Python, Java pour Jython. Typiquement contenu dans un unique fichier " -"pré-compilé chargeable, p. ex. un fichier objet partagé (:file:`.so`) pour " -"des extensions Python sous Unix, un fichier DLL (étant donné l'extension :" -"file:`.pyd`) pour les extensions Python sous Windows, ou un fichier de " -"classe Java pour les extensions Jython (notez qu'actuellement, Distutils " -"gère seulement les extensions Python C/C++)." +"un module écrit dans un langage de bas niveau de l'implémentation Python: C/" +"C++ pour Python, Java pour Jython. Typiquement contenu dans un unique " +"fichier pré-compilé chargeable, p. ex. un fichier objet partagé (:file:`." +"so`) pour des extensions Python sous Unix, un fichier DLL (étant donné " +"l'extension :file:`.pyd`) pour les extensions Python sous Windows, ou un " +"fichier de classe Java pour les extensions Jython (notez qu'actuellement, " +"Distutils gère seulement les extensions Python C/C++)." #: distutils/introduction.rst:164 msgid "package" diff --git a/distutils/setupscript.po b/distutils/setupscript.po index 786606337d..5bbe202dcf 100644 --- a/distutils/setupscript.po +++ b/distutils/setupscript.po @@ -5,8 +5,8 @@ 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: 2021-12-11 12:42+0100\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" @@ -894,7 +894,7 @@ msgstr "" "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`." +"contenir des motifs ``glob``." #: distutils/setupscript.rst:484 msgid "" @@ -983,7 +983,7 @@ msgstr "" "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 " +"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é." diff --git a/distutils/sourcedist.po b/distutils/sourcedist.po index 12fb52c4f9..53dcefd230 100644 --- a/distutils/sourcedist.po +++ b/distutils/sourcedist.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-12-31 11:33+0100\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" @@ -112,7 +112,7 @@ msgstr "Fichier *tar* compressé par *bzip2* (:file:`.tar.bz2`)" #: distutils/sourcedist.rst:37 distutils/sourcedist.rst:43 msgid "\\(5)" -msgstr "" +msgstr "\\(5)" #: distutils/sourcedist.rst:37 msgid "``xztar``" diff --git a/extending/building.po b/extending/building.po index 3b85e33cd3..2da87acee9 100644 --- a/extending/building.po +++ b/extending/building.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" +"POT-Creation-Date: 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" @@ -44,8 +44,9 @@ 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` " +"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 " diff --git a/extending/embedding.po b/extending/embedding.po index 6051d35c42..1256471a6c 100644 --- a/extending/embedding.po +++ b/extending/embedding.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" +"POT-Creation-Date: 2023-03-22 22:57+0100\n" "PO-Revision-Date: 2019-12-25 17:24+0100\n" "Last-Translator: Antoine \n" "Language-Team: FRENCH \n" @@ -422,11 +422,11 @@ msgstr "" #: extending/embedding.rst:304 msgid "" -"``pythonX.Y-config --ldflags`` will give you the recommended flags when " -"linking:" +"``pythonX.Y-config --ldflags --embed`` will give you the recommended flags " +"when linking:" msgstr "" -"``pythonX.Y-config --ldflags`` vous donnera les drapeaux recommandés lors de " -"l'édition de lien :" +"``pythonX.Y-config --ldflags --embed`` vous donnera les drapeaux recommandés " +"lors de l'édition de lien :" #: extending/embedding.rst:313 msgid "" diff --git a/extending/extending.po b/extending/extending.po index 43dec4079f..2bada8abf1 100644 --- a/extending/extending.po +++ b/extending/extending.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-27 10:27+0100\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" @@ -143,19 +143,19 @@ msgstr "" msgid "" "All user-visible symbols defined by :file:`Python.h` have a prefix of ``Py`` " "or ``PY``, except those defined in standard header files. For convenience, " -"and since they are used extensively by the Python interpreter, ``\"Python.h" -"\"`` includes a few standard header files: ````, ````, " +"and since they are used extensively by the Python interpreter, ``\"Python." +"h\"`` includes a few standard header files: ````, ````, " "````, and ````. If the latter header file does not exist " "on your system, it declares the functions :c:func:`malloc`, :c:func:`free` " "and :c:func:`realloc` directly." msgstr "" "Tous les symboles exposés par :file:`Python.h` sont préfixés de ``Py`` ou " "``PY``, sauf ceux qui sont définis dans les en-têtes standard. Pour le " -"confort, et comme ils sont largement utilisés par l'interpréteur Python, ``" -"\"Python.h\"`` inclut lui-même quelques d'en-têtes standard : ````, " -"````, ```` et ````. Si ce dernier n'existe pas " -"sur votre système, il déclare les fonctions :c:func:`malloc`, :c:func:`free` " -"et :c:func:`realloc` directement." +"confort, et comme ils sont largement utilisés par l'interpréteur Python, " +"``\"Python.h\"`` inclut lui-même quelques d'en-têtes standard : ````, ````, ```` et ````. Si ce dernier " +"n'existe pas sur votre système, il déclare les fonctions :c:func:`malloc`, :" +"c:func:`free` et :c:func:`realloc` directement." #: extending/extending.rst:83 msgid "" @@ -311,14 +311,13 @@ msgstr "" 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 :c:func:`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 :c:func:" -"`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." +"``-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 " @@ -333,12 +332,13 @@ msgstr "" "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 :c:func:`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.)" +"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_\\*`, " @@ -543,9 +543,10 @@ msgstr "" "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:type:`void`), the corresponding Python function must return " +"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 "" @@ -1615,7 +1616,7 @@ msgstr "" 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:type:`void \\*`). Capsules can only be " +"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 " @@ -1644,7 +1645,7 @@ msgstr "" #, 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:type:`const " +"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 " @@ -1679,11 +1680,12 @@ msgstr "" "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:type:`void` pointers which becomes the value of " +"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." @@ -1750,7 +1752,7 @@ msgid "" "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 !" +"pointeurs disparaîtrait lorsque :func:`PyInit_spam` se finit !" #: extending/extending.rst:1283 msgid "" diff --git a/extending/index.po b/extending/index.po index 0faebfbcd0..2369e90cc8 100644 --- a/extending/index.po +++ b/extending/index.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" +"POT-Creation-Date: 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" @@ -67,10 +67,11 @@ 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 `_, `cffi `_, `SWIG `_ and `Numba `_ offer both simpler and " "more sophisticated approaches to creating C and C++ extensions for Python." msgstr "" diff --git a/extending/newtypes.po b/extending/newtypes.po index 55d9f74d62..3d1a4ce5ad 100644 --- a/extending/newtypes.po +++ b/extending/newtypes.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-04 18:14+0100\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" @@ -161,7 +161,7 @@ msgstr "" 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." +"`~PyTypeObject.tp_name` and a uniquely identifying value for the object." msgstr "" #: extending/newtypes.rst:181 @@ -197,16 +197,16 @@ msgstr "" 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:type:" -"`char\\*`, while the other accepts a :c:type:`PyObject\\*`. Each type can " -"use whichever pair makes more sense for the implementation's convenience. ::" +"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:type:`PyObject\\*` version of the attribute management " +"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 " @@ -364,9 +364,9 @@ msgstr "Gestion des attributs de type spécifiques" #: extending/newtypes.rst:342 msgid "" -"For simplicity, only the :c:type:`char\\*` version will be demonstrated " +"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:" -"type:`char\\*` and :c:type:`PyObject\\*` flavors of the interface. This " +"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 " @@ -593,8 +593,9 @@ msgstr "" "faire deux choses :" #: extending/newtypes.rst:575 +#, fuzzy msgid "" -"Include a :c:type:`PyObject\\*` field in the C object structure dedicated to " +"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`)." @@ -624,7 +625,8 @@ msgstr "" "par le champ requis ::" #: extending/newtypes.rst:592 -msgid "And the corresponding member in the statically-declared type object::" +#, 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 ::" diff --git a/extending/newtypes_tutorial.po b/extending/newtypes_tutorial.po index f2cfd72d84..89240bf7fe 100644 --- a/extending/newtypes_tutorial.po +++ b/extending/newtypes_tutorial.po @@ -5,8 +5,8 @@ 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-25 11:25+0200\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" @@ -37,9 +37,10 @@ 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:" -"type:`PyObject\\*`, which serves as a \"base type\" for all Python objects. " +"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 " @@ -73,7 +74,7 @@ msgid "" 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` : " +"class:`Custom` dans le module d'extension :mod:`custom` :" #: extending/newtypes_tutorial.rst:43 msgid "" @@ -127,12 +128,13 @@ 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_REFCNT` " -"and :c:macro:`Py_TYPE` respectively). The reason for the macro is to " +"reference count (these can be accessed using the macros :c:macro:`Py_TYPE` " +"and :c:macro:`Py_REFCNT` respectively). The reason for the macro is to " "abstract away the layout and to enable additional fields in :ref:`debug " "builds `." msgstr "" diff --git a/extending/windows.po b/extending/windows.po index 5ca7f168dd..4da8f03be8 100644 --- a/extending/windows.po +++ b/extending/windows.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" +"POT-Creation-Date: 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" @@ -215,16 +215,16 @@ msgid "Using DLLs in Practice" msgstr "Utiliser les DLL en pratique" #: extending/windows.rst:108 +#, fuzzy msgid "" "Windows Python is built in Microsoft Visual C++; using other compilers may " -"or may not work (though Borland seems to). The rest of this section is MSVC+" -"+ specific." +"or may not work. The rest of this section is MSVC++ specific." msgstr "" "Le Python de Windows est construit en Microsoft Visual C++ ; utiliser " "d'autres compilateurs pourrait fonctionner, ou pas (cependant Borland a " "l'air de fonctionner). Le reste de cette section est spécifique à MSVC++." -#: extending/windows.rst:112 +#: extending/windows.rst:111 msgid "" "When creating DLLs in Windows, you must pass :file:`pythonXY.lib` to the " "linker. To build two DLLs, spam and ni (which uses C functions found in " @@ -234,7 +234,7 @@ msgstr "" "`pythonXY.lib` au lieur. Pour construire deux DLL, spam et ni (qui utilisent " "des fonctions C trouvées dans spam), vous pouvez utiliser ces commandes ::" -#: extending/windows.rst:119 +#: extending/windows.rst:118 msgid "" "The first command created three files: :file:`spam.obj`, :file:`spam.dll` " "and :file:`spam.lib`. :file:`Spam.dll` does not contain any Python " @@ -246,7 +246,7 @@ msgstr "" "Python (telles que :c:func:`PyArg_ParseTuple`), mais il sait comment trouver " "le code Python grâce à :file:`pythonXY.lib`." -#: extending/windows.rst:124 +#: extending/windows.rst:123 msgid "" "The second command created :file:`ni.dll` (and :file:`.obj` and :file:`." "lib`), which knows how to find the necessary functions from spam, and also " @@ -256,7 +256,7 @@ msgstr "" "qui sait comment trouver les fonctions nécessaires dans spam, ainsi qu'à " "partir de l'exécutable Python." -#: extending/windows.rst:128 +#: extending/windows.rst:127 msgid "" "Not every identifier is exported to the lookup table. If you want any other " "modules (including Python) to be able to see your identifiers, you have to " @@ -269,7 +269,7 @@ msgstr "" "``void _declspec(dllexport) initspam(void)`` ou ``PyObject " "_declspec(dllexport) *NiGetSpamData(void)``." -#: extending/windows.rst:133 +#: extending/windows.rst:132 msgid "" "Developer Studio will throw in a lot of import libraries that you do not " "really need, adding about 100K to your executable. To get rid of them, use " diff --git a/faq/design.po b/faq/design.po index 04a97e4312..8bf70eed75 100644 --- a/faq/design.po +++ b/faq/design.po @@ -5,8 +5,8 @@ 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-11-06 13:18+0100\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" @@ -315,12 +315,13 @@ 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 " +"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 ::" +"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." @@ -374,7 +375,7 @@ msgstr "" "``key()``, ou quand un objet qui n'est pas un fichier implémente une méthode " "``write()``." -#: faq/design.rst:207 +#: 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" @@ -520,7 +521,7 @@ msgstr "" "possibilités, vous pouvez créer un dictionnaire faisant correspondre des " "valeurs à des fonctions à appeler. Par exemple ::" -#: faq/design.rst:279 +#: 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::" @@ -529,7 +530,7 @@ msgstr "" "en utilisant la fonction native :func:`getattr` pour récupérer les méthodes " "avec un nom donné ::" -#: faq/design.rst:291 +#: 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 " @@ -541,7 +542,7 @@ msgstr "" "proviennent d'une source non fiable, un attaquant serait en mesure d'appeler " "n'importe quelle méthode sur votre objet." -#: faq/design.rst:297 +#: faq/design.rst:294 msgid "" "Can't you emulate threads in the interpreter instead of relying on an OS-" "specific thread implementation?" @@ -549,7 +550,7 @@ msgstr "" "Est-il possible d'émuler des fils d'exécution dans l'interpréteur plutôt que " "se baser sur les implémentations spécifiques aux systèmes d'exploitation ?" -#: faq/design.rst:299 +#: 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 " @@ -562,7 +563,7 @@ msgstr "" "conséquent, une implémentation complète des fils d'exécution nécessiterait " "une gestion complète pour le C." -#: faq/design.rst:304 +#: faq/design.rst:301 msgid "" "Answer 2: Fortunately, there is `Stackless Python `_, which has a completely redesigned " @@ -572,12 +573,12 @@ msgstr "" "stackless-dev/stackless/wiki>`_, qui a complètement ré-architecturé la " "boucle principale de l'interpréteur afin de ne pas utiliser la pile C." -#: faq/design.rst:309 +#: 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:311 +#: faq/design.rst:308 msgid "" "Python lambda expressions cannot contain statements because Python's " "syntactic framework can't handle statements nested inside expressions. " @@ -593,11 +594,12 @@ msgstr "" "Python sont seulement une notation concise si vous êtes trop paresseux pour " "définir une fonction." -#: faq/design.rst:317 +#: 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 " +"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!" @@ -609,18 +611,18 @@ msgstr "" "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:325 +#: 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:327 +#: faq/design.rst:324 +#, fuzzy msgid "" -"`Cython `_ compiles a modified version of Python with " -"optional annotations into C extensions. `Nuitka `_ " +"`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. For compiling to Java you can consider `VOC `_." +"full Python language." msgstr "" "`Cython `_ compile une version modifiée de Python avec " "des annotations optionnelles en extensions C. `Nuitka `_." -#: faq/design.rst:335 +#: faq/design.rst:331 msgid "How does Python manage memory?" msgstr "Comment Python gère la mémoire ?" -#: faq/design.rst:337 +#: 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 " @@ -651,11 +653,12 @@ msgstr "" "module :mod:`gc` fournit des fonctions pour lancer le ramasse-miettes, " "d'obtenir des statistiques de débogage et ajuster ses paramètres." -#: faq/design.rst:345 +#: 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 " +"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 "" @@ -665,7 +668,7 @@ msgstr "" "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:351 +#: faq/design.rst:347 msgid "" "In some Python implementations, the following code (which is fine in " "CPython) will probably run out of file descriptors::" @@ -674,7 +677,7 @@ msgstr "" "parfaitement avec *CPython*) aurait probablement manqué de descripteurs de " "fichiers ::" -#: faq/design.rst:358 +#: 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, " @@ -686,7 +689,7 @@ msgstr "" "Cependant, avec un ramasse-miettes classique, ces objets sont collectés (et " "fermés) à intervalles irréguliers, et potentiellement longs." -#: faq/design.rst:363 +#: 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 " @@ -697,13 +700,13 @@ msgstr "" "utiliser l'instruction :keyword:`with` ; ceci fonctionne indépendamment du " "système de gestion de la mémoire ::" -#: faq/design.rst:373 +#: 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:375 +#: 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 " @@ -718,7 +721,7 @@ msgstr "" "transparente, elle ne l'est pas complètement ; des correctifs sont " "nécessaires afin que Python fonctionne correctement avec.)" -#: faq/design.rst:381 +#: 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 " @@ -736,12 +739,12 @@ msgstr "" "de Python. À l'heure actuelle, CPython fonctionne avec n'importe quelle " "implémentation correcte de ``malloc()`` et ``free()``." -#: faq/design.rst:390 +#: 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:392 +#: 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 " @@ -758,7 +761,7 @@ msgstr "" "cependant, agressif sur le nettoyage de la mémoire en quittant et cherche à " "détruire chaque objet." -#: faq/design.rst:399 +#: 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." @@ -767,12 +770,12 @@ msgstr "" "utilisez le module :mod:`atexit` pour exécuter une fonction qui va forcer " "ces destructions." -#: faq/design.rst:404 +#: 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:406 +#: 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 " @@ -789,7 +792,7 @@ msgstr "" "des coordonnées cartésiennes sont correctement représentées par un *n*-uplet " "de deux ou trois nombres." -#: faq/design.rst:413 +#: 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 " @@ -806,7 +809,7 @@ msgstr "" "problème que vous ajoutiez un ou deux fichiers supplémentaires dans le " "dossier." -#: faq/design.rst:420 +#: 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 " @@ -821,11 +824,11 @@ msgstr "" "utilisés comme clés de dictionnaires, et donc de ``tuple`` et ``list`` seul " "des *n*-uplets peuvent être utilisés comme clés." -#: faq/design.rst:427 +#: 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:429 +#: 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 " @@ -838,7 +841,7 @@ msgstr "" "Elle conserve également un pointeur vers ce tableau et la longueur du " "tableau dans une structure de tête de liste." -#: faq/design.rst:433 +#: 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." @@ -846,7 +849,7 @@ msgstr "" "Cela rend l'indexation d'une liste ``a[i]`` une opération dont le coût est " "indépendant de la taille de la liste ou de la valeur de l'indice." -#: faq/design.rst:436 +#: 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 " @@ -859,11 +862,11 @@ msgstr "" "être étendu, un certain espace supplémentaire est alloué de sorte que pour " "la prochaine fois, ceci ne nécessite plus un redimensionnement effectif." -#: faq/design.rst:443 +#: 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:445 +#: 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 " @@ -875,7 +878,7 @@ msgstr "" "performances pour la recherche (l'opération la plus courante de loin) dans " "la plupart des circonstances, et leur implémentation est plus simple." -#: faq/design.rst:449 +#: 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 " @@ -891,19 +894,19 @@ msgstr "" "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 " +"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:460 +#: faq/design.rst:456 msgid "Why must dictionary keys be immutable?" msgstr "Pourquoi les clés du dictionnaire sont immuables ?" -#: faq/design.rst:462 +#: 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 " @@ -926,7 +929,7 @@ msgstr "" "chercher l'ancienne valeur, elle serait également introuvable car la valeur " "de l'objet trouvé dans cet emplacement de hachage serait différente." -#: faq/design.rst:471 +#: 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 " @@ -938,11 +941,11 @@ msgstr "" "uplet avec les mêmes entrées que la liste ``L``. Les *n*-uplets sont " "immuables et peuvent donc être utilisés comme clés du dictionnaire." -#: faq/design.rst:475 +#: faq/design.rst:471 msgid "Some unacceptable solutions that have been proposed:" msgstr "Certaines solutions insatisfaisantes ont été proposées :" -#: faq/design.rst:477 +#: 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.::" @@ -951,7 +954,7 @@ msgstr "" "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:483 +#: 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 " @@ -963,7 +966,7 @@ msgstr "" "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:487 +#: 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 " @@ -974,7 +977,7 @@ msgstr "" "une référence à elle-même ou avoir une boucle infinie au niveau du code " "copié." -#: faq/design.rst:491 +#: 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 " @@ -987,7 +990,7 @@ msgstr "" "accident. Cela casse également un impératif important des dictionnaires : " "chaque valeur de ``d.keys()`` est utilisable comme clé du dictionnaire." -#: faq/design.rst:496 +#: 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 " @@ -1005,7 +1008,7 @@ msgstr "" "encore une fois, les objets se faisant référence pourraient provoquer une " "boucle infinie." -#: faq/design.rst:502 +#: 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 " @@ -1022,7 +1025,7 @@ msgstr "" "(ou une autre structure basée sur le hachage), restent fixes pendant que " "l'objet est dans le dictionnaire (ou une autre structure). ::" -#: faq/design.rst:526 +#: 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 " @@ -1032,7 +1035,7 @@ msgstr "" "certains membres de la liste soient impossibles à hacher et aussi par la " "possibilité de débordement arithmétique." -#: faq/design.rst:530 +#: 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__() == " @@ -1046,7 +1049,7 @@ msgstr "" "ne remplissez pas ces conditions, les dictionnaires et autres structures " "basées sur le hachage se comporteront mal." -#: faq/design.rst:535 +#: 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 " @@ -1059,11 +1062,11 @@ msgstr "" "conséquences de ne pas satisfaire entièrement ces conditions. Vous avez été " "prévenus." -#: faq/design.rst:542 +#: 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:544 +#: 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 " @@ -1079,7 +1082,7 @@ msgstr "" "é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:550 +#: 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 " @@ -1091,13 +1094,13 @@ msgstr "" "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:560 +#: 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:562 +#: 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 " @@ -1109,7 +1112,7 @@ msgstr "" "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:567 +#: 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` " @@ -1126,7 +1129,7 @@ msgstr "" "class:`~collections.abc.Iterable`, :class:`~collections.abc.Container` et :" "class:`collections.abc.MutableMapping`." -#: faq/design.rst:574 +#: faq/design.rst:570 msgid "" "For Python, many of the advantages of interface specifications can be " "obtained by an appropriate test discipline for components." @@ -1134,7 +1137,7 @@ msgstr "" "Pour Python, la plupart des avantages des spécifications d'interface peuvent " "être obtenus par une discipline de test appropriée pour les composants." -#: faq/design.rst:577 +#: 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 " @@ -1155,7 +1158,7 @@ msgstr "" "test tiers peuvent être utilisés pour construire des suites de tests " "exhaustives qui éprouvent chaque ligne de code dans un module." -#: faq/design.rst:585 +#: 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 " @@ -1175,7 +1178,7 @@ msgstr "" "réellement le faire correctement, mais il est trivial de vérifier cette " "propriété dans une suite de tests." -#: faq/design.rst:593 +#: 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 " @@ -1190,11 +1193,11 @@ msgstr "" "le code réel. Bien sûr, Python vous permet d'être laxiste et de ne pas " "écrire de test du tout." -#: faq/design.rst:601 +#: 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:603 +#: 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 " @@ -1211,7 +1214,7 @@ msgstr "" "boucler (avec les instructions ``while`` et ``for``, qui peuvent contenir " "des ``continue`` et ``break``)." -#: faq/design.rst:610 +#: 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 " @@ -1224,7 +1227,7 @@ msgstr "" "l'utilisation raisonnable des constructions *go* ou *goto* du C, du Fortran " "ou d'autres langages de programmation. Par exemple ::" -#: faq/design.rst:626 +#: 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." @@ -1233,13 +1236,13 @@ msgstr "" "toute façon généralement considéré comme un abus de ``goto``. À Utiliser " "avec parcimonie." -#: faq/design.rst:631 +#: 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:633 +#: 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 " @@ -1249,7 +1252,7 @@ msgstr "" "*backslashes* : le *backslash* non appairé à la fin échappe le caractère de " "guillemet final, laissant la chaîne non terminée." -#: faq/design.rst:637 +#: 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 " @@ -1267,7 +1270,7 @@ msgstr "" "chaîne en l'échappant avec un *antislash*. Ces règles fonctionnent bien " "lorsque les chaînes brutes sont utilisées pour leur but premier." -#: faq/design.rst:644 +#: faq/design.rst:640 msgid "" "If you're trying to build Windows pathnames, note that all Windows system " "calls accept forward slashes too::" @@ -1276,20 +1279,20 @@ msgstr "" "les appels système Windows acceptent également les *slashes* " "« classiques » ::" -#: faq/design.rst:649 +#: 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:657 +#: 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:659 +#: 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 " @@ -1299,11 +1302,11 @@ msgstr "" "appelant du code à l'entrée et la sortie du bloc. Certains langages " "possèdent une construction qui ressemble à ceci ::" -#: faq/design.rst:667 +#: faq/design.rst:663 msgid "In Python, such a construct would be ambiguous." msgstr "En Python, une telle construction serait ambiguë." -#: faq/design.rst:669 +#: 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 " @@ -1316,7 +1319,7 @@ msgstr "" "le compilateur connaît *toujours* la portée de toutes les variables au " "moment de la compilation." -#: faq/design.rst:674 +#: 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 " @@ -1330,11 +1333,11 @@ msgstr "" "impossible de savoir, d'une simple lecture, quel attribut est référencé : " "s'il est local, global ou un attribut membre ?" -#: faq/design.rst:680 +#: faq/design.rst:676 msgid "For instance, take the following incomplete snippet::" msgstr "Prenons par exemple l'extrait incomplet suivant ::" -#: faq/design.rst:686 +#: 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 " @@ -1348,7 +1351,7 @@ msgstr "" "« 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:692 +#: 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. " @@ -1358,11 +1361,11 @@ msgstr "" "similaires (réduction du volume de code) peut, cependant, être facilement " "réalisé en Python par assignation. Au lieu de ::" -#: faq/design.rst:699 +#: faq/design.rst:695 msgid "write this::" msgstr "écrivez ceci ::" -#: faq/design.rst:706 +#: 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 " @@ -1372,12 +1375,12 @@ msgstr "" "car les liaisons de noms sont résolues au moment de l'exécution en Python, " "et la deuxième version n'a besoin d'exécuter la résolution qu'une seule fois." -#: faq/design.rst:712 +#: 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:714 +#: 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 " @@ -1390,13 +1393,13 @@ msgstr "" "besoin de le fermer. Sinon, on peut toujours mettre ``contextlib." "closing(générateur)`` dans la ligne du ``with``." -#: faq/design.rst:721 +#: 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:723 +#: faq/design.rst:719 msgid "" "The colon is required primarily to enhance readability (one of the results " "of the experimental ABC language). Consider this::" @@ -1404,11 +1407,11 @@ 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:729 +#: faq/design.rst:725 msgid "versus ::" msgstr "et cela ::" -#: faq/design.rst:734 +#: 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 " @@ -1418,7 +1421,7 @@ msgstr "" "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:737 +#: 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 " @@ -1430,13 +1433,13 @@ msgstr "" "pour décider quand l'indentation doit être augmentée au lieu d'avoir à faire " "une analyse plus élaborée du texte du programme." -#: faq/design.rst:743 +#: 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:745 +#: faq/design.rst:741 msgid "" "Python lets you add a trailing comma at the end of lists, tuples, and " "dictionaries::" @@ -1444,11 +1447,11 @@ msgstr "" "Python vous permet d'ajouter une virgule à la fin des listes, des *n*-uplets " "et des dictionnaires ::" -#: faq/design.rst:756 +#: faq/design.rst:752 msgid "There are several reasons to allow this." msgstr "Il y a plusieurs raisons d'accepter cela." -#: faq/design.rst:758 +#: 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 " @@ -1461,7 +1464,7 @@ msgstr "" "virgule à la ligne précédente. Les lignes peuvent aussi être réorganisées " "sans créer une erreur de syntaxe." -#: faq/design.rst:763 +#: faq/design.rst:759 msgid "" "Accidentally omitting the comma can lead to errors that are hard to " "diagnose. For example::" @@ -1469,7 +1472,7 @@ msgstr "" "L'omission accidentelle de la virgule peut entraîner des erreurs difficiles " "à diagnostiquer, par exemple ::" -#: faq/design.rst:773 +#: 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 " @@ -1479,7 +1482,7 @@ msgstr "" "trois : \"*fee*\", \"*fiefoo*\" et \"*fum*\". Toujours ajouter la virgule " "permet d'éviter cette source d'erreur." -#: faq/design.rst:776 +#: faq/design.rst:772 msgid "" "Allowing the trailing comma may also make programmatic code generation " "easier." diff --git a/faq/extending.po b/faq/extending.po index b7f6cb8971..ae89156df3 100644 --- a/faq/extending.po +++ b/faq/extending.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-09-23 16:16+0200\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" @@ -49,10 +49,10 @@ msgstr "Puis-je créer mes propres fonctions en C++ ?" #: faq/extending.rst:28 msgid "" -"Yes, using the C compatibility features found in C++. Place ``extern \"C" -"\" { ... }`` around the Python include files and put ``extern \"C\"`` before " -"each function that is going to be called by the Python interpreter. Global " -"or static C++ objects with constructors are probably not a good idea." +"Yes, using the C compatibility features found in C++. Place ``extern " +"\"C\" { ... }`` around the Python include files and put ``extern \"C\"`` " +"before each function that is going to be called by the Python interpreter. " +"Global or static C++ objects with constructors are probably not a good idea." msgstr "" "Oui, en utilisant les fonctionnalités de compatibilité C existantes en C++. " "Placez ``extern \"C\" { ... }`` autour des fichiers Python inclus et mettez " @@ -73,8 +73,9 @@ msgstr "" "d'écrire vos propres extensions C, selon ce que vous essayez de faire." #: faq/extending.rst:44 +#, fuzzy msgid "" -"`Cython `_ and its relative `Pyrex `_ 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 " @@ -87,12 +88,13 @@ msgstr "" "à 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 `_. `SIP " +"`__, `CXX `_ `Boost `_, or `Weave `_ are also alternatives " "for wrapping C++ libraries." msgstr "" @@ -337,10 +339,10 @@ msgid "" "work for C++ objects." msgstr "" "Selon vos besoins, de nombreuses approches sont possibles. Pour le faire " -"manuellement, commencez par lire :ref:`le document \"Extension et intégration" -"\" `. Sachez que pour le système d'exécution Python, il n'y " -"a pas beaucoup de différence entre C et C++ — donc la méthode pour " -"construire un nouveau type Python à partir d'une structure C (pointeur) " +"manuellement, commencez par lire :ref:`le document \"Extension et " +"intégration\" `. Sachez que pour le système d'exécution " +"Python, il n'y a pas beaucoup de différence entre C et C++ — donc la méthode " +"pour construire un nouveau type Python à partir d'une structure C (pointeur) " "fonctionne également avec des objets en C++." #: faq/extending.rst:212 @@ -414,13 +416,13 @@ msgstr "" msgid "For Debian, run ``apt-get install python-dev``." msgstr "Pour Debian, exécutez ``apt-get install python-dev``." -#: faq/extending.rst:259 +#: faq/extending.rst:258 msgid "How do I tell \"incomplete input\" from \"invalid input\"?" msgstr "" "Comment distinguer une « entrée incomplète » (*incomplete input*) d'une " "« entrée invalide » (*invalid input*) ?" -#: faq/extending.rst:261 +#: faq/extending.rst:260 msgid "" "Sometimes you want to emulate the Python interactive interpreter's behavior, " "where it gives you a continuation prompt when the input is incomplete (e.g. " @@ -434,7 +436,7 @@ msgstr "" "vous n'avez pas fermé vos parenthèses ou triple guillemets) mais il vous " "renvoie immédiatement une erreur syntaxique quand la saisie est incorrecte." -#: faq/extending.rst:267 +#: faq/extending.rst:266 msgid "" "In Python you can use the :mod:`codeop` module, which approximates the " "parser's behavior sufficiently. IDLE uses this, for example." @@ -442,7 +444,7 @@ msgstr "" "En Python, vous pouvez utiliser le module :mod:`codeop`, qui se rapproche " "assez du comportement de l'analyseur. Par exemple, IDLE l'utilise." -#: faq/extending.rst:270 +#: faq/extending.rst:269 msgid "" "The easiest way to do it in C is to call :c:func:`PyRun_InteractiveLoop` " "(perhaps in a separate thread) and let the Python interpreter handle the " @@ -458,39 +460,12 @@ msgstr "" "myreadline.c`` pour plus de conseils." #: faq/extending.rst:276 -msgid "" -"However sometimes you have to run the embedded Python interpreter in the " -"same thread as your rest application and you can't allow the :c:func:" -"`PyRun_InteractiveLoop` to stop while waiting for user input. 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()``) ::" - -#: faq/extending.rst:401 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:403 +#: 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 " @@ -502,7 +477,7 @@ msgstr "" "de votre module d'extension avec g++ (par exemple, ``g++ -shared -o mymodule." "so mymodule.o``)." -#: faq/extending.rst:409 +#: 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)?" @@ -510,7 +485,7 @@ msgstr "" "Puis-je créer une classe d'objets avec certaines méthodes implémentées en C " "et d'autres en Python (p. ex. en utilisant l'héritage) ?" -#: faq/extending.rst:411 +#: faq/extending.rst:286 msgid "" "Yes, you can inherit from built-in classes such as :class:`int`, :class:" "`list`, :class:`dict`, etc." @@ -518,9 +493,10 @@ msgstr "" "Oui, vous pouvez hériter de classes intégrées telles que :class:`int`, :" "class:`list`, :class:`dict`, etc." -#: faq/extending.rst:414 +#: faq/extending.rst:289 +#, fuzzy msgid "" -"The Boost Python Library (BPL, http://www.boost.org/libs/python/doc/index." +"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 "" @@ -528,6 +504,34 @@ msgstr "" "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:" diff --git a/faq/general.po b/faq/general.po index 52c2952f78..53f779e312 100644 --- a/faq/general.po +++ b/faq/general.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-09-23 16:16+0200\n" +"POT-Creation-Date: 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" @@ -283,21 +283,32 @@ 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 "" -"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." +"*B* is the minor version number -- it is incremented for less earth-" +"shattering changes." 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." #: 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 " @@ -316,24 +327,31 @@ msgstr "" "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:142 -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." +#: 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 "" -"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." #: 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 " @@ -347,7 +365,7 @@ msgstr "" "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:154 +#: faq/general.rst:160 msgid "" "See also the documentation for :data:`sys.version`, :data:`sys.hexversion`, " "and :data:`sys.version_info`." @@ -355,11 +373,11 @@ msgstr "" "Voir aussi la documentation pour for :data:`sys.version`, :data:`sys." "hexversion`, et :data:`sys.version_info`." -#: faq/general.rst:159 +#: 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:161 +#: 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 " @@ -370,7 +388,7 @@ msgstr "" "dernière version en développement peut être obtenue à https://github.com/" "python/cpython/." -#: faq/general.rst:165 +#: 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 " @@ -383,7 +401,7 @@ msgstr "" "utiles distribuables librement. Le code source sera compilé et prêt à " "fonctionner immédiatement sur la plupart des plateformes UNIX." -#: faq/general.rst:170 +#: faq/general.rst:176 msgid "" "Consult the `Getting Started section of the Python Developer's Guide " "`__ for more information on getting the " @@ -393,11 +411,11 @@ msgstr "" "devguide.python.org/setup/>`__ pour plus d'informations sur comment obtenir " "le code source et le compiler." -#: faq/general.rst:176 +#: faq/general.rst:182 msgid "How do I get documentation on Python?" msgstr "Comment obtenir la documentation de Python ?" -#: faq/general.rst:180 +#: 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 " @@ -407,22 +425,24 @@ msgstr "" "https://docs.python.org/3/. Des versions aux formats PDF, texte et HTML " "sont aussi disponibles à https://docs.python.org/3/download.html." -#: faq/general.rst:184 +#: 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." +"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:190 +#: 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:192 +#: faq/general.rst:198 msgid "" "There are numerous tutorials and books available. The standard " "documentation includes :ref:`tutorial-index`." @@ -430,7 +450,7 @@ msgstr "" "Il y a de nombreux tutoriels et livres disponibles. La documentation " "standard inclut :ref:`tutorial-index`." -#: faq/general.rst:195 +#: faq/general.rst:201 msgid "" "Consult `the Beginner's Guide `_ to find information for beginning Python programmers, " @@ -440,11 +460,11 @@ msgstr "" "BeginnersGuide>`_ afin de trouver des informations pour les développeurs " "Python débutants, incluant une liste de tutoriels." -#: faq/general.rst:200 +#: 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:202 +#: faq/general.rst:208 msgid "" "There is a newsgroup, :newsgroup:`comp.lang.python`, and a mailing list, " "`python-list `_. The " @@ -461,7 +481,7 @@ msgstr "" "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:209 +#: 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 " @@ -474,7 +494,7 @@ msgstr "" "des annonces Python `_." -#: faq/general.rst:214 +#: faq/general.rst:220 msgid "" "More info about other mailing lists and newsgroups can be found at https://" "www.python.org/community/lists/." @@ -482,11 +502,11 @@ 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:219 +#: 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:221 +#: 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." @@ -499,7 +519,7 @@ msgstr "" "de Python à https://www.python.org/; un flux RSS d'actualités y est aussi " "disponible." -#: faq/general.rst:226 +#: faq/general.rst:232 msgid "" "You can also access the development version of Python through Git. See `The " "Python Developer's Guide `_ for details." @@ -508,11 +528,11 @@ msgstr "" "`Le Guide du Développeur Python `_ pour plus " "de détails." -#: faq/general.rst:231 +#: 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:233 +#: faq/general.rst:239 msgid "" "To report a bug or submit a patch, please use the Roundup installation at " "https://bugs.python.org/." @@ -520,7 +540,7 @@ msgstr "" "Pour reporter un bogue ou soumettre un correctif, merci d'utiliser https://" "bugs.python.org/." -#: faq/general.rst:236 +#: 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 " @@ -537,7 +557,7 @@ msgstr "" "réinitialisation de mot de passe de Roundup `_." -#: faq/general.rst:242 +#: faq/general.rst:248 msgid "" "For more information on how Python is developed, consult `the Python " "Developer's Guide `_." @@ -545,27 +565,28 @@ msgstr "" "Pour davantage d'informations sur comment Python est développé, consultez " "`le Guide du Développeur Python `_." -#: faq/general.rst:247 +#: 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:249 +#: 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:251 +#: faq/general.rst:257 +#, fuzzy msgid "" -"The very first article about Python was written in 1991 and is now quite " -"outdated." +"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:254 +#: 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 " @@ -575,11 +596,11 @@ msgstr "" "Using the Python Programming Language* », CWI Quarterly, Volume 4, Issue 4 " "(December 1991), Amsterdam, pp 283--303." -#: faq/general.rst:260 +#: 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:262 +#: 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." @@ -587,7 +608,7 @@ 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:265 +#: 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\"." @@ -596,25 +617,26 @@ msgstr "" "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:270 +#: 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:272 +#: 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:277 +#: faq/general.rst:283 msgid "Why is it called Python?" msgstr "Pourquoi le nom Python ?" -#: faq/general.rst:279 +#: 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\" `_. There are two production-ready " @@ -686,11 +708,11 @@ msgstr "" "largement utilisées. Bien que Python 2 soit encore utilisé, `il n'est " "désormais plus maintenu `_." -#: faq/general.rst:316 +#: faq/general.rst:322 msgid "How many people are using Python?" msgstr "Combien de personnes utilisent Python ?" -#: faq/general.rst:318 +#: faq/general.rst:324 msgid "" "There are probably millions of users, though it's difficult to obtain an " "exact count." @@ -698,7 +720,7 @@ msgstr "" "Il y a probablement des millions d'utilisateurs, bien qu'il soit difficile " "d'en déterminer le nombre exact." -#: faq/general.rst:321 +#: 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 " @@ -709,7 +731,7 @@ msgstr "" "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:325 +#: 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." @@ -717,11 +739,11 @@ 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:330 +#: 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:332 +#: 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 `_ and `the Zope application server `_. Several Linux distributions, most notably `Red Hat `_ 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." @@ -750,11 +773,11 @@ msgstr "" "logiciel d'administration système en Python. Les entreprises qui utilisent " "Python en interne comprennent Google, Yahoo, et Lucasfilm Ltd." -#: faq/general.rst:346 +#: 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:348 +#: 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 " @@ -769,7 +792,7 @@ msgstr "" "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:354 +#: faq/general.rst:360 msgid "" "New development is discussed on `the python-dev mailing list `_." @@ -777,12 +800,12 @@ msgstr "" "Le nouveau développement est discuté sur `la liste de diffusion python-dev " "`_." -#: faq/general.rst:359 +#: 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:361 +#: 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 " @@ -799,7 +822,7 @@ msgstr "" "documentations, beaucoup de livres ont été écrits au sujet de Python, et " "nous ne voulons pas les rendre invalides soudainement." -#: faq/general.rst:368 +#: 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-" @@ -808,17 +831,17 @@ msgstr "" "En fournissant un rythme de mise à jour progressif qui est obligatoire si " "une fonctionnalité doit être changée." -#: faq/general.rst:374 +#: 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:376 +#: faq/general.rst:382 msgid "Yes." msgstr "Oui." -#: faq/general.rst:378 +#: 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 " @@ -842,7 +865,7 @@ msgstr "" "peuvent même probablement travailler avec des objets définis dans leurs " "premiers cours." -#: faq/general.rst:388 +#: 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 " @@ -862,7 +885,7 @@ msgstr "" "terme, ce n'est pas nécessairement la meilleure idée pour s'adresser aux " "étudiants durant leur tout premier cours." -#: faq/general.rst:396 +#: 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 " @@ -885,7 +908,7 @@ msgstr "" "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:405 +#: 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 " @@ -899,7 +922,7 @@ msgstr "" "souvenir des méthodes pour une liste, ils peuvent faire quelque chose comme " "ça ::" -#: faq/general.rst:434 +#: faq/general.rst:440 msgid "" "With the interpreter, documentation is never far from the student as they " "are programming." @@ -907,15 +930,16 @@ msgstr "" "Avec l'interpréteur, la documentation n'est jamais loin des étudiants quand " "ils travaillent." -#: faq/general.rst:437 +#: 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. PythonWin is a Windows-" -"specific IDE. 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." +"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 " @@ -927,7 +951,7 @@ msgstr "" "`_ pour une liste complète des " "environnements de développement intégrés." -#: faq/general.rst:445 +#: 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 `_." + +#~ 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 index fd1f550b74..46fe9ed9e5 100644 --- a/faq/gui.po +++ b/faq/gui.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-09-23 16:16+0200\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" @@ -93,10 +93,11 @@ msgstr "" "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 (http://" +"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 " diff --git a/faq/library.po b/faq/library.po index affdf87e0e..ac5dab11ec 100644 --- a/faq/library.po +++ b/faq/library.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-27 10:27+0100\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" @@ -210,19 +210,11 @@ msgstr "" "qui n'ont que le *curses* de BSD mais, de nos jours, de tels systèmes " "d'exploitation ne semblent plus exister ou être maintenus." -#: faq/library.rst:109 -msgid "" -"For Windows: use `the consolelib module `_." -msgstr "" -"Pour Windows : utilisez le module `consolelib `_." - -#: faq/library.rst:114 +#: faq/library.rst:111 msgid "Is there an equivalent to C's onexit() in Python?" msgstr "Existe-t-il un équivalent à la fonction C ``onexit()`` en Python ?" -#: faq/library.rst:116 +#: faq/library.rst:113 msgid "" "The :mod:`atexit` module provides a register function that is similar to " "C's :c:func:`onexit`." @@ -230,11 +222,11 @@ msgstr "" "Le module :mod:`atexit` fournit une fonction d'enregistrement similaire à la " "fonction C :c:func:`onexit`." -#: faq/library.rst:121 +#: faq/library.rst:118 msgid "Why don't my signal handlers work?" msgstr "Pourquoi mes gestionnaires de signaux ne fonctionnent-ils pas ?" -#: faq/library.rst:123 +#: faq/library.rst:120 msgid "" "The most common problem is that the signal handler is declared with the " "wrong argument list. It is called as ::" @@ -242,19 +234,19 @@ msgstr "" "Le problème le plus courant est d'appeler le gestionnaire de signaux avec " "les mauvais arguments. Un gestionnaire est appelé de la façon suivante ::" -#: faq/library.rst:128 +#: faq/library.rst:125 msgid "so it should be declared with two parameters::" msgstr "donc il doit être déclaré avec deux paramètres ::" -#: faq/library.rst:135 +#: faq/library.rst:132 msgid "Common tasks" msgstr "Tâches fréquentes" -#: faq/library.rst:138 +#: faq/library.rst:135 msgid "How do I test a Python program or component?" msgstr "Comment tester un programme ou un composant Python ?" -#: faq/library.rst:140 +#: faq/library.rst:137 msgid "" "Python comes with two testing frameworks. The :mod:`doctest` module finds " "examples in the docstrings for a module and runs them, comparing the output " @@ -264,7 +256,7 @@ msgstr "" "exemples dans les *docstrings* d'un module et les exécute. Il compare alors " "la sortie avec la sortie attendue, telle que définie dans la *docstring*." -#: faq/library.rst:144 +#: faq/library.rst:141 msgid "" "The :mod:`unittest` module is a fancier testing framework modelled on Java " "and Smalltalk testing frameworks." @@ -272,7 +264,7 @@ msgstr "" "Le module :mod:`unittest` est un cadriciel un peu plus élaboré basé sur les " "cadriciels de test de Java et de Smalltalk." -#: faq/library.rst:147 +#: faq/library.rst:144 msgid "" "To make testing easier, you should use good modular design in your program. " "Your program should have almost all functionality encapsulated in either " @@ -291,16 +283,16 @@ msgstr "" "manipuler des variables globales, car ceci rend le test beaucoup plus " "difficile." -#: faq/library.rst:155 +#: faq/library.rst:152 msgid "The \"global main logic\" of your program may be as simple as ::" msgstr "" "La « logique générale » d'un programme devrait être aussi simple que ::" -#: faq/library.rst:160 +#: faq/library.rst:157 msgid "at the bottom of the main module of your program." msgstr "à la fin du module principal du programme." -#: faq/library.rst:162 +#: faq/library.rst:159 msgid "" "Once your program is organized as a tractable collection of function and " "class behaviours, you should write test functions that exercise the " @@ -322,7 +314,7 @@ msgstr "" "amusant, car ceci permet de trouver des bogues, voire des défauts de " "conception, plus facilement." -#: faq/library.rst:170 +#: faq/library.rst:167 msgid "" "\"Support modules\" that are not intended to be the main module of a program " "may include a self-test of the module. ::" @@ -330,7 +322,7 @@ msgstr "" "Les « modules auxiliaires » qui n'ont pas vocation à être le module " "principal du programme peuvent inclure un test pour se vérifier eux-mêmes. ::" -#: faq/library.rst:176 +#: faq/library.rst:173 msgid "" "Even programs that interact with complex external interfaces may be tested " "when the external interfaces are unavailable by using \"fake\" interfaces " @@ -340,16 +332,17 @@ msgstr "" "peuvent être testés même quand ces interfaces ne sont pas disponibles, en " "utilisant des interfaces « simulacres » implémentées en Python." -#: faq/library.rst:182 +#: faq/library.rst:179 msgid "How do I create documentation from doc strings?" msgstr "Comment générer la documentation à partir des *docstrings* ?" -#: faq/library.rst:184 +#: faq/library.rst:181 +#, 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." +"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 à " @@ -357,11 +350,11 @@ msgstr "" ">`_. `Sphinx `_ peut également inclure du contenu " "provenant de *docstrings*." -#: faq/library.rst:191 +#: faq/library.rst:188 msgid "How do I get a single keypress at a time?" msgstr "Comment détecter qu'une touche est pressée ?" -#: faq/library.rst:193 +#: faq/library.rst:190 msgid "" "For Unix variants there are several solutions. It's straightforward to do " "this using curses, but curses is a fairly large module to learn." @@ -370,15 +363,15 @@ msgstr "" "en utilisant le module *curses*, mais *curses* est un module assez " "conséquent à apprendre." -#: faq/library.rst:237 +#: faq/library.rst:234 msgid "Threads" msgstr "Fils d'exécution" -#: faq/library.rst:240 +#: faq/library.rst:237 msgid "How do I program using threads?" msgstr "Comment programmer avec des fils d'exécution ?" -#: faq/library.rst:242 +#: faq/library.rst:239 msgid "" "Be sure to use the :mod:`threading` module and not the :mod:`_thread` " "module. The :mod:`threading` module builds convenient abstractions on top of " @@ -388,11 +381,11 @@ msgstr "" "`_thread`. Le module :mod:`threading` fournit une abstraction plus facile à " "manipuler que les primitives de bas-niveau du module :mod:`_thread`." -#: faq/library.rst:248 +#: 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:250 +#: 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." @@ -401,7 +394,7 @@ msgstr "" "fil principal s'exécute trop rapidement, sans laisser le temps aux autres " "fils de faire quoi que ce soit." -#: faq/library.rst:253 +#: 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::" @@ -409,7 +402,7 @@ msgstr "" "Une correction simple consiste à ajouter un temps d'attente suffisamment " "long à la fin du programme pour que tous les fils puissent se terminer ::" -#: faq/library.rst:268 +#: 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 " @@ -420,13 +413,13 @@ msgstr "" "l'autre ! En réalité, l'ordonnanceur de fils du système d'exploitation ne " "démarre pas de nouveau fil avant que le précédent ne soit bloqué." -#: faq/library.rst:272 +#: 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:285 +#: 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:" @@ -441,13 +434,13 @@ msgstr "" "quand il se termine, et que le fil principal retire autant de jetons de la " "file qu'il y a de fils." -#: faq/library.rst:293 +#: 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:295 +#: faq/library.rst:292 msgid "" "The easiest way is to use the :mod:`concurrent.futures` module, especially " "the :mod:`~concurrent.futures.ThreadPoolExecutor` class." @@ -456,7 +449,7 @@ msgstr "" "futures`, en particulier la classe :mod:`~concurrent.futures." "ThreadPoolExecutor`." -#: faq/library.rst:298 +#: 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 " @@ -473,15 +466,15 @@ msgstr "" "pour les récupérer. La classe s'occupe de gérer les verrous pour que chaque " "tâche soit exécutée une et une seule fois." -#: faq/library.rst:305 +#: faq/library.rst:302 msgid "Here's a trivial example::" msgstr "Voici un exemple trivial ::" -#: faq/library.rst:343 +#: 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:361 +#: faq/library.rst:358 msgid "" "Consult the module's documentation for more details; the :class:`~queue." "Queue` class provides a featureful interface." @@ -489,13 +482,13 @@ msgstr "" "Consultez la documentation du module pour plus de détails ; la classe :class:" "`~queue.Queue` fournit une interface pleine de fonctionnalités." -#: faq/library.rst:366 +#: 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:368 +#: 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 " @@ -513,7 +506,7 @@ msgstr "" "intermédiaire, et, par conséquent, tout le code C appelé par cette " "instruction est donc atomique du point de vue d'un programme Python." -#: faq/library.rst:375 +#: 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 " @@ -526,7 +519,7 @@ msgstr "" "listes, les dictionnaires, etc.) qui « semblent atomiques » le sont " "réellement." -#: faq/library.rst:380 +#: 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)::" @@ -535,11 +528,11 @@ msgstr "" "*L2* sont des listes, *D*, *D1* et *D2* sont des dictionnaires, *x* et *y* " "sont des objets, *i* et *j* des entiers) ::" -#: faq/library.rst:395 +#: faq/library.rst:392 msgid "These aren't::" msgstr "Les suivantes ne le sont pas ::" -#: faq/library.rst:402 +#: 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 " @@ -552,11 +545,11 @@ msgstr "" "changements massifs sur des dictionnaires ou des listes. En cas de doute, il " "vaut mieux utiliser un mutex !" -#: faq/library.rst:409 +#: 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:413 +#: 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 " @@ -570,7 +563,7 @@ msgstr "" "Presque tout le code Python ne peut en effet être exécuté qu'avec le GIL " "acquis." -#: faq/library.rst:418 +#: 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 " @@ -590,7 +583,7 @@ msgstr "" "un seul fil d'exécution, à cause de la quantité de verrouillage plus " "granulaire nécessaire pour contrebalancer la suppression du GIL." -#: faq/library.rst:426 +#: 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 " @@ -608,7 +601,7 @@ msgstr "" "le module :mod:`multiprocessing` fournit une API de plus bas-niveau pour un " "meilleur contrôle sur la distribution des tâches." -#: faq/library.rst:434 +#: 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 " @@ -622,7 +615,7 @@ msgstr "" "fils travailler. Des modules de la bibliothèque standard comme :mod:`zlib` " "ou :mod:`hashlib` utilisent cette technique." -#: faq/library.rst:440 +#: 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 " @@ -643,7 +636,7 @@ msgstr "" "ont leur propre liste de suppression, ces listes devraient être déplacées au " "niveau de l'interpréteur et ainsi de suite." -#: faq/library.rst:449 +#: 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 " @@ -655,7 +648,7 @@ msgstr "" "qu'il ne soit possible de les corriger pour les faire stocker leur état au " "niveau de l'interpréteur et non plus au niveau global." -#: faq/library.rst:454 +#: 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?" @@ -664,15 +657,15 @@ msgstr "" "partagent pas d'état, par rapport à faire tourner chaque interpréteur dans " "un processus différent ?" -#: faq/library.rst:459 +#: faq/library.rst:456 msgid "Input and Output" msgstr "Les entrées/sorties" -#: faq/library.rst:462 +#: 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:464 +#: 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." @@ -683,7 +676,7 @@ msgstr "" "identiques, :func:`~os.unlink` n'est tout simplement que le nom de l'appel " "système à cette fonction sous Unix." -#: faq/library.rst:468 +#: 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 " @@ -697,12 +690,12 @@ msgstr "" "supprime les dossiers intermédiaires si ceux-ci sont vides. Pour supprimer " "une arborescence et tout son contenu, utilisez :func:`shutil.rmtree`." -#: faq/library.rst:474 +#: 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:476 +#: 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. " @@ -715,7 +708,7 @@ msgstr "" "existe aussi ``os.ftruncate(df, décalage)`` pour les fichiers ouverts avec :" "func:`os.open`, où *df* est le descripteur de fichier (un entier court)." -#: faq/library.rst:481 +#: 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 :" @@ -725,24 +718,26 @@ msgstr "" "effectuer des opérations sur des fichiers comme :func:`~shutil.copyfile`, :" "func:`~shutil.copytree` et :func:`~shutil.rmtree`." -#: faq/library.rst:487 +#: faq/library.rst:484 msgid "How do I copy a file?" msgstr "Comment copier un fichier ?" -#: faq/library.rst:489 +#: faq/library.rst:486 msgid "" -"The :mod:`shutil` module contains a :func:`~shutil.copyfile` function. Note " -"that on MacOS 9 it doesn't copy the resource fork and Finder info." +"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 "" -"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." -#: faq/library.rst:494 +#: 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:496 +#: 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 " @@ -753,7 +748,7 @@ msgstr "" "une chaîne de caractères qui contient des données binaires, souvent des " "nombres, en objets Python, et vice-versa." -#: faq/library.rst:500 +#: 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::" @@ -761,7 +756,7 @@ msgstr "" "Par exemple, le code suivant lit, depuis un fichier, deux entiers codés sur " "2 octets et un entier codé sur 4 octets, en format gros-boutiste ::" -#: faq/library.rst:509 +#: 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 " @@ -771,7 +766,7 @@ msgstr "" "mode gros-boutiste, la lettre « h » indique un entier court (2 octets) et la " "lettre « l » indique un entier long (4 octets)." -#: faq/library.rst:513 +#: 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." @@ -780,7 +775,7 @@ msgstr "" "nombres à virgule flottante), il est possible d'utiliser le module :mod:" "`array`." -#: faq/library.rst:518 +#: 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\"`` " @@ -793,13 +788,13 @@ msgstr "" "en mode textuel et ``f.read()`` renvoie des objets :class:`str` au lieu " "d'objets :class:`bytes`." -#: faq/library.rst:526 +#: 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:528 +#: 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-" @@ -814,34 +809,34 @@ msgstr "" "octets d'un tube *p* créé avec :func:`os.popen`, il faut utiliser ``p." "read(n)``." -#: faq/library.rst:615 +#: 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:617 +#: faq/library.rst:620 msgid "For Win32, OSX, Linux, BSD, Jython, IronPython:" msgstr "Pour Win32, OSX, Linux, BSD, Jython et IronPython :" -#: faq/library.rst:619 +#: faq/library.rst:622 msgid "https://pypi.org/project/pyserial/" msgstr "https://pypi.org/project/pyserial/" -#: faq/library.rst:621 +#: 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:623 +#: 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:627 +#: 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:629 +#: faq/library.rst:632 msgid "" "Python :term:`file objects ` are a high-level layer of " "abstraction on low-level C file descriptors." @@ -849,7 +844,7 @@ msgstr "" "Les :term:`objets fichiers ` en Python sont des abstractions de " "haut niveau sur les descripteurs de fichier C de bas niveau." -#: faq/library.rst:632 +#: 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 " @@ -863,7 +858,7 @@ msgstr "" "enclenché automatiquement dans le destructeur de ``f``, lorsque ``f`` est " "recyclé." -#: faq/library.rst:638 +#: 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()`` " @@ -875,7 +870,7 @@ msgstr "" "close()`` marque l'objet fichier comme fermé du point de vue de Python, mais " "le descripteur de fichier C associé n'est *pas* fermé." -#: faq/library.rst:643 +#: 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 " @@ -886,21 +881,21 @@ msgstr "" "exemple, perturber le bon fonctionnement de modules qui font des opérations " "d'entrée-sortie). Si c'est le cas, utilisez :func:`os.close` ::" -#: faq/library.rst:651 +#: 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:655 +#: faq/library.rst:658 msgid "Network/Internet Programming" msgstr "Programmation réseau et Internet" -#: faq/library.rst:658 +#: 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:660 +#: 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-" @@ -910,7 +905,7 @@ msgstr "" "le manuel de référence de la bibliothèque. Python a de nombreux modules pour " "construire des applications de Toile côté client comme côté serveur." -#: faq/library.rst:666 +#: faq/library.rst:669 msgid "" "A summary of available frameworks is maintained by Paul Boddie at https://" "wiki.python.org/moin/WebProgramming\\ ." @@ -918,20 +913,22 @@ msgstr "" "Un résumé des cadriciels disponibles est maintenu par Paul Boddie à " "l'adresse https://wiki.python.org/moin/WebProgramming\\ ." -#: faq/library.rst:669 +#: faq/library.rst:672 +#, fuzzy msgid "" "Cameron Laird maintains a useful set of pages about Python web technologies " -"at http://phaseit.net/claird/comp.lang.python/web_python." +"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:674 +#: 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:676 +#: 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?" @@ -939,11 +936,11 @@ msgstr "" "J'aimerais récupérer la page de retour d'un envoi de formulaire sur la " "Toile. Existe-t-il déjà du code qui pourrait m'aider à le faire facilement ?" -#: faq/library.rst:679 +#: 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:694 +#: 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 " @@ -954,15 +951,15 @@ msgstr "" "`urllib.parse.urlencode`. Par exemple pour envoyer ``name=Guy Steele, Jr." "`` ::" -#: faq/library.rst:702 +#: faq/library.rst:705 msgid ":ref:`urllib-howto` for extensive examples." msgstr ":ref:`urllib-howto` pour des exemples complets." -#: faq/library.rst:706 +#: 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:710 +#: faq/library.rst:713 msgid "" "You can find a collection of useful links on the `Web Programming wiki page " "`_." @@ -970,15 +967,15 @@ msgstr "" "La `page wiki de la programmation Toile `_ (en anglais) répertorie un ensemble de liens pertinents." -#: faq/library.rst:715 +#: 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:717 +#: 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:719 +#: 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. ::" @@ -986,7 +983,7 @@ msgstr "" "Voici un exemple très simple d'un envoyeur de courriel qui l'utilise. Cette " "méthode fonctionne sur tous les serveurs qui implémentent SMTP. ::" -#: faq/library.rst:739 +#: 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 ``/" @@ -998,13 +995,13 @@ msgstr "" "sendmail`` ou ``/usr/sbin/sendmail``, la page de manuel de *sendmail* peut " "vous aider. Par exemple ::" -#: faq/library.rst:759 +#: 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:761 +#: faq/library.rst:764 msgid "" "The :mod:`select` module is commonly used to help with asynchronous I/O on " "sockets." @@ -1012,7 +1009,7 @@ msgstr "" "Le module :mod:`select` est fréquemment utilisé pour effectuer des entrées-" "sorties asynchrones sur des connecteurs réseaux." -#: faq/library.rst:764 +#: 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 " @@ -1029,7 +1026,7 @@ msgstr "" "n'a pas encore aboutie. La valeur dépend du système d'exploitation, donc " "renseignez-vous sur la valeur utilisée par votre système." -#: faq/library.rst:771 +#: 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 :" @@ -1044,7 +1041,7 @@ msgstr "" "argument de :meth:`select.select` pour vérifier si le connecteur est prêt à " "recevoir des entrées." -#: faq/library.rst:777 +#: 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 " @@ -1056,20 +1053,20 @@ msgstr "" "`Twisted `_ en est une alternative " "plébiscitée, avec un grand nombre de fonctionnalités." -#: faq/library.rst:785 +#: faq/library.rst:788 msgid "Databases" msgstr "Bases de données" -#: faq/library.rst:788 +#: 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:790 +#: faq/library.rst:793 msgid "Yes." msgstr "Oui." -#: faq/library.rst:792 +#: 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:" @@ -1081,7 +1078,7 @@ msgstr "" "aussi le module :mod:`sqlite3` qui implémente une base de données " "relationnelle légère sur disque." -#: faq/library.rst:797 +#: faq/library.rst:800 msgid "" "Support for most relational databases is available. See the " "`DatabaseProgramming wiki page `_ pour plus de détails." -#: faq/library.rst:803 +#: 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:805 +#: 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 :" @@ -1107,15 +1104,15 @@ msgstr "" "fenêtres par exemple), et le module :mod:`shelve` de la bibliothèque utilise " "*pickle* et *(g)dbm* pour créer des liens persistants vers des objets Python." -#: faq/library.rst:812 +#: faq/library.rst:815 msgid "Mathematics and Numerics" msgstr "Mathématiques et calcul numérique" -#: faq/library.rst:815 +#: 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:817 +#: faq/library.rst:820 msgid "" "The standard module :mod:`random` implements a random number generator. " "Usage is simple::" @@ -1123,48 +1120,48 @@ 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:823 +#: 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:825 +#: 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:827 +#: 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:828 +#: 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:829 +#: 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:831 +#: 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:833 +#: 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:834 +#: 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:836 +#: faq/library.rst:839 msgid "" "There's also a ``Random`` class you can instantiate to create independent " "multiple random number generators." @@ -1172,6 +1169,21 @@ 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/." diff --git a/faq/programming.po b/faq/programming.po index 5768c50b5d..a088858926 100644 --- a/faq/programming.po +++ b/faq/programming.po @@ -5,15 +5,15 @@ 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-12-16 02:40+0100\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\n" +"X-Generator: Poedit 3.0.1\n" #: faq/programming.rst:5 msgid "Programming FAQ" @@ -35,7 +35,7 @@ msgstr "" "Existe-t-il un débogueur de code source avec points d'arrêts, exécution pas-" "à-pas, etc. ?" -#: faq/programming.rst:57 +#: faq/programming.rst:58 msgid "Yes." msgstr "Oui." @@ -60,16 +60,18 @@ msgstr "" "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/idle), includes a " +"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:31 +#: 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 " @@ -86,15 +88,16 @@ msgstr "" "github.com/mhammond/pywin32>`_ et fait partie de la distribution " "`ActivePython `_." -#: faq/programming.rst:38 +#: faq/programming.rst:39 +#, fuzzy msgid "" -"`Eric `_ is an IDE built on PyQt and " +"`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:41 +#: faq/programming.rst:42 msgid "" "`trepan3k `_ is a gdb-like " "debugger." @@ -102,7 +105,7 @@ msgstr "" "`trepan3k `_ est un débogueur " "semblable à GDB." -#: faq/programming.rst:43 +#: faq/programming.rst:44 msgid "" "`Visual Studio Code `_ is an IDE with " "debugging tools that integrates with version-control software." @@ -111,7 +114,7 @@ msgstr "" "contient des outils de débogage. Il sait interagir avec les outils de " "gestion de versions." -#: faq/programming.rst:46 +#: faq/programming.rst:47 msgid "" "There are a number of commercial Python IDEs that include graphical " "debuggers. They include:" @@ -119,34 +122,36 @@ msgstr "" "Il existe de nombreux EDI Python propriétaires qui embarquent un débogueur " "graphique, notamment :" -#: faq/programming.rst:49 +#: faq/programming.rst:50 msgid "`Wing IDE `_" msgstr "`Wing IDE `_ ;" -#: faq/programming.rst:50 +#: faq/programming.rst:51 msgid "`Komodo IDE `_" msgstr "`Komodo IDE `_ ;" -#: faq/programming.rst:51 +#: faq/programming.rst:52 msgid "`PyCharm `_" msgstr "`PyCharm `_ ;" -#: faq/programming.rst:55 +#: 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:59 +#: faq/programming.rst:60 +#, fuzzy msgid "" -"`Pylint `_ and `Pyflakes `_ do basic checking that will help you catch bugs sooner." +"`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:63 +#: faq/programming.rst:64 msgid "" "Static type checkers such as `Mypy `_, `Pyre `_, and `Pytype `_ can " @@ -157,11 +162,11 @@ msgstr "" "pytype>`_ peuvent vérifier les indications de type dans du code source " "Python." -#: faq/programming.rst:72 +#: 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:74 +#: 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 " @@ -176,20 +181,22 @@ msgstr "" "requis par un programme et lient ces modules avec un binaire Python pour " "produire un seul exécutable." -#: faq/programming.rst:80 +#: 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; a C compiler " -"you can embed all your modules into a new program, which is then linked with " -"the standard Python modules." +"as `Tools/freeze `_. It converts Python byte code to C arrays; with a C compiler you " +"can embed all your modules into a new program, which is then linked with the " +"standard Python modules." msgstr "" "Un de ces outils est *freeze*, qui se trouve dans ``Tools/freeze`` de " "l'arborescence des sources de Python. Il convertit le code intermédiaire " -"(*bytecode*) Python en tableaux C ; un compilateur C permet d'intégrer tous " -"vos modules dans un nouveau programme, qui est ensuite lié aux modules " -"standards Python." +"(*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:85 +#: 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 " @@ -213,7 +220,7 @@ msgstr "" "l'interpréteur Python pour former un binaire autonome qui fait exactement la " "même chose que le script." -#: faq/programming.rst:94 +#: faq/programming.rst:96 msgid "" "The following packages can help with the creation of console and GUI " "executables:" @@ -221,45 +228,47 @@ msgstr "" "Voici quelques paquets qui permettent de créer des exécutables en ligne de " "commande comme graphiques :" -#: faq/programming.rst:97 +#: faq/programming.rst:99 msgid "`Nuitka `_ (Cross-platform)" msgstr "`Nuitka `_ (multiplateformes) ;" -#: faq/programming.rst:98 -msgid "`PyInstaller `_ (Cross-platform)" +#: faq/programming.rst:100 +#, fuzzy +msgid "`PyInstaller `_ (Cross-platform)" msgstr "`PyInstaller `_ (multiplateformes) ;" -#: faq/programming.rst:99 +#: faq/programming.rst:101 msgid "" "`PyOxidizer `_ (Cross-platform)" msgstr "" "`PyOxidizer `_ (multi-" "plateforme) ;" -#: faq/programming.rst:100 +#: faq/programming.rst:102 msgid "" "`cx_Freeze `_ (Cross-platform)" msgstr "" "`cx_Freeze `_ (multi-" "plateforme) ;" -#: faq/programming.rst:101 +#: faq/programming.rst:103 msgid "`py2app `_ (macOS only)" msgstr "" "`py2app `_ (uniquement pour " "macOS) ;" -#: faq/programming.rst:102 -msgid "`py2exe `_ (Windows only)" +#: faq/programming.rst:104 +#, fuzzy +msgid "`py2exe `_ (Windows only)" msgstr "`py2exe `_ (uniquement pour Windows)." -#: faq/programming.rst:105 +#: 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:107 +#: faq/programming.rst:109 msgid "" "Yes. The coding style required for standard library modules is documented " "as :pep:`8`." @@ -267,38 +276,40 @@ 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:112 +#: faq/programming.rst:114 msgid "Core Language" msgstr "Fondamentaux" -#: faq/programming.rst:115 +#: 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:117 +#: faq/programming.rst:121 +#, fuzzy msgid "" -"It can be a surprise to get the UnboundLocalError in previously working code " -"when it is modified by adding an assignment statement somewhere in the body " -"of a function." +"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:121 +#: faq/programming.rst:125 msgid "This code:" msgstr "Le code suivant :" -#: faq/programming.rst:129 +#: faq/programming.rst:134 msgid "works, but this code:" msgstr "fonctionne, mais le suivant :" -#: faq/programming.rst:136 -msgid "results in an UnboundLocalError:" +#: faq/programming.rst:141 +#, fuzzy +msgid "results in an :exc:`!UnboundLocalError`:" msgstr "lève une UnboundLocalError :" -#: faq/programming.rst:143 +#: 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 " @@ -314,7 +325,7 @@ msgstr "" "nouvelle variable. Par conséquent, quand le ``print(x)`` essaye d'afficher " "la variable non initialisée, une erreur se produit." -#: faq/programming.rst:150 +#: faq/programming.rst:155 msgid "" "In the example above you can access the outer scope variable by declaring it " "global:" @@ -322,7 +333,7 @@ msgstr "" "Dans l'exemple ci-dessus, la variable du contexte appelant reste accessible " "en la déclarant globale :" -#: faq/programming.rst:161 +#: 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 " @@ -333,7 +344,7 @@ msgstr "" "d'instance), c'est la valeur de la variable du contexte appelant qui est " "modifiée :" -#: faq/programming.rst:168 +#: faq/programming.rst:174 msgid "" "You can do a similar thing in a nested scope using the :keyword:`nonlocal` " "keyword:" @@ -341,12 +352,12 @@ msgstr "" "Une alternative dans un contexte imbriqué consiste à utiliser le mot-clé :" "keyword:`nonlocal` :" -#: faq/programming.rst:185 +#: 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:187 +#: 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 " @@ -358,7 +369,7 @@ msgstr "" "valeur lui est affectée, elle est considérée locale (sauf si elle est " "explicitement déclarée globale)." -#: faq/programming.rst:191 +#: 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 " @@ -377,7 +388,7 @@ msgstr "" "importé. Le codé serait alors truffé de déclarations ``global``, ce qui " "nuirait à leur raison d'être : identifier les effets de bords." -#: faq/programming.rst:201 +#: faq/programming.rst:208 msgid "" "Why do lambdas defined in a loop with different values all return the same " "result?" @@ -385,7 +396,7 @@ msgstr "" "Pourquoi des expressions lambda définies dans une boucle avec des valeurs " "différentes retournent-elles le même résultat ?" -#: faq/programming.rst:203 +#: faq/programming.rst:210 msgid "" "Assume you use a for loop to define a few different lambdas (or even plain " "functions), e.g.::" @@ -393,7 +404,7 @@ 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:210 +#: 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``, " @@ -404,7 +415,7 @@ msgstr "" "chacune ``x**2``. En les exécutant, on pourrait s'attendre à obtenir ``0``, " "``1``, ``4``, ``9`` et ``16``. Elles renvoient en réalité toutes ``16`` ::" -#: faq/programming.rst:220 +#: 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 " @@ -419,7 +430,7 @@ msgstr "" "renvoient ``4*2``, c.-à-d. ``16``. Ceci se vérifie également en changeant la " "valeur de ``x`` et en constatant que les résultats sont modifiés ::" -#: faq/programming.rst:230 +#: 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``::" @@ -428,7 +439,7 @@ msgstr "" "variables locales aux expressions lambda pour que celles-ci ne se basent " "plus sur la variable globale ``x`` ::" -#: faq/programming.rst:237 +#: 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 " @@ -443,7 +454,7 @@ msgstr "" "troisième et ainsi de suite. Chaque expression lambda renvoie donc le " "résultat correct ::" -#: faq/programming.rst:248 +#: faq/programming.rst:255 msgid "" "Note that this behaviour is not peculiar to lambdas, but applies to regular " "functions too." @@ -451,11 +462,11 @@ msgstr "" "Ce comportement n'est pas propre aux expressions lambda, mais s'applique " "aussi aux fonctions normales." -#: faq/programming.rst:253 +#: faq/programming.rst:260 msgid "How do I share global variables across modules?" msgstr "Comment partager des variables globales entre modules ?" -#: faq/programming.rst:255 +#: 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 " @@ -471,32 +482,33 @@ msgstr "" "de chaque module, tout changement dans l'instance est propagé partout. Par " "exemple :" -#: faq/programming.rst:261 +#: faq/programming.rst:268 msgid "config.py::" msgstr "*config.py* ::" -#: faq/programming.rst:265 +#: faq/programming.rst:272 msgid "mod.py::" msgstr "*mod.py* ::" -#: faq/programming.rst:270 +#: faq/programming.rst:277 msgid "main.py::" msgstr "*main.py* ::" -#: faq/programming.rst:276 +#: faq/programming.rst:283 +#, fuzzy msgid "" -"Note that using a module is also the basis for implementing the Singleton " +"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:281 +#: 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:283 +#: 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 " @@ -506,7 +518,7 @@ msgstr "" "encombre l'espace de nommage de l'importateur et rend la détection de noms " "non-définis beaucoup plus ardue pour les analyseurs de code." -#: faq/programming.rst:287 +#: 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 " @@ -515,33 +527,38 @@ msgid "" 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." +"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:292 +#: 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:294 -msgid "standard library modules -- e.g. ``sys``, ``os``, ``getopt``, ``re``" +#: 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:295 +#: faq/programming.rst:302 +#, fuzzy msgid "" "third-party library modules (anything installed in Python's site-packages " -"directory) -- e.g. mx.DateTime, ZODB, PIL.Image, etc." +"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:297 -msgid "locally-developed modules" +#: faq/programming.rst:304 +#, fuzzy +msgid "locally developed modules" msgstr "les modules développés en local" -#: faq/programming.rst:299 +#: 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:" @@ -550,7 +567,7 @@ msgstr "" "une classe pour éviter les problèmes d'importations circulaires. Comme le " "souligne Gordon McMillan :" -#: faq/programming.rst:302 +#: 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 " @@ -565,7 +582,7 @@ msgstr "" "fichier. Les noms du premier module ne sont en effet pas encore disponibles " "car le premier module est occupé à importer le second." -#: faq/programming.rst:308 +#: 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 " @@ -577,7 +594,7 @@ msgstr "" "où l'importation sera appelée, le premier module aura fini de s'initialiser " "et le second pourra faire son importation." -#: faq/programming.rst:313 +#: 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 " @@ -592,7 +609,7 @@ msgstr "" "recommandé d'importer les modules adéquats dans le code spécifique à la " "machine." -#: faq/programming.rst:318 +#: 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 " @@ -618,11 +635,11 @@ msgstr "" "dictionnaire. Même si le nom du module est sorti du contexte courant, le " "module est probablement disponible dans :data:`sys.modules`." -#: faq/programming.rst:331 +#: 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:333 +#: faq/programming.rst:340 msgid "" "This type of bug commonly bites neophyte programmers. Consider this " "function::" @@ -630,7 +647,7 @@ msgstr "" "C'est un problème que rencontrent souvent les programmeurs débutants. " "Examinons la fonction suivante ::" -#: faq/programming.rst:340 +#: 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 " @@ -640,7 +657,7 @@ msgstr "" "élément. Au second appel, ``mydict`` contient deux éléments car quand " "``foo()`` commence son exécution, ``mydict`` contient déjà un élément." -#: faq/programming.rst:344 +#: 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, " @@ -654,7 +671,7 @@ msgstr "" "définie. Si l'objet est modifié, comme le dictionnaire dans cet exemple, les " "appels suivants à cette fonction font référence à l'objet ainsi modifié." -#: faq/programming.rst:349 +#: 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 " @@ -665,7 +682,7 @@ msgstr "" "sur des objets modifiables comme les dictionnaires, les listes et les " "instances de classe peuvent porter à confusion." -#: faq/programming.rst:353 +#: 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 " @@ -678,11 +695,11 @@ msgstr "" "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:361 +#: faq/programming.rst:368 msgid "but::" msgstr "mais plutôt ::" -#: faq/programming.rst:367 +#: 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 " @@ -696,7 +713,7 @@ msgstr "" "appel est ré-effectué. C'est la technique dite de « mémoïsation », qui " "s'implémente de la manière suivante ::" -#: faq/programming.rst:382 +#: 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." @@ -704,13 +721,13 @@ msgstr "" "Il est possible d'utiliser une variable globale contenant un dictionnaire à " "la place de la valeur par défaut ; ce n'est qu'une question de goût." -#: faq/programming.rst:387 +#: 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:389 +#: 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 " @@ -723,17 +740,18 @@ msgstr "" "de dictionnaire. Ces arguments peuvent être passés à une autre fonction en " "utilisant ``*`` et ``**`` ::" -#: faq/programming.rst:408 +#: 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:410 +#: 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 types " -"of arguments a function can accept. For example, given the function " -"definition::" +"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 " @@ -741,7 +759,7 @@ msgstr "" "ci. Les paramètres définissent les types des arguments qu'une fonction " "accepte. Ainsi, avec la définition de fonction suivante ::" -#: faq/programming.rst:418 +#: faq/programming.rst:426 msgid "" "*foo*, *bar* and *kwargs* are parameters of ``func``. However, when calling " "``func``, for example::" @@ -749,30 +767,30 @@ msgstr "" "*foo*, *bar* et *kwargs* sont des paramètres de ``func``. Mais à l'appel de " "``func`` avec, par exemple ::" -#: faq/programming.rst:423 +#: 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:427 +#: 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:429 +#: faq/programming.rst:437 msgid "If you wrote code like::" msgstr "Si vous avez écrit du code comme ::" -#: faq/programming.rst:439 +#: 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:441 +#: 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:443 +#: 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 " @@ -784,14 +802,14 @@ msgstr "" "variable ``y`` qui pointe sur le même objet que ``x``. Ceci signifie qu'il " "n'existe qu'un seul objet (la liste) auquel ``x`` et ``y`` font référence." -#: faq/programming.rst:447 +#: 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:449 +#: 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 " @@ -802,11 +820,11 @@ msgstr "" "objet, il est possible d'accéder à la valeur modifiée ``[10]`` avec chacun " "des noms." -#: faq/programming.rst:453 +#: 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:463 +#: 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 " @@ -825,16 +843,17 @@ msgstr "" "(``x`` fait désormais référence à ``6`` mais ``y`` fait toujours référence à " "``5``)." -#: faq/programming.rst:471 +#: 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 ``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." +"[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 " @@ -845,7 +864,7 @@ msgstr "" "obtenir une copie triée de ``y`` donne ``None``, ce qui conduit très souvent " "le programme à générer une erreur facile à diagnostiquer." -#: faq/programming.rst:480 +#: 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 " @@ -855,17 +874,17 @@ msgid "" "1`` create new objects)." msgstr "" "Il existe cependant une classe d'opérations qui se comporte différemment " -"selon le type : les opérateurs d'affectation incrémentaux. Par exemple, ``" -"+=`` modifie les listes mais pas les *n*-uplets ni les entiers (``a_list += " -"[1, 2, 3]`` équivaut à ``a_list.extend([1, 2, 3])`` et modifie ``a_list``, " -"alors que ``some_tuple += (1, 2, 3)`` et ``some_int += 1`` créent de " -"nouveaux objets)." +"selon le type : les opérateurs d'affectation incrémentaux. Par exemple, " +"``+=`` modifie les listes mais pas les *n*-uplets ni les entiers (``a_list " +"+= [1, 2, 3]`` équivaut à ``a_list.extend([1, 2, 3])`` et modifie " +"``a_list``, alors que ``some_tuple += (1, 2, 3)`` et ``some_int += 1`` " +"créent de nouveaux objets)." -#: faq/programming.rst:487 +#: faq/programming.rst:495 msgid "In other words:" msgstr "En d'autres termes :" -#: faq/programming.rst:489 +#: 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 " @@ -875,7 +894,7 @@ msgstr "" "class:`list`, :class:`dict`, :class:`set`, etc.) et toutes les variables qui " "y font référence verront le changement." -#: faq/programming.rst:492 +#: 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, " @@ -887,7 +906,7 @@ msgstr "" "opérations qui transforment cette valeur en une nouvelle valeur renvoient " "toujours un nouvel objet." -#: faq/programming.rst:497 +#: 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`." @@ -895,13 +914,13 @@ msgstr "" "L'opérateur :keyword:`is` ou la fonction native :func:`id` permettent de " "savoir si deux variables font référence au même objet." -#: faq/programming.rst:502 +#: 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:504 +#: 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 " @@ -914,15 +933,15 @@ msgstr "" "de passage par référence en soi. Il y a cependant plusieurs façons d'en " "émuler un." -#: faq/programming.rst:509 +#: faq/programming.rst:517 msgid "By returning a tuple of the results::" msgstr "En renvoyant un *n*-uplet de résultats ::" -#: faq/programming.rst:520 +#: faq/programming.rst:528 msgid "This is almost always the clearest solution." msgstr "C'est presque toujours la meilleure solution." -#: faq/programming.rst:522 +#: faq/programming.rst:530 msgid "" "By using global variables. This isn't thread-safe, and is not recommended." msgstr "" @@ -930,33 +949,33 @@ msgstr "" "des contextes à plusieurs fils d'exécution (elle n'est pas *thread-safe*), " "et n'est donc pas recommandée." -#: faq/programming.rst:524 +#: 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:535 +#: faq/programming.rst:543 msgid "By passing in a dictionary that gets mutated::" msgstr "En passant un dictionnaire, qui sera modifié ::" -#: faq/programming.rst:546 +#: 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:563 +#: 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:565 +#: 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:569 +#: 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:571 +#: 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 " @@ -968,19 +987,19 @@ msgstr "" "``linear(a, b)`` qui renvoie une fonction ``f(x)`` qui calcule la valeur " "``a*x+b``. En utilisant les portées imbriquées ::" -#: faq/programming.rst:580 +#: faq/programming.rst:588 msgid "Or using a callable object::" msgstr "Ou en utilisant un objet appelable ::" -#: faq/programming.rst:590 +#: faq/programming.rst:598 msgid "In both cases, ::" msgstr "Dans les deux cas ::" -#: faq/programming.rst:594 +#: 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:596 +#: 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 " @@ -991,11 +1010,11 @@ msgstr "" "collection d'objet appelables peuvent partager leurs signatures par " "héritage ::" -#: faq/programming.rst:605 +#: 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:623 +#: faq/programming.rst:631 msgid "" "Here ``inc()``, ``dec()`` and ``reset()`` act like functions which share the " "same counting variable." @@ -1003,11 +1022,11 @@ msgstr "" "Ici ``inc()``, ``dec()`` et ``reset()`` agissent comme des fonctions " "partageant une même variable compteur." -#: faq/programming.rst:628 +#: faq/programming.rst:636 msgid "How do I copy an object in Python?" msgstr "Comment copier un objet en Python ?" -#: faq/programming.rst:630 +#: 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." @@ -1015,7 +1034,7 @@ msgstr "" "En général, essayez :func:`copy.copy` ou :func:`copy.deepcopy`. Tous les " "objets ne peuvent pas être copiés, mais la plupart le peuvent." -#: faq/programming.rst:633 +#: faq/programming.rst:641 msgid "" "Some objects can be copied more easily. Dictionaries have a :meth:`~dict." "copy` method::" @@ -1023,29 +1042,30 @@ msgstr "" "Certains objets peuvent être copiés plus facilement que d'autres. Les " "dictionnaires ont une méthode :meth:`~dict.copy` ::" -#: faq/programming.rst:638 +#: 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:644 +#: 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:646 +#: faq/programming.rst:654 +#, fuzzy msgid "" -"For an instance x of a user-defined class, ``dir(x)`` returns an " -"alphabetized list of the names containing the instance attributes and " +"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:652 +#: 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:654 +#: 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 " @@ -1058,12 +1078,14 @@ msgstr "" "différence près que, dans ce cas, la valeur est un appelable. Par exemple, " "dans le code suivant ::" -#: faq/programming.rst:670 +#: 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." +"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 " @@ -1071,7 +1093,7 @@ msgstr "" "dire si le nom de l'instance est a ou b, les deux noms étant attachés à la " "même valeur." -#: faq/programming.rst:675 +#: 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 " @@ -1083,7 +1105,7 @@ msgstr "" "en train d'écrire un programme introspectif, c'est souvent l'indication " "qu'un changement d'approche serait bénéfique." -#: faq/programming.rst:680 +#: faq/programming.rst:688 msgid "" "In comp.lang.python, Fredrik Lundh once gave an excellent analogy in answer " "to this question:" @@ -1091,7 +1113,7 @@ msgstr "" "Sur *comp.lang.python*, Fredrik Lundh a donné un jour une excellente " "analogie pour répondre à cette question :" -#: faq/programming.rst:683 +#: 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 -- " @@ -1103,7 +1125,7 @@ msgstr "" "­– alors le meilleur moyen de savoir comment il s'appelle est de demander à " "tous vos voisins (espaces de nommage) si c'est leur chat (objet)…" -#: faq/programming.rst:688 +#: 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!" @@ -1111,16 +1133,16 @@ msgstr "" "…et ne soyez pas surpris si vous découvrez qu'il est connu sous plusieurs " "noms, ou s'il n'a pas de nom du tout !" -#: faq/programming.rst:693 +#: 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:695 +#: 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:700 +#: 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::" @@ -1129,11 +1151,11 @@ msgstr "" "expressions, l'expression ci-dessus est évaluée de la même façon que si vous " "aviez écrit ::" -#: faq/programming.rst:705 +#: faq/programming.rst:713 msgid "not::" msgstr "et non ::" -#: faq/programming.rst:709 +#: 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 " @@ -1143,15 +1165,15 @@ msgstr "" "ne sont pas vraiment des opérateurs mais plutôt des délimiteurs syntaxiques " "dans les instructions d'affectation." -#: faq/programming.rst:714 +#: 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:716 +#: faq/programming.rst:724 msgid "Yes, there is. The syntax is as follows::" msgstr "Oui. Sa syntaxe est la suivante ::" -#: faq/programming.rst:723 +#: faq/programming.rst:731 msgid "" "Before this syntax was introduced in Python 2.5, a common idiom was to use " "logical operators::" @@ -1159,7 +1181,7 @@ msgstr "" "Avant l'introduction de cette syntaxe dans Python 2.5, il était courant " "d'utiliser les opérateurs de logique ::" -#: faq/programming.rst:728 +#: 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 ``... " @@ -1169,36 +1191,39 @@ msgstr "" "la valeur booléenne fausse. Il faut donc toujours utiliser la forme ``... " "if ... else ...``." -#: faq/programming.rst:734 +#: 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:736 +#: faq/programming.rst:744 +#, fuzzy msgid "" "Yes. Usually this is done by nesting :keyword:`lambda` within :keyword:`!" -"lambda`. See the following three examples, due to Ulf Bartelt::" +"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:763 +#: faq/programming.rst:771 msgid "Don't try this at home, kids!" msgstr "Les enfants, ne faites pas ça chez vous !" -#: faq/programming.rst:769 +#: 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:771 +#: 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-" +"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::" @@ -1212,7 +1237,7 @@ msgstr "" "que des paramètres uniquement positionnels. Sa documentation est la " "suivante ::" -#: faq/programming.rst:784 +#: 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 " @@ -1222,15 +1247,15 @@ msgstr "" "paramètres sont uniquement positionnels. Et donc, appeler :func:`divmod` " "avec des arguments nommés provoque une erreur ::" -#: faq/programming.rst:795 +#: faq/programming.rst:803 msgid "Numbers and strings" msgstr "Nombres et chaînes de caractères" -#: faq/programming.rst:798 +#: 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:800 +#: 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 " @@ -1240,7 +1265,7 @@ msgstr "" "puis un \"o\" majuscule ou minuscule. Par exemple pour affecter la valeur " "octale \"10\" (8 en décimal) à la variable \"a\", tapez ::" -#: faq/programming.rst:808 +#: 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 " @@ -1251,11 +1276,11 @@ msgstr "" "peuvent être écrits en majuscules ou en minuscules. Par exemple, dans " "l'interpréteur Python ::" -#: faq/programming.rst:821 +#: faq/programming.rst:829 msgid "Why does -22 // 10 return -3?" msgstr "Pourquoi ``-22 // 10`` donne-t-il ``-3`` ?" -#: faq/programming.rst:823 +#: 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::" @@ -1263,7 +1288,7 @@ msgstr "" "Cela est principalement dû à la volonté que ``i % j`` ait le même signe que " "j. Si vous voulez en plus que ::" -#: faq/programming.rst:828 +#: 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 " @@ -1273,7 +1298,7 @@ msgstr "" "également que cette égalité soit vérifiée, et donc les compilateurs qui " "tronquent ``i // j`` ont besoin que ``i % j`` ait le même signe que ``i``." -#: faq/programming.rst:832 +#: 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 " @@ -1287,22 +1312,23 @@ msgstr "" "10 h maintenant, qu'affichait-elle il y a 200 heures ? ``-190 % 12 == 2`` " "est utile ; ``-190 % 12 == -10`` est un bogue en puissance." -#: faq/programming.rst:840 +#: 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:842 +#: faq/programming.rst:850 +#, fuzzy msgid "" -"Trying to lookup an ``int`` literal attribute in the normal manner gives a " -"syntax error because the period is seen as a decimal point::" +"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:851 +#: faq/programming.rst:859 msgid "" "The solution is to separate the literal from the period with either a space " "or parentheses." @@ -1310,11 +1336,11 @@ msgstr "" "Il faut séparer l'entier du point, soit avec une espace, soit avec des " "parenthèses." -#: faq/programming.rst:861 +#: 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:863 +#: 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, " @@ -1324,7 +1350,7 @@ msgstr "" "``int('144') == 144``. De façon similaire, :func:`float` donne la valeur " "flottante, par exemple ``float('144') == 144.0``." -#: faq/programming.rst:867 +#: 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`. " @@ -1340,7 +1366,7 @@ msgstr "" "donnée est 0, le nombre est interprété selon les règles Python : un préfixe " "``0o`` indique de l'octal et ``0x`` indique de l'hexadécimal." -#: faq/programming.rst:874 +#: 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 " @@ -1356,7 +1382,7 @@ msgstr "" "pourrait passer ``__import__('os').system(\"rm -rf $HOME\")`` ce qui " "effacerait votre répertoire personnel." -#: faq/programming.rst:881 +#: 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 " @@ -1367,17 +1393,18 @@ msgstr "" "parce que Python ne permet pas les '0' en tête d'un nombre décimal (à " "l'exception du nombre '0')." -#: faq/programming.rst:887 +#: 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:889 +#: 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}\"." +"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 " @@ -1388,11 +1415,11 @@ msgstr "" "`formatstrings`, par exemple ``\"{:04d}\".format(144)`` produit ``'0144'`` " "et ``\"{:.3f}\".format(1.0/3.0)`` produit ``'0.333'``." -#: faq/programming.rst:898 +#: 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:900 +#: 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 " @@ -1406,17 +1433,17 @@ msgstr "" "capable de modifier de la donnée Unicode « sur place », essayez d'utiliser " "un objet :class:`io.StringIO` ou le module :mod:`array` ::" -#: faq/programming.rst:930 +#: 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:932 +#: faq/programming.rst:940 msgid "There are various techniques." msgstr "Il y a plusieurs façons de faire." -#: faq/programming.rst:934 +#: 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 " @@ -1426,14 +1453,14 @@ msgstr "" "La meilleure est d'utiliser un dictionnaire qui fait correspondre les " "chaînes de caractères à des fonctions. Le principal avantage de cette " "technique est que les chaînes n'ont pas besoin d'être égales aux noms de " -"fonctions. C'est aussi la façon principale d'imiter la construction \"case" -"\" ::" +"fonctions. C'est aussi la façon principale d'imiter la construction " +"\"case\" ::" -#: faq/programming.rst:949 +#: faq/programming.rst:957 msgid "Use the built-in function :func:`getattr`::" msgstr "Utiliser la fonction :func:`getattr` ::" -#: faq/programming.rst:954 +#: faq/programming.rst:962 msgid "" "Note that :func:`getattr` works on any object, including classes, class " "instances, modules, and so on." @@ -1441,17 +1468,17 @@ msgstr "" "Notez que :func:`getattr` marche sur n'importe quel objet, ceci inclut les " "classes, les instances de classes, les modules et ainsi de suite." -#: faq/programming.rst:957 +#: 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:970 +#: 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:982 +#: faq/programming.rst:990 msgid "" "Is there an equivalent to Perl's chomp() for removing trailing newlines from " "strings?" @@ -1459,7 +1486,7 @@ msgstr "" "Existe-t-il un équivalent à la fonction ``chomp()`` de Perl, pour retirer " "les caractères de fin de ligne d'une chaîne de caractères ?" -#: faq/programming.rst:984 +#: 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 " @@ -1473,7 +1500,7 @@ msgstr "" "représente plus d'une ligne, avec plusieurs lignes vides, les marqueurs de " "fin de ligne de chaque ligne vide seront retirés ::" -#: faq/programming.rst:996 +#: 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." @@ -1481,20 +1508,21 @@ 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:1001 +#: faq/programming.rst:1009 msgid "Is there a scanf() or sscanf() equivalent?" msgstr "Existe-t-il un équivalent à ``scanf()`` ou ``sscanf()`` ?" -#: faq/programming.rst:1003 +#: faq/programming.rst:1011 msgid "Not as such." msgstr "Pas exactement." -#: faq/programming.rst:1005 +#: 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`. ``split()`` supports an optional \"sep\" " +"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 "" @@ -1506,33 +1534,74 @@ msgstr "" "paramètre optionnel \"sep\" qui est utile si la ligne utilise autre chose " "que des espaces comme séparateurs." -#: faq/programming.rst:1011 +#: faq/programming.rst:1019 +#, fuzzy msgid "" "For more complicated input parsing, regular expressions are more powerful " -"than C's :c:func:`sscanf` and better suited for the task." +"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:1016 +#: faq/programming.rst:1024 msgid "What does 'UnicodeDecodeError' or 'UnicodeEncodeError' error mean?" msgstr "" "Que signifient les erreurs ``UnicodeDecodeError`` ou ``UnicodeEncodeError`` ?" -#: faq/programming.rst:1018 +#: faq/programming.rst:1026 msgid "See the :ref:`unicode-howto`." msgstr "Voir :ref:`unicode-howto`." -#: faq/programming.rst:1022 +#: 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:1025 +#: 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:1027 +#: faq/programming.rst:1075 msgid "" "That's a tough one, in general. First, here are a list of things to " "remember before diving further:" @@ -1540,7 +1609,7 @@ msgstr "" "Question difficile en général. Il faut garder en tête les points suivants " "avant d'aller plus loin :" -#: faq/programming.rst:1030 +#: faq/programming.rst:1078 msgid "" "Performance characteristics vary across Python implementations. This FAQ " "focuses on :term:`CPython`." @@ -1548,7 +1617,7 @@ msgstr "" "Les performances varient en fonction des implémentations de Python. Cette " "FAQ ne traite que de :term:`CPython`." -#: faq/programming.rst:1032 +#: faq/programming.rst:1080 msgid "" "Behaviour can vary across operating systems, especially when talking about I/" "O or multi-threading." @@ -1557,7 +1626,7 @@ msgstr "" "tout particulièrement quand il s'agit d'entrée/sortie ou de fils d'exécution " "multiples." -#: faq/programming.rst:1034 +#: 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)." @@ -1566,7 +1635,7 @@ msgstr "" "programme *avant* d'essayer d'optimiser du code (voir le module :mod:" "`profile`)." -#: faq/programming.rst:1036 +#: faq/programming.rst:1084 msgid "" "Writing benchmark scripts will allow you to iterate quickly when searching " "for improvements (see the :mod:`timeit` module)." @@ -1574,7 +1643,7 @@ msgstr "" "Écrire des scripts d'évaluation de performances permet de progresser " "rapidement dans la recherche d'améliorations (voir le module :mod:`timeit`)." -#: faq/programming.rst:1038 +#: 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 " @@ -1584,7 +1653,7 @@ msgstr "" "des tests unitaires ou autre) avant d'ajouter des erreurs dans des " "optimisations sophistiquées." -#: faq/programming.rst:1042 +#: 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 " @@ -1594,7 +1663,7 @@ msgstr "" "Voici quelques principes généraux qui peuvent aider à atteindre des niveaux " "de performance satisfaisants :" -#: faq/programming.rst:1046 +#: 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 " @@ -1604,7 +1673,7 @@ msgstr "" "produire de bien meilleurs résultats que d'optimiser çà et là de petites " "portions du code." -#: faq/programming.rst:1050 +#: faq/programming.rst:1098 msgid "" "Use the right data structures. Study documentation for the :ref:`bltin-" "types` and the :mod:`collections` module." @@ -1612,7 +1681,7 @@ msgstr "" "Utiliser les structures de données adaptées. Se référer à la documentation " "des :ref:`bltin-types` et du module :mod:`collections`." -#: faq/programming.rst:1053 +#: 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 " @@ -1631,7 +1700,7 @@ msgstr "" "référer à la section :ref:`sortinghowto` pour des exemples d'utilisation " "courante)." -#: faq/programming.rst:1061 +#: 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, " @@ -1645,10 +1714,11 @@ msgstr "" "éviter trop d'indirections, en particulier sous la forme de fonctions ou " "méthodes trop petites (qui nuisent aussi souvent à la clarté du code)." -#: faq/programming.rst:1067 +#: 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 " +"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 " @@ -1666,7 +1736,7 @@ msgstr "" "vous pouvez aussi :ref:`écrire un module d'extension en C` " "vous-même." -#: faq/programming.rst:1077 +#: faq/programming.rst:1125 msgid "" "The wiki page devoted to `performance tips `_." @@ -1674,13 +1744,13 @@ msgstr "" "La page wiki dédiée aux `astuces de performance `_." -#: faq/programming.rst:1083 +#: 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:1085 +#: faq/programming.rst:1133 msgid "" ":class:`str` and :class:`bytes` objects are immutable, therefore " "concatenating many strings together is inefficient as each concatenation " @@ -1693,7 +1763,7 @@ msgstr "" "général, la complexité est quadratique par rapport à la taille totale de la " "chaîne." -#: faq/programming.rst:1090 +#: 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::" @@ -1702,13 +1772,13 @@ msgstr "" "recommandée consiste à toutes les mettre dans une liste et appeler la " "méthode :meth:`str.join` à la fin ::" -#: faq/programming.rst:1098 +#: 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:1100 +#: 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 ``+=`` " @@ -1718,15 +1788,15 @@ msgstr "" "recommandée consiste à étendre un objet :class:`bytearray` en utilisant la " "concaténation en-place (l'opérateur ``+=``) ::" -#: faq/programming.rst:1109 +#: faq/programming.rst:1157 msgid "Sequences (Tuples/Lists)" msgstr "Séquences (*n*-uplets / listes)" -#: faq/programming.rst:1112 +#: 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:1114 +#: 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." @@ -1735,7 +1805,7 @@ msgstr "" "précisément, tout itérable) en un *n*-uplet avec les mêmes éléments dans le " "même ordre." -#: faq/programming.rst:1117 +#: 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 " @@ -1748,7 +1818,7 @@ msgstr "" "fonction économique à appeler quand vous ne savez pas si votre objet est " "déjà un *n*-uplet." -#: faq/programming.rst:1122 +#: 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, " @@ -1761,11 +1831,11 @@ msgstr "" "``['a','b','c']``. Si l'argument est une liste, il renvoie une copie, de la " "même façon que ``seq[:]``." -#: faq/programming.rst:1129 +#: faq/programming.rst:1177 msgid "What's a negative index?" msgstr "Qu'est-ce qu'un indice négatif ?" -#: faq/programming.rst:1131 +#: 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 " @@ -1779,7 +1849,7 @@ msgstr "" "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:1136 +#: 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 " @@ -1790,15 +1860,15 @@ msgstr "" "caractère, ce qui est pratique pour retirer un caractère de fin de ligne à " "la fin d'une chaîne." -#: faq/programming.rst:1142 +#: 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:1144 +#: faq/programming.rst:1192 msgid "Use the :func:`reversed` built-in function::" msgstr "Utilisez la fonction native :func:`reversed` ::" -#: faq/programming.rst:1149 +#: faq/programming.rst:1197 msgid "" "This won't touch your original sequence, but build a new copy with reversed " "order to iterate over." @@ -1806,21 +1876,21 @@ msgstr "" "Cela ne modifie pas la séquence initiale, mais construit à la place une " "copie en ordre inverse pour itérer dessus." -#: faq/programming.rst:1154 +#: faq/programming.rst:1202 msgid "How do you remove duplicates from a list?" msgstr "Comment retirer les doublons d'une liste ?" -#: faq/programming.rst:1156 +#: 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:1158 +#: faq/programming.rst:1206 msgid "https://code.activestate.com/recipes/52560/" msgstr "https://code.activestate.com/recipes/52560/" -#: faq/programming.rst:1160 +#: 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::" @@ -1829,7 +1899,7 @@ msgstr "" "celle-ci, puis parcourez-la d'un bout à l'autre, en supprimant les doublons " "trouvés en chemin ::" -#: faq/programming.rst:1172 +#: 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 ::" @@ -1838,7 +1908,7 @@ msgstr "" "dictionnaire (c'est-à-dire, qu'elles sont toutes :term:`hachables " "`) ceci est souvent plus rapide ::" -#: faq/programming.rst:1177 +#: faq/programming.rst:1225 msgid "" "This converts the list into a set, thereby removing duplicates, and then " "back into a list." @@ -1846,11 +1916,11 @@ msgstr "" "Ceci convertit la liste en un ensemble, ce qui supprime automatiquement les " "doublons, puis la transforme à nouveau en liste." -#: faq/programming.rst:1182 +#: 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:1184 +#: 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 " @@ -1862,19 +1932,19 @@ msgstr "" "plus rapide d’utiliser le remplacement des tranches par une itération avant, " "implicite ou explicite. Voici trois variantes. ::" -#: faq/programming.rst:1193 +#: 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:1197 +#: faq/programming.rst:1245 msgid "How do you make an array in Python?" msgstr "Comment construire un tableau en Python ?" -#: faq/programming.rst:1199 +#: faq/programming.rst:1247 msgid "Use a list::" msgstr "Utilisez une liste ::" -#: faq/programming.rst:1203 +#: 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 " @@ -1884,29 +1954,32 @@ msgstr "" "principale différence est qu'une liste Python peut contenir des objets de " "différents types." -#: faq/programming.rst:1206 +#: 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." +"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:1211 +#: faq/programming.rst:1260 +#, fuzzy msgid "" -"To get Lisp-style linked lists, you can emulate cons cells using tuples::" +"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:1215 +#: faq/programming.rst:1264 +#, fuzzy msgid "" "If mutability is desired, you could use lists instead of tuples. Here the " -"analogue of lisp car is ``lisp_list[0]`` and the analogue of cdr is " +"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 "" @@ -1916,27 +1989,27 @@ msgstr "" "ceci que si vous êtes réellement sûr d'en avoir besoin, cette méthode est en " "général bien plus lente que les listes Python." -#: faq/programming.rst:1224 +#: faq/programming.rst:1273 msgid "How do I create a multidimensional list?" msgstr "Comment créer une liste à plusieurs dimensions ?" -#: faq/programming.rst:1226 +#: 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:1230 +#: faq/programming.rst:1279 msgid "This looks correct if you print it:" msgstr "Elle semble correcte si on l'affiche :" -#: faq/programming.rst:1241 +#: 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:1253 +#: 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 " @@ -1949,7 +2022,7 @@ msgstr "" "dans une colonne apparaîtra donc dans toutes les colonnes, ce qui n'est très " "probablement pas ce que vous souhaitiez." -#: faq/programming.rst:1258 +#: 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::" @@ -1957,7 +2030,7 @@ msgstr "" "L'approche suggérée est d'abord de créer une liste de la longueur désirée, " "puis de remplir tous les éléments avec une nouvelle chaîne ::" -#: faq/programming.rst:1265 +#: faq/programming.rst:1314 msgid "" "This generates a list containing 3 different lists of length two. You can " "also use a list comprehension::" @@ -1966,30 +2039,31 @@ msgstr "" "longueur deux. Vous pouvez aussi utiliser la syntaxe des listes en " "compréhension ::" -#: faq/programming.rst:1271 +#: faq/programming.rst:1320 +#, fuzzy msgid "" -"Or, you can use an extension that provides a matrix datatype; `NumPy `_ is the best known." +"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:1276 +#: 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:1278 +#: faq/programming.rst:1327 msgid "Use a list comprehension::" msgstr "Utilisez une liste en compréhension ::" -#: faq/programming.rst:1285 +#: 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:1287 +#: 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 " @@ -1999,7 +2073,7 @@ msgstr "" "d'affectation incrémentaux sont des opérateurs d'*affectation* et à la " "différence entre les objets muables et immuables en Python." -#: faq/programming.rst:1291 +#: 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 " @@ -2009,11 +2083,11 @@ msgstr "" "incrémentale sont appliqués aux éléments d'un *n*-uplet qui pointe sur des " "objets muables, mais on prendra ``list`` et ``+=`` comme exemple." -#: faq/programming.rst:1295 +#: faq/programming.rst:1344 msgid "If you wrote::" msgstr "Si vous écrivez ::" -#: faq/programming.rst:1303 +#: 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, " @@ -2027,7 +2101,7 @@ msgstr "" "l'élément ``0`` du *n*-uplet, on obtient une erreur car il est impossible de " "modifier la cible sur laquelle pointe un élément d'un *n*-uplet." -#: faq/programming.rst:1309 +#: faq/programming.rst:1358 msgid "" "Under the covers, what this augmented assignment statement is doing is " "approximately this::" @@ -2035,7 +2109,7 @@ msgstr "" "Sous le capot, une instruction d'affectation incrémentale fait à peu près " "ceci ::" -#: faq/programming.rst:1318 +#: faq/programming.rst:1367 msgid "" "It is the assignment part of the operation that produces the error, since a " "tuple is immutable." @@ -2043,11 +2117,11 @@ msgstr "" "C'est la partie de l'affectation de l'opération qui génère l'erreur, vu " "qu'un *n*-uplet est immuable." -#: faq/programming.rst:1321 +#: faq/programming.rst:1370 msgid "When you write something like::" msgstr "Quand vous écrivez un code du style ::" -#: faq/programming.rst:1329 +#: 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::" @@ -2055,14 +2129,16 @@ msgstr "" "L'exception est un peu plus surprenante et, chose encore plus étrange, " "malgré l'erreur, l'ajout a fonctionné ::" -#: faq/programming.rst:1335 +#: faq/programming.rst:1384 +#, fuzzy msgid "" "To see why this happens, you need to know that (a) if an object implements " -"an ``__iadd__`` magic method, it gets called when the ``+=`` augmented " -"assignment is executed, and its return value is what gets used in the " -"assignment statement; and (b) for lists, ``__iadd__`` is equivalent to " -"calling ``extend`` on the list and returning the list. That's why we say " -"that for lists, ``+=`` is a \"shorthand\" for ``list.extend``::" +"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 " @@ -2072,11 +2148,11 @@ msgstr "" "renvoyer celle-ci. C'est pour cette raison que l'on dit que pour les listes, " "``+=`` est un \"raccourci\" pour ``list.extend`` ::" -#: faq/programming.rst:1347 +#: faq/programming.rst:1397 msgid "This is equivalent to::" msgstr "C’est équivalent à ::" -#: faq/programming.rst:1352 +#: 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 " @@ -2088,24 +2164,25 @@ msgstr "" "change rien, puisque c'est un pointeur vers le même objet que sur lequel " "pointait ``a_list``, mais l'affectation a tout de même lieu." -#: faq/programming.rst:1357 +#: 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:1365 +#: faq/programming.rst:1415 +#, fuzzy msgid "" -"The ``__iadd__`` succeeds, and thus the list is extended, but even though " -"``result`` points to the same object that ``a_tuple[0]`` already points to, " -"that final assignment still results in an error, because tuples are " -"immutable." +"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:1371 +#: faq/programming.rst:1421 msgid "" "I want to do a complicated sort: can you do a Schwartzian Transform in " "Python?" @@ -2113,7 +2190,7 @@ msgstr "" "Je souhaite faire un classement compliqué : peut-on faire une transformation " "de Schwartz en Python ?" -#: faq/programming.rst:1373 +#: 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 " @@ -2125,11 +2202,11 @@ msgstr "" "chaque élément à sa \"valeur de tri\". En Python, ceci est géré par " "l'argument ``key`` de la méthode :meth:`list.sort` ::" -#: faq/programming.rst:1382 +#: 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:1384 +#: faq/programming.rst:1434 msgid "" "Merge them into an iterator of tuples, sort the resulting list, and then " "pick out the element you want. ::" @@ -2137,15 +2214,15 @@ msgstr "" "Fusionnez-les dans un itérateur de *n*-uplets, ordonnez la liste obtenue, " "puis choisissez l'élément que vous voulez ::" -#: faq/programming.rst:1399 +#: faq/programming.rst:1449 msgid "Objects" msgstr "Objets" -#: faq/programming.rst:1402 +#: faq/programming.rst:1452 msgid "What is a class?" msgstr "Qu'est-ce qu'une classe ?" -#: faq/programming.rst:1404 +#: 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, " @@ -2157,7 +2234,7 @@ msgstr "" "créer des objets, qui incarnent à la fois les données (attributs) et le code " "(méthodes) spécifiques à un type de données." -#: faq/programming.rst:1408 +#: 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. " @@ -2175,11 +2252,11 @@ msgstr "" "``MaildirMailbox``, ``OutlookMailbox`` qui gèrent les plusieurs formats " "spécifiques de boîtes aux lettres." -#: faq/programming.rst:1417 +#: faq/programming.rst:1467 msgid "What is a method?" msgstr "Qu'est-ce qu'une méthode ?" -#: faq/programming.rst:1419 +#: 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 " @@ -2189,11 +2266,11 @@ msgstr "" "générale sous la forme ``x.name(arguments…)``. Les méthodes sont définies " "comme des fonctions à l'intérieur de la définition de classe ::" -#: faq/programming.rst:1429 +#: faq/programming.rst:1479 msgid "What is self?" msgstr "Qu'est-ce que self ?" -#: faq/programming.rst:1431 +#: 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, " @@ -2206,11 +2283,11 @@ msgstr "" "est définie ; tout se passe comme si la méthode était appelée comme " "``meth(x, a, b, c)``." -#: faq/programming.rst:1436 +#: faq/programming.rst:1486 msgid "See also :ref:`why-self`." msgstr "Voir aussi :ref:`why-self`." -#: faq/programming.rst:1440 +#: 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?" @@ -2218,13 +2295,15 @@ 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:1442 +#: faq/programming.rst:1492 +#, fuzzy msgid "" -"Use the built-in function ``isinstance(obj, cls)``. You can check if an " -"object is an instance of any of a number of classes by providing a tuple " -"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))``." +"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 " @@ -2233,7 +2312,7 @@ msgstr "" "l'un des types natifs de Python, par exemple ``isinstance(obj, str)`` ou " "``isinstance(obj, (int, float, complex))``." -#: faq/programming.rst:1448 +#: 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 " @@ -2247,7 +2326,7 @@ msgstr "" "fille de B. Pour vérifier l'héritage dans le sens plus restreint, parcourez " "l'\\ :term:`ordre de résolution des méthodes ` de la classe :" -#: faq/programming.rst:1483 +#: 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 " @@ -2263,7 +2342,7 @@ msgstr "" "plutôt que de vérifier la classe de l'objet et de faire un traitement ad-" "hoc. Par exemple, si vous avez une fonction qui fait quelque chose ::" -#: faq/programming.rst:1497 +#: faq/programming.rst:1548 msgid "" "A better approach is to define a ``search()`` method on all the classes and " "just call it::" @@ -2271,11 +2350,11 @@ msgstr "" "Une meilleure approche est de définir une méthode ``search()`` dans toutes " "les classes et qu'il suffit d'appeler de la manière suivante ::" -#: faq/programming.rst:1512 +#: faq/programming.rst:1563 msgid "What is delegation?" msgstr "Qu'est-ce que la délégation ?" -#: faq/programming.rst:1514 +#: 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 " @@ -2290,7 +2369,7 @@ msgstr "" "dans l'évolution et qui délègue toute autre méthode à la méthode " "correspondante de ``x``." -#: faq/programming.rst:1520 +#: 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 " @@ -2300,14 +2379,15 @@ msgstr "" "Par exemple, la classe suivante implémente une classe qui se comporte comme " "un fichier, mais convertit toutes les données écrites en majuscules ::" -#: faq/programming.rst:1535 +#: 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 ``__getattr__`` " -"method; consult :ref:`the language reference ` for more " -"information about controlling attribute access." +"_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 " @@ -2317,12 +2397,13 @@ msgstr "" "` pour plus d'informations sur la personnalisation de " "l’accès aux attributs." -#: faq/programming.rst:1542 +#: 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:" -"`__setattr__` method too, and it must do so carefully. The basic " -"implementation of :meth:`__setattr__` is roughly equivalent to the " +"`~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 " @@ -2331,16 +2412,18 @@ msgstr "" "et il doit le faire avec soin. La mise en œuvre basique de la méthode :meth:" "`__setattr__` est à peu près équivalent à ce qui suit ::" -#: faq/programming.rst:1553 +#: faq/programming.rst:1604 +#, fuzzy msgid "" -"Most :meth:`__setattr__` implementations must modify ``self.__dict__`` to " -"store local state for self without causing an infinite recursion." +"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:1558 +#: faq/programming.rst:1610 msgid "" "How do I call a method defined in a base class from a derived class that " "extends it?" @@ -2348,11 +2431,11 @@ msgstr "" "Comment appeler une méthode définie dans une classe de base depuis une " "classe dérivée qui la surcharge ?" -#: faq/programming.rst:1560 +#: faq/programming.rst:1612 msgid "Use the built-in :func:`super` function::" msgstr "Utilisez la fonction native :func:`super` ::" -#: faq/programming.rst:1566 +#: 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 " @@ -2365,13 +2448,13 @@ msgstr "" "__mro__``, et renvoie la classe qui suit ``Derived`` dans cet ordre, donc " "``Base``." -#: faq/programming.rst:1573 +#: 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:1575 +#: 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, " @@ -2384,13 +2467,13 @@ msgstr "" "dynamiquement (par exemple en fonction de la disponibilité de certaines " "ressources) la classe de base à utiliser. Exemple ::" -#: faq/programming.rst:1590 +#: 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:1592 +#: faq/programming.rst:1644 msgid "" "Both static data and static methods (in the sense of C++ or Java) are " "supported in Python." @@ -2398,7 +2481,7 @@ msgstr "" "Les données statiques et les méthodes statiques (au sens C++ ou Java) sont " "prises en charge en Python." -#: faq/programming.rst:1595 +#: 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::" @@ -2407,7 +2490,7 @@ msgstr "" "attribuer une nouvelle valeur à l'attribut, vous devez explicitement " "utiliser le nom de classe dans l'affectation ::" -#: faq/programming.rst:1607 +#: 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 " @@ -2418,7 +2501,7 @@ msgstr "" "une classe sur le chemin de recherche de classe de base de ``c.__class__`` " "jusqu'à ``C``." -#: faq/programming.rst:1611 +#: 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 " @@ -2431,11 +2514,11 @@ msgstr "" "de classe doit toujours spécifier la classe, que l'on soit à l'intérieur " "d'une méthode ou non ::" -#: faq/programming.rst:1618 +#: faq/programming.rst:1670 msgid "Static methods are possible::" msgstr "Il est possible d'utiliser des méthodes statiques ::" -#: faq/programming.rst:1626 +#: 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::" @@ -2443,7 +2526,7 @@ msgstr "" "Cependant, d'une manière beaucoup plus simple pour obtenir l'effet d'une " "méthode statique se fait par une simple fonction au niveau du module ::" -#: faq/programming.rst:1632 +#: 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." @@ -2452,11 +2535,11 @@ msgstr "" "hiérarchie des classes connexes) par module, ceci fournira l'encapsulation " "souhaitée." -#: faq/programming.rst:1637 +#: 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:1639 +#: faq/programming.rst:1691 msgid "" "This answer actually applies to all methods, but the question usually comes " "up first in the context of constructors." @@ -2464,11 +2547,11 @@ msgstr "" "Cette réponse s'applique en fait à toutes les méthodes, mais la question se " "pose généralement dans le contexte des constructeurs." -#: faq/programming.rst:1642 +#: faq/programming.rst:1694 msgid "In C++ you'd write" msgstr "En C++, on écrirait" -#: faq/programming.rst:1651 +#: faq/programming.rst:1703 msgid "" "In Python you have to write a single constructor that catches all cases " "using default arguments. For example::" @@ -2476,29 +2559,29 @@ msgstr "" "En Python, vous devez écrire un constructeur unique qui considère tous les " "cas en utilisant des arguments par défaut. Par exemple ::" -#: faq/programming.rst:1661 +#: 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:1663 +#: 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:1668 +#: 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:1672 +#: 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:1674 +#: 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 " @@ -2514,7 +2597,7 @@ msgstr "" "remplacé par ``_classname__spam``, où ``classname`` est le nom de la classe " "en cours sans les éventuels tirets bas du début." -#: faq/programming.rst:1680 +#: 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 " @@ -2526,36 +2609,38 @@ msgstr "" "privées sont visibles dans l'objet ``__dict__``. De nombreux programmeurs " "Python ne prennent jamais la peine d'utiliser des noms de variable privés." -#: faq/programming.rst:1687 +#: 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:1689 +#: faq/programming.rst:1741 msgid "There are several possible reasons for this." msgstr "Il y a plusieurs explications possibles." -#: faq/programming.rst:1691 +#: faq/programming.rst:1743 +#, fuzzy msgid "" -"The del statement does not necessarily call :meth:`__del__` -- it simply " -"decrements the object's reference count, and if this reaches zero :meth:" -"`__del__` is called." +"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:1695 +#: 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__` " +"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 " +"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 "" @@ -2572,12 +2657,13 @@ msgstr "" "miettes avec la fonction :func:`gc.collect`, mais il existe certains cas où " "les objets ne seront jamais nettoyés." -#: faq/programming.rst:1706 +#: 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 " +"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 "" @@ -2589,7 +2675,7 @@ msgstr "" "`__del__` devrait appeler la méthode ``close()`` et ``close()`` doit pouvoir " "être appelée plusieurs fois sur le même objet." -#: faq/programming.rst:1713 +#: 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 " @@ -2602,19 +2688,20 @@ msgstr "" "d'arbres devraient utiliser des références faibles entre pères et fils (si " "nécessaire !)." -#: faq/programming.rst:1726 +#: faq/programming.rst:1778 +#, fuzzy msgid "" -"Finally, if your :meth:`__del__` method raises an exception, a warning " +"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:1731 +#: 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:1733 +#: 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 " @@ -2625,13 +2712,13 @@ msgstr "" "constructeur de la classe de façon à tenir un tel registre, en maintenant " "une liste de références faibles vers chaque instance." -#: faq/programming.rst:1739 +#: 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:1741 +#: 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 " @@ -2645,7 +2732,7 @@ msgstr "" "à une adresse mémoire identique à celle d'un objet venant d'être supprimé. " "Comme l'illustre le code suivant :" -#: faq/programming.rst:1752 +#: 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 " @@ -2657,11 +2744,11 @@ msgstr "" "objets dont on veut examiner les identifiants sont toujours en vie, créons " "une nouvelle référence à l'objet :" -#: faq/programming.rst:1765 +#: 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:1767 +#: faq/programming.rst:1819 msgid "" "The ``is`` operator tests for object identity. The test ``a is b`` is " "equivalent to ``id(a) == id(b)``." @@ -2669,7 +2756,7 @@ 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:1770 +#: 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 " @@ -2682,7 +2769,7 @@ msgstr "" "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:1775 +#: 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 " @@ -2692,7 +2779,7 @@ msgstr "" "si l'identité est garantie. C'est le cas dans les trois situations " "suivantes :" -#: faq/programming.rst:1779 +#: 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``." @@ -2701,7 +2788,7 @@ msgstr "" "objets. Après l'affectation ``nouveau = ancien``, ``nouveau is ancien`` vaut " "toujours ``True``." -#: faq/programming.rst:1782 +#: 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 " @@ -2712,7 +2799,7 @@ msgstr "" "de *x* à l'indice 0, ``s[0] = x``, le test ``s[0] is x`` s'évalue forcément " "à ``True``." -#: faq/programming.rst:1786 +#: 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 " @@ -2722,7 +2809,7 @@ msgstr "" "Après les affectations ``a = None`` et ``b = None``, on a forcément ``a is " "b``, puisque ``None`` est un singleton." -#: faq/programming.rst:1790 +#: 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 " @@ -2735,13 +2822,13 @@ msgstr "" "chaînes de caractères (type :class:`str`) car ces valeurs ne sont pas " "nécessairement des singletons ::" -#: faq/programming.rst:1807 +#: 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:1814 +#: faq/programming.rst:1866 msgid "" "In the standard library code, you will see several common patterns for " "correctly using identity tests:" @@ -2750,7 +2837,7 @@ msgstr "" "utiliser correctement les tests d'identité dans certaines situations " "particulières :" -#: faq/programming.rst:1817 +#: 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 " @@ -2762,10 +2849,10 @@ msgstr "" "None``, ``x is not None``), et cela évite des surprises avec les objets dont " "la valeur booléenne est ``False``." -#: faq/programming.rst:1821 +#: 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 an singleton sentinel object " +"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 "" @@ -2775,7 +2862,7 @@ msgstr "" "« sentinelle », distinct de toute valeur acceptable. Voici par exemple " "comment écrire une méthode qui émule :meth:`dict.pop` :" -#: faq/programming.rst:1837 +#: 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 " @@ -2786,7 +2873,7 @@ msgstr "" "souhaité avec les objets comme ``float('NaN')`` qui ne sont pas égaux à eux-" "mêmes." -#: faq/programming.rst:1841 +#: faq/programming.rst:1893 msgid "" "For example, here is the implementation of :meth:`collections.abc.Sequence." "__contains__`::" @@ -2794,18 +2881,19 @@ msgstr "" "Par exemple, l'implémentation de :meth:`collections.abc.Sequence." "__contains__` est ::" -#: faq/programming.rst:1852 +#: 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:1854 +#: faq/programming.rst:1906 +#, fuzzy msgid "" -"When subclassing an immutable type, override the :meth:`__new__` method " -"instead of the :meth:`__init__` method. The latter only runs *after* an " -"instance is created, which is too late to alter data in an immutable " -"instance." +"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:" @@ -2813,7 +2901,7 @@ msgstr "" "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:1859 +#: faq/programming.rst:1911 msgid "" "All of these immutable classes have a different signature than their parent " "class:" @@ -2821,15 +2909,15 @@ msgstr "" "Toutes les classes d'objets immuables suivantes ont des signatures de " "constructeur différentes de leur classe mère :" -#: faq/programming.rst:1885 +#: faq/programming.rst:1937 msgid "The classes can be used like this:" msgstr "Ces classes s'utilisent comme ceci :" -#: faq/programming.rst:1900 +#: 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:1902 +#: 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 " @@ -2840,7 +2928,7 @@ msgstr "" "valeurs au niveau de l'instance, et :func:`functools.lru_cache`, qui le fait " "au niveau de la classe." -#: faq/programming.rst:1907 +#: 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 " @@ -2850,9 +2938,9 @@ msgstr "" "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:1911 +#: faq/programming.rst:1963 msgid "" -"The advantage is that when an instance is not longer used, the cached method " +"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." @@ -2861,17 +2949,18 @@ msgstr "" "détruite. L'inconvénient est que les caches peuvent s'accumuler avec les " "instances, sans limite de nombre." -#: faq/programming.rst:1916 +#: faq/programming.rst:1968 +#, fuzzy msgid "" -"The *lru_cache* approach works with methods that have hashable arguments. " -"It creates a reference to the instance unless special efforts are made to " -"pass in weak references." +"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:1920 +#: 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 " @@ -2885,11 +2974,11 @@ msgstr "" "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:1925 +#: faq/programming.rst:1977 msgid "This example shows the various techniques::" msgstr "Voici une démonstration des différentes techniques ::" -#: faq/programming.rst:1949 +#: 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 " @@ -2900,7 +2989,7 @@ msgstr "" "``cached_property`` ne peut pas fonctionner car elle ne peut pas détecter " "les mutations pour invalider le cache." -#: faq/programming.rst:1954 +#: 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 " @@ -2910,15 +2999,15 @@ msgstr "" "méthodes ``__eq__`` et ``__hash__`` pour que le cache soit à même de " "détecter toute modification des attributs ::" -#: faq/programming.rst:1980 +#: faq/programming.rst:2032 msgid "Modules" msgstr "Modules" -#: faq/programming.rst:1983 +#: faq/programming.rst:2035 msgid "How do I create a .pyc file?" msgstr "Comment créer des fichiers ``.pyc`` ?" -#: faq/programming.rst:1985 +#: 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 " @@ -2936,7 +3025,7 @@ msgstr "" "centrale qui dépend du binaire ``python`` qui l'a créé (voir la :pep:`3147` " "pour de plus amples précisions)." -#: faq/programming.rst:1993 +#: 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 " @@ -2951,7 +3040,7 @@ msgstr "" "utilisateur, mais que le code est exécuté en tant qu'un autre utilisateur, " "par exemple pour tester un serveur Web." -#: faq/programming.rst:1998 +#: 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 " @@ -2965,7 +3054,7 @@ msgstr "" "dans ce sous-répertoire, à moins que la variable d'environnement :envvar:" "`PYTHONDONTWRITEBYTECODE` soit définie." -#: faq/programming.rst:2003 +#: 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." @@ -2981,7 +3070,7 @@ msgstr "" "console), un fichier ``.pyc`` est créé pour ``xyz`` mais pas pour ``foo`` " "car ``foo.py`` n'est pas importé." -#: faq/programming.rst:2010 +#: 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:" @@ -2991,7 +3080,7 @@ msgstr "" "``.pyc`` pour un module qui n'est pas importé — il existe les modules :mod:" "`py_compile` et :mod:`compileall`." -#: faq/programming.rst:2014 +#: 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::" @@ -3000,7 +3089,7 @@ msgstr "" "manuellement. Il est ainsi possible d'appeler la fonction ``compile()`` de " "manière interactive ::" -#: faq/programming.rst:2020 +#: 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 " @@ -3010,7 +3099,7 @@ msgstr "" "de ``foo.py`` (le paramètre optionnel ``cfile`` permet de changer ce " "comportement)." -#: faq/programming.rst:2024 +#: 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 " @@ -3022,11 +3111,11 @@ msgstr "" "en exécutant ``compileall.py`` avec le chemin du dossier contenant les " "fichiers Python à compiler ::" -#: faq/programming.rst:2033 +#: faq/programming.rst:2085 msgid "How do I find the current module name?" msgstr "Comment obtenir le nom du module actuel ?" -#: faq/programming.rst:2035 +#: 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 " @@ -3041,51 +3130,51 @@ msgstr "" "interface en ligne de commande ou un test automatique. Ils n'exécutent cette " "portion du code qu'après avoir vérifié la valeur de ``__name__`` ::" -#: faq/programming.rst:2050 +#: 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:2052 +#: faq/programming.rst:2104 msgid "Suppose you have the following modules:" msgstr "Considérons les modules suivants :" -#: faq/programming.rst:2054 +#: faq/programming.rst:2106 msgid ":file:`foo.py`::" msgstr ":file:`foo.py` ::" -#: faq/programming.rst:2059 +#: faq/programming.rst:2111 msgid ":file:`bar.py`::" msgstr ":file:`bar.py` ::" -#: faq/programming.rst:2064 +#: 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:2066 +#: faq/programming.rst:2118 msgid "main imports ``foo``" msgstr "*main* importe *foo* ;" -#: faq/programming.rst:2067 +#: faq/programming.rst:2119 msgid "Empty globals for ``foo`` are created" msgstr "Les variables globales (vides) de *foo* sont créées ;" -#: faq/programming.rst:2068 +#: faq/programming.rst:2120 msgid "``foo`` is compiled and starts executing" msgstr "*foo* est compilé et commence à s'exécuter ;" -#: faq/programming.rst:2069 +#: faq/programming.rst:2121 msgid "``foo`` imports ``bar``" msgstr "*foo* importe *bar* ;" -#: faq/programming.rst:2070 +#: faq/programming.rst:2122 msgid "Empty globals for ``bar`` are created" msgstr "Les variables globales (vides) de *bar* sont créées ;" -#: faq/programming.rst:2071 +#: faq/programming.rst:2123 msgid "``bar`` is compiled and starts executing" msgstr "*bar* est compilé et commence à s'exécuter ;" -#: faq/programming.rst:2072 +#: faq/programming.rst:2124 msgid "" "``bar`` imports ``foo`` (which is a no-op since there already is a module " "named ``foo``)" @@ -3093,7 +3182,7 @@ msgstr "" "*bar* importe *foo* (en réalité, rien ne passe car il y a déjà un module " "appelé *foo*) ;" -#: faq/programming.rst:2073 +#: faq/programming.rst:2125 msgid "" "The import mechanism tries to read ``foo_var`` from ``foo`` globals, to set " "``bar.foo_var = foo.foo_var``" @@ -3102,7 +3191,7 @@ msgstr "" "globales de *foo* pour procéder à l'affectation ``bar.foo_var = foo." "foo_var``." -#: faq/programming.rst:2075 +#: 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." @@ -3110,7 +3199,7 @@ msgstr "" "La dernière étape échoue car Python n'a pas fini d'interpréter ``foo`` et le " "dictionnaire global des symboles de ``foo`` est encore vide." -#: faq/programming.rst:2078 +#: 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." @@ -3118,11 +3207,11 @@ msgstr "" "Le même phénomène arrive quand on utilise ``import foo``, et qu'on essaye " "ensuite d'accéder à ``foo.foo_var`` dans le code global." -#: faq/programming.rst:2081 +#: 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:2083 +#: faq/programming.rst:2135 msgid "" "Guido van Rossum recommends avoiding all uses of ``from import ..." "``, and placing all code inside functions. Initializations of global " @@ -3136,14 +3225,14 @@ msgstr "" "des fonctions natives. Ceci implique que tout ce qui est fourni par un " "module soit référencé par ``.``." -#: faq/programming.rst:2088 +#: 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:2090 +#: faq/programming.rst:2142 msgid "" "exports (globals, functions, and classes that don't need imported base " "classes)" @@ -3151,19 +3240,18 @@ msgstr "" "les exportations (variables globales, fonctions et les classes qui ne " "nécessitent d'importer des classes de base)" -#: faq/programming.rst:2092 +#: faq/programming.rst:2144 msgid "``import`` statements" msgstr "les instructions ``import``" -#: faq/programming.rst:2093 +#: 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:2095 -#, fuzzy +#: 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." @@ -3171,7 +3259,7 @@ msgstr "" "van Rossum désapprouve cette approche car les importations se trouvent à un " "endroit bizarre, mais cela fonctionne." -#: faq/programming.rst:2098 +#: faq/programming.rst:2150 msgid "" "Matthias Urlichs recommends restructuring your code so that the recursive " "import is not necessary in the first place." @@ -3179,16 +3267,16 @@ msgstr "" "Matthias Urlichs conseille de restructurer le code pour éviter les " "importations récursives." -#: faq/programming.rst:2101 +#: faq/programming.rst:2153 msgid "These solutions are not mutually exclusive." msgstr "Ces solutions peuvent être combinées." -#: faq/programming.rst:2105 +#: 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:2107 +#: faq/programming.rst:2159 msgid "" "Consider using the convenience function :func:`~importlib.import_module` " "from :mod:`importlib` instead::" @@ -3196,7 +3284,7 @@ msgstr "" "Utilisez plutôt la fonction :func:`~importlib.import_module` de :mod:" "`importlib` ::" -#: faq/programming.rst:2114 +#: faq/programming.rst:2166 msgid "" "When I edit an imported module and reimport it, the changes don't show up. " "Why does this happen?" @@ -3204,7 +3292,7 @@ msgstr "" "Quand j'édite un module et que je le réimporte, je ne vois pas les " "changements. Pourquoi ?" -#: faq/programming.rst:2116 +#: 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 " @@ -3219,7 +3307,7 @@ msgstr "" "ré-analysé un très grand nombre de fois. Pour forcer la relecture d'un " "module, il faut faire ::" -#: faq/programming.rst:2126 +#: faq/programming.rst:2178 msgid "" "Warning: this technique is not 100% fool-proof. In particular, modules " "containing statements like ::" @@ -3227,7 +3315,7 @@ msgstr "" "Attention, cette technique ne marche pas systématiquement. En particulier, " "les modules qui contiennent des instructions comme ::" -#: faq/programming.rst:2131 +#: 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 " @@ -3239,7 +3327,7 @@ msgstr "" "celle-ci ne sont *pas* mises à jour avec la nouvelle définition de la " "classe. Ceci peut conduire au comportement paradoxal suivant ::" -#: faq/programming.rst:2144 +#: faq/programming.rst:2196 msgid "" "The nature of the problem is made clear if you print out the \"identity\" of " "the class objects::" diff --git a/faq/windows.po b/faq/windows.po index 4e98397d49..3a7b71674e 100644 --- a/faq/windows.po +++ b/faq/windows.po @@ -5,15 +5,15 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-05-29 16:33+0200\n" -"PO-Revision-Date: 2021-12-11 15:54+0100\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 2.4.1\n" +"X-Generator: Poedit 3.0.1\n" #: faq/windows.rst:9 msgid "Python on Windows FAQ" @@ -40,19 +40,19 @@ msgstr "" #: faq/windows.rst:28 msgid "" "Unless you use some sort of integrated development environment, you will end " -"up *typing* Windows commands into what is variously referred to as a \"DOS " -"window\" or \"Command prompt window\". Usually you can create such a window " -"from your search bar by searching for ``cmd``. You should be able to " -"recognize when you have started such a window because you will see a Windows " -"\"command prompt\", which usually looks like this:" +"up *typing* Windows commands into what is referred to as a \"Command prompt " +"window\". Usually you can create such a window from your search bar by " +"searching for ``cmd``. You should be able to recognize when you have " +"started such a window because you will see a Windows \"command prompt\", " +"which usually looks like this:" msgstr "" "À moins que vous n'utilisiez une sorte d'environnement de développement, " -"vous finirez par *taper* des commandes Windows dans ce qui est diversement " -"appelé une \"fenêtre DOS\" ou \"invite de commande Windows\". En général " -"vous pouvez ouvrir un telle fenêtre depuis votre barre de recherche en " -"cherchant ``cmd``. Vous devriez être capable de 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 :" +"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 "" @@ -289,12 +289,13 @@ msgstr "" "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." +"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 " @@ -337,21 +338,14 @@ msgstr "" "peuvent rendre l'utilisation de ces pointeurs transparente à tout code C qui " "appelle des routines dans l'API C de Python." -#: faq/windows.rst:189 -msgid "" -"Borland note: convert :file:`python{NN}.lib` to OMF format using Coff2Omf." -"exe first." -msgstr "" -"Note Borland : convertir :file:`python{NN}.lib` au format OMF en utilisant " -"*Coff2Omf.exe* en premier." - -#: faq/windows.rst:194 +#: 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." +"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 " @@ -360,7 +354,7 @@ msgstr "" "n'avez **pas** besoin de créer un fichier DLL, et cela simplifie également " "la liaison." -#: faq/windows.rst:200 +#: 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 " @@ -375,7 +369,7 @@ msgstr "" "appelée *initleoc()*. Ceci initialise une classe auxiliaire invisible " "utilisée par la classe *shadow*." -#: faq/windows.rst:206 +#: 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 " @@ -385,7 +379,7 @@ msgstr "" "*fichier.exe* est que l'appel de la fonction d'initialisation équivaut à " "importer le module dans Python ! (C'est le deuxième fait clé non documenté.)" -#: faq/windows.rst:210 +#: faq/windows.rst:207 msgid "" "In short, you can use the following code to initialize the Python " "interpreter with your extension module." @@ -393,7 +387,7 @@ msgstr "" "En bref, vous pouvez utiliser le code suivant pour initialiser " "l'interpréteur Python avec votre module d'extension." -#: faq/windows.rst:221 +#: 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." @@ -402,12 +396,13 @@ msgstr "" "utilisez un compilateur autre que MSVC, le compilateur utilisé pour " "construire *pythonNN.dll*." -#: faq/windows.rst:224 +#: faq/windows.rst:221 +#, fuzzy msgid "" -"Problem 1: The so-called \"Very High Level\" functions that take FILE * " +"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." +"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-" @@ -415,7 +410,7 @@ msgstr "" "structure de FILE. Du point de vue de l'implémentation, il s'agit de " "fonctions de très bas niveau." -#: faq/windows.rst:229 +#: faq/windows.rst:226 msgid "" "Problem 2: SWIG generates the following code when generating wrappers to " "void functions:" @@ -423,7 +418,7 @@ msgstr "" "Problème 2 : SWIG génère le code suivant lors de la génération " "*d'encapsuleurs* pour annuler les fonctions :" -#: faq/windows.rst:238 +#: 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 " @@ -434,7 +429,7 @@ msgstr "" "une fois, ce code échouera dans un environnement multi-compilateur. " "Remplacez ce code par :" -#: faq/windows.rst:246 +#: 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 " @@ -444,7 +439,7 @@ msgstr "" "le changement automatiquement, bien que je n'ai pas réussi à le faire " "fonctionner (je suis un débutant complet avec SWIG)." -#: faq/windows.rst:250 +#: 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 " @@ -465,13 +460,13 @@ msgstr "" "dont vous avez besoin est un objet Python (défini dans votre module " "d'extension) qui contient les méthodes *read()* et *write()*." -#: faq/windows.rst:259 +#: 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:261 +#: 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 " @@ -482,7 +477,7 @@ msgstr "" "dans les codes Python. C'est aussi le comportement par défaut d'Emacs avec " "Python." -#: faq/windows.rst:265 +#: 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 :" @@ -496,7 +491,7 @@ msgstr "" "Tabs` et pour le type de fichier par défaut, vous devez mettre *Tab size* et " "*Indent size* à 4, puis sélectionner *Insert spaces*." -#: faq/windows.rst:270 +#: 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:" @@ -506,13 +501,13 @@ msgstr "" "tabulation et d’indentation pose problème en début de ligne. Vous pouvez " "aussi utiliser le module :mod:`tabnanny` pour détecter ces erreurs." -#: faq/windows.rst:277 +#: 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:279 +#: 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 " @@ -523,6 +518,26 @@ msgstr "" "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 " diff --git a/glossary.po b/glossary.po index 979e5c8e2e..5d364a966f 100644 --- a/glossary.po +++ b/glossary.po @@ -5,15 +5,15 @@ 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-12-14 01:25+0100\n" -"Last-Translator: Jules Lasne \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\n" +"X-Generator: Poedit 3.0.1\n" #: glossary.rst:5 msgid "Glossary" @@ -328,19 +328,33 @@ msgstr "attribut" #: glossary.rst:139 msgid "" -"A value associated with an object which is referenced by name using dotted " -"expressions. For example, if an object *o* has an attribute *a* it would be " -"referenced as *o.a*." +"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 désignée par son nom via une notation " -"utilisant des points. Par exemple, si un objet *o* possède un attribut *a*, " -"il sera référencé par *o.a*." +"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:142 +#: 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:144 +#: 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 :" @@ -350,11 +364,11 @@ msgstr "" "être une :term:`coroutine` ou un objet avec une méthode :meth:`__await__`. " "Voir aussi la :pep:`492`." -#: glossary.rst:147 +#: glossary.rst:154 msgid "BDFL" msgstr "BDFL" -#: glossary.rst:149 +#: glossary.rst:156 msgid "" "Benevolent Dictator For Life, a.k.a. `Guido van Rossum `_, Python's creator." @@ -363,11 +377,11 @@ msgstr "" "Pseudonyme de `Guido van Rossum `_, le " "créateur de Python." -#: glossary.rst:151 +#: glossary.rst:158 msgid "binary file" msgstr "fichier binaire" -#: glossary.rst:153 +#: 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 " @@ -381,7 +395,7 @@ msgstr "" "`sys.stdin.buffer`, :data:`sys.stdout.buffer`, les instances de :class:`io." "BytesIO` ou de :class:`gzip.GzipFile`." -#: glossary.rst:160 +#: glossary.rst:167 msgid "" "See also :term:`text file` for a file object able to read and write :class:" "`str` objects." @@ -389,19 +403,24 @@ msgstr "" "Consultez :term:`fichier texte`, un objet fichier capable de lire et " "d'écrire des objets :class:`str`." -#: glossary.rst:162 +#: glossary.rst:169 msgid "borrowed reference" msgstr "référence empruntée" -#: glossary.rst:164 +#: 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:169 +#: 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 " @@ -409,12 +428,18 @@ msgid "" "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:174 +#: glossary.rst:181 msgid "bytes-like object" msgstr "objet octet-compatible" -#: glossary.rst:176 +#: 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`, " @@ -430,7 +455,7 @@ msgstr "" "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:183 +#: 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 " @@ -443,15 +468,15 @@ msgstr "" "variables. La documentation parle de ceux-ci comme des *read-write bytes-" "like objects*. Par exemple, :class:`bytearray` ou une :class:`memoryview` " "d'un :class:`bytearray` en font partie. D'autres opérations nécessitent de " -"travailler sur des données binaires stockées dans des objets immuables (*" -"\"read-only bytes-like objects\"*), par exemple :class:`bytes` ou :class:" +"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:191 +#: glossary.rst:198 msgid "bytecode" msgstr "code intermédiaire (*bytecode*)" -#: glossary.rst:193 +#: 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 " @@ -472,7 +497,7 @@ msgstr "" "intermédiaire n'a pas vocation à fonctionner sur différentes machines " "virtuelles Python ou à être stable entre différentes versions de Python." -#: glossary.rst:203 +#: glossary.rst:210 msgid "" "A list of bytecode instructions can be found in the documentation for :ref:" "`the dis module `." @@ -480,21 +505,43 @@ msgstr "" "La documentation du :ref:`module dis ` fournit une liste des " "instructions du code intermédiaire." -#: glossary.rst:205 +#: 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:207 +#: 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:209 +#: glossary.rst:226 msgid "class" msgstr "classe" -#: glossary.rst:211 +#: glossary.rst:228 msgid "" "A template for creating user-defined objects. Class definitions normally " "contain method definitions which operate on instances of the class." @@ -503,11 +550,11 @@ msgstr "" "classe (*class*) contient normalement des définitions de méthodes qui " "agissent sur les instances de la classe." -#: glossary.rst:214 +#: glossary.rst:231 msgid "class variable" msgstr "variable de classe" -#: glossary.rst:216 +#: 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)." @@ -515,11 +562,11 @@ 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:218 +#: glossary.rst:235 msgid "coercion" msgstr "coercition" -#: glossary.rst:220 +#: 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, " @@ -541,11 +588,11 @@ msgstr "" "aussi de *cast*) explicitement par le développeur, par exemple : ``float(3) " "+ 4.5`` au lieu du simple ``3 + 4.5``." -#: glossary.rst:228 +#: glossary.rst:245 msgid "complex number" msgstr "nombre complexe" -#: glossary.rst:230 +#: 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 " @@ -568,11 +615,11 @@ msgstr "" "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:240 +#: glossary.rst:257 msgid "context manager" msgstr "gestionnaire de contexte" -#: glossary.rst:242 +#: 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`." @@ -581,11 +628,11 @@ msgstr "" "définissant les méthodes :meth:`__enter__` et :meth:`__exit__`. Consultez " "la :pep:`343`." -#: glossary.rst:245 +#: glossary.rst:262 msgid "context variable" msgstr "variable de contexte" -#: glossary.rst:247 +#: 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 " @@ -603,11 +650,11 @@ msgstr "" "trace des variables dans les tâches asynchrones concourantes. Voir :mod:" "`contextvars`." -#: glossary.rst:254 +#: glossary.rst:271 msgid "contiguous" msgstr "contigu" -#: glossary.rst:258 +#: 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 " @@ -627,11 +674,11 @@ msgstr "" "leur adresse mémoire. À l'inverse, dans les tableaux Fortran-contigu, c’est " "le premier indice qui doit varier le plus rapidement." -#: glossary.rst:266 +#: glossary.rst:283 msgid "coroutine" msgstr "coroutine" -#: glossary.rst:268 +#: 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 " @@ -644,11 +691,11 @@ msgstr "" "être implémentées en utilisant l'instruction :keyword:`async def`. Voir " "aussi la :pep:`492`." -#: glossary.rst:273 +#: glossary.rst:290 msgid "coroutine function" msgstr "fonction coroutine" -#: glossary.rst:275 +#: 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 :" @@ -660,11 +707,11 @@ msgstr "" "mots clés :keyword:`await`, :keyword:`async for` ainsi que :keyword:`async " "with`. A été introduit par la :pep:`492`." -#: glossary.rst:280 +#: glossary.rst:297 msgid "CPython" msgstr "CPython" -#: glossary.rst:282 +#: glossary.rst:299 msgid "" "The canonical implementation of the Python programming language, as " "distributed on `python.org `_. The term \"CPython\" " @@ -676,11 +723,11 @@ msgstr "" "est utilisé dans certains contextes lorsqu'il est nécessaire de distinguer " "cette implémentation des autres comme *Jython* ou *IronPython*." -#: glossary.rst:286 +#: glossary.rst:303 msgid "decorator" msgstr "décorateur" -#: glossary.rst:288 +#: glossary.rst:305 msgid "" "A function returning another function, usually applied as a function " "transformation using the ``@wrapper`` syntax. Common examples for " @@ -691,7 +738,7 @@ msgstr "" "``@wrapper``, dont les exemples typiques sont : :func:`classmethod` et :func:" "`staticmethod`." -#: glossary.rst:292 +#: glossary.rst:309 msgid "" "The decorator syntax is merely syntactic sugar, the following two function " "definitions are semantically equivalent::" @@ -699,7 +746,7 @@ msgstr "" "La syntaxe des décorateurs est simplement du sucre syntaxique, les " "définitions des deux fonctions suivantes sont sémantiquement équivalentes ::" -#: glossary.rst:303 +#: 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 " @@ -709,11 +756,11 @@ msgstr "" "Consultez la documentation :ref:`définitions de fonctions ` et :" "ref:`définitions de classes ` pour en savoir plus sur les décorateurs." -#: glossary.rst:306 +#: glossary.rst:323 msgid "descriptor" msgstr "descripteur" -#: glossary.rst:308 +#: 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 " @@ -737,7 +784,7 @@ msgstr "" "propriétés, méthodes de classes, méthodes statiques et les références aux " "classes parentes." -#: glossary.rst:318 +#: glossary.rst:335 msgid "" "For more information about descriptors' methods, see :ref:`descriptors` or " "the :ref:`Descriptor How To Guide `." @@ -746,11 +793,11 @@ msgstr "" "`descriptors` ou le :ref:`guide pour l'utilisation des descripteurs " "`." -#: glossary.rst:320 +#: glossary.rst:337 msgid "dictionary" msgstr "dictionnaire" -#: glossary.rst:322 +#: 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 " @@ -760,11 +807,11 @@ msgstr "" "n'importe quel objet possédant les méthodes :meth:`__hash__` et :meth:" "`__eq__`. En Perl, les dictionnaires sont appelés \"*hash*\"." -#: glossary.rst:325 +#: glossary.rst:342 msgid "dictionary comprehension" msgstr "dictionnaire en compréhension (ou dictionnaire en intension)" -#: glossary.rst:327 +#: 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 " @@ -776,11 +823,11 @@ msgstr "" "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:331 +#: glossary.rst:348 msgid "dictionary view" msgstr "vue de dictionnaire" -#: glossary.rst:333 +#: 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 " @@ -794,11 +841,11 @@ msgstr "" "change. Pour transformer une vue en vraie liste, utilisez " "``list(dictview)``. Voir :ref:`dict-views`." -#: glossary.rst:339 +#: glossary.rst:356 msgid "docstring" msgstr "*docstring* (chaîne de documentation)" -#: glossary.rst:341 +#: 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 " @@ -812,11 +859,11 @@ msgstr "" "fonction ou du module. Comme cette chaîne est disponible par introspection, " "c'est l'endroit idéal pour documenter l'objet." -#: glossary.rst:347 +#: glossary.rst:364 msgid "duck-typing" msgstr "duck-typing" -#: glossary.rst:349 +#: 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 " @@ -840,11 +887,11 @@ msgstr "" "*duck-typing* utilise plutôt :func:`hasattr` ou la programmation :term:" "`EAFP`." -#: glossary.rst:358 +#: glossary.rst:375 msgid "EAFP" msgstr "EAFP" -#: glossary.rst:360 +#: 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 " @@ -861,11 +908,11 @@ msgstr "" "keyword:`except`. Cette technique de programmation contraste avec le style :" "term:`LBYL` utilisé couramment dans les langages tels que C." -#: glossary.rst:366 +#: glossary.rst:383 msgid "expression" msgstr "expression" -#: glossary.rst:368 +#: 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, " @@ -885,11 +932,11 @@ msgstr "" "expressions, tel que :keyword:`while`. Les affectations sont également des " "instructions et non des expressions." -#: glossary.rst:375 +#: glossary.rst:392 msgid "extension module" msgstr "module d'extension" -#: glossary.rst:377 +#: 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." @@ -897,11 +944,11 @@ 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:379 +#: glossary.rst:396 msgid "f-string" msgstr "f-string" -#: glossary.rst:381 +#: glossary.rst:398 msgid "" "String literals prefixed with ``'f'`` or ``'F'`` are commonly called \"f-" "strings\" which is short for :ref:`formatted string literals `. " @@ -911,11 +958,11 @@ msgstr "" "raccourci pour :ref:`formatted string literals `. Voir la :pep:" "`498`." -#: glossary.rst:384 +#: glossary.rst:401 msgid "file object" msgstr "objet fichier" -#: glossary.rst:386 +#: 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 " @@ -932,7 +979,7 @@ msgstr "" "réseau…). Les objets fichiers sont aussi appelés :dfn:`file-like-objects` " "ou :dfn:`streams`." -#: glossary.rst:394 +#: glossary.rst:411 msgid "" "There are actually three categories of file objects: raw :term:`binary files " "`, buffered :term:`binary files ` and :term:`text " @@ -947,55 +994,69 @@ msgstr "" "Le moyen le plus simple et direct de créer un objet fichier est d'utiliser " "la fonction :func:`open`." -#: glossary.rst:399 +#: glossary.rst:416 msgid "file-like object" msgstr "objet fichier-compatible" -#: glossary.rst:401 +#: glossary.rst:418 msgid "A synonym for :term:`file object`." msgstr "Synonyme de :term:`objet fichier`." -#: glossary.rst:402 +#: glossary.rst:419 msgid "filesystem encoding and error handler" msgstr "encodage du système de fichier et gestionnaire d'erreur" -#: glossary.rst:404 +#: 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:407 +#: 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:411 +#: 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:415 +#: 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:420 +#: glossary.rst:437 msgid "See also the :term:`locale encoding`." msgstr "Voir aussi :term:`encodage régional`." -#: glossary.rst:421 +#: glossary.rst:438 msgid "finder" msgstr "chercheur" -#: glossary.rst:423 +#: glossary.rst:440 msgid "" "An object that tries to find the :term:`loader` for a module that is being " "imported." @@ -1003,7 +1064,7 @@ msgstr "" "Objet qui essaie de trouver un :term:`chargeur ` pour le module en " "cours d'importation." -#: glossary.rst:426 +#: 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 " @@ -1014,15 +1075,15 @@ msgstr "" "`sys.meta_path` ; les :term:`chercheurs d'entrée dans path ` à utiliser avec :data:`sys.path_hooks`." -#: glossary.rst:430 +#: 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:431 +#: glossary.rst:448 msgid "floor division" msgstr "division entière" -#: glossary.rst:433 +#: glossary.rst:450 msgid "" "Mathematical division that rounds down to nearest integer. The floor " "division operator is ``//``. For example, the expression ``11 // 4`` " @@ -1036,11 +1097,11 @@ msgstr "" "4`` vaut ``-3`` car l'arrondi se fait à l'entier inférieur. Voir la :pep:" "`328`." -#: glossary.rst:438 +#: glossary.rst:455 msgid "function" msgstr "fonction" -#: glossary.rst:440 +#: 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 " @@ -1052,15 +1113,15 @@ msgstr "" "corps de la fonction. Voir aussi :term:`paramètre`, :term:`méthode` et :ref:" "`function`." -#: glossary.rst:444 +#: glossary.rst:461 msgid "function annotation" msgstr "annotation de fonction" -#: glossary.rst:446 +#: 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:448 +#: 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 " @@ -1071,13 +1132,13 @@ msgstr "" "prendre deux arguments :class:`int` et devrait également avoir une valeur de " "retour de type :class:`int` ::" -#: glossary.rst:456 +#: 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:458 +#: glossary.rst:475 msgid "" "See :term:`variable annotation` and :pep:`484`, which describe this " "functionality. Also see :ref:`annotations-howto` for best practices on " @@ -1087,11 +1148,11 @@ msgstr "" "décrivent cette fonctionnalité. Voir aussi :ref:`annotations-howto` sur les " "bonnes pratiques concernant les annotations." -#: glossary.rst:462 +#: glossary.rst:479 msgid "__future__" msgstr "__future__" -#: glossary.rst:464 +#: glossary.rst:481 msgid "" "A :ref:`future statement `, ``from __future__ import ``, " "directs the compiler to compile the current module using syntax or semantics " @@ -1101,12 +1162,21 @@ msgid "" "feature was first added to the language and when it will (or did) become the " "default::" msgstr "" - -#: glossary.rst:475 +"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:477 +#: 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 " @@ -1119,11 +1189,11 @@ msgstr "" "et casser les références circulaires. Le ramasse-miettes peut être contrôlé " "en utilisant le module :mod:`gc`." -#: glossary.rst:483 +#: glossary.rst:500 msgid "generator" msgstr "générateur" -#: glossary.rst:485 +#: 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 " @@ -1135,7 +1205,7 @@ msgstr "" "expressions :keyword:`yield` produisant une série de valeurs utilisable dans " "une boucle *for* ou récupérées une à une via la fonction :func:`next`." -#: glossary.rst:490 +#: 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 " @@ -1146,15 +1216,15 @@ msgstr "" "cas où le sens voulu n'est pas clair, utiliser les termes complets lève " "l’ambiguïté." -#: glossary.rst:493 +#: glossary.rst:510 msgid "generator iterator" msgstr "itérateur de générateur" -#: glossary.rst:495 +#: glossary.rst:512 msgid "An object created by a :term:`generator` function." msgstr "Objet créé par une fonction :term:`générateur`." -#: glossary.rst:497 +#: glossary.rst:514 msgid "" "Each :keyword:`yield` temporarily suspends processing, remembering the " "location execution state (including local variables and pending try-" @@ -1167,11 +1237,11 @@ msgstr "" "il en était (contrairement à une fonction qui prendrait un nouveau départ à " "chaque invocation)." -#: glossary.rst:504 +#: glossary.rst:521 msgid "generator expression" msgstr "expression génératrice" -#: glossary.rst:506 +#: 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 " @@ -1183,11 +1253,11 @@ msgstr "" "intervalle et une clause :keyword:`!if` optionnelle. Toute cette expression " "génère des valeurs pour la fonction qui l'entoure ::" -#: glossary.rst:513 +#: glossary.rst:530 msgid "generic function" msgstr "fonction générique" -#: glossary.rst:515 +#: 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 " @@ -1197,7 +1267,7 @@ msgstr "" "pour différents types. L'implémentation à utiliser est déterminée lors de " "l'appel par l'algorithme de répartition." -#: glossary.rst:519 +#: glossary.rst:536 msgid "" "See also the :term:`single dispatch` glossary entry, the :func:`functools." "singledispatch` decorator, and :pep:`443`." @@ -1205,40 +1275,43 @@ msgstr "" "Voir aussi :term:`single dispatch`, le décorateur :func:`functools." "singledispatch` et la :pep:`443`." -#: glossary.rst:521 +#: glossary.rst:538 msgid "generic type" msgstr "type générique" -#: glossary.rst:523 -#, fuzzy +#: 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é ; typiquement un conteneur comme " -"une :class:`list`. Utilisé pour les :term:`indications de type ` " -"et les :term:`annotations `." +"Un :term:`type` qui peut être paramétré ; généralement un :ref:`conteneur " +"` comme :class:`list` ou :class:`dict`. Utilisé pour les :" +"term:`indications de type ` et les :term:`annotations " +"`." -#: glossary.rst:528 +#: 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:530 +#: glossary.rst:547 msgid "GIL" msgstr "GIL" -#: glossary.rst:532 +#: glossary.rst:549 msgid "See :term:`global interpreter lock`." msgstr "Voir :term:`global interpreter lock`." -#: glossary.rst:533 +#: glossary.rst:550 msgid "global interpreter lock" msgstr "verrou global de l'interpréteur" -#: glossary.rst:535 +#: 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 " @@ -1258,19 +1331,19 @@ msgstr "" "au détriment malheureusement de beaucoup du parallélisme possible sur les " "machines ayant plusieurs processeurs." -#: glossary.rst:544 +#: 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 " +"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." +"lors des entrées-sorties." -#: glossary.rst:549 +#: 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 " @@ -1284,11 +1357,11 @@ msgstr "" "corriger ce problème de performance induit mènerait à une implémentation " "beaucoup plus compliquée et donc plus coûteuse à maintenir." -#: glossary.rst:555 +#: glossary.rst:572 msgid "hash-based pyc" msgstr "*pyc* utilisant le hachage" -#: glossary.rst:557 +#: 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-" @@ -1299,11 +1372,11 @@ msgstr "" "source correspondant pour déterminer sa validité. Voir :ref:`pyc-" "invalidation`." -#: glossary.rst:560 +#: glossary.rst:577 msgid "hashable" msgstr "hachable" -#: glossary.rst:562 +#: 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 " @@ -1316,7 +1389,7 @@ msgstr "" "hachables dont la comparaison par ``__eq__`` est vraie doivent avoir la même " "empreinte." -#: glossary.rst:567 +#: 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." @@ -1325,7 +1398,7 @@ msgstr "" "en tant que membre d'un ensemble (type *set*), car ces structures de données " "utilisent ce *hash*." -#: glossary.rst:570 +#: 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 " @@ -1342,24 +1415,25 @@ msgstr "" "considérées différentes (sauf avec elles-mêmes) et leur valeur de hachage " "est calculée à partir de leur :func:`id`." -#: glossary.rst:577 +#: glossary.rst:594 msgid "IDLE" msgstr "IDLE" -#: glossary.rst:579 +#: glossary.rst:596 msgid "" -"An Integrated Development Environment for Python. IDLE is a basic editor " -"and interpreter environment which ships with the standard distribution of " -"Python." +"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 de développement intégré pour Python. IDLE est un éditeur " -"basique et un interpréteur livré avec la distribution standard de Python." +"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:582 +#: glossary.rst:599 msgid "immutable" msgstr "immuable" -#: glossary.rst:584 +#: 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 " @@ -1373,11 +1447,11 @@ msgstr "" "quand une valeur de *hash* constante est requise, typiquement en clé de " "dictionnaire." -#: glossary.rst:589 +#: glossary.rst:606 msgid "import path" msgstr "chemin des importations" -#: glossary.rst:591 +#: 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 " @@ -1390,21 +1464,21 @@ msgstr "" "pour les sous-paquets, elle peut aussi venir de l'attribut ``__path__`` du " "paquet parent." -#: glossary.rst:596 +#: glossary.rst:613 msgid "importing" msgstr "importing" -#: glossary.rst:598 +#: 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:600 +#: glossary.rst:617 msgid "importer" msgstr "importateur" -#: glossary.rst:602 +#: glossary.rst:619 msgid "" "An object that both finds and loads a module; both a :term:`finder` and :" "term:`loader` object." @@ -1412,11 +1486,11 @@ msgstr "" "Objet qui trouve et charge un module, en même temps un :term:`chercheur " "` et un :term:`chargeur `." -#: glossary.rst:604 +#: glossary.rst:621 msgid "interactive" msgstr "interactif" -#: glossary.rst:606 +#: 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 " @@ -1431,11 +1505,11 @@ msgstr "" "de votre ordinateur). C'est un moyen puissant pour tester de nouvelles idées " "ou étudier de nouveaux modules (souvenez-vous de ``help(x)``)." -#: glossary.rst:612 +#: glossary.rst:629 msgid "interpreted" msgstr "interprété" -#: glossary.rst:614 +#: 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. " @@ -1452,11 +1526,11 @@ msgstr "" "développement / débogage plus court que les langages compilés. Cependant, " "ils s'exécutent généralement plus lentement. Voir aussi :term:`interactif`." -#: glossary.rst:621 +#: glossary.rst:638 msgid "interpreter shutdown" msgstr "arrêt de l'interpréteur" -#: glossary.rst:623 +#: 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 " @@ -1477,7 +1551,7 @@ msgstr "" "fonctionner, (typiquement les modules des bibliothèques ou le mécanisme de " "*warning*)." -#: glossary.rst:632 +#: glossary.rst:649 msgid "" "The main reason for interpreter shutdown is that the ``__main__`` module or " "the script being run has finished executing." @@ -1485,11 +1559,11 @@ msgstr "" "La principale raison d'arrêt de l'interpréteur est que le module " "``__main__`` ou le script en cours d'exécution a terminé de s'exécuter." -#: glossary.rst:634 +#: glossary.rst:651 msgid "iterable" msgstr "itérable" -#: glossary.rst:636 +#: 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`, " @@ -1504,7 +1578,7 @@ msgstr "" "tout objet d'une classe ayant une méthode :meth:`__iter__` ou :meth:" "`__getitem__` qui implémente la sémantique d'une :term:`Sequence `." -#: glossary.rst:643 +#: 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 " @@ -1527,11 +1601,11 @@ msgstr "" "temporaire anonyme pour garder l'itérateur durant la boucle. Voir aussi :" "term:`itérateur`, :term:`séquence` et :term:`générateur`." -#: glossary.rst:653 +#: glossary.rst:670 msgid "iterator" msgstr "itérateur" -#: glossary.rst:655 +#: 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 :" @@ -1564,21 +1638,23 @@ msgstr "" "itérateur donnerait simplement le même objet itérateur épuisé utilisé dans " "son itération précédente, le faisant ressembler à un conteneur vide." -#: glossary.rst:670 +#: glossary.rst:687 msgid "More information can be found in :ref:`typeiter`." msgstr "Vous trouverez davantage d'informations dans :ref:`typeiter`." -#: glossary.rst:674 +#: 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:676 +#: glossary.rst:693 msgid "key function" msgstr "fonction clé" -#: glossary.rst:678 +#: 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 " @@ -1589,7 +1665,7 @@ msgstr "" "utilisée pour générer une clé de classement prenant en compte les " "conventions de classement spécifiques aux paramètres régionaux courants." -#: glossary.rst:683 +#: 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`, :" @@ -1602,7 +1678,7 @@ msgstr "" "merge`, :func:`heapq.nsmallest`, :func:`heapq.nlargest` et :func:`itertools." "groupby`." -#: glossary.rst:689 +#: 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. " @@ -1623,19 +1699,19 @@ msgstr "" "Trier ` pour des exemples de création et d'utilisation de " "fonctions clefs." -#: glossary.rst:697 +#: glossary.rst:714 msgid "keyword argument" msgstr "argument nommé" -#: glossary.rst:988 +#: glossary.rst:1005 msgid "See :term:`argument`." msgstr "Voir :term:`argument`." -#: glossary.rst:700 +#: glossary.rst:717 msgid "lambda" msgstr "lambda" -#: glossary.rst:702 +#: 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 " @@ -1646,11 +1722,11 @@ msgstr "" "syntaxe pour créer des fonctions lambda est : ``lambda [parameters]: " "expression``" -#: glossary.rst:705 +#: glossary.rst:722 msgid "LBYL" msgstr "LBYL" -#: glossary.rst:707 +#: 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` " @@ -1662,7 +1738,7 @@ msgstr "" "appels ou des accès. Ce style contraste avec le style :term:`EAFP` et se " "caractérise par la présence de beaucoup d'instructions :keyword:`if`." -#: glossary.rst:712 +#: 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, " @@ -1678,11 +1754,11 @@ msgstr "" "l'accès. Ce problème peut être résolu avec des verrous (*locks*) ou avec " "l'approche EAFP." -#: glossary.rst:717 +#: glossary.rst:734 msgid "locale encoding" msgstr "encodage régional" -#: glossary.rst:719 +#: 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)``." @@ -1690,11 +1766,11 @@ 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:722 +#: 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:724 +#: glossary.rst:741 msgid "" "``locale.getpreferredencoding(False)`` can be used to get the locale " "encoding." @@ -1702,7 +1778,7 @@ msgstr "" "``locale.getpreferredencoding(False)`` permet de récupérer l'encodage " "régional." -#: glossary.rst:727 +#: glossary.rst:744 msgid "" "Python uses the :term:`filesystem encoding and error handler` to convert " "between Unicode filenames and bytes filenames." @@ -1711,11 +1787,11 @@ msgstr "" "d'erreur` pour les conversions de " "noms de fichier entre Unicode et octets." -#: glossary.rst:729 +#: glossary.rst:746 msgid "list" msgstr "list" -#: glossary.rst:731 +#: 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 " @@ -1725,11 +1801,11 @@ msgstr "" "``list`` ressemble plus à un tableau (*array* dans la plupart des langages) " "qu'à une liste chaînée puisque les accès se font en O(1)." -#: glossary.rst:734 +#: glossary.rst:751 msgid "list comprehension" msgstr "liste en compréhension (ou liste en intension)" -#: glossary.rst:736 +#: 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 " @@ -1744,11 +1820,11 @@ msgstr "" "hexadécimal (``0x…``). La clause :keyword:`if` est optionnelle. Si elle est " "omise, tous les éléments du ``range(256)`` seront utilisés." -#: glossary.rst:742 +#: glossary.rst:759 msgid "loader" msgstr "chargeur" -#: glossary.rst:744 +#: 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:" @@ -1760,19 +1836,19 @@ msgstr "" "`. Voir la :pep:`302` pour plus de détails et :class:`importlib.ABC." "Loader` pour sa :term:`classe de base abstraite`." -#: glossary.rst:748 +#: glossary.rst:765 msgid "magic method" msgstr "méthode magique" -#: glossary.rst:752 +#: glossary.rst:769 msgid "An informal synonym for :term:`special method`." msgstr "Un synonyme informel de :term:`special method`." -#: glossary.rst:753 +#: glossary.rst:770 msgid "mapping" msgstr "tableau de correspondances" -#: glossary.rst:755 +#: 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:" @@ -1789,11 +1865,11 @@ msgstr "" "`dict`, :class:`collections.defaultdict`, :class:`collections.OrderedDict` " "et :class:`collections.Counter`." -#: glossary.rst:761 +#: glossary.rst:778 msgid "meta path finder" msgstr "chercheur dans les méta-chemins" -#: glossary.rst:763 +#: 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 `." -#: glossary.rst:767 +#: glossary.rst:784 msgid "" "See :class:`importlib.abc.MetaPathFinder` for the methods that meta path " "finders implement." @@ -1811,11 +1887,11 @@ msgstr "" "Voir :class:`importlib.abc.MetaPathFinder` pour les méthodes que les " "chercheurs dans les méta-chemins doivent implémenter." -#: glossary.rst:769 +#: glossary.rst:786 msgid "metaclass" msgstr "métaclasse" -#: glossary.rst:771 +#: 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 " @@ -1839,15 +1915,15 @@ msgstr "" "*multi-threads*, suivre la création d'objets, implémenter des singletons et " "bien d'autres tâches." -#: glossary.rst:781 +#: glossary.rst:798 msgid "More information can be found in :ref:`metaclasses`." msgstr "Plus d'informations sont disponibles dans : :ref:`metaclasses`." -#: glossary.rst:782 +#: glossary.rst:799 msgid "method" msgstr "méthode" -#: glossary.rst:784 +#: 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 " @@ -1859,11 +1935,11 @@ msgstr "" "premier :term:`argument` (qui, par convention, est habituellement nommé " "``self``). Voir :term:`function` et :term:`nested scope`." -#: glossary.rst:788 +#: glossary.rst:805 msgid "method resolution order" msgstr "ordre de résolution des méthodes" -#: glossary.rst:790 +#: 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 `_ pour plus de détails sur l'algorithme utilisé par " "l'interpréteur Python depuis la version 2.3." -#: glossary.rst:794 +#: glossary.rst:811 msgid "module" msgstr "module" -#: glossary.rst:796 +#: 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 " @@ -1891,15 +1967,15 @@ msgstr "" "modules ont un espace de nommage et peuvent contenir n'importe quels objets " "Python. Charger des modules est appelé :term:`importer `." -#: glossary.rst:800 +#: glossary.rst:817 msgid "See also :term:`package`." msgstr "Voir aussi :term:`paquet`." -#: glossary.rst:801 +#: glossary.rst:818 msgid "module spec" msgstr "spécificateur de module" -#: glossary.rst:803 +#: glossary.rst:820 msgid "" "A namespace containing the import-related information used to load a module. " "An instance of :class:`importlib.machinery.ModuleSpec`." @@ -1908,19 +1984,19 @@ msgstr "" "utilisées pour charger un module. C'est une instance de la classe :class:" "`importlib.machinery.ModuleSpec`." -#: glossary.rst:805 +#: glossary.rst:822 msgid "MRO" msgstr "MRO" -#: glossary.rst:807 +#: glossary.rst:824 msgid "See :term:`method resolution order`." msgstr "Voir :term:`ordre de résolution des méthodes`." -#: glossary.rst:808 +#: glossary.rst:825 msgid "mutable" msgstr "muable" -#: glossary.rst:810 +#: glossary.rst:827 msgid "" "Mutable objects can change their value but keep their :func:`id`. See also :" "term:`immutable`." @@ -1928,11 +2004,11 @@ msgstr "" "Un objet muable peut changer de valeur tout en gardant le même :func:`id`. " "Voir aussi :term:`immuable`." -#: glossary.rst:812 +#: glossary.rst:829 msgid "named tuple" msgstr "n-uplet nommé" -#: glossary.rst:814 +#: 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 " @@ -1943,7 +2019,7 @@ msgstr "" "accessibles en utilisant des attributs nommés. Les types et classes peuvent " "avoir aussi d'autres caractéristiques." -#: glossary.rst:818 +#: 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." @@ -1953,7 +2029,7 @@ msgstr "" "retournées par :func:`time.localtime` et :func:`os.stat`. Un autre exemple " "est :data:`sys.float_info` ::" -#: glossary.rst:829 +#: 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 " @@ -1970,11 +2046,11 @@ msgstr "" "méthodes supplémentaires qui ne seront pas trouvées dans celles écrites à la " "main ni dans les n-uplets nommés natifs." -#: glossary.rst:836 +#: glossary.rst:853 msgid "namespace" msgstr "espace de nommage" -#: glossary.rst:838 +#: 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 " @@ -1998,11 +2074,11 @@ msgstr "" "implémentées respectivement dans les modules :mod:`random` et :mod:" "`itertools`." -#: glossary.rst:848 +#: glossary.rst:865 msgid "namespace package" msgstr "paquet-espace de nommage" -#: glossary.rst:850 +#: 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 " @@ -2014,15 +2090,15 @@ msgstr "" "aucune représentation physique et, plus spécifiquement, ne sont pas comme " "un :term:`paquet classique` puisqu'ils n'ont pas de fichier ``__init__.py``." -#: glossary.rst:855 +#: glossary.rst:872 msgid "See also :term:`module`." msgstr "Voir aussi :term:`module`." -#: glossary.rst:856 +#: glossary.rst:873 msgid "nested scope" msgstr "portée imbriquée" -#: glossary.rst:858 +#: 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 " @@ -2040,11 +2116,11 @@ msgstr "" "dans l'espace de nommage global, le mot clef :keyword:`nonlocal` permet " "d'écrire dans l'espace de nommage dans lequel est déclarée la variable." -#: glossary.rst:865 +#: glossary.rst:882 msgid "new-style class" msgstr "nouvelle classe" -#: glossary.rst:867 +#: 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, " @@ -2057,11 +2133,11 @@ msgstr "" "__slots__`, les descripteurs, les propriétés, :meth:`__getattribute__`, les " "méthodes de classe et les méthodes statiques." -#: glossary.rst:871 +#: glossary.rst:888 msgid "object" msgstr "objet" -#: glossary.rst:873 +#: 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`." @@ -2071,29 +2147,30 @@ msgstr "" "l'ancêtre commun à absolument toutes les :term:`nouvelles classes `." -#: glossary.rst:876 +#: glossary.rst:893 msgid "package" msgstr "paquet" -#: glossary.rst:878 +#: glossary.rst:895 +#, fuzzy msgid "" "A Python :term:`module` which can contain submodules or recursively, " -"subpackages. Technically, a package is a Python module with an ``__path__`` " +"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:882 +#: 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:883 +#: glossary.rst:900 msgid "parameter" msgstr "paramètre" -#: glossary.rst:885 +#: 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 " @@ -2103,7 +2180,7 @@ msgstr "" "décrivant un :term:`argument` (ou dans certains cas des arguments) que la " "fonction accepte. Il existe cinq sortes de paramètres :" -#: glossary.rst:889 +#: glossary.rst:906 msgid "" ":dfn:`positional-or-keyword`: specifies an argument that can be passed " "either :term:`positionally ` or as a :term:`keyword argument " @@ -2115,7 +2192,7 @@ msgstr "" "C'est le type de paramètre par défaut. Par exemple, *foo* et *bar* dans " "l'exemple suivant ::" -#: glossary.rst:898 +#: 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 ``/`` " @@ -2127,7 +2204,7 @@ msgstr "" "un caractère \"/\" dans la liste de paramètres de la définition de fonction " "après eux. Par exemple : *posonly1* et *posonly2* dans le code suivant ::" -#: glossary.rst:907 +#: 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-" @@ -2141,7 +2218,7 @@ msgstr "" "liste des paramètres avant eux. Par exemple, *kw_only1* et *kw_only2* dans " "le code suivant ::" -#: glossary.rst:915 +#: 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 " @@ -2154,7 +2231,7 @@ msgstr "" "d'autres paramètres). Un tel paramètre peut être défini en préfixant son nom " "par une ``*``. Par exemple *args* ci-après ::" -#: glossary.rst:923 +#: 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 " @@ -2166,7 +2243,7 @@ msgstr "" "d'autres paramètres). Un tel paramètre est défini en préfixant le nom du " "paramètre par ``**``. Par exemple, *kwargs* ci-dessus." -#: glossary.rst:929 +#: glossary.rst:946 msgid "" "Parameters can specify both optional and required arguments, as well as " "default values for some optional arguments." @@ -2174,7 +2251,7 @@ msgstr "" "Les paramètres peuvent spécifier des arguments obligatoires ou optionnels, " "ainsi que des valeurs par défaut pour les arguments optionnels." -#: glossary.rst:932 +#: glossary.rst:949 msgid "" "See also the :term:`argument` glossary entry, the FAQ question on :ref:`the " "difference between arguments and parameters `, " @@ -2186,11 +2263,11 @@ msgstr "" "parameter>` dans la FAQ, la classe :class:`inspect.Parameter`, la section :" "ref:`function` et la :pep:`362`." -#: glossary.rst:936 +#: glossary.rst:953 msgid "path entry" msgstr "entrée de chemin" -#: glossary.rst:938 +#: glossary.rst:955 msgid "" "A single location on the :term:`import path` which the :term:`path based " "finder` consults to find modules for importing." @@ -2199,11 +2276,11 @@ msgstr "" "path* en anglais, d'où le *path*) que le :term:`chercheur basé sur les " "chemins ` consulte pour trouver des modules à importer." -#: glossary.rst:940 +#: glossary.rst:957 msgid "path entry finder" msgstr "chercheur de chemins" -#: glossary.rst:942 +#: 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:" @@ -2214,7 +2291,7 @@ msgstr "" "path `) qui sait où trouver des modules lorsqu'on lui donne " "une :term:`entrée de path `." -#: glossary.rst:946 +#: glossary.rst:963 msgid "" "See :class:`importlib.abc.PathEntryFinder` for the methods that path entry " "finders implement." @@ -2222,11 +2299,11 @@ msgstr "" "Voir :class:`importlib.abc.PathEntryFinder` pour les méthodes qu'un " "chercheur d'entrée dans *path* doit implémenter." -#: glossary.rst:948 +#: glossary.rst:965 msgid "path entry hook" msgstr "point d'entrée pour la recherche dans *path*" -#: glossary.rst:950 +#: 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 " @@ -2236,11 +2313,11 @@ msgstr "" "d'entrée dans path ` s'il sait où trouver des modules " "pour une :term:`entrée dans path ` donnée." -#: glossary.rst:953 +#: glossary.rst:970 msgid "path based finder" msgstr "chercheur basé sur les chemins" -#: glossary.rst:955 +#: glossary.rst:972 msgid "" "One of the default :term:`meta path finders ` which " "searches an :term:`import path` for modules." @@ -2249,11 +2326,11 @@ msgstr "" "défaut qui cherche des modules dans un :term:`chemin des importations " "`." -#: glossary.rst:957 +#: glossary.rst:974 msgid "path-like object" msgstr "objet simili-chemin" -#: glossary.rst:959 +#: 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 " @@ -2273,11 +2350,11 @@ msgstr "" "peuvent être utilisées, respectivement, pour garantir un résultat de type :" "class:`str` ou :class:`bytes` à la place. A été Introduit par la :pep:`519`." -#: glossary.rst:967 +#: glossary.rst:984 msgid "PEP" msgstr "PEP" -#: glossary.rst:969 +#: 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 " @@ -2290,7 +2367,7 @@ msgstr "" "ou son environnement. Les PEP doivent fournir une spécification technique " "concise et une justification des fonctionnalités proposées." -#: glossary.rst:975 +#: 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 " @@ -2305,15 +2382,15 @@ msgstr "" "l’établissement d’un consensus au sein de la communauté et de documenter les " "opinions contradictoires." -#: glossary.rst:981 +#: glossary.rst:998 msgid "See :pep:`1`." msgstr "Voir :pep:`1`." -#: glossary.rst:982 +#: glossary.rst:999 msgid "portion" msgstr "portion" -#: glossary.rst:984 +#: 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`." @@ -2322,15 +2399,15 @@ msgstr "" "fichier zip) qui contribue à l'espace de nommage d'un paquet, tel que défini " "dans la :pep:`420`." -#: glossary.rst:986 +#: glossary.rst:1003 msgid "positional argument" msgstr "argument positionnel" -#: glossary.rst:989 +#: glossary.rst:1006 msgid "provisional API" msgstr "API provisoire" -#: glossary.rst:991 +#: 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 " @@ -2349,7 +2426,7 @@ msgstr "" "surviendront que si de sérieux problèmes sont découverts et qu'ils n'avaient " "pas été identifiés avant l'ajout de l'API." -#: glossary.rst:1000 +#: 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 " @@ -2360,7 +2437,7 @@ msgstr "" "possible sera fait pour tenter de résoudre les problèmes en conservant la " "rétrocompatibilité." -#: glossary.rst:1004 +#: 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. " @@ -2370,19 +2447,19 @@ msgstr "" "le temps, sans se bloquer longtemps sur des erreurs d'architecture. Voir la :" "pep:`411` pour plus de détails." -#: glossary.rst:1007 +#: glossary.rst:1024 msgid "provisional package" msgstr "paquet provisoire" -#: glossary.rst:1009 +#: glossary.rst:1026 msgid "See :term:`provisional API`." msgstr "Voir :term:`provisional API`." -#: glossary.rst:1010 +#: glossary.rst:1027 msgid "Python 3000" msgstr "Python 3000" -#: glossary.rst:1012 +#: 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 " @@ -2391,11 +2468,11 @@ msgstr "" "Surnom donné à la série des Python 3.x (très vieux surnom donné à l'époque " "où Python 3 représentait un futur lointain). Aussi abrégé *Py3k*." -#: glossary.rst:1015 +#: glossary.rst:1032 msgid "Pythonic" msgstr "*Pythonique*" -#: glossary.rst:1017 +#: 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 " @@ -2411,16 +2488,16 @@ msgstr "" "les gens qui ne sont pas habitués à Python utilisent parfois un compteur " "numérique à la place ::" -#: glossary.rst:1027 +#: 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:1031 +#: glossary.rst:1048 msgid "qualified name" msgstr "nom qualifié" -#: glossary.rst:1033 +#: 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 " @@ -2432,7 +2509,7 @@ msgstr "" "module, tel que défini dans la :pep:`3155`. Pour les fonctions et classes de " "premier niveau, le nom qualifié est le même que le nom de l'objet ::" -#: glossary.rst:1050 +#: 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." @@ -2443,11 +2520,11 @@ msgstr "" "par des points) vers le module, incluant tous les paquets parents. Par " "exemple : ``email.mime.text`` ::" -#: glossary.rst:1057 +#: glossary.rst:1074 msgid "reference count" msgstr "nombre de références" -#: glossary.rst:1059 +#: 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 " @@ -2463,11 +2540,11 @@ msgstr "" "func:`~sys.getrefcount` que les développeurs peuvent utiliser pour obtenir " "le nombre de références à un objet donné." -#: glossary.rst:1065 +#: glossary.rst:1082 msgid "regular package" msgstr "paquet classique" -#: glossary.rst:1067 +#: glossary.rst:1084 msgid "" "A traditional :term:`package`, such as a directory containing an ``__init__." "py`` file." @@ -2475,15 +2552,15 @@ msgstr "" ":term:`paquet` traditionnel, tel qu'un dossier contenant un fichier " "``__init__.py``." -#: glossary.rst:1070 +#: glossary.rst:1087 msgid "See also :term:`namespace package`." msgstr "Voir aussi :term:`paquet-espace de nommage `." -#: glossary.rst:1071 +#: glossary.rst:1088 msgid "__slots__" msgstr "__slots__" -#: glossary.rst:1073 +#: 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, " @@ -2498,11 +2575,11 @@ msgstr "" "nombre d'instances dans une application devient un sujet critique pour la " "mémoire." -#: glossary.rst:1078 +#: glossary.rst:1095 msgid "sequence" msgstr "séquence" -#: glossary.rst:1080 +#: 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:" @@ -2521,7 +2598,7 @@ msgstr "" "*mapping* plutôt qu'une séquence, car ses accès se font par une clé " "arbitraire :term:`immuable` plutôt qu'un nombre entier." -#: glossary.rst:1089 +#: 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:" @@ -2535,11 +2612,11 @@ msgstr "" "et :meth:`__reversed__`. Les types qui implémentent cette interface étendue " "peuvent s'enregistrer explicitement en utilisant :func:`~abc.register`." -#: glossary.rst:1096 +#: glossary.rst:1113 msgid "set comprehension" msgstr "ensemble en compréhension (ou ensemble en intension)" -#: glossary.rst:1098 +#: 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 " @@ -2551,11 +2628,11 @@ msgstr "" "'abracadabra' if c not in 'abc'}`` génère l'ensemble contenant les lettres " "« r » et « d » ``{'r', 'd'}``. Voir :ref:`comprehensions`." -#: glossary.rst:1102 +#: glossary.rst:1119 msgid "single dispatch" msgstr "distribution simple" -#: glossary.rst:1104 +#: glossary.rst:1121 msgid "" "A form of :term:`generic function` dispatch where the implementation is " "chosen based on the type of a single argument." @@ -2564,11 +2641,11 @@ msgstr "" "générique>`, où l'implémentation est choisie en fonction du type d'un seul " "argument." -#: glossary.rst:1106 +#: glossary.rst:1123 msgid "slice" msgstr "tranche" -#: glossary.rst:1108 +#: 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 " @@ -2581,11 +2658,11 @@ msgstr "" "``variable_name[1:3:5]``. Cette notation utilise des objets :class:`slice` " "en interne." -#: glossary.rst:1112 +#: glossary.rst:1129 msgid "special method" msgstr "méthode spéciale" -#: glossary.rst:1116 +#: 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 " @@ -2597,11 +2674,11 @@ msgstr "" "ont des noms commençant et terminant par des doubles tirets bas. Les " "méthodes spéciales sont documentées dans :ref:`specialnames`." -#: glossary.rst:1120 +#: glossary.rst:1137 msgid "statement" msgstr "instruction" -#: glossary.rst:1122 +#: 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 :" @@ -2612,44 +2689,72 @@ msgstr "" "constructions basées sur un mot-clé, comme :keyword:`if`, :keyword:`while` " "ou :keyword:`for`." -#: glossary.rst:1125 +#: glossary.rst:1142 msgid "strong reference" msgstr "référence forte" -#: glossary.rst:1127 +#: 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:1131 +#: 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:1136 +#: glossary.rst:1153 msgid "See also :term:`borrowed reference`." msgstr "Voir aussi :term:`référence empruntée`." -#: glossary.rst:1137 +#: glossary.rst:1154 msgid "text encoding" msgstr "encodage de texte" -#: glossary.rst:1139 -msgid "A codec which encodes Unicode strings to bytes." +#: 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 "" -"Codec (codeur-décodeur) qui convertit des chaînes de caractères Unicode en " -"octets (classe *bytes*)." +"Il existe de multiples :ref:`codecs ` pour la " +"sérialisation de texte, que l'on regroupe sous l'expression « encodages de " +"texte »." -#: glossary.rst:1140 +#: glossary.rst:1166 msgid "text file" msgstr "fichier texte" -#: glossary.rst:1142 +#: 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:" @@ -2664,7 +2769,7 @@ msgstr "" "ou ``'w'``), :data:`sys.stdin`, :data:`sys.stdout` et les instances de :" "class:`io.StringIO`." -#: glossary.rst:1149 +#: glossary.rst:1175 msgid "" "See also :term:`binary file` for a file object able to read and write :term:" "`bytes-like objects `." @@ -2672,11 +2777,11 @@ msgstr "" "Voir aussi :term:`binary file` pour un objet fichier capable de lire et " "d'écrire :term:`bytes-like objects `." -#: glossary.rst:1151 +#: glossary.rst:1177 msgid "triple-quoted string" msgstr "chaîne entre triple guillemets" -#: glossary.rst:1153 +#: 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 " @@ -2691,15 +2796,15 @@ msgstr "" "qui ne soit pas disponible avec une chaîne entre guillemets, elle est utile " "pour de nombreuses raisons. Elle vous autorise à insérer des guillemets " "simples et doubles dans une chaîne sans avoir à les protéger et elle peut " -"s'étendre sur plusieurs lignes sans avoir à terminer chaque ligne par un ``" -"\\``. Elle est ainsi particulièrement utile pour les chaînes de " +"s'étendre sur plusieurs lignes sans avoir à terminer chaque ligne par un " +"``\\``. Elle est ainsi particulièrement utile pour les chaînes de " "documentation (*docstrings*)." -#: glossary.rst:1160 +#: glossary.rst:1186 msgid "type" msgstr "type" -#: glossary.rst:1162 +#: 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." @@ -2709,15 +2814,15 @@ msgstr "" "objets ont un type. Le type d'un objet peut être obtenu via son attribut :" "attr:`~instance.__class__` ou via ``type(obj)``." -#: glossary.rst:1166 +#: glossary.rst:1192 msgid "type alias" msgstr "alias de type" -#: glossary.rst:1168 +#: 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:1170 +#: glossary.rst:1196 msgid "" "Type aliases are useful for simplifying :term:`type hints `. For " "example::" @@ -2725,19 +2830,19 @@ msgstr "" "Les alias de types sont utiles pour simplifier les :term:`indications de " "types `. Par exemple ::" -#: glossary.rst:1177 +#: glossary.rst:1203 msgid "could be made more readable like this::" msgstr "pourrait être rendu plus lisible comme ceci ::" -#: glossary.rst:1198 +#: 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:1185 +#: glossary.rst:1211 msgid "type hint" msgstr "indication de type" -#: glossary.rst:1187 +#: 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." @@ -2745,7 +2850,7 @@ msgstr "" "Le :term:`annotation` qui spécifie le type attendu pour une variable, un " "attribut de classe, un paramètre de fonction ou une valeur de retour." -#: glossary.rst:1190 +#: 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 " @@ -2756,7 +2861,7 @@ msgstr "" "statique et aident les IDE à compléter et à réusiner (*code refactoring* en " "anglais) le code." -#: glossary.rst:1194 +#: 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`." @@ -2765,11 +2870,11 @@ msgstr "" "fonctions, mais pas de variables locales, peuvent être consultés en " "utilisant :func:`typing.get_type_hints`." -#: glossary.rst:1199 +#: glossary.rst:1225 msgid "universal newlines" msgstr "retours à la ligne universels" -#: glossary.rst:1201 +#: 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 " @@ -2783,22 +2888,22 @@ msgstr "" "``'\\r'``. Voir la :pep:`278` et la :pep:`3116`, ainsi que la fonction :func:" "`bytes.splitlines` pour d'autres usages." -#: glossary.rst:1206 +#: glossary.rst:1232 msgid "variable annotation" msgstr "annotation de variable" -#: glossary.rst:1208 +#: 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:1210 +#: 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:1215 +#: glossary.rst:1241 msgid "" "Variable annotations are usually used for :term:`type hints `: " "for example this variable is expected to take :class:`int` values::" @@ -2807,13 +2912,13 @@ msgstr "" "`indications de types ` : par exemple, cette variable devrait " "prendre des valeurs de type :class:`int` ::" -#: glossary.rst:1221 +#: 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:1223 +#: 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 " @@ -2823,11 +2928,11 @@ msgstr "" "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:1227 +#: glossary.rst:1253 msgid "virtual environment" msgstr "environnement virtuel" -#: glossary.rst:1229 +#: glossary.rst:1255 msgid "" "A cooperatively isolated runtime environment that allows Python users and " "applications to install and upgrade Python distribution packages without " @@ -2839,15 +2944,15 @@ msgstr "" "des paquets sans interférer avec d'autres applications Python fonctionnant " "sur le même système." -#: glossary.rst:1234 +#: glossary.rst:1260 msgid "See also :mod:`venv`." msgstr "Voir aussi :mod:`venv`." -#: glossary.rst:1235 +#: glossary.rst:1261 msgid "virtual machine" msgstr "machine virtuelle" -#: glossary.rst:1237 +#: glossary.rst:1263 msgid "" "A computer defined entirely in software. Python's virtual machine executes " "the :term:`bytecode` emitted by the bytecode compiler." @@ -2856,11 +2961,11 @@ msgstr "" "(*virtual machine*) de Python exécute le :term:`bytecode` produit par le " "compilateur de *bytecode*." -#: glossary.rst:1239 +#: glossary.rst:1265 msgid "Zen of Python" msgstr "Le zen de Python" -#: glossary.rst:1241 +#: 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 " @@ -2870,6 +2975,11 @@ msgstr "" "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." diff --git a/howto/annotations.po b/howto/annotations.po index 30cfdf1343..c0adc085fb 100644 --- a/howto/annotations.po +++ b/howto/annotations.po @@ -5,15 +5,15 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-12-31 11:33+0100\n" -"PO-Revision-Date: 2021-10-17 14:16+0200\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 2.0.6\n" +"X-Generator: Poedit 3.0.1\n" #: howto/annotations.rst:5 msgid "Annotations Best Practices" @@ -125,12 +125,25 @@ msgstr "" "`getattr` avec trois arguments, par exemple ``getattr(o, '__annotations__', " "None)``." -#: howto/annotations.rst:62 +#: 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:64 +#: 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 " @@ -141,7 +154,7 @@ msgstr "" "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:69 +#: 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 " @@ -155,7 +168,7 @@ msgstr "" "vous devez utiliser la forme à trois arguments de :func:`getattr` pour " "accéder à l'attribut ``__annotations__`` de l'objet." -#: howto/annotations.rst:76 +#: 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 " @@ -170,12 +183,12 @@ msgstr "" "renvoyer le dictionnaire d'annotations d'une *classe de base.* Par " "exemple : ::" -#: howto/annotations.rst:92 +#: 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:95 +#: 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 " @@ -192,7 +205,7 @@ msgstr "" "annotations définies, la bonne pratique est d'appeler la méthode ``get`` sur " "le dictionnaire de la classe." -#: howto/annotations.rst:103 +#: 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 " @@ -202,7 +215,7 @@ msgstr "" "l'attribut ``__annotations__`` d'un objet quelconque en Python 3.9 et " "antérieur : ::" -#: howto/annotations.rst:112 +#: 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:" @@ -212,7 +225,7 @@ msgstr "" "``None``. Nous vous conseillons de vérifier le type de ``ann`` en " "utilisant :func:`isinstance` avant de poursuivre l'analyse." -#: howto/annotations.rst:117 +#: 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 " @@ -222,12 +235,12 @@ msgstr "" "d'attribut ``__dict__`` donc, pour plus de sécurité, vous pouvez également " "utiliser :func:`getattr` pour accéder à ``__dict__``." -#: howto/annotations.rst:123 +#: 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:125 +#: 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 " @@ -240,7 +253,7 @@ msgstr "" "préférable d'appeler :func:`inspect.get_annotations` pour faire ce travail à " "votre place." -#: howto/annotations.rst:131 +#: 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 " @@ -253,7 +266,7 @@ msgstr "" "l'implémentation de :func:`inspect.get_annotations` dans la version actuelle " "de Python et à suivre une approche similaire." -#: howto/annotations.rst:137 +#: howto/annotations.rst:143 msgid "" "In a nutshell, if you wish to evaluate a stringized annotation on an " "arbitrary object ``o``:" @@ -261,7 +274,7 @@ 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:140 +#: howto/annotations.rst:146 msgid "" "If ``o`` is a module, use ``o.__dict__`` as the ``globals`` when calling :" "func:`eval`." @@ -269,7 +282,7 @@ msgstr "" "Si ``o`` est un module, utilisez ``o.__dict__`` pour accéder aux noms " "``globals`` lors de l'appel à :func:`eval`." -#: howto/annotations.rst:142 +#: 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:" @@ -279,7 +292,7 @@ msgstr "" "pour désigner les noms ``globals``, et ``dict(vars(o))`` pour désigner les " "``locals``, lorsque vous appelez :func:`eval`." -#: howto/annotations.rst:145 +#: 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 " @@ -291,7 +304,7 @@ msgstr "" "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:149 +#: howto/annotations.rst:155 msgid "" "If ``o`` is a callable (but not a class), use ``o.__globals__`` as the " "globals when calling :func:`eval`." @@ -299,7 +312,7 @@ 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:152 +#: 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 " @@ -314,16 +327,15 @@ msgstr "" "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:159 -#, fuzzy +#: 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 " +"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:161 +#: howto/annotations.rst:167 msgid "" "Definitions that aren't needed at runtime, only imported when :const:`typing." "TYPE_CHECKING` is true." @@ -331,7 +343,7 @@ 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:164 +#: 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, " @@ -343,12 +355,12 @@ msgstr "" "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:172 +#: 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:174 +#: howto/annotations.rst:180 msgid "" "You should avoid assigning to the ``__annotations__`` member of objects " "directly. Let Python manage setting ``__annotations__``." @@ -356,7 +368,7 @@ msgstr "" "Évitez d'assigner directement des objets à l'élément ``__annotations__``. " "Laissez Python gérer le paramétrage de ``__annotations__``." -#: howto/annotations.rst:177 +#: 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." @@ -364,7 +376,7 @@ msgstr "" "Si vous assignez directement à l'élément ``__annotations__`` d'un objet, " "vous devez toujours le définir comme un ``dict``." -#: howto/annotations.rst:180 +#: 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 " @@ -374,20 +386,20 @@ msgstr "" "devez vous assurer qu'il s'agit d'un dictionnaire avant de tenter d'examiner " "son contenu." -#: howto/annotations.rst:184 +#: howto/annotations.rst:190 msgid "You should avoid modifying ``__annotations__`` dicts." msgstr "Évitez de modifier les dictionnaires ``__annotations__``." -#: howto/annotations.rst:186 +#: 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:191 +#: howto/annotations.rst:197 msgid "``__annotations__`` Quirks" msgstr "Les curiosités concernant ``__annotations__``" -#: howto/annotations.rst:193 +#: 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 " @@ -409,7 +421,7 @@ msgstr "" "``AttributeError`` ; si vous utilisez ``del fn.__annotations__`` deux fois " "de suite, vous êtes sûr de toujours obtenir ``AttributeError``." -#: howto/annotations.rst:203 +#: howto/annotations.rst:209 msgid "" "Everything in the above paragraph also applies to class and module objects " "in Python 3.10 and newer." @@ -417,7 +429,7 @@ 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:206 +#: 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 " @@ -436,7 +448,7 @@ msgstr "" "objets permettent de définir ``__annotations__`` à n'importe quelle valeur " "Python, et conserveront la valeur définie." -#: howto/annotations.rst:214 +#: 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 " @@ -448,7 +460,7 @@ msgstr "" "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:225 +#: 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." diff --git a/howto/argparse.po b/howto/argparse.po index 6014f6e96a..59e2857499 100644 --- a/howto/argparse.po +++ b/howto/argparse.po @@ -5,8 +5,8 @@ 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 19:23+0100\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" @@ -429,9 +429,9 @@ msgid "" "Yes, it's now more of a flag (similar to ``action=\"store_true\"``) in the " "previous version of our script. That should explain the complaint." msgstr "" -"Oui, c'est maintenant d'avantage une option (similaire à ``action=" -"\"store_true\"``) de la version précédente de notre script. Cela devrait " -"expliquer le message d'erreur." +"Oui, c'est maintenant d'avantage une option (similaire à " +"``action=\"store_true\"``) de la version précédente de notre script. Cela " +"devrait expliquer le message d'erreur." #: howto/argparse.rst:502 msgid "It also behaves similar to \"store_true\" action." @@ -610,7 +610,7 @@ msgid "" "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]`` " +"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 :" diff --git a/howto/clinic.po b/howto/clinic.po index fe7fda779a..43ec50242a 100644 --- a/howto/clinic.po +++ b/howto/clinic.po @@ -5,8 +5,8 @@ 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-06-04 15:16+0200\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" @@ -698,7 +698,7 @@ msgid "" "``;``, to provide usage help, this change is harmless—don't worry about it.)" msgstr "" "(Argument Clinic génère toujours ses chaînes de format avec ``:`` suivi du " -"nom de la fonction. Si la chaîne de format du code existant termine par `` ;" +"nom de la fonction. Si la chaîne de format du code existant termine par ``;" "``, pour fournir une aide sur l'utilisation, ce changement n'a aucun effet, " "ne vous en souciez pas.)" @@ -806,10 +806,11 @@ msgstr "" "*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." +"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 " @@ -1228,9 +1229,9 @@ msgstr "``c_default``" #: howto/clinic.rst:760 msgid "" "The default value for this parameter when defined in C. Specifically, this " -"will be the initializer for the variable declared in the \"parse function" -"\". See :ref:`the section on default values ` for how to " -"use this. Specified as a string." +"will be the initializer for the variable declared in the \"parse " +"function\". See :ref:`the section on default values ` for " +"how to use this. Specified as a string." msgstr "" "La valeur par défaut de cet argument lorsqu'il est défini en C. Typiquement, " "il servira à initialiser la variable déclarée dans la « fonction " @@ -1338,8 +1339,8 @@ msgstr "``type``" #: howto/clinic.rst:802 msgid "" "Only supported for the ``object`` and ``self`` converters. Specifies the C " -"type that will be used to declare the variable. Default value is ``" -"\"PyObject *\"``." +"type that will be used to declare the variable. Default value is " +"``\"PyObject *\"``." msgstr "" "Autorisé seulement pour les adaptateurs ``object`` et ``self``. Spécifie le " "type C qui sera utilisé pour déclarer la variable. La valeur par défaut est " @@ -2110,7 +2111,7 @@ msgstr "" #: howto/clinic.rst:1123 msgid "" -"Sorry, there's no syntax for partially-cloning a function, or cloning a " +"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 "" @@ -2140,8 +2141,8 @@ msgstr "" #: howto/clinic.rst:1143 msgid "" "All the code inside the Python block is executed at the time it's parsed. " -"All text written to stdout inside the block is redirected into the \"output" -"\" after the block." +"All text written to stdout inside the block is redirected into the " +"\"output\" after the block." msgstr "" #: howto/clinic.rst:1147 @@ -2324,7 +2325,7 @@ 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 " +"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." @@ -2363,9 +2364,9 @@ 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 ``Py_ssize_t``, " -"and will be parsed by the ``'O&'`` format unit, which will call the " -"``ssize_t_converter`` converter function. ``ssize_t`` variables " +"Parameters declared as ``ssize_t`` will be declared as type :c:type:" +"`Py_ssize_t`, and will be parsed by the ``'O&'`` format unit, which will " +"call the ``ssize_t_converter`` converter function. ``ssize_t`` variables " "automatically support default values." msgstr "" @@ -2506,9 +2507,9 @@ msgid "" "of statement the field is. Field names that end in ``\"_prototype\"`` " "represent forward declarations of that thing, without the actual body/data " "of the thing; field names that end in ``\"_definition\"`` represent the " -"actual definition of the thing, with the body/data of the thing. (``" -"\"methoddef\"`` is special, it's the only one that ends with ``\"_define" -"\"``, representing that it's a preprocessor #define.)" +"actual definition of the thing, with the body/data of the thing. " +"(``\"methoddef\"`` is special, it's the only one that ends with " +"``\"_define\"``, representing that it's a preprocessor #define.)" msgstr "" #: howto/clinic.rst:1499 diff --git a/howto/curses.po b/howto/curses.po index d52a828860..19f6013c54 100644 --- a/howto/curses.po +++ b/howto/curses.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-01 16:00+0200\n" +"POT-Creation-Date: 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" @@ -139,23 +139,17 @@ msgstr "" msgid "" "The Windows version of Python doesn't include the :mod:`curses` module. A " "ported version called `UniCurses `_ is " -"available. You could also try `the Console module `_ written by Fredrik Lundh, which doesn't use the same " -"API as curses but provides cursor-addressable text output and full support " -"for mouse and keyboard input." +"available." msgstr "" "La version Windows de Python n'inclut pas le module :mod:`curses`. Une " "version portée appelée `UniCurses `_ est " -"disponible. Vous pouvez également essayer le `Windows console driver `_ écrit par Fredrik Lundh, qui n'utilise " -"pas la même API que *curses*, mais fournit une sortie texte avec gestion du " -"curseur et une prise en charge complète de la souris et du clavier." +"disponible." -#: howto/curses.rst:66 +#: howto/curses.rst:62 msgid "The Python curses module" msgstr "Le module *curses* de Python" -#: howto/curses.rst:68 +#: howto/curses.rst:64 msgid "" "The Python module is a fairly simple wrapper over the C functions provided " "by curses; if you're already familiar with curses programming in C, it's " @@ -173,7 +167,7 @@ msgstr "" "`mvaddstr` et :c:func:`mvwaddstr` en une seule méthode :meth:`~curses.window." "addstr`. Nous voyons cela plus en détail ci-après." -#: howto/curses.rst:76 +#: howto/curses.rst:72 msgid "" "This HOWTO is an introduction to writing text-mode programs with curses and " "Python. It doesn't attempt to be a complete guide to the curses API; for " @@ -186,11 +180,11 @@ msgstr "" "Python sur *ncurses* et les pages du manuel C pour *ncurses*. Il vous donne " "cependant les idées de base." -#: howto/curses.rst:83 +#: howto/curses.rst:79 msgid "Starting and ending a curses application" msgstr "Lancement et arrêt une application *curses*" -#: howto/curses.rst:85 +#: howto/curses.rst:81 msgid "" "Before doing anything, curses must be initialized. This is done by calling " "the :func:`~curses.initscr` function, which will determine the terminal " @@ -206,7 +200,7 @@ msgstr "" "renvoie un objet fenêtre représentant l'écran entier ; il est généralement " "appelé ``stdscr`` d'après le nom de la variable C correspondante. ::" -#: howto/curses.rst:96 +#: howto/curses.rst:92 msgid "" "Usually curses applications turn off automatic echoing of keys to the " "screen, in order to be able to read keys and only display them under certain " @@ -217,7 +211,7 @@ msgstr "" "dans certaines circonstances. Cela nécessite d'appeler la fonction :func:" "`~curses.noecho`. ::" -#: howto/curses.rst:103 +#: howto/curses.rst:99 msgid "" "Applications will also commonly need to react to keys instantly, without " "requiring the Enter key to be pressed; this is called cbreak mode, as " @@ -228,7 +222,7 @@ msgstr "" "qu'on appelle le mode *cbreak*, par opposition au mode d'entrée habituel " "avec un tampon. ::" -#: howto/curses.rst:109 +#: howto/curses.rst:105 msgid "" "Terminals usually return special keys, such as the cursor keys or navigation " "keys such as Page Up and Home, as a multibyte escape sequence. While you " @@ -245,7 +239,7 @@ msgstr "" "renvoyant une valeur spéciale telle que :const:`curses.KEY_LEFT`. Pour que " "*curses* fasse le travail, vous devez activer le mode *keypad*. ::" -#: howto/curses.rst:118 +#: howto/curses.rst:114 msgid "" "Terminating a curses application is much easier than starting one. You'll " "need to call::" @@ -253,7 +247,7 @@ msgstr "" "Arrêter une application *curses* est beaucoup plus facile que d'en démarrer " "une. Appelez ::" -#: howto/curses.rst:125 +#: howto/curses.rst:121 msgid "" "to reverse the curses-friendly terminal settings. Then call the :func:" "`~curses.endwin` function to restore the terminal to its original operating " @@ -263,7 +257,7 @@ msgstr "" "appelez la fonction :func:`~curses.enddwin` pour restaurer le terminal dans " "son mode de fonctionnement original. ::" -#: howto/curses.rst:131 +#: howto/curses.rst:127 msgid "" "A common problem when debugging a curses application is to get your terminal " "messed up when the application dies without restoring the terminal to its " @@ -279,7 +273,7 @@ msgstr "" "exemple, ce qui rend l'utilisation de l'interface de commande du *shell* " "difficile." -#: howto/curses.rst:137 +#: howto/curses.rst:133 msgid "" "In Python you can avoid these complications and make debugging much easier " "by importing the :func:`curses.wrapper` function and using it like this::" @@ -287,7 +281,7 @@ msgstr "" "En Python, vous pouvez éviter ces complications et faciliter le débogage en " "important la fonction :func:`curses.wrapper` et en l'utilisant comme suit ::" -#: howto/curses.rst:156 +#: howto/curses.rst:152 msgid "" "The :func:`~curses.wrapper` function takes a callable object and does the " "initializations described above, also initializing colors if color support " @@ -309,11 +303,11 @@ msgstr "" "pas dans un drôle d'état au moment de l'exception et vous pourrez lire le " "message de l'exception et la trace de la pile d'appels." -#: howto/curses.rst:168 +#: howto/curses.rst:164 msgid "Windows and Pads" msgstr "Fenêtres et tampons (*pads* en anglais)" -#: howto/curses.rst:170 +#: howto/curses.rst:166 msgid "" "Windows are the basic abstraction in curses. A window object represents a " "rectangular area of the screen, and supports methods to display text, erase " @@ -324,7 +318,7 @@ msgstr "" "afficher du texte, l'effacer, permettre à l'utilisateur de saisir des " "chaînes, etc." -#: howto/curses.rst:174 +#: howto/curses.rst:170 msgid "" "The ``stdscr`` object returned by the :func:`~curses.initscr` function is a " "window object that covers the entire screen. Many programs may need only " @@ -340,7 +334,7 @@ msgstr "" "séparément. La fonction :func:`~curses.newwin` crée une nouvelle fenêtre " "d'une taille donnée, renvoyant le nouvel objet fenêtre. ::" -#: howto/curses.rst:185 +#: howto/curses.rst:181 msgid "" "Note that the coordinate system used in curses is unusual. Coordinates are " "always passed in the order *y,x*, and the top-left corner of a window is " @@ -357,7 +351,7 @@ msgstr "" "applications informatiques, mais elle fait partie de *curses* depuis qu'il a " "été écrit et il est trop tard pour changer les choses maintenant." -#: howto/curses.rst:193 +#: howto/curses.rst:189 msgid "" "Your application can determine the size of the screen by using the :data:" "`curses.LINES` and :data:`curses.COLS` variables to obtain the *y* and *x* " @@ -369,7 +363,7 @@ msgstr "" "tailles *y* et *x*. Les coordonnées licites s'étendent alors de ``(0,0)`` à " "``(curses.LINES - 1, curses.COLS - 1)``." -#: howto/curses.rst:198 +#: howto/curses.rst:194 msgid "" "When you call a method to display or erase text, the effect doesn't " "immediately show up on the display. Instead you must call the :meth:" @@ -379,7 +373,7 @@ msgstr "" "l'affichage ne le reflète pas immédiatement. Vous devez appeler la méthode :" "meth:`~curses.window.refresh` des objets fenêtre pour mettre à jour l'écran." -#: howto/curses.rst:203 +#: howto/curses.rst:199 msgid "" "This is because curses was originally written with slow 300-baud terminal " "connections in mind; with these terminals, minimizing the time required to " @@ -398,7 +392,7 @@ msgstr "" "fenêtre, il n'est pas nécessaire de l'afficher puisqu'il ne sera jamais " "visible." -#: howto/curses.rst:212 +#: howto/curses.rst:208 msgid "" "In practice, explicitly telling curses to redraw a window doesn't really " "complicate programming with curses much. Most programs go into a flurry of " @@ -416,7 +410,7 @@ msgstr "" "appelant d'abord ``stdscr.refresh()`` ou la méthode :meth:`refresh` de la " "fenêtre adéquate." -#: howto/curses.rst:220 +#: howto/curses.rst:216 msgid "" "A pad is a special case of a window; it can be larger than the actual " "display screen, and only a portion of the pad displayed at a time. Creating " @@ -431,7 +425,7 @@ msgstr "" "devez fournir les coordonnées de la zone de l'écran où une partie du tampon " "sera affichée." -#: howto/curses.rst:241 +#: howto/curses.rst:237 msgid "" "The :meth:`refresh` call displays a section of the pad in the rectangle " "extending from coordinate (5,5) to coordinate (20,75) on the screen; the " @@ -445,7 +439,7 @@ msgstr "" "tampon. À part cette différence, les tampons sont exactement comme les " "fenêtres ordinaires et gèrent les mêmes méthodes." -#: howto/curses.rst:247 +#: howto/curses.rst:243 msgid "" "If you have multiple windows and pads on screen there is a more efficient " "way to update the screen and prevent annoying screen flicker as each part of " @@ -455,7 +449,7 @@ msgstr "" "plus efficace pour rafraîchir l'écran et éviter des scintillements agaçants " "à chaque mise à jour. :meth:`refresh` effectue en fait deux choses :" -#: howto/curses.rst:252 +#: howto/curses.rst:248 msgid "" "Calls the :meth:`~curses.window.noutrefresh` method of each window to update " "an underlying data structure representing the desired state of the screen." @@ -464,7 +458,7 @@ msgstr "" "pour mettre à jour les données sous-jacentes qui permettent d'obtenir " "l'affichage voulu ;" -#: howto/curses.rst:255 +#: howto/curses.rst:251 msgid "" "Calls the function :func:`~curses.doupdate` function to change the physical " "screen to match the desired state recorded in the data structure." @@ -472,7 +466,7 @@ msgstr "" "elle appelle la fonction :func:`~curses.doupdate` pour modifier l'écran " "physique afin de correspondre à l'état défini par les données sous-jacentes." -#: howto/curses.rst:258 +#: howto/curses.rst:254 msgid "" "Instead you can call :meth:`noutrefresh` on a number of windows to update " "the data structure, and then call :func:`doupdate` to update the screen." @@ -481,11 +475,11 @@ msgstr "" "voulez mettre à jour des données, puis :func:`doupdate` pour mettre à jour " "l'écran." -#: howto/curses.rst:264 +#: howto/curses.rst:260 msgid "Displaying Text" msgstr "Affichage de texte" -#: howto/curses.rst:266 +#: howto/curses.rst:262 msgid "" "From a C programmer's point of view, curses may sometimes look like a twisty " "maze of functions, all subtly different. For example, :c:func:`addstr` " @@ -504,7 +498,7 @@ msgstr "" "d'utiliser ``stdscr`` par défaut. :c:func:`mvwaddstr` permet de spécifier à " "la fois les coordonnées et la fenêtre." -#: howto/curses.rst:275 +#: howto/curses.rst:271 msgid "" "Fortunately the Python interface hides all these details. ``stdscr`` is a " "window object like any other, and methods such as :meth:`~curses.window." @@ -516,27 +510,27 @@ msgstr "" "window.addstr` acceptent leurs arguments sous de multiples formes, " "habituellement quatre." -#: howto/curses.rst:281 +#: howto/curses.rst:277 msgid "Form" msgstr "Forme" -#: howto/curses.rst:350 +#: howto/curses.rst:346 msgid "Description" msgstr "Description" -#: howto/curses.rst:283 +#: howto/curses.rst:279 msgid "*str* or *ch*" msgstr "*str* ou *ch*" -#: howto/curses.rst:283 +#: howto/curses.rst:279 msgid "Display the string *str* or character *ch* at the current position" msgstr "Affiche la chaîne *str* ou le caractère *ch* à la position actuelle" -#: howto/curses.rst:286 +#: howto/curses.rst:282 msgid "*str* or *ch*, *attr*" msgstr "*str* ou *ch*, *attr*" -#: howto/curses.rst:286 +#: howto/curses.rst:282 msgid "" "Display the string *str* or character *ch*, using attribute *attr* at the " "current position" @@ -544,21 +538,21 @@ msgstr "" "Affiche la chaîne *str* ou le caractère *ch*, en utilisant l'attribut *attr* " "à la position actuelle" -#: howto/curses.rst:290 +#: howto/curses.rst:286 msgid "*y*, *x*, *str* or *ch*" msgstr "*y*, *x*, *str* ou *ch*" -#: howto/curses.rst:290 +#: howto/curses.rst:286 msgid "Move to position *y,x* within the window, and display *str* or *ch*" msgstr "" "Se déplace à la position *y,x* dans la fenêtre et affiche la chaîne *str* ou " "le caractère *ch*" -#: howto/curses.rst:293 +#: howto/curses.rst:289 msgid "*y*, *x*, *str* or *ch*, *attr*" msgstr "*y*, *x*, *str* ou *ch*, *attr*" -#: howto/curses.rst:293 +#: howto/curses.rst:289 msgid "" "Move to position *y,x* within the window, and display *str* or *ch*, using " "attribute *attr*" @@ -566,7 +560,7 @@ msgstr "" "Se déplace à la position *y,x* dans la fenêtre et affiche la chaîne *str* ou " "le caractère *ch* en utilisant l'attribut *attr*" -#: howto/curses.rst:297 +#: howto/curses.rst:293 msgid "" "Attributes allow displaying text in highlighted forms such as boldface, " "underline, reverse code, or in color. They'll be explained in more detail " @@ -576,7 +570,7 @@ msgstr "" "vidéo inversé ou en couleur. Nous les voyons plus en détail dans la section " "suivante." -#: howto/curses.rst:302 +#: howto/curses.rst:298 msgid "" "The :meth:`~curses.window.addstr` method takes a Python string or bytestring " "as the value to be displayed. The contents of bytestrings are sent to the " @@ -591,7 +585,7 @@ msgstr "" "l'encodage du système tel que renvoyé par :func:`locale." "getpreferredencoding`." -#: howto/curses.rst:309 +#: howto/curses.rst:305 msgid "" "The :meth:`~curses.window.addch` methods take a character, which can be " "either a string of length 1, a bytestring of length 1, or an integer." @@ -600,7 +594,7 @@ msgstr "" "la forme d'une chaîne de longueur 1, d'une chaîne d'octets de longueur 1 ou " "d'un entier." -#: howto/curses.rst:312 +#: howto/curses.rst:308 msgid "" "Constants are provided for extension characters; these constants are " "integers greater than 255. For example, :const:`ACS_PLMINUS` is a +/- " @@ -613,7 +607,7 @@ msgstr "" "haut et à gauche d'une boîte (utile pour dessiner des encadrements). Vous " "pouvez aussi utiliser les caractères Unicode adéquats." -#: howto/curses.rst:318 +#: howto/curses.rst:314 msgid "" "Windows remember where the cursor was left after the last operation, so if " "you leave out the *y,x* coordinates, the string or character will be " @@ -632,7 +626,7 @@ msgstr "" "l'utilisateur (il peut être déroutant d'avoir un curseur qui clignote à des " "endroits apparemment aléatoires)." -#: howto/curses.rst:326 +#: howto/curses.rst:322 msgid "" "If your application doesn't need a blinking cursor at all, you can call " "``curs_set(False)`` to make it invisible. For compatibility with older " @@ -649,11 +643,11 @@ msgstr "" "curseur clignotant et vous n'avez plus besoin de vous soucier de le laisser " "trainer à des endroits bizarres." -#: howto/curses.rst:335 +#: howto/curses.rst:331 msgid "Attributes and Color" msgstr "Attributs et couleurs" -#: howto/curses.rst:337 +#: howto/curses.rst:333 msgid "" "Characters can be displayed in different ways. Status lines in a text-based " "application are commonly shown in reverse video, or a text viewer may need " @@ -666,7 +660,7 @@ msgstr "" "À ces fins, *curses* vous permet de spécifier un attribut pour chaque " "caractère à l'écran." -#: howto/curses.rst:342 +#: howto/curses.rst:338 msgid "" "An attribute is an integer, each bit representing a different attribute. " "You can try to display text with multiple attribute bits set, but curses " @@ -683,59 +677,59 @@ msgstr "" "se cantonner aux attributs les plus communément utilisés, dont la liste est " "fournie ci-dessous." -#: howto/curses.rst:350 +#: howto/curses.rst:346 msgid "Attribute" msgstr "Attribut" -#: howto/curses.rst:352 +#: howto/curses.rst:348 msgid ":const:`A_BLINK`" msgstr ":const:`A_BLINK`" -#: howto/curses.rst:352 +#: howto/curses.rst:348 msgid "Blinking text" msgstr "Texte clignotant" -#: howto/curses.rst:354 +#: howto/curses.rst:350 msgid ":const:`A_BOLD`" msgstr ":const:`A_BOLD`" -#: howto/curses.rst:354 +#: howto/curses.rst:350 msgid "Extra bright or bold text" msgstr "Texte en surbrillance ou en gras" -#: howto/curses.rst:356 +#: howto/curses.rst:352 msgid ":const:`A_DIM`" msgstr ":const:`A_DIM`" -#: howto/curses.rst:356 +#: howto/curses.rst:352 msgid "Half bright text" msgstr "Texte en demi-ton" -#: howto/curses.rst:358 +#: howto/curses.rst:354 msgid ":const:`A_REVERSE`" msgstr ":const:`A_REVERSE`" -#: howto/curses.rst:358 +#: howto/curses.rst:354 msgid "Reverse-video text" msgstr "Texte en mode vidéo inversé" -#: howto/curses.rst:360 +#: howto/curses.rst:356 msgid ":const:`A_STANDOUT`" msgstr ":const:`A_STANDOUT`" -#: howto/curses.rst:360 +#: howto/curses.rst:356 msgid "The best highlighting mode available" msgstr "Le meilleur mode de mis en valeur pour le texte" -#: howto/curses.rst:362 +#: howto/curses.rst:358 msgid ":const:`A_UNDERLINE`" msgstr ":const:`A_UNDERLINE`" -#: howto/curses.rst:362 +#: howto/curses.rst:358 msgid "Underlined text" msgstr "Texte souligné" -#: howto/curses.rst:365 +#: howto/curses.rst:361 msgid "" "So, to display a reverse-video status line on the top line of the screen, " "you could code::" @@ -743,7 +737,7 @@ msgstr "" "Ainsi, pour mettre la ligne de statut située en haut de l'écran en mode " "vidéo inversé, vous pouvez coder ::" -#: howto/curses.rst:372 +#: howto/curses.rst:368 msgid "" "The curses library also supports color on those terminals that provide it. " "The most common such terminal is probably the Linux console, followed by " @@ -753,7 +747,7 @@ msgstr "" "compatibles. Le plus répandu de ces terminaux est sûrement la console Linux, " "suivie par *xterm* en couleurs." -#: howto/curses.rst:376 +#: howto/curses.rst:372 msgid "" "To use color, you must call the :func:`~curses.start_color` function soon " "after calling :func:`~curses.initscr`, to initialize the default color set " @@ -773,7 +767,7 @@ msgstr "" "*colour* ; si vous êtes habitué à l'orthographe britannique, vous devrez " "vous résigner à mal l'orthographier tant que vous utilisez *curses*)." -#: howto/curses.rst:386 +#: howto/curses.rst:382 msgid "" "The curses library maintains a finite number of color pairs, containing a " "foreground (or text) color and a background color. You can get the " @@ -790,13 +784,13 @@ msgstr "" "autres attributs tels que :const:`A_REVERSE`,mais là encore, de telles " "combinaisons risquent de ne pas fonctionner sur tous les terminaux." -#: howto/curses.rst:393 +#: howto/curses.rst:389 msgid "An example, which displays a line of text using color pair 1::" msgstr "" "Un exemple d'affichage d'une ligne de texte en utilisant la paire de couleur " "1 ::" -#: howto/curses.rst:398 +#: howto/curses.rst:394 msgid "" "As I said before, a color pair consists of a foreground and background " "color. The ``init_pair(n, f, b)`` function changes the definition of color " @@ -809,7 +803,7 @@ msgstr "" "texte à *f* et la couleur de fond à *b*. La paire de couleurs 0 est codée en " "dur à blanc sur noir et ne peut être modifiée." -#: howto/curses.rst:403 +#: howto/curses.rst:399 msgid "" "Colors are numbered, and :func:`start_color` initializes 8 basic colors when " "it activates color mode. They are: 0:black, 1:red, 2:green, 3:yellow, 4:" @@ -825,14 +819,14 @@ msgstr "" "chacune de ces couleurs : :const:`curses.COLOR_BLACK`, :const:`curses." "COLOR_RED` et ainsi de suite." -#: howto/curses.rst:409 +#: howto/curses.rst:405 msgid "" "Let's put all this together. To change color 1 to red text on a white " "background, you would call::" msgstr "" "Testons tout ça. Pour changer la couleur 1 à rouge sur fond blanc, appelez ::" -#: howto/curses.rst:414 +#: howto/curses.rst:410 msgid "" "When you change a color pair, any text already displayed using that color " "pair will change to the new colors. You can also display new text in this " @@ -842,7 +836,7 @@ msgstr "" "utilise cette paire de couleur voit les nouvelles couleurs s'appliquer à " "lui. Vous pouvez aussi afficher du nouveau texte dans cette couleur avec ::" -#: howto/curses.rst:420 +#: howto/curses.rst:416 msgid "" "Very fancy terminals can change the definitions of the actual colors to a " "given RGB value. This lets you change color 1, which is usually red, to " @@ -863,11 +857,11 @@ msgstr "" "chance d'avoir un terminal aussi perfectionné, consultez les pages du manuel " "de votre système pour obtenir plus d'informations." -#: howto/curses.rst:431 +#: howto/curses.rst:427 msgid "User Input" msgstr "Entrées de l'utilisateur" -#: howto/curses.rst:433 +#: howto/curses.rst:429 msgid "" "The C curses library offers only very simple input mechanisms. Python's :mod:" "`curses` module adds a basic text-input widget. (Other libraries such as " @@ -879,11 +873,11 @@ msgstr "" "d'entrée de texte (d'autres bibliothèques telles que `Urwid `_ ont un ensemble de *widgets* plus conséquent)." -#: howto/curses.rst:438 +#: howto/curses.rst:434 msgid "There are two methods for getting input from a window:" msgstr "Il y a deux méthodes pour obtenir des entrées dans une fenêtre :" -#: howto/curses.rst:440 +#: howto/curses.rst:436 msgid "" ":meth:`~curses.window.getch` refreshes the screen and then waits for the " "user to hit a key, displaying the key if :func:`~curses.echo` has been " @@ -895,7 +889,7 @@ msgstr "" "appelé auparavant. Vous pouvez en option spécifier des coordonnées où " "positionner le curseur avant la mise en pause ;" -#: howto/curses.rst:445 +#: howto/curses.rst:441 msgid "" ":meth:`~curses.window.getkey` does the same thing but converts the integer " "to a string. Individual characters are returned as 1-character strings, and " @@ -908,7 +902,7 @@ msgstr "" "renvoient des chaînes plus longues contenant le nom de la touche (tel que " "``KEY_UP`` ou ``^G``)." -#: howto/curses.rst:450 +#: howto/curses.rst:446 msgid "" "It's possible to not wait for the user using the :meth:`~curses.window." "nodelay` window method. After ``nodelay(True)``, :meth:`getch` and :meth:" @@ -929,7 +923,7 @@ msgstr "" "aucune entrée n'est disponible dans le délai spécifié (mesuré en dixièmes de " "seconde), *curses* lève une exception." -#: howto/curses.rst:460 +#: howto/curses.rst:456 msgid "" "The :meth:`getch` method returns an integer; if it's between 0 and 255, it " "represents the ASCII code of the key pressed. Values greater than 255 are " @@ -946,7 +940,7 @@ msgstr "" "La boucle principale de votre programme pourrait ressembler à quelque chose " "comme ::" -#: howto/curses.rst:476 +#: howto/curses.rst:472 msgid "" "The :mod:`curses.ascii` module supplies ASCII class membership functions " "that take either integer or 1-character string arguments; these may be " @@ -963,7 +957,7 @@ msgstr "" "type correspondant au nom de la fonction. Par exemple, :func:`curses.ascii." "ctrl` renvoie le caractère de contrôle correspondant à son paramètre." -#: howto/curses.rst:483 +#: howto/curses.rst:479 msgid "" "There's also a method to retrieve an entire string, :meth:`~curses.window." "getstr`. It isn't used very often, because its functionality is quite " @@ -977,7 +971,7 @@ msgstr "" "arrière et la touche Entrée, qui termine la chaîne. Elle peut, en option, " "être limitée à un nombre fixé de caractères. ::" -#: howto/curses.rst:494 +#: howto/curses.rst:490 msgid "" "The :mod:`curses.textpad` module supplies a text box that supports an Emacs-" "like set of keybindings. Various methods of the :class:`~curses.textpad." @@ -990,18 +984,18 @@ msgstr "" "des entrées et le regroupement de l'entrée avec ou sans les espaces de début " "et de fin. Par exemple ::" -#: howto/curses.rst:518 +#: howto/curses.rst:514 msgid "" "See the library documentation on :mod:`curses.textpad` for more details." msgstr "" "Consultez la documentation de la bibliothèque pour plus de détails sur :mod:" "`curses.textpad`." -#: howto/curses.rst:522 +#: howto/curses.rst:518 msgid "For More Information" msgstr "Pour aller plus loin" -#: howto/curses.rst:524 +#: howto/curses.rst:520 msgid "" "This HOWTO doesn't cover some advanced topics, such as reading the contents " "of the screen or capturing mouse events from an xterm instance, but the " @@ -1014,7 +1008,7 @@ msgstr "" "`curses` est maintenant suffisamment complète. Nous vous encourageons à la " "parcourir." -#: howto/curses.rst:529 +#: howto/curses.rst:525 msgid "" "If you're in doubt about the detailed behavior of the curses functions, " "consult the manual pages for your curses implementation, whether it's " @@ -1029,7 +1023,7 @@ msgstr "" "listes complètes des fonctions, attributs et codes :const:`ACS_\\*` des " "caractères disponibles." -#: howto/curses.rst:536 +#: howto/curses.rst:532 msgid "" "Because the curses API is so large, some functions aren't supported in the " "Python interface. Often this isn't because they're difficult to implement, " @@ -1047,27 +1041,29 @@ msgstr "" "du développeur Python `_ pour apprendre " "comment soumettre des améliorations à Python." -#: howto/curses.rst:544 +#: 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:546 +#: howto/curses.rst:542 msgid "`The ncurses man page `_" msgstr "`La page de manuel ncurses `_" -#: howto/curses.rst:547 +#: howto/curses.rst:543 +#, fuzzy msgid "" -"`The ncurses FAQ `_" +"`The ncurses FAQ `_" msgstr "" "`La FAQ ncurses `_ " "(ressource en anglais)" -#: howto/curses.rst:548 +#: howto/curses.rst:544 msgid "" "`\"Use curses... don't swear\" `_: video of a PyCon 2013 talk on controlling terminals using " @@ -1077,12 +1073,29 @@ msgstr "" "v=eN1eZtjLEnU>`_ : vidéo d'une conférence lors de la PyCon 2013 sur la " "gestion des terminaux à l'aide de *curses* et *Urwid* (vidéo en anglais)." -#: howto/curses.rst:550 +#: howto/curses.rst:546 +#, fuzzy msgid "" -"`\"Console Applications with Urwid\" `_: video of a PyCon CA 2012 talk " -"demonstrating some applications written using Urwid." +"`\"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 index 1f89ff08b3..07dbea9a40 100644 --- a/howto/descriptor.po +++ b/howto/descriptor.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-27 10:27+0100\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" @@ -44,22 +44,29 @@ msgid "" ":term:`Descriptors ` let objects customize attribute lookup, " "storage, and deletion." msgstr "" +"Les :term:`descripteurs ` permettent de personnaliser la " +"recherche, le stockage et la suppression des attributs des objets." #: howto/descriptor.rst:16 msgid "This guide has four major sections:" -msgstr "" +msgstr "Ce guide comporte quatre parties principales :" #: howto/descriptor.rst:18 msgid "" "The \"primer\" gives a basic overview, moving gently from simple examples, " "adding one feature at a time. Start here if you're new to descriptors." msgstr "" +"l'« introduction » donne un premier aperçu, en partant d'exemples simples, " +"puis en ajoutant une fonctionnalité à la fois. Commencez par là si vous " +"débutez avec les descripteurs ;" #: howto/descriptor.rst:21 msgid "" "The second section shows a complete, practical descriptor example. If you " "already know the basics, start there." msgstr "" +"la deuxième partie montre un exemple de descripteur complet et pratique. Si " +"vous connaissez déjà les bases, commencez par là ;" #: howto/descriptor.rst:24 msgid "" @@ -67,6 +74,9 @@ msgid "" "detailed mechanics of how descriptors work. Most people don't need this " "level of detail." msgstr "" +"la troisième partie fournit un didacticiel plus technique qui décrit de " +"manière détaillée comment fonctionnent les descripteurs. La plupart des gens " +"n'ont pas besoin de ce niveau de détail ;" #: howto/descriptor.rst:28 msgid "" @@ -75,38 +85,51 @@ msgid "" "bound methods or about the implementation of common tools like :func:" "`classmethod`, :func:`staticmethod`, :func:`property`, and :term:`__slots__`." msgstr "" +"la dernière partie contient des équivalents en pur Python des descripteurs " +"natifs écrits en C. Lisez ceci si vous êtes curieux de savoir comment les " +"fonctions se transforment en méthodes liées ou si vous voulez connaître " +"l'implémentation d'outils courants comme :func:`classmethod`, :func:" +"`staticmethod`, :func:`property` et :term:`__slots__`." #: howto/descriptor.rst:36 msgid "Primer" -msgstr "" +msgstr "Introduction" #: howto/descriptor.rst:38 msgid "" "In this primer, we start with the most basic possible example and then we'll " "add new capabilities one by one." msgstr "" +"Dans cette introduction, nous commençons par l'exemple le plus simple " +"possible, puis nous ajoutons de nouvelles fonctionnalités une par une." #: howto/descriptor.rst:43 msgid "Simple example: A descriptor that returns a constant" -msgstr "" +msgstr "Un exemple simple : un descripteur qui renvoie une constante" #: howto/descriptor.rst:45 msgid "" "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 "" @@ -115,39 +138,55 @@ msgid "" "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 "" +msgstr "Recherches dynamiques" #: howto/descriptor.rst:90 msgid "" "Interesting descriptors typically run computations instead of returning " "constants:" msgstr "" +"Les descripteurs intéressants exécutent généralement des calculs au lieu de " +"renvoyer des constantes :" #: howto/descriptor.rst:109 msgid "" "An interactive session shows that the lookup is dynamic — it computes " "different, updated answers each time::" msgstr "" +"Une session interactive montre que la recherche est dynamique — elle calcule " +"des réponses différentes, mises à jour à chaque fois ::" #: howto/descriptor.rst:122 msgid "" @@ -158,10 +197,16 @@ msgid "" "that lets the :meth:`__get__` method learn the target directory. The " "*objtype* parameter is the class *Directory*." msgstr "" +"En plus de montrer comment les descripteurs peuvent exécuter des calculs, " +"cet exemple révèle également le but des paramètres de :meth:`__get__`. Le " +"paramètre *self* est *size*, une instance de *DirectorySize*. Le paramètre " +"*obj* est soit *g* soit *s*, une instance de *Directory*. C'est le paramètre " +"*obj* qui permet à la méthode :meth:`__get__` de connaître le répertoire " +"cible. Le paramètre *objtype* est la classe *Directory*." #: howto/descriptor.rst:131 msgid "Managed attributes" -msgstr "" +msgstr "Attributs gérés" #: howto/descriptor.rst:133 msgid "" @@ -171,6 +216,12 @@ msgid "" "dictionary. The descriptor's :meth:`__get__` and :meth:`__set__` methods " "are triggered when the public attribute is accessed." msgstr "" +"Une utilisation courante des descripteurs est la gestion de l'accès aux " +"données d'instances. Le descripteur est affecté à un attribut public dans le " +"dictionnaire de classe tandis que les données réelles sont stockées en tant " +"qu'attribut privé dans le dictionnaire d'instance. Les méthodes :meth:" +"`__get__` et :meth:`__set__` du descripteur sont déclenchées lors de l'accès " +"à l'attribut public." #: howto/descriptor.rst:139 msgid "" @@ -178,12 +229,18 @@ msgid "" "private attribute. When the public attribute is accessed, the descriptor " "logs the lookup or update:" msgstr "" +"Dans l'exemple qui suit, *age* est l'attribut public et *_age* est " +"l'attribut privé. Lors de l'accès à l'attribut public, le descripteur " +"journalise la recherche ou la mise à jour :" #: howto/descriptor.rst:172 msgid "" "An interactive session shows that all access to the managed attribute *age* " "is logged, but that the regular attribute *name* is not logged:" msgstr "" +"Une session interactive montre que tous les accès à l'attribut géré *age* " +"sont consignés, mais que rien n'est journalisé pour l'attribut normal " +"*name* :" #: howto/descriptor.rst:206 msgid "" @@ -192,16 +249,22 @@ msgid "" "only have one logged attribute and that its name is unchangeable. In the " "next example, we'll fix that problem." msgstr "" +"Un problème majeur avec cet exemple est que le nom privé *_age* est écrit en " +"dur dans la classe *LoggedAgeAccess*. Cela signifie que chaque instance ne " +"peut avoir qu'un seul attribut journalisé et que son nom est immuable. Dans " +"l'exemple suivant, nous allons résoudre ce problème." #: howto/descriptor.rst:213 msgid "Customized names" -msgstr "" +msgstr "Noms personnalisés" #: howto/descriptor.rst:215 msgid "" "When a class uses descriptors, it can inform each descriptor about which " "variable name was used." msgstr "" +"Lorsqu'une classe utilise des descripteurs, elle peut informer chaque " +"descripteur du nom de variable utilisé." #: howto/descriptor.rst:218 msgid "" @@ -211,6 +274,11 @@ msgid "" "can be recorded, giving each descriptor its own *public_name* and " "*private_name*:" msgstr "" +"Dans cet exemple, la classe :class:`Person` a deux instances de " +"descripteurs, *name* et *age*. Lorsque la classe :class:`Person` est " +"définie, :meth:`__set_name__` est appelée automatiquement dans " +"*LoggedAccess* afin que les noms de champs puissent être enregistrés, en " +"donnant à chaque descripteur ses propres *public_name* et *private_name* :" #: howto/descriptor.rst:256 msgid "" @@ -218,24 +286,30 @@ msgid "" "`__set_name__` so that the field names would be recorded. Here we call :" "func:`vars` to look up the descriptor without triggering it:" msgstr "" +"Une session interactive montre que la classe :class:`Person` a appelé :meth:" +"`__set_name__` pour que les noms des champs soient enregistrés. Ici, nous " +"appelons :func:`vars` pour rechercher le descripteur sans le déclencher :" #: howto/descriptor.rst:267 msgid "The new class now logs access to both *name* and *age*:" msgstr "" +"La nouvelle classe enregistre désormais l'accès à la fois à *name* et *age* :" #: howto/descriptor.rst:284 msgid "The two *Person* instances contain only the private names:" -msgstr "" +msgstr "Les deux instances de *Person* ne contiennent que les noms privés :" #: howto/descriptor.rst:295 msgid "Closing thoughts" -msgstr "" +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 "" @@ -244,6 +318,11 @@ msgid "" "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 "" @@ -251,18 +330,28 @@ msgid "" "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 "" @@ -270,6 +359,9 @@ msgid "" "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 "" @@ -278,20 +370,26 @@ msgid "" "`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 "" +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 "" +msgstr "Classe « validateur »" #: howto/descriptor.rst:335 msgid "" @@ -300,31 +398,43 @@ msgid "" "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 "" +msgstr "Validateurs personnalisés" #: howto/descriptor.rst:370 msgid "Here are three practical data validation utilities:" -msgstr "" +msgstr "Voici trois utilitaires concrets de validation de données :" #: howto/descriptor.rst: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 "" @@ -332,6 +442,9 @@ msgid "" "`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 "" @@ -340,28 +453,36 @@ msgid "" "`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 "" +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 "" +msgstr "Les descripteurs empêchent la création d'instances non valides :" #: howto/descriptor.rst:481 msgid "Technical Tutorial" -msgstr "" +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" @@ -372,16 +493,18 @@ 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 -#, fuzzy msgid "" "Learning about descriptors not only provides access to a larger toolset, it " "creates a deeper understanding of how Python works." msgstr "" "L'apprentissage des descripteurs permet non seulement d'accéder à un " "ensemble d'outils plus vaste, mais aussi de mieux comprendre le " -"fonctionnement de Python et d'apprécier l'élégance de sa conception." +"fonctionnement de Python." #: howto/descriptor.rst:498 #, fuzzy @@ -389,21 +512,19 @@ msgid "Definition and introduction" msgstr "Définition et introduction" #: howto/descriptor.rst:500 -#, fuzzy msgid "" "In general, a descriptor is an attribute value that has one of the methods " "in the descriptor protocol. Those methods are :meth:`__get__`, :meth:" "`__set__`, and :meth:`__delete__`. If any of those methods are defined for " "an attribute, it is said to be a :term:`descriptor`." msgstr "" -"En général, un descripteur est un attribut objet avec un \"comportement " -"contraignant\", dont l'accès à l'attribut a été remplacé par des méthodes " -"dans le protocole du descripteur. Ces méthodes sont : :meth:`__get__`, :" -"meth:`__set__`, et :meth:`__delete__`. Si l'une de ces méthodes est définie " -"pour un objet, il s'agit d'un descripteur." +"En général, un descripteur est la valeur d'un attribut qui possède une des " +"méthodes définies dans le « protocole descripteur ». Ces méthodes sont : :" +"meth:`__get__`, :meth:`__set__` et :meth:`__delete__`. Si l'une de ces " +"méthodes est définie pour un attribut, il s'agit d'un :term:`descripteur " +"`." #: howto/descriptor.rst:505 -#, fuzzy msgid "" "The default behavior for attribute access is to get, set, or delete the " "attribute from an object's dictionary. For instance, ``a.x`` has a lookup " @@ -415,17 +536,16 @@ msgid "" "methods were defined." msgstr "" "Le comportement par défaut pour l'accès aux attributs consiste à obtenir, " -"définir ou supprimer l'attribut du dictionnaire d'un objet. Par exemple, " -"``a. x`` a une chaîne de recherche commençant par ``a. __dict__ ['x']``, " -"puis ``type (a). __dict__ ['x']``, et continuant à travers les classes de " -"base de ``type (a)`` À l'exclusion des sous-classes. Si la valeur recherchée " -"est un objet définissant l'une des méthodes de descripteur, Python peut " -"substituer le comportement par défaut et appeler à la place la méthode " -"Descriptor. Lorsque cela se produit dans la chaîne de précédence dépend de " -"quelles méthodes descripteur ont été définies." +"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 -#, fuzzy msgid "" "Descriptors are a powerful, general purpose protocol. They are the " "mechanism behind properties, methods, static methods, class methods, and :" @@ -433,13 +553,12 @@ msgid "" "simplify the underlying C code and offer a flexible set of new tools for " "everyday Python programs." msgstr "" -"Les descripteurs sont un protocole puissant et à usage général. Ils sont le " -"mécanisme derrière les propriétés, les méthodes, les méthodes statiques, les " -"méthodes de classes et :func:`super()`. Ils sont utilisés dans tout Python " -"lui-même pour implémenter les nouvelles classes de style introduites dans la " -"version 2.2. Les descripteurs simplifient le code C sous-jacent et offrent " -"un ensemble flexible de nouveaux outils pour les programmes Python " -"quotidiens." +"Les descripteurs sont un protocole puissant et à usage général. Ils " +"constituent le mécanisme qui met en œuvre les propriétés, les méthodes, les " +"méthodes statiques, les méthodes de classes et :func:`super()`. Ils sont " +"utilisés dans tout Python lui-même. Les descripteurs simplifient le code C " +"sous-jacent et offrent un ensemble flexible de nouveaux outils pour les " +"programmes Python quotidiens." #: howto/descriptor.rst:522 #, fuzzy @@ -469,7 +588,6 @@ msgstr "" "comportement par défaut lorsqu'il est recherché comme un attribut." #: howto/descriptor.rst:534 -#, fuzzy msgid "" "If an object defines :meth:`__set__` or :meth:`__delete__`, it is considered " "a data descriptor. Descriptors that only define :meth:`__get__` are called " @@ -477,8 +595,8 @@ msgid "" "possible)." msgstr "" "Si un objet définit :meth:`__set__` ou :meth:`__delete__`, il est considéré " -"comme un descripteur de données. Les descripteurs qui ne définissent que :" -"meth:`__get__` sont appelés descripteurs *non-data* (ils sont généralement " +"comme un descripteur de données. Les descripteurs qui ne définissent que :" +"meth:`__get__` sont appelés descripteurs hors-données (ils sont généralement " "utilisés pour des méthodes mais d'autres utilisations sont possibles)." #: howto/descriptor.rst:539 @@ -512,22 +630,23 @@ msgstr "" #: howto/descriptor.rst:552 msgid "Overview of descriptor invocation" -msgstr "" +msgstr "Présentation de l'appel de descripteur" #: howto/descriptor.rst:554 -#, fuzzy msgid "" "A descriptor can be called directly with ``desc.__get__(obj)`` or ``desc." "__get__(None, cls)``." msgstr "" -"Un descripteur peut être appelé directement par son nom de méthode. Par " -"exemple, ``d.__get__(obj)``." +"Un descripteur peut être appelé directement par ``desc.__get__(obj)`` ou " +"``desc.__get__(None, cls)``." #: howto/descriptor.rst: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 "" @@ -536,19 +655,22 @@ msgid "" "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 -#, fuzzy msgid "" "The details of invocation depend on whether ``obj`` is an object, class, or " "instance of super." msgstr "" -"Les détails de l'invocation dépendent du fait que ``obj`` est un objet ou " -"une classe." +"Les détails de l'appel varient selon que ``obj`` est un objet, une classe ou " +"une instance de *super*." #: howto/descriptor.rst:570 msgid "Invocation from an instance" -msgstr "" +msgstr "Appel depuis une instance" #: howto/descriptor.rst:572 msgid "" @@ -557,136 +679,154 @@ msgid "" "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:700 -msgid "" -"Interestingly, attribute lookup doesn't call :meth:`object.__getattribute__` " -"directly. Instead, both the dot operator and the :func:`getattr` function " -"perform attribute lookup by way of a helper function:" -msgstr "" - -#: howto/descriptor.rst:747 +#: howto/descriptor.rst:719 msgid "" -"So if :meth:`__getattr__` exists, it is called whenever :meth:" -"`__getattribute__` raises :exc:`AttributeError` (either directly or in one " -"of the descriptor calls)." +"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:750 +#: howto/descriptor.rst:723 msgid "" -"Also, if a user calls :meth:`object.__getattribute__` directly, the :meth:" -"`__getattr__` hook is bypassed entirely." +"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:755 -#, fuzzy +#: howto/descriptor.rst:773 msgid "Invocation from a class" -msgstr "Appelé depuis un Classe" +msgstr "Appel depuis une classe" -#: howto/descriptor.rst:757 +#: 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:762 +#: 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:764 +#: 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:769 +#: howto/descriptor.rst:787 msgid "Invocation from super" -msgstr "" +msgstr "Appel depuis super" -#: howto/descriptor.rst:771 +#: 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:774 -#, fuzzy +#: 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 "" -"L'objet renvoyé par ``super()`` a également une méthode personnalisée :meth:" -"`__getattribute__` pour invoquer des descripteurs. La recherche d'attribut " -"``super(B, obj).m`` recherche dans ``obj.__class__.__mro__`` la classe qui " -"suit immédiatement B, appelons la A, et renvoie ``A.__dict__['m']." -"__get__(obj, B)``. Si ce n'est pas un descripteur, ``m`` est renvoyé " -"inchangé. S'il n'est pas dans le dictionnaire, la recherche de ``m`` revient " -"à une recherche utilisant :meth:`object.__getattribute__`." +"La recherche d'attribut ``super(A, obj).m`` recherche dans ``obj.__class__." +"__mro__`` la classe ``B`` qui suit immédiatement A, et renvoie ``B." +"__dict__['m'].__get__(obj, A)``. Si ce n'est pas un descripteur, ``m`` est " +"renvoyé inchangé." -#: howto/descriptor.rst:779 -#, fuzzy +#: 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 "" -"Les détails d'implémentation sont dans :c:func:`super_getattro()` dans :" -"source:`Objects/typeobject.c` et un équivalent Python pur peut être trouvé " -"dans `Guido's Tutorial`_." +"L'implémentation C complète est dans :c:func:`super_getattro()` dans :source:" +"`Objects/typeobject.c`. Un équivalent Python pur peut être trouvé dans " +"`Guido's Tutorial `_ (page en anglais)." -#: howto/descriptor.rst:786 +#: howto/descriptor.rst:804 msgid "Summary of invocation logic" -msgstr "" +msgstr "Résumé de la logique d'appel" -#: howto/descriptor.rst:788 +#: 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:791 +#: howto/descriptor.rst:809 msgid "The important points to remember are:" msgstr "Les points importants à retenir sont :" -#: howto/descriptor.rst:793 -#, fuzzy +#: 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__`" +msgstr "" +"les descripteurs sont appelés par la méthode :meth:`__getattribute__` ;" -#: howto/descriptor.rst:795 +#: 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:798 -#, fuzzy +#: 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 " -"descripteurs" +"descripteur car toute la logique des descripteurs est dans cette méthode ;" -#: howto/descriptor.rst:801 -#, fuzzy +#: 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 " @@ -694,27 +834,27 @@ msgid "" "includes the class." msgstr "" ":meth:`objet.__getattribute__` et :meth:`type.__getattribute__` font " -"différents appels à :meth:`__get__`." +"différents appels à :meth:`__get__`. La première inclut l'instance et peut " +"inclure la classe. La seconde met ``None`` pour l'instance et inclut " +"toujours la classe ;" -#: howto/descriptor.rst:806 -#, fuzzy +#: howto/descriptor.rst:824 msgid "Data descriptors always override instance dictionaries." msgstr "" -"les descripteurs de données remplacent toujours les dictionnaires " +"les descripteurs de données sont toujours prioritaires sur les dictionnaires " "d'instances." -#: howto/descriptor.rst:808 -#, fuzzy +#: howto/descriptor.rst:826 msgid "Non-data descriptors may be overridden by instance dictionaries." msgstr "" -"les descripteurs *non-data* peuvent être remplacés par des dictionnaires " +"les descripteurs hors-données peuvent céder la priorité aux dictionnaires " "d'instance." -#: howto/descriptor.rst:812 +#: howto/descriptor.rst:830 msgid "Automatic name notification" -msgstr "" +msgstr "Notification automatique des noms" -#: howto/descriptor.rst:814 +#: 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` " @@ -723,110 +863,125 @@ msgid "" "with two arguments. The *owner* is the class where the descriptor is used, " "and the *name* is the class variable the descriptor was assigned to." msgstr "" +"Il est parfois souhaitable qu'un descripteur sache à quel nom de variable de " +"classe il a été affecté. Lorsqu'une nouvelle classe est créée, la " +"métaclasse :class:`type` parcourt le dictionnaire de la nouvelle classe. Si " +"l'une des entrées est un descripteur et si elle définit :meth:" +"`__set_name__`, cette méthode est appelée avec deux arguments : *owner* " +"(propriétaire) est la classe où le descripteur est utilisé, et *name* est la " +"variable de classe à laquelle le descripteur a été assigné." -#: howto/descriptor.rst:821 -#, fuzzy +#: 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:`super_getattro()` dans :" -"source:`Objects/typeobject.c` et un équivalent Python pur peut être trouvé " -"dans `Guido's Tutorial`_." +"Les détails d'implémentation sont dans :c:func:`type_new()` et :c:func:" +"`set_names()` dans :source:`Objects/typeobject.c`." -#: howto/descriptor.rst:824 +#: 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:830 +#: howto/descriptor.rst:848 msgid "ORM example" -msgstr "" +msgstr "Exemple d'ORM" -#: howto/descriptor.rst:832 +#: howto/descriptor.rst:850 msgid "" -"The following code is simplified skeleton showing how data descriptors could " -"be used to implement an `object relational mapping `_." +"The following code is a simplified skeleton showing how data descriptors " +"could be used to implement an `object relational mapping `_." msgstr "" -#: howto/descriptor.rst:836 +#: 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:855 +#: 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:880 +#: 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:885 +#: 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:930 +#: howto/descriptor.rst:948 msgid "Pure Python Equivalents" -msgstr "" +msgstr "Équivalents en Python pur" -#: howto/descriptor.rst:932 -#, fuzzy +#: 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." +"in tools. Properties, bound methods, static methods, class methods, and " +"\\_\\_slots\\_\\_ are all based on the descriptor protocol." msgstr "" -"Le protocole est simple et offre des possibilités passionnantes. Plusieurs " -"cas d'utilisation sont si courants qu'ils ont été regroupés en appels de " -"fonction individuels. Les propriétés, les méthodes liées, les méthodes " -"statiques et les méthodes de classe sont toutes basées sur le protocole du " -"descripteur." +"Le protocole descripteur est simple et offre des possibilités très " +"intéressantes. Plusieurs cas d'utilisation sont si courants qu'ils ont été " +"regroupés dans des outils intégrés. Les propriétés, les méthodes liées, les " +"méthodes statiques et les méthodes de classe sont toutes basées sur le " +"protocole descripteur." -#: howto/descriptor.rst:939 +#: howto/descriptor.rst:957 msgid "Properties" msgstr "Propriétés" -#: howto/descriptor.rst:941 -#, fuzzy +#: 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` est une façon succincte de construire un " -"descripteur de données qui déclenche des appels de fonction lors de l'accès " -"à un attribut. Sa signature est ::" +"Appeler :func:`property` construit de façon succincte un descripteur de " +"données qui déclenche un appel de fonction lors de l'accès à un attribut. Sa " +"signature est ::" -#: howto/descriptor.rst:946 -#, fuzzy +#: howto/descriptor.rst:964 msgid "" "The documentation shows a typical use to define a managed attribute ``x``:" msgstr "" -"La documentation montre une utilisation typique pour définir un attribut " -"géré ``x`` ::" +"La documentation montre une utilisation caractéristique pour définir un " +"attribut géré ``x`` ::" -#: howto/descriptor.rst:970 -#, fuzzy +#: 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é dans le protocole du " -"descripteur, voici un un équivalent Python pur ::" +"Pour voir comment :func:`property` est implémentée dans le protocole du " +"descripteur, voici un équivalent en Python pur ::" -#: howto/descriptor.rst:1073 +#: 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 " @@ -836,8 +991,7 @@ msgstr "" "utilisateur a accordé l'accès à un attribut et que des modifications " "ultérieures nécessitent l'intervention d'une méthode." -#: howto/descriptor.rst:1077 -#, fuzzy +#: 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 " @@ -848,23 +1002,25 @@ msgid "" msgstr "" "Par exemple, une classe de tableur peut donner accès à une valeur de cellule " "via ``Cell('b10').value``. Les améliorations ultérieures du programme " -"exigent que la cellule soit recalculée à chaque accès ; cependant, le " -"programmeur ne veut pas affecter le code client existant accédant " -"directement à l'attribut. La solution consiste à envelopper l'accès à " -"l'attribut de valeur dans un descripteur de données de propriété ::" +"exigent que la cellule soit recalculée à chaque accès ; cependant, le " +"programmeur ne veut pas impacter le code client existant accédant " +"directement à l'attribut. La solution consiste à envelopper l'accès à " +"l'attribut *value* dans un descripteur de données ::" -#: howto/descriptor.rst:1094 +#: 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:1099 +#: howto/descriptor.rst:1117 #, fuzzy msgid "Functions and methods" msgstr "Fonctions et méthodes" -#: howto/descriptor.rst:1101 +#: 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." @@ -873,92 +1029,103 @@ msgstr "" "environnement basé sur des fonctions. À l'aide de descripteurs *non-data*, " "les deux sont fusionnés de façon transparente." -#: howto/descriptor.rst:1104 -#, fuzzy +#: 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 dictionnaires de classes stockent les méthodes sous forme de fonctions. " -"Dans une définition de classe, les méthodes sont écrites en utilisant :" -"keyword:`def` ou :keyword:`lambda`, les outils habituels pour créer des " -"fonctions. Les méthodes ne diffèrent des fonctions régulières que par le " -"fait que le premier argument est réservé à l'instance de l'objet. Par " -"convention Python, la référence de l'instance est appelée *self* mais peut " -"être appelée *this* ou tout autre nom de variable." +"Les fonctions placées dans les dictionnaires des classes sont transformées " +"en méthodes au moment de l'appel. Les méthodes ne diffèrent des fonctions " +"ordinaires que par le fait que le premier argument est réservé à l'instance " +"de l'objet. Par convention Python, la référence de l'instance est appelée " +"*self*, bien qu'il soit possible de l'appeler *this* ou tout autre nom de " +"variable." -#: howto/descriptor.rst:1109 +#: 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:1126 -#, fuzzy +#: 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 les appels de méthodes, les fonctions incluent la " -"méthode :meth:`__get__` pour lier les méthodes pendant l'accès aux " -"attributs. Cela signifie que toutes les fonctions sont des descripteurs " -"*non-data* qui renvoient des méthodes liées lorsqu'elles sont appelées " -"depuis un objet. En Python pur, il fonctionne comme ceci ::" +"Pour prendre en charge la création automatique des méthodes, les fonctions " +"incluent la méthode :meth:`__get__` pour lier les méthodes pendant l'accès " +"aux attributs. Cela signifie que toutes les fonctions sont des descripteurs " +"hors-données qui renvoient des méthodes liées au cours d'une recherche " +"d'attribut d'une instance. Cela fonctionne ainsi ::" -#: howto/descriptor.rst:1142 -#, fuzzy +#: 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 l'interpréteur montre comment le descripteur de fonction se " -"comporte dans la pratique ::" +"L'exécution de la classe suivante dans l'interpréteur montre comment le " +"descripteur de fonction se comporte en pratique ::" -#: howto/descriptor.rst:1151 +#: 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:1158 +#: 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:1164 +#: 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:1170 +#: 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:1177 +#: 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:1186 +#: 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:1191 -#, fuzzy +#: howto/descriptor.rst:1209 msgid "Kinds of methods" -msgstr "Fonctions et méthodes" +msgstr "Types de méthodes" -#: howto/descriptor.rst:1193 +#: howto/descriptor.rst:1211 msgid "" "Non-data descriptors provide a simple mechanism for variations on the usual " "patterns of binding functions into methods." @@ -966,8 +1133,7 @@ msgstr "" "Les descripteurs *non-data* fournissent un mécanisme simple pour les " "variations des patrons habituels des fonctions de liaison dans les méthodes." -#: howto/descriptor.rst:1196 -#, fuzzy +#: 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 " @@ -975,64 +1141,61 @@ msgid "" "f(*args)`` becomes ``f(*args)``." msgstr "" "Pour résumer, les fonctions ont une méthode :meth:`__get__` pour qu'elles " -"puissent être converties en méthode lorsqu'on y accède comme attributs. Le " -"descripteur *non-data* transforme un appel ``obj.f(*args)``en ``f(obj, " -"*args)``. Appeler ``klass.f(*args)`` devient ``f(*args)``." +"puissent être converties en méthodes lorsqu'on y accède comme attributs. Le " +"descripteur hors-données transforme un appel ``obj.f(*args)`` en ``f(obj, " +"*args)``. L'appel ``cls.f(*args)`` devient ``f(*args)``." -#: howto/descriptor.rst:1201 +#: 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:1204 +#: howto/descriptor.rst:1222 msgid "Transformation" msgstr "Transformation" -#: howto/descriptor.rst:1204 -#, fuzzy +#: howto/descriptor.rst:1222 msgid "Called from an object" -msgstr "Appelé depuis un Objet" +msgstr "Appelée depuis un objet" -#: howto/descriptor.rst:1204 -#, fuzzy +#: howto/descriptor.rst:1222 msgid "Called from a class" -msgstr "Appelé depuis un Classe" +msgstr "Appelée depuis une classe" -#: howto/descriptor.rst:1207 +#: howto/descriptor.rst:1225 msgid "function" msgstr "fonction" -#: howto/descriptor.rst:1207 +#: howto/descriptor.rst:1225 msgid "f(obj, \\*args)" msgstr "f(obj, \\*args)" -#: howto/descriptor.rst:1209 +#: howto/descriptor.rst:1227 msgid "f(\\*args)" msgstr "f(\\*args)" -#: howto/descriptor.rst:1209 +#: howto/descriptor.rst:1227 msgid "staticmethod" msgstr "méthode statique" -#: howto/descriptor.rst:1211 +#: howto/descriptor.rst:1229 msgid "classmethod" msgstr "méthode de classe" -#: howto/descriptor.rst:1211 +#: howto/descriptor.rst:1229 msgid "f(type(obj), \\*args)" msgstr "f(type(obj), \\*args)" -#: howto/descriptor.rst:1211 +#: howto/descriptor.rst:1229 msgid "f(cls, \\*args)" msgstr "f(cls, \\*args)" -#: howto/descriptor.rst:1216 -#, fuzzy +#: howto/descriptor.rst:1234 msgid "Static methods" -msgstr "méthode statique" +msgstr "Méthodes statiques" -#: howto/descriptor.rst:1218 +#: 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." @@ -1046,7 +1209,7 @@ msgstr "" "__getattribute__(C, \"f\")``. Par conséquent, la fonction devient accessible " "de manière identique à partir d'un objet ou d'une classe." -#: howto/descriptor.rst:1224 +#: howto/descriptor.rst:1242 msgid "" "Good candidates for static methods are methods that do not reference the " "``self`` variable." @@ -1054,7 +1217,7 @@ msgstr "" "Les bonnes candidates pour être méthode statique sont des méthodes qui ne " "font pas référence à la variable ``self``." -#: howto/descriptor.rst:1227 +#: 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 " @@ -1076,42 +1239,37 @@ msgstr "" "appelée à partir d'un objet ou de la classe : ``s.erf(1.5) --> .9332`` ou " "``Sample.erf(1.5) --> .9332``." -#: howto/descriptor.rst:1236 -#, fuzzy +#: howto/descriptor.rst:1254 msgid "" "Since static methods return the underlying function with no changes, the " "example calls are unexciting:" msgstr "" -"Depuis que les méthodes statiques renvoient la fonction sous-jacente sans " -"changement, les exemples d’appels ne sont pas excitants ::" +"Puisque les méthodes statiques renvoient la fonction sous-jacente sans " +"changement, les exemples d’appels sont d'une grande banalité ::" -#: howto/descriptor.rst:1253 -#, fuzzy +#: 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 *non-data*, une version Python pure " -"de :func:`staticmethod` ressemblerait à ceci ::" +"En utilisant le protocole de descripteur hors-données, une version Python " +"pure de :func:`staticmethod` ressemblerait à ceci ::" -#: howto/descriptor.rst:1292 -#, fuzzy +#: howto/descriptor.rst:1310 msgid "Class methods" -msgstr "méthode de classe" +msgstr "Méthodes de classe" -#: howto/descriptor.rst:1294 -#, fuzzy +#: 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 préchargent la " -"référence de classe dans la liste d'arguments avant d'appeler la fonction. " -"Ce format est le même que l'appelant soit un objet ou une classe ::" +"Contrairement aux méthodes statiques, les méthodes de classe ajoutent la " +"référence de classe en tête de la liste d'arguments, avant d'appeler la " +"fonction. C'est le même format que l'appelant soit un objet ou une classe ::" -#: howto/descriptor.rst:1312 -#, fuzzy +#: 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 " @@ -1120,29 +1278,27 @@ msgid "" "of keys. The pure Python equivalent is:" msgstr "" "Ce comportement est utile lorsque la fonction n'a besoin que d'une référence " -"de classe et ne se soucie pas des données sous-jacentes. Une des " -"utilisations des méthodes de classe est de créer d'autres constructeurs de " -"classe. En Python 2.3, la méthode de classe :func:`dict.fromkeys` crée un " -"nouveau dictionnaire à partir d'une liste de clés. L'équivalent Python pur " -"est ::" +"de classe et ne se soucie pas des données propres à une instance " +"particulière. Une des utilisations des méthodes de classe est de créer des " +"constructeurs de classe personnalisés. Par exemple, la méthode de classe :" +"func:`dict.fromkeys` crée un nouveau dictionnaire à partir d'une liste de " +"clés. L'équivalent Python pur est ::" -#: howto/descriptor.rst:1329 -#, fuzzy +#: 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 ::" +"ceci :" -#: howto/descriptor.rst:1339 -#, fuzzy +#: 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 *non-data*, une version Python pure " -"de :func:`classmethod` ressemblerait à ceci ::" +"En utilisant le protocole de descripteur hors-données, une version Python " +"pure de :func:`classmethod` ressemblerait à ceci :" -#: howto/descriptor.rst:1388 +#: 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 " @@ -1150,50 +1306,68 @@ msgid "" "together:" msgstr "" -#: howto/descriptor.rst:1408 +#: howto/descriptor.rst:1426 msgid "Member objects and __slots__" -msgstr "" +msgstr "Objets membres et *__slots__*" -#: howto/descriptor.rst:1410 +#: 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:1414 +#: 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:1430 +#: 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:1465 +#: 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:1470 +#: 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:1473 +#: 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:1495 +#: 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 " @@ -1202,40 +1376,59 @@ msgid "" "``_slotvalues`` list. Reads and writes to that private structure are " "managed by member descriptors:" msgstr "" +"Il n'est pas possible de créer une version Python pure exacte de " +"``__slots__`` car il faut un accès direct aux structures C et un contrôle " +"sur l'allocation de la mémoire des objets. Cependant, nous pouvons " +"construire une simulation presque fidèle où la structure C réelle pour les " +"*slots* est émulée par une liste privée ``_slotvalues``. Les lectures et " +"écritures dans cette structure privée sont gérées par des descripteurs de " +"membres :" -#: howto/descriptor.rst:1538 +#: 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:1554 +#: 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:1589 +#: 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:1603 +#: 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:1624 +#: 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:1636 +#: 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 " diff --git a/howto/functional.po b/howto/functional.po index 7a6a28a7a4..161ac12dcd 100644 --- a/howto/functional.po +++ b/howto/functional.po @@ -5,15 +5,15 @@ 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-11 16:17+0100\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\n" +"X-Generator: Poedit 3.0.1\n" #: howto/functional.rst:3 msgid "Functional Programming HOWTO" @@ -515,8 +515,8 @@ msgstr "" #: howto/functional.rst:246 msgid "" "Built-in functions such as :func:`max` and :func:`min` can take a single " -"iterator argument and will return the largest or smallest element. The ``" -"\"in\"`` and ``\"not in\"`` operators also support iterators: ``X in " +"iterator argument and will return the largest or smallest element. The " +"``\"in\"`` and ``\"not in\"`` operators also support iterators: ``X in " "iterator`` is true if X is found in the stream returned by the iterator. " "You'll run into obvious problems if the iterator is infinite; :func:`max`, :" "func:`min` will never return, and if the element X never appears in the " @@ -528,8 +528,8 @@ msgstr "" "itérateurs : ``X in iterator`` est vrai si X a été trouvé dans le flux " "renvoyé par l'itérateur. Vous rencontrerez bien sûr des problèmes si " "l'itérateur est infini : :func:`max`, :func:`min` ne termineront jamais et, " -"si l'élément X n'apparaît pas dans le flux, les opérateurs ``\"in\"`` et ``" -"\"not in\"`` non plus." +"si l'élément X n'apparaît pas dans le flux, les opérateurs ``\"in\"`` et " +"``\"not in\"`` non plus." #: howto/functional.rst:254 msgid "" @@ -623,11 +623,11 @@ msgstr "" "Les ensembles peuvent être créés à partir d'un itérable et autorisent " "l'itération sur les éléments de l'ensemble ::" -#: howto/functional.rst:325 +#: howto/functional.rst:331 msgid "Generator expressions and list comprehensions" msgstr "Expressions génératrices et compréhension de listes" -#: howto/functional.rst:327 +#: 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 " @@ -642,7 +642,7 @@ msgstr "" "caractères blancs à la fin de chaque ligne ou extraire toutes les chaînes " "contenant une sous-chaîne précise." -#: howto/functional.rst:333 +#: 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 " @@ -655,14 +655,14 @@ msgstr "" "retirer tous les caractères blancs initiaux et finaux d'un flux de chaînes " "de caractères à l'aide du code suivant ::" -#: howto/functional.rst:346 +#: 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:351 +#: 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 " @@ -680,7 +680,7 @@ msgstr "" "sur des itérateurs infinis ou produisant une très grande quantité de " "données. Les expressions génératrices sont préférables dans ce cas." -#: howto/functional.rst:358 +#: howto/functional.rst:364 msgid "" "Generator expressions are surrounded by parentheses (\"()\") and list " "comprehensions are surrounded by square brackets (\"[]\"). Generator " @@ -690,7 +690,7 @@ msgstr "" "compréhensions de listes entre crochets (« [] »). Les expressions " "génératrices sont de la forme ::" -#: howto/functional.rst:371 +#: howto/functional.rst:378 msgid "" "Again, for a list comprehension only the outside brackets are different " "(square brackets instead of parentheses)." @@ -698,7 +698,7 @@ msgstr "" "La compréhension de liste équivalente s'écrit de la même manière, utilisez " "juste des crochets à la place des parenthèses." -#: howto/functional.rst:374 +#: 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, " @@ -709,7 +709,7 @@ msgstr "" "clause ``if`` est facultative ; si elle est présente, ``expression`` n'est " "évaluée et ajoutée au résultat que si ``condition`` est vérifiée." -#: howto/functional.rst:378 +#: 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 " @@ -720,7 +720,7 @@ msgstr "" "comptent aussi. Si vous souhaitez créer un itérateur qui soit immédiatement " "passé à une fonction, vous pouvez écrire ::" -#: howto/functional.rst:384 +#: 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 " @@ -736,7 +736,7 @@ msgstr "" "parcourue dans son intégralité pour chaque paire d'éléments de ``sequence1`` " "et ``sequence2``." -#: howto/functional.rst:390 +#: howto/functional.rst:397 msgid "" "To put it another way, a list comprehension or generator expression is " "equivalent to the following Python code::" @@ -744,7 +744,7 @@ msgstr "" "Autrement dit, une compréhension de liste ou une expression génératrice est " "équivalente au code Python ci-dessous ::" -#: howto/functional.rst:407 +#: 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 " @@ -756,7 +756,7 @@ msgstr "" "produit des longueurs des séquences itérées. Si vous travaillez sur deux " "listes de longueur 3, la sortie contiendra 9 éléments :" -#: howto/functional.rst:419 +#: 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 " @@ -767,11 +767,11 @@ msgstr "" "uplet. La première compréhension de liste ci-dessous n'est pas valide " "syntaxiquement, tandis que la seconde l'est ::" -#: howto/functional.rst:430 +#: howto/functional.rst:437 msgid "Generators" msgstr "Générateurs" -#: howto/functional.rst:432 +#: 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 " @@ -782,7 +782,7 @@ msgstr "" "renvoie, tandis que les générateurs renvoient un itérateur qui produit un " "flux de valeurs." -#: howto/functional.rst:436 +#: 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 " @@ -807,11 +807,11 @@ msgstr "" "s'agit de fonctions qu'il est possible d'interrompre, puis de relancer sans " "perdre leur progression." -#: howto/functional.rst:445 +#: 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:451 +#: 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 " @@ -821,7 +821,7 @@ msgstr "" "générateur ; le compilateur :term:`bytecode` de Python détecte ce mot-clé et " "prend en compte cette particularité de la fonction." -#: howto/functional.rst:455 +#: 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. " @@ -841,11 +841,11 @@ msgstr "" "locales sont conservées. Lors de l'appel suivant à la méthode :meth:" "`~generator.__next__` du générateur, la fonction reprend son exécution." -#: howto/functional.rst:464 +#: 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:481 +#: howto/functional.rst:488 msgid "" "You could equally write ``for i in generate_ints(5)``, or ``a, b, c = " "generate_ints(3)``." @@ -853,7 +853,7 @@ msgstr "" "Vous pourriez de façon équivalente écrire ``for i in generate_ints(5)`` ou " "``a, b, c = generate_ints(3)``." -#: howto/functional.rst:484 +#: howto/functional.rst:491 msgid "" "Inside a generator function, ``return value`` causes " "``StopIteration(value)`` to be raised from the :meth:`~generator.__next__` " @@ -866,7 +866,7 @@ msgstr "" "est atteinte), le flot de nouvelles valeurs s'arrête et le générateur ne " "peut plus rien produire." -#: howto/functional.rst:489 +#: 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 " @@ -883,7 +883,7 @@ msgstr "" "le renvoie. Cependant, cela devient beaucoup plus complexe pour des " "générateurs relativement sophistiqués." -#: howto/functional.rst:497 +#: 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 " @@ -895,7 +895,7 @@ msgstr "" "implémente le parcours d'un arbre dans l'ordre en utilisant des générateurs " "de façon récursive. ::" -#: howto/functional.rst:513 +#: 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 " @@ -910,11 +910,11 @@ msgstr "" "de visiter toutes les cases d'un échiquier *NxN* sans jamais visiter la même " "case deux fois)." -#: howto/functional.rst:521 +#: howto/functional.rst:528 msgid "Passing values into a generator" msgstr "Transmettre des valeurs au générateur" -#: howto/functional.rst:523 +#: 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 " @@ -930,7 +930,7 @@ msgstr "" "générateur à consulter des variables globales ou en lui passant des objets " "mutables modifiés hors du générateur, mais ces approches étaient compliquées." -#: howto/functional.rst:530 +#: 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 " @@ -941,7 +941,7 @@ msgstr "" "expression qui renvoie une valeur sur laquelle il est possible d'opérer et " "que vous pouvez assigner à une variable ::" -#: howto/functional.rst:536 +#: 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 " @@ -955,7 +955,7 @@ msgstr "" "systématiquement que de prendre le risque de les oublier là où elles sont " "requises." -#: howto/functional.rst:541 +#: 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 " @@ -969,7 +969,7 @@ msgstr "" "que vous pouvez écrire ``val = yield i`` mais que les parenthèses sont " "requises s'il y a une opération, comme dans ``val = (yield i) + 12``.)" -#: howto/functional.rst:547 +#: 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 " @@ -982,7 +982,7 @@ msgstr "" "la méthode :meth:`~generator.__next__` habituelle qui est appelée, alors " "``yield`` renvoie ``None``." -#: howto/functional.rst:552 +#: howto/functional.rst:559 msgid "" "Here's a simple counter that increments by 1 and allows changing the value " "of the internal counter." @@ -990,11 +990,11 @@ msgstr "" "Voici un exemple de compteur qui s'incrémente de 1 mais dont il est possible " "de modifier le compte interne." -#: howto/functional.rst:567 +#: 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:584 +#: 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 " @@ -1006,7 +1006,7 @@ msgstr "" "seule la méthode :meth:`~generator.send` sera utilisée pour reprendre " "l'exécution de la fonction génératrice." -#: howto/functional.rst:589 +#: howto/functional.rst:596 msgid "" "In addition to :meth:`~generator.send`, there are two other methods on " "generators:" @@ -1015,17 +1015,17 @@ msgstr "" "s'appliquant aux générateurs :" # Énumération -#: howto/functional.rst:592 +#: howto/functional.rst:599 msgid "" -":meth:`throw(type, value=None, traceback=None) ` is used to " -"raise an exception inside the generator; the exception is raised by the " -"``yield`` expression where the generator's execution is paused." +":meth:`throw(value) ` is used to raise an exception inside " +"the generator; the exception is raised by the ``yield`` expression where the " +"generator's execution is paused." msgstr "" -":meth:`throw(type, value=None, traceback=None) ` permet de " -"lever une exception dans le générateur ; celle-ci est levée par l'expression " -"``yield`` à l'endroit où l'exécution a été mise en pause ;" +":meth:`throw(value) ` permet de lever une exception dans le " +"générateur ; celle-ci est levée par l'expression ``yield`` à l'endroit où " +"l'exécution a été mise en pause." -#: howto/functional.rst:596 +#: 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 " @@ -1043,7 +1043,7 @@ msgstr "" "le ramasse-miette de Python collecte le générateur, il appelle sa méthode :" "meth:`~generator.close`." -#: howto/functional.rst:604 +#: 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:" @@ -1053,7 +1053,7 @@ msgstr "" "`GeneratorExit`, nous vous suggérons d'utiliser une structure ``try: ... " "finally`` plutôt que d'attraper :exc:`GeneratorExit`." -#: howto/functional.rst:607 +#: 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." @@ -1062,7 +1062,7 @@ msgstr "" "unidirectionnels d'information vers un statut hybride à la fois producteur " "et consommateur." -#: howto/functional.rst:610 +#: 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 " @@ -1077,18 +1077,18 @@ msgstr "" "de reprendre une coroutine à différents endroits (les instructions " "``yield``)." -#: howto/functional.rst:617 +#: howto/functional.rst:624 msgid "Built-in functions" msgstr "Fonctions natives" -#: howto/functional.rst:619 +#: 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:621 +#: howto/functional.rst:628 msgid "" "Two of Python's built-in functions, :func:`map` and :func:`filter` duplicate " "the features of generator expressions:" @@ -1096,25 +1096,25 @@ msgstr "" ":func:`map` et :func:`filter` sont deux fonctions natives de Python qui " "clonent les propriétés des expressions génératrices :" -#: howto/functional.rst:633 +#: 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:625 +#: 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:635 +#: 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:637 +#: 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 " @@ -1129,11 +1129,11 @@ msgstr "" "certaine condition. Dans le cas de :func:`filter`, le prédicat ne doit " "prendre qu'un seul argument." -#: howto/functional.rst:650 +#: 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:656 +#: 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 " @@ -1143,7 +1143,7 @@ msgstr "" "l'itérable en renvoyant des paires contenant le nombre d'éléments déjà " "listés (depuis le *début*) et l'élément en cours ::" -#: howto/functional.rst:666 +#: 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::" @@ -1152,7 +1152,7 @@ msgstr "" "liste tout en listant les indices pour lesquels une certaine condition est " "vérifiée ::" -#: howto/functional.rst:674 +#: 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 " @@ -1164,14 +1164,14 @@ msgstr "" "classé. Les arguments *key* et *reverse* sont passés à la méthode :meth:" "`~list.sort` de la liste ainsi construite. ::" -#: howto/functional.rst:689 +#: 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:692 +#: 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 " @@ -1184,7 +1184,7 @@ msgstr "" "comme vrai et :func:`all` renvoie ``True`` si tous les éléments s'évaluent " "comme vrai :" -#: howto/functional.rst:711 +#: howto/functional.rst:718 msgid "" ":func:`zip(iterA, iterB, ...) ` takes one element from each iterable " "and returns them in a tuple::" @@ -1192,7 +1192,7 @@ msgstr "" ":func:`zip(iterA, iterB, ...) ` rassemble un élément de chaque itérable " "dans un *n*-uplet ::" -#: howto/functional.rst:717 +#: 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 " @@ -1205,7 +1205,7 @@ msgstr "" "d'un comportement d'`évaluation paresseuse `__)." -#: howto/functional.rst:722 +#: 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 " @@ -1215,7 +1215,7 @@ msgstr "" "longueur des itérables diffère, le flux résultant a la même longueur que le " "plus court des itérables. ::" -#: howto/functional.rst:729 +#: 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 " @@ -1227,13 +1227,14 @@ msgstr "" "plus utiliser cet itérable car vous allez sauter l'élément qui vient d'être " "jeté." -#: howto/functional.rst:735 +#: howto/functional.rst:742 msgid "The itertools module" msgstr "Le module *itertools*" -#: howto/functional.rst:737 +#: howto/functional.rst:744 +#, fuzzy msgid "" -"The :mod:`itertools` module contains a number of commonly-used iterators as " +"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 "" @@ -1241,40 +1242,40 @@ msgstr "" "ainsi que des fonctions pour combiner différents itérateurs. Cette section " "présente le contenu du module au travers de quelques exemples." -#: howto/functional.rst:741 +#: 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:743 +#: 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:744 +#: 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:745 +#: 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:746 +#: 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:749 +#: howto/functional.rst:756 msgid "Creating new iterators" msgstr "Créer de nouveaux itérateurs" -#: howto/functional.rst:751 +#: howto/functional.rst:758 msgid "" ":func:`itertools.count(start, step) ` returns an infinite " "stream of evenly spaced values. You can optionally supply the starting " @@ -1285,7 +1286,7 @@ msgstr "" "infini de valeurs régulièrement espacées. Vous pouvez spécifier la valeur de " "départ (par défaut, 0) et l'intervalle entre les nombres (par défaut, 1) ::" -#: howto/functional.rst:762 +#: 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 " @@ -1296,7 +1297,7 @@ msgstr "" "contenu de l'itérable passé en argument et renvoie un nouvel itérateur qui " "produit tous les éléments du premier au dernier et se répète indéfiniment. ::" -#: howto/functional.rst:769 +#: 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 " @@ -1306,7 +1307,7 @@ msgstr "" "passé en argument *n* fois ou répète l'élément à l'infini si *n* n'est pas " "spécifié. ::" -#: howto/functional.rst:777 +#: 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 " @@ -1318,7 +1319,7 @@ msgstr "" "éléments du premier itérateur, puis tous ceux du second et ainsi de suite " "jusqu'à ce que tous les itérables aient été épuisés. ::" -#: howto/functional.rst:785 +#: 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* " @@ -1336,7 +1337,7 @@ msgstr "" "pour *start*, *stop* ou *step* (contrairement aux listes et chaînes de " "caractères de Python). ::" -#: howto/functional.rst:799 +#: 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 " @@ -1352,11 +1353,11 @@ msgstr "" "source, ce qui peut consommer beaucoup de mémoire si l'itérateur est grand " "et que l'un des nouveaux itérateurs est plus consommé que les autres. ::" -#: howto/functional.rst:818 +#: howto/functional.rst:825 msgid "Calling functions on elements" msgstr "Appliquer des fonctions au contenu des itérateurs" -#: howto/functional.rst:820 +#: 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) ` renvoie un objet appelable qui récupère l'attribut ``.id``." -#: howto/functional.rst:826 +#: 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 " @@ -1380,11 +1381,11 @@ msgstr "" "l'itérable renvoie une séquence de *n*-uplets et appelle *func* en utilisant " "tous les *n*-uplets comme arguments ::" -#: howto/functional.rst:838 +#: howto/functional.rst:845 msgid "Selecting elements" msgstr "Sélectionner des éléments" -#: howto/functional.rst:840 +#: howto/functional.rst:847 msgid "" "Another group of functions chooses a subset of an iterator's elements based " "on a predicate." @@ -1392,7 +1393,7 @@ msgstr "" "Une autre catégorie de fonctions est celle permettant de sélectionner un " "sous-ensemble des éléments de l'itérateur selon un prédicat donné." -#: howto/functional.rst:843 +#: howto/functional.rst:850 msgid "" ":func:`itertools.filterfalse(predicate, iter) ` is " "the opposite of :func:`filter`, returning all elements for which the " @@ -1402,7 +1403,7 @@ msgstr "" "l'opposé de :func:`filter` et renvoie tous les éléments pour lesquels le " "prédicat est faux ::" -#: howto/functional.rst:850 +#: howto/functional.rst:857 msgid "" ":func:`itertools.takewhile(predicate, iter) ` returns " "elements for as long as the predicate returns true. Once the predicate " @@ -1412,7 +1413,7 @@ msgstr "" "les éléments de l'itérateur tant que ceux-ci vérifient le prédicat. Dès lors " "que le prédicat renvoie faux, l'itération s'arrête. ::" -#: howto/functional.rst:863 +#: howto/functional.rst:870 msgid "" ":func:`itertools.dropwhile(predicate, iter) ` discards " "elements while the predicate returns true, and then returns the rest of the " @@ -1422,7 +1423,7 @@ msgstr "" "des éléments tant que le prédicat renvoie vrai puis renvoie le reste des " "éléments de l'itérable. ::" -#: howto/functional.rst:873 +#: howto/functional.rst:880 msgid "" ":func:`itertools.compress(data, selectors) ` takes two " "iterators and returns only those elements of *data* for which the " @@ -1434,11 +1435,11 @@ msgstr "" "*data* pour lesquels l'élément correspondant de *selectors* est évalué à " "vrai. L'itération s'arrête lorsque l'un des deux itérateurs est épuisé ::" -#: howto/functional.rst:882 +#: howto/functional.rst:889 msgid "Combinatoric functions" msgstr "Fonctions combinatoires" -#: howto/functional.rst:884 +#: howto/functional.rst:891 msgid "" "The :func:`itertools.combinations(iterable, r) ` " "returns an iterator giving all possible *r*-tuple combinations of the " @@ -1448,7 +1449,7 @@ msgstr "" "un itérateur qui produit toutes les combinaisons possibles de *r*-uplets des " "éléments de *iterable*. ::" -#: howto/functional.rst:899 +#: 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 " @@ -1463,7 +1464,7 @@ msgstr "" "contrainte sur l'ordre et renvoie tous les arrangements possibles de " "longueur *r* ::" -#: howto/functional.rst:918 +#: 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." @@ -1472,7 +1473,7 @@ msgstr "" "utilisée par défaut, c'est-à-dire que toutes les permutations de la séquence " "sont renvoyées." -#: howto/functional.rst:921 +#: 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::" @@ -1481,7 +1482,7 @@ msgstr "" "basant sur la position des éléments et ne requièrent pas que les éléments de " "*iterable* soient uniques ::" -#: howto/functional.rst:928 +#: howto/functional.rst:935 msgid "" "The identical tuple ``('a', 'a', 'b')`` occurs twice, but the two 'a' " "strings came from different positions." @@ -1489,7 +1490,7 @@ msgstr "" "Le triplet ``('a', 'a', 'b')`` apparaît deux fois mais les deux chaînes de " "caractères ``'a'`` proviennent de deux positions différentes." -#: howto/functional.rst:931 +#: howto/functional.rst:938 msgid "" "The :func:`itertools.combinations_with_replacement(iterable, r) ` function relaxes a different constraint: " @@ -1503,11 +1504,11 @@ msgstr "" "tirage avec remise : le premier élément sélectionné pour chaque *n*-uplet " "est replacé dans la séquence avant le tirage du deuxième. ::" -#: howto/functional.rst:946 +#: howto/functional.rst:953 msgid "Grouping elements" msgstr "Grouper les éléments" -#: howto/functional.rst:948 +#: howto/functional.rst:955 msgid "" "The last function I'll discuss, :func:`itertools.groupby(iter, " "key_func=None) `, is the most complicated. " @@ -1522,7 +1523,7 @@ msgstr "" "l'identité par défaut (c'est-à-dire que la clé d'un élément est l'élément " "lui-même)." -#: howto/functional.rst:953 +#: 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-" @@ -1532,7 +1533,7 @@ msgstr "" "sous-jacent qui ont la même clé et renvoie un flux de paires contenant la " "clé et un itérateur produisant la liste des éléments pour cette clé." -#: howto/functional.rst:981 +#: 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 " @@ -1547,11 +1548,11 @@ msgstr "" "itérateur (*iterator-2* dans l'exemple ci-dessus) et la clé à laquelle il " "est associé." -#: howto/functional.rst:988 +#: howto/functional.rst:995 msgid "The functools module" msgstr "Le module *functools*" -#: howto/functional.rst:990 +#: 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 " @@ -1563,7 +1564,7 @@ msgstr "" "plusieurs fonctions en entrée et renvoie une fonction. L'outil le plus " "important de ce module est la fonction :func:`functools.partial`." -#: howto/functional.rst:995 +#: 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 " @@ -1579,7 +1580,7 @@ msgstr "" "b, c)``, c'est-à-dire fixer le premier paramètre de ``f()``. La fonction " "``g()`` est une appelée « application partielle » de ``f()``." -#: howto/functional.rst:1001 +#: howto/functional.rst:1008 msgid "" "The constructor for :func:`~functools.partial` takes the arguments " "``(function, arg1, arg2, ..., kwarg1=value1, kwarg2=value2)``. The " @@ -1590,11 +1591,11 @@ msgstr "" "arg1, arg2, ..., kwarg1=value1, kwarg2=value2, ...)``. Un appel à l'objet " "ainsi créé invoque la fonction ``fonction`` avec les arguments spécifiés." -#: howto/functional.rst:1006 +#: howto/functional.rst:1013 msgid "Here's a small but realistic example::" msgstr "Voici un exemple court mais réaliste ::" -#: howto/functional.rst:1018 +#: howto/functional.rst:1025 msgid "" ":func:`functools.reduce(func, iter, [initial_value]) ` " "cumulatively performs an operation on all the iterable's elements and, " @@ -1620,7 +1621,7 @@ msgstr "" "La valeur initiale *initial_value*, si spécifiée, est utilisée comme point " "de départ et le premier calcul est alors ``func(inital_value, A)``. ::" -#: howto/functional.rst:1042 +#: 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 " @@ -1631,7 +1632,7 @@ msgstr "" "courant pour qu'il existe une fonction native :func:`sum` qui lui est " "équivalent :" -#: howto/functional.rst:1054 +#: 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::" @@ -1640,7 +1641,7 @@ msgstr "" "impliquant :func:`functools.reduce` de simplement écrire la boucle :keyword:" "`for` ::" -#: howto/functional.rst:1066 +#: howto/functional.rst:1073 msgid "" "A related function is :func:`itertools.accumulate(iterable, func=operator." "add) `. It performs the same calculation, but instead " @@ -1653,11 +1654,11 @@ msgstr "" "renvoie un itérateur qui génère la séquence de tous les résultats " "intermédiaires ::" -#: howto/functional.rst:1079 +#: howto/functional.rst:1086 msgid "The operator module" msgstr "Le module *operator*" -#: howto/functional.rst:1081 +#: 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 " @@ -1669,12 +1670,12 @@ msgstr "" "utiles en programmation fonctionnelle car elles permettent de ne pas avoir à " "écrire des fonctions triviales qui ne réalisent qu'une seule opération." -#: howto/functional.rst:1086 +#: 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:1088 +#: howto/functional.rst:1095 msgid "" "Math operations: ``add()``, ``sub()``, ``mul()``, ``floordiv()``, " "``abs()``, ..." @@ -1683,17 +1684,17 @@ msgstr "" "``floordiv()``, ``abs()``… ;" # Énumération -#: howto/functional.rst:1089 +#: howto/functional.rst:1096 msgid "Logical operations: ``not_()``, ``truth()``." msgstr "les opérations logiques : ``not_()``, ``truth()`` ;" # Énumération -#: howto/functional.rst:1090 +#: howto/functional.rst:1097 msgid "Bitwise operations: ``and_()``, ``or_()``, ``invert()``." msgstr "les opérations bit à bit : ``and_()``, ``or_()``, ``invert()`` ;" # Énumération -#: howto/functional.rst:1091 +#: howto/functional.rst:1098 msgid "" "Comparisons: ``eq()``, ``ne()``, ``lt()``, ``le()``, ``gt()``, and ``ge()``." msgstr "" @@ -1701,21 +1702,21 @@ msgstr "" "``ge()`` ;" # Énumération -#: howto/functional.rst:1092 +#: howto/functional.rst:1099 msgid "Object identity: ``is_()``, ``is_not()``." msgstr "l'identification des objets : ``is_()``, ``is_not()``." -#: howto/functional.rst:1094 +#: 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:1098 +#: howto/functional.rst:1105 msgid "Small functions and the lambda expression" msgstr "Expressions lambda et fonctions courtes" -#: howto/functional.rst:1100 +#: 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." @@ -1724,7 +1725,7 @@ msgstr "" "petites fonctions utilisées comme prédicats ou pour combiner des éléments " "d'une façon ou d'une autre." -#: howto/functional.rst:1103 +#: 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::" @@ -1732,7 +1733,7 @@ msgstr "" "S'il existe une fonction native Python ou une fonction d'un module qui " "convient, vous n'avez pas besoin de définir de nouvelle fonction ::" -#: howto/functional.rst:1109 +#: 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. " @@ -1746,7 +1747,7 @@ msgstr "" "combinant ces derniers afin de créer une fonction anonyme qui renvoie la " "valeur de cette expression ::" -#: howto/functional.rst:1118 +#: howto/functional.rst:1125 msgid "" "An alternative is to just use the ``def`` statement and define a function in " "the usual way::" @@ -1754,7 +1755,7 @@ msgstr "" "Une autre façon de faire est de simplement utiliser l'instruction ``def`` " "afin de définir une fonction de la manière habituelle ::" -#: howto/functional.rst:1127 +#: howto/functional.rst:1134 msgid "" "Which alternative is preferable? That's a style question; my usual course " "is to avoid using ``lambda``." @@ -1762,7 +1763,7 @@ msgstr "" "La méthode à préférer est une question de style, en général l'auteur évite " "l'utilisation de ``lambda``." -#: howto/functional.rst:1130 +#: 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 " @@ -1779,7 +1780,7 @@ msgstr "" "une expression illisible. Par exemple, pouvez-vous dire du premier coup " "d’œil ce que fait le code ci-dessous ? ::" -#: howto/functional.rst:1140 +#: 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 " @@ -1789,18 +1790,18 @@ msgstr "" "de démêler l'expression pour y voir plus clair. Une clause ``def`` concise " "améliore la situation ::" -#: howto/functional.rst:1150 +#: 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:1156 +#: 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:1160 +#: howto/functional.rst:1167 msgid "" "Many uses of :func:`functools.reduce` are clearer when written as ``for`` " "loops." @@ -1808,7 +1809,7 @@ msgstr "" "Les boucles ``for`` sont souvent plus lisibles que la fonction :func:" "`functools.reduce`." -#: howto/functional.rst:1162 +#: howto/functional.rst:1169 msgid "" "Fredrik Lundh once suggested the following set of rules for refactoring uses " "of ``lambda``:" @@ -1816,16 +1817,16 @@ msgstr "" "Frederik Lundh a suggéré quelques règles pour le réusinage de code " "impliquant les expressions ``lambda`` :" -#: howto/functional.rst:1165 +#: howto/functional.rst:1172 msgid "Write a lambda function." msgstr "Écrire une fonction lambda." -#: howto/functional.rst:1166 +#: 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:1167 +#: howto/functional.rst:1174 msgid "" "Study the comment for a while, and think of a name that captures the essence " "of the comment." @@ -1833,16 +1834,16 @@ msgstr "" "Scruter le commentaire pendant quelques temps et réfléchir à un nom qui " "synthétise son essence." -#: howto/functional.rst:1169 +#: 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:1170 +#: howto/functional.rst:1177 msgid "Remove the comment." msgstr "Effacer le commentaire." -#: howto/functional.rst:1172 +#: howto/functional.rst:1179 msgid "" "I really like these rules, but you're free to disagree about whether this " "lambda-free style is better." @@ -1850,11 +1851,11 @@ msgstr "" "J'aime beaucoup ces règles, mais vous êtes libre de ne pas être d'accord et " "de préférer un style avec des lambdas." -#: howto/functional.rst:1177 +#: howto/functional.rst:1184 msgid "Revision History and Acknowledgements" msgstr "Historique des modifications et remerciements" -#: howto/functional.rst:1179 +#: 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: " @@ -1867,17 +1868,17 @@ msgstr "" "Jewett, Mike Krell, Leandro Lameiro, Jussi Salmela, Collin Winter, Blake " "Winton." -#: howto/functional.rst:1184 +#: 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:1186 +#: 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:1188 +#: howto/functional.rst:1195 msgid "" "Version 0.2: posted July 10 2006. Merged genexp and listcomp sections into " "one. Typo fixes." @@ -1885,14 +1886,14 @@ msgstr "" "Version 0.2 : publiée le 10 juillet 2006. Fusion des sections *genexp* et " "*listcomp*. Correction orthographique." -#: howto/functional.rst:1191 +#: 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:1193 +#: 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." @@ -1901,15 +1902,15 @@ msgstr "" "Collin Winter ; ajout d'une courte section sur le module ``operator`` ; " "quelques autres modifications." -#: howto/functional.rst:1198 +#: howto/functional.rst:1205 msgid "References" msgstr "Références" -#: howto/functional.rst:1201 +#: howto/functional.rst:1208 msgid "General" msgstr "Général" -#: howto/functional.rst:1203 +#: 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." @@ -1927,9 +1928,10 @@ msgstr "" "utilisent le langage Scheme mais la plupart des approches décrites dans ces " "chapitres s'appliquent au style fonctionnel de Python." -#: howto/functional.rst:1211 +#: howto/functional.rst:1218 +#, fuzzy msgid "" -"http://www.defmacro.org/ramblings/fp.html: A general introduction to " +"https://www.defmacro.org/ramblings/fp.html: A general introduction to " "functional programming that uses Java examples and has a lengthy historical " "introduction." msgstr "" @@ -1937,7 +1939,7 @@ msgstr "" "programmation fonctionnelle avec une longue introduction historique et des " "exemples en Java." -#: howto/functional.rst:1214 +#: howto/functional.rst:1221 msgid "" "https://en.wikipedia.org/wiki/Functional_programming: General Wikipedia " "entry describing functional programming." @@ -1945,25 +1947,26 @@ msgstr "" "https://fr.wikipedia.org/wiki/Programmation_fonctionnelle : l'entrée " "Wikipédia qui décrit la programmation fonctionnelle." -#: howto/functional.rst:1217 +#: howto/functional.rst:1224 msgid "https://en.wikipedia.org/wiki/Coroutine: Entry for coroutines." msgstr "" "https://fr.wikipedia.org/wiki/Coroutine : l'entrée pour les coroutines." -#: howto/functional.rst:1219 +#: howto/functional.rst:1226 msgid "" "https://en.wikipedia.org/wiki/Currying: Entry for the concept of currying." msgstr "" "https://fr.wikipedia.org/wiki/Curryfication : l'entrée pour le concept de " "curryfication (création d'applications partielles)." -#: howto/functional.rst:1222 +#: howto/functional.rst:1229 msgid "Python-specific" msgstr "Spécifique à Python" -#: howto/functional.rst:1224 +#: howto/functional.rst:1231 +#, fuzzy msgid "" -"http://gnosis.cx/TPiP/: The first chapter of David Mertz's book :title-" +"https://gnosis.cx/TPiP/: The first chapter of David Mertz'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\"." @@ -1973,7 +1976,7 @@ msgstr "" "programmation fonctionnelle pour le traitement de texte dans la section " "« Utilisation des fonctions d'ordre supérieur pour le traitement de texte »." -#: howto/functional.rst:1229 +#: 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 `__ et `partie 3 `__," -#: howto/functional.rst:1237 +#: howto/functional.rst:1244 msgid "Python documentation" msgstr "Documentation Python" -#: howto/functional.rst:1239 +#: howto/functional.rst:1246 msgid "Documentation for the :mod:`itertools` module." msgstr "Documentation du module :mod:`itertools`." -#: howto/functional.rst:1241 +#: howto/functional.rst:1248 msgid "Documentation for the :mod:`functools` module." msgstr "Documentation du module :mod:`functools`." -#: howto/functional.rst:1243 +#: howto/functional.rst:1250 msgid "Documentation for the :mod:`operator` module." msgstr "Documentation du module :mod:`operator`." -#: howto/functional.rst:1245 +#: howto/functional.rst:1252 msgid ":pep:`289`: \"Generator Expressions\"" msgstr ":pep:`289`: *\"Generator Expressions\"*" -#: howto/functional.rst:1247 +#: howto/functional.rst:1254 msgid "" ":pep:`342`: \"Coroutines via Enhanced Generators\" describes the new " "generator features in Python 2.5." diff --git a/howto/instrumentation.po b/howto/instrumentation.po index 7b282cba08..b13774144a 100644 --- a/howto/instrumentation.po +++ b/howto/instrumentation.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-09-23 16:16+0200\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" @@ -141,9 +141,10 @@ msgstr "" "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 " +"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* " @@ -255,8 +256,8 @@ msgstr "" #: 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``:" +"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 " @@ -362,9 +363,9 @@ 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." +"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 " @@ -421,9 +422,10 @@ msgstr "" "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 " +"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 " diff --git a/howto/ipaddress.po b/howto/ipaddress.po index 2f43f75948..96116fd5d9 100644 --- a/howto/ipaddress.po +++ b/howto/ipaddress.po @@ -6,14 +6,14 @@ 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:19+0100\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 2.0.2\n" +"X-Generator: Poedit 3.0.1\n" #: howto/ipaddress.rst:9 msgid "An introduction to the ipaddress module" @@ -69,7 +69,6 @@ msgid "A Note on IP Versions" msgstr "Note sur les versions d'IP" #: howto/ipaddress.rst:34 -#, fuzzy 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 " @@ -80,10 +79,10 @@ msgid "" "internet." msgstr "" "Pour les lecteurs qui ne sont pas particulièrement familiers avec " -"l'adressage IP il est important de savoir que le protocole 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, " +"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." diff --git a/howto/logging-cookbook.po b/howto/logging-cookbook.po index 9d55bfd676..e9399c8f91 100644 --- a/howto/logging-cookbook.po +++ b/howto/logging-cookbook.po @@ -5,18 +5,19 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-12-31 11:33+0100\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \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 "" +msgstr "Recettes pour la journalisation" #: howto/logging-cookbook.rst:0 msgid "Author" @@ -29,14 +30,19 @@ 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." +"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:15 +#: howto/logging-cookbook.rst:16 msgid "Using logging in multiple modules" -msgstr "" +msgstr "Journalisation dans plusieurs modules" -#: howto/logging-cookbook.rst:17 +#: 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 " @@ -47,40 +53,54 @@ msgid "" "logger calls to the child will pass up to the parent. Here is a main " "module::" msgstr "" +"Deux appels à ``logging.getLogger('unLogger')`` renvoient toujours une " +"référence vers le même objet de journalisation. C'est valable à l'intérieur " +"d'un module, mais aussi dans des modules différents pour autant que ce soit " +"le même processus de l'interpréteur Python. En plus, le code d'une " +"application peut définir et configurer une journalisation parente dans un " +"module et créer (mais pas configurer) une journalisation fille dans un " +"module séparé. Les appels à la journalisation fille passeront alors à la " +"journalisation parente. Voici un module principal ::" -#: howto/logging-cookbook.rst:55 +#: howto/logging-cookbook.rst:56 msgid "Here is the auxiliary module::" -msgstr "" +msgstr "Voici un module auxiliaire ::" -#: howto/logging-cookbook.rst:75 +#: howto/logging-cookbook.rst:76 msgid "The output looks like this:" msgstr "La sortie ressemble à ceci ::" -#: howto/logging-cookbook.rst:101 +#: howto/logging-cookbook.rst:102 msgid "Logging from multiple threads" -msgstr "" +msgstr "Journalisation avec des fils d'exécution multiples" -#: howto/logging-cookbook.rst:103 +#: 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:132 +#: howto/logging-cookbook.rst:133 msgid "When run, the script should print something like the following:" -msgstr "" +msgstr "À l'exécution, le script doit afficher quelque chose comme ça ::" -#: howto/logging-cookbook.rst:154 +#: 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:158 +#: howto/logging-cookbook.rst:159 msgid "Multiple handlers and formatters" -msgstr "" +msgstr "Plusieurs gestionnaires et formateurs" -#: howto/logging-cookbook.rst:160 +#: 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. " @@ -91,15 +111,27 @@ msgid "" "slight modification to the previous simple module-based configuration " "example::" msgstr "" +"Les gestionnaires de journalisation sont des objets Python ordinaires. La " +"méthode :meth:`~Logger.addHandler` n'est pas limitée, en nombre minimum ou " +"maximum, en gestionnaires que vous pouvez ajouter. Parfois, il peut être " +"utile pour une application de journaliser tous les messages quels que soient " +"leurs niveaux vers un fichier texte, tout en journalisant les erreurs (et " +"plus grave) dans la console. Pour ce faire, configurez simplement les " +"gestionnaires de manière adéquate. Les appels de journalisation dans le code " +"de l'application resteront les mêmes. Voici une légère modification de " +"l'exemple précédent dans une configuration au niveau du module ::" -#: howto/logging-cookbook.rst:193 +#: 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:196 +#: 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 " @@ -110,12 +142,21 @@ msgid "" "to happen is to modify the severity level of the logger and/or handler to " "debug." msgstr "" - -#: howto/logging-cookbook.rst:207 +"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 "" +msgstr "Journalisation vers plusieurs destinations" -#: howto/logging-cookbook.rst:209 +#: 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 " @@ -123,54 +164,190 @@ msgid "" "console. Let's also assume that the file should contain timestamps, but the " "console messages should not. Here's how you can achieve this::" msgstr "" +"Supposons que vous souhaitiez journaliser dans la console et dans un fichier " +"avec différents formats de messages et avec différents critères. Supposons " +"que vous souhaitiez consigner les messages de niveau DEBUG et supérieur dans " +"le fichier, et les messages de niveau INFO et supérieur dans la console. " +"Supposons également que le fichier doive contenir des horodatages, mais pas " +"les messages de la console. Voici comment y parvenir ::" -#: howto/logging-cookbook.rst:247 +#: howto/logging-cookbook.rst:248 msgid "When you run this, on the console you will see" -msgstr "" +msgstr "Quand vous le lancez, vous devez voir" -#: howto/logging-cookbook.rst:256 +#: howto/logging-cookbook.rst:257 msgid "and in the file you will see something like" -msgstr "" +msgstr "et, dans le fichier, vous devez trouver" -#: howto/logging-cookbook.rst:266 +#: 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:269 +#: 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:274 -msgid "Configuration server example" +#: 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:276 +#: 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:307 +#: 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:330 +#: howto/logging-cookbook.rst:543 msgid "Dealing with handlers that block" -msgstr "" +msgstr "Utilisation de gestionnaires bloquants" -#: howto/logging-cookbook.rst:334 +#: 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:338 +#: 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 " @@ -180,8 +357,17 @@ msgid "" "which is too slow (and this query can be deep in the socket library code, " "below the Python layer, and outside your control)." msgstr "" +"Un gestionnaire classiquement lent est le :class:`SMTPHandler` : l'envoi d'e-" +"mails peut prendre beaucoup de temps, pour un certain nombre de raisons " +"indépendantes du développeur (par exemple, une infrastructure de messagerie " +"ou de réseau peu performante). Mais n'importe quel autre gestionnaire " +"utilisant le réseau ou presque peut aussi s'avérer bloquant : même une " +"simple opération :class:`SocketHandler` peut faire une requête DNS implicite " +"et être ainsi très lente (cette requête peut être enfouie profondément dans " +"le code de la bibliothèque d'accès réseau, sous la couche Python, et hors de " +"votre contrôle)." -#: howto/logging-cookbook.rst:346 +#: 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-" @@ -194,8 +380,20 @@ msgid "" "to attach only ``QueueHandlers`` to your loggers) for the benefit of other " "developers who will use your code." msgstr "" - -#: howto/logging-cookbook.rst:357 +"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:" @@ -205,8 +403,15 @@ msgid "" "matter). The ``LogRecords`` are removed from the queue and passed to the " "handlers for processing." msgstr "" +"La deuxième partie de la solution est la classe :class:`QueueListener`, " +"conçue comme l'homologue de :class:`QueueHandler`. Un :class:`QueueListener` " +"est très simple : vous lui passez une file d'attente et des gestionnaires, " +"et il lance un fil d'exécution interne qui scrute la file d'attente pour " +"récupérer les événements envoyés par les ``QueueHandlers`` (ou toute autre " +"source de ``LogRecords``, d'ailleurs). Les ``LogRecords`` sont supprimés de " +"la file d'attente et transmis aux gestionnaires pour traitement." -#: howto/logging-cookbook.rst:365 +#: 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 " @@ -214,16 +419,43 @@ msgid "" "handler classes, which would eat up one thread per handler for no particular " "benefit." msgstr "" +"L'avantage d'avoir une classe :class:`QueueListener` séparée est que vous " +"pouvez utiliser la même instance pour servir plusieurs ``QueueHandlers``. " +"Cela consomme moins de ressources que des instances de gestionnaires " +"réparties chacune dans un fil d'exécution séparé." -#: howto/logging-cookbook.rst:370 +#: 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:388 +#: howto/logging-cookbook.rst:601 msgid "which, when run, will produce:" -msgstr "" - -#: howto/logging-cookbook.rst:394 +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 " @@ -234,31 +466,47 @@ msgid "" "of each message with the handler's level, and only passes a message to a " "handler if it's appropriate to do so." msgstr "" +"Avant Python 3.5, la classe :class:`QueueListener` passait chaque message " +"reçu de la file d'attente à chaque gestionnaire avec lequel l'instance avait " +"été initialisée (on supposait que le filtrage de niveau était entièrement " +"effectué de l'autre côté, au niveau de l'alimentation de la file d'attente). " +"Depuis Python 3.5, le comportement peut être modifié en passant l'argument " +"par mot-clé ``respect_handler_level=True`` au constructeur. Dans ce cas, la " +"``QueueListener`` compare le niveau de chaque message avec le niveau défini " +"dans chaque gestionnaire et ne transmet le message que si c'est opportun." -#: howto/logging-cookbook.rst:407 +#: howto/logging-cookbook.rst:628 msgid "Sending and receiving logging events across a network" -msgstr "" +msgstr "Envoi et réception d'événements de journalisation à travers le réseau" -#: howto/logging-cookbook.rst:409 +#: 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:437 +#: 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:525 +#: 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:537 +#: 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 " @@ -266,26 +514,208 @@ msgid "" "implementing your alternative there, as well as adapting the above script to " "use your alternative serialization." msgstr "" +"Notez que ``pickle`` introduit des problèmes de sécurité dans certains " +"scénarios. Si vous êtes concerné, vous pouvez utiliser une sérialisation " +"alternative en surchargeant la méthode :meth:`~handlers.SocketHandler." +"makePickle` par votre propre implémentation, ainsi qu'en adaptant le script " +"ci-dessus pour utiliser votre sérialisation." -#: howto/logging-cookbook.rst:545 +#: 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:547 +#: 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: you will need to change the `/path/to/` parts in the Gist " -"to reflect the actual paths you want to use." +"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:558 -msgid "Adding contextual information to your logging output" +#: 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:560 +#: 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 " @@ -300,12 +730,28 @@ msgid "" "logging an application, it could be hard to manage if the number of :class:" "`Logger` instances becomes effectively unbounded." msgstr "" - -#: howto/logging-cookbook.rst:575 +"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:577 +#: 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. " @@ -315,8 +761,16 @@ msgid "" "signatures as their counterparts in :class:`Logger`, so you can use the two " "types of instances interchangeably." msgstr "" +"Un moyen simple de transmettre des informations contextuelles accompagnant " +"les informations de journalisation consiste à utiliser la classe :class:" +"`LoggerAdapter`. Cette classe est conçue pour ressembler à un :class:" +"`Logger`, de sorte que vous pouvez appeler :meth:`debug`, :meth:`info`, :" +"meth:`warning`, :meth:`error`, :meth:`exception`, :meth:`critical` et :meth:" +"`log`. Ces méthodes ont les mêmes signatures que leurs homologues dans :" +"class:`Logger`, vous pouvez donc utiliser les deux types d'instances de " +"manière interchangeable." -#: howto/logging-cookbook.rst:585 +#: 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 " @@ -326,8 +780,15 @@ msgid "" "contextual information in the delegated call. Here's a snippet from the code " "of :class:`LoggerAdapter`::" msgstr "" +"Lorsque vous créez une instance de :class:`LoggerAdapter`, vous lui " +"transmettez une instance de :class:`Logger` et un objet dictionnaire qui " +"contient vos informations contextuelles. Lorsque vous appelez l'une des " +"méthodes de journalisation sur une instance de :class:`LoggerAdapter`, elle " +"délègue l'appel à l'instance sous-jacente de :class:`Logger` transmise à son " +"constructeur et s'arrange pour intégrer les informations contextuelles dans " +"l'appel délégué. Voici un extrait du code de :class:`LoggerAdapter` ::" -#: howto/logging-cookbook.rst:601 +#: 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 " @@ -339,8 +800,17 @@ msgid "" "had passed an 'extra' keyword argument in the call to the adapter, it will " "be silently overwritten." msgstr "" +"Les informations contextuelles sont ajoutées dans la méthode :meth:" +"`~LoggerAdapter.process` de :class:`LoggerAdapter`. On lui passe le message " +"et les arguments par mot-clé de l'appel de journalisation, et elle en " +"renvoie des versions (potentiellement) modifiées à utiliser pour la " +"journalisation sous-jacente. L'implémentation par défaut de cette méthode " +"laisse le message seul, mais insère une clé ``extra`` dans l'argument par " +"mot-clé dont la valeur est l'objet dictionnaire passé au constructeur. Bien " +"sûr, si vous avez passé un argument par mot-clé ``extra`` dans l'appel à " +"l'adaptateur, il est écrasé silencieusement." -#: howto/logging-cookbook.rst:610 +#: 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 " @@ -350,22 +820,35 @@ msgid "" "string, you just need to subclass :class:`LoggerAdapter` and override :meth:" "`~LoggerAdapter.process` to do what you need. Here is a simple example::" msgstr "" - -#: howto/logging-cookbook.rst:626 +"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 "" +msgstr "que vous pouvez utiliser comme ceci ::" -#: howto/logging-cookbook.rst:631 +#: 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:635 +#: 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:637 +#: 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 " @@ -373,12 +856,18 @@ msgid "" "if you want to generate values dynamically (whereas the values in a dict " "would be constant)." msgstr "" +"Il n'est pas obligatoire de passer un dictionnaire réel à un :class:" +"`LoggerAdapter`, vous pouvez passer une instance d'une classe qui implémente " +"``__getitem__`` et ``__iter__`` pour qu'il ressemble à un dictionnaire du " +"point de vue de la journalisation. C'est utile si vous souhaitez générer des " +"valeurs de manière dynamique (alors que les valeurs d'un dictionnaire " +"seraient constantes)." -#: howto/logging-cookbook.rst:646 +#: howto/logging-cookbook.rst:925 msgid "Using Filters to impart contextual information" -msgstr "" +msgstr "Utilisation de filtres pour transmettre des informations contextuelles" -#: howto/logging-cookbook.rst:648 +#: 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 " @@ -386,8 +875,14 @@ msgid "" "can then be output using a suitable format string, or if needed a custom :" "class:`Formatter`." msgstr "" +"Un :class:`Filter` défini par l'utilisateur peut aussi ajouter des " +"informations contextuelles à la journalisation. Les instances de ``Filter`` " +"sont autorisées à modifier les ``LogRecords`` qui leur sont transmis, y " +"compris par l'ajout d'attributs supplémentaires qui peuvent ensuite être " +"intégrés à la journalisation en utilisant une chaîne de formatage appropriée " +"ou, si nécessaire, un :class:`Formatter` personnalisé." -#: howto/logging-cookbook.rst:653 +#: 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:" @@ -398,16 +893,90 @@ msgid "" "format string can be used to get similar output to that shown above. Here's " "an example script::" msgstr "" - -#: howto/logging-cookbook.rst:699 +"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:720 -msgid "Logging to a single file from multiple processes" +#: 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:722 +#: 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 " @@ -422,8 +991,22 @@ msgid "" "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:735 +#: 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 " @@ -433,8 +1016,16 @@ msgid "" "`multiprocessing` module does not provide working lock functionality on all " "platforms (see https://bugs.python.org/issue3770)." msgstr "" +"Vous pouvez également écrire votre propre gestionnaire en utilisant la " +"classe :class:`~multiprocessing.Lock` du module :mod:`multiprocessing` pour " +"sérialiser l'accès au fichier depuis vos processus. Les actuels :class:" +"`FileHandler` et sous-classes n'utilisent pas :mod:`multiprocessing` pour le " +"moment, même s'ils pourraient le faire à l'avenir. Notez qu'à l'heure " +"actuelle, le module :mod:`multiprocessing` ne fournit pas un verrouillage " +"fonctionnel pour toutes les plates-formes (voir https://bugs.python.org/" +"issue3770)." -#: howto/logging-cookbook.rst:745 +#: 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 " @@ -448,14 +1039,28 @@ msgid "" "application, and can be used as the basis for code meeting your own specific " "requirements::" msgstr "" - -#: howto/logging-cookbook.rst:861 +"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:956 +#: 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 " @@ -464,35 +1069,49 @@ msgid "" "events are generated in the worker processes) to direct the messages to the " "appropriate destinations." msgstr "" +"Cette variante montre comment appliquer la configuration pour des " +"enregistreurs particuliers - par exemple l'enregistreur ``foo`` a un " +"gestionnaire spécial qui stocke tous les événements du sous-système ``foo`` " +"dans un fichier ``mplog-foo.log``. C'est utilisé par le mécanisme de " +"journalisation dans le processus principal (même si les événements de " +"journalisation sont générés dans les processus de travail) pour diriger les " +"messages vers les destinations appropriées." -#: howto/logging-cookbook.rst:963 +#: howto/logging-cookbook.rst:1490 msgid "Using concurrent.futures.ProcessPoolExecutor" -msgstr "" +msgstr "Utilisation de concurrent.futures.ProcessPoolExecutor" -#: howto/logging-cookbook.rst:965 +#: 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:973 +#: howto/logging-cookbook.rst:1500 msgid "you should use" -msgstr "" +msgstr "vous devez écrire" -#: howto/logging-cookbook.rst:979 +#: 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:990 +#: 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:997 +#: howto/logging-cookbook.rst:1524 msgid "Deploying Web applications using Gunicorn and uWSGI" -msgstr "" +msgstr "Déploiement d'applications Web avec *Gunicorn* et *uWSGI*" -#: howto/logging-cookbook.rst:999 +#: howto/logging-cookbook.rst:1526 msgid "" "When deploying Web applications using `Gunicorn `_ or " "`uWSGI `_ (or similar), " @@ -503,12 +1122,22 @@ msgid "" "process management tool such as Supervisor - see `Running a logging socket " "listener in production`_ for more details." msgstr "" - -#: howto/logging-cookbook.rst:1009 +"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 "" +msgstr "Utilisation du roulement de fichiers" -#: howto/logging-cookbook.rst:1014 +#: 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, " @@ -517,32 +1146,48 @@ msgid "" "usage pattern, the logging package provides a :class:`~handlers." "RotatingFileHandler`::" msgstr "" +"Parfois, vous souhaitez laisser un fichier de journalisation grossir jusqu'à " +"une certaine taille, puis ouvrir un nouveau fichier et vous y enregistrer " +"les nouveaux événements. Vous souhaitez peut-être conserver un certain " +"nombre de ces fichiers et, lorsque ce nombre de fichiers aura été créé, " +"faire rouler les fichiers afin que le nombre de fichiers et la taille des " +"fichiers restent tous deux limités. Pour ce cas d'usage, :class:`~handlers." +"RotatingFileHandler` est inclus dans le paquet de journalisation ::" -#: howto/logging-cookbook.rst:1046 +#: 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:1058 +#: 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:1063 +#: 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:1069 +#: howto/logging-cookbook.rst:1596 msgid "Use of alternative formatting styles" -msgstr "" +msgstr "Utilisation d'autres styles de formatage" -#: howto/logging-cookbook.rst:1071 +#: 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 " @@ -550,8 +1195,13 @@ msgid "" "`string.Template` (added in Python 2.4) and :meth:`str.format` (added in " "Python 2.6)." msgstr "" +"Lorsque la journalisation a été ajoutée à la bibliothèque standard Python, " +"la seule façon de formater les messages avec un contenu variable était " +"d'utiliser la méthode de formatage avec « % ». Depuis, Python s'est enrichi " +"de deux nouvelles méthode de formatage : :class:`string.Template` (ajouté " +"dans Python 2.4) et :meth:`str.format` (ajouté dans Python 2.6)." -#: howto/logging-cookbook.rst:1077 +#: 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 " @@ -563,15 +1213,30 @@ msgid "" "meth:`str.format` or :class:`string.Template`. Here's an example console " "session to show the possibilities:" msgstr "" +"La journalisation (à partir de la version 3.2) offre une meilleure prise en " +"charge de ces deux styles de formatage supplémentaires. La classe :class:" +"`Formatter` a été améliorée pour accepter un paramètre par mot-clé " +"facultatif supplémentaire nommé ``style``. La valeur par défaut est ``'%'``, " +"les autres valeurs possibles étant ``'{'`` et ``'$'``, qui correspondent aux " +"deux autres styles de formatage. La rétrocompatibilité est maintenue par " +"défaut (comme vous vous en doutez) mais, en spécifiant explicitement un " +"paramètre de style, vous avez la possibilité de spécifier des chaînes de " +"format qui fonctionnent avec :meth:`str.format` ou :class:`string.Template`. " +"Voici un exemple de session interactive en console pour montrer les " +"possibilités :" -#: howto/logging-cookbook.rst:1111 +#: 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:1119 +#: 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 " @@ -586,8 +1251,21 @@ msgid "" "logging calls which are out there in existing code will be using %-format " "strings." msgstr "" - -#: howto/logging-cookbook.rst:1132 +"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 " @@ -595,8 +1273,13 @@ msgid "" "will call ``str()`` on that object to get the actual format string. Consider " "the following two classes::" msgstr "" +"Il existe cependant un moyen d'utiliser le formatage *via* « {} » et « $ » " +"pour vos messages de journalisation. Rappelez-vous que, pour un message, " +"vous pouvez utiliser un objet arbitraire comme chaîne de format de message, " +"et que le package de journalisation appelle ``str()`` sur cet objet pour " +"fabriquer la chaîne finale. Considérez les deux classes suivantes ::" -#: howto/logging-cookbook.rst:1156 +#: 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 " @@ -606,22 +1289,37 @@ msgid "" "__ (double underscore --- not to be confused with _, the single underscore " "used as a synonym/alias for :func:`gettext.gettext` or its brethren)." msgstr "" +"L'une ou l'autre peut être utilisée à la place d'une chaîne de format " +"\"%(message)s\" ou \"{message}\" ou \"$message\", afin de mettre en forme " +"*via* « { } » ou « $ » la partie « message réel » qui apparaît dans la " +"sortie de journal formatée. Il est un peu lourd d'utiliser les noms de " +"classe chaque fois que vous voulez journaliser quelque chose, mais ça " +"devient acceptable si vous utilisez un alias tel que __ (double trait de " +"soulignement — à ne pas confondre avec _, le trait de soulignement unique " +"utilisé comme alias pour :func:`gettext.gettext` ou ses homologues)." -#: howto/logging-cookbook.rst:1164 +#: 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:1186 +#: 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:1190 +#: 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 " @@ -631,24 +1329,37 @@ msgid "" "not just the format string. That's because the __ notation is just syntax " "sugar for a constructor call to one of the XXXMessage classes." msgstr "" +"Une chose à noter est qu'il n'y a pas de perte de performance significative " +"avec cette approche : le formatage réel ne se produit pas lorsque vous " +"effectuez l'appel de journalisation, mais lorsque (et si) le message " +"journalisé est réellement sur le point d'être écrit dans un journal par un " +"gestionnaire. Ainsi, la seule chose légèrement inhabituelle qui pourrait " +"vous perturber est que les parenthèses entourent la chaîne de format et les " +"arguments, pas seulement la chaîne de format. C'est parce que la notation __ " +"n'est que du sucre syntaxique pour un appel de constructeur à l'une des " +"classes ``XXXMessage``." -#: howto/logging-cookbook.rst:1198 +#: 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:1229 +#: 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:1238 +#: howto/logging-cookbook.rst:1765 msgid "Customizing ``LogRecord``" -msgstr "" +msgstr "Personnalisation de ``LogRecord``" -#: howto/logging-cookbook.rst:1240 +#: 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:" @@ -658,14 +1369,24 @@ msgid "" "disabled). Before Python 3.2, there were only two places where this creation " "was done:" msgstr "" +"Chaque événement de journalisation est représenté par une instance :class:" +"`LogRecord`. Lorsqu’un événement est enregistré et non filtré en raison du " +"niveau d’un enregistreur, un :class:`LogRecord` est créé, rempli avec les " +"informations de l’événement, puis transmis aux gestionnaires de cet " +"enregistreur (et ses ancêtres, jusqu’à et y compris l’enregistreur où la " +"propagation vers le haut de la hiérarchie est désactivée). Avant Python 3.2, " +"il n’y avait que deux endroits où cette création était effectuée :" -#: howto/logging-cookbook.rst:1247 +#: 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:1250 +#: 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 " @@ -673,36 +1394,54 @@ msgid "" "via a :class:`~handlers.SocketHandler`, or in JSON form via an :class:" "`~handlers.HTTPHandler`)." msgstr "" +":func:`makeLogRecord`, qui est appelée avec un dictionnaire contenant des " +"attributs à ajouter au *LogRecord*. Elle est généralement invoquée lorsqu’un " +"dictionnaire approprié a été reçu par le réseau (par exemple, sous forme de " +"*pickle* *via* un :class:`~handlers.SocketHandler`, ou sous format JSON " +"*via* un :class:`~handlers.HTTPHandler`)." -#: howto/logging-cookbook.rst:1256 +#: 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:1259 +#: 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:1262 +#: 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:1266 +#: 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:1271 +#: 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 " @@ -710,8 +1449,14 @@ msgid "" "to remember to do this every time they introduced a new logger (which they " "would do simply by adding new packages or modules and doing ::" msgstr "" +"La seconde approche fonctionne raisonnablement bien dans de nombreux cas, " +"mais ne vous permet pas, par exemple, d’utiliser une sous-classe spécialisée " +"de :class:`LogRecord`. Les développeurs de bibliothèques peuvent définir un " +"filtre approprié sur leurs enregistreurs, mais ils doivent se rappeler de le " +"faire chaque fois qu’ils introduisent un nouvel enregistreur (ce qu’ils font " +"simplement en ajoutant de nouveaux paquets ou modules et en écrivant ::" -#: howto/logging-cookbook.rst:1279 +#: 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` " @@ -720,8 +1465,15 @@ msgid "" "so output from that handler would not reflect the intentions of the library " "developer." msgstr "" +"au niveau des modules). C’est probablement trop de choses auxquelles penser. " +"Les développeurs pourraient également ajouter le filtre à un :class:" +"`~logging.NullHandler` attaché à leur enregistreur de niveau supérieur, mais " +"cela ne serait pas invoqué si un développeur d’application attachait un " +"gestionnaire à un enregistreur de bibliothèque de niveau inférieur — donc la " +"sortie de ce gestionnaire ne refléterait pas les intentions du développeur " +"de la bibliothèque." -#: howto/logging-cookbook.rst:1285 +#: 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 " @@ -730,16 +1482,27 @@ msgid "" "signature as the :class:`~logging.LogRecord` constructor, as :class:" "`LogRecord` is the default setting for the factory." msgstr "" +"Dans Python 3.2 et ultérieurs, la création de :class:`~logging.LogRecord` " +"est effectuée via une fabrique, que vous pouvez spécifier. La fabrique est " +"juste un appelable que vous pouvez définir avec :func:`~logging." +"setLogRecordFactory`, et interroger avec :func:`~logging." +"getLogRecordFactory`. La fabrique est invoquée avec la même signature que le " +"constructeur :class:`~logging.LogRecord`, car :class:`LogRecord` est le " +"paramètre par défaut de la fabrique." -#: howto/logging-cookbook.rst:1292 +#: 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:1305 +#: 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 " @@ -748,115 +1511,153 @@ msgid "" "time overhead to all logging operations, and the technique should only be " "used when the use of a :class:`Filter` does not provide the desired result." msgstr "" +"Ce modèle permet à différentes bibliothèques d’enchaîner des fabriques, et " +"tant qu’elles n’écrasent pas les attributs des autres ou n’écrasent pas " +"involontairement les attributs fournis en standard, il ne devrait pas y " +"avoir de surprise. Cependant, il faut garder à l’esprit que chaque maillon " +"de la chaîne ajoute une surcharge d’exécution à toutes les opérations de " +"journalisation, et la technique ne doit être utilisée que lorsque " +"l’utilisation d’un :class:`Filter` ne permet pas d’obtenir le résultat " +"souhaité." -#: howto/logging-cookbook.rst:1316 +#: howto/logging-cookbook.rst:1843 msgid "Subclassing QueueHandler - a ZeroMQ example" -msgstr "" +msgstr "Dérivation de *QueueHandler* – un exemple de *ZeroMQ*" -#: howto/logging-cookbook.rst:1318 +#: 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:1337 +#: 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:1355 +#: howto/logging-cookbook.rst:1882 msgid "Subclassing QueueListener - a ZeroMQ example" -msgstr "" +msgstr "Dérivation de *QueueListener* – un exemple de *ZeroMQ*" -#: howto/logging-cookbook.rst:1357 +#: 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:1376 +#: howto/logging-cookbook.rst:1903 howto/logging-cookbook.rst:3947 msgid "Module :mod:`logging`" msgstr "Module :mod:`logging`" -#: howto/logging-cookbook.rst:1376 +#: 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:1379 +#: howto/logging-cookbook.rst:1906 howto/logging-cookbook.rst:3950 msgid "Module :mod:`logging.config`" msgstr "Module :mod:`logging.config`" -#: howto/logging-cookbook.rst:1379 +#: 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:1382 +#: howto/logging-cookbook.rst:1909 howto/logging-cookbook.rst:3953 msgid "Module :mod:`logging.handlers`" msgstr "Module :mod:`logging.handlers`" -#: howto/logging-cookbook.rst:1382 +#: 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:1384 +#: 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:1386 +#: 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:1390 +#: howto/logging-cookbook.rst:1917 msgid "An example dictionary-based configuration" -msgstr "" +msgstr "Exemple de configuration basée sur un dictionnaire" -#: howto/logging-cookbook.rst:1392 +#: 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:1448 +#: 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:1455 +#: 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:1457 +#: howto/logging-cookbook.rst:1984 msgid "" "An example of how you can define a namer and rotator is given in the " -"following snippet, which shows zlib-based compression of the log file::" +"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:1475 +#: howto/logging-cookbook.rst:2015 msgid "" -"These are not \"true\" .gz files, as they are bare compressed data, with no " -"\"container\" such as you’d find in an actual gzip file. This snippet is " -"just for illustration purposes." +"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:1480 +#: howto/logging-cookbook.rst:2028 msgid "A more elaborate multiprocessing example" -msgstr "" +msgstr "Exemple plus élaboré avec traitement en parallèle" -#: howto/logging-cookbook.rst:1482 +#: 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:1487 +#: 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 " @@ -868,18 +1669,32 @@ msgid "" "purely illustrative, but you should be able to adapt this example to your " "own scenario." msgstr "" - -#: howto/logging-cookbook.rst:1497 +"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:1709 +#: howto/logging-cookbook.rst:2257 msgid "Inserting a BOM into messages sent to a SysLogHandler" -msgstr "" +msgstr "Insertion d’une *BOM* dans les messages envoyés à un *SysLogHandler*" -#: howto/logging-cookbook.rst:1711 +#: 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 " @@ -887,16 +1702,25 @@ msgid "" "encoded using UTF-8. (See the :rfc:`relevant section of the specification " "<5424#section-6>`.)" msgstr "" +"La :rfc:`5424` requiert qu’un message Unicode soit envoyé à un démon " +"*syslog* sous la forme d’un ensemble d’octets ayant la structure suivante : " +"un composant ASCII pur facultatif, suivi d’une marque d’ordre d’octet (*BOM* " +"pour *Byte Order Mark* en anglais) UTF-8, suivie de contenu Unicode UTF-8 " +"(voir la :rfc:`la spécification correspondante <5424#section-6>`)." -#: howto/logging-cookbook.rst:1717 +#: 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:1723 +#: 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 " @@ -904,34 +1728,51 @@ msgid "" "an optional pure-ASCII sequence before it and arbitrary Unicode after it, " "encoded using UTF-8, then you need to do the following:" msgstr "" +"Comme ce comportement est inadéquat, le code incorrect d’insertion de la " +"*BOM* a été supprimé de Python 3.2.4 et ultérieurs. Cependant, il n’est pas " +"remplacé et, si vous voulez produire des messages conformes :rfc:`5424` qui " +"incluent une *BOM*, une séquence facultative en ASCII pur avant et un " +"Unicode arbitraire après, encodé en UTF-8, alors vous devez appliquer ce qui " +"suit :" -#: howto/logging-cookbook.rst:1729 +#: 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:1735 +#: 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:1738 +#: 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:1742 +#: 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:1746 +#: 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 " @@ -939,12 +1780,17 @@ msgid "" "complain, but your messages will not be RFC 5424-compliant, and your syslog " "daemon may complain." msgstr "" +"Le message formaté *sera* encodé en UTF-8 par ``SysLogHandler``. Si vous " +"suivez les règles ci-dessus, vous devriez pouvoir produire des messages " +"conformes à la :rfc:`5424`. Si vous ne le faites pas, la journalisation ne " +"se plaindra peut-être pas, mais vos messages ne seront pas conformes à la " +"RFC 5424 et votre démon *syslog* est susceptible de se plaindre." -#: howto/logging-cookbook.rst:1753 +#: howto/logging-cookbook.rst:2301 msgid "Implementing structured logging" -msgstr "" +msgstr "Journalisation structurée" -#: howto/logging-cookbook.rst:1755 +#: 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 " @@ -955,32 +1801,44 @@ msgid "" "following is a simple approach which uses JSON to serialise the event in a " "machine-parseable manner::" msgstr "" +"Bien que la plupart des messages de journalisation soient destinés à être " +"lus par des humains, et donc difficilement analysables par la machine, il " +"peut arriver que vous souhaitiez produire des messages dans un format " +"structuré dans le but d’être analysé par un programme (sans avoir besoin " +"d’expressions régulières complexes pour analyser le message du journal). " +"C’est simple à réaliser en utilisant le paquet de journalisation. Il existe " +"plusieurs façons d’y parvenir et voici une approche simple qui utilise JSON " +"pour sérialiser l’événement de manière à être analysable par une machine ::" -#: howto/logging-cookbook.rst:1779 +#: howto/logging-cookbook.rst:2327 msgid "If the above script is run, it prints:" -msgstr "" +msgstr "Si vous lancez le script ci-dessus, il imprime :" -#: howto/logging-cookbook.rst:1785 howto/logging-cookbook.rst:1834 +#: 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:1788 +#: 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:1828 +#: howto/logging-cookbook.rst:2369 msgid "When the above script is run, it prints:" -msgstr "" +msgstr "Quand vous exécutez le script ci-dessus, il imprime :" -#: howto/logging-cookbook.rst:1843 +#: howto/logging-cookbook.rst:2384 msgid "Customizing handlers with :func:`dictConfig`" -msgstr "" +msgstr "Personnalisation des gestionnaires avec :func:`dictConfig`" -#: howto/logging-cookbook.rst:1845 +#: 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 " @@ -989,25 +1847,40 @@ msgid "" "the file handlers in the stdlib don't offer built-in support. You can " "customize handler creation using a plain function such as::" msgstr "" +"Il arrive de souhaiter personnaliser les gestionnaires de journalisation " +"d’une manière particulière et, en utilisant :func:`dictConfig`, vous pourrez " +"peut-être le faire sans avoir à dériver les classes mères. Par exemple, " +"supposons que vous souhaitiez définir le propriétaire d’un fichier journal. " +"Dans un environnement POSIX, cela se fait facilement en utilisant :func:" +"`shutil.chown`, mais les gestionnaires de fichiers de la bibliothèque " +"standard n’offrent pas cette gestion nativement. Vous pouvez personnaliser " +"la création du gestionnaire à l’aide d’une fonction simple telle que ::" -#: howto/logging-cookbook.rst:1859 +#: 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:1892 +#: 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:1939 +#: 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:1949 +#: 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 " @@ -1015,44 +1888,65 @@ msgid "" "With pre-3.3 versions, you would need to implement the actual ownership " "change using e.g. :func:`os.chown`." msgstr "" +"Notez que cet exemple utilise Python 3.3 car c’est là que :func:`shutil." +"chown` fait son apparition. Cette approche devrait fonctionner avec " +"n’importe quelle version de Python prenant en charge :func:`dictConfig` – à " +"savoir, Python 2.7, 3.2 ou version ultérieure. Avec les versions antérieures " +"à la 3.3, vous devrez implémenter le changement de propriétaire réel en " +"utilisant par exemple :func:`os.chown`." -#: howto/logging-cookbook.rst:1955 +#: 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:1960 +#: howto/logging-cookbook.rst:2501 msgid "you could use e.g.::" -msgstr "" +msgstr "vous pouvez écrire par exemple ::" -#: howto/logging-cookbook.rst:1964 +#: 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:1969 +#: 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:1973 +#: 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:1983 +#: howto/logging-cookbook.rst:2524 msgid "Using particular formatting styles throughout your application" msgstr "" -#: howto/logging-cookbook.rst:1985 +#: 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, " @@ -1063,7 +1957,8 @@ msgid "" "is constructed." msgstr "" -#: howto/logging-cookbook.rst:1992 +#: 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 " @@ -1073,12 +1968,25 @@ msgid "" "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 no " +"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 "" - -#: howto/logging-cookbook.rst:2004 +"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 " @@ -1086,7 +1994,7 @@ msgid "" "formatting." msgstr "" -#: howto/logging-cookbook.rst:2008 +#: 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 " @@ -1094,11 +2002,11 @@ msgid "" "formatting styles can be accommodated." msgstr "" -#: howto/logging-cookbook.rst:2015 +#: howto/logging-cookbook.rst:2556 msgid "Using LogRecord factories" msgstr "" -#: howto/logging-cookbook.rst:2017 +#: 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 " @@ -1113,17 +2021,17 @@ msgid "" "implementation does." msgstr "" -#: howto/logging-cookbook.rst:2028 +#: 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:2033 +#: howto/logging-cookbook.rst:2574 msgid "Using custom message objects" msgstr "" -#: howto/logging-cookbook.rst:2035 +#: 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:" @@ -1133,7 +2041,7 @@ msgid "" "following two classes::" msgstr "" -#: howto/logging-cookbook.rst:2060 +#: 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 " @@ -1144,17 +2052,17 @@ msgid "" "using ``_`` for localization)." msgstr "" -#: howto/logging-cookbook.rst:2068 +#: howto/logging-cookbook.rst:2609 msgid "" "Examples of this approach are given below. Firstly, formatting with :meth:" "`str.format`::" msgstr "" -#: howto/logging-cookbook.rst:2082 +#: howto/logging-cookbook.rst:2623 msgid "Secondly, formatting with :class:`string.Template`::" msgstr "" -#: howto/logging-cookbook.rst:2089 +#: 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 " @@ -1166,11 +2074,11 @@ msgid "" "above." msgstr "" -#: howto/logging-cookbook.rst:2103 +#: howto/logging-cookbook.rst:2644 msgid "Configuring filters with :func:`dictConfig`" msgstr "" -#: howto/logging-cookbook.rst:2105 +#: 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). " @@ -1185,22 +2093,22 @@ msgid "" "complete example::" msgstr "" -#: howto/logging-cookbook.rst:2158 +#: 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:2166 +#: howto/logging-cookbook.rst:2707 msgid "which shows that the filter is working as configured." msgstr "" -#: howto/logging-cookbook.rst:2168 +#: howto/logging-cookbook.rst:2709 msgid "A couple of extra points to note:" msgstr "" -#: howto/logging-cookbook.rst:2170 +#: 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 " @@ -1210,7 +2118,7 @@ msgid "" "the above example." msgstr "" -#: howto/logging-cookbook.rst:2177 +#: 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 " @@ -1219,11 +2127,11 @@ msgid "" "above." msgstr "" -#: howto/logging-cookbook.rst:2186 +#: howto/logging-cookbook.rst:2727 msgid "Customized exception formatting" msgstr "" -#: howto/logging-cookbook.rst:2188 +#: 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, " @@ -1231,22 +2139,22 @@ msgid "" "formatter class, as shown in the following example::" msgstr "" -#: howto/logging-cookbook.rst:2229 +#: howto/logging-cookbook.rst:2770 msgid "When run, this produces a file with exactly two lines:" msgstr "" -#: howto/logging-cookbook.rst:2236 +#: 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:2243 +#: howto/logging-cookbook.rst:2784 msgid "Speaking logging messages" msgstr "" -#: howto/logging-cookbook.rst:2245 +#: 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 " @@ -1263,24 +2171,24 @@ msgid "" "approach, which assumes that the ``espeak`` TTS package is available::" msgstr "" -#: howto/logging-cookbook.rst:2287 +#: 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:2289 +#: 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:2297 +#: howto/logging-cookbook.rst:2838 msgid "Buffering logging messages and outputting them conditionally" msgstr "" -#: howto/logging-cookbook.rst:2299 +#: 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 " @@ -1290,7 +2198,7 @@ msgid "" "debug information to be output as well as the error." msgstr "" -#: howto/logging-cookbook.rst:2306 +#: 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 " @@ -1303,7 +2211,7 @@ msgid "" "subclass of ``MemoryHandler`` if you want custom flushing behavior." msgstr "" -#: howto/logging-cookbook.rst:2316 +#: 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 " @@ -1312,7 +2220,7 @@ msgid "" "levels - otherwise, it only logs at DEBUG, INFO and WARNING levels." msgstr "" -#: howto/logging-cookbook.rst:2322 +#: 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 " @@ -1324,36 +2232,59 @@ msgid "" "respectively." msgstr "" -#: howto/logging-cookbook.rst:2330 +#: howto/logging-cookbook.rst:2871 msgid "Here's the script::" msgstr "" -#: howto/logging-cookbook.rst:2393 +#: howto/logging-cookbook.rst:2934 msgid "When this script is run, the following output should be observed:" msgstr "" -#: howto/logging-cookbook.rst:2423 +#: 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:2427 +#: howto/logging-cookbook.rst:2968 msgid "You can of course use the conventional means of decoration::" msgstr "" -#: howto/logging-cookbook.rst:2437 +#: 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:2439 +#: 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::" +"class such as ``UTCFormatter``, shown below::" msgstr "" -#: howto/logging-cookbook.rst:2448 +#: 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 " @@ -1361,21 +2292,21 @@ msgid "" "the following complete example::" msgstr "" -#: howto/logging-cookbook.rst:2491 +#: howto/logging-cookbook.rst:3114 msgid "When this script is run, it should print something like:" msgstr "" -#: howto/logging-cookbook.rst:2498 +#: 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:2505 +#: howto/logging-cookbook.rst:3128 msgid "Using a context manager for selective logging" msgstr "" -#: howto/logging-cookbook.rst:2507 +#: 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 " @@ -1385,7 +2316,7 @@ msgid "" "scope of the context manager::" msgstr "" -#: howto/logging-cookbook.rst:2540 +#: 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 " @@ -1394,13 +2325,13 @@ msgid "" "block exit - you could do this if you don't need the handler any more." msgstr "" -#: howto/logging-cookbook.rst:2546 +#: 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:2564 +#: 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 " @@ -1413,56 +2344,56 @@ msgid "" "(like message #1) whereas message #7 doesn't (just like message #2)." msgstr "" -#: howto/logging-cookbook.rst:2574 +#: howto/logging-cookbook.rst:3197 msgid "If we run the resulting script, the result is as follows:" msgstr "" -#: howto/logging-cookbook.rst:2585 +#: 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:2593 +#: howto/logging-cookbook.rst:3216 msgid "Once again, but piping ``stdout`` to ``/dev/null``, we get:" msgstr "" -#: howto/logging-cookbook.rst:2603 +#: 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:2605 +#: 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:2613 +#: howto/logging-cookbook.rst:3236 msgid "A CLI application starter template" msgstr "" -#: howto/logging-cookbook.rst:2615 +#: howto/logging-cookbook.rst:3238 msgid "Here's an example which shows how you can:" msgstr "" -#: howto/logging-cookbook.rst:2617 +#: howto/logging-cookbook.rst:3240 msgid "Use a logging level based on command-line arguments" msgstr "" -#: howto/logging-cookbook.rst:2618 +#: 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:2620 +#: howto/logging-cookbook.rst:3243 msgid "Make use of simple, minimal configuration" msgstr "" -#: howto/logging-cookbook.rst:2622 +#: 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 " @@ -1473,53 +2404,53 @@ msgid "" "``logging.INFO``. Here's one way that ``app.py`` could be written::" msgstr "" -#: howto/logging-cookbook.rst:2671 +#: 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:2684 +#: howto/logging-cookbook.rst:3307 msgid "and thus for stopping::" msgstr "" -#: howto/logging-cookbook.rst:2705 +#: howto/logging-cookbook.rst:3328 msgid "and similarly for restarting::" msgstr "" -#: howto/logging-cookbook.rst:2726 +#: 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:2739 +#: 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:2742 +#: 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:2759 +#: howto/logging-cookbook.rst:3382 msgid "And if we want less:" msgstr "" -#: howto/logging-cookbook.rst:2767 +#: 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:2773 +#: howto/logging-cookbook.rst:3396 msgid "A Qt GUI for logging" msgstr "" -#: howto/logging-cookbook.rst:2775 +#: 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-" @@ -1527,7 +2458,7 @@ msgid "" "project/PySide2/>`_ or `PyQt5 `_ libraries." msgstr "" -#: howto/logging-cookbook.rst:2781 +#: 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 " @@ -1537,14 +2468,14 @@ msgid "" "logging messages at random levels with random short delays in between)." msgstr "" -#: howto/logging-cookbook.rst:2788 +#: 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:2792 +#: 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 " @@ -1552,11 +2483,105 @@ msgid "" "information." msgstr "" -#: howto/logging-cookbook.rst:3009 +#: 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:3011 +#: 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 " @@ -1564,11 +2589,11 @@ msgid "" "The following sections are in no particular order." msgstr "" -#: howto/logging-cookbook.rst:3018 +#: howto/logging-cookbook.rst:3871 msgid "Opening the same log file multiple times" msgstr "" -#: howto/logging-cookbook.rst:3020 +#: 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. " @@ -1576,32 +2601,32 @@ msgid "" "file multiple times. This could be done accidentally, for example by:" msgstr "" -#: howto/logging-cookbook.rst:3025 +#: 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:3028 +#: 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:3031 +#: 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:3035 +#: 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:3038 +#: 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 " @@ -1610,25 +2635,27 @@ msgid "" "different handler instances which happen to point to the same file." msgstr "" -#: howto/logging-cookbook.rst:3044 +#: 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." +"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:3049 +#: howto/logging-cookbook.rst:3904 msgid "" "Use the techniques outlined in :ref:`multiple-processes` to circumvent such " "issues." msgstr "" -#: howto/logging-cookbook.rst:3053 +#: howto/logging-cookbook.rst:3908 msgid "Using loggers as attributes in a class or passing them as parameters" msgstr "" -#: howto/logging-cookbook.rst:3055 +#: 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 " @@ -1639,12 +2666,12 @@ msgid "" "module (and not the class) is the unit of software decomposition." msgstr "" -#: howto/logging-cookbook.rst:3065 +#: howto/logging-cookbook.rst:3920 msgid "" "Adding handlers other than :class:`NullHandler` to a logger in a library" msgstr "" -#: howto/logging-cookbook.rst:3067 +#: 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 " @@ -1652,11 +2679,11 @@ msgid "" "your loggers other than a :class:`~logging.NullHandler` instance." msgstr "" -#: howto/logging-cookbook.rst:3074 +#: howto/logging-cookbook.rst:3929 msgid "Creating a lot of loggers" msgstr "" -#: howto/logging-cookbook.rst:3076 +#: 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. " @@ -1666,3 +2693,15 @@ msgid "" "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 index 61144c1095..22f0b270c7 100644 --- a/howto/logging.po +++ b/howto/logging.po @@ -4,8 +4,8 @@ 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:24+0100\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" @@ -28,7 +28,7 @@ msgstr "Vinay Sajip " #: howto/logging.rst:12 msgid "Basic Logging Tutorial" -msgstr "Les bases de l'utilisation du module `logging`" +msgstr "Les bases de l'utilisation du module ``logging``" #: howto/logging.rst:14 msgid "" @@ -52,7 +52,7 @@ msgstr "" #: howto/logging.rst:23 msgid "When to use logging" -msgstr "Quand utiliser `logging`" +msgstr "Quand utiliser ``logging``" #: howto/logging.rst:25 msgid "" @@ -161,7 +161,7 @@ msgstr "" "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:854 +#: howto/logging.rst:855 msgid "Level" msgstr "Niveau" @@ -169,7 +169,7 @@ msgstr "Niveau" msgid "When it's used" msgstr "Quand il est utilisé" -#: howto/logging.rst:864 +#: howto/logging.rst:865 msgid "``DEBUG``" msgstr "``DEBUG``" @@ -180,7 +180,7 @@ msgstr "" "Information détaillée, intéressante seulement lorsqu'on diagnostique un " "problème." -#: howto/logging.rst:862 +#: howto/logging.rst:863 msgid "``INFO``" msgstr "``INFO``" @@ -188,7 +188,7 @@ msgstr "``INFO``" msgid "Confirmation that things are working as expected." msgstr "Confirmation que tout fonctionne comme prévu." -#: howto/logging.rst:860 +#: howto/logging.rst:861 msgid "``WARNING``" msgstr "``WARNING``" @@ -202,7 +202,7 @@ msgstr "" "d'un problème dans un futur proche (par exemple « espace disque faible »). " "Le logiciel fonctionne encore normalement." -#: howto/logging.rst:858 +#: howto/logging.rst:859 msgid "``ERROR``" msgstr "``ERROR``" @@ -214,7 +214,7 @@ 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:856 +#: howto/logging.rst:857 msgid "``CRITICAL``" msgstr "``CRITICAL``" @@ -281,9 +281,10 @@ 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 " +"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 "" @@ -337,7 +338,7 @@ 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` " +"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 @@ -351,18 +352,20 @@ msgstr "" "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. 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." +"`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:186 +#: 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 " @@ -375,7 +378,7 @@ msgstr "" "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:193 +#: 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." @@ -383,11 +386,11 @@ 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:198 +#: howto/logging.rst:199 msgid "Logging from multiple modules" msgstr "Employer *logging* à partir de différents modules" -#: howto/logging.rst:200 +#: howto/logging.rst:201 msgid "" "If your program consists of multiple modules, here's an example of how you " "could organize logging in it::" @@ -396,11 +399,11 @@ msgstr "" "d'organiser\n" "l'outil de journalisation ::" -#: howto/logging.rst:224 +#: 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:232 +#: 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 " @@ -418,11 +421,11 @@ msgstr "" "la localisation des messages, référez-vous à la documentation avancée :ref:" "`logging-advanced-tutorial`." -#: howto/logging.rst:242 +#: howto/logging.rst:243 msgid "Logging variable data" msgstr "Journalisation de données variables" -#: howto/logging.rst:244 +#: 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::" @@ -431,11 +434,11 @@ msgstr "" "message de description de l'évènement et ajoutez les données variables comme " "argument. Par exemple ::" -#: howto/logging.rst:250 +#: howto/logging.rst:251 msgid "will display:" msgstr "affichera :" -#: howto/logging.rst:256 +#: 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 " @@ -446,17 +449,17 @@ msgid "" 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-" +"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:265 +#: howto/logging.rst:266 msgid "Changing the format of displayed messages" msgstr "Modifier le format du message affiché" -#: howto/logging.rst:267 +#: 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::" @@ -464,11 +467,11 @@ msgstr "" "Pour changer le format utilisé pour afficher le message, vous devez préciser " "le format que vous souhaitez employer ::" -#: howto/logging.rst:276 +#: howto/logging.rst:277 msgid "which would print:" msgstr "ce qui affiche :" -#: howto/logging.rst:284 +#: 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 " @@ -477,31 +480,31 @@ msgid "" "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." +"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:293 +#: howto/logging.rst:294 msgid "Displaying the date/time in messages" msgstr "Afficher l'horodatage dans les messages" -#: howto/logging.rst:295 +#: 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 ::" +"Pour afficher la date ou le temps d'un évènement, ajoutez ``'%(asctime)'`` " +"dans votre chaîne de formatage ::" -#: howto/logging.rst:302 +#: howto/logging.rst:303 msgid "which should print something like this:" msgstr "ce qui affichera quelque chose comme :" -#: howto/logging.rst:308 +#: 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, " @@ -512,21 +515,21 @@ msgstr "" "l'horodatage, vous pouvez fournir à ``basicConfig`` un argument *datefmt*, " "comme dans l'exemple suivant ::" -#: howto/logging.rst:316 +#: howto/logging.rst:317 msgid "which would display something like this:" msgstr "ce qui affichera quelque chose comme :" -#: howto/logging.rst:322 +#: 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:327 +#: howto/logging.rst:328 msgid "Next Steps" msgstr "Étapes suivantes" -#: howto/logging.rst:329 +#: 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, " @@ -535,12 +538,12 @@ msgid "" "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." +"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:335 +#: 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 " @@ -548,14 +551,14 @@ msgid "" "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 " +"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://" +"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:341 +#: 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 " @@ -565,11 +568,11 @@ msgstr "" "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:349 +#: howto/logging.rst:350 msgid "Advanced Logging Tutorial" msgstr "Usage avancé de Logging" -#: howto/logging.rst:351 +#: howto/logging.rst:352 msgid "" "The logging library takes a modular approach and offers several categories " "of components: loggers, handlers, filters, and formatters." @@ -578,13 +581,13 @@ msgstr "" "différentes catégories de composants : *loggers*, *handlers*, *filters* et " "*formatters*." -#: howto/logging.rst:354 +#: 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:355 +#: howto/logging.rst:356 msgid "" "Handlers send the log records (created by loggers) to the appropriate " "destination." @@ -592,7 +595,7 @@ msgstr "" "Les gestionnaires (*handlers*) envoient les entrées de journal (créés par " "les *loggers*) vers les destinations voulues." -#: howto/logging.rst:357 +#: howto/logging.rst:358 msgid "" "Filters provide a finer grained facility for determining which log records " "to output." @@ -600,13 +603,13 @@ msgstr "" "Les filtres (*filters*) fournissent un moyen de choisir finement quelles " "entrées de journal doivent être sorties." -#: howto/logging.rst:359 +#: 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:361 +#: howto/logging.rst:362 msgid "" "Log event information is passed between loggers, handlers, filters and " "formatters in a :class:`LogRecord` instance." @@ -614,7 +617,7 @@ 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:364 +#: 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 " @@ -628,30 +631,30 @@ msgstr "" "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 " +"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:371 +#: 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`, " +"*logger* au niveau du module, dans chaque module qui emploie ``logging``, " "nommé de la façon suivante ::" -#: howto/logging.rst:376 +#: 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 " +"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`." +"simplement en regardant le nom du *logger*." -#: howto/logging.rst:379 +#: 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`, :" @@ -659,14 +662,14 @@ msgid "" "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 `loggers` 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 " +"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." +"ont la même signature. Le nom du *root logger* est affiché comme " +"« ``'root'`` » dans la sortie." -#: howto/logging.rst:385 +#: 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 " @@ -686,7 +689,7 @@ msgstr "" "classe de destination si vous avez des besoins spéciaux qui ne sont couverts " "par aucune classe *handler* prédéfinie." -#: howto/logging.rst:392 +#: 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 " @@ -707,13 +710,13 @@ msgstr "" "défaut pour le message affiché, avant d'être déléguée au *logger* racine, " "qui sort le message." -#: howto/logging.rst:400 +#: 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:406 +#: 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 " @@ -724,23 +727,23 @@ msgstr "" "objects` pour toutes les options de construction de cette chaîne de " "formatage." -#: howto/logging.rst:411 +#: howto/logging.rst:412 msgid "Logging Flow" msgstr "Flux du processus de journalisation" -#: howto/logging.rst:413 +#: 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." +"Le flux des informations associées à un évènement dans les *loggers* et les " +"*handlers* est illustré dans le diagramme suivant." -#: howto/logging.rst:419 +#: howto/logging.rst:420 msgid "Loggers" msgstr "Loggers" -#: howto/logging.rst:421 +#: 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 " @@ -752,24 +755,24 @@ 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." +"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:427 +#: 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 " +"Les méthodes des objets *logger* les plus utilisées appartiennent à deux " "catégories : la configuration et l'envoi de messages." -#: howto/logging.rst:430 +#: 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:432 +#: 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 " @@ -778,48 +781,49 @@ msgid "" "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." +"*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:438 +#: 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 " +"enlèvent des objets *handlers* au *logger*. Les objets *handlers* sont " "expliqués plus en détail dans :ref:`handler-basic`." -#: howto/logging.rst:442 +#: 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 " +"des objets *filter* au *logger*. Les objets *filters* sont expliqués plus en " "détail dans :ref:`filter`." -#: howto/logging.rst:446 +#: 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`." +"un *logger*." -#: howto/logging.rst:449 +#: 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 " +"Une fois que l'objet *logger* est correctement configuré, les méthodes " "suivantes permettent de créer un message :" -#: howto/logging.rst:451 +#: 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 " @@ -838,11 +842,11 @@ msgstr "" "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 " +"``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:461 +#: 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 " @@ -853,7 +857,7 @@ msgstr "" "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:465 +#: 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 " @@ -866,7 +870,7 @@ msgstr "" "d'enregistrer des messages pour des niveaux de sévérité définis par " "l'utilisateur." -#: howto/logging.rst:469 +#: 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-" @@ -877,17 +881,17 @@ msgid "" "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. " +":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 " +"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:477 +#: 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 " @@ -898,16 +902,16 @@ msgid "" "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 " +"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`." +"*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:485 +#: 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 " @@ -916,19 +920,19 @@ msgid "" "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 " +"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`)." +"valeur ``False`` à l'attribut *propagate* d'un *logger*)." -#: howto/logging.rst:496 +#: howto/logging.rst:497 msgid "Handlers" msgstr "Handlers" -#: howto/logging.rst:498 +#: 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 " @@ -942,16 +946,16 @@ msgid "" 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." +"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." +"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:508 +#: 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:" @@ -961,19 +965,19 @@ msgstr "" "(voir :ref:`useful-handlers`) ; le tutoriel utilise surtout :class:" "`StreamHandler` et :class:`FileHandler` dans ses exemples." -#: howto/logging.rst:512 +#: 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 " +"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 d'`handler` " +"*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:517 +#: 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. " @@ -982,30 +986,30 @@ msgid "" "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 " +"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." +"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:523 +#: 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 " -"cet `handler`." +":meth:`~Handler.setFormatter` sélectionne l'objet ``Formatter`` utilisé par " +"ce ``handler``." -#: howto/logging.rst:526 +#: 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`." +"respectivement dé-configurent des objets *filter* sur les *handlers*." -#: howto/logging.rst:529 +#: 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 " @@ -1018,11 +1022,11 @@ msgstr "" "avoir et établit les comportements par défaut que les classes filles peuvent " "employer (ou redéfinir)." -#: howto/logging.rst:536 +#: howto/logging.rst:537 msgid "Formatters" msgstr "Formatters" -#: howto/logging.rst:538 +#: 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 " @@ -1031,15 +1035,15 @@ msgid "" "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 " +"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 " +"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:547 +#: 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:" @@ -1048,36 +1052,39 @@ msgstr "" "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:554 +#: 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." +"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é." +"avec les millisecondes en suffixe. Le ``style`` est ``%``, ``{`` ou ``$``. " +"Si aucun n'est spécifié, ``%`` sera utilisé." -#: howto/logging.rst:557 +#: 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 :" +"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 à " +"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:564 +#: howto/logging.rst:565 msgid "Added the ``style`` parameter." msgstr "Ajout du paramètre ``style``." -#: howto/logging.rst:567 +#: 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 " @@ -1087,7 +1094,7 @@ msgstr "" "format lisible par les humains, la sévérité du message et son contenu, dans " "cet ordre ::" -#: howto/logging.rst:573 +#: 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 " @@ -1097,41 +1104,41 @@ msgid "" "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 " +"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 " +"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 " +"*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:583 +#: howto/logging.rst:584 msgid "Configuring Logging" -msgstr "Configuration de `Logging`" +msgstr "Configuration de ``logging``" -#: howto/logging.rst:587 +#: howto/logging.rst:588 msgid "Programmers can configure logging in three ways:" -msgstr "On peut configurer `logging` de trois façons :" +msgstr "On peut configurer ``logging`` de trois façons :" -#: howto/logging.rst:589 +#: 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 " +"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:591 +#: 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 " +"Créer un fichier de configuration de ``logging`` et le lire en employant la " "fonction :func:`fileConfig`." -#: howto/logging.rst:593 +#: howto/logging.rst:594 msgid "" "Creating a dictionary of configuration information and passing it to the :" "func:`dictConfig` function." @@ -1139,25 +1146,25 @@ msgstr "" "Créer un dictionnaire d'informations de configuration et le passer à la " "fonction :func:`dictConfig`." -#: howto/logging.rst:596 +#: 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 " +"`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:626 +#: 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:637 +#: 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 " @@ -1166,18 +1173,18 @@ 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:656 +#: howto/logging.rst:657 msgid "Here is the logging.conf file:" msgstr "Voici le fichier *logging.conf* :" -#: howto/logging.rst:688 +#: 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:699 +#: 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 " @@ -1186,9 +1193,10 @@ 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`." +"personne qui ne code pas de modifier facilement les propriétés de " +"``logging``." -#: howto/logging.rst:703 +#: howto/logging.rst:704 msgid "" "The :func:`fileConfig` function takes a default parameter, " "``disable_existing_loggers``, which defaults to ``True`` for reasons of " @@ -1207,7 +1215,7 @@ msgstr "" "documentation pour plus de détails, et donner la valeur ``False`` à ce " "paramètre si vous le souhaitez." -#: howto/logging.rst:711 +#: 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 " @@ -1222,7 +1230,7 @@ msgstr "" "forcément celui que vous souhaitez ; dans ce cas, donnez explicitement la " "valeur ``False`` à cette clef." -#: howto/logging.rst:721 +#: 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 " @@ -1233,14 +1241,15 @@ msgid "" "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 " +"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)." +"(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:729 +#: 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 " @@ -1269,7 +1278,7 @@ msgstr "" "forme de *pickle* sur un connecteur, ou utiliser n'importe quelle approche " "suivant la logique de votre application." -#: howto/logging.rst:741 +#: howto/logging.rst:742 msgid "" "Here's an example of the same configuration as above, in YAML format for the " "new dictionary-based approach:" @@ -1277,7 +1286,7 @@ 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:765 +#: howto/logging.rst:766 msgid "" "For more information about logging using a dictionary, see :ref:`logging-" "config-api`." @@ -1285,11 +1294,11 @@ msgstr "" "Pour plus d'informations sur la journalisation à l'aide d'un dictionnaire, " "consultez :ref:`logging-config-api`." -#: howto/logging.rst:769 +#: 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:771 +#: 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 " @@ -1299,16 +1308,16 @@ 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 " +"l'événement. Le comportement du paquet ```logging``` dans ces circonstances " "dépend de la version Python." -#: howto/logging.rst:776 +#: 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:778 +#: howto/logging.rst:779 msgid "" "If *logging.raiseExceptions* is ``False`` (production mode), the event is " "silently dropped." @@ -1316,7 +1325,7 @@ msgstr "" "Si *logging.raiseExceptions* vaut ``False`` (mode production), l’événement " "est silencieusement abandonné." -#: howto/logging.rst:781 +#: 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." @@ -1325,11 +1334,11 @@ msgstr "" "message *No handlers could be found for logger X.Y.Z* est écrit sur la " "sortie standard une fois." -#: howto/logging.rst:784 +#: 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:786 +#: 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 " @@ -1350,7 +1359,7 @@ msgstr "" "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:795 +#: howto/logging.rst:796 msgid "" "To obtain the pre-3.2 behaviour, ``logging.lastResort`` can be set to " "``None``." @@ -1358,11 +1367,11 @@ msgstr "" "Pour obtenir un comportement antérieur à 3.2, ``logging.lastResort`` peut " "être mis à ``None``." -#: howto/logging.rst:800 +#: howto/logging.rst:801 msgid "Configuring Logging for a Library" msgstr "Configuration de la journalisation pour une bibliothèque" -#: howto/logging.rst:802 +#: 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 " @@ -1382,7 +1391,7 @@ msgstr "" "``WARNING`` et au-dessus seront écrits sur ``sys.stderr``. Cela est " "considéré comme le meilleur comportement par défaut." -#: howto/logging.rst:810 +#: 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-" @@ -1405,7 +1414,7 @@ msgstr "" "appels effectués dans le code de bibliothèque enverra la sortie à ces " "gestionnaires, comme d'habitude." -#: howto/logging.rst:819 +#: 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 " @@ -1425,7 +1434,7 @@ msgstr "" "effectuée en utilisant des enregistreurs avec des noms correspondant à *foo." "x*, *foo.x.y*, etc., alors le code ::" -#: howto/logging.rst:830 +#: 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 " @@ -1435,7 +1444,7 @@ msgstr "" "bibliothèques, le nom de l'enregistreur spécifié peut être ``orgname.foo`` " "plutôt que simplement ``foo``." -#: howto/logging.rst:834 +#: 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 " @@ -1454,11 +1463,11 @@ msgstr "" "le manteau », vous pourriez bien interférer avec les tests unitaires et la " "journalisation qui convient à ses exigences." -#: howto/logging.rst:845 +#: howto/logging.rst:846 msgid "Logging Levels" msgstr "Niveaux de journalisation" -#: howto/logging.rst:847 +#: 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 " @@ -1472,39 +1481,39 @@ msgstr "" "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:854 +#: howto/logging.rst:855 msgid "Numeric value" msgstr "Valeur numérique" -#: howto/logging.rst:856 +#: howto/logging.rst:857 msgid "50" msgstr "50" -#: howto/logging.rst:858 +#: howto/logging.rst:859 msgid "40" msgstr "40" -#: howto/logging.rst:860 +#: howto/logging.rst:861 msgid "30" msgstr "30" -#: howto/logging.rst:862 +#: howto/logging.rst:863 msgid "20" msgstr "20" -#: howto/logging.rst:864 +#: howto/logging.rst:865 msgid "10" msgstr "10" -#: howto/logging.rst:866 +#: howto/logging.rst:867 msgid "``NOTSET``" msgstr "``NOTSET``" -#: howto/logging.rst:866 +#: howto/logging.rst:867 msgid "0" msgstr "0" -#: howto/logging.rst:869 +#: 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 " @@ -1522,7 +1531,7 @@ msgstr "" "réellement généré. C'est le mécanisme de base contrôlant la verbosité de la " "sortie de journalisation." -#: howto/logging.rst:876 +#: 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." @@ -1533,7 +1542,7 @@ msgstr "" "enregistrer un événement, une instance de :class:`~logging.LogRecord` est " "créée à partir du message de journalisation." -#: howto/logging.rst:880 +#: 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` " @@ -1567,7 +1576,7 @@ msgstr "" "enregistreur soit défini sur la valeur ``False``, auquel cas le passage à " "l'ancêtre gestionnaires s'arrête)." -#: howto/logging.rst:894 +#: 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. " @@ -1584,11 +1593,11 @@ msgstr "" "classes définies par l'utilisateur de :class:`Handler` devront remplacer ce :" "meth:`~Handler.emit`." -#: howto/logging.rst:903 +#: howto/logging.rst:904 msgid "Custom Levels" msgstr "Niveaux personnalisés" -#: howto/logging.rst:905 +#: 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. " @@ -1612,11 +1621,11 @@ msgstr "" "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:918 +#: howto/logging.rst:919 msgid "Useful Handlers" msgstr "Gestionnaires utiles" -#: howto/logging.rst:920 +#: howto/logging.rst:921 msgid "" "In addition to the base :class:`Handler` class, many useful subclasses are " "provided:" @@ -1624,7 +1633,7 @@ msgstr "" "En plus de la classe de base :class:`Handler`, de nombreuses sous-classes " "utiles sont fournies :" -#: howto/logging.rst:923 +#: howto/logging.rst:924 msgid "" ":class:`StreamHandler` instances send messages to streams (file-like " "objects)." @@ -1632,13 +1641,13 @@ msgstr "" "Les instances :class:`StreamHandler` envoient des messages aux flux (objets " "de type fichier)." -#: howto/logging.rst:926 +#: 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:928 +#: 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 " @@ -1651,7 +1660,7 @@ msgstr "" "directement. Utilisez plutôt :class:`~handlers.RotatingFileHandler` ou :" "class:`~handlers.TimedRotatingFileHandler`." -#: howto/logging.rst:933 +#: 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." @@ -1660,7 +1669,7 @@ msgstr "" "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:936 +#: howto/logging.rst:937 msgid "" ":class:`~handlers.TimedRotatingFileHandler` instances send messages to disk " "files, rotating the log file at certain timed intervals." @@ -1669,7 +1678,7 @@ msgstr "" "messages aux fichiers de disque, en permutant le fichier journal à " "intervalles réguliers." -#: howto/logging.rst:939 +#: howto/logging.rst:940 msgid "" ":class:`~handlers.SocketHandler` instances send messages to TCP/IP sockets. " "Since 3.4, Unix domain sockets are also supported." @@ -1678,7 +1687,7 @@ msgstr "" "connecteurs TCP/IP. Depuis 3.4, les connecteurs UNIX sont également pris en " "charge." -#: howto/logging.rst:942 +#: howto/logging.rst:943 msgid "" ":class:`~handlers.DatagramHandler` instances send messages to UDP sockets. " "Since 3.4, Unix domain sockets are also supported." @@ -1687,7 +1696,7 @@ msgstr "" "aux connecteurs UDP. Depuis 3.4, les connecteurs UNIX sont également pris en " "charge." -#: howto/logging.rst:945 +#: howto/logging.rst:946 msgid "" ":class:`~handlers.SMTPHandler` instances send messages to a designated email " "address." @@ -1695,7 +1704,7 @@ msgstr "" "Les instances de :class:`~handlers.SMTPHandler` envoient des messages à une " "adresse e-mail désignée." -#: howto/logging.rst:948 +#: howto/logging.rst:949 msgid "" ":class:`~handlers.SysLogHandler` instances send messages to a Unix syslog " "daemon, possibly on a remote machine." @@ -1703,7 +1712,7 @@ msgstr "" "Les instances de :class:`~handlers.SysLogHandler` envoient des messages à un " "*daemon* *syslog* UNIX, éventuellement sur un ordinateur distant." -#: howto/logging.rst:951 +#: howto/logging.rst:952 msgid "" ":class:`~handlers.NTEventLogHandler` instances send messages to a Windows " "NT/2000/XP event log." @@ -1711,7 +1720,7 @@ msgstr "" "Les instances de :class:`~handlers.NTEventLogHandler` envoient des messages " "à un journal des événements Windows NT/2000/XP." -#: howto/logging.rst:954 +#: howto/logging.rst:955 msgid "" ":class:`~handlers.MemoryHandler` instances send messages to a buffer in " "memory, which is flushed whenever specific criteria are met." @@ -1720,7 +1729,7 @@ msgstr "" "tampon en mémoire, qui est vidé chaque fois que des critères spécifiques " "sont remplis." -#: howto/logging.rst:957 +#: howto/logging.rst:958 msgid "" ":class:`~handlers.HTTPHandler` instances send messages to an HTTP server " "using either ``GET`` or ``POST`` semantics." @@ -1728,7 +1737,7 @@ 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:960 +#: 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 " @@ -1741,7 +1750,7 @@ msgstr "" "les systèmes de type UNIX ; Windows ne prend pas en charge le mécanisme sous-" "jacent utilisé." -#: howto/logging.rst:965 +#: 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." @@ -1750,7 +1759,7 @@ msgstr "" "file d'attente, telles que celles implémentées dans les modules :mod:`queue` " "ou :mod:`multiprocessing`." -#: howto/logging.rst:968 +#: 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 " @@ -1765,15 +1774,15 @@ msgstr "" "n'a pas configuré la journalisation. Voir :ref:`library-config` pour plus " "d'informations." -#: howto/logging.rst:974 +#: howto/logging.rst:975 msgid "The :class:`NullHandler` class." msgstr "La classe :class:`NullHandler`." -#: howto/logging.rst:977 +#: howto/logging.rst:978 msgid "The :class:`~handlers.QueueHandler` class." msgstr "La classe :class:`~handlers.QueueHandler`." -#: howto/logging.rst:980 +#: 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 " @@ -1786,7 +1795,7 @@ msgstr "" "handlers` (il existe également un autre sous-module, :mod:`logging.config`, " "pour la fonctionnalité de configuration)." -#: howto/logging.rst:985 +#: 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 " @@ -1797,7 +1806,7 @@ msgstr "" "chaîne de format appropriée pour une utilisation avec l'opérateur % et un " "dictionnaire." -#: howto/logging.rst:989 +#: 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 " @@ -1809,7 +1818,7 @@ msgstr "" "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:994 +#: 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:" @@ -1826,7 +1835,7 @@ msgstr "" "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:1001 +#: 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 " @@ -1837,11 +1846,11 @@ msgstr "" "envoyés à l'enregistreur nommé et à ses enfants sont autorisés via le filtre " "et tous les autres sont abandonnés." -#: howto/logging.rst:1009 +#: howto/logging.rst:1010 msgid "Exceptions raised during logging" msgstr "Exceptions levées par la journalisation" -#: howto/logging.rst:1011 +#: 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 " @@ -1855,7 +1864,7 @@ msgstr "" "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:1016 +#: howto/logging.rst:1017 msgid "" ":class:`SystemExit` and :class:`KeyboardInterrupt` exceptions are never " "swallowed. Other exceptions which occur during the :meth:`~Handler.emit` " @@ -1867,7 +1876,7 @@ msgstr "" "la méthode :meth:`~Handler.emit` d'une sous classe :class:`Handler` sont " "passées à sa méthode :meth:`~Handler.handleError`." -#: howto/logging.rst:1021 +#: 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`, " @@ -1880,7 +1889,7 @@ msgstr "" "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:1026 +#: 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 " @@ -1892,11 +1901,11 @@ msgstr "" "toutes les exceptions qui se produisent. Il est conseillé de définir :data:" "`raiseExceptions` à ``False`` pour une utilisation en production." -#: howto/logging.rst:1036 +#: howto/logging.rst:1037 msgid "Using arbitrary objects as messages" msgstr "Utilisation d'objets arbitraires comme messages" -#: howto/logging.rst:1038 +#: 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 " @@ -1917,11 +1926,11 @@ msgstr "" "gestionnaires :class:`~handlers.SocketHandler` émettent un événement en lui " "appliquant *pickle* et en l'envoyant sur le réseau." -#: howto/logging.rst:1049 +#: howto/logging.rst:1050 msgid "Optimization" msgstr "Optimisation" -#: howto/logging.rst:1051 +#: 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 " @@ -1940,7 +1949,7 @@ msgstr "" "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:1063 +#: 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." @@ -1949,7 +1958,7 @@ msgstr "" "les appels à :func:`expensive_func1` et :func:`expensive_func2` ne sont " "jamais faits." -#: howto/logging.rst:1066 +#: 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 " @@ -1971,7 +1980,7 @@ msgstr "" "configuration de journalisation change dynamiquement pendant l'exécution de " "l'application (ce qui est rarement le cas)." -#: howto/logging.rst:1075 +#: 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. " @@ -1984,19 +1993,19 @@ msgstr "" "vous pouvez faire pour éviter le traitement pendant la journalisation dont " "vous n'avez pas besoin :" -#: howto/logging.rst:1081 +#: howto/logging.rst:1082 msgid "What you don't want to collect" msgstr "Ce que vous ne voulez pas collecter" -#: howto/logging.rst:1081 +#: howto/logging.rst:1082 msgid "How to avoid collecting it" msgstr "Comment éviter de le collecter" -#: howto/logging.rst:1083 +#: 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:1083 +#: 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 " @@ -2007,23 +2016,23 @@ msgstr "" "comme PyPy (qui ne peut pas accélérer le code qui utilise :func:`sys." "_getframe`)." -#: howto/logging.rst:1089 +#: howto/logging.rst:1090 msgid "Threading information." msgstr "Informations de *threading*." -#: howto/logging.rst:1089 +#: howto/logging.rst:1090 msgid "Set ``logging.logThreads`` to ``False``." msgstr "Mettez ``logging.logThreads`` à ``False``." -#: howto/logging.rst:1091 +#: 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:1091 +#: howto/logging.rst:1092 msgid "Set ``logging.logProcesses`` to ``False``." msgstr "Mettez ``logging.logProcesses`` à ``False``." -#: howto/logging.rst:1093 +#: howto/logging.rst:1094 msgid "" "Current process name when using ``multiprocessing`` to manage multiple " "processes." @@ -2031,11 +2040,11 @@ msgstr "" "Nom du processus actuel, si vous vous servez de ``multiprocessing`` pour " "gérer plusieurs processus à la fois" -#: howto/logging.rst:1093 +#: howto/logging.rst:1094 msgid "Set ``logging.logMultiprocessing`` to ``False``." msgstr "Mettez ``logging.logMultiProcessing`` à ``False``." -#: howto/logging.rst:1097 +#: 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 " @@ -2045,31 +2054,31 @@ msgstr "" "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:1104 +#: howto/logging.rst:1105 msgid "Module :mod:`logging`" msgstr "Module :mod:`logging`" -#: howto/logging.rst:1104 +#: 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:1107 +#: howto/logging.rst:1108 msgid "Module :mod:`logging.config`" msgstr "Module :mod:`logging.config`" -#: howto/logging.rst:1107 +#: howto/logging.rst:1108 msgid "Configuration API for the logging module." msgstr "API de configuration pour le module de journalisation." -#: howto/logging.rst:1110 +#: howto/logging.rst:1111 msgid "Module :mod:`logging.handlers`" msgstr "Module :mod:`logging.handlers`" -#: howto/logging.rst:1110 +#: howto/logging.rst:1111 msgid "Useful handlers included with the logging module." msgstr "Gestionnaires utiles inclus avec le module de journalisation." -#: howto/logging.rst:1112 +#: howto/logging.rst:1113 msgid ":ref:`A logging cookbook `" msgstr ":ref:`A logging cookbook `" diff --git a/howto/pyporting.po b/howto/pyporting.po index 318f8ef91f..35dc7d0a07 100644 --- a/howto/pyporting.po +++ b/howto/pyporting.po @@ -150,7 +150,7 @@ msgid "" "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` " +"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 `." diff --git a/howto/regex.po b/howto/regex.po index 327a7e0ee6..4f32574eee 100644 --- a/howto/regex.po +++ b/howto/regex.po @@ -5,15 +5,15 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-01 16:00+0200\n" -"PO-Revision-Date: 2021-12-11 16:43+0100\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 2.2.3\n" +"X-Generator: Poedit 3.0.1\n" #: howto/regex.rst:5 msgid "Regular Expression HOWTO" @@ -191,7 +191,7 @@ msgstr "" "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, " +"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 " @@ -199,15 +199,16 @@ msgstr "" #: howto/regex.rst:92 msgid "" -"Metacharacters are not active inside classes. For example, ``[akm$]`` will " -"match any of the characters ``'a'``, ``'k'``, ``'m'``, or ``'$'``; ``'$'`` " -"is usually a metacharacter, but inside a character class it's stripped of " -"its special nature." +"Metacharacters (except ``\\``) are not active inside classes. For example, " +"``[akm$]`` will match any of the characters ``'a'``, ``'k'``, ``'m'``, or " +"``'$'``; ``'$'`` is usually a metacharacter, but inside a character class " +"it's stripped of its special nature." msgstr "" -"Les métacaractères ne sont pas actifs dans les classes. Par exemple, ``[akm" -"$]`` correspond à n'importe quel caractère parmi ``'a'``, ``'k'``, ``'m'`` " -"ou ``'$'`` ; ``'$'`` est habituellement un métacaractère mais dans une " -"classe de caractères, il est dépourvu de sa signification spéciale." +"Les métacaractères (à l’exception de ``\\``) ne sont pas actifs dans les " +"classes. Par exemple, ``[akm$]`` correspond à n'importe quel caractère parmi " +"``'a'``, ``'k'``, ``'m'`` ou ``'$'`` ; ``'$'`` est habituellement un " +"métacaractère mais dans une classe de caractères, il est dépourvu de sa " +"signification spéciale." #: howto/regex.rst:97 msgid "" @@ -270,9 +271,9 @@ msgstr "" "équivalent à la classe ``[a-zA-Z0-9_]``. Si l'expression régulière est une " "chaîne de caractères, ``\\w`` correspond à tous les caractères identifiés " "comme lettre dans la base de données Unicode fournie par le module :mod:" -"`unicodedata`. Vous pouvez utiliser la définition plus restrictive de ``" -"\\w`` dans un motif exprimé en chaîne de caractères en spécifiant l'option :" -"const:`re.ASCII` lors de la compilation de l'expression régulière." +"`unicodedata`. Vous pouvez utiliser la définition plus restrictive de " +"``\\w`` dans un motif exprimé en chaîne de caractères en spécifiant " +"l'option :const:`re.ASCII` lors de la compilation de l'expression régulière." #: howto/regex.rst:123 msgid "" @@ -317,8 +318,8 @@ msgstr "``\\s``" #: howto/regex.rst:137 msgid "" -"Matches any whitespace character; this is equivalent to the class ``[ \\t\\n" -"\\r\\f\\v]``." +"Matches any whitespace character; this is equivalent to the class " +"``[ \\t\\n\\r\\f\\v]``." msgstr "" "Correspond à n'importe quel caractère « blanc » ; équivalent à la classe " "``[ \\t\\n\\r\\f\\v]``." @@ -1192,8 +1193,8 @@ msgid "" "Makes several escapes like ``\\w``, ``\\b``, ``\\s`` and ``\\d`` match only " "on ASCII characters with the respective property." msgstr "" -"Transforme plusieurs échappements tels que ``\\w``, ``\\b``, ``\\s`` et ``" -"\\d`` de manière à ce qu'ils ne correspondent qu'à des caractères ASCII " +"Transforme plusieurs échappements tels que ``\\w``, ``\\b``, ``\\s`` et " +"``\\d`` de manière à ce qu'ils ne correspondent qu'à des caractères ASCII " "ayant la propriété demandée." #: howto/regex.rst:543 @@ -1253,8 +1254,8 @@ msgid "" "z]`` or ``[A-Z]`` are used in combination with the :const:`IGNORECASE` flag, " "they will match the 52 ASCII letters and 4 additional non-ASCII letters: " "'İ' (U+0130, Latin capital letter I with dot above), 'ı' (U+0131, Latin " -"small letter dotless i), 'ſ' (U+017F, Latin small letter long s) and 'K' (U" -"+212A, Kelvin sign). ``Spam`` will match ``'Spam'``, ``'spam'``, " +"small letter dotless i), 'ſ' (U+017F, Latin small letter long s) and " +"'K' (U+212A, Kelvin sign). ``Spam`` will match ``'Spam'``, ``'spam'``, " "``'spAM'``, or ``'ſpam'`` (the latter is matched only in Unicode mode). This " "lowercasing doesn't take the current locale into account; it will if you " "also set the :const:`LOCALE` flag." @@ -1269,7 +1270,7 @@ msgstr "" "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'``, " +"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:" @@ -1314,13 +1315,13 @@ msgstr "" "certaines fonctions C diront à votre programme que l'octet codant ``é`` doit " "être considéré comme une lettre. Définir l'option :const:`LOCALE` lors de la " "compilation d'une expression régulière fait que l'objet compilé résultant " -"utilise ces fonctions C pour ``\\w`` ; c'est plus lent mais cela permet à ``" -"\\w+`` de correspondre avec les mots français tel qu'attendu. L'utilisation " -"de cette option est déconseillée en Python 3 car le mécanisme de locale est " -"très peu fiable, il ne gère qu'une seule « culture » à la fois et il ne " -"fonctionne qu'avec des locales 8 bits. La correspondance Unicode est déjà " -"activée par défaut dans Python 3 pour les motifs Unicode (type *str*) et " -"elle est capable de gérer différentes configurations de régions." +"utilise ces fonctions C pour ``\\w`` ; c'est plus lent mais cela permet à " +"``\\w+`` de correspondre avec les mots français tel qu'attendu. " +"L'utilisation de cette option est déconseillée en Python 3 car le mécanisme " +"de locale est très peu fiable, il ne gère qu'une seule « culture » à la fois " +"et il ne fonctionne qu'avec des locales 8 bits. La correspondance Unicode " +"est déjà activée par défaut dans Python 3 pour les motifs Unicode (type " +"*str*) et elle est capable de gérer différentes configurations de régions." #: howto/regex.rst:605 msgid "" @@ -1593,8 +1594,8 @@ msgstr "" msgid "" "There are two subtleties you should remember when using this special " "sequence. First, this is the worst collision between Python's string " -"literals and regular expression sequences. In Python's string literals, ``" -"\\b`` is the backspace character, ASCII value 8. If you're not using raw " +"literals and regular expression sequences. In Python's string literals, " +"``\\b`` is the backspace character, ASCII value 8. If you're not using raw " "strings, then Python will convert the ``\\b`` to a backspace, and your RE " "won't match as you expect it to. The following example looks the same as our " "previous RE, but omits the ``'r'`` in front of the RE string. ::" @@ -1611,8 +1612,8 @@ msgstr "" #: howto/regex.rst:774 msgid "" -"Second, inside a character class, where there's no use for this assertion, ``" -"\\b`` represents the backspace character, for compatibility with Python's " +"Second, inside a character class, where there's no use for this assertion, " +"``\\b`` represents the backspace character, for compatibility with Python's " "string literals." msgstr "" "Ensuite, dans une classe de caractères, où cette assertion n'a pas lieu " @@ -1667,8 +1668,8 @@ msgid "" "Groups are marked by the ``'('``, ``')'`` metacharacters. ``'('`` and " "``')'`` have much the same meaning as they do in mathematical expressions; " "they group together the expressions contained inside them, and you can " -"repeat the contents of a group with a repeating qualifier, such as ``*``, ``" -"+``, ``?``, or ``{m,n}``. For example, ``(ab)*`` will match zero or more " +"repeat the contents of a group with a repeating qualifier, such as ``*``, " +"``+``, ``?``, or ``{m,n}``. For example, ``(ab)*`` will match zero or more " "repetitions of ``ab``. ::" msgstr "" "Les groupes sont délimités par les métacaractères marqueurs ``'('`` et " @@ -1788,8 +1789,8 @@ msgstr "" msgid "" "Perl 5 is well known for its powerful additions to standard regular " "expressions. For these new features the Perl developers couldn't choose new " -"single-keystroke metacharacters or new special sequences beginning with ``" -"\\`` without making Perl's regular expressions confusingly different from " +"single-keystroke metacharacters or new special sequences beginning with " +"``\\`` without making Perl's regular expressions confusingly different from " "standard REs. If they chose ``&`` as a new metacharacter, for example, old " "expressions would be assuming that ``&`` was a regular character and " "wouldn't have escaped it by writing ``\\&`` or ``[&]``." @@ -1916,8 +1917,9 @@ msgstr "" "meth:`~re.Match.groupdict` ::" #: howto/regex.rst:952 +#, fuzzy msgid "" -"Named groups are handy because they let you use easily-remembered names, " +"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 "" @@ -1939,8 +1941,8 @@ msgid "" "name instead of the number. This is another Python extension: ``(?P=name)`` " "indicates that the contents of the group called *name* should again be " "matched at the current point. The regular expression for finding doubled " -"words, ``\\b(\\w+)\\s+\\1\\b`` can also be written as ``\\b(?P\\w+)\\s" -"+(?P=word)\\b``::" +"words, ``\\b(\\w+)\\s+\\1\\b`` can also be written as ``\\b(?" +"P\\w+)\\s+(?P=word)\\b``::" msgstr "" "La syntaxe des renvois dans une expression telle que ``(....)\\1`` fait " "référence au numéro du groupe. Il y a naturellement une variante qui utilise " @@ -2109,11 +2111,11 @@ msgstr "Une assertion prédictive négative supprime toute cette confusion :" #: howto/regex.rst:1042 msgid "" "``.*[.](?!bat$)[^.]*$`` The negative lookahead means: if the expression " -"``bat`` doesn't match at this point, try the rest of the pattern; if ``bat" -"$`` does match, the whole pattern will fail. The trailing ``$`` is required " -"to ensure that something like ``sample.batch``, where the extension only " -"starts with ``bat``, will be allowed. The ``[^.]*`` makes sure that the " -"pattern works when there are multiple dots in the filename." +"``bat`` doesn't match at this point, try the rest of the pattern; if " +"``bat$`` does match, the whole pattern will fail. The trailing ``$`` is " +"required to ensure that something like ``sample.batch``, where the extension " +"only starts with ``bat``, will be allowed. The ``[^.]*`` makes sure that " +"the pattern works when there are multiple dots in the filename." msgstr "" "``.*[.](?!bat$)[^.]*$`` Cette assertion prédictive négative signifie : si " "l'expression ``bat`` ne correspond pas à cet emplacement, essaie le reste du " @@ -2319,9 +2321,9 @@ msgstr "" msgid "" "If *replacement* is a string, any backslash escapes in it are processed. " "That is, ``\\n`` is converted to a single newline character, ``\\r`` is " -"converted to a carriage return, and so forth. Unknown escapes such as ``" -"\\&`` are left alone. Backreferences, such as ``\\6``, are replaced with the " -"substring matched by the corresponding group in the RE. This lets you " +"converted to a carriage return, and so forth. Unknown escapes such as " +"``\\&`` are left alone. Backreferences, such as ``\\6``, are replaced with " +"the substring matched by the corresponding group in the RE. This lets you " "incorporate portions of the original text in the resulting replacement " "string." msgstr "" @@ -2356,9 +2358,9 @@ msgstr "" "par la syntaxe ``(?P....)``. ``\\g`` utilise la sous-chaîne " "correspondante au groupe nommé ``nom`` et ``\\g`` utilise le numéro " "de groupe correspondant. ``\\g<2>`` est donc l'équivalent de ``\\2``, mais " -"n'est pas ambigu dans une chaîne de substitution telle que ``\\g<2>0`` (``" -"\\20`` serait interprété comme une référence au groupe 20 et non comme une " -"référence au groupe 2 suivie du caractère littéral ``'0'``). Les " +"n'est pas ambigu dans une chaîne de substitution telle que ``\\g<2>0`` " +"(``\\20`` serait interprété comme une référence au groupe 20 et non comme " +"une référence au groupe 2 suivie du caractère littéral ``'0'``). Les " "substitutions suivantes sont toutes équivalentes mais utilisent les trois " "variantes de la chaîne de remplacement. ::" diff --git a/howto/sockets.po b/howto/sockets.po index ccf9d03b28..277c89c71b 100644 --- a/howto/sockets.po +++ b/howto/sockets.po @@ -5,8 +5,8 @@ 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-16 02:37+0100\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" @@ -472,48 +472,51 @@ msgstr "Données binaires" 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, a Motorola chip will represent a 16 bit integer with the value 1 as " -"the two hex bytes 00 01. Intel and DEC, however, are byte-reversed - that " -"same 1 is 01 00. Socket libraries have calls for converting 16 and 32 bit " -"integers - ``ntohl, htonl, ntohs, htons`` where \"n\" means *network* and \"h" -"\" means *host*, \"s\" means *short* and \"l\" means *long*. Where network " -"order is host order, these do nothing, but where the machine is byte-" -"reversed, these swap the bytes around appropriately." -msgstr "" -"Il est parfaitement possible d’envoyer des données binaires sur un " -"connecteur. Le gros problème est que toutes les machines n’utilisent pas les " -"mêmes formats pour les données binaires. Par exemple, une puce Motorola code " -"l'entier 1, sous 16 bits, comme les deux octets hexadécimaux 00 01. Intel et " -"DEC, cependant, utilisent l’ordre d’octets inverse — ce même 1 est codé 01 " -"00. Les bibliothèques de connecteurs ont des appels pour convertir des " -"entiers de 16 et 32 bits — ``ntohl, htonl, ntohs, htons`` où ``n`` signifie " -"*réseau* (*network*, en anglais) et ``h`` signifie *hôte*, ``s`` signifie " -"*court* (*short*, en anglais) et ``l`` signifie *long*. Lorsque l’ordre du " -"réseau est l’ordre de l’hôte, ceux-ci ne font rien, mais lorsque la machine " -"utilise l’ordre d’octets inverse, ceux-ci échangent les octets de manière " -"appropriée." - -#: howto/sockets.rst:264 -msgid "" -"In these days of 32 bit machines, the ascii representation of binary data is " +"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, all those longs have the value 0, or maybe 1. " -"The string \"0\" would be two bytes, while binary is four. Of course, this " -"doesn't fit well with fixed-length messages. Decisions, decisions." +"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 32 bits, la représentation *ASCII* des " +"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 qu’un nombre surprenant de fois, tous ces *longs* ont la valeur " -"0, ou peut-être 1. La chaîne « 0 » serait codée sur deux octets, alors " -"qu'elle le serait sur quatre en binaire. Bien sûr, cela ne fonctionne pas " -"très bien avec les messages de longueur fixe. Ah, les décisions, les " -"décisions…" +"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:272 +#: howto/sockets.rst:277 msgid "Disconnecting" msgstr "Déconnexion" -#: howto/sockets.rst:274 +#: 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 " @@ -534,7 +537,7 @@ msgstr "" "un ``close`` est équivalent à ``shutdown() ; close()``. Ainsi, dans la " "plupart des situations, un ``shutdown`` explicite n’est pas nécessaire." -#: howto/sockets.rst:282 +#: 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 " @@ -551,7 +554,7 @@ msgstr "" "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:289 +#: 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 " @@ -568,11 +571,11 @@ msgstr "" "suspendu indéfiniment, pensant que vous êtes juste lent. Fermez vos " "connecteurs quand vous avez terminé *s’il vous plaît*." -#: howto/sockets.rst:297 +#: howto/sockets.rst:302 msgid "When Sockets Die" msgstr "Quand les connecteurs meurent" -#: howto/sockets.rst:299 +#: 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 " @@ -600,11 +603,11 @@ msgstr "" "ressources. En d'autres termes, si vous parvenez à tuer le fil, tout votre " "processus risque d'être foutu." -#: howto/sockets.rst:313 +#: howto/sockets.rst:318 msgid "Non-blocking Sockets" msgstr "Connecteurs non bloquants" -#: howto/sockets.rst:315 +#: 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 " @@ -616,7 +619,7 @@ msgstr "" "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:320 +#: 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 " @@ -633,7 +636,7 @@ msgstr "" "avoir créé le connecteur mais avant de l’utiliser (en fait, si vous êtes " "fou, vous pouvez alterner)." -#: howto/sockets.rst:327 +#: 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 " @@ -642,7 +645,7 @@ msgid "" "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``, " +"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 " @@ -650,11 +653,11 @@ msgstr "" "vampiriser le processeur. Alors, évitons les solutions vouées à l’échec dès " "le départ et faisons les choses correctement." -#: howto/sockets.rst:334 +#: howto/sockets.rst:339 msgid "Use ``select``." msgstr "Utilisation de ``select``." -#: howto/sockets.rst:336 +#: 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 " @@ -664,7 +667,7 @@ msgstr "" "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:347 +#: 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 " @@ -684,7 +687,7 @@ msgstr "" "d'attente (disons une minute), à moins que vous n'ayez une bonne raison de " "ne pas le faire." -#: howto/sockets.rst:355 +#: 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 " @@ -695,7 +698,7 @@ msgstr "" "est un sous-ensemble (éventuellement vide) de la liste correspondante que " "vous avez transmise." -#: howto/sockets.rst:359 +#: 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 " @@ -713,7 +716,7 @@ msgstr "" "des connecteurs inscriptibles — cela signifie simplement que l'espace tampon " "réseau sortant est disponible)." -#: howto/sockets.rst:366 +#: 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) " @@ -730,7 +733,7 @@ msgstr "" "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:372 +#: 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 " @@ -744,7 +747,7 @@ msgstr "" "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:377 +#: 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 " diff --git a/howto/sorting.po b/howto/sorting.po index 6be66f4b45..c38f72ce59 100644 --- a/howto/sorting.po +++ b/howto/sorting.po @@ -5,15 +5,15 @@ 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 19:48+0100\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\n" +"X-Generator: Poedit 3.0.1\n" #: howto/sorting.rst:4 msgid "Sorting HOW TO" @@ -58,13 +58,12 @@ msgid "Sorting Basics" msgstr "Les bases du tri" #: howto/sorting.rst:20 -#, fuzzy 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 ::" +"func:`sorted`. Elle renvoie une nouvelle liste triée :" #: howto/sorting.rst:28 msgid "" @@ -419,17 +418,25 @@ msgstr "" #: howto/sorting.rst:328 msgid "" -"The sort routines are guaranteed to use :meth:`__lt__` when making " -"comparisons between two objects. So, it is easy to add a standard sort order " -"to a class by defining an :meth:`__lt__` method:" +"The sort routines use ``<`` when making comparisons between two objects. So, " +"it is easy to add a standard sort order to a class by defining an :meth:" +"`__lt__` method:" msgstr "" -"Il est garanti que les routines de tri utilisent les méthodes :meth:`__lt__` " -"lorsqu'elles effectuent des comparaisons entre deux objets. Donc il est " -"facile d'ajouter un ordre de tri standard à une classe en définissant sa " -"méthode :meth:`__lt__` ::" +"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 " diff --git a/howto/unicode.po b/howto/unicode.po index 172cb2e367..b53b59b17a 100644 --- a/howto/unicode.po +++ b/howto/unicode.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-09-23 16:16+0200\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" @@ -111,8 +111,8 @@ msgstr "" "entre ``0`` et ``0x10FFFF`` (environ 1,1 million de valeurs possibles, le " "`nombre de valeurs réellement assignées `_ est inférieur à ce nombre). Dans le standard et dans le " -"présent document, un point de code est écrit en utilisant la notation ``U" -"+265E`` pour désigner le caractère avec la valeur ``0x265e`` (9 822 en " +"présent document, un point de code est écrit en utilisant la notation " +"``U+265E`` pour désigner le caractère avec la valeur ``0x265e`` (9 822 en " "décimal)." #: howto/unicode.rst:50 @@ -357,9 +357,10 @@ msgstr "" "v=MijmeoH9LT4>`_ (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 " +"guide `_ to reading the Unicode " "character tables." msgstr "" "Pour aider à comprendre le standard, Jukka Korpela a écrit `un guide " @@ -535,8 +536,8 @@ msgstr "" "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{...}``)." +"(insère une séquence ``\\uNNNN``) et ``namereplace`` (insère une séquence " +"``\\N{...}``)." #: howto/unicode.rst:280 msgid "The following example shows the different results::" @@ -572,8 +573,8 @@ msgid "" msgstr "" "Dans le code source Python, des points de code Unicode spécifiques peuvent " "être écrits en utilisant la séquence d'échappement ``\\u``, suivie de quatre " -"chiffres hexadécimaux donnant le point de code. La séquence d'échappement ``" -"\\U`` est similaire, mais attend huit chiffres hexadécimaux, pas quatre ::" +"chiffres hexadécimaux donnant le point de code. La séquence d'échappement " +"``\\U`` est similaire, mais attend huit chiffres hexadécimaux, pas quatre ::" #: howto/unicode.rst:324 msgid "" @@ -709,11 +710,11 @@ msgstr "" "Unicode ajoute une certaine complication à la comparaison des chaînes de " "caractères, car le même jeu de caractères peut être représenté par " "différentes séquences de points de code. Par exemple, une lettre comme « ê » " -"peut être représentée comme un point de code unique ``U+00EA``, ou comme ``U" -"+0065 U+0302``, qui est le point de code pour « e » suivi d'un point de code " -"pour ``COMBINING CIRCUMFLEX ACCENT``. Celles-ci produisent le même résultat " -"lorsqu'elles sont affichées, mais l'une est une chaîne de caractères de " -"longueur 1 et l'autre de longueur 2." +"peut être représentée comme un point de code unique ``U+00EA``, ou comme " +"``U+0065 U+0302``, qui est le point de code pour « e » suivi d'un point de " +"code pour ``COMBINING CIRCUMFLEX ACCENT``. Celles-ci produisent le même " +"résultat lorsqu'elles sont affichées, mais l'une est une chaîne de " +"caractères de longueur 1 et l'autre de longueur 2." #: howto/unicode.rst:412 msgid "" @@ -835,8 +836,9 @@ msgstr "" "sont :" #: howto/unicode.rst:520 +#, fuzzy msgid "" -"`Processing Text Files in Python 3 `_, by Nick Coghlan." msgstr "" "`Processing Text Files in Python 3 `_, a PyCon 2010 talk by David " "Beazley, discusses text processing and binary data handling." msgstr "" @@ -1264,8 +1267,9 @@ msgstr "" "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 "" diff --git a/howto/urllib2.po b/howto/urllib2.po index 906bd8ef2c..4be438a1de 100644 --- a/howto/urllib2.po +++ b/howto/urllib2.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-02-24 17:33+0100\n" +"POT-Creation-Date: 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" @@ -24,14 +24,15 @@ msgid "Author" msgstr "Auteur" #: howto/urllib2.rst:7 -msgid "`Michael Foord `_" +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 `_." +"available at `urllib2 - Le Manuel manquant `_." msgstr "" #: howto/urllib2.rst:18 @@ -46,8 +47,8 @@ msgstr "" #: howto/urllib2.rst:25 msgid "" -"`Basic Authentication `_" +"`Basic Authentication `_" msgstr "" #: howto/urllib2.rst:27 @@ -130,8 +131,8 @@ msgid "" "In the case of HTTP, there are two extra things that Request objects allow " "you to do: First, you can pass data to be sent to the server. Second, you " "can pass extra information (\"metadata\") *about* the data or about the " -"request itself, to the server - this information is sent as HTTP \"headers" -"\". Let's look at each of these in turn." +"request itself, to the server - this information is sent as HTTP " +"\"headers\". Let's look at each of these in turn." msgstr "" #: howto/urllib2.rst:105 @@ -355,7 +356,7 @@ 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 " +"`Quick Reference to HTTP Headers `_ for a " "useful listing of HTTP headers with brief explanations of their meaning and " "use." msgstr "" @@ -367,7 +368,7 @@ 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 " +"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 " @@ -481,10 +482,10 @@ msgstr "" #: howto/urllib2.rst:522 msgid "" "``top_level_url`` is in fact *either* a full URL (including the 'http:' " -"scheme component and the hostname and optionally the port number) e.g. ``" -"\"http://example.com/\"`` *or* an \"authority\" (i.e. the hostname, " -"optionally including the port number) e.g. ``\"example.com\"`` or ``" -"\"example.com:8080\"`` (the latter example includes a port number). The " +"scheme component and the hostname and optionally the port number) e.g. " +"``\"http://example.com/\"`` *or* an \"authority\" (i.e. the hostname, " +"optionally including the port number) e.g. ``\"example.com\"`` or " +"``\"example.com:8080\"`` (the latter example includes a port number). The " "authority, if present, must NOT contain the \"userinfo\" component - for " "example ``\"joe:password@example.com\"`` is not correct." msgstr "" diff --git a/install/index.po b/install/index.po index a34b6fbefb..f7772cf921 100644 --- a/install/index.po +++ b/install/index.po @@ -5,8 +5,8 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-09-23 16:16+0200\n" -"PO-Revision-Date: 2021-12-11 17:18+0100\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" @@ -126,13 +126,14 @@ 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`. " +"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 " @@ -471,8 +472,8 @@ msgstr "" #: 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." +"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." @@ -705,7 +706,7 @@ msgstr "" "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`)." +"partagées chargeables à l'exécution (``rpath``)." #: install/index.rst:352 msgid "Alternate installation: the home scheme" @@ -1290,7 +1291,7 @@ msgstr "" #: install/index.rst:744 msgid ":file:`{prefix}/lib/python{ver}/distutils/distutils.cfg`" -msgstr "" +msgstr ":file:`{prefix}/lib/python{ver}/distutils/distutils.cfg`" #: install/index.rst:758 msgid "personal" @@ -1298,7 +1299,7 @@ msgstr "" #: install/index.rst:746 msgid ":file:`$HOME/.pydistutils.cfg`" -msgstr "" +msgstr ":file:`$HOME/.pydistutils.cfg`" #: install/index.rst:760 msgid "local" @@ -1306,7 +1307,7 @@ msgstr "" #: install/index.rst:760 msgid ":file:`setup.cfg`" -msgstr "" +msgstr ":file:`setup.cfg`" #: install/index.rst:760 msgid "\\(3)" @@ -1318,7 +1319,7 @@ msgstr "" #: install/index.rst:756 msgid ":file:`{prefix}\\\\Lib\\\\distutils\\\\distutils.cfg`" -msgstr "" +msgstr ":file:`{prefix}\\\\Lib\\\\distutils\\\\distutils.cfg`" #: install/index.rst:756 msgid "\\(4)" @@ -1326,7 +1327,7 @@ msgstr "\\(4)" #: install/index.rst:758 msgid ":file:`%HOME%\\\\pydistutils.cfg`" -msgstr "" +msgstr ":file:`%HOME%\\\\pydistutils.cfg`" #: install/index.rst:758 msgid "\\(5)" @@ -1335,7 +1336,7 @@ msgstr "\\(5)" #: install/index.rst:763 msgid "" "On all platforms, the \"personal\" file can be temporarily disabled by " -"passing the `--no-user-cfg` option." +"passing the ``--no-user-cfg`` option." msgstr "" #: install/index.rst:769 @@ -1548,9 +1549,9 @@ msgid "" "appended to the proper command line, so in the above example the compiler " "will be passed the :option:`!-o32` option, and the linker will be passed :" "option:`!-shared`. If a compiler option requires an argument, you'll have " -"to supply multiple :option:`!-Xcompiler` options; for example, to pass ``-x c" -"++`` the :file:`Setup` file would have to contain ``-Xcompiler -x -Xcompiler " -"c++``." +"to supply multiple :option:`!-Xcompiler` options; for example, to pass ``-x " +"c++`` the :file:`Setup` file would have to contain ``-Xcompiler -x -" +"Xcompiler c++``." msgstr "" #: install/index.rst:936 @@ -1721,8 +1722,8 @@ msgstr "" #: install/index.rst:1065 msgid "" -"`Building Python modules on MS Windows platform with MinGW `_" +"`Building Python modules on MS Windows platform with MinGW `_" msgstr "" #: install/index.rst:1066 diff --git a/installing/index.po b/installing/index.po index 6747e43ddd..b70294c3d2 100644 --- a/installing/index.po +++ b/installing/index.po @@ -5,15 +5,15 @@ 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: 2019-12-15 21:18+0100\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 2.2.4\n" +"X-Generator: Poedit 3.0.1\n" #: installing/index.rst:7 msgid "Installing Python Modules" @@ -117,7 +117,6 @@ msgstr "" "capables d'installer automatiquement ``pip`` dans les environnements créés." #: installing/index.rst:47 -#, fuzzy msgid "" "The `Python Package Index `__ is a public repository of " "open source licensed packages made available for use by other Python users." @@ -187,7 +186,6 @@ msgstr "" "utilisés à partir de la ligne de commande." #: installing/index.rst:80 -#, fuzzy msgid "" "The following command will install the latest version of a module and its " "dependencies from the Python Package Index::" @@ -196,7 +194,6 @@ msgstr "" "dépendances depuis le *Python Package Index* ::" #: installing/index.rst:87 -#, fuzzy msgid "" "For POSIX users (including macOS and Linux users), the examples in this " "guide assume the use of a :term:`virtual environment`." @@ -342,7 +339,6 @@ msgstr "" "... Travailler avec plusieurs versions de Python installés en parallèle ?" #: installing/index.rst:166 -#, fuzzy 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 " @@ -411,10 +407,11 @@ msgstr "" "est ::" #: installing/index.rst:216 +#, fuzzy msgid "" "There are also additional resources for `installing pip. `__" +"python.org/en/latest/tutorials/installing-packages/#ensure-pip-setuptools-" +"and-wheel-are-up-to-date>`__" msgstr "" "Voir aussi `installing pip. `__" @@ -434,7 +431,6 @@ msgstr "" "l'installation, les modules d'extension à partir des sources." #: installing/index.rst:227 -#, fuzzy msgid "" "With the introduction of support for the binary ``wheel`` format, and the " "ability to publish wheels for at least Windows and macOS through the Python " diff --git a/library/2to3.po b/library/2to3.po index aa46413a4b..f41984e0a6 100644 --- a/library/2to3.po +++ b/library/2to3.po @@ -5,8 +5,8 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-12-31 11:33+0100\n" -"PO-Revision-Date: 2021-04-29 13:57+0200\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" @@ -16,7 +16,8 @@ msgstr "" "X-Generator: Poedit 2.4.1\n" #: library/2to3.rst:4 -msgid "2to3 - Automated Python 2 to 3 code translation" +#, 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 @@ -206,10 +207,10 @@ msgid "" 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 `!-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." +"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." @@ -767,7 +768,8 @@ msgstr "" "désactivé lorsque ``from future_builtins import zip`` apparaît." #: library/2to3.rst:455 -msgid ":mod:`lib2to3` - 2to3's library" +#, fuzzy +msgid ":mod:`lib2to3` --- 2to3's library" msgstr ":mod:`lib2to3` — la bibliothèque de *2to3*" #: library/2to3.rst:464 diff --git a/library/__future__.po b/library/__future__.po index d450846022..10a982de9c 100644 --- a/library/__future__.po +++ b/library/__future__.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-09-23 16:16+0200\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" @@ -277,21 +277,35 @@ msgid "3.7.0b1" msgstr "3.7.0b1" #: library/__future__.rst:93 -msgid "3.11" -msgstr "3.11" +msgid "TBD [1]_" +msgstr "" #: library/__future__.rst:93 msgid ":pep:`563`: *Postponed evaluation of annotations*" msgstr ":pep:`563` : *Évaluation différée des annotations*" -#: library/__future__.rst:102 +#: library/__future__.rst:100 +msgid "" +"``from __future__ import annotations`` was previously scheduled to become " +"mandatory in Python 3.10, but the Python Steering Council twice decided to " +"delay the change (`announcement for Python 3.10 `__; `announcement for Python 3.11 `__). No " +"final decision has been made yet. See also :pep:`563` and :pep:`649`." +msgstr "" + +#: library/__future__.rst:110 msgid ":ref:`future`" msgstr ":ref:`future`" -#: library/__future__.rst:103 +#: library/__future__.rst:111 msgid "How the compiler treats future imports." msgstr "Comment le compilateur gère les importations « futures »." +#~ msgid "3.11" +#~ msgstr "3.11" + #~ msgid "3.10" #~ msgstr "3.10" diff --git a/library/__main__.po b/library/__main__.po index 1e303bd354..d20f72b6d4 100644 --- a/library/__main__.po +++ b/library/__main__.po @@ -5,15 +5,15 @@ 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-10-28 17:30+0200\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\n" +"X-Generator: Poedit 3.0.1\n" #: library/__main__.rst:2 msgid ":mod:`__main__` --- Top-level code environment" @@ -121,7 +121,9 @@ msgid "" 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 ». +# 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 :" @@ -163,7 +165,6 @@ msgid "Idiomatic Usage" msgstr "Utilisation idiomatique" #: library/__main__.rst:118 -#, fuzzy 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 " @@ -330,7 +331,6 @@ msgstr "" "données ::" #: library/__main__.rst:233 -#, fuzzy msgid "" "Note that ``from .student import search_students`` is an example of a " "relative import. This import style can be used when referencing modules " @@ -369,17 +369,18 @@ msgstr "" 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 above are preferred." +"`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-dessous." +"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 ``python3 -m venv [directory]``." +"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__ == " diff --git a/library/_thread.po b/library/_thread.po index 4954327782..28e6346983 100644 --- a/library/_thread.po +++ b/library/_thread.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-09-23 16:16+0200\n" +"POT-Creation-Date: 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" @@ -262,11 +262,12 @@ msgstr "" "acquérir le verrou — c'est leur raison d'être)." #: library/_thread.rst:164 +#, fuzzy msgid "" -"If the integer *waitflag* argument is present, the action depends on its " -"value: if it is zero, the lock is only acquired if it can be acquired " -"immediately without waiting, while if it is nonzero, the lock is acquired " -"unconditionally as above." +"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 " @@ -274,11 +275,12 @@ msgstr "" "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 *waitflag* is zero." +"*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 " diff --git a/library/abc.po b/library/abc.po index 7dc029350d..e585b9e3e8 100644 --- a/library/abc.po +++ b/library/abc.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-09-23 16:16+0200\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" @@ -40,12 +40,13 @@ msgstr "" "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 " -"hashable or if it is a mapping." +"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 " @@ -106,9 +107,9 @@ msgstr "" "Utilisez cette métaclasse pour créer une ABC. Il est possible d'hériter " "d'une ABC directement, cette classe de base abstraite fonctionne alors comme " "une classe *mixin*. Vous pouvez également enregistrer une classe concrète " -"sans lien (même une classe native) et des ABC comme \"sous-classes virtuelles" -"\" -- celles-ci et leur descendantes seront considérées comme des sous-" -"classes de la classe de base abstraite par la fonction native :func:" +"sans lien (même une classe native) et des ABC comme \"sous-classes " +"virtuelles\" -- celles-ci et leur descendantes seront considérées comme des " +"sous-classes de la classe de base abstraite par la fonction native :func:" "`issubclass`, mais les ABC enregistrées n'apparaitront pas dans leur ordre " "de résolution des méthodes (*MRO* pour *Method Resolution Order* en " "anglais). Les implémentations de méthodes définies par l'ABC ne seront pas " diff --git a/library/aifc.po b/library/aifc.po index a10b27b3f3..0e1b0350c7 100644 --- a/library/aifc.po +++ b/library/aifc.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-01 16:00+0200\n" +"POT-Creation-Date: 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" @@ -18,19 +18,25 @@ msgstr "" msgid ":mod:`aifc` --- Read and write AIFF and AIFC files" msgstr ":mod:`aifc` — Lis et écrit dans les fichiers AIFF et AIFC" -#: library/aifc.rst:7 +#: library/aifc.rst:8 msgid "**Source code:** :source:`Lib/aifc.py`" msgstr "**Code source:** :source:`Lib/aifc.py`" #: library/aifc.rst:16 msgid "" +"The :mod:`aifc` module is deprecated (see :pep:`PEP 594 <594#aifc>` for " +"details)." +msgstr "" + +#: library/aifc.rst:22 +msgid "" "This module provides support for reading and writing AIFF and AIFF-C files. " "AIFF is Audio Interchange File Format, a format for storing digital audio " "samples in a file. AIFF-C is a newer version of the format that includes " "the ability to compress the audio data." msgstr "" -#: library/aifc.rst:21 +#: library/aifc.rst:27 msgid "" "Audio files have a number of parameters that describe the audio data. The " "sampling rate or frame rate is the number of times per second the sound is " @@ -41,7 +47,7 @@ msgid "" "samplesize * framerate`` bytes." msgstr "" -#: library/aifc.rst:29 +#: library/aifc.rst:35 msgid "" "For example, CD quality audio has a sample size of two bytes (16 bits), uses " "two channels (stereo) and has a frame rate of 44,100 frames/second. This " @@ -49,11 +55,11 @@ msgid "" "2\\*2\\*44100 bytes (176,400 bytes)." msgstr "" -#: library/aifc.rst:34 +#: library/aifc.rst:40 msgid "Module :mod:`aifc` defines the following function:" msgstr "Le module :mod:`aifc` définit les fonctions suivantes :" -#: library/aifc.rst:39 +#: library/aifc.rst:45 msgid "" "Open an AIFF or AIFF-C file and return an object instance with methods that " "are described below. The argument *file* is either a string naming a file " @@ -67,48 +73,48 @@ msgid "" "keyword:`!with` block completes, the :meth:`~aifc.close` method is called." msgstr "" -#: library/aifc.rst:50 +#: library/aifc.rst:56 msgid "Support for the :keyword:`with` statement was added." msgstr "La prise en charge de l'instruction :keyword:`with` a été ajoutée." -#: library/aifc.rst:53 +#: library/aifc.rst:59 msgid "" "Objects returned by :func:`.open` when a file is opened for reading have the " "following methods:" msgstr "" -#: library/aifc.rst:59 +#: library/aifc.rst:65 #, fuzzy msgid "Return the number of audio channels (1 for mono, 2 for stereo)." msgstr "" "Renvoie le nombre de canaux audio (``1`` pour mono, ``2`` pour stéréo)." -#: library/aifc.rst:64 +#: library/aifc.rst:70 msgid "Return the size in bytes of individual samples." msgstr "Donne la taille en octets des échantillons, individuellement." -#: library/aifc.rst:69 +#: library/aifc.rst:75 msgid "Return the sampling rate (number of audio frames per second)." msgstr "" -#: library/aifc.rst:74 +#: library/aifc.rst:80 msgid "Return the number of audio frames in the file." msgstr "Donne le nombre de trames (*frames*) audio du fichier." -#: library/aifc.rst:79 +#: library/aifc.rst:85 msgid "" "Return a bytes array of length 4 describing the type of compression used in " "the audio file. For AIFF files, the returned value is ``b'NONE'``." msgstr "" -#: library/aifc.rst:86 +#: library/aifc.rst:92 msgid "" "Return a bytes array convertible to a human-readable description of the type " "of compression used in the audio file. For AIFF files, the returned value " "is ``b'not compressed'``." msgstr "" -#: library/aifc.rst:93 +#: library/aifc.rst:99 msgid "" "Returns a :func:`~collections.namedtuple` ``(nchannels, sampwidth, " "framerate, nframes, comptype, compname)``, equivalent to output of the :meth:" @@ -118,7 +124,7 @@ msgstr "" "framerate, nframes, comptype, compname)``, équivalent à la sortie des " "méthodes :meth:`get\\*`." -#: library/aifc.rst:100 +#: library/aifc.rst:106 msgid "" "Return a list of markers in the audio file. A marker consists of a tuple of " "three elements. The first is the mark ID (an integer), the second is the " @@ -126,40 +132,40 @@ msgid "" "third is the name of the mark (a string)." msgstr "" -#: library/aifc.rst:108 +#: library/aifc.rst:114 msgid "" "Return the tuple as described in :meth:`getmarkers` for the mark with the " "given *id*." msgstr "" -#: library/aifc.rst:114 +#: library/aifc.rst:120 msgid "" "Read and return the next *nframes* frames from the audio file. The returned " "data is a string containing for each frame the uncompressed samples of all " "channels." msgstr "" -#: library/aifc.rst:121 +#: library/aifc.rst:127 msgid "" "Rewind the read pointer. The next :meth:`readframes` will start from the " "beginning." msgstr "" -#: library/aifc.rst:127 +#: library/aifc.rst:133 msgid "Seek to the specified frame number." msgstr "Va à la trame de numéro donné." -#: library/aifc.rst:132 +#: library/aifc.rst:138 msgid "Return the current frame number." msgstr "Donne le numéro de la trame courante." -#: library/aifc.rst:137 +#: library/aifc.rst:143 msgid "" "Close the AIFF file. After calling this method, the object can no longer be " "used." msgstr "" -#: library/aifc.rst:140 +#: library/aifc.rst:146 msgid "" "Objects returned by :func:`.open` when a file is opened for writing have all " "the above methods, except for :meth:`readframes` and :meth:`setpos`. In " @@ -169,40 +175,40 @@ msgid "" "parameters except for the number of frames must be filled in." msgstr "" -#: library/aifc.rst:150 +#: library/aifc.rst:156 msgid "" "Create an AIFF file. The default is that an AIFF-C file is created, unless " "the name of the file ends in ``'.aiff'`` in which case the default is an " "AIFF file." msgstr "" -#: library/aifc.rst:156 +#: library/aifc.rst:162 msgid "" "Create an AIFF-C file. The default is that an AIFF-C file is created, " "unless the name of the file ends in ``'.aiff'`` in which case the default is " "an AIFF file." msgstr "" -#: library/aifc.rst:163 +#: library/aifc.rst:169 msgid "Specify the number of channels in the audio file." msgstr "Définit le nombre de canaux du fichier audio." -#: library/aifc.rst:168 +#: library/aifc.rst:174 msgid "Specify the size in bytes of audio samples." msgstr "Définit la taille en octets des échantillons audio." -#: library/aifc.rst:173 +#: library/aifc.rst:179 msgid "Specify the sampling frequency in frames per second." msgstr "" -#: library/aifc.rst:178 +#: library/aifc.rst:184 msgid "" "Specify the number of frames that are to be written to the audio file. If " "this parameter is not set, or not set correctly, the file needs to support " "seeking." msgstr "" -#: library/aifc.rst:189 +#: library/aifc.rst:195 msgid "" "Specify the compression type. If not specified, the audio data will not be " "compressed. In AIFF files, compression is not possible. The name parameter " @@ -212,42 +218,42 @@ msgid "" "``b'ALAW'``, ``b'G722'``." msgstr "" -#: library/aifc.rst:199 +#: library/aifc.rst:205 msgid "" "Set all the above parameters at once. The argument is a tuple consisting of " "the various parameters. This means that it is possible to use the result of " "a :meth:`getparams` call as argument to :meth:`setparams`." msgstr "" -#: library/aifc.rst:206 +#: library/aifc.rst:212 msgid "" "Add a mark with the given id (larger than 0), and the given name at the " "given position. This method can be called at any time before :meth:`close`." msgstr "" -#: library/aifc.rst:213 +#: library/aifc.rst:219 msgid "" "Return the current write position in the output file. Useful in combination " "with :meth:`setmark`." msgstr "" -#: library/aifc.rst:219 +#: library/aifc.rst:225 msgid "" "Write data to the output file. This method can only be called after the " "audio file parameters have been set." msgstr "" -#: library/aifc.rst:231 +#: library/aifc.rst:237 msgid "Any :term:`bytes-like object` is now accepted." msgstr "N'importe quel :term:`bytes-like object` est maintenant accepté." -#: library/aifc.rst:228 +#: library/aifc.rst:234 msgid "" "Like :meth:`writeframes`, except that the header of the audio file is not " "updated." msgstr "" -#: library/aifc.rst:238 +#: library/aifc.rst:244 msgid "" "Close the AIFF file. The header of the file is updated to reflect the " "actual size of the audio data. After calling this method, the object can no " diff --git a/library/argparse.po b/library/argparse.po index a18107a540..f296821b1c 100644 --- a/library/argparse.po +++ b/library/argparse.po @@ -5,15 +5,15 @@ 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-11-06 20:20+0100\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 3.0\n" +"X-Generator: Poedit 2.4.2\n" #: library/argparse.rst:2 msgid "" @@ -192,10 +192,12 @@ msgstr "" "détaillée ci-dessous, mais en résumé ils sont :" #: library/argparse.rst:151 -msgid "prog_ - The name of the program (default: ``sys.argv[0]``)" -msgstr "prog_ – Nom du programme (par défaut : ``sys.argv[0]``) ;" +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:153 +#: library/argparse.rst:154 msgid "" "usage_ - The string describing the program usage (default: generated from " "arguments added to parser)" @@ -203,18 +205,19 @@ 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:156 -msgid "description_ - Text to display before the argument help (default: none)" +#: library/argparse.rst:157 +msgid "" +"description_ - Text to display before the argument help (by default, no text)" msgstr "" -"description_ – Texte à afficher avant l'aide des arguments (par défaut : " -"vide) ;" +"description_ – Texte à afficher au dessus de l'aide pour les arguments (vide " +"par défaut) ;" -#: library/argparse.rst:158 -msgid "epilog_ - Text to display after the argument help (default: none)" +#: 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 (par défaut : vide) ;" +"epilog_ – Texte à afficher après l'aide des arguments (vide par défaut) ;" -#: library/argparse.rst:160 +#: library/argparse.rst:162 msgid "" "parents_ - A list of :class:`ArgumentParser` objects whose arguments should " "also be included" @@ -222,12 +225,12 @@ msgstr "" "parents_ – Liste d'objets :class:`ArgumentParser` contenant des arguments " "qui devraient aussi être inclus ;" -#: library/argparse.rst:163 +#: 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:165 +#: library/argparse.rst:167 msgid "" "prefix_chars_ - The set of characters that prefix optional arguments " "(default: '-')" @@ -235,7 +238,7 @@ msgstr "" "prefix_chars_ – Jeu de caractères qui précède les arguments optionnels (par " "défaut : ``'-'``) ;" -#: library/argparse.rst:168 +#: library/argparse.rst:170 msgid "" "fromfile_prefix_chars_ - The set of characters that prefix files from which " "additional arguments should be read (default: ``None``)" @@ -243,7 +246,7 @@ 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:171 +#: library/argparse.rst:173 msgid "" "argument_default_ - The global default value for arguments (default: " "``None``)" @@ -251,7 +254,7 @@ msgstr "" "argument_default_ – Valeur globale par défaut pour les arguments (par " "défaut : ``None``) ;" -#: library/argparse.rst:174 +#: library/argparse.rst:176 msgid "" "conflict_handler_ - The strategy for resolving conflicting optionals " "(usually unnecessary)" @@ -259,14 +262,14 @@ msgstr "" "conflict_handler_ – Stratégie pour résoudre les conflits entre les arguments " "optionnels (non-nécessaire en général) ;" -#: library/argparse.rst:177 +#: 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:179 +#: library/argparse.rst:181 msgid "" "allow_abbrev_ - Allows long options to be abbreviated if the abbreviation is " "unambiguous. (default: ``True``)" @@ -274,7 +277,7 @@ msgstr "" "allow_abbrev_ – Permet l'acceptation d'abréviations non-ambigües pour les " "options longues (par défaut : ``True``) ;" -#: library/argparse.rst:182 +#: library/argparse.rst:184 msgid "" "exit_on_error_ - Determines whether or not ArgumentParser exits with error " "info when an error occurs. (default: ``True``)" @@ -283,11 +286,11 @@ msgstr "" "avec un message d'erreur quand une erreur est rencontrée (par défaut : " "``True``)." -#: library/argparse.rst:185 +#: library/argparse.rst:187 msgid "*allow_abbrev* parameter was added." msgstr "Le paramètre *allow_abbrev* est ajouté." -#: library/argparse.rst:188 +#: library/argparse.rst:190 msgid "" "In previous versions, *allow_abbrev* also disabled grouping of short flags " "such as ``-vv`` to mean ``-v -v``." @@ -296,21 +299,21 @@ msgstr "" "regroupement de plusieurs options courtes telles que ``-vv`` pour signifier " "``-v -v``." -#: library/argparse.rst:192 +#: library/argparse.rst:194 msgid "*exit_on_error* parameter was added." msgstr "Le paramètre *exit_on_error* est ajouté." -#: library/argparse.rst:715 +#: 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:199 +#: library/argparse.rst:201 msgid "prog" msgstr "Le paramètre *prog*" -#: library/argparse.rst:201 +#: 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 " @@ -325,7 +328,7 @@ msgstr "" "programme sur la ligne de commande. Par exemple, si on a un fichier nommé " "``myprogram.py`` avec le code suivant ::" -#: library/argparse.rst:212 +#: 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):" @@ -333,7 +336,7 @@ 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:231 +#: library/argparse.rst:233 msgid "" "To change this default behavior, another value can be supplied using the " "``prog=`` argument to :class:`ArgumentParser`::" @@ -341,7 +344,7 @@ 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:241 +#: 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`` " @@ -351,11 +354,11 @@ msgstr "" "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:258 +#: library/argparse.rst:260 msgid "usage" msgstr "Le paramètre *usage*" -#: library/argparse.rst:260 +#: library/argparse.rst:262 msgid "" "By default, :class:`ArgumentParser` calculates the usage message from the " "arguments it contains::" @@ -363,14 +366,14 @@ msgstr "" "Par défaut, l'objet :class:`ArgumentParser` construit le message relatif à " "l'utilisation à partir des arguments qu'il contient ::" -#: library/argparse.rst:276 +#: 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:291 +#: library/argparse.rst:293 msgid "" "The ``%(prog)s`` format specifier is available to fill in the program name " "in your usage messages." @@ -378,11 +381,11 @@ 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:296 +#: library/argparse.rst:298 msgid "description" msgstr "Le paramètre *description*" -#: library/argparse.rst:298 +#: library/argparse.rst:300 msgid "" "Most calls to the :class:`ArgumentParser` constructor will use the " "``description=`` keyword argument. This argument gives a brief description " @@ -396,7 +399,7 @@ msgstr "" "d'aide, cette description est affichée entre le prototype de ligne de " "commande et les messages d'aide des arguments ::" -#: library/argparse.rst:313 +#: 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." @@ -405,11 +408,11 @@ msgstr "" "se conformer à l'espace disponible. Pour changer ce comportement, voyez " "l'argument formatter_class_." -#: library/argparse.rst:318 +#: library/argparse.rst:320 msgid "epilog" msgstr "Le paramètre *epilog*" -#: library/argparse.rst:320 +#: 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 " @@ -419,7 +422,7 @@ msgstr "" "description des arguments. Un tel texte peut être spécifié grâce à " "l'argument ``epilog=`` du constructeur d':class:`ArgumentParser` ::" -#: library/argparse.rst:337 +#: 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_ " @@ -430,11 +433,11 @@ msgstr "" "grâce à l'argument formatter_class_ du constructeur d':class:" "`ArgumentParser`." -#: library/argparse.rst:343 +#: library/argparse.rst:345 msgid "parents" msgstr "Le paramètre *parents*" -#: library/argparse.rst:345 +#: 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 " @@ -453,7 +456,7 @@ msgstr "" "puis les ajoute à l'instance d':class:`ArgumentParser` en cours de " "création ::" -#: library/argparse.rst:365 +#: 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 " @@ -464,7 +467,7 @@ msgstr "" "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:370 +#: 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 " @@ -474,11 +477,11 @@ msgstr "" "``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:376 +#: library/argparse.rst:378 msgid "formatter_class" msgstr "Le paramètre *formatter_class*" -#: library/argparse.rst:378 +#: 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 " @@ -488,7 +491,7 @@ msgstr "" "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:387 +#: library/argparse.rst:389 msgid "" ":class:`RawDescriptionHelpFormatter` and :class:`RawTextHelpFormatter` give " "more control over how textual descriptions are displayed. By default, :class:" @@ -501,7 +504,7 @@ msgstr "" "class:`ArgumentParser` font l'objet du retour à la ligne automatique dans " "les messages d'aide ::" -#: library/argparse.rst:412 +#: library/argparse.rst:414 msgid "" "Passing :class:`RawDescriptionHelpFormatter` as ``formatter_class=`` " "indicates that description_ and epilog_ are already correctly formatted and " @@ -512,7 +515,7 @@ msgstr "" "correctement et qu'ils ne doivent pas faire l'objet d'un retour à la ligne " "automatique ::" -#: library/argparse.rst:438 +#: library/argparse.rst:440 msgid "" ":class:`RawTextHelpFormatter` maintains whitespace for all sorts of help " "text, including argument descriptions. However, multiple new lines are " @@ -525,7 +528,7 @@ msgstr "" "seul. Si vous voulez garder plusieurs sauts de ligne, ajoutez des espaces " "entre les caractères de changement de ligne." -#: library/argparse.rst:443 +#: library/argparse.rst:445 msgid "" ":class:`ArgumentDefaultsHelpFormatter` automatically adds information about " "default values to each of the argument help messages::" @@ -533,7 +536,7 @@ msgstr "" ":class:`ArgumentDefaultsHelpFormatter` ajoute automatiquement l'information " "sur les valeurs par défaut aux messages d'aide de tous les arguments ::" -#: library/argparse.rst:461 +#: 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 " @@ -543,11 +546,11 @@ msgstr "" "chacun des arguments comme nom d'affichage pour leurs valeurs (contrairement " "au formateur standard qui utilise dest_) ::" -#: library/argparse.rst:482 +#: library/argparse.rst:484 msgid "prefix_chars" msgstr "Le paramètre *prefix_chars*" -#: library/argparse.rst:484 +#: 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. " @@ -560,7 +563,7 @@ msgstr "" "les options ``+f`` ou ``/foo``), vous devez les spécifier en utilisant " "l'argument ``prefix_chars=`` du constructeur d'``ArgumentParser`` ::" -#: library/argparse.rst:496 +#: 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 " @@ -570,13 +573,13 @@ msgstr "" "caractères qui n'inclut pas ``-`` provoquera le refus des options comme ``-" "f/--foo``." -#: library/argparse.rst:502 +#: library/argparse.rst:504 msgid "fromfile_prefix_chars" msgstr "Le paramètre *fromfile_prefix_chars*" -#: library/argparse.rst:504 +#: library/argparse.rst:506 msgid "" -"Sometimes, for example when dealing with a particularly long argument lists, " +"Sometimes, for example when dealing with a particularly long argument list, " "it may make sense to keep the list of arguments in a file rather than typing " "it out at the command line. If the ``fromfile_prefix_chars=`` argument is " "given to the :class:`ArgumentParser` constructor, then arguments that start " @@ -591,7 +594,7 @@ msgstr "" "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:518 +#: 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 " @@ -607,7 +610,7 @@ msgstr "" "commande. Ainsi dans l'exemple ci-dessus, l'expression ``['-f', 'foo', " "'@args.txt']`` est équivalente à l'expression ``['-f', 'foo', '-f', 'bar']``." -#: library/argparse.rst:524 +#: library/argparse.rst:526 msgid "" "The ``fromfile_prefix_chars=`` argument defaults to ``None``, meaning that " "arguments will never be treated as file references." @@ -616,11 +619,11 @@ msgstr "" "signifie que les arguments ne seront pas traités en tant que références à " "des fichiers." -#: library/argparse.rst:529 +#: library/argparse.rst:531 msgid "argument_default" msgstr "Le paramètre *argument_default*" -#: library/argparse.rst:531 +#: 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." @@ -642,11 +645,11 @@ msgstr "" "de :meth:`~ArgumentParser.parse_args`, on fournit " "``argument_default=SUPPRESS`` ::" -#: library/argparse.rst:551 +#: library/argparse.rst:553 msgid "allow_abbrev" msgstr "Le paramètre *allow_abbrev*" -#: library/argparse.rst:553 +#: 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 " @@ -656,17 +659,17 @@ msgstr "" "meth:`~ArgumentParser.parse_args` d':class:`ArgumentParser` :ref:`elle " "accepte les abréviations ` des options longues." -#: library/argparse.rst:557 +#: 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:570 +#: library/argparse.rst:572 msgid "conflict_handler" msgstr "Le paramètre *conflict_handler*" -#: library/argparse.rst:572 +#: 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 " @@ -678,7 +681,7 @@ msgstr "" "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:584 +#: 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 " @@ -690,7 +693,7 @@ msgstr "" "d'option. Pour obtenir ce comportement, vous devez passer ``'resolve'`` à " "l'argument ``conflict_handler=`` du constructeur d':class:`ArgumentParser` ::" -#: library/argparse.rst:600 +#: 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/--" @@ -702,11 +705,11 @@ msgstr "" "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:607 +#: library/argparse.rst:609 msgid "add_help" msgstr "Le paramètre *add_help*" -#: library/argparse.rst:609 +#: 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`` " @@ -716,7 +719,7 @@ msgstr "" "l'affichage du message d'aide de l'analyseur. Par exemple, prenons le " "fichier ``myprogram.py`` qui contient le code suivant ::" -#: library/argparse.rst:618 +#: library/argparse.rst:620 msgid "" "If ``-h`` or ``--help`` is supplied at the command line, the ArgumentParser " "help will be printed:" @@ -724,7 +727,7 @@ msgstr "" "Si ``-h`` ou ``--help`` est passé sur la ligne de commande, le message " "d'aide de l'``ArgumentParser`` sera affiché :" -#: library/argparse.rst:630 +#: 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 :" @@ -734,7 +737,7 @@ msgstr "" "faire, vous devez passer ``False`` à l'argument ``add_help=`` du " "constructeur d':class:`ArgumentParser` ::" -#: library/argparse.rst:642 +#: 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 ``-" @@ -747,11 +750,11 @@ msgstr "" "ce cas, le premier caractère de ``prefix_chars`` est utilisé comme préfixe " "des options d'aide ::" -#: library/argparse.rst:657 +#: library/argparse.rst:659 msgid "exit_on_error" msgstr "Le paramètre *exit_on_error*" -#: library/argparse.rst:659 +#: 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 " @@ -761,7 +764,7 @@ msgstr "" "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:662 +#: 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``::" @@ -769,11 +772,11 @@ msgstr "" "Si vous souhaitez intercepter les erreurs manuellement, la fonctionnalité " "peut être activée en assignant ``False`` à ``exit_on_error`` ::" -#: library/argparse.rst:679 +#: library/argparse.rst:681 msgid "The add_argument() method" msgstr "La méthode *add_argument()*" -#: library/argparse.rst:685 +#: 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:" @@ -781,7 +784,7 @@ 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:688 +#: library/argparse.rst:690 msgid "" "`name or flags`_ - Either a name or a list of option strings, e.g. ``foo`` " "or ``-f, --foo``." @@ -789,7 +792,7 @@ msgstr "" "`name_or_flags`_ – Nom ou liste de chaînes d'options. Par exemple : ``foo`` " "ou ``-f, --foo`` ;" -#: library/argparse.rst:691 +#: library/argparse.rst:693 msgid "" "action_ - The basic type of action to be taken when this argument is " "encountered at the command line." @@ -797,17 +800,17 @@ msgstr "" "action_ – Type élémentaire de l'action à entreprendre quand cet argument est " "reconnu sur la ligne de commande ;" -#: library/argparse.rst:694 +#: 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:696 +#: 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:698 +#: 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." @@ -815,20 +818,18 @@ msgstr "" "default_ – Valeur produite si l'argument est absent de la ligne de " "commande et absent de l'objet ``namespace`` ;" -#: library/argparse.rst:701 +#: 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:703 -msgid "choices_ - A container of the allowable values for the argument." -msgstr "" -"choices_ – Conteneur qui contient toutes les valeurs permises pour cet " -"argument ;" - #: 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)." @@ -836,15 +837,15 @@ msgstr "" "required_ – ``True`` si l'option sur la ligne de commande est obligatoire " "(ne s'applique qu'aux arguments optionnels) ;" -#: library/argparse.rst:708 +#: 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:710 +#: 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:712 +#: library/argparse.rst:714 msgid "" "dest_ - The name of the attribute to be added to the object returned by :" "meth:`parse_args`." @@ -852,11 +853,11 @@ msgstr "" "dest_ – Nom de l'attribut qui sera ajouté à l'objet retourné par :meth:" "`parse_args`." -#: library/argparse.rst:719 +#: library/argparse.rst:721 msgid "name or flags" msgstr "Le paramètre *name_or_flags*" -#: library/argparse.rst:721 +#: 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 " @@ -873,11 +874,11 @@ msgstr "" "commande, soit simplement un nom si on désire un argument positionnel. Par " "exemple, un argument optionnel est créé comme suit ::" -#: library/argparse.rst:730 +#: 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:734 +#: 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 " @@ -887,11 +888,11 @@ msgstr "" "commencent par le préfixe ``-`` sont présumés optionnels et tous les autres " "sont présumés positionnels ::" -#: library/argparse.rst:751 +#: library/argparse.rst:753 msgid "action" msgstr "Le paramètre *action*" -#: library/argparse.rst:753 +#: 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 " @@ -908,7 +909,7 @@ msgstr "" "indique comment l'argument de la ligne de commande sera traité. Les actions " "natives sont :" -#: library/argparse.rst:759 +#: library/argparse.rst:761 msgid "" "``'store'`` - This just stores the argument's value. This is the default " "action. For example::" @@ -916,7 +917,7 @@ msgstr "" "``'store'`` – Stocke la valeur de l'argument sans autre traitement. Ceci est " "l'action par défaut. Par exemple ::" -#: library/argparse.rst:767 +#: 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 " @@ -927,7 +928,7 @@ msgstr "" "optionnels qui représentent un drapeau ou une condition similaire. Par " "exemple ::" -#: library/argparse.rst:776 +#: 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`` " @@ -939,7 +940,7 @@ msgstr "" "``True`` et ``False``, respectivement. Aussi, ces actions ont comme valeur " "par défaut ``False`` et ``True``, respectivement. Par exemple ::" -#: library/argparse.rst:788 +#: 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. " @@ -949,7 +950,7 @@ msgstr "" "liste. Ceci est pratique pour les options qui peuvent être répétées sur la " "ligne de commande ::" -#: library/argparse.rst:797 +#: 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 " @@ -963,7 +964,7 @@ msgstr "" "pratique quand plusieurs arguments ont besoin de stocker des constantes dans " "la même liste. Par exemple ::" -#: library/argparse.rst:809 +#: 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::" @@ -971,13 +972,13 @@ 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:817 +#: 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:819 +#: 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 " @@ -989,7 +990,7 @@ msgstr "" "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:824 +#: library/argparse.rst:826 msgid "" "``'version'`` - This expects a ``version=`` keyword argument in the :meth:" "`~ArgumentParser.add_argument` call, and prints version information and " @@ -999,7 +1000,7 @@ msgstr "" "Cette action requiert l'argument nommé ``version=`` dans l'appel à :meth:" "`~ArgumentParser.add_argument` ::" -#: library/argparse.rst:834 +#: library/argparse.rst:836 msgid "" "``'extend'`` - This stores a list, and extends each argument value to the " "list. Example usage::" @@ -1007,7 +1008,7 @@ 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:845 +#: 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 " @@ -1019,7 +1020,7 @@ msgstr "" "``BooleanOptionalAction`` est disponible dans ``argparse`` et elle ajoute la " "gestion des options booléennes telles que ``--foo`` et ``--no-foo`` ::" -#: library/argparse.rst:858 +#: 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 " @@ -1029,19 +1030,19 @@ msgstr "" "class:`Action` en surchargeant la méthode ``__call__``. Vous avez également " "l'option de surcharger les méthodes ``__init__`` et ``format_usage``." -#: library/argparse.rst:862 +#: library/argparse.rst:864 msgid "An example of a custom action::" msgstr "Un exemple d'action personnalisée ::" -#: library/argparse.rst:882 +#: library/argparse.rst:884 msgid "For more details, see :class:`Action`." msgstr "Pour plus d'information, voir :class:`Action`." -#: library/argparse.rst:885 +#: library/argparse.rst:887 msgid "nargs" msgstr "Le paramètre *nargs*" -#: library/argparse.rst:887 +#: 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 " @@ -1053,7 +1054,7 @@ msgstr "" "``nargs`` associe un nombre différent d'arguments de la ligne de commande à " "une action. Les valeurs reconnues sont :" -#: library/argparse.rst:892 +#: library/argparse.rst:894 msgid "" "``N`` (an integer). ``N`` arguments from the command line will be gathered " "together into a list. For example::" @@ -1061,7 +1062,7 @@ msgstr "" "``N`` (un entier). ``N`` arguments de la ligne de commande seront capturés " "ensemble et stockés dans une liste. Par exemple ::" -#: library/argparse.rst:901 +#: 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." @@ -1070,7 +1071,7 @@ msgstr "" "différent du comportement par défaut qui produit l'élément directement " "(comme un scalaire)." -#: library/argparse.rst:906 +#: 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 " @@ -1086,7 +1087,7 @@ msgstr "" "qu'elle ne soit pas suivie d'un argument. Dans ce cas, la valeur de const_ " "est produite. Voici quelques exemples pour illustrer ceci ::" -#: library/argparse.rst:923 +#: library/argparse.rst:925 msgid "" "One of the more common uses of ``nargs='?'`` is to allow optional input and " "output files::" @@ -1094,7 +1095,7 @@ msgstr "" "``nargs='?'`` est fréquemment utilisé pour accepter des fichiers d'entrée et " "de sortie optionnels ::" -#: library/argparse.rst:940 +#: 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 " @@ -1107,7 +1108,7 @@ msgstr "" "d'avoir plusieurs arguments optionnels qui spécifient ``nargs='*'``. Par " "exemple ::" -#: library/argparse.rst:954 +#: 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 " @@ -1118,7 +1119,7 @@ msgstr "" "produit s'il n'y a pas au moins un argument présent sur la ligne de " "commande. Par exemple ::" -#: library/argparse.rst:966 +#: 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 " @@ -1129,11 +1130,11 @@ msgstr "" "capturés est déterminé par l'action_. En général, c'est un seul argument de " "la ligne de commande qui est capturé et il est produit directement." -#: library/argparse.rst:972 +#: library/argparse.rst:974 msgid "const" msgstr "Le paramètre *const*" -#: library/argparse.rst:974 +#: 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 " @@ -1145,7 +1146,7 @@ msgstr "" "est requise par certaines actions d':class:`ArgumentParser`. Les deux " "utilisations les plus communes sont :" -#: library/argparse.rst:978 +#: library/argparse.rst:980 msgid "" "When :meth:`~ArgumentParser.add_argument` is called with " "``action='store_const'`` or ``action='append_const'``. These actions add " @@ -1160,7 +1161,7 @@ msgstr "" # Nous sommes dans une énumération après un :, donc pas de majuscule et le # paragraphe doit se terminer par ;. -#: library/argparse.rst:983 +#: 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 " @@ -1177,7 +1178,7 @@ msgstr "" "valeur de ``const`` est utilisée. Consultez la description de nargs_ pour " "voir quelques exemples." -#: library/argparse.rst:990 +#: 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``." @@ -1186,11 +1187,11 @@ msgstr "" "``const`` doit être spécifié. Pour toutes les autres actions, il est " "optionnel et sa valeur par défaut est ``None``." -#: library/argparse.rst:995 +#: library/argparse.rst:997 msgid "default" msgstr "Le paramètre *default*" -#: library/argparse.rst:997 +#: 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." @@ -1206,7 +1207,7 @@ msgstr "" "commande. Pour les arguments optionnels, la valeur de ``default`` est " "utilisée si la chaîne d'option n'est pas présente sur la ligne de commande ::" -#: library/argparse.rst:1011 +#: library/argparse.rst:1013 msgid "" "If the target namespace already has an attribute set, the action *default* " "will not over write it::" @@ -1214,7 +1215,7 @@ msgstr "" "Si l'objet ``namespace`` cible a déjà un attribut assigné, l'action " "*default* ne l'écrase pas ::" -#: library/argparse.rst:1019 +#: 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_ " @@ -1227,7 +1228,7 @@ msgstr "" "est fournie) avant d'affecter l'attribut à l'objet :class:`Namespace` " "renvoyé. Autrement, l'analyseur utilise la valeur telle qu'elle ::" -#: library/argparse.rst:1030 +#: 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::" @@ -1236,7 +1237,7 @@ msgstr "" "valeur de ``default`` est utilisée quand l'argument est absent de la ligne " "de commande ::" -#: library/argparse.rst:1041 +#: library/argparse.rst:1043 msgid "" "Providing ``default=argparse.SUPPRESS`` causes no attribute to be added if " "the command-line argument was not present::" @@ -1245,11 +1246,11 @@ msgstr "" "à l'objet ``Namespace`` quand l'argument est absent de la ligne de " "commande ::" -#: library/argparse.rst:1053 +#: library/argparse.rst:1055 msgid "type" msgstr "Le paramètre *type*" -#: library/argparse.rst:1055 +#: 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 " @@ -1263,16 +1264,16 @@ msgstr "" "`int`. L'argument nommé ``type`` d':meth:`~ArgumentParser.add_argument` nous " "permet de faire les vérifications et les conversions de type nécessaires." -#: library/argparse.rst:1061 +#: 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é " -"keyword_, le convertisseur de type n'est appliqué que si la valeur par " +"default_, le convertisseur de type n'est appliqué que si la valeur par " "défaut est une chaîne." -#: library/argparse.rst:1064 +#: 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:" @@ -1285,18 +1286,18 @@ msgstr "" "d'erreur agréablement formaté est affiché. Aucun autre type d'exception " "n'est géré." -#: library/argparse.rst:1069 +#: 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:1085 +#: 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:1097 +#: 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 " @@ -1306,7 +1307,7 @@ msgstr "" "comportement se limite à convertir les chaînes vides à ``False`` et les " "chaînes non-vides à ``True``. Ce n'est généralement pas le résultat désiré." -#: library/argparse.rst:1101 +#: 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 " @@ -1319,7 +1320,7 @@ msgstr "" "d'erreurs plus intéressant ou une gestion de ressources devraient être " "effectuées plus tard dans l’exécution suite à l'analyse des arguments." -#: library/argparse.rst:1106 +#: 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." @@ -1332,7 +1333,7 @@ msgstr "" "JSONDecodeError` ne serait pas adéquatement formatée et une exception :exc:" "`FileNotFound` ne serait pas du tout traitée." -#: library/argparse.rst:1111 +#: 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 " @@ -1347,7 +1348,7 @@ msgstr "" "fin de l'exécution de l'analyseur puis de gérer les fichiers à l'aide d'un " "bloc :keyword:`with`." -#: library/argparse.rst:1117 +#: library/argparse.rst:1119 msgid "" "For type checkers that simply check against a fixed set of values, consider " "using the choices_ keyword instead." @@ -1355,45 +1356,44 @@ 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:1122 +#: library/argparse.rst:1124 msgid "choices" msgstr "Le paramètre *choices*" -#: library/argparse.rst:1124 +#: 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 container object as the *choices* " +"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 fermé de valeurs. Ceux-ci peuvent être gérés en passant un " -"conteneur à l'argument nommé *choices* de la méthode :meth:`~ArgumentParser." -"add_argument`. Quand la ligne de commande est analysée, les valeurs de " -"l'argument sont comparées et un message d'erreur est affiché si l'argument " -"n'est pas parmi les valeurs acceptables ::" +"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:1139 +#: library/argparse.rst:1141 msgid "" -"Note that inclusion in the *choices* container is checked after any type_ " +"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* " -"container should match the type_ specified::" +"sequence should match the type_ specified::" msgstr "" -"Prenez note que le test d'inclusion dans le conteur *choices* est fait après " -"la conversion de type_. Le type des objets dans le conteneur *choices* " -"doivent donc correspondre au type_ spécifié ::" +"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:1151 +#: library/argparse.rst:1153 msgid "" -"Any container can be passed as the *choices* value, so :class:`list` " -"objects, :class:`set` objects, and custom containers are all supported." +"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 conteneur peut être fourni pour la valeur de *choices*, donc " -"les objets :class:`list`, les objets :class:`set` et les conteneurs " -"personnalisés sont tous acceptés." +"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:1154 +#: 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." @@ -1401,7 +1401,7 @@ msgstr "" "L'utilisation d':class:`enum.Enum` est déconseillée, car il est difficile de " "contrôler son apparence dans les messages d'usage, d'aide et d'erreur." -#: library/argparse.rst:1157 +#: 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 " @@ -1414,11 +1414,11 @@ msgstr "" "pas souhaité (comme lorsque les choix sont nombreux) spécifiez simplement " "metavar_ de façon explicite." -#: library/argparse.rst:1164 +#: library/argparse.rst:1166 msgid "required" msgstr "Le paramètre *required*" -#: library/argparse.rst:1166 +#: 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 " @@ -1431,7 +1431,7 @@ msgstr "" "*obligatoire*, ``True`` peut être passé à l'argument nommé ``required=`` d':" "meth:`~ArgumentParser.add_argument` ::" -#: library/argparse.rst:1179 +#: 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 " @@ -1441,7 +1441,7 @@ msgstr "" "``required``, :meth:`~ArgumentParser.parse_args` mentionne une erreur si " "l'option est absente de la ligne de commande." -#: library/argparse.rst:1185 +#: 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." @@ -1450,11 +1450,11 @@ msgstr "" "utilisateurs s'attendent que les *options* soient *optionnelles*. Elles " "devraient donc être évitées si possible." -#: library/argparse.rst:1190 +#: library/argparse.rst:1192 msgid "help" msgstr "Le paramètre *help*" -#: library/argparse.rst:1192 +#: 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`` " @@ -1466,13 +1466,13 @@ msgstr "" "l'utilisation de ``-h`` ou ``--help`` sur la ligne de commande), ces " "descriptions d'aide seront affichées pour chacun des arguments ::" -#: library/argparse.rst:1212 +#: 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.::" +"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 " @@ -1481,7 +1481,7 @@ msgstr "" "plupart des arguments nommés d':meth:`~ArgumentParser.add_argument`, tels " "que ``%(default)s``, ``%(type)s``, etc. ::" -#: library/argparse.rst:1229 +#: 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 ``%%``." @@ -1490,7 +1490,7 @@ msgstr "" "désirez afficher un ``%`` littéral dans la chaîne d'aide, vous devez en " "faire l’échappement avec ``%%``." -#: library/argparse.rst:1232 +#: library/argparse.rst:1234 msgid "" ":mod:`argparse` supports silencing the help entry for certain options, by " "setting the ``help`` value to ``argparse.SUPPRESS``::" @@ -1498,11 +1498,11 @@ msgstr "" ":mod:`argparse` peut supprimer la rubrique d'aide de certaines options. Pour " "ce faire, passez ``argparse.SUPPRESS`` à ``help`` ::" -#: library/argparse.rst:1245 +#: library/argparse.rst:1247 msgid "metavar" msgstr "Le paramètre *metavar*" -#: library/argparse.rst:1247 +#: 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 " @@ -1523,11 +1523,11 @@ msgstr "" "positionnel unique ``--foo`` qui prend un seul argument sur la ligne de " "commande sera affiché comme ``FOO``. Par exemple ::" -#: library/argparse.rst:1271 +#: library/argparse.rst:1273 msgid "An alternative name can be specified with ``metavar``::" msgstr "Un nom alternatif peut être fourni à ``metavar`` ::" -#: library/argparse.rst:1288 +#: 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 " @@ -1537,7 +1537,7 @@ msgstr "" "l'attribut ajouté à l'objet renvoyé par :meth:`~ArgumentParser.parse_args` " "est toujours déterminé par la valeur de dest_." -#: library/argparse.rst:1292 +#: 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 " @@ -1547,11 +1547,11 @@ msgstr "" "plus d'une fois. Passer un *n-uplet* à ``metavar`` indique les différents " "noms à afficher pour chacun des arguments ::" -#: library/argparse.rst:1309 +#: library/argparse.rst:1311 msgid "dest" msgstr "Le paramètre *dest*" -#: library/argparse.rst:1311 +#: 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 " @@ -1567,7 +1567,7 @@ msgstr "" "est généralement le premier argument d':meth:`~ArgumentParser." "add_argument` ::" -#: library/argparse.rst:1323 +#: 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 " @@ -1587,15 +1587,15 @@ msgstr "" "s'assurer que la chaîne est un nom d'attribut valide. Les exemples suivants " "illustrent ce comportement ::" -#: library/argparse.rst:1340 +#: 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:1348 +#: library/argparse.rst:1350 msgid "Action classes" msgstr "Classes Action" -#: library/argparse.rst:1350 +#: 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 " @@ -1606,7 +1606,7 @@ msgstr "" "qui suit cette API peut être passé comme paramètre ``action`` d':meth:" "`add_argument`." -#: library/argparse.rst:1359 +#: 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 " @@ -1620,7 +1620,7 @@ msgstr "" "doit accepter les deux arguments positionnels d':meth:`ArgumentParser." "add_argument` ainsi que tous ses arguments nommés, sauf ``action``." -#: library/argparse.rst:1365 +#: 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\", " @@ -1633,7 +1633,7 @@ msgstr "" "plus simple de s'assurer que ces attributs sont définis est d'appeler " "``Action.__init__``." -#: library/argparse.rst:1370 +#: library/argparse.rst:1372 msgid "" "Action instances should be callable, so subclasses must override the " "``__call__`` method, which should accept four parameters:" @@ -1642,11 +1642,11 @@ msgstr "" "doivent surcharger la méthode ``__call__``. Cette méthode doit accepter " "quatre paramètres :" -#: library/argparse.rst:1373 +#: 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:1375 +#: 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 " @@ -1656,7 +1656,7 @@ msgstr "" "`~ArgumentParser.parse_args`. La majorité des actions ajoutent un attribut à " "cet objet avec :func:`setattr` ;" -#: library/argparse.rst:1379 +#: library/argparse.rst:1381 msgid "" "``values`` - The associated command-line arguments, with any type " "conversions applied. Type conversions are specified with the type_ keyword " @@ -1667,7 +1667,7 @@ msgstr "" "spécifiées grâce à l’argument nommé type_ d':meth:`~ArgumentParser." "add_argument` ;" -#: library/argparse.rst:1383 +#: 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 " @@ -1677,7 +1677,7 @@ msgstr "" "L'argument ``option_string`` est optionnel et est absent si l'action est " "associée à un argument positionnel." -#: library/argparse.rst:1387 +#: 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``." @@ -1686,7 +1686,7 @@ msgstr "" "général elle affecte des attributs sur le ``namespace`` en fonction de " "``dest`` et de ``values``." -#: library/argparse.rst:1390 +#: 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 " @@ -1697,11 +1697,11 @@ msgstr "" "utilisée lors de l'affichage du message d'utilisation du programme. Si cette " "méthode n'est pas fournie, une valeur raisonnable est utilisée par défaut." -#: library/argparse.rst:1395 +#: library/argparse.rst:1397 msgid "The parse_args() method" msgstr "La méthode *parse_args()*" -#: library/argparse.rst:1399 +#: library/argparse.rst:1401 msgid "" "Convert argument strings to objects and assign them as attributes of the " "namespace. Return the populated namespace." @@ -1709,7 +1709,7 @@ msgstr "" "Convertie les chaînes d'arguments en objets et les assigne comme attributs " "de l'objet ``namespace``. Retourne l'objet ``namespace`` rempli." -#: library/argparse.rst:1402 +#: 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:" @@ -1719,7 +1719,7 @@ msgstr "" "quels objets sont créés et comment ils sont affectés. Consultez la rubrique " "d':meth:`add_argument` pour les détails." -#: library/argparse.rst:1406 +#: library/argparse.rst:1408 msgid "" "args_ - List of strings to parse. The default is taken from :data:`sys." "argv`." @@ -1727,7 +1727,7 @@ msgstr "" "args_ – Liste de chaînes à analyser. La valeur par défaut est récupérée " "dans : :data:`sys.argv`." -#: library/argparse.rst:1409 +#: library/argparse.rst:1411 msgid "" "namespace_ - An object to take the attributes. The default is a new empty :" "class:`Namespace` object." @@ -1735,11 +1735,11 @@ msgstr "" "namespace_ – Un objet pour recevoir les attributs. Par défaut : une nouvelle " "instance (vide) de :class:`Namespace`." -#: library/argparse.rst:1414 +#: library/argparse.rst:1416 msgid "Option value syntax" msgstr "Syntaxe de la valeur des options" -#: library/argparse.rst:1416 +#: 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, " @@ -1750,7 +1750,7 @@ msgstr "" "simple, l'option et sa valeur sont passées en tant que deux arguments " "distincts ::" -#: library/argparse.rst:1428 +#: 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 " @@ -1760,7 +1760,7 @@ msgstr "" "caractère), l'option et sa valeur peuvent être passées comme un seul " "argument de la ligne de commande en utilisant ``=`` comme séparateur ::" -#: library/argparse.rst:1435 +#: library/argparse.rst:1437 msgid "" "For short options (options only one character long), the option and its " "value can be concatenated::" @@ -1768,7 +1768,7 @@ msgstr "" "Pour les options courtes (les options qui utilisent un seul caractère), " "l'option et sa valeur peuvent être concaténées ::" -#: library/argparse.rst:1441 +#: 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::" @@ -1777,11 +1777,11 @@ msgstr "" "préfixe ``-`` pour autant que seule la dernière (ou aucune) nécessite une " "valeur ::" -#: library/argparse.rst:1453 +#: library/argparse.rst:1455 msgid "Invalid arguments" msgstr "Arguments invalides" -#: library/argparse.rst:1455 +#: 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 " @@ -1795,11 +1795,11 @@ msgstr "" "elle affiche l'erreur accompagnée du message d'aide puis termine " "l'exécution ::" -#: library/argparse.rst:1481 +#: library/argparse.rst:1483 msgid "Arguments containing ``-``" msgstr "Arguments contenant ``-``" -#: library/argparse.rst:1483 +#: 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 " @@ -1820,7 +1820,7 @@ msgstr "" "que l'analyseur ne contient aucune option qui a l'apparence d'un nombre " "négatif ::" -#: library/argparse.rst:1521 +#: 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 " @@ -1832,11 +1832,11 @@ msgstr "" "argument ``'--'`` qui indique à :meth:`~ArgumentParser.parse_args` de " "traiter tout ce qui suit comme un argument positionnel ::" -#: library/argparse.rst:1532 +#: library/argparse.rst:1534 msgid "Argument abbreviations (prefix matching)" msgstr "Arguments abrégés (Par comparaison de leurs préfixes)" -#: library/argparse.rst:1534 +#: 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 " @@ -1847,7 +1847,7 @@ msgstr "" "autant que l’abréviation soit non-ambigüe, c'est-à-dire qu'elle ne " "corresponde qu'à une seule option ::" -#: library/argparse.rst:1549 +#: 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``." @@ -1856,11 +1856,11 @@ msgstr "" "option. Ce comportement peut être désactivé en passant ``False`` à :ref:" "`allow_abbrev`." -#: library/argparse.rst:1555 +#: library/argparse.rst:1557 msgid "Beyond ``sys.argv``" msgstr "Au-delà de ``sys.argv``" -#: library/argparse.rst:1557 +#: 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 " @@ -1873,20 +1873,20 @@ msgstr "" "parse_args`. Cette approche est pratique pour faire des tests depuis " "l'invite de commande ::" -#: library/argparse.rst:1577 +#: library/argparse.rst:1579 msgid "The Namespace object" msgstr "L'objet ``Namespace``" -#: library/argparse.rst:1581 +#: 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 qui est utilisé par défaut par :meth:`~ArgumentParser." -"parse_args` pour créer un objet qui stock les attributs. Cet objet est " +"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:1584 +#: 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 " @@ -1897,7 +1897,7 @@ msgstr "" "une vue *dict-compatible*, vous devez utiliser :func:`vars` (un idiome " "Python classique) ::" -#: library/argparse.rst:1594 +#: 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. " @@ -1908,15 +1908,15 @@ msgstr "" "création d'un nouvel objet :class:`Namespace`. Ceci peut être réalisé avec " "l'argument nommé ``namespace=`` ::" -#: library/argparse.rst:1610 +#: library/argparse.rst:1612 msgid "Other utilities" msgstr "Autres outils" -#: library/argparse.rst:1613 +#: library/argparse.rst:1615 msgid "Sub-commands" msgstr "Sous commandes" -#: library/argparse.rst:1620 +#: 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 " @@ -1944,11 +1944,11 @@ msgstr "" "constructeur d':class:`ArgumentParser` ; elle renvoie un objet :class:" "`ArgumentParser` qui peut être modifié normalement." -#: library/argparse.rst:1632 +#: library/argparse.rst:1634 msgid "Description of parameters:" msgstr "Description des paramètres :" -#: library/argparse.rst:1634 +#: 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 " @@ -1958,7 +1958,7 @@ msgstr "" "défaut : ``\"subcommands\"`` si ``description`` est fournie, sinon utilise " "la valeur de ``title`` de la section sur les arguments positionnels ;" -#: library/argparse.rst:1638 +#: library/argparse.rst:1640 msgid "" "description - description for the sub-parser group in help output, by " "default ``None``" @@ -1968,7 +1968,7 @@ msgstr "" # I think the English version is very misleading here. Even for subcommands, # ``prog`` is only a tiny prefix of the auto generater usage string. -#: library/argparse.rst:1641 +#: 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 " @@ -1978,7 +1978,7 @@ msgstr "" "commandes ; par défaut : le nom du programme et les arguments positionnels " "qui arrivent avant l'argument de ce sous-analyseur ;" -#: library/argparse.rst:1645 +#: 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)" @@ -1987,7 +1987,7 @@ msgstr "" "analyseurs ; par défaut : la classe de l'analyseur courant (par exemple " "``ArgumentParser``) ;" -#: library/argparse.rst:1648 +#: library/argparse.rst:1650 msgid "" "action_ - the basic type of action to be taken when this argument is " "encountered at the command line" @@ -1995,7 +1995,7 @@ msgstr "" "action_ – action à entreprendre quand cet argument est reconnu sur la ligne " "de commande ;" -#: library/argparse.rst:1651 +#: 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" @@ -2003,7 +2003,7 @@ msgstr "" "dest_ – nom de l'attribut sous lequel la sous-commande est stockée ; par " "défaut : ``None`` et aucune valeur n'est stockée ;" -#: library/argparse.rst:1654 +#: library/argparse.rst:1656 msgid "" "required_ - Whether or not a subcommand must be provided, by default " "``False`` (added in 3.7)" @@ -2011,13 +2011,13 @@ msgstr "" "required_ – ``True`` si la sous-commande est obligatoire ; par défaut : " "``False`` (ajouté dans 3.7) ;" -#: library/argparse.rst:1657 +#: 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:1659 +#: 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, ..}" @@ -2026,11 +2026,11 @@ msgstr "" "messages d'aide ; par défaut : ``None``, ce qui entraine la génération d'une " "chaîne suivant le format ``'{cmd1, cmd2, …}'``." -#: library/argparse.rst:1662 +#: library/argparse.rst:1664 msgid "Some example usage::" msgstr "Quelques exemples d'utilisation ::" -#: library/argparse.rst:1683 +#: 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 " @@ -2047,7 +2047,7 @@ msgstr "" "présents ; quand la commande ``b`` est spécifiée, seuls les attributs " "``foo`` et ``baz`` sont présents." -#: library/argparse.rst:1690 +#: 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 " @@ -2062,7 +2062,7 @@ msgstr "" "d'aide pour chacun des sous-analyseurs grâce à l'argument ``help=`` d':meth:" "`add_parser` tel qu'illustré ci-dessus." -#: library/argparse.rst:1726 +#: library/argparse.rst:1728 msgid "" "The :meth:`add_subparsers` method also supports ``title`` and " "``description`` keyword arguments. When either is present, the subparser's " @@ -2073,7 +2073,7 @@ msgstr "" "sous-analyseur sont affichées dans leur propre groupe dans la sortie d'aide. " "Par exemple ::" -#: library/argparse.rst:1747 +#: 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, " @@ -2084,7 +2084,7 @@ msgstr "" "L'exemple suivant, à la manière de ``svn``, utilise ``co`` comme une " "abréviation de ``checkout`` ::" -#: library/argparse.rst:1758 +#: 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` " @@ -2096,7 +2096,7 @@ msgstr "" "`set_defaults` pour que chaque sous-analyseur sache quelle fonction Python " "doit être exécutée. Par exemple ::" -#: library/argparse.rst:1795 +#: 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 " @@ -2112,15 +2112,15 @@ msgstr "" "avez besoin de consulter le nom de du sous-analyseur qui a été invoqué, vous " "pouvez utiliser l'argument nommé ``dest`` d':meth:`add_subparsers` ::" -#: library/argparse.rst:1811 +#: library/argparse.rst:1813 msgid "New *required* keyword argument." msgstr "Introduction des arguments nommés obligatoires." -#: library/argparse.rst:1816 +#: library/argparse.rst:1818 msgid "FileType objects" msgstr "Objets ``FileType``" -#: library/argparse.rst:1820 +#: 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:" @@ -2135,26 +2135,26 @@ msgstr "" "taille du tampon, encodage et gestion des erreurs (voir la fonction :func:" "`open` pour plus de détails) ::" -#: library/argparse.rst:1832 +#: library/argparse.rst:1834 msgid "" "FileType objects understand the pseudo-argument ``'-'`` and automatically " -"convert this into ``sys.stdin`` for readable :class:`FileType` objects and " -"``sys.stdout`` for writable :class:`FileType` objects::" +"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 en font " -"automatiquement la conversion vers ``sys.stdin`` pour les objets :class:" -"`FileType` ouverts en lecture et vers ``sys.stdout`` pour les objets :class:" -"`FileType` ouverts en écriture ::" +"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:1841 +#: library/argparse.rst:1843 msgid "The *encodings* and *errors* keyword arguments." msgstr "Les arguments nommés ``encodings`` et ``errors``." -#: library/argparse.rst:1846 +#: library/argparse.rst:1848 msgid "Argument groups" msgstr "Groupes d'arguments" -#: library/argparse.rst:1850 +#: library/argparse.rst:1852 msgid "" "By default, :class:`ArgumentParser` groups command-line arguments into " "\"positional arguments\" and \"optional arguments\" when displaying help " @@ -2168,7 +2168,7 @@ msgstr "" "meilleur regroupement conceptuel des arguments, les groupes adéquats peuvent " "être créés avec la méthode :meth:`add_argument_group` ::" -#: library/argparse.rst:1867 +#: 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 :" @@ -2186,7 +2186,7 @@ msgstr "" "d'aide. Afin de personnaliser l'affichage, la méthode :meth:" "`add_argument_group` accepte les arguments ``title`` et ``description`` ::" -#: library/argparse.rst:1893 +#: 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." @@ -2195,11 +2195,11 @@ msgstr "" "affiché dans l'une des sections usuelles *positional arguments* et *optional " "arguments*." -#: library/argparse.rst:1898 +#: library/argparse.rst:1900 msgid "Mutual exclusion" msgstr "Exclusion mutuelle" -#: library/argparse.rst:1902 +#: 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 " @@ -2209,7 +2209,7 @@ msgstr "" "qu'au plus un des arguments du groupe mutuellement exclusif est présent sur " "la ligne de commande ::" -#: library/argparse.rst:1918 +#: 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 " @@ -2219,7 +2219,7 @@ msgstr "" "``required`` pour indiquer qu'au moins un des arguments mutuellement " "exclusifs est nécessaire ::" -#: library/argparse.rst:1930 +#: library/argparse.rst:1932 msgid "" "Note that currently mutually exclusive argument groups do not support the " "*title* and *description* arguments of :meth:`~ArgumentParser." @@ -2229,11 +2229,11 @@ msgstr "" "n'acceptent pas les arguments ``title`` et ``description`` d':meth:" "`~ArgumentParser.add_argument_group`." -#: library/argparse.rst:1936 +#: library/argparse.rst:1938 msgid "Parser defaults" msgstr "Valeurs par défaut de l'analyseur" -#: library/argparse.rst:1940 +#: 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 " @@ -2247,14 +2247,14 @@ msgstr "" "`set_defaults` permet l'ajout d'attributs additionnels qui sont définis sans " "nécessiter l'inspection de la ligne de commande ::" -#: library/argparse.rst:1952 +#: 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:1960 +#: 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 " @@ -2264,7 +2264,7 @@ msgstr "" "quand on travaille avec plusieurs analyseurs. Voir la méthode :meth:" "`~ArgumentParser.add_subparsers` pour un exemple de cette utilisation." -#: library/argparse.rst:1966 +#: 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`::" @@ -2273,11 +2273,11 @@ msgstr "" "qu'il a été défini soit par :meth:`~ArgumentParser.add_argument` ou par :" "meth:`~ArgumentParser.set_defaults` ::" -#: library/argparse.rst:1977 +#: library/argparse.rst:1979 msgid "Printing help" msgstr "Afficher l'aide" -#: library/argparse.rst:1979 +#: 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, " @@ -2287,7 +2287,7 @@ msgstr "" "charge du formatage et de l'affichage des messages d'erreur et " "d'utilisation. Plusieurs méthodes de formatage sont toutefois disponibles :" -#: library/argparse.rst:1985 +#: 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 " @@ -2297,7 +2297,7 @@ msgstr "" "`ArgumentParser` depuis la ligne de commande. Si ``file`` est ``None``, " "utilise :data:`sys.stdout`." -#: library/argparse.rst:1991 +#: 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 " @@ -2307,7 +2307,7 @@ msgstr "" "l'information sur les arguments répertoriés dans l':class:`ArgumentParser`. " "Si ``file`` est ``None``, utilise :data:`sys.stdout`." -#: library/argparse.rst:1995 +#: library/argparse.rst:1997 msgid "" "There are also variants of these methods that simply return a string instead " "of printing it:" @@ -2315,7 +2315,7 @@ msgstr "" "Des variantes de ces méthodes sont fournies pour renvoyer la chaîne plutôt " "que de l'afficher :" -#: library/argparse.rst:2000 +#: library/argparse.rst:2002 msgid "" "Return a string containing a brief description of how the :class:" "`ArgumentParser` should be invoked on the command line." @@ -2323,7 +2323,7 @@ msgstr "" "Renvoie une chaîne contenant une brève description sur la façon d'invoquer " "l':class:`ArgumentParser` depuis la ligne de commande." -#: library/argparse.rst:2005 +#: 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`." @@ -2332,11 +2332,11 @@ msgstr "" "informations sur l'utilisation du programme et sur les arguments définis " "dans l':class:`ArgumentParser`." -#: library/argparse.rst:2010 +#: library/argparse.rst:2012 msgid "Partial parsing" msgstr "Analyse partielle" -#: library/argparse.rst:2014 +#: 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 " @@ -2354,7 +2354,7 @@ msgstr "" "sont présents. Au lieu, elle renvoie une paire de valeurs : l'objet " "``Namespace`` rempli et la liste des arguments non-traités." -#: library/argparse.rst:2030 +#: 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 " @@ -2366,11 +2366,11 @@ msgstr "" "option même si elle n'est que le préfixe d'une option reconnue plutôt que de " "la laisser dans la liste des arguments non-traités." -#: library/argparse.rst:2037 +#: library/argparse.rst:2039 msgid "Customizing file parsing" msgstr "Personnaliser le *parsing* de fichiers" -#: library/argparse.rst:2041 +#: 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 " @@ -2382,7 +2382,7 @@ msgstr "" "un traitement plus élaboré. Voir aussi l'argument nommé " "``fromfile_prefix_chars`` du constructeur d':class:`ArgumentParser`." -#: library/argparse.rst:2046 +#: 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. " @@ -2394,7 +2394,7 @@ msgstr "" "appelée une fois pour chaque ligne lue du fichier d'arguments. L'ordre est " "préservé." -#: library/argparse.rst:2050 +#: 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::" @@ -2403,11 +2403,11 @@ msgstr "" "par des espaces d'être traité comme un argument. L'exemple suivant illustre " "comment réaliser ceci ::" -#: library/argparse.rst:2059 +#: library/argparse.rst:2061 msgid "Exiting methods" msgstr "Méthodes d'interruptions" -#: library/argparse.rst:2063 +#: 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 " @@ -2418,7 +2418,7 @@ msgstr "" "est affichée avant la fin de l'exécution. Vous pouvez surcharger cette " "méthode pour traiter ces étapes différemment ::" -#: library/argparse.rst:2075 +#: 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." @@ -2427,11 +2427,11 @@ msgstr "" "``message`` sur la sortie d'erreur standard puis termine l'exécution avec le " "code de fin d'exécution 2." -#: library/argparse.rst:2080 +#: library/argparse.rst:2082 msgid "Intermixed parsing" msgstr "Analyse entremêlée" -#: library/argparse.rst:2085 +#: 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` " @@ -2443,7 +2443,7 @@ msgstr "" "`~ArgumentParser.parse_intermixed_args` et :meth:`~ArgumentParser." "parse_known_intermixed_args` permettent ce style d'analyse." -#: library/argparse.rst:2090 +#: 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, " @@ -2456,7 +2456,7 @@ msgstr "" "groupes mutuellement exclusifs qui contiennent à la fois des arguments " "optionnels et des arguments positionnels ne sont pas pris en charge." -#: library/argparse.rst:2095 +#: library/argparse.rst:2097 msgid "" "The following example shows the difference between :meth:`~ArgumentParser." "parse_known_args` and :meth:`~ArgumentParser.parse_intermixed_args`: the " @@ -2468,7 +2468,7 @@ msgstr "" "premier renvoie ``['2', '3']`` comme arguments non-traités alors que le " "second capture tous les arguments positionnels dans ``rest`` ::" -#: library/argparse.rst:2110 +#: 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 " @@ -2480,14 +2480,14 @@ msgstr "" "non-traités. :meth:`~ArgumentParser.parse_intermixed_args` lève une erreur " "s'il reste des chaînes d'arguments non-traités." -#: library/argparse.rst:2120 +#: 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:2122 +#: library/argparse.rst:2124 msgid "" "Originally, the :mod:`argparse` module had attempted to maintain " "compatibility with :mod:`optparse`. However, :mod:`optparse` was difficult " @@ -2504,7 +2504,7 @@ msgstr "" "d'utilisation améliorés. Après avoir porté ou surchargé tout le code d':mod:" "`optparse`, la rétro-compatibilité pouvait difficilement être conservée." -#: library/argparse.rst:2129 +#: library/argparse.rst:2131 msgid "" "The :mod:`argparse` module improves on the standard library :mod:`optparse` " "module in a number of ways including:" @@ -2512,38 +2512,38 @@ msgstr "" "Le module :mod:`argparse` fournit plusieurs améliorations par rapport au " "module :mod:`optparse` de la bibliothèque standard :" -#: library/argparse.rst:2132 +#: library/argparse.rst:2134 msgid "Handling positional arguments." msgstr "Gère les arguments positionnels ;" -#: library/argparse.rst:2133 +#: library/argparse.rst:2135 msgid "Supporting sub-commands." msgstr "Prise en charge des sous commandes ;" -#: library/argparse.rst:2134 +#: 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:2135 +#: 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:2136 +#: library/argparse.rst:2138 msgid "Producing more informative usage messages." msgstr "Fournit des messages d'aide plus complets ;" -#: library/argparse.rst:2137 +#: 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:2139 +#: 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:2141 +#: library/argparse.rst:2143 msgid "" "Replace all :meth:`optparse.OptionParser.add_option` calls with :meth:" "`ArgumentParser.add_argument` calls." @@ -2551,7 +2551,7 @@ msgstr "" "Remplacer tous les appels à :meth:`optparse.OptionParser.add_option` par des " "appels à :meth:`ArgumentParser.add_argument` ;" -#: library/argparse.rst:2144 +#: library/argparse.rst:2146 msgid "" "Replace ``(options, args) = parser.parse_args()`` with ``args = parser." "parse_args()`` and add additional :meth:`ArgumentParser.add_argument` calls " @@ -2564,7 +2564,7 @@ msgstr "" "appelées ``options`` sont appelées ``args`` dans le contexte d':mod:" "`argparse` ;" -#: library/argparse.rst:2149 +#: library/argparse.rst:2151 msgid "" "Replace :meth:`optparse.OptionParser.disable_interspersed_args` by using :" "meth:`~ArgumentParser.parse_intermixed_args` instead of :meth:" @@ -2574,7 +2574,7 @@ msgstr "" "appelant :meth:`~ArgumentParser.parse_intermixed_args` plutôt que :meth:" "`~ArgumentParser.parse_args` ;" -#: library/argparse.rst:2153 +#: library/argparse.rst:2155 msgid "" "Replace callback actions and the ``callback_*`` keyword arguments with " "``type`` or ``action`` arguments." @@ -2582,7 +2582,7 @@ msgstr "" "Remplacer les actions de rappel (*callback actions* en anglais) et les " "arguments nommés ``callback_*`` par des arguments ``type`` et ``actions`` ;" -#: library/argparse.rst:2156 +#: library/argparse.rst:2158 msgid "" "Replace string names for ``type`` keyword arguments with the corresponding " "type objects (e.g. int, float, complex, etc)." @@ -2591,7 +2591,7 @@ msgstr "" "``type`` par les objets types correspondants (par exemple : ``int``, " "``float``, ``complex``, etc) ;" -#: library/argparse.rst:2159 +#: library/argparse.rst:2161 msgid "" "Replace :class:`optparse.Values` with :class:`Namespace` and :exc:`optparse." "OptionError` and :exc:`optparse.OptionValueError` with :exc:`ArgumentError`." @@ -2600,18 +2600,18 @@ msgstr "" "`optparse.OptionError` et :exc:`optparse.OptionValueError` par :exc:" "`ArgumentError` ;" -#: library/argparse.rst:2163 +#: 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 " +"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:2167 +#: library/argparse.rst:2169 msgid "" "Replace the OptionParser constructor ``version`` argument with a call to " "``parser.add_argument('--version', action='version', version='\n" "Language-Team: FRENCH \n" @@ -200,25 +200,35 @@ 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 to its behavior because " +"``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:`itemsize` attribute." +"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 -msgid "The module defines the following type:" +#, 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 " @@ -229,7 +239,7 @@ msgstr "" "liste, un :term:`bytes-like object`, ou un itérable sur des éléments du type " "approprié." -#: library/array.rst:75 +#: 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 " @@ -242,19 +252,7 @@ msgstr "" "initiaux du tableau. Si c'est un itérable, il est passé à la méthode :meth:" "`extend`." -#: library/array.rst:80 -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:84 -msgid "A string with all available type codes." -msgstr "Une chaîne avec tous les codes de types disponibles." - -#: library/array.rst:86 +#: library/array.rst:88 msgid "" "Array objects support the ordinary sequence operations of indexing, slicing, " "concatenation, and multiplication. When using slice assignment, the " @@ -270,34 +268,38 @@ msgstr "" "tableau implémentent également l'interface tampon, et peuvent être utilisés " "partout où :term:`bytes-like objects ` sont supportés." -#: library/array.rst:92 -msgid "The following data items and methods are also supported:" +#: library/array.rst:94 +msgid "" +"Raises an :ref:`auditing event ` ``array.__new__`` with arguments " +"``typecode``, ``initializer``." msgstr "" -"Les éléments de données et méthodes suivants sont également supportés :" +"Lève un :ref:`événement d'audit ` ``array.__new__`` avec les " +"arguments ``typecode``, ``initializer``." -#: library/array.rst:96 +#: 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:101 +#: 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:106 +#: 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:111 +#: 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 " +"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 "" @@ -311,7 +313,7 @@ msgstr "" "tant que le tableau existe et qu'aucune opération qui modifie sa taille ne " "lui est appliquée." -#: library/array.rst:121 +#: 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 " @@ -326,7 +328,7 @@ msgstr "" "devrait être évitée dans un nouveau code. L'interface tampon est documentée " "dans :ref:`bufferobjects`." -#: library/array.rst:130 +#: 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:" @@ -338,11 +340,11 @@ msgstr "" "`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:138 +#: 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:143 +#: 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:" @@ -355,7 +357,7 @@ msgstr "" "il doit être itérable et ces éléments doivent être du bon type pour être " "ajoutés dans le tableau." -#: library/array.rst:151 +#: 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:" @@ -365,12 +367,13 @@ msgstr "" "valeurs machine (comme si elle avait été lue depuis le fichier en utilisant " "la méthode :meth:`from file`)." -#: library/array.rst:154 -msgid ":meth:`fromstring` is renamed to :meth:`frombytes` for clarity." +#: 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:160 +#: library/array.rst:163 #, fuzzy msgid "" "Read *n* items (as machine values) from the :term:`file object` *f* and " @@ -384,7 +387,7 @@ msgstr "" "tout de même insérés dans le tableau. *f* doit être un objet fichier natif ; " "quelque chose d'autre avec une méthode :meth:`read` ne suffit pas." -#: library/array.rst:168 +#: 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." @@ -392,7 +395,7 @@ msgstr "" "Ajoute les éléments de la liste. C'est l'équivalent de ``for x in list: a." "append(x)`` sauf que s'il y a une erreur de type, le tableau est inchangé." -#: library/array.rst:174 +#: 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 " @@ -404,7 +407,7 @@ msgstr "" "``array.frombytes(unicodestring.encode(enc))`` pour ajouter des données " "Unicode à un tableau d'un autre type." -#: library/array.rst:182 +#: 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 " @@ -412,11 +415,11 @@ msgid "" "`ValueError` if *x* is not found." msgstr "" -#: library/array.rst:187 +#: library/array.rst:190 msgid "Added optional *start* and *stop* parameters." msgstr "" -#: library/array.rst:192 +#: 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." @@ -425,7 +428,7 @@ msgstr "" "position *i*. Les valeurs négatives sont traitées relativement à la fin du " "tableau." -#: library/array.rst:198 +#: 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 " @@ -435,15 +438,15 @@ msgstr "" "optionnel par défaut est à ``-1``, de sorte que par défaut le dernier " "élément est supprimé et renvoyé." -#: library/array.rst:205 +#: 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:210 +#: 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:215 +#: 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 " @@ -453,22 +456,23 @@ msgstr "" "représentation en octets (la même séquence d'octets qui serait écrite par la " "méthode :meth:`tofile`)." -#: library/array.rst:219 -msgid ":meth:`tostring` is renamed to :meth:`tobytes` for clarity." +#: 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:225 +#: 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:230 +#: 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:235 +#: 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()." @@ -479,7 +483,7 @@ msgstr "" "tobytes().decode(enc)`` pour obtenir une chaîne Unicode depuis un tableau de " "tout autre type." -#: library/array.rst:240 +#: 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 " @@ -497,19 +501,19 @@ msgstr "" "func:`eval`, tant que la classe :class:`~array.array` a été importée en " "utilisant ``from array import array``. Exemples ::" -#: library/array.rst:257 +#: library/array.rst:261 msgid "Module :mod:`struct`" msgstr "Module :mod:`struct`" -#: library/array.rst:257 +#: 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:261 +#: library/array.rst:265 msgid "Module :mod:`xdrlib`" msgstr "Module :mod:`xdrlib`" -#: library/array.rst:260 +#: library/array.rst:264 msgid "" "Packing and unpacking of External Data Representation (XDR) data as used in " "some remote procedure call systems." @@ -518,14 +522,18 @@ msgstr "" "telles qu'elles sont utilisées dans certains systèmes d'appels de procédures " "à distance (ou RPC pour *remote procedure call* en anglais)." -#: library/array.rst:263 +#: library/array.rst:267 msgid "`NumPy `_" msgstr "" -#: library/array.rst:264 +#: 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." diff --git a/library/ast.po b/library/ast.po index 1a932d2e5a..b16cf8b624 100644 --- a/library/ast.po +++ b/library/ast.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-21 15:04+0200\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" @@ -65,10 +65,11 @@ 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:" -"`below `. They are defined in the :mod:`_ast` C module " +"`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 " @@ -767,7 +768,9 @@ 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. +# 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:" @@ -1297,7 +1300,7 @@ msgid "" "compilation step does." msgstr "" -#: library/ast.rst:1973 +#: 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." @@ -1340,8 +1343,8 @@ msgstr "" #: library/ast.rst:1962 #, fuzzy msgid "" -"Safely evaluate an expression node or a string containing a Python literal " -"or container display. The string or node provided may only consist of the " +"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 "" @@ -1352,11 +1355,11 @@ msgstr "" "nombres, *n*-uplets, listes, dictionnaires, ensembles, booléens, et ``None``." #: library/ast.rst:1967 +#, fuzzy msgid "" -"This can be used for safely evaluating strings containing Python values from " -"untrusted sources without the need to parse the values oneself. It is not " -"capable of evaluating arbitrarily complex expressions, for example involving " -"operators or indexing." +"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 " @@ -1364,25 +1367,47 @@ msgstr "" "d'évaluer des expressions arbitrairement complexes, par exemple impliquant " "des opérateurs ou de l'indiçage." -#: library/ast.rst:1977 +#: 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:1981 +#: library/ast.rst:1989 msgid "Now allows bytes and set literals." msgstr "accepte maintenant les octets et ensembles littéraux." -#: library/ast.rst:1984 +#: library/ast.rst:1992 msgid "Now supports creating empty sets with ``'set()'``." msgstr "accepte ``set()`` pour les ensembles vides." -#: library/ast.rst:1987 +#: library/ast.rst:1995 msgid "For string inputs, leading spaces and tabs are now stripped." msgstr "" -#: library/ast.rst:1993 +#: library/ast.rst:2001 msgid "" "Return the docstring of the given *node* (which must be a :class:" "`FunctionDef`, :class:`AsyncFunctionDef`, :class:`ClassDef`, or :class:" @@ -1394,11 +1419,11 @@ msgstr "" "n'a pas de *docstring*. Si *clean* est vrai, cette fonction nettoie " "l'indentation de la *docstring* avec :func:`inspect.cleandoc`." -#: library/ast.rst:1999 +#: library/ast.rst:2007 msgid ":class:`AsyncFunctionDef` is now supported." msgstr ":class:`AsyncFunctionDef` est maintenant gérée." -#: library/ast.rst:2005 +#: 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:" @@ -1409,13 +1434,13 @@ msgstr "" "`end_lineno`, :attr:`col_offset` et :attr:`end_col_offset`) n'est pas " "rempli, cette fonction renvoie ``None``." -#: library/ast.rst:2009 +#: 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:2017 +#: 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 " @@ -1431,7 +1456,7 @@ msgstr "" "comme les valeurs du nœud parent. Elle fonctionne récursivement en démarrant " "de *node*." -#: library/ast.rst:2026 +#: 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 " @@ -1441,7 +1466,7 @@ msgstr "" "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:2033 +#: 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 " @@ -1452,7 +1477,7 @@ msgstr "" "*old_node* vers le nouveau nœud *new_node*, si possible, et renvoie " "*new_node*." -#: library/ast.rst:2040 +#: library/ast.rst:2048 msgid "" "Yield a tuple of ``(fieldname, value)`` for each field in ``node._fields`` " "that is present on *node*." @@ -1460,7 +1485,7 @@ 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:2046 +#: 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." @@ -1469,7 +1494,7 @@ msgstr "" "champs qui sont des nœuds et tous les éléments des champs qui sont des " "listes de nœuds." -#: library/ast.rst:2052 +#: 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 " @@ -1480,7 +1505,7 @@ msgstr "" "lorsque l'on souhaite modifier les nœuds sur place sans prêter attention au " "contexte." -#: library/ast.rst:2059 +#: 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 " @@ -1491,7 +1516,7 @@ msgstr "" "Cette fonction peut renvoyer une valeur, qui est transmise par la méthode :" "meth:`visit`." -#: library/ast.rst:2063 +#: library/ast.rst:2071 msgid "" "This class is meant to be subclassed, with the subclass adding visitor " "methods." @@ -1499,7 +1524,7 @@ msgstr "" "Cette classe est faite pour être dérivée, en ajoutant des méthodes de visite " "à la sous-classe." -#: library/ast.rst:2068 +#: 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, " @@ -1509,12 +1534,12 @@ msgstr "" "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:2074 +#: 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:2076 +#: 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." @@ -1523,7 +1548,7 @@ msgstr "" "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:2080 +#: 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:" @@ -1533,7 +1558,7 @@ msgstr "" "changements sur les nœuds lors du parcours. Pour cela, un visiteur spécial " "existe (:class:`NodeTransformer`) qui permet les modifications." -#: library/ast.rst:2086 +#: 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 " @@ -1546,7 +1571,7 @@ msgstr "" "une méthode :meth:`visit_Constant` pour traiter tous les nœuds qui " "représentent des valeurs constantes." -#: library/ast.rst:2094 +#: library/ast.rst:2102 msgid "" "A :class:`NodeVisitor` subclass that walks the abstract syntax tree and " "allows modification of nodes." @@ -1554,7 +1579,7 @@ msgstr "" "Une sous-classe de :class:`NodeVisitor` qui traverse l'arbre syntaxique " "abstrait et permet de modifier les nœuds." -#: library/ast.rst:2097 +#: 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 " @@ -1568,7 +1593,7 @@ msgstr "" "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:2103 +#: library/ast.rst:2111 msgid "" "Here is an example transformer that rewrites all occurrences of name lookups " "(``foo``) to ``data['foo']``::" @@ -1576,7 +1601,7 @@ 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:2115 +#: 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` " @@ -1586,7 +1611,7 @@ msgstr "" "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:2119 +#: 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 " @@ -1596,7 +1621,7 @@ msgstr "" "instructions), le visiteur peut aussi renvoyer une liste des nœuds plutôt " "qu'un seul nœud." -#: library/ast.rst:2123 +#: 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:" @@ -1608,11 +1633,11 @@ msgstr "" "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:2131 +#: library/ast.rst:2139 msgid "Usually you use the transformer like this::" msgstr "Utilisation typique des transformations ::" -#: library/ast.rst:2138 +#: 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 " @@ -1632,32 +1657,32 @@ msgstr "" "masqués par défaut, mais on peut les inclure en mettant *include_attributes* " "à ``True``." -#: library/ast.rst:2146 +#: 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 " +"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:2153 +"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:2160 +#: library/ast.rst:2168 msgid "Compiler Flags" msgstr "Options du compilateur" -#: library/ast.rst:2162 +#: 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:" @@ -1665,7 +1690,7 @@ 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:2167 +#: library/ast.rst:2175 msgid "" "Enables support for top-level ``await``, ``async for``, ``async with`` and " "async comprehensions." @@ -1673,14 +1698,14 @@ msgstr "" "Active la reconnaissance de ``await``, ``async for``, ``async with`` et des " "compréhensions asynchrones au niveau le plus haut." -#: library/ast.rst:2174 +#: 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:2179 +#: library/ast.rst:2187 msgid "" "Enables support for :pep:`484` and :pep:`526` style type comments (``# type: " "``, ``# type: ignore ``)." @@ -1688,11 +1713,11 @@ 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:2188 +#: library/ast.rst:2196 msgid "Command-Line Usage" msgstr "Utilisation en ligne de commande" -#: library/ast.rst:2192 +#: library/ast.rst:2200 msgid "" "The :mod:`ast` module can be executed as a script from the command line. It " "is as simple as:" @@ -1700,15 +1725,15 @@ 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:2199 +#: library/ast.rst:2207 msgid "The following options are accepted:" msgstr "Les options suivantes sont acceptées :" -#: library/ast.rst:2205 +#: library/ast.rst:2213 msgid "Show the help message and exit." msgstr "Affiche un message d'aide et quitte." -#: library/ast.rst:2210 +#: library/ast.rst:2218 msgid "" "Specify what kind of code must be compiled, like the *mode* argument in :" "func:`parse`." @@ -1716,21 +1741,21 @@ msgstr "" "Précise le type de code à compiler, comme l'argument *mode* de la fonction :" "func:`parse`." -#: library/ast.rst:2215 +#: library/ast.rst:2223 msgid "Don't parse type comments." msgstr "Désactive la reconnaissance des commentaires de type." -#: library/ast.rst:2219 +#: 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:2224 +#: 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:2226 +#: 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." @@ -1739,7 +1764,7 @@ msgstr "" "standard sinon. Le code source est transformé en un arbre syntaxique, qui " "est affiché sur la sortie standard." -#: library/ast.rst:2232 +#: library/ast.rst:2240 msgid "" "`Green Tree Snakes `_, an external " "documentation resource, has good details on working with Python ASTs." @@ -1748,7 +1773,7 @@ msgstr "" "ressource documentaire externe, qui possède plus de détails pour travailler " "avec des arbres syntaxiques Python." -#: library/ast.rst:2235 +#: library/ast.rst:2243 msgid "" "`ASTTokens `_ " "annotates Python ASTs with the positions of tokens and text in the source " @@ -1760,9 +1785,10 @@ msgstr "" "extraits de code source à partir desquels ils sont produits. Ceci est utile " "pour les outils qui transforment du code source." -#: library/ast.rst:2240 +#: library/ast.rst:2248 +#, fuzzy msgid "" -"`leoAst.py `_ unifies the " +"`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 "" @@ -1770,7 +1796,7 @@ msgstr "" "visions des lexèmes et des arbres syntaxiques en insérant des liens " "bidirectionnels entre les deux." -#: library/ast.rst:2244 +#: 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 " @@ -1781,7 +1807,7 @@ msgstr "" "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:2249 +#: library/ast.rst:2257 msgid "" "`Parso `_ is a Python parser that supports " "error recovery and round-trip parsing for different Python versions (in " diff --git a/library/asynchat.po b/library/asynchat.po index 0cdb440a7a..57e80557ba 100644 --- a/library/asynchat.po +++ b/library/asynchat.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" +"POT-Creation-Date: 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" @@ -21,15 +21,17 @@ msgstr "" ":mod:`asynchat` --- Gestionnaire d'interfaces de connexion (*socket*) " "commande/réponse asynchrones" -#: library/asynchat.rst:10 +#: library/asynchat.rst:11 msgid "**Source code:** :source:`Lib/asynchat.py`" msgstr "*Code source :** :source:`Lib/asynchat.py`" -#: library/asynchat.rst:12 -msgid "Please use :mod:`asyncio` instead." -msgstr "Utilisez :mod:`asyncio` à la place." +#: library/asynchat.rst:13 +msgid "" +":mod:`asynchat` will be removed in Python 3.12 (see :pep:`PEP 594 " +"<594#asynchat>` for details). Please use :mod:`asyncio` instead." +msgstr "" -#: library/asynchat.rst:19 +#: library/asynchat.rst:22 msgid "" "This module exists for backwards compatibility only. For new code we " "recommend using :mod:`asyncio`." @@ -37,7 +39,7 @@ msgstr "" "Ce module n'existe que pour des raisons de rétrocompatibilité. Pour du code " "nouveau, l'utilisation de :mod:`asyncio` est recommandée." -#: library/asynchat.rst:22 +#: library/asynchat.rst:25 msgid "" "This module builds on the :mod:`asyncore` infrastructure, simplifying " "asynchronous clients and servers and making it easier to handle protocols " @@ -64,7 +66,7 @@ msgstr "" "d'objets :class:`asynchat.async_chat` à la réception de requêtes de " "connexion." -#: library/asynchat.rst:37 +#: library/asynchat.rst:40 msgid "" "This class is an abstract subclass of :class:`asyncore.dispatcher`. To make " "practical use of the code you must subclass :class:`async_chat`, providing " @@ -79,7 +81,7 @@ msgstr "" "de :class:`asyncore.dispatcher` peuvent être utilisées, même si toutes " "n'ont pas de sens dans un contexte de messages/réponse." -#: library/asynchat.rst:44 +#: library/asynchat.rst:47 msgid "" "Like :class:`asyncore.dispatcher`, :class:`async_chat` defines a set of " "events that are generated by an analysis of socket conditions after a :c:" @@ -94,7 +96,7 @@ msgstr "" "objets :class:`async_chat` sont appelées par le *framework* de traitement " "d’événements sans que le programmeur n'ait à le spécifier." -#: library/asynchat.rst:50 +#: library/asynchat.rst:53 msgid "" "Two class attributes can be modified, to improve performance, or possibly " "even to conserve memory." @@ -102,15 +104,15 @@ msgstr "" "Deux attributs de classe peuvent être modifiés, pour améliorer la " "performance, ou potentiellement pour économiser de la mémoire." -#: library/asynchat.rst:56 +#: library/asynchat.rst:59 msgid "The asynchronous input buffer size (default ``4096``)." msgstr "La taille du tampon d'entrées asynchrones (``4096`` par défaut)." -#: library/asynchat.rst:61 +#: library/asynchat.rst:64 msgid "The asynchronous output buffer size (default ``4096``)." msgstr "La taille du tampon de sorties asynchrones (``4096`` par défaut)." -#: library/asynchat.rst:63 +#: library/asynchat.rst:66 msgid "" "Unlike :class:`asyncore.dispatcher`, :class:`async_chat` allows you to " "define a :abbr:`FIFO (first-in, first-out)` queue of *producers*. A producer " @@ -137,7 +139,7 @@ msgstr "" "d'un point d'arrêt, dans in transmission entrante depuis le point d’accès " "distant." -#: library/asynchat.rst:76 +#: library/asynchat.rst:79 msgid "" "To build a functioning :class:`async_chat` subclass your input methods :" "meth:`collect_incoming_data` and :meth:`found_terminator` must handle the " @@ -149,7 +151,7 @@ msgstr "" "`found_terminator` doivent gérer la donnée que le canal reçoit de manière " "asynchrone. Ces méthodes sont décrites ci-dessous." -#: library/asynchat.rst:84 +#: library/asynchat.rst:87 msgid "" "Pushes a ``None`` on to the producer queue. When this producer is popped off " "the queue it causes the channel to be closed." @@ -157,7 +159,7 @@ msgstr "" "Pousse un ``None`` sur la pile de producteurs. Quand ce producteur est " "récupéré dans la queue, le canal est fermé." -#: library/asynchat.rst:90 +#: library/asynchat.rst:93 msgid "" "Called with *data* holding an arbitrary amount of received data. The " "default method, which must be overridden, raises a :exc:" @@ -166,7 +168,7 @@ msgstr "" "Appelé avec *data* contenant une quantité arbitraire de données. La méthode " "par défaut, qui doit être écrasée, lève une :exc:`NotImplementedError`." -#: library/asynchat.rst:97 +#: library/asynchat.rst:100 msgid "" "In emergencies this method will discard any data held in the input and/or " "output buffers and the producer queue." @@ -174,7 +176,7 @@ msgstr "" "En cas d'urgence, cette méthode va supprimer tout donnée présente dans les " "tampons d'entrée et/ou de sortie dans la queue de producteurs." -#: library/asynchat.rst:103 +#: library/asynchat.rst:106 msgid "" "Called when the incoming data stream matches the termination condition set " "by :meth:`set_terminator`. The default method, which must be overridden, " @@ -186,11 +188,11 @@ msgstr "" "lève une :exc:`NotImplementedError`. Les données entrantes mise en tampon " "devraient être disponible via un attribut de l'instance." -#: library/asynchat.rst:111 +#: library/asynchat.rst:114 msgid "Returns the current terminator for the channel." msgstr "Renvoie le terminateur courant pour le canal." -#: library/asynchat.rst:116 +#: library/asynchat.rst:119 msgid "" "Pushes data on to the channel's queue to ensure its transmission. This is " "all you need to do to have the channel write the data out to the network, " @@ -203,10 +205,11 @@ msgstr "" "schémas plus complexes qui implémentent de la cryptographie et du *chunking* " "par exemple." -#: library/asynchat.rst:124 +#: 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 " +"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 "" @@ -215,7 +218,7 @@ msgstr "" "canal consomme les données de ce producteur en appelant sa méthode :meth:" "`more` et envoie les données au point d’accès distant." -#: library/asynchat.rst:132 +#: library/asynchat.rst:135 msgid "" "Sets the terminating condition to be recognized on the channel. ``term`` " "may be any of three types of value, corresponding to three different ways to " @@ -225,19 +228,19 @@ msgstr "" "n'importe lequel des trois types de valeurs, correspondant aux trois " "différentes manières de gérer les données entrantes." -#: library/asynchat.rst:137 +#: library/asynchat.rst:140 msgid "term" msgstr "*term*" -#: library/asynchat.rst:137 +#: library/asynchat.rst:140 msgid "Description" msgstr "Description" -#: library/asynchat.rst:139 +#: library/asynchat.rst:142 msgid "*string*" msgstr "*string*" -#: library/asynchat.rst:139 +#: library/asynchat.rst:142 msgid "" "Will call :meth:`found_terminator` when the string is found in the input " "stream" @@ -245,11 +248,11 @@ msgstr "" "Appellera :meth:`found_terminator` quand la chaîne est trouvée dans le flux " "d'entré" -#: library/asynchat.rst:142 +#: library/asynchat.rst:145 msgid "*integer*" msgstr "*integer*" -#: library/asynchat.rst:142 +#: library/asynchat.rst:145 msgid "" "Will call :meth:`found_terminator` when the indicated number of characters " "have been received" @@ -257,15 +260,15 @@ msgstr "" "Appellera :meth:`found_terminator` quand le nombre de caractère indiqué à " "été reçu" -#: library/asynchat.rst:146 +#: library/asynchat.rst:149 msgid "``None``" msgstr "``None``" -#: library/asynchat.rst:146 +#: library/asynchat.rst:149 msgid "The channel continues to collect data forever" msgstr "Le canal continue de collecter des informations indéfiniment" -#: library/asynchat.rst:150 +#: library/asynchat.rst:153 msgid "" "Note that any data following the terminator will be available for reading by " "the channel after :meth:`found_terminator` is called." @@ -273,11 +276,11 @@ msgstr "" "Notez que toute donnée située après le marqueur de fin sera accessible en " "lecture par le canal après que :meth:`found_terminator` ai été appelé." -#: library/asynchat.rst:157 +#: library/asynchat.rst:160 msgid "asynchat Example" msgstr "Exemple *asynchat*" -#: library/asynchat.rst:159 +#: library/asynchat.rst:162 msgid "" "The following partial example shows how HTTP requests can be read with :" "class:`async_chat`. A web server might create an :class:" @@ -293,7 +296,7 @@ msgstr "" "lignes vides à la fin des entêtes HTTP, et une option indique que les " "entêtes sont en train d'être lues." -#: library/asynchat.rst:166 +#: library/asynchat.rst:169 msgid "" "Once the headers have been read, if the request is of type POST (indicating " "that further data are present in the input stream) then the ``Content-Length:" @@ -305,7 +308,7 @@ msgstr "" "alors l'entête ``Content-Length:`` est utilisé pour définir un marqueur de " "fin numérique pour lire la bonne quantité de donné depuis le canal." -#: library/asynchat.rst:171 +#: library/asynchat.rst:174 msgid "" "The :meth:`handle_request` method is called once all relevant input has been " "marshalled, after setting the channel terminator to ``None`` to ensure that " @@ -315,3 +318,6 @@ msgstr "" "données pertinentes ont été rassemblées, après avoir définit le marqueur de " "fin à ``None`` pour s'assurer que toute données étrangères envoyées par le " "client web sont ignorées. ::" + +#~ msgid "Please use :mod:`asyncio` instead." +#~ msgstr "Utilisez :mod:`asyncio` à la place." diff --git a/library/asyncio-api-index.po b/library/asyncio-api-index.po index e9fc621baa..89a1fdec05 100644 --- a/library/asyncio-api-index.po +++ b/library/asyncio-api-index.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-09-23 16:16+0200\n" +"POT-Creation-Date: 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" @@ -43,7 +43,7 @@ msgstr "" #: library/asyncio-api-index.rst:24 msgid ":func:`create_task`" -msgstr "" +msgstr ":func:`create_task`" #: library/asyncio-api-index.rst:25 msgid "Start an asyncio Task." @@ -91,7 +91,7 @@ msgstr "" #: library/asyncio-api-index.rst:42 msgid ":func:`current_task`" -msgstr "" +msgstr ":func:`current_task`" #: library/asyncio-api-index.rst:43 msgid "Return the current Task." @@ -99,7 +99,7 @@ msgstr "" #: library/asyncio-api-index.rst:45 msgid ":func:`all_tasks`" -msgstr "" +msgstr ":func:`all_tasks`" #: library/asyncio-api-index.rst:46 msgid "Return all tasks for an event loop." @@ -107,7 +107,7 @@ msgstr "" #: library/asyncio-api-index.rst:48 msgid ":class:`Task`" -msgstr "" +msgstr ":class:`Task`" #: library/asyncio-api-index.rst:49 msgid "Task object." @@ -124,7 +124,7 @@ msgstr "" #: library/asyncio-api-index.rst:54 msgid ":func:`run_coroutine_threadsafe`" -msgstr "" +msgstr ":func:`run_coroutine_threadsafe`" #: library/asyncio-api-index.rst:55 msgid "Schedule a coroutine from another OS thread." @@ -226,7 +226,7 @@ msgstr "" #: library/asyncio-api-index.rst:115 msgid "Create a subprocess." -msgstr "" +msgstr "Crée un sous-processus." #: library/asyncio-api-index.rst:117 msgid "``await`` :func:`create_subprocess_shell`" @@ -286,7 +286,7 @@ msgstr "" #: library/asyncio-api-index.rst:150 msgid ":class:`StreamReader`" -msgstr "" +msgstr ":class:`StreamReader`" #: library/asyncio-api-index.rst:151 msgid "High-level async/await object to receive network data." @@ -294,7 +294,7 @@ msgstr "" #: library/asyncio-api-index.rst:153 msgid ":class:`StreamWriter`" -msgstr "" +msgstr ":class:`StreamWriter`" #: library/asyncio-api-index.rst:154 msgid "High-level async/await object to send network data." @@ -372,7 +372,7 @@ msgstr "Exceptions" #: library/asyncio-api-index.rst:206 msgid ":exc:`asyncio.TimeoutError`" -msgstr "" +msgstr ":exc:`asyncio.TimeoutError`" #: library/asyncio-api-index.rst:207 msgid "" @@ -383,7 +383,7 @@ msgstr "" #: library/asyncio-api-index.rst:211 msgid ":exc:`asyncio.CancelledError`" -msgstr "" +msgstr ":exc:`asyncio.CancelledError`" #: library/asyncio-api-index.rst:212 msgid "Raised when a Task is cancelled. See also :meth:`Task.cancel`." diff --git a/library/asyncio-dev.po b/library/asyncio-dev.po index 4787e5fd19..c630bbfc85 100644 --- a/library/asyncio-dev.po +++ b/library/asyncio-dev.po @@ -5,14 +5,15 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-01 16:00+0200\n" -"PO-Revision-Date: 2018-10-13 17:38+0200\n" -"Last-Translator: Julien Palard \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" @@ -23,45 +24,54 @@ msgid "" "Asynchronous programming is different from classic \"sequential\" " "programming." msgstr "" +"La programmation asynchrone est différente de la programmation " +"« séquentielle » classique." #: library/asyncio-dev.rst:12 msgid "" "This page lists common mistakes and traps and explains how to avoid them." msgstr "" +"Cette page liste les pièges et erreurs communs que le développeur pourrait " +"rencontrer et décrit comment les éviter." #: library/asyncio-dev.rst:19 msgid "Debug Mode" -msgstr "" +msgstr "Mode débogage" #: library/asyncio-dev.rst:21 msgid "" "By default asyncio runs in production mode. In order to ease the " "development asyncio has a *debug mode*." msgstr "" +"Par défaut, *asyncio* s'exécute en mode production. Pour faciliter le " +"développement, *asyncio* possède un « mode débogage »." #: library/asyncio-dev.rst:24 msgid "There are several ways to enable asyncio debug mode:" -msgstr "" +msgstr "Il existe plusieurs façons d'activer le mode débogage de *asyncio* :" #: library/asyncio-dev.rst:26 msgid "Setting the :envvar:`PYTHONASYNCIODEBUG` environment variable to ``1``." msgstr "" +"en réglant la variable d’environnement :envvar:`PYTHONASYNCIODEBUG` à ``1`` ;" #: library/asyncio-dev.rst:28 msgid "Using the :ref:`Python Development Mode `." msgstr "" +"en utilisant le mode développement de Python (:ref:`Python Development Mode " +"`) ;" #: library/asyncio-dev.rst:30 msgid "Passing ``debug=True`` to :func:`asyncio.run`." -msgstr "" +msgstr "en passant ``debug=True`` à la fonction :func:`asyncio.run` ;" #: library/asyncio-dev.rst:32 msgid "Calling :meth:`loop.set_debug`." -msgstr "" +msgstr "en appelant la méthode :meth:`loop.set_debug`." #: library/asyncio-dev.rst:34 msgid "In addition to enabling the debug mode, consider also:" -msgstr "" +msgstr "En plus d'activer le mode débogage, vous pouvez également :" #: library/asyncio-dev.rst:36 msgid "" @@ -69,6 +79,10 @@ msgid "" "data:`logging.DEBUG`, for example the following snippet of code can be run " "at startup of the application::" msgstr "" +"régler le niveau de journalisation pour l'enregistreur d'*asyncio* (:ref:" +"`asyncio logger `) à :py:data:`logging.DEBUG` ; par exemple, " +"le fragment de code suivant peut être exécuté au démarrage de " +"l'application ::" #: library/asyncio-dev.rst:42 msgid "" @@ -76,30 +90,44 @@ msgid "" "warnings. One way of doing that is by using the :option:`-W` ``default`` " "command line option." msgstr "" +"configurer le module :mod:`warnings` afin d'afficher les avertissements de " +"type :exc:`ResourceWarning` ; vous pouvez faire cela en utilisant l'option :" +"option:`-W` ``default`` sur la ligne de commande." #: library/asyncio-dev.rst:47 msgid "When the debug mode is enabled:" -msgstr "" +msgstr "Lorsque le mode débogage est activé :" +# 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 "" @@ -107,10 +135,14 @@ msgid "" "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 "Concourance et *multithreading*" +msgstr "Programmation concurrente et multi-fils" #: library/asyncio-dev.rst:70 msgid "" @@ -120,12 +152,21 @@ msgid "" "``await`` expression, the running Task gets suspended, and the event loop " "executes the next Task." msgstr "" +"Une boucle d'évènements s'exécute dans un fil d’exécution (typiquement dans " +"le fil principal) et traite toutes les fonctions de rappel (*callbacks*) " +"ainsi que toutes les tâches dans ce même fil. Lorsqu'une tâche est en cours " +"d'exécution dans la boucle d'évènements, aucune autre tâche ne peut " +"s'exécuter dans ce fil. Quand une tâche traite une expression ``await``, " +"elle se suspend et laisse la boucle d’évènements traiter la tâche suivante." #: library/asyncio-dev.rst:76 msgid "" "To schedule a :term:`callback` from another OS thread, the :meth:`loop." "call_soon_threadsafe` method should be used. Example::" msgstr "" +"Pour planifier un :term:`rappel ` depuis un autre fil d'exécution " +"système, utilisez la méthode :meth:`loop.call_soon_threadsafe`. Par " +"exemple ::" #: library/asyncio-dev.rst:81 msgid "" @@ -134,6 +175,12 @@ msgid "" "a callback. If there's a need for such code to call a low-level asyncio " "API, the :meth:`loop.call_soon_threadsafe` method should be used, e.g.::" msgstr "" +"La plupart des objets *asyncio* ne sont pas conçus pour être exécutés dans " +"un contexte multi-fils (*thread-safe*) mais cela n'est en général pas un " +"problème à moins que l'objet ne fasse appel à du code se trouvant en dehors " +"d'une tâche ou d'une fonction de rappel. Dans ce dernier cas, si le code " +"appelle les *API* bas niveau de *asyncio*, utilisez la méthode :meth:`loop." +"call_soon_threadsafe`. Par exemple ::" #: library/asyncio-dev.rst:89 msgid "" @@ -141,12 +188,17 @@ msgid "" "`run_coroutine_threadsafe` function should be used. It returns a :class:" "`concurrent.futures.Future` to access the result::" msgstr "" +"Pour planifier un objet concurrent depuis un autre fil d'exécution système, " +"utilisez :func:`run_coroutine_threadsafe`. Cette fonction renvoie un objet :" +"class:`concurrent.futures.Future` pour accéder au résultat ::" #: library/asyncio-dev.rst:102 msgid "" "To handle signals and to execute subprocesses, the event loop must be run in " "the main thread." msgstr "" +"Pour pouvoir traiter les signaux et démarrer des processus enfants, la " +"boucle d'évènements doit être exécutée dans le fil principal." #: library/asyncio-dev.rst:105 msgid "" @@ -155,23 +207,39 @@ msgid "" "different OS thread without blocking the OS thread that the event loop runs " "in." msgstr "" +"La méthode :meth:`loop.run_in_executor` peut être utilisée avec :class:" +"`concurrent.futures.ThreadPoolExecutor` pour exécuter du code bloquant dans " +"un autre fil d'exécution, afin de ne pas bloquer le fil où la boucle " +"d'évènements se trouve." #: library/asyncio-dev.rst:110 +#, 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:`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 " +"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 "" +msgstr "Exécution de code bloquant" #: library/asyncio-dev.rst:126 msgid "" @@ -179,6 +247,11 @@ msgid "" "function performs a CPU-intensive calculation for 1 second, all concurrent " "asyncio Tasks and IO operations would be delayed by 1 second." msgstr "" +"Du code bloquant sur des opérations de calcul (*CPU-bound*) ne devrait pas " +"être appelé directement. Par exemple, si une fonction effectue des calculs " +"utilisant le CPU intensivement pendant une seconde, toutes les tâches " +"*asyncio* concurrentes et les opérations d'entrées-sorties seront bloquées " +"pour une seconde." #: library/asyncio-dev.rst:131 msgid "" @@ -186,6 +259,10 @@ msgid "" "different process to avoid blocking the OS thread with the event loop. See " "the :meth:`loop.run_in_executor` method for more details." msgstr "" +"Un exécuteur peut être utilisé pour traiter une tâche dans un fil " +"d'exécution ou un processus différent, afin d'éviter de bloquer le fil " +"d'exécution système dans lequel se trouve la boucle d’évènements. Voir :meth:" +"`loop.run_in_executor` pour plus de détails." #: library/asyncio-dev.rst:140 msgid "Logging" @@ -196,56 +273,79 @@ msgid "" "asyncio uses the :mod:`logging` module and all logging is performed via the " "``\"asyncio\"`` logger." msgstr "" +"*Asyncio* utilise le module :mod:`logging`. Toutes les opérations de " +"journalisation sont effectuées via l'enregistreur (*logger*) ``\"asyncio\"``." #: library/asyncio-dev.rst:145 msgid "" "The default log level is :py:data:`logging.INFO`, which can be easily " "adjusted::" msgstr "" +"Le niveau de journalisation par défaut est :py:data:`logging.INFO` mais peut " +"être ajusté facilement ::" -#: library/asyncio-dev.rst:154 -msgid "Detect never-awaited coroutines" +#: 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:156 +#: 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:216 +#: library/asyncio-dev.rst:221 msgid "Output::" msgstr "Sortie ::" -#: library/asyncio-dev.rst:232 +#: library/asyncio-dev.rst:237 msgid "Output in debug mode::" msgstr "Affichage en mode débogage ::" -#: library/asyncio-dev.rst:189 +#: 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:197 +#: library/asyncio-dev.rst:202 msgid "Detect never-retrieved exceptions" -msgstr "" +msgstr "Détection des exceptions jamais récupérées" -#: library/asyncio-dev.rst:199 +#: 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:204 +#: library/asyncio-dev.rst:209 msgid "Example of an unhandled exception::" -msgstr "" +msgstr "Exemple d'une exception non-gérée ::" -#: library/asyncio-dev.rst:227 +#: 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 index d6b42a0d4b..4d1b6dd917 100644 --- a/library/asyncio-eventloop.po +++ b/library/asyncio-eventloop.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-12-31 11:33+0100\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" @@ -15,28 +15,28 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Poedit 2.0.2\n" -#: library/asyncio-eventloop.rst:6 +#: library/asyncio-eventloop.rst:8 msgid "Event Loop" msgstr "Boucle d'évènements" -#: library/asyncio-eventloop.rst:8 +#: library/asyncio-eventloop.rst:10 msgid "" "**Source code:** :source:`Lib/asyncio/events.py`, :source:`Lib/asyncio/" "base_events.py`" msgstr "" -#: library/asyncio-eventloop.rst:14 +#: library/asyncio-eventloop.rst:16 msgid "Preface" msgstr "" -#: library/asyncio-eventloop.rst:15 +#: 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:19 +#: 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 " @@ -45,143 +45,157 @@ msgid "" "control over the event loop behavior." msgstr "" -#: library/asyncio-eventloop.rst:26 +#: library/asyncio-eventloop.rst:28 msgid "Obtaining the Event Loop" msgstr "Obtenir une boucle d'évènements" -#: library/asyncio-eventloop.rst:27 +#: 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:32 +#: library/asyncio-eventloop.rst:34 msgid "Return the running event loop in the current OS thread." msgstr "" -#: library/asyncio-eventloop.rst:34 -msgid "" -"If there is no running event loop a :exc:`RuntimeError` is raised. This " -"function can only be called from a coroutine or a callback." +#: 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:41 +#: 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:43 +#: library/asyncio-eventloop.rst:46 msgid "" -"If there is no current event loop set in the current OS thread, the OS " -"thread is main, and :func:`set_event_loop` has not yet been called, asyncio " -"will create a new event loop and set it as the current one." +"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:48 +#: 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:53 +#: library/asyncio-eventloop.rst:58 msgid "" -"Consider also using the :func:`asyncio.run` function instead of using lower " -"level functions to manually create and close an event loop." +"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:56 +#: library/asyncio-eventloop.rst:63 msgid "" -"Deprecation warning is emitted if there is no running event loop. In future " -"Python releases, this function will be an alias of :func:`get_running_loop`." +"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:63 -msgid "Set *loop* as a current event loop for the current OS thread." +#: 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:67 +#: library/asyncio-eventloop.rst:78 msgid "Create and return a new event loop object." -msgstr "" +msgstr "Crée et renvoie un nouvel objet de boucle d'événements." -#: library/asyncio-eventloop.rst:69 +#: 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:75 +#: library/asyncio-eventloop.rst:86 msgid "Contents" msgstr "Sommaire" -#: library/asyncio-eventloop.rst:76 +#: library/asyncio-eventloop.rst:87 msgid "This documentation page contains the following sections:" msgstr "" -#: library/asyncio-eventloop.rst:78 +#: 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:81 +#: 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:85 +#: 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:88 +#: library/asyncio-eventloop.rst:99 msgid "" "The `Event Loop Implementations`_ section documents the :class:" "`SelectorEventLoop` and :class:`ProactorEventLoop` classes;" msgstr "" -#: library/asyncio-eventloop.rst:91 +#: library/asyncio-eventloop.rst:102 msgid "" "The `Examples`_ section showcases how to work with some event loop APIs." msgstr "" -#: library/asyncio-eventloop.rst:98 +#: library/asyncio-eventloop.rst:109 msgid "Event Loop Methods" msgstr "Méthodes de la boucle d'évènements" -#: library/asyncio-eventloop.rst:100 +#: library/asyncio-eventloop.rst:111 msgid "Event loops have **low-level** APIs for the following:" msgstr "" -#: library/asyncio-eventloop.rst:108 +#: 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:112 +#: 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:115 +#: 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:118 +#: library/asyncio-eventloop.rst:129 msgid "Return the Future's result or raise its exception." msgstr "" -#: library/asyncio-eventloop.rst:122 +#: library/asyncio-eventloop.rst:133 msgid "Run the event loop until :meth:`stop` is called." msgstr "" -#: library/asyncio-eventloop.rst:124 +#: 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 " @@ -189,7 +203,7 @@ msgid "" "and then exit." msgstr "" -#: library/asyncio-eventloop.rst:129 +#: 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 " @@ -198,41 +212,41 @@ msgid "" "called." msgstr "" -#: library/asyncio-eventloop.rst:137 +#: 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:141 +#: 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:145 +#: 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:149 +#: library/asyncio-eventloop.rst:160 msgid "Close the event loop." msgstr "Arrête la boucle d'évènements." -#: library/asyncio-eventloop.rst:151 +#: 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:154 +#: 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:157 +#: 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:162 +#: 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 " @@ -240,71 +254,82 @@ msgid "" "should be used to reliably finalize all scheduled asynchronous generators." msgstr "" -#: library/asyncio-eventloop.rst:168 library/asyncio-eventloop.rst:188 +#: 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:171 library/asyncio-eventloop.rst:1088 -#: library/asyncio-eventloop.rst:1474 +#: library/asyncio-eventloop.rst:182 library/asyncio-eventloop.rst:1124 +#: library/asyncio-eventloop.rst:1516 msgid "Example::" msgstr "Exemple ::" -#: library/asyncio-eventloop.rst:183 +#: 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:`ThreadPoolExecutor`. After calling this method, " -"a :exc:`RuntimeError` will be raised if :meth:`loop.run_in_executor` is " -"called while using the default executor." +"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:195 +#: 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:199 +#: 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:202 +#: library/asyncio-eventloop.rst:216 msgid "" -"Callbacks are called in the order in which they are registered. Each " -"callback will be called exactly once." +"Return an instance of :class:`asyncio.Handle`, which can be used later to " +"cancel the callback." msgstr "" -#: library/asyncio-eventloop.rst:205 library/asyncio-eventloop.rst:272 +#: library/asyncio-eventloop.rst:219 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." +"Callbacks are called in the order in which they are registered. Each " +"callback will be called exactly once." msgstr "" -#: library/asyncio-eventloop.rst:209 +#: library/asyncio-eventloop.rst:222 +#, fuzzy msgid "" -"An instance of :class:`asyncio.Handle` is returned, which can be used later " -"to cancel the callback." +"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:212 -msgid "This method is not thread-safe." +#: library/asyncio-eventloop.rst:226 +msgid "Unlike :meth:`call_soon_threadsafe`, this method is not thread-safe." msgstr "" -#: library/asyncio-eventloop.rst:216 +#: library/asyncio-eventloop.rst:230 msgid "" -"A thread-safe variant of :meth:`call_soon`. Must be used to schedule " -"callbacks *from another thread*." +"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:219 +#: 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:223 +#: library/asyncio-eventloop.rst:238 msgid "" "See the :ref:`concurrency and multithreading ` " "section of the documentation." @@ -312,141 +337,154 @@ msgstr "" "Voir la section :ref:`exécution concurrente et multi-fils d'exécution " "` de la documentation." -#: library/asyncio-eventloop.rst:226 library/asyncio-eventloop.rst:276 -#: library/asyncio-eventloop.rst:296 +#: 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:234 +#: 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:241 +#: 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:249 +#: library/asyncio-eventloop.rst:264 msgid "Scheduling delayed callbacks" msgstr "" -#: library/asyncio-eventloop.rst:251 +#: 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:258 +#: 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:261 library/asyncio-eventloop.rst:293 +#: 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:264 +#: 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:268 +#: 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:280 +#: 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:287 +#: 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:291 +#: library/asyncio-eventloop.rst:306 msgid "This method's behavior is the same as :meth:`call_later`." msgstr "" -#: library/asyncio-eventloop.rst:300 +#: 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:307 +#: 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:311 +#: 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:317 +#: library/asyncio-eventloop.rst:332 msgid "The :func:`asyncio.sleep` function." msgstr "La fonction :func:`asyncio.sleep`." -#: library/asyncio-eventloop.rst:321 +#: library/asyncio-eventloop.rst:336 msgid "Creating Futures and Tasks" msgstr "" -#: library/asyncio-eventloop.rst:325 +#: library/asyncio-eventloop.rst:340 msgid "Create an :class:`asyncio.Future` object attached to the event loop." msgstr "" -#: library/asyncio-eventloop.rst:327 +#: 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:335 +#: library/asyncio-eventloop.rst:350 msgid "" -"Schedule the execution of a :ref:`coroutine`. Return a :class:`Task` object." +"Schedule the execution of :ref:`coroutine ` *coro*. Return a :" +"class:`Task` object." msgstr "" -#: library/asyncio-eventloop.rst:338 +#: 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:342 +#: 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:345 -msgid "Added the ``name`` parameter." +#: library/asyncio-eventloop.rst:360 +#, fuzzy +msgid "Added the *name* parameter." msgstr "ajout du paramètre ``name``." -#: library/asyncio-eventloop.rst:350 +#: library/asyncio-eventloop.rst:365 msgid "Set a task factory that will be used by :meth:`loop.create_task`." msgstr "" -#: library/asyncio-eventloop.rst:353 +#: 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)``, " @@ -455,80 +493,80 @@ msgid "" "compatible object." msgstr "" -#: library/asyncio-eventloop.rst:361 +#: library/asyncio-eventloop.rst:376 msgid "Return a task factory or ``None`` if the default one is in use." msgstr "" -#: library/asyncio-eventloop.rst:365 +#: library/asyncio-eventloop.rst:380 msgid "Opening network connections" msgstr "Créer des connexions" -#: library/asyncio-eventloop.rst:374 +#: 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:377 +#: 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:381 +#: library/asyncio-eventloop.rst:396 msgid "The socket type will be :py:data:`~socket.SOCK_STREAM`." msgstr "" -#: library/asyncio-eventloop.rst:383 library/asyncio-eventloop.rst:1004 -#: library/asyncio-eventloop.rst:1020 +#: 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:386 +#: 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:389 +#: library/asyncio-eventloop.rst:404 msgid "The chronological synopsis of the underlying operation is as follows:" msgstr "" -#: library/asyncio-eventloop.rst:391 +#: library/asyncio-eventloop.rst:406 msgid "" "The connection is established and a :ref:`transport ` is " "created for it." msgstr "" -#: library/asyncio-eventloop.rst:394 +#: 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:397 +#: 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:400 +#: library/asyncio-eventloop.rst:415 msgid "A ``(transport, protocol)`` tuple is returned on success." msgstr "" -#: library/asyncio-eventloop.rst:402 +#: library/asyncio-eventloop.rst:417 msgid "" "The created transport is an implementation-dependent bidirectional stream." msgstr "" -#: library/asyncio-eventloop.rst:405 library/asyncio-eventloop.rst:527 +#: library/asyncio-eventloop.rst:420 library/asyncio-eventloop.rst:548 msgid "Other arguments:" msgstr "" -#: library/asyncio-eventloop.rst:407 +#: 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` " @@ -537,11 +575,11 @@ msgid "" "is used." msgstr "" -#: library/asyncio-eventloop.rst:413 +#: library/asyncio-eventloop.rst:428 msgid ":ref:`SSL/TLS security considerations `" msgstr "" -#: library/asyncio-eventloop.rst:415 +#: 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 " @@ -552,7 +590,7 @@ msgid "" "potential man-in-the-middle attacks)." msgstr "" -#: library/asyncio-eventloop.rst:423 +#: 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, " @@ -560,28 +598,28 @@ msgid "" "constants." msgstr "" -#: library/asyncio-eventloop.rst:428 +#: 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)." +"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:436 +#: 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." +"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:445 +#: 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 " @@ -589,76 +627,84 @@ msgid "" "*interleave* and *local_addr* should be specified." msgstr "" -#: library/asyncio-eventloop.rst:451 +#: 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:455 library/asyncio-eventloop.rst:813 +#: 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:461 +#: 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:463 +#: 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. " +"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:472 +#: library/asyncio-eventloop.rst:506 msgid "For more information: https://tools.ietf.org/html/rfc6555" msgstr "" -#: library/asyncio-eventloop.rst:476 library/asyncio-eventloop.rst:593 -#: library/asyncio-eventloop.rst:751 -msgid "The *ssl_handshake_timeout* parameter." -msgstr "" - -#: library/asyncio-eventloop.rst:480 library/asyncio-eventloop.rst:681 -msgid "" -"The socket option :py:data:`~socket.TCP_NODELAY` is set by default for all " -"TCP connections." -msgstr "" - -#: library/asyncio-eventloop.rst:485 library/asyncio-eventloop.rst:686 -msgid "Added support for SSL/TLS in :class:`ProactorEventLoop`." -msgstr "" - -#: library/asyncio-eventloop.rst:489 +#: 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:500 +#: 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:504 +#: 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:508 +#: 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` " @@ -666,47 +712,47 @@ msgid "" "from assigning sockets to the same socket address." msgstr "" -#: library/asyncio-eventloop.rst:514 +#: library/asyncio-eventloop.rst:535 msgid "Create a datagram connection." msgstr "Créer une connexion par datagramme" -#: library/asyncio-eventloop.rst:516 +#: 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:520 +#: library/asyncio-eventloop.rst:541 msgid "The socket type will be :py:data:`~socket.SOCK_DGRAM`." msgstr "" -#: library/asyncio-eventloop.rst:522 library/asyncio-eventloop.rst:618 -#: library/asyncio-eventloop.rst:734 +#: 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:525 library/asyncio-eventloop.rst:579 +#: 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:529 +#: 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:533 +#: 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:537 +#: 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 " @@ -714,7 +760,7 @@ msgid "" "module constants." msgstr "" -#: library/asyncio-eventloop.rst:542 +#: 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 " @@ -723,13 +769,13 @@ msgid "" "this capability is unsupported." msgstr "" -#: library/asyncio-eventloop.rst:548 +#: 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:551 +#: 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 " @@ -737,105 +783,107 @@ msgid "" "`None`)." msgstr "" -#: library/asyncio-eventloop.rst:556 +#: library/asyncio-eventloop.rst:583 msgid "" "See :ref:`UDP echo client protocol ` and :" "ref:`UDP echo server protocol ` examples." msgstr "" -#: library/asyncio-eventloop.rst:559 +#: 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:563 +#: library/asyncio-eventloop.rst:590 msgid "" "The *reuse_address* parameter is no longer supported due to security " "concerns." msgstr "" -#: library/asyncio-eventloop.rst:567 +#: library/asyncio-eventloop.rst:594 msgid "Added support for Windows." msgstr "Prise en charge sur Windows." -#: library/asyncio-eventloop.rst:574 +#: library/asyncio-eventloop.rst:601 msgid "Create a Unix connection." msgstr "Créer une connexion Unix" -#: library/asyncio-eventloop.rst:576 +#: 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:581 +#: 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:586 +#: 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:590 library/asyncio-eventloop.rst:715 -#: library/asyncio-eventloop.rst:1071 +#: 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:597 -msgid "The *path* parameter can now be a :term:`path-like object`." +#: 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:601 +#: library/asyncio-eventloop.rst:624 msgid "Creating network servers" msgstr "Créer des serveurs" -#: library/asyncio-eventloop.rst:611 +#: 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:614 +#: library/asyncio-eventloop.rst:637 msgid "Returns a :class:`Server` object." msgstr "" -#: library/asyncio-eventloop.rst:616 +#: library/asyncio-eventloop.rst:639 #, fuzzy msgid "Arguments:" msgstr "Arguments" -#: library/asyncio-eventloop.rst:621 +#: 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:624 +#: 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:627 +#: 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:630 +#: 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:634 +#: 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 " @@ -843,57 +891,63 @@ msgid "" "different random port will be selected for each interface)." msgstr "" -#: library/asyncio-eventloop.rst:639 +#: 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:644 +#: 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:646 +#: 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:649 +#: 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:652 +#: 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:655 +#: 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:660 +#: 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:665 +#: 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:669 +#: 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 " @@ -901,103 +955,104 @@ msgid "" "to make the server to start accepting connections." msgstr "" -#: library/asyncio-eventloop.rst:677 -msgid "Added *ssl_handshake_timeout* and *start_serving* parameters." +#: library/asyncio-eventloop.rst:710 +msgid "The *host* parameter can be a sequence of strings." msgstr "" -#: library/asyncio-eventloop.rst:690 -msgid "The *host* parameter can be a sequence of strings." +#: 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:694 +#: 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:703 +#: 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:706 +#: 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:711 +#: 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:718 -msgid "The *ssl_handshake_timeout* and *start_serving* parameters." -msgstr "" - -#: library/asyncio-eventloop.rst:722 -msgid "The *path* parameter can now be a :class:`~pathlib.Path` object." +#: 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:727 +#: library/asyncio-eventloop.rst:750 msgid "Wrap an already accepted connection into a transport/protocol pair." msgstr "" -#: library/asyncio-eventloop.rst:729 +#: 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:732 library/asyncio-eventloop.rst:799 +#: library/asyncio-eventloop.rst:755 library/asyncio-eventloop.rst:833 msgid "Parameters:" msgstr "Paramètres :" -#: library/asyncio-eventloop.rst:737 +#: library/asyncio-eventloop.rst:760 msgid "" "*sock* is a preexisting socket object returned from :meth:`socket.accept " "`." msgstr "" -#: library/asyncio-eventloop.rst:740 +#: 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:743 +#: 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:747 +#: library/asyncio-eventloop.rst:776 msgid "Returns a ``(transport, protocol)`` pair." msgstr "" -#: library/asyncio-eventloop.rst:757 +#: library/asyncio-eventloop.rst:786 msgid "Transferring files" msgstr "" -#: library/asyncio-eventloop.rst:762 +#: library/asyncio-eventloop.rst:791 msgid "" "Send a *file* over a *transport*. Return the total number of bytes sent." msgstr "" -#: library/asyncio-eventloop.rst:765 +#: library/asyncio-eventloop.rst:794 msgid "The method uses high-performance :meth:`os.sendfile` if available." msgstr "" -#: library/asyncio-eventloop.rst:767 +#: library/asyncio-eventloop.rst:796 msgid "*file* must be a regular file object opened in binary mode." msgstr "" -#: library/asyncio-eventloop.rst:769 library/asyncio-eventloop.rst:959 +#: 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 " @@ -1006,97 +1061,109 @@ msgid "" "obtain the actual number of bytes sent." msgstr "" -#: library/asyncio-eventloop.rst:776 +#: 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:780 +#: 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:787 +#: library/asyncio-eventloop.rst:816 msgid "TLS Upgrade" msgstr "" -#: library/asyncio-eventloop.rst:793 +#: 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:795 +#: 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 a new transport instance, that the *protocol* must start using " -"immediately after the *await*. The *transport* instance passed to the " -"*start_tls* method should never be used again." +"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:801 +#: 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:805 +#: library/asyncio-eventloop.rst:839 msgid "*sslcontext*: a configured instance of :class:`~ssl.SSLContext`." msgstr "" -#: library/asyncio-eventloop.rst:807 +#: 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:810 +#: 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:821 +#: library/asyncio-eventloop.rst:855 msgid "Watching file descriptors" msgstr "Surveiller des descripteurs de fichiers" -#: library/asyncio-eventloop.rst:825 +#: 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:831 -msgid "Stop monitoring the *fd* file descriptor for read availability." +#: 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:835 +#: 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:839 library/asyncio-eventloop.rst:1058 +#: 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:844 -msgid "Stop monitoring the *fd* file descriptor for write availability." +#: 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:846 +#: library/asyncio-eventloop.rst:882 msgid "" "See also :ref:`Platform Support ` section for some " "limitations of these methods." msgstr "" -#: library/asyncio-eventloop.rst:851 +#: library/asyncio-eventloop.rst:887 msgid "Working with socket objects directly" msgstr "" -#: library/asyncio-eventloop.rst:853 +#: 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 " @@ -1105,46 +1172,46 @@ msgid "" "socket` objects directly is more convenient." msgstr "" -#: library/asyncio-eventloop.rst:862 +#: library/asyncio-eventloop.rst:898 msgid "" "Receive up to *nbytes* from *sock*. Asynchronous version of :meth:`socket." "recv() `." msgstr "" -#: library/asyncio-eventloop.rst:865 +#: library/asyncio-eventloop.rst:901 msgid "Return the received data as a bytes object." msgstr "" -#: library/asyncio-eventloop.rst:867 library/asyncio-eventloop.rst:881 -#: library/asyncio-eventloop.rst:896 library/asyncio-eventloop.rst:909 -#: library/asyncio-eventloop.rst:935 library/asyncio-eventloop.rst:973 +#: 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:869 +#: 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:876 +#: 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:879 +#: library/asyncio-eventloop.rst:915 msgid "Return the number of bytes written to the buffer." msgstr "" -#: library/asyncio-eventloop.rst:887 +#: library/asyncio-eventloop.rst:923 msgid "" "Send *data* to the *sock* socket. Asynchronous version of :meth:`socket." "sendall() `." msgstr "" -#: library/asyncio-eventloop.rst:890 +#: 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 " @@ -1153,23 +1220,23 @@ msgid "" "the connection." msgstr "" -#: library/asyncio-eventloop.rst:898 +#: 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:905 +#: library/asyncio-eventloop.rst:941 msgid "Connect *sock* to a remote socket at *address*." msgstr "" -#: library/asyncio-eventloop.rst:907 +#: library/asyncio-eventloop.rst:943 msgid "" "Asynchronous version of :meth:`socket.connect() `." msgstr "" -#: library/asyncio-eventloop.rst:911 +#: 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." @@ -1177,19 +1244,19 @@ msgid "" "*address*." msgstr "" -#: library/asyncio-eventloop.rst:920 +#: library/asyncio-eventloop.rst:956 msgid "" ":meth:`loop.create_connection` and :func:`asyncio.open_connection() " "`." msgstr "" -#: library/asyncio-eventloop.rst:926 +#: library/asyncio-eventloop.rst:962 msgid "" "Accept a connection. Modeled after the blocking :meth:`socket.accept() " "` method." msgstr "" -#: library/asyncio-eventloop.rst:929 +#: 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 " @@ -1197,64 +1264,64 @@ msgid "" "the address bound to the socket on the other end of the connection." msgstr "" -#: library/asyncio-eventloop.rst:937 +#: 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:944 +#: library/asyncio-eventloop.rst:980 msgid ":meth:`loop.create_server` and :func:`start_server`." msgstr "" -#: library/asyncio-eventloop.rst:949 +#: 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:952 +#: library/asyncio-eventloop.rst:988 msgid "" "Asynchronous version of :meth:`socket.sendfile() `." msgstr "" -#: library/asyncio-eventloop.rst:954 +#: library/asyncio-eventloop.rst:990 msgid "" "*sock* must be a non-blocking :const:`socket.SOCK_STREAM` :class:`~socket." "socket`." msgstr "" -#: library/asyncio-eventloop.rst:957 +#: library/asyncio-eventloop.rst:993 msgid "*file* must be a regular file object open in binary mode." msgstr "" -#: library/asyncio-eventloop.rst:966 +#: 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:970 +#: 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:979 +#: library/asyncio-eventloop.rst:1015 msgid "DNS" msgstr "" -#: library/asyncio-eventloop.rst:984 +#: library/asyncio-eventloop.rst:1020 msgid "Asynchronous version of :meth:`socket.getaddrinfo`." msgstr "" -#: library/asyncio-eventloop.rst:988 +#: library/asyncio-eventloop.rst:1024 msgid "Asynchronous version of :meth:`socket.getnameinfo`." msgstr "" -#: library/asyncio-eventloop.rst:990 +#: 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 :" @@ -1262,67 +1329,67 @@ msgid "" "coroutines." msgstr "" -#: library/asyncio-eventloop.rst:998 +#: library/asyncio-eventloop.rst:1034 msgid "Working with pipes" msgstr "" -#: library/asyncio-eventloop.rst:1002 +#: 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:1007 +#: library/asyncio-eventloop.rst:1043 msgid "*pipe* is a :term:`file-like object `." msgstr "" -#: library/asyncio-eventloop.rst:1009 +#: 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:1013 library/asyncio-eventloop.rst:1029 +#: 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:1018 +#: 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:1023 +#: library/asyncio-eventloop.rst:1059 msgid "*pipe* is :term:`file-like object `." msgstr "" -#: library/asyncio-eventloop.rst:1025 +#: 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:1034 +#: 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:1039 +#: library/asyncio-eventloop.rst:1075 msgid "" "The :meth:`loop.subprocess_exec` and :meth:`loop.subprocess_shell` methods." msgstr "" -#: library/asyncio-eventloop.rst:1044 +#: library/asyncio-eventloop.rst:1080 msgid "Unix signals" msgstr "Signaux Unix" -#: library/asyncio-eventloop.rst:1048 +#: library/asyncio-eventloop.rst:1084 msgid "Set *callback* as the handler for the *signum* signal." msgstr "" -#: library/asyncio-eventloop.rst:1050 +#: 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 " @@ -1330,56 +1397,64 @@ msgid "" "function is allowed to interact with the event loop." msgstr "" -#: library/asyncio-eventloop.rst:1055 +#: 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:1061 +#: library/asyncio-eventloop.rst:1097 msgid "" "Like :func:`signal.signal`, this function must be invoked in the main thread." msgstr "" -#: library/asyncio-eventloop.rst:1066 +#: library/asyncio-eventloop.rst:1102 msgid "Remove the handler for the *sig* signal." msgstr "Supprime le gestionnaire du signal *sig*." -#: library/asyncio-eventloop.rst:1068 +#: 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:1075 +#: library/asyncio-eventloop.rst:1111 msgid "The :mod:`signal` module." msgstr "Le module :mod:`signal`." -#: library/asyncio-eventloop.rst:1079 +#: library/asyncio-eventloop.rst:1115 msgid "Executing code in thread or process pools" msgstr "" -#: library/asyncio-eventloop.rst:1083 +#: library/asyncio-eventloop.rst:1119 msgid "Arrange for *func* to be called in the specified executor." msgstr "" -#: library/asyncio-eventloop.rst:1085 +#: 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:1129 +#: 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:1131 +#: library/asyncio-eventloop.rst:1173 msgid "" "Use :func:`functools.partial` :ref:`to pass keyword arguments ` to *func*." msgstr "" -#: library/asyncio-eventloop.rst:1134 +#: 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 " @@ -1387,38 +1462,38 @@ msgid "" "default." msgstr "" -#: library/asyncio-eventloop.rst:1143 +#: 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:1147 +#: 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:1152 +#: library/asyncio-eventloop.rst:1194 msgid "" "*executor* must be an instance of :class:`concurrent.futures." "ThreadPoolExecutor`." msgstr "" -#: library/asyncio-eventloop.rst:1157 +#: library/asyncio-eventloop.rst:1199 msgid "Error Handling API" msgstr "API de gestion d'erreur" -#: library/asyncio-eventloop.rst:1159 +#: library/asyncio-eventloop.rst:1201 msgid "Allows customizing how exceptions are handled in the event loop." msgstr "" -#: library/asyncio-eventloop.rst:1163 +#: library/asyncio-eventloop.rst:1205 msgid "Set *handler* as the new event loop exception handler." msgstr "" -#: library/asyncio-eventloop.rst:1165 +#: 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, " @@ -1427,161 +1502,161 @@ msgid "" "(see :meth:`call_exception_handler` documentation for details about context)." msgstr "" -#: library/asyncio-eventloop.rst:1175 +#: 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:1182 +#: library/asyncio-eventloop.rst:1224 msgid "Default exception handler." msgstr "Gestionnaire d'exception par défaut." -#: library/asyncio-eventloop.rst:1184 +#: 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:1188 +#: library/asyncio-eventloop.rst:1230 msgid "" "*context* parameter has the same meaning as in :meth:" "`call_exception_handler`." msgstr "" -#: library/asyncio-eventloop.rst:1193 +#: 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:1195 +#: 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:1198 +#: library/asyncio-eventloop.rst:1240 msgid "'message': Error message;" msgstr "``message`` : Message d'erreur ;" -#: library/asyncio-eventloop.rst:1199 +#: library/asyncio-eventloop.rst:1241 msgid "'exception' (optional): Exception object;" msgstr "``exception`` (optionnel): Un objet exception ;" -#: library/asyncio-eventloop.rst:1200 +#: library/asyncio-eventloop.rst:1242 msgid "'future' (optional): :class:`asyncio.Future` instance;" msgstr "" -#: library/asyncio-eventloop.rst:1201 +#: library/asyncio-eventloop.rst:1243 msgid "'task' (optional): :class:`asyncio.Task` instance;" msgstr "" -#: library/asyncio-eventloop.rst:1202 +#: library/asyncio-eventloop.rst:1244 msgid "'handle' (optional): :class:`asyncio.Handle` instance;" msgstr "" -#: library/asyncio-eventloop.rst:1203 +#: library/asyncio-eventloop.rst:1245 msgid "'protocol' (optional): :ref:`Protocol ` instance;" msgstr "" -#: library/asyncio-eventloop.rst:1204 +#: library/asyncio-eventloop.rst:1246 msgid "'transport' (optional): :ref:`Transport ` instance;" msgstr "" -#: library/asyncio-eventloop.rst:1205 +#: library/asyncio-eventloop.rst:1247 msgid "'socket' (optional): :class:`socket.socket` instance;" msgstr "" -#: library/asyncio-eventloop.rst:1207 +#: library/asyncio-eventloop.rst:1249 msgid "'asyncgen' (optional): Asynchronous generator that caused" msgstr "" -#: library/asyncio-eventloop.rst:1207 +#: library/asyncio-eventloop.rst:1249 #, fuzzy msgid "the exception." msgstr "Gestionnaire d'exception par défaut." -#: library/asyncio-eventloop.rst:1211 +#: 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:1216 +#: library/asyncio-eventloop.rst:1258 msgid "Enabling debug mode" msgstr "Active le mode débogage" -#: library/asyncio-eventloop.rst:1220 +#: library/asyncio-eventloop.rst:1262 msgid "Get the debug mode (:class:`bool`) of the event loop." msgstr "" -#: library/asyncio-eventloop.rst:1222 +#: 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:1228 +#: 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:1232 +#: 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:1237 +#: library/asyncio-eventloop.rst:1279 msgid "The :ref:`debug mode of asyncio `." msgstr "" -#: library/asyncio-eventloop.rst:1241 +#: library/asyncio-eventloop.rst:1283 msgid "Running Subprocesses" msgstr "" -#: library/asyncio-eventloop.rst:1243 +#: 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:1250 +#: 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:1259 +#: library/asyncio-eventloop.rst:1301 msgid "" "Create a subprocess from one or more string arguments specified by *args*." msgstr "" -#: library/asyncio-eventloop.rst:1262 +#: library/asyncio-eventloop.rst:1304 msgid "*args* must be a list of strings represented by:" msgstr "" -#: library/asyncio-eventloop.rst:1264 +#: library/asyncio-eventloop.rst:1306 #, fuzzy msgid ":class:`str`;" msgstr ":class:`str`" -#: library/asyncio-eventloop.rst:1265 +#: library/asyncio-eventloop.rst:1307 msgid "" "or :class:`bytes`, encoded to the :ref:`filesystem encoding `." msgstr "" -#: library/asyncio-eventloop.rst:1268 +#: 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:1272 +#: 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 " @@ -1589,133 +1664,133 @@ msgid "" "which is list of strings, *subprocess_exec* takes multiple string arguments." msgstr "" -#: library/asyncio-eventloop.rst:1278 +#: 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:1281 +#: library/asyncio-eventloop.rst:1323 msgid "Other parameters:" msgstr "Autres paramètres :" -#: library/asyncio-eventloop.rst:1283 +#: library/asyncio-eventloop.rst:1325 msgid "*stdin* can be any of these:" msgstr "" -#: library/asyncio-eventloop.rst:1285 +#: 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:1288 library/asyncio-eventloop.rst:1300 -#: library/asyncio-eventloop.rst:1312 +#: 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:1290 library/asyncio-eventloop.rst:1302 -#: library/asyncio-eventloop.rst:1314 +#: 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:1292 library/asyncio-eventloop.rst:1304 -#: library/asyncio-eventloop.rst:1316 +#: 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:1295 +#: library/asyncio-eventloop.rst:1337 msgid "*stdout* can be any of these:" msgstr "" -#: library/asyncio-eventloop.rst:1297 +#: 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:1307 +#: library/asyncio-eventloop.rst:1349 msgid "*stderr* can be any of these:" msgstr "" -#: library/asyncio-eventloop.rst:1309 +#: 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:1318 +#: 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:1321 +#: 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:1326 +#: 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:1330 +#: 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:1333 +#: 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:1341 +#: 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:1346 +#: 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:1349 +#: 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:1352 +#: library/asyncio-eventloop.rst:1394 msgid "" "See :meth:`~loop.subprocess_exec` for more details about the remaining " "arguments." msgstr "" -#: library/asyncio-eventloop.rst:1355 +#: 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:1360 +#: 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 " @@ -1725,105 +1800,105 @@ msgid "" "used to construct shell commands." msgstr "" -#: library/asyncio-eventloop.rst:1369 +#: library/asyncio-eventloop.rst:1411 msgid "Callback Handles" msgstr "" -#: library/asyncio-eventloop.rst:1373 +#: 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:1378 +#: 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:1383 +#: 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:1389 +#: 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:1392 +#: library/asyncio-eventloop.rst:1434 msgid "This class is a subclass of :class:`Handle`." msgstr "" -#: library/asyncio-eventloop.rst:1396 +#: library/asyncio-eventloop.rst:1438 msgid "Return a scheduled callback time as :class:`float` seconds." msgstr "" -#: library/asyncio-eventloop.rst:1398 +#: 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:1405 +#: library/asyncio-eventloop.rst:1447 msgid "Server Objects" msgstr "Objets Serveur" -#: library/asyncio-eventloop.rst:1407 +#: 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:1411 +#: library/asyncio-eventloop.rst:1453 msgid "Do not instantiate the class directly." msgstr "" -#: library/asyncio-eventloop.rst:1415 +#: 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:1428 +#: library/asyncio-eventloop.rst:1470 msgid "Server object is an asynchronous context manager since Python 3.7." msgstr "" -#: library/asyncio-eventloop.rst:1433 +#: library/asyncio-eventloop.rst:1475 msgid "" "Stop serving: close listening sockets and set the :attr:`sockets` attribute " "to ``None``." msgstr "" -#: library/asyncio-eventloop.rst:1436 +#: library/asyncio-eventloop.rst:1478 msgid "" "The sockets that represent existing incoming client connections are left " "open." msgstr "" -#: library/asyncio-eventloop.rst:1439 +#: 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:1444 +#: library/asyncio-eventloop.rst:1486 msgid "Return the event loop associated with the server object." msgstr "" -#: library/asyncio-eventloop.rst:1450 +#: library/asyncio-eventloop.rst:1492 msgid "Start accepting connections." msgstr "Commence à accepter les connexions." -#: library/asyncio-eventloop.rst:1452 +#: 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:1455 +#: 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 " @@ -1832,97 +1907,96 @@ msgid "" "accepting connections." msgstr "" -#: library/asyncio-eventloop.rst:1466 +#: 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:1470 +#: 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:1492 +#: 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:1498 +#: 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:1502 +#: library/asyncio-eventloop.rst:1544 msgid "List of :class:`socket.socket` objects the server is listening on." msgstr "" -#: library/asyncio-eventloop.rst:1504 +#: 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:1513 +#: library/asyncio-eventloop.rst:1556 msgid "Event Loop Implementations" msgstr "Implémentations de boucle d'évènements" -#: library/asyncio-eventloop.rst:1515 +#: library/asyncio-eventloop.rst:1558 msgid "" "asyncio ships with two different event loop implementations: :class:" "`SelectorEventLoop` and :class:`ProactorEventLoop`." msgstr "" -#: library/asyncio-eventloop.rst:1518 +#: 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:1524 +#: library/asyncio-eventloop.rst:1567 msgid "An event loop based on the :mod:`selectors` module." msgstr "" -#: library/asyncio-eventloop.rst:1526 +#: 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:1538 +#: library/asyncio-eventloop.rst:1584 msgid ":ref:`Availability `: Unix, Windows." msgstr ":ref:`Disponibilité ` : Unix, Windows." -#: library/asyncio-eventloop.rst:1543 +#: library/asyncio-eventloop.rst:1589 msgid "An event loop for Windows that uses \"I/O Completion Ports\" (IOCP)." msgstr "" -#: library/asyncio-eventloop.rst:1546 +#: library/asyncio-eventloop.rst:1592 msgid ":ref:`Availability `: Windows." msgstr ":ref:`Disponibilité ` : Windows." -#: library/asyncio-eventloop.rst:1549 +#: library/asyncio-eventloop.rst:1595 msgid "" "`MSDN documentation on I/O Completion Ports `_." msgstr "" -#: library/asyncio-eventloop.rst:1555 +#: library/asyncio-eventloop.rst:1601 msgid "Abstract base class for asyncio-compliant event loops." msgstr "" -#: library/asyncio-eventloop.rst:1557 +#: library/asyncio-eventloop.rst:1603 msgid "" -"The :ref:`Event Loop Methods ` section lists all methods " -"that an alternative implementation of ``AbstractEventLoop`` should have " -"defined." +"The :ref:`asyncio-event-loop-methods` section lists all methods that an " +"alternative implementation of ``AbstractEventLoop`` should have defined." msgstr "" -#: library/asyncio-eventloop.rst:1563 +#: library/asyncio-eventloop.rst:1609 msgid "Examples" msgstr "Exemples" -#: library/asyncio-eventloop.rst:1565 +#: 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." @@ -1930,70 +2004,70 @@ msgid "" "consider using the high-level functions like :func:`asyncio.run`." msgstr "" -#: library/asyncio-eventloop.rst:1575 +#: library/asyncio-eventloop.rst:1621 msgid "Hello World with call_soon()" msgstr "\"Hello World\" avec ``call_soon()``" -#: library/asyncio-eventloop.rst:1577 +#: 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:1601 +#: 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:1608 +#: 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:1610 +#: 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:1638 +#: 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:1645 +#: library/asyncio-eventloop.rst:1691 msgid "Watch a file descriptor for read events" msgstr "" -#: library/asyncio-eventloop.rst:1647 +#: 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:1685 +#: 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:1689 +#: 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:1697 +#: 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:1699 +#: 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:1701 +#: 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::" diff --git a/library/asyncio-future.po b/library/asyncio-future.po index e6e7ab3b54..67adbd1989 100644 --- a/library/asyncio-future.po +++ b/library/asyncio-future.po @@ -5,60 +5,70 @@ 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: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \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 "Futurs" +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 "" +msgstr "Fonctions pour *Future*" #: library/asyncio-future.rst:24 msgid "Return ``True`` if *obj* is either of:" -msgstr "" +msgstr "Renvoie ``True`` si *obj* est soit :" #: library/asyncio-future.rst:26 msgid "an instance of :class:`asyncio.Future`," -msgstr "" +msgstr "une instance de :class:`asyncio.Future` ;" #: library/asyncio-future.rst:27 msgid "an instance of :class:`asyncio.Task`," -msgstr "" +msgstr "une instance de :class:`asyncio.Task` ;" #: library/asyncio-future.rst:28 msgid "a Future-like object with a ``_asyncio_future_blocking`` attribute." msgstr "" +"un objet se comportant comme *Future* et possédant un attribut " +"``_asyncio_future_blocking``." #: library/asyncio-future.rst:36 msgid "Return:" -msgstr "" +msgstr "Renvoie :" #: library/asyncio-future.rst:38 msgid "" "*obj* argument as is, if *obj* is a :class:`Future`, a :class:`Task`, or a " "Future-like object (:func:`isfuture` is used for the test.)" msgstr "" +"l'objet *obj* tel quel si c'est un objet :class:`Future`, :class:`Task` ou " +"se comportant comme un *Future*. :func:`isfuture` est utilisée pour le test ;" #: library/asyncio-future.rst:42 msgid "" @@ -66,28 +76,40 @@ msgid "" "`iscoroutine` is used for the test); in this case the coroutine will be " "scheduled by ``ensure_future()``." msgstr "" +"un objet :class:`Task` encapsulant *obj* si ce dernier est une coroutine (:" +"func:`iscoroutine` est utilisée pour le test). Dans ce cas, l’exécution de " +"la coroutine sera planifiée par ``ensure_future()`` ;" #: library/asyncio-future.rst:47 msgid "" "a :class:`Task` object that would await on *obj*, if *obj* is an awaitable (:" "func:`inspect.isawaitable` is used for the test.)" msgstr "" +"un objet :class:`Task` qui attendra (*await*) *obj* si ce dernier peut être " +"attendu (*awaitable*). :func:`iscoroutine` est utilisée pour le test." #: library/asyncio-future.rst:50 msgid "If *obj* is neither of the above a :exc:`TypeError` is raised." msgstr "" +"Si *obj* ne correspond à aucun des critères ci-dessus, une exception :exc:" +"`TypeError` est levée." #: library/asyncio-future.rst:54 msgid "" "See also the :func:`create_task` function which is the preferred way for " "creating new Tasks." msgstr "" +"Voir aussi la fonction :func:`create_task` qui est la manière privilégiée " +"pour créer des nouvelles tâches." #: library/asyncio-future.rst:57 +#, fuzzy msgid "" "Save a reference to the result of this function, to avoid a task " -"disappearing mid execution." +"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." @@ -98,88 +120,115 @@ 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 "" +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." +"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:90 +#: 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:95 +#: 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:101 +#: 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:104 +#: 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:110 +#: library/asyncio-future.rst:111 msgid "Return the result of the Future." -msgstr "" +msgstr "Renvoie le résultat du *Future*." -#: library/asyncio-future.rst:112 +#: 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:115 +#: 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:206 -#, fuzzy +#: library/asyncio-future.rst:207 msgid "" "If the Future has been *cancelled*, this method raises a :exc:" "`CancelledError` exception." msgstr "" -"Si la tâche a été *annulée*, cette méthode lève une exception :exc:" +"Si le *Future* a été *annulé*, cette méthode lève une exception :exc:" "`CancelledError`." -#: library/asyncio-future.rst:121 -#, fuzzy +#: library/asyncio-future.rst:122 msgid "" "If the Future's result isn't yet available, this method raises a :exc:" "`InvalidStateError` exception." @@ -187,166 +236,206 @@ msgstr "" "Si le résultat de la tâche n'est pas encore disponible, cette méthode lève " "une exception :exc:`InvalidStateError`." -#: library/asyncio-future.rst:126 -#, fuzzy +#: library/asyncio-future.rst:127 msgid "Mark the Future as *done* and set its result." -msgstr "Marque le futur comme terminé et définit son résultat." +msgstr "Marque le *Future* comme « terminé » et définit son résultat." -#: library/asyncio-future.rst:135 +#: 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:133 -#, fuzzy +#: library/asyncio-future.rst:134 msgid "Mark the Future as *done* and set an exception." -msgstr "Marque le futur comme terminé et définit une exception." +msgstr "Marque le *Future* comme « terminé » et définit une exception." -#: library/asyncio-future.rst:140 +#: library/asyncio-future.rst:141 msgid "Return ``True`` if the Future is *done*." -msgstr "" +msgstr "Renvoie ``True`` si le *Future* est « terminé »." -#: library/asyncio-future.rst:142 +#: 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:148 +#: library/asyncio-future.rst:149 msgid "Return ``True`` if the Future was *cancelled*." -msgstr "" +msgstr "Renvoie ``True`` si le *Future* a été « annulé »." -#: library/asyncio-future.rst:150 +#: 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:158 +#: 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:160 +#: 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:163 +#: 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:166 +#: 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:170 +#: 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:177 +#: 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:183 +#: 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:185 +#: 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:190 +#: library/asyncio-future.rst:191 msgid "Cancel the Future and schedule callbacks." -msgstr "" +msgstr "Annule le *Future* et planifie l'exécution des fonctions de rappel." -#: library/asyncio-future.rst:192 +#: 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:196 -msgid "Added the ``msg`` parameter." -msgstr "" +#: library/asyncio-future.rst:197 +msgid "Added the *msg* parameter." +msgstr "Ajout du paramètre *msg*." -#: library/asyncio-future.rst:201 +#: library/asyncio-future.rst:202 msgid "Return the exception that was set on this Future." -msgstr "" +msgstr "Renvoie l'exception définie pour ce *Future*." -#: library/asyncio-future.rst:203 +#: 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:209 -#, fuzzy +#: library/asyncio-future.rst:210 msgid "" "If the Future isn't *done* yet, this method raises an :exc:" "`InvalidStateError` exception." msgstr "" -"Si la tâche n'est pas encore *achevée*, cette méthode lève une exception :" -"exc:`InvalidStateError`." +"Si le *Future* n'est pas encore « terminé », cette méthode lève une " +"exception :exc:`InvalidStateError`." -#: library/asyncio-future.rst:214 +#: library/asyncio-future.rst:215 msgid "Return the event loop the Future object is bound to." -msgstr "" +msgstr "Renvoie la boucle d'évènements à laquelle le *Future* est attaché." -#: library/asyncio-future.rst:221 +#: 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:256 +#: 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:259 +#: 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:262 +#: 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:265 +#: 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:269 +#: 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:273 +#: 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:277 +#: 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 index 0f66c5e75e..46128d82b4 100644 --- a/library/asyncio-llapi-index.po +++ b/library/asyncio-llapi-index.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" +"POT-Creation-Date: 2023-03-22 22:57+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -28,7 +28,7 @@ msgstr "Obtenir une boucle d'évènements" #: library/asyncio-llapi-index.rst:18 msgid ":func:`asyncio.get_running_loop`" -msgstr "" +msgstr ":func:`asyncio.get_running_loop`" #: library/asyncio-llapi-index.rst:19 msgid "The **preferred** function to get the running event loop." @@ -36,15 +36,15 @@ msgstr "" #: library/asyncio-llapi-index.rst:21 msgid ":func:`asyncio.get_event_loop`" -msgstr "" +msgstr ":func:`asyncio.get_event_loop`" #: library/asyncio-llapi-index.rst:22 -msgid "Get an event loop instance (current or via the policy)." +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 "" +msgstr ":func:`asyncio.set_event_loop`" #: library/asyncio-llapi-index.rst:25 msgid "Set the event loop as current via the current policy." @@ -52,7 +52,7 @@ msgstr "" #: library/asyncio-llapi-index.rst:27 msgid ":func:`asyncio.new_event_loop`" -msgstr "" +msgstr ":func:`asyncio.new_event_loop`" #: library/asyncio-llapi-index.rst:28 msgid "Create a new event loop." @@ -72,8 +72,8 @@ 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:`event loop methods " -"`." +"See also the main documentation section about the :ref:`asyncio-event-loop-" +"methods`." msgstr "" #: library/asyncio-llapi-index.rst:42 @@ -82,7 +82,7 @@ msgstr "" #: library/asyncio-llapi-index.rst:47 msgid ":meth:`loop.run_until_complete`" -msgstr "" +msgstr ":meth:`loop.run_until_complete`" #: library/asyncio-llapi-index.rst:48 msgid "Run a Future/Task/awaitable until complete." @@ -90,7 +90,7 @@ msgstr "" #: library/asyncio-llapi-index.rst:50 msgid ":meth:`loop.run_forever`" -msgstr "" +msgstr ":meth:`loop.run_forever`" #: library/asyncio-llapi-index.rst:51 msgid "Run the event loop forever." @@ -98,7 +98,7 @@ msgstr "" #: library/asyncio-llapi-index.rst:53 msgid ":meth:`loop.stop`" -msgstr "" +msgstr ":meth:`loop.stop`" #: library/asyncio-llapi-index.rst:54 msgid "Stop the event loop." @@ -106,7 +106,7 @@ msgstr "Arrête l'exécution de la boucle d'évènements." #: library/asyncio-llapi-index.rst:56 msgid ":meth:`loop.close`" -msgstr "" +msgstr ":meth:`loop.close`" #: library/asyncio-llapi-index.rst:57 msgid "Close the event loop." @@ -114,7 +114,7 @@ msgstr "Arrête la boucle d'évènements." #: library/asyncio-llapi-index.rst:59 msgid ":meth:`loop.is_running()`" -msgstr "" +msgstr ":meth:`loop.is_running()`" #: library/asyncio-llapi-index.rst:60 msgid "Return ``True`` if the event loop is running." @@ -122,7 +122,7 @@ msgstr "" #: library/asyncio-llapi-index.rst:62 msgid ":meth:`loop.is_closed()`" -msgstr "" +msgstr ":meth:`loop.is_closed()`" #: library/asyncio-llapi-index.rst:63 #, fuzzy @@ -139,11 +139,11 @@ msgstr "" #: library/asyncio-llapi-index.rst:69 msgid "Debugging" -msgstr "" +msgstr "Débogage" #: library/asyncio-llapi-index.rst:74 msgid ":meth:`loop.set_debug`" -msgstr "" +msgstr ":meth:`loop.set_debug`" #: library/asyncio-llapi-index.rst:75 msgid "Enable or disable the debug mode." @@ -151,7 +151,7 @@ msgstr "" #: library/asyncio-llapi-index.rst:77 msgid ":meth:`loop.get_debug`" -msgstr "" +msgstr ":meth:`loop.get_debug`" #: library/asyncio-llapi-index.rst:78 msgid "Get the current debug mode." @@ -163,7 +163,7 @@ msgstr "" #: library/asyncio-llapi-index.rst:86 msgid ":meth:`loop.call_soon`" -msgstr "" +msgstr ":meth:`loop.call_soon`" #: library/asyncio-llapi-index.rst:87 msgid "Invoke a callback soon." @@ -171,7 +171,7 @@ msgstr "" #: library/asyncio-llapi-index.rst:89 msgid ":meth:`loop.call_soon_threadsafe`" -msgstr "" +msgstr ":meth:`loop.call_soon_threadsafe`" #: library/asyncio-llapi-index.rst:90 msgid "A thread-safe variant of :meth:`loop.call_soon`." @@ -179,7 +179,7 @@ msgstr "" #: library/asyncio-llapi-index.rst:92 msgid ":meth:`loop.call_later`" -msgstr "" +msgstr ":meth:`loop.call_later`" #: library/asyncio-llapi-index.rst:93 msgid "Invoke a callback *after* the given time." @@ -187,7 +187,7 @@ msgstr "" #: library/asyncio-llapi-index.rst:95 msgid ":meth:`loop.call_at`" -msgstr "" +msgstr ":meth:`loop.call_at`" #: library/asyncio-llapi-index.rst:96 msgid "Invoke a callback *at* the given time." @@ -209,7 +209,7 @@ msgstr "" #: library/asyncio-llapi-index.rst:108 msgid ":meth:`loop.set_default_executor`" -msgstr "" +msgstr ":meth:`loop.set_default_executor`" #: library/asyncio-llapi-index.rst:109 msgid "Set the default executor for :meth:`loop.run_in_executor`." @@ -221,7 +221,7 @@ msgstr "" #: library/asyncio-llapi-index.rst:117 msgid ":meth:`loop.create_future`" -msgstr "" +msgstr ":meth:`loop.create_future`" #: library/asyncio-llapi-index.rst:118 msgid "Create a :class:`Future` object." @@ -229,7 +229,7 @@ msgstr "" #: library/asyncio-llapi-index.rst:120 msgid ":meth:`loop.create_task`" -msgstr "" +msgstr ":meth:`loop.create_task`" #: library/asyncio-llapi-index.rst:121 msgid "Schedule coroutine as a :class:`Task`." @@ -237,7 +237,7 @@ msgstr "" #: library/asyncio-llapi-index.rst:123 msgid ":meth:`loop.set_task_factory`" -msgstr "" +msgstr ":meth:`loop.set_task_factory`" #: library/asyncio-llapi-index.rst:124 msgid "" @@ -247,7 +247,7 @@ msgstr "" #: library/asyncio-llapi-index.rst:127 msgid ":meth:`loop.get_task_factory`" -msgstr "" +msgstr ":meth:`loop.get_task_factory`" #: library/asyncio-llapi-index.rst:128 msgid "" @@ -413,7 +413,7 @@ msgstr "" #: library/asyncio-llapi-index.rst:204 msgid ":meth:`loop.add_reader`" -msgstr "" +msgstr ":meth:`loop.add_reader`" #: library/asyncio-llapi-index.rst:205 msgid "Start watching a file descriptor for read availability." @@ -421,7 +421,7 @@ msgstr "" #: library/asyncio-llapi-index.rst:207 msgid ":meth:`loop.remove_reader`" -msgstr "" +msgstr ":meth:`loop.remove_reader`" #: library/asyncio-llapi-index.rst:208 msgid "Stop watching a file descriptor for read availability." @@ -429,7 +429,7 @@ msgstr "" #: library/asyncio-llapi-index.rst:210 msgid ":meth:`loop.add_writer`" -msgstr "" +msgstr ":meth:`loop.add_writer`" #: library/asyncio-llapi-index.rst:211 msgid "Start watching a file descriptor for write availability." @@ -437,7 +437,7 @@ msgstr "" #: library/asyncio-llapi-index.rst:213 msgid ":meth:`loop.remove_writer`" -msgstr "" +msgstr ":meth:`loop.remove_writer`" #: library/asyncio-llapi-index.rst:214 msgid "Stop watching a file descriptor for write availability." @@ -450,7 +450,7 @@ msgstr "Signaux Unix" #: library/asyncio-llapi-index.rst:222 msgid ":meth:`loop.add_signal_handler`" -msgstr "" +msgstr ":meth:`loop.add_signal_handler`" #: library/asyncio-llapi-index.rst:223 msgid "Add a handler for a :mod:`signal`." @@ -458,7 +458,7 @@ msgstr "" #: library/asyncio-llapi-index.rst:225 msgid ":meth:`loop.remove_signal_handler`" -msgstr "" +msgstr ":meth:`loop.remove_signal_handler`" #: library/asyncio-llapi-index.rst:226 msgid "Remove a handler for a :mod:`signal`." @@ -470,7 +470,7 @@ msgstr "Sous-processus" #: library/asyncio-llapi-index.rst:234 msgid ":meth:`loop.subprocess_exec`" -msgstr "" +msgstr ":meth:`loop.subprocess_exec`" #: library/asyncio-llapi-index.rst:235 msgid "Spawn a subprocess." @@ -478,7 +478,7 @@ msgstr "" #: library/asyncio-llapi-index.rst:237 msgid ":meth:`loop.subprocess_shell`" -msgstr "" +msgstr ":meth:`loop.subprocess_shell`" #: library/asyncio-llapi-index.rst:238 msgid "Spawn a subprocess from a shell command." @@ -490,7 +490,7 @@ msgstr "Gestion des erreurs" #: library/asyncio-llapi-index.rst:246 msgid ":meth:`loop.call_exception_handler`" -msgstr "" +msgstr ":meth:`loop.call_exception_handler`" #: library/asyncio-llapi-index.rst:247 msgid "Call the exception handler." @@ -498,7 +498,7 @@ msgstr "" #: library/asyncio-llapi-index.rst:249 msgid ":meth:`loop.set_exception_handler`" -msgstr "" +msgstr ":meth:`loop.set_exception_handler`" #: library/asyncio-llapi-index.rst:250 msgid "Set a new exception handler." @@ -506,7 +506,7 @@ msgstr "" #: library/asyncio-llapi-index.rst:252 msgid ":meth:`loop.get_exception_handler`" -msgstr "" +msgstr ":meth:`loop.get_exception_handler`" #: library/asyncio-llapi-index.rst:253 msgid "Get the current exception handler." @@ -514,7 +514,7 @@ msgstr "" #: library/asyncio-llapi-index.rst:255 msgid ":meth:`loop.default_exception_handler`" -msgstr "" +msgstr ":meth:`loop.default_exception_handler`" #: library/asyncio-llapi-index.rst:256 msgid "The default exception handler implementation." @@ -686,7 +686,7 @@ msgstr "" msgid ":meth:`transport.abort() `" msgstr "" -#: library/asyncio-llapi-index.rst:348 library/asyncio-llapi-index.rst:370 +#: library/asyncio-llapi-index.rst:348 library/asyncio-llapi-index.rst:374 msgid "Close the transport immediately." msgstr "" @@ -697,226 +697,237 @@ msgid "" 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:354 +#: library/asyncio-llapi-index.rst:358 msgid "" ":meth:`transport.set_write_buffer_limits() `" msgstr "" -#: library/asyncio-llapi-index.rst:356 +#: library/asyncio-llapi-index.rst:360 msgid "Set new high and low water marks for write flow control." msgstr "" -#: library/asyncio-llapi-index.rst:359 +#: library/asyncio-llapi-index.rst:363 msgid "Transports returned by :meth:`loop.create_datagram_endpoint`:" msgstr "" -#: library/asyncio-llapi-index.rst:361 +#: library/asyncio-llapi-index.rst:365 msgid "Datagram Transports" msgstr "Transports de datagrammes" -#: library/asyncio-llapi-index.rst:366 +#: library/asyncio-llapi-index.rst:370 msgid ":meth:`transport.sendto() `" msgstr "" -#: library/asyncio-llapi-index.rst:367 +#: library/asyncio-llapi-index.rst:371 msgid "Send data to the remote peer." msgstr "" -#: library/asyncio-llapi-index.rst:369 +#: library/asyncio-llapi-index.rst:373 msgid ":meth:`transport.abort() `" msgstr "" -#: library/asyncio-llapi-index.rst:373 +#: 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:377 +#: library/asyncio-llapi-index.rst:381 msgid "Subprocess Transports" msgstr "Transports vers des sous-processus" -#: library/asyncio-llapi-index.rst:382 +#: library/asyncio-llapi-index.rst:386 msgid ":meth:`transport.get_pid() `" msgstr "" -#: library/asyncio-llapi-index.rst:383 +#: library/asyncio-llapi-index.rst:387 msgid "Return the subprocess process id." msgstr "" -#: library/asyncio-llapi-index.rst:385 +#: library/asyncio-llapi-index.rst:389 msgid "" ":meth:`transport.get_pipe_transport() `" msgstr "" -#: library/asyncio-llapi-index.rst:387 +#: 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:390 +#: library/asyncio-llapi-index.rst:394 msgid ":meth:`transport.get_returncode() `" msgstr "" -#: library/asyncio-llapi-index.rst:391 +#: library/asyncio-llapi-index.rst:395 msgid "Return the subprocess return code." msgstr "" -#: library/asyncio-llapi-index.rst:393 +#: library/asyncio-llapi-index.rst:397 msgid ":meth:`transport.kill() `" msgstr "" -#: library/asyncio-llapi-index.rst:394 +#: library/asyncio-llapi-index.rst:398 msgid "Kill the subprocess." msgstr "Tue le sous-processus." -#: library/asyncio-llapi-index.rst:396 +#: library/asyncio-llapi-index.rst:400 msgid ":meth:`transport.send_signal() `" msgstr "" -#: library/asyncio-llapi-index.rst:397 +#: library/asyncio-llapi-index.rst:401 msgid "Send a signal to the subprocess." msgstr "" -#: library/asyncio-llapi-index.rst:399 +#: library/asyncio-llapi-index.rst:403 msgid ":meth:`transport.terminate() `" msgstr "" -#: library/asyncio-llapi-index.rst:400 +#: library/asyncio-llapi-index.rst:404 msgid "Stop the subprocess." msgstr "Termine le sous-processus." -#: library/asyncio-llapi-index.rst:402 +#: library/asyncio-llapi-index.rst:406 msgid ":meth:`transport.close() `" msgstr "" -#: library/asyncio-llapi-index.rst:403 +#: library/asyncio-llapi-index.rst:407 msgid "Kill the subprocess and close all pipes." msgstr "" -#: library/asyncio-llapi-index.rst:407 +#: library/asyncio-llapi-index.rst:411 msgid "Protocols" -msgstr "" +msgstr "Protocoles" -#: library/asyncio-llapi-index.rst:409 +#: library/asyncio-llapi-index.rst:413 msgid "Protocol classes can implement the following **callback methods**:" msgstr "" -#: library/asyncio-llapi-index.rst:415 +#: library/asyncio-llapi-index.rst:419 msgid "``callback`` :meth:`connection_made() `" msgstr "" -#: library/asyncio-llapi-index.rst:416 +#: 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:418 +#: library/asyncio-llapi-index.rst:422 msgid "``callback`` :meth:`connection_lost() `" msgstr "" -#: library/asyncio-llapi-index.rst:419 +#: 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:421 +#: library/asyncio-llapi-index.rst:425 msgid "``callback`` :meth:`pause_writing() `" msgstr "" -#: library/asyncio-llapi-index.rst:422 +#: 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:424 +#: library/asyncio-llapi-index.rst:428 msgid "``callback`` :meth:`resume_writing() `" msgstr "" -#: library/asyncio-llapi-index.rst:425 +#: 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:428 +#: library/asyncio-llapi-index.rst:432 msgid "Streaming Protocols (TCP, Unix Sockets, Pipes)" msgstr "" -#: library/asyncio-llapi-index.rst:433 +#: library/asyncio-llapi-index.rst:437 msgid "``callback`` :meth:`data_received() `" msgstr "" -#: library/asyncio-llapi-index.rst:434 +#: library/asyncio-llapi-index.rst:438 msgid "Called when some data is received." msgstr "" -#: library/asyncio-llapi-index.rst:436 +#: library/asyncio-llapi-index.rst:440 msgid "``callback`` :meth:`eof_received() `" msgstr "" -#: library/asyncio-llapi-index.rst:437 library/asyncio-llapi-index.rst:452 +#: 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:440 +#: library/asyncio-llapi-index.rst:444 msgid "Buffered Streaming Protocols" msgstr "" -#: library/asyncio-llapi-index.rst:445 +#: library/asyncio-llapi-index.rst:449 msgid "``callback`` :meth:`get_buffer() `" msgstr "" -#: library/asyncio-llapi-index.rst:446 +#: library/asyncio-llapi-index.rst:450 msgid "Called to allocate a new receive buffer." msgstr "" -#: library/asyncio-llapi-index.rst:448 +#: library/asyncio-llapi-index.rst:452 msgid "``callback`` :meth:`buffer_updated() `" msgstr "" -#: library/asyncio-llapi-index.rst:449 +#: library/asyncio-llapi-index.rst:453 msgid "Called when the buffer was updated with the received data." msgstr "" -#: library/asyncio-llapi-index.rst:451 +#: library/asyncio-llapi-index.rst:455 msgid "``callback`` :meth:`eof_received() `" msgstr "" -#: library/asyncio-llapi-index.rst:455 +#: library/asyncio-llapi-index.rst:459 msgid "Datagram Protocols" msgstr "Protocoles non-connectés" -#: library/asyncio-llapi-index.rst:460 +#: library/asyncio-llapi-index.rst:464 msgid "" "``callback`` :meth:`datagram_received() `" msgstr "" -#: library/asyncio-llapi-index.rst:462 +#: library/asyncio-llapi-index.rst:466 msgid "Called when a datagram is received." msgstr "" -#: library/asyncio-llapi-index.rst:464 +#: library/asyncio-llapi-index.rst:468 msgid "``callback`` :meth:`error_received() `" msgstr "" -#: library/asyncio-llapi-index.rst:465 +#: 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:469 +#: library/asyncio-llapi-index.rst:473 msgid "Subprocess Protocols" msgstr "Protocoles liés aux sous-processus" -#: library/asyncio-llapi-index.rst:474 +#: library/asyncio-llapi-index.rst:478 msgid "" "``callback`` :meth:`pipe_data_received() `" msgstr "" -#: library/asyncio-llapi-index.rst:476 +#: library/asyncio-llapi-index.rst:480 #, fuzzy msgid "" "Called when the child process writes data into its *stdout* or *stderr* pipe." @@ -924,63 +935,63 @@ msgstr "" "Appelé lorsqu'un processus enfant écrit sur sa sortie d'erreur ou sa sortie " "standard." -#: library/asyncio-llapi-index.rst:479 +#: library/asyncio-llapi-index.rst:483 msgid "" "``callback`` :meth:`pipe_connection_lost() `" msgstr "" -#: library/asyncio-llapi-index.rst:481 +#: 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:484 +#: library/asyncio-llapi-index.rst:488 msgid "" "``callback`` :meth:`process_exited() `" msgstr "" -#: library/asyncio-llapi-index.rst:486 +#: 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:490 +#: library/asyncio-llapi-index.rst:494 msgid "Event Loop Policies" msgstr "" -#: library/asyncio-llapi-index.rst:492 +#: 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:498 +#: library/asyncio-llapi-index.rst:502 msgid "Accessing Policies" msgstr "" -#: library/asyncio-llapi-index.rst:503 +#: library/asyncio-llapi-index.rst:507 msgid ":meth:`asyncio.get_event_loop_policy`" -msgstr "" +msgstr ":meth:`asyncio.get_event_loop_policy`" -#: library/asyncio-llapi-index.rst:504 +#: 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:506 +#: library/asyncio-llapi-index.rst:510 msgid ":meth:`asyncio.set_event_loop_policy`" -msgstr "" +msgstr ":meth:`asyncio.set_event_loop_policy`" -#: library/asyncio-llapi-index.rst:507 +#: library/asyncio-llapi-index.rst:511 msgid "Set a new process-wide policy." msgstr "" -#: library/asyncio-llapi-index.rst:509 +#: library/asyncio-llapi-index.rst:513 msgid ":class:`AbstractEventLoopPolicy`" -msgstr "" +msgstr ":class:`AbstractEventLoopPolicy`" -#: library/asyncio-llapi-index.rst:510 +#: library/asyncio-llapi-index.rst:514 msgid "Base class for policy objects." msgstr "" diff --git a/library/asyncio-policy.po b/library/asyncio-policy.po index 2d380dadc9..8ef9b022a9 100644 --- a/library/asyncio-policy.po +++ b/library/asyncio-policy.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-12-17 16:05+0100\n" +"POT-Creation-Date: 2023-03-22 22:57+0100\n" "PO-Revision-Date: 2019-11-17 01:26+0100\n" "Last-Translator: Mathieu Dupuy \n" "Language-Team: FRENCH \n" @@ -21,35 +21,36 @@ msgstr "Stratégies" #: library/asyncio-policy.rst:10 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." +"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 "" -"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." -#: library/asyncio-policy.rst:14 +#: library/asyncio-policy.rst:19 +#, fuzzy msgid "" -"A policy defines the notion of *context* and manages a separate event loop " -"per context. The default policy defines *context* to be the current thread." +"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:18 +#: library/asyncio-policy.rst:24 +#, fuzzy msgid "" -"By using a custom event loop policy, the behavior of :func:" -"`get_event_loop`, :func:`set_event_loop`, and :func:`new_event_loop` " -"functions can be customized." +"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:22 +#: library/asyncio-policy.rst:27 msgid "" "Policy objects should implement the APIs defined in the :class:" "`AbstractEventLoopPolicy` abstract base class." @@ -57,11 +58,11 @@ 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:27 +#: library/asyncio-policy.rst:34 msgid "Getting and Setting the Policy" msgstr "Obtenir et définir la stratégie" -#: library/asyncio-policy.rst:29 +#: library/asyncio-policy.rst:36 msgid "" "The following functions can be used to get and set the policy for the " "current process:" @@ -69,39 +70,39 @@ msgstr "" "Les fonctions suivantes peuvent être utilisées pour obtenir et définir la " "stratégie du processus en cours :" -#: library/asyncio-policy.rst:34 +#: 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:38 +#: 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:40 +#: 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:44 +#: library/asyncio-policy.rst:53 msgid "Policy Objects" msgstr "Sujets de stratégie" -#: library/asyncio-policy.rst:46 +#: 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:50 +#: 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:54 +#: 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:56 +#: library/asyncio-policy.rst:65 msgid "" "Return an event loop object implementing the :class:`AbstractEventLoop` " "interface." @@ -109,23 +110,23 @@ msgstr "" "Renvoie un objet de boucle d'événements en implémentant l'interface :class:" "`AbstractEventLoop`." -#: library/asyncio-policy.rst:71 +#: 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:65 +#: 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:69 +#: 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:75 +#: 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:77 +#: library/asyncio-policy.rst:86 msgid "" "Return a watcher object implementing the :class:`AbstractChildWatcher` " "interface." @@ -133,19 +134,19 @@ msgstr "" "Renvoie un objet observateur implémentant l'interface :class:" "`AbstractChildWatcher`." -#: library/asyncio-policy.rst:86 +#: library/asyncio-policy.rst:95 msgid "This function is Unix specific." msgstr "Cette fonction est spécifique à Unix." -#: library/asyncio-policy.rst:84 +#: 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:89 +#: 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:94 +#: library/asyncio-policy.rst:105 msgid "" "The default asyncio policy. Uses :class:`SelectorEventLoop` on Unix and :" "class:`ProactorEventLoop` on Windows." @@ -153,7 +154,7 @@ 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:97 +#: 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." @@ -162,11 +163,19 @@ msgstr "" "*asyncio* est configuré pour utiliser automatiquement la stratégie par " "défaut." -#: library/asyncio-policy.rst:102 +#: library/asyncio-policy.rst:113 msgid "On Windows, :class:`ProactorEventLoop` is now used by default." msgstr "" -#: library/asyncio-policy.rst:107 +#: 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." @@ -174,11 +183,11 @@ 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:118 +#: library/asyncio-policy.rst:135 msgid ":ref:`Availability `: Windows." msgstr ":ref:`Disponibilité ` : Windows." -#: library/asyncio-policy.rst:115 +#: library/asyncio-policy.rst:132 #, fuzzy msgid "" "An alternative event loop policy that uses the :class:`ProactorEventLoop` " @@ -187,11 +196,11 @@ 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:123 +#: library/asyncio-policy.rst:141 msgid "Process Watchers" msgstr "Observateurs de processus" -#: library/asyncio-policy.rst:125 +#: 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 " @@ -202,7 +211,7 @@ msgstr "" "précisément, la boucle d'événements a besoin de savoir quand un processus " "enfant s'est terminé." -#: library/asyncio-policy.rst:129 +#: library/asyncio-policy.rst:147 msgid "" "In asyncio, child processes are created with :func:`create_subprocess_exec` " "and :meth:`loop.subprocess_exec` functions." @@ -210,7 +219,7 @@ 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:133 +#: library/asyncio-policy.rst:151 #, fuzzy msgid "" "asyncio defines the :class:`AbstractChildWatcher` abstract base class, which " @@ -224,7 +233,7 @@ msgstr "" "implémentations différentes : :class:`SafeChildWatcher` (configurée pour " "être utilisé par défaut) et :class:`FastChildWatcher`." -#: library/asyncio-policy.rst:139 +#: library/asyncio-policy.rst:157 msgid "" "See also the :ref:`Subprocess and Threads ` " "section." @@ -232,7 +241,7 @@ msgstr "" "Voir aussi la section :ref:`sous-processus et fils d'exécution `." -#: library/asyncio-policy.rst:142 +#: 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:" @@ -241,11 +250,11 @@ msgstr "" "l'implémentation de l'observateur de processus enfant utilisé par la boucle " "d'événements *asyncio* :" -#: library/asyncio-policy.rst:147 +#: 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:151 +#: 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:" @@ -255,7 +264,7 @@ msgstr "" "*watcher* doit implémenter les méthodes définies dans la classe de base :" "class:`AbstractChildWatcher`." -#: library/asyncio-policy.rst:156 +#: 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 " @@ -266,11 +275,11 @@ msgstr "" "d'événements, utiliser :func:`set_child_watcher` pourrait être interdit ou " "n'avoir aucun effet." -#: library/asyncio-policy.rst:164 +#: library/asyncio-policy.rst:182 msgid "Register a new child handler." msgstr "Enregistre un nouveau gestionnaire." -#: library/asyncio-policy.rst:166 +#: 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 " @@ -280,17 +289,17 @@ msgstr "" "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:171 +#: 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:175 +#: 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:177 +#: library/asyncio-policy.rst:195 msgid "" "The function returns ``True`` if the handler was successfully removed, " "``False`` if there was nothing to remove." @@ -298,11 +307,11 @@ 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:182 +#: 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:184 +#: 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." @@ -310,25 +319,27 @@ 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:187 +#: library/asyncio-policy.rst:205 msgid "Note: loop may be ``None``." msgstr "Remarque : la boucle peut être ``None``." -#: library/asyncio-policy.rst:191 +#: library/asyncio-policy.rst:209 msgid "Return ``True`` if the watcher is ready to use." msgstr "" -#: library/asyncio-policy.rst:193 +#: 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:200 +#: library/asyncio-policy.rst:218 msgid "Close the watcher." msgstr "Ferme l'observateur." -#: library/asyncio-policy.rst:202 +#: library/asyncio-policy.rst:220 msgid "" "This method has to be called to ensure that underlying resources are cleaned-" "up." @@ -336,7 +347,7 @@ msgstr "" "Cette méthode doit être appelée pour s'assurer que les ressources sous-" "jacentes sont nettoyées." -#: library/asyncio-policy.rst:207 +#: library/asyncio-policy.rst:225 #, fuzzy msgid "" "This implementation starts a new waiting thread for every subprocess spawn." @@ -345,7 +356,7 @@ msgstr "" "générer des processus en interrogeant chaque processus explicitement par un " "signal :py:data:`SIGCHLD`." -#: library/asyncio-policy.rst:209 +#: library/asyncio-policy.rst:227 #, fuzzy msgid "" "It works reliably even when the asyncio event loop is run in a non-main OS " @@ -355,7 +366,7 @@ msgstr "" "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:211 +#: library/asyncio-policy.rst:229 #, fuzzy msgid "" "There is no noticeable overhead when handling a big number of children " @@ -365,50 +376,50 @@ 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:214 +#: library/asyncio-policy.rst:232 msgid "This watcher is used by default." msgstr "" -#: library/asyncio-policy.rst:220 +#: 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:242 +#: 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:227 +#: 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:230 +#: 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:238 +#: 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:245 +#: 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:250 +#: 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 " @@ -418,7 +429,7 @@ msgstr "" "directement ``os.waitpid(-1)``, cassant éventuellement un autre code qui " "génère des processus et attend leur fin." -#: library/asyncio-policy.rst:254 +#: 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)." @@ -426,13 +437,13 @@ 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:257 +#: 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:262 +#: 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 " @@ -443,11 +454,11 @@ msgid "" "only work on recent (5.3+) kernels." msgstr "" -#: library/asyncio-policy.rst:274 +#: library/asyncio-policy.rst:294 msgid "Custom Policies" msgstr "Stratégies personnalisées" -#: library/asyncio-policy.rst:276 +#: 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 " @@ -457,3 +468,13 @@ msgstr "" "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 index 0385cf0497..1b9a21397b 100644 --- a/library/asyncio-protocol.po +++ b/library/asyncio-protocol.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-05-19 22:36+0200\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" @@ -228,161 +228,161 @@ msgid "" "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." +"its argument. The transport should not be used once it is closed." msgstr "" -#: library/asyncio-protocol.rst:163 +#: library/asyncio-protocol.rst:164 msgid "Return ``True`` if the transport is closing or is closed." msgstr "" -#: library/asyncio-protocol.rst:167 +#: library/asyncio-protocol.rst:168 msgid "Return information about the transport or underlying resources it uses." msgstr "" -#: library/asyncio-protocol.rst:170 +#: library/asyncio-protocol.rst:171 msgid "" "*name* is a string representing the piece of transport-specific information " "to get." msgstr "" -#: library/asyncio-protocol.rst:173 +#: 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:178 +#: 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:185 +#: library/asyncio-protocol.rst:186 msgid "Categories of information that can be queried on some transports:" msgstr "" -#: library/asyncio-protocol.rst:187 +#: library/asyncio-protocol.rst:188 msgid "socket:" msgstr "" -#: library/asyncio-protocol.rst:189 +#: 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:193 +#: library/asyncio-protocol.rst:194 msgid "``'socket'``: :class:`socket.socket` instance" msgstr "``'socket'`` : Instance de :class:`socket.socket`" -#: library/asyncio-protocol.rst:195 +#: library/asyncio-protocol.rst:196 msgid "" "``'sockname'``: the socket's own address, result of :meth:`socket.socket." "getsockname`" msgstr "" -#: library/asyncio-protocol.rst:198 +#: library/asyncio-protocol.rst:199 msgid "SSL socket:" msgstr "Connecteur (*socket* en anglais) SSL :" -#: library/asyncio-protocol.rst:200 +#: 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:204 +#: 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:209 +#: library/asyncio-protocol.rst:210 msgid "" "``'peercert'``: peer certificate; result of :meth:`ssl.SSLSocket.getpeercert`" msgstr "" -#: library/asyncio-protocol.rst:212 +#: library/asyncio-protocol.rst:213 msgid "``'sslcontext'``: :class:`ssl.SSLContext` instance" msgstr "``sslcontext'`` : Instance de :class:`ssl.SSLContext`" -#: library/asyncio-protocol.rst:214 +#: library/asyncio-protocol.rst:215 msgid "" "``'ssl_object'``: :class:`ssl.SSLObject` or :class:`ssl.SSLSocket` instance" msgstr "" -#: library/asyncio-protocol.rst:217 +#: library/asyncio-protocol.rst:218 msgid "pipe:" msgstr "" -#: library/asyncio-protocol.rst:219 +#: library/asyncio-protocol.rst:220 msgid "``'pipe'``: pipe object" msgstr "``'pipe'`` : objet *pipe*" -#: library/asyncio-protocol.rst:221 +#: library/asyncio-protocol.rst:222 msgid "subprocess:" msgstr "sous-processus :" -#: library/asyncio-protocol.rst:223 +#: library/asyncio-protocol.rst:224 msgid "``'subprocess'``: :class:`subprocess.Popen` instance" msgstr "" -#: library/asyncio-protocol.rst:227 +#: library/asyncio-protocol.rst:228 msgid "Set a new protocol." msgstr "Change le protocole." -#: library/asyncio-protocol.rst:229 +#: 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:234 +#: library/asyncio-protocol.rst:235 msgid "Return the current protocol." msgstr "Renvoie le protocole courant." -#: library/asyncio-protocol.rst:238 +#: library/asyncio-protocol.rst:239 msgid "Read-only Transports" msgstr "Transports en lecture seule" -#: library/asyncio-protocol.rst:242 +#: library/asyncio-protocol.rst:243 msgid "Return ``True`` if the transport is receiving new data." msgstr "" -#: library/asyncio-protocol.rst:248 +#: 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:252 +#: 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:258 +#: 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:262 +#: 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:268 +#: library/asyncio-protocol.rst:269 msgid "Write-only Transports" msgstr "Transports en lecture/écriture" -#: library/asyncio-protocol.rst:272 +#: 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 " @@ -390,31 +390,31 @@ msgid "" "method will eventually be called with :const:`None` as its argument." msgstr "" -#: library/asyncio-protocol.rst:280 +#: 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:285 +#: library/asyncio-protocol.rst:286 msgid "Return the current size of the output buffer used by the transport." msgstr "" -#: library/asyncio-protocol.rst:289 +#: 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:293 +#: library/asyncio-protocol.rst:294 msgid "Use :meth:`set_write_buffer_limits` to set the limits." msgstr "" -#: library/asyncio-protocol.rst:299 +#: library/asyncio-protocol.rst:300 msgid "Set the *high* and *low* watermarks for write flow control." msgstr "" -#: library/asyncio-protocol.rst:301 +#: 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:" @@ -423,7 +423,7 @@ msgid "" "high watermark. Neither *high* nor *low* can be negative." msgstr "" -#: library/asyncio-protocol.rst:309 +#: 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:" @@ -431,7 +431,7 @@ msgid "" "than or equal to the *low* value." msgstr "" -#: library/asyncio-protocol.rst:314 +#: 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 " @@ -443,51 +443,51 @@ msgid "" "opportunities for doing I/O and computation concurrently." msgstr "" -#: library/asyncio-protocol.rst:325 +#: library/asyncio-protocol.rst:326 msgid "Use :meth:`~WriteTransport.get_write_buffer_limits` to get the limits." msgstr "" -#: library/asyncio-protocol.rst:330 +#: 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:332 library/asyncio-protocol.rst:361 +#: 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:337 +#: 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:344 +#: 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:347 +#: 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:352 +#: library/asyncio-protocol.rst:353 msgid "Datagram Transports" msgstr "Transports de datagrammes" -#: library/asyncio-protocol.rst:356 +#: 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:366 +#: 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 " @@ -495,110 +495,110 @@ msgid "" "method will eventually be called with :const:`None` as its argument." msgstr "" -#: library/asyncio-protocol.rst:376 +#: library/asyncio-protocol.rst:377 msgid "Subprocess Transports" msgstr "Transports vers des sous-processus" -#: library/asyncio-protocol.rst:380 +#: 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:384 +#: 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:387 +#: 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:389 +#: 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:391 +#: 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:393 +#: library/asyncio-protocol.rst:394 msgid "other *fd*: :const:`None`" msgstr "autre *fd* : :const:`None`" -#: library/asyncio-protocol.rst:397 +#: 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:403 +#: library/asyncio-protocol.rst:404 msgid "Kill the subprocess." msgstr "Tue le sous-processus." -#: library/asyncio-protocol.rst:405 +#: 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:408 +#: library/asyncio-protocol.rst:409 msgid "See also :meth:`subprocess.Popen.kill`." msgstr "" -#: library/asyncio-protocol.rst:412 +#: 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:417 +#: library/asyncio-protocol.rst:418 msgid "Stop the subprocess." msgstr "Termine le sous-processus." -#: library/asyncio-protocol.rst:419 +#: 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:423 +#: library/asyncio-protocol.rst:424 msgid "See also :meth:`subprocess.Popen.terminate`." msgstr "" -#: library/asyncio-protocol.rst:427 +#: library/asyncio-protocol.rst:428 msgid "Kill the subprocess by calling the :meth:`kill` method." msgstr "" -#: library/asyncio-protocol.rst:429 +#: 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:436 +#: library/asyncio-protocol.rst:437 msgid "Protocols" -msgstr "" +msgstr "Protocoles" -#: library/asyncio-protocol.rst:438 +#: library/asyncio-protocol.rst:439 msgid "**Source code:** :source:`Lib/asyncio/protocols.py`" msgstr "" -#: library/asyncio-protocol.rst:442 +#: 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:446 +#: 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 " @@ -606,118 +606,118 @@ msgid "" "method should be called by the corresponding transport." msgstr "" -#: library/asyncio-protocol.rst:453 +#: library/asyncio-protocol.rst:454 msgid "Base Protocols" msgstr "Protocoles de base" -#: library/asyncio-protocol.rst:457 +#: library/asyncio-protocol.rst:458 msgid "Base protocol with methods that all protocols share." msgstr "" -#: library/asyncio-protocol.rst:461 +#: library/asyncio-protocol.rst:462 msgid "" "The base class for implementing streaming protocols (TCP, Unix sockets, etc)." msgstr "" -#: library/asyncio-protocol.rst:466 +#: 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:471 +#: library/asyncio-protocol.rst:472 msgid "The base class for implementing datagram (UDP) protocols." msgstr "" -#: library/asyncio-protocol.rst:475 +#: library/asyncio-protocol.rst:476 msgid "" "The base class for implementing protocols communicating with child processes " "(unidirectional pipes)." msgstr "" -#: library/asyncio-protocol.rst:480 +#: library/asyncio-protocol.rst:481 #, fuzzy msgid "Base Protocol" msgstr "Protocoles de base" -#: library/asyncio-protocol.rst:482 +#: library/asyncio-protocol.rst:483 msgid "All asyncio protocols can implement Base Protocol callbacks." msgstr "" -#: library/asyncio-protocol.rst:485 +#: library/asyncio-protocol.rst:486 msgid "Connection Callbacks" msgstr "" -#: library/asyncio-protocol.rst:486 +#: 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:492 +#: library/asyncio-protocol.rst:493 msgid "Called when a connection is made." msgstr "Appelé lorsqu'une connexion est établie." -#: library/asyncio-protocol.rst:494 +#: 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:500 +#: 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:502 +#: 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:508 +#: library/asyncio-protocol.rst:509 msgid "Flow Control Callbacks" msgstr "" -#: library/asyncio-protocol.rst:509 +#: 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:512 +#: 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:517 +#: library/asyncio-protocol.rst:518 msgid "Called when the transport's buffer goes over the high watermark." msgstr "" -#: library/asyncio-protocol.rst:521 +#: library/asyncio-protocol.rst:522 msgid "Called when the transport's buffer drains below the low watermark." msgstr "" -#: library/asyncio-protocol.rst:523 +#: 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:527 +#: 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:534 +#: library/asyncio-protocol.rst:535 msgid "Streaming Protocols" msgstr "Protocoles connectés" -#: library/asyncio-protocol.rst:536 +#: 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." @@ -726,13 +726,13 @@ msgid "" "that return streaming protocols." msgstr "" -#: library/asyncio-protocol.rst:544 +#: 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:547 +#: 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 " @@ -740,27 +740,27 @@ msgid "" "the correct order." msgstr "" -#: library/asyncio-protocol.rst:552 +#: 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:555 +#: 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 " +"at most once. Once ``eof_received()`` is called, ``data_received()`` is not " "called anymore." msgstr "" -#: library/asyncio-protocol.rst:561 +#: 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:566 +#: 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 " @@ -769,28 +769,28 @@ msgid "" "connection." msgstr "" -#: library/asyncio-protocol.rst:572 +#: 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:577 library/asyncio-protocol.rst:635 +#: library/asyncio-protocol.rst:578 library/asyncio-protocol.rst:636 msgid "State machine:" msgstr "Machine à états :" -#: library/asyncio-protocol.rst:588 +#: library/asyncio-protocol.rst:589 msgid "Buffered Streaming Protocols" msgstr "" -#: library/asyncio-protocol.rst:592 +#: 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:595 +#: 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 " @@ -800,16 +800,16 @@ msgid "" "number of buffer allocations." msgstr "" -#: library/asyncio-protocol.rst:602 +#: library/asyncio-protocol.rst:603 msgid "" "The following callbacks are called on :class:`BufferedProtocol` instances:" msgstr "" -#: library/asyncio-protocol.rst:607 +#: library/asyncio-protocol.rst:608 msgid "Called to allocate a new receive buffer." msgstr "" -#: library/asyncio-protocol.rst:609 +#: 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* " @@ -817,27 +817,27 @@ msgid "" "to return a buffer with a zero size." msgstr "" -#: library/asyncio-protocol.rst:614 +#: library/asyncio-protocol.rst:615 msgid "" "``get_buffer()`` must return an object implementing the :ref:`buffer " "protocol `." msgstr "" -#: library/asyncio-protocol.rst:619 +#: library/asyncio-protocol.rst:620 msgid "Called when the buffer was updated with the received data." msgstr "" -#: library/asyncio-protocol.rst:621 +#: library/asyncio-protocol.rst:622 msgid "*nbytes* is the total number of bytes that were written to the buffer." msgstr "" -#: library/asyncio-protocol.rst:625 +#: library/asyncio-protocol.rst:626 msgid "" "See the documentation of the :meth:`protocol.eof_received() ` method." msgstr "" -#: library/asyncio-protocol.rst:629 +#: 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() " @@ -846,44 +846,44 @@ msgid "" "won't be called after it." msgstr "" -#: library/asyncio-protocol.rst:648 +#: library/asyncio-protocol.rst:649 msgid "Datagram Protocols" msgstr "Protocoles non-connectés" -#: library/asyncio-protocol.rst:650 +#: 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:655 +#: 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:661 +#: 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:664 +#: 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:671 +#: 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:675 +#: 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 " @@ -891,142 +891,142 @@ msgid "" "error_received` but otherwise ignored." msgstr "" -#: library/asyncio-protocol.rst:684 +#: library/asyncio-protocol.rst:685 msgid "Subprocess Protocols" msgstr "Protocoles liés aux sous-processus" -#: library/asyncio-protocol.rst:686 +#: 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:692 +#: 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:695 +#: library/asyncio-protocol.rst:696 msgid "*fd* is the integer file descriptor of the pipe." msgstr "" -#: library/asyncio-protocol.rst:697 +#: library/asyncio-protocol.rst:698 msgid "*data* is a non-empty bytes object containing the received data." msgstr "" -#: library/asyncio-protocol.rst:701 +#: 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:704 +#: library/asyncio-protocol.rst:705 msgid "*fd* is the integer file descriptor that was closed." msgstr "" -#: library/asyncio-protocol.rst:708 +#: 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:712 +#: library/asyncio-protocol.rst:713 msgid "Examples" msgstr "Exemples" -#: library/asyncio-protocol.rst:717 +#: library/asyncio-protocol.rst:718 msgid "TCP Echo Server" msgstr "Serveur de *ping* en TCP" -#: library/asyncio-protocol.rst:719 +#: 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:760 +#: 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:766 +#: library/asyncio-protocol.rst:767 msgid "TCP Echo Client" msgstr "Client de *ping* en TCP" -#: library/asyncio-protocol.rst:768 +#: 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:816 +#: 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:823 +#: library/asyncio-protocol.rst:824 msgid "UDP Echo Server" msgstr "Serveur de *ping* en UDP" -#: library/asyncio-protocol.rst:825 +#: 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:867 +#: library/asyncio-protocol.rst:868 msgid "UDP Echo Client" msgstr "Client de *ping* en UDP" -#: library/asyncio-protocol.rst:869 +#: 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:924 +#: library/asyncio-protocol.rst:925 msgid "Connecting Existing Sockets" msgstr "" -#: library/asyncio-protocol.rst:926 +#: 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:980 +#: 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:984 +#: 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:991 +#: library/asyncio-protocol.rst:992 msgid "loop.subprocess_exec() and SubprocessProtocol" msgstr "" -#: library/asyncio-protocol.rst:993 +#: 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:996 +#: library/asyncio-protocol.rst:997 msgid "The subprocess is created by the :meth:`loop.subprocess_exec` method::" msgstr "" -#: library/asyncio-protocol.rst:1042 +#: library/asyncio-protocol.rst:1043 msgid "" "See also the :ref:`same example ` " "written using high-level APIs." diff --git a/library/asyncio-queue.po b/library/asyncio-queue.po index 52b056759f..2f05f8ae9f 100644 --- a/library/asyncio-queue.po +++ b/library/asyncio-queue.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-09-23 16:16+0200\n" +"POT-Creation-Date: 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" @@ -61,47 +61,53 @@ msgid "" "always known and can be returned by calling the :meth:`qsize` method." msgstr "" -#: library/asyncio-queue.rst:40 +#: 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:44 +#: 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:48 +#: 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:52 +#: library/asyncio-queue.rst:55 msgid "Return ``True`` if there are :attr:`maxsize` items in the queue." msgstr "" -#: library/asyncio-queue.rst:54 +#: 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:59 +#: 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:64 +#: library/asyncio-queue.rst:67 msgid "" "Return an item if one is immediately available, else raise :exc:`QueueEmpty`." msgstr "" -#: library/asyncio-queue.rst:69 +#: 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:71 +#: library/asyncio-queue.rst:74 #, fuzzy msgid "" "The count of unfinished tasks goes up whenever an item is added to the " @@ -116,36 +122,36 @@ msgstr "" "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:79 +#: 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:84 +#: 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:86 +#: library/asyncio-queue.rst:89 msgid "If no free slot is immediately available, raise :exc:`QueueFull`." msgstr "" -#: library/asyncio-queue.rst:90 +#: 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:94 +#: library/asyncio-queue.rst:97 msgid "Indicate that a formerly enqueued task is complete." msgstr "" -#: library/asyncio-queue.rst:96 +#: 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:100 +#: library/asyncio-queue.rst:103 #, fuzzy msgid "" "If a :meth:`join` is currently blocking, it will resume when all items have " @@ -156,7 +162,7 @@ msgstr "" "é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:105 +#: library/asyncio-queue.rst:108 #, fuzzy msgid "" "Raises :exc:`ValueError` if called more times than there were items placed " @@ -165,61 +171,51 @@ 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:110 -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-queue.rst:117 +#: library/asyncio-queue.rst:113 msgid "Priority Queue" msgstr "File de priorité" -#: library/asyncio-queue.rst:121 +#: library/asyncio-queue.rst:117 msgid "" "A variant of :class:`Queue`; retrieves entries in priority order (lowest " "first)." msgstr "" -#: library/asyncio-queue.rst:124 +#: library/asyncio-queue.rst:120 msgid "Entries are typically tuples of the form ``(priority_number, data)``." msgstr "" -#: library/asyncio-queue.rst:129 +#: library/asyncio-queue.rst:125 msgid "LIFO Queue" msgstr "" -#: library/asyncio-queue.rst:133 +#: 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:138 +#: library/asyncio-queue.rst:134 msgid "Exceptions" msgstr "Exceptions" -#: library/asyncio-queue.rst:142 +#: 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:148 +#: 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:153 +#: library/asyncio-queue.rst:149 msgid "Examples" msgstr "Exemples" -#: library/asyncio-queue.rst:157 +#: library/asyncio-queue.rst:153 msgid "" "Queues can be used to distribute workload between several concurrent tasks::" msgstr "" - -#~ msgid "The *loop* parameter." -#~ msgstr "Le paramètre *loop*." diff --git a/library/asyncio-stream.po b/library/asyncio-stream.po index 85203275b7..e0a4ffca02 100644 --- a/library/asyncio-stream.po +++ b/library/asyncio-stream.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-09-23 16:16+0200\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" @@ -48,46 +48,54 @@ msgid "" "with streams:" msgstr "" -#: library/asyncio-stream.rst:56 +#: library/asyncio-stream.rst:57 msgid "" "Establish a network connection and return a pair of ``(reader, writer)`` " "objects." msgstr "" -#: library/asyncio-stream.rst:59 +#: library/asyncio-stream.rst:60 msgid "" "The returned *reader* and *writer* objects are instances of :class:" "`StreamReader` and :class:`StreamWriter` classes." msgstr "" -#: library/asyncio-stream.rst:100 +#: 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:66 +#: library/asyncio-stream.rst:67 msgid "" "The rest of the arguments are passed directly to :meth:`loop." "create_connection`." msgstr "" -#: library/asyncio-stream.rst:136 -msgid "The *ssl_handshake_timeout* parameter." +#: 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:113 library/asyncio-stream.rst:172 -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." +#: library/asyncio-stream.rst:76 +msgid "Added the *ssl_handshake_timeout* parameter." msgstr "" -#: library/asyncio-stream.rst:89 +#: 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:91 +#: 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 " @@ -95,137 +103,158 @@ msgid "" "classes." msgstr "" -#: library/asyncio-stream.rst:96 +#: 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:104 +#: library/asyncio-stream.rst:109 msgid "" "The rest of the arguments are passed directly to :meth:`loop.create_server`." msgstr "" -#: library/asyncio-stream.rst:164 -msgid "The *ssl_handshake_timeout* and *start_serving* parameters." +#: 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:120 +#: library/asyncio-stream.rst:126 msgid "Unix Sockets" msgstr "" -#: library/asyncio-stream.rst:125 +#: library/asyncio-stream.rst:131 msgid "" "Establish a Unix socket connection and return a pair of ``(reader, writer)``." msgstr "" -#: library/asyncio-stream.rst:128 +#: library/asyncio-stream.rst:134 msgid "Similar to :func:`open_connection` but operates on Unix sockets." msgstr "" -#: library/asyncio-stream.rst:130 +#: library/asyncio-stream.rst:136 msgid "See also the documentation of :meth:`loop.create_unix_connection`." msgstr "" -#: library/asyncio-stream.rst:161 +#: library/asyncio-stream.rst:171 msgid ":ref:`Availability `: Unix." msgstr ":ref:`Disponibilité ` : Unix." -#: library/asyncio-stream.rst:140 -msgid "The *path* parameter can now be a :term:`path-like object`" +#: 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:154 +#: library/asyncio-stream.rst:158 msgid "Start a Unix socket server." msgstr "" -#: library/asyncio-stream.rst:156 +#: library/asyncio-stream.rst:160 msgid "Similar to :func:`start_server` but works with Unix sockets." msgstr "" -#: library/asyncio-stream.rst:158 +#: library/asyncio-stream.rst:162 msgid "See also the documentation of :meth:`loop.create_unix_server`." msgstr "" -#: library/asyncio-stream.rst:168 -msgid "The *path* parameter can now be a :term:`path-like object`." +#: 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:179 +#: library/asyncio-stream.rst:181 msgid "StreamReader" msgstr "StreamReader" -#: library/asyncio-stream.rst:183 +#: library/asyncio-stream.rst:185 msgid "" "Represents a reader object that provides APIs to read data from the IO " -"stream." +"stream. As an :term:`asynchronous iterable`, the object supports the :" +"keyword:`async for` statement." msgstr "" -#: library/asyncio-stream.rst:186 +#: 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:192 +#: library/asyncio-stream.rst:195 +msgid "Read up to *n* bytes from the stream." +msgstr "" + +#: library/asyncio-stream.rst:197 msgid "" -"Read up to *n* bytes. If *n* is not provided, or set to ``-1``, read until " -"EOF and return all read bytes." +"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:195 +#: library/asyncio-stream.rst:202 +msgid "If *n* is ``0``, return an empty ``bytes`` object immediately." +msgstr "" + +#: library/asyncio-stream.rst:204 msgid "" -"If EOF was received and the internal buffer is empty, return an empty " -"``bytes`` object." +"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:200 +#: library/asyncio-stream.rst:211 msgid "" "Read one line, where \"line\" is a sequence of bytes ending with ``\\n``." msgstr "" -#: library/asyncio-stream.rst:203 +#: 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:206 +#: 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:211 +#: library/asyncio-stream.rst:222 msgid "Read exactly *n* bytes." msgstr "" -#: library/asyncio-stream.rst:213 +#: 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:219 +#: library/asyncio-stream.rst:230 msgid "Read data from the stream until *separator* is found." msgstr "" -#: library/asyncio-stream.rst:221 +#: 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:225 +#: 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:229 +#: 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 " @@ -233,77 +262,79 @@ msgid "" "portion of the separator." msgstr "" -#: library/asyncio-stream.rst:238 +#: library/asyncio-stream.rst:249 msgid "Return ``True`` if the buffer is empty and :meth:`feed_eof` was called." msgstr "" -#: library/asyncio-stream.rst:243 +#: library/asyncio-stream.rst:254 msgid "StreamWriter" msgstr "StreamWriter" -#: library/asyncio-stream.rst:247 +#: 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:250 +#: 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:256 +#: 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:272 +#: library/asyncio-stream.rst:283 msgid "The method should be used along with the ``drain()`` method::" msgstr "" -#: library/asyncio-stream.rst:267 +#: 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:279 +#: library/asyncio-stream.rst:290 msgid "The method closes the stream and the underlying socket." msgstr "" -#: library/asyncio-stream.rst:281 -msgid "The method should be used along with the ``wait_closed()`` method::" +#: 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:288 +#: 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:293 +#: 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:298 +#: library/asyncio-stream.rst:310 msgid "Return the underlying asyncio transport." msgstr "" -#: library/asyncio-stream.rst:302 +#: library/asyncio-stream.rst:314 msgid "" "Access optional transport information; see :meth:`BaseTransport." "get_extra_info` for details." msgstr "" -#: library/asyncio-stream.rst:307 +#: library/asyncio-stream.rst:319 msgid "Wait until it is appropriate to resume writing to the stream. Example::" msgstr "" -#: library/asyncio-stream.rst:313 +#: 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()* " @@ -312,90 +343,91 @@ msgid "" "`drain` returns immediately." msgstr "" -#: library/asyncio-stream.rst:322 +#: 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:329 +#: library/asyncio-stream.rst:341 msgid "Wait until the stream is closed." msgstr "" -#: library/asyncio-stream.rst:331 +#: library/asyncio-stream.rst:343 msgid "" "Should be called after :meth:`close` to wait until the underlying connection " -"is closed." +"is closed, ensuring that all data has been flushed before e.g. exiting the " +"program." msgstr "" -#: library/asyncio-stream.rst:338 +#: library/asyncio-stream.rst:351 msgid "Examples" msgstr "Exemples" -#: library/asyncio-stream.rst:343 +#: library/asyncio-stream.rst:356 msgid "TCP echo client using streams" msgstr "" -#: library/asyncio-stream.rst:345 +#: library/asyncio-stream.rst:358 msgid "TCP echo client using the :func:`asyncio.open_connection` function::" msgstr "" -#: library/asyncio-stream.rst:367 +#: 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:374 +#: library/asyncio-stream.rst:388 msgid "TCP echo server using streams" msgstr "" -#: library/asyncio-stream.rst:376 +#: library/asyncio-stream.rst:390 msgid "TCP echo server using the :func:`asyncio.start_server` function::" msgstr "" -#: library/asyncio-stream.rst:409 +#: 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:414 +#: library/asyncio-stream.rst:429 msgid "Get HTTP headers" msgstr "Récupère les en-têtes HTTP" -#: library/asyncio-stream.rst:416 +#: library/asyncio-stream.rst:431 msgid "" "Simple example querying HTTP headers of the URL passed on the command line::" msgstr "" -#: library/asyncio-stream.rst:454 +#: library/asyncio-stream.rst:470 msgid "Usage::" msgstr "Utilisation ::" -#: library/asyncio-stream.rst:458 +#: library/asyncio-stream.rst:474 msgid "or with HTTPS::" msgstr "ou avec HTTPS ::" -#: library/asyncio-stream.rst:466 +#: library/asyncio-stream.rst:482 msgid "Register an open socket to wait for data using streams" msgstr "" -#: library/asyncio-stream.rst:468 +#: library/asyncio-stream.rst:484 msgid "" "Coroutine waiting until a socket receives data using the :func:" "`open_connection` function::" msgstr "" -#: library/asyncio-stream.rst:502 +#: 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:506 +#: library/asyncio-stream.rst:523 msgid "" "The :ref:`watch a file descriptor for read events " "` example uses the low-level :meth:`loop." diff --git a/library/asyncio-subprocess.po b/library/asyncio-subprocess.po index 0ef75fa6de..ba1b4fc005 100644 --- a/library/asyncio-subprocess.po +++ b/library/asyncio-subprocess.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-09-23 16:16+0200\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" @@ -29,12 +29,16 @@ msgid "" "This section describes high-level async/await asyncio APIs to create and " "manage subprocesses." msgstr "" +"Cette section décrit des API de haut niveau de *asyncio* pour créer et gérer " +"des sous-processus via ``async``/``await``." #: library/asyncio-subprocess.rst:19 msgid "" "Here's an example of how asyncio can run a shell command and obtain its " "result::" msgstr "" +"Voici un exemple de comment *asyncio* peut lancer une commande shell et " +"obtenir son résultat ::" #: library/asyncio-subprocess.rst:40 #, fuzzy @@ -51,49 +55,54 @@ msgstr "" #: library/asyncio-subprocess.rst:58 msgid "See also the `Examples`_ subsection." -msgstr "" +msgstr "Voir également la section `Exemples`_." #: library/asyncio-subprocess.rst:62 msgid "Creating Subprocesses" -msgstr "" +msgstr "Créer des sous-processus" #: library/asyncio-subprocess.rst:67 msgid "Create a subprocess." -msgstr "" +msgstr "Crée un sous-processus." -#: library/asyncio-subprocess.rst:69 library/asyncio-subprocess.rst:91 +#: 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:95 +#: library/asyncio-subprocess.rst:73 library/asyncio-subprocess.rst:91 msgid "Return a :class:`~asyncio.subprocess.Process` instance." -msgstr "" +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:80 library/asyncio-subprocess.rst:111 -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-subprocess.rst:78 library/asyncio-subprocess.rst:105 +msgid "Removed the *loop* parameter." +msgstr "Suppression du paramètre *loop*." -#: library/asyncio-subprocess.rst:89 +#: library/asyncio-subprocess.rst:85 msgid "Run the *cmd* shell command." msgstr "Exécute la commande *cmd* dans un *shell*." -#: library/asyncio-subprocess.rst:97 +#: 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:102 +#: 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 " @@ -102,15 +111,25 @@ msgid "" "escape whitespace and special shell characters in strings that are going to " "be used to construct shell commands." msgstr "" +"Il est de la responsabilité de l'application de s'assurer que tous les " +"espaces et les caractères spéciaux sont correctement mis entre guillemets " +"pour éviter les vulnérabilités de type `injection de code `_. La fonction :func:" +"`shlex.quote` peut être utilisée pour l’échappement des espaces et " +"caractères spéciaux dans les chaînes utilisées pour construire des commandes " +"shell." -#: library/asyncio-subprocess.rst:118 +#: 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:124 +#: 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." @@ -119,47 +138,59 @@ msgid "" "Protocols `." msgstr "" -#: library/asyncio-subprocess.rst:132 +#: library/asyncio-subprocess.rst:124 msgid "Constants" msgstr "Constantes" -#: library/asyncio-subprocess.rst:136 +#: library/asyncio-subprocess.rst:129 msgid "Can be passed to the *stdin*, *stdout* or *stderr* parameters." -msgstr "" +msgstr "Peut être passé aux paramètres *stdin*, *stdout* ou *stderr*." -#: library/asyncio-subprocess.rst:138 +#: 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:142 +#: 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:149 +#: 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:154 +#: 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:160 +#: library/asyncio-subprocess.rst:155 msgid "Interacting with Subprocesses" -msgstr "" +msgstr "Interagir avec les sous-processus" -#: library/asyncio-subprocess.rst:162 +#: 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-" @@ -167,47 +198,49 @@ msgid "" "their completion." msgstr "" -#: library/asyncio-subprocess.rst:169 +#: 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:173 +#: 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:177 +#: 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:180 +#: 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:`wait_for` function;" +"func:`~asyncio.wait_for` function;" msgstr "" -#: library/asyncio-subprocess.rst:184 +#: 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:188 +#: library/asyncio-subprocess.rst:184 msgid "the *universal_newlines* parameter is not supported." -msgstr "" +msgstr "le paramètre *universal_newlines* n'est pas pris en charge." -#: library/asyncio-subprocess.rst:190 +#: 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:192 +#: library/asyncio-subprocess.rst:188 msgid "" "See also the :ref:`Subprocess and Threads ` " "section." @@ -215,49 +248,58 @@ msgstr "" "Voir aussi la section :ref:`sous-processus et fils d'exécution `." -#: library/asyncio-subprocess.rst:197 +#: library/asyncio-subprocess.rst:193 msgid "Wait for the child process to terminate." -msgstr "" +msgstr "Attend que le sous processus s'arrête." -#: library/asyncio-subprocess.rst:199 +#: library/asyncio-subprocess.rst:195 msgid "Set and return the :attr:`returncode` attribute." -msgstr "" +msgstr "Définit et renvoie l'attribut :attr:`returncode`." -#: library/asyncio-subprocess.rst:203 +#: 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:211 +#: library/asyncio-subprocess.rst:207 msgid "Interact with process:" -msgstr "" +msgstr "Interagit avec le processus :" -#: library/asyncio-subprocess.rst:213 +#: library/asyncio-subprocess.rst:209 msgid "send data to *stdin* (if *input* is not ``None``);" -msgstr "" +msgstr "envoie des données sur le *stdin* (si *input* n'est pas ``None``);" -#: library/asyncio-subprocess.rst:214 +#: 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:215 +#: library/asyncio-subprocess.rst:211 msgid "wait for process to terminate." -msgstr "" +msgstr "attend que le processus s'arrête." -#: library/asyncio-subprocess.rst:217 +#: 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:220 +#: library/asyncio-subprocess.rst:216 msgid "Return a tuple ``(stdout_data, stderr_data)``." -msgstr "" +msgstr "Renvoie un tuple ``(stdout_data, stderr_data)``." -#: library/asyncio-subprocess.rst:222 +#: 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 " @@ -265,7 +307,7 @@ msgid "" "*stdin*." msgstr "" -#: library/asyncio-subprocess.rst:227 +#: 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 " @@ -273,7 +315,7 @@ msgid "" "``stdout=PIPE`` and/or ``stderr=PIPE`` arguments." msgstr "" -#: library/asyncio-subprocess.rst:233 +#: 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." @@ -281,26 +323,26 @@ msgstr "" "Notez que les données lues sont mises en cache en mémoire, donc n'utilisez " "pas cette méthode si la taille des données est importante voire illimitée." -#: library/asyncio-subprocess.rst:238 +#: 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:242 -#, fuzzy +#: 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, *SIGTERM* est un alias pour :meth:`terminate`. *CTRL_C_EVENT* " -"et *CTRL_BREAK_EVENT* peuvent être envoyés aux processus démarrés avec un " -"paramètre *creationflags* incluant `CREATE_NEW_PROCESS_GROUP`." +"Sous Windows, :py:data:`SIGTERM` est un alias pour :meth:`terminate`. " +"*CTRL_C_EVENT* et *CTRL_BREAK_EVENT* peuvent être envoyés aux processus " +"démarrés avec un paramètre *creationflags* incluant " +"``CREATE_NEW_PROCESS_GROUP``." -#: library/asyncio-subprocess.rst:249 +#: library/asyncio-subprocess.rst:245 msgid "Stop the child process." msgstr "Arrête le sous-processus." -#: library/asyncio-subprocess.rst:251 +#: library/asyncio-subprocess.rst:247 msgid "" "On POSIX systems this method sends :py:data:`signal.SIGTERM` to the child " "process." @@ -308,74 +350,75 @@ msgstr "" "Sur les systèmes POSIX, cette méthode envoie un :py:data:`signal.SIGTERM` au " "sous-processus." -#: library/asyncio-subprocess.rst:254 +#: 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:259 +#: library/asyncio-subprocess.rst:255 #, fuzzy msgid "Kill the child process." msgstr "Arrête le sous-processus." -#: library/asyncio-subprocess.rst:261 -#, fuzzy +#: 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 un :py:data:`signal.SIGTERM` au " +"Sur les systèmes POSIX, cette méthode envoie :py:data:`signal.SIGTERM` au " "sous-processus." -#: library/asyncio-subprocess.rst:264 +#: library/asyncio-subprocess.rst:260 msgid "On Windows this method is an alias for :meth:`terminate`." -msgstr "" +msgstr "Sous Windows, cette méthode est un alias pour :meth:`terminate`." -#: library/asyncio-subprocess.rst:268 +#: 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:273 +#: 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:278 +#: 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:283 +#: 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." +"process.stderr.read() `. This avoids deadlocks due to streams " +"pausing reading or writing and blocking the child process." msgstr "" -#: library/asyncio-subprocess.rst:292 +#: 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:294 +#: 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:299 +#: library/asyncio-subprocess.rst:295 msgid "Return code of the process when it exits." -msgstr "" +msgstr "Code de retour du processus quand il se termine." -#: library/asyncio-subprocess.rst:301 +#: library/asyncio-subprocess.rst:297 msgid "A ``None`` value indicates that the process has not terminated yet." msgstr "" -#: library/asyncio-subprocess.rst:303 +#: library/asyncio-subprocess.rst:299 msgid "" "A negative value ``-N`` indicates that the child was terminated by signal " "``N`` (POSIX only)." @@ -383,74 +426,83 @@ msgstr "" "Une valeur négative ``-N`` indique que le sous-processus a été terminé par " "un signal ``N`` (seulement sur les systèmes *POSIX*)." -#: library/asyncio-subprocess.rst:310 +#: library/asyncio-subprocess.rst:306 msgid "Subprocess and Threads" msgstr "Sous-processus et fils d'exécution" -#: library/asyncio-subprocess.rst:312 +#: library/asyncio-subprocess.rst:308 msgid "" "Standard asyncio event loop supports running subprocesses from different " "threads by default." msgstr "" -#: library/asyncio-subprocess.rst:315 +#: 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:318 +#: 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:324 +#: 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:327 +#: 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:330 +#: 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:335 +#: 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:340 +#: library/asyncio-subprocess.rst:336 msgid "Examples" msgstr "Exemples" -#: library/asyncio-subprocess.rst:342 +#: 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:348 +#: 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:375 +#: library/asyncio-subprocess.rst:371 msgid "" "See also the :ref:`same example ` written " "using low-level APIs." msgstr "" - -#, fuzzy -#~ msgid "The *loop* parameter." -#~ msgstr "Autres paramètres :" +"Voir également :ref:`le même exemple `, " +"écrit en utilisant des API de bas niveau." diff --git a/library/asyncio-sync.po b/library/asyncio-sync.po index 7b44ee3873..4c13b5e16c 100644 --- a/library/asyncio-sync.po +++ b/library/asyncio-sync.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-09-23 16:16+0200\n" +"POT-Creation-Date: 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" @@ -84,71 +84,68 @@ msgstr "" msgid "The preferred way to use a Lock is an :keyword:`async with` statement::" msgstr "" -#: library/asyncio-sync.rst:207 library/asyncio-sync.rst:309 +#: library/asyncio-sync.rst:198 library/asyncio-sync.rst:297 msgid "which is equivalent to::" msgstr "" -#: library/asyncio-sync.rst:119 library/asyncio-sync.rst:299 -#: library/asyncio-sync.rst:354 -msgid "" -"The ``loop`` parameter. This class 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-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:74 +#: library/asyncio-sync.rst:71 msgid "Acquire the lock." msgstr "" -#: library/asyncio-sync.rst:76 +#: 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:79 +#: 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:83 +#: 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:88 +#: library/asyncio-sync.rst:85 msgid "Release the lock." msgstr "Libère un verrou." -#: library/asyncio-sync.rst:90 +#: library/asyncio-sync.rst:87 msgid "When the lock is *locked*, reset it to *unlocked* and return." msgstr "" -#: library/asyncio-sync.rst:92 +#: library/asyncio-sync.rst:89 msgid "If the lock is *unlocked*, a :exc:`RuntimeError` is raised." msgstr "" -#: library/asyncio-sync.rst:96 +#: 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:100 +#: library/asyncio-sync.rst:97 msgid "Event" msgstr "" -#: library/asyncio-sync.rst:104 +#: library/asyncio-sync.rst:101 msgid "An event object. Not thread-safe." msgstr "" -#: library/asyncio-sync.rst:106 +#: 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:109 +#: 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` " @@ -156,57 +153,57 @@ msgid "" "*true*. The flag is set to *false* initially." msgstr "" -#: library/asyncio-sync.rst:122 +#: library/asyncio-sync.rst:116 msgid "Example::" msgstr "Exemple ::" -#: library/asyncio-sync.rst:147 +#: 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:149 +#: 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:154 +#: library/asyncio-sync.rst:148 msgid "Set the event." msgstr "" -#: library/asyncio-sync.rst:156 +#: library/asyncio-sync.rst:150 msgid "All tasks waiting for event to be set will be immediately awakened." msgstr "" -#: library/asyncio-sync.rst:161 +#: library/asyncio-sync.rst:155 msgid "Clear (unset) the event." msgstr "" -#: library/asyncio-sync.rst:163 +#: 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:168 +#: 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:172 +#: library/asyncio-sync.rst:166 msgid "Condition" msgstr "" -#: library/asyncio-sync.rst:176 +#: library/asyncio-sync.rst:170 msgid "A Condition object. Not thread-safe." msgstr "" -#: library/asyncio-sync.rst:178 +#: 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:182 +#: 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 " @@ -215,96 +212,96 @@ msgid "" "that shared resource." msgstr "" -#: library/asyncio-sync.rst:188 +#: 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:198 +#: library/asyncio-sync.rst:189 msgid "" "The preferred way to use a Condition is an :keyword:`async with` statement::" msgstr "" -#: library/asyncio-sync.rst:220 +#: library/asyncio-sync.rst:211 msgid "Acquire the underlying lock." msgstr "" -#: library/asyncio-sync.rst:222 +#: 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:227 +#: 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:245 +#: 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:236 +#: library/asyncio-sync.rst:227 msgid "Return ``True`` if the underlying lock is acquired." msgstr "" -#: library/asyncio-sync.rst:240 +#: library/asyncio-sync.rst:231 msgid "Wake up all tasks waiting on this condition." msgstr "" -#: library/asyncio-sync.rst:242 +#: library/asyncio-sync.rst:233 msgid "This method acts like :meth:`notify`, but wakes up all waiting tasks." msgstr "" -#: library/asyncio-sync.rst:251 +#: library/asyncio-sync.rst:242 msgid "Release the underlying lock." msgstr "Libère le verrou sous-jacent." -#: library/asyncio-sync.rst:253 +#: library/asyncio-sync.rst:244 msgid "When invoked on an unlocked lock, a :exc:`RuntimeError` is raised." msgstr "" -#: library/asyncio-sync.rst:258 +#: library/asyncio-sync.rst:249 msgid "Wait until notified." msgstr "Attends d'être notifié." -#: library/asyncio-sync.rst:260 +#: 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:263 +#: 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:270 +#: 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:272 +#: 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:278 +#: library/asyncio-sync.rst:269 msgid "Semaphore" msgstr "Sémaphore" -#: library/asyncio-sync.rst:282 +#: library/asyncio-sync.rst:273 msgid "A Semaphore object. Not thread-safe." msgstr "" -#: library/asyncio-sync.rst:284 +#: 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 " @@ -312,66 +309,63 @@ msgid "" "waiting until some task calls :meth:`release`." msgstr "" -#: library/asyncio-sync.rst:290 +#: 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:300 +#: library/asyncio-sync.rst:288 msgid "" "The preferred way to use a Semaphore is an :keyword:`async with` statement::" msgstr "" -#: library/asyncio-sync.rst:322 +#: library/asyncio-sync.rst:310 msgid "Acquire a semaphore." msgstr "" -#: library/asyncio-sync.rst:324 +#: 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:330 +#: library/asyncio-sync.rst:318 msgid "Returns ``True`` if semaphore can not be acquired immediately." msgstr "" -#: library/asyncio-sync.rst:334 +#: 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:337 +#: library/asyncio-sync.rst:325 msgid "" "Unlike :class:`BoundedSemaphore`, :class:`Semaphore` allows making more " "``release()`` calls than ``acquire()`` calls." msgstr "" -#: library/asyncio-sync.rst:342 +#: library/asyncio-sync.rst:330 msgid "BoundedSemaphore" msgstr "BoundedSemaphore" -#: library/asyncio-sync.rst:346 +#: library/asyncio-sync.rst:334 msgid "A bounded semaphore object. Not thread-safe." msgstr "" -#: library/asyncio-sync.rst:348 +#: 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:364 +#: 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 "" - -#~ msgid "The *loop* parameter." -#~ msgstr "Le paramètre *loop*." diff --git a/library/asyncio-task.po b/library/asyncio-task.po index 8e238c74c1..d131bd93ec 100644 --- a/library/asyncio-task.po +++ b/library/asyncio-task.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-27 10:27+0100\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" @@ -27,34 +27,38 @@ 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:121 +#: 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 (requires Python 3.7+) prints \"hello\", waits 1 second, and " -"then prints \"world\"::" +"snippet of code prints \"hello\", waits 1 second, and then prints \"world\"::" msgstr "" "Les :term:`coroutines ` déclarées avec la syntaxe *async/await* " "sont la manière privilégiée d’écrire des applications *asyncio*. Par " "exemple, l’extrait de code suivant (requiert Python 3.7+) affiche « hello », " "attend 1 seconde et affiche ensuite « world » ::" -#: library/asyncio-task.rst:37 +#: 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:43 +#: 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:45 +#: library/asyncio-task.rst:49 msgid "" "The :func:`asyncio.run` function to run the top-level entry point \"main()\" " "function (see the above example.)" @@ -62,7 +66,7 @@ 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:48 +#: 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 " @@ -72,11 +76,11 @@ msgstr "" "affiche « hello », attend 2 secondes *supplémentaires*, puis affiche enfin " "« world » ::" -#: library/asyncio-task.rst:69 +#: library/asyncio-task.rst:73 msgid "Expected output::" msgstr "Sortie attendue ::" -#: library/asyncio-task.rst:76 +#: library/asyncio-task.rst:80 msgid "" "The :func:`asyncio.create_task` function to run coroutines concurrently as " "asyncio :class:`Tasks `." @@ -84,7 +88,7 @@ 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:79 +#: library/asyncio-task.rst:83 msgid "" "Let's modify the above example and run two ``say_after`` coroutines " "*concurrently*::" @@ -92,7 +96,7 @@ msgstr "" "Modifions l'exemple ci-dessus et lançons deux coroutines ``say_after`` *de " "manière concurrente* ::" -#: library/asyncio-task.rst:98 +#: library/asyncio-task.rst:102 msgid "" "Note that expected output now shows that the snippet runs 1 second faster " "than before::" @@ -100,11 +104,11 @@ 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:110 +#: library/asyncio-task.rst:114 msgid "Awaitables" msgstr "*Attendables*" -#: library/asyncio-task.rst:112 +#: 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 " @@ -114,7 +118,7 @@ msgstr "" "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:116 +#: library/asyncio-task.rst:120 msgid "" "There are three main types of *awaitable* objects: **coroutines**, " "**Tasks**, and **Futures**." @@ -122,7 +126,7 @@ msgstr "" "Il existe trois types principaux d'*attendables* : les **coroutines**, les " "**tâches** et les **futurs**." -#: library/asyncio-task.rst:122 +#: library/asyncio-task.rst:126 msgid "" "Python coroutines are *awaitables* and therefore can be awaited from other " "coroutines::" @@ -130,7 +134,7 @@ msgstr "" "Les coroutines sont des *awaitables* et peuvent donc être attendues par " "d'autres coroutines ::" -#: library/asyncio-task.rst:143 +#: library/asyncio-task.rst:147 msgid "" "In this documentation the term \"coroutine\" can be used for two closely " "related concepts:" @@ -138,16 +142,16 @@ msgstr "" "Dans cette documentation, le terme « coroutine » est utilisé pour désigner " "deux concepts voisins :" -#: library/asyncio-task.rst:146 +#: 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:148 +#: 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:151 +#: library/asyncio-task.rst:155 msgid "" "asyncio also supports legacy :ref:`generator-based " "` coroutines." @@ -155,17 +159,17 @@ msgstr "" "*asyncio* implémente également les coroutines :ref:`basées sur des " "générateurs ` ; celles-ci sont obsolètes." -#: library/asyncio-task.rst:156 +#: library/asyncio-task.rst:160 msgid "Tasks" msgstr "Tâches" -#: library/asyncio-task.rst:157 +#: 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:159 +#: 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::" @@ -174,11 +178,11 @@ msgstr "" "comme :func:`asyncio.create_task`, la coroutine est automatiquement " "planifiée pour s'exécuter prochainement ::" -#: library/asyncio-task.rst:181 +#: library/asyncio-task.rst:185 msgid "Futures" msgstr "Futurs" -#: library/asyncio-task.rst:182 +#: 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." @@ -186,7 +190,7 @@ 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:185 +#: 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." @@ -194,7 +198,7 @@ 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:188 +#: library/asyncio-task.rst:192 msgid "" "Future objects in asyncio are needed to allow callback-based code to be used " "with async/await." @@ -202,7 +206,7 @@ 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:191 +#: library/asyncio-task.rst:195 msgid "" "Normally **there is no need** to create Future objects at the application " "level code." @@ -210,7 +214,7 @@ msgstr "" "Il est normalement **inutile** de créer des objets *Future* dans la couche " "applicative du code." -#: library/asyncio-task.rst:194 +#: library/asyncio-task.rst:198 msgid "" "Future objects, sometimes exposed by libraries and some asyncio APIs, can be " "awaited::" @@ -218,7 +222,7 @@ msgstr "" "Les objets *Future*, parfois exposés par des bibliothèques et quelques API " "d'*asyncio*, peuvent être attendus ::" -#: library/asyncio-task.rst:206 +#: 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`." @@ -226,15 +230,15 @@ msgstr "" ":meth:`loop.run_in_executor` est l'exemple typique d'une fonction bas-niveau " "renvoyant un objet *Future*." -#: library/asyncio-task.rst:211 +#: library/asyncio-task.rst:215 msgid "Running an asyncio Program" msgstr "Exécution d'un programme *asyncio*" -#: library/asyncio-task.rst:215 +#: 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:217 +#: library/asyncio-task.rst:221 #, fuzzy msgid "" "This function runs the passed coroutine, taking care of managing the asyncio " @@ -243,7 +247,7 @@ 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:221 +#: library/asyncio-task.rst:225 msgid "" "This function cannot be called when another asyncio event loop is running in " "the same thread." @@ -251,13 +255,13 @@ 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:224 +#: 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:226 +#: 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 " @@ -267,15 +271,15 @@ msgstr "" "fin. Elle doit être utilisée comme point d'entrée principal des programmes " "*asyncio* et ne doit être idéalement appelée qu'une seule fois." -#: library/asyncio-task.rst:379 library/asyncio-task.rst:670 +#: library/asyncio-task.rst:382 library/asyncio-task.rst:657 msgid "Example::" msgstr "Exemple ::" -#: library/asyncio-task.rst:240 +#: library/asyncio-task.rst:244 msgid "Updated to use :meth:`loop.shutdown_default_executor`." msgstr "" -#: library/asyncio-task.rst:244 +#: library/asyncio-task.rst:248 msgid "" "The source code for ``asyncio.run()`` can be found in :source:`Lib/asyncio/" "runners.py`." @@ -283,11 +287,15 @@ msgstr "" "Le code source pour ``asyncio.run()`` est disponible dans :source:`Lib/" "asyncio/runners.py`." -#: library/asyncio-task.rst:248 +#: library/asyncio-task.rst:252 msgid "Creating Tasks" msgstr "Création de tâches" -#: library/asyncio-task.rst:252 +#: 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." @@ -295,7 +303,7 @@ 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:255 +#: 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`." @@ -303,7 +311,7 @@ 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:258 +#: 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." @@ -312,34 +320,29 @@ msgstr "" "`get_running_loop` ; :exc:`RuntimeError` est levée s'il n'y a pas de boucle " "en cours d'exécution dans le fil actuel." -#: library/asyncio-task.rst:262 -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 ::" - -#: library/asyncio-task.rst:279 +#: library/asyncio-task.rst:272 msgid "" "Save a reference to the result of this function, to avoid a task " -"disappearing mid execution." +"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:862 -msgid "Added the ``name`` parameter." +#: library/asyncio-task.rst:846 +#, fuzzy +msgid "Added the *name* parameter." msgstr "ajout du paramètre ``name``." -#: library/asyncio-task.rst:289 +#: library/asyncio-task.rst:299 msgid "Sleeping" msgstr "Attente" -#: library/asyncio-task.rst:293 +#: library/asyncio-task.rst:303 msgid "Block for *delay* seconds." msgstr "Attend pendant *delay* secondes." -#: library/asyncio-task.rst:295 +#: library/asyncio-task.rst:305 msgid "" "If *result* is provided, it is returned to the caller when the coroutine " "completes." @@ -347,41 +350,45 @@ msgstr "" "Si *result* est spécifié, il est renvoyé à l'appelant quand la coroutine se " "termine." -#: library/asyncio-task.rst:298 +#: 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:301 +#: 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:333 library/asyncio-task.rst:433 -#: library/asyncio-task.rst:518 library/asyncio-task.rst:613 -#: library/asyncio-task.rst:669 library/asyncio-task.rst:681 +#: 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:313 +#: 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:340 +#: 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:344 +#: library/asyncio-task.rst:350 msgid "" "Run :ref:`awaitable objects ` in the *aws* sequence " "*concurrently*." @@ -389,7 +396,7 @@ msgstr "" "Exécute les objets :ref:`awaitable ` de la séquence " "*aws*, *de manière concurrente*." -#: library/asyncio-task.rst:347 +#: library/asyncio-task.rst:353 msgid "" "If any awaitable in *aws* is a coroutine, it is automatically scheduled as a " "Task." @@ -397,7 +404,7 @@ msgstr "" "Si un *attendable* de *aws* est une coroutine, celui-ci est automatiquement " "planifié comme une tâche *Task*." -#: library/asyncio-task.rst:350 +#: 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 " @@ -407,7 +414,7 @@ msgstr "" "des valeurs renvoyées. L'ordre de cette liste correspond à l'ordre des " "*awaitables* dans *aws*." -#: library/asyncio-task.rst:354 +#: 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 " @@ -419,7 +426,7 @@ msgstr "" "``gather()``. Les autres *attendables* dans la séquence *aws* **ne sont pas " "annulés** et poursuivent leur exécution." -#: library/asyncio-task.rst:359 +#: 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." @@ -428,7 +435,7 @@ msgstr "" "même manière que les exécutions normales, et incluses dans la liste des " "résultats." -#: library/asyncio-task.rst:362 +#: library/asyncio-task.rst:368 msgid "" "If ``gather()`` is *cancelled*, all submitted awaitables (that have not " "completed yet) are also *cancelled*." @@ -436,7 +443,7 @@ msgstr "" "Si ``gather()`` est *annulé*, tous les *awaitables* en cours (ceux qui n'ont " "pas encore fini de s'exécuter) sont également *annulés*." -#: library/asyncio-task.rst:365 +#: 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** " @@ -449,7 +456,7 @@ msgstr "" "l'annulation d'une tâche ou d'un futur entraîne l'annulation des autres " "tâches ou futurs." -#: library/asyncio-task.rst:417 +#: 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 " @@ -458,7 +465,7 @@ msgid "" "the awaitables) from gather won't cancel any other awaitables." msgstr "" -#: library/asyncio-task.rst:424 +#: library/asyncio-task.rst:427 msgid "" "If the *gather* itself is cancelled, the cancellation is propagated " "regardless of *return_exceptions*." @@ -485,7 +492,7 @@ msgstr "" "Empêche qu'un objet :ref:`awaitable ` puisse être :meth:" "`annulé `." -#: library/asyncio-task.rst:495 +#: 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 " @@ -495,11 +502,11 @@ msgstr "" msgid "The statement::" msgstr "L'instruction ::" -#: library/asyncio-task.rst:454 +#: library/asyncio-task.rst:455 msgid "is equivalent to::" msgstr "est équivalente à ::" -#: library/asyncio-task.rst:458 +#: 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 " @@ -512,7 +519,7 @@ msgstr "" "``something()``, il n'y a pas eu d'annulation. Cependant, son appelant est " "bien annulé, donc l'expression *await* lève bien une :exc:`CancelledError`." -#: library/asyncio-task.rst:464 +#: library/asyncio-task.rst:465 msgid "" "If ``something()`` is cancelled by other means (i.e. from within itself) " "that would also cancel ``shield()``." @@ -520,7 +527,7 @@ msgstr "" "Si ``something()`` est annulée d'une autre façon (c.-à-d. depuis elle-même) " "ceci annule également ``shield()``." -#: library/asyncio-task.rst:467 +#: 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 " @@ -530,17 +537,25 @@ msgstr "" "``shield()`` peut être combinée à une clause *try* / *except*, comme dans le " "code ci-dessous ::" -#: library/asyncio-task.rst:482 +#: 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:488 +#: library/asyncio-task.rst:494 msgid "Timeouts" msgstr "Délais d'attente" -#: library/asyncio-task.rst:492 +#: library/asyncio-task.rst:498 msgid "" "Wait for the *aw* :ref:`awaitable ` to complete with a " "timeout." @@ -548,7 +563,7 @@ msgstr "" "Attend la fin de l':ref:`awaitable ` *aw* avec délai " "d'attente." -#: library/asyncio-task.rst:497 +#: 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." @@ -557,7 +572,7 @@ msgstr "" "décimal) d'attente. Si *timeout* vaut ``None``, la fonction s'interrompt " "jusqu'à ce que le futur s'achève." -#: library/asyncio-task.rst:501 +#: library/asyncio-task.rst:507 msgid "" "If a timeout occurs, it cancels the task and raises :exc:`asyncio." "TimeoutError`." @@ -565,7 +580,7 @@ msgstr "" "Si le délai d'attente maximal est dépassé, la tâche est annulée et " "l'exception :exc:`asyncio.TimeoutError` est levée." -#: library/asyncio-task.rst:504 +#: library/asyncio-task.rst:510 msgid "" "To avoid the task :meth:`cancellation `, wrap it in :func:" "`shield`." @@ -573,7 +588,7 @@ msgstr "" "Pour empêcher :meth:`l'annulation ` de la tâche, il est " "nécessaire de l'encapsuler dans une fonction :func:`shield`." -#: library/asyncio-task.rst:507 +#: library/asyncio-task.rst:513 #, fuzzy msgid "" "The function will wait until the future is actually cancelled, so the total " @@ -583,11 +598,11 @@ msgstr "" "Cette fonction attend que le futur soit réellement annulé, donc le temps " "d'attente total peut être supérieur à *timeout*." -#: library/asyncio-task.rst:511 +#: 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:541 +#: 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." @@ -707,7 +722,7 @@ msgstr "" "``wait()`` est obsolète, car ceci conduisait :ref:`à un comportement portant " "à confusion `." -#: library/asyncio-task.rst:617 +#: library/asyncio-task.rst:614 msgid "" "``wait()`` schedules coroutines as Tasks automatically and later returns " "those implicitly created Task objects in ``(done, pending)`` sets. " @@ -717,15 +732,15 @@ msgstr "" "renvoie les objets *Task* ainsi créés dans les ensembles ``(done, " "pending)``. Le code suivant ne fonctionne donc pas comme voulu ::" -#: library/asyncio-task.rst:630 +#: 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:650 +#: 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:656 +#: library/asyncio-task.rst:649 #, fuzzy msgid "" "Run :ref:`awaitable objects ` in the *aws* iterable " @@ -738,7 +753,7 @@ msgstr "" "`Future`. Chaque objet *futur* renvoyé représente le résultat le plus récent " "de l'ensemble des *awaitables* restants." -#: library/asyncio-task.rst:661 +#: library/asyncio-task.rst:654 msgid "" "Raises :exc:`asyncio.TimeoutError` if the timeout occurs before all Futures " "are done." @@ -746,21 +761,21 @@ 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:682 +#: 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:688 +#: library/asyncio-task.rst:672 msgid "Running in Threads" msgstr "" -#: library/asyncio-task.rst:692 +#: library/asyncio-task.rst:676 msgid "Asynchronously run function *func* in a separate thread." msgstr "" -#: library/asyncio-task.rst:694 +#: 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, " @@ -768,46 +783,46 @@ msgid "" "separate thread." msgstr "" -#: library/asyncio-task.rst:699 +#: 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:701 +#: 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:731 +#: 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." +"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:738 +#: 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 " +"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." +"``asyncio.to_thread()`` can also be used for CPU-bound functions." msgstr "" -#: library/asyncio-task.rst:747 +#: library/asyncio-task.rst:731 msgid "Scheduling From Other Threads" msgstr "Planification depuis d'autres fils d'exécution" -#: library/asyncio-task.rst:751 +#: 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:753 +#: library/asyncio-task.rst:737 msgid "" "Return a :class:`concurrent.futures.Future` to wait for the result from " "another OS thread." @@ -815,7 +830,7 @@ msgstr "" "Renvoie un :class:`concurrent.futures.Future` pour attendre le résultat d'un " "autre fil d'exécution du système d'exploitation." -#: library/asyncio-task.rst:756 +#: 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::" @@ -823,7 +838,7 @@ msgstr "" "Cette fonction est faite pour être appelée par un fil d'exécution distinct " "de celui dans laquelle la boucle d'événement s'exécute. Exemple ::" -#: library/asyncio-task.rst:768 +#: 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::" @@ -832,7 +847,7 @@ msgstr "" "averti. Elle peut également être utilisée pour annuler la tâche de la boucle " "d'événement ::" -#: library/asyncio-task.rst:782 +#: library/asyncio-task.rst:766 msgid "" "See the :ref:`concurrency and multithreading ` " "section of the documentation." @@ -840,7 +855,7 @@ msgstr "" "Voir la section :ref:`exécution concurrente et multi-fils d'exécution " "` de la documentation." -#: library/asyncio-task.rst:785 +#: library/asyncio-task.rst:769 msgid "" "Unlike other asyncio functions this function requires the *loop* argument to " "be passed explicitly." @@ -848,11 +863,11 @@ msgstr "" "À la différence des autres fonctions d'*asyncio*, cette fonction requiert " "que *loop* soit passé de manière explicite." -#: library/asyncio-task.rst:792 +#: library/asyncio-task.rst:776 msgid "Introspection" msgstr "Introspection" -#: library/asyncio-task.rst:797 +#: library/asyncio-task.rst:781 msgid "" "Return the currently running :class:`Task` instance, or ``None`` if no task " "is running." @@ -860,7 +875,7 @@ msgstr "" "Renvoie l'instance de la :class:`Task` en cours d'exécution, ou ``None`` " "s'il n'y a pas de tâche en cours." -#: library/asyncio-task.rst:800 +#: library/asyncio-task.rst:784 msgid "" "If *loop* is ``None`` :func:`get_running_loop` is used to get the current " "loop." @@ -868,13 +883,13 @@ msgstr "" "Si *loop* vaut ``None``, :func:`get_running_loop` est appelée pour récupérer " "la boucle en cours d'exécution." -#: library/asyncio-task.rst:808 +#: 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:811 +#: library/asyncio-task.rst:795 msgid "" "If *loop* is ``None``, :func:`get_running_loop` is used for getting current " "loop." @@ -882,11 +897,11 @@ msgstr "" "Si *loop* vaut ``None``, :func:`get_running_loop` est appelée pour récupérer " "la boucle en cours d'exécution." -#: library/asyncio-task.rst:818 +#: library/asyncio-task.rst:802 msgid "Task Object" msgstr "Objets *Task*" -#: library/asyncio-task.rst:822 +#: library/asyncio-task.rst:806 msgid "" "A :class:`Future-like ` object that runs a Python :ref:`coroutine " "`. Not thread-safe." @@ -895,7 +910,7 @@ msgstr "" "`coroutine ` Python. Cet objet n'est pas utilisable dans des " "programmes à fils d'exécution multiples." -#: library/asyncio-task.rst:825 +#: 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 " @@ -907,7 +922,7 @@ msgstr "" "attend la fin de ce *futur*. Quand celui-ci est terminé, l'exécution de la " "coroutine encapsulée reprend." -#: library/asyncio-task.rst:831 +#: 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 " @@ -918,7 +933,7 @@ msgstr "" "futur, la boucle d'événement exécute d'autres tâches, des fonctions de " "rappel, ou effectue des opérations d'entrées-sorties." -#: library/asyncio-task.rst:836 +#: 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. " @@ -929,7 +944,7 @@ msgstr "" "créer des tâches. Il est déconseillé d'instancier manuellement des objets " "*Task*." -#: library/asyncio-task.rst:841 +#: 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 " @@ -941,7 +956,7 @@ msgstr "" "`CancelledError` dans la coroutine encapsulée. Si la coroutine attendait un " "*futur* au moment de l'annulation, celui-ci est annulé." -#: library/asyncio-task.rst:846 +#: 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:" @@ -951,7 +966,7 @@ msgstr "" "Elle renvoie ``True`` si la coroutine encapsulée n'a pas ignoré l'exception :" "exc:`CancelledError` et a bien été annulée." -#: library/asyncio-task.rst:851 +#: 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`." @@ -959,7 +974,7 @@ msgstr "" ":class:`asyncio.Task` hérite de :class:`Future`, de toute son API, à " "l'exception de :meth:`Future.set_result` et de :meth:`Future.set_exception`." -#: library/asyncio-task.rst:855 +#: 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 " @@ -969,25 +984,23 @@ msgstr "" "tâche effectue une copie du contexte actuel et exécutera ses coroutines dans " "cette copie." -#: library/asyncio-task.rst:859 +#: 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:867 -msgid "The *loop* parameter." -msgstr "Le paramètre *loop*." - -#: library/asyncio-task.rst:868 +#: 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:874 +#: library/asyncio-task.rst:855 msgid "Request the Task to be cancelled." msgstr "Demande l'annulation d'une tâche." -#: library/asyncio-task.rst:876 +#: 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." @@ -996,7 +1009,7 @@ msgstr "" "encapsulée. L'exception sera levée au prochain cycle de la boucle " "d'exécution." -#: library/asyncio-task.rst:879 +#: 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 " @@ -1012,11 +1025,11 @@ msgstr "" "annulée, bien qu'ignorer totalement une annulation ne soit ni une pratique " "courante, ni encouragé." -#: library/asyncio-task.rst:887 -msgid "Added the ``msg`` parameter." -msgstr "" +#: library/asyncio-task.rst:868 +msgid "Added the *msg* parameter." +msgstr "Ajout du paramètre *msg*." -#: library/asyncio-task.rst:892 +#: library/asyncio-task.rst:873 msgid "" "The following example illustrates how coroutines can intercept the " "cancellation request::" @@ -1024,11 +1037,11 @@ msgstr "" "L'exemple ci-dessous illustre comment une coroutine peut intercepter une " "requête d'annulation ::" -#: library/asyncio-task.rst:931 +#: 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:933 +#: 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` " @@ -1038,11 +1051,11 @@ msgstr "" "et la coroutine encapsulée a propagé l'exception :exc:`CancelledError` qui a " "été levée en son sein." -#: library/asyncio-task.rst:939 +#: 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:941 +#: 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." @@ -1050,11 +1063,11 @@ msgstr "" "Une tâche est dite *achevée* quand la coroutine encapsulée a soit renvoyé " "une valeur, soit levé une exception, ou que la tâche a été annulée." -#: library/asyncio-task.rst:946 +#: 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:948 +#: 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.)" @@ -1063,7 +1076,7 @@ msgstr "" "renvoyé (sinon, dans le cas où la coroutine a levé une exception, cette " "exception est de nouveau levée)." -#: library/asyncio-task.rst:966 +#: library/asyncio-task.rst:947 msgid "" "If the Task has been *cancelled*, this method raises a :exc:`CancelledError` " "exception." @@ -1071,7 +1084,7 @@ msgstr "" "Si la tâche a été *annulée*, cette méthode lève une exception :exc:" "`CancelledError`." -#: library/asyncio-task.rst:955 +#: library/asyncio-task.rst:936 msgid "" "If the Task's result isn't yet available, this method raises a :exc:" "`InvalidStateError` exception." @@ -1079,11 +1092,11 @@ msgstr "" "Si le résultat de la tâche n'est pas encore disponible, cette méthode lève " "une exception :exc:`InvalidStateError`." -#: library/asyncio-task.rst:960 +#: library/asyncio-task.rst:941 msgid "Return the exception of the Task." msgstr "Renvoie l'exception de la tâche." -#: library/asyncio-task.rst:962 +#: 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``." @@ -1091,7 +1104,7 @@ msgstr "" "Si la coroutine encapsulée lève une exception, cette exception est renvoyée. " "Si la coroutine s'est exécutée normalement, cette méthode renvoie ``None``." -#: library/asyncio-task.rst:969 +#: library/asyncio-task.rst:950 msgid "" "If the Task isn't *done* yet, this method raises an :exc:`InvalidStateError` " "exception." @@ -1099,30 +1112,30 @@ msgstr "" "Si la tâche n'est pas encore *achevée*, cette méthode lève une exception :" "exc:`InvalidStateError`." -#: library/asyncio-task.rst:974 +#: 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:985 +#: 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:978 +#: 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:983 +#: 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:987 +#: library/asyncio-task.rst:968 msgid "" "See the documentation of :meth:`Future.remove_done_callback` for more " "details." @@ -1130,11 +1143,11 @@ msgstr "" "Se référer à la documentation de :meth:`Future.remove_done_callback` pour " "plus de détails." -#: library/asyncio-task.rst:992 +#: 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:994 +#: 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, " @@ -1147,15 +1160,15 @@ msgstr "" "renvoie une liste vide. Si la coroutine a été terminée par une exception, " "ceci renvoie la pile d'erreurs." -#: library/asyncio-task.rst:1000 +#: 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:1002 +#: 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:1004 +#: 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 " @@ -1169,11 +1182,11 @@ msgstr "" "renvoyés, si la pile est une pile d'erreurs, ce sont les appels les plus " "anciens qui le sont (dans un souci de cohérence avec le module *traceback*)." -#: library/asyncio-task.rst:1013 +#: 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:1015 +#: library/asyncio-task.rst:996 msgid "" "This produces output similar to that of the traceback module for the frames " "retrieved by :meth:`get_stack`." @@ -1181,27 +1194,28 @@ msgstr "" "Le format de sortie des appels produits par :meth:`get_stack` est similaire " "à celui du module *traceback*." -#: library/asyncio-task.rst:1018 +#: 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:1020 +#: 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.stderr`." +"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:1025 +#: 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:1031 +#: library/asyncio-task.rst:1012 msgid "Return the name of the Task." msgstr "Renvoie le nom de la tâche." -#: library/asyncio-task.rst:1033 +#: 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." @@ -1210,18 +1224,18 @@ msgstr "" "défaut d’une *Task* *asyncio* génère un nom par défaut durant " "l’instanciation." -#: library/asyncio-task.rst:1041 +#: 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:1043 +#: 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:1046 +#: 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." @@ -1229,19 +1243,20 @@ msgstr "" "Dans l’implémentation par défaut de *Task*, le nom sera visible dans le " "résultat de :func:`repr` d’un objet *Task*." -#: library/asyncio-task.rst:1055 +#: library/asyncio-task.rst:1036 msgid "Generator-based Coroutines" msgstr "Coroutines basées sur des générateurs" -#: library/asyncio-task.rst:1059 +#: library/asyncio-task.rst:1040 +#, fuzzy msgid "" -"Support for generator-based coroutines is **deprecated** and is scheduled " -"for removal in Python 3.10." +"Support for generator-based coroutines is **deprecated** and is removed in " +"Python 3.11." msgstr "" "Les coroutines basées sur des générateurs sont **obsolètes** et il est prévu " "de les supprimer en Python 3.10." -#: library/asyncio-task.rst:1062 +#: 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 " @@ -1251,7 +1266,7 @@ msgstr "" "*async* / *await*. Il existe des générateurs *Python* qui utilisent les " "expressions ``yield from`` pour attendre des *futurs* et autres coroutines." -#: library/asyncio-task.rst:1066 +#: library/asyncio-task.rst:1047 msgid "" "Generator-based coroutines should be decorated with :func:`@asyncio." "coroutine `, although this is not enforced." @@ -1260,11 +1275,11 @@ msgstr "" "`@asyncio.coroutine `, même si ce n'est pas vérifié par " "l'interpréteur." -#: library/asyncio-task.rst:1073 +#: 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:1075 +#: library/asyncio-task.rst:1056 msgid "" "This decorator enables legacy generator-based coroutines to be compatible " "with async/await code::" @@ -1272,22 +1287,22 @@ msgstr "" "Ce décorateur rend compatibles les coroutines basées sur des générateurs " "avec le code *async* / *await* ::" -#: library/asyncio-task.rst:1085 +#: 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:1090 +#: library/asyncio-task.rst:1071 msgid "Use :keyword:`async def` instead." msgstr "utilisez :keyword:`async def` à la place." -#: library/asyncio-task.rst:1094 +#: 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:1096 +#: library/asyncio-task.rst:1077 msgid "" "This method is different from :func:`inspect.iscoroutine` because it returns " "``True`` for generator-based coroutines." @@ -1295,12 +1310,12 @@ msgstr "" "Cette méthode est différente de :func:`inspect.iscoroutine` car elle renvoie " "``True`` pour des coroutines basées sur des générateurs." -#: library/asyncio-task.rst:1101 +#: 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:1104 +#: 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 :" @@ -1309,3 +1324,11 @@ msgstr "" "Cette méthode est différente de :func:`inspect.iscoroutinefunction` car elle " "renvoie ``True`` pour des coroutines basées sur des générateurs, décorées " "avec :func:`@coroutine `." + +#~ msgid "" +#~ "This function has been **added in Python 3.7**. Prior to Python 3.7, the " +#~ "low-level :func:`asyncio.ensure_future` function can be used instead::" +#~ msgstr "" +#~ "Cette fonction a été **ajoutée dans Python 3.7**. Pour les versions " +#~ "antérieures à la 3.7, la fonction de bas-niveau :func:`asyncio." +#~ "ensure_future` peut-être utilisée ::" diff --git a/library/asyncio.po b/library/asyncio.po index 41f60589f8..90e24a799b 100644 --- a/library/asyncio.po +++ b/library/asyncio.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" +"POT-Creation-Date: 2023-03-22 22:57+0100\n" "PO-Revision-Date: 2021-05-24 21:49-0400\n" "Last-Translator: Antoine Wecxsteen\n" "Language-Team: FRENCH \n" @@ -15,15 +15,15 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Poedit 2.4.3\n" -#: library/asyncio.rst:66 +#: library/asyncio.rst:76 msgid "High-level APIs" msgstr "Bibliothèques de haut-niveau" -#: library/asyncio.rst:77 +#: library/asyncio.rst:87 msgid "Low-level APIs" msgstr "Bibliothèques de bas-niveau" -#: library/asyncio.rst:87 +#: library/asyncio.rst:97 msgid "Guides and Tutorials" msgstr "Guides et tutoriels" @@ -35,39 +35,39 @@ msgstr ":mod:`asyncio` — Entrées/Sorties asynchrones" msgid "Hello World!" msgstr "Hello World !" -#: library/asyncio.rst:23 +#: 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 " +"``asyncio`` est une bibliothèque permettant de faire de la programmation " "asynchrone en utilisant la syntaxe *async*/*await*." -#: library/asyncio.rst:26 +#: 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 " +"``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:30 +#: 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*)." +"``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:33 +#: library/asyncio.rst:32 msgid "asyncio provides a set of **high-level** APIs to:" msgstr "" -"`asyncio` fournit des interfaces de programmation **haut-niveau** pour :" +"``asyncio`` fournit des interfaces de programmation **haut-niveau** pour :" -#: library/asyncio.rst:35 +#: library/asyncio.rst:34 msgid "" ":ref:`run Python coroutines ` concurrently and have full control " "over their execution;" @@ -75,27 +75,27 @@ 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:38 +#: 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:40 +#: library/asyncio.rst:39 msgid "control :ref:`subprocesses `;" msgstr "contrôler des :ref:`sous-processus ` ;" -#: library/asyncio.rst:42 +#: library/asyncio.rst:41 msgid "distribute tasks via :ref:`queues `;" msgstr "distribuer des tâches avec des :ref:`queues ` ;" -#: library/asyncio.rst:44 +#: library/asyncio.rst:43 msgid ":ref:`synchronize ` concurrent code;" msgstr "" ":ref:`synchroniser ` du code s'exécutant de manière " "concurrente ;" -#: library/asyncio.rst:46 +#: library/asyncio.rst:45 msgid "" "Additionally, there are **low-level** APIs for *library and framework " "developers* to:" @@ -103,7 +103,7 @@ 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:49 +#: library/asyncio.rst:48 msgid "" "create and manage :ref:`event loops `, which provide " "asynchronous APIs for :meth:`networking `, running :meth:" @@ -115,7 +115,7 @@ msgstr "" "create_server>`, d'exécution de :meth:`subprocesses `, " "de gestion de :meth:`signaux système `, etc ;" -#: library/asyncio.rst:54 +#: library/asyncio.rst:53 msgid "" "implement efficient protocols using :ref:`transports `;" @@ -123,7 +123,7 @@ msgstr "" "implémenter des protocoles efficaces à l'aide de :ref:`transports ` ;" -#: library/asyncio.rst:57 +#: library/asyncio.rst:56 msgid "" ":ref:`bridge ` callback-based libraries and code with async/" "await syntax." @@ -131,11 +131,15 @@ msgstr "" ":ref:`lier ` des bibliothèques basées sur les fonctions de " "rappel et développer avec la syntaxe *async*/*await*." -#: library/asyncio.rst:65 +#: 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:96 +#: library/asyncio.rst:106 msgid "The source code for asyncio can be found in :source:`Lib/asyncio/`." msgstr "" -"Le code source pour `asyncio` est disponible dans :source:`Lib/asyncio/`." +"Le code source d'``asyncio`` est disponible dans :source:`Lib/asyncio/`." diff --git a/library/asyncore.po b/library/asyncore.po index 2c366d3d72..0c0d294645 100644 --- a/library/asyncore.po +++ b/library/asyncore.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-01 16:00+0200\n" +"POT-Creation-Date: 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" @@ -18,15 +18,17 @@ msgstr "" msgid ":mod:`asyncore` --- Asynchronous socket handler" msgstr ":mod:`asyncore` — Gestionnaire de socket asynchrone" -#: library/asyncore.rst:13 +#: library/asyncore.rst:14 msgid "**Source code:** :source:`Lib/asyncore.py`" msgstr "**Code source :** :source:`Lib/asyncore.py`" -#: library/asyncore.rst:15 -msgid "Please use :mod:`asyncio` instead." -msgstr "Utilisez :mod:`asyncio` à la place." +#: library/asyncore.rst:16 +msgid "" +":mod:`asyncore` will be removed in Python 3.12 (see :pep:`PEP 594 " +"<594#asyncore>` for details). Please use :mod:`asyncio` instead." +msgstr "" -#: library/asyncore.rst:22 +#: library/asyncore.rst:25 msgid "" "This module exists for backwards compatibility only. For new code we " "recommend using :mod:`asyncio`." @@ -34,13 +36,13 @@ msgstr "" "Ce module n'existe que pour des raisons de rétrocompatibilité. Pour du code " "nouveau, l'utilisation de :mod:`asyncio` est recommandée." -#: library/asyncore.rst:25 +#: library/asyncore.rst:28 msgid "" "This module provides the basic infrastructure for writing asynchronous " "socket service clients and servers." msgstr "" -#: library/asyncore.rst:28 +#: library/asyncore.rst:31 msgid "" "There are only two ways to have a program on a single processor do \"more " "than one thing at a time.\" Multi-threaded programming is the simplest and " @@ -52,7 +54,7 @@ msgid "" "servers are rarely processor bound, however." msgstr "" -#: library/asyncore.rst:37 +#: library/asyncore.rst:40 msgid "" "If your operating system supports the :c:func:`select` system call in its I/" "O library (and nearly all do), then you can use it to juggle multiple " @@ -66,7 +68,7 @@ msgid "" "module is invaluable." msgstr "" -#: library/asyncore.rst:48 +#: library/asyncore.rst:51 msgid "" "The basic idea behind both modules is to create one or more network " "*channels*, instances of class :class:`asyncore.dispatcher` and :class:" @@ -75,7 +77,7 @@ msgid "" "*map*." msgstr "" -#: library/asyncore.rst:54 +#: library/asyncore.rst:57 msgid "" "Once the initial channel(s) is(are) created, calling the :func:`loop` " "function activates channel service, which continues until the last channel " @@ -83,7 +85,7 @@ msgid "" "is closed." msgstr "" -#: library/asyncore.rst:61 +#: library/asyncore.rst:64 msgid "" "Enter a polling loop that terminates after count passes or all open channels " "have been closed. All arguments are optional. The *count* parameter " @@ -95,7 +97,7 @@ msgid "" "preference to :func:`~select.select` (the default is ``False``)." msgstr "" -#: library/asyncore.rst:70 +#: library/asyncore.rst:73 msgid "" "The *map* parameter is a dictionary whose items are the channels to watch. " "As channels are closed they are deleted from their map. If *map* is " @@ -104,7 +106,7 @@ msgid "" "be mixed in the map." msgstr "" -#: library/asyncore.rst:79 +#: library/asyncore.rst:82 msgid "" "The :class:`dispatcher` class is a thin wrapper around a low-level socket " "object. To make it more useful, it has a few methods for event-handling " @@ -112,7 +114,7 @@ msgid "" "as a normal non-blocking socket object." msgstr "" -#: library/asyncore.rst:84 +#: library/asyncore.rst:87 msgid "" "The firing of low-level events at certain times or in certain connection " "states tells the asynchronous loop that certain higher-level events have " @@ -123,39 +125,39 @@ msgid "" "events are:" msgstr "" -#: library/asyncore.rst:93 +#: library/asyncore.rst:96 msgid "Event" msgstr "" -#: library/asyncore.rst:93 +#: library/asyncore.rst:96 msgid "Description" msgstr "Description" -#: library/asyncore.rst:95 +#: library/asyncore.rst:98 msgid "``handle_connect()``" msgstr "``handle_connect()``" -#: library/asyncore.rst:95 +#: library/asyncore.rst:98 msgid "Implied by the first read or write event" msgstr "" -#: library/asyncore.rst:98 +#: library/asyncore.rst:101 msgid "``handle_close()``" msgstr "``handle_close()``" -#: library/asyncore.rst:98 +#: library/asyncore.rst:101 msgid "Implied by a read event with no data available" msgstr "" -#: library/asyncore.rst:101 +#: library/asyncore.rst:104 msgid "``handle_accepted()``" msgstr "``handle_accepted()``" -#: library/asyncore.rst:101 +#: library/asyncore.rst:104 msgid "Implied by a read event on a listening socket" msgstr "" -#: library/asyncore.rst:105 +#: library/asyncore.rst:108 msgid "" "During asynchronous processing, each mapped channel's :meth:`readable` and :" "meth:`writable` methods are used to determine whether the channel's socket " @@ -163,49 +165,49 @@ msgid "" "`poll`\\ ed for read and write events." msgstr "" -#: library/asyncore.rst:110 +#: library/asyncore.rst:113 msgid "" "Thus, the set of channel events is larger than the basic socket events. The " "full set of methods that can be overridden in your subclass follows:" msgstr "" -#: library/asyncore.rst:116 +#: library/asyncore.rst:119 msgid "" "Called when the asynchronous loop detects that a :meth:`read` call on the " "channel's socket will succeed." msgstr "" -#: library/asyncore.rst:122 +#: library/asyncore.rst:125 msgid "" "Called when the asynchronous loop detects that a writable socket can be " "written. Often this method will implement the necessary buffering for " "performance. For example::" msgstr "" -#: library/asyncore.rst:133 +#: library/asyncore.rst:136 msgid "" "Called when there is out of band (OOB) data for a socket connection. This " "will almost never happen, as OOB is tenuously supported and rarely used." msgstr "" -#: library/asyncore.rst:139 +#: library/asyncore.rst:142 msgid "" "Called when the active opener's socket actually makes a connection. Might " "send a \"welcome\" banner, or initiate a protocol negotiation with the " "remote endpoint, for example." msgstr "" -#: library/asyncore.rst:146 +#: library/asyncore.rst:149 msgid "Called when the socket is closed." msgstr "Appelé lorsque la socket est fermée." -#: library/asyncore.rst:151 +#: library/asyncore.rst:154 msgid "" "Called when an exception is raised and not otherwise handled. The default " "version prints a condensed traceback." msgstr "" -#: library/asyncore.rst:157 +#: library/asyncore.rst:160 msgid "" "Called on listening channels (passive openers) when a connection can be " "established with a new remote endpoint that has issued a :meth:`connect` " @@ -213,7 +215,7 @@ msgid "" "`handle_accepted` instead." msgstr "" -#: library/asyncore.rst:167 +#: library/asyncore.rst:170 msgid "" "Called on listening channels (passive openers) when a connection has been " "established with a new remote endpoint that has issued a :meth:`connect` " @@ -222,7 +224,7 @@ msgid "" "socket on the other end of the connection." msgstr "" -#: library/asyncore.rst:178 +#: library/asyncore.rst:181 msgid "" "Called each time around the asynchronous loop to determine whether a " "channel's socket should be added to the list on which read events can " @@ -230,7 +232,7 @@ msgid "" "default, all channels will be interested in read events." msgstr "" -#: library/asyncore.rst:186 +#: library/asyncore.rst:189 msgid "" "Called each time around the asynchronous loop to determine whether a " "channel's socket should be added to the list on which write events can " @@ -238,55 +240,55 @@ msgid "" "default, all channels will be interested in write events." msgstr "" -#: library/asyncore.rst:192 +#: library/asyncore.rst:195 msgid "" "In addition, each channel delegates or extends many of the socket methods. " "Most of these are nearly identical to their socket partners." msgstr "" -#: library/asyncore.rst:198 +#: library/asyncore.rst:201 msgid "" "This is identical to the creation of a normal socket, and will use the same " "options for creation. Refer to the :mod:`socket` documentation for " "information on creating sockets." msgstr "" -#: library/asyncore.rst:202 +#: library/asyncore.rst:205 msgid "*family* and *type* arguments can be omitted." msgstr "Les arguments *family* et *type* sont optionnels." -#: library/asyncore.rst:208 +#: library/asyncore.rst:211 msgid "" "As with the normal socket object, *address* is a tuple with the first " "element the host to connect to, and the second the port number." msgstr "" -#: library/asyncore.rst:214 +#: library/asyncore.rst:217 msgid "Send *data* to the remote end-point of the socket." msgstr "Envoie *data* à l'autre bout de la socket." -#: library/asyncore.rst:219 +#: library/asyncore.rst:222 msgid "" "Read at most *buffer_size* bytes from the socket's remote end-point. An " "empty bytes object implies that the channel has been closed from the other " "end." msgstr "" -#: library/asyncore.rst:223 +#: library/asyncore.rst:226 msgid "" "Note that :meth:`recv` may raise :exc:`BlockingIOError` , even though :func:" "`select.select` or :func:`select.poll` has reported the socket ready for " "reading." msgstr "" -#: library/asyncore.rst:230 +#: library/asyncore.rst:233 msgid "" "Listen for connections made to the socket. The *backlog* argument specifies " "the maximum number of queued connections and should be at least 1; the " "maximum value is system-dependent (usually 5)." msgstr "" -#: library/asyncore.rst:237 +#: library/asyncore.rst:240 msgid "" "Bind the socket to *address*. The socket must not already be bound. (The " "format of *address* depends on the address family --- refer to the :mod:" @@ -295,7 +297,7 @@ msgid "" "`dispatcher` object's :meth:`set_reuse_addr` method." msgstr "" -#: library/asyncore.rst:246 +#: library/asyncore.rst:249 msgid "" "Accept a connection. The socket must be bound to an address and listening " "for connections. The return value can be either ``None`` or a pair ``(conn, " @@ -306,21 +308,21 @@ msgid "" "this event and keep listening for further incoming connections." msgstr "" -#: library/asyncore.rst:258 +#: library/asyncore.rst:261 msgid "" "Close the socket. All future operations on the socket object will fail. The " "remote end-point will receive no more data (after queued data is flushed). " "Sockets are automatically closed when they are garbage-collected." msgstr "" -#: library/asyncore.rst:266 +#: library/asyncore.rst:269 msgid "" "A :class:`dispatcher` subclass which adds simple buffered output capability, " "useful for simple clients. For more sophisticated usage use :class:`asynchat." "async_chat`." msgstr "" -#: library/asyncore.rst:272 +#: library/asyncore.rst:275 msgid "" "A file_dispatcher takes a file descriptor or :term:`file object` along with " "an optional map argument and wraps it for use with the :c:func:`poll` or :c:" @@ -329,11 +331,11 @@ msgid "" "`file_wrapper` constructor." msgstr "" -#: library/asyncore.rst:287 +#: library/asyncore.rst:290 msgid ":ref:`Availability `: Unix." msgstr ":ref:`Disponibilité ` : Unix." -#: library/asyncore.rst:282 +#: library/asyncore.rst:285 msgid "" "A file_wrapper takes an integer file descriptor and calls :func:`os.dup` to " "duplicate the handle so that the original handle may be closed independently " @@ -341,22 +343,25 @@ msgid "" "socket for use by the :class:`file_dispatcher` class." msgstr "" -#: library/asyncore.rst:293 +#: library/asyncore.rst:296 msgid "asyncore Example basic HTTP client" msgstr "Exemple de client HTTP basique avec :mod:`asyncore`" -#: library/asyncore.rst:295 +#: library/asyncore.rst:298 msgid "" "Here is a very basic HTTP client that uses the :class:`dispatcher` class to " "implement its socket handling::" msgstr "" -#: library/asyncore.rst:332 +#: library/asyncore.rst:335 msgid "asyncore Example basic echo server" msgstr "Serveur *echo* basique avec :mod:`asyncore`" -#: library/asyncore.rst:334 +#: library/asyncore.rst:337 msgid "" "Here is a basic echo server that uses the :class:`dispatcher` class to " "accept connections and dispatches the incoming connections to a handler::" msgstr "" + +#~ msgid "Please use :mod:`asyncio` instead." +#~ msgstr "Utilisez :mod:`asyncio` à la place." diff --git a/library/atexit.po b/library/atexit.po index 97b5808480..dbf52ea55d 100644 --- a/library/atexit.po +++ b/library/atexit.po @@ -6,14 +6,14 @@ 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-10-15 09:15+0200\n" -"Last-Translator: Julien Palard \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 2.0.6\n" +"X-Generator: Poedit 3.0\n" #: library/atexit.rst:2 msgid ":mod:`atexit` --- Exit handlers" @@ -83,7 +83,6 @@ msgstr "" "nettoyés en dernier." #: library/atexit.rst:40 -#, fuzzy msgid "" "If an exception is raised during execution of the exit handlers, a traceback " "is printed (unless :exc:`SystemExit` is raised) and the exception " @@ -113,6 +112,13 @@ msgid "" "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`" diff --git a/library/audioop.po b/library/audioop.po index c7943d123b..ad9bb59039 100644 --- a/library/audioop.po +++ b/library/audioop.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-27 10:27+0100\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" @@ -19,7 +19,13 @@ msgstr "" msgid ":mod:`audioop` --- Manipulate raw audio data" msgstr ":mod:`audioop` — Manipulation de données audio brutes" -#: library/audioop.rst:9 +#: library/audioop.rst:8 +msgid "" +"The :mod:`audioop` module is deprecated (see :pep:`PEP 594 <594#audioop>` " +"for details)." +msgstr "" + +#: library/audioop.rst:14 msgid "" "The :mod:`audioop` module contains some useful operations on sound " "fragments. It operates on sound fragments consisting of signed integer " @@ -33,7 +39,7 @@ msgstr "" "des :term:`objets octet-compatibles `. Tous les nombres " "sont des entiers, sauf mention particulière." -#: library/audioop.rst:14 +#: library/audioop.rst:19 msgid "" "Support for 24-bit samples was added. All functions now accept any :term:" "`bytes-like object`. String input now results in an immediate error." @@ -43,14 +49,14 @@ msgstr "" "object>`. Une chaîne de caractères reçue en entrée lève immédiatement une " "erreur." -#: library/audioop.rst:25 +#: library/audioop.rst:30 msgid "" "This module provides support for a-LAW, u-LAW and Intel/DVI ADPCM encodings." msgstr "" "Ce module prend en charge les encodages de la loi A, de la loi u et les " "encodages Intel/DVI ADPCM." -#: library/audioop.rst:29 +#: library/audioop.rst:34 msgid "" "A few of the more complicated operations only take 16-bit samples, otherwise " "the sample size (in bytes) is always a parameter of the operation." @@ -59,11 +65,11 @@ msgstr "" "échantillons de 16 bits, la taille de l'échantillon (en octets) est toujours " "un paramètre de l'opération." -#: library/audioop.rst:32 +#: library/audioop.rst:37 msgid "The module defines the following variables and functions:" msgstr "Le module définit les fonctions et variables suivantes :" -#: library/audioop.rst:37 +#: library/audioop.rst:42 msgid "" "This exception is raised on all errors, such as unknown number of bytes per " "sample, etc." @@ -71,7 +77,7 @@ msgstr "" "Cette exception est levée pour toutes les erreurs, comme un nombre inconnu " "d'octets par échantillon, etc." -#: library/audioop.rst:43 +#: library/audioop.rst:48 msgid "" "Return a fragment which is the addition of the two samples passed as " "parameters. *width* is the sample width in bytes, either ``1``, ``2``, ``3`` " @@ -83,31 +89,31 @@ msgstr "" "``1``, ``2``, ``3`` ou ``4``. Les deux fragments doivent avoir la même " "longueur. Les échantillons sont tronqués en cas de débordement." -#: library/audioop.rst:50 +#: library/audioop.rst:55 msgid "" "Decode an Intel/DVI ADPCM coded fragment to a linear fragment. See the " "description of :func:`lin2adpcm` for details on ADPCM coding. Return a tuple " "``(sample, newstate)`` where the sample has the width specified in *width*." msgstr "" -#: library/audioop.rst:57 +#: library/audioop.rst:62 msgid "" "Convert sound fragments in a-LAW encoding to linearly encoded sound " "fragments. a-LAW encoding always uses 8 bits samples, so *width* refers only " "to the sample width of the output fragment here." msgstr "" -#: library/audioop.rst:64 +#: library/audioop.rst:69 msgid "Return the average over all samples in the fragment." msgstr "Renvoie la moyenne prise sur l'ensemble des échantillons du fragment." -#: library/audioop.rst:69 +#: library/audioop.rst:74 msgid "" "Return the average peak-peak value over all samples in the fragment. No " "filtering is done, so the usefulness of this routine is questionable." msgstr "" -#: library/audioop.rst:75 +#: library/audioop.rst:80 #, fuzzy msgid "" "Return a fragment that is the original fragment with a bias added to each " @@ -117,18 +123,18 @@ msgstr "" "fragment d'origine. Les échantillons s'enroulent autour dans le cas de " "débordement." -#: library/audioop.rst:81 +#: library/audioop.rst:86 msgid "" "\"Byteswap\" all samples in a fragment and returns the modified fragment. " "Converts big-endian samples to little-endian and vice versa." msgstr "" -#: library/audioop.rst:89 +#: library/audioop.rst:94 msgid "" "Return the number of zero crossings in the fragment passed as an argument." msgstr "" -#: library/audioop.rst:94 +#: library/audioop.rst:99 msgid "" "Return a factor *F* such that ``rms(add(fragment, mul(reference, -F)))`` is " "minimal, i.e., return the factor with which you should multiply *reference* " @@ -136,11 +142,11 @@ msgid "" "both contain 2-byte samples." msgstr "" -#: library/audioop.rst:99 +#: library/audioop.rst:104 msgid "The time taken by this routine is proportional to ``len(fragment)``." msgstr "Le temps pris par cette routine est proportionnel à ``len(fragment)``." -#: library/audioop.rst:104 +#: library/audioop.rst:109 msgid "" "Try to match *reference* as well as possible to a portion of *fragment* " "(which should be the longer fragment). This is (conceptually) done by " @@ -151,23 +157,24 @@ msgid "" "*factor* is the (floating-point) factor as per :func:`findfactor`." msgstr "" -#: library/audioop.rst:115 +#: library/audioop.rst:120 msgid "" "Search *fragment* for a slice of length *length* samples (not bytes!) with " -"maximum energy, i.e., return *i* for which ``rms(fragment[i*2:(i" -"+length)*2])`` is maximal. The fragments should both contain 2-byte samples." +"maximum energy, i.e., return *i* for which ``rms(fragment[i*2:" +"(i+length)*2])`` is maximal. The fragments should both contain 2-byte " +"samples." msgstr "" -#: library/audioop.rst:119 +#: library/audioop.rst:124 msgid "The routine takes time proportional to ``len(fragment)``." msgstr "La routine s'exécute en un temps proportionnel à ``len(fragment)``." -#: library/audioop.rst:124 +#: library/audioop.rst:129 msgid "Return the value of sample *index* from the fragment." msgstr "" "Renvoie la valeur de l'échantillon à l'indice *index* dans le fragment." -#: library/audioop.rst:129 +#: library/audioop.rst:134 msgid "" "Convert samples to 4 bit Intel/DVI ADPCM encoding. ADPCM coding is an " "adaptive coding scheme, whereby each 4 bit number is the difference between " @@ -176,7 +183,7 @@ msgid "" "standard." msgstr "" -#: library/audioop.rst:134 +#: library/audioop.rst:139 msgid "" "*state* is a tuple containing the state of the coder. The coder returns a " "tuple ``(adpcmfrag, newstate)``, and the *newstate* should be passed to the " @@ -185,7 +192,7 @@ msgid "" "per byte." msgstr "" -#: library/audioop.rst:142 +#: library/audioop.rst:147 msgid "" "Convert samples in the audio fragment to a-LAW encoding and return this as a " "bytes object. a-LAW is an audio encoding format whereby you get a dynamic " @@ -193,18 +200,18 @@ msgid "" "audio hardware, among others." msgstr "" -#: library/audioop.rst:150 +#: library/audioop.rst:155 msgid "Convert samples between 1-, 2-, 3- and 4-byte formats." msgstr "Convertit des échantillons pour les formats à 1, 2, 3, et 4 octets." -#: library/audioop.rst:154 +#: library/audioop.rst:159 msgid "" "In some audio formats, such as .WAV files, 16, 24 and 32 bit samples are " "signed, but 8 bit samples are unsigned. So when converting to 8 bit wide " "samples for these formats, you need to also add 128 to the result::" msgstr "" -#: library/audioop.rst:161 +#: library/audioop.rst:166 msgid "" "The same, in reverse, has to be applied when converting from 8 to 16, 24 or " "32 bit width samples." @@ -212,7 +219,7 @@ msgstr "" "Le même procédé, mais inversé, doit être suivi lorsqu'on exécute une " "conversion d'échantillons de 8 bits à 16, 24 ou 32 bits." -#: library/audioop.rst:167 +#: library/audioop.rst:172 msgid "" "Convert samples in the audio fragment to u-LAW encoding and return this as a " "bytes object. u-LAW is an audio encoding format whereby you get a dynamic " @@ -220,17 +227,17 @@ msgid "" "audio hardware, among others." msgstr "" -#: library/audioop.rst:175 +#: library/audioop.rst:180 msgid "" "Return the maximum of the *absolute value* of all samples in a fragment." msgstr "" "Renvoie la *valeur absolue* maximale de tous les échantillons du fragment." -#: library/audioop.rst:180 +#: library/audioop.rst:185 msgid "Return the maximum peak-peak value in the sound fragment." msgstr "" -#: library/audioop.rst:185 +#: library/audioop.rst:190 msgid "" "Return a tuple consisting of the minimum and maximum values of all samples " "in the sound fragment." @@ -238,7 +245,7 @@ msgstr "" "Renvoie un *n*-uplet contenant les valeurs maximale et minimale de tous les " "échantillons du fragment sonore." -#: library/audioop.rst:191 +#: library/audioop.rst:196 msgid "" "Return a fragment that has all samples in the original fragment multiplied " "by the floating-point value *factor*. Samples are truncated in case of " @@ -248,11 +255,11 @@ msgstr "" "multipliés par la valeur à décimale *factor*. Les échantillons sont tronqués " "en cas de débordement." -#: library/audioop.rst:197 +#: library/audioop.rst:202 msgid "Convert the frame rate of the input fragment." msgstr "Transforme la fréquence d'échantillonnage du fragment d'entrée." -#: library/audioop.rst:199 +#: library/audioop.rst:204 msgid "" "*state* is a tuple containing the state of the converter. The converter " "returns a tuple ``(newfragment, newstate)``, and *newstate* should be passed " @@ -260,7 +267,7 @@ msgid "" "as the state." msgstr "" -#: library/audioop.rst:203 +#: library/audioop.rst:208 msgid "" "The *weightA* and *weightB* arguments are parameters for a simple digital " "filter and default to ``1`` and ``0`` respectively." @@ -269,23 +276,23 @@ msgstr "" "numérique simple et ont comme valeur par défaut ``1`` et ``0``, " "respectivement." -#: library/audioop.rst:209 +#: library/audioop.rst:214 msgid "Reverse the samples in a fragment and returns the modified fragment." msgstr "" "Inverse les échantillons dans un fragment et renvoie le fragment modifié." -#: library/audioop.rst:214 +#: library/audioop.rst:219 msgid "" "Return the root-mean-square of the fragment, i.e. ``sqrt(sum(S_i^2)/n)``." msgstr "" "Renvoie la moyenne quadratique du fragment, c'est-à-dire ``sqrt(sum(S_i^2)/" "n)``." -#: library/audioop.rst:216 +#: library/audioop.rst:221 msgid "This is a measure of the power in an audio signal." msgstr "C'est une mesure de la puissance dans un signal audio." -#: library/audioop.rst:221 +#: library/audioop.rst:226 msgid "" "Convert a stereo fragment to a mono fragment. The left channel is " "multiplied by *lfactor* and the right channel by *rfactor* before adding the " @@ -295,7 +302,7 @@ msgstr "" "multiplié par *lfactor* et le canal de droite par *rfactor* avant " "d'additionner les deux canaux afin d'obtenir un signal mono." -#: library/audioop.rst:228 +#: library/audioop.rst:233 msgid "" "Generate a stereo fragment from a mono fragment. Each pair of samples in " "the stereo fragment are computed from the mono sample, whereby left channel " @@ -307,14 +314,14 @@ msgstr "" "multipliés par *lfactor* et les échantillons du canal de droite, par " "*rfactor*." -#: library/audioop.rst:235 +#: library/audioop.rst:240 msgid "" "Convert sound fragments in u-LAW encoding to linearly encoded sound " "fragments. u-LAW encoding always uses 8 bits samples, so *width* refers only " "to the sample width of the output fragment here." msgstr "" -#: library/audioop.rst:239 +#: library/audioop.rst:244 msgid "" "Note that operations such as :func:`.mul` or :func:`.max` make no " "distinction between mono and stereo fragments, i.e. all samples are treated " @@ -323,7 +330,7 @@ msgid "" "that::" msgstr "" -#: library/audioop.rst:253 +#: library/audioop.rst:258 msgid "" "If you use the ADPCM coder to build network packets and you want your " "protocol to be stateless (i.e. to be able to tolerate packet loss) you " @@ -335,14 +342,14 @@ msgid "" "index) in 8." msgstr "" -#: library/audioop.rst:261 +#: library/audioop.rst:266 msgid "" "The ADPCM coders have never been tried against other ADPCM coders, only " "against themselves. It could well be that I misinterpreted the standards in " "which case they will not be interoperable with the respective standards." msgstr "" -#: library/audioop.rst:265 +#: library/audioop.rst:270 msgid "" "The :func:`find\\*` routines might look a bit funny at first sight. They are " "primarily meant to do echo cancellation. A reasonably fast way to do this " diff --git a/library/audit_events.po b/library/audit_events.po index 7fae995076..202a14317f 100644 --- a/library/audit_events.po +++ b/library/audit_events.po @@ -55,6 +55,8 @@ msgid "" "The following events are raised internally and do not correspond to any " "public API of CPython:" msgstr "" +"Les évènements suivants sont levés en interne et ne correspondent à aucune " +"API publique de CPython:" #: library/audit_events.rst:27 #, fuzzy @@ -67,61 +69,63 @@ msgstr "Arguments" #: library/audit_events.rst:29 msgid "_winapi.CreateFile" -msgstr "" +msgstr "_winapi.CreateFile" #: library/audit_events.rst:29 msgid "" "``file_name``, ``desired_access``, ``share_mode``, ``creation_disposition``, " "``flags_and_attributes``" msgstr "" +"``file_name``, ``desired_access``, ``share_mode``, ``creation_disposition``, " +"``flags_and_attributes``" #: library/audit_events.rst:33 msgid "_winapi.CreateJunction" -msgstr "" +msgstr "_winapi.CreateJunction" #: library/audit_events.rst:33 msgid "``src_path``, ``dst_path``" -msgstr "" +msgstr "``src_path``, ``dst_path``" #: library/audit_events.rst:35 msgid "_winapi.CreateNamedPipe" -msgstr "" +msgstr "_winapi.CreateNamedPipe" #: library/audit_events.rst:35 msgid "``name``, ``open_mode``, ``pipe_mode``" -msgstr "" +msgstr "``name``, ``open_mode``, ``pipe_mode``" #: library/audit_events.rst:37 msgid "_winapi.CreatePipe" -msgstr "" +msgstr "_winapi.CreatePipe" #: library/audit_events.rst:39 msgid "_winapi.CreateProcess" -msgstr "" +msgstr "_winapi.CreateProcess" #: library/audit_events.rst:39 msgid "``application_name``, ``command_line``, ``current_directory``" -msgstr "" +msgstr "``application_name``, ``command_line``, ``current_directory``" #: library/audit_events.rst:42 msgid "_winapi.OpenProcess" -msgstr "" +msgstr "_winapi.OpenProcess" #: library/audit_events.rst:42 msgid "``process_id``, ``desired_access``" -msgstr "" +msgstr "``process_id``, ``desired_access``" #: library/audit_events.rst:44 msgid "_winapi.TerminateProcess" -msgstr "" +msgstr "_winapi.TerminateProcess" #: library/audit_events.rst:44 msgid "``handle``, ``exit_code``" -msgstr "" +msgstr "``handle``, ``exit_code``" #: library/audit_events.rst:46 msgid "ctypes.PyObj_FromPtr" -msgstr "" +msgstr "ctypes.PyObj_FromPtr" #: library/audit_events.rst:46 msgid "``obj``" diff --git a/library/base64.po b/library/base64.po index e4316e04dc..e6958e9577 100644 --- a/library/base64.po +++ b/library/base64.po @@ -5,8 +5,8 @@ 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: 2019-08-20 15:51+0200\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" @@ -117,12 +117,13 @@ msgstr "" "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 at least length 2 " -"(additional characters are ignored) 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." +"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 " @@ -131,7 +132,14 @@ msgstr "" "système de fichiers. La valeur par défaut est ``None``, auquel cas " "l'alphabet standard base64 est utilisé." -#: library/base64.rst:65 +#: 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`." @@ -140,24 +148,25 @@ msgstr "" "de caractères ASCII *s* encodée en base64 et renvoie les :class:`bytes` " "décodés." -#: library/base64.rst:68 +#: library/base64.rst:70 +#, fuzzy msgid "" "Optional *altchars* must be a :term:`bytes-like object` or ASCII string of " -"at least length 2 (additional characters are ignored) which specifies the " -"alternative alphabet used instead of the ``+`` and ``/`` characters." +"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:72 +#: 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:75 +#: 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 " @@ -170,7 +179,12 @@ msgstr "" "les caractères hors de l'alphabet de l'entrée produisent une :exc:`binascii." "Error`." -#: library/base64.rst:84 +#: 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`." @@ -178,7 +192,7 @@ msgstr "" "Encode un :term:`objet octet-compatible ` *s* en " "utilisant l'alphabet standard base64 et renvoie les :class:`bytes` encodés." -#: library/base64.rst:90 +#: 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`." @@ -187,7 +201,7 @@ msgstr "" "de caractères ASCII *s* utilisant l'alphabet base64 standard et renvoie les :" "class:`bytes` décodés." -#: library/base64.rst:96 +#: 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 ``/" @@ -199,7 +213,7 @@ msgstr "" "``_`` à ``+`` et ``/`` dans l'alphabet standard base64 et renvoie les :class:" "`bytes` encodés." -#: library/base64.rst:105 +#: 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 ``_`` " @@ -211,7 +225,7 @@ msgstr "" "de fichiers qui substitue ``-`` et ``_`` à ``+`` et ``/`` dans l'alphabet " "standard base64 et renvoie les :class:`bytes` décodés." -#: library/base64.rst:114 +#: library/base64.rst:117 msgid "" "Encode the :term:`bytes-like object` *s* using Base32 and return the " "encoded :class:`bytes`." @@ -219,7 +233,7 @@ msgstr "" "Encode un :term:`objet byte-compatible ` *s* en utilisant " "l'algorithme base32 et renvoie les :class:`bytes` encodés." -#: library/base64.rst:120 +#: library/base64.rst:123 msgid "" "Decode the Base32 encoded :term:`bytes-like object` or ASCII string *s* and " "return the decoded :class:`bytes`." @@ -228,7 +242,7 @@ msgstr "" "de caractères ASCII *s* encodé en base32 et renvoie les :class:`bytes` " "décodés." -#: library/base64.rst:171 +#: 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``." @@ -237,7 +251,7 @@ msgstr "" "en minuscules est acceptable comme entrée. Pour des raisons de sécurité, " "cette option est à ``False`` par défaut." -#: library/base64.rst:127 +#: library/base64.rst:130 #, fuzzy msgid "" ":rfc:`4648` allows for optional mapping of the digit 0 (zero) to the letter " @@ -256,7 +270,7 @@ msgstr "" "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:175 +#: 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." @@ -264,19 +278,19 @@ 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:141 +#: library/base64.rst:144 msgid "" "Similar to :func:`b32encode` but uses the Extended Hex Alphabet, as defined " "in :rfc:`4648`." msgstr "" -#: library/base64.rst:149 +#: library/base64.rst:152 msgid "" "Similar to :func:`b32decode` but uses the Extended Hex Alphabet, as defined " "in :rfc:`4648`." msgstr "" -#: library/base64.rst:152 +#: 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 " @@ -284,7 +298,7 @@ msgid "" "interchangeable." msgstr "" -#: library/base64.rst:162 +#: library/base64.rst:165 msgid "" "Encode the :term:`bytes-like object` *s* using Base16 and return the " "encoded :class:`bytes`." @@ -292,7 +306,7 @@ msgstr "" "Encode un :term:`objet byte-compatible ` *s* en utilisant " "l'algorithme base16 et renvoie les :class:`bytes` encodés." -#: library/base64.rst:168 +#: library/base64.rst:171 msgid "" "Decode the Base16 encoded :term:`bytes-like object` or ASCII string *s* and " "return the decoded :class:`bytes`." @@ -301,7 +315,7 @@ msgstr "" "de caractères ASCII *s* encodé en base16 et renvoie les :class:`bytes` " "décodés." -#: library/base64.rst:182 +#: library/base64.rst:185 msgid "" "Encode the :term:`bytes-like object` *b* using Ascii85 and return the " "encoded :class:`bytes`." @@ -309,7 +323,7 @@ msgstr "" "Encode un :term:`objet byte-compatible ` *s* en utilisant " "l'algorithme Ascii85 et renvoie les :class:`bytes` encodés." -#: library/base64.rst:185 +#: 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 " @@ -320,7 +334,7 @@ msgstr "" "*btoa*. Cette fonctionnalité n'est pas gérée par l'encodage « standard » " "Ascii85." -#: library/base64.rst:189 +#: 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 " @@ -330,7 +344,7 @@ msgstr "" "sortie. Chaque ligne de sortie contient au maximum *wrapcol* caractères si " "cette option diffère de zéro." -#: library/base64.rst:193 +#: 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." @@ -339,7 +353,7 @@ msgstr "" "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:196 +#: library/base64.rst:199 msgid "" "*adobe* controls whether the encoded byte sequence is framed with ``<~`` and " "``~>``, which is used by the Adobe implementation." @@ -347,7 +361,7 @@ 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:204 +#: library/base64.rst:207 msgid "" "Decode the Ascii85 encoded :term:`bytes-like object` or ASCII string *b* and " "return the decoded :class:`bytes`." @@ -356,18 +370,18 @@ msgstr "" "de caractères ASCII *s* encodé en Ascii85 et renvoie les :class:`bytes` " "décodés." -#: library/base64.rst:207 +#: 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 " +"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:211 +#: library/base64.rst:214 msgid "" "*adobe* controls whether the input sequence is in Adobe Ascii85 format (i.e. " "is framed with <~ and ~>)." @@ -375,7 +389,7 @@ 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:214 +#: 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 " @@ -387,7 +401,7 @@ msgstr "" "des caractères d'espacement et contient par défaut l'ensemble des caractères " "d'espacement de l'alphabet ASCII." -#: library/base64.rst:224 +#: 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`." @@ -396,16 +410,16 @@ msgstr "" "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:227 +#: 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 " +"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:235 +#: 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 " @@ -416,11 +430,11 @@ msgstr "" "décodés. Les caractères de remplissage sont implicitement retirés si " "nécessaire." -#: library/base64.rst:242 +#: library/base64.rst:245 msgid "The legacy interface:" msgstr "L'interface historique :" -#: library/base64.rst:246 +#: 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 " @@ -432,7 +446,7 @@ msgstr "" "term:`objets fichiers `. *input* est lu jusqu'à ce que ``input." "readline()`` renvoie un objet *bytes* vide." -#: library/base64.rst:254 +#: 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`." @@ -441,7 +455,7 @@ msgstr "" "contenir une ou plusieurs lignes de données encodées en base64 et renvoie " "les :class:`bytes` décodés." -#: library/base64.rst:262 +#: 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:" @@ -458,7 +472,7 @@ msgstr "" "sortie et assure que celle-ci se termine par une nouvelle ligne, comme " "spécifié par la :rfc:`2045` (MIME)." -#: library/base64.rst:272 +#: 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 " @@ -471,33 +485,33 @@ msgstr "" "(``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:280 +#: library/base64.rst:283 msgid "An example usage of the module:" msgstr "Un exemple d'utilisation du module :" -#: library/base64.rst:293 +#: library/base64.rst:296 msgid "Security Considerations" -msgstr "" +msgstr "Considérations de sécurité" -#: library/base64.rst:295 +#: 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:301 +#: library/base64.rst:304 msgid "Module :mod:`binascii`" msgstr "Module :mod:`binascii`" -#: library/base64.rst:301 +#: 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:304 +#: library/base64.rst:307 msgid "" ":rfc:`1521` - MIME (Multipurpose Internet Mail Extensions) Part One: " "Mechanisms for Specifying and Describing the Format of Internet Message " @@ -507,7 +521,7 @@ msgstr "" "Mechanisms for Specifying and Describing the Format of Internet Message " "Bodies*" -#: library/base64.rst:304 +#: library/base64.rst:307 msgid "" "Section 5.2, \"Base64 Content-Transfer-Encoding,\" provides the definition " "of the base64 encoding." diff --git a/library/bdb.po b/library/bdb.po index 7b5cd871b7..76a48e1f32 100644 --- a/library/bdb.po +++ b/library/bdb.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" +"POT-Creation-Date: 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" @@ -56,79 +56,130 @@ msgstr "" #: library/bdb.rst:33 msgid "" -"When creating a breakpoint, its associated filename should be in canonical " -"form. If a *funcname* is defined, a breakpoint hit will be counted when the " -"first line of that function is executed. A conditional breakpoint always " -"counts a hit." +"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:38 +#: library/bdb.rst:39 msgid ":class:`Breakpoint` instances have the following methods:" msgstr "" -#: library/bdb.rst:42 +#: 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:49 +#: library/bdb.rst:50 msgid "Mark the breakpoint as enabled." msgstr "Active le point d'arrêt." -#: library/bdb.rst:54 +#: library/bdb.rst:55 msgid "Mark the breakpoint as disabled." msgstr "Désactive le point d'arrêt." -#: library/bdb.rst:59 +#: library/bdb.rst:60 msgid "" "Return a string with all the information about the breakpoint, nicely " "formatted:" msgstr "" -#: library/bdb.rst:62 -msgid "The breakpoint number." -msgstr "Le numéro du point d'arrêt." - #: library/bdb.rst:63 -msgid "If it is temporary or not." -msgstr "S'il est temporaire ou non." +#, fuzzy +msgid "Breakpoint number." +msgstr "Le numéro du point d'arrêt." #: library/bdb.rst:64 -msgid "Its file,line position." +msgid "Temporary status (del or keep)." msgstr "" #: library/bdb.rst:65 -msgid "The condition that causes a break." +msgid "File/line position." msgstr "" #: library/bdb.rst:66 -msgid "If it must be ignored the next N times." +msgid "Break condition." msgstr "" #: library/bdb.rst:67 -msgid "The breakpoint hit count." +msgid "Number of times to ignore." msgstr "" -#: library/bdb.rst:73 +#: 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:79 -msgid "The :class:`Bdb` class acts as a generic Python debugger base class." +#: 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:85 +#: 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 " @@ -137,89 +188,94 @@ msgid "" "globals." msgstr "" -#: library/bdb.rst:91 +#: library/bdb.rst:135 msgid "The *skip* argument." msgstr "L'argument *skip*." -#: library/bdb.rst:94 +#: library/bdb.rst:138 msgid "" "The following methods of :class:`Bdb` normally don't need to be overridden." msgstr "" -#: library/bdb.rst:98 +#: library/bdb.rst:142 +msgid "Return canonical form of *filename*." +msgstr "" + +#: library/bdb.rst:144 msgid "" -"Auxiliary method for getting a filename in a canonical form, that is, as a " -"case-normalized (on case-insensitive filesystems) absolute path, stripped of " -"surrounding angle brackets." +"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:104 +#: 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:109 +#: 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:112 +#: 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:116 +#: library/bdb.rst:163 msgid "``\"line\"``: A new line of code is going to be executed." msgstr "" -#: library/bdb.rst:117 +#: library/bdb.rst:164 msgid "" "``\"call\"``: A function is about to be called, or another code block " "entered." msgstr "" -#: library/bdb.rst:119 +#: library/bdb.rst:166 msgid "``\"return\"``: A function or other code block is about to return." msgstr "" -#: library/bdb.rst:120 +#: library/bdb.rst:167 msgid "``\"exception\"``: An exception has occurred." msgstr "``\"exception\"`` : Une exception est survenue." -#: library/bdb.rst:121 +#: 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:122 +#: 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:123 +#: library/bdb.rst:170 msgid "``\"c_exception\"``: A C function has raised an exception." msgstr "" -#: library/bdb.rst:125 +#: 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:128 +#: 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:130 +#: 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:136 +#: 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:" @@ -228,7 +284,7 @@ msgid "" "`trace_dispatch` method for further tracing in that scope." msgstr "" -#: library/bdb.rst:144 +#: 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:" @@ -237,7 +293,7 @@ msgid "" "`trace_dispatch` method for further tracing in that scope." msgstr "" -#: library/bdb.rst:152 +#: 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 :" @@ -246,7 +302,7 @@ msgid "" "`trace_dispatch` method for further tracing in that scope." msgstr "" -#: library/bdb.rst:160 +#: 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 :" @@ -255,150 +311,152 @@ msgid "" "`trace_dispatch` method for further tracing in that scope." msgstr "" -#: library/bdb.rst:166 +#: 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:171 -msgid "" -"This method checks if the *frame* is somewhere below :attr:`botframe` in the " -"call stack. :attr:`botframe` is the frame in which debugging started." +#: library/bdb.rst:218 +msgid "Return True if *module_name* matches any skip pattern." msgstr "" -#: library/bdb.rst:176 -msgid "" -"This method checks if there is a breakpoint in the filename and line " -"belonging to *frame* or, at least, in the current function. If the " -"breakpoint is a temporary one, this method deletes it." +#: library/bdb.rst:222 +msgid "Return True if *frame* is below the starting frame in the stack." msgstr "" -#: library/bdb.rst:182 +#: library/bdb.rst:226 +msgid "Return True if there is an effective breakpoint for this line." +msgstr "" + +#: library/bdb.rst:228 msgid "" -"This method checks if there is a breakpoint in the filename of the current " -"frame." +"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:185 +#: library/bdb.rst:235 msgid "" "Derived classes should override these methods to gain control over debugger " "operation." msgstr "" -#: library/bdb.rst:190 +#: library/bdb.rst:240 msgid "" -"This method is called from :meth:`dispatch_call` when there is the " -"possibility that a break might be necessary anywhere inside the called " +"Called from :meth:`dispatch_call` if a break might stop inside the called " "function." msgstr "" -#: library/bdb.rst:196 +#: library/bdb.rst:245 msgid "" -"This method is called from :meth:`dispatch_line` when either :meth:" -"`stop_here` or :meth:`break_here` yields ``True``." +"Called from :meth:`dispatch_line` when either :meth:`stop_here` or :meth:" +"`break_here` returns ``True``." msgstr "" -#: library/bdb.rst:201 +#: library/bdb.rst:250 msgid "" -"This method is called from :meth:`dispatch_return` when :meth:`stop_here` " -"yields ``True``." +"Called from :meth:`dispatch_return` when :meth:`stop_here` returns ``True``." msgstr "" -#: library/bdb.rst:206 +#: library/bdb.rst:254 msgid "" -"This method is called from :meth:`dispatch_exception` when :meth:`stop_here` " -"yields ``True``." +"Called from :meth:`dispatch_exception` when :meth:`stop_here` returns " +"``True``." msgstr "" -#: library/bdb.rst:211 +#: library/bdb.rst:259 msgid "Handle how a breakpoint must be removed when it is a temporary one." msgstr "" -#: library/bdb.rst:213 +#: library/bdb.rst:261 msgid "This method must be implemented by derived classes." msgstr "" -#: library/bdb.rst:216 +#: library/bdb.rst:264 msgid "" "Derived classes and clients can call the following methods to affect the " "stepping state." msgstr "" -#: library/bdb.rst:221 +#: library/bdb.rst:269 msgid "Stop after one line of code." msgstr "Arrête après une ligne de code." -#: library/bdb.rst:225 +#: library/bdb.rst:273 msgid "Stop on the next line in or below the given frame." msgstr "" -#: library/bdb.rst:229 +#: library/bdb.rst:277 msgid "Stop when returning from the given frame." msgstr "" -#: library/bdb.rst:233 +#: library/bdb.rst:281 msgid "" -"Stop when the line with the line no greater than the current one is reached " +"Stop when the line with the *lineno* greater than the current one is reached " "or when returning from current frame." msgstr "" -#: library/bdb.rst:238 +#: library/bdb.rst:286 msgid "" "Start debugging from *frame*. If *frame* is not specified, debugging starts " "from caller's frame." msgstr "" -#: library/bdb.rst:243 +#: 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:248 +#: 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:252 +#: 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:258 +#: 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:264 +#: library/bdb.rst:312 msgid "" -"Delete the breakpoints in *filename* and *lineno*. If none were set, an " -"error message is returned." +"Delete the breakpoints in *filename* and *lineno*. If none were set, return " +"an error message." msgstr "" -#: library/bdb.rst:269 +#: 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:275 +#: library/bdb.rst:323 msgid "" -"Delete all breakpoints in *filename*. If none were set, an error message is " -"returned." +"Delete all breakpoints in *filename*. If none were set, return an error " +"message." msgstr "" -#: library/bdb.rst:280 -msgid "Delete all existing breakpoints." -msgstr "Supprime tous les points d'arrêt définis." +#: library/bdb.rst:328 +msgid "" +"Delete all existing breakpoints. If none were set, return an error message." +msgstr "" -#: library/bdb.rst:284 +#: 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 " @@ -406,114 +464,141 @@ msgid "" "raised." msgstr "" -#: library/bdb.rst:293 -msgid "Check if there is a breakpoint for *lineno* of *filename*." +#: library/bdb.rst:342 +msgid "Return True if there is a breakpoint for *lineno* in *filename*." msgstr "" -#: library/bdb.rst:297 +#: library/bdb.rst:346 msgid "" "Return all breakpoints for *lineno* in *filename*, or an empty list if none " "are set." msgstr "" -#: library/bdb.rst:302 +#: library/bdb.rst:351 msgid "Return all breakpoints in *filename*, or an empty list if none are set." msgstr "" -#: library/bdb.rst:306 +#: library/bdb.rst:355 msgid "Return all breakpoints that are set." msgstr "Donne tous les points d'arrêt définis." -#: library/bdb.rst:309 +#: 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:314 +#: 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 "" -"Get a list of records for a frame and all higher (calling) and lower frames, " -"and the size of the higher part." +"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:319 +#: library/bdb.rst:370 msgid "" -"Return a string with information about a stack entry, identified by a " -"``(frame, lineno)`` tuple:" +"Return a string with information about a stack entry, which is a ``(frame, " +"lineno)`` tuple. The return string contains:" msgstr "" -#: library/bdb.rst:322 -msgid "The canonical form of the filename which contains the frame." +#: library/bdb.rst:373 +msgid "The canonical filename which contains the frame." msgstr "" -#: library/bdb.rst:323 -msgid "The function name, or ``\"\"``." +#: library/bdb.rst:374 +#, fuzzy +msgid "The function name or ``\"\"``." msgstr "Le nom de la fonction, ou ``\"\"``." -#: library/bdb.rst:324 +#: library/bdb.rst:375 msgid "The input arguments." msgstr "Les arguments donnés." -#: library/bdb.rst:325 +#: library/bdb.rst:376 msgid "The return value." msgstr "Le résultat." -#: library/bdb.rst:326 +#: library/bdb.rst:377 msgid "The line of code (if it exists)." msgstr "La ligne de code (si elle existe)." -#: library/bdb.rst:329 +#: 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:334 +#: 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:339 +#: 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:344 +#: library/bdb.rst:395 msgid "For backwards compatibility. Calls the :meth:`run` method." msgstr "" -#: library/bdb.rst:348 +#: library/bdb.rst:399 msgid "Debug a single function call, and return its result." msgstr "" -#: library/bdb.rst:351 +#: library/bdb.rst:402 msgid "Finally, the module defines the following functions:" msgstr "" -#: library/bdb.rst:355 +#: library/bdb.rst:406 msgid "" -"Check whether we should break here, depending on the way the breakpoint *b* " -"was set." +"Return True if we should break here, depending on the way the :class:" +"`Breakpoint` *b* was set." msgstr "" -#: library/bdb.rst:358 +#: library/bdb.rst:409 msgid "" -"If it was set via line number, it checks if ``b.line`` is the same as the " -"one in the frame also passed as argument. If the breakpoint was set via " -"function name, we have to check we are in the right frame (the right " -"function) and if we are in its first executable line." +"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:365 +#: 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 "" -"Determine if there is an effective (active) breakpoint at this line of code. " -"Return a tuple of the breakpoint and a boolean that indicates if it is ok to " -"delete a temporary breakpoint. Return ``(None, None)`` if there is no " -"matching breakpoint." +"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:372 +#: 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/binascii.po b/library/binascii.po index 49f38738d9..f54be04479 100644 --- a/library/binascii.po +++ b/library/binascii.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" +"POT-Creation-Date: 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" @@ -201,12 +201,13 @@ msgstr "" "CRC est utilisé dans le format *binhex4*." #: library/binascii.rst:138 +#, fuzzy msgid "" -"Compute CRC-32, the 32-bit checksum of *data*, starting with an initial CRC " -"of *value*. The default initial CRC is zero. The algorithm is consistent " -"with the ZIP file checksum. Since the algorithm is designed for use as a " -"checksum algorithm, it is not suitable for use as a general hash algorithm. " -"Use as follows::" +"Compute CRC-32, the unsigned 32-bit checksum of *data*, starting with an " +"initial CRC of *value*. The default initial CRC is zero. The algorithm is " +"consistent with the ZIP file checksum. Since the algorithm is designed for " +"use as a checksum algorithm, it is not suitable for use as a general hash " +"algorithm. Use as follows::" msgstr "" "Calcule CRC-32, la somme de contrôle 32-bit de *data*, commençant par un CRC " "initial de *value*. Le CRC initial par défaut est zéro. L’algorithme est " @@ -215,15 +216,16 @@ msgstr "" "convient pas comme algorithme de hachage général. Utiliser comme suit ::" #: library/binascii.rst:150 +#, fuzzy msgid "" -"The result is always unsigned. To generate the same numeric value across all " -"Python versions and platforms, use ``crc32(data) & 0xffffffff``." +"The result is always unsigned. To generate the same numeric value when using " +"Python 2 or earlier, use ``crc32(data) & 0xffffffff``." msgstr "" "Le résultat est toujours non signé. Pour générer la même valeur numérique " "sur toutes les versions de Python et plateformes, utilisez ``crc32(data) & " "0xffffffff``." -#: library/binascii.rst:159 +#: library/binascii.rst:158 msgid "" "Return the hexadecimal representation of the binary *data*. Every byte of " "*data* is converted into the corresponding 2-digit hex representation. The " @@ -233,7 +235,7 @@ msgstr "" "*data* est converti en la représentation 2 chiffres correspondante. L’objet " "octets renvoyé est donc deux fois plus long que la longueur de *data*." -#: library/binascii.rst:163 +#: library/binascii.rst:162 msgid "" "Similar functionality (but returning a text string) is also conveniently " "accessible using the :meth:`bytes.hex` method." @@ -241,7 +243,7 @@ msgstr "" "Fonctionnalité similaire est également commodément accessible en utilisant " "la méthode :meth:`bytes.hex`." -#: library/binascii.rst:166 +#: library/binascii.rst:165 msgid "" "If *sep* is specified, it must be a single character str or bytes object. It " "will be inserted in the output after every *bytes_per_sep* input bytes. " @@ -254,11 +256,11 @@ msgstr "" "droite de la sortie. Si vous souhaitez compter à partir de la gauche, " "indiquez une valeur *bytes_per_sep* négative." -#: library/binascii.rst:181 +#: library/binascii.rst:180 msgid "The *sep* and *bytes_per_sep* parameters were added." msgstr "ajout des paramètres *sep* et *bytes_per_sep*." -#: library/binascii.rst:187 +#: library/binascii.rst:186 msgid "" "Return the binary data represented by the hexadecimal string *hexstr*. This " "function is the inverse of :func:`b2a_hex`. *hexstr* must contain an even " @@ -270,7 +272,7 @@ msgstr "" "*hexstr* doit contenir un nombre pair de chiffres hexadécimaux (qui peuvent " "être en majuscule ou minuscule), sinon une exception :exc:`Error` est levée." -#: library/binascii.rst:192 +#: library/binascii.rst:191 msgid "" "Similar functionality (accepting only text string arguments, but more " "liberal towards whitespace) is also accessible using the :meth:`bytes." @@ -280,13 +282,13 @@ msgstr "" "texte, mais plus libérale vis-à-vis des espaces blancs) est également " "accessible en utilisant la méthode de classe :meth:`bytes.fromhex`." -#: library/binascii.rst:198 +#: library/binascii.rst:197 msgid "Exception raised on errors. These are usually programming errors." msgstr "" "Exception levée en cas d'erreurs. Ce sont typiquement des erreurs de " "programmation." -#: library/binascii.rst:203 +#: library/binascii.rst:202 msgid "" "Exception raised on incomplete data. These are usually not programming " "errors, but may be handled by reading a little more data and trying again." @@ -295,37 +297,37 @@ msgstr "" "d’erreurs de programmation, mais elles peuvent être traitées en lisant un " "peu plus de données et en réessayant." -#: library/binascii.rst:211 +#: library/binascii.rst:210 msgid "Module :mod:`base64`" msgstr "Module :mod:`base64`" -#: library/binascii.rst:210 +#: library/binascii.rst:209 msgid "" "Support for RFC compliant base64-style encoding in base 16, 32, 64, and 85." msgstr "" "Support de l’encodage *base64-style* conforme RFC en base 16, 32, 64 et 85." -#: library/binascii.rst:214 +#: library/binascii.rst:213 msgid "Module :mod:`binhex`" msgstr "Module :mod:`binhex`" -#: library/binascii.rst:214 +#: library/binascii.rst:213 msgid "Support for the binhex format used on the Macintosh." msgstr "Support pour le format *binhex* utilisé sur Macintosh." -#: library/binascii.rst:217 +#: library/binascii.rst:216 msgid "Module :mod:`uu`" msgstr "Module :mod:`uu`" -#: library/binascii.rst:217 +#: library/binascii.rst:216 msgid "Support for UU encoding used on Unix." msgstr "Gestion de l'encodage UU utilisé sur Unix." -#: library/binascii.rst:219 +#: library/binascii.rst:218 msgid "Module :mod:`quopri`" msgstr "Module :mod:`quopri`" -#: library/binascii.rst:220 +#: library/binascii.rst:219 msgid "Support for quoted-printable encoding used in MIME email messages." msgstr "" "Support de l’encodage *quote-printable* utilisé par les messages *email* " diff --git a/library/bisect.po b/library/bisect.po index 31aefaa8b3..af06024d3a 100644 --- a/library/bisect.po +++ b/library/bisect.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-09-23 16:16+0200\n" +"POT-Creation-Date: 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" @@ -71,22 +71,29 @@ msgstr "" "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:55 library/bisect.rst:88 +#: 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 input element. The default value is " -"``None`` (compare the elements directly)." +"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:59 library/bisect.rst:99 +#: 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:48 +#: 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*." @@ -94,7 +101,7 @@ 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:51 +#: 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 " @@ -104,11 +111,11 @@ msgstr "" "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:65 +#: 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:71 +#: 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 " @@ -118,7 +125,13 @@ msgstr "" "position de l'insertion, puis appelle la méthode :meth:`insert` de *a* pour " "ajouter *x* à l'endroit adéquat." -#: library/bisect.rst:96 +#: 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." @@ -127,7 +140,7 @@ msgstr "" "recherche est dominée par la lenteur de l'insertion, de complexité linéaire :" "math:`O(n)`." -#: library/bisect.rst:85 +#: library/bisect.rst:90 msgid "" "Similar to :func:`insort_left`, but inserting *x* in *a* after any existing " "entries of *x*." @@ -135,7 +148,7 @@ msgstr "" "Similaire à :func:`insort_left`, mais en insérant *x* dans *a* après une " "potentielle entrée existante égale à *x*." -#: library/bisect.rst:92 +#: 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 " @@ -144,11 +157,11 @@ msgstr "" "Le principe est le même que :func:`insort_left`, mais avec :func:" "`bisect_right`." -#: library/bisect.rst:104 +#: library/bisect.rst:108 msgid "Performance Notes" msgstr "Notes sur la performance" -#: library/bisect.rst:106 +#: library/bisect.rst:110 msgid "" "When writing time sensitive code using *bisect()* and *insort()*, keep these " "thoughts in mind:" @@ -156,7 +169,7 @@ msgstr "" "Pour écrire du code sensible à la performance utilisant ``bisect()`` et " "``insort()``, prenez en compte ces quelques considérations :" -#: library/bisect.rst:109 +#: library/bisect.rst:113 msgid "" "Bisection is effective for searching ranges of values. For locating specific " "values, dictionaries are more performant." @@ -164,7 +177,7 @@ 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:112 +#: library/bisect.rst:116 msgid "" "The *insort()* functions are ``O(n)`` because the logarithmic search step is " "dominated by the linear time insertion step." @@ -172,7 +185,7 @@ 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:115 +#: 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, " @@ -191,17 +204,18 @@ msgstr "" "sur un tableau de clés pré-calculées pour trouver le point d'insertion (voir " "les exemples plus bas)." -#: library/bisect.rst:125 +#: library/bisect.rst:129 +#, fuzzy msgid "" -"`Sorted Collections `_ is " -"a high performance module that uses *bisect* to managed sorted collections " -"of data." +"`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:129 +#: library/bisect.rst:133 msgid "" "The `SortedCollection recipe `_ uses bisect to build a full-featured collection class " @@ -215,11 +229,11 @@ msgstr "" "fonction clef. Les clefs sont pré-calculées pour économiser des appels " "inutiles à la fonction clef durant les recherches." -#: library/bisect.rst:137 +#: library/bisect.rst:141 msgid "Searching Sorted Lists" msgstr "Chercher dans des listes triées" -#: library/bisect.rst:139 +#: 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 " @@ -231,11 +245,11 @@ msgstr "" "rechercher des éléments. Les cinq fonctions suivantes montrent comment les " "transformer en recherche plus classique pour les listes triées ::" -#: library/bisect.rst:181 +#: library/bisect.rst:185 msgid "Examples" msgstr "Exemples" -#: library/bisect.rst:185 +#: 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 " @@ -248,10 +262,18 @@ msgstr "" "en se basant sur une échelle prédéfinie : plus de 90 vaut 'A', de 80 à 89 " "vaut 'B', etc. ::" -#: library/bisect.rst:197 +#: 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 "" -"One technique to avoid repeated calls to a key function is to search a list " -"of precomputed keys to find the index of a record::" +"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 ::" diff --git a/library/bz2.po b/library/bz2.po index cab82e5fc6..0412940e93 100644 --- a/library/bz2.po +++ b/library/bz2.po @@ -5,8 +5,8 @@ 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:24+0100\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" @@ -392,10 +392,11 @@ msgstr "" "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 " -"`EOFError`. Any data found after the end of the stream is ignored and saved " -"in the :attr:`~.unused_data` attribute." +"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 " @@ -490,13 +491,14 @@ msgstr "" "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, " +"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 " +"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é." diff --git a/library/calendar.po b/library/calendar.po index f2456a87a1..2ff0b97a6e 100644 --- a/library/calendar.po +++ b/library/calendar.po @@ -5,8 +5,8 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" -"PO-Revision-Date: 2021-03-20 19:35+0100\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" @@ -58,13 +58,15 @@ msgstr "" "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." +"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. ``0`` is Monday (the default), ``6`` is Sunday." +"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 " @@ -591,11 +593,16 @@ msgstr "" "le mois numéro 1, donc il a une longueur de 13 et ``month_name[0]`` est la " "chaîne vide." -#: library/calendar.rst:417 +#: 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:416 +#: library/calendar.rst:425 msgid "" "Object-oriented interface to dates and times with similar functionality to " "the :mod:`time` module." @@ -603,10 +610,10 @@ msgstr "" "Interface orientée objet pour les dates et les heures avec des " "fonctionnalités similaires au module :mod:`time`." -#: library/calendar.rst:419 +#: library/calendar.rst:428 msgid "Module :mod:`time`" msgstr "Module :mod:`time`" -#: library/calendar.rst:420 +#: 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 index 27d4f3244f..4e2c797b9f 100644 --- a/library/cgi.po +++ b/library/cgi.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-09-23 16:16+0200\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" @@ -18,31 +18,37 @@ msgstr "" msgid ":mod:`cgi` --- Common Gateway Interface support" msgstr "" -#: library/cgi.rst:7 +#: library/cgi.rst:8 msgid "**Source code:** :source:`Lib/cgi.py`" msgstr "**Code source :** :source:`Lib/cgi.py`" -#: library/cgi.rst:19 +#: library/cgi.rst:18 +msgid "" +"The :mod:`cgi` module is deprecated (see :pep:`PEP 594 <594#cgi>` for " +"details and alternatives)." +msgstr "" + +#: library/cgi.rst:24 msgid "Support module for Common Gateway Interface (CGI) scripts." msgstr "" -#: library/cgi.rst:21 +#: library/cgi.rst:26 msgid "" "This module defines a number of utilities for use by CGI scripts written in " "Python." msgstr "" -#: library/cgi.rst:26 +#: library/cgi.rst:31 msgid "Introduction" msgstr "Introduction" -#: library/cgi.rst:30 +#: library/cgi.rst:35 msgid "" "A CGI script is invoked by an HTTP server, usually to process user input " "submitted through an HTML ``
`` or ```` element." msgstr "" -#: library/cgi.rst:33 +#: library/cgi.rst:38 msgid "" "Most often, CGI scripts live in the server's special :file:`cgi-bin` " "directory. The HTTP server places all sorts of information about the request " @@ -51,7 +57,7 @@ msgid "" "script, and sends the script's output back to the client." msgstr "" -#: library/cgi.rst:39 +#: library/cgi.rst:44 msgid "" "The script's input is connected to the client too, and sometimes the form " "data is read this way; at other times the form data is passed via the " @@ -62,7 +68,7 @@ msgid "" "supports it)." msgstr "" -#: library/cgi.rst:46 +#: library/cgi.rst:51 msgid "" "The output of a CGI script should consist of two sections, separated by a " "blank line. The first section contains a number of headers, telling the " @@ -70,26 +76,26 @@ msgid "" "header section looks like this::" msgstr "" -#: library/cgi.rst:54 +#: library/cgi.rst:59 msgid "" "The second section is usually HTML, which allows the client software to " "display nicely formatted text with header, in-line images, etc. Here's " "Python code that prints a simple piece of HTML::" msgstr "" -#: library/cgi.rst:66 +#: library/cgi.rst:71 msgid "Using the cgi module" msgstr "" -#: library/cgi.rst:68 +#: library/cgi.rst:73 msgid "Begin by writing ``import cgi``." msgstr "" -#: library/cgi.rst:70 +#: library/cgi.rst:75 msgid "When you write a new script, consider adding these lines::" msgstr "" -#: library/cgi.rst:75 +#: library/cgi.rst:80 msgid "" "This activates a special exception handler that will display detailed " "reports in the web browser if any errors occur. If you'd rather not show " @@ -97,7 +103,7 @@ msgid "" "saved to files instead, with code like this::" msgstr "" -#: library/cgi.rst:83 +#: library/cgi.rst:88 msgid "" "It's very helpful to use this feature during script development. The reports " "produced by :mod:`cgitb` provide information that can save you a lot of time " @@ -105,7 +111,7 @@ msgid "" "you have tested your script and are confident that it works correctly." msgstr "" -#: library/cgi.rst:88 +#: library/cgi.rst:93 msgid "" "To get at submitted form data, use the :class:`FieldStorage` class. If the " "form contains non-ASCII characters, use the *encoding* keyword parameter set " @@ -117,7 +123,7 @@ msgid "" "consume standard input, it should be instantiated only once." msgstr "" -#: library/cgi.rst:97 +#: library/cgi.rst:102 msgid "" "The :class:`FieldStorage` instance can be indexed like a Python dictionary. " "It allows membership testing with the :keyword:`in` operator, and also " @@ -128,14 +134,14 @@ msgid "" "class:`FieldStorage` instance." msgstr "" -#: library/cgi.rst:105 +#: library/cgi.rst:110 msgid "" "For instance, the following code (which assumes that the :mailheader:" "`Content-Type` header and blank line have already been printed) checks that " "the fields ``name`` and ``addr`` are both set to a non-empty string::" msgstr "" -#: library/cgi.rst:119 +#: library/cgi.rst:124 msgid "" "Here the fields, accessed through ``form[key]``, are themselves instances " "of :class:`FieldStorage` (or :class:`MiniFieldStorage`, depending on the " @@ -145,7 +151,7 @@ msgid "" "second argument as a default to return if the requested key is not present." msgstr "" -#: library/cgi.rst:126 +#: library/cgi.rst:131 msgid "" "If the submitted form data contains more than one field with the same name, " "the object retrieved by ``form[key]`` is not a :class:`FieldStorage` or :" @@ -158,7 +164,7 @@ msgid "" "username fields, separated by commas::" msgstr "" -#: library/cgi.rst:139 +#: library/cgi.rst:144 msgid "" "If a field represents an uploaded file, accessing the value via the :attr:" "`~FieldStorage.value` attribute or the :meth:`~FieldStorage.getvalue` method " @@ -171,13 +177,13 @@ msgid "" "IOBase.readline` methods will return bytes)::" msgstr "" -#: library/cgi.rst:159 +#: library/cgi.rst:164 msgid "" ":class:`FieldStorage` objects also support being used in a :keyword:`with` " "statement, which will automatically close them when done." msgstr "" -#: library/cgi.rst:162 +#: library/cgi.rst:167 msgid "" "If an error is encountered when obtaining the contents of an uploaded file " "(for example, when the user interrupts the form submission by clicking on a " @@ -185,7 +191,7 @@ msgid "" "object for the field will be set to the value -1." msgstr "" -#: library/cgi.rst:167 +#: library/cgi.rst:172 msgid "" "The file upload draft standard entertains the possibility of uploading " "multiple files from one field (using a recursive :mimetype:`multipart/\\*` " @@ -196,7 +202,7 @@ msgid "" "be iterated over recursively just like the top-level form object." msgstr "" -#: library/cgi.rst:175 +#: library/cgi.rst:180 msgid "" "When a form is submitted in the \"old\" format (as the query string or as a " "single data part of type :mimetype:`application/x-www-form-urlencoded`), the " @@ -205,29 +211,29 @@ msgid "" "are always ``None``." msgstr "" -#: library/cgi.rst:180 +#: library/cgi.rst:185 msgid "" "A form submitted via POST that also has a query string will contain both :" "class:`FieldStorage` and :class:`MiniFieldStorage` items." msgstr "" -#: library/cgi.rst:183 +#: library/cgi.rst:188 msgid "" "The :attr:`~FieldStorage.file` attribute is automatically closed upon the " "garbage collection of the creating :class:`FieldStorage` instance." msgstr "" -#: library/cgi.rst:187 +#: library/cgi.rst:192 msgid "" "Added support for the context management protocol to the :class:" "`FieldStorage` class." msgstr "" -#: library/cgi.rst:193 +#: library/cgi.rst:198 msgid "Higher Level Interface" msgstr "" -#: library/cgi.rst:195 +#: library/cgi.rst:200 msgid "" "The previous section explains how to read CGI form data using the :class:" "`FieldStorage` class. This section describes a higher level interface which " @@ -237,33 +243,33 @@ msgid "" "efficiently, for example." msgstr "" -#: library/cgi.rst:204 +#: library/cgi.rst:209 msgid "" "The interface consists of two simple methods. Using the methods you can " "process form data in a generic way, without the need to worry whether only " "one or more values were posted under one name." msgstr "" -#: library/cgi.rst:208 +#: library/cgi.rst:213 msgid "" "In the previous section, you learned to write following code anytime you " "expected a user to post more than one value under one name::" msgstr "" -#: library/cgi.rst:217 +#: library/cgi.rst:222 msgid "" "This situation is common for example when a form contains a group of " "multiple checkboxes with the same name::" msgstr "" -#: library/cgi.rst:223 +#: library/cgi.rst:228 msgid "" "In most situations, however, there's only one form control with a particular " "name in a form and then you expect and need only one value associated with " "this name. So you write a script containing for example this code::" msgstr "" -#: library/cgi.rst:229 +#: library/cgi.rst:234 msgid "" "The problem with the code is that you should never expect that a client will " "provide valid input to your scripts. For example, if a curious user appends " @@ -274,21 +280,21 @@ msgid "" "an :exc:`AttributeError` exception." msgstr "" -#: library/cgi.rst:237 +#: library/cgi.rst:242 msgid "" "Therefore, the appropriate way to read form data values was to always use " "the code which checks whether the obtained value is a single value or a list " "of values. That's annoying and leads to less readable scripts." msgstr "" -#: library/cgi.rst:241 +#: library/cgi.rst:246 msgid "" "A more convenient approach is to use the methods :meth:`~FieldStorage." "getfirst` and :meth:`~FieldStorage.getlist` provided by this higher level " "interface." msgstr "" -#: library/cgi.rst:247 +#: library/cgi.rst:252 msgid "" "This method always returns only one value associated with form field *name*. " "The method returns only the first value in case that more values were posted " @@ -299,7 +305,7 @@ msgid "" "defaults to ``None`` if not specified." msgstr "" -#: library/cgi.rst:258 +#: library/cgi.rst:263 msgid "" "This method always returns a list of values associated with form field " "*name*. The method returns an empty list if no such form field or value " @@ -307,28 +313,28 @@ msgid "" "such value exists." msgstr "" -#: library/cgi.rst:262 +#: library/cgi.rst:267 msgid "Using these methods you can write nice compact code::" msgstr "" -#: library/cgi.rst:274 +#: library/cgi.rst:279 msgid "Functions" msgstr "Fonctions" -#: library/cgi.rst:276 +#: library/cgi.rst:281 msgid "" "These are useful if you want more control, or if you want to employ some of " "the algorithms implemented in this module in other circumstances." msgstr "" -#: library/cgi.rst:282 +#: library/cgi.rst:287 msgid "" "Parse a query in the environment or from a file (the file defaults to ``sys." "stdin``). The *keep_blank_values*, *strict_parsing* and *separator* " "parameters are passed to :func:`urllib.parse.parse_qs` unchanged." msgstr "" -#: library/cgi.rst:289 +#: library/cgi.rst:294 msgid "" "Parse input of type :mimetype:`multipart/form-data` (for file uploads). " "Arguments are *fp* for the input file, *pdict* for a dictionary containing " @@ -336,63 +342,63 @@ msgid "" "the request encoding." msgstr "" -#: library/cgi.rst:294 +#: library/cgi.rst:299 msgid "" "Returns a dictionary just like :func:`urllib.parse.parse_qs`: keys are the " "field names, each value is a list of values for that field. For non-file " "fields, the value is a list of strings." msgstr "" -#: library/cgi.rst:298 +#: library/cgi.rst:303 msgid "" "This is easy to use but not much good if you are expecting megabytes to be " "uploaded --- in that case, use the :class:`FieldStorage` class instead which " "is much more flexible." msgstr "" -#: library/cgi.rst:302 +#: library/cgi.rst:307 msgid "" "Added the *encoding* and *errors* parameters. For non-file fields, the " "value is now a list of strings, not bytes." msgstr "" -#: library/cgi.rst:306 +#: library/cgi.rst:311 msgid "Added the *separator* parameter." msgstr "" -#: library/cgi.rst:312 +#: library/cgi.rst:317 msgid "" "Parse a MIME header (such as :mailheader:`Content-Type`) into a main value " "and a dictionary of parameters." msgstr "" -#: library/cgi.rst:318 +#: library/cgi.rst:323 msgid "" "Robust test CGI script, usable as main program. Writes minimal HTTP headers " "and formats all information provided to the script in HTML format." msgstr "" -#: library/cgi.rst:324 +#: library/cgi.rst:329 msgid "Format the shell environment in HTML." msgstr "" -#: library/cgi.rst:329 +#: library/cgi.rst:334 msgid "Format a form in HTML." msgstr "" -#: library/cgi.rst:334 +#: library/cgi.rst:339 msgid "Format the current directory in HTML." msgstr "" -#: library/cgi.rst:339 +#: library/cgi.rst:344 msgid "Print a list of useful (used by CGI) environment variables in HTML." msgstr "" -#: library/cgi.rst:345 +#: library/cgi.rst:350 msgid "Caring about security" msgstr "" -#: library/cgi.rst:349 +#: library/cgi.rst:354 msgid "" "There's one important rule: if you invoke an external program (via :func:`os." "system`, :func:`os.popen` or other functions with similar functionality), " @@ -403,25 +409,25 @@ msgid "" "since the request doesn't have to come from your form!" msgstr "" -#: library/cgi.rst:357 +#: library/cgi.rst:362 msgid "" "To be on the safe side, if you must pass a string gotten from a form to a " "shell command, you should make sure the string contains only alphanumeric " "characters, dashes, underscores, and periods." msgstr "" -#: library/cgi.rst:363 +#: library/cgi.rst:368 msgid "Installing your CGI script on a Unix system" msgstr "" -#: library/cgi.rst:365 +#: library/cgi.rst:370 msgid "" "Read the documentation for your HTTP server and check with your local system " "administrator to find the directory where CGI scripts should be installed; " "usually this is in a directory :file:`cgi-bin` in the server tree." msgstr "" -#: library/cgi.rst:369 +#: library/cgi.rst:374 msgid "" "Make sure that your script is readable and executable by \"others\"; the " "Unix file mode should be ``0o755`` octal (use ``chmod 0755 filename``). " @@ -429,12 +435,12 @@ msgid "" "column 1 followed by the pathname of the Python interpreter, for instance::" msgstr "" -#: library/cgi.rst:376 +#: library/cgi.rst:381 msgid "" "Make sure the Python interpreter exists and is executable by \"others\"." msgstr "" -#: library/cgi.rst:378 +#: library/cgi.rst:383 msgid "" "Make sure that any files your script needs to read or write are readable or " "writable, respectively, by \"others\" --- their mode should be ``0o644`` for " @@ -449,28 +455,28 @@ msgid "" "anything interesting." msgstr "" -#: library/cgi.rst:389 +#: library/cgi.rst:394 msgid "" "If you need to load modules from a directory which is not on Python's " "default module search path, you can change the path in your script, before " "importing other modules. For example::" msgstr "" -#: library/cgi.rst:397 +#: library/cgi.rst:402 msgid "(This way, the directory inserted last will be searched first!)" msgstr "" -#: library/cgi.rst:399 +#: library/cgi.rst:404 msgid "" "Instructions for non-Unix systems will vary; check your HTTP server's " "documentation (it will usually have a section on CGI scripts)." msgstr "" -#: library/cgi.rst:404 +#: library/cgi.rst:409 msgid "Testing your CGI script" msgstr "" -#: library/cgi.rst:406 +#: library/cgi.rst:411 msgid "" "Unfortunately, a CGI script will generally not run when you try it from the " "command line, and a script that works perfectly from the command line may " @@ -480,17 +486,17 @@ msgid "" "will most likely send a cryptic error to the client." msgstr "" -#: library/cgi.rst:413 +#: library/cgi.rst:418 msgid "" "Assuming your script has no syntax errors, yet it does not work, you have no " "choice but to read the next section." msgstr "" -#: library/cgi.rst:418 +#: library/cgi.rst:423 msgid "Debugging CGI scripts" msgstr "" -#: library/cgi.rst:422 +#: library/cgi.rst:427 msgid "" "First of all, check for trivial installation errors --- reading the section " "above on installing your CGI script carefully can save you a lot of time. " @@ -503,7 +509,7 @@ msgid "" "your browser of the form:" msgstr "" -#: library/cgi.rst:435 +#: library/cgi.rst:440 msgid "" "If this gives an error of type 404, the server cannot find the script -- " "perhaps you need to install it in a different directory. If it gives " @@ -515,19 +521,19 @@ msgid "" "same procedure for your own script, you should now be able to debug it." msgstr "" -#: library/cgi.rst:444 +#: library/cgi.rst:449 msgid "" "The next step could be to call the :mod:`cgi` module's :func:`test` function " "from your script: replace its main code with the single statement ::" msgstr "" -#: library/cgi.rst:449 +#: library/cgi.rst:454 msgid "" "This should produce the same results as those gotten from installing the :" "file:`cgi.py` file itself." msgstr "" -#: library/cgi.rst:452 +#: library/cgi.rst:457 msgid "" "When an ordinary Python script raises an unhandled exception (for whatever " "reason: of a typo in a module name, a file that can't be opened, etc.), the " @@ -537,28 +543,28 @@ msgid "" "or be discarded altogether." msgstr "" -#: library/cgi.rst:459 +#: library/cgi.rst:464 msgid "" "Fortunately, once you have managed to get your script to execute *some* " "code, you can easily send tracebacks to the web browser using the :mod:" "`cgitb` module. If you haven't done so already, just add the lines::" msgstr "" -#: library/cgi.rst:466 +#: library/cgi.rst:471 msgid "" "to the top of your script. Then try running it again; when a problem " "occurs, you should see a detailed report that will likely make apparent the " "cause of the crash." msgstr "" -#: library/cgi.rst:470 +#: library/cgi.rst:475 msgid "" "If you suspect that there may be a problem in importing the :mod:`cgitb` " "module, you can use an even more robust approach (which only uses built-in " "modules)::" msgstr "" -#: library/cgi.rst:479 +#: library/cgi.rst:484 msgid "" "This relies on the Python interpreter to print the traceback. The content " "type of the output is set to plain text, which disables all HTML " @@ -568,47 +574,47 @@ msgid "" "interpretation is going on, the traceback will be readable." msgstr "" -#: library/cgi.rst:488 +#: library/cgi.rst:493 msgid "Common problems and solutions" msgstr "" -#: library/cgi.rst:490 +#: library/cgi.rst:495 msgid "" "Most HTTP servers buffer the output from CGI scripts until the script is " "completed. This means that it is not possible to display a progress report " "on the client's display while the script is running." msgstr "" -#: library/cgi.rst:494 +#: library/cgi.rst:499 msgid "Check the installation instructions above." msgstr "" -#: library/cgi.rst:496 +#: library/cgi.rst:501 msgid "" "Check the HTTP server's log files. (``tail -f logfile`` in a separate " "window may be useful!)" msgstr "" -#: library/cgi.rst:499 +#: library/cgi.rst:504 msgid "" "Always check a script for syntax errors first, by doing something like " "``python script.py``." msgstr "" -#: library/cgi.rst:502 +#: library/cgi.rst:507 msgid "" "If your script does not have any syntax errors, try adding ``import cgitb; " "cgitb.enable()`` to the top of the script." msgstr "" -#: library/cgi.rst:505 +#: library/cgi.rst:510 msgid "" "When invoking external programs, make sure they can be found. Usually, this " "means using absolute path names --- :envvar:`PATH` is usually not set to a " "very useful value in a CGI script." msgstr "" -#: library/cgi.rst:509 +#: library/cgi.rst:514 msgid "" "When reading or writing external files, make sure they can be read or " "written by the userid under which your CGI script will be running: this is " @@ -616,17 +622,17 @@ msgid "" "explicitly specified userid for a web server's ``suexec`` feature." msgstr "" -#: library/cgi.rst:514 +#: library/cgi.rst:519 msgid "" "Don't try to give a CGI script a set-uid mode. This doesn't work on most " "systems, and is a security liability as well." msgstr "" -#: library/cgi.rst:518 +#: library/cgi.rst:523 msgid "Footnotes" msgstr "Notes" -#: library/cgi.rst:519 +#: library/cgi.rst:524 msgid "" "Note that some recent versions of the HTML specification do state what order " "the field values should be supplied in, but knowing whether a request was " diff --git a/library/cgitb.po b/library/cgitb.po index 92ba035e2a..8374321315 100644 --- a/library/cgitb.po +++ b/library/cgitb.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" +"POT-Creation-Date: 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" @@ -19,11 +19,17 @@ msgstr "" msgid ":mod:`cgitb` --- Traceback manager for CGI scripts" msgstr ":mod:`cgitb` — Gestionnaire d'exceptions pour les scripts CGI" -#: library/cgitb.rst:10 +#: library/cgitb.rst:11 msgid "**Source code:** :source:`Lib/cgitb.py`" msgstr "**Code source :** :source:`Lib/cgitb.py`" -#: library/cgitb.rst:20 +#: library/cgitb.rst:19 +msgid "" +"The :mod:`cgitb` module is deprecated (see :pep:`PEP 594 <594#cgitb>` for " +"details)." +msgstr "" + +#: library/cgitb.rst:25 msgid "" "The :mod:`cgitb` module provides a special exception handler for Python " "scripts. (Its name is a bit misleading. It was originally designed to " @@ -47,13 +53,13 @@ msgstr "" "problème. Il est aussi possible de sauvegarder cette information dans un " "fichier plutôt que de l'envoyer dans le navigateur." -#: library/cgitb.rst:30 +#: library/cgitb.rst:35 msgid "To enable this feature, simply add this to the top of your CGI script::" msgstr "" "Pour activer cette fonctionnalité, ajoutez simplement ceci au début de votre " "script CGI ::" -#: library/cgitb.rst:35 +#: library/cgitb.rst:40 msgid "" "The options to the :func:`enable` function control whether the report is " "displayed in the browser and whether the report is logged to a file for " @@ -63,7 +69,7 @@ msgstr "" "choisir si le rapport est envoyé au navigateur ou si le rapport est écrit " "dans un fichier pour analyse ultérieure." -#: library/cgitb.rst:44 +#: library/cgitb.rst:49 msgid "" "This function causes the :mod:`cgitb` module to take over the interpreter's " "default handling for exceptions by setting the value of :attr:`sys." @@ -73,7 +79,7 @@ msgstr "" "l'interpréteur par celui du module :mod:`cgitb`, en configurant :attr:`sys." "excepthook`." -#: library/cgitb.rst:47 +#: library/cgitb.rst:52 msgid "" "The optional argument *display* defaults to ``1`` and can be set to ``0`` to " "suppress sending the traceback to the browser. If the argument *logdir* is " @@ -82,8 +88,8 @@ msgid "" "argument *context* is the number of lines of context to display around the " "current line of source code in the traceback; this defaults to ``5``. If the " "optional argument *format* is ``\"html\"``, the output is formatted as " -"HTML. Any other value forces plain text output. The default value is ``" -"\"html\"``." +"HTML. Any other value forces plain text output. The default value is " +"``\"html\"``." msgstr "" "Le paramètre optionnel *display* vaut ``1`` par défaut, et peut être mis à " "``0`` pour désactiver l'envoi des piles d'appels au navigateur. Si " @@ -95,7 +101,7 @@ msgstr "" "HTML. Le rapport sera écrit en texte brut pour toute autre valeur. La " "valeur par défaut est ``\"html\"``." -#: library/cgitb.rst:59 +#: library/cgitb.rst:64 msgid "" "This function handles the exception described by *info* (a 3-tuple " "containing the result of :func:`sys.exc_info`), formatting its traceback as " @@ -110,7 +116,7 @@ msgstr "" "de la ligne courante du code source dans la pile d’appels ; la valeur par " "défaut est ``5``." -#: library/cgitb.rst:68 +#: library/cgitb.rst:73 msgid "" "This function handles the exception described by *info* (a 3-tuple " "containing the result of :func:`sys.exc_info`), formatting its traceback as " @@ -125,7 +131,7 @@ msgstr "" "de la ligne courante du code source dans la pile d’appels ; la valeur par " "défaut est ``5``." -#: library/cgitb.rst:77 +#: library/cgitb.rst:82 msgid "" "This function handles an exception using the default settings (that is, show " "a report in the browser, but don't log to a file). This can be used when " diff --git a/library/chunk.po b/library/chunk.po index 41ca71bb5b..88ccdaa37d 100644 --- a/library/chunk.po +++ b/library/chunk.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-01 16:00+0200\n" +"POT-Creation-Date: 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" @@ -18,12 +18,18 @@ msgstr "" msgid ":mod:`chunk` --- Read IFF chunked data" msgstr "" -#: library/chunk.rst:10 +#: library/chunk.rst:11 #, fuzzy msgid "**Source code:** :source:`Lib/chunk.py`" msgstr "**Code source :** :source:`Lib/uu.py`" -#: library/chunk.rst:21 +#: library/chunk.rst:20 +msgid "" +"The :mod:`chunk` module is deprecated (see :pep:`PEP 594 <594#chunk>` for " +"details)." +msgstr "" + +#: library/chunk.rst:26 msgid "" "This module provides an interface for reading files that use EA IFF 85 " "chunks. [#]_ This format is used in at least the Audio Interchange File " @@ -31,73 +37,73 @@ msgid "" "file format is closely related and can also be read using this module." msgstr "" -#: library/chunk.rst:26 +#: library/chunk.rst:31 msgid "A chunk has the following structure:" msgstr "" -#: library/chunk.rst:29 +#: library/chunk.rst:34 msgid "Offset" msgstr "" -#: library/chunk.rst:29 +#: library/chunk.rst:34 msgid "Length" msgstr "" -#: library/chunk.rst:29 +#: library/chunk.rst:34 msgid "Contents" msgstr "Sommaire" -#: library/chunk.rst:31 +#: library/chunk.rst:36 msgid "0" msgstr "0" -#: library/chunk.rst:33 +#: library/chunk.rst:38 msgid "4" msgstr "4" -#: library/chunk.rst:31 +#: library/chunk.rst:36 msgid "Chunk ID" msgstr "" -#: library/chunk.rst:33 +#: library/chunk.rst:38 msgid "Size of chunk in big-endian byte order, not including the header" msgstr "" -#: library/chunk.rst:37 +#: library/chunk.rst:42 msgid "8" msgstr "8" -#: library/chunk.rst:37 +#: library/chunk.rst:42 msgid "*n*" msgstr "*n*" -#: library/chunk.rst:37 +#: library/chunk.rst:42 msgid "Data bytes, where *n* is the size given in the preceding field" msgstr "" -#: library/chunk.rst:41 +#: library/chunk.rst:46 msgid "8 + *n*" msgstr "8 + *n*" -#: library/chunk.rst:41 +#: library/chunk.rst:46 msgid "0 or 1" msgstr "0 or 1" -#: library/chunk.rst:41 +#: library/chunk.rst:46 msgid "Pad byte needed if *n* is odd and chunk alignment is used" msgstr "" -#: library/chunk.rst:45 +#: library/chunk.rst:50 msgid "The ID is a 4-byte string which identifies the type of chunk." msgstr "" -#: library/chunk.rst:47 +#: library/chunk.rst:52 msgid "" "The size field (a 32-bit value, encoded using big-endian byte order) gives " "the size of the chunk data, not including the 8-byte header." msgstr "" -#: library/chunk.rst:50 +#: library/chunk.rst:55 msgid "" "Usually an IFF-type file consists of one or more chunks. The proposed usage " "of the :class:`Chunk` class defined here is to instantiate an instance at " @@ -106,7 +112,7 @@ msgid "" "creating a new instance will fail with an :exc:`EOFError` exception." msgstr "" -#: library/chunk.rst:59 +#: library/chunk.rst:64 msgid "" "Class which represents a chunk. The *file* argument is expected to be a " "file-like object. An instance of this class is specifically allowed. The " @@ -123,37 +129,37 @@ msgid "" "The default value is false." msgstr "" -#: library/chunk.rst:73 +#: library/chunk.rst:78 msgid "A :class:`Chunk` object supports the following methods:" msgstr "" -#: library/chunk.rst:78 +#: library/chunk.rst:83 msgid "" "Returns the name (ID) of the chunk. This is the first 4 bytes of the chunk." msgstr "" -#: library/chunk.rst:84 +#: library/chunk.rst:89 msgid "Returns the size of the chunk." msgstr "" -#: library/chunk.rst:89 +#: library/chunk.rst:94 msgid "" "Close and skip to the end of the chunk. This does not close the underlying " "file." msgstr "" -#: library/chunk.rst:92 +#: library/chunk.rst:97 msgid "" "The remaining methods will raise :exc:`OSError` if called after the :meth:" "`close` method has been called. Before Python 3.3, they used to raise :exc:" "`IOError`, now an alias of :exc:`OSError`." msgstr "" -#: library/chunk.rst:99 +#: library/chunk.rst:104 msgid "Returns ``False``." msgstr "" -#: library/chunk.rst:104 +#: library/chunk.rst:109 msgid "" "Set the chunk's current position. The *whence* argument is optional and " "defaults to ``0`` (absolute file positioning); other values are ``1`` (seek " @@ -162,11 +168,11 @@ msgid "" "only forward seeks are allowed." msgstr "" -#: library/chunk.rst:113 +#: library/chunk.rst:118 msgid "Return the current position into the chunk." msgstr "" -#: library/chunk.rst:118 +#: library/chunk.rst:123 msgid "" "Read at most *size* bytes from the chunk (less if the read hits the end of " "the chunk before obtaining *size* bytes). If the *size* argument is " @@ -175,7 +181,7 @@ msgid "" "immediately." msgstr "" -#: library/chunk.rst:127 +#: library/chunk.rst:132 msgid "" "Skip to the end of the chunk. All further calls to :meth:`read` for the " "chunk will return ``b''``. If you are not interested in the contents of the " @@ -183,11 +189,11 @@ msgid "" "the next chunk." msgstr "" -#: library/chunk.rst:134 +#: library/chunk.rst:139 msgid "Footnotes" msgstr "Notes" -#: library/chunk.rst:135 +#: library/chunk.rst:140 msgid "" "\"EA IFF 85\" Standard for Interchange Format Files, Jerry Morrison, " "Electronic Arts, January 1985." diff --git a/library/cmath.po b/library/cmath.po index 12718ea3fa..a8eb966801 100644 --- a/library/cmath.po +++ b/library/cmath.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" +"POT-Creation-Date: 2023-03-22 22:57+0100\n" "PO-Revision-Date: 2019-05-28 20:19+0200\n" "Last-Translator: Jules Lasne \n" "Language-Team: FRENCH \n" @@ -39,23 +39,34 @@ msgstr "" #: library/cmath.rst:18 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." +"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 "" -"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." #: 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:28 +#: 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." @@ -65,7 +76,7 @@ msgstr "" "*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:35 +#: 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 " @@ -82,7 +93,7 @@ msgstr "" "trigonométrique), mesuré en radians, à partir de l'axe X positif, et vers le " "segment de droite joignant *z* à l'origine." -#: library/cmath.rst:42 +#: library/cmath.rst:58 msgid "" "The following functions can be used to convert from the native rectangular " "coordinates to polar coordinates and back." @@ -91,15 +102,14 @@ msgstr "" "coordonnées rectangulaires natives vers les coordonnées polaires, et vice-" "versa." -#: library/cmath.rst:47 +#: library/cmath.rst:63 +#, fuzzy msgid "" -"Return the phase of *x* (also known as the *argument* of *x*), as a float. " +"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, continuous from above. On systems with " -"support for signed zeros (which includes most systems in current use), this " -"means that the sign of the result is the same as the sign of ``x.imag``, " -"even when ``x.imag`` is zero::" +"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 " @@ -109,7 +119,7 @@ msgstr "" "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:64 +#: 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 " @@ -119,7 +129,7 @@ msgstr "" "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:71 +#: 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*. " @@ -129,7 +139,7 @@ msgstr "" "``(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:79 +#: 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)``." @@ -137,11 +147,11 @@ 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:84 +#: library/cmath.rst:97 msgid "Power and logarithmic functions" msgstr "Fonctions logarithme et exponentielle" -#: library/cmath.rst:88 +#: library/cmath.rst:101 msgid "" "Return *e* raised to the power *x*, where *e* is the base of natural " "logarithms." @@ -149,18 +159,19 @@ msgstr "" "Renvoie *e* élevé à la puissance *x*, où *e* est la base des logarithmes " "naturels." -#: library/cmath.rst:94 +#: 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 -∞, continuous from above." +"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:101 +#: library/cmath.rst:114 msgid "" "Return the base-10 logarithm of *x*. This has the same branch cut as :func:" "`log`." @@ -168,106 +179,108 @@ msgstr "" "Renvoie le logarithme en base 10 de *x*. Elle a la même coupure que :func:" "`log`." -#: library/cmath.rst:107 +#: 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:111 +#: library/cmath.rst:124 msgid "Trigonometric functions" msgstr "Fonctions trigonométriques" -#: library/cmath.rst:115 +#: 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 ∞, continuous from below. The other extends " -"left from -1 along the real axis to -∞, continuous from above." +"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:122 +#: 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:127 +#: 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``, continuous from the right. The " -"other extends from ``-1j`` along the imaginary axis to ``-∞j``, continuous " -"from the left." +"``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:135 +#: library/cmath.rst:147 msgid "Return the cosine of *x*." msgstr "Renvoie le cosinus de *x*." -#: library/cmath.rst:140 +#: library/cmath.rst:152 msgid "Return the sine of *x*." msgstr "Renvoie le sinus de *x*." -#: library/cmath.rst:145 +#: library/cmath.rst:157 msgid "Return the tangent of *x*." msgstr "Renvoie la tangente de *x*." -#: library/cmath.rst:149 +#: library/cmath.rst:161 msgid "Hyperbolic functions" msgstr "Fonctions hyperboliques" -#: library/cmath.rst:153 +#: 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 -∞, continuous from above." +"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:159 +#: 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``, continuous from the " -"right. The other extends from ``-1j`` along the imaginary axis to ``-∞j``, " -"continuous from the left." +"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:167 +#: 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 ``∞``, continuous from below. The " -"other extends from ``-1`` along the real axis to ``-∞``, continuous from " -"above." +"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:175 +#: library/cmath.rst:185 msgid "Return the hyperbolic cosine of *x*." msgstr "Renvoie le cosinus hyperbolique de *x*." -#: library/cmath.rst:180 +#: library/cmath.rst:190 msgid "Return the hyperbolic sine of *x*." msgstr "Renvoie le sinus hyperbolique de *x*." -#: library/cmath.rst:185 +#: library/cmath.rst:195 msgid "Return the hyperbolic tangent of *x*." msgstr "Renvoie la tangente hyperbolique de *x*." -#: library/cmath.rst:189 +#: library/cmath.rst:199 msgid "Classification functions" msgstr "Fonctions de classifications" -#: library/cmath.rst:193 +#: library/cmath.rst:203 msgid "" "Return ``True`` if both the real and imaginary parts of *x* are finite, and " "``False`` otherwise." @@ -275,7 +288,7 @@ msgstr "" "Renvoie ``True`` si la partie réelle *et* la partie imaginaire de *x* sont " "finies, et ``False`` sinon." -#: library/cmath.rst:201 +#: library/cmath.rst:211 msgid "" "Return ``True`` if either the real or the imaginary part of *x* is an " "infinity, and ``False`` otherwise." @@ -283,7 +296,7 @@ msgstr "" "Renvoie ``True`` si soit la partie réelle *ou* la partie imaginaire de *x* " "est infinie, et ``False`` sinon." -#: library/cmath.rst:207 +#: library/cmath.rst:217 msgid "" "Return ``True`` if either the real or the imaginary part of *x* is a NaN, " "and ``False`` otherwise." @@ -291,7 +304,7 @@ msgstr "" "Renvoie ``True`` si soit la partie réelle *ou* la partie imaginaire de *x* " "est NaN, et ``False`` sinon." -#: library/cmath.rst:213 +#: library/cmath.rst:223 msgid "" "Return ``True`` if the values *a* and *b* are close to each other and " "``False`` otherwise." @@ -299,7 +312,7 @@ msgstr "" "Renvoie ``True`` si les valeurs *a* et *b* sont proches l'une de l'autre, et " "``False`` sinon." -#: library/cmath.rst:216 +#: library/cmath.rst:226 msgid "" "Whether or not two values are considered close is determined according to " "given absolute and relative tolerances." @@ -307,7 +320,7 @@ 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:219 +#: 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*. " @@ -322,7 +335,7 @@ msgstr "" "mêmes à partir de la 9\\ :sup:`e` décimale. *rel_tol* doit être supérieur à " "zéro." -#: library/cmath.rst:225 +#: library/cmath.rst:235 msgid "" "*abs_tol* is the minimum absolute tolerance -- useful for comparisons near " "zero. *abs_tol* must be at least zero." @@ -330,7 +343,7 @@ 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:228 +#: 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)``." @@ -338,7 +351,7 @@ 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:231 +#: 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 " @@ -351,32 +364,32 @@ msgstr "" "``NaN`` inclus. ``inf`` et ``-inf`` ne sont considérés proches que d'eux-" "mêmes." -#: library/cmath.rst:240 +#: 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:244 +#: library/cmath.rst:254 msgid "Constants" msgstr "Constantes" -#: library/cmath.rst:248 +#: library/cmath.rst:258 msgid "The mathematical constant *π*, as a float." msgstr "La constante mathématique *π*, en tant que flottant." -#: library/cmath.rst:253 +#: 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:258 +#: library/cmath.rst:268 msgid "The mathematical constant *τ*, as a float." msgstr "La constante mathématique *τ*, sous forme de flottant." -#: library/cmath.rst:265 +#: 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:272 +#: library/cmath.rst:282 msgid "" "Complex number with zero real part and positive infinity imaginary part. " "Equivalent to ``complex(0.0, float('inf'))``." @@ -384,7 +397,7 @@ 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:280 +#: library/cmath.rst:290 msgid "" "A floating-point \"not a number\" (NaN) value. Equivalent to " "``float('nan')``." @@ -392,7 +405,7 @@ msgstr "" "Un nombre à virgule flottante *NaN* (*Not a number*). Équivalent à " "``float('nan')``." -#: library/cmath.rst:288 +#: library/cmath.rst:298 msgid "" "Complex number with zero real part and NaN imaginary part. Equivalent to " "``complex(0.0, float('nan'))``." @@ -400,7 +413,7 @@ 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:296 +#: 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 " @@ -420,7 +433,7 @@ msgstr "" "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:304 +#: 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. " @@ -438,7 +451,7 @@ msgstr "" "plus d'informations. Pour des informations sur les choix des coupures à des " "fins numériques, voici une bonne référence :" -#: library/cmath.rst:314 +#: 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 " @@ -447,3 +460,16 @@ 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 index 1514dc8916..f29afec863 100644 --- a/library/cmd.po +++ b/library/cmd.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" +"POT-Creation-Date: 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" @@ -183,8 +183,8 @@ msgid "" "method, called with an argument ``'bar'``, invokes the corresponding method :" "meth:`help_bar`, and if that is not present, prints the docstring of :meth:" "`do_bar`, if available. With no argument, :meth:`do_help` lists all " -"available help topics (that is, all commands with corresponding :meth:`help_" -"\\*` methods or commands that have docstrings), and also lists any " +"available help topics (that is, all commands with corresponding :meth:" +"`help_\\*` methods or commands that have docstrings), and also lists any " "undocumented commands." msgstr "" "Toutes les classes filles de :class:`Cmd` héritent d'une méthode :meth:" @@ -357,8 +357,8 @@ msgid "" "meth:`help_\\*` methods)." msgstr "" "L'en-tête à afficher si la sortie de l'aide possède une section pour les " -"commandes non documentées (c'est-à-dire qu'il existe des méthodes :meth:`dop_" -"\\*` sans méthodes :meth:`help_\\*` correspondantes)." +"commandes non documentées (c'est-à-dire qu'il existe des méthodes :meth:" +"`dop_\\*` sans méthodes :meth:`help_\\*` correspondantes)." #: library/cmd.rst:208 msgid "" diff --git a/library/codecs.po b/library/codecs.po index 0693de6593..5714923a34 100644 --- a/library/codecs.po +++ b/library/codecs.po @@ -5,8 +5,8 @@ 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: 2020-10-15 09:15+0200\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" @@ -24,15 +24,17 @@ msgid "**Source code:** :source:`Lib/codecs.py`" msgstr "**Code source :** :source:`Lib/codecs.py`" #: library/codecs.rst:23 +#, fuzzy msgid "" "This module defines base classes for standard Python codecs (encoders and " "decoders) and provides access to the internal Python codec registry, which " "manages the codec and error handling lookup process. Most standard codecs " -"are :term:`text encodings `, which encode text to bytes, but " -"there are also codecs provided that encode text to text, and bytes to bytes. " -"Custom codecs may encode and decode between arbitrary types, but some module " -"features are restricted to use specifically with :term:`text encodings `, or with codecs that encode to :class:`bytes`." +"are :term:`text encodings `, which encode text to bytes (and " +"decode bytes to text), but there are also codecs provided that encode text " +"to text, and bytes to bytes. Custom codecs may encode and decode between " +"arbitrary types, but some module features are restricted to be used " +"specifically with :term:`text encodings ` or with codecs that " +"encode to :class:`bytes`." msgstr "" "Ce module définit les classes de base pour les codecs (encodeurs et " "décodeurs) standards Python et fournit l'interface avec le registre des " @@ -302,11 +304,12 @@ msgstr "" # Pas de majuscule en début car suit un deux-points. #: library/codecs.rst:192 +#, fuzzy msgid "" -"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." +"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 à " @@ -314,7 +317,7 @@ msgstr "" "acceptable pour la fonction native :func:`open` ; le ``'b'`` est " "automatiquement ajouté." -#: library/codecs.rst:197 +#: 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 " @@ -325,7 +328,7 @@ msgstr "" "données pris en charge par les méthodes relatives aux fichiers dépendent du " "codec utilisé." -#: library/codecs.rst:201 +#: 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 " @@ -335,16 +338,16 @@ msgstr "" "par défaut est ``'strict'``, ce qui lève une :exc:`ValueError` en cas " "d'erreur lors du codage." -#: library/codecs.rst:204 +#: 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." +"`open`. Il vaut ``-1`` par défaut, ce qui signifie que la taille par défaut " +"du tampon est utilisée." -#: library/codecs.rst:210 +#: 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 " @@ -354,7 +357,7 @@ msgstr "" "qui fournit un transcodage transparent. Le fichier original est fermé quand " "la version encapsulée est fermée." -#: library/codecs.rst:214 +#: 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 " @@ -367,13 +370,13 @@ msgstr "" "original sont décodés conformément à *file_encoding* et le résultat est " "encodé en utilisant *data_encoding*." -#: library/codecs.rst:220 +#: 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:222 +#: 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 " @@ -383,7 +386,7 @@ msgstr "" "par défaut est ``'strict'``, ce qui lève une :exc:`ValueError` en cas " "d'erreur lors du codage." -#: library/codecs.rst:229 +#: 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 " @@ -395,7 +398,7 @@ msgstr "" "`. L'argument *errors* (ainsi que tout autre argument passé par " "son nom) est transmis à l'encodeur incrémental." -#: library/codecs.rst:234 +#: 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 " @@ -405,7 +408,7 @@ msgstr "" "class:`str`) en entrée. Par conséquent, il ne prend pas en charge les " "encodeurs *bytes* vers *bytes* tels que ``base64_codec``." -#: library/codecs.rst:241 +#: 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 " @@ -417,7 +420,7 @@ msgstr "" "*errors* (ainsi que tout autre argument passé par son nom) est transmis au " "décodeur incrémental." -#: library/codecs.rst:246 +#: 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 " @@ -429,7 +432,7 @@ msgstr "" "vers texte tels que ``rot_13``, bien que ``rot_13`` puisse être utilisé de " "manière équivalente avec :func:`iterencode`." -#: library/codecs.rst:252 +#: library/codecs.rst:253 msgid "" "The module also provides the following constants which are useful for " "reading and writing to platform dependent files:" @@ -437,7 +440,7 @@ msgstr "" "Le module fournit également les constantes suivantes qui sont utiles pour " "lire et écrire les fichiers dépendants de la plateforme :" -#: library/codecs.rst:267 +#: 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 " @@ -458,11 +461,11 @@ msgstr "" "et :const:`BOM_BE` pour :const:`BOM_UTF16_BE`. Les autres sont les marques " "BOM dans les encodages UTF-8 et UTF-32." -#: library/codecs.rst:281 +#: library/codecs.rst:282 msgid "Codec Base Classes" msgstr "Classes de base de codecs" -#: library/codecs.rst:283 +#: 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 " @@ -473,7 +476,7 @@ msgstr "" "peuvent également être utilisées comme base pour des implémentations de " "codecs personnalisés." -#: library/codecs.rst:287 +#: 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 " @@ -488,16 +491,15 @@ msgstr "" "Les auteurs de codecs doivent également définir comment le codec gère les " "erreurs d'encodage et de décodage." -#: library/codecs.rst:298 +#: library/codecs.rst:299 msgid "Error Handlers" msgstr "Gestionnaires d'erreurs" -#: library/codecs.rst:300 +#: 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. The " -"following string values are defined and implemented by all standard Python " -"codecs:" +"error handling schemes by accepting the *errors* string argument:" msgstr "" "Pour simplifier et standardiser la gestion des erreurs, les codecs peuvent " "implémenter différents schémas de gestion des erreurs en acceptant " @@ -505,31 +507,41 @@ msgstr "" "les gestionnaires correspondants implémentés par tous les codecs Python " "standards :" -#: library/codecs.rst:331 library/codecs.rst:364 +#: 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:331 library/codecs.rst:1276 library/codecs.rst:1398 +#: library/codecs.rst:369 library/codecs.rst:1321 library/codecs.rst:1443 msgid "Meaning" msgstr "Signification" -#: library/codecs.rst:310 +#: library/codecs.rst:329 msgid "``'strict'``" msgstr "``'strict'``" -#: library/codecs.rst:310 +#: library/codecs.rst:329 +#, fuzzy msgid "" -"Raise :exc:`UnicodeError` (or a subclass); this is the default. Implemented " +"Raise :exc:`UnicodeError` (or a subclass), this is the default. Implemented " "in :func:`strict_errors`." msgstr "" "Lève :exc:`UnicodeError` (ou une sous-classe) ; c'est la valeur par défaut. " "Implémenté dans :func:`strict_errors`." -#: library/codecs.rst:314 +#: library/codecs.rst:333 msgid "``'ignore'``" msgstr "``'ignore'``" -#: library/codecs.rst:314 +#: library/codecs.rst:333 msgid "" "Ignore the malformed data and continue without further notice. Implemented " "in :func:`ignore_errors`." @@ -537,137 +549,147 @@ msgstr "" "Ignore les données incorrectement formatées et continue sans rien signaler. " "Implémenté dans :func:`ignore_errors`." -#: library/codecs.rst:319 -msgid "" -"The following error handlers are only applicable to :term:`text encodings " -"`:" -msgstr "" -"Les gestionnaires d'erreurs suivants ne s'appliquent que pour les :term:" -"`encodeurs de texte ` :" - -#: library/codecs.rst:333 +#: library/codecs.rst:337 msgid "``'replace'``" msgstr "``'replace'``" -#: library/codecs.rst:333 +#: library/codecs.rst:337 +#, fuzzy msgid "" -"Replace with a suitable replacement marker; Python will use the official ``U" -"+FFFD`` REPLACEMENT CHARACTER for the built-in codecs on decoding, and '?' " -"on encoding. Implemented in :func:`replace_errors`." +"Replace with a replacement marker. On encoding, use ``?`` (ASCII character). " +"On decoding, use ``�`` (U+FFFD, the official REPLACEMENT CHARACTER). " +"Implemented in :func:`replace_errors`." msgstr "" "Remplace avec une marque de substitution adaptée ; Python utilise le " "caractère de substitution officiel ``U+FFFD`` pour les codecs natifs lors du " "décodage et `'?'` lors de l'encodage. Implémenté dans :func:`replace_errors`." -#: library/codecs.rst:340 -msgid "``'xmlcharrefreplace'``" -msgstr "``'xmlcharrefreplace'``" - -#: library/codecs.rst:340 -msgid "" -"Replace with the appropriate XML character reference (only for encoding). " -"Implemented in :func:`xmlcharrefreplace_errors`." -msgstr "" -"Remplace avec la référence de caractère XML adaptée (uniquement pour " -"l'encodage). Implémenté dans :func:`xmlcharrefreplace_errors`." - -#: library/codecs.rst:344 +#: library/codecs.rst:343 msgid "``'backslashreplace'``" msgstr "``'backslashreplace'``" -#: library/codecs.rst:344 +#: library/codecs.rst:343 msgid "" -"Replace with backslashed escape sequences. Implemented in :func:" -"`backslashreplace_errors`." +"Replace with backslashed escape sequences. On encoding, use hexadecimal form " +"of Unicode code point with formats ``\\xhh`` ``\\uxxxx`` ``\\Uxxxxxxxx``. On " +"decoding, use hexadecimal form of byte value with format ``\\xhh``. " +"Implemented in :func:`backslashreplace_errors`." msgstr "" -"Remplace avec une séquence échappée par des antislashs. Implémenté dans :" -"func:`backslashreplace_errors`." -#: library/codecs.rst:348 -msgid "``'namereplace'``" -msgstr "``'namereplace'``" - -#: library/codecs.rst:348 -msgid "" -"Replace with ``\\N{...}`` escape sequences (only for encoding). Implemented " -"in :func:`namereplace_errors`." -msgstr "" -"Remplace avec des séquences échappées par ``\\N{...}`` (uniquement pour " -"l'encodage). Implémenté dans :func:`namereplace_errors`." - -#: library/codecs.rst:352 +#: library/codecs.rst:351 msgid "``'surrogateescape'``" msgstr "``'surrogateescape'``" -#: library/codecs.rst:352 +#: 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.)" +"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:361 +#: 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:364 +#: library/codecs.rst:388 msgid "Codecs" msgstr "Codecs" -#: library/codecs.rst:366 +#: library/codecs.rst:390 msgid "``'surrogatepass'``" msgstr "``'surrogatepass'``" -#: library/codecs.rst:366 +#: 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:366 +#: library/codecs.rst:390 +#, fuzzy msgid "" -"Allow encoding and decoding of surrogate codes. These codecs normally treat " -"the presence of surrogates as an error." +"Allow encoding and decoding surrogate code point (``U+D800`` - ``U+DFFF``) " +"as normal code point. Otherwise these codecs treat the presence of surrogate " +"code point in :class:`str` as an error." msgstr "" "Autorise l'encodage et le décodage de codes de substitution. Ces codecs " "traitent normalement la présence d'un code de substitution comme une erreur." # pas de majuscule en début de phrase car suit un deux-points. -#: library/codecs.rst:371 +#: 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:374 +#: library/codecs.rst:400 +#, fuzzy msgid "" -"The ``'surrogatepass'`` error handlers now works with utf-16\\* and " -"utf-32\\* codecs." +"The ``'surrogatepass'`` error handler now works with utf-16\\* and utf-32\\* " +"codecs." msgstr "" "le gestionnaire d'erreurs ``'surrogatepass'`` fonctionne maintenant avec les " "codecs utf-16\\* et utf-32\\*." # pas de majuscule en début de phrase car suit un deux-points. -#: library/codecs.rst:377 +#: 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:380 +#: library/codecs.rst:407 +#, fuzzy msgid "" -"The ``'backslashreplace'`` error handlers now works with decoding and " +"The ``'backslashreplace'`` error handler now works with decoding and " "translating." msgstr "" "le gestionnaire d'erreurs ``'backslashreplace'`` fonctionne maintenant pour " "le décodage et la traduction." -#: library/codecs.rst:384 +#: library/codecs.rst:411 msgid "" "The set of allowed values can be extended by registering a new named error " "handler:" @@ -675,14 +697,14 @@ msgstr "" "L'ensemble des valeurs autorisées peut être étendu en enregistrant un " "nouveau gestionnaire d'erreurs nommé :" -#: library/codecs.rst:389 +#: 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:393 +#: library/codecs.rst:420 msgid "" "For encoding, *error_handler* will be called with a :exc:" "`UnicodeEncodeError` instance, which contains information about the location " @@ -697,85 +719,123 @@ msgid "" "position is out of bound an :exc:`IndexError` will be raised." msgstr "" -#: library/codecs.rst:405 +#: 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:410 +#: library/codecs.rst:437 msgid "" "Previously registered error handlers (including the standard error handlers) " "can be looked up by name:" msgstr "" -#: library/codecs.rst:415 +#: library/codecs.rst:442 msgid "Return the error handler previously registered under the name *name*." msgstr "" -#: library/codecs.rst:417 +#: library/codecs.rst:444 msgid "Raises a :exc:`LookupError` in case the handler cannot be found." msgstr "" -#: library/codecs.rst:419 +#: library/codecs.rst:446 msgid "" "The following standard error handlers are also made available as module " "level functions:" msgstr "" -#: library/codecs.rst:424 +# 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 "" -"Implements the ``'strict'`` error handling: each encoding or decoding error " -"raises a :exc:`UnicodeError`." +"Substitutes ``?`` (ASCII character) for encoding errors or ``�`` (U+FFFD, " +"the official REPLACEMENT CHARACTER) for decoding errors." msgstr "" -#: library/codecs.rst:430 +# 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 "" -"Implements the ``'replace'`` error handling (for :term:`text encodings ` only): substitutes ``'?'`` for encoding errors (to be encoded by " -"the codec), and ``'\\ufffd'`` (the Unicode replacement character) for " -"decoding errors." +"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:438 +#: library/codecs.rst:481 +msgid "Works with decoding and translating." +msgstr "" + +#: library/codecs.rst:487 msgid "" -"Implements the ``'ignore'`` error handling: malformed data is ignored and " -"encoding or decoding is continued without further notice." +"Implements the ``'xmlcharrefreplace'`` error handling (for encoding within :" +"term:`text encoding` only)." msgstr "" -#: library/codecs.rst:444 +#: library/codecs.rst:490 msgid "" -"Implements the ``'xmlcharrefreplace'`` error handling (for encoding with :" -"term:`text encodings ` only): the unencodable character is " -"replaced by an appropriate XML character reference." +"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:451 +#: library/codecs.rst:497 msgid "" -"Implements the ``'backslashreplace'`` error handling (for :term:`text " -"encodings ` only): malformed data is replaced by a " -"backslashed escape sequence." +"Implements the ``'namereplace'`` error handling (for encoding within :term:" +"`text encoding` only)." msgstr "" -#: library/codecs.rst:457 +#: library/codecs.rst:500 msgid "" -"Implements the ``'namereplace'`` error handling (for encoding with :term:" -"`text encodings ` only): the unencodable character is " -"replaced by a ``\\N{...}`` escape sequence." +"The unencodable character is replaced by a ``\\N{...}`` escape sequence. The " +"set of characters that appear in the braces is the Name property from " +"Unicode Character Database. For example, the German lowercase letter ``'ß'`` " +"will be converted to byte sequence ``\\N{LATIN SMALL LETTER SHARP S}`` ." msgstr "" -#: library/codecs.rst:467 +#: library/codecs.rst:511 msgid "Stateless Encoding and Decoding" msgstr "" -#: library/codecs.rst:469 +#: 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:475 +#: 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 " @@ -783,26 +843,26 @@ msgid "" "``iso-8859-1``)." msgstr "" -#: library/codecs.rst:502 +#: library/codecs.rst:546 msgid "" "The *errors* argument defines the error handling to apply. It defaults to " "``'strict'`` handling." msgstr "" -#: library/codecs.rst:483 +#: 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:487 +#: 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:493 +#: 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 " @@ -810,31 +870,31 @@ msgid "" "object." msgstr "" -#: library/codecs.rst:498 +#: 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:505 +#: 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:509 +#: 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:514 +#: library/codecs.rst:558 msgid "Incremental Encoding and Decoding" msgstr "" -#: library/codecs.rst:516 +#: library/codecs.rst:560 msgid "" "The :class:`IncrementalEncoder` and :class:`IncrementalDecoder` classes " "provide the basic interface for incremental encoding and decoding. Encoding/" @@ -845,7 +905,7 @@ msgid "" "during method calls." msgstr "" -#: library/codecs.rst:524 +#: 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 " @@ -853,36 +913,36 @@ msgid "" "encoder/decoder." msgstr "" -#: library/codecs.rst:533 +#: library/codecs.rst:577 msgid "IncrementalEncoder Objects" msgstr "" -#: library/codecs.rst:535 +#: 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:542 +#: library/codecs.rst:586 msgid "Constructor for an :class:`IncrementalEncoder` instance." msgstr "" -#: library/codecs.rst:544 +#: 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:548 +#: 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:552 +#: 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 " @@ -890,21 +950,21 @@ msgid "" "`IncrementalEncoder` object." msgstr "" -#: library/codecs.rst:560 +#: 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:567 +#: 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:574 +#: 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 " @@ -913,42 +973,42 @@ msgid "" "into an integer.)" msgstr "" -#: library/codecs.rst:583 +#: 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:590 +#: library/codecs.rst:634 msgid "IncrementalDecoder Objects" msgstr "" -#: library/codecs.rst:592 +#: 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:599 +#: library/codecs.rst:643 msgid "Constructor for an :class:`IncrementalDecoder` instance." msgstr "" -#: library/codecs.rst:601 +#: 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:605 +#: 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:609 +#: 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 " @@ -956,7 +1016,7 @@ msgid "" "`IncrementalDecoder` object." msgstr "" -#: library/codecs.rst:617 +#: 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:" @@ -967,11 +1027,11 @@ msgid "" "(which might raise an exception)." msgstr "" -#: library/codecs.rst:628 +#: library/codecs.rst:672 msgid "Reset the decoder to the initial state." msgstr "" -#: library/codecs.rst:633 +#: 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. " @@ -986,59 +1046,59 @@ msgid "" "bytes of the resulting string into an integer.)" msgstr "" -#: library/codecs.rst:648 +#: 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:653 +#: library/codecs.rst:697 msgid "Stream Encoding and Decoding" msgstr "" -#: library/codecs.rst:656 +#: 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:664 +#: library/codecs.rst:708 msgid "StreamWriter Objects" msgstr "" -#: library/codecs.rst:666 +#: 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:673 +#: library/codecs.rst:717 msgid "Constructor for a :class:`StreamWriter` instance." msgstr "" -#: library/codecs.rst:675 +#: 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:679 +#: 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:682 +#: 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:686 +#: 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 " @@ -1046,70 +1106,70 @@ msgid "" "object." msgstr "" -#: library/codecs.rst:692 +#: library/codecs.rst:736 msgid "Writes the object's contents encoded to the stream." msgstr "" -#: library/codecs.rst:697 +#: library/codecs.rst:741 msgid "" -"Writes the concatenated list of strings to the stream (possibly by reusing " -"the :meth:`write` method). The standard bytes-to-bytes codecs do not support " -"this method." +"Writes the concatenated iterable of strings to the stream (possibly by " +"reusing the :meth:`write` method). Infinite or very large iterables are not " +"supported. The standard bytes-to-bytes codecs do not support this method." msgstr "" -#: library/codecs.rst:799 +#: library/codecs.rst:844 msgid "Resets the codec buffers used for keeping internal state." msgstr "" -#: library/codecs.rst:706 +#: 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:711 +#: 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:718 +#: library/codecs.rst:763 msgid "StreamReader Objects" msgstr "" -#: library/codecs.rst:720 +#: 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:727 +#: library/codecs.rst:772 msgid "Constructor for a :class:`StreamReader` instance." msgstr "" -#: library/codecs.rst:729 +#: 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:733 +#: 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:736 +#: 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:740 +#: 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 " @@ -1117,24 +1177,24 @@ msgid "" "object." msgstr "" -#: library/codecs.rst:744 +#: 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:750 +#: library/codecs.rst:795 msgid "Decodes data from the stream and returns the resulting object." msgstr "" -#: library/codecs.rst:752 +#: 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:757 +#: 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 " @@ -1143,13 +1203,13 @@ msgid "" "huge files in one step." msgstr "" -#: library/codecs.rst:764 +#: 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:768 +#: 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 " @@ -1157,68 +1217,68 @@ msgid "" "the stream, these should be read too." msgstr "" -#: library/codecs.rst:776 +#: library/codecs.rst:821 msgid "Read one line from the input stream and return the decoded data." msgstr "" -#: library/codecs.rst:778 +#: library/codecs.rst:823 msgid "" "*size*, if given, is passed as size argument to the stream's :meth:`read` " "method." msgstr "" -#: library/codecs.rst:781 +#: library/codecs.rst:826 msgid "" "If *keepends* is false line-endings will be stripped from the lines returned." msgstr "" -#: library/codecs.rst:787 +#: 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:790 +#: 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:793 +#: 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:801 +#: 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:805 +#: 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:811 +#: library/codecs.rst:856 msgid "StreamReaderWriter Objects" msgstr "" -#: library/codecs.rst:813 +#: 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:840 +#: 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:822 +#: 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 " @@ -1227,24 +1287,24 @@ msgid "" "writers." msgstr "" -#: library/codecs.rst:827 +#: 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:835 +#: library/codecs.rst:880 msgid "StreamRecoder Objects" msgstr "" -#: library/codecs.rst:837 +#: 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:846 +#: 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 " @@ -1252,17 +1312,17 @@ msgid "" "work on the backend — the data in *stream*." msgstr "" -#: library/codecs.rst:851 +#: 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:854 +#: library/codecs.rst:899 msgid "The *stream* argument must be a file-like object." msgstr "" -#: library/codecs.rst:856 +#: 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 " @@ -1270,36 +1330,36 @@ msgid "" "interface respectively." msgstr "" -#: library/codecs.rst:861 +#: 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:865 +#: 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:873 +#: library/codecs.rst:918 msgid "Encodings and Unicode" msgstr "" -#: library/codecs.rst:875 +#: library/codecs.rst:920 msgid "" -"Strings are stored internally as sequences of code points in range ``0x0``--" -"``0x10FFFF``. (See :pep:`393` for more details about the implementation.) " -"Once a string object is used outside of CPU and memory, endianness and how " -"these arrays are stored as bytes become an issue. As with other codecs, " -"serialising a string into a sequence of bytes is known as *encoding*, and " -"recreating the string from the sequence of bytes is known as *decoding*. " -"There are a variety of different text serialisation codecs, which are " -"collectivity referred to as :term:`text encodings `." +"Strings are stored internally as sequences of code points in range " +"``U+0000``--``U+10FFFF``. (See :pep:`393` for more details about the " +"implementation.) Once a string object is used outside of CPU and memory, " +"endianness and how these arrays are stored as bytes become an issue. As with " +"other codecs, serialising a string into a sequence of bytes is known as " +"*encoding*, and recreating the string from the sequence of bytes is known as " +"*decoding*. There are a variety of different text serialisation codecs, " +"which are collectivity referred to as :term:`text encodings `." msgstr "" -#: library/codecs.rst:885 +#: 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 " @@ -1310,7 +1370,7 @@ msgid "" "position 3: ordinal not in range(256)``." msgstr "" -#: library/codecs.rst:893 +#: 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 " @@ -1320,7 +1380,7 @@ msgid "" "that shows you which character is mapped to which byte value." msgstr "" -#: library/codecs.rst:900 +#: 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 " @@ -1336,7 +1396,7 @@ msgid "" "Order Mark\"). This is the Unicode character ``U+FEFF``. This character can " "be prepended to every ``UTF-16`` or ``UTF-32`` byte sequence. The byte " "swapped version of this character (``0xFFFE``) is an illegal character that " -"may not appear in a Unicode text. So when the first character in an " +"may not appear in a Unicode text. So when the first character in a " "``UTF-16`` or ``UTF-32`` byte sequence appears to be a ``U+FFFE`` the bytes " "have to be swapped on decoding. Unfortunately the character ``U+FEFF`` had a " "second purpose as a ``ZERO WIDTH NO-BREAK SPACE``: a character that has no " @@ -1350,7 +1410,7 @@ msgid "" "normal character that will be decoded like any other." msgstr "" -#: library/codecs.rst:926 +#: 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 " @@ -1361,72 +1421,71 @@ msgid "" "which when concatenated give the Unicode character):" msgstr "" -#: library/codecs.rst:935 +#: library/codecs.rst:980 msgid "Range" msgstr "*Range*" -#: library/codecs.rst:935 +#: library/codecs.rst:980 #, fuzzy msgid "Encoding" msgstr "Encodages" -#: library/codecs.rst:937 +#: library/codecs.rst:982 msgid "``U-00000000`` ... ``U-0000007F``" msgstr "``U-00000000`` ... ``U-0000007F``" -#: library/codecs.rst:937 +#: library/codecs.rst:982 msgid "0xxxxxxx" msgstr "0xxxxxxx" -#: library/codecs.rst:939 +#: library/codecs.rst:984 msgid "``U-00000080`` ... ``U-000007FF``" msgstr "``U-00000080`` ... ``U-000007FF``" -#: library/codecs.rst:939 +#: library/codecs.rst:984 msgid "110xxxxx 10xxxxxx" msgstr "110xxxxx 10xxxxxx" -#: library/codecs.rst:941 +#: library/codecs.rst:986 msgid "``U-00000800`` ... ``U-0000FFFF``" msgstr "``U-00000800`` ... ``U-0000FFFF``" -#: library/codecs.rst:941 +#: library/codecs.rst:986 msgid "1110xxxx 10xxxxxx 10xxxxxx" msgstr "1110xxxx 10xxxxxx 10xxxxxx" -#: library/codecs.rst:943 +#: library/codecs.rst:988 msgid "``U-00010000`` ... ``U-0010FFFF``" msgstr "``U-00010000`` ... ``U-0010FFFF``" -#: library/codecs.rst:943 +#: library/codecs.rst:988 msgid "11110xxx 10xxxxxx 10xxxxxx 10xxxxxx" msgstr "11110xxx 10xxxxxx 10xxxxxx 10xxxxxx" -#: library/codecs.rst:946 +#: library/codecs.rst:991 msgid "" "The least significant bit of the Unicode character is the rightmost x bit." msgstr "" -#: library/codecs.rst:948 +#: 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:952 +#: 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 2.5 calls ``\"utf-8-sig" -"\"``) for its Notepad program: Before any of the Unicode characters is " -"written to the file, a UTF-8 encoded BOM (which looks like this as a byte " -"sequence: ``0xef``, ``0xbb``, ``0xbf``) is written. As it's rather " -"improbable that any charmap encoded file starts with these byte values " -"(which would e.g. map to" +"Microsoft invented a variant of UTF-8 (that Python calls ``\"utf-8-sig\"``) " +"for its Notepad program: Before any of the Unicode characters is written to " +"the file, a UTF-8 encoded BOM (which looks like this as a byte sequence: " +"``0xef``, ``0xbb``, ``0xbf``) is written. As it's rather improbable that any " +"charmap encoded file starts with these byte values (which would e.g. map to" msgstr "" #: library/codecs.rst:0 @@ -1441,7 +1500,7 @@ msgstr "RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK" msgid "INVERTED QUESTION MARK" msgstr "INVERTED QUESTION MARK" -#: library/codecs.rst:968 +#: 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 " @@ -1453,11 +1512,11 @@ msgid "" "the use of the BOM is discouraged and should generally be avoided." msgstr "" -#: library/codecs.rst:981 +#: library/codecs.rst:1026 msgid "Standard Encodings" msgstr "" -#: library/codecs.rst:983 +#: 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 " @@ -1469,7 +1528,7 @@ msgid "" "alias for the ``'utf_8'`` codec." msgstr "" -#: library/codecs.rst:993 +#: 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 " @@ -1479,11 +1538,11 @@ msgid "" "Using alternative aliases for these encodings may result in slower execution." msgstr "" -#: library/codecs.rst:1001 +#: library/codecs.rst:1046 msgid "Optimization opportunity recognized for us-ascii." msgstr "" -#: library/codecs.rst:1004 +#: 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 " @@ -1491,485 +1550,485 @@ msgid "" "languages in particular, the following variants typically exist:" msgstr "" -#: library/codecs.rst:1009 +#: library/codecs.rst:1054 msgid "an ISO 8859 codeset" msgstr "" -#: library/codecs.rst:1011 +#: 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:1014 +#: library/codecs.rst:1059 msgid "an IBM EBCDIC code page" msgstr "" -#: library/codecs.rst:1016 +#: library/codecs.rst:1061 msgid "an IBM PC code page, which is ASCII compatible" msgstr "" -#: library/codecs.rst:1276 library/codecs.rst:1398 +#: library/codecs.rst:1321 library/codecs.rst:1443 msgid "Codec" msgstr "" -#: library/codecs.rst:1276 library/codecs.rst:1398 +#: library/codecs.rst:1321 library/codecs.rst:1443 msgid "Aliases" msgstr "" -#: library/codecs.rst:1021 +#: library/codecs.rst:1066 msgid "Languages" msgstr "" -#: library/codecs.rst:1023 +#: library/codecs.rst:1068 msgid "ascii" msgstr "*ascii*" -#: library/codecs.rst:1023 +#: library/codecs.rst:1068 msgid "646, us-ascii" msgstr "*646*, *us-ascii*" -#: library/codecs.rst:1029 library/codecs.rst:1037 +#: library/codecs.rst:1074 library/codecs.rst:1082 msgid "English" msgstr "Anglais" -#: library/codecs.rst:1025 +#: library/codecs.rst:1070 msgid "big5" msgstr "*big5*" -#: library/codecs.rst:1025 +#: library/codecs.rst:1070 msgid "big5-tw, csbig5" msgstr "*big5-tw*, *csbig5*" -#: library/codecs.rst:1027 library/codecs.rst:1085 +#: library/codecs.rst:1072 library/codecs.rst:1130 msgid "Traditional Chinese" msgstr "Chinois Traditionnel" -#: library/codecs.rst:1027 +#: library/codecs.rst:1072 msgid "big5hkscs" msgstr "*big5hkscs*" -#: library/codecs.rst:1027 +#: library/codecs.rst:1072 msgid "big5-hkscs, hkscs" msgstr "*big5-hkscs*, *hkscs*" -#: library/codecs.rst:1029 +#: library/codecs.rst:1074 msgid "cp037" msgstr "*cp037*" -#: library/codecs.rst:1029 +#: library/codecs.rst:1074 msgid "IBM037, IBM039" msgstr "*IBM037*, *IBM039*" -#: library/codecs.rst:1031 +#: library/codecs.rst:1076 msgid "cp273" msgstr "*cp273*" -#: library/codecs.rst:1031 +#: library/codecs.rst:1076 msgid "273, IBM273, csIBM273" msgstr "*273*, *IBM273*, *csIBM273*" -#: library/codecs.rst:1031 +#: library/codecs.rst:1076 msgid "German" msgstr "Allemand" -#: library/codecs.rst:1035 +#: library/codecs.rst:1080 msgid "cp424" msgstr "*cp424*" -#: library/codecs.rst:1035 +#: library/codecs.rst:1080 msgid "EBCDIC-CP-HE, IBM424" msgstr "*EBCDIC-CP-HE*, *IBM424*" -#: library/codecs.rst:1055 library/codecs.rst:1108 library/codecs.rst:1171 +#: library/codecs.rst:1100 library/codecs.rst:1153 library/codecs.rst:1216 msgid "Hebrew" msgstr "Hébreux" -#: library/codecs.rst:1037 +#: library/codecs.rst:1082 msgid "cp437" msgstr "*cp437*" -#: library/codecs.rst:1037 +#: library/codecs.rst:1082 msgid "437, IBM437" msgstr "*437*, *IBM437*" -#: library/codecs.rst:1039 +#: library/codecs.rst:1084 msgid "cp500" msgstr "*cp500*" -#: library/codecs.rst:1039 +#: library/codecs.rst:1084 msgid "EBCDIC-CP-BE, EBCDIC-CP-CH, IBM500" msgstr "*EBCDIC-CP-BE*, *EBCDIC-CP-CH*, *IBM500*" -#: library/codecs.rst:1048 library/codecs.rst:1095 library/codecs.rst:1155 -#: library/codecs.rst:1211 +#: 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:1042 +#: library/codecs.rst:1087 msgid "cp720" msgstr "*cp720*" -#: library/codecs.rst:1069 library/codecs.rst:1167 +#: library/codecs.rst:1114 library/codecs.rst:1212 msgid "Arabic" msgstr "Arabe" -#: library/codecs.rst:1044 +#: library/codecs.rst:1089 msgid "cp737" msgstr "*cp737*" -#: library/codecs.rst:1075 library/codecs.rst:1104 library/codecs.rst:1204 +#: library/codecs.rst:1120 library/codecs.rst:1149 library/codecs.rst:1249 msgid "Greek" msgstr "Grec" -#: library/codecs.rst:1046 +#: library/codecs.rst:1091 msgid "cp775" msgstr "*cp775*" -#: library/codecs.rst:1046 +#: library/codecs.rst:1091 msgid "IBM775" msgstr "*IBM775*" -#: library/codecs.rst:1112 library/codecs.rst:1179 +#: library/codecs.rst:1157 library/codecs.rst:1224 msgid "Baltic languages" msgstr "Langues Baltiques" -#: library/codecs.rst:1048 +#: library/codecs.rst:1093 msgid "cp850" msgstr "*cp850*" -#: library/codecs.rst:1048 +#: library/codecs.rst:1093 msgid "850, IBM850" msgstr "*850*, *IBM850*" -#: library/codecs.rst:1050 +#: library/codecs.rst:1095 msgid "cp852" msgstr "*cp852*" -#: library/codecs.rst:1050 +#: library/codecs.rst:1095 msgid "852, IBM852" msgstr "*852*, *IBM852*" -#: library/codecs.rst:1097 library/codecs.rst:1208 +#: library/codecs.rst:1142 library/codecs.rst:1253 msgid "Central and Eastern Europe" msgstr "Europe centrale et Europe de l'Est" -#: library/codecs.rst:1052 +#: library/codecs.rst:1097 msgid "cp855" msgstr "*cp855*" -#: library/codecs.rst:1052 +#: library/codecs.rst:1097 msgid "855, IBM855" msgstr "*855*, *IBM855*" -#: library/codecs.rst:1099 library/codecs.rst:1201 +#: 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:1055 +#: library/codecs.rst:1100 msgid "cp856" msgstr "*cp856*" -#: library/codecs.rst:1057 +#: library/codecs.rst:1102 msgid "cp857" msgstr "*cp857*" -#: library/codecs.rst:1057 +#: library/codecs.rst:1102 msgid "857, IBM857" msgstr "*857*, *IBM857*" -#: library/codecs.rst:1089 library/codecs.rst:1173 library/codecs.rst:1213 +#: library/codecs.rst:1134 library/codecs.rst:1218 library/codecs.rst:1258 msgid "Turkish" msgstr "Turc" -#: library/codecs.rst:1059 +#: library/codecs.rst:1104 msgid "cp858" msgstr "*cp858*" -#: library/codecs.rst:1059 +#: library/codecs.rst:1104 msgid "858, IBM858" msgstr "*858*, *IBM858*" -#: library/codecs.rst:1061 +#: library/codecs.rst:1106 msgid "cp860" msgstr "*cp860*" -#: library/codecs.rst:1061 +#: library/codecs.rst:1106 msgid "860, IBM860" msgstr "*860*, *IBM860*" -#: library/codecs.rst:1061 +#: library/codecs.rst:1106 msgid "Portuguese" msgstr "Portugais" -#: library/codecs.rst:1063 +#: library/codecs.rst:1108 msgid "cp861" msgstr "*cp861*" -#: library/codecs.rst:1063 +#: library/codecs.rst:1108 msgid "861, CP-IS, IBM861" msgstr "*861*, *CP-IS*, *IBM861*" -#: library/codecs.rst:1206 +#: library/codecs.rst:1251 msgid "Icelandic" msgstr "Islandais" -#: library/codecs.rst:1065 +#: library/codecs.rst:1110 msgid "cp862" msgstr "*cp862*" -#: library/codecs.rst:1065 +#: library/codecs.rst:1110 msgid "862, IBM862" msgstr "*862*, *IBM862*" -#: library/codecs.rst:1067 +#: library/codecs.rst:1112 msgid "cp863" msgstr "*cp863*" -#: library/codecs.rst:1067 +#: library/codecs.rst:1112 msgid "863, IBM863" msgstr "*863*, *IBM863*" -#: library/codecs.rst:1067 +#: library/codecs.rst:1112 msgid "Canadian" msgstr "Canadien" -#: library/codecs.rst:1069 +#: library/codecs.rst:1114 msgid "cp864" msgstr "*cp864*" -#: library/codecs.rst:1069 +#: library/codecs.rst:1114 msgid "IBM864" msgstr "*IBM864*" -#: library/codecs.rst:1071 +#: library/codecs.rst:1116 msgid "cp865" msgstr "*cp865*" -#: library/codecs.rst:1071 +#: library/codecs.rst:1116 msgid "865, IBM865" msgstr "*865*, *IBM865*" -#: library/codecs.rst:1071 +#: library/codecs.rst:1116 msgid "Danish, Norwegian" msgstr "" -#: library/codecs.rst:1073 +#: library/codecs.rst:1118 msgid "cp866" msgstr "*cp866*" -#: library/codecs.rst:1073 +#: library/codecs.rst:1118 msgid "866, IBM866" msgstr "*866*, *IBM866*" -#: library/codecs.rst:1189 +#: library/codecs.rst:1234 msgid "Russian" msgstr "Russe" -#: library/codecs.rst:1075 +#: library/codecs.rst:1120 msgid "cp869" msgstr "*cp869*" -#: library/codecs.rst:1075 +#: library/codecs.rst:1120 msgid "869, CP-GR, IBM869" msgstr "*869*, *CP-GR*, *IBM869*" -#: library/codecs.rst:1077 +#: library/codecs.rst:1122 msgid "cp874" msgstr "*cp874*" -#: library/codecs.rst:1077 +#: library/codecs.rst:1122 msgid "Thai" msgstr "" -#: library/codecs.rst:1079 +#: library/codecs.rst:1124 msgid "cp875" msgstr "*cp875*" -#: library/codecs.rst:1081 +#: library/codecs.rst:1126 msgid "cp932" msgstr "*cp932*" -#: library/codecs.rst:1081 +#: library/codecs.rst:1126 msgid "932, ms932, mskanji, ms-kanji" msgstr "*932*, *ms932*, *mskanji*, *ms-kanji*" -#: library/codecs.rst:1116 library/codecs.rst:1120 library/codecs.rst:1140 -#: library/codecs.rst:1148 library/codecs.rst:1218 library/codecs.rst:1224 +#: 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:1083 +#: library/codecs.rst:1128 msgid "cp949" msgstr "*cp949*" -#: library/codecs.rst:1083 +#: library/codecs.rst:1128 msgid "949, ms949, uhc" msgstr "*949*, *ms949*, *uhc*" -#: library/codecs.rst:1122 library/codecs.rst:1187 +#: library/codecs.rst:1167 library/codecs.rst:1232 msgid "Korean" msgstr "" -#: library/codecs.rst:1085 +#: library/codecs.rst:1130 msgid "cp950" msgstr "*cp950*" -#: library/codecs.rst:1085 +#: library/codecs.rst:1130 msgid "950, ms950" msgstr "*950*, *ms950*" -#: library/codecs.rst:1087 +#: library/codecs.rst:1132 msgid "cp1006" msgstr "*cp1006*" -#: library/codecs.rst:1087 +#: library/codecs.rst:1132 msgid "Urdu" msgstr "" -#: library/codecs.rst:1089 +#: library/codecs.rst:1134 msgid "cp1026" msgstr "*cp1026*" -#: library/codecs.rst:1089 +#: library/codecs.rst:1134 msgid "ibm1026" msgstr "*ibm1026*" -#: library/codecs.rst:1091 +#: library/codecs.rst:1136 msgid "cp1125" msgstr "*cp1125*" -#: library/codecs.rst:1091 +#: library/codecs.rst:1136 msgid "1125, ibm1125, cp866u, ruscii" msgstr "*1125*, *ibm1125*, *cp866u*, *ruscii*" -#: library/codecs.rst:1195 +#: library/codecs.rst:1240 msgid "Ukrainian" msgstr "" -#: library/codecs.rst:1095 +#: library/codecs.rst:1140 msgid "cp1140" msgstr "*cp1140*" -#: library/codecs.rst:1095 +#: library/codecs.rst:1140 msgid "ibm1140" msgstr "*ibm1140*" -#: library/codecs.rst:1097 +#: library/codecs.rst:1142 msgid "cp1250" msgstr "*cp1250*" -#: library/codecs.rst:1097 +#: library/codecs.rst:1142 msgid "windows-1250" msgstr "*windows-1250*" -#: library/codecs.rst:1099 +#: library/codecs.rst:1144 msgid "cp1251" msgstr "*cp1251*" -#: library/codecs.rst:1099 +#: library/codecs.rst:1144 msgid "windows-1251" msgstr "*windows-1251*" -#: library/codecs.rst:1102 +#: library/codecs.rst:1147 msgid "cp1252" msgstr "*cp1252*" -#: library/codecs.rst:1102 +#: library/codecs.rst:1147 msgid "windows-1252" msgstr "*windows-1252*" -#: library/codecs.rst:1104 +#: library/codecs.rst:1149 msgid "cp1253" msgstr "*cp1253*" -#: library/codecs.rst:1104 +#: library/codecs.rst:1149 msgid "windows-1253" msgstr "*windows-1253*" -#: library/codecs.rst:1106 +#: library/codecs.rst:1151 msgid "cp1254" msgstr "*cp1254*" -#: library/codecs.rst:1106 +#: library/codecs.rst:1151 msgid "windows-1254" msgstr "*windows-1254*" -#: library/codecs.rst:1108 +#: library/codecs.rst:1153 msgid "cp1255" msgstr "*cp1255*" -#: library/codecs.rst:1108 +#: library/codecs.rst:1153 msgid "windows-1255" msgstr "*windows-1255*" -#: library/codecs.rst:1110 +#: library/codecs.rst:1155 msgid "cp1256" msgstr "*cp1256*" -#: library/codecs.rst:1110 +#: library/codecs.rst:1155 msgid "windows-1256" msgstr "*windows-1256*" -#: library/codecs.rst:1112 +#: library/codecs.rst:1157 msgid "cp1257" msgstr "*cp1257*" -#: library/codecs.rst:1112 +#: library/codecs.rst:1157 msgid "windows-1257" msgstr "*windows-1257*" -#: library/codecs.rst:1114 +#: library/codecs.rst:1159 msgid "cp1258" msgstr "*cp1258*" -#: library/codecs.rst:1114 +#: library/codecs.rst:1159 msgid "windows-1258" msgstr "*windows-1258*" -#: library/codecs.rst:1114 +#: library/codecs.rst:1159 msgid "Vietnamese" msgstr "" -#: library/codecs.rst:1116 +#: library/codecs.rst:1161 msgid "euc_jp" msgstr "*euc_jp*" -#: library/codecs.rst:1116 +#: library/codecs.rst:1161 msgid "eucjp, ujis, u-jis" msgstr "*eucjp*, *ujis*, *u-jis*" -#: library/codecs.rst:1118 +#: library/codecs.rst:1163 msgid "euc_jis_2004" msgstr "*euc_jis_2004*" -#: library/codecs.rst:1118 +#: library/codecs.rst:1163 msgid "jisx0213, eucjis2004" msgstr "*jisx0213*, *eucjis2004*" -#: library/codecs.rst:1120 +#: library/codecs.rst:1165 msgid "euc_jisx0213" msgstr "*euc_jisx0213*" -#: library/codecs.rst:1120 +#: library/codecs.rst:1165 msgid "eucjisx0213" msgstr "*eucjisx0213*" -#: library/codecs.rst:1122 +#: library/codecs.rst:1167 msgid "euc_kr" msgstr "*euc_kr*" -#: library/codecs.rst:1122 +#: 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:1126 +#: library/codecs.rst:1171 msgid "gb2312" msgstr "*gb2312*" -#: library/codecs.rst:1126 +#: library/codecs.rst:1171 msgid "" "chinese, csiso58gb231280, euc-cn, euccn, eucgb2312-cn, gb2312-1980, " "gb2312-80, iso-ir-58" @@ -1977,445 +2036,445 @@ msgstr "" "*chinese*, *csiso58gb231280*, *euc-cn*, *euccn*, *eucgb2312-cn*, " "*gb2312-1980*, *gb2312-80*, *iso-ir-58*" -#: library/codecs.rst:1135 +#: library/codecs.rst:1180 msgid "Simplified Chinese" msgstr "" -#: library/codecs.rst:1131 +#: library/codecs.rst:1176 msgid "gbk" msgstr "*gbk*" -#: library/codecs.rst:1131 +#: library/codecs.rst:1176 msgid "936, cp936, ms936" msgstr "*936*, *cp936*, *ms936*" -#: library/codecs.rst:1133 +#: library/codecs.rst:1178 msgid "Unified Chinese" msgstr "" -#: library/codecs.rst:1133 +#: library/codecs.rst:1178 msgid "gb18030" msgstr "*gb18030*" -#: library/codecs.rst:1133 +#: library/codecs.rst:1178 msgid "gb18030-2000" msgstr "*gb18030-2000*" -#: library/codecs.rst:1135 +#: library/codecs.rst:1180 msgid "hz" msgstr "*hz*" -#: library/codecs.rst:1135 +#: library/codecs.rst:1180 msgid "hzgb, hz-gb, hz-gb-2312" msgstr "*hzgb*, *hz-gb*, *hz-gb-2312*" -#: library/codecs.rst:1137 +#: library/codecs.rst:1182 msgid "iso2022_jp" msgstr "*iso2022_jp*" -#: library/codecs.rst:1137 +#: library/codecs.rst:1182 msgid "csiso2022jp, iso2022jp, iso-2022-jp" msgstr "*csiso2022jp*, *iso2022jp*, *iso-2022-jp*" -#: library/codecs.rst:1140 +#: library/codecs.rst:1185 msgid "iso2022_jp_1" msgstr "*iso2022_jp_1*" -#: library/codecs.rst:1140 +#: library/codecs.rst:1185 msgid "iso2022jp-1, iso-2022-jp-1" msgstr "*iso2022jp-1*, *iso-2022-jp-1*" -#: library/codecs.rst:1142 +#: library/codecs.rst:1187 msgid "iso2022_jp_2" msgstr "*iso2022_jp_2*" -#: library/codecs.rst:1142 +#: library/codecs.rst:1187 msgid "iso2022jp-2, iso-2022-jp-2" msgstr "*iso2022jp-2*, *iso-2022-jp-2*" -#: library/codecs.rst:1142 +#: library/codecs.rst:1187 msgid "Japanese, Korean, Simplified Chinese, Western Europe, Greek" msgstr "" -#: library/codecs.rst:1145 +#: library/codecs.rst:1190 msgid "iso2022_jp_2004" msgstr "*iso2022_jp_2004*" -#: library/codecs.rst:1145 +#: library/codecs.rst:1190 msgid "iso2022jp-2004, iso-2022-jp-2004" msgstr "*iso2022jp-2004*, *iso-2022-jp-2004*" -#: library/codecs.rst:1148 +#: library/codecs.rst:1193 msgid "iso2022_jp_3" msgstr "*iso2022_jp_3*" -#: library/codecs.rst:1148 +#: library/codecs.rst:1193 msgid "iso2022jp-3, iso-2022-jp-3" msgstr "*iso2022jp-3*, *iso-2022-jp-3*" -#: library/codecs.rst:1150 +#: library/codecs.rst:1195 msgid "iso2022_jp_ext" msgstr "*iso2022_jp_ext*" -#: library/codecs.rst:1150 +#: library/codecs.rst:1195 msgid "iso2022jp-ext, iso-2022-jp-ext" msgstr "*iso2022jp-ext*, *iso-2022-jp-ext*" -#: library/codecs.rst:1152 +#: library/codecs.rst:1197 msgid "iso2022_kr" msgstr "*iso2022_kr*" -#: library/codecs.rst:1152 +#: library/codecs.rst:1197 msgid "csiso2022kr, iso2022kr, iso-2022-kr" msgstr "*csiso2022kr*, *iso2022kr*, *iso-2022-kr*" -#: library/codecs.rst:1155 +#: library/codecs.rst:1200 msgid "latin_1" msgstr "*latin_1*" -#: library/codecs.rst:1155 +#: 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:1158 +#: library/codecs.rst:1203 msgid "iso8859_2" msgstr "*iso8859_2*" -#: library/codecs.rst:1158 +#: library/codecs.rst:1203 msgid "iso-8859-2, latin2, L2" msgstr "*iso-8859-2*, *latin2*, *L2*" -#: library/codecs.rst:1160 +#: library/codecs.rst:1205 msgid "iso8859_3" msgstr "*iso8859_3*" -#: library/codecs.rst:1160 +#: library/codecs.rst:1205 msgid "iso-8859-3, latin3, L3" msgstr "*iso-8859-3*, *latin3*, *L3*" -#: library/codecs.rst:1160 +#: library/codecs.rst:1205 msgid "Esperanto, Maltese" msgstr "" -#: library/codecs.rst:1162 +#: library/codecs.rst:1207 msgid "iso8859_4" msgstr "*iso8859_4*" -#: library/codecs.rst:1162 +#: library/codecs.rst:1207 msgid "iso-8859-4, latin4, L4" msgstr "*iso-8859-4*, *latin4*, *L4*" -#: library/codecs.rst:1164 +#: library/codecs.rst:1209 msgid "iso8859_5" msgstr "*iso8859_5*" -#: library/codecs.rst:1164 +#: library/codecs.rst:1209 msgid "iso-8859-5, cyrillic" msgstr "*iso-8859-5*, *cyrillic*" -#: library/codecs.rst:1167 +#: library/codecs.rst:1212 msgid "iso8859_6" msgstr "*iso8859_6*" -#: library/codecs.rst:1167 +#: library/codecs.rst:1212 msgid "iso-8859-6, arabic" msgstr "*iso-8859-6*, *arabic*" -#: library/codecs.rst:1169 +#: library/codecs.rst:1214 msgid "iso8859_7" msgstr "*iso8859_7*" -#: library/codecs.rst:1169 +#: library/codecs.rst:1214 msgid "iso-8859-7, greek, greek8" msgstr "*iso-8859-7*, *greek*, *greek8*" -#: library/codecs.rst:1171 +#: library/codecs.rst:1216 msgid "iso8859_8" msgstr "*iso8859_8*" -#: library/codecs.rst:1171 +#: library/codecs.rst:1216 msgid "iso-8859-8, hebrew" msgstr "*iso-8859-8*, *hebrew*" -#: library/codecs.rst:1173 +#: library/codecs.rst:1218 msgid "iso8859_9" msgstr "*iso8859_9*" -#: library/codecs.rst:1173 +#: library/codecs.rst:1218 msgid "iso-8859-9, latin5, L5" msgstr "*iso-8859-9*, *latin5*, *L5*" -#: library/codecs.rst:1175 +#: library/codecs.rst:1220 msgid "iso8859_10" msgstr "*iso8859_10*" -#: library/codecs.rst:1175 +#: library/codecs.rst:1220 msgid "iso-8859-10, latin6, L6" msgstr "*iso-8859-10*, *latin6*, *L6*" -#: library/codecs.rst:1175 +#: library/codecs.rst:1220 msgid "Nordic languages" msgstr "" -#: library/codecs.rst:1177 +#: library/codecs.rst:1222 msgid "iso8859_11" msgstr "*iso8859_11*" -#: library/codecs.rst:1177 +#: library/codecs.rst:1222 msgid "iso-8859-11, thai" msgstr "*iso-8859-11*, *thai*" -#: library/codecs.rst:1177 +#: library/codecs.rst:1222 msgid "Thai languages" msgstr "" -#: library/codecs.rst:1179 +#: library/codecs.rst:1224 msgid "iso8859_13" msgstr "*iso8859_13*" -#: library/codecs.rst:1179 +#: library/codecs.rst:1224 msgid "iso-8859-13, latin7, L7" msgstr "*iso-8859-13*, *latin7*, *L7*" -#: library/codecs.rst:1181 +#: library/codecs.rst:1226 msgid "iso8859_14" msgstr "*iso8859_14*" -#: library/codecs.rst:1181 +#: library/codecs.rst:1226 msgid "iso-8859-14, latin8, L8" msgstr "*iso-8859-14*, *latin8*, *L8*" -#: library/codecs.rst:1181 +#: library/codecs.rst:1226 msgid "Celtic languages" msgstr "" -#: library/codecs.rst:1183 +#: library/codecs.rst:1228 msgid "iso8859_15" msgstr "*iso8859_15*" -#: library/codecs.rst:1183 +#: library/codecs.rst:1228 msgid "iso-8859-15, latin9, L9" msgstr "*iso-8859-15*, *latin9*, *L9*" -#: library/codecs.rst:1185 +#: library/codecs.rst:1230 msgid "iso8859_16" msgstr "*iso8859_16*" -#: library/codecs.rst:1185 +#: library/codecs.rst:1230 msgid "iso-8859-16, latin10, L10" msgstr "*iso-8859-16*, *latin10*, *L10*" -#: library/codecs.rst:1185 +#: library/codecs.rst:1230 msgid "South-Eastern Europe" msgstr "" -#: library/codecs.rst:1187 +#: library/codecs.rst:1232 msgid "johab" msgstr "*johab*" -#: library/codecs.rst:1187 +#: library/codecs.rst:1232 msgid "cp1361, ms1361" msgstr "*cp1361*, *ms1361*" -#: library/codecs.rst:1189 +#: library/codecs.rst:1234 msgid "koi8_r" msgstr "*koi8_r*" -#: library/codecs.rst:1191 +#: library/codecs.rst:1236 msgid "koi8_t" msgstr "*koi8_t*" -#: library/codecs.rst:1191 +#: library/codecs.rst:1236 msgid "Tajik" msgstr "*Tajik*" -#: library/codecs.rst:1195 +#: library/codecs.rst:1240 msgid "koi8_u" msgstr "*koi8_u*" -#: library/codecs.rst:1197 +#: library/codecs.rst:1242 msgid "kz1048" msgstr "*kz1048*" -#: library/codecs.rst:1197 +#: library/codecs.rst:1242 msgid "kz_1048, strk1048_2002, rk1048" msgstr "*kz_1048*, *strk1048_2002*, *rk1048*" -#: library/codecs.rst:1215 +#: library/codecs.rst:1260 msgid "Kazakh" msgstr "" -#: library/codecs.rst:1201 +#: library/codecs.rst:1246 msgid "mac_cyrillic" msgstr "*mac_cyrillic*" -#: library/codecs.rst:1201 +#: library/codecs.rst:1246 msgid "maccyrillic" msgstr "*maccyrillic*" -#: library/codecs.rst:1204 +#: library/codecs.rst:1249 msgid "mac_greek" msgstr "*mac_greek*" -#: library/codecs.rst:1204 +#: library/codecs.rst:1249 msgid "macgreek" msgstr "*macgreek*" -#: library/codecs.rst:1206 +#: library/codecs.rst:1251 msgid "mac_iceland" msgstr "*mac_iceland*" -#: library/codecs.rst:1206 +#: library/codecs.rst:1251 msgid "maciceland" msgstr "*maciceland*" -#: library/codecs.rst:1208 +#: library/codecs.rst:1253 msgid "mac_latin2" msgstr "*mac_latin2*" -#: library/codecs.rst:1208 +#: library/codecs.rst:1253 #, fuzzy msgid "maclatin2, maccentraleurope, mac_centeuro" msgstr "*maclatin2*, *maccentraleurope*" -#: library/codecs.rst:1211 +#: library/codecs.rst:1256 msgid "mac_roman" msgstr "*mac_roman*" -#: library/codecs.rst:1211 +#: library/codecs.rst:1256 msgid "macroman, macintosh" msgstr "*macroman*, *macintosh*" -#: library/codecs.rst:1213 +#: library/codecs.rst:1258 msgid "mac_turkish" msgstr "*mac_turkish*" -#: library/codecs.rst:1213 +#: library/codecs.rst:1258 msgid "macturkish" msgstr "*macturkish*" -#: library/codecs.rst:1215 +#: library/codecs.rst:1260 msgid "ptcp154" msgstr "*ptcp154*" -#: library/codecs.rst:1215 +#: library/codecs.rst:1260 msgid "csptcp154, pt154, cp154, cyrillic-asian" msgstr "*csptcp154*, *pt154*, *cp154*, *cyrillic-asian*" -#: library/codecs.rst:1218 +#: library/codecs.rst:1263 msgid "shift_jis" msgstr "*shift_jis*" -#: library/codecs.rst:1218 +#: library/codecs.rst:1263 msgid "csshiftjis, shiftjis, sjis, s_jis" msgstr "*csshiftjis*, *shiftjis*, *sjis*, *s_jis*" -#: library/codecs.rst:1221 +#: library/codecs.rst:1266 msgid "shift_jis_2004" msgstr "*shift_jis_2004*" -#: library/codecs.rst:1221 +#: library/codecs.rst:1266 msgid "shiftjis2004, sjis_2004, sjis2004" msgstr "*shiftjis2004*, *sjis_2004*, *sjis2004*" -#: library/codecs.rst:1224 +#: library/codecs.rst:1269 msgid "shift_jisx0213" msgstr "*shift_jisx0213*" -#: library/codecs.rst:1224 +#: library/codecs.rst:1269 msgid "shiftjisx0213, sjisx0213, s_jisx0213" msgstr "*shiftjisx0213*, *sjisx0213*, *s_jisx0213*" -#: library/codecs.rst:1227 +#: library/codecs.rst:1272 msgid "utf_32" msgstr "*utf_32*" -#: library/codecs.rst:1227 +#: library/codecs.rst:1272 msgid "U32, utf32" msgstr "*U32*, *utf32*" -#: library/codecs.rst:1229 library/codecs.rst:1233 library/codecs.rst:1237 -#: library/codecs.rst:1241 library/codecs.rst:1243 +#: 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:1229 +#: library/codecs.rst:1274 msgid "utf_32_be" msgstr "*utf_32_be*" -#: library/codecs.rst:1229 +#: library/codecs.rst:1274 msgid "UTF-32BE" msgstr "*UTF-32BE*" -#: library/codecs.rst:1231 +#: library/codecs.rst:1276 msgid "utf_32_le" msgstr "*utf_32_le*" -#: library/codecs.rst:1231 +#: library/codecs.rst:1276 msgid "UTF-32LE" msgstr "*UTF-32LE*" -#: library/codecs.rst:1233 +#: library/codecs.rst:1278 msgid "utf_16" msgstr "*utf_16*" -#: library/codecs.rst:1233 +#: library/codecs.rst:1278 msgid "U16, utf16" msgstr "*U16*, *utf16*" -#: library/codecs.rst:1235 +#: library/codecs.rst:1280 msgid "utf_16_be" msgstr "*utf_16_be*" -#: library/codecs.rst:1235 +#: library/codecs.rst:1280 msgid "UTF-16BE" msgstr "*UTF-16BE*" -#: library/codecs.rst:1237 +#: library/codecs.rst:1282 msgid "utf_16_le" msgstr "*utf_16_le*" -#: library/codecs.rst:1237 +#: library/codecs.rst:1282 msgid "UTF-16LE" msgstr "*UTF-16LE*" -#: library/codecs.rst:1239 +#: library/codecs.rst:1284 msgid "utf_7" msgstr "*utf_7*" -#: library/codecs.rst:1239 +#: library/codecs.rst:1284 msgid "U7, unicode-1-1-utf-7" msgstr "*U7*, *unicode-1-1-utf-7*" -#: library/codecs.rst:1241 +#: library/codecs.rst:1286 msgid "utf_8" msgstr "*utf_8*" -#: library/codecs.rst:1241 +#: library/codecs.rst:1286 #, fuzzy msgid "U8, UTF, utf8, cp65001" msgstr "*U8*, *UTF*, *utf8*" -#: library/codecs.rst:1243 +#: library/codecs.rst:1288 msgid "utf_8_sig" msgstr "*utf_8_sig*" -#: library/codecs.rst:1246 +#: 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:1252 +#: library/codecs.rst:1297 msgid "``cp65001`` is now an alias to ``utf_8``." msgstr "" -#: library/codecs.rst:1257 +#: library/codecs.rst:1302 msgid "Python Specific Encodings" msgstr "" -#: library/codecs.rst:1259 +#: 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 " @@ -2425,272 +2484,272 @@ msgid "" "asymmetric codecs, the stated meaning describes the encoding direction." msgstr "" -#: library/codecs.rst:1267 +#: library/codecs.rst:1312 msgid "Text Encodings" msgstr "" -#: library/codecs.rst:1269 +#: 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:1278 +#: library/codecs.rst:1323 msgid "idna" msgstr "idna" -#: library/codecs.rst:1278 +#: library/codecs.rst:1323 msgid "" "Implement :rfc:`3490`, see also :mod:`encodings.idna`. Only " "``errors='strict'`` is supported." msgstr "" -#: library/codecs.rst:1284 +#: library/codecs.rst:1329 msgid "mbcs" msgstr "mbcs" -#: library/codecs.rst:1284 +#: library/codecs.rst:1329 msgid "ansi, dbcs" msgstr "" -#: library/codecs.rst:1284 +#: library/codecs.rst:1329 msgid "" "Windows only: Encode the operand according to the ANSI codepage (CP_ACP)." msgstr "" -#: library/codecs.rst:1288 +#: library/codecs.rst:1333 msgid "oem" msgstr "" -#: library/codecs.rst:1288 +#: library/codecs.rst:1333 msgid "" "Windows only: Encode the operand according to the OEM codepage (CP_OEMCP)." msgstr "" -#: library/codecs.rst:1294 +#: library/codecs.rst:1339 msgid "palmos" msgstr "palmos" -#: library/codecs.rst:1294 +#: library/codecs.rst:1339 msgid "Encoding of PalmOS 3.5." msgstr "" -#: library/codecs.rst:1296 +#: library/codecs.rst:1341 msgid "punycode" msgstr "punycode" -#: library/codecs.rst:1296 +#: library/codecs.rst:1341 msgid "Implement :rfc:`3492`. Stateful codecs are not supported." msgstr "" -#: library/codecs.rst:1300 +#: library/codecs.rst:1345 msgid "raw_unicode_escape" msgstr "raw_unicode_escape" -#: library/codecs.rst:1300 +#: 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:1309 +#: library/codecs.rst:1354 msgid "undefined" msgstr "undefined" -#: library/codecs.rst:1309 +#: library/codecs.rst:1354 msgid "" "Raise an exception for all conversions, even empty strings. The error " "handler is ignored." msgstr "" -#: library/codecs.rst:1314 +#: library/codecs.rst:1359 msgid "unicode_escape" msgstr "unicode_escape" -#: library/codecs.rst:1314 +#: 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:1326 +#: library/codecs.rst:1371 msgid "\"unicode_internal\" codec is removed." msgstr "" -#: library/codecs.rst:1333 +#: library/codecs.rst:1378 msgid "Binary Transforms" msgstr "" -#: library/codecs.rst:1335 +#: 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:1343 +#: library/codecs.rst:1388 msgid "Encoder / decoder" msgstr "" -#: library/codecs.rst:1345 +#: library/codecs.rst:1390 msgid "base64_codec [#b64]_" msgstr "base64_codec [#b64]_" -#: library/codecs.rst:1345 +#: library/codecs.rst:1390 msgid "base64, base_64" msgstr "base64, base_64" -#: library/codecs.rst:1345 +#: library/codecs.rst:1390 msgid "" "Convert the operand to multiline MIME base64 (the result always includes a " "trailing ``'\\n'``)." msgstr "" -#: library/codecs.rst:1350 +#: library/codecs.rst:1395 msgid "" "accepts any :term:`bytes-like object` as input for encoding and decoding" msgstr "" -#: library/codecs.rst:1345 +#: library/codecs.rst:1390 msgid ":meth:`base64.encodebytes` / :meth:`base64.decodebytes`" msgstr "" -#: library/codecs.rst:1356 +#: library/codecs.rst:1401 msgid "bz2_codec" msgstr "bz2_codec" -#: library/codecs.rst:1356 +#: library/codecs.rst:1401 msgid "bz2" msgstr "bz2" -#: library/codecs.rst:1356 +#: library/codecs.rst:1401 msgid "Compress the operand using bz2." msgstr "" -#: library/codecs.rst:1356 +#: library/codecs.rst:1401 msgid ":meth:`bz2.compress` / :meth:`bz2.decompress`" msgstr "" -#: library/codecs.rst:1359 +#: library/codecs.rst:1404 msgid "hex_codec" msgstr "hex_codec" -#: library/codecs.rst:1359 +#: library/codecs.rst:1404 msgid "hex" msgstr "hex" -#: library/codecs.rst:1359 +#: library/codecs.rst:1404 msgid "" "Convert the operand to hexadecimal representation, with two digits per byte." msgstr "" -#: library/codecs.rst:1359 +#: library/codecs.rst:1404 msgid ":meth:`binascii.b2a_hex` / :meth:`binascii.a2b_hex`" msgstr "" -#: library/codecs.rst:1364 +#: library/codecs.rst:1409 msgid "quopri_codec" msgstr "quopri_codec" -#: library/codecs.rst:1364 +#: library/codecs.rst:1409 msgid "quopri, quotedprintable, quoted_printable" msgstr "" -#: library/codecs.rst:1364 +#: library/codecs.rst:1409 msgid "Convert the operand to MIME quoted printable." msgstr "" -#: library/codecs.rst:1364 +#: library/codecs.rst:1409 msgid ":meth:`quopri.encode` with ``quotetabs=True`` / :meth:`quopri.decode`" msgstr "" -#: library/codecs.rst:1368 +#: library/codecs.rst:1413 msgid "uu_codec" msgstr "uu_codec" -#: library/codecs.rst:1368 +#: library/codecs.rst:1413 msgid "uu" msgstr "uu" -#: library/codecs.rst:1368 +#: library/codecs.rst:1413 msgid "Convert the operand using uuencode." msgstr "" -#: library/codecs.rst:1368 +#: library/codecs.rst:1413 msgid ":meth:`uu.encode` / :meth:`uu.decode`" msgstr "" -#: library/codecs.rst:1371 +#: library/codecs.rst:1416 msgid "zlib_codec" msgstr "zlib_codec" -#: library/codecs.rst:1371 +#: library/codecs.rst:1416 msgid "zip, zlib" msgstr "zip, zlib" -#: library/codecs.rst:1371 +#: library/codecs.rst:1416 msgid "Compress the operand using gzip." msgstr "" -#: library/codecs.rst:1371 +#: library/codecs.rst:1416 msgid ":meth:`zlib.compress` / :meth:`zlib.decompress`" msgstr ":meth:`zlib.compress` / :meth:`zlib.decompress`" -#: library/codecs.rst:1375 +#: 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:1379 +#: library/codecs.rst:1424 msgid "Restoration of the binary transforms." msgstr "" -#: library/codecs.rst:1382 +#: library/codecs.rst:1427 msgid "Restoration of the aliases for the binary transforms." msgstr "" -#: library/codecs.rst:1389 +#: library/codecs.rst:1434 msgid "Text Transforms" msgstr "" -#: library/codecs.rst:1391 +#: 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:1400 +#: library/codecs.rst:1445 msgid "rot_13" msgstr "rot_13" -#: library/codecs.rst:1400 +#: library/codecs.rst:1445 msgid "rot13" msgstr "rot13" -#: library/codecs.rst:1400 +#: library/codecs.rst:1445 msgid "Return the Caesar-cypher encryption of the operand." msgstr "" -#: library/codecs.rst:1405 +#: library/codecs.rst:1450 msgid "Restoration of the ``rot_13`` text transform." msgstr "" -#: library/codecs.rst:1408 +#: library/codecs.rst:1453 msgid "Restoration of the ``rot13`` alias." msgstr "" -#: library/codecs.rst:1413 +#: library/codecs.rst:1458 msgid "" ":mod:`encodings.idna` --- Internationalized Domain Names in Applications" msgstr "" -#: library/codecs.rst:1419 +#: library/codecs.rst:1464 msgid "" "This module implements :rfc:`3490` (Internationalized Domain Names in " "Applications) and :rfc:`3492` (Nameprep: A Stringprep Profile for " @@ -2698,13 +2757,13 @@ msgid "" "encoding and :mod:`stringprep`." msgstr "" -#: library/codecs.rst:1424 +#: library/codecs.rst:1469 msgid "" "If you need the IDNA 2008 standard from :rfc:`5891` and :rfc:`5895`, use the " -"third-party `idna module _`." +"third-party `idna module `_." msgstr "" -#: library/codecs.rst:1427 +#: 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." @@ -2718,7 +2777,7 @@ msgid "" "presenting them to the user." msgstr "" -#: library/codecs.rst:1438 +#: 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 " @@ -2735,14 +2794,14 @@ msgid "" "sends that field at all)." msgstr "" -#: library/codecs.rst:1451 +#: 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:1455 +#: 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-" @@ -2750,49 +2809,49 @@ msgid "" "characters. The nameprep functions can be used directly if desired." msgstr "" -#: library/codecs.rst:1463 +#: 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:1469 +#: 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:1475 +#: library/codecs.rst:1520 msgid "Convert a label to Unicode, as specified in :rfc:`3490`." msgstr "" -#: library/codecs.rst:1479 +#: library/codecs.rst:1524 msgid ":mod:`encodings.mbcs` --- Windows ANSI codepage" msgstr "" -#: library/codecs.rst:1484 +#: library/codecs.rst:1529 msgid "This module implements the ANSI codepage (CP_ACP)." msgstr "" -#: library/codecs.rst:1487 +#: library/codecs.rst:1532 msgid ":ref:`Availability `: Windows only." msgstr ":ref:`Disponibilité ` : Windows uniquement." -#: library/codecs.rst:1488 +#: library/codecs.rst:1533 msgid "Support any error handler." msgstr "" -#: library/codecs.rst:1491 +#: 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:1497 +#: library/codecs.rst:1542 msgid ":mod:`encodings.utf_8_sig` --- UTF-8 codec with BOM signature" msgstr "" -#: library/codecs.rst:1503 +#: 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 " @@ -2801,6 +2860,13 @@ msgid "" "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 " diff --git a/library/collections.abc.po b/library/collections.abc.po index d8f71a2263..aed5a33488 100644 --- a/library/collections.abc.po +++ b/library/collections.abc.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-21 15:04+0200\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" @@ -30,10 +30,11 @@ 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 hashable or whether it is a mapping." +"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 " @@ -427,7 +428,7 @@ msgstr "``aclose``, ``__aiter__``, ``__anext__``" #: library/collections.abc.rst:184 msgid "Footnotes" -msgstr "" +msgstr "Notes" #: library/collections.abc.rst:185 msgid "" @@ -658,7 +659,7 @@ msgstr "" #: library/collections.abc.rst:350 msgid "Examples and Recipes" -msgstr "" +msgstr "Exemples et recettes" #: library/collections.abc.rst:352 #, fuzzy @@ -726,12 +727,13 @@ msgstr "" "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 hashable or immutable. To add set hashability using mixins, " -"inherit from both :meth:`Set` and :meth:`Hashable`, then define ``__hash__ = " -"Set._hash``." +"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__` " diff --git a/library/collections.po b/library/collections.po index a47447a23e..a61db4f061 100644 --- a/library/collections.po +++ b/library/collections.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-04 18:14+0100\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" @@ -69,7 +69,8 @@ msgid ":class:`Counter`" msgstr ":class:`Counter`" #: library/collections.rst:28 -msgid "dict subclass for counting hashable objects" +#, fuzzy +msgid "dict subclass for counting :term:`hashable` objects" msgstr "sous-classe de ``dict`` pour compter des objets hachables" #: library/collections.rst:29 @@ -378,8 +379,9 @@ msgstr "" "dénombrements. Par exemple ::" #: library/collections.rst:244 +#, fuzzy msgid "" -"A :class:`Counter` is a :class:`dict` subclass for counting hashable " +"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 " @@ -418,8 +420,9 @@ msgstr "" "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 " +"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 " @@ -432,8 +435,9 @@ msgstr "" "gauche, puis dans l'ordre d'apparition de l'opérande de droite." #: library/collections.rst:279 +#, fuzzy msgid "" -"Counter objects support three methods beyond those available for all " +"Counter objects support additional methods beyond those available for all " "dictionaries:" msgstr "" "En plus des méthodes disponibles pour tous les dictionnaires, les objets " @@ -538,14 +542,15 @@ 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. Each operation can accept inputs with " -"signed counts, but the output will exclude results with counts of zero or " -"less." +"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 " @@ -557,7 +562,7 @@ msgstr "" "comptages relatifs, mais la sortie exclut les résultats avec des comptages " "négatifs ou nuls." -#: library/collections.rst:383 +#: library/collections.rst:390 msgid "" "Unary addition and subtraction are shortcuts for adding an empty counter or " "subtracting from an empty counter." @@ -566,14 +571,14 @@ msgstr "" "raccourcis pour respectivement additionner un compteur avec un compteur vide " "ou et pour retrancher un compteur d'un compteur vide." -#: library/collections.rst:392 +#: 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:397 +#: 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 " @@ -586,7 +591,7 @@ msgstr "" "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:402 +#: 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 " @@ -597,7 +602,7 @@ msgstr "" "vocation à être des nombres représentants des comptages, mais il est " "*possible* de stocker n'importe quel type de valeur." -#: library/collections.rst:406 +#: library/collections.rst:413 msgid "" "The :meth:`~Counter.most_common` method requires only that the values be " "orderable." @@ -605,7 +610,7 @@ msgstr "" "La méthode :meth:`~Counter.most_common` exige uniquement que les valeurs " "soient ordonnables." -#: library/collections.rst:408 +#: 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 " @@ -619,7 +624,7 @@ msgstr "" "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:414 +#: 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 " @@ -632,7 +637,7 @@ msgstr "" "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:419 +#: library/collections.rst:426 msgid "" "The :meth:`~Counter.elements` method requires integer counts. It ignores " "zero and negative counts." @@ -640,7 +645,7 @@ msgstr "" "La méthode :meth:`~Counter.elements` exige des valeurs entières et ignore " "les valeurs négatives ou nulles." -#: library/collections.rst:424 +#: library/collections.rst:431 msgid "" "`Bag class `_ in Smalltalk." @@ -648,7 +653,7 @@ msgstr "" "`Bag class `_ dans Smalltalk." -#: library/collections.rst:427 +#: library/collections.rst:434 msgid "" "Wikipedia entry for `Multisets `_." msgstr "" @@ -656,7 +661,7 @@ msgstr "" "Multiensemble>`_ sur Wikipédia (ou `l'article en anglais `_)." -#: library/collections.rst:429 +#: library/collections.rst:436 msgid "" "`C++ multisets `_ tutorial with examples." @@ -664,7 +669,7 @@ msgstr "" "Des guides et exemples à propos des `multiensembles en C++ `_." -#: library/collections.rst:432 +#: 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 " @@ -674,7 +679,7 @@ msgstr "" "applications, voir *Knuth, Donald. The Art of Computer Programming Volume " "II, Section 4.6.3, Exercise 19*." -#: library/collections.rst:436 +#: 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`::" @@ -683,11 +688,11 @@ msgstr "" "ensemble donné d'éléments, voir :func:`itertools." "combinations_with_replacement` ::" -#: library/collections.rst:443 +#: library/collections.rst:450 msgid ":class:`deque` objects" msgstr "Objets :class:`deque`" -#: library/collections.rst:447 +#: 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 " @@ -697,7 +702,7 @@ msgstr "" "meth:`append`) avec les données d'*iterable*. Si *iterable* n'est pas " "spécifié, alors la nouvelle *deque* est vide." -#: library/collections.rst:450 +#: 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-" @@ -712,7 +717,7 @@ msgstr "" "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:455 +#: 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 " @@ -725,7 +730,7 @@ msgstr "" "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:461 +#: 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. " @@ -744,32 +749,32 @@ msgstr "" "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:470 +#: library/collections.rst:477 msgid "Deque objects support the following methods:" msgstr "Les objets *deques* gèrent les méthodes suivantes :" -#: library/collections.rst:474 +#: 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:479 +#: 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:484 +#: 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:489 +#: library/collections.rst:496 msgid "Create a shallow copy of the deque." msgstr "Crée une copie superficielle de la *deque*." -#: library/collections.rst:496 +#: 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:503 +#: library/collections.rst:510 msgid "" "Extend the right side of the deque by appending elements from the iterable " "argument." @@ -777,7 +782,7 @@ msgstr "" "Étend la *deque* en ajoutant les éléments de l'itérable en argument à son " "extrémité droite." -#: library/collections.rst:509 +#: 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 " @@ -787,7 +792,7 @@ msgstr "" "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:516 +#: 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` " @@ -797,11 +802,11 @@ msgstr "" "jusqu'à *stop* exclus). Renvoie la première correspondance ou lève :exc:" "`ValueError` si aucune n'est trouvée." -#: library/collections.rst:525 +#: 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:527 +#: library/collections.rst:534 msgid "" "If the insertion would cause a bounded deque to grow beyond *maxlen*, an :" "exc:`IndexError` is raised." @@ -809,7 +814,7 @@ 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:535 +#: 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`." @@ -817,7 +822,7 @@ 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:541 +#: 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`." @@ -825,7 +830,7 @@ 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:547 +#: library/collections.rst:554 msgid "" "Remove the first occurrence of *value*. If not found, raises a :exc:" "`ValueError`." @@ -833,13 +838,13 @@ msgstr "" "Supprime la première occurrence de *value*. Si aucune occurrence n'est " "trouvée, lève une exception :exc:`ValueError`." -#: library/collections.rst:553 +#: 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:560 +#: library/collections.rst:567 msgid "" "Rotate the deque *n* steps to the right. If *n* is negative, rotate to the " "left." @@ -847,7 +852,7 @@ 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:563 +#: 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 " @@ -857,16 +862,16 @@ msgstr "" "équivaut à ``d.appendleft(d.pop())`` et un décalage d'une place vers la " "gauche est équivalent à ``d.append(d.popleft())``." -#: library/collections.rst:568 +#: 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:572 +#: 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:577 +#: 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 " @@ -881,7 +886,7 @@ msgstr "" "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:583 +#: library/collections.rst:590 msgid "" "Starting in version 3.5, deques support ``__add__()``, ``__mul__()``, and " "``__imul__()``." @@ -889,20 +894,20 @@ msgstr "" "Depuis la version 3.5, les *deques* gèrent ``__add__()``, ``__mul__()`` et " "``__imul__()``." -#: library/collections.rst:586 +#: library/collections.rst:593 msgid "Example:" msgstr "Exemple :" -#: library/collections.rst:643 +#: library/collections.rst:650 msgid ":class:`deque` Recipes" msgstr "Cas pratiques utilisant :class:`deque`" -#: library/collections.rst:645 +#: 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:647 +#: library/collections.rst:654 msgid "" "Bounded length deques provide functionality similar to the ``tail`` filter " "in Unix::" @@ -910,7 +915,7 @@ msgstr "" "Les *deques* à taille limitée apportent une fonctionnalité similaire au " "filtre ``tail`` d'Unix ::" -#: library/collections.rst:655 +#: 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::" @@ -919,7 +924,7 @@ msgstr "" "d'éléments récemment ajoutés en les ajoutant à droite et en retirant les " "anciens par la gauche ::" -#: library/collections.rst:670 +#: library/collections.rst:677 msgid "" "A `round-robin scheduler `_ can be implemented with input iterators stored in a :" @@ -935,7 +940,7 @@ msgstr "" "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:689 +#: 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 " @@ -947,7 +952,7 @@ msgstr "" "utilise la méthode ``rotate()`` pour mettre en position les éléments à " "éjecter ::" -#: library/collections.rst:698 +#: 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. " @@ -964,11 +969,11 @@ msgstr "" "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:708 +#: library/collections.rst:715 msgid ":class:`defaultdict` objects" msgstr "Objets :class:`defaultdict`" -#: library/collections.rst:712 +#: 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 " @@ -981,7 +986,7 @@ msgstr "" "autres fonctionnalités sont les mêmes que celles des objets :class:`dict` et " "ne sont pas documentées ici." -#: library/collections.rst:717 +#: library/collections.rst:724 msgid "" "The first argument provides the initial value for the :attr:" "`default_factory` attribute; it defaults to ``None``. All remaining " @@ -994,7 +999,7 @@ msgstr "" "si on les passait au constructeur de :class:`dict`, y compris les arguments " "nommés." -#: library/collections.rst:723 +#: library/collections.rst:730 msgid "" ":class:`defaultdict` objects support the following method in addition to the " "standard :class:`dict` operations:" @@ -1002,7 +1007,7 @@ 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:728 +#: library/collections.rst:735 msgid "" "If the :attr:`default_factory` attribute is ``None``, this raises a :exc:" "`KeyError` exception with the *key* as argument." @@ -1010,7 +1015,7 @@ msgstr "" "Si l'attribut :attr:`default_factory` est ``None``, lève une exception :exc:" "`KeyError` avec *key* comme argument." -#: library/collections.rst:731 +#: 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 " @@ -1020,7 +1025,7 @@ msgstr "" "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:735 +#: library/collections.rst:742 msgid "" "If calling :attr:`default_factory` raises an exception this exception is " "propagated unchanged." @@ -1028,7 +1033,7 @@ msgstr "" "Si appeler :attr:`default_factory` lève une exception, celle-ci est " "transmise inchangée." -#: library/collections.rst:738 +#: 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 " @@ -1038,7 +1043,7 @@ msgstr "" "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:742 +#: 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 " @@ -1050,11 +1055,11 @@ msgstr "" "``None`` comme les dictionnaires natifs dans les cas triviaux et n'utilise " "pas :attr:`default_factory`." -#: library/collections.rst:748 +#: 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:753 +#: 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 " @@ -1064,18 +1069,18 @@ msgstr "" "initialisé par le premier argument passé au constructeur, s'il est spécifié, " "sinon par ``None``." -#: library/collections.rst:1154 +#: 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:763 +#: library/collections.rst:770 msgid ":class:`defaultdict` Examples" msgstr "Exemples utilisant :class:`defaultdict`" -#: library/collections.rst:765 +#: 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:" @@ -1084,7 +1089,7 @@ msgstr "" "le regroupement d'une séquence de paires clé-valeur en un dictionnaire de " "listes :" -#: library/collections.rst:776 +#: 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." @@ -1105,7 +1110,7 @@ msgstr "" "technique est plus simple et plus rapide qu'une technique équivalente " "utilisant :meth:`dict.setdefault` :" -#: library/collections.rst:791 +#: 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 " @@ -1115,7 +1120,7 @@ msgstr "" "classe :class:`defaultdict` pratique pour le comptage (comme un sac ou multi-" "ensemble dans d'autres langages) :" -#: library/collections.rst:803 +#: 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 " @@ -1127,7 +1132,7 @@ msgstr "" "appelle :func:`int` pour mettre un nouveau compteur à zéro. L'incrémentation " "augmente ensuite le comptage pour chaque lettre." -#: library/collections.rst:807 +#: 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 " @@ -1139,7 +1144,7 @@ msgstr "" "une fonction constante est d'utiliser une fonction lambda qui peut fournir " "n'importe quelle valeur constante (pas seulement zéro) :" -#: library/collections.rst:819 +#: 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:" @@ -1147,13 +1152,13 @@ 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:832 +#: 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:834 +#: 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 " @@ -1166,7 +1171,7 @@ msgstr "" "possibilité d'accéder à leurs champs grâce à leur nom au lieu de leur index " "de position." -#: library/collections.rst:840 +#: 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 " @@ -1182,7 +1187,7 @@ msgstr "" "méthode :meth:`__repr__` pratique qui liste le contenu du *n*-uplet au " "format ``nom=valeur``." -#: library/collections.rst:846 +#: 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 " @@ -1193,7 +1198,7 @@ msgstr "" "sont séparés par un espace et/ou une virgule, par exemple ``'x y'`` ou ``'x, " "y'``." -#: library/collections.rst:850 +#: 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, " @@ -1207,7 +1212,7 @@ msgstr "" "`keyword` tel que ``class``, ``for``, ``return``, ``global``, ``pass`` ou " "``raise``." -#: library/collections.rst:856 +#: library/collections.rst:863 msgid "" "If *rename* is true, invalid fieldnames are automatically replaced with " "positional names. For example, ``['abc', 'def', 'ghi', 'abc']`` is " @@ -1219,7 +1224,7 @@ msgstr "" "'ghi', 'abc']`` est converti en ``['abc, '_1', 'ghi', '_3']`` afin " "d'éliminer le mot-clé ``def`` et le doublon de ``abc``." -#: library/collections.rst:861 +#: 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, " @@ -1235,7 +1240,7 @@ msgstr "" "'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:868 +#: library/collections.rst:875 msgid "" "If *module* is defined, the ``__module__`` attribute of the named tuple is " "set to that value." @@ -1243,7 +1248,7 @@ msgstr "" "Si *module* est spécifié, alors il est assigné à l'attribut ``__module__`` " "du *n*-uplet nommé." -#: library/collections.rst:871 +#: 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." @@ -1252,7 +1257,7 @@ msgstr "" "sont donc légères et ne requièrent pas plus de mémoire que les *n*-uplets " "natifs." -#: library/collections.rst:874 +#: library/collections.rst:881 msgid "" "To support pickling, the named tuple class should be assigned to a variable " "that matches *typename*." @@ -1260,11 +1265,11 @@ 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:877 +#: library/collections.rst:884 msgid "Added support for *rename*." msgstr "Gestion de *rename*." -#: library/collections.rst:880 +#: library/collections.rst:887 msgid "" "The *verbose* and *rename* parameters became :ref:`keyword-only arguments " "`." @@ -1272,21 +1277,21 @@ msgstr "" "Les paramètres *verbose* et *rename* deviennent des :ref:`arguments " "obligatoirement nommés `." -#: library/collections.rst:884 +#: library/collections.rst:891 msgid "Added the *module* parameter." msgstr "Ajout du paramètre *module*." -#: library/collections.rst:887 +#: 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:890 +#: 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:910 +#: 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::" @@ -1295,7 +1300,7 @@ msgstr "" "champs à des *n*-uplets renvoyés par les modules :mod:`csv` ou :mod:" "`sqlite3` ::" -#: library/collections.rst:926 +#: 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 " @@ -1305,14 +1310,14 @@ msgstr "" "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:932 +#: 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:942 +#: library/collections.rst:949 msgid "" "Return a new :class:`dict` which maps field names to their corresponding " "values:" @@ -1320,11 +1325,11 @@ msgstr "" "Renvoie un nouveau :class:`dict` qui associe chaque nom de champ à sa valeur " "correspondante :" -#: library/collections.rst:951 +#: 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:954 +#: 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 " @@ -1337,7 +1342,7 @@ msgstr "" "nécessaires, la solution préconisée est de convertir le résultat vers le " "type souhaité : ``OrderedDict(nt._asdict())``." -#: library/collections.rst:963 +#: library/collections.rst:970 msgid "" "Return a new instance of the named tuple replacing specified fields with new " "values::" @@ -1345,7 +1350,7 @@ msgstr "" "Renvoie une nouvelle instance du *n*-uplet nommé en remplaçant les champs " "spécifiés par leurs nouvelles valeurs ::" -#: library/collections.rst:975 +#: 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." @@ -1354,11 +1359,11 @@ msgstr "" "l'introspection et pour créer de nouveaux types de *n*-uplets nommés à " "partir d'existants." -#: library/collections.rst:990 +#: 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:1000 +#: library/collections.rst:1007 msgid "" "To retrieve a field whose name is stored in a string, use the :func:" "`getattr` function:" @@ -1366,7 +1371,7 @@ 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:1006 +#: 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`):" @@ -1374,7 +1379,7 @@ 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:1013 +#: 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 " @@ -1384,7 +1389,7 @@ msgstr "" "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:1032 +#: 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 " @@ -1394,7 +1399,7 @@ msgstr "" "permet de garder une emprunte mémoire faible en empêchant la création de " "dictionnaire d'instance." -#: library/collections.rst:1035 +#: 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` " @@ -1404,7 +1409,7 @@ msgstr "" "préférable de simplement créer un nouveau type de *n*-uplet nommé avec " "l'attribut :attr:`~somenamedtuple._fields` :" -#: library/collections.rst:1040 +#: library/collections.rst:1047 msgid "" "Docstrings can be customized by making direct assignments to the ``__doc__`` " "fields:" @@ -1412,11 +1417,11 @@ msgstr "" "Les *docstrings* peuvent être personnalisées en modifiant directement " "l'attribut ``__doc__`` :" -#: library/collections.rst:1049 +#: library/collections.rst:1056 msgid "Property docstrings became writeable." msgstr "La propriété devient éditable." -#: library/collections.rst:1054 +#: 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` " @@ -1426,7 +1431,7 @@ msgstr "" "type pour les *n*-uplets nommés. Cela propose aussi une notation élégante " "utilisant le mot-clé :keyword:`class` ::" -#: library/collections.rst:1063 +#: library/collections.rst:1070 msgid "" "See :meth:`types.SimpleNamespace` for a mutable namespace based on an " "underlying dictionary instead of a tuple." @@ -1434,7 +1439,7 @@ 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:1066 +#: library/collections.rst:1073 msgid "" "The :mod:`dataclasses` module provides a decorator and functions for " "automatically adding generated special methods to user-defined classes." @@ -1443,11 +1448,11 @@ msgstr "" "ajouter automatiquement des méthodes spéciales générées aux classes définies " "par l’utilisateur." -#: library/collections.rst:1071 +#: library/collections.rst:1078 msgid ":class:`OrderedDict` objects" msgstr "Objets :class:`OrderedDict`" -#: library/collections.rst:1073 +#: 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 " @@ -1459,11 +1464,11 @@ msgstr "" "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:1079 +#: 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:1081 +#: library/collections.rst:1088 msgid "" "The regular :class:`dict` was designed to be very good at mapping " "operations. Tracking insertion order was secondary." @@ -1472,7 +1477,7 @@ msgstr "" "opérations de correspondance. Garder une trace de l'ordre d'insertion était " "secondaire." -#: library/collections.rst:1084 +#: 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 " @@ -1482,12 +1487,12 @@ msgstr "" "opérations de ré-arrangement. L'occupation mémoire, la vitesse de parcours " "et les performances de mise à jour étaient secondaires." -#: library/collections.rst:1088 +#: library/collections.rst:1095 +#, fuzzy msgid "" -"Algorithmically, :class:`OrderedDict` can handle frequent reordering " -"operations better than :class:`dict`. This makes it suitable for tracking " -"recent accesses (for example in an `LRU cache `_)." +"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 " @@ -1495,13 +1500,19 @@ msgstr "" "com/@krishankantsinghal/my-first-blog-on-medium-583159139237>`_ pour *Least " "Recently Used* en anglais)." -#: library/collections.rst:1093 +#: 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:1095 +#: 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." @@ -1510,7 +1521,20 @@ msgstr "" "différente. Elle accepte un argument optionnel pour spécifier quel élément " "doit être enlevé." -#: library/collections.rst:1098 +#: 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." @@ -1518,12 +1542,26 @@ msgstr "" ":class:`OrderedDict` possède une méthode :meth:`move_to_end` pour déplacer " "efficacement un élément à la fin." -#: library/collections.rst:1101 +#: 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:1106 +#: library/collections.rst:1130 msgid "" "Return an instance of a :class:`dict` subclass that has methods specialized " "for rearranging dictionary order." @@ -1531,7 +1569,7 @@ 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:1113 +#: 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-" @@ -1545,18 +1583,19 @@ msgstr "" "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:1120 +#: 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::" +"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:1135 +#: library/collections.rst:1161 msgid "" "In addition to the usual mapping methods, ordered dictionaries also support " "reverse iteration using :func:`reversed`." @@ -1564,7 +1603,7 @@ 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:1138 +#: 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 " @@ -1580,7 +1619,7 @@ msgstr "" "(comme les dictionnaires natifs). Cela permet substituer des objets :class:" "`OrderedDict` partout où les dictionnaires natifs sont utilisés." -#: library/collections.rst:1145 +#: library/collections.rst:1171 msgid "" "The items, keys, and values :term:`views ` of :class:" "`OrderedDict` now support reverse iteration using :func:`reversed`." @@ -1589,7 +1628,7 @@ msgstr "" "class:`OrderedDict` gèrent maintenant l'itération en sens inverse en " "utilisant :func:`reversed`." -#: library/collections.rst:1149 +#: 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." @@ -1598,11 +1637,11 @@ msgstr "" "au constructeur et à la méthode :meth:`update` de :class:`OrderedDict` est " "conservé." -#: library/collections.rst:1159 +#: library/collections.rst:1185 msgid ":class:`OrderedDict` Examples and Recipes" msgstr "Exemples et cas pratiques utilisant :class:`OrderDict`" -#: library/collections.rst:1161 +#: 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 " @@ -1614,7 +1653,7 @@ msgstr "" "entrée écrase une existante, la position d'insertion d'origine est modifiée " "et déplacée à la fin ::" -#: library/collections.rst:1173 +#: library/collections.rst:1199 msgid "" "An :class:`OrderedDict` would also be useful for implementing variants of :" "func:`functools.lru_cache`:" @@ -1622,11 +1661,11 @@ msgstr "" "Un :class:`OrderedDict` peut aussi être utile pour implémenter des variantes " "de :func:`functools.lru_cache` :" -#: library/collections.rst:1271 +#: library/collections.rst:1297 msgid ":class:`UserDict` objects" msgstr "Objets :class:`UserDict`" -#: library/collections.rst:1273 +#: 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 " @@ -1639,7 +1678,7 @@ msgstr "" "travailler avec celle-ci, car le dictionnaire sous-jacent est accessible " "comme attribut." -#: library/collections.rst:1281 +#: 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 :" @@ -1653,7 +1692,7 @@ msgstr "" "initialisé avec son contenu. Remarquez qu'une référence vers *initialdata* " "n'est pas conservée, ce qui permet de l'utiliser pour d'autres tâches." -#: library/collections.rst:1287 +#: library/collections.rst:1313 msgid "" "In addition to supporting the methods and operations of mappings, :class:" "`UserDict` instances provide the following attribute:" @@ -1661,18 +1700,18 @@ msgstr "" "En plus de gérer les méthodes et opérations des dictionnaires, les instances " "de :class:`UserDict` fournissent l'attribut suivant :" -#: library/collections.rst:1292 +#: 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:1298 +#: library/collections.rst:1324 msgid ":class:`UserList` objects" msgstr "Objets :class:`UserList`" -#: library/collections.rst:1300 +#: 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 " @@ -1684,7 +1723,7 @@ msgstr "" "et surcharger les méthodes existantes ou en ajouter de nouvelles. Ainsi, on " "peut ajouter de nouveaux comportements aux listes." -#: library/collections.rst:1305 +#: 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 " @@ -1695,7 +1734,7 @@ msgstr "" "de travailler avec cette classe, car la liste sous-jacente est accessible " "via un attribut." -#: library/collections.rst:1311 +#: 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:" @@ -1709,7 +1748,7 @@ msgstr "" "*list* peut être un itérable, par exemple une liste native ou un objet :" "class:`UserList`." -#: library/collections.rst:1317 +#: library/collections.rst:1343 msgid "" "In addition to supporting the methods and operations of mutable sequences, :" "class:`UserList` instances provide the following attribute:" @@ -1717,7 +1756,7 @@ msgstr "" "En plus de gérer les méthodes et opérations des séquences muables, les " "instances de :class:`UserList` possèdent l'attribut suivant :" -#: library/collections.rst:1322 +#: library/collections.rst:1348 msgid "" "A real :class:`list` object used to store the contents of the :class:" "`UserList` class." @@ -1725,7 +1764,7 @@ msgstr "" "Un objet :class:`list` natif utilisé pour stocker le contenu de la classe :" "class:`UserList`." -#: library/collections.rst:1325 +#: 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 " @@ -1741,7 +1780,7 @@ msgstr "" "constructeur doit pouvoir être appelé avec un unique paramètre, un objet " "séquence utilisé comme source de données." -#: library/collections.rst:1332 +#: 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 " @@ -1753,11 +1792,11 @@ msgstr "" "de consulter les sources pour obtenir des informations sur les méthodes qui " "doivent être fournies dans ce cas." -#: library/collections.rst:1338 +#: library/collections.rst:1364 msgid ":class:`UserString` objects" msgstr "Objets :class:`UserString`" -#: library/collections.rst:1340 +#: 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 " @@ -1770,7 +1809,7 @@ msgstr "" "plus facile de travailler avec cette classe, car la chaîne de caractère sous-" "jacente est accessible via un attribut." -#: library/collections.rst:1348 +#: 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 " @@ -1784,7 +1823,7 @@ msgstr "" "initialement une copie de *seq*, qui peut être n'importe quel objet " "convertible en chaîne de caractère avec la fonction native :func:`str`." -#: library/collections.rst:1355 +#: library/collections.rst:1381 msgid "" "In addition to supporting the methods and operations of strings, :class:" "`UserString` instances provide the following attribute:" @@ -1792,7 +1831,7 @@ msgstr "" "En plus de gérer les méthodes et opérations sur les chaînes de caractères, " "les instances de :class:`UserString` possèdent l'attribut suivant :" -#: library/collections.rst:1360 +#: library/collections.rst:1386 msgid "" "A real :class:`str` object used to store the contents of the :class:" "`UserString` class." @@ -1800,7 +1839,7 @@ msgstr "" "Un objet :class:`str` natif utilisé pour stocker le contenu de la classe :" "class:`UserString`." -#: library/collections.rst:1363 +#: library/collections.rst:1389 msgid "" "New methods ``__getnewargs__``, ``__rmod__``, ``casefold``, ``format_map``, " "``isprintable``, and ``maketrans``." diff --git a/library/compileall.po b/library/compileall.po index 771455d598..d7f1389547 100644 --- a/library/compileall.po +++ b/library/compileall.po @@ -5,8 +5,8 @@ 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: 2021-11-06 20:58+0100\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" @@ -61,8 +61,8 @@ 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 `." +"reçoit aucun argument, il fait comme s'il avait été appelé avec ``-l ``." #: library/compileall.rst:35 msgid "" @@ -380,10 +380,11 @@ msgstr "" "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``, ``bytes`` or :py:class:`os.PathLike`." +"``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 " diff --git a/library/concurrent.futures.po b/library/concurrent.futures.po index 11e081e640..0204292d80 100644 --- a/library/concurrent.futures.po +++ b/library/concurrent.futures.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-09-23 16:16+0200\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" @@ -51,7 +51,7 @@ msgstr "" #: library/concurrent.futures.rst:33 msgid "" -"Schedules the callable, *fn*, to be executed as ``fn(*args **kwargs)`` and " +"Schedules the callable, *fn*, to be executed as ``fn(*args, **kwargs)`` and " "returns a :class:`Future` object representing the execution of the " "callable. ::" msgstr "" @@ -171,6 +171,16 @@ 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 " @@ -178,7 +188,7 @@ msgid "" "well as any attempt to submit more jobs to the pool." msgstr "" -#: library/concurrent.futures.rst:158 +#: 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:" @@ -187,18 +197,18 @@ msgid "" "`ProcessPoolExecutor`." msgstr "" -#: library/concurrent.futures.rst:166 +#: 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:171 library/concurrent.futures.rst:265 +#: library/concurrent.futures.rst:178 library/concurrent.futures.rst:272 msgid "Added the *initializer* and *initargs* arguments." msgstr "" -#: library/concurrent.futures.rst:174 +#: 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. " @@ -206,21 +216,21 @@ msgid "" "And it avoids using very large resources implicitly on many-core machines." msgstr "" -#: library/concurrent.futures.rst:180 +#: library/concurrent.futures.rst:187 msgid "" "ThreadPoolExecutor now reuses idle worker threads before starting " "*max_workers* worker threads too." msgstr "" -#: library/concurrent.futures.rst:187 +#: library/concurrent.futures.rst:194 msgid "ThreadPoolExecutor Example" msgstr "" -#: library/concurrent.futures.rst:219 +#: library/concurrent.futures.rst:226 msgid "ProcessPoolExecutor" msgstr "ProcessPoolExecutor" -#: library/concurrent.futures.rst:221 +#: 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:" @@ -230,20 +240,20 @@ msgid "" "returned." msgstr "" -#: library/concurrent.futures.rst:228 +#: 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:231 +#: 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:236 +#: 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 " @@ -257,7 +267,7 @@ msgid "" "not given, the default multiprocessing context is used." msgstr "" -#: library/concurrent.futures.rst:249 +#: 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 " @@ -266,7 +276,7 @@ msgid "" "well as any attempt to submit more jobs to the pool." msgstr "" -#: library/concurrent.futures.rst:255 +#: library/concurrent.futures.rst:262 msgid "" "When one of the worker processes terminates abruptly, a :exc:" "`BrokenProcessPool` error is now raised. Previously, behaviour was " @@ -274,34 +284,34 @@ msgid "" "or deadlock." msgstr "" -#: library/concurrent.futures.rst:261 +#: 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:271 +#: library/concurrent.futures.rst:278 msgid "ProcessPoolExecutor Example" msgstr "" -#: library/concurrent.futures.rst:309 +#: library/concurrent.futures.rst:316 msgid "Future Objects" msgstr "" -#: library/concurrent.futures.rst:311 +#: 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:316 +#: 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:322 +#: 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 " @@ -309,22 +319,22 @@ msgid "" "``True``." msgstr "" -#: library/concurrent.futures.rst:329 +#: library/concurrent.futures.rst:336 msgid "Return ``True`` if the call was successfully cancelled." msgstr "" -#: library/concurrent.futures.rst:333 +#: library/concurrent.futures.rst:340 msgid "" "Return ``True`` if the call is currently being executed and cannot be " "cancelled." msgstr "" -#: library/concurrent.futures.rst:338 +#: library/concurrent.futures.rst:345 msgid "" "Return ``True`` if the call was successfully cancelled or finished running." msgstr "" -#: library/concurrent.futures.rst:343 +#: 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 " @@ -333,18 +343,18 @@ msgid "" "``None``, there is no limit to the wait time." msgstr "" -#: library/concurrent.futures.rst:350 library/concurrent.futures.rst:364 +#: 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:353 +#: library/concurrent.futures.rst:360 msgid "" "If the call raised an exception, this method will raise the same exception." msgstr "" -#: library/concurrent.futures.rst:357 +#: 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 " @@ -353,18 +363,18 @@ msgid "" "*timeout* is not specified or ``None``, there is no limit to the wait time." msgstr "" -#: library/concurrent.futures.rst:367 +#: library/concurrent.futures.rst:374 msgid "If the call completed without raising, ``None`` is returned." msgstr "" -#: library/concurrent.futures.rst:371 +#: 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:375 +#: 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 " @@ -373,91 +383,92 @@ msgid "" "behavior is undefined." msgstr "" -#: library/concurrent.futures.rst:381 +#: 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:384 +#: 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:389 +#: 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:393 +#: 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 " +"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:398 +#: 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`." +"will return ``True``." msgstr "" -#: library/concurrent.futures.rst:402 +#: 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:408 +#: library/concurrent.futures.rst:415 msgid "" "Sets the result of the work associated with the :class:`Future` to *result*." msgstr "" -#: library/concurrent.futures.rst:411 library/concurrent.futures.rst:424 +#: 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:414 library/concurrent.futures.rst:427 +#: 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:421 +#: 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:433 +#: library/concurrent.futures.rst:440 msgid "Module Functions" msgstr "" -#: library/concurrent.futures.rst:437 +#: library/concurrent.futures.rst:444 msgid "" "Wait for the :class:`Future` instances (possibly created by different :class:" -"`Executor` instances) given by *fs* to complete. Returns a named 2-tuple of " +"`Executor` instances) given by *fs* to complete. Duplicate futures given to " +"*fs* are removed and will be returned only once. Returns a named 2-tuple of " "sets. The first set, named ``done``, contains the futures that completed " "(finished or cancelled futures) before the wait completed. The second set, " "named ``not_done``, contains the futures that did not complete (pending or " "running futures)." msgstr "" -#: library/concurrent.futures.rst:444 +#: library/concurrent.futures.rst: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:448 +#: library/concurrent.futures.rst:456 msgid "" "*return_when* indicates when this function should return. It must be one of " "the following constants:" @@ -465,28 +476,28 @@ msgstr "" "*return_when* indique quand la fonction doit se terminer. Il peut prendre " "les valeurs suivantes :" -#: library/concurrent.futures.rst:454 +#: library/concurrent.futures.rst:462 msgid "Constant" msgstr "Constante" -#: library/concurrent.futures.rst:454 +#: library/concurrent.futures.rst:462 msgid "Description" msgstr "Description" -#: library/concurrent.futures.rst:456 +#: library/concurrent.futures.rst:464 msgid ":const:`FIRST_COMPLETED`" msgstr ":const:`FIRST_COMPLETED`" -#: library/concurrent.futures.rst:456 +#: 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:459 +#: library/concurrent.futures.rst:467 msgid ":const:`FIRST_EXCEPTION`" msgstr ":const:`FIRST_EXCEPTION`" -#: library/concurrent.futures.rst:459 +#: 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:" @@ -496,16 +507,16 @@ msgstr "" "exception. Si aucun *futur* ne lève d'exception, équivaut à :const:" "`ALL_COMPLETED`." -#: library/concurrent.futures.rst:465 +#: library/concurrent.futures.rst:473 msgid ":const:`ALL_COMPLETED`" msgstr ":const:`ALL_COMPLETED`" -#: library/concurrent.futures.rst:465 +#: 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:471 +#: 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 " @@ -519,49 +530,49 @@ msgid "" "wait time." msgstr "" -#: library/concurrent.futures.rst:485 +#: library/concurrent.futures.rst:493 msgid ":pep:`3148` -- futures - execute computations asynchronously" msgstr "" -#: library/concurrent.futures.rst:485 +#: library/concurrent.futures.rst:493 msgid "" "The proposal which described this feature for inclusion in the Python " "standard library." msgstr "" -#: library/concurrent.futures.rst:490 +#: library/concurrent.futures.rst:498 msgid "Exception classes" msgstr "" -#: library/concurrent.futures.rst:496 +#: library/concurrent.futures.rst:504 msgid "Raised when a future is cancelled." msgstr "" -#: library/concurrent.futures.rst:500 +#: library/concurrent.futures.rst:508 msgid "Raised when a future operation exceeds the given timeout." msgstr "" -#: library/concurrent.futures.rst:504 +#: 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:512 +#: 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:521 +#: 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:531 +#: 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 " diff --git a/library/configparser.po b/library/configparser.po index af8c7a5532..997398bceb 100644 --- a/library/configparser.po +++ b/library/configparser.po @@ -5,8 +5,8 @@ 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-16 17:25+0100\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" @@ -203,11 +203,12 @@ msgstr "" "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.com'``, we will always get the default, even if we " +"``'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 " @@ -269,6 +270,12 @@ msgstr "" #: 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]_" @@ -278,15 +285,15 @@ msgstr "" "commentaires peuvent apparaître à l'emplacement d'une ligne vide, et peuvent " "aussi être indentés. [1]_" -#: library/configparser.rst:337 +#: library/configparser.rst:340 msgid "For example:" msgstr "Par exemple :" -#: library/configparser.rst:322 +#: library/configparser.rst:325 msgid "Interpolation of values" msgstr "Interpolation des valeurs" -#: library/configparser.rst:324 +#: library/configparser.rst:327 msgid "" "On top of the core functionality, :class:`ConfigParser` supports " "interpolation. This means values can be preprocessed before returning them " @@ -296,7 +303,7 @@ msgstr "" "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:332 +#: 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, " @@ -309,7 +316,7 @@ msgstr "" "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:349 +#: 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 " @@ -326,17 +333,17 @@ msgstr "" "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:356 +#: 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/" +"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/" +"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:364 +#: 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 " @@ -353,7 +360,7 @@ msgstr "" "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:371 +#: library/configparser.rst:375 msgid "" "For example, the configuration specified above with basic interpolation, " "would look like this with extended interpolation:" @@ -361,16 +368,16 @@ msgstr "" "Voici comment transformer la configuration ci-dessus avec la syntaxe " "d'interpolation étendue :" -#: library/configparser.rst:384 +#: 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:406 +#: library/configparser.rst:411 msgid "Mapping Protocol Access" msgstr "Protocole d'accès associatif" -#: library/configparser.rst:410 +#: 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:" @@ -383,7 +390,7 @@ msgstr "" "l’implémentation du protocole utilise la notation ``parser['section']" "['option']``." -#: library/configparser.rst:415 +#: 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 " @@ -398,7 +405,7 @@ msgstr "" "mandataire pour une section, elles sont en réalité changées dans l'analyseur " "initial." -#: library/configparser.rst:421 +#: 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:" @@ -411,7 +418,7 @@ msgstr "" "MutableMapping`. Cependant, il faut prendre en compte un certain nombre de " "différences :" -#: library/configparser.rst:426 +#: 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 " @@ -425,7 +432,7 @@ msgstr "" "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:434 +#: 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 " @@ -443,25 +450,25 @@ msgstr "" "visible. Essayer de détruire une valeur par défaut lève l'exception :exc:" "`KeyError`." -#: library/configparser.rst:441 +#: 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:443 +#: 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:445 +#: library/configparser.rst:450 msgid "``parser.clear()`` leaves it intact," msgstr "appeler ``parser.clear()`` la laisse intacte ;" -#: library/configparser.rst:447 +#: library/configparser.rst:452 msgid "``parser.popitem()`` never returns it." msgstr "appeler ``parser.popitem()`` ne la renvoie jamais." -#: library/configparser.rst:449 +#: 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 " @@ -472,7 +479,7 @@ msgstr "" "``get()`` fournies par les sections sont compatibles à la fois avec le " "protocole associatif et avec l'API classique de *configparser*." -#: library/configparser.rst:453 +#: 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). " @@ -489,7 +496,7 @@ msgstr "" "section spécifiée, en interprétant les interpolations (à moins d'utiliser " "``raw=True``)." -#: library/configparser.rst:460 +#: 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 " @@ -499,11 +506,11 @@ msgstr "" "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:466 +#: library/configparser.rst:471 msgid "Customizing Parser Behaviour" msgstr "Personnalisation du comportement de l'analyseur" -#: library/configparser.rst:468 +#: 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 " @@ -518,7 +525,7 @@ msgstr "" "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:474 +#: 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:" @@ -527,11 +534,11 @@ msgstr "" "comporte un analyseur est d’utiliser les options de la méthode :meth:" "`__init__` :" -#: library/configparser.rst:477 +#: library/configparser.rst:482 msgid "*defaults*, default value: ``None``" msgstr "*defaults*, valeur par défaut : ``None``" -#: library/configparser.rst:479 +#: 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 " @@ -544,7 +551,7 @@ msgstr "" "besoin de spécifier de valeurs lorsque celles-ci sont identiques aux valeurs " "par défaut documentées." -#: library/configparser.rst:484 +#: 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." @@ -553,11 +560,11 @@ msgstr "" "configuration si vous voulez spécifier des valeurs par défaut pour une " "section spécifique." -#: library/configparser.rst:487 +#: library/configparser.rst:492 msgid "*dict_type*, default value: :class:`dict`" msgstr "*dict_type*, valeur par défaut : :class:`dict`" -#: library/configparser.rst:489 +#: 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, " @@ -570,7 +577,7 @@ msgstr "" "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:494 +#: library/configparser.rst:499 msgid "" "An alternative dictionary type can be used for example to sort sections and " "options on write-back." @@ -578,7 +585,7 @@ 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:497 +#: 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 " @@ -588,11 +595,11 @@ msgstr "" "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:519 +#: library/configparser.rst:524 msgid "*allow_no_value*, default value: ``False``" msgstr "*allow_no_value*, valeur par défaut : ``False``" -#: library/configparser.rst:521 +#: 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 " @@ -605,11 +612,11 @@ msgstr "" "valeurs sont acceptables, utilisez le paramètre *allow_no_value* lors de la " "construction de l'instance :" -#: library/configparser.rst:556 +#: library/configparser.rst:561 msgid "*delimiters*, default value: ``('=', ':')``" msgstr "*delimiters*, valeur par défaut : ``('=', ':')``" -#: library/configparser.rst:558 +#: 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 " @@ -620,7 +627,7 @@ msgstr "" "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:562 +#: library/configparser.rst:567 msgid "" "See also the *space_around_delimiters* argument to :meth:`ConfigParser." "write`." @@ -628,19 +635,19 @@ msgstr "" "Voir aussi l'argument *space_around_delimiters* de la méthode :meth:" "`ConfigParser.write`." -#: library/configparser.rst:565 +#: library/configparser.rst:570 msgid "*comment_prefixes*, default value: ``('#', ';')``" msgstr "" "*comment_prefixes* (préfixes de commentaire) — valeur par défaut : ``('#', " "';')``" -#: library/configparser.rst:567 +#: 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:569 +#: 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 " @@ -656,9 +663,9 @@ msgstr "" "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 ``';'``." +"sont ``'#'`` et ``';'``." -#: library/configparser.rst:576 +#: library/configparser.rst:581 msgid "" "In previous versions of :mod:`configparser` behaviour matched " "``comment_prefixes=('#',';')`` and ``inline_comment_prefixes=(';',)``." @@ -667,7 +674,7 @@ msgstr "" "en utilisant ``comment_prefixes=('#',';')`` et " "``inline_comment_prefixes=(';',)``." -#: library/configparser.rst:580 +#: 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 " @@ -684,11 +691,11 @@ msgstr "" "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:626 +#: library/configparser.rst:631 msgid "*strict*, default value: ``True``" msgstr "*scrict*, valeur par défaut : ``True``" -#: library/configparser.rst:628 +#: 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`, :" @@ -701,7 +708,7 @@ msgstr "" "est recommandé d'utiliser un mode de fonctionnement strict pour les " "analyseurs employés par de nouvelles applications." -#: library/configparser.rst:633 +#: library/configparser.rst:638 msgid "" "In previous versions of :mod:`configparser` behaviour matched " "``strict=False``." @@ -709,11 +716,11 @@ msgstr "" "Les versions précédentes du module :mod:`configparser` se comportent comme " "en utilisant ``strict=False``." -#: library/configparser.rst:637 +#: 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:639 +#: 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 " @@ -730,7 +737,7 @@ msgstr "" "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:654 +#: 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 " @@ -745,33 +752,33 @@ msgstr "" "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:660 +#: library/configparser.rst:665 msgid "" -"*default_section*, default value: ``configparser.DEFAULTSECT`` (that is: ``" -"\"DEFAULT\"``)" +"*default_section*, default value: ``configparser.DEFAULTSECT`` (that is: " +"``\"DEFAULT\"``)" msgstr "" "*default_section*, valeur par défaut : ``configparser.DEFAULTSECT`` " "(autrement dit : ``\"DEFAULT\"``)" -#: library/configparser.rst:663 +#: 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 " +"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:674 +#: library/configparser.rst:679 msgid "*interpolation*, default value: ``configparser.BasicInterpolation``" msgstr "" -#: library/configparser.rst:676 +#: 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 " @@ -781,11 +788,11 @@ msgid "" "`RawConfigParser` has a default value of ``None``." msgstr "" -#: library/configparser.rst:683 +#: library/configparser.rst:688 msgid "*converters*, default value: not set" msgstr "" -#: library/configparser.rst:685 +#: library/configparser.rst:690 msgid "" "Config parsers provide option value getters that perform type conversion. " "By default :meth:`~ConfigParser.getint`, :meth:`~ConfigParser.getfloat`, " @@ -799,7 +806,7 @@ msgid "" "``parser_instance['section'].getdecimal('key', 0)``." msgstr "" -#: library/configparser.rst:696 +#: 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 " @@ -807,14 +814,14 @@ msgid "" "the dict-compatible form (see the ``getdecimal()`` example above)." msgstr "" -#: library/configparser.rst:701 +#: 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:707 +#: library/configparser.rst:712 msgid "" "By default when using :meth:`~ConfigParser.getboolean`, config parsers " "consider the following values ``True``: ``'1'``, ``'yes'``, ``'true'``, " @@ -823,19 +830,19 @@ msgid "" "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'``, " +"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:725 +#: library/configparser.rst:730 msgid "" "Other typical Boolean pairs include ``accept``/``reject`` or ``enabled``/" "``disabled``." msgstr "" -#: library/configparser.rst:731 +#: 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 " @@ -843,14 +850,14 @@ msgid "" "method if that's unsuitable. For example:" msgstr "" -#: library/configparser.rst:761 +#: 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:768 +#: 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 " @@ -859,18 +866,18 @@ msgid "" "example:" msgstr "" -#: library/configparser.rst:796 +#: 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:802 +#: library/configparser.rst:807 msgid "Legacy API Examples" msgstr "" -#: library/configparser.rst:804 +#: library/configparser.rst:809 msgid "" "Mainly because of backwards compatibility concerns, :mod:`configparser` " "provides also a legacy API with explicit ``get``/``set`` methods. While " @@ -879,29 +886,29 @@ msgid "" "advanced, low-level and downright counterintuitive." msgstr "" -#: library/configparser.rst:810 +#: library/configparser.rst:815 msgid "An example of writing to a configuration file::" msgstr "" -#: library/configparser.rst:833 +#: library/configparser.rst:838 msgid "An example of reading the configuration file again::" msgstr "" -#: library/configparser.rst:851 +#: library/configparser.rst:856 msgid "To get interpolation, use :class:`ConfigParser`::" msgstr "" -#: library/configparser.rst:884 +#: 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:902 +#: library/configparser.rst:907 msgid "ConfigParser Objects" msgstr "" -#: library/configparser.rst:906 +#: 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 " @@ -909,7 +916,7 @@ msgid "" "the options within a section, and for the default values." msgstr "" -#: library/configparser.rst:911 +#: 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 " @@ -918,7 +925,7 @@ msgid "" "as the set of substrings that prefix comments in non-empty lines." msgstr "" -#: library/configparser.rst:917 +#: 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, " @@ -931,7 +938,7 @@ msgid "" "without the trailing delimiter." msgstr "" -#: library/configparser.rst:927 +#: 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 " @@ -939,7 +946,7 @@ msgid "" "on runtime using the ``default_section`` instance attribute." msgstr "" -#: library/configparser.rst:932 +#: 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 " @@ -948,7 +955,7 @@ msgid "" "`dedicated documentation section <#interpolation-of-values>`_." msgstr "" -#: library/configparser.rst:938 +#: 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 " @@ -957,7 +964,7 @@ msgid "" "%(BAR)s`` are equivalent." msgstr "" -#: library/configparser.rst:944 +#: 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 " @@ -966,44 +973,44 @@ msgid "" "object and section proxies." msgstr "" -#: library/configparser.rst:950 +#: library/configparser.rst:955 msgid "The default *dict_type* is :class:`collections.OrderedDict`." msgstr "" -#: library/configparser.rst:953 +#: 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:958 +#: library/configparser.rst:963 msgid "The *converters* argument was added." msgstr "" -#: library/configparser.rst:961 +#: 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:1251 +#: library/configparser.rst:1256 msgid "" "The default *dict_type* is :class:`dict`, since it now preserves insertion " "order." msgstr "" -#: library/configparser.rst:972 +#: library/configparser.rst:977 msgid "Return a dictionary containing the instance-wide defaults." msgstr "" -#: library/configparser.rst:977 +#: 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:983 +#: 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 " @@ -1011,34 +1018,34 @@ msgid "" "the section must be a string; if not, :exc:`TypeError` is raised." msgstr "" -#: library/configparser.rst:988 +#: library/configparser.rst:993 msgid "Non-string section names raise :exc:`TypeError`." msgstr "" -#: library/configparser.rst:994 +#: 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:1000 +#: library/configparser.rst:1005 msgid "Return a list of options available in the specified *section*." msgstr "" -#: library/configparser.rst:1005 +#: 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:1012 +#: 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:1015 +#: 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* " @@ -1049,7 +1056,7 @@ msgid "" "be read." msgstr "" -#: library/configparser.rst:1024 +#: 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 " @@ -1057,52 +1064,52 @@ msgid "" "`read_file` before calling :meth:`read` for any optional files::" msgstr "" -#: library/configparser.rst:1037 +#: library/configparser.rst:1042 msgid "" "The *encoding* parameter. Previously, all files were read using the default " "encoding for :func:`open`." msgstr "" -#: library/configparser.rst:1041 +#: 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:1044 +#: library/configparser.rst:1049 msgid "The *filenames* parameter accepts a :class:`bytes` object." msgstr "" -#: library/configparser.rst:1050 +#: 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:1053 +#: 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:1057 +#: library/configparser.rst:1062 msgid "Replaces :meth:`readfp`." msgstr "" -#: library/configparser.rst:1062 +#: library/configparser.rst:1067 msgid "Parse configuration data from a string." msgstr "" -#: library/configparser.rst:1064 +#: 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:1073 +#: 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 " @@ -1111,17 +1118,17 @@ msgid "" "automatically converted to strings." msgstr "" -#: library/configparser.rst:1079 +#: 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:1082 +#: library/configparser.rst:1087 msgid "This method can be used to copy state between parsers." msgstr "" -#: library/configparser.rst:1089 +#: 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), " @@ -1130,35 +1137,35 @@ msgid "" "provided as a *fallback* value." msgstr "" -#: library/configparser.rst:1095 +#: 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:1099 +#: 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:1107 +#: 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:1114 +#: 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:1121 +#: 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 " @@ -1170,34 +1177,34 @@ msgid "" "*fallback*." msgstr "" -#: library/configparser.rst:1134 +#: 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:1137 +#: 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:1141 +#: 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:1149 +#: 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:1156 +#: 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 " @@ -1206,27 +1213,27 @@ msgid "" "surrounded by spaces." msgstr "" -#: library/configparser.rst:1164 +#: 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:1172 +#: 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:1180 +#: 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:1186 +#: 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 " @@ -1235,7 +1242,7 @@ msgid "" "of this name on instances to affect this behavior." msgstr "" -#: library/configparser.rst:1192 +#: 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 " @@ -1243,46 +1250,46 @@ msgid "" "sensitive::" msgstr "" -#: library/configparser.rst:1200 +#: 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:1206 +#: library/configparser.rst:1211 msgid "Use :meth:`read_file` instead." msgstr "" -#: library/configparser.rst:1209 +#: library/configparser.rst:1214 msgid "" ":meth:`readfp` now iterates on *fp* instead of calling ``fp.readline()``." msgstr "" -#: library/configparser.rst:1212 +#: 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:1222 +#: library/configparser.rst:1227 msgid "" "Instead of ``parser.readfp(fp)`` use ``parser." "read_file(readline_generator(fp))``." msgstr "" -#: library/configparser.rst:1228 +#: 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:1236 +#: library/configparser.rst:1241 msgid "RawConfigParser Objects" msgstr "" -#: library/configparser.rst:1246 +#: 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 " @@ -1290,27 +1297,27 @@ msgid "" "``defaults=`` keyword argument handling." msgstr "" -#: library/configparser.rst:1256 +#: 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:1263 +#: 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:1267 +#: 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:1273 +#: 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:" @@ -1320,7 +1327,7 @@ msgid "" "string values." msgstr "" -#: library/configparser.rst:1280 +#: 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 " @@ -1328,32 +1335,32 @@ msgid "" "not allow such assignments to take place." msgstr "" -#: library/configparser.rst:1287 +#: library/configparser.rst:1292 msgid "Exceptions" msgstr "Exceptions" -#: library/configparser.rst:1291 +#: library/configparser.rst:1296 msgid "Base class for all other :mod:`configparser` exceptions." msgstr "" -#: library/configparser.rst:1296 +#: library/configparser.rst:1301 msgid "Exception raised when a specified section is not found." msgstr "" -#: library/configparser.rst:1301 +#: 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:1305 +#: library/configparser.rst:1310 msgid "" "Optional ``source`` and ``lineno`` attributes and arguments to :meth:" "`__init__` were added." msgstr "" -#: library/configparser.rst:1312 +#: 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 " @@ -1361,58 +1368,58 @@ msgid "" "representing the same case-insensitive configuration key." msgstr "" -#: library/configparser.rst:1320 +#: library/configparser.rst:1325 msgid "" "Exception raised when a specified option is not found in the specified " "section." msgstr "" -#: library/configparser.rst:1326 +#: library/configparser.rst:1331 msgid "" "Base class for exceptions raised when problems occur performing string " "interpolation." msgstr "" -#: library/configparser.rst:1332 +#: 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:1339 +#: 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:1345 +#: 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:1351 +#: library/configparser.rst:1356 msgid "" "Exception raised when attempting to parse a file which has no section " "headers." msgstr "" -#: library/configparser.rst:1357 +#: library/configparser.rst:1362 msgid "Exception raised when errors occur attempting to parse a file." msgstr "" -#: library/configparser.rst:1359 +#: library/configparser.rst:1364 msgid "" "The ``filename`` attribute and :meth:`__init__` argument were renamed to " "``source`` for consistency." msgstr "" -#: library/configparser.rst:1365 +#: library/configparser.rst:1370 msgid "Footnotes" msgstr "Notes" -#: library/configparser.rst:1366 +#: 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 " diff --git a/library/contextlib.po b/library/contextlib.po index 51a86ab874..4db366b1d5 100644 --- a/library/contextlib.po +++ b/library/contextlib.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-27 10:27+0100\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" @@ -105,7 +105,11 @@ msgstr "" "L'exemple abstrait suivant présente comment assurer une gestion correcte des " "ressources ::" -#: library/contextlib.rst:73 +#: 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 " @@ -116,7 +120,7 @@ msgstr "" "seule valeur, qui est récupérée dans le bloc :keyword:`with` à l'aide de la " "clause :keyword:`!as` si précisée." -#: library/contextlib.rst:77 +#: 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 " @@ -144,7 +148,7 @@ msgstr "" "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:89 +#: 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` " @@ -163,11 +167,11 @@ msgstr "" "`contextmanager` de remplir la condition de pouvoir être invoqués plusieurs " "fois afin d'être utilisés comme décorateurs)." -#: library/contextlib.rst:96 +#: library/contextlib.rst:98 msgid "Use of :class:`ContextDecorator`." msgstr "Utilisation de la classe :class:`ContextDecorator`." -#: library/contextlib.rst:102 +#: library/contextlib.rst:104 msgid "" "Similar to :func:`~contextlib.contextmanager`, but creates an :ref:" "`asynchronous context manager `." @@ -175,7 +179,7 @@ msgstr "" "Similaire à :func:`~contextlib.contextmanager`, mais crée un :ref:" "`gestionnaire de contexte asynchrone `." -#: library/contextlib.rst:105 +#: 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, " @@ -190,11 +194,11 @@ msgstr "" "doit être appliqué à une fonction renvoyant un :term:`asynchronous " "generator`." -#: library/contextlib.rst:111 +#: library/contextlib.rst:113 msgid "A simple example::" msgstr "Un exemple simple ::" -#: library/contextlib.rst:129 +#: library/contextlib.rst:131 msgid "" "Context managers defined with :func:`asynccontextmanager` can be used either " "as decorators or with :keyword:`async with` statements::" @@ -203,7 +207,7 @@ msgstr "" "peuvent s'utiliser comme décorateurs ou dans les instructions :keyword:" "`async with` :" -#: library/contextlib.rst:147 +#: 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 " @@ -211,7 +215,7 @@ msgid "" "managers support multiple invocations in order to be used as decorators." msgstr "" -#: library/contextlib.rst:152 +#: library/contextlib.rst:154 #, fuzzy msgid "" "Async context managers created with :func:`asynccontextmanager` can be used " @@ -220,7 +224,7 @@ msgstr "" "Une classe mère qui permet à un gestionnaire de contexte d'être aussi " "utilisé comme décorateur." -#: library/contextlib.rst:159 +#: library/contextlib.rst:161 msgid "" "Return a context manager that closes *thing* upon completion of the block. " "This is basically equivalent to::" @@ -228,11 +232,11 @@ msgstr "" "Renvoie un gestionnaire de contexte qui ferme *thing* à la fin du bloc. " "C'est essentiellement équivalent à ::" -#: library/contextlib.rst:171 +#: 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:180 +#: 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." @@ -240,7 +244,7 @@ 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:186 +#: library/contextlib.rst:188 #, fuzzy msgid "" "Return an async context manager that calls the ``aclose()`` method of " @@ -249,14 +253,14 @@ msgstr "" "Renvoie un gestionnaire de contexte qui ferme *thing* à la fin du bloc. " "C'est essentiellement équivalent à ::" -#: library/contextlib.rst:198 +#: 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:209 +#: 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 " @@ -264,7 +268,7 @@ msgid "" "task it depends on)." msgstr "" -#: library/contextlib.rst:221 +#: 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 " @@ -274,11 +278,11 @@ msgstr "" "*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:235 +#: library/contextlib.rst:237 msgid "An example using *enter_result*::" msgstr "Un exemple utilisant *enter_result* ::" -#: library/contextlib.rst:248 +#: library/contextlib.rst:250 #, fuzzy msgid "" "It can also be used as a stand-in for :ref:`asynchronous context managers " @@ -287,11 +291,11 @@ msgstr "" "Similaire à :func:`~contextlib.contextmanager`, mais crée un :ref:" "`gestionnaire de contexte asynchrone `." -#: library/contextlib.rst:264 +#: library/contextlib.rst:266 msgid ":term:`asynchronous context manager` support was added." msgstr "" -#: library/contextlib.rst:271 +#: library/contextlib.rst:273 #, fuzzy msgid "" "Return a context manager that suppresses any of the specified exceptions if " @@ -303,7 +307,7 @@ msgstr "" "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:276 +#: 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 " @@ -315,19 +319,19 @@ msgstr "" "très spécifiques d'erreurs où il est certain que continuer silencieusement " "l'exécution du programme est la bonne chose à faire." -#: library/contextlib.rst:281 +#: library/contextlib.rst:283 msgid "For example::" msgstr "Par exemple ::" -#: library/contextlib.rst:291 +#: library/contextlib.rst:293 msgid "This code is equivalent to::" msgstr "Ce code est équivalent à ::" -#: library/contextlib.rst:343 library/contextlib.rst:353 +#: 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:310 +#: library/contextlib.rst:312 msgid "" "Context manager for temporarily redirecting :data:`sys.stdout` to another " "file or file-like object." @@ -335,7 +339,7 @@ msgstr "" "Gestionnaire de contexte servant à rediriger temporairement :data:`sys." "stdout` vers un autre fichier ou objet fichier-compatible." -#: library/contextlib.rst:313 +#: library/contextlib.rst:315 msgid "" "This tool adds flexibility to existing functions or classes whose output is " "hardwired to stdout." @@ -343,7 +347,7 @@ 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:316 +#: library/contextlib.rst:318 #, fuzzy msgid "" "For example, the output of :func:`help` normally is sent to *sys.stdout*. " @@ -356,7 +360,7 @@ msgstr "" "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:326 +#: library/contextlib.rst:328 msgid "" "To send the output of :func:`help` to a file on disk, redirect the output to " "a regular file::" @@ -364,11 +368,11 @@ msgstr "" "Pour envoyer la sortie de :func:`help` vers un fichier sur le disque, " "redirigez-la sur un fichier normal ::" -#: library/contextlib.rst:333 +#: 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:338 +#: 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 " @@ -382,7 +386,7 @@ msgstr "" "Cependant, cela reste une approche utile pour beaucoup de scripts " "utilitaires." -#: library/contextlib.rst:350 +#: library/contextlib.rst:352 msgid "" "Similar to :func:`~contextlib.redirect_stdout` but redirecting :data:`sys." "stderr` to another file or file-like object." @@ -390,14 +394,14 @@ msgstr "" "Similaire à :func:`~contextlib.redirect_stdout` mais redirige :data:`sys." "stderr` vers un autre fichier ou objet fichier-compatible." -#: library/contextlib.rst:360 +#: 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:362 +#: library/contextlib.rst:364 msgid "" "Context managers inheriting from ``ContextDecorator`` have to implement " "``__enter__`` and ``__exit__`` as normal. ``__exit__`` retains its optional " @@ -408,7 +412,7 @@ msgstr "" "conserve sa gestion optionnelle des exceptions même lors de l'utilisation en " "décorateur." -#: library/contextlib.rst:366 +#: library/contextlib.rst:368 msgid "" "``ContextDecorator`` is used by :func:`contextmanager`, so you get this " "functionality automatically." @@ -416,22 +420,26 @@ msgstr "" "``ContextDecorator`` est utilisé par :func:`contextmanager`, donc vous " "bénéficiez automatiquement de cette fonctionnalité." -#: library/contextlib.rst:369 +#: library/contextlib.rst:371 msgid "Example of ``ContextDecorator``::" msgstr "Exemple de ``ContextDecorator`` ::" -#: library/contextlib.rst:398 +#: 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:404 +#: library/contextlib.rst:408 msgid "``ContextDecorator`` lets you instead write::" msgstr "``ContextDecorator`` vous permet d'écrire à la place ::" -#: library/contextlib.rst:410 +#: 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)." @@ -440,7 +448,7 @@ msgstr "" "seulement à un morceau en particulier (et gagner un niveau d'indentation est " "toujours appréciable)." -#: library/contextlib.rst:413 +#: library/contextlib.rst:417 msgid "" "Existing context managers that already have a base class can be extended by " "using ``ContextDecorator`` as a mixin class::" @@ -448,7 +456,7 @@ msgstr "" "Les gestionnaires de contexte existants qui ont déjà une classe mère peuvent " "être étendus en utilisant ``ContextDecorator`` comme une *mixin* ::" -#: library/contextlib.rst:426 +#: 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` " @@ -461,7 +469,7 @@ msgstr "" "construction d'origine avec de multiples instructions :keyword:`!with` au " "sein de la fonction doit être utilisée." -#: library/contextlib.rst:436 +#: library/contextlib.rst:440 #, fuzzy msgid "" "Similar to :class:`ContextDecorator` but only for asynchronous functions." @@ -469,12 +477,12 @@ msgstr "" "Similaire à :meth:`enter_context` mais attend un gestionnaire de contexte " "asynchrone." -#: library/contextlib.rst:438 +#: library/contextlib.rst:442 #, fuzzy msgid "Example of ``AsyncContextDecorator``::" msgstr "Exemple de ``ContextDecorator`` ::" -#: library/contextlib.rst:475 +#: 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 " @@ -485,7 +493,7 @@ msgstr "" "nettoyage, spécifiquement ceux qui sont optionnels ou pilotés par des " "données d'entrée." -#: library/contextlib.rst:479 +#: library/contextlib.rst:485 msgid "" "For example, a set of files may easily be handled in a single with statement " "as follows::" @@ -493,7 +501,13 @@ msgstr "" "Par exemple, un ensemble de fichiers peut facilement être géré dans une " "unique instruction *with* comme suit ::" -#: library/contextlib.rst:488 +#: 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 " @@ -506,7 +520,7 @@ msgstr "" "que ces fonctions ne sont *pas* invoquées implicitement quand l'instance de " "la pile de contextes est collectée par le ramasse-miettes." -#: library/contextlib.rst:493 +#: 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 " @@ -516,7 +530,7 @@ msgstr "" "acquièrent leurs ressources dans leur méthode ``__init__`` (tels que les " "objets-fichiers) puissent être gérés correctement." -#: library/contextlib.rst:497 +#: 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 " @@ -532,7 +546,7 @@ msgstr "" "de rappel intérieure supprime ou remplace une exception, alors les fonctions " "extérieures reçoivent des arguments basés sur ce nouvel état." -#: library/contextlib.rst:504 +#: 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 " @@ -544,7 +558,7 @@ msgstr "" "pour des gestionnaires de contexte de plus haut niveau qui manipulent la " "pile de sortie de manière spécifique à l'application." -#: library/contextlib.rst:513 +#: 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 :" @@ -554,7 +568,7 @@ msgstr "" "`__exit__` à la pile d'appels. La valeur de retour est le résultat de la " "méthode :meth:`__enter__` du gestionnaire de contexte donné." -#: library/contextlib.rst:517 +#: 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." @@ -563,13 +577,13 @@ msgstr "" "feraient normalement s'ils étaient utilisés directement derrière une " "instruction :keyword:`with`." -#: library/contextlib.rst:522 +#: 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:524 +#: 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:" @@ -579,7 +593,7 @@ msgstr "" "pour couvrir une partie de l'implémentation de :meth:`__enter__` avec la " "propre méthode :meth:`__exit__` d'un gestionnaire de contexte." -#: library/contextlib.rst:528 +#: 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__` " @@ -590,7 +604,7 @@ msgstr "" "meth:`__exit__` des gestionnaires de contexte pour l'ajouter directement à " "la pile d'appels." -#: library/contextlib.rst:532 +#: library/contextlib.rst:541 msgid "" "By returning true values, these callbacks can suppress exceptions the same " "way context manager :meth:`__exit__` methods can." @@ -599,7 +613,7 @@ msgstr "" "exceptions de la même manière que le peuvent les méthodes :meth:`__exit__` " "des gestionnaires de contexte." -#: library/contextlib.rst:535 +#: library/contextlib.rst:544 msgid "" "The passed in object is returned from the function, allowing this method to " "be used as a function decorator." @@ -607,7 +621,7 @@ msgstr "" "L'objet passé en paramètre est renvoyé par la fonction, ce qui permet à la " "méthode d'être utilisée comme décorateur de fonction." -#: library/contextlib.rst:540 +#: library/contextlib.rst:549 msgid "" "Accepts an arbitrary callback function and arguments and adds it to the " "callback stack." @@ -615,7 +629,7 @@ msgstr "" "Accepte une fonction arbitraire et ses arguments et les ajoute à la pile des " "fonctions de rappel." -#: library/contextlib.rst:543 +#: library/contextlib.rst:552 msgid "" "Unlike the other methods, callbacks added this way cannot suppress " "exceptions (as they are never passed the exception details)." @@ -624,7 +638,7 @@ msgstr "" "cette manière ne peuvent pas supprimer les exceptions (puisqu'elles ne " "reçoivent jamais les détails de l'exception)." -#: library/contextlib.rst:546 +#: library/contextlib.rst:555 msgid "" "The passed in callback is returned from the function, allowing this method " "to be used as a function decorator." @@ -632,7 +646,7 @@ msgstr "" "La fonction passée en paramètre est renvoyée par la méthode, ce qui permet à " "la méthode d'être utilisée comme décorateur de fonction." -#: library/contextlib.rst:551 +#: 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 " @@ -644,7 +658,7 @@ msgstr "" "la place, elles sont dorénavant invoquées quand la nouvelle pile sera close " "(soit explicitement soit implicitement à la fin d'un bloc :keyword:`with`)." -#: library/contextlib.rst:556 +#: library/contextlib.rst:565 msgid "" "For example, a group of files can be opened as an \"all or nothing\" " "operation as follows::" @@ -652,7 +666,7 @@ msgstr "" "Par exemple, un groupe de fichiers peut être ouvert comme une opération " "« tout ou rien » comme suit ::" -#: library/contextlib.rst:570 +#: 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 " @@ -663,7 +677,7 @@ msgstr "" "et fonction de sortie enregistré, les arguments passés indiqueront qu'aucune " "exception n'est survenue." -#: library/contextlib.rst:577 +#: library/contextlib.rst:586 msgid "" "An :ref:`asynchronous context manager `, similar to :" "class:`ExitStack`, that supports combining both synchronous and asynchronous " @@ -674,7 +688,7 @@ msgstr "" "de contexte synchrones et asynchrones, ainsi que la gestion de coroutines " "pour la logique de nettoyage." -#: library/contextlib.rst:582 +#: library/contextlib.rst:591 msgid "" "The :meth:`close` method is not implemented, :meth:`aclose` must be used " "instead." @@ -682,14 +696,14 @@ msgstr "" "La méthode :meth:`close` n'est pas implémentée, :meth:`aclose` doit plutôt " "être utilisée." -#: library/contextlib.rst:587 +#: 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:592 +#: library/contextlib.rst:601 msgid "" "Similar to :meth:`push` but expects either an asynchronous context manager " "or a coroutine function." @@ -697,24 +711,24 @@ msgstr "" "Similaire à :meth:`push` mais attend soit un gestionnaire de contexte " "asynchrone soit une fonction coroutine." -#: library/contextlib.rst:597 +#: 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:601 +#: 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:603 +#: library/contextlib.rst:612 msgid "Continuing the example for :func:`asynccontextmanager`::" msgstr "En continuité de l'exemple de :func:`asynccontextmanager` ::" -#: library/contextlib.rst:615 +#: library/contextlib.rst:624 msgid "Examples and Recipes" msgstr "Exemples et Recettes" -#: library/contextlib.rst:617 +#: library/contextlib.rst:626 msgid "" "This section describes some examples and recipes for making effective use of " "the tools provided by :mod:`contextlib`." @@ -722,11 +736,11 @@ msgstr "" "Cette section décrit quelques exemples et recettes pour décrire une " "utilisation réelle des outils fournis par :mod:`contextlib`." -#: library/contextlib.rst:622 +#: 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:624 +#: 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 " @@ -743,7 +757,7 @@ msgstr "" "collection spécifique de fichiers de l'utilisateur), ou de certains " "gestionnaires de contexte qui peuvent être optionnels ::" -#: library/contextlib.rst:639 +#: 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 " @@ -753,11 +767,11 @@ msgstr "" "instructions :keyword:`with` pour gérer des ressources arbitraires qui ne " "gèrent pas nativement le protocole des gestionnaires de contexte." -#: library/contextlib.rst:645 +#: library/contextlib.rst:654 msgid "Catching exceptions from ``__enter__`` methods" msgstr "Attraper des exceptions depuis les méthodes ``__enter__``" -#: library/contextlib.rst:647 +#: library/contextlib.rst:656 msgid "" "It is occasionally desirable to catch exceptions from an ``__enter__`` " "method implementation, *without* inadvertently catching exceptions from the :" @@ -772,7 +786,7 @@ msgstr "" "`ExitStack`, les étapes du protocole des gestionnaires de contexte peuvent " "être légèrement séparées pour permettre le code suivant ::" -#: library/contextlib.rst:662 +#: 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 :" @@ -791,11 +805,11 @@ msgstr "" "gestion de plusieurs situations qui ne peuvent pas être traitées directement " "dans une instruction :keyword:`with`." -#: library/contextlib.rst:672 +#: library/contextlib.rst:681 msgid "Cleaning up in an ``__enter__`` implementation" msgstr "Nettoyer dans une méthode ``__enter__``" -#: library/contextlib.rst:674 +#: 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 :" @@ -805,7 +819,7 @@ msgstr "" "peut être utile pour nettoyer une ressource déjà allouée si les dernières " "étapes de l'implémentation de :meth:`__enter__` échouent." -#: library/contextlib.rst:678 +#: 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 " @@ -815,11 +829,11 @@ msgstr "" "d'acquisition de ressources et de libération, avec une méthode de validation " "optionnelle, et qui les adapte au protocole des gestionnaires de contexte ::" -#: library/contextlib.rst:718 +#: 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:720 +#: 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 " @@ -831,7 +845,7 @@ msgstr "" "ou non. Dans sa forme la plus simple (qui ne peut pas déjà être gérée avec " "juste une clause ``except``), cela ressemble à ::" -#: library/contextlib.rst:734 +#: 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 " @@ -842,7 +856,7 @@ msgstr "" "codes d'installation et de nettoyage peuvent finir par être séparés par des " "sections de code arbitrairement longues." -#: library/contextlib.rst:738 +#: 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 " @@ -852,7 +866,7 @@ msgstr "" "rappel pour être exécutée à la fin d'une instruction ``with``, et décider " "ensuite de passer l'exécution de cet appel ::" -#: library/contextlib.rst:750 +#: 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." @@ -860,7 +874,7 @@ msgstr "" "Cela permet de rendre explicite dès le départ le comportement de nettoyage " "attendu, plutôt que de nécessiter une option séparée." -#: library/contextlib.rst:753 +#: 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::" @@ -868,7 +882,7 @@ msgstr "" "Si une application particulière utilise beaucoup ce modèle, cela peut-être " "simplifié encore plus au moyen d'une petite classe d'aide ::" -#: library/contextlib.rst:771 +#: 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:" @@ -879,7 +893,7 @@ msgstr "" "`ExitStack.callback` pour déclarer la fonction de nettoyage de ressource en " "avance ::" -#: library/contextlib.rst:786 +#: 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 " @@ -890,12 +904,12 @@ msgstr "" "doivent être récupérées depuis l'extérieur comme des variables de fermeture " "(*closure*)." -#: library/contextlib.rst:792 +#: 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:794 +#: 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." @@ -904,7 +918,7 @@ msgstr "" "contexte à la fois ordinairement avec une instruction ``with`` ou comme un " "décorateur de fonction." -#: library/contextlib.rst:797 +#: 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. " @@ -919,17 +933,17 @@ msgstr "" "`ContextDecorator` fournit les deux fonctionnalités en une seule " "définition ::" -#: library/contextlib.rst:818 +#: 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:824 +#: library/contextlib.rst:833 msgid "And also as a function decorator::" msgstr "Et comme décorateurs de fonctions ::" -#: library/contextlib.rst:831 +#: 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:" @@ -941,11 +955,11 @@ msgstr "" "de retour de :meth:`__enter__`. Si cette valeur est nécessaire, il faut " "utiliser explicitement une instruction ``with``." -#: library/contextlib.rst:839 +#: library/contextlib.rst:848 msgid ":pep:`343` - The \"with\" statement" msgstr ":pep:`343` - The \"with\" statement" -#: library/contextlib.rst:839 +#: library/contextlib.rst:848 msgid "" "The specification, background, and examples for the Python :keyword:`with` " "statement." @@ -953,11 +967,11 @@ msgstr "" "La spécification, les motivations et des exemples de l'instruction :keyword:" "`with` en Python." -#: library/contextlib.rst:845 +#: 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:847 +#: 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 " @@ -970,7 +984,7 @@ msgstr "" "chaque fois qu'ils sont utilisés — tenter de les utiliser une seconde fois " "lève une exception ou ne fonctionne pas correctement." -#: library/contextlib.rst:853 +#: 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 " @@ -981,7 +995,7 @@ msgstr "" "`with` où ils sont utilisés (comme montré dans tous les exemples " "d'utilisation au-dessus)." -#: library/contextlib.rst:857 +#: 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 " @@ -992,7 +1006,7 @@ msgstr "" "`with` ferme le fichier, empêchant d'autres opérations d'entrée/sortie " "d'être exécutées sur ce fichier." -#: library/contextlib.rst:861 +#: 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 " @@ -1002,11 +1016,11 @@ msgstr "" "usage unique, et se plaindront du fait que le générateur sous-jacent ne " "produise plus de valeur si vous essayez de les utiliser une seconde fois ::" -#: library/contextlib.rst:889 +#: library/contextlib.rst:898 msgid "Reentrant context managers" msgstr "Gestionnaires de contexte réentrants" -#: library/contextlib.rst:891 +#: 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 " @@ -1019,7 +1033,7 @@ msgstr "" "l'intérieur* d'une instruction :keyword:`!with` qui utilise déjà ce même " "gestionnaire de contexte." -#: library/contextlib.rst:896 +#: 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 " @@ -1029,7 +1043,7 @@ msgstr "" "réentrant, comme le sont aussi :func:`suppress` et :func:`redirect_stdout`. " "Voici un très simple exemple d'utilisation réentrante ::" -#: library/contextlib.rst:915 +#: 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 " @@ -1039,7 +1053,7 @@ msgstr "" "fonctions s'entre-appelant, et donc être bien plus compliqués que cet " "exemple." -#: library/contextlib.rst:919 +#: 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, " @@ -1051,18 +1065,18 @@ msgstr "" "puisqu'il effectue des changements globaux sur l'état du système en " "branchant :data:`sys.stdout` sur différents flux." -#: library/contextlib.rst:928 +#: library/contextlib.rst:937 msgid "Reusable context managers" msgstr "Gestionnaires de contexte réutilisables" -#: library/contextlib.rst:930 +#: 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." +"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 " @@ -1073,7 +1087,7 @@ msgstr "" "contexte référencée a déjà été utilisée dans une instruction *with* " "englobante." -#: library/contextlib.rst:937 +#: 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:" @@ -1083,7 +1097,7 @@ msgstr "" "réutilisable mais pas réentrant (pour un verrou réentrant, il faut à la " "place utiliser :class:`threading.RLock`)." -#: library/contextlib.rst:941 +#: 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 " @@ -1094,7 +1108,7 @@ msgstr "" "actuellement enregistrées en quittant l'instruction *with*, sans regarder où " "ces fonctions ont été ajoutées ::" -#: library/contextlib.rst:972 +#: 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 " @@ -1106,7 +1120,7 @@ msgstr "" "imbriquer fait que la pile est vidée à la fin du *with* le plus imbriqué, ce " "qui n'est probablement pas le comportement voulu." -#: library/contextlib.rst:977 +#: library/contextlib.rst:986 msgid "" "Using separate :class:`ExitStack` instances instead of reusing a single " "instance avoids that problem::" diff --git a/library/contextvars.po b/library/contextvars.po index 6efd7a2c7d..49c1976c52 100644 --- a/library/contextvars.po +++ b/library/contextvars.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" +"POT-Creation-Date: 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" @@ -180,10 +180,11 @@ msgstr "" "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` is the variable was not set before the call." +"`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 " @@ -233,6 +234,14 @@ msgstr "" "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`." @@ -246,7 +255,7 @@ msgstr "*Context* implémente l'interface :class:`collections.abc.Mapping`." # 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:151 +#: 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 " @@ -256,7 +265,7 @@ msgstr "" "l'objet. Renvoie le résultat de l'exécution ou propage une exception s'il y " "en a une qui s'est produite." -#: library/contextvars.rst:155 +#: library/contextvars.rst:160 msgid "" "Any changes to any context variables that *callable* makes will be contained " "in the context object::" @@ -264,7 +273,7 @@ msgstr "" "Tout changement apporté aux variables de contexte effectué par *callable* " "sera contenu dans l'objet de contexte ::" -#: library/contextvars.rst:184 +#: library/contextvars.rst:189 msgid "" "The method raises a :exc:`RuntimeError` when called on the same context " "object from more than one OS thread, or when called recursively." @@ -273,11 +282,11 @@ msgstr "" "objet de contexte depuis plus qu'un fil d'exécution ou quand elle est " "appelée récursivement." -#: library/contextvars.rst:190 +#: library/contextvars.rst:195 msgid "Return a shallow copy of the context object." msgstr "Renvoie une copie de surface de l'objet de contexte." -#: library/contextvars.rst:194 +#: library/contextvars.rst:199 msgid "" "Return ``True`` if the *context* has a value for *var* set; return ``False`` " "otherwise." @@ -285,7 +294,7 @@ msgstr "" "Renvoie ``True`` si le *context* a une valeur pour *var* ; sinon renvoie " "``False``." -#: library/contextvars.rst:199 +#: library/contextvars.rst:204 msgid "" "Return the value of the *var* :class:`ContextVar` variable. If the variable " "is not set in the context object, a :exc:`KeyError` is raised." @@ -293,7 +302,7 @@ msgstr "" "Renvoie la valeur de la variable :class:`ContextVar` *var*. Si la variable " "n'est pas définie dans l'objet de contexte, une :exc:`KeyError` est levée." -#: library/contextvars.rst:205 +#: library/contextvars.rst:210 msgid "" "Return the value for *var* if *var* has the value in the context object. " "Return *default* otherwise. If *default* is not given, return ``None``." @@ -301,26 +310,26 @@ msgstr "" "Renvoie la valeur de *var* si *var* possède une valeur dans l'objet de " "contexte. Renvoie *default* sinon (ou ``None`` si *default* n'est pas donné)." -#: library/contextvars.rst:211 +#: library/contextvars.rst:216 msgid "Return an iterator over the variables stored in the context object." msgstr "" "Renvoie un itérateur sur les variables stockées dans l'objet de contexte." -#: library/contextvars.rst:216 +#: library/contextvars.rst:221 msgid "Return the number of variables set in the context object." msgstr "Renvoie le nombre de variables définies dans l'objet de contexte." -#: library/contextvars.rst:220 +#: library/contextvars.rst:225 msgid "Return a list of all variables in the context object." msgstr "Renvoie une liste de toutes les variables dans l'objet de contexte." -#: library/contextvars.rst:224 +#: library/contextvars.rst:229 msgid "Return a list of all variables' values in the context object." msgstr "" "Renvoie une liste de toutes les valeurs des variables dans l'objet de " "contexte." -#: library/contextvars.rst:229 +#: library/contextvars.rst:234 msgid "" "Return a list of 2-tuples containing all variables and their values in the " "context object." @@ -328,11 +337,11 @@ msgstr "" "Renvoie une liste de paires contenant toutes les variables et leurs valeurs " "dans l'objet de contexte." -#: library/contextvars.rst:234 +#: library/contextvars.rst:239 msgid "asyncio support" msgstr "Gestion avec *asyncio*" -#: library/contextvars.rst:236 +#: library/contextvars.rst:241 msgid "" "Context variables are natively supported in :mod:`asyncio` and are ready to " "be used without any extra configuration. For example, here is a simple echo " diff --git a/library/copyreg.po b/library/copyreg.po index cd5968bde1..bfd4b8a3cf 100644 --- a/library/copyreg.po +++ b/library/copyreg.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" +"POT-Creation-Date: 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" @@ -49,35 +49,30 @@ msgstr "" "`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." +"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:34 +#: library/copyreg.rst:35 msgid "" -"The optional *constructor* parameter, if provided, is a callable object " -"which can be used to reconstruct the object when called with the tuple of " -"arguments returned by *function* at pickling time. :exc:`TypeError` will be " -"raised if *object* is a class or *constructor* is not callable." +"The *constructor_ob* parameter is a legacy feature and is now ignored, but " +"if passed it must be a 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." -#: library/copyreg.rst:39 +#: library/copyreg.rst:38 +#, fuzzy msgid "" -"See the :mod:`pickle` module for more details on the interface expected of " -"*function* and *constructor*. 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." +"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." @@ -85,14 +80,27 @@ msgstr "" "`pickle.Pickler` peut aussi être utilisée pour déclarer des fonctions " "réductrices." -#: library/copyreg.rst:46 +#: library/copyreg.rst:43 msgid "Example" msgstr "Exemple" -#: library/copyreg.rst:48 +#: 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 index 1afd6f7e19..b97f4e81b6 100644 --- a/library/crypt.po +++ b/library/crypt.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" +"POT-Creation-Date: 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" @@ -18,12 +18,19 @@ msgstr "" msgid ":mod:`crypt` --- Function to check Unix passwords" msgstr "" -#: library/crypt.rst:12 +#: library/crypt.rst:13 #, fuzzy msgid "**Source code:** :source:`Lib/crypt.py`" msgstr "**Code source :** :source:`Lib/pty.py`" -#: library/crypt.rst:20 +#: library/crypt.rst:19 +msgid "" +"The :mod:`crypt` module is deprecated (see :pep:`PEP 594 <594#crypt>` for " +"details and alternatives). The :mod:`hashlib` module is a potential " +"replacement for certain use cases." +msgstr "" + +#: library/crypt.rst:26 msgid "" "This module implements an interface to the :manpage:`crypt(3)` routine, " "which is a one-way hash function based upon a modified DES algorithm; see " @@ -32,7 +39,7 @@ msgid "" "attempting to crack Unix passwords with a dictionary." msgstr "" -#: library/crypt.rst:28 +#: library/crypt.rst:34 msgid "" "Notice that the behavior of this module depends on the actual " "implementation of the :manpage:`crypt(3)` routine in the running system. " @@ -40,125 +47,125 @@ msgid "" "be available on this module." msgstr "" -#: library/crypt.rst:34 +#: library/crypt.rst:40 msgid ":ref:`Availability `: Unix. Not available on VxWorks." msgstr "" -#: library/crypt.rst:36 +#: library/crypt.rst:42 msgid "Hashing Methods" msgstr "" -#: library/crypt.rst:40 +#: library/crypt.rst:46 msgid "" "The :mod:`crypt` module defines the list of hashing methods (not all methods " "are available on all platforms):" msgstr "" -#: library/crypt.rst:45 +#: library/crypt.rst:51 msgid "" "A Modular Crypt Format method with 16 character salt and 86 character hash " "based on the SHA-512 hash function. This is the strongest method." msgstr "" -#: library/crypt.rst:50 +#: library/crypt.rst:56 msgid "" "Another Modular Crypt Format method with 16 character salt and 43 character " "hash based on the SHA-256 hash function." msgstr "" -#: library/crypt.rst:55 +#: library/crypt.rst:61 msgid "" "Another Modular Crypt Format method with 22 character salt and 31 character " "hash based on the Blowfish cipher." msgstr "" -#: library/crypt.rst:62 +#: library/crypt.rst:68 msgid "" "Another Modular Crypt Format method with 8 character salt and 22 character " "hash based on the MD5 hash function." msgstr "" -#: library/crypt.rst:67 +#: library/crypt.rst:73 msgid "" "The traditional method with a 2 character salt and 13 characters of hash. " "This is the weakest method." msgstr "" -#: library/crypt.rst:72 +#: library/crypt.rst:78 msgid "Module Attributes" msgstr "" -#: library/crypt.rst:78 +#: library/crypt.rst:84 msgid "" "A list of available password hashing algorithms, as ``crypt.METHOD_*`` " "objects. This list is sorted from strongest to weakest." msgstr "" -#: library/crypt.rst:84 +#: library/crypt.rst:90 msgid "Module Functions" msgstr "" -#: library/crypt.rst:86 +#: library/crypt.rst:92 #, fuzzy msgid "The :mod:`crypt` module defines the following functions:" msgstr "Le module :mod:`pty` expose les fonctions suivantes :" -#: library/crypt.rst:90 +#: library/crypt.rst:96 msgid "" "*word* will usually be a user's password as typed at a prompt or in a " "graphical interface. The optional *salt* is either a string as returned " "from :func:`mksalt`, one of the ``crypt.METHOD_*`` values (though not all " "may be available on all platforms), or a full encrypted password including " "salt, as returned by this function. If *salt* is not provided, the " -"strongest method will be used (as returned by :func:`methods`)." +"strongest method available in :attr:`methods` will be used." msgstr "" -#: library/crypt.rst:98 +#: library/crypt.rst:103 msgid "" "Checking a password is usually done by passing the plain-text password as " "*word* and the full results of a previous :func:`crypt` call, which should " "be the same as the results of this call." msgstr "" -#: library/crypt.rst:102 +#: library/crypt.rst:107 msgid "" -"*salt* (either a random 2 or 16 character string, possibly prefixed with ``" -"$digit$`` to indicate the method) which will be used to perturb the " +"*salt* (either a random 2 or 16 character string, possibly prefixed with " +"``$digit$`` to indicate the method) which will be used to perturb the " "encryption algorithm. The characters in *salt* must be in the set ``[./a-zA-" -"Z0-9]``, with the exception of Modular Crypt Format which prefixes a ``$digit" -"$``." +"Z0-9]``, with the exception of Modular Crypt Format which prefixes a " +"``$digit$``." msgstr "" -#: library/crypt.rst:108 +#: library/crypt.rst:113 msgid "" "Returns the hashed password as a string, which will be composed of " "characters from the same alphabet as the salt." msgstr "" -#: library/crypt.rst:113 +#: library/crypt.rst:118 msgid "" "Since a few :manpage:`crypt(3)` extensions allow different values, with " "different sizes in the *salt*, it is recommended to use the full crypted " "password as salt when checking for a password." msgstr "" -#: library/crypt.rst:117 +#: library/crypt.rst:122 msgid "Accept ``crypt.METHOD_*`` values in addition to strings for *salt*." msgstr "" -#: library/crypt.rst:123 +#: library/crypt.rst:128 msgid "" "Return a randomly generated salt of the specified method. If no *method* is " -"given, the strongest method available as returned by :func:`methods` is used." +"given, the strongest method available in :attr:`methods` is used." msgstr "" -#: library/crypt.rst:127 +#: library/crypt.rst:132 msgid "" "The return value is a string suitable for passing as the *salt* argument to :" "func:`crypt`." msgstr "" -#: library/crypt.rst:130 +#: library/crypt.rst:135 msgid "" "*rounds* specifies the number of rounds for ``METHOD_SHA256``, " "``METHOD_SHA512`` and ``METHOD_BLOWFISH``. For ``METHOD_SHA256`` and " @@ -168,23 +175,27 @@ msgid "" "sup:`31`), the default is ``4096`` (2\\ :sup:`12`)." msgstr "" -#: library/crypt.rst:140 +#: library/crypt.rst:145 msgid "Added the *rounds* parameter." msgstr "" -#: library/crypt.rst:145 +#: library/crypt.rst:150 msgid "Examples" msgstr "Exemples" -#: library/crypt.rst:147 +#: library/crypt.rst:152 msgid "" "A simple example illustrating typical use (a constant-time comparison " "operation is needed to limit exposure to timing attacks. :func:`hmac." "compare_digest` is suitable for this purpose)::" msgstr "" -#: library/crypt.rst:167 +#: library/crypt.rst:172 msgid "" "To generate a hash of a password using the strongest available method and " "check it against the original::" 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/csv.po b/library/csv.po index f08a631bc1..cb00babdca 100644 --- a/library/csv.po +++ b/library/csv.po @@ -5,15 +5,15 @@ 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-27 19:45+0100\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 2.3\n" +"X-Generator: Poedit 3.0.1\n" #: library/csv.rst:2 msgid ":mod:`csv` --- CSV File Reading and Writing" @@ -61,7 +61,7 @@ msgstr "" "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 application " +"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 @@ -119,7 +119,7 @@ msgstr "" "sous-classe de :class:`Dialect` ou de l'une des chaînes renvoyées par la " "fonction :func:`list_dialects`. Les autres arguments nommés optionnels " "(*fmtparams*) peuvent être spécifiés pour redéfinir des paramètres de " -"formatage particuliers dans le dialecte courant. Pour des détails complets " +"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`." @@ -141,7 +141,6 @@ msgid "A short usage example::" msgstr "Un court exemple d'utilisation ::" #: library/csv.rst:88 -#, fuzzy 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 " @@ -160,28 +159,27 @@ msgid "" "returned from a ``cursor.fetch*`` call. All other non-string data are " "stringified with :func:`str` before being written." msgstr "" -"Renvoie un objet transcripteur responsable de convertir les données de " -"l'utilisateur en chaînes délimitées sur l'objet fichier-compatible donné. " -"*csvfile* peut être n'importe quel objet avec une méthode :func:`write`. Si " -"*csvfile* est un fichier, il doit être ouvert avec ``newline=''``. [1]_ Un " -"paramètre *dialect* optionnel peut être fourni pour définir un ensemble de " -"paramètres spécifiques à un dialecte CSV particulier. Il peut s'agir d'une " -"instance de sous-classe de :class:`Dialect` ou de l'une des chaînes " -"renvoyées par la fonction :func:`list_dialects`. Les autres arguments " -"nommés optionnels (*fmtparams*) peuvent être spécifiés pour redéfinir des " -"paramètres de formatage particuliers dans le dialecte courant. Pour des " -"détails complets sur les dialectes et paramètres de formatage, voir la " -"section :ref:`csv-fmt-params`. Pour faciliter au mieux l'interfaçage avec " -"d'autres modules implémentant l'interface *DB*, la valeur :const:`None` est " -"écrite comme une chaîne vide. Bien que ce ne soit pas une transformation " -"réversible, cela simplifie l'exportation de données SQL *NULL* vers des " -"fichiers CSV sans pré-traiter les données renvoyées par un appel à ``cursor." -"fetch*``. Toutes les autres données qui ne sont pas des chaînes de " -"caractères sont transformées en chaînes par un appel à :func:`str` avant " -"d'être écrites." +"Renvoie un transcripteur (objet *writer*) responsable de convertir les " +"données de l'utilisateur en chaînes délimitées sur l'objet fichier-" +"compatible donné. *csvfile* peut être n'importe quel objet avec une " +"méthode :func:`write`. Si *csvfile* est un objet fichier, il doit être " +"ouvert avec ``newline=''``. [1]_ Un paramètre *dialect* optionnel peut être " +"fourni pour définir un ensemble de paramètres spécifiques à un dialecte CSV " +"particulier. Il peut s'agir d'une instance d’une sous-classe de :class:" +"`Dialect` ou de l'une des chaînes renvoyées par la fonction :func:" +"`list_dialects`. Les autres arguments nommés optionnels (*fmtparams*) " +"peuvent être spécifiés pour redéfinir des paramètres de formatage " +"particuliers dans le dialecte utilisé. Pour tous les détails sur les " +"dialectes et paramètres de formatage, voir la section :ref:`csv-fmt-params`. " +"Pour faciliter au mieux l'interfaçage avec d'autres modules implémentant " +"l'interface *DB*, la valeur :const:`None` est convertie en une chaîne vide. " +"Bien que ce ne soit pas une transformation réversible, cela simplifie " +"l'exportation de données SQL *NULL* vers des fichiers CSV sans pré-traiter " +"les données renvoyées par un appel à ``cursor.fetch*``. Toutes les autres " +"données qui ne sont pas des chaînes de caractères sont transformées en " +"chaînes par un appel à :func:`str` avant d'être écrites." #: library/csv.rst:117 -#, fuzzy 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 " @@ -192,8 +190,8 @@ msgstr "" "Associe *dialect* avec *name*. *name* doit être une chaîne de caractères. " "Le dialecte peut être spécifié en passant une instance d'une sous-classe de :" "class:`Dialect`, des arguments nommés *fmtparams*, ou les deux, avec les " -"arguments nommés redéfinissant les paramètres du dialecte. Pour des détails " -"complets sur les dialectes et paramètres de formatage, voir la section :ref:" +"arguments nommés redéfinissant les paramètres du dialecte. Pour tous les " +"détails sur les dialectes et paramètres de formatage, voir la section :ref:" "`csv-fmt-params`." #: library/csv.rst:126 @@ -223,7 +221,7 @@ 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 courante autorisée par l'analyseur. Si " +"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 @@ -306,7 +304,7 @@ msgstr "" "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 faut ``'ignore'``, les valeurs " +"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." @@ -326,6 +324,12 @@ msgid "" "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 "" @@ -333,6 +337,10 @@ msgid "" "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 "" @@ -385,7 +393,6 @@ msgstr "" "les caractères valides de séparation possibles." #: library/csv.rst:282 -#, fuzzy 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 " @@ -393,29 +400,38 @@ msgid "" "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." +"`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 "" +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::" @@ -461,7 +477,7 @@ msgid "" "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* courant apparaît dans les données, il est " +"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é." @@ -594,8 +610,9 @@ msgstr "" "const:`QUOTE_MINIMAL`." #: library/csv.rst:415 +#, fuzzy msgid "" -"When :const:`True`, whitespace immediately following the *delimiter* is " +"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* " @@ -622,7 +639,6 @@ msgstr "" "la fonction :func:`reader`) ont les méthodes publiques suivantes :" #: library/csv.rst:432 -#, fuzzy 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` " @@ -631,8 +647,9 @@ msgid "" msgstr "" "Renvoie la ligne suivante de l'objet itérable du lecteur en tant que liste " "(si l'objet est renvoyé depuis :func:`reader`) ou dictionnaire (si l'objet " -"est un :class:`DictReader`), analysé suivant le dialecte courant. " -"Généralement, vous devez appeler la méthode à l'aide de ``next(reader)``." +"est un :class:`DictReader`), analysé suivant la classe :class:`Dialect` " +"utilisée. Généralement, vous devez appeler la méthode à l'aide de " +"``next(reader)``." #: library/csv.rst:438 msgid "Reader objects have the following public attributes:" @@ -690,15 +707,14 @@ msgstr "" "(en supposant qu'ils supportent les nombres complexes)." #: library/csv.rst:475 -#, fuzzy 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 le fichier associé au transcripteur, formaté " -"selon le dialecte courant. Renvoie la valeur de retour de l'appel à la " -"méthode *write* de l'objet fichier sous-jacent." +"Écrit le paramètre *row* vers l’objet fichier du transcripteur, formaté " +"selon la classe :class:`Dialect` utilisée. Renvoie la valeur de retour de " +"l'appel à la méthode *write* de l'objet fichier sous-jacent." #: library/csv.rst:479 msgid "Added support of arbitrary iterables." @@ -712,11 +728,11 @@ msgid "" 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 courant." +"dialecte utilisé." #: library/csv.rst:488 msgid "Writer objects have the following public attribute:" -msgstr "Les objets transcripteurs ont les attributs publics suivants :" +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." @@ -725,7 +741,7 @@ msgstr "" #: library/csv.rst:496 msgid "DictWriter objects have the following public method:" -msgstr "Les objets *DictWriter* ont les attributs publics suivants :" +msgstr "Les objets *DictWriter* ont la méthode publique suivante :" #: library/csv.rst:501 msgid "" @@ -735,7 +751,7 @@ msgid "" 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 courant. Renvoie la valeur de retour de l'appel :meth:`csvwriter." +"le dialecte utilisé. Renvoie la valeur de retour de l'appel :meth:`csvwriter." "writerow` utilisé en interne." #: library/csv.rst:506 @@ -780,9 +796,9 @@ msgid "" "The same applies to writing in something other than the system default " "encoding: specify the encoding argument when opening the output file." msgstr "" -"La même chose s'applique 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." +"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::" @@ -816,12 +832,12 @@ msgid "" "safe to specify ``newline=''``, since the csv module does its own (:term:" "`universal `) newline handling." msgstr "" -"Si ``newline=''`` n'est pas spécifié, les caractères de fin de ligne " +"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é. Vous devriez " -"toujours spécifier sans crainte ``newline=''``, puisque le module *csv* gère " -"lui-même les fins de lignes (:term:`universelles `)." +"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 " diff --git a/library/ctypes.po b/library/ctypes.po index 3838e182a6..b7b1972b00 100644 --- a/library/ctypes.po +++ b/library/ctypes.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-09-23 16:16+0200\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" @@ -19,7 +19,11 @@ msgstr "" msgid ":mod:`ctypes` --- A foreign function library for Python" msgstr ":mod:`ctypes` — Bibliothèque Python d'appels à des fonctions externes" -#: library/ctypes.rst:11 +#: 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 " @@ -31,11 +35,11 @@ msgstr "" "partagées, rendant ainsi possible l'interfaçage de ces bibliothèques avec du " "pur code Python." -#: library/ctypes.rst:19 +#: library/ctypes.rst:21 msgid "ctypes tutorial" msgstr "Didacticiel de *ctypes*" -#: library/ctypes.rst:21 +#: 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, " @@ -46,7 +50,7 @@ msgstr "" "exemples ont un comportement différent en Linux, Windows ou macOS, ils " "contiennent des directives *doctest* dans les commentaires." -#: library/ctypes.rst:25 +#: 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:" @@ -59,11 +63,11 @@ msgstr "" "`c_long` s'affiche là où vous vous attendiez à :class:`c_int` — il s'agit " "bien du même type." -#: library/ctypes.rst:33 +#: library/ctypes.rst:35 msgid "Loading dynamic link libraries" msgstr "Chargement des DLL" -#: library/ctypes.rst:35 +#: library/ctypes.rst:37 msgid "" ":mod:`ctypes` exports the *cdll*, and on Windows *windll* and *oledll* " "objects, for loading dynamic link libraries." @@ -71,7 +75,7 @@ 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:38 +#: 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 " @@ -90,7 +94,7 @@ msgstr "" "est utilisé pour lever automatiquement une :class:`OSError` quand l'appel de " "la fonction échoue." -#: library/ctypes.rst:46 +#: library/ctypes.rst:48 msgid "" "Windows errors used to raise :exc:`WindowsError`, which is now an alias of :" "exc:`OSError`." @@ -98,7 +102,7 @@ msgstr "" "En Windows, les erreurs levaient auparavant une :exc:`WindowsError`, qui est " "maintenant un alias de :exc:`OSError`." -#: library/ctypes.rst:51 +#: 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 " @@ -108,11 +112,11 @@ msgstr "" "de Microsoft qui contient la plupart des fonctions standards C. Elle suit la " "convention d'appel *cdecl* ::" -#: library/ctypes.rst:63 +#: library/ctypes.rst:65 msgid "Windows appends the usual ``.dll`` file suffix automatically." msgstr "Windows ajoute le suffixe habituel ``.dll`` automatiquement." -#: library/ctypes.rst:66 +#: 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 " @@ -125,7 +129,7 @@ msgstr "" "fonctionnalité native de Python, ou bien importer et utiliser le module " "``msvcrt``." -#: library/ctypes.rst:71 +#: 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. " @@ -139,15 +143,15 @@ msgstr "" "chargeurs de DLL, ou bien charger la bibliothèque en créant une instance de " "*CDLL* en appelant son constructeur ::" -#: library/ctypes.rst:89 +#: library/ctypes.rst:91 msgid "Accessing functions from loaded dlls" msgstr "Accès aux fonctions des DLL chargées" -#: library/ctypes.rst:91 +#: 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:106 +#: 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 " @@ -165,7 +169,7 @@ msgstr "" "qui décide d'exporter l'une ou l'autre à travers ``GetModuleHandle``, selon " "qu'UNICODE est définie ou non) ::" -#: library/ctypes.rst:119 +#: 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`` " @@ -176,7 +180,7 @@ msgstr "" "les appelant ensuite avec des objets octets ou avec des chaînes de " "caractères, respectivement." -#: library/ctypes.rst:123 +#: 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:" @@ -186,7 +190,7 @@ msgstr "" "identifiants Python valides, comme ``\"??2@YAPAXI@Z\"``. Dans ce cas, il " "faut utiliser :func:`getattr` pour accéder à la fonction ::" -#: library/ctypes.rst:131 +#: 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 " @@ -196,11 +200,11 @@ msgstr "" "plutôt qu'à travers un nom. On accède à une fonction en indiçant l'objet DLL " "avec son index ::" -#: library/ctypes.rst:148 +#: library/ctypes.rst:150 msgid "Calling functions" msgstr "Appel de fonctions" -#: library/ctypes.rst:150 +#: 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 " @@ -212,7 +216,7 @@ msgstr "" "depuis l'*epoch* Unix, et la fonction ``GetModuleHandleA()``, qui renvoie un " "gestionnaire de module *win32*." -#: library/ctypes.rst:155 +#: library/ctypes.rst:157 msgid "" "This example calls both functions with a ``NULL`` pointer (``None`` should " "be used as the ``NULL`` pointer)::" @@ -220,7 +224,7 @@ msgstr "" "Cet exemple appelle les deux fonctions avec un pointeur ``NULL`` (on utilise " "``None`` pour passer un pointeur ``NULL``) ::" -#: library/ctypes.rst:164 +#: library/ctypes.rst:166 msgid "" ":exc:`ValueError` is raised when you call an ``stdcall`` function with the " "``cdecl`` calling convention, or vice versa::" @@ -228,7 +232,7 @@ 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:179 +#: 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." @@ -236,7 +240,7 @@ 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:182 +#: 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 " @@ -248,7 +252,7 @@ msgstr "" "(*general protection faults*) du système, lorsque des fonctions sont " "appelées avec un nombre incorrect d'arguments ::" -#: library/ctypes.rst:192 +#: 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 " @@ -261,14 +265,15 @@ msgstr "" "erreurs de segmentation produites par des appels erronés à la bibliothèque " "C)." -#: library/ctypes.rst:197 +#: 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:type:" -"`char *` or :c:type:`wchar_t *`). Python integers are passed as the " -"platforms default C :c:type:`int` type, their value is masked to fit into " +"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 " @@ -280,7 +285,7 @@ msgstr "" "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:204 +#: 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." @@ -289,230 +294,250 @@ msgstr "" "paramètres, apprenons-en un peu plus sur les types de données de :mod:" "`ctypes`." -#: library/ctypes.rst:2143 +#: library/ctypes.rst:2160 msgid "Fundamental data types" msgstr "Types de données de base" -#: library/ctypes.rst:213 +#: 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:216 +#: library/ctypes.rst:218 msgid "ctypes type" msgstr "Types de *ctypes*" -#: library/ctypes.rst:216 +#: library/ctypes.rst:218 msgid "C type" msgstr "Type C" -#: library/ctypes.rst:216 +#: library/ctypes.rst:218 msgid "Python type" msgstr "Type Python" -#: library/ctypes.rst:218 +#: library/ctypes.rst:220 msgid ":class:`c_bool`" msgstr ":class:`c_bool`" -#: library/ctypes.rst:218 -msgid ":c:type:`_Bool`" +#: library/ctypes.rst:220 +#, fuzzy +msgid ":c:expr:`_Bool`" msgstr ":c:type:`_Bool`" -#: library/ctypes.rst:218 +#: library/ctypes.rst:220 msgid "bool (1)" msgstr "*bool* (1)" -#: library/ctypes.rst:220 +#: library/ctypes.rst:222 msgid ":class:`c_char`" msgstr ":class:`c_char`" -#: library/ctypes.rst:224 -msgid ":c:type:`char`" +#: library/ctypes.rst:226 +#, fuzzy +msgid ":c:expr:`char`" msgstr ":c:type:`char`" -#: library/ctypes.rst:220 +#: library/ctypes.rst:222 msgid "1-character bytes object" msgstr "objet octet (*bytes*) de 1 caractère" -#: library/ctypes.rst:222 +#: library/ctypes.rst:224 msgid ":class:`c_wchar`" msgstr ":class:`c_wchar`" -#: library/ctypes.rst:222 -msgid ":c:type:`wchar_t`" +#: library/ctypes.rst:224 +#, fuzzy +msgid ":c:expr:`wchar_t`" msgstr ":c:type:`wchar_t`" -#: library/ctypes.rst:222 +#: library/ctypes.rst:224 msgid "1-character string" msgstr "chaîne de caractères (*string*) de longueur 1" -#: library/ctypes.rst:224 +#: library/ctypes.rst:226 msgid ":class:`c_byte`" msgstr ":class:`c_byte`" -#: library/ctypes.rst:226 library/ctypes.rst:230 library/ctypes.rst:234 -#: library/ctypes.rst:238 library/ctypes.rst:242 library/ctypes.rst:247 +#: 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:226 +#: library/ctypes.rst:228 msgid ":class:`c_ubyte`" msgstr ":class:`c_ubyte`" -#: library/ctypes.rst:226 -msgid ":c:type:`unsigned char`" +#: library/ctypes.rst:228 +#, fuzzy +msgid ":c:expr:`unsigned char`" msgstr ":c:type:`unsigned char`" -#: library/ctypes.rst:228 +#: library/ctypes.rst:230 msgid ":class:`c_short`" msgstr ":class:`c_short`" -#: library/ctypes.rst:228 -msgid ":c:type:`short`" +#: library/ctypes.rst:230 +#, fuzzy +msgid ":c:expr:`short`" msgstr ":c:type:`short`" -#: library/ctypes.rst:230 +#: library/ctypes.rst:232 msgid ":class:`c_ushort`" msgstr ":class:`c_ushort`" -#: library/ctypes.rst:230 -msgid ":c:type:`unsigned short`" +#: library/ctypes.rst:232 +#, fuzzy +msgid ":c:expr:`unsigned short`" msgstr ":c:type:`unsigned short`" -#: library/ctypes.rst:232 +#: library/ctypes.rst:234 msgid ":class:`c_int`" msgstr ":class:`c_int`" -#: library/ctypes.rst:232 -msgid ":c:type:`int`" +#: library/ctypes.rst:234 +#, fuzzy +msgid ":c:expr:`int`" msgstr ":c:type:`int`" -#: library/ctypes.rst:234 +#: library/ctypes.rst:236 msgid ":class:`c_uint`" msgstr ":class:`c_uint`" -#: library/ctypes.rst:234 -msgid ":c:type:`unsigned int`" +#: library/ctypes.rst:236 +#, fuzzy +msgid ":c:expr:`unsigned int`" msgstr ":c:type:`unsigned int`" -#: library/ctypes.rst:236 +#: library/ctypes.rst:238 msgid ":class:`c_long`" msgstr ":class:`c_long`" -#: library/ctypes.rst:236 -msgid ":c:type:`long`" +#: library/ctypes.rst:238 +#, fuzzy +msgid ":c:expr:`long`" msgstr ":c:type:`long`" -#: library/ctypes.rst:238 +#: library/ctypes.rst:240 msgid ":class:`c_ulong`" msgstr ":class:`c_ulong`" -#: library/ctypes.rst:238 -msgid ":c:type:`unsigned long`" +#: library/ctypes.rst:240 +#, fuzzy +msgid ":c:expr:`unsigned long`" msgstr ":c:type:`unsigned long`" -#: library/ctypes.rst:240 +#: library/ctypes.rst:242 msgid ":class:`c_longlong`" msgstr ":class:`c_longlong`" -#: library/ctypes.rst:240 -msgid ":c:type:`__int64` or :c:type:`long long`" +#: 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:242 +#: library/ctypes.rst:244 msgid ":class:`c_ulonglong`" msgstr ":class:`c_ulonglong`" -#: library/ctypes.rst:242 -msgid ":c:type:`unsigned __int64` or :c:type:`unsigned long long`" +#: 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:245 +#: library/ctypes.rst:247 msgid ":class:`c_size_t`" msgstr ":class:`c_size_t`" -#: library/ctypes.rst:245 -msgid ":c:type:`size_t`" +#: library/ctypes.rst:247 +#, fuzzy +msgid ":c:expr:`size_t`" msgstr ":c:type:`size_t`" -#: library/ctypes.rst:247 +#: library/ctypes.rst:249 msgid ":class:`c_ssize_t`" msgstr ":class:`c_ssize_t`" -#: library/ctypes.rst:247 -msgid ":c:type:`ssize_t` or :c:type:`Py_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:250 +#: library/ctypes.rst:252 msgid ":class:`c_float`" msgstr ":class:`c_float`" -#: library/ctypes.rst:250 -msgid ":c:type:`float`" +#: library/ctypes.rst:252 +#, fuzzy +msgid ":c:expr:`float`" msgstr ":c:type:`float`" -#: library/ctypes.rst:252 library/ctypes.rst:254 +#: library/ctypes.rst:254 library/ctypes.rst:256 msgid "float" msgstr "*float*" -#: library/ctypes.rst:252 +#: library/ctypes.rst:254 msgid ":class:`c_double`" msgstr ":class:`c_double`" -#: library/ctypes.rst:252 -msgid ":c:type:`double`" +#: library/ctypes.rst:254 +#, fuzzy +msgid ":c:expr:`double`" msgstr ":c:type:`double`" -#: library/ctypes.rst:254 +#: library/ctypes.rst:256 msgid ":class:`c_longdouble`" msgstr ":class:`c_longdouble`" -#: library/ctypes.rst:254 -msgid ":c:type:`long double`" +#: library/ctypes.rst:256 +#, fuzzy +msgid ":c:expr:`long double`" msgstr ":c:type:`long double`" -#: library/ctypes.rst:256 +#: library/ctypes.rst:258 msgid ":class:`c_char_p`" msgstr ":class:`c_char_p`" -#: library/ctypes.rst:256 -msgid ":c:type:`char *` (NUL terminated)" +#: library/ctypes.rst:258 +#, fuzzy +msgid ":c:expr:`char *` (NUL terminated)" msgstr ":c:type:`char *` (terminé par NUL)" -#: library/ctypes.rst:256 +#: library/ctypes.rst:258 msgid "bytes object or ``None``" msgstr "objet octet (*bytes*) ou ``None``" -#: library/ctypes.rst:258 +#: library/ctypes.rst:260 msgid ":class:`c_wchar_p`" msgstr ":class:`c_wchar_p`" -#: library/ctypes.rst:258 -msgid ":c:type:`wchar_t *` (NUL terminated)" +#: library/ctypes.rst:260 +#, fuzzy +msgid ":c:expr:`wchar_t *` (NUL terminated)" msgstr ":c:type:`wchar_t *` (terminé par NUL)" -#: library/ctypes.rst:258 +#: library/ctypes.rst:260 msgid "string or ``None``" msgstr "chaîne de caractères (*string*) ou ``None``" -#: library/ctypes.rst:260 +#: library/ctypes.rst:262 msgid ":class:`c_void_p`" msgstr ":class:`c_void_p`" -#: library/ctypes.rst:260 -msgid ":c:type:`void *`" +#: library/ctypes.rst:262 +#, fuzzy +msgid ":c:expr:`void *`" msgstr ":c:type:`void *`" -#: library/ctypes.rst:260 +#: library/ctypes.rst:262 msgid "int or ``None``" msgstr "*int* ou ``None``" -#: library/ctypes.rst:264 +#: 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:266 +#: library/ctypes.rst:268 msgid "" "All these types can be created by calling them with an optional initializer " "of the correct type and value::" @@ -520,14 +545,14 @@ 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:277 +#: 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:289 +#: 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 " @@ -539,7 +564,7 @@ msgstr "" "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:309 +#: 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 :" @@ -555,12 +580,13 @@ msgstr "" "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:333 +#: 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:type:`wchar_t` " +"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:" @@ -569,11 +595,11 @@ msgstr "" "bloc mémoire modifiable contenant des caractères Unicode du type C :c:type:" "`wchar_t`." -#: library/ctypes.rst:343 +#: library/ctypes.rst:345 msgid "Calling functions, continued" msgstr "Appel de fonctions, suite" -#: library/ctypes.rst:345 +#: 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 " @@ -583,7 +609,7 @@ msgstr "" "exemples suivants ne fonctionnent donc que dans une invite de commande et " "non depuis *IDLE* or *PythonWin* ::" -#: library/ctypes.rst:365 +#: 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, " @@ -594,11 +620,37 @@ msgstr "" "leur type :mod:`ctypes` correspondant pour pouvoir être convertis dans le " "type C requis ::" -#: library/ctypes.rst:378 +#: 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:380 +#: 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 " @@ -611,7 +663,7 @@ msgstr "" "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:395 +#: 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 " @@ -621,11 +673,11 @@ msgstr "" "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:403 +#: 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:405 +#: 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." @@ -633,7 +685,7 @@ 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:408 +#: 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 " @@ -646,7 +698,7 @@ msgstr "" "selon la chaîne de formatage ; cela dit, elle se révèle pratique pour tester " "cette fonctionnalité) ::" -#: library/ctypes.rst:419 +#: 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 " @@ -656,7 +708,7 @@ msgstr "" "(comme le fait le prototype d'une fonction C) et tente de convertir les " "arguments en des types valides ::" -#: library/ctypes.rst:431 +#: 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 " @@ -678,13 +730,14 @@ msgstr "" "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:445 +#: library/ctypes.rst:467 msgid "Return types" msgstr "Types de sortie" -#: library/ctypes.rst:447 +#: library/ctypes.rst:469 +#, fuzzy msgid "" -"By default functions are assumed to return the C :c:type:`int` type. Other " +"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 "" @@ -692,7 +745,7 @@ msgstr "" "`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:451 +#: 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::" @@ -701,7 +754,7 @@ msgstr "" "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:464 +#: 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 " @@ -711,7 +764,7 @@ msgstr "" "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:482 +#: 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 " @@ -727,7 +780,7 @@ msgstr "" "pratique pour vérifier les codes d'erreurs des valeurs de retour et lever " "automatiquement des exceptions ::" -#: library/ctypes.rst:505 +#: 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 " @@ -740,7 +793,7 @@ msgstr "" "code d'erreur. Si celui-ci n'est pas passé, elle appelle :func:" "`GetLastError` pour le récupérer." -#: library/ctypes.rst:510 +#: 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." @@ -749,11 +802,11 @@ msgstr "" "efficacement les erreurs ; référez-vous au manuel de référence pour plus de " "précisions." -#: library/ctypes.rst:517 +#: 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:519 +#: 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 " @@ -765,7 +818,7 @@ msgstr "" "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:523 +#: 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:" @@ -779,11 +832,11 @@ msgstr "" "pointeur. Ainsi, si vous n'avez pas besoin de cet objet dans votre code " "Python, utiliser :func:`byref` est plus performant ::" -#: library/ctypes.rst:545 +#: library/ctypes.rst:567 msgid "Structures and unions" msgstr "Structures et unions" -#: library/ctypes.rst:547 +#: 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 " @@ -796,7 +849,7 @@ msgstr "" "être une liste de *paires*, contenant un *nom de champ* et un *type de " "champ*." -#: library/ctypes.rst:552 +#: 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." @@ -804,7 +857,7 @@ 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:555 +#: 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 " @@ -814,7 +867,7 @@ msgstr "" "et *y* et qui montre également comment instancier une structure avec le " "constructeur ::" -#: library/ctypes.rst:575 +#: 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." @@ -823,7 +876,7 @@ msgstr "" "structure peut elle-même contenir d'autres structures en prenant une " "structure comme type de champ." -#: library/ctypes.rst:578 +#: library/ctypes.rst:600 msgid "" "Here is a RECT structure which contains two POINTs named *upperleft* and " "*lowerright*::" @@ -831,7 +884,7 @@ msgstr "" "Voici une structure RECT qui contient deux POINTs *upperleft* et " "*lowerright* ::" -#: library/ctypes.rst:592 +#: library/ctypes.rst:614 msgid "" "Nested structures can also be initialized in the constructor in several " "ways::" @@ -839,7 +892,7 @@ msgstr "" "Une structure encapsulée peut être instanciée par un constructeur de " "plusieurs façons ::" -#: library/ctypes.rst:597 +#: 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::" @@ -848,7 +901,7 @@ msgstr "" "champs depuis la *classe*. Ils sont importants pour déboguer car ils " "contiennent des informations utiles ::" -#: library/ctypes.rst:611 +#: 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 " @@ -861,11 +914,11 @@ msgstr "" "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:617 +#: library/ctypes.rst:639 msgid "Structure/union alignment and byte order" msgstr "Alignement et boutisme des structures et des unions" -#: library/ctypes.rst:619 +#: 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 :" @@ -879,7 +932,7 @@ msgstr "" "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:625 +#: 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:" @@ -893,11 +946,11 @@ msgstr "" "`LittleEndianStructure`, :class:`BigEndianUnion` ou :class:" "`LittleEndianUnion`. Ces classes ne peuvent pas avoir de champ pointeur." -#: library/ctypes.rst:635 +#: library/ctypes.rst:657 msgid "Bit fields in structures and unions" msgstr "Champs de bits dans les structures et les unions" -#: library/ctypes.rst:637 +#: 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 " @@ -907,11 +960,11 @@ msgstr "" "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:655 +#: library/ctypes.rst:677 msgid "Arrays" msgstr "Tableaux" -#: library/ctypes.rst:657 +#: library/ctypes.rst:679 msgid "" "Arrays are sequences, containing a fixed number of instances of the same " "type." @@ -919,7 +972,7 @@ msgstr "" "Les tableaux sont des séquences qui contiennent un nombre fixe d'instances " "du même type." -#: library/ctypes.rst:659 +#: library/ctypes.rst:681 msgid "" "The recommended way to create array types is by multiplying a data type with " "a positive integer::" @@ -927,7 +980,7 @@ msgstr "" "La meilleure façon de créer des tableaux consiste à multiplier le type de " "donnée par un entier positif ::" -#: library/ctypes.rst:664 +#: library/ctypes.rst:686 msgid "" "Here is an example of a somewhat artificial data type, a structure " "containing 4 POINTs among other stuff::" @@ -935,11 +988,11 @@ msgstr "" "Voici un exemple — un peu artificiel — d'une structure contenant, entre " "autres, 4 POINTs ::" -#: library/ctypes.rst:680 +#: 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:686 +#: library/ctypes.rst:708 msgid "" "The above code print a series of ``0 0`` lines, because the array contents " "is initialized to zeros." @@ -947,15 +1000,15 @@ 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:689 +#: 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:705 +#: library/ctypes.rst:727 msgid "Pointers" msgstr "Pointeurs" -#: library/ctypes.rst:707 +#: library/ctypes.rst:729 msgid "" "Pointer instances are created by calling the :func:`pointer` function on a :" "mod:`ctypes` type::" @@ -963,7 +1016,7 @@ msgstr "" "On crée une instance de pointeur en appelant la fonction :func:`pointer` sur " "un type :mod:`ctypes` ::" -#: library/ctypes.rst:715 +#: 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::" @@ -971,7 +1024,7 @@ msgstr "" "Les instances de pointeurs ont un attribut :attr:`~_Pointer.contents` qui " "renvoie l'objet pointé (l'objet ``i`` ci-dessus) ::" -#: library/ctypes.rst:722 +#: 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::" @@ -979,7 +1032,7 @@ 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:731 +#: 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 " @@ -989,15 +1042,15 @@ msgstr "" "pointeur fait pointer le pointeur vers l'adresse mémoire de cette nouvelle " "instance ::" -#: library/ctypes.rst:743 +#: 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:749 +#: 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:758 +#: 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 " @@ -1011,7 +1064,7 @@ msgstr "" "renvoyé par une fonction C, pointeur que vous *savez* pointer vers un " "tableau et non sur un seul élément." -#: library/ctypes.rst:764 +#: 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 " @@ -1023,7 +1076,7 @@ msgstr "" "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:780 +#: library/ctypes.rst:802 msgid "" "Calling the pointer type without an argument creates a ``NULL`` pointer. " "``NULL`` pointers have a ``False`` boolean value::" @@ -1031,7 +1084,7 @@ msgstr "" "Appeler le pointeur sur type sans arguments crée un pointeur ``NULL``. Les " "pointeurs ``NULL`` s'évaluent à ``False`` ::" -#: library/ctypes.rst:788 +#: library/ctypes.rst:810 msgid "" ":mod:`ctypes` checks for ``NULL`` when dereferencing pointers (but " "dereferencing invalid non-\\ ``NULL`` pointers would crash Python)::" @@ -1040,11 +1093,11 @@ msgstr "" "déréférence un (mais déréférencer des pointeurs non ``NULL`` invalides fait " "planter Python) ::" -#: library/ctypes.rst:807 +#: library/ctypes.rst:829 msgid "Type conversions" msgstr "Conversions de type" -#: library/ctypes.rst:809 +#: 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 " @@ -1063,7 +1116,7 @@ msgstr "" "place de pointeurs, s'ils sont compatibles. Dans le cas de " "``POINTER(c_int)``, *ctypes* accepte des tableaux de *c_int* ::" -#: library/ctypes.rst:830 +#: 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 " @@ -1076,13 +1129,13 @@ msgstr "" "*ctypes* appelle alors automatiquement la fonction de conversion :func:" "`byref`." -#: library/ctypes.rst:835 +#: 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:842 +#: 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 " @@ -1097,11 +1150,11 @@ msgstr "" "`c_int` comme valeur pour le champ ``values``, mais pas des instances " "d'autres types ::" -#: library/ctypes.rst:854 +#: 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:856 +#: 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, " @@ -1116,7 +1169,7 @@ msgstr "" "du second argument, qui pointe sur le même bloc mémoire que le premier " "argument ::" -#: library/ctypes.rst:867 +#: library/ctypes.rst:889 msgid "" "So, :func:`cast` can be used to assign to the ``values`` field of ``Bar`` " "the structure::" @@ -1124,11 +1177,11 @@ msgstr "" "Ainsi, la fonction :func:`cast` permet de remplir le champ ``values`` de la " "structure ``Bar`` ::" -#: library/ctypes.rst:880 +#: library/ctypes.rst:902 msgid "Incomplete Types" msgstr "Types incomplets" -#: library/ctypes.rst:882 +#: 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 " @@ -1138,14 +1191,14 @@ msgstr "" "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:893 +#: 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:906 +#: 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:" @@ -1156,7 +1209,7 @@ msgstr "" "`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:918 +#: 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::" @@ -1165,11 +1218,11 @@ msgstr "" "sur l'autre et enfin nous suivons quelques maillons de la chaîne de " "pointeurs ::" -#: library/ctypes.rst:939 +#: library/ctypes.rst:961 msgid "Callback functions" msgstr "Fonctions de rappel" -#: library/ctypes.rst:941 +#: library/ctypes.rst:963 msgid "" ":mod:`ctypes` allows creating C callable function pointers from Python " "callables. These are sometimes called *callback functions*." @@ -1177,7 +1230,7 @@ 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:944 +#: 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 " @@ -1187,7 +1240,7 @@ msgstr "" "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:948 +#: 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` " @@ -1199,7 +1252,7 @@ msgstr "" "`WINFUNCTYPE` qui crée un type pour les fonctions de rappel qui suivent la " "convention d'appel ``stdcall``." -#: library/ctypes.rst:953 +#: 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 " @@ -1208,7 +1261,7 @@ 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:957 +#: 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 " @@ -1219,7 +1272,7 @@ msgstr "" "l'emploi d'une fonction de rappel. Nous allons utiliser :c:func:`qsort` pour " "ordonner un tableau d'entiers ::" -#: library/ctypes.rst:967 +#: 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 " @@ -1235,7 +1288,7 @@ msgstr "" "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:973 +#: 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::" @@ -1243,7 +1296,7 @@ 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:979 +#: library/ctypes.rst:1001 msgid "" "To get started, here is a simple callback that shows the values it gets " "passed::" @@ -1251,22 +1304,22 @@ msgstr "" "Pour commencer, voici une fonction de rappel simple qui affiche les valeurs " "qu'on lui passe ::" -#: library/ctypes.rst:989 +#: library/ctypes.rst:1011 msgid "The result::" msgstr "Résultat ::" -#: library/ctypes.rst:999 +#: 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:1014 +#: 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:1021 +#: library/ctypes.rst:1043 msgid "" "The function factories can be used as decorator factories, so we may as well " "write::" @@ -1274,7 +1327,7 @@ msgstr "" "Ces fonctions peuvent aussi être utilisées comme des décorateurs ; il est " "donc possible d'écrire ::" -#: library/ctypes.rst:1039 +#: 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 " @@ -1285,7 +1338,7 @@ msgstr "" "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:1043 +#: 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 " @@ -1302,11 +1355,11 @@ msgstr "" "*pas* persistantes d'un appel à l'autre, même si les appels proviennent du " "même fil d'exécution C." -#: library/ctypes.rst:1053 +#: library/ctypes.rst:1075 msgid "Accessing values exported from dlls" msgstr "Accès aux variables exportées depuis une DLL" -#: library/ctypes.rst:1055 +#: 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 " @@ -1318,7 +1371,7 @@ msgstr "" "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:1060 +#: 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 " @@ -1328,7 +1381,7 @@ msgstr "" "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:1069 +#: 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 " @@ -1337,7 +1390,7 @@ 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:1073 +#: 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." @@ -1345,13 +1398,14 @@ msgstr "" "Le pointeur :c:data:`PyImport_FrozenModules` exposé par Python est un autre " "exemple complet de l'utilisation de pointeurs." -#: library/ctypes.rst:1076 +#: library/ctypes.rst:1098 msgid "Quoting the docs for that value:" msgstr "Citons la documentation :" -#: library/ctypes.rst:1078 +#: library/ctypes.rst:1100 +#, fuzzy msgid "" -"This pointer is initialized to point to an array of :c:type:`struct _frozen` " +"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 " @@ -1363,7 +1417,7 @@ msgstr "" "tableau. Du code tiers peut jouer avec pour construire dynamiquement une " "collection de module figés." -#: library/ctypes.rst:1083 +#: 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`::" @@ -1372,15 +1426,16 @@ msgstr "" "taille de l'exemple, nous nous bornons à montrer comment lire ce tableau " "avec :mod:`ctypes` ::" -#: library/ctypes.rst:1095 +#: library/ctypes.rst:1117 +#, fuzzy msgid "" -"We have defined the :c:type:`struct _frozen` data type, so we can get the " -"pointer to the table::" +"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:1102 +#: 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 " @@ -1394,7 +1449,7 @@ msgstr "" "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:1120 +#: 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 " @@ -1404,11 +1459,11 @@ msgstr "" "(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:1128 +#: library/ctypes.rst:1150 msgid "Surprises" msgstr "Pièges" -#: library/ctypes.rst:1130 +#: library/ctypes.rst:1152 msgid "" "There are some edges in :mod:`ctypes` where you might expect something other " "than what actually happens." @@ -1416,11 +1471,11 @@ 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:1133 +#: library/ctypes.rst:1155 msgid "Consider the following example::" msgstr "Examinons l'exemple suivant ::" -#: library/ctypes.rst:1153 +#: 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::" @@ -1429,7 +1484,7 @@ msgstr "" "``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:1161 +#: 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 " @@ -1443,7 +1498,7 @@ msgstr "" "contenu de ``temp1``. Et donc, la dernière affectation, ``rc.b = temp1``, " "n'a pas l'effet escompté." -#: library/ctypes.rst:1167 +#: 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 " @@ -1453,14 +1508,14 @@ msgstr "" "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:1171 +#: 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:1183 +#: library/ctypes.rst:1205 msgid "" "Objects instantiated from :class:`c_char_p` can only have their value set to " "bytes or integers." @@ -1468,7 +1523,7 @@ 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:1186 +#: 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 " @@ -1482,18 +1537,18 @@ msgstr "" "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:1196 +#: library/ctypes.rst:1218 msgid "Variable-sized data types" msgstr "Types de données à taille flottante" -#: library/ctypes.rst:1198 +#: 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:1200 +#: 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, " @@ -1508,7 +1563,7 @@ msgstr "" "unitaire du type considéré. Une :exc:`ValueError` est levée si c'est le " "cas ::" -#: library/ctypes.rst:1220 +#: 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, " @@ -1518,7 +1573,7 @@ msgstr "" "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:1232 +#: 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 " @@ -1529,15 +1584,15 @@ msgstr "" "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:1240 +#: library/ctypes.rst:1262 msgid "ctypes reference" msgstr "Référence du module" -#: library/ctypes.rst:1246 +#: library/ctypes.rst:1268 msgid "Finding shared libraries" msgstr "Recherche de bibliothèques partagées" -#: library/ctypes.rst:1248 +#: 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." @@ -1546,7 +1601,7 @@ msgstr "" "moment de la compilation, de l'édition de liens et pendant l'exécution du " "programme." -#: library/ctypes.rst:1251 +#: 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 " @@ -1561,7 +1616,7 @@ msgstr "" "de la même façon qu'un programme qui s'exécute, et appellent directement le " "chargeur." -#: library/ctypes.rst:1257 +#: library/ctypes.rst:1279 msgid "" "The :mod:`ctypes.util` module provides a function which can help to " "determine the library to load." @@ -1569,7 +1624,7 @@ msgstr "" "Le module :mod:`ctypes.util` fournit une fonction pour déterminer quelle " "bibliothèque charger." -#: library/ctypes.rst:1265 +#: 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 " @@ -1582,11 +1637,11 @@ msgstr "" "de l'éditeur de lien :option:`!-l`). Si la fonction ne parvient pas à " "trouver de bibliothèque, elle renvoie ``None``." -#: library/ctypes.rst:1918 +#: library/ctypes.rst:1935 msgid "The exact functionality is system dependent." msgstr "Le mode opératoire exact dépend du système." -#: library/ctypes.rst:1272 +#: 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 " @@ -1596,7 +1651,7 @@ msgstr "" "(``/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:1276 +#: 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 " @@ -1605,11 +1660,11 @@ 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:1280 +#: library/ctypes.rst:1302 msgid "Here are some examples::" msgstr "Voici quelques exemples :" -#: library/ctypes.rst:1291 +#: 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::" @@ -1618,7 +1673,7 @@ msgstr "" "chemins prédéfinies pour trouver la bibliothèque et en renvoie le chemin " "complet si elle la trouve :" -#: library/ctypes.rst:1305 +#: 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 " @@ -1629,7 +1684,7 @@ msgstr "" "de convention de nommage, des appels comme ``find_library(\"c\")`` échouent " "et renvoient ``None``." -#: library/ctypes.rst:1309 +#: 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 " @@ -1642,11 +1697,11 @@ msgstr "" "plutôt que d'utiliser :func:`find_library` pour la trouver lors de " "l'exécution." -#: library/ctypes.rst:1317 +#: library/ctypes.rst:1339 msgid "Loading shared libraries" msgstr "Chargement des bibliothèques partagées" -#: library/ctypes.rst:1319 +#: 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:" @@ -1655,17 +1710,18 @@ msgstr "" "processus Python. L'un d'entre eux consiste à instancier une des classes " "suivantes :" -#: library/ctypes.rst:1325 +#: 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:type:`int`." +"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:1329 +#: 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:" @@ -1685,7 +1741,7 @@ msgstr "" "résoudre, il faut lister toutes les dépendances de la DLL et trouver celle " "qui manque en utilisant des outils de débogage et de traçage Windows." -#: library/ctypes.rst:1341 +#: library/ctypes.rst:1363 msgid "" "`Microsoft DUMPBIN tool `_ -- A tool to find DLL dependents." @@ -1693,7 +1749,7 @@ msgstr "" "`DUMPBIN `_ — un " "utilitaire Microsoft pour lister les dépendances d'une DLL." -#: library/ctypes.rst:1347 +#: 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 " @@ -1710,32 +1766,23 @@ msgstr "" "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:1354 +#: library/ctypes.rst:1376 msgid ":exc:`WindowsError` used to be raised." msgstr ":exc:`WindowsError` était levée auparavant." -#: library/ctypes.rst:1360 +#: 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:type:`int` by default." +"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:1364 -msgid "" -"On Windows CE only the standard calling convention is used, for convenience " -"the :class:`WinDLL` and :class:`OleDLL` use the standard calling convention " -"on this platform." -msgstr "" -"Sous Windows CE, seule la convention d'appel standard est utilisée. Pour des " -"raisons pratiques, :class:`WinDLL` et :class:`OleDLL` utilisent la " -"convention d'appel standard sur cette plate-forme." - -#: library/ctypes.rst:1368 +#: library/ctypes.rst:1386 msgid "" "The Python :term:`global interpreter lock` is released before calling any " "function exported by these libraries, and reacquired afterwards." @@ -1744,7 +1791,7 @@ msgstr "" "est relâché avant chaque appel d'une fonction exposée par ces bibliothèques " "et ré-activé après." -#: library/ctypes.rst:1374 +#: library/ctypes.rst: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 " @@ -1756,12 +1803,12 @@ msgstr "" "drapeau d'erreur Python est vérifié. Si celui-ci est activé, une exception " "Python est levée." -#: library/ctypes.rst:1379 +#: library/ctypes.rst: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:1381 +#: 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 " @@ -1777,7 +1824,7 @@ msgstr "" "forme sous-jacente permettent de charger la bibliothèque dans le processus, " "et d'en obtenir un lien." -#: library/ctypes.rst:1388 +#: library/ctypes.rst: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 " @@ -1789,7 +1836,7 @@ msgstr "" "manuel. En Windows, *mode* est ignoré. Sur les systèmes POSIX, RTLD_NOW y " "est toujours ajouté. Ceci n'est pas configurable." -#: library/ctypes.rst:1393 +#: library/ctypes.rst: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:" @@ -1806,7 +1853,7 @@ msgstr "" "la fonction est échangée avec la copie privée de *ctypes*. La même chose se " "produit juste après l'appel de la fonction." -#: library/ctypes.rst:1400 +#: library/ctypes.rst: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 " @@ -1816,7 +1863,7 @@ msgstr "" "*ctypes*. La fonction :func:`ctypes.set_errno` affecte une nouvelle valeur à " "la copie privée et renvoie l'ancienne valeur." -#: library/ctypes.rst:1404 +#: library/ctypes.rst: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 :" @@ -1830,7 +1877,7 @@ msgstr "" "get_last_error` et :func:`ctypes.set_last_error` servent à obtenir et " "modifier la copie privée *ctypes* de ce code d'erreur." -#: library/ctypes.rst:1410 +#: library/ctypes.rst: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 " @@ -1847,11 +1894,11 @@ msgstr "" "le chemin complet à la DLL reste le moyen le plus sûr de s'assurer que la " "bonne bibliothèque et les bonnes dépendances sont chargées." -#: library/ctypes.rst:1417 +#: library/ctypes.rst:1435 msgid "Added *winmode* parameter." msgstr "Ajout du paramètre *winmode*." -#: library/ctypes.rst:1424 +#: 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." @@ -1859,7 +1906,7 @@ msgstr "" "Valeur possible pour le paramètre *mode*. Vaut zéro sur les plates-formes où " "ce drapeau n'est pas disponible." -#: library/ctypes.rst:1431 +#: library/ctypes.rst:1449 msgid "" "Flag to use as *mode* parameter. On platforms where this is not available, " "it is the same as *RTLD_GLOBAL*." @@ -1867,7 +1914,7 @@ msgstr "" "Valeur possible pour le paramètre *mode*. Vaut *RTLD_GLOBAL* sur les plates-" "formes où ce drapeau n'est pas disponible." -#: library/ctypes.rst:1438 +#: library/ctypes.rst: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*." @@ -1876,7 +1923,7 @@ msgstr "" "*RTLD_GLOBAL* sur OSX 10.3 et *RTLD_LOCAL* sur les autres systèmes " "d'exploitation." -#: library/ctypes.rst:1441 +#: library/ctypes.rst: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 " @@ -1890,7 +1937,7 @@ msgstr "" "accès consécutifs renvoient à chaque fois le même objet. Accéder à une " "fonction par indice renvoie cependant chaque fois un nouvel objet :" -#: library/ctypes.rst:1454 +#: library/ctypes.rst:1472 msgid "" "The following public attributes are available, their name starts with an " "underscore to not clash with exported function names:" @@ -1898,15 +1945,15 @@ msgstr "" "Les attributs publics suivants sont disponibles, leur nom commence par un " "tiret bas pour éviter les conflits avec les noms des fonctions exportées :" -#: library/ctypes.rst:1460 +#: library/ctypes.rst:1478 msgid "The system handle used to access the library." msgstr "Le lien système d'accès à la bibliothèque." -#: library/ctypes.rst:1465 +#: 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:1467 +#: 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 " @@ -1918,7 +1965,7 @@ msgstr "" "meth:`LoadLibrary`, soit en récupérant la bibliothèque comme attribut de " "l'instance du chargeur." -#: library/ctypes.rst:1475 +#: library/ctypes.rst:1493 msgid "" "Class which loads shared libraries. *dlltype* should be one of the :class:" "`CDLL`, :class:`PyDLL`, :class:`WinDLL`, or :class:`OleDLL` types." @@ -1926,7 +1973,7 @@ msgstr "" "Classe pour charger une bibliothèque partagée. *dlltype* doit être de type :" "class:`CDLL`, :class:`PyDLL`, :class:`WinDLL` ou :class:`OleDLL`." -#: library/ctypes.rst:1478 +#: library/ctypes.rst: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 " @@ -1937,7 +1984,7 @@ msgstr "" "en cache, donc des accès consécutifs renvoient la même bibliothèque à chaque " "fois." -#: library/ctypes.rst:1484 +#: library/ctypes.rst:1502 msgid "" "Load a shared library into the process and return it. This method always " "returns a new instance of the library." @@ -1945,36 +1992,37 @@ msgstr "" "Charge une bibliothèque partagée dans le processus et la renvoie. Cette " "méthode renvoie toujours une nouvelle instance de la bibliothèque." -#: library/ctypes.rst:1488 +#: library/ctypes.rst:1506 msgid "These prefabricated library loaders are available:" msgstr "Plusieurs chargeurs sont fournis :" -#: library/ctypes.rst:1493 +#: library/ctypes.rst:1511 msgid "Creates :class:`CDLL` instances." msgstr "Pour créer des instances de :class:`CDLL`." -#: library/ctypes.rst:1499 +#: 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:1505 +#: 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:1511 +#: library/ctypes.rst:1529 msgid "Creates :class:`PyDLL` instances." msgstr "Pour créer des instances de :class:`PyDLL`." -#: library/ctypes.rst:1514 +#: 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:1520 +#: 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:type:" +"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 "" @@ -1984,7 +2032,7 @@ msgstr "" "donc définir vous-même le bon attribut :attr:`restype` pour pouvoir les " "utiliser." -#: library/ctypes.rst:1525 +#: library/ctypes.rst:1543 msgid "" "Raises an :ref:`auditing event ` ``ctypes.dlopen`` with argument " "``name``." @@ -1992,7 +2040,7 @@ msgstr "" "Lève un :ref:`évènement d'audit ` ``ctypes.dlopen``, avec en " "argument ``name``." -#: library/ctypes.rst:1527 +#: 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 " @@ -2002,7 +2050,7 @@ msgstr "" "``name``, le nom de la bibliothèque (une chaîne de caractères), lève un :ref:" "`évènement d'audit ` ``ctypes.dlopen``." -#: library/ctypes.rst:1531 +#: library/ctypes.rst:1549 #, fuzzy msgid "" "Raises an :ref:`auditing event ` ``ctypes.dlsym`` with arguments " @@ -2012,7 +2060,7 @@ msgstr "" "``name``, le nom de la bibliothèque (une chaîne de caractères), lève un :ref:" "`évènement d'audit ` ``ctypes.dlopen``." -#: library/ctypes.rst:1533 +#: library/ctypes.rst:1551 msgid "" "Accessing a function on a loaded library raises an auditing event ``ctypes." "dlsym`` with arguments ``library`` (the library object) and ``name`` (the " @@ -2022,7 +2070,7 @@ msgstr "" "dlsym`` avec ``library`` (l'objet bibliothèque) et ``name`` (le nom du " "symbole — une chaîne de caractères ou un entier) comme arguments." -#: library/ctypes.rst:1537 +#: library/ctypes.rst:1555 #, fuzzy msgid "" "Raises an :ref:`auditing event ` ``ctypes.dlsym/handle`` with " @@ -2032,7 +2080,7 @@ msgstr "" "``name``, le nom de la bibliothèque (une chaîne de caractères), lève un :ref:" "`évènement d'audit ` ``ctypes.dlopen``." -#: library/ctypes.rst:1539 +#: library/ctypes.rst: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 " @@ -2042,11 +2090,11 @@ msgstr "" "à une fonction lève l'évènement d'audit ``ctypes.dlsym/handle`` avec " "``handle`` (le lien vers la bibliothèque) et ``name`` comme arguments." -#: library/ctypes.rst:1546 +#: library/ctypes.rst:1564 msgid "Foreign functions" msgstr "Fonctions externes" -#: library/ctypes.rst:1548 +#: 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 " @@ -2061,11 +2109,11 @@ msgstr "" "renvoie le type par défaut du chargeur de la bibliothèque. Ce sont des " "instances de la classe privée :" -#: library/ctypes.rst:1557 +#: library/ctypes.rst:1575 msgid "Base class for C callable foreign functions." msgstr "Classe de base pour les fonctions externes C." -#: library/ctypes.rst:1559 +#: library/ctypes.rst:1577 msgid "" "Instances of foreign functions are also C compatible data types; they " "represent C function pointers." @@ -2073,7 +2121,7 @@ msgstr "" "Une instance de fonction externe est également un type de donnée compatible " "avec le C ; elle représente un pointeur vers une fonction." -#: library/ctypes.rst:1562 +#: library/ctypes.rst:1580 msgid "" "This behavior can be customized by assigning to special attributes of the " "foreign function object." @@ -2081,19 +2129,21 @@ msgstr "" "Son comportement peut-être personnalisé en réaffectant les attributs " "spécifiques de l'objet représentant la fonction externe." -#: library/ctypes.rst:1567 +#: library/ctypes.rst:1585 +#, fuzzy msgid "" "Assign a ctypes type to specify the result type of the foreign function. Use " -"``None`` for :c:type:`void`, a function not returning anything." +"``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:1570 +#: 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:type:`int`, and the " +"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 " @@ -2108,7 +2158,7 @@ msgstr "" "affecter un type *ctypes* à :attr:`restype` et à affecter un appelable à " "l'attribut :attr:`errcheck`." -#: library/ctypes.rst:1579 +#: 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 " @@ -2122,7 +2172,7 @@ msgstr "" "la taille du *n*-uplet mais les fonctions qui utilisent la convention " "d'appel C acceptent aussi des arguments additionnels non-définis." -#: library/ctypes.rst:1585 +#: library/ctypes.rst: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, " @@ -2139,7 +2189,7 @@ msgstr "" "passée en argument en un objet chaîne d'octets selon les règles de " "conversion *ctypes*." -#: library/ctypes.rst:1592 +#: library/ctypes.rst: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 " @@ -2153,7 +2203,7 @@ msgstr "" "de créer des adaptateurs qui convertissent des objets arbitraires en des " "paramètres de fonction." -#: library/ctypes.rst:1599 +#: library/ctypes.rst:1617 msgid "" "Assign a Python function or another callable to this attribute. The callable " "will be called with three or more arguments:" @@ -2161,7 +2211,7 @@ msgstr "" "Définit une fonction Python ou tout autre appelable qui sera appelé avec " "trois arguments ou plus :" -#: library/ctypes.rst:1606 +#: library/ctypes.rst:1624 msgid "" "*result* is what the foreign function returns, as specified by the :attr:" "`restype` attribute." @@ -2169,7 +2219,7 @@ msgstr "" "*result* est la valeur de retour de la fonction externe, comme défini par " "l'attribut :attr:`restype`." -#: library/ctypes.rst:1609 +#: library/ctypes.rst: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." @@ -2179,7 +2229,7 @@ msgstr "" "plusieurs fonctions ou de faire des actions supplémentaires après leur " "exécution." -#: library/ctypes.rst:1613 +#: 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." @@ -2188,7 +2238,7 @@ msgstr "" "la fonction, ceci permet de spécialiser le comportement des arguments " "utilisés." -#: library/ctypes.rst:1617 +#: 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 " @@ -2198,7 +2248,7 @@ msgstr "" "fonction externe, mais il peut aussi vérifier la valeur du résultat et lever " "une exception si l'appel a échoué." -#: library/ctypes.rst:1624 +#: library/ctypes.rst:1642 msgid "" "This exception is raised when a foreign function call cannot convert one of " "the passed arguments." @@ -2206,13 +2256,13 @@ msgstr "" "Exception levée quand un appel à la fonction externe ne peut pas convertir " "un des arguments qu'elle a reçus." -#: library/ctypes.rst:1628 +#: library/ctypes.rst:1646 msgid "" "Raises an :ref:`auditing event ` ``ctypes.seh_exception`` with " "argument ``code``." msgstr "" -#: library/ctypes.rst:1630 +#: 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 " @@ -2227,7 +2277,7 @@ msgstr "" "permet à un point d'entrée (*hook* en anglais) d'audit de remplacer " "l'exception par une des siennes." -#: library/ctypes.rst:1636 +#: library/ctypes.rst:1654 #, fuzzy msgid "" "Raises an :ref:`auditing event ` ``ctypes.call_function`` with " @@ -2237,7 +2287,7 @@ msgstr "" "évènements d'audit ``ctypes.call_function`` avec ``function pointer`` et " "``arguments`` comme arguments." -#: library/ctypes.rst:1638 +#: 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 " @@ -2247,11 +2297,11 @@ msgstr "" "évènements d'audit ``ctypes.call_function`` avec ``function pointer`` et " "``arguments`` comme arguments." -#: library/ctypes.rst:1644 +#: library/ctypes.rst:1662 msgid "Function prototypes" msgstr "Prototypes de fonction" -#: library/ctypes.rst:1646 +#: 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 " @@ -2271,7 +2321,7 @@ msgstr "" "``@décorateur``. Ceci est illustré dans la section :ref:`ctypes-callback-" "functions`." -#: library/ctypes.rst:1657 +#: 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 " @@ -2285,13 +2335,12 @@ msgstr "" "système :data:`errno` est échangée avec la vraie valeur de :data:`errno` " "avant et après l'appel ; *use_last_error* a le même effet sous Windows." -#: library/ctypes.rst:1667 +#: library/ctypes.rst:1685 +#, fuzzy msgid "" "Windows only: The returned function prototype creates functions that use the " -"``stdcall`` calling convention, except on Windows CE where :func:" -"`WINFUNCTYPE` is the same as :func:`CFUNCTYPE`. The function will release " -"the GIL during the call. *use_errno* and *use_last_error* have the same " -"meaning as above." +"``stdcall`` calling convention. The function will release the GIL during " +"the call. *use_errno* and *use_last_error* have the same meaning as above." msgstr "" "En Windows seulement : renvoie un prototype de fonction qui crée des " "fonctions qui suivent la convention d'appel standard ``stdcall``, sauf sous " @@ -2299,7 +2348,7 @@ msgstr "" "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:1676 +#: 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." @@ -2308,7 +2357,7 @@ msgstr "" "convention d'appel Python. Les fonctions ne libèreront *pas* le GIL lors de " "leur exécution." -#: library/ctypes.rst:1679 +#: 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 " @@ -2317,20 +2366,20 @@ msgstr "" "Il y a plusieurs façons d'instancier les prototypes de fonction créés par " "ces fabriques, selon le type et le nombre de paramètres de l'appel :" -#: library/ctypes.rst:1687 +#: library/ctypes.rst: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:1694 +#: 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:1701 +#: 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 " @@ -2343,7 +2392,7 @@ msgstr "" "indice (dans la table des symboles) à passer comme un entier. Le second " "élément est l'instance de la bibliothèque partagée." -#: library/ctypes.rst:1711 +#: library/ctypes.rst: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* " @@ -2356,7 +2405,7 @@ msgstr "" "l'identificateur de plateforme, qui est utilisé dans la remontée d'erreurs " "étendue." -#: library/ctypes.rst:1716 +#: 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 " @@ -2366,7 +2415,7 @@ msgstr "" "de passer un pointeur vers l'interface COM en premier argument, en sus des " "arguments passés dans le *n*-uplet :attr:`argtypes`." -#: library/ctypes.rst:1720 +#: library/ctypes.rst:1737 msgid "" "The optional *paramflags* parameter creates foreign function wrappers with " "much more functionality than the features described above." @@ -2375,11 +2424,11 @@ msgstr "" "avec des fonctionnalités supplémentaires par rapport à celles décrites ci-" "dessus." -#: library/ctypes.rst:1723 +#: 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:1725 +#: 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." @@ -2388,7 +2437,7 @@ msgstr "" "le paramètre correspondant. Ce doit être aussi un *n*-uplet, avec un, deux " "ou trois éléments." -#: library/ctypes.rst:1728 +#: library/ctypes.rst:1745 msgid "" "The first item is an integer containing a combination of direction flags for " "the parameter:" @@ -2396,31 +2445,31 @@ msgstr "" "Le premier élément est un entier qui contient une combinaison de drapeaux " "qui précisent le sens des paramètres (entrée ou sortie) :" -#: library/ctypes.rst:1732 +#: library/ctypes.rst:1749 msgid "1" msgstr "1" -#: library/ctypes.rst:1732 +#: library/ctypes.rst:1749 msgid "Specifies an input parameter to the function." msgstr "Paramètre d'entrée." -#: library/ctypes.rst:1735 +#: library/ctypes.rst:1752 msgid "2" msgstr "2" -#: library/ctypes.rst:1735 +#: 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:1738 +#: library/ctypes.rst:1755 msgid "4" msgstr "4" -#: library/ctypes.rst:1738 +#: 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:1740 +#: 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." @@ -2429,12 +2478,12 @@ msgstr "" "nom du paramètre. Si cet élément est donné, la fonction externe pourra être " "appelée avec des paramètres nommés." -#: library/ctypes.rst:1743 +#: library/ctypes.rst: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:1745 +#: 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 " @@ -2445,17 +2494,17 @@ msgstr "" "et des arguments nommés. Sa déclaration C dans le fichier d'en-tête des " "fenêtres est ::" -#: library/ctypes.rst:1779 +#: library/ctypes.rst:1796 msgid "Here is the wrapping with :mod:`ctypes`::" msgstr "L'encapsulation :mod:`ctypes` correspondante est alors ::" -#: library/ctypes.rst:1764 +#: 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:1770 +#: library/ctypes.rst:1787 msgid "" "A second example demonstrates output parameters. The win32 " "``GetWindowRect`` function retrieves the dimensions of a specified window by " @@ -2466,7 +2515,7 @@ msgstr "" "``GetWindowRect`` donne les dimensions d'une fenêtre en les copiant dans une " "structure ``RECT`` que l'appelant doit fournir. Sa déclaration en C est ::" -#: library/ctypes.rst:1788 +#: library/ctypes.rst: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 " @@ -2479,7 +2528,7 @@ msgstr "" "fonction *GetWindowRect* renvoie donc une instance de *RECT* quand elle est " "appelée." -#: library/ctypes.rst:1793 +#: 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`` " @@ -2493,7 +2542,7 @@ msgstr "" "pour indiquer le succès ou l'échec de l'exécution, donc cette fonction peut " "vérifier le résultat et lever une exception quand l'appel à l'API a échoué ::" -#: library/ctypes.rst:1806 +#: library/ctypes.rst:1823 msgid "" "If the :attr:`errcheck` function returns the argument tuple it receives " "unchanged, :mod:`ctypes` continues the normal processing it does on the " @@ -2508,46 +2557,46 @@ msgstr "" "correspondants et les renvoyer en retour. Dans ce cas, l'exécution " "habituelle n'a plus lieu ::" -#: library/ctypes.rst:1825 +#: library/ctypes.rst:1842 msgid "Utility functions" msgstr "Fonctions utilitaires" -#: library/ctypes.rst:1829 +#: 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:1832 +#: library/ctypes.rst:1849 msgid "" "Raises an :ref:`auditing event ` ``ctypes.addressof`` with " "argument ``obj``." msgstr "" -#: library/ctypes.rst:1837 +#: 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:1843 +#: 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:1847 +#: library/ctypes.rst:1864 msgid "``byref(obj, offset)`` corresponds to this C code::" msgstr "" -#: library/ctypes.rst:1851 +#: 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:1857 +#: 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* " @@ -2555,19 +2604,19 @@ msgid "" "as a pointer." msgstr "" -#: library/ctypes.rst:1865 +#: 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:1868 +#: 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:1871 +#: 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 " @@ -2576,25 +2625,25 @@ msgid "" "not be used." msgstr "" -#: library/ctypes.rst:1876 +#: library/ctypes.rst:1893 msgid "" "Raises an :ref:`auditing event ` ``ctypes.create_string_buffer`` " "with arguments ``init``, ``size``." msgstr "" -#: library/ctypes.rst:1881 +#: 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:1884 +#: 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:1887 +#: 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 " @@ -2603,27 +2652,27 @@ msgid "" "should not be used." msgstr "" -#: library/ctypes.rst:1893 +#: library/ctypes.rst:1910 msgid "" "Raises an :ref:`auditing event ` ``ctypes.create_unicode_buffer`` " "with arguments ``init``, ``size``." msgstr "" -#: library/ctypes.rst:1898 +#: 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:1905 +#: 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:1913 +#: 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 " @@ -2631,92 +2680,92 @@ msgid "" "If no library can be found, returns ``None``." msgstr "" -#: library/ctypes.rst:1924 +#: 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:1928 +#: 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:1935 +#: 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:1942 +#: 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." +"thread. This function calls the Windows ``GetLastError()`` function " +"directly, it does not return the ctypes-private copy of the error code." msgstr "" -#: library/ctypes.rst:1948 +#: library/ctypes.rst: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:1951 +#: library/ctypes.rst:1968 msgid "" "Raises an :ref:`auditing event ` ``ctypes.get_errno`` with no " "arguments." msgstr "" -#: library/ctypes.rst:1955 +#: 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:1958 +#: library/ctypes.rst:1975 msgid "" "Raises an :ref:`auditing event ` ``ctypes.get_last_error`` with no " "arguments." msgstr "" -#: library/ctypes.rst:1962 +#: 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:1969 +#: 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:1976 +#: 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:1983 +#: 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:1986 +#: 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:1992 +#: 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 " @@ -2724,51 +2773,51 @@ msgid "" "but it is possible to enlarge the buffer." msgstr "" -#: library/ctypes.rst:2000 +#: 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:2003 +#: library/ctypes.rst:2020 msgid "" "Raises an :ref:`auditing event ` ``ctypes.set_errno`` with " "argument ``errno``." msgstr "" -#: library/ctypes.rst:2008 +#: 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:2012 +#: library/ctypes.rst:2029 msgid "" "Raises an :ref:`auditing event ` ``ctypes.set_last_error`` with " "argument ``error``." msgstr "" -#: library/ctypes.rst:2017 +#: 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:2023 +#: 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:2027 +#: library/ctypes.rst:2044 msgid "" "Raises an :ref:`auditing event ` ``ctypes.string_at`` with " "arguments ``address``, ``size``." msgstr "" -#: library/ctypes.rst:2032 +#: 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, " @@ -2777,11 +2826,11 @@ msgid "" "error." msgstr "" -#: library/ctypes.rst:2038 +#: library/ctypes.rst:2055 msgid "An instance of :exc:`WindowsError` used to be created." msgstr "" -#: library/ctypes.rst:2044 +#: 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 " @@ -2789,17 +2838,17 @@ msgid "" "terminated." msgstr "" -#: library/ctypes.rst:2049 +#: library/ctypes.rst:2066 msgid "" "Raises an :ref:`auditing event ` ``ctypes.wstring_at`` with " "arguments ``address``, ``size``." msgstr "" -#: library/ctypes.rst:2055 +#: library/ctypes.rst:2072 msgid "Data types" msgstr "Types de données" -#: library/ctypes.rst:2060 +#: 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 " @@ -2809,13 +2858,13 @@ msgid "" "alive in case the memory block contains pointers." msgstr "" -#: library/ctypes.rst:2067 +#: 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:2072 +#: 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. " @@ -2824,13 +2873,13 @@ msgid "" "exc:`ValueError` is raised." msgstr "" -#: library/ctypes.rst:2088 +#: library/ctypes.rst:2105 msgid "" "Raises an :ref:`auditing event ` ``ctypes.cdata/buffer`` with " "arguments ``pointer``, ``size``, ``offset``." msgstr "" -#: library/ctypes.rst:2082 +#: 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 " @@ -2838,25 +2887,25 @@ msgid "" "If the source buffer is not large enough a :exc:`ValueError` is raised." msgstr "" -#: library/ctypes.rst:2092 +#: 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:2095 +#: library/ctypes.rst:2112 msgid "" "Raises an :ref:`auditing event ` ``ctypes.cdata`` with argument " "``address``." msgstr "" -#: library/ctypes.rst:2097 +#: 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:2103 +#: 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 " @@ -2864,25 +2913,25 @@ msgid "" "be used as a function call parameter." msgstr "" -#: library/ctypes.rst:2108 +#: 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:2114 +#: 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:2118 +#: library/ctypes.rst:2135 msgid "Common instance variables of ctypes data types:" msgstr "" -#: library/ctypes.rst:2122 +#: 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:" @@ -2890,13 +2939,13 @@ msgid "" "block." msgstr "" -#: library/ctypes.rst:2129 +#: 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:2134 +#: 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. " @@ -2904,7 +2953,7 @@ msgid "" "dictionary." msgstr "" -#: library/ctypes.rst:2147 +#: 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 " @@ -2913,11 +2962,11 @@ msgid "" "types that are not and do not contain pointers can now be pickled." msgstr "" -#: library/ctypes.rst:2153 +#: library/ctypes.rst:2170 msgid "Instances have a single attribute:" msgstr "" -#: library/ctypes.rst:2157 +#: 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 " @@ -2925,7 +2974,7 @@ msgid "" "bytes object or string." msgstr "" -#: library/ctypes.rst:2162 +#: 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 " @@ -2933,7 +2982,7 @@ msgid "" "true for all other ctypes object instances." msgstr "" -#: library/ctypes.rst:2168 +#: 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 " @@ -2942,7 +2991,7 @@ msgid "" "receive a Python bytes object, *not* a :class:`c_char_p` instance." msgstr "" -#: library/ctypes.rst:2176 +#: 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 " @@ -2950,204 +2999,204 @@ msgid "" "you can get the value of the pointer by accessing the ``value`` attribute." msgstr "" -#: library/ctypes.rst:2181 +#: library/ctypes.rst:2198 msgid "These are the fundamental ctypes data types:" msgstr "" -#: library/ctypes.rst:2185 +#: library/ctypes.rst:2202 msgid "" -"Represents the C :c:type:`signed char` datatype, and interprets the value as " +"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:2192 +#: library/ctypes.rst:2209 msgid "" -"Represents the C :c:type:`char` datatype, and interprets the value as a " +"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:2199 +#: library/ctypes.rst:2216 msgid "" -"Represents the C :c:type:`char *` datatype when it points to a zero-" +"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:2207 +#: library/ctypes.rst:2224 msgid "" -"Represents the C :c:type:`double` datatype. The constructor accepts an " +"Represents the C :c:expr:`double` datatype. The constructor accepts an " "optional float initializer." msgstr "" -#: library/ctypes.rst:2213 +#: library/ctypes.rst:2230 msgid "" -"Represents the C :c:type:`long double` datatype. The constructor accepts an " +"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:2219 +#: library/ctypes.rst:2236 msgid "" -"Represents the C :c:type:`float` datatype. The constructor accepts an " +"Represents the C :c:expr:`float` datatype. The constructor accepts an " "optional float initializer." msgstr "" -#: library/ctypes.rst:2225 +#: library/ctypes.rst:2242 msgid "" -"Represents the C :c:type:`signed int` datatype. The constructor accepts an " +"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:2232 +#: library/ctypes.rst:2249 msgid "" -"Represents the C 8-bit :c:type:`signed int` datatype. Usually an alias for :" +"Represents the C 8-bit :c:expr:`signed int` datatype. Usually an alias for :" "class:`c_byte`." msgstr "" -#: library/ctypes.rst:2238 +#: library/ctypes.rst:2255 msgid "" -"Represents the C 16-bit :c:type:`signed int` datatype. Usually an alias " +"Represents the C 16-bit :c:expr:`signed int` datatype. Usually an alias " "for :class:`c_short`." msgstr "" -#: library/ctypes.rst:2244 +#: library/ctypes.rst:2261 msgid "" -"Represents the C 32-bit :c:type:`signed int` datatype. Usually an alias " +"Represents the C 32-bit :c:expr:`signed int` datatype. Usually an alias " "for :class:`c_int`." msgstr "" -#: library/ctypes.rst:2250 +#: library/ctypes.rst:2267 msgid "" -"Represents the C 64-bit :c:type:`signed int` datatype. Usually an alias " +"Represents the C 64-bit :c:expr:`signed int` datatype. Usually an alias " "for :class:`c_longlong`." msgstr "" -#: library/ctypes.rst:2256 +#: library/ctypes.rst:2273 msgid "" -"Represents the C :c:type:`signed long` datatype. The constructor accepts an " +"Represents the C :c:expr:`signed long` datatype. The constructor accepts an " "optional integer initializer; no overflow checking is done." msgstr "" -#: library/ctypes.rst:2262 +#: library/ctypes.rst:2279 msgid "" -"Represents the C :c:type:`signed long long` datatype. The constructor " +"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:2268 +#: library/ctypes.rst:2285 msgid "" -"Represents the C :c:type:`signed short` datatype. The constructor accepts " +"Represents the C :c:expr:`signed short` datatype. The constructor accepts " "an optional integer initializer; no overflow checking is done." msgstr "" -#: library/ctypes.rst:2274 +#: library/ctypes.rst:2291 msgid "Represents the C :c:type:`size_t` datatype." msgstr "" -#: library/ctypes.rst:2279 +#: library/ctypes.rst:2296 msgid "Represents the C :c:type:`ssize_t` datatype." msgstr "" -#: library/ctypes.rst:2286 +#: library/ctypes.rst:2303 msgid "" -"Represents the C :c:type:`unsigned char` datatype, it interprets the value " +"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:2293 +#: library/ctypes.rst:2310 msgid "" -"Represents the C :c:type:`unsigned int` datatype. The constructor accepts " +"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:2300 +#: library/ctypes.rst:2317 msgid "" -"Represents the C 8-bit :c:type:`unsigned int` datatype. Usually an alias " +"Represents the C 8-bit :c:expr:`unsigned int` datatype. Usually an alias " "for :class:`c_ubyte`." msgstr "" -#: library/ctypes.rst:2306 +#: library/ctypes.rst:2323 msgid "" -"Represents the C 16-bit :c:type:`unsigned int` datatype. Usually an alias " +"Represents the C 16-bit :c:expr:`unsigned int` datatype. Usually an alias " "for :class:`c_ushort`." msgstr "" -#: library/ctypes.rst:2312 +#: library/ctypes.rst:2329 msgid "" -"Represents the C 32-bit :c:type:`unsigned int` datatype. Usually an alias " +"Represents the C 32-bit :c:expr:`unsigned int` datatype. Usually an alias " "for :class:`c_uint`." msgstr "" -#: library/ctypes.rst:2318 +#: library/ctypes.rst:2335 msgid "" -"Represents the C 64-bit :c:type:`unsigned int` datatype. Usually an alias " +"Represents the C 64-bit :c:expr:`unsigned int` datatype. Usually an alias " "for :class:`c_ulonglong`." msgstr "" -#: library/ctypes.rst:2324 +#: library/ctypes.rst:2341 msgid "" -"Represents the C :c:type:`unsigned long` datatype. The constructor accepts " +"Represents the C :c:expr:`unsigned long` datatype. The constructor accepts " "an optional integer initializer; no overflow checking is done." msgstr "" -#: library/ctypes.rst:2330 +#: library/ctypes.rst:2347 msgid "" -"Represents the C :c:type:`unsigned long long` datatype. The constructor " +"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:2336 +#: library/ctypes.rst:2353 msgid "" -"Represents the C :c:type:`unsigned short` datatype. The constructor accepts " +"Represents the C :c:expr:`unsigned short` datatype. The constructor accepts " "an optional integer initializer; no overflow checking is done." msgstr "" -#: library/ctypes.rst:2342 +#: library/ctypes.rst:2359 msgid "" -"Represents the C :c:type:`void *` type. The value is represented as " +"Represents the C :c:expr:`void *` type. The value is represented as " "integer. The constructor accepts an optional integer initializer." msgstr "" -#: library/ctypes.rst:2348 +#: library/ctypes.rst:2365 msgid "" -"Represents the C :c:type:`wchar_t` datatype, and interprets the value as a " +"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:2355 +#: library/ctypes.rst:2372 msgid "" -"Represents the C :c:type:`wchar_t *` datatype, which must be a pointer to a " +"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:2362 +#: library/ctypes.rst:2379 msgid "" -"Represent the C :c:type:`bool` datatype (more accurately, :c:type:`_Bool` " +"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:2369 +#: 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:2375 +#: library/ctypes.rst:2392 msgid "" -"Represents the C :c:type:`PyObject *` datatype. Calling this without an " -"argument creates a ``NULL`` :c:type:`PyObject *` pointer." +"Represents the C :c:expr:`PyObject *` datatype. Calling this without an " +"argument creates a ``NULL`` :c:expr:`PyObject *` pointer." msgstr "" -#: library/ctypes.rst:2378 +#: 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:" @@ -3155,33 +3204,33 @@ msgid "" "also defined." msgstr "" -#: library/ctypes.rst:2386 +#: library/ctypes.rst:2403 msgid "Structured data types" msgstr "Types de données dérivés de Structure" -#: library/ctypes.rst:2391 +#: library/ctypes.rst:2408 msgid "Abstract base class for unions in native byte order." msgstr "" -#: library/ctypes.rst:2396 +#: library/ctypes.rst:2413 msgid "Abstract base class for structures in *big endian* byte order." msgstr "" -#: library/ctypes.rst:2401 +#: library/ctypes.rst:2418 msgid "Abstract base class for structures in *little endian* byte order." msgstr "" -#: library/ctypes.rst:2403 +#: 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:2409 +#: library/ctypes.rst:2426 msgid "Abstract base class for structures in *native* byte order." msgstr "" -#: library/ctypes.rst:2411 +#: 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:" @@ -3189,34 +3238,34 @@ msgid "" "the fields by direct attribute accesses. These are the" msgstr "" -#: library/ctypes.rst:2419 +#: 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:2423 +#: 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:2427 +#: 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:2430 +#: 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:2440 +#: 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, " @@ -3224,28 +3273,28 @@ msgid "" "raise an AttributeError." msgstr "" -#: library/ctypes.rst:2445 +#: 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:2452 +#: 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:2459 +#: 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:2463 +#: 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 " @@ -3253,11 +3302,11 @@ msgid "" "structure or union field." msgstr "" -#: library/ctypes.rst:2468 +#: library/ctypes.rst:2485 msgid "Here is an example type (Windows)::" msgstr "" -#: library/ctypes.rst:2481 +#: 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 " @@ -3267,7 +3316,7 @@ msgid "" "temporary union instance::" msgstr "" -#: library/ctypes.rst:2493 +#: 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:" @@ -3275,7 +3324,7 @@ msgid "" "of the base class." msgstr "" -#: library/ctypes.rst:2498 +#: 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 " @@ -3285,52 +3334,52 @@ msgid "" "names not present in :attr:`_fields_`." msgstr "" -#: library/ctypes.rst:2509 +#: library/ctypes.rst:2526 msgid "Arrays and pointers" msgstr "Tableaux et pointeurs" -#: library/ctypes.rst:2513 +#: library/ctypes.rst:2530 msgid "Abstract base class for arrays." msgstr "Classe de base abstraite pour les *arrays*." -#: library/ctypes.rst:2515 +#: library/ctypes.rst:2532 msgid "" "The recommended way to create concrete array types is by multiplying any :" -"mod:`ctypes` data type with a positive integer. Alternatively, you can " +"mod:`ctypes` data type with a non-negative integer. Alternatively, you can " "subclass this type and define :attr:`_length_` and :attr:`_type_` class " "variables. Array elements can be read and written using standard subscript " "and slice accesses; for slice reads, the resulting object is *not* itself " "an :class:`Array`." msgstr "" -#: library/ctypes.rst:2525 +#: library/ctypes.rst: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:2532 +#: 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:2535 +#: library/ctypes.rst:2552 msgid "" "Array subclass constructors accept positional arguments, used to initialize " "the elements in order." msgstr "" -#: library/ctypes.rst:2541 +#: library/ctypes.rst:2558 msgid "Private, abstract base class for pointers." msgstr "" -#: library/ctypes.rst:2543 +#: 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:2547 +#: 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 :" @@ -3339,12 +3388,21 @@ msgid "" "probably crash with an access violation (if you're lucky)." msgstr "" -#: library/ctypes.rst:2557 +#: library/ctypes.rst:2574 msgid "Specifies the type pointed to." msgstr "" -#: library/ctypes.rst:2561 +#: 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 index 959ec2f3cb..50fa3ed644 100644 --- a/library/curses.ascii.po +++ b/library/curses.ascii.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" +"POT-Creation-Date: 2023-03-22 22:57+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -18,435 +18,439 @@ msgstr "" msgid ":mod:`curses.ascii` --- Utilities for ASCII characters" msgstr "" -#: library/curses.ascii.rst:12 +#: 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:17 +#: library/curses.ascii.rst:19 msgid "Name" msgstr "Nom" -#: library/curses.ascii.rst:17 +#: library/curses.ascii.rst:19 msgid "Meaning" msgstr "Signification" -#: library/curses.ascii.rst:19 +#: library/curses.ascii.rst:21 msgid ":const:`NUL`" msgstr ":const:`NUL`" -#: library/curses.ascii.rst:21 +#: library/curses.ascii.rst:23 msgid ":const:`SOH`" msgstr ":const:`SOH`" -#: library/curses.ascii.rst:21 +#: library/curses.ascii.rst:23 msgid "Start of heading, console interrupt" msgstr "" -#: library/curses.ascii.rst:23 +#: library/curses.ascii.rst:25 msgid ":const:`STX`" msgstr ":const:`STX`" -#: library/curses.ascii.rst:23 +#: library/curses.ascii.rst:25 msgid "Start of text" msgstr "" -#: library/curses.ascii.rst:25 +#: library/curses.ascii.rst:27 msgid ":const:`ETX`" msgstr ":const:`ETX`" -#: library/curses.ascii.rst:25 +#: library/curses.ascii.rst:27 msgid "End of text" msgstr "" -#: library/curses.ascii.rst:27 +#: library/curses.ascii.rst:29 msgid ":const:`EOT`" msgstr ":const:`EOT`" -#: library/curses.ascii.rst:27 +#: library/curses.ascii.rst:29 msgid "End of transmission" msgstr "" -#: library/curses.ascii.rst:29 +#: library/curses.ascii.rst:31 msgid ":const:`ENQ`" msgstr ":const:`ENQ`" -#: library/curses.ascii.rst:29 +#: library/curses.ascii.rst:31 msgid "Enquiry, goes with :const:`ACK` flow control" msgstr "" -#: library/curses.ascii.rst:31 +#: library/curses.ascii.rst:33 msgid ":const:`ACK`" msgstr ":const:`ACK`" -#: library/curses.ascii.rst:31 +#: library/curses.ascii.rst:33 #, fuzzy msgid "Acknowledgement" msgstr "Remerciements" -#: library/curses.ascii.rst:33 +#: library/curses.ascii.rst:35 msgid ":const:`BEL`" msgstr ":const:`BEL`" -#: library/curses.ascii.rst:33 +#: library/curses.ascii.rst:35 msgid "Bell" msgstr "" -#: library/curses.ascii.rst:35 +#: library/curses.ascii.rst:37 msgid ":const:`BS`" msgstr ":const:`BS`" -#: library/curses.ascii.rst:35 +#: library/curses.ascii.rst:37 msgid "Backspace" msgstr "" -#: library/curses.ascii.rst:37 +#: library/curses.ascii.rst:39 msgid ":const:`TAB`" msgstr ":const:`TAB`" -#: library/curses.ascii.rst:37 +#: library/curses.ascii.rst:39 msgid "Tab" msgstr "" -#: library/curses.ascii.rst:39 +#: library/curses.ascii.rst:41 msgid ":const:`HT`" msgstr ":const:`HT`" -#: library/curses.ascii.rst:39 +#: library/curses.ascii.rst:41 msgid "Alias for :const:`TAB`: \"Horizontal tab\"" msgstr "" -#: library/curses.ascii.rst:41 +#: library/curses.ascii.rst:43 msgid ":const:`LF`" msgstr ":const:`LF`" -#: library/curses.ascii.rst:41 +#: library/curses.ascii.rst:43 msgid "Line feed" msgstr "" -#: library/curses.ascii.rst:43 +#: library/curses.ascii.rst:45 msgid ":const:`NL`" msgstr ":const:`NL`" -#: library/curses.ascii.rst:43 +#: library/curses.ascii.rst:45 msgid "Alias for :const:`LF`: \"New line\"" msgstr "" -#: library/curses.ascii.rst:45 +#: library/curses.ascii.rst:47 msgid ":const:`VT`" msgstr ":const:`VT`" -#: library/curses.ascii.rst:45 +#: library/curses.ascii.rst:47 msgid "Vertical tab" msgstr "" -#: library/curses.ascii.rst:47 +#: library/curses.ascii.rst:49 msgid ":const:`FF`" msgstr ":const:`FF`" -#: library/curses.ascii.rst:47 +#: library/curses.ascii.rst:49 msgid "Form feed" msgstr "" -#: library/curses.ascii.rst:49 +#: library/curses.ascii.rst:51 msgid ":const:`CR`" msgstr ":const:`CR`" -#: library/curses.ascii.rst:49 +#: library/curses.ascii.rst:51 msgid "Carriage return" msgstr "Retour chariot" -#: library/curses.ascii.rst:51 +#: library/curses.ascii.rst:53 msgid ":const:`SO`" msgstr ":const:`SO`" -#: library/curses.ascii.rst:51 +#: library/curses.ascii.rst:53 msgid "Shift-out, begin alternate character set" msgstr "" -#: library/curses.ascii.rst:53 +#: library/curses.ascii.rst:55 msgid ":const:`SI`" msgstr ":const:`SI`" -#: library/curses.ascii.rst:53 +#: library/curses.ascii.rst:55 msgid "Shift-in, resume default character set" msgstr "" -#: library/curses.ascii.rst:55 +#: library/curses.ascii.rst:57 msgid ":const:`DLE`" msgstr ":const:`DLE`" -#: library/curses.ascii.rst:55 +#: library/curses.ascii.rst:57 msgid "Data-link escape" msgstr "" -#: library/curses.ascii.rst:57 +#: library/curses.ascii.rst:59 msgid ":const:`DC1`" msgstr ":const:`DC1`" -#: library/curses.ascii.rst:57 +#: library/curses.ascii.rst:59 msgid "XON, for flow control" msgstr "" -#: library/curses.ascii.rst:59 +#: library/curses.ascii.rst:61 msgid ":const:`DC2`" msgstr ":const:`DC2`" -#: library/curses.ascii.rst:59 +#: library/curses.ascii.rst:61 msgid "Device control 2, block-mode flow control" msgstr "" -#: library/curses.ascii.rst:61 +#: library/curses.ascii.rst:63 msgid ":const:`DC3`" msgstr ":const:`DC3`" -#: library/curses.ascii.rst:61 +#: library/curses.ascii.rst:63 msgid "XOFF, for flow control" msgstr "" -#: library/curses.ascii.rst:63 +#: library/curses.ascii.rst:65 msgid ":const:`DC4`" msgstr ":const:`DC4`" -#: library/curses.ascii.rst:63 +#: library/curses.ascii.rst:65 msgid "Device control 4" msgstr "" -#: library/curses.ascii.rst:65 +#: library/curses.ascii.rst:67 msgid ":const:`NAK`" msgstr ":const:`NAK`" -#: library/curses.ascii.rst:65 +#: library/curses.ascii.rst:67 msgid "Negative acknowledgement" msgstr "" -#: library/curses.ascii.rst:67 +#: library/curses.ascii.rst:69 msgid ":const:`SYN`" msgstr ":const:`SYN`" -#: library/curses.ascii.rst:67 +#: library/curses.ascii.rst:69 msgid "Synchronous idle" msgstr "" -#: library/curses.ascii.rst:69 +#: library/curses.ascii.rst:71 msgid ":const:`ETB`" msgstr ":const:`ETB`" -#: library/curses.ascii.rst:69 +#: library/curses.ascii.rst:71 msgid "End transmission block" msgstr "" -#: library/curses.ascii.rst:71 +#: library/curses.ascii.rst:73 msgid ":const:`CAN`" msgstr ":const:`CAN`" -#: library/curses.ascii.rst:71 +#: library/curses.ascii.rst:73 msgid "Cancel" msgstr "" -#: library/curses.ascii.rst:73 +#: library/curses.ascii.rst:75 msgid ":const:`EM`" msgstr ":const:`EM`" -#: library/curses.ascii.rst:73 +#: library/curses.ascii.rst:75 msgid "End of medium" msgstr "" -#: library/curses.ascii.rst:75 +#: library/curses.ascii.rst:77 msgid ":const:`SUB`" msgstr ":const:`SUB`" -#: library/curses.ascii.rst:75 +#: library/curses.ascii.rst:77 msgid "Substitute" msgstr "" -#: library/curses.ascii.rst:77 +#: library/curses.ascii.rst:79 msgid ":const:`ESC`" msgstr ":const:`ESC`" -#: library/curses.ascii.rst:77 +#: library/curses.ascii.rst:79 msgid "Escape" msgstr "" -#: library/curses.ascii.rst:79 +#: library/curses.ascii.rst:81 msgid ":const:`FS`" msgstr ":const:`FS`" -#: library/curses.ascii.rst:79 +#: library/curses.ascii.rst:81 msgid "File separator" msgstr "Séparateur de fichiers" -#: library/curses.ascii.rst:81 +#: library/curses.ascii.rst:83 msgid ":const:`GS`" msgstr ":const:`GS`" -#: library/curses.ascii.rst:81 +#: library/curses.ascii.rst:83 msgid "Group separator" msgstr "Séparateur de groupe" -#: library/curses.ascii.rst:83 +#: library/curses.ascii.rst:85 msgid ":const:`RS`" msgstr ":const:`RS`" -#: library/curses.ascii.rst:83 +#: library/curses.ascii.rst:85 msgid "Record separator, block-mode terminator" msgstr "" -#: library/curses.ascii.rst:85 +#: library/curses.ascii.rst:87 msgid ":const:`US`" msgstr ":const:`US`" -#: library/curses.ascii.rst:85 +#: library/curses.ascii.rst:87 msgid "Unit separator" msgstr "" -#: library/curses.ascii.rst:87 +#: library/curses.ascii.rst:89 msgid ":const:`SP`" msgstr ":const:`SP`" -#: library/curses.ascii.rst:87 +#: library/curses.ascii.rst:89 msgid "Space" msgstr "" -#: library/curses.ascii.rst:89 +#: library/curses.ascii.rst:91 msgid ":const:`DEL`" msgstr ":const:`DEL`" -#: library/curses.ascii.rst:89 +#: library/curses.ascii.rst:91 msgid "Delete" msgstr "" -#: library/curses.ascii.rst:92 +#: 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:95 +#: 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:101 +#: 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:107 +#: 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:113 +#: library/curses.ascii.rst:115 msgid "Checks for a character value that fits in the 7-bit ASCII set." msgstr "" -#: library/curses.ascii.rst:118 +#: library/curses.ascii.rst:120 msgid "Checks for an ASCII whitespace character; space or horizontal tab." msgstr "" -#: library/curses.ascii.rst:123 +#: 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:128 +#: 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:134 +#: library/curses.ascii.rst:136 msgid "Checks for ASCII any printable character except space." msgstr "" -#: library/curses.ascii.rst:139 +#: library/curses.ascii.rst:141 msgid "Checks for an ASCII lower-case character." msgstr "" -#: library/curses.ascii.rst:144 +#: library/curses.ascii.rst:146 msgid "Checks for any ASCII printable character including space." msgstr "" -#: library/curses.ascii.rst:149 +#: 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:155 +#: 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:161 +#: library/curses.ascii.rst:163 msgid "Checks for an ASCII uppercase letter." msgstr "" -#: library/curses.ascii.rst:166 +#: 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:172 +#: library/curses.ascii.rst:174 msgid "Checks for an ASCII control character (ordinal values 0 to 31)." msgstr "" -#: library/curses.ascii.rst:177 +#: library/curses.ascii.rst:179 msgid "Checks for a non-ASCII character (ordinal values 0x80 and above)." msgstr "" -#: library/curses.ascii.rst:179 +#: 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:182 +#: 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:186 +#: 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:192 +#: library/curses.ascii.rst:194 msgid "Return the ASCII value corresponding to the low 7 bits of *c*." msgstr "" -#: library/curses.ascii.rst:197 +#: 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:203 +#: 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:206 +#: 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:216 +#: 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 " @@ -457,7 +461,7 @@ msgid "" "``'!'`` prepended to the result." msgstr "" -#: library/curses.ascii.rst:226 +#: 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 " diff --git a/library/curses.po b/library/curses.po index 3b6dc09d9c..d24ce982f5 100644 --- a/library/curses.po +++ b/library/curses.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-09-23 16:16+0200\n" +"POT-Creation-Date: 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" @@ -19,13 +19,17 @@ msgstr "" msgid ":mod:`curses` --- Terminal handling for character-cell displays" msgstr "" -#: library/curses.rst:14 +#: 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:17 +#: 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 " @@ -33,19 +37,19 @@ msgid "" "curses library hosted on Linux and the BSD variants of Unix." msgstr "" -#: library/curses.rst:24 +#: 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:27 +#: 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:32 +#: 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 :" @@ -54,79 +58,79 @@ msgid "" "default encoding::" msgstr "" -#: library/curses.rst:42 +#: library/curses.rst:44 msgid "Then use *code* as the encoding for :meth:`str.encode` calls." msgstr "" -#: library/curses.rst:47 +#: library/curses.rst:49 msgid "Module :mod:`curses.ascii`" msgstr "Module :mod:`curses.ascii`" -#: library/curses.rst:47 +#: library/curses.rst:49 msgid "" "Utilities for working with ASCII characters, regardless of your locale " "settings." msgstr "" -#: library/curses.rst:50 +#: library/curses.rst:52 msgid "Module :mod:`curses.panel`" msgstr "Module :mod:`curses.panel`" -#: library/curses.rst:50 +#: library/curses.rst:52 msgid "A panel stack extension that adds depth to curses windows." msgstr "" -#: library/curses.rst:53 +#: library/curses.rst:55 msgid "Module :mod:`curses.textpad`" msgstr "Module :mod:`curses.textpad`" -#: library/curses.rst:53 +#: library/curses.rst:55 msgid "" "Editable text widget for curses supporting :program:`Emacs`\\ -like " "bindings." msgstr "" -#: library/curses.rst:57 +#: library/curses.rst:59 msgid ":ref:`curses-howto`" msgstr ":ref:`curses-howto`" -#: library/curses.rst:56 +#: library/curses.rst:58 msgid "" "Tutorial material on using curses with Python, by Andrew Kuchling and Eric " "Raymond." msgstr "" -#: library/curses.rst:59 +#: 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:66 +#: library/curses.rst:68 msgid "Functions" msgstr "Fonctions" -#: library/curses.rst:68 +#: library/curses.rst:70 msgid "The module :mod:`curses` defines the following exception:" msgstr "" -#: library/curses.rst:73 +#: library/curses.rst:75 msgid "Exception raised when a curses library function returns an error." msgstr "" -#: library/curses.rst:77 +#: 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:81 +#: library/curses.rst:83 msgid "The module :mod:`curses` defines the following functions:" msgstr "" -#: library/curses.rst:86 +#: 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 " @@ -134,17 +138,17 @@ msgid "" "and occasionally to change interfaces depending on the line speed." msgstr "" -#: library/curses.rst:94 +#: library/curses.rst:96 msgid "Emit a short attention sound." msgstr "" -#: library/curses.rst:99 +#: 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:105 +#: 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 " @@ -154,7 +158,7 @@ msgid "" "terminal in cbreak mode." msgstr "" -#: library/curses.rst:114 +#: 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``. " @@ -163,7 +167,7 @@ msgid "" "component)." msgstr "" -#: library/curses.rst:122 +#: 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 " @@ -171,7 +175,7 @@ msgid "" "`A_\\*` attributes. :func:`pair_number` is the counterpart to this function." msgstr "" -#: library/curses.rst:131 +#: 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 " @@ -180,7 +184,7 @@ msgid "" "and the \"very visible\" mode is a block cursor." msgstr "" -#: library/curses.rst:140 +#: 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, " @@ -188,7 +192,7 @@ msgid "" "`reset_prog_mode` will restore this mode." msgstr "" -#: library/curses.rst:148 +#: 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\" " @@ -196,11 +200,11 @@ msgid "" "func:`reset_shell_mode` will restore this mode." msgstr "" -#: library/curses.rst:156 +#: library/curses.rst:158 msgid "Insert an *ms* millisecond pause in output." msgstr "" -#: library/curses.rst:161 +#: 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 " @@ -208,7 +212,7 @@ msgid "" "the physical screen to match the virtual screen." msgstr "" -#: library/curses.rst:166 +#: 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 " @@ -219,24 +223,24 @@ msgid "" "func:`!doupdate`." msgstr "" -#: library/curses.rst:176 +#: 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:182 +#: library/curses.rst:184 msgid "De-initialize the library, and return terminal to normal status." msgstr "" -#: library/curses.rst:187 +#: 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:194 +#: 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 " @@ -247,20 +251,20 @@ msgid "" "time line editing without touching the rest of the screen." msgstr "" -#: library/curses.rst:204 +#: 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:211 +#: 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:217 +#: 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, " @@ -275,51 +279,51 @@ msgid "" "const:`BUTTON_ALT`." msgstr "" -#: library/curses.rst:228 +#: library/curses.rst:230 msgid "" "The ``BUTTON5_*`` constants are now exposed if they are provided by the " "underlying curses library." msgstr "" -#: library/curses.rst:235 +#: 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:241 +#: 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:248 +#: library/curses.rst:250 msgid "" "Return ``True`` if the terminal can display colors; otherwise, return " "``False``." msgstr "" -#: library/curses.rst:252 +#: 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:256 +#: library/curses.rst:258 msgid "Extended color support requires ncurses version 6.1 or later." msgstr "" -#: library/curses.rst:262 +#: 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:269 +#: 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 " @@ -327,13 +331,13 @@ msgid "" "capabilities." msgstr "" -#: library/curses.rst:277 +#: 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:283 +#: 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 " @@ -342,19 +346,19 @@ msgid "" "``255``. Use :func:`nocbreak` to leave half-delay mode." msgstr "" -#: library/curses.rst:292 +#: 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 " +"``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:303 +#: 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 " @@ -367,31 +371,31 @@ msgid "" "definition." msgstr "" -#: library/curses.rst:316 +#: library/curses.rst:318 msgid "" "Initialize the library. Return a :ref:`window ` " "object which represents the whole screen." msgstr "" -#: library/curses.rst:321 +#: 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:327 +#: library/curses.rst:329 msgid "" "Return ``True`` if :func:`resize_term` would modify the window structure, " "``False`` otherwise." msgstr "" -#: library/curses.rst:333 +#: 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:339 +#: 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 " @@ -402,27 +406,27 @@ msgid "" "character." msgstr "" -#: library/curses.rst:349 +#: 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:356 +#: 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:363 +#: 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:369 +#: 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 " @@ -430,7 +434,7 @@ msgid "" "second." msgstr "" -#: library/curses.rst:376 +#: 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 " @@ -439,17 +443,17 @@ msgid "" "never called, no mouse events are ever reported." msgstr "" -#: library/curses.rst:385 +#: library/curses.rst:387 msgid "Sleep for *ms* milliseconds." msgstr "" -#: library/curses.rst:390 +#: 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:393 +#: 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. " @@ -465,35 +469,35 @@ msgid "" "to be displayed." msgstr "" -#: library/curses.rst:409 +#: 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:412 +#: 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:418 +#: 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:425 +#: library/curses.rst:427 msgid "" "Leave cbreak mode. Return to normal \"cooked\" mode with line buffering." msgstr "" -#: library/curses.rst:430 +#: library/curses.rst:432 msgid "Leave echo mode. Echoing of input characters is turned off." msgstr "" -#: library/curses.rst:435 +#: 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 " @@ -503,7 +507,7 @@ msgid "" "also, it will be able to detect the return key on input." msgstr "" -#: library/curses.rst:445 +#: 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 " @@ -512,63 +516,63 @@ msgid "" "occurred, after the handler exits." msgstr "" -#: library/curses.rst:453 +#: library/curses.rst:455 msgid "Leave raw mode. Return to normal \"cooked\" mode with line buffering." msgstr "" -#: library/curses.rst:458 +#: 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:464 +#: 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:470 +#: 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:477 +#: 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:484 +#: 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:491 +#: library/curses.rst:493 msgid "" "Restore the terminal to \"program\" mode, as previously saved by :func:" "`def_prog_mode`." msgstr "" -#: library/curses.rst:497 +#: library/curses.rst:499 msgid "" "Restore the terminal to \"shell\" mode, as previously saved by :func:" "`def_shell_mode`." msgstr "" -#: library/curses.rst:503 +#: 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:509 +#: 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 " @@ -578,47 +582,47 @@ msgid "" "to resize these without additional interaction with the application." msgstr "" -#: library/curses.rst:519 +#: 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:526 +#: library/curses.rst:528 msgid "" "Save the current state of the terminal modes in a buffer, usable by :func:" "`resetty`." msgstr "" -#: library/curses.rst:531 +#: library/curses.rst:533 msgid "Retrieves the value set by :func:`set_escdelay`." msgstr "" -#: library/curses.rst:537 +#: 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:545 +#: library/curses.rst:547 msgid "Retrieves the value set by :func:`set_tabsize`." msgstr "" -#: library/curses.rst:551 +#: 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:558 +#: 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:564 +#: 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` " @@ -627,14 +631,14 @@ msgid "" "descriptor for ``sys.stdout`` will be used." msgstr "" -#: library/curses.rst:573 +#: 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:577 +#: 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 :" @@ -644,20 +648,20 @@ msgid "" "terminal was just turned on." msgstr "" -#: library/curses.rst:586 +#: 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:593 +#: 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:599 +#: 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 " @@ -665,7 +669,7 @@ msgid "" "from the terminal description." msgstr "" -#: library/curses.rst:607 +#: 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 " @@ -673,7 +677,7 @@ msgid "" "from the terminal description." msgstr "" -#: library/curses.rst:615 +#: 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* " @@ -681,7 +685,7 @@ msgid "" "terminal description." msgstr "" -#: library/curses.rst:623 +#: 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. " @@ -689,13 +693,13 @@ msgid "" "exact result depending on terminal type." msgstr "" -#: library/curses.rst:631 +#: 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:634 +#: 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 " @@ -705,7 +709,7 @@ msgid "" "typeahead checking." msgstr "" -#: library/curses.rst:643 +#: 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 " @@ -713,35 +717,35 @@ msgid "" "are." msgstr "" -#: library/curses.rst:650 +#: library/curses.rst:652 msgid "Push *ch* so the next :meth:`~window.getch` will return it." msgstr "" -#: library/curses.rst:654 +#: library/curses.rst:656 msgid "Only one *ch* can be pushed before :meth:`!getch` is called." msgstr "" -#: library/curses.rst:659 +#: library/curses.rst:661 msgid "" "Update :envvar:`LINES` and :envvar:`COLS`. Useful for detecting manual " "screen resize." msgstr "" -#: library/curses.rst:666 +#: library/curses.rst:668 msgid "Push *ch* so the next :meth:`~window.get_wch` will return it." msgstr "" -#: library/curses.rst:670 +#: library/curses.rst:672 msgid "Only one *ch* can be pushed before :meth:`!get_wch` is called." msgstr "" -#: library/curses.rst:677 +#: 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:683 +#: 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 " @@ -751,7 +755,7 @@ msgid "" "to use the window size if :envvar:`LINES` and :envvar:`COLUMNS` are not set)." msgstr "" -#: library/curses.rst:693 +#: 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 " @@ -760,7 +764,7 @@ msgid "" "*x* to a red foreground color on the default background." msgstr "" -#: library/curses.rst:702 +#: 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 " @@ -774,50 +778,50 @@ msgid "" "echo, and disables the terminal keypad." msgstr "" -#: library/curses.rst:716 +#: library/curses.rst:718 msgid "Window Objects" msgstr "" -#: library/curses.rst:718 +#: 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:725 +#: 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:731 +#: 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:739 +#: 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:747 +#: 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:752 +#: 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:756 +#: library/curses.rst:758 msgid "" "A `bug in ncurses `_, the backend for " "this Python module, can cause SegFaults when resizing windows. This is fixed " @@ -827,44 +831,44 @@ msgid "" "line." msgstr "" -#: library/curses.rst:766 +#: library/curses.rst:768 msgid "" "Remove attribute *attr* from the \"background\" set applied to all writes to " "the current window." msgstr "" -#: library/curses.rst:772 +#: library/curses.rst:774 msgid "" "Add attribute *attr* from the \"background\" set applied to all writes to " "the current window." msgstr "" -#: library/curses.rst:778 +#: library/curses.rst:780 msgid "" "Set the \"background\" set of attributes to *attr*. This set is initially " "``0`` (no attributes)." msgstr "" -#: library/curses.rst:784 +#: 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:788 +#: library/curses.rst:790 msgid "" "The attribute of every character in the window is changed to the new " "background attribute." msgstr "" -#: library/curses.rst:791 +#: library/curses.rst:793 msgid "" "Wherever the former background character appears, it is changed to the new " "background character." msgstr "" -#: library/curses.rst:797 +#: 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 " @@ -875,128 +879,128 @@ msgid "" "delete line/character operations." msgstr "" -#: library/curses.rst:807 +#: 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:813 +#: 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:818 +#: library/curses.rst:820 msgid "Parameter" msgstr "Paramètre" -#: library/curses.rst:818 +#: library/curses.rst:820 msgid "Description" msgstr "Description" -#: library/curses.rst:818 +#: library/curses.rst:820 msgid "Default value" msgstr "Valeur par défaut" -#: library/curses.rst:820 +#: library/curses.rst:822 msgid "*ls*" msgstr "*ls*" -#: library/curses.rst:820 +#: library/curses.rst:822 msgid "Left side" msgstr "" -#: library/curses.rst:822 +#: library/curses.rst:824 msgid ":const:`ACS_VLINE`" msgstr ":const:`ACS_VLINE`" -#: library/curses.rst:822 +#: library/curses.rst:824 msgid "*rs*" msgstr "*rs*" -#: library/curses.rst:822 +#: library/curses.rst:824 msgid "Right side" msgstr "" -#: library/curses.rst:824 +#: library/curses.rst:826 msgid "*ts*" msgstr "*ts*" -#: library/curses.rst:824 +#: library/curses.rst:826 msgid "Top" msgstr "" -#: library/curses.rst:826 +#: library/curses.rst:828 msgid ":const:`ACS_HLINE`" msgstr ":const:`ACS_HLINE`" -#: library/curses.rst:826 +#: library/curses.rst:828 msgid "*bs*" msgstr "*bs*" -#: library/curses.rst:826 +#: library/curses.rst:828 msgid "Bottom" msgstr "" -#: library/curses.rst:828 +#: library/curses.rst:830 msgid "*tl*" msgstr "*tl*" -#: library/curses.rst:828 +#: library/curses.rst:830 msgid "Upper-left corner" msgstr "" -#: library/curses.rst:828 +#: library/curses.rst:830 msgid ":const:`ACS_ULCORNER`" msgstr ":const:`ACS_ULCORNER`" -#: library/curses.rst:830 +#: library/curses.rst:832 msgid "*tr*" msgstr "" -#: library/curses.rst:830 +#: library/curses.rst:832 msgid "Upper-right corner" msgstr "" -#: library/curses.rst:830 +#: library/curses.rst:832 msgid ":const:`ACS_URCORNER`" msgstr ":const:`ACS_URCORNER`" -#: library/curses.rst:832 +#: library/curses.rst:834 msgid "*bl*" msgstr "" -#: library/curses.rst:832 +#: library/curses.rst:834 msgid "Bottom-left corner" msgstr "" -#: library/curses.rst:832 +#: library/curses.rst:834 msgid ":const:`ACS_LLCORNER`" msgstr ":const:`ACS_LLCORNER`" -#: library/curses.rst:834 +#: library/curses.rst:836 msgid "*br*" msgstr "" -#: library/curses.rst:834 +#: library/curses.rst:836 msgid "Bottom-right corner" msgstr "" -#: library/curses.rst:834 +#: library/curses.rst:836 msgid ":const:`ACS_LRCORNER`" msgstr ":const:`ACS_LRCORNER`" -#: library/curses.rst:840 +#: 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:849 +#: 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 " @@ -1006,45 +1010,45 @@ msgid "" "be redisplayed by the next window refresh." msgstr "" -#: library/curses.rst:859 +#: 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:865 +#: library/curses.rst:867 msgid "" "If *flag* is ``True``, the next call to :meth:`refresh` will clear the " "window completely." msgstr "" -#: library/curses.rst:871 +#: 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:877 +#: library/curses.rst:879 msgid "Erase from cursor to the end of the line." msgstr "" -#: library/curses.rst:882 +#: 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:888 +#: library/curses.rst:890 msgid "Delete any character at ``(y, x)``." msgstr "" -#: library/curses.rst:893 +#: library/curses.rst:895 msgid "" "Delete the line under the cursor. All following lines are moved up by one " "line." msgstr "" -#: library/curses.rst:899 +#: 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 " @@ -1052,13 +1056,13 @@ msgid "" "a window object for the derived window." msgstr "" -#: library/curses.rst:907 +#: library/curses.rst:909 msgid "" "Add character *ch* with attribute *attr*, and immediately call :meth:" "`refresh` on the window." msgstr "" -#: library/curses.rst:913 +#: 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 " @@ -1066,11 +1070,11 @@ msgid "" "location of a mouse event." msgstr "" -#: library/curses.rst:918 +#: library/curses.rst:920 msgid "Previously it returned ``1`` or ``0`` instead of ``True`` or ``False``." msgstr "" -#: library/curses.rst:924 +#: 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 " @@ -1078,19 +1082,19 @@ msgid "" "encoding is used (see :func:`locale.getpreferredencoding`)." msgstr "" -#: library/curses.rst:934 +#: library/curses.rst:936 msgid "Clear the window." msgstr "" -#: library/curses.rst:939 +#: library/curses.rst:941 msgid "Return a tuple ``(y, x)`` of co-ordinates of upper-left corner." msgstr "" -#: library/curses.rst:944 +#: library/curses.rst:946 msgid "Return the given window's current background character/attribute pair." msgstr "" -#: library/curses.rst:949 +#: 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 " @@ -1098,14 +1102,14 @@ msgid "" "otherwise wait until a key is pressed." msgstr "" -#: library/curses.rst:957 +#: 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:966 +#: 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 " @@ -1113,35 +1117,35 @@ msgid "" "there is no input." msgstr "" -#: library/curses.rst:974 +#: library/curses.rst:976 msgid "Return a tuple ``(y, x)`` of the height and width of the window." msgstr "" -#: library/curses.rst:979 +#: 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:989 +#: library/curses.rst:991 msgid "" "Read a bytes object from the user, with primitive line editing capacity." msgstr "" -#: library/curses.rst:994 +#: 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:1001 +#: 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:1007 +#: 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 " @@ -1149,13 +1153,13 @@ msgid "" "initialized, use of character insert/delete is enabled by default." msgstr "" -#: library/curses.rst:1015 +#: 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:1021 +#: 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` " @@ -1163,19 +1167,19 @@ msgid "" "calls to wrefresh. This option is disabled by default." msgstr "" -#: library/curses.rst:1029 +#: 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:1036 +#: 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:1042 +#: 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* " @@ -1184,13 +1188,13 @@ msgid "" "remains the same." msgstr "" -#: library/curses.rst:1051 +#: 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:1058 +#: 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 " @@ -1200,7 +1204,7 @@ msgid "" "if specified)." msgstr "" -#: library/curses.rst:1068 +#: 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 " @@ -1209,7 +1213,7 @@ msgid "" "specified)." msgstr "" -#: library/curses.rst:1077 +#: 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 " @@ -1217,76 +1221,76 @@ msgid "" "string at most *n* characters long (exclusive of the trailing NUL)." msgstr "" -#: library/curses.rst:1085 +#: 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:1092 +#: 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:1098 +#: 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:1105 +#: 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:1109 +#: library/curses.rst:1111 msgid "" "If *flag* is ``False``, cursor will always be at \"cursor position\" after " "an update." msgstr "" -#: library/curses.rst:1114 +#: library/curses.rst:1116 msgid "Move cursor to ``(new_y, new_x)``." msgstr "" -#: library/curses.rst:1119 +#: 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:1126 +#: library/curses.rst:1128 msgid "Move the window so its upper-left corner is at ``(new_y, new_x)``." msgstr "" -#: library/curses.rst:1131 +#: library/curses.rst:1133 msgid "If *flag* is ``True``, :meth:`getch` will be non-blocking." msgstr "" -#: library/curses.rst:1136 +#: library/curses.rst:1138 msgid "If *flag* is ``True``, escape sequences will not be timed out." msgstr "" -#: library/curses.rst:1138 +#: 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:1144 +#: 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:1151 +#: 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, " @@ -1294,7 +1298,7 @@ msgid "" "contents of *destwin*." msgstr "" -#: library/curses.rst:1156 +#: 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 " @@ -1302,7 +1306,7 @@ msgid "" "in the destination window." msgstr "" -#: library/curses.rst:1164 +#: 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 " @@ -1310,7 +1314,7 @@ msgid "" "the old contents of *destwin*." msgstr "" -#: library/curses.rst:1169 +#: 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 " @@ -1318,31 +1322,31 @@ msgid "" "the destination window." msgstr "" -#: library/curses.rst:1177 +#: 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:1183 +#: 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:1189 +#: 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:1195 +#: library/curses.rst:1197 msgid "" "Update the display immediately (sync actual screen with previous drawing/" "deleting methods)." msgstr "" -#: library/curses.rst:1198 +#: 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 " @@ -1357,7 +1361,7 @@ msgid "" "*smincol* are treated as if they were zero." msgstr "" -#: library/curses.rst:1212 +#: 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, " @@ -1365,11 +1369,11 @@ msgid "" "rendition (as set by :meth:`bkgdset`) merged into them." msgstr "" -#: library/curses.rst:1220 +#: library/curses.rst:1222 msgid "Scroll the screen or scrolling region upward by *lines* lines." msgstr "" -#: library/curses.rst:1225 +#: 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 " @@ -1379,54 +1383,54 @@ msgid "" "scrolling effect on the terminal, it is also necessary to call :meth:`idlok`." msgstr "" -#: library/curses.rst:1235 +#: 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:1241 +#: 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:1247 +#: library/curses.rst:1249 msgid "Turn on attribute *A_STANDOUT*." msgstr "" -#: library/curses.rst:1260 +#: 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:1263 +#: 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:1269 +#: 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:1276 +#: 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:1282 +#: library/curses.rst:1284 msgid "" "Touch all locations in ancestors of the window that have been changed in " "the window." msgstr "" -#: library/curses.rst:1288 +#: 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). " @@ -1436,7 +1440,7 @@ msgid "" "still no input at the end of that time." msgstr "" -#: library/curses.rst:1298 +#: 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 " @@ -1444,51 +1448,51 @@ msgid "" "``=False``)." msgstr "" -#: library/curses.rst:1305 +#: library/curses.rst:1307 msgid "" "Pretend the whole window has been changed, for purposes of drawing " "optimizations." msgstr "" -#: library/curses.rst:1311 +#: library/curses.rst:1313 msgid "" "Mark all lines in the window as unchanged since the last call to :meth:" "`refresh`." msgstr "" -#: library/curses.rst:1318 +#: library/curses.rst:1320 msgid "" "Display a vertical line starting at ``(y, x)`` with length *n* consisting of " -"the character *ch*." +"the character *ch* with attributes *attr*." msgstr "" -#: library/curses.rst:1323 +#: library/curses.rst:1325 msgid "Constants" msgstr "Constantes" -#: library/curses.rst:1325 +#: library/curses.rst:1327 msgid "The :mod:`curses` module defines the following data members:" msgstr "" -#: library/curses.rst:1330 +#: 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:1336 +#: 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:1342 +#: library/curses.rst:1344 msgid "" "A bytes object representing the current version of the module. Also " "available as :const:`__version__`." msgstr "" -#: library/curses.rst:1348 +#: 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 " @@ -1496,965 +1500,965 @@ msgid "" "is equivalent to ``curses.ncurses_version.major`` and so on." msgstr "" -#: library/curses.rst:1353 +#: library/curses.rst:1355 msgid "Availability: if the ncurses library is used." msgstr "" -#: library/curses.rst:1358 +#: 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:1362 +#: library/curses.rst:1364 msgid "Attribute" msgstr "Attribut" -#: library/curses.rst:1410 library/curses.rst:1654 +#: library/curses.rst:1412 library/curses.rst:1656 msgid "Meaning" msgstr "Signification" -#: library/curses.rst:1364 +#: library/curses.rst:1366 msgid "``A_ALTCHARSET``" msgstr "``A_ALTCHARSET``" -#: library/curses.rst:1364 +#: library/curses.rst:1366 msgid "Alternate character set mode" msgstr "" -#: library/curses.rst:1366 +#: library/curses.rst:1368 msgid "``A_BLINK``" msgstr "``A_BLINK``" -#: library/curses.rst:1366 +#: library/curses.rst:1368 msgid "Blink mode" msgstr "" -#: library/curses.rst:1368 +#: library/curses.rst:1370 msgid "``A_BOLD``" msgstr "``A_BOLD``" -#: library/curses.rst:1368 +#: library/curses.rst:1370 msgid "Bold mode" msgstr "" -#: library/curses.rst:1370 +#: library/curses.rst:1372 msgid "``A_DIM``" msgstr "``A_DIM``" -#: library/curses.rst:1370 +#: library/curses.rst:1372 msgid "Dim mode" msgstr "" -#: library/curses.rst:1372 +#: library/curses.rst:1374 msgid "``A_INVIS``" msgstr "``A_INVIS``" -#: library/curses.rst:1372 +#: library/curses.rst:1374 msgid "Invisible or blank mode" msgstr "" -#: library/curses.rst:1374 +#: library/curses.rst:1376 msgid "``A_ITALIC``" msgstr "``A_ITALIC``" -#: library/curses.rst:1374 +#: library/curses.rst:1376 msgid "Italic mode" msgstr "" -#: library/curses.rst:1376 +#: library/curses.rst:1378 msgid "``A_NORMAL``" msgstr "``A_NORMAL``" -#: library/curses.rst:1376 +#: library/curses.rst:1378 msgid "Normal attribute" msgstr "Attribut normal" -#: library/curses.rst:1378 +#: library/curses.rst:1380 msgid "``A_PROTECT``" msgstr "``A_PROTECT``" -#: library/curses.rst:1378 +#: library/curses.rst:1380 msgid "Protected mode" msgstr "" -#: library/curses.rst:1380 +#: library/curses.rst:1382 msgid "``A_REVERSE``" msgstr "``A_REVERSE``" -#: library/curses.rst:1380 +#: library/curses.rst:1382 msgid "Reverse background and foreground colors" msgstr "" -#: library/curses.rst:1383 +#: library/curses.rst:1385 msgid "``A_STANDOUT``" msgstr "``A_STANDOUT``" -#: library/curses.rst:1383 +#: library/curses.rst:1385 msgid "Standout mode" msgstr "" -#: library/curses.rst:1385 +#: library/curses.rst:1387 msgid "``A_UNDERLINE``" msgstr "``A_UNDERLINE``" -#: library/curses.rst:1385 +#: library/curses.rst:1387 msgid "Underline mode" msgstr "" -#: library/curses.rst:1387 +#: library/curses.rst:1389 msgid "``A_HORIZONTAL``" msgstr "``A_HORIZONTAL``" -#: library/curses.rst:1387 +#: library/curses.rst:1389 msgid "Horizontal highlight" msgstr "" -#: library/curses.rst:1389 +#: library/curses.rst:1391 msgid "``A_LEFT``" msgstr "``A_LEFT``" -#: library/curses.rst:1389 +#: library/curses.rst:1391 msgid "Left highlight" msgstr "" -#: library/curses.rst:1391 +#: library/curses.rst:1393 msgid "``A_LOW``" msgstr "``A_LOW``" -#: library/curses.rst:1391 +#: library/curses.rst:1393 msgid "Low highlight" msgstr "" -#: library/curses.rst:1393 +#: library/curses.rst:1395 msgid "``A_RIGHT``" msgstr "``A_RIGHT``" -#: library/curses.rst:1393 +#: library/curses.rst:1395 msgid "Right highlight" msgstr "" -#: library/curses.rst:1395 +#: library/curses.rst:1397 msgid "``A_TOP``" msgstr "``A_TOP``" -#: library/curses.rst:1395 +#: library/curses.rst:1397 msgid "Top highlight" msgstr "" -#: library/curses.rst:1397 +#: library/curses.rst:1399 msgid "``A_VERTICAL``" msgstr "``A_VERTICAL``" -#: library/curses.rst:1397 +#: library/curses.rst:1399 msgid "Vertical highlight" msgstr "" -#: library/curses.rst:1415 +#: library/curses.rst:1417 msgid "``A_CHARTEXT``" msgstr "``A_CHARTEXT``" -#: library/curses.rst:1415 +#: library/curses.rst:1417 msgid "Bit-mask to extract a character" msgstr "" -#: library/curses.rst:1403 +#: library/curses.rst:1405 msgid "``A_ITALIC`` was added." msgstr "" -#: library/curses.rst:1406 +#: library/curses.rst:1408 msgid "" "Several constants are available to extract corresponding attributes returned " "by some methods." msgstr "" -#: library/curses.rst:1410 +#: library/curses.rst:1412 msgid "Bit-mask" msgstr "" -#: library/curses.rst:1412 +#: library/curses.rst:1414 msgid "``A_ATTRIBUTES``" msgstr "``A_ATTRIBUTES``" -#: library/curses.rst:1412 +#: library/curses.rst:1414 msgid "Bit-mask to extract attributes" msgstr "" -#: library/curses.rst:1418 +#: library/curses.rst:1420 msgid "``A_COLOR``" msgstr "``A_COLOR``" -#: library/curses.rst:1418 +#: library/curses.rst:1420 msgid "Bit-mask to extract color-pair field information" msgstr "" -#: library/curses.rst:1422 +#: 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:1428 +#: library/curses.rst:1430 msgid "Key constant" msgstr "" -#: library/curses.rst:1428 +#: library/curses.rst:1430 msgid "Key" msgstr "Clé" -#: library/curses.rst:1430 +#: library/curses.rst:1432 msgid "``KEY_MIN``" msgstr "``KEY_MIN``" -#: library/curses.rst:1430 +#: library/curses.rst:1432 msgid "Minimum key value" msgstr "" -#: library/curses.rst:1432 +#: library/curses.rst:1434 msgid "``KEY_BREAK``" msgstr "``KEY_BREAK``" -#: library/curses.rst:1432 +#: library/curses.rst:1434 msgid "Break key (unreliable)" msgstr "" -#: library/curses.rst:1434 +#: library/curses.rst:1436 msgid "``KEY_DOWN``" msgstr "``KEY_DOWN``" -#: library/curses.rst:1434 +#: library/curses.rst:1436 msgid "Down-arrow" msgstr "" -#: library/curses.rst:1436 +#: library/curses.rst:1438 msgid "``KEY_UP``" msgstr "``KEY_UP``" -#: library/curses.rst:1436 +#: library/curses.rst:1438 msgid "Up-arrow" msgstr "" -#: library/curses.rst:1438 +#: library/curses.rst:1440 msgid "``KEY_LEFT``" msgstr "``KEY_LEFT``" -#: library/curses.rst:1438 +#: library/curses.rst:1440 msgid "Left-arrow" msgstr "" -#: library/curses.rst:1440 +#: library/curses.rst:1442 msgid "``KEY_RIGHT``" msgstr "``KEY_RIGHT``" -#: library/curses.rst:1440 +#: library/curses.rst:1442 msgid "Right-arrow" msgstr "" -#: library/curses.rst:1442 +#: library/curses.rst:1444 msgid "``KEY_HOME``" msgstr "``KEY_HOME``" -#: library/curses.rst:1442 +#: library/curses.rst:1444 msgid "Home key (upward+left arrow)" msgstr "" -#: library/curses.rst:1444 +#: library/curses.rst:1446 msgid "``KEY_BACKSPACE``" msgstr "``KEY_BACKSPACE``" -#: library/curses.rst:1444 +#: library/curses.rst:1446 msgid "Backspace (unreliable)" msgstr "" -#: library/curses.rst:1446 +#: library/curses.rst:1448 msgid "``KEY_F0``" msgstr "``KEY_F0``" -#: library/curses.rst:1446 +#: library/curses.rst:1448 msgid "Function keys. Up to 64 function keys are supported." msgstr "" -#: library/curses.rst:1449 +#: library/curses.rst:1451 msgid "``KEY_Fn``" msgstr "``KEY_Fn``" -#: library/curses.rst:1449 +#: library/curses.rst:1451 msgid "Value of function key *n*" msgstr "" -#: library/curses.rst:1451 +#: library/curses.rst:1453 msgid "``KEY_DL``" msgstr "``KEY_DL``" -#: library/curses.rst:1451 +#: library/curses.rst:1453 msgid "Delete line" msgstr "" -#: library/curses.rst:1453 +#: library/curses.rst:1455 msgid "``KEY_IL``" msgstr "``KEY_IL``" -#: library/curses.rst:1453 +#: library/curses.rst:1455 msgid "Insert line" msgstr "" -#: library/curses.rst:1455 +#: library/curses.rst:1457 msgid "``KEY_DC``" msgstr "``KEY_DC``" -#: library/curses.rst:1455 +#: library/curses.rst:1457 msgid "Delete character" msgstr "" -#: library/curses.rst:1457 +#: library/curses.rst:1459 msgid "``KEY_IC``" msgstr "``KEY_IC``" -#: library/curses.rst:1457 +#: library/curses.rst:1459 msgid "Insert char or enter insert mode" msgstr "" -#: library/curses.rst:1459 +#: library/curses.rst:1461 msgid "``KEY_EIC``" msgstr "``KEY_EIC``" -#: library/curses.rst:1459 +#: library/curses.rst:1461 msgid "Exit insert char mode" msgstr "" -#: library/curses.rst:1461 +#: library/curses.rst:1463 msgid "``KEY_CLEAR``" msgstr "``KEY_CLEAR``" -#: library/curses.rst:1461 +#: library/curses.rst:1463 msgid "Clear screen" msgstr "" -#: library/curses.rst:1463 +#: library/curses.rst:1465 msgid "``KEY_EOS``" msgstr "``KEY_EOS``" -#: library/curses.rst:1463 +#: library/curses.rst:1465 msgid "Clear to end of screen" msgstr "" -#: library/curses.rst:1465 +#: library/curses.rst:1467 msgid "``KEY_EOL``" msgstr "``KEY_EOL``" -#: library/curses.rst:1465 +#: library/curses.rst:1467 msgid "Clear to end of line" msgstr "" -#: library/curses.rst:1467 +#: library/curses.rst:1469 msgid "``KEY_SF``" msgstr "``KEY_SF``" -#: library/curses.rst:1467 +#: library/curses.rst:1469 msgid "Scroll 1 line forward" msgstr "" -#: library/curses.rst:1469 +#: library/curses.rst:1471 msgid "``KEY_SR``" msgstr "``KEY_SR``" -#: library/curses.rst:1469 +#: library/curses.rst:1471 msgid "Scroll 1 line backward (reverse)" msgstr "" -#: library/curses.rst:1471 +#: library/curses.rst:1473 msgid "``KEY_NPAGE``" msgstr "``KEY_NPAGE``" -#: library/curses.rst:1471 +#: library/curses.rst:1473 msgid "Next page" msgstr "" -#: library/curses.rst:1473 +#: library/curses.rst:1475 msgid "``KEY_PPAGE``" msgstr "``KEY_PPAGE``" -#: library/curses.rst:1473 +#: library/curses.rst:1475 msgid "Previous page" msgstr "" -#: library/curses.rst:1475 +#: library/curses.rst:1477 msgid "``KEY_STAB``" msgstr "``KEY_STAB``" -#: library/curses.rst:1475 +#: library/curses.rst:1477 msgid "Set tab" msgstr "" -#: library/curses.rst:1477 +#: library/curses.rst:1479 msgid "``KEY_CTAB``" msgstr "``KEY_CTAB``" -#: library/curses.rst:1477 +#: library/curses.rst:1479 msgid "Clear tab" msgstr "" -#: library/curses.rst:1479 +#: library/curses.rst:1481 msgid "``KEY_CATAB``" msgstr "``KEY_CATAB``" -#: library/curses.rst:1479 +#: library/curses.rst:1481 msgid "Clear all tabs" msgstr "" -#: library/curses.rst:1481 +#: library/curses.rst:1483 msgid "``KEY_ENTER``" msgstr "``KEY_ENTER``" -#: library/curses.rst:1481 +#: library/curses.rst:1483 msgid "Enter or send (unreliable)" msgstr "" -#: library/curses.rst:1483 +#: library/curses.rst:1485 msgid "``KEY_SRESET``" msgstr "``KEY_SRESET``" -#: library/curses.rst:1483 +#: library/curses.rst:1485 msgid "Soft (partial) reset (unreliable)" msgstr "" -#: library/curses.rst:1485 +#: library/curses.rst:1487 msgid "``KEY_RESET``" msgstr "``KEY_RESET``" -#: library/curses.rst:1485 +#: library/curses.rst:1487 msgid "Reset or hard reset (unreliable)" msgstr "" -#: library/curses.rst:1487 +#: library/curses.rst:1489 msgid "``KEY_PRINT``" msgstr "``KEY_PRINT``" -#: library/curses.rst:1487 +#: library/curses.rst:1489 msgid "Print" msgstr "" -#: library/curses.rst:1489 +#: library/curses.rst:1491 msgid "``KEY_LL``" msgstr "``KEY_LL``" -#: library/curses.rst:1489 +#: library/curses.rst:1491 msgid "Home down or bottom (lower left)" msgstr "" -#: library/curses.rst:1491 +#: library/curses.rst:1493 msgid "``KEY_A1``" msgstr "``KEY_A1``" -#: library/curses.rst:1491 +#: library/curses.rst:1493 msgid "Upper left of keypad" msgstr "" -#: library/curses.rst:1493 +#: library/curses.rst:1495 msgid "``KEY_A3``" msgstr "``KEY_A3``" -#: library/curses.rst:1493 +#: library/curses.rst:1495 msgid "Upper right of keypad" msgstr "" -#: library/curses.rst:1495 +#: library/curses.rst:1497 msgid "``KEY_B2``" msgstr "``KEY_B2``" -#: library/curses.rst:1495 +#: library/curses.rst:1497 msgid "Center of keypad" msgstr "" -#: library/curses.rst:1497 +#: library/curses.rst:1499 msgid "``KEY_C1``" msgstr "``KEY_C1``" -#: library/curses.rst:1497 +#: library/curses.rst:1499 msgid "Lower left of keypad" msgstr "" -#: library/curses.rst:1499 +#: library/curses.rst:1501 msgid "``KEY_C3``" msgstr "``KEY_C3``" -#: library/curses.rst:1499 +#: library/curses.rst:1501 msgid "Lower right of keypad" msgstr "" -#: library/curses.rst:1501 +#: library/curses.rst:1503 msgid "``KEY_BTAB``" msgstr "``KEY_BTAB``" -#: library/curses.rst:1501 +#: library/curses.rst:1503 msgid "Back tab" msgstr "" -#: library/curses.rst:1503 +#: library/curses.rst:1505 msgid "``KEY_BEG``" msgstr "``KEY_BEG``" -#: library/curses.rst:1503 +#: library/curses.rst:1505 msgid "Beg (beginning)" msgstr "" -#: library/curses.rst:1505 +#: library/curses.rst:1507 msgid "``KEY_CANCEL``" msgstr "``KEY_CANCEL``" -#: library/curses.rst:1505 +#: library/curses.rst:1507 msgid "Cancel" msgstr "" -#: library/curses.rst:1507 +#: library/curses.rst:1509 msgid "``KEY_CLOSE``" msgstr "``KEY_CLOSE``" -#: library/curses.rst:1507 +#: library/curses.rst:1509 msgid "Close" msgstr "*Close*" -#: library/curses.rst:1509 +#: library/curses.rst:1511 msgid "``KEY_COMMAND``" msgstr "``KEY_COMMAND``" -#: library/curses.rst:1509 +#: library/curses.rst:1511 msgid "Cmd (command)" msgstr "" -#: library/curses.rst:1511 +#: library/curses.rst:1513 msgid "``KEY_COPY``" msgstr "``KEY_COPY``" -#: library/curses.rst:1511 +#: library/curses.rst:1513 msgid "Copy" msgstr "*Copy*" -#: library/curses.rst:1513 +#: library/curses.rst:1515 msgid "``KEY_CREATE``" msgstr "``KEY_CREATE``" -#: library/curses.rst:1513 +#: library/curses.rst:1515 msgid "Create" msgstr "" -#: library/curses.rst:1515 +#: library/curses.rst:1517 msgid "``KEY_END``" msgstr "``KEY_END``" -#: library/curses.rst:1515 +#: library/curses.rst:1517 msgid "End" msgstr "" -#: library/curses.rst:1517 +#: library/curses.rst:1519 msgid "``KEY_EXIT``" msgstr "``KEY_EXIT``" -#: library/curses.rst:1517 +#: library/curses.rst:1519 msgid "Exit" msgstr "*Exit*" -#: library/curses.rst:1519 +#: library/curses.rst:1521 msgid "``KEY_FIND``" msgstr "``KEY_FIND``" -#: library/curses.rst:1519 +#: library/curses.rst:1521 msgid "Find" msgstr "" -#: library/curses.rst:1521 +#: library/curses.rst:1523 msgid "``KEY_HELP``" msgstr "``KEY_HELP``" -#: library/curses.rst:1521 +#: library/curses.rst:1523 msgid "Help" msgstr "" -#: library/curses.rst:1523 +#: library/curses.rst:1525 msgid "``KEY_MARK``" msgstr "``KEY_MARK``" -#: library/curses.rst:1523 +#: library/curses.rst:1525 msgid "Mark" msgstr "" -#: library/curses.rst:1525 +#: library/curses.rst:1527 msgid "``KEY_MESSAGE``" msgstr "``KEY_MESSAGE``" -#: library/curses.rst:1525 +#: library/curses.rst:1527 msgid "Message" msgstr "" -#: library/curses.rst:1527 +#: library/curses.rst:1529 msgid "``KEY_MOVE``" msgstr "``KEY_MOVE``" -#: library/curses.rst:1527 +#: library/curses.rst:1529 msgid "Move" msgstr "" -#: library/curses.rst:1529 +#: library/curses.rst:1531 msgid "``KEY_NEXT``" msgstr "``KEY_NEXT``" -#: library/curses.rst:1529 +#: library/curses.rst:1531 msgid "Next" msgstr "" -#: library/curses.rst:1531 +#: library/curses.rst:1533 msgid "``KEY_OPEN``" msgstr "``KEY_OPEN``" -#: library/curses.rst:1531 +#: library/curses.rst:1533 msgid "Open" msgstr "" -#: library/curses.rst:1533 +#: library/curses.rst:1535 msgid "``KEY_OPTIONS``" msgstr "``KEY_OPTIONS``" -#: library/curses.rst:1533 +#: library/curses.rst:1535 msgid "Options" msgstr "Options" -#: library/curses.rst:1535 +#: library/curses.rst:1537 msgid "``KEY_PREVIOUS``" msgstr "``KEY_PREVIOUS``" -#: library/curses.rst:1535 +#: library/curses.rst:1537 msgid "Prev (previous)" msgstr "" -#: library/curses.rst:1537 +#: library/curses.rst:1539 msgid "``KEY_REDO``" msgstr "``KEY_REDO``" -#: library/curses.rst:1537 +#: library/curses.rst:1539 msgid "Redo" msgstr "*Redo*" -#: library/curses.rst:1539 +#: library/curses.rst:1541 msgid "``KEY_REFERENCE``" msgstr "``KEY_REFERENCE``" -#: library/curses.rst:1539 +#: library/curses.rst:1541 msgid "Ref (reference)" msgstr "" -#: library/curses.rst:1541 +#: library/curses.rst:1543 msgid "``KEY_REFRESH``" msgstr "``KEY_REFRESH``" -#: library/curses.rst:1541 +#: library/curses.rst:1543 msgid "Refresh" msgstr "" -#: library/curses.rst:1543 +#: library/curses.rst:1545 msgid "``KEY_REPLACE``" msgstr "``KEY_REPLACE``" -#: library/curses.rst:1543 +#: library/curses.rst:1545 msgid "Replace" msgstr "" -#: library/curses.rst:1545 +#: library/curses.rst:1547 msgid "``KEY_RESTART``" msgstr "``KEY_RESTART``" -#: library/curses.rst:1545 +#: library/curses.rst:1547 msgid "Restart" msgstr "" -#: library/curses.rst:1547 +#: library/curses.rst:1549 msgid "``KEY_RESUME``" msgstr "``KEY_RESUME``" -#: library/curses.rst:1547 +#: library/curses.rst:1549 msgid "Resume" msgstr "" -#: library/curses.rst:1549 +#: library/curses.rst:1551 msgid "``KEY_SAVE``" msgstr "``KEY_SAVE``" -#: library/curses.rst:1549 +#: library/curses.rst:1551 msgid "Save" msgstr "*Save*" -#: library/curses.rst:1551 +#: library/curses.rst:1553 msgid "``KEY_SBEG``" msgstr "``KEY_SBEG``" -#: library/curses.rst:1551 +#: library/curses.rst:1553 msgid "Shifted Beg (beginning)" msgstr "" -#: library/curses.rst:1553 +#: library/curses.rst:1555 msgid "``KEY_SCANCEL``" msgstr "``KEY_SCANCEL``" -#: library/curses.rst:1553 +#: library/curses.rst:1555 msgid "Shifted Cancel" msgstr "" -#: library/curses.rst:1555 +#: library/curses.rst:1557 msgid "``KEY_SCOMMAND``" msgstr "``KEY_SCOMMAND``" -#: library/curses.rst:1555 +#: library/curses.rst:1557 msgid "Shifted Command" msgstr "" -#: library/curses.rst:1557 +#: library/curses.rst:1559 msgid "``KEY_SCOPY``" msgstr "``KEY_SCOPY``" -#: library/curses.rst:1557 +#: library/curses.rst:1559 msgid "Shifted Copy" msgstr "" -#: library/curses.rst:1559 +#: library/curses.rst:1561 msgid "``KEY_SCREATE``" msgstr "``KEY_SCREATE``" -#: library/curses.rst:1559 +#: library/curses.rst:1561 msgid "Shifted Create" msgstr "" -#: library/curses.rst:1561 +#: library/curses.rst:1563 msgid "``KEY_SDC``" msgstr "``KEY_SDC``" -#: library/curses.rst:1561 +#: library/curses.rst:1563 msgid "Shifted Delete char" msgstr "" -#: library/curses.rst:1563 +#: library/curses.rst:1565 msgid "``KEY_SDL``" msgstr "``KEY_SDL``" -#: library/curses.rst:1563 +#: library/curses.rst:1565 msgid "Shifted Delete line" msgstr "" -#: library/curses.rst:1565 +#: library/curses.rst:1567 msgid "``KEY_SELECT``" msgstr "``KEY_SELECT``" -#: library/curses.rst:1565 +#: library/curses.rst:1567 msgid "Select" msgstr "" -#: library/curses.rst:1567 +#: library/curses.rst:1569 msgid "``KEY_SEND``" msgstr "``KEY_SEND``" -#: library/curses.rst:1567 +#: library/curses.rst:1569 msgid "Shifted End" msgstr "" -#: library/curses.rst:1569 +#: library/curses.rst:1571 msgid "``KEY_SEOL``" msgstr "``KEY_SEOL``" -#: library/curses.rst:1569 +#: library/curses.rst:1571 msgid "Shifted Clear line" msgstr "" -#: library/curses.rst:1571 +#: library/curses.rst:1573 msgid "``KEY_SEXIT``" msgstr "``KEY_SEXIT``" -#: library/curses.rst:1571 +#: library/curses.rst:1573 msgid "Shifted Exit" msgstr "" -#: library/curses.rst:1573 +#: library/curses.rst:1575 msgid "``KEY_SFIND``" msgstr "``KEY_SFIND``" -#: library/curses.rst:1573 +#: library/curses.rst:1575 msgid "Shifted Find" msgstr "" -#: library/curses.rst:1575 +#: library/curses.rst:1577 msgid "``KEY_SHELP``" msgstr "``KEY_SHELP``" -#: library/curses.rst:1575 +#: library/curses.rst:1577 msgid "Shifted Help" msgstr "" -#: library/curses.rst:1577 +#: library/curses.rst:1579 msgid "``KEY_SHOME``" msgstr "``KEY_SHOME``" -#: library/curses.rst:1577 +#: library/curses.rst:1579 msgid "Shifted Home" msgstr "" -#: library/curses.rst:1579 +#: library/curses.rst:1581 msgid "``KEY_SIC``" msgstr "``KEY_SIC``" -#: library/curses.rst:1579 +#: library/curses.rst:1581 msgid "Shifted Input" msgstr "" -#: library/curses.rst:1581 +#: library/curses.rst:1583 msgid "``KEY_SLEFT``" msgstr "``KEY_SLEFT``" -#: library/curses.rst:1581 +#: library/curses.rst:1583 msgid "Shifted Left arrow" msgstr "" -#: library/curses.rst:1583 +#: library/curses.rst:1585 msgid "``KEY_SMESSAGE``" msgstr "``KEY_SMESSAGE``" -#: library/curses.rst:1583 +#: library/curses.rst:1585 msgid "Shifted Message" msgstr "" -#: library/curses.rst:1585 +#: library/curses.rst:1587 msgid "``KEY_SMOVE``" msgstr "``KEY_SMOVE``" -#: library/curses.rst:1585 +#: library/curses.rst:1587 msgid "Shifted Move" msgstr "" -#: library/curses.rst:1587 +#: library/curses.rst:1589 msgid "``KEY_SNEXT``" msgstr "``KEY_SNEXT``" -#: library/curses.rst:1587 +#: library/curses.rst:1589 msgid "Shifted Next" msgstr "" -#: library/curses.rst:1589 +#: library/curses.rst:1591 msgid "``KEY_SOPTIONS``" msgstr "``KEY_SOPTIONS``" -#: library/curses.rst:1589 +#: library/curses.rst:1591 msgid "Shifted Options" msgstr "" -#: library/curses.rst:1591 +#: library/curses.rst:1593 msgid "``KEY_SPREVIOUS``" msgstr "``KEY_SPREVIOUS``" -#: library/curses.rst:1591 +#: library/curses.rst:1593 msgid "Shifted Prev" msgstr "" -#: library/curses.rst:1593 +#: library/curses.rst:1595 msgid "``KEY_SPRINT``" msgstr "``KEY_SPRINT``" -#: library/curses.rst:1593 +#: library/curses.rst:1595 msgid "Shifted Print" msgstr "" -#: library/curses.rst:1595 +#: library/curses.rst:1597 msgid "``KEY_SREDO``" msgstr "``KEY_SREDO``" -#: library/curses.rst:1595 +#: library/curses.rst:1597 msgid "Shifted Redo" msgstr "" -#: library/curses.rst:1597 +#: library/curses.rst:1599 msgid "``KEY_SREPLACE``" msgstr "``KEY_SREPLACE``" -#: library/curses.rst:1597 +#: library/curses.rst:1599 msgid "Shifted Replace" msgstr "" -#: library/curses.rst:1599 +#: library/curses.rst:1601 msgid "``KEY_SRIGHT``" msgstr "``KEY_SRIGHT``" -#: library/curses.rst:1599 +#: library/curses.rst:1601 msgid "Shifted Right arrow" msgstr "" -#: library/curses.rst:1601 +#: library/curses.rst:1603 msgid "``KEY_SRSUME``" msgstr "``KEY_SRSUME``" -#: library/curses.rst:1601 +#: library/curses.rst:1603 msgid "Shifted Resume" msgstr "" -#: library/curses.rst:1603 +#: library/curses.rst:1605 msgid "``KEY_SSAVE``" msgstr "``KEY_SSAVE``" -#: library/curses.rst:1603 +#: library/curses.rst:1605 msgid "Shifted Save" msgstr "" -#: library/curses.rst:1605 +#: library/curses.rst:1607 msgid "``KEY_SSUSPEND``" msgstr "``KEY_SSUSPEND``" -#: library/curses.rst:1605 +#: library/curses.rst:1607 msgid "Shifted Suspend" msgstr "" -#: library/curses.rst:1607 +#: library/curses.rst:1609 msgid "``KEY_SUNDO``" msgstr "``KEY_SUNDO``" -#: library/curses.rst:1607 +#: library/curses.rst:1609 msgid "Shifted Undo" msgstr "" -#: library/curses.rst:1609 +#: library/curses.rst:1611 msgid "``KEY_SUSPEND``" msgstr "``KEY_SUSPEND``" -#: library/curses.rst:1609 +#: library/curses.rst:1611 msgid "Suspend" msgstr "" -#: library/curses.rst:1611 +#: library/curses.rst:1613 msgid "``KEY_UNDO``" msgstr "``KEY_UNDO``" -#: library/curses.rst:1611 +#: library/curses.rst:1613 msgid "Undo" msgstr "*Undo*" -#: library/curses.rst:1613 +#: library/curses.rst:1615 msgid "``KEY_MOUSE``" msgstr "``KEY_MOUSE``" -#: library/curses.rst:1613 +#: library/curses.rst:1615 msgid "Mouse event has occurred" msgstr "" -#: library/curses.rst:1615 +#: library/curses.rst:1617 msgid "``KEY_RESIZE``" msgstr "``KEY_RESIZE``" -#: library/curses.rst:1615 +#: library/curses.rst:1617 msgid "Terminal resize event" msgstr "" -#: library/curses.rst:1617 +#: library/curses.rst:1619 msgid "``KEY_MAX``" msgstr "``KEY_MAX``" -#: library/curses.rst:1617 +#: library/curses.rst:1619 msgid "Maximum key value" msgstr "" -#: library/curses.rst:1620 +#: 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`, :" @@ -2465,63 +2469,63 @@ msgid "" "function keys); also, the following keypad mappings are standard:" msgstr "" -#: library/curses.rst:1629 +#: library/curses.rst:1631 msgid "Keycap" msgstr "" -#: library/curses.rst:1746 library/curses.rst:1870 +#: library/curses.rst:1748 library/curses.rst:1872 msgid "Constant" msgstr "Constante" -#: library/curses.rst:1631 +#: library/curses.rst:1633 msgid ":kbd:`Insert`" msgstr ":kbd:`Insert`" -#: library/curses.rst:1631 +#: library/curses.rst:1633 msgid "KEY_IC" msgstr "" -#: library/curses.rst:1633 +#: library/curses.rst:1635 msgid ":kbd:`Delete`" msgstr ":kbd:`Delete`" -#: library/curses.rst:1633 +#: library/curses.rst:1635 msgid "KEY_DC" msgstr "" -#: library/curses.rst:1635 +#: library/curses.rst:1637 msgid ":kbd:`Home`" msgstr ":kbd:`Home`" -#: library/curses.rst:1635 +#: library/curses.rst:1637 msgid "KEY_HOME" msgstr "KEY_HOME" -#: library/curses.rst:1637 +#: library/curses.rst:1639 msgid ":kbd:`End`" msgstr ":kbd:`End`" -#: library/curses.rst:1637 +#: library/curses.rst:1639 msgid "KEY_END" msgstr "KEY_END" -#: library/curses.rst:1639 +#: library/curses.rst:1641 msgid ":kbd:`Page Up`" msgstr ":kbd:`Page Up`" -#: library/curses.rst:1639 +#: library/curses.rst:1641 msgid "KEY_PPAGE" msgstr "KEY_PPAGE" -#: library/curses.rst:1641 +#: library/curses.rst:1643 msgid ":kbd:`Page Down`" msgstr ":kbd:`Page Down`" -#: library/curses.rst:1641 +#: library/curses.rst:1643 msgid "KEY_NPAGE" msgstr "KEY_NPAGE" -#: library/curses.rst:1644 +#: 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 " @@ -2529,435 +2533,435 @@ msgid "" "available, curses falls back on a crude printable ASCII approximation." msgstr "" -#: library/curses.rst:1651 +#: library/curses.rst:1653 msgid "These are available only after :func:`initscr` has been called." msgstr "" -#: library/curses.rst:1654 +#: library/curses.rst:1656 msgid "ACS code" msgstr "" -#: library/curses.rst:1656 +#: library/curses.rst:1658 msgid "``ACS_BBSS``" msgstr "``ACS_BBSS``" -#: library/curses.rst:1656 +#: library/curses.rst:1658 msgid "alternate name for upper right corner" msgstr "" -#: library/curses.rst:1658 +#: library/curses.rst:1660 msgid "``ACS_BLOCK``" msgstr "``ACS_BLOCK``" -#: library/curses.rst:1658 +#: library/curses.rst:1660 msgid "solid square block" msgstr "" -#: library/curses.rst:1660 +#: library/curses.rst:1662 msgid "``ACS_BOARD``" msgstr "``ACS_BOARD``" -#: library/curses.rst:1660 +#: library/curses.rst:1662 msgid "board of squares" msgstr "" -#: library/curses.rst:1662 +#: library/curses.rst:1664 msgid "``ACS_BSBS``" msgstr "``ACS_BSBS``" -#: library/curses.rst:1662 +#: library/curses.rst:1664 msgid "alternate name for horizontal line" msgstr "" -#: library/curses.rst:1664 +#: library/curses.rst:1666 msgid "``ACS_BSSB``" msgstr "``ACS_BSSB``" -#: library/curses.rst:1664 +#: library/curses.rst:1666 msgid "alternate name for upper left corner" msgstr "" -#: library/curses.rst:1666 +#: library/curses.rst:1668 msgid "``ACS_BSSS``" msgstr "``ACS_BSSS``" -#: library/curses.rst:1666 +#: library/curses.rst:1668 msgid "alternate name for top tee" msgstr "" -#: library/curses.rst:1668 +#: library/curses.rst:1670 msgid "``ACS_BTEE``" msgstr "``ACS_BTEE``" -#: library/curses.rst:1668 +#: library/curses.rst:1670 msgid "bottom tee" msgstr "" -#: library/curses.rst:1670 +#: library/curses.rst:1672 msgid "``ACS_BULLET``" msgstr "``ACS_BULLET``" -#: library/curses.rst:1670 +#: library/curses.rst:1672 msgid "bullet" msgstr "" -#: library/curses.rst:1672 +#: library/curses.rst:1674 msgid "``ACS_CKBOARD``" msgstr "``ACS_CKBOARD``" -#: library/curses.rst:1672 +#: library/curses.rst:1674 msgid "checker board (stipple)" msgstr "" -#: library/curses.rst:1674 +#: library/curses.rst:1676 msgid "``ACS_DARROW``" msgstr "``ACS_DARROW``" -#: library/curses.rst:1674 +#: library/curses.rst:1676 msgid "arrow pointing down" msgstr "" -#: library/curses.rst:1676 +#: library/curses.rst:1678 msgid "``ACS_DEGREE``" msgstr "``ACS_DEGREE``" -#: library/curses.rst:1676 +#: library/curses.rst:1678 msgid "degree symbol" msgstr "" -#: library/curses.rst:1678 +#: library/curses.rst:1680 msgid "``ACS_DIAMOND``" msgstr "``ACS_DIAMOND``" -#: library/curses.rst:1678 +#: library/curses.rst:1680 msgid "diamond" msgstr "" -#: library/curses.rst:1680 +#: library/curses.rst:1682 msgid "``ACS_GEQUAL``" msgstr "``ACS_GEQUAL``" -#: library/curses.rst:1680 +#: library/curses.rst:1682 msgid "greater-than-or-equal-to" msgstr "" -#: library/curses.rst:1682 +#: library/curses.rst:1684 msgid "``ACS_HLINE``" msgstr "``ACS_HLINE``" -#: library/curses.rst:1682 +#: library/curses.rst:1684 msgid "horizontal line" msgstr "" -#: library/curses.rst:1684 +#: library/curses.rst:1686 msgid "``ACS_LANTERN``" msgstr "``ACS_LANTERN``" -#: library/curses.rst:1684 +#: library/curses.rst:1686 msgid "lantern symbol" msgstr "" -#: library/curses.rst:1686 +#: library/curses.rst:1688 msgid "``ACS_LARROW``" msgstr "``ACS_LARROW``" -#: library/curses.rst:1686 +#: library/curses.rst:1688 msgid "left arrow" msgstr "" -#: library/curses.rst:1688 +#: library/curses.rst:1690 msgid "``ACS_LEQUAL``" msgstr "``ACS_LEQUAL``" -#: library/curses.rst:1688 +#: library/curses.rst:1690 msgid "less-than-or-equal-to" msgstr "" -#: library/curses.rst:1690 +#: library/curses.rst:1692 msgid "``ACS_LLCORNER``" msgstr "``ACS_LLCORNER``" -#: library/curses.rst:1690 +#: library/curses.rst:1692 msgid "lower left-hand corner" msgstr "" -#: library/curses.rst:1692 +#: library/curses.rst:1694 msgid "``ACS_LRCORNER``" msgstr "``ACS_LRCORNER``" -#: library/curses.rst:1692 +#: library/curses.rst:1694 msgid "lower right-hand corner" msgstr "" -#: library/curses.rst:1694 +#: library/curses.rst:1696 msgid "``ACS_LTEE``" msgstr "``ACS_LTEE``" -#: library/curses.rst:1694 +#: library/curses.rst:1696 msgid "left tee" msgstr "" -#: library/curses.rst:1696 +#: library/curses.rst:1698 msgid "``ACS_NEQUAL``" msgstr "``ACS_NEQUAL``" -#: library/curses.rst:1696 +#: library/curses.rst:1698 msgid "not-equal sign" msgstr "" -#: library/curses.rst:1698 +#: library/curses.rst:1700 msgid "``ACS_PI``" msgstr "``ACS_PI``" -#: library/curses.rst:1698 +#: library/curses.rst:1700 msgid "letter pi" msgstr "" -#: library/curses.rst:1700 +#: library/curses.rst:1702 msgid "``ACS_PLMINUS``" msgstr "``ACS_PLMINUS``" -#: library/curses.rst:1700 +#: library/curses.rst:1702 msgid "plus-or-minus sign" msgstr "" -#: library/curses.rst:1702 +#: library/curses.rst:1704 msgid "``ACS_PLUS``" msgstr "``ACS_PLUS``" -#: library/curses.rst:1702 +#: library/curses.rst:1704 msgid "big plus sign" msgstr "" -#: library/curses.rst:1704 +#: library/curses.rst:1706 msgid "``ACS_RARROW``" msgstr "``ACS_RARROW``" -#: library/curses.rst:1704 +#: library/curses.rst:1706 msgid "right arrow" msgstr "" -#: library/curses.rst:1706 +#: library/curses.rst:1708 msgid "``ACS_RTEE``" msgstr "``ACS_RTEE``" -#: library/curses.rst:1706 +#: library/curses.rst:1708 msgid "right tee" msgstr "" -#: library/curses.rst:1708 +#: library/curses.rst:1710 msgid "``ACS_S1``" msgstr "``ACS_S1``" -#: library/curses.rst:1708 +#: library/curses.rst:1710 msgid "scan line 1" msgstr "" -#: library/curses.rst:1710 +#: library/curses.rst:1712 msgid "``ACS_S3``" msgstr "``ACS_S3``" -#: library/curses.rst:1710 +#: library/curses.rst:1712 msgid "scan line 3" msgstr "" -#: library/curses.rst:1712 +#: library/curses.rst:1714 msgid "``ACS_S7``" msgstr "``ACS_S7``" -#: library/curses.rst:1712 +#: library/curses.rst:1714 msgid "scan line 7" msgstr "" -#: library/curses.rst:1714 +#: library/curses.rst:1716 msgid "``ACS_S9``" msgstr "``ACS_S9``" -#: library/curses.rst:1714 +#: library/curses.rst:1716 msgid "scan line 9" msgstr "" -#: library/curses.rst:1716 +#: library/curses.rst:1718 msgid "``ACS_SBBS``" msgstr "``ACS_SBBS``" -#: library/curses.rst:1716 +#: library/curses.rst:1718 msgid "alternate name for lower right corner" msgstr "" -#: library/curses.rst:1718 +#: library/curses.rst:1720 msgid "``ACS_SBSB``" msgstr "``ACS_SBSB``" -#: library/curses.rst:1718 +#: library/curses.rst:1720 msgid "alternate name for vertical line" msgstr "" -#: library/curses.rst:1720 +#: library/curses.rst:1722 msgid "``ACS_SBSS``" msgstr "``ACS_SBSS``" -#: library/curses.rst:1720 +#: library/curses.rst:1722 msgid "alternate name for right tee" msgstr "" -#: library/curses.rst:1722 +#: library/curses.rst:1724 msgid "``ACS_SSBB``" msgstr "``ACS_SSBB``" -#: library/curses.rst:1722 +#: library/curses.rst:1724 msgid "alternate name for lower left corner" msgstr "" -#: library/curses.rst:1724 +#: library/curses.rst:1726 msgid "``ACS_SSBS``" msgstr "``ACS_SSBS``" -#: library/curses.rst:1724 +#: library/curses.rst:1726 msgid "alternate name for bottom tee" msgstr "" -#: library/curses.rst:1726 +#: library/curses.rst:1728 msgid "``ACS_SSSB``" msgstr "``ACS_SSSB``" -#: library/curses.rst:1726 +#: library/curses.rst:1728 msgid "alternate name for left tee" msgstr "" -#: library/curses.rst:1728 +#: library/curses.rst:1730 msgid "``ACS_SSSS``" msgstr "``ACS_SSSS``" -#: library/curses.rst:1728 +#: library/curses.rst:1730 msgid "alternate name for crossover or big plus" msgstr "" -#: library/curses.rst:1730 +#: library/curses.rst:1732 msgid "``ACS_STERLING``" msgstr "``ACS_STERLING``" -#: library/curses.rst:1730 +#: library/curses.rst:1732 msgid "pound sterling" msgstr "" -#: library/curses.rst:1732 +#: library/curses.rst:1734 msgid "``ACS_TTEE``" msgstr "``ACS_TTEE``" -#: library/curses.rst:1732 +#: library/curses.rst:1734 msgid "top tee" msgstr "" -#: library/curses.rst:1734 +#: library/curses.rst:1736 msgid "``ACS_UARROW``" msgstr "``ACS_UARROW``" -#: library/curses.rst:1734 +#: library/curses.rst:1736 msgid "up arrow" msgstr "" -#: library/curses.rst:1736 +#: library/curses.rst:1738 msgid "``ACS_ULCORNER``" msgstr "``ACS_ULCORNER``" -#: library/curses.rst:1736 +#: library/curses.rst:1738 msgid "upper left corner" msgstr "" -#: library/curses.rst:1738 +#: library/curses.rst:1740 msgid "``ACS_URCORNER``" msgstr "``ACS_URCORNER``" -#: library/curses.rst:1738 +#: library/curses.rst:1740 msgid "upper right corner" msgstr "" -#: library/curses.rst:1740 +#: library/curses.rst:1742 msgid "``ACS_VLINE``" msgstr "``ACS_VLINE``" -#: library/curses.rst:1740 +#: library/curses.rst:1742 msgid "vertical line" msgstr "" -#: library/curses.rst:1743 +#: library/curses.rst:1745 msgid "The following table lists the predefined colors:" msgstr "" -#: library/curses.rst:1746 +#: library/curses.rst:1748 msgid "Color" msgstr "" -#: library/curses.rst:1748 +#: library/curses.rst:1750 msgid "``COLOR_BLACK``" msgstr "``COLOR_BLACK``" -#: library/curses.rst:1748 +#: library/curses.rst:1750 msgid "Black" msgstr "" -#: library/curses.rst:1750 +#: library/curses.rst:1752 msgid "``COLOR_BLUE``" msgstr "``COLOR_BLUE``" -#: library/curses.rst:1750 +#: library/curses.rst:1752 msgid "Blue" msgstr "" -#: library/curses.rst:1752 +#: library/curses.rst:1754 msgid "``COLOR_CYAN``" msgstr "``COLOR_CYAN``" -#: library/curses.rst:1752 +#: library/curses.rst:1754 msgid "Cyan (light greenish blue)" msgstr "" -#: library/curses.rst:1754 +#: library/curses.rst:1756 msgid "``COLOR_GREEN``" msgstr "``COLOR_GREEN``" -#: library/curses.rst:1754 +#: library/curses.rst:1756 msgid "Green" msgstr "" -#: library/curses.rst:1756 +#: library/curses.rst:1758 msgid "``COLOR_MAGENTA``" msgstr "``COLOR_MAGENTA``" -#: library/curses.rst:1756 +#: library/curses.rst:1758 msgid "Magenta (purplish red)" msgstr "" -#: library/curses.rst:1758 +#: library/curses.rst:1760 msgid "``COLOR_RED``" msgstr "``COLOR_RED``" -#: library/curses.rst:1758 +#: library/curses.rst:1760 msgid "Red" msgstr "" -#: library/curses.rst:1760 +#: library/curses.rst:1762 msgid "``COLOR_WHITE``" msgstr "``COLOR_WHITE``" -#: library/curses.rst:1760 +#: library/curses.rst:1762 msgid "White" msgstr "" -#: library/curses.rst:1762 +#: library/curses.rst:1764 msgid "``COLOR_YELLOW``" msgstr "``COLOR_YELLOW``" -#: library/curses.rst:1762 +#: library/curses.rst:1764 msgid "Yellow" msgstr "" -#: library/curses.rst:1767 +#: library/curses.rst:1769 msgid ":mod:`curses.textpad` --- Text input widget for curses programs" msgstr "" -#: library/curses.rst:1775 +#: 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 " @@ -2967,11 +2971,11 @@ msgid "" "purposes." msgstr "" -#: library/curses.rst:1781 +#: library/curses.rst:1783 msgid "The module :mod:`curses.textpad` defines the following function:" msgstr "" -#: library/curses.rst:1786 +#: 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 " @@ -2983,15 +2987,15 @@ msgid "" "will be drawn with ASCII dashes, vertical bars, and plus signs." msgstr "" -#: library/curses.rst:1799 +#: library/curses.rst:1801 msgid "Textbox objects" msgstr "" -#: library/curses.rst:1801 +#: library/curses.rst:1803 msgid "You can instantiate a :class:`Textbox` object as follows:" msgstr "" -#: library/curses.rst:1806 +#: 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 " @@ -3000,13 +3004,13 @@ msgid "" "instance's :attr:`stripspaces` flag is initially on." msgstr "" -#: library/curses.rst:1812 +#: 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:1817 +#: 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 " @@ -3017,167 +3021,167 @@ msgid "" "`stripspaces` attribute." msgstr "" -#: library/curses.rst:1828 +#: library/curses.rst:1830 msgid "" "Process a single command keystroke. Here are the supported special " "keystrokes:" msgstr "" -#: library/curses.rst:1870 +#: library/curses.rst:1872 msgid "Keystroke" msgstr "" -#: library/curses.rst:1832 +#: library/curses.rst:1834 msgid "Action" msgstr "Action" -#: library/curses.rst:1834 +#: library/curses.rst:1836 msgid ":kbd:`Control-A`" msgstr ":kbd:`Control-A`" -#: library/curses.rst:1834 +#: library/curses.rst:1836 msgid "Go to left edge of window." msgstr "" -#: library/curses.rst:1872 +#: library/curses.rst:1874 msgid ":kbd:`Control-B`" msgstr ":kbd:`Control-B`" -#: library/curses.rst:1836 +#: library/curses.rst:1838 msgid "Cursor left, wrapping to previous line if appropriate." msgstr "" -#: library/curses.rst:1839 +#: library/curses.rst:1841 msgid ":kbd:`Control-D`" msgstr ":kbd:`Control-D`" -#: library/curses.rst:1839 +#: library/curses.rst:1841 msgid "Delete character under cursor." msgstr "" -#: library/curses.rst:1841 +#: library/curses.rst:1843 msgid ":kbd:`Control-E`" msgstr ":kbd:`Control-E`" -#: library/curses.rst:1841 +#: library/curses.rst:1843 msgid "Go to right edge (stripspaces off) or end of line (stripspaces on)." msgstr "" -#: library/curses.rst:1874 +#: library/curses.rst:1876 msgid ":kbd:`Control-F`" msgstr ":kbd:`Control-F`" -#: library/curses.rst:1844 +#: library/curses.rst:1846 msgid "Cursor right, wrapping to next line when appropriate." msgstr "" -#: library/curses.rst:1847 +#: library/curses.rst:1849 msgid ":kbd:`Control-G`" msgstr ":kbd:`Control-G`" -#: library/curses.rst:1847 +#: library/curses.rst:1849 msgid "Terminate, returning the window contents." msgstr "" -#: library/curses.rst:1849 +#: library/curses.rst:1851 msgid ":kbd:`Control-H`" msgstr ":kbd:`Control-H`" -#: library/curses.rst:1849 +#: library/curses.rst:1851 msgid "Delete character backward." msgstr "" -#: library/curses.rst:1851 +#: library/curses.rst:1853 msgid ":kbd:`Control-J`" msgstr ":kbd:`Control-J`" -#: library/curses.rst:1851 +#: library/curses.rst:1853 msgid "Terminate if the window is 1 line, otherwise insert newline." msgstr "" -#: library/curses.rst:1854 +#: library/curses.rst:1856 msgid ":kbd:`Control-K`" msgstr ":kbd:`Control-K`" -#: library/curses.rst:1854 +#: library/curses.rst:1856 msgid "If line is blank, delete it, otherwise clear to end of line." msgstr "" -#: library/curses.rst:1857 +#: library/curses.rst:1859 msgid ":kbd:`Control-L`" msgstr ":kbd:`Control-L`" -#: library/curses.rst:1857 +#: library/curses.rst:1859 msgid "Refresh screen." msgstr "" -#: library/curses.rst:1878 +#: library/curses.rst:1880 msgid ":kbd:`Control-N`" msgstr ":kbd:`Control-N`" -#: library/curses.rst:1859 +#: library/curses.rst:1861 msgid "Cursor down; move down one line." msgstr "" -#: library/curses.rst:1861 +#: library/curses.rst:1863 msgid ":kbd:`Control-O`" msgstr ":kbd:`Control-O`" -#: library/curses.rst:1861 +#: library/curses.rst:1863 msgid "Insert a blank line at cursor location." msgstr "" -#: library/curses.rst:1876 +#: library/curses.rst:1878 msgid ":kbd:`Control-P`" msgstr ":kbd:`Control-P`" -#: library/curses.rst:1863 +#: library/curses.rst:1865 msgid "Cursor up; move up one line." msgstr "" -#: library/curses.rst:1866 +#: 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:1872 +#: library/curses.rst:1874 msgid ":const:`KEY_LEFT`" msgstr ":const:`KEY_LEFT`" -#: library/curses.rst:1874 +#: library/curses.rst:1876 msgid ":const:`KEY_RIGHT`" msgstr ":const:`KEY_RIGHT`" -#: library/curses.rst:1876 +#: library/curses.rst:1878 msgid ":const:`KEY_UP`" msgstr ":const:`KEY_UP`" -#: library/curses.rst:1878 +#: library/curses.rst:1880 msgid ":const:`KEY_DOWN`" msgstr ":const:`KEY_DOWN`" -#: library/curses.rst:1880 +#: library/curses.rst:1882 msgid ":const:`KEY_BACKSPACE`" msgstr ":const:`KEY_BACKSPACE`" -#: library/curses.rst:1880 +#: library/curses.rst:1882 msgid ":kbd:`Control-h`" msgstr ":kbd:`Control-h`" -#: library/curses.rst:1883 +#: 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:1889 +#: 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:1895 +#: 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 " diff --git a/library/custominterp.po b/library/custominterp.po index cab65c9d29..9a52f5c87e 100644 --- a/library/custominterp.po +++ b/library/custominterp.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" +"POT-Creation-Date: 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" @@ -19,12 +19,13 @@ 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.)" +"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 " diff --git a/library/dataclasses.po b/library/dataclasses.po index 0b2a8f713d..ee7df24fc3 100644 --- a/library/dataclasses.po +++ b/library/dataclasses.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-12-31 11:33+0100\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" @@ -115,24 +115,24 @@ msgstr "" "sa signature). Ainsi, les trois usages suivants de :func:`dataclass` sont " "équivalents ::" -#: library/dataclasses.rst:86 +#: library/dataclasses.rst:87 msgid "The parameters to :func:`dataclass` are:" msgstr "Les paramètres de :func:`dataclass` sont les suivants :" -#: library/dataclasses.rst:88 +#: 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:91 +#: 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:94 +#: 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 " @@ -148,14 +148,14 @@ msgstr "" "sont ignorés. Par exemple : ``InventoryItem(name='widget', unit_price=3.0, " "quantity_on_hand=10)``." -#: library/dataclasses.rst:101 +#: 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:104 +#: 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 " @@ -166,13 +166,13 @@ msgstr "" "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:109 +#: 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:112 +#: 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. " @@ -187,7 +187,7 @@ msgstr "" "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:119 +#: 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." @@ -196,7 +196,7 @@ msgstr "" "`__le__`, :meth:`__gt__`, ou :meth:`__ge__`, alors une :exc:`TypeError` est " "levée." -#: library/dataclasses.rst:123 +#: 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." @@ -204,7 +204,7 @@ 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:126 +#: 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:" @@ -221,7 +221,7 @@ msgstr "" "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:133 +#: 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 " @@ -236,7 +236,7 @@ msgstr "" "signification particulière, comme précisé dans la documentation de :meth:" "`__hash__`." -#: library/dataclasses.rst:139 +#: 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. " @@ -254,7 +254,7 @@ msgstr "" "s'agit là d'un cas particulier qui doit être considéré avec la plus grande " "prudence." -#: library/dataclasses.rst:146 +#: 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 " @@ -266,7 +266,7 @@ msgstr "" "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:151 +#: 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 " @@ -285,7 +285,7 @@ msgstr "" "parente sera utilisée (si la classe parente est :class:`object`, le " "comportement est un hachage basé sur les id)." -#: library/dataclasses.rst:159 +#: 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:" @@ -298,7 +298,7 @@ msgstr "" "sur la classe, alors une :exc:`TypeError` est levée. Voir la discussion ci-" "dessous." -#: library/dataclasses.rst:164 +#: 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:" @@ -312,7 +312,7 @@ msgstr "" "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:173 +#: 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 " @@ -331,7 +331,7 @@ msgstr "" "glossaire pour plus d'informations. Voir également la section :const:" "`KW_ONLY`." -#: library/dataclasses.rst:184 +#: 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 " @@ -343,7 +343,7 @@ msgstr "" "celle d'origine. Si :attr:`__slots__` est déjà défini dans la classe alors " "une :exc:`TypeError` est levée." -#: library/dataclasses.rst:191 +#: library/dataclasses.rst:192 msgid "" "``field``\\s may optionally specify a default value, using normal Python " "syntax::" @@ -351,7 +351,7 @@ msgstr "" "Les champs peuvent éventuellement préciser une valeur par défaut, en " "utilisant la syntaxe Python normale ::" -#: library/dataclasses.rst:199 +#: 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::" @@ -359,7 +359,7 @@ 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:204 +#: 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 " @@ -369,7 +369,7 @@ msgstr "" "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:210 +#: 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 " @@ -383,7 +383,7 @@ msgstr "" "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:223 +#: 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 " @@ -397,11 +397,11 @@ msgstr "" "`MISSING` est interne au module et ne doit pas être utilisée dans vos " "programmes." -#: library/dataclasses.rst:228 +#: library/dataclasses.rst:229 msgid "The parameters to :func:`field` are:" msgstr "Les paramètres de :func:`field` sont :" -#: library/dataclasses.rst:230 +#: 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 " @@ -411,7 +411,7 @@ msgstr "" "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:234 +#: 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 " @@ -425,7 +425,7 @@ msgstr "" "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:240 +#: library/dataclasses.rst:241 msgid "" "``init``: If true (the default), this field is included as a parameter to " "the generated :meth:`__init__` method." @@ -433,7 +433,7 @@ 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:243 +#: library/dataclasses.rst:244 msgid "" "``repr``: If true (the default), this field is included in the string " "returned by the generated :meth:`__repr__` method." @@ -441,7 +441,7 @@ 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:246 +#: 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 " @@ -456,7 +456,7 @@ msgstr "" "hachage les champs employés pour les comparaisons. Il est déconseillé de " "mettre ce paramètre à autre chose que ``None``." -#: library/dataclasses.rst:253 +#: 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 " @@ -471,7 +471,7 @@ msgstr "" "moment, on peut alors se passer du champ dans le hachage tout en le faisant " "participer aux comparaisons." -#: library/dataclasses.rst:259 +#: 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.)." @@ -480,7 +480,7 @@ msgstr "" "comparaisons d'égalité et d'inégalité dans les méthodes générées :meth:" "`__eq__`, :meth:`__gt__`, etc." -#: library/dataclasses.rst:263 +#: 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 " @@ -494,7 +494,7 @@ msgstr "" "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:271 +#: 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." @@ -503,7 +503,7 @@ msgstr "" "est utilisé lors du traitement des paramètres de la méthode :meth:`__init__` " "générée." -#: library/dataclasses.rst:277 +#: 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 " @@ -521,7 +521,7 @@ msgstr "" "des champs exactement comme si elles avaient été définies directement. Par " "exemple :" -#: library/dataclasses.rst:293 +#: 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." @@ -530,7 +530,7 @@ msgstr "" "l'attribut ``C.t`` vaut ``20``, alors que les attributs ``C.x`` et ``C.y`` " "n'existent pas." -#: library/dataclasses.rst:299 +#: 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 " @@ -543,15 +543,15 @@ msgstr "" "instancier un objet :class:`Field` eux-mêmes. Les attributs documentés sont " "les suivants :" -#: library/dataclasses.rst:304 +#: library/dataclasses.rst:305 msgid "``name``: The name of the field." msgstr "*name* : le nom du champ ;" -#: library/dataclasses.rst:306 +#: library/dataclasses.rst:307 msgid "``type``: The type of the field." msgstr "*type* : le type associé au champ par l'annotation ;" -#: library/dataclasses.rst:308 +#: library/dataclasses.rst:309 msgid "" "``default``, ``default_factory``, ``init``, ``repr``, ``hash``, ``compare``, " "``metadata``, and ``kw_only`` have the identical meaning and values as they " @@ -561,7 +561,7 @@ msgstr "" "et *kw_only* qui correspondent aux paramètres de :func:`field` et en " "prennent les valeurs." -#: library/dataclasses.rst:312 +#: library/dataclasses.rst:313 msgid "" "Other attributes may exist, but they are private and must not be inspected " "or relied on." @@ -569,7 +569,7 @@ 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:317 +#: 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. " @@ -582,65 +582,65 @@ msgstr "" "telle classe ; si ce n'est pas le cas, une exception :exc:`TypeError` est " "levée." -#: library/dataclasses.rst:324 -#, fuzzy +#: library/dataclasses.rst:325 msgid "" -"Converts the dataclass ``instance`` to a dict (by using the factory function " +"Converts the dataclass ``obj`` to a dict (by using the factory function " "``dict_factory``). Each dataclass is converted to a dict of its fields, as " "``name: value`` pairs. dataclasses, dicts, lists, and tuples are recursed " "into. Other objects are copied with :func:`copy.deepcopy`." msgstr "" -"Convertit *instance*, une instance d'une classe de données, en un " -"dictionnaire. Le résultat est construit par 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 traversés pour " -"convertir récursivement toutes les instances de classes de données qu'ils " -"contiennent. Voici un exemple :" +"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:330 +#: 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:367 +#: 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:351 -#, fuzzy +#: library/dataclasses.rst:352 msgid "" -":func:`asdict` raises :exc:`TypeError` if ``instance`` is not a dataclass " +":func:`asdict` raises :exc:`TypeError` if ``obj`` is not a dataclass " "instance." msgstr "" -"Lève :exc:`TypeError` si *instance* n'est pas une instance d'une classe de " -"données." +":func:`asdict` lève :exc:`TypeError` si ``obj`` n'est pas une instance d'une " +"classe de données." -#: library/dataclasses.rst:356 -#, fuzzy +#: library/dataclasses.rst:357 msgid "" -"Converts the dataclass ``instance`` to a tuple (by using the factory " -"function ``tuple_factory``). Each dataclass is converted to a tuple of its " -"field values. dataclasses, dicts, lists, and tuples are recursed into. " -"Other objects are copied with :func:`copy.deepcopy`." +"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 *instance* en un *n*-uplet des " -"valeurs de ses champs. Le résultat est construit par la fonction " -"*tuple_factory*. Cette fonction agit récursivement sur les dictionnaires, " -"listes, *n*-uplets et instances de classes de données." +"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:362 +#: library/dataclasses.rst:363 msgid "Continuing from the previous example::" msgstr "Pour continuer l'exemple précédent :" -#: library/dataclasses.rst:371 -#, fuzzy +#: library/dataclasses.rst:372 msgid "" -":func:`astuple` raises :exc:`TypeError` if ``instance`` is not a dataclass " +":func:`astuple` raises :exc:`TypeError` if ``obj`` is not a dataclass " "instance." msgstr "" -"Lève :exc:`TypeError` si *instance* n'est pas une instance d'une classe de " -"données." +":func:`astuple` lève :exc:`TypeError` si ``obj`` n'est pas une instance " +"d'une classe de données." -#: library/dataclasses.rst:376 +#: 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 " @@ -661,7 +661,7 @@ msgstr "" "*march_args*, *kw_only* et *slots*, sont les mêmes que dans :func:" "`dataclass`." -#: library/dataclasses.rst:386 +#: 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:" @@ -673,24 +673,23 @@ msgstr "" "``__annotation__`` et de lui appliquer la fonction :func:`dataclass`, qui la " "convertit en une classe de données. Par exemple, ceci :" -#: library/dataclasses.rst:398 +#: library/dataclasses.rst:399 msgid "Is equivalent to::" msgstr "est équivalent à ::" -#: library/dataclasses.rst:411 +#: library/dataclasses.rst:412 msgid "" -"Creates a new object of the same type as ``instance``, replacing fields with " -"values from ``changes``. If ``instance`` is not a Data Class, raises :exc:" +"Creates a new object of the same type as ``obj``, replacing fields with " +"values from ``changes``. If ``obj`` is not a Data Class, raises :exc:" "`TypeError`. If values in ``changes`` do not specify fields, raises :exc:" "`TypeError`." msgstr "" -"Crée un nouvel objet du même type que *instance* en effectuant les " -"remplacements donnés par *changes* dans ses champs. L'argument *instance* " -"doit être une instance d'une classe de données, sans quoi :exc:`TypeError` " -"est levée. De même, si une clé dans *changes* ne correspond à aucun champ de " -"l'instance, :exc:`TypeError` est levée." +"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:416 +#: 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 " @@ -700,7 +699,7 @@ msgstr "" "classe de données, ce qui garantit que :meth:`__post_init__` est appelée (si " "elle existe)." -#: library/dataclasses.rst:420 +#: 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:" @@ -710,7 +709,7 @@ msgstr "" "il faut l'inclure dans l'appel à :func:`replace` afin qu'il soit passé à :" "meth:`__init__` et :meth:`__post_init__`." -#: library/dataclasses.rst:424 +#: 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." @@ -718,7 +717,7 @@ msgstr "" "Si une clé de *changes* correspond à un champ défini avec ``init=False``, :" "exc:`ValueError` est levée." -#: library/dataclasses.rst:428 +#: 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 " @@ -736,7 +735,7 @@ msgstr "" "instances par des constructeurs de classe alternatifs, ou bien une méthode " "personnalisée ``replace()`` (ou un nom similaire)." -#: library/dataclasses.rst:439 +#: library/dataclasses.rst:440 msgid "" "Return ``True`` if its parameter is a dataclass or an instance of one, " "otherwise return ``False``." @@ -744,7 +743,7 @@ 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:442 +#: 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, " @@ -754,13 +753,13 @@ msgstr "" "non pas lui-même une classe de données, ajoutez le test ``not " "isinstance(obj, type)`` ::" -#: library/dataclasses.rst:451 +#: 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:455 +#: 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 " @@ -779,14 +778,14 @@ msgstr "" "exclusivement nommés doivent être spécifiés par leur nom lors de " "l'instanciation de la classe." -#: library/dataclasses.rst:464 +#: 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:475 +#: 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`." @@ -794,7 +793,7 @@ 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:480 +#: 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 " @@ -804,11 +803,11 @@ msgstr "" "`__setattr__` ou :meth:`__delattr__` définie implicitement est appelée dans " "une classe de données définie avec ``frozen=True``." -#: library/dataclasses.rst:485 +#: library/dataclasses.rst:488 msgid "Post-init processing" msgstr "Post-initialisation" -#: library/dataclasses.rst:487 +#: 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 " @@ -825,7 +824,7 @@ msgstr "" "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:495 +#: library/dataclasses.rst:498 msgid "" "Among other uses, this allows for initializing field values that depend on " "one or more other fields. For example::" @@ -833,7 +832,7 @@ msgstr "" "Cette méthode permet, entre autres, d'initialiser des champs qui dépendent " "d'autres champs. Par exemple :" -#: library/dataclasses.rst:507 +#: 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:" @@ -845,7 +844,7 @@ msgstr "" "`dataclass`. S'il faut appeler ces méthodes :meth:`__init__`, il est courant " "de le faire dans :meth:`__post_init__` :" -#: library/dataclasses.rst:524 +#: 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 " @@ -856,7 +855,7 @@ msgstr "" "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:528 +#: 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` " @@ -867,14 +866,15 @@ msgstr "" "l'avertissement sur le traitement par :func:`replace` des champs définis " "avec ``init=False``." -#: library/dataclasses.rst:533 +#: library/dataclasses.rst:536 msgid "Class variables" msgstr "Variables de classe" -#: library/dataclasses.rst:535 +#: library/dataclasses.rst:538 +#, fuzzy msgid "" -"One of two places where :func:`dataclass` actually inspects the type of a " -"field is to determine if a field is a class variable as defined in :pep:" +"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`` " @@ -887,13 +887,14 @@ msgstr "" "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:544 +#: library/dataclasses.rst:547 msgid "Init-only variables" msgstr "Variables d'initialisation" -#: library/dataclasses.rst:546 +#: library/dataclasses.rst:549 +#, fuzzy msgid "" -"The other place where :func:`dataclass` inspects a type annotation is to " +"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 " @@ -910,7 +911,7 @@ msgstr "" "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:556 +#: 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::" @@ -918,7 +919,7 @@ 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:571 +#: library/dataclasses.rst:574 msgid "" "In this case, :func:`fields` will return :class:`Field` objects for ``i`` " "and ``j``, but not for ``database``." @@ -926,11 +927,11 @@ msgstr "" "Ici, :func:`fields` renvoie des objets :class:`Field` correspondant à ``i`` " "et à ``j``, mais pas à ``database``." -#: library/dataclasses.rst:575 +#: library/dataclasses.rst:578 msgid "Frozen instances" msgstr "Instances figées" -#: library/dataclasses.rst:577 +#: 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 " @@ -944,7 +945,7 @@ msgstr "" "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:583 +#: 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 :" @@ -954,11 +955,11 @@ msgstr "" "`__init__` doit passer par :meth:`object.__setattr__` au lieu de simples " "affectations pour initialiser les champs." -#: library/dataclasses.rst:588 +#: library/dataclasses.rst:591 msgid "Inheritance" msgstr "Héritage" -#: library/dataclasses.rst:590 +#: 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, " @@ -978,7 +979,7 @@ msgstr "" "tableau associatif. Puisqu'il est ordonné, les champs des classes filles " "écrasent ceux des classes mères. Voici un exemple :" -#: library/dataclasses.rst:610 +#: 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``." @@ -986,16 +987,16 @@ 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:613 +#: 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:618 +#: 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:620 +#: 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) " @@ -1008,20 +1009,20 @@ msgstr "" "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:626 +#: 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 " +"exclusivement nommés alors que ``Base.x`` et ``D.z`` sont des champs " "normaux ::" -#: library/dataclasses.rst:641 +#: 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:645 +#: 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 " @@ -1031,7 +1032,7 @@ msgstr "" "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:649 +#: library/dataclasses.rst:652 msgid "" "The relative ordering of keyword-only parameters is maintained in the re-" "ordered :meth:`__init__` parameter list." @@ -1039,11 +1040,11 @@ 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:654 +#: library/dataclasses.rst:657 msgid "Default factory functions" msgstr "Fabriques de valeurs par défaut" -#: library/dataclasses.rst:656 +#: 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 " @@ -1053,7 +1054,7 @@ msgstr "" "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:662 +#: 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 " @@ -1065,11 +1066,11 @@ msgstr "" "chaque nouvelle instance, puisque c'est le seul moyen d'obtenir une valeur à " "laquelle initialiser le champ." -#: library/dataclasses.rst:669 +#: library/dataclasses.rst:672 msgid "Mutable default values" msgstr "Valeurs par défaut muables" -#: library/dataclasses.rst:671 +#: library/dataclasses.rst:674 msgid "" "Python stores default member variable values in class attributes. Consider " "this example, not using dataclasses::" @@ -1077,7 +1078,7 @@ 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:686 +#: library/dataclasses.rst:689 msgid "" "Note that the two instances of class ``C`` share the same class variable " "``x``, as expected." @@ -1085,15 +1086,15 @@ msgstr "" "Comme attendu, les deux instances de ``C`` partagent le même objet pour " "l'attribut ``x``." -#: library/dataclasses.rst:689 +#: 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:697 +#: library/dataclasses.rst:700 msgid "it would generate code similar to::" msgstr "il générerait un code équivalent à :" -#: library/dataclasses.rst:708 +#: 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 " @@ -1115,7 +1116,7 @@ msgstr "" "``set`` est détectée. Cette solution n'est pas parfaite, mais permet " "d'éviter la majorité des erreurs." -#: library/dataclasses.rst:719 +#: library/dataclasses.rst:722 msgid "" "Using default factory functions is a way to create new instances of mutable " "types as default values for fields::" @@ -1123,6 +1124,47 @@ 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" diff --git a/library/datetime.po b/library/datetime.po index d86cda08c0..1dcdba29b1 100644 --- a/library/datetime.po +++ b/library/datetime.po @@ -5,16 +5,16 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-12-31 11:33+0100\n" -"PO-Revision-Date: 2021-03-20 17:48+0100\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: Gtranslator 3.38.0\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" @@ -197,9 +197,9 @@ msgstr "" #: library/datetime.rst:101 msgid "" "An idealized time, independent of any particular day, assuming that every " -"day has exactly 24\\*60\\*60 seconds. (There is no notion of \"leap seconds" -"\" here.) Attributes: :attr:`hour`, :attr:`minute`, :attr:`second`, :attr:" -"`microsecond`, and :attr:`.tzinfo`." +"day has exactly 24\\*60\\*60 seconds. (There is no notion of \"leap " +"seconds\" here.) Attributes: :attr:`hour`, :attr:`minute`, :attr:`second`, :" +"attr:`microsecond`, and :attr:`.tzinfo`." msgstr "" "Un temps idéalisé, indépendant d'une date particulière, en supposant qu'une " "journée est composée d'exactement 24\\*60\\*60 secondes (il n'y a pas ici de " @@ -266,9 +266,10 @@ msgstr "" "`timezone` partagent les caractéristiques suivantes :" #: library/datetime.rst:157 +#, fuzzy msgid "" -"Objects of these types are hashable, meaning that they can be used as " -"dictionary keys." +"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." @@ -845,7 +846,7 @@ 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 " +"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 @@ -998,7 +999,8 @@ msgid "``date2 = date1 + timedelta``" msgstr "``date2 = date1 + timedelta``" #: library/datetime.rst:584 -msgid "*date2* is ``timedelta.days`` days removed from *date1*. (1)" +#, 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)" @@ -2072,16 +2074,13 @@ msgid "" "`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 "" -"Renvoie un :class:`time.struct_time` comme renvoyé par :func:`time." -"localtime`. ``d.timetuple()`` est équivalent à ``time.struct_time((d.year, d." -"month, d.day, d.hour, d.minute, d.second, d.weekday(), yday, dst))``, 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 1er 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``." +"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 @@ -2108,14 +2107,15 @@ msgstr "" "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épasser les bornes." +"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 ``utcfromtimetuple`` may give misleading results. If " -"you have a naive ``datetime`` representing UTC, use ``datetime." +"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 "" @@ -2354,11 +2354,8 @@ msgid "" "ctime` invokes, but which :meth:`datetime.ctime` does not invoke) conforms " "to the C standard." msgstr "" -"Renvoie une chaîne de caractères représentant la date, par exemple " -"``date(2002, 12, 4).ctime() == 'Wed Dec 4 00:00:00 2002'``. ``d.ctime()`` " -"est équivalent à ``time.ctime(time.mktime(d.timetuple()))`` 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." +"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 @@ -2417,8 +2414,9 @@ 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 *time* représente une heure (locale) du jour, indépendante de tout " -"jour particulier, et sujette à des ajustements par un objet :class:`tzinfo`." +"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 @@ -2479,11 +2477,11 @@ msgid "" "if an order comparison is attempted. For equality comparisons, naive " "instances are never equal to aware instances." msgstr "" -"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." +"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 @@ -2550,9 +2548,9 @@ msgid "" "formats emitted by :meth:`time.isoformat`. Specifically, this function " "supports strings in the format:" msgstr "" -"Renvoie une :class:`date` correspondant à *date_string* dans le format émis " -"par :meth:`date.isoformat`. Spécifiquement, cette fonction gère des chaînes " -"dans le(s) format(s) ``YYYY-MM-DD``." +"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 @@ -2622,7 +2620,7 @@ msgid "" "string. 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 " +"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`." @@ -2721,14 +2719,13 @@ msgid "" "represent timezones with fixed offset from UTC such as UTC itself or North " "American EST and EDT." msgstr "" -"Cette classe est une classe abstraite, signifiant qu'elle ne doit pas être " -"instanciée directement. 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 peut représenter des fuseaux horaires " -"avec des décalages fixes par rapport à UTC, tels qu'UTC lui-même ou les nord-" -"américains EST et EDT." +"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 @@ -2775,17 +2772,14 @@ msgid "" "magnitude of the offset must be less than one day). Most implementations of :" "meth:`utcoffset` will probably look like one of these two::" msgstr "" -"Renvoie le décalage entre le temps local et UTC, comme un objet :class:" -"`timedelta` qui est positif à l'est d'UTC. Si le temps local se situe à " -"l'ouest d'UTC, le décalage doit être négatif. Notez que cela est prévu pour " -"être 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)`` (la magnitude du décalage doit être inférieure à " -"un jour). La plupart des implémentations de :meth:`utcoffset` ressembleront " -"probablement à l'une des deux suivantes ::" +"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 "" @@ -2824,8 +2818,6 @@ msgid "" "should be set, and :meth:`tzinfo.fromutc` calls :meth:`dst` to account for " "DST changes when crossing time zones." msgstr "" -"Renvoie l'ajustement d'heure d'été (DST, *daylight saving time*), comme un " -"objet :class:`timedelta` ou ``None`` si l'information n'est pas connue. " "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 " @@ -2907,7 +2899,7 @@ msgid "" "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 " +"*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 " @@ -2954,7 +2946,7 @@ 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 " +"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." @@ -2971,10 +2963,10 @@ 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." +"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 "" @@ -2994,11 +2986,11 @@ msgid "" "equivalent datetime in *self*'s local time." msgstr "" "Elle est appelée par l'implémentation par défaut de :class:`datetime." -"astimezone()`. Quand appelée depuis cette méthode, ``dt.tzinfo`` est " -"*self*, et les données de date et d'heure de *dt* sont vues comme exprimant " -"un temps 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." +"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 @@ -3015,11 +3007,11 @@ msgid "" "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 " +"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 " +"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 " @@ -3054,7 +3046,7 @@ msgid "" 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 " +"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 ::" @@ -3069,10 +3061,10 @@ msgid "" "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 délivrera pas de résultat avec ``hour " -"== 2`` pour le jour où débute l'heure d'été. Par exemple, lors de la " -"transition du printemps 2016, nous obtenons ::" +"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 @@ -3091,16 +3083,17 @@ msgid "" 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 " +"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 " -"standard) à 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 " -"temps UTC de la forme 5:MM et 6:MM sont tous deux associés à 1:MM quand " -"convertis vers ce fuseau, mais les heures les plus anciennes ont l'attribut :" -"attr:`~datetime.fold` à 0 et les plus récentes l'ont à 1. Par exemple, lors " -"de la transition de l'automne 2016, nous obtenons ::" +"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 @@ -3131,7 +3124,7 @@ msgstr "" #: library/datetime.rst:2186 msgid ":mod:`zoneinfo`" -msgstr "" +msgstr ":mod:`zoneinfo`" #: library/datetime.rst:2181 #, fuzzy @@ -3140,9 +3133,9 @@ msgid "" "arbitrary fixed offsets from UTC) and its :attr:`timezone.utc` attribute (a " "UTC timezone instance)." msgstr "" -"La bibliothèque standard contient la classe :class:`timezone` pour gérer des " -"décalages fixes par rapport à UTC et :attr:`timezone.utc` comme instance du " -"fuseau horaire UTC." +"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 @@ -3195,12 +3188,10 @@ msgid "" "the locations where different offsets are used in different days of the year " "or where historical changes have been made to civil time." msgstr "" -"La classe :class:`timezone` est une sous-classe de :class:`tzinfo`, où " -"chaque instance représente un fuseau horaire défini par un décalage fixe par " -"rapport à UTC. Notez que les que 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 ou où " -"des changements historiques ont été opérés sur le temps civil." +"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 @@ -3211,7 +3202,7 @@ msgid "" "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 " +"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." @@ -3221,8 +3212,8 @@ 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. Si spécifié, il doit être une chaîne de " -"caractères qui sera utilisée comme valeur de retour de la méthode :meth:" +"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 @@ -3239,10 +3230,8 @@ 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 "" -"Renvoie la valeur fixe spécifiée à la création de l'instance de :class:" -"`timezone`. L'argument *dt* est ignoré. La valeur de retour est une " -"instance :class:`timedelta` égale à la différence entre le temps local et " -"UTC." +"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 @@ -3253,18 +3242,18 @@ msgid "" "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 "" -"Renvoie la valeur fixe spécifiée à la création de l'instance de :class:" -"`timezone`. Si *name* n'est pas fourni au constructeur, le nom renvoyé par " +"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``, " +"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'``." +"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\"." @@ -3299,9 +3288,7 @@ 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. 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`." +"formatage explicite." #: library/datetime.rst:2281 msgid "" @@ -3669,8 +3656,9 @@ 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 " +"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 "" @@ -3691,14 +3679,15 @@ 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 decimal " -"number. All days in a new year preceding the first Monday are considered to " -"be in week 0." +"Week number of the year (Monday as the first day of the week) as a zero-" +"padded decimal number. All days in a new year preceding the first Monday are " +"considered to be in week 0." msgstr "" -"Numéro de la semaine à deux chiffres (où lundi est considéré comme le " +"Numéro de la semaine à deux chiffres (où dimanche est considéré comme le " "premier jour de la semaine). Tous les jours de l'année précédent le premier " -"lundi sont considérés comme appartenant à la semaine 0." +"dimanche sont considérés comme appartenant à la semaine 0." #: library/datetime.rst:2392 msgid "``%c``" @@ -3830,13 +3819,11 @@ msgid "" "meth:`strptime` with incomplete or ambiguous ISO 8601 directives will raise " "a :exc:`ValueError`." msgstr "" -"Plusieurs directives additionnelles non requises par le standard *C89* sont " -"incluses par commodité. Ces paramètres correspondent tous aux valeurs de " -"dates ISO 8601. Ils peuvent ne pas être disponibles sur toutes les " -"plateformes quand utilisés 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`." +"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 @@ -3850,9 +3837,9 @@ msgid "" 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)`." +"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." @@ -3869,12 +3856,9 @@ msgid "" "``time.strftime(fmt, d.timetuple())`` although not all objects support a :" "meth:`timetuple` method." 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. 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`." +"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 "" @@ -3910,9 +3894,9 @@ msgid "" "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 de temps ne " -"possèdent pas de telles valeurs. S'ils sont tout de même utilisés, ``1900`` " -"est substitué à l'année, et ``1`` au mois et au jour." +"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 @@ -3923,8 +3907,8 @@ msgid "" 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 " -"tous de même utilisés, ils sont substitués par ``0``." +"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 "" @@ -4009,11 +3993,11 @@ msgid "" "the set of format characters in the C standard (but implemented separately " "in datetime objects, and therefore always available)." msgstr "" -"Quand 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 jusqu'à " -"former un nombre de 6 chiffres. ``%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)." +"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 "" @@ -4047,9 +4031,11 @@ msgstr "" "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. Par exemple, si :meth:`utcoffset` renvoie " -"``timedelta(hours=-3, minutes=-30)``, ``%z`` est remplacé par la chaîne " -"`'-0330'``." +"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 "" @@ -4070,9 +4056,9 @@ msgid "" "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. Autrement ``%Z`` est remplacé par la valeur renvoyée, qui doit être " -"une chaîne." +"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``:" @@ -4104,7 +4090,7 @@ msgid "" "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 " +"objet :class:`.datetime` avisé est construit. L'attribut ``tzinfo`` du " "résultat aura pour valeur une instance de :class:`timezone`." #: library/datetime.rst:2561 @@ -4126,19 +4112,20 @@ msgid "" msgstr "" "De façon similaire à ``%U`` et ``%W``, ``%v`` n'est utilisé dans les calculs " "que lorsque le jour de la semaine et l'année ISO (``%G``) sont spécifiés " -"dans la chaîne de formatage :meth:`strptime`. Notez aussi que ``%G`` et ``" -"%Y`` ne sont pas interchangeables." +"dans la chaîne de formatage :meth:`strptime`. Notez aussi que ``%G`` et " +"``%Y`` ne sont pas interchangeables." #: library/datetime.rst: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``, " +"for formats ``%d``, ``%m``, ``%H``, ``%I``, ``%M``, ``%S``, ``%j``, ``%U``, " "``%W``, and ``%V``. Format ``%y`` does require a leading zero." msgstr "" "Quand cette directive est utilisée avec la méthode :meth:`strptime`, le zéro " -"d'entête est optionnel pour les formats ``%d``, ``%m``, ``%H``, ``%I``, ``" -"%M``, ``%S``, ``%J``, ``%U``, ``%W`` et ``%V``. Le format ``%y`` requiert un " -"zéro en entête." +"d'entête est optionnel pour les formats ``%d``, ``%m``, ``%H``, ``%I``, " +"``%M``, ``%S``, ``%J``, ``%U``, ``%W`` et ``%V``. Le format ``%y`` requiert " +"un zéro en entête." #: library/datetime.rst:2577 msgid "Footnotes" @@ -4157,20 +4144,17 @@ msgid "" "converting between proleptic Gregorian ordinals and many other calendar " "systems." msgstr "" -"Un objet :class:`date` représente une date (année, mois et jour) dans un " -"calendrier idéal, l'actuel calendrier grégorien étendu indéfiniment dans les " -"deux directions. Le 1er janvier de l'an 1 est appelé le jour numéro 1, le 2 " -"janvier de l'an 1 est appelé le jour numéro 2, et ainsi de suite. 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 " +"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." +"`_ for a good explanation." msgstr "" "Voir R. H. van Gent `guide des mathématiques du calendrier ISO 8601 `_ pour une bonne " @@ -4184,6 +4168,15 @@ 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 `_" diff --git a/library/dbm.po b/library/dbm.po index eaacdea199..fe713f37bf 100644 --- a/library/dbm.po +++ b/library/dbm.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-01 16:00+0200\n" +"POT-Creation-Date: 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" @@ -162,7 +162,7 @@ msgstr "" #: library/dbm.rst:121 msgid "Module :mod:`shelve`" -msgstr "" +msgstr "Module :mod:`shelve`" #: library/dbm.rst:122 msgid "Persistence module which stores non-string data." diff --git a/library/decimal.po b/library/decimal.po index e1e5f453ca..b668163885 100644 --- a/library/decimal.po +++ b/library/decimal.po @@ -5,15 +5,15 @@ 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-07 18:55+0200\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 1.8.11\n" +"X-Generator: Poedit 2.4.1\n" #: library/decimal.rst:2 msgid ":mod:`decimal` --- Decimal fixed point and floating point arithmetic" @@ -24,8 +24,9 @@ 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 " +"The :mod:`decimal` module provides support for fast correctly rounded " "decimal floating point arithmetic. It offers several advantages over the :" "class:`float` datatype:" msgstr "" @@ -48,11 +49,12 @@ msgstr "" "l'arithmétique décimale." #: library/decimal.rst:42 +#, fuzzy msgid "" -"Decimal numbers can be represented exactly. In contrast, numbers like :" -"const:`1.1` and :const:`2.2` do not have exact representations in binary " -"floating point. End users typically would not expect ``1.1 + 2.2`` to " -"display as :const:`3.3000000000000003` as it does with binary floating point." +"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` " @@ -62,11 +64,12 @@ msgstr "" "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 :const:`5.5511151231257827e-017`. While near to zero, " -"the differences prevent reliable equality testing and differences can " +"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 "" @@ -79,13 +82,14 @@ msgstr "" "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 :const:`2.50`. The trailing zero is kept to indicate " +"``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 :const:`1.56` while ``1.30 " -"* 1.20`` gives :const:`1.5600`." +"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é " @@ -144,12 +148,13 @@ msgstr "" "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 :const:" -"`Infinity`, :const:`-Infinity`, and :const:`NaN`. The standard also " -"differentiates :const:`-0` from :const:`+0`." +"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 " @@ -206,9 +211,10 @@ msgstr "" "surveiller." #: library/decimal.rst:116 +#, fuzzy msgid "" "IBM's General Decimal Arithmetic Specification, `The General Decimal " -"Arithmetic Specification `_." +"Arithmetic Specification `_." msgstr "" "La spécification d'IBM sur l'arithmétique décimale : `The General Decimal " "Arithmetic Specification `_." @@ -228,12 +234,13 @@ msgstr "" "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 :const:`NaN` which stands for \"Not a number\", positive and " -"negative :const:`Infinity`, and :const:`-0`::" +"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 " @@ -285,10 +292,11 @@ msgstr "" "instances de ``Decimal`` :" #: library/decimal.rst:253 +#, fuzzy msgid "" -"The :meth:`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:" +"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 " @@ -327,11 +335,12 @@ msgstr "" "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:`clear_flags` method. ::" +"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 " @@ -340,10 +349,11 @@ msgstr "" "meth:`clear_flags`. ::" #: library/decimal.rst:312 +#, fuzzy msgid "" -"The *flags* entry shows that the rational approximation to :const:`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)." +"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 " @@ -351,9 +361,10 @@ msgstr "" "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:`traps` field of " -"a context:" +"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 :" @@ -408,11 +419,12 @@ msgstr "" "pleine largeur ``'\\uff10'`` jusqu'à ``'\\uff19'``." #: library/decimal.rst:371 +#, fuzzy msgid "" -"If *value* is a :class:`tuple`, it should have three components, a sign (:" -"const:`0` for positive or :const:`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')``." +"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, " @@ -446,11 +458,12 @@ msgstr "" "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 :const:`NaN`." +"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:" @@ -459,7 +472,7 @@ msgstr "" #: library/decimal.rst:392 msgid "Once constructed, :class:`Decimal` objects are immutable." -msgstr "Une fois construit, les objets :class:`Decimal` sont immuables." +msgstr "Une fois construit, les objets :class:`Decimal` sont immuables." #: library/decimal.rst:394 msgid "" @@ -543,7 +556,7 @@ msgid "" 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:" +"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 " @@ -631,7 +644,7 @@ msgid "" "details of the total order." msgstr "" -#: library/decimal.rst:531 library/decimal.rst:834 +#: 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 " @@ -678,104 +691,127 @@ msgid "" msgstr "" #: library/decimal.rst:576 -msgid "Classmethod that converts a float to a decimal number, exactly." +msgid "" +"Alternative constructor that only accepts instances of :class:`float` or :" +"class:`int`." msgstr "" -#: library/decimal.rst:578 +#: 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`." +"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:584 +#: 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:602 +#: 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:610 +#: 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:616 +#: 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:621 +#: 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:626 +#: 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:631 +#: 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:636 +#: 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:641 +#: 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:646 +#: 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:651 +#: library/decimal.rst:652 msgid "" "Return :const:`True` if the argument is subnormal, and :const:`False` " "otherwise." msgstr "" -#: library/decimal.rst:656 +#: 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:661 +#: 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:666 +#: 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:671 +#: 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('-" @@ -783,74 +819,74 @@ msgid "" "the operand is an infinity then ``Decimal('Infinity')`` is returned." msgstr "" -#: library/decimal.rst:679 +#: 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:685 +#: 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:690 +#: 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:696 +#: 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:702 +#: library/decimal.rst:703 msgid "" "Like ``max(self, other)`` except that the context rounding rule is applied " -"before returning and that :const:`NaN` values are either signaled or ignored " +"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:709 +#: 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:714 +#: library/decimal.rst:715 msgid "" "Like ``min(self, other)`` except that the context rounding rule is applied " -"before returning and that :const:`NaN` values are either signaled or ignored " +"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:721 +#: 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:726 +#: 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:732 +#: 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:738 +#: 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 " @@ -858,73 +894,81 @@ msgid "" "be the same as the sign of the second operand." msgstr "" -#: library/decimal.rst:745 +#: library/decimal.rst:746 msgid "" "Normalize the number by stripping the rightmost trailing zeros and " -"converting any result equal to :const:`Decimal('0')` to :const:" -"`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')``." +"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:754 +#: 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 "" -#: library/decimal.rst:757 +# Élément d'une liste, d'où le ; final +#: library/decimal.rst:758 msgid "``\"-Infinity\"``, indicating that the operand is negative infinity." -msgstr "" +msgstr "``\"-Infinity\"``, indiquant que l'opérande est l'infini négatif ;" -#: library/decimal.rst:758 +#: library/decimal.rst:759 msgid "" "``\"-Normal\"``, indicating that the operand is a negative normal number." msgstr "" -#: library/decimal.rst:759 +#: library/decimal.rst:760 msgid "" "``\"-Subnormal\"``, indicating that the operand is negative and subnormal." msgstr "" -#: library/decimal.rst:760 +# Élément d'une liste, d'où le ; final +#: library/decimal.rst:761 msgid "``\"-Zero\"``, indicating that the operand is a negative zero." -msgstr "" +msgstr "``\"-Zero\"``, indiquant que l'opérande est un zéro négatif ;" -#: library/decimal.rst:761 +# Élément d'une liste, d'où le ; final +#: library/decimal.rst:762 msgid "``\"+Zero\"``, indicating that the operand is a positive zero." -msgstr "" +msgstr "``\"+Zero\"``, indiquant que l'opérande est un zéro positif ;" -#: library/decimal.rst:762 +#: library/decimal.rst:763 msgid "" "``\"+Subnormal\"``, indicating that the operand is positive and subnormal." msgstr "" -#: library/decimal.rst:763 +#: library/decimal.rst:764 msgid "" "``\"+Normal\"``, indicating that the operand is a positive normal number." msgstr "" -#: library/decimal.rst:764 +# Élément d'une liste, d'où le ; final +#: library/decimal.rst:765 msgid "``\"+Infinity\"``, indicating that the operand is positive infinity." -msgstr "" +msgstr "``\"+Infinity\"``, indiquant que l'opérande est l'infini positif ;" -#: library/decimal.rst:765 +# É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:766 +#: 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:770 +#: 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:776 +#: 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` " @@ -932,13 +976,13 @@ msgid "" "quantized exponent is always equal to that of the right-hand operand." msgstr "" -#: library/decimal.rst:782 +#: 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:785 +#: 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 " @@ -947,19 +991,19 @@ msgid "" "context is used." msgstr "" -#: library/decimal.rst:791 +#: library/decimal.rst:792 msgid "" "An error is returned whenever the resulting exponent is greater than :attr:" -"`Emax` or less than :attr:`Etiny`." +"`~Context.Emax` or less than :meth:`~Context.Etiny`." msgstr "" -#: library/decimal.rst:796 +#: 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:802 +#: 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 " @@ -968,11 +1012,11 @@ msgid "" "other``, and if two integers are equally near then the even one is chosen." msgstr "" -#: library/decimal.rst:809 +#: library/decimal.rst:810 msgid "If the result is zero then its sign will be the sign of *self*." msgstr "" -#: library/decimal.rst:820 +#: 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 " @@ -984,20 +1028,20 @@ msgid "" "are unchanged." msgstr "" -#: library/decimal.rst:831 +#: library/decimal.rst:832 msgid "" -"Test whether self and other have the same exponent or whether both are :" -"const:`NaN`." +"Test whether self and other have the same exponent or whether both are " +"``NaN``." msgstr "" -#: library/decimal.rst:840 +#: 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:846 +#: 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 " @@ -1008,34 +1052,34 @@ msgid "" "exponent of the first operand are unchanged." msgstr "" -#: library/decimal.rst:856 +#: library/decimal.rst:857 msgid "Return the square root of the argument to full precision." msgstr "" -#: library/decimal.rst:1440 +#: library/decimal.rst:1441 msgid "" "Convert to a string, using engineering notation if an exponent is needed." msgstr "" -#: library/decimal.rst:1442 +#: 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:867 +#: library/decimal.rst:868 msgid "" "For example, this converts ``Decimal('123E+1')`` to ``Decimal('1.23E+3')``." msgstr "" -#: library/decimal.rst:871 +#: 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:876 +#: 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 " @@ -1043,57 +1087,58 @@ msgid "" "parameter is given then the rounding mode of the current context is used." msgstr "" -#: library/decimal.rst:884 +#: 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:892 +#: library/decimal.rst:893 msgid "Logical operands" msgstr "" -#: library/decimal.rst:894 +#: library/decimal.rst:895 msgid "" -"The :meth:`logical_and`, :meth:`logical_invert`, :meth:`logical_or`, and :" -"meth:`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 :const:`0` or :const:`1`." +"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:906 +#: library/decimal.rst:907 msgid "Context objects" msgstr "" -#: library/decimal.rst:908 +#: 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:912 +#: 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:918 +#: library/decimal.rst:919 msgid "Return the current context for the active thread." msgstr "" -#: library/decimal.rst:923 +#: library/decimal.rst:924 msgid "Set the current context for the active thread to *c*." msgstr "" -#: library/decimal.rst:925 +#: 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:930 +#: 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 " @@ -1101,20 +1146,20 @@ msgid "" "specified, a copy of the current context is used." msgstr "" -#: library/decimal.rst:935 +#: 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:945 +#: 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:951 +#: 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:" @@ -1123,12 +1168,12 @@ msgid "" "`Subnormal`." msgstr "" -#: library/decimal.rst:957 +#: library/decimal.rst:958 msgid "" "Because many of the traps are enabled, this context is useful for debugging." msgstr "" -#: library/decimal.rst:962 +#: 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:" @@ -1136,15 +1181,15 @@ msgid "" "exceptions are not raised during computations)." msgstr "" -#: library/decimal.rst:967 +#: library/decimal.rst:968 msgid "" "Because the traps are disabled, this context is useful for applications that " -"prefer to have result value of :const:`NaN` or :const:`Infinity` instead of " -"raising exceptions. This allows an application to complete a run in the " -"presence of conditions that would otherwise halt the program." +"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:975 +#: 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 " @@ -1152,7 +1197,7 @@ msgid "" "constructor." msgstr "" -#: library/decimal.rst:979 +#: 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 " @@ -1160,121 +1205,121 @@ msgid "" "as it would require thread synchronization to prevent race conditions." msgstr "" -#: library/decimal.rst:984 +#: 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:987 +#: library/decimal.rst:988 msgid "" -"The default values are :attr:`prec`\\ =\\ :const:`28`, :attr:`rounding`\\ =" -"\\ :const:`ROUND_HALF_EVEN`, and enabled traps for :class:`Overflow`, :class:" -"`InvalidOperation`, and :class:`DivisionByZero`." +"The default values are :attr:`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:992 +#: 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:998 +#: 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:1002 +#: library/decimal.rst:1003 msgid "" -"*prec* is an integer in the range [:const:`1`, :const:`MAX_PREC`] that sets " -"the precision for arithmetic operations in the context." +"*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:1005 +#: library/decimal.rst:1006 msgid "" "The *rounding* option is one of the constants listed in the section " "`Rounding Modes`_." msgstr "" -#: library/decimal.rst:1008 +#: 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:1011 +#: 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`, :" -"const:`0`], *Emax* in the range [:const:`0`, :const:`MAX_EMAX`]." +"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:1015 +#: library/decimal.rst:1016 msgid "" -"The *capitals* field is either :const:`0` or :const:`1` (the default). If " -"set to :const:`1`, exponents are printed with a capital :const:`E`; " -"otherwise, a lowercase :const:`e` is used: :const:`Decimal('6.02e+23')`." +"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:1019 +#: library/decimal.rst:1020 msgid "" -"The *clamp* field is either :const:`0` (the default) or :const:`1`. If set " -"to :const:`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 :const:`0` then a weaker " -"condition holds: the adjusted exponent of the :class:`Decimal` instance is " -"at most ``Emax``. When *clamp* is :const:`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::" +"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:1034 +#: library/decimal.rst:1035 msgid "" -"A *clamp* value of :const:`1` allows compatibility with the fixed-width " -"decimal interchange formats specified in IEEE 754." +"A *clamp* value of ``1`` allows compatibility with the fixed-width decimal " +"interchange formats specified in IEEE 754." msgstr "" -#: library/decimal.rst:1037 +#: 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:`adjusted` and :meth:`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." +"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:1050 -msgid "Resets all of the flags to :const:`0`." +#: library/decimal.rst:1051 +msgid "Resets all of the flags to ``0``." msgstr "" -#: library/decimal.rst:1054 -msgid "Resets all of the traps to :const:`0`." +#: library/decimal.rst:1055 +msgid "Resets all of the traps to ``0``." msgstr "" -#: library/decimal.rst:1060 +#: library/decimal.rst:1061 msgid "Return a duplicate of the context." msgstr "" -#: library/decimal.rst:1064 +#: library/decimal.rst:1065 msgid "Return a copy of the Decimal instance num." msgstr "" -#: library/decimal.rst:1068 +#: 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:1072 +#: 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 " @@ -1283,14 +1328,14 @@ msgid "" "sum can change the result:" msgstr "" -#: library/decimal.rst:1086 +#: 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:1092 +#: 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 " @@ -1298,18 +1343,18 @@ msgid "" "conversion." msgstr "" -#: library/decimal.rst:1112 +#: 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:1118 +#: library/decimal.rst:1119 msgid "Returns a value equal to ``Emax - prec + 1``." msgstr "" -#: library/decimal.rst:1120 +#: 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 " @@ -1319,233 +1364,237 @@ msgid "" "recounted here." msgstr "" -#: library/decimal.rst:1130 +#: library/decimal.rst:1131 msgid "Returns the absolute value of *x*." msgstr "Renvoie la valeur absolue de *x*." -#: library/decimal.rst:1135 +#: library/decimal.rst:1136 msgid "Return the sum of *x* and *y*." -msgstr "" +msgstr "Renvoie la somme de *x* et *y*." -#: library/decimal.rst:1140 +#: library/decimal.rst:1141 msgid "Returns the same Decimal object *x*." msgstr "" -#: library/decimal.rst:1145 +#: library/decimal.rst:1146 msgid "Compares *x* and *y* numerically." msgstr "" -#: library/decimal.rst:1150 +#: library/decimal.rst:1151 msgid "Compares the values of the two operands numerically." msgstr "" -#: library/decimal.rst:1155 +#: library/decimal.rst:1156 msgid "Compares two operands using their abstract representation." msgstr "" -#: library/decimal.rst:1160 +#: library/decimal.rst:1161 msgid "" "Compares two operands using their abstract representation, ignoring sign." msgstr "" -#: library/decimal.rst:1165 +#: library/decimal.rst:1166 msgid "Returns a copy of *x* with the sign set to 0." msgstr "" -#: library/decimal.rst:1170 +#: library/decimal.rst:1171 msgid "Returns a copy of *x* with the sign inverted." -msgstr "" +msgstr "Renvoie une copie de *x* mais de signe opposé." -#: library/decimal.rst:1175 +#: library/decimal.rst:1176 msgid "Copies the sign from *y* to *x*." -msgstr "" +msgstr "Copie le signe de *y* vers *x*." -#: library/decimal.rst:1180 +#: library/decimal.rst:1181 msgid "Return *x* divided by *y*." -msgstr "" +msgstr "Renvoie *x* divisé par *y*." -#: library/decimal.rst:1185 +#: library/decimal.rst:1186 msgid "Return *x* divided by *y*, truncated to an integer." -msgstr "" +msgstr "Renvoie *x* divisé par *y*, tronqué comme entier." -#: library/decimal.rst:1190 +#: library/decimal.rst:1191 msgid "Divides two numbers and returns the integer part of the result." -msgstr "" +msgstr "Renvoie la partie entière de la division entre deux nombres." -#: library/decimal.rst:1195 -msgid "Returns `e ** x`." -msgstr "" +#: library/decimal.rst:1196 +msgid "Returns ``e ** x``." +msgstr "Renvoie ``e ** x``." -#: library/decimal.rst:1200 +#: library/decimal.rst:1201 msgid "Returns *x* multiplied by *y*, plus *z*." -msgstr "" +msgstr "Renvoie *x* multiplié par *y*, plus *z*." -#: library/decimal.rst:1205 +#: library/decimal.rst:1206 msgid "Returns ``True`` if *x* is canonical; otherwise returns ``False``." msgstr "" -#: library/decimal.rst:1210 +#: library/decimal.rst:1211 msgid "Returns ``True`` if *x* is finite; otherwise returns ``False``." msgstr "" -#: library/decimal.rst:1215 +#: library/decimal.rst:1216 msgid "Returns ``True`` if *x* is infinite; otherwise returns ``False``." -msgstr "" +msgstr "Renvoie ``True`` si *x* est infini et ``False`` sinon." -#: library/decimal.rst:1220 +#: 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:1225 +#: library/decimal.rst:1226 msgid "" "Returns ``True`` if *x* is a normal number; otherwise returns ``False``." msgstr "" -#: library/decimal.rst:1230 +#: library/decimal.rst:1231 msgid "Returns ``True`` if *x* is a quiet NaN; otherwise returns ``False``." -msgstr "" +msgstr "Renvoie ``True`` si *x* est un NaN silencieux et ``False`` sinon." -#: library/decimal.rst:1235 +#: library/decimal.rst:1236 msgid "Returns ``True`` if *x* is negative; otherwise returns ``False``." -msgstr "" +msgstr "Renvoie ``True`` si *x* est négatif et ``False`` sinon." -#: library/decimal.rst:1240 +#: library/decimal.rst:1241 msgid "" "Returns ``True`` if *x* is a signaling NaN; otherwise returns ``False``." -msgstr "" +msgstr "Renvoie ``True`` si *x* est un NaN signalétique et ``False`` sinon." -#: library/decimal.rst:1245 +#: library/decimal.rst:1246 msgid "Returns ``True`` if *x* is subnormal; otherwise returns ``False``." msgstr "" -#: library/decimal.rst:1250 +#: library/decimal.rst:1251 msgid "Returns ``True`` if *x* is a zero; otherwise returns ``False``." -msgstr "" +msgstr "Renvoie ``True`` si *x* est un zéro et ``False`` sinon." -#: library/decimal.rst:1255 +#: library/decimal.rst:1256 msgid "Returns the natural (base e) logarithm of *x*." -msgstr "" +msgstr "Renvoie le logarithme naturel (en base e) de *x*." -#: library/decimal.rst:1260 +#: library/decimal.rst:1261 msgid "Returns the base 10 logarithm of *x*." -msgstr "" +msgstr "Renvoie le logarithme en base 10 de *x*." -#: library/decimal.rst:1265 +#: library/decimal.rst:1266 msgid "Returns the exponent of the magnitude of the operand's MSD." msgstr "" -#: library/decimal.rst:1270 +#: library/decimal.rst:1271 msgid "Applies the logical operation *and* between each operand's digits." msgstr "" -#: library/decimal.rst:1275 +#: library/decimal.rst:1276 msgid "Invert all the digits in *x*." msgstr "" -#: library/decimal.rst:1280 +#: library/decimal.rst:1281 msgid "Applies the logical operation *or* between each operand's digits." msgstr "" -#: library/decimal.rst:1285 +#: library/decimal.rst:1286 msgid "Applies the logical operation *xor* between each operand's digits." msgstr "" -#: library/decimal.rst:1290 +#: library/decimal.rst:1291 msgid "Compares two values numerically and returns the maximum." -msgstr "" +msgstr "Renvoie le maximum entre les deux valeurs numériques." -#: library/decimal.rst:1305 +#: library/decimal.rst:1306 msgid "Compares the values numerically with their sign ignored." msgstr "" -#: library/decimal.rst:1300 +#: library/decimal.rst:1301 msgid "Compares two values numerically and returns the minimum." msgstr "" -#: library/decimal.rst:1310 +#: library/decimal.rst:1311 msgid "Minus corresponds to the unary prefix minus operator in Python." msgstr "" -#: library/decimal.rst:1315 +#: library/decimal.rst:1316 msgid "Return the product of *x* and *y*." -msgstr "" +msgstr "Renvoie la multiplication de *x* avec *y*." -#: library/decimal.rst:1320 +#: library/decimal.rst:1321 msgid "Returns the largest representable number smaller than *x*." msgstr "" -#: library/decimal.rst:1325 +#: library/decimal.rst:1326 msgid "Returns the smallest representable number larger than *x*." msgstr "" -#: library/decimal.rst:1330 +#: library/decimal.rst:1331 msgid "Returns the number closest to *x*, in direction towards *y*." msgstr "" -#: library/decimal.rst:1335 +#: library/decimal.rst:1336 msgid "Reduces *x* to its simplest form." -msgstr "" +msgstr "Réduit *x* à sa forme la plus simple." -#: library/decimal.rst:1340 +#: library/decimal.rst:1341 msgid "Returns an indication of the class of *x*." msgstr "" -#: library/decimal.rst:1345 +#: 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:1352 +#: library/decimal.rst:1353 msgid "Return ``x`` to the power of ``y``, reduced modulo ``modulo`` if given." msgstr "" -#: library/decimal.rst:1354 +#: 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 " +"rounding mode of the context is used. Results are always correctly rounded " "in the Python version." msgstr "" -#: library/decimal.rst:1360 +#: 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:1363 +#: library/decimal.rst:1364 msgid "" -"The C module computes :meth:`power` in terms of the correctly-rounded :meth:" +"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\"." +"always correctly rounded\"." msgstr "" -#: library/decimal.rst:1368 +#: 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:1371 +#: library/decimal.rst:1372 msgid "all three arguments must be integral" msgstr "" -#: library/decimal.rst:1372 +# Élément d'une liste, d'où le ; final +#: library/decimal.rst:1373 msgid "``y`` must be nonnegative" -msgstr "" +msgstr "``y`` ne doit pas être négatif ;" -#: library/decimal.rst:1373 +# É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 "" +msgstr "au moins l'un de ``x`` ou ``y`` doit être différent de zéro ;" -#: library/decimal.rst:1374 +#: library/decimal.rst:1375 msgid "``modulo`` must be nonzero and have at most 'precision' digits" msgstr "" -#: library/decimal.rst:1376 +#: 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 " @@ -1554,110 +1603,121 @@ msgid "" "result is always exact." msgstr "" -#: library/decimal.rst:1386 +#: library/decimal.rst:1387 msgid "Returns a value equal to *x* (rounded), having the exponent of *y*." msgstr "" -#: library/decimal.rst:1391 +#: library/decimal.rst:1392 msgid "Just returns 10, as this is Decimal, :)" -msgstr "" +msgstr "Renvoie 10 car c'est Decimal, :)" -#: library/decimal.rst:1396 +#: library/decimal.rst:1397 msgid "Returns the remainder from integer division." -msgstr "" +msgstr "Donne le reste de la division entière." -#: library/decimal.rst:1398 +#: 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:1404 +#: 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:1410 +#: library/decimal.rst:1411 msgid "Returns a rotated copy of *x*, *y* times." msgstr "" -#: library/decimal.rst:1415 +#: library/decimal.rst:1416 msgid "Returns ``True`` if the two operands have the same exponent." -msgstr "" +msgstr "Renvoie ``True`` si les deux opérandes ont le même exposant." -#: library/decimal.rst:1420 +#: library/decimal.rst:1421 msgid "Returns the first operand after adding the second value its exp." msgstr "" -#: library/decimal.rst:1425 +#: library/decimal.rst:1426 msgid "Returns a shifted copy of *x*, *y* times." msgstr "" -#: library/decimal.rst:1430 +#: library/decimal.rst:1431 msgid "Square root of a non-negative number to context precision." msgstr "" -#: library/decimal.rst:1435 +#: library/decimal.rst:1436 msgid "Return the difference between *x* and *y*." msgstr "" -#: library/decimal.rst:1449 +#: library/decimal.rst:1450 msgid "Rounds to an integer." msgstr "" -#: library/decimal.rst:1454 +#: library/decimal.rst:1455 msgid "Converts a number to a string using scientific notation." msgstr "" -#: library/decimal.rst:1461 +#: library/decimal.rst:1462 msgid "Constants" msgstr "Constantes" -#: library/decimal.rst:1463 +#: 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:1467 +#: library/decimal.rst:1468 msgid "32-bit" msgstr "32-bit" -#: library/decimal.rst:1467 +#: library/decimal.rst:1468 msgid "64-bit" msgstr "64-bit" -#: library/decimal.rst:1471 -msgid ":const:`425000000`" +#: library/decimal.rst:1472 +#, fuzzy +msgid "``425000000``" msgstr ":const:`425000000`" -#: library/decimal.rst:1471 -msgid ":const:`999999999999999999`" +#: library/decimal.rst:1472 +#, fuzzy +msgid "``999999999999999999``" msgstr ":const:`999999999999999999`" -#: library/decimal.rst:1473 -msgid ":const:`-425000000`" +#: library/decimal.rst:1474 +#, fuzzy +msgid "``-425000000``" msgstr ":const:`-425000000`" -#: library/decimal.rst:1473 -msgid ":const:`-999999999999999999`" +#: library/decimal.rst:1474 +#, fuzzy +msgid "``-999999999999999999``" msgstr ":const:`-999999999999999999`" -#: library/decimal.rst:1475 -msgid ":const:`-849999999`" +#: library/decimal.rst:1476 +#, fuzzy +msgid "``-849999999``" msgstr ":const:`-849999999`" -#: library/decimal.rst:1475 -msgid ":const:`-1999999999999999997`" +#: library/decimal.rst:1476 +#, fuzzy +msgid "``-1999999999999999997``" msgstr ":const:`-1999999999999999997`" -#: library/decimal.rst:1481 +#: 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:1487 +#: 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 " @@ -1666,59 +1726,59 @@ msgid "" "scenarios." msgstr "" -#: library/decimal.rst:1492 +#: library/decimal.rst:1493 msgid "backported to 3.7 and 3.8." msgstr "" -#: library/decimal.rst:1496 +#: library/decimal.rst:1497 msgid "Rounding modes" -msgstr "" +msgstr "Modes d'arrondi" -#: library/decimal.rst:1500 -msgid "Round towards :const:`Infinity`." +#: library/decimal.rst:1501 +msgid "Round towards ``Infinity``." msgstr "" -#: library/decimal.rst:1504 +#: library/decimal.rst:1505 msgid "Round towards zero." msgstr "" -#: library/decimal.rst:1508 -msgid "Round towards :const:`-Infinity`." +#: library/decimal.rst:1509 +msgid "Round towards ``-Infinity``." msgstr "" -#: library/decimal.rst:1512 +#: library/decimal.rst:1513 msgid "Round to nearest with ties going towards zero." msgstr "" -#: library/decimal.rst:1516 +#: library/decimal.rst:1517 msgid "Round to nearest with ties going to nearest even integer." msgstr "" -#: library/decimal.rst:1520 +#: library/decimal.rst:1521 msgid "Round to nearest with ties going away from zero." msgstr "" -#: library/decimal.rst:1524 +#: library/decimal.rst:1525 msgid "Round away from zero." msgstr "" -#: library/decimal.rst:1528 +#: 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:1535 +#: library/decimal.rst:1536 msgid "Signals" -msgstr "" +msgstr "Signaux" -#: library/decimal.rst:1537 +#: 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:1540 +#: 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, " @@ -1726,7 +1786,7 @@ msgid "" "sure to clear all flags before starting the next computation." msgstr "" -#: library/decimal.rst:1545 +#: 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:" @@ -1734,104 +1794,102 @@ msgid "" "raised upon encountering the condition." msgstr "" -#: library/decimal.rst:1553 +#: library/decimal.rst:1554 msgid "Altered an exponent to fit representation constraints." msgstr "" -#: library/decimal.rst:1555 +#: library/decimal.rst:1556 msgid "" "Typically, clamping occurs when an exponent falls outside the context's :" -"attr:`Emin` and :attr:`Emax` limits. If possible, the exponent is reduced " -"to fit by adding zeros to the coefficient." +"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:1562 +#: library/decimal.rst:1563 msgid "Base class for other signals and a subclass of :exc:`ArithmeticError`." msgstr "" -#: library/decimal.rst:1567 +#: library/decimal.rst:1568 msgid "Signals the division of a non-infinite number by zero." msgstr "" -#: library/decimal.rst:1569 +#: 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 :const:`Infinity` " -"or :const:`-Infinity` with the sign determined by the inputs to the " -"calculation." +"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:1576 +#: library/decimal.rst:1577 msgid "Indicates that rounding occurred and the result is not exact." msgstr "" -#: library/decimal.rst:1578 +#: 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:1585 +#: library/decimal.rst:1586 msgid "An invalid operation was performed." msgstr "" -#: library/decimal.rst:1587 +#: library/decimal.rst:1588 msgid "" "Indicates that an operation was requested that does not make sense. If not " -"trapped, returns :const:`NaN`. Possible causes include::" +"trapped, returns ``NaN``. Possible causes include::" msgstr "" -#: library/decimal.rst:1603 +#: library/decimal.rst:1604 msgid "Numerical overflow." -msgstr "" +msgstr "Débordement numérique." -#: library/decimal.rst:1605 +#: library/decimal.rst:1606 msgid "" -"Indicates the exponent is larger than :attr:`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 :const:`Infinity`. In either case, :class:`Inexact` and :class:" +"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:1614 +#: library/decimal.rst:1615 msgid "Rounding occurred though possibly no information was lost." msgstr "" -#: library/decimal.rst:1616 +#: library/decimal.rst:1617 msgid "" "Signaled whenever rounding discards digits; even if those digits are zero " -"(such as rounding :const:`5.00` to :const:`5.0`). If not trapped, returns " -"the result unchanged. This signal is used to detect loss of significant " -"digits." +"(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:1624 -msgid "Exponent was lower than :attr:`Emin` prior to rounding." +#: library/decimal.rst:1625 +msgid "Exponent was lower than :attr:`~Context.Emin` prior to rounding." msgstr "" -#: library/decimal.rst:1626 +#: 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:1632 +#: library/decimal.rst:1633 msgid "Numerical underflow with result rounded to zero." msgstr "" -#: library/decimal.rst:1634 +#: 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:1640 +#: library/decimal.rst:1641 msgid "Enable stricter semantics for mixing floats and Decimals." msgstr "" -#: library/decimal.rst:1642 +#: 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." @@ -1842,34 +1900,34 @@ msgid "" "Context.create_decimal_from_float` do not set the flag." msgstr "" -#: library/decimal.rst:1650 +#: 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:1654 +#: library/decimal.rst:1655 msgid "The following table summarizes the hierarchy of signals::" msgstr "" -#: library/decimal.rst:1675 +#: library/decimal.rst:1676 msgid "Floating Point Notes" msgstr "" -#: library/decimal.rst:1679 +#: library/decimal.rst:1680 msgid "Mitigating round-off error with increased precision" msgstr "" -#: library/decimal.rst:1681 +#: library/decimal.rst:1682 msgid "" "The use of decimal floating point eliminates decimal representation error " -"(making it possible to represent :const:`0.1` exactly); however, some " -"operations can still incur round-off error when non-zero digits exceed the " -"fixed precision." +"(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:1685 +#: 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 " @@ -1878,24 +1936,24 @@ msgid "" "of the associative and distributive properties of addition:" msgstr "" -#: library/decimal.rst:1709 +#: 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:1729 +#: library/decimal.rst:1730 msgid "Special values" msgstr "" -#: library/decimal.rst:1731 +#: library/decimal.rst:1732 msgid "" "The number system for the :mod:`decimal` module provides special values " -"including :const:`NaN`, :const:`sNaN`, :const:`-Infinity`, :const:" -"`Infinity`, and two zeros, :const:`+0` and :const:`-0`." +"including ``NaN``, ``sNaN``, ``-Infinity``, ``Infinity``, and two zeros, " +"``+0`` and ``-0``." msgstr "" -#: library/decimal.rst:1735 +#: 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 " @@ -1904,49 +1962,49 @@ msgid "" "representable number." msgstr "" -#: library/decimal.rst:1740 +#: 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:1744 +#: library/decimal.rst:1745 msgid "" -"Some operations are indeterminate and return :const:`NaN`, or if the :exc:" +"Some operations are indeterminate and return ``NaN``, or if the :exc:" "`InvalidOperation` signal is trapped, raise an exception. For example, " -"``0/0`` returns :const:`NaN` which means \"not a number\". This variety of :" -"const:`NaN` is quiet and, once created, will flow through other computations " -"always resulting in another :const:`NaN`. This behavior can be useful for a " +"``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:1752 +#: library/decimal.rst:1753 msgid "" -"A variant is :const:`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." +"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:1756 +#: library/decimal.rst:1757 msgid "" "The behavior of Python's comparison operators can be a little surprising " -"where a :const:`NaN` is involved. A test for equality where one of the " -"operands is a quiet or signaling :const:`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 :const:`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 :const:`NaN` were taken " -"from the IEEE 854 standard (see Table 3 in section 5.7). To ensure strict " -"standards-compliance, use the :meth:`compare` and :meth:`compare-signal` " -"methods instead." -msgstr "" - -#: library/decimal.rst:1769 +"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 " @@ -1954,7 +2012,7 @@ msgid "" "negative zeros are treated as equal and their sign is informational." msgstr "" -#: library/decimal.rst:1774 +#: 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 " @@ -1963,11 +2021,11 @@ msgid "" "that the following calculation returns a value equal to zero:" msgstr "" -#: library/decimal.rst:1789 +#: library/decimal.rst:1790 msgid "Working with threads" msgstr "" -#: library/decimal.rst:1791 +#: 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 " @@ -1975,20 +2033,20 @@ msgid "" "other threads." msgstr "" -#: library/decimal.rst:1795 +#: library/decimal.rst:1796 msgid "" "Likewise, the :func:`setcontext` function automatically assigns its target " "to the current thread." msgstr "" -#: library/decimal.rst:1798 +#: 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:1802 +#: 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 " @@ -1997,119 +2055,132 @@ msgid "" "a race condition between threads calling :func:`getcontext`. For example::" msgstr "" -#: library/decimal.rst:1827 +#: library/decimal.rst:1828 msgid "Recipes" msgstr "Cas pratiques" -#: library/decimal.rst:1829 +#: 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:1984 +#: library/decimal.rst:1985 msgid "Decimal FAQ" msgstr "FAQ *decimal*" -#: library/decimal.rst:1986 +#: 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 " +"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:1989 +#: 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:1995 +#: 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:1999 +#: library/decimal.rst:2000 msgid "" -"A. The :meth:`quantize` method rounds to a fixed number of decimal places. " -"If the :const:`Inexact` trap is set, it is also useful for validation:" +"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:2017 +#: 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:2020 +#: 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:`quantize` step:" +"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:2038 +#: library/decimal.rst:2039 +#, fuzzy msgid "" "In developing fixed-point applications, it is convenient to define functions " -"to handle the :meth:`quantize` step:" +"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:2051 +#: library/decimal.rst:2052 msgid "" -"Q. There are many ways to express the same value. The numbers :const:" -"`200`, :const:`200.000`, :const:`2E2`, and :const:`.02E+4` all have the same " -"value at various precisions. Is there a way to transform them to a single " -"recognizable canonical value?" +"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:2056 +#: library/decimal.rst:2057 msgid "" -"A. The :meth:`normalize` method maps all equivalent values to a single " -"representative:" +"A. The :meth:`~Decimal.normalize` method maps all equivalent values to a " +"single representative:" msgstr "" -#: library/decimal.rst:2063 +#: 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:2066 +#: 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 :" -"const:`5.0E+3` as :const:`5000` keeps the value constant but cannot show 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:2071 +#: 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:2081 +#: library/decimal.rst:2082 msgid "Q. Is there a way to convert a regular float to a :class:`Decimal`?" msgstr "" -#: library/decimal.rst:2083 +#: 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:2092 +#: 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:2095 +#: 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. " @@ -2117,14 +2188,14 @@ msgid "" "issues, ill-conditioned inputs, or a numerically unstable algorithm." msgstr "" -#: library/decimal.rst:2100 +#: 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:2104 +#: 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 " @@ -2133,28 +2204,28 @@ msgid "" "haven't been rounded:" msgstr "" -#: library/decimal.rst:2117 +#: 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:2126 +#: library/decimal.rst:2127 msgid "" "Alternatively, inputs can be rounded upon creation using the :meth:`Context." "create_decimal` method:" msgstr "" -#: library/decimal.rst:2132 +#: library/decimal.rst:2133 msgid "Q. Is the CPython implementation fast for large numbers?" msgstr "" -#: library/decimal.rst:2134 +#: 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 " +"correctly rounded decimal floating point arithmetic [#]_. ``libmpdec`` uses " "`Karatsuba multiplication `_ for medium-sized numbers and the `Number Theoretic " "Transform \n" "Language-Team: FRENCH \n" "Language: fr\n" @@ -270,7 +270,7 @@ msgstr "" "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 " +"*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 " @@ -519,14 +519,14 @@ 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 " +"This was published in `Dr. Dobb's Journal `_ in " "July, 1988." msgstr "" @@ -656,8 +656,8 @@ msgstr "" #: library/difflib.rst:468 msgid "" "Return list of triples describing non-overlapping matching subsequences. " -"Each triple is of the form ``(i, j, n)``, and means that ``a[i:i+n] == b[j:j" -"+n]``. The triples are monotonically increasing in *i* and *j*." +"Each triple is of the form ``(i, j, n)``, and means that ``a[i:i+n] == b[j:" +"j+n]``. The triples are monotonically increasing in *i* and *j*." msgstr "" #: library/difflib.rst:473 diff --git a/library/dis.po b/library/dis.po index 2f9151c102..bbbd8b63bf 100644 --- a/library/dis.po +++ b/library/dis.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-12-31 11:33+0100\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" @@ -56,11 +56,17 @@ msgstr "" "Utilisez 2 bits pour chaque instruction. Avant, le nombre de bits variait " "par instruction." -#: library/dis.rst:28 +#: 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:33 +#: library/dis.rst:37 msgid "" "the following command can be used to display the disassembly of :func:" "`myfunc`::" @@ -68,15 +74,15 @@ msgstr "" "la commande suivante peut-être utilisé pour afficher le désassemblage de :" "func:`myfunc` ::" -#: library/dis.rst:42 +#: library/dis.rst:46 msgid "(The \"2\" is a line number)." msgstr "(Le \"2\" est un numéro de ligne)." -#: library/dis.rst:45 +#: library/dis.rst:49 msgid "Bytecode analysis" msgstr "Analyse du code intermédiaire" -#: library/dis.rst:49 +#: 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 " @@ -86,7 +92,7 @@ msgstr "" "code en Python dans une classe :class:`Bytecode`, qui permet un accès facile " "aux détails du code compilé." -#: library/dis.rst:56 +#: 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 " @@ -97,7 +103,7 @@ msgstr "" "caractères du code source, ou bien une classe (comme retourne la fonction :" "func:`compile`)." -#: library/dis.rst:60 +#: 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` " @@ -108,7 +114,7 @@ msgstr "" "instance de la classe :class:`Bytecode` rend les opérations du code " "intermédiaire des instances de :class:`Instruction`." -#: library/dis.rst:225 +#: 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 " @@ -120,7 +126,7 @@ msgstr "" "Autrement, les informations sur la ligne source sont prises directement à " "partir de la classe du code désassemblé." -#: library/dis.rst:69 +#: 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 " @@ -131,7 +137,7 @@ msgstr "" "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:75 +#: library/dis.rst:79 msgid "" "Construct a :class:`Bytecode` instance from the given traceback, setting " "*current_offset* to the instruction responsible for the exception." @@ -139,15 +145,15 @@ 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:80 +#: library/dis.rst:84 msgid "The compiled code object." msgstr "Le code compilé objet." -#: library/dis.rst:84 +#: 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:88 +#: 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)." @@ -156,7 +162,7 @@ msgstr "" "celle envoyée par :func:`dis.dis`, mais comme une chaîne de caractères de " "plusieurs lignes )." -#: library/dis.rst:93 +#: library/dis.rst:97 msgid "" "Return a formatted multi-line string with detailed information about the " "code object, like :func:`code_info`." @@ -164,20 +170,20 @@ 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:130 library/dis.rst:176 +#: 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:99 +#: library/dis.rst:103 msgid "Example::" msgstr "Exemple ::" -#: library/dis.rst:112 +#: library/dis.rst:116 msgid "Analysis functions" msgstr "Analyse de fonctions" -#: library/dis.rst:114 +#: 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 " @@ -189,7 +195,7 @@ msgstr "" "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:120 +#: library/dis.rst:124 msgid "" "Return a formatted multi-line string with detailed code object information " "for the supplied function, generator, asynchronous generator, coroutine, " @@ -200,7 +206,7 @@ msgstr "" "générateurs asynchrone, coroutine, la méthode, la chaine de caractères du " "code source ou objet." -#: library/dis.rst:124 +#: 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 " @@ -211,7 +217,7 @@ msgstr "" "peuvent changer arbitrairement sous machines virtuelles Python ou les " "versions de Python." -#: library/dis.rst:136 +#: 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 " @@ -221,7 +227,7 @@ msgstr "" "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:140 +#: 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." @@ -230,11 +236,11 @@ msgstr "" "principalement fait pour l'exploration interactive sur l'invite de " "l'interpréteur." -#: library/dis.rst:170 library/dis.rst:213 +#: library/dis.rst:174 library/dis.rst:217 msgid "Added *file* parameter." msgstr "Ajout du paramètre *file*." -#: library/dis.rst:151 +#: 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 " @@ -263,7 +269,7 @@ msgstr "" "`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:186 library/dis.rst:210 +#: 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." @@ -271,7 +277,7 @@ 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:167 +#: library/dis.rst:171 msgid "" "The maximal depth of recursion is limited by *depth* unless it is ``None``. " "``depth=0`` means no recursion." @@ -279,13 +285,13 @@ 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:173 +#: 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:182 +#: 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 " @@ -295,7 +301,7 @@ msgstr "" "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:196 +#: 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:" @@ -303,35 +309,35 @@ 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:199 +#: 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:200 +#: library/dis.rst:204 msgid "the current instruction, indicated as ``-->``," msgstr "l'instruction en cours, indiquée par ``-->``," -#: library/dis.rst:201 +#: library/dis.rst:205 msgid "a labelled instruction, indicated with ``>>``," msgstr "une instruction libellée, indiquée par ``> >``," -#: library/dis.rst:202 +#: library/dis.rst:206 msgid "the address of the instruction," msgstr "l'adresse de l'instruction," -#: library/dis.rst:203 +#: library/dis.rst:207 msgid "the operation code name," msgstr "le nom de le code d'opération," -#: library/dis.rst:204 +#: library/dis.rst:208 msgid "operation parameters, and" msgstr "paramètres de l'opération, et" -#: library/dis.rst:205 +#: library/dis.rst:209 msgid "interpretation of the parameters in parentheses." msgstr "interprétation des paramètres entre parenthèses." -#: library/dis.rst:207 +#: library/dis.rst:211 msgid "" "The parameter interpretation recognizes local and global variable names, " "constant values, branch targets, and compare operators." @@ -340,7 +346,7 @@ msgstr "" "globales, des valeurs constantes, des branchements cibles, et des opérateurs " "de comparaison." -#: library/dis.rst:219 +#: library/dis.rst:223 msgid "" "Return an iterator over the instructions in the supplied function, method, " "source code string or code object." @@ -348,7 +354,7 @@ 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:222 +#: 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." @@ -356,32 +362,36 @@ 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:235 +#: library/dis.rst:239 msgid "" -"This generator function uses the ``co_firstlineno`` and ``co_lnotab`` " -"attributes 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. " -"See :source:`Objects/lnotab_notes.txt` for the ``co_lnotab`` format and how " -"to decode it." +"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:241 +#: 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:247 +#: 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:253 +#: library/dis.rst:259 msgid "Compute the stack effect of *opcode* with argument *oparg*." msgstr "" -#: library/dis.rst:255 +#: 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 " @@ -389,16 +399,16 @@ msgid "" "it will return the maximal stack effect of both cases." msgstr "" -#: library/dis.rst:262 +#: library/dis.rst:268 #, fuzzy msgid "Added *jump* parameter." msgstr "Ajout du paramètre *file*." -#: library/dis.rst:269 +#: library/dis.rst:275 msgid "Python Bytecode Instructions" msgstr "Les instructions du code intermédiaire en Python" -#: library/dis.rst:271 +#: library/dis.rst:277 msgid "" "The :func:`get_instructions` function and :class:`Bytecode` class provide " "details of bytecode instructions as :class:`Instruction` instances:" @@ -407,11 +417,11 @@ msgstr "" "des détails sur le code intermédiaire des instructions comme :class:" "`Instruction` instances:" -#: library/dis.rst:276 +#: 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:280 +#: 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`." @@ -420,185 +430,185 @@ msgstr "" "dessous et les valeurs du code intermédiaire dans la :ref:" "`opcode_collections`." -#: library/dis.rst:286 +#: library/dis.rst:292 msgid "human readable name for operation" msgstr "nom lisible/compréhensible de l'opération" -#: library/dis.rst:291 +#: 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:296 +#: library/dis.rst:302 msgid "resolved arg value (if known), otherwise same as arg" msgstr "" -#: library/dis.rst:301 +#: library/dis.rst:307 msgid "human readable description of operation argument" msgstr "" -#: library/dis.rst:306 +#: library/dis.rst:312 msgid "start index of operation within bytecode sequence" msgstr "" -#: library/dis.rst:311 +#: library/dis.rst:317 msgid "line started by this opcode (if any), otherwise ``None``" msgstr "" -#: library/dis.rst:316 +#: library/dis.rst:322 msgid "``True`` if other code jumps to here, otherwise ``False``" msgstr "" -#: library/dis.rst:321 +#: library/dis.rst:327 msgid "" "The Python compiler currently generates the following bytecode instructions." msgstr "" -#: library/dis.rst:324 +#: library/dis.rst:330 msgid "**General instructions**" msgstr "" -#: library/dis.rst:328 +#: library/dis.rst:334 msgid "Do nothing code. Used as a placeholder by the bytecode optimizer." msgstr "" -#: library/dis.rst:333 +#: library/dis.rst:339 msgid "Removes the top-of-stack (TOS) item." msgstr "" -#: library/dis.rst:338 +#: library/dis.rst:344 msgid "Swaps the two top-most stack items." msgstr "" -#: library/dis.rst:343 +#: library/dis.rst:349 msgid "" "Lifts second and third stack item one position up, moves top down to " "position three." msgstr "" -#: library/dis.rst:349 +#: 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:357 +#: library/dis.rst:363 msgid "Duplicates the reference on top of the stack." msgstr "" -#: library/dis.rst:364 +#: library/dis.rst:370 msgid "" "Duplicates the two references on top of the stack, leaving them in the same " "order." msgstr "" -#: library/dis.rst:370 +#: library/dis.rst:376 msgid "**Unary operations**" msgstr "" -#: library/dis.rst:372 +#: 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:377 +#: library/dis.rst:383 msgid "Implements ``TOS = +TOS``." msgstr "" -#: library/dis.rst:382 +#: library/dis.rst:388 msgid "Implements ``TOS = -TOS``." msgstr "" -#: library/dis.rst:387 +#: library/dis.rst:393 msgid "Implements ``TOS = not TOS``." msgstr "" -#: library/dis.rst:392 +#: library/dis.rst:398 msgid "Implements ``TOS = ~TOS``." msgstr "" -#: library/dis.rst:397 +#: library/dis.rst:403 msgid "Implements ``TOS = iter(TOS)``." msgstr "" -#: library/dis.rst:402 +#: 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:408 +#: library/dis.rst:414 msgid "**Binary operations**" msgstr "" -#: library/dis.rst:410 +#: 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:416 +#: library/dis.rst:422 msgid "Implements ``TOS = TOS1 ** TOS``." msgstr "" -#: library/dis.rst:421 +#: library/dis.rst:427 msgid "Implements ``TOS = TOS1 * TOS``." msgstr "" -#: library/dis.rst:426 +#: library/dis.rst:432 msgid "Implements ``TOS = TOS1 @ TOS``." msgstr "" -#: library/dis.rst:433 +#: library/dis.rst:439 msgid "Implements ``TOS = TOS1 // TOS``." msgstr "" -#: library/dis.rst:438 +#: library/dis.rst:444 msgid "Implements ``TOS = TOS1 / TOS``." msgstr "" -#: library/dis.rst:443 +#: library/dis.rst:449 msgid "Implements ``TOS = TOS1 % TOS``." msgstr "" -#: library/dis.rst:448 +#: library/dis.rst:454 msgid "Implements ``TOS = TOS1 + TOS``." msgstr "" -#: library/dis.rst:453 +#: library/dis.rst:459 msgid "Implements ``TOS = TOS1 - TOS``." msgstr "" -#: library/dis.rst:458 +#: library/dis.rst:464 msgid "Implements ``TOS = TOS1[TOS]``." msgstr "" -#: library/dis.rst:463 +#: library/dis.rst:469 msgid "Implements ``TOS = TOS1 << TOS``." msgstr "" -#: library/dis.rst:468 +#: library/dis.rst:474 msgid "Implements ``TOS = TOS1 >> TOS``." msgstr "" -#: library/dis.rst:473 +#: library/dis.rst:479 msgid "Implements ``TOS = TOS1 & TOS``." msgstr "" -#: library/dis.rst:478 +#: library/dis.rst:484 msgid "Implements ``TOS = TOS1 ^ TOS``." msgstr "" -#: library/dis.rst:483 +#: library/dis.rst:489 msgid "Implements ``TOS = TOS1 | TOS``." msgstr "" -#: library/dis.rst:486 +#: library/dis.rst:492 msgid "**In-place operations**" msgstr "" -#: library/dis.rst:488 +#: 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-" @@ -606,92 +616,92 @@ msgid "" "to be) the original TOS1." msgstr "" -#: library/dis.rst:495 +#: library/dis.rst:501 msgid "Implements in-place ``TOS = TOS1 ** TOS``." msgstr "" -#: library/dis.rst:500 +#: library/dis.rst:506 msgid "Implements in-place ``TOS = TOS1 * TOS``." msgstr "" -#: library/dis.rst:505 +#: library/dis.rst:511 msgid "Implements in-place ``TOS = TOS1 @ TOS``." msgstr "" -#: library/dis.rst:512 +#: library/dis.rst:518 msgid "Implements in-place ``TOS = TOS1 // TOS``." msgstr "" -#: library/dis.rst:517 +#: library/dis.rst:523 msgid "Implements in-place ``TOS = TOS1 / TOS``." msgstr "" -#: library/dis.rst:522 +#: library/dis.rst:528 msgid "Implements in-place ``TOS = TOS1 % TOS``." msgstr "" -#: library/dis.rst:527 +#: library/dis.rst:533 msgid "Implements in-place ``TOS = TOS1 + TOS``." msgstr "" -#: library/dis.rst:532 +#: library/dis.rst:538 msgid "Implements in-place ``TOS = TOS1 - TOS``." msgstr "" -#: library/dis.rst:537 +#: library/dis.rst:543 msgid "Implements in-place ``TOS = TOS1 << TOS``." msgstr "" -#: library/dis.rst:542 +#: library/dis.rst:548 msgid "Implements in-place ``TOS = TOS1 >> TOS``." msgstr "" -#: library/dis.rst:547 +#: library/dis.rst:553 msgid "Implements in-place ``TOS = TOS1 & TOS``." msgstr "" -#: library/dis.rst:552 +#: library/dis.rst:558 msgid "Implements in-place ``TOS = TOS1 ^ TOS``." msgstr "" -#: library/dis.rst:557 +#: library/dis.rst:563 msgid "Implements in-place ``TOS = TOS1 | TOS``." msgstr "" -#: library/dis.rst:562 +#: library/dis.rst:568 msgid "Implements ``TOS1[TOS] = TOS2``." msgstr "" -#: library/dis.rst:567 +#: library/dis.rst:573 msgid "Implements ``del TOS1[TOS]``." msgstr "" -#: library/dis.rst:570 +#: library/dis.rst:576 msgid "**Coroutine opcodes**" msgstr "" -#: library/dis.rst:574 +#: 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:584 +#: library/dis.rst:590 msgid "Implements ``TOS = TOS.__aiter__()``." msgstr "" -#: library/dis.rst:587 +#: library/dis.rst:593 msgid "Returning awaitable objects from ``__aiter__`` is no longer supported." msgstr "" -#: library/dis.rst:594 +#: library/dis.rst:600 msgid "" -"Implements ``PUSH(get_awaitable(TOS.__anext__()))``. See ``GET_AWAITABLE`` " -"for details about ``get_awaitable``" +"Pushes ``get_awaitable(TOS.__anext__())`` to the stack. See " +"``GET_AWAITABLE`` for details about ``get_awaitable``." msgstr "" -#: library/dis.rst:602 +#: 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 " @@ -700,48 +710,48 @@ msgid "" "exception handler block is removed from the block stack." msgstr "" -#: library/dis.rst:613 +#: 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:621 +#: library/dis.rst:627 msgid "Creates a new frame object." msgstr "" -#: library/dis.rst:627 +#: library/dis.rst:633 msgid "**Miscellaneous opcodes**" msgstr "" -#: library/dis.rst:631 +#: 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:638 +#: library/dis.rst:644 msgid "" "Calls ``set.add(TOS1[-i], TOS)``. Used to implement set comprehensions." msgstr "" -#: library/dis.rst:643 +#: library/dis.rst:649 msgid "" "Calls ``list.append(TOS1[-i], TOS)``. Used to implement list comprehensions." msgstr "" -#: library/dis.rst:648 +#: library/dis.rst:654 msgid "" "Calls ``dict.__setitem__(TOS1[-i], TOS1, TOS)``. Used to implement dict " "comprehensions." msgstr "" -#: library/dis.rst:652 +#: library/dis.rst:658 msgid "Map value is TOS and map key is TOS1. Before, those were reversed." msgstr "" -#: library/dis.rst:655 +#: 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 " @@ -749,19 +759,19 @@ msgid "" "further iterations of the loop." msgstr "" -#: library/dis.rst:663 +#: library/dis.rst:669 msgid "Returns with TOS to the caller of the function." msgstr "" -#: library/dis.rst:668 +#: library/dis.rst:674 msgid "Pops TOS and yields it from a :term:`generator`." msgstr "" -#: library/dis.rst:673 +#: library/dis.rst:679 msgid "Pops TOS and delegates to it as a subiterator from a :term:`generator`." msgstr "" -#: library/dis.rst:680 +#: 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 " @@ -769,20 +779,20 @@ msgid "" "statically." msgstr "" -#: library/dis.rst:690 +#: 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:697 +#: 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:703 +#: 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 " @@ -790,14 +800,14 @@ msgid "" "last three popped values are used to restore the exception state." msgstr "" -#: library/dis.rst:711 +#: 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:719 +#: 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." @@ -805,19 +815,19 @@ msgid "" "statement." msgstr "" -#: library/dis.rst:729 +#: library/dis.rst:735 msgid "" "Pushes :exc:`AssertionError` onto the stack. Used by the :keyword:`assert` " "statement." msgstr "" -#: library/dis.rst:737 +#: 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:743 +#: 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 " @@ -829,18 +839,18 @@ msgid "" "or :opcode:`UNPACK_SEQUENCE`)." msgstr "" -#: library/dis.rst:757 +#: 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:766 +#: library/dis.rst:772 msgid "Push ``len(TOS)`` onto the stack." msgstr "" -#: library/dis.rst:773 +#: 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:" @@ -848,7 +858,7 @@ msgid "" "push ``False``." msgstr "" -#: library/dis.rst:783 +#: 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 " @@ -857,7 +867,7 @@ msgid "" "push ``False``." msgstr "" -#: library/dis.rst:793 +#: 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 " @@ -865,30 +875,30 @@ msgid "" "followed by ``False``." msgstr "" -#: library/dis.rst:801 +#: library/dis.rst:807 msgid "All of the following opcodes use their arguments." msgstr "" -#: library/dis.rst:805 +#: 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:812 +#: 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:818 +#: library/dis.rst:824 msgid "" "Unpacks TOS into *count* individual values, which are put onto the stack " "right-to-left." msgstr "" -#: library/dis.rst:824 +#: 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 " @@ -896,119 +906,119 @@ msgid "" "leftover items." msgstr "" -#: library/dis.rst:829 +#: 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:836 +#: library/dis.rst:842 msgid "" "Implements ``TOS.name = TOS1``, where *namei* is the index of name in :attr:" "`co_names`." msgstr "" -#: library/dis.rst:842 +#: library/dis.rst:848 msgid "" "Implements ``del TOS.name``, using *namei* as index into :attr:`co_names`." msgstr "" -#: library/dis.rst:847 +#: library/dis.rst:853 msgid "Works as :opcode:`STORE_NAME`, but stores the name as a global." msgstr "" -#: library/dis.rst:852 +#: library/dis.rst:858 msgid "Works as :opcode:`DELETE_NAME`, but deletes a global name." msgstr "" -#: library/dis.rst:857 +#: library/dis.rst:863 msgid "Pushes ``co_consts[consti]`` onto the stack." msgstr "" -#: library/dis.rst:862 +#: library/dis.rst:868 msgid "Pushes the value associated with ``co_names[namei]`` onto the stack." msgstr "" -#: library/dis.rst:867 +#: 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:873 +#: library/dis.rst:879 msgid "Works as :opcode:`BUILD_TUPLE`, but creates a list." msgstr "" -#: library/dis.rst:878 +#: library/dis.rst:884 msgid "Works as :opcode:`BUILD_TUPLE`, but creates a set." msgstr "" -#: library/dis.rst:883 +#: 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:887 +#: 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:894 +#: 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:903 +#: library/dis.rst:909 msgid "" "Concatenates *count* strings from the stack and pushes the resulting string " "onto the stack." msgstr "" -#: library/dis.rst:911 +#: library/dis.rst:917 msgid "" "Pops a list from the stack and pushes a tuple containing the same values." msgstr "" -#: library/dis.rst:918 +#: library/dis.rst:924 msgid "Calls ``list.extend(TOS1[-i], TOS)``. Used to build lists." msgstr "" -#: library/dis.rst:925 +#: library/dis.rst:931 msgid "Calls ``set.update(TOS1[-i], TOS)``. Used to build sets." msgstr "" -#: library/dis.rst:932 +#: library/dis.rst:938 msgid "Calls ``dict.update(TOS1[-i], TOS)``. Used to build dicts." msgstr "" -#: library/dis.rst:939 +#: library/dis.rst:945 msgid "Like :opcode:`DICT_UPDATE` but raises an exception for duplicate keys." msgstr "" -#: library/dis.rst:946 +#: library/dis.rst:952 msgid "Replaces TOS with ``getattr(TOS, co_names[namei])``." msgstr "" -#: library/dis.rst:951 +#: library/dis.rst:957 msgid "" "Performs a Boolean operation. The operation name can be found in " "``cmp_op[opname]``." msgstr "" -#: library/dis.rst:957 +#: library/dis.rst:963 msgid "Performs ``is`` comparison, or ``is not`` if ``invert`` is 1." msgstr "" -#: library/dis.rst:964 +#: library/dis.rst:970 msgid "Performs ``in`` comparison, or ``not in`` if ``invert`` is 1." msgstr "" -#: library/dis.rst:971 +#: 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 " @@ -1017,48 +1027,48 @@ msgid "" "modifies the namespace." msgstr "" -#: library/dis.rst:980 +#: 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:987 +#: library/dis.rst:993 msgid "Increments bytecode counter by *delta*." msgstr "" -#: library/dis.rst:992 +#: library/dis.rst:998 msgid "If TOS is true, sets the bytecode counter to *target*. TOS is popped." msgstr "" -#: library/dis.rst:999 +#: library/dis.rst:1005 msgid "If TOS is false, sets the bytecode counter to *target*. TOS is popped." msgstr "" -#: library/dis.rst:1005 +#: 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:1013 +#: 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:1021 +#: 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:1029 +#: library/dis.rst:1035 msgid "Set bytecode counter to *target*." msgstr "" -#: library/dis.rst:1034 +#: 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 " @@ -1066,30 +1076,30 @@ msgid "" "code counter is incremented by *delta*." msgstr "" -#: library/dis.rst:1042 +#: library/dis.rst:1048 msgid "Loads the global named ``co_names[namei]`` onto the stack." msgstr "" -#: library/dis.rst:1047 +#: 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:1053 +#: library/dis.rst:1059 msgid "" "Pushes a reference to the local ``co_varnames[var_num]`` onto the stack." msgstr "" -#: library/dis.rst:1058 +#: library/dis.rst:1064 msgid "Stores TOS into the local ``co_varnames[var_num]``." msgstr "" -#: library/dis.rst:1063 +#: library/dis.rst:1069 msgid "Deletes local ``co_varnames[var_num]``." msgstr "" -#: library/dis.rst:1068 +#: 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 " @@ -1097,52 +1107,52 @@ msgid "" "len(co_cellvars)]``." msgstr "" -#: library/dis.rst:1076 +#: 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:1082 +#: 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:1091 +#: 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:1097 +#: 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:1105 +#: 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:1108 +#: library/dis.rst:1114 msgid "0: ``raise`` (re-raise previous exception)" msgstr "" -#: library/dis.rst:1109 +#: library/dis.rst:1115 msgid "1: ``raise TOS`` (raise exception instance or type at ``TOS``)" msgstr "" -#: library/dis.rst:1110 +#: 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:1116 +#: 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 " @@ -1152,11 +1162,11 @@ msgid "" "arguments, and pushes the return value returned by the callable object." msgstr "" -#: library/dis.rst:1124 +#: library/dis.rst:1130 msgid "This opcode is used only for calls with positional arguments." msgstr "" -#: library/dis.rst:1130 +#: 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 " @@ -1170,13 +1180,13 @@ msgid "" "object." msgstr "" -#: library/dis.rst:1142 +#: 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:1149 +#: 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 " @@ -1188,7 +1198,7 @@ msgid "" "arguments, and pushes the return value returned by the callable object." msgstr "" -#: library/dis.rst:1164 +#: 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 " @@ -1198,7 +1208,7 @@ msgid "" "lookup are pushed." msgstr "" -#: library/dis.rst:1176 +#: 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 :" @@ -1208,50 +1218,50 @@ msgid "" "callable). All of them are popped and the return value is pushed." msgstr "" -#: library/dis.rst:1188 +#: 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:1191 +#: 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:1193 +#: library/dis.rst:1199 msgid "``0x02`` a dictionary of keyword-only parameters' default values" msgstr "" -#: library/dis.rst:1194 +#: library/dis.rst:1200 msgid "``0x04`` a tuple of strings containing parameters' annotations" msgstr "" -#: library/dis.rst:1195 +#: library/dis.rst:1201 msgid "``0x08`` a tuple containing cells for free variables, making a closure" msgstr "" -#: library/dis.rst:1196 +#: library/dis.rst:1202 msgid "the code associated with the function (at TOS1)" msgstr "" -#: library/dis.rst:1197 +#: library/dis.rst:1203 msgid "the :term:`qualified name` of the function (at TOS)" msgstr "" -#: library/dis.rst:1199 +#: library/dis.rst:1205 msgid "Flag value ``0x04`` is a tuple of strings instead of dictionary" msgstr "" -#: library/dis.rst:1206 +#: 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:1213 +#: 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 " @@ -1259,113 +1269,113 @@ msgid "" "allowed, forming an argument from two-byte to four-byte." msgstr "" -#: library/dis.rst:1221 +#: 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:1225 +#: library/dis.rst:1231 msgid "``(flags & 0x03) == 0x00``: *value* is formatted as-is." msgstr "" -#: library/dis.rst:1226 +#: library/dis.rst:1232 msgid "" "``(flags & 0x03) == 0x01``: call :func:`str` on *value* before formatting it." msgstr "" -#: library/dis.rst:1228 +#: library/dis.rst:1234 msgid "" "``(flags & 0x03) == 0x02``: call :func:`repr` on *value* before formatting " "it." msgstr "" -#: library/dis.rst:1230 +#: library/dis.rst:1236 msgid "" "``(flags & 0x03) == 0x03``: call :func:`ascii` on *value* before formatting " "it." msgstr "" -#: library/dis.rst:1232 +#: 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:1235 +#: library/dis.rst:1241 msgid "" "Formatting is performed using :c:func:`PyObject_Format`. The result is " "pushed on the stack." msgstr "" -#: library/dis.rst:1243 +#: 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:1247 +#: 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:1255 +#: 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:1264 +#: 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:1272 +#: 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:1276 +#: 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:1284 +#: library/dis.rst:1290 msgid "Opcode collections" msgstr "" -#: library/dis.rst:1286 +#: library/dis.rst:1292 msgid "" "These collections are provided for automatic introspection of bytecode " "instructions:" msgstr "" -#: library/dis.rst:1291 +#: library/dis.rst:1297 msgid "Sequence of operation names, indexable using the bytecode." msgstr "" -#: library/dis.rst:1296 +#: library/dis.rst:1302 msgid "Dictionary mapping operation names to bytecodes." msgstr "" -#: library/dis.rst:1301 +#: library/dis.rst:1307 msgid "Sequence of all compare operation names." msgstr "" -#: library/dis.rst:1306 +#: library/dis.rst:1312 msgid "Sequence of bytecodes that access a constant." msgstr "" -#: library/dis.rst:1311 +#: 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 " @@ -1373,22 +1383,22 @@ msgid "" "does *not* include references to global or builtin scopes)." msgstr "" -#: library/dis.rst:1319 +#: library/dis.rst:1325 msgid "Sequence of bytecodes that access an attribute by name." msgstr "" -#: library/dis.rst:1324 +#: library/dis.rst:1330 msgid "Sequence of bytecodes that have a relative jump target." msgstr "" -#: library/dis.rst:1329 +#: library/dis.rst:1335 msgid "Sequence of bytecodes that have an absolute jump target." msgstr "" -#: library/dis.rst:1334 +#: library/dis.rst:1340 msgid "Sequence of bytecodes that access a local variable." msgstr "" -#: library/dis.rst:1339 +#: library/dis.rst:1345 msgid "Sequence of bytecodes of Boolean operations." msgstr "" diff --git a/library/doctest.po b/library/doctest.po index d9a180da6d..3c53e58458 100644 --- a/library/doctest.po +++ b/library/doctest.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-21 15:04+0200\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" @@ -349,11 +349,11 @@ msgstr "" "Toute classe trouvée est ainsi cherchée récursivement, afin de tester les " "*docstrings* contenues dans leurs méthodes et leurs classes imbriquées." -#: library/doctest.rst:299 +#: library/doctest.rst:295 msgid "How are Docstring Examples Recognized?" msgstr "Comment les exemples *docstring* sont-ils identifiés ?" -#: library/doctest.rst:301 +#: 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 " @@ -363,7 +363,7 @@ msgstr "" "console fonctionne bien, mais *doctest* n'essaye pas de faire une simulation " "exacte d'un *shell* Python spécifique." -#: library/doctest.rst:326 +#: 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 " @@ -373,11 +373,11 @@ msgstr "" "dernier ``'... '`` contenant le code, et la sortie souhaitée, s'il y en a " "une, s'étend jusqu'au prochain ``'>>> '`` ou à la prochaine ligne vide." -#: library/doctest.rst:330 +#: library/doctest.rst:326 msgid "The fine print:" msgstr "En détail :" -#: library/doctest.rst:332 +#: 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 " @@ -389,7 +389,7 @@ msgstr "" "souhaitée doit contenir une ligne vide, ajoutez ```` dans votre " "exemple *doctest* à chaque endroit où une ligne vide est souhaitée." -#: library/doctest.rst:337 +#: 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 " @@ -419,7 +419,7 @@ msgstr "" "la gestion des tabulations en rédigeant une classe sur mesure :class:" "`DocTestParser`." -#: library/doctest.rst:349 +#: library/doctest.rst:345 msgid "" "Output to stdout is captured, but not output to stderr (exception tracebacks " "are captured via a different means)." @@ -427,7 +427,7 @@ msgstr "" "La sortie vers *stdout* est capturée, mais pas la sortie vers *stderr* (les " "traces d'appel sont capturées par d'autres moyens)." -#: library/doctest.rst:352 +#: 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 " @@ -438,7 +438,7 @@ msgstr "" "séance interactive, ou quand vous utilisez une telle barre pour toute autre " "raison, vous devez utiliser une *docstring* brute ::" -#: library/doctest.rst:361 +#: 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. " @@ -451,11 +451,11 @@ msgstr "" "chaque barre oblique inversée dans la version *doctest* (et n'utilisez pas " "dans ce cas de *docstring* brute) ::" -#: library/doctest.rst:370 +#: 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:377 +#: 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." @@ -463,11 +463,11 @@ msgstr "" "et autant d'espaces sont retirés de la sortie attendue qu'il y avait " "d'espaces avant la ligne commençant par ``'>>> '``." -#: library/doctest.rst:384 +#: library/doctest.rst:380 msgid "What's the Execution Context?" msgstr "Quel est le contexte d'exécution ?" -#: library/doctest.rst:386 +#: 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 " @@ -487,7 +487,7 @@ msgstr "" "que les noms définis précédemment dans la *docstring* en cours d'exécution. " "Les exemples ne peuvent voir les noms définis dans d'autres *docstrings*." -#: library/doctest.rst:394 +#: 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." @@ -496,11 +496,11 @@ msgstr "" "d'exécution en passant ``globs=your_dict`` à :func:`testmod` ou encore, à :" "func:`testfile`." -#: library/doctest.rst:401 +#: library/doctest.rst:397 msgid "What About Exceptions?" msgstr "Qu'en est-il des exceptions ?" -#: library/doctest.rst:403 +#: 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 " @@ -514,11 +514,11 @@ msgstr "" "chemin exact vers un fichier et les numéros de ligne), ceci est un cas où " "*doctest* fait un effort pour être flexible dans ce qu'il accepte." -#: library/doctest.rst:409 +#: library/doctest.rst:405 msgid "Simple example::" msgstr "Exemple simple ::" -#: library/doctest.rst:416 +#: 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." @@ -526,7 +526,7 @@ msgstr "" "Ce *doctest* réussit si :exc:`ValueError` est levée, avec le détail ``list." "remote(x): x not in list`` tel que montré." -#: library/doctest.rst:419 +#: 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 " @@ -536,7 +536,7 @@ msgstr "" "d'appels, qui peut être l'une des deux lignes suivantes, avec la même " "indentation que la première ligne de l'exemple ::" -#: library/doctest.rst:426 +#: 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, " @@ -547,7 +547,7 @@ msgstr "" "habituellement omise, ou est copiée verbatim à partir d'une séance " "interactive." -#: library/doctest.rst:430 +#: 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 " @@ -560,7 +560,7 @@ msgstr "" "l'exception a un détail sur plusieurs lignes, il est possible de prolonger " "sur plusieurs lignes ::" -#: library/doctest.rst:442 +#: 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." @@ -569,7 +569,7 @@ msgstr "" "comparées avec le type et le détail de l'exception ; tout le reste est " "ignoré." -#: library/doctest.rst:445 +#: 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 " @@ -579,7 +579,7 @@ msgstr "" "celle-ci ait une valeur significative de documentation de l'exemple. Ainsi, " "le dernier exemple est probablement meilleur tel qui suit ::" -#: library/doctest.rst:455 +#: 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:" @@ -594,13 +594,13 @@ msgstr "" "(ou trois cents) virgules ou chiffres, ou une retranscription indentée d'une " "parodie de Monty Python." -#: library/doctest.rst:461 +#: 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:463 +#: 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 " @@ -617,7 +617,7 @@ msgstr "" "une sortie ordinaire commence rarement par une ligne d'en-tête de trace " "d'appels ; ainsi, ceci ne pose pas de vrai problème." -#: library/doctest.rst:470 +#: 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. " @@ -633,7 +633,7 @@ msgstr "" "début du détail de l'exception. Bien sûr, ceci fait la chose adéquate pour " "les traces d'appels véritables." -#: library/doctest.rst:476 +#: 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 " @@ -643,7 +643,7 @@ msgstr "" "tout ce qui suit le point-virgule se trouvant le plus à gauche ainsi que " "toute information liée au module dans le nom de l'exception sont ignorés." -#: library/doctest.rst:480 +#: 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 " @@ -659,7 +659,7 @@ msgstr "" "trace d'appels, il vous est nécessaire d'ajouter manuellement la ligne d'en-" "tête de la trace d'appels à l'exemple de test." -#: library/doctest.rst:488 +#: library/doctest.rst:484 msgid "" "For some :exc:`SyntaxError`\\ s, Python displays the character position of " "the syntax error, using a ``^`` marker::" @@ -667,7 +667,7 @@ msgstr "" "Pour certaines erreurs :exc:`SyntaxError`, Python affiche la position du " "caractère de l'erreur de syntaxe, en utilisant un marqueur ``^`` ::" -#: library/doctest.rst:497 +#: 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 " @@ -679,11 +679,11 @@ msgstr "" "exemple, le test suivant réussira, même si le marqueur ``^`` n'est pas à la " "bonne place ::" -#: library/doctest.rst:513 +#: library/doctest.rst:509 msgid "Option Flags" msgstr "Options de ligne de commande" -#: library/doctest.rst:515 +#: 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 :" @@ -700,11 +700,11 @@ msgstr "" "`, et peuvent être passés à l'interface de ligne de " "commande de *doctest* à l'aide de l'option ``-o``." -#: library/doctest.rst:521 +#: library/doctest.rst:517 msgid "The ``-o`` command line option." msgstr "L'option de ligne de commande ``-o``." -#: library/doctest.rst:524 +#: 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:" @@ -713,7 +713,7 @@ msgstr "" "contrôler comment *doctest* décide si la sortie obtenue correspond à la " "sortie attendue de l'exemple :" -#: library/doctest.rst:530 +#: 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 " @@ -731,11 +731,11 @@ msgstr "" "`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 " +"booléens ; les *doctests* s'attendant à une sortie de \"petit " +"entier\" (*little integer*) fonctionnent encore dans ces cas. Cette option " "disparaîtra probablement, mais pas avant plusieurs années." -#: library/doctest.rst:542 +#: 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 " @@ -751,7 +751,7 @@ msgstr "" "l'option :const:`DONT_ACCEPT_BLANKLINE` est précisée, cette substitution " "n'est pas permise." -#: library/doctest.rst:551 +#: 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 " @@ -769,7 +769,7 @@ msgstr "" "utile lorsqu'une ligne de sortie attendue est très longue, et que l'on " "souhaite la répartir sur plusieurs lignes dans le fichier source." -#: library/doctest.rst:562 +#: 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 " @@ -786,63 +786,31 @@ msgstr "" "correspondances !\" que l'utilisation de ``.*`` dans les expressions " "régulières." -#: library/doctest.rst:571 +#: library/doctest.rst:567 msgid "" -"When specified, an example that expects an exception passes if an exception " -"of the expected type is raised, even if the exception detail does not " -"match. For example, an example expecting ``ValueError: 42`` will pass if " -"the actual exception raised is ``ValueError: 3*14``, but will fail, e.g., " -"if :exc:`TypeError` is raised." +"When specified, doctests expecting exceptions pass so long as an exception " +"of the expected type is raised, even if the details (message and fully " +"qualified exception name) don't match." msgstr "" -"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." -#: library/doctest.rst:577 +#: library/doctest.rst:571 msgid "" -"It will also ignore the module name used in Python 3 doctest reports. Hence " -"both of these variations will work with the flag specified, regardless of " -"whether the test is run under Python 2.7 or Python 3.2 (or later versions)::" +"For example, an example expecting ``ValueError: 42`` will pass if the actual " +"exception raised is ``ValueError: 3*14``, but will fail if, say, a :exc:" +"`TypeError` is raised instead. It will also ignore any fully qualified name " +"included before the exception class, which can vary between implementations " +"and versions of Python and the code/libraries in use. Hence, all three of " +"these variations will work with the flag specified:" msgstr "" -"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) ::" -#: library/doctest.rst:589 +#: 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 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 ::" - -#: library/doctest.rst:603 -msgid "" -"passes under Python 2.3 and later Python versions with the flag specified, " -"even though the detail changed in Python 2.4 to say \"does not\" instead of " -"\"doesn't\"." -msgstr "" -"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)." - -#: library/doctest.rst:607 +"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." @@ -851,7 +819,7 @@ msgstr "" "information liée au module contenant l'exception qui est en train d'être " "testée." -#: library/doctest.rst:614 +#: 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, " @@ -867,26 +835,26 @@ msgstr "" "l'exemple peut dépendre de ressources inatteignables pour l'exécuteur de " "test." -#: library/doctest.rst:620 +#: 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:625 +#: 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:627 +#: 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:632 +#: library/doctest.rst:622 msgid "" "When specified, failures that involve multi-line expected and actual outputs " "are displayed using a unified diff." @@ -894,7 +862,7 @@ msgstr "" "Lorsque précisé, les défaillances qui font intervenir des sorties attendues " "et réelles multi-lignes sont affichées dans une *diff* unifiée." -#: library/doctest.rst:638 +#: library/doctest.rst:628 msgid "" "When specified, failures that involve multi-line expected and actual outputs " "will be displayed using a context diff." @@ -902,7 +870,7 @@ msgstr "" "Lorsque précisé, les défaillances qui font intervenir des sorties attendues " "et réelles multi-lignes sont affichées dans une *diff* de contexte." -#: library/doctest.rst:644 +#: library/doctest.rst: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 " @@ -919,7 +887,7 @@ msgstr "" "réelle contient la lettre ``l``, une ligne est insérée avec un marqueur " "caret démarquant les positions de colonnes où il n'y a pas de correspondance." -#: library/doctest.rst:653 +#: library/doctest.rst:643 msgid "" "When specified, display the first failing example in each doctest, but " "suppress output for all remaining examples. This will prevent doctest from " @@ -938,7 +906,7 @@ msgstr "" "exécutés, et sont toujours comptabilisés dans le nombre total des lignes " "échouant ; seulement la sortie est omise." -#: library/doctest.rst:664 +#: library/doctest.rst: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 " @@ -951,7 +919,7 @@ msgstr "" "durant le débogage, étant donné que les exemples suivant le premier échec ne " "produiront aucune sortie de débogage." -#: library/doctest.rst:669 +#: library/doctest.rst:659 msgid "" "The doctest command line accepts the option ``-f`` as a shorthand for ``-o " "FAIL_FAST``." @@ -959,13 +927,13 @@ msgstr "" "La ligne de commande de *doctest* accepte l'option ``-f`` comme un raccourci " "de ``-o FAIL_FAST``." -#: library/doctest.rst:677 +#: library/doctest.rst: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:680 +#: 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:" @@ -974,7 +942,7 @@ msgstr "" "ceci n'est pas utile sauf dans le cas où vous devez faire une extension pour " "le code interne de :mod:`doctest` par le biais d'une sous-classe :" -#: library/doctest.rst:686 +#: library/doctest.rst: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 :" @@ -990,11 +958,11 @@ msgstr "" "`register_optionflag` devrait toujours être appelée par l'expression " "suivante ::" -#: library/doctest.rst:702 +#: library/doctest.rst:692 msgid "Directives" msgstr "Instructions" -#: library/doctest.rst:704 +#: 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 " @@ -1005,7 +973,7 @@ msgstr "" "*doctest* sont des commentaires Python spéciaux suivant le code source d'un " "exemple :" -#: library/doctest.rst:715 +#: library/doctest.rst:705 #, fuzzy msgid "" "Whitespace is not allowed between the ``+`` or ``-`` and the directive " @@ -1016,7 +984,7 @@ msgstr "" "et le nom de l'option d'instruction. Le nom de l'option d'instruction peut " "être n'importe lequel des noms d'options expliqués ci-dessus." -#: library/doctest.rst:719 +#: library/doctest.rst: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." @@ -1025,16 +993,18 @@ msgstr "" "*doctest* et ce, seulement pour cet exemple. Utilisez ``+`` pour activer le " "comportement nommé, ou ``-`` pour le désactiver." -#: library/doctest.rst:722 -msgid "For example, this test passes::" +#: library/doctest.rst:712 +#, fuzzy +msgid "For example, this test passes:" msgstr "Par exemple, ce test réussit ::" -#: library/doctest.rst:728 +#: 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::" +"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 " @@ -1042,34 +1012,37 @@ msgstr "" "ligne. Ce test réussit aussi, et nécessite lui aussi une instruction pour ce " "faire ::" -#: library/doctest.rst:736 +#: library/doctest.rst:732 +#, fuzzy msgid "" "Multiple directives can be used on a single physical line, separated by " -"commas::" +"commas:" msgstr "" "Plusieurs instructions sont utilisées sur une unique ligne physique, " "séparées par des virgules ::" -#: library/doctest.rst:742 +#: library/doctest.rst:741 +#, fuzzy msgid "" "If multiple directive comments are used for a single example, then they are " -"combined::" +"combined:" msgstr "" "Si plusieurs commentaires d'instructions sont utilisés pour un exemple " "unique, alors ils sont combinés ::" -#: library/doctest.rst:749 +#: library/doctest.rst: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::" +"for a directive to comfortably fit on the same line:" msgstr "" "Comme l'exemple précédent le démontre, vous pouvez ajouter des lignes " "contenant des points de suspension ``...`` à votre exemple ne contenant que " "des instructions. Ceci peut être utile lorsqu'un exemple est trop long pour " "qu'une instruction puisse être écrite sur la même ligne ::" -#: library/doctest.rst:757 +#: library/doctest.rst: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 " @@ -1087,11 +1060,11 @@ msgstr "" "désactiver une option par l'utilisation de ``-`` dans une instruction peut " "être utile." -#: library/doctest.rst:767 +#: library/doctest.rst:772 msgid "Warnings" msgstr "Avertissements" -#: library/doctest.rst:769 +#: 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 " @@ -1108,41 +1081,34 @@ msgstr "" "ensemble (set), Python ne garantit pas que les éléments sont affichés dans " "un ordre particulier ; ainsi un test tel que ::" -#: library/doctest.rst:778 +#: library/doctest.rst:783 msgid "is vulnerable! One workaround is to do ::" msgstr "est vulnérable ! Une alternative est de faire ::" -#: library/doctest.rst:783 +#: library/doctest.rst:788 msgid "instead. Another is to do ::" msgstr "à la place. Une autre façon de faire est ::" -#: library/doctest.rst:791 -msgid "" -"Before Python 3.6, when printing a dict, Python did not guarantee that the " -"key-value pairs was printed in any particular order." -msgstr "" -"Avant Python 3.6, lorsque Python affichait un *dict*, il ne garantissait pas " -"que les paires clés-valeurs suivaient un ordre particulier." - #: library/doctest.rst:794 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 -msgid "" -"Another bad idea is to print things that embed an object address, like ::" +#, 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:804 +#: library/doctest.rst:806 +#, fuzzy msgid "" -"The :const:`ELLIPSIS` directive gives a nice approach for the last example::" +"The :const:`ELLIPSIS` directive gives a nice approach for the last example:" msgstr "" "L'instruction :const:`ELLIPSIS` donne une approche sympathique pour le " "dernier exemple ::" -#: library/doctest.rst:809 +#: library/doctest.rst:814 msgid "" "Floating-point numbers are also subject to small output variations across " "platforms, because Python defers to the platform C library for float " @@ -1154,7 +1120,7 @@ msgstr "" "des *floats*, et les bibliothèques C varient grandement pour ce qui de leur " "qualité sur ce point. ::" -#: library/doctest.rst:820 +#: library/doctest.rst:825 #, fuzzy msgid "" "Numbers of the form ``I/2.**J`` are safe across all platforms, and I often " @@ -1164,7 +1130,7 @@ msgstr "" "plateformes, et je restreins souvent les exemples *doctest* à produire des " "nombres ayant cette forme ::" -#: library/doctest.rst:826 +#: library/doctest.rst:831 msgid "" "Simple fractions are also easier for people to understand, and that makes " "for better documentation." @@ -1172,11 +1138,11 @@ msgstr "" "Les fractions simples sont aussi plus faciles à comprendre, et cela fait une " "meilleure documentation." -#: library/doctest.rst:833 +#: library/doctest.rst:838 msgid "Basic API" msgstr "API de base" -#: library/doctest.rst:835 +#: 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 " @@ -1189,7 +1155,7 @@ msgstr "" "voir les sections :ref:`doctest-simple-testmod` et :ref:`doctest-simple-" "testfile`." -#: library/doctest.rst:843 +#: library/doctest.rst:848 msgid "" "All arguments except *filename* are optional, and should be specified in " "keyword form." @@ -1197,7 +1163,7 @@ msgstr "" "Tous les arguments sauf *filename* sont optionnels, et doivent être précisés " "sous forme lettrée." -#: library/doctest.rst:846 +#: library/doctest.rst:851 msgid "" "Test examples in the file named *filename*. Return ``(failure_count, " "test_count)``." @@ -1205,7 +1171,7 @@ msgstr "" "Teste les exemples dans le fichier nommé *filename*. Renvoie " "``(failure_count, test_count)``." -#: library/doctest.rst:849 +#: library/doctest.rst:854 msgid "" "Optional argument *module_relative* specifies how the filename should be " "interpreted:" @@ -1213,7 +1179,7 @@ msgstr "" "L'argument optionnel *module_relative* précise comment le nom de fichier " "doit être interprété :" -#: library/doctest.rst:852 +#: 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 " @@ -1231,7 +1197,7 @@ msgstr "" "séparer chaque segment de chemin, et ne peut pas être un chemin absolu " "(c'est-à-dire qu'il ne peut pas commencer par ``/``)." -#: library/doctest.rst:859 +#: library/doctest.rst: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 " @@ -1241,7 +1207,7 @@ msgstr "" "chemin en fonction du système d'exploitation. Le chemin peut être absolu ou " "relatif ; les chemins relatifs sont résolus en rapport au répertoire actif." -#: library/doctest.rst:863 +#: library/doctest.rst:868 msgid "" "Optional argument *name* gives the name of the test; by default, or if " "``None``, ``os.path.basename(filename)`` is used." @@ -1249,7 +1215,7 @@ msgstr "" "L'option *name* désigne le nom du test ; par défaut, ou si ``None`` est " "passé en argument, ``os.path.basename(filename)`` est utilisé." -#: library/doctest.rst:866 +#: library/doctest.rst: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-" @@ -1264,7 +1230,7 @@ msgstr "" "les noms de fichiers liés au module. C'est une erreur que de spécifier " "*package* si *module_relative* a ``False`` comme valeur." -#: library/doctest.rst:872 +#: library/doctest.rst: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 " @@ -1276,7 +1242,7 @@ msgstr "" "le *doctest* ; ainsi, ces exemples commencent avec un état vide. Par défaut, " "ou si ``None`` est passé en argument, un nouveau *dict* vide est utilisé." -#: library/doctest.rst:877 +#: library/doctest.rst: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 " @@ -1299,7 +1265,7 @@ msgstr "" "tester un nombre indéfini de sous-classes en passant un *dict* *extraglobs* " "reliant le nom générique à la sous-classe qui doit être testée." -#: library/doctest.rst:886 +#: library/doctest.rst: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 ``'-" @@ -1310,7 +1276,7 @@ msgstr "" "défaut, ou si ``None``, celle-ci est vraie si et seulement si ``-v`` est " "présent dans ``sys.argv``." -#: library/doctest.rst:890 +#: library/doctest.rst: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 " @@ -1320,7 +1286,7 @@ msgstr "" "n'est affiché à la fin. En mode *verbose*, le résumé est détaillé, sinon le " "résumé est très bref (en fait, vide si tous les tests ont réussi)." -#: library/doctest.rst:894 +#: library/doctest.rst:899 msgid "" "Optional argument *optionflags* (default value 0) takes the :ref:`bitwise OR " "` of option flags. See section :ref:`doctest-options`." @@ -1329,7 +1295,7 @@ msgstr "" "valeur :ref:`bitwise OR ` des options de ligne de commande. Voir la " "section :ref:`doctest-options`." -#: library/doctest.rst:898 +#: 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. " @@ -1342,7 +1308,7 @@ msgstr "" "lors d'un post-mortem. Le comportement par défaut est de poursuivre " "l'exécution des exemples." -#: library/doctest.rst:1043 +#: library/doctest.rst: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 " @@ -1353,7 +1319,7 @@ msgstr "" "Par défaut, on utilise un analyseur normal (c'est-à-dire, " "``DocTestParser()``)." -#: library/doctest.rst:1047 +#: library/doctest.rst:1052 msgid "" "Optional argument *encoding* specifies an encoding that should be used to " "convert the file to unicode." @@ -1361,7 +1327,7 @@ msgstr "" "L'option *encoding* définit un encodage à utiliser pour convertir le fichier " "en format *unicode*." -#: library/doctest.rst:913 +#: library/doctest.rst:918 msgid "" "All arguments are optional, and all except for *m* should be specified in " "keyword form." @@ -1369,7 +1335,7 @@ msgstr "" "Toutes les options sont facultatives, et toutes sauf *m* doivent être " "définies en format lettré." -#: library/doctest.rst:916 +#: 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``), " @@ -1379,7 +1345,7 @@ msgstr "" "accessibles depuis le module *m* (ou depuis le module :mod:`__main__` si *m* " "n'a pas été défini ou est ``None``), en commençant par ``m.__doc__``." -#: library/doctest.rst:920 +#: library/doctest.rst: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 " @@ -1393,18 +1359,18 @@ msgstr "" "classes sont fouillées pour des exemples ; les chaînes de caractères sont " "fouillées directement, comme si elles étaient des *docstrings*." -#: library/doctest.rst:925 +#: library/doctest.rst: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:927 +#: library/doctest.rst:932 msgid "Return ``(failure_count, test_count)``." msgstr "Renvoie ``(failure_count, test_count)``." -#: library/doctest.rst:929 +#: library/doctest.rst:934 msgid "" "Optional argument *name* gives the name of the module; by default, or if " "``None``, ``m.__name__`` is used." @@ -1412,7 +1378,7 @@ msgstr "" "L'option *name* donne le nom du module ; par défaut, ou si ``None``, ``m." "__name__`` est utilisé." -#: library/doctest.rst:932 +#: library/doctest.rst: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 " @@ -1430,7 +1396,7 @@ msgstr "" "*exclude_empty* dans le constructeur de la classe plus récente :class:" "`DocTestFinder` prend vrai comme valeur par défaut." -#: library/doctest.rst:939 +#: library/doctest.rst:944 msgid "" "Optional arguments *extraglobs*, *verbose*, *report*, *optionflags*, " "*raise_on_error*, and *globs* are the same as for function :func:`testfile` " @@ -1440,7 +1406,7 @@ msgstr "" "*raise_on_error*, et *globs* sont les mêmes que pour la fonction :func:" "`testfile` ci-dessus, sauf pour *globs*, qui est ``m.__dict__`` par défaut." -#: library/doctest.rst:946 +#: library/doctest.rst:951 msgid "" "Test examples associated with object *f*; for example, *f* may be a string, " "a module, a function, or a class object." @@ -1448,7 +1414,7 @@ msgstr "" "Les exemples de test associés à l'objet *f* ; par exemple, *f* peut être une " "chaîne de caractères, un module, une fonction, ou un objet de classe." -#: library/doctest.rst:949 +#: library/doctest.rst:954 msgid "" "A shallow copy of dictionary argument *globs* is used for the execution " "context." @@ -1456,15 +1422,15 @@ msgstr "" "Une copie superficielle de l'argument-dictionnaire *globs* est utilisée pour " "le contexte d'exécution." -#: library/doctest.rst:951 +#: library/doctest.rst:956 msgid "" -"Optional argument *name* is used in failure messages, and defaults to ``" -"\"NoName\"``." +"Optional argument *name* is used in failure messages, and defaults to " +"``\"NoName\"``." msgstr "" -"L'option *name* est utilisée pour les messages d'échec, et prend ``\"NoName" -"\"`` comme valeur par défaut." +"L'option *name* est utilisée pour les messages d'échec, et prend " +"``\"NoName\"`` comme valeur par défaut." -#: library/doctest.rst:954 +#: library/doctest.rst: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 " @@ -1474,7 +1440,7 @@ msgstr "" "aucun échec. Par défaut, la sortie est générée seulement si un exemple " "échoue." -#: library/doctest.rst:957 +#: 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 " @@ -1486,18 +1452,18 @@ msgstr "" "``None``, les options sont inférées à partir de l'ensemble des " "fonctionnalités futures trouvées dans *globs*." -#: library/doctest.rst:961 +#: library/doctest.rst: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:967 +#: library/doctest.rst:972 msgid "Unittest API" msgstr "API de tests unitaires" -#: library/doctest.rst:969 +#: 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 " @@ -1514,7 +1480,7 @@ msgstr "" "`unittest`, il suffit d'ajouter une fonction :func:`load_tests` dans votre " "module de test ::" -#: library/doctest.rst:983 +#: library/doctest.rst:988 msgid "" "There are two main functions for creating :class:`unittest.TestSuite` " "instances from text files and modules with doctests:" @@ -1523,7 +1489,7 @@ msgstr "" "class:`unittest.TestSuite` à partir de fichiers textes et de modules ayant " "des *doctests* :" -#: library/doctest.rst:989 +#: library/doctest.rst:994 msgid "" "Convert doctest tests from one or more text files to a :class:`unittest." "TestSuite`." @@ -1531,7 +1497,7 @@ msgstr "" "Convertit des tests *doctest* à partir d'un ou plusieurs fichiers vers une " "classe :class:`unittest.TestSuite`." -#: library/doctest.rst:992 +#: 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 " @@ -1546,17 +1512,17 @@ msgstr "" "`failureException` est levée, affichant le nom du fichier contenant le test " "et un numéro de ligne (celui-ci est parfois approximatif)." -#: library/doctest.rst:998 +#: library/doctest.rst: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:1000 +#: 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:1002 +#: library/doctest.rst:1007 msgid "" "Optional argument *module_relative* specifies how the filenames in *paths* " "should be interpreted:" @@ -1564,7 +1530,7 @@ msgstr "" "L'option *module_relative* précise comment les noms de fichiers dans *paths* " "doivent être interprétés :" -#: library/doctest.rst:1005 +#: library/doctest.rst:1010 msgid "" "If *module_relative* is ``True`` (the default), then each filename in " "*paths* specifies an OS-independent module-relative path. By default, this " @@ -1583,7 +1549,7 @@ msgstr "" "caractères ``/`` afin de séparer les segments de chemin, et ne peut pas être " "un chemin absolu (c'est-à-dire, il ne peut pas commencer par ``/``)." -#: library/doctest.rst:1013 +#: library/doctest.rst: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 " @@ -1593,7 +1559,7 @@ msgstr "" "chemin en fonction du système d'exploitation. Le chemin peut être absolu ou " "relatif ; les chemins relatifs sont résolus en rapport au répertoire actif." -#: library/doctest.rst:1017 +#: library/doctest.rst: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-" @@ -1610,7 +1576,7 @@ msgstr "" "erreur que de spécifier *package* si *module_relative* a ``False`` comme " "valeur." -#: library/doctest.rst:1024 +#: 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 " @@ -1623,7 +1589,7 @@ msgstr "" "peut accéder aux valeurs globales du test par le biais de l'attribut *globs* " "du test passé." -#: library/doctest.rst:1029 +#: library/doctest.rst: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* " @@ -1636,7 +1602,7 @@ msgstr "" "fonction *setUp* peut accéder aux valeurs globales du test par l'attribut " "*globs* du test passé." -#: library/doctest.rst:1068 +#: 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 " @@ -1646,7 +1612,7 @@ msgstr "" "initiales pour les tests. Une nouvelle copie de ce dictionnaire est créée " "pour chaque test. Par défaut, *globs* est un nouveau dictionnaire vide." -#: library/doctest.rst:1038 +#: library/doctest.rst:1043 msgid "" "Optional argument *optionflags* specifies the default doctest options for " "the tests, created by or-ing together individual option flags. See section :" @@ -1659,7 +1625,7 @@ msgstr "" "func:`set_unittest_reportflags` ci-dessous pour une meilleure façon de " "préciser des options de rapport." -#: library/doctest.rst:1050 +#: library/doctest.rst:1055 msgid "" "The global ``__file__`` is added to the globals provided to doctests loaded " "from a text file using :func:`DocFileSuite`." @@ -1668,13 +1634,13 @@ msgstr "" "les *doctests*, ceux-ci étant téléchargés d'un fichier texte utilisant la " "fonction :func:`DocFileSuite`." -#: library/doctest.rst:1056 +#: library/doctest.rst: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:1058 +#: 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, " @@ -1689,7 +1655,7 @@ msgstr "" "affichant le nom du fichier contenant le test et un numéro de ligne pouvant " "être approximatif." -#: library/doctest.rst:1064 +#: 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 " @@ -1699,7 +1665,7 @@ msgstr "" "d'un objet-module ou celle du nom d'un module (possiblement *dotted*). Si " "non-précisée, le module appelant cette fonction est utilisé." -#: library/doctest.rst:1072 +#: library/doctest.rst:1077 msgid "" "Optional argument *extraglobs* specifies an extra set of global variables, " "which is merged into *globs*. By default, no extra globals are used." @@ -1708,7 +1674,7 @@ msgstr "" "globales, à fusionner avec *globs*. Par défaut, aucune variable globale " "supplémentaire est utilisée." -#: library/doctest.rst:1075 +#: 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." @@ -1717,7 +1683,7 @@ msgstr "" "remplacement *drop-in*) qui est utilisée pour extraire les *doctests* à " "partir du module." -#: library/doctest.rst:1078 +#: library/doctest.rst:1083 msgid "" "Optional arguments *setUp*, *tearDown*, and *optionflags* are the same as " "for function :func:`DocFileSuite` above." @@ -1725,12 +1691,12 @@ msgstr "" "Les options *setUp*, *tearDown* et *optionflags* sont les mêmes que pour la " "fonction :func:`DocFileSuite` ci-dessus." -#: library/doctest.rst:1081 +#: library/doctest.rst: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:1083 +#: library/doctest.rst:1088 msgid "" ":func:`DocTestSuite` returns an empty :class:`unittest.TestSuite` if " "*module* contains no docstrings instead of raising :exc:`ValueError`." @@ -1739,7 +1705,7 @@ msgstr "" "class:`unittest.TestSuite` si *module* ne contient aucune *docstring*, et " "ce, au lieu de lever l'exception :exc:`ValueError`." -#: library/doctest.rst:1088 +#: library/doctest.rst:1093 msgid "" "Under the covers, :func:`DocTestSuite` creates a :class:`unittest.TestSuite` " "out of :class:`doctest.DocTestCase` instances, and :class:`DocTestCase` is a " @@ -1754,7 +1720,7 @@ msgstr "" "interne), mais l'étude de son code peut répondre à des questions concernant " "les détails exacts de l'intégration du module :mod:`doctest`." -#: library/doctest.rst:1094 +#: library/doctest.rst:1099 msgid "" "Similarly, :func:`DocFileSuite` creates a :class:`unittest.TestSuite` out " "of :class:`doctest.DocFileCase` instances, and :class:`DocFileCase` is a " @@ -1764,7 +1730,7 @@ msgstr "" "TestSuite` à partir des instances :class:`doctest.DocFileCase`, où :class:" "`DocFileCase` est une sous-classe de :class:`DocTestCase`." -#: library/doctest.rst:1098 +#: 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 :" @@ -1789,7 +1755,7 @@ msgstr "" "de moyen de spécifier des options à l'attention des exécuteurs de test de :" "mod:`doctest` à partir de :mod:`unittest`." -#: library/doctest.rst:1108 +#: 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:" @@ -1798,12 +1764,12 @@ msgstr "" "de :mod:`doctest` qui soit spécifique à :mod:`unittest`, par le biais de " "cette fonction :" -#: library/doctest.rst:1114 +#: 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:1116 +#: 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." @@ -1812,7 +1778,7 @@ msgstr "" "arguments. Voir la section :ref:`doctest-options`. Ce sont uniquement les " "\"options de rapport\" qui peuvent être utilisées." -#: library/doctest.rst:1119 +#: library/doctest.rst: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` " @@ -1838,7 +1804,7 @@ msgstr "" "construite, les options de rapport du module :mod:`unittest` de :mod:" "`doctest` sont ignorées." -#: library/doctest.rst:1130 +#: 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." @@ -1846,11 +1812,11 @@ msgstr "" "La valeur prise par les options de rapport de :mod:`unittest` et ce, avant " "que la fonction n'ait été appelée, est renvoyée par la fonction." -#: library/doctest.rst:1137 +#: library/doctest.rst:1142 msgid "Advanced API" msgstr "API avancé" -#: library/doctest.rst:1139 +#: 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 " @@ -1858,13 +1824,13 @@ msgid "" "doctest's capabilities, then you should use the advanced API." msgstr "" -#: library/doctest.rst:1144 +#: 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:1147 +#: library/doctest.rst:1152 msgid "" ":class:`Example`: A single Python :term:`statement`, paired with its " "expected output." @@ -1872,7 +1838,7 @@ msgstr "" ":class:`Example` : Un unique :term:`statement` Python, pris conjointement " "avec sa sortie attendue." -#: library/doctest.rst:1150 +#: library/doctest.rst:1155 msgid "" ":class:`DocTest`: A collection of :class:`Example`\\ s, typically extracted " "from a single docstring or text file." @@ -1880,55 +1846,55 @@ msgstr "" ":class:`DocTest` : Une collection de :class:`Example`, habituellement " "extraits d'une seule *docstring* ou fichier texte." -#: library/doctest.rst:1153 +#: library/doctest.rst:1158 msgid "" "Additional processing classes are defined to find, parse, and run, and check " "doctest examples:" msgstr "" -#: library/doctest.rst:1156 +#: 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:1160 +#: 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:1163 +#: 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:1166 +#: 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:1169 +#: library/doctest.rst:1174 msgid "" "The relationships among these processing classes are summarized in the " "following diagram::" msgstr "" -#: library/doctest.rst:1185 +#: library/doctest.rst:1190 msgid "DocTest Objects" msgstr "Objets *doctest*" -#: library/doctest.rst:1190 +#: 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:1194 +#: library/doctest.rst:1199 msgid "" ":class:`DocTest` defines the following attributes. They are initialized by " "the constructor, and should not be modified directly." @@ -1936,13 +1902,13 @@ msgstr "" ":class:`DocTest` définit les attributs suivants. Ils sont initialisés par le " "constructeur, et ne doivent pas être modifiés directement." -#: library/doctest.rst:1200 +#: library/doctest.rst: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:1206 +#: 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 " @@ -1950,57 +1916,57 @@ msgid "" "`globs` after the test is run." msgstr "" -#: library/doctest.rst:1214 +#: 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:1220 +#: 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:1227 +#: 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:1234 +#: 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:1241 +#: library/doctest.rst:1246 msgid "Example Objects" msgstr "Exemples d'objets" -#: library/doctest.rst:1246 +#: 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:1251 +#: 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:1257 +#: 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:1264 +#: 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 " @@ -2008,7 +1974,7 @@ msgid "" "The constructor adds a newline when necessary." msgstr "" -#: library/doctest.rst:1272 +#: 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 " @@ -2017,20 +1983,20 @@ msgid "" "unless it's ``None``. The constructor adds a newline if needed." msgstr "" -#: library/doctest.rst:1281 +#: 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:1288 +#: 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:1294 +#: 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 " @@ -2039,11 +2005,11 @@ msgid "" "are set." msgstr "" -#: library/doctest.rst:1303 +#: library/doctest.rst:1308 msgid "DocTestFinder objects" msgstr "Objets *DocTestFinder*" -#: library/doctest.rst:1308 +#: 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 " @@ -2051,48 +2017,48 @@ msgid "" "classes, functions, methods, staticmethods, classmethods, and properties." msgstr "" -#: library/doctest.rst:1313 +#: 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:1316 +#: 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:1319 +#: 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:1322 +#: 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:1326 +#: 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:1331 +#: 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:1334 +#: 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:1338 +#: 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 " @@ -2100,26 +2066,26 @@ msgid "" "module is used:" msgstr "" -#: library/doctest.rst:1342 +#: library/doctest.rst:1347 msgid "As a default namespace, if *globs* is not specified." msgstr "" -#: library/doctest.rst:1344 +#: 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:1348 +#: 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:1350 +#: library/doctest.rst:1355 msgid "To help find the line number of the object within its file." msgstr "" -#: library/doctest.rst:1352 +#: 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 " @@ -2128,7 +2094,7 @@ msgid "" "contained objects will (recursively) be searched for doctests." msgstr "" -#: library/doctest.rst:1358 +#: 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 " @@ -2138,21 +2104,21 @@ msgid "" "defaults to ``{}``." msgstr "" -#: library/doctest.rst:1369 +#: library/doctest.rst:1374 msgid "DocTestParser objects" msgstr "Objets *DocTestParser*" -#: library/doctest.rst:1374 +#: 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:1446 +#: 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:1383 +#: library/doctest.rst:1388 msgid "" "Extract all doctest examples from the given string, and collect them into a :" "class:`DocTest` object." @@ -2160,7 +2126,7 @@ msgstr "" "Extrait tous les exemples de *doctests* à partir de la chaîne de caractère " "donnée, et les réunit dans un objet :class:`DocTest`." -#: library/doctest.rst:1386 +#: library/doctest.rst:1391 msgid "" "*globs*, *name*, *filename*, and *lineno* are attributes for the new :class:" "`DocTest` object. See the documentation for :class:`DocTest` for more " @@ -2170,7 +2136,7 @@ msgstr "" "nouvel objet :class:`DocTest`. Voir la documentation pour :class:`DocTest` " "pour plus d'information." -#: library/doctest.rst:1393 +#: 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 " @@ -2178,7 +2144,7 @@ msgid "" "error messages." msgstr "" -#: library/doctest.rst:1400 +#: 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 " @@ -2186,17 +2152,17 @@ msgid "" "name identifying this string, and is only used for error messages." msgstr "" -#: library/doctest.rst:1409 +#: library/doctest.rst:1414 msgid "DocTestRunner objects" msgstr "Objets *DocTestRunner*" -#: library/doctest.rst:1414 +#: library/doctest.rst:1419 msgid "" "A processing class used to execute and verify the interactive examples in a :" "class:`DocTest`." msgstr "" -#: library/doctest.rst:1417 +#: 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 " @@ -2206,7 +2172,7 @@ msgid "" "constructor." msgstr "" -#: library/doctest.rst:1423 +#: 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 " @@ -2217,14 +2183,14 @@ msgid "" "`report_unexpected_exception`, and :meth:`report_failure`." msgstr "" -#: library/doctest.rst:1431 +#: 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:1435 +#: library/doctest.rst:1440 msgid "" "The optional keyword argument *verbose* controls the :class:" "`DocTestRunner`'s verbosity. If *verbose* is ``True``, then information is " @@ -2233,56 +2199,56 @@ msgid "" "verbose output is used iff the command-line switch ``-v`` is used." msgstr "" -#: library/doctest.rst:1441 +#: 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:1451 +#: 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:1455 +#: 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:1462 +#: 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:1477 +#: 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:1473 +#: 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:1484 +#: 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:1488 +#: 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:" @@ -2290,13 +2256,13 @@ msgid "" "output function that was passed to :meth:`DocTestRunner.run`." msgstr "" -#: library/doctest.rst:1496 +#: 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:1499 +#: 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, " @@ -2304,39 +2270,39 @@ msgid "" "after the test completes, then use *clear_globs=False*." msgstr "" -#: library/doctest.rst:1504 +#: 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:1508 +#: 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:1515 +#: 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:1518 +#: 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:1525 +#: library/doctest.rst:1530 msgid "OutputChecker objects" msgstr "Objets *OutputChecker*" -#: library/doctest.rst:1530 +#: 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: :" @@ -2345,11 +2311,11 @@ msgid "" "string describing the differences between two outputs." msgstr "" -#: library/doctest.rst:1537 +#: 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:1541 +#: 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 " @@ -2358,23 +2324,23 @@ msgid "" "`doctest-options` for more information about option flags." msgstr "" -#: library/doctest.rst:1550 +#: 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:1558 +#: library/doctest.rst:1563 msgid "Debugging" msgstr "Débogage" -#: library/doctest.rst:1560 +#: 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:1562 +#: library/doctest.rst:1567 msgid "" "Several functions convert doctests to executable Python programs, which can " "be run under the Python debugger, :mod:`pdb`." @@ -2382,7 +2348,7 @@ msgstr "" "Plusieurs fonctions convertissent les *doctests* en programmes Python " "exécutables, qui peuvent être exécutés grâce au débogueur Python, :mod:`pdb`." -#: library/doctest.rst:1565 +#: library/doctest.rst:1570 msgid "" "The :class:`DebugRunner` class is a subclass of :class:`DocTestRunner` that " "raises an exception for the first failing example, containing information " @@ -2390,13 +2356,13 @@ msgid "" "debugging on the example." msgstr "" -#: library/doctest.rst:1570 +#: 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:1573 +#: 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 " @@ -2404,21 +2370,21 @@ msgid "" "`a.py` contains just this module docstring::" msgstr "" -#: library/doctest.rst:1588 +#: 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:1621 +#: 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:1627 +#: 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:1629 +#: 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 " @@ -2426,12 +2392,12 @@ msgid "" "generated script is returned as a string. For example, ::" msgstr "" -#: library/doctest.rst:1644 +#: library/doctest.rst:1649 #, fuzzy msgid "displays::" msgstr "affiche ::" -#: library/doctest.rst:1654 +#: 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 " @@ -2441,11 +2407,11 @@ msgstr "" "bas), mais peut aussi être utile lorsque l'on souhaite transformer une " "séance interactive de Python en script Python." -#: library/doctest.rst:1661 +#: library/doctest.rst:1666 msgid "Convert the doctest for an object to a script." msgstr "Convertit en script l'objet *doctest*." -#: library/doctest.rst:1663 +#: 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 " @@ -2455,7 +2421,7 @@ msgid "" "module :file:`a.py` contains a top-level function :func:`f`, then ::" msgstr "" -#: library/doctest.rst:1673 +#: 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." @@ -2463,11 +2429,11 @@ msgstr "" "affiche une version script de la *docstring* de la fonction :func:`f`, avec " "des *doctests* convertis en code, et le reste dans les commentaires." -#: library/doctest.rst:1679 +#: library/doctest.rst:1684 msgid "Debug the doctests for an object." msgstr "Débogue les *doctests* pour un objet." -#: library/doctest.rst:1681 +#: 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 " @@ -2475,7 +2441,7 @@ msgid "" "the control of the Python debugger, :mod:`pdb`." msgstr "" -#: library/doctest.rst:1686 +#: library/doctest.rst:1691 msgid "" "A shallow copy of ``module.__dict__`` is used for both local and global " "execution context." @@ -2483,7 +2449,7 @@ msgstr "" "Une copie superficielle de ``module.__dict__`` est utilisée à la fois pour " "les contextes d'exécution locaux et globaux." -#: library/doctest.rst:1689 +#: library/doctest.rst: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 " @@ -2495,11 +2461,11 @@ msgid "" "to :func:`pdb.run`." msgstr "" -#: library/doctest.rst:1700 +#: 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:1702 +#: 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." @@ -2508,7 +2474,7 @@ msgstr "" "qu'une chaîne de caractères contenant des exemples *doctest* est définie " "directement, par l'option *src*." -#: library/doctest.rst:1705 +#: library/doctest.rst:1710 msgid "" "Optional argument *pm* has the same meaning as in function :func:`debug` " "above." @@ -2516,7 +2482,7 @@ msgstr "" "L'option *pm* a la même définition que dans la fonction :func:`debug` ci-" "haut." -#: library/doctest.rst:1707 +#: library/doctest.rst: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 " @@ -2527,7 +2493,7 @@ msgstr "" "dictionnaire vide est utilisé. Si définie, une copie superficielle du " "dictionnaire est utilisée." -#: library/doctest.rst:1712 +#: 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 " @@ -2535,7 +2501,7 @@ msgid "" "(which is a doctest!) for more details:" msgstr "" -#: library/doctest.rst:1720 +#: 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:" @@ -2545,7 +2511,7 @@ msgid "" "the actual output." msgstr "" -#: library/doctest.rst:1727 +#: library/doctest.rst:1732 msgid "" "For information about the constructor parameters and methods, see the " "documentation for :class:`DocTestRunner` in section :ref:`doctest-advanced-" @@ -2555,7 +2521,7 @@ msgstr "" "la documentation pour la classe :class:`DocTestrunner` dans la section :reF:" "`doctest-advanced-api`." -#: library/doctest.rst:1730 +#: library/doctest.rst:1735 msgid "" "There are two exceptions that may be raised by :class:`DebugRunner` " "instances:" @@ -2563,7 +2529,7 @@ msgstr "" "Il y a deux exceptions qui peuvent être levées par des instances :class:" "`DebugRunner` :" -#: library/doctest.rst:1735 +#: 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 " @@ -2574,25 +2540,25 @@ msgstr "" "Les arguments du constructeur sont utilisés pour initialiser les attributs " "des mêmes noms." -#: library/doctest.rst:1739 +#: library/doctest.rst:1744 msgid ":exc:`DocTestFailure` defines the following attributes:" msgstr ":exc:`DocTestFailure` définit les attributs suivants :" -#: library/doctest.rst:1768 +#: 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:1773 +#: library/doctest.rst:1778 msgid "The :class:`Example` that failed." msgstr "L'exemple :class:`Example` qui a échoué." -#: library/doctest.rst:1754 +#: library/doctest.rst:1759 msgid "The example's actual output." msgstr "La sortie obtenue par l'exécution de l'exemple." -#: library/doctest.rst:1759 +#: 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 " @@ -2602,11 +2568,11 @@ msgstr "" "exemple *doctest* a levé une exception inattendue. Les arguments du " "constructeur sont utilisés pour initialiser les attributs des mêmes noms." -#: library/doctest.rst:1763 +#: library/doctest.rst:1768 msgid ":exc:`UnexpectedException` defines the following attributes:" msgstr ":exc:`UnexpectedException` définit les attributs suivants :" -#: library/doctest.rst:1778 +#: library/doctest.rst:1783 msgid "" "A tuple containing information about the unexpected exception, as returned " "by :func:`sys.exc_info`." @@ -2614,11 +2580,11 @@ msgstr "" "Un n-uplet contenant l'information au sujet de l'exception inattendue, telle " "que retourné par :func:`sys.exc_info`." -#: library/doctest.rst:1785 +#: library/doctest.rst:1790 msgid "Soapbox" msgstr "Éditorial" -#: library/doctest.rst:1787 +#: library/doctest.rst:1792 msgid "" "As mentioned in the introduction, :mod:`doctest` has grown to have three " "primary uses:" @@ -2626,26 +2592,26 @@ msgstr "" "Comme mentionné dans l'introduction, :mod:`doctest` a présentement trois " "usages principaux :" -#: library/doctest.rst:1790 +#: library/doctest.rst:1795 msgid "Checking examples in docstrings." msgstr "Vérifier les exemples dans les *docstrings*." -#: library/doctest.rst:1792 +#: library/doctest.rst:1797 msgid "Regression testing." msgstr "Test de régression." -#: library/doctest.rst:1794 +#: library/doctest.rst:1799 msgid "Executable documentation / literate testing." msgstr "De la documentation exécutable / des tests littéraires." -#: library/doctest.rst:1796 +#: 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:1800 +#: 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. " @@ -2657,7 +2623,7 @@ msgid "" "\"harmless\" change." msgstr "" -#: library/doctest.rst:1808 +#: 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 " @@ -2678,13 +2644,13 @@ msgid "" "different results, blurring the distinction between testing and explaining." msgstr "" -#: library/doctest.rst:1826 +#: 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:1829 +#: 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, " @@ -2692,7 +2658,7 @@ msgid "" "doctest." msgstr "" -#: library/doctest.rst:1834 +#: 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 " @@ -2700,13 +2666,13 @@ msgid "" "test file." msgstr "" -#: library/doctest.rst:1838 +#: library/doctest.rst:1843 msgid "" "Define a ``__test__`` dictionary mapping from regression test topics to " "docstrings containing test cases." msgstr "" -#: library/doctest.rst:1841 +#: 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-" @@ -2719,11 +2685,11 @@ msgstr "" "échouent et ce, tant que vous travaillez sur le problème. Voici un exemple " "minimal d'un test exécuteur de tests ::" -#: library/doctest.rst:1863 +#: library/doctest.rst:1868 msgid "Footnotes" msgstr "Notes" -#: library/doctest.rst:1864 +#: 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 " @@ -2733,3 +2699,66 @@ msgstr "" "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 index 40174038f6..1f0555fb70 100644 --- a/library/email.charset.po +++ b/library/email.charset.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" +"POT-Creation-Date: 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" @@ -97,15 +97,15 @@ msgstr "" #: library/email.charset.rst:60 msgid "" "If the character set must be encoded before it can be used in an email " -"header, this attribute will be set to ``Charset.QP`` (for quoted-printable), " -"``Charset.BASE64`` (for base64 encoding), or ``Charset.SHORTEST`` for the " +"header, this attribute will be set to ``charset.QP`` (for quoted-printable), " +"``charset.BASE64`` (for base64 encoding), or ``charset.SHORTEST`` for the " "shortest of QP or BASE64 encoding. Otherwise, it will be ``None``." msgstr "" #: library/email.charset.rst:69 msgid "" "Same as *header_encoding*, but describes the encoding for the mail message's " -"body, which indeed may be different than the header encoding. ``Charset." +"body, which indeed may be different than the header encoding. ``charset." "SHORTEST`` is not allowed for *body_encoding*." msgstr "" @@ -239,8 +239,8 @@ msgstr "" #: library/email.charset.rst:178 msgid "" -"Optional *header_enc* and *body_enc* is either ``Charset.QP`` for quoted-" -"printable, ``Charset.BASE64`` for base64 encoding, ``Charset.SHORTEST`` for " +"Optional *header_enc* and *body_enc* is either ``charset.QP`` for quoted-" +"printable, ``charset.BASE64`` for base64 encoding, ``charset.SHORTEST`` for " "the shortest of quoted-printable or base64 encoding, or ``None`` for no " "encoding. ``SHORTEST`` is only valid for *header_enc*. The default is " "``None`` for no encoding." diff --git a/library/email.compat32-message.po b/library/email.compat32-message.po index 01ef0937f6..9e00ce1bb0 100644 --- a/library/email.compat32-message.po +++ b/library/email.compat32-message.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-05-19 22:36+0200\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" @@ -120,7 +120,7 @@ msgstr "" 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 " +"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::" @@ -158,7 +158,7 @@ msgstr "" 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 " +"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::" @@ -351,7 +351,7 @@ 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`." +"charset of ``unknown-8bit``." msgstr "" #: library/email.compat32-message.rst:306 diff --git a/library/email.encoders.po b/library/email.encoders.po index 34a4df8721..b54990fc26 100644 --- a/library/email.encoders.po +++ b/library/email.encoders.po @@ -6,7 +6,7 @@ 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-09-04 03:06+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" @@ -113,7 +113,7 @@ msgstr "" "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. " +"caractères." #: library/email.encoders.rst:52 msgid "" diff --git a/library/email.generator.po b/library/email.generator.po index 3aaca2c8d6..9c762aacb4 100644 --- a/library/email.generator.po +++ b/library/email.generator.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-01 16:00+0200\n" +"POT-Creation-Date: 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" @@ -83,7 +83,7 @@ msgid "" "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 " +"for use when messages are stored in Unix mbox format (see :mod:`mailbox` and " "`WHY THE CONTENT-LENGTH FORMAT IS BAD `_)." msgstr "" diff --git a/library/email.header.po b/library/email.header.po index e761d13ceb..ee5c13ab2a 100644 --- a/library/email.header.po +++ b/library/email.header.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" +"POT-Creation-Date: 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" @@ -203,9 +203,9 @@ msgstr "" #: library/email.header.rst:138 msgid "" "*linesep* specifies the characters used to separate the lines of the folded " -"header. It defaults to the most useful value for Python application code (``" -"\\n``), but ``\\r\\n`` can be specified in order to produce headers with RFC-" -"compliant line separators." +"header. It defaults to the most useful value for Python application code " +"(``\\n``), but ``\\r\\n`` can be specified in order to produce headers with " +"RFC-compliant line separators." msgstr "" #: library/email.header.rst:143 diff --git a/library/email.headerregistry.po b/library/email.headerregistry.po index 6019a94e17..c5eeadd12d 100644 --- a/library/email.headerregistry.po +++ b/library/email.headerregistry.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" +"POT-Creation-Date: 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" @@ -177,8 +177,8 @@ msgstr "" msgid "" ":rfc:`5322` specifies a very specific format for dates within email headers. " "The ``DateHeader`` parser recognizes that date format, as well as " -"recognizing a number of variant forms that are sometimes found \"in the wild" -"\"." +"recognizing a number of variant forms that are sometimes found \"in the " +"wild\"." msgstr "" #: library/email.headerregistry.rst:146 library/email.headerregistry.rst:188 @@ -192,7 +192,7 @@ msgid "" "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`), " +"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 "" diff --git a/library/email.mime.po b/library/email.mime.po index bb758b7967..db0e1404c7 100644 --- a/library/email.mime.po +++ b/library/email.mime.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-01 16:00+0200\n" +"POT-Creation-Date: 2023-03-22 22:57+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -158,9 +158,9 @@ msgstr "Module : :mod:`email.mime.application`" 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* is a string containing the raw byte " -"data. Optional *_subtype* specifies the MIME subtype and defaults to :" -"mimetype:`octet-stream`." +"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 @@ -187,7 +187,7 @@ msgstr "Module : :mod:`email.mime.audio`" 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* is a string containing the raw audio data. " +"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 " @@ -215,7 +215,7 @@ msgstr "Module : :mod:`email.mime.image`" 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* is a string containing the raw image data. " +"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 " diff --git a/library/email.parser.po b/library/email.parser.po index 7c454ee1d2..34bbc08e90 100644 --- a/library/email.parser.po +++ b/library/email.parser.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-01 16:00+0200\n" +"POT-Creation-Date: 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" diff --git a/library/email.policy.po b/library/email.policy.po index a862b68eec..4d4317c016 100644 --- a/library/email.policy.po +++ b/library/email.policy.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-01 16:00+0200\n" +"POT-Creation-Date: 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" @@ -595,8 +595,8 @@ msgstr "" #: library/email.policy.rst:520 msgid "" "An instance of ``EmailPolicy`` with all defaults unchanged. This policy " -"uses the standard Python ``\\n`` line endings rather than the RFC-correct ``" -"\\r\\n``." +"uses the standard Python ``\\n`` line endings rather than the RFC-correct " +"``\\r\\n``." msgstr "" #: library/email.policy.rst:527 diff --git a/library/ensurepip.po b/library/ensurepip.po index 154944c75b..8a9fa271d5 100644 --- a/library/ensurepip.po +++ b/library/ensurepip.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-09-23 16:16+0200\n" +"POT-Creation-Date: 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" @@ -19,7 +19,11 @@ msgstr "" msgid ":mod:`ensurepip` --- Bootstrapping the ``pip`` installer" msgstr ":mod:`ensurepip` — Amorçage de l'installateur ``pip``" -#: library/ensurepip.rst:12 +#: 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 " @@ -35,7 +39,7 @@ msgstr "" "``pip`` dans les mises à jour de maintenance de l'interpréteur CPython comme " "dans les nouvelles versions principales." -#: library/ensurepip.rst:19 +#: 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 " @@ -48,7 +52,7 @@ msgstr "" "au moment de l'installation de Python (ou en créant un environnement " "virtuel), ou bien si ``pip`` a été désinstallé par l'utilisateur." -#: library/ensurepip.rst:27 +#: 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." @@ -56,40 +60,40 @@ msgstr "" "Ce module n'accède *pas* au réseau. Tout ce qu'il faut pour amorcer ``pip`` " "est compris dans le paquet." -#: library/ensurepip.rst:34 +#: library/ensurepip.rst:36 msgid ":ref:`installing-index`" msgstr ":ref:`installing-index`" -#: library/ensurepip.rst:34 +#: 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:36 +#: 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:37 +#: 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:41 +#: library/ensurepip.rst:43 msgid "Command line interface" msgstr "Interface en ligne de commande" -#: library/ensurepip.rst:43 +#: 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:45 +#: library/ensurepip.rst:47 msgid "The simplest possible invocation is::" msgstr "L'invocation la plus simple est ::" -#: library/ensurepip.rst:49 +#: 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 " @@ -101,7 +105,7 @@ msgstr "" "récente que celle embarquée dans ``ensurepip``, passer l'option ``--" "upgrade`` ::" -#: library/ensurepip.rst:56 +#: 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 " @@ -112,7 +116,7 @@ msgstr "" "en a un, ou bien dans le dossier ``site-packages`` du système. L'emplacement " "d'installation se règle à travers deux options :" -#: library/ensurepip.rst:61 +#: 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 " @@ -122,7 +126,7 @@ msgstr "" "*dossier* au lieu de la racine de l'environnement virtuel ou la racine par " "défaut de l'installation de Python." -#: library/ensurepip.rst:64 +#: 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 " @@ -132,7 +136,7 @@ msgstr "" "l'utilisateur au lieu du dossier global de l'installation de Python. Cette " "option n'est pas valide dans un environnement virtuel." -#: library/ensurepip.rst:68 +#: 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 " @@ -142,7 +146,7 @@ msgstr "" "version de Python avec laquelle ``ensurepip`` est utilisé). Cela se contrôle " "par deux options supplémentaires :" -#: library/ensurepip.rst:73 +#: library/ensurepip.rst:75 msgid "" "``--altinstall``: if an alternate installation is requested, the ``pipX`` " "script will *not* be installed." @@ -150,7 +154,7 @@ msgstr "" "``--altinstall`` : dans ce mode d'« installation parallèle », seule la " "commande ``pipX.Y`` est ajoutée, et pas la commande ``pipX``." -#: library/ensurepip.rst:76 +#: 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." @@ -158,22 +162,22 @@ msgstr "" "``--default-pip`` : ce mode d'« installation de la version par défaut » crée " "la commande ``pip`` en plus de ``pipX`` et ``pipX.Y``." -#: library/ensurepip.rst:79 +#: 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:83 +#: library/ensurepip.rst:85 msgid "Module API" msgstr "API du module" -#: library/ensurepip.rst:85 +#: 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:89 +#: library/ensurepip.rst:91 msgid "" "Returns a string specifying the available version of pip that will be " "installed when bootstrapping an environment." @@ -181,12 +185,12 @@ msgstr "" "Renvoie, sous forme de chaîne, la version de ``pip`` qui serait installée " "par ``ensurepip``." -#: library/ensurepip.rst:96 +#: 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:98 +#: 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 " @@ -196,7 +200,7 @@ msgstr "" "*root* vaut ``None`` (la valeur par défaut), l'installation se fait dans la " "racine par défaut pour l'environnement courant." -#: library/ensurepip.rst:102 +#: 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." @@ -205,7 +209,7 @@ msgstr "" "version plus ancienne de ``pip`` déjà installée vers la version embarquée " "dans ``ensurepip``." -#: library/ensurepip.rst:105 +#: library/ensurepip.rst:107 msgid "" "*user* indicates whether to use the user scheme rather than installing " "globally." @@ -214,7 +218,7 @@ msgstr "" "disponible pour cet utilisateur uniquement, et non pour tous les " "utilisateurs de l'installation de Python." -#: library/ensurepip.rst:108 +#: 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)." @@ -222,11 +226,11 @@ msgstr "" "Par défaut, les commandes créées sont ``pipX`` et ``pipX.Y`` (où X.Y est la " "version de Python)." -#: library/ensurepip.rst:111 +#: 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:113 +#: library/ensurepip.rst:115 msgid "" "If *default_pip* is set, then ``pip`` will be installed in addition to the " "two regular scripts." @@ -234,14 +238,14 @@ msgstr "" "Si *default_pip* vaut vrai, la commande ``pip`` est créée en plus des deux " "autres." -#: library/ensurepip.rst:116 +#: 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:119 +#: library/ensurepip.rst:121 msgid "" "*verbosity* controls the level of output to :data:`sys.stdout` from the " "bootstrapping operation." @@ -249,7 +253,7 @@ msgstr "" "*verbosity* règle le niveau de verbosité des messages émis sur :data:`sys." "stdout` pendant l'amorçage." -#: library/ensurepip.rst:122 +#: library/ensurepip.rst:124 msgid "" "Raises an :ref:`auditing event ` ``ensurepip.bootstrap`` with " "argument ``root``." @@ -257,7 +261,7 @@ msgstr "" "Cette fonction lève un :ref:`événement d'audit ` ``ensurepip." "bootstrap`` avec l'argument ``root``." -#: library/ensurepip.rst:126 +#: 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 " @@ -267,7 +271,7 @@ msgstr "" "environ``. Pour les éviter, on peut appeler l'interface en ligne de commande " "dans un sous-processus." -#: library/ensurepip.rst:132 +#: 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 " diff --git a/library/enum.po b/library/enum.po index c3fbc63a51..c1504b4a39 100644 --- a/library/enum.po +++ b/library/enum.po @@ -5,19 +5,19 @@ 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-12-11 11:26+0100\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 1.8.7.1\n" +"X-Generator: Poedit 3.0.1\n" #: library/enum.rst:2 msgid ":mod:`enum` --- Support for enumerations" -msgstr ":mod:`enum` — Énumerations" +msgstr ":mod:`enum` — Énumérations" #: library/enum.rst:14 msgid "**Source code:** :source:`Lib/enum.py`" @@ -31,18 +31,22 @@ msgid "" 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 entre eux et il est possible d'itérer sur " -"l'énumération elle-même." +"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 "" +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" @@ -56,7 +60,7 @@ msgid "" "`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`, :" +"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`." @@ -104,13 +108,12 @@ msgstr "" "un seul nom." #: library/enum.rst:65 -#, fuzzy msgid "" "Instances are replaced with an appropriate value for Enum members. By " "default, the initial value starts at 1." msgstr "" -"Les instances de cette classe remplacent les membres d'une *Enum* par une " -"valeur appropriée." +"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``" @@ -143,7 +146,7 @@ msgid "" "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`, :" +"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." @@ -180,7 +183,7 @@ msgid "" 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." +"quoi les Enums sont différentes ?`_ pour plus de détails." #: library/enum.rst:107 msgid "Enumeration members have human readable string representations::" @@ -313,20 +316,20 @@ msgstr "" "être redéfinie ::" #: library/enum.rst:279 -#, fuzzy msgid "" "The goal of the default :meth:`_generate_next_value_` method is to provide " "the next :class:`int` in sequence with the last :class:`int` provided, but " "the way it does this is an implementation detail and may change." msgstr "" -"La méthode par défaut :meth:`_generate_next_value_` doit fournir le :class:" -"`int` suivant de la séquence en fonction du dernier :class:`int` fourni, " -"mais la séquence générée dépend de l'implémentation Python." +"La méthode :meth:`_generate_next_value_` doit renvoyer le prochain :class:" +"`int` de la séquence à partir du dernier :class:`int` fourni, mais " +"l'implémentation de cette fonction peut changer." #: library/enum.rst:285 msgid "" "The :meth:`_generate_next_value_` method must be defined before any members." msgstr "" +"La méthode :meth:`_generate_next_value_` doit être définie avant tout membre." #: library/enum.rst:288 msgid "Iteration" @@ -414,7 +417,7 @@ msgstr "" #: library/enum.rst:380 msgid "Then::" -msgstr "amène ::" +msgstr "Amène ::" #: library/enum.rst:389 msgid "" @@ -434,15 +437,14 @@ msgstr "" "attr:`_ignore_`." #: library/enum.rst:396 -#, fuzzy msgid "" "Note: if your enumeration defines :meth:`__new__` and/or :meth:`__init__` " "then any value(s) given to the enum member will be passed into those " "methods. See `Planet`_ for an example." msgstr "" -"Remarque : si l'énumération définit :meth:`__new__` ou :meth:`__init__`, " -"alors la (ou les) valeur affectée au membre sera passée à ces méthodes. Voir " -"l'exemple de `Planet`_." +"Remarque : si votre énumération définit :meth:`__new__` ou :meth:`__init__`, " +"alors les valeurs affectées aux membres seront passées à ces méthodes. Voir " +"`Planet`_ pour exemple." #: library/enum.rst:402 msgid "Restricted Enum subclassing" @@ -499,7 +501,7 @@ msgid "" 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 " +"module, car la déserialisation nécessite que ces *enums* puissent être " "importés depuis ce module." #: library/enum.rst:454 @@ -808,7 +810,7 @@ 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 " +"Donner un nom à la valeur « aucune option activée » ne change pas sa valeur " "booléenne ::" #: library/enum.rst:715 @@ -848,7 +850,7 @@ msgid "" "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 " +"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`." @@ -867,7 +869,6 @@ msgstr "" "comme dans l'exemple de :class:`IntEnum` ci-dessus." #: library/enum.rst:741 -#, fuzzy msgid "" "While :class:`Enum` can have members of any type, once you mix in an " "additional type, all the members must have values of that type, e.g. :class:" @@ -875,10 +876,10 @@ msgid "" "methods and don't specify another type." msgstr "" "Même si une classe :class:`Enum` peut avoir des membres de n'importe quel " -"type, dès lors qu'un type de mélange est ajouté, tous les membres doivent " -"être de ce type, p. ex. :class:`int` ci-dessus. Cette restriction ne " -"s'applique pas aux types de mélange qui ne font qu'ajouter des méthodes et " -"ne définissent pas de type de données, tels :class:`int` ou :class:`str`. " +"type, dès qu'un type est spécifié à la déclaration de la classe, alors tous " +"les membres doivent être de ce type, p. ex. :class:`int` ci-dessus. Cette " +"restriction ne s'applique pas aux classes dérivées qui n'ajoutent que des " +"méthodes supplémentaires sans spécifier un type de données." #: library/enum.rst:745 msgid "" @@ -893,16 +894,15 @@ msgstr "" #: library/enum.rst:748 msgid "" "%-style formatting: `%s` and `%r` call the :class:`Enum` class's :meth:" -"`__str__` and :meth:`__repr__` respectively; other codes (such as `%i` or `" -"%h` for IntEnum) treat the enum member as its mixed-in type." +"`__str__` and :meth:`__repr__` respectively; other codes (such as `%i` or " +"`%h` for IntEnum) treat the enum member as its mixed-in type." msgstr "" -"Formatage de style *%* : `%s` et `%r` appellent respectivement les méthodes :" -"meth:`__str__` et :meth:`__repr__` de la classe :class:`Enum` ; les autres " -"codes, comme `%i` ou `%h` pour *IntEnum*, s'appliquent au membre comme si " -"celui-ci était converti en son type de mélange." +"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 -#, fuzzy msgid "" ":ref:`Formatted string literals `, :meth:`str.format`, and :func:" "`format` will use the mixed-in type's :meth:`__format__` unless :meth:" @@ -911,10 +911,13 @@ msgid "" "and !r format codes to force usage of the :class:`Enum` class's :meth:" "`__str__` and :meth:`__repr__` methods." msgstr "" -":ref:`Chaînes de caractères formatées littérales ` : :meth:`str." -"format` et :func:`format` appellent la méthode :meth:`__format__` du type de " -"mélange. Pour appeler les fonctions :func:`str` ou :func:`repr` de la " -"classe :class:`Enum`, il faut utiliser les codes de formatage `!s` ou `!r`." +"Les :ref:`chaînes littérales formatées ` : :meth:`str.format` et :" +"func:`format` appellent la méthode :meth:`__format__` du type dérivé à moins " +"que :meth:`__str__` ou :meth:`__format__` soit surchargée dans la sous-" +"classe, auquel cas les méthodes surchargées ou celles de la classe :class:" +"`Enum` seront utilisées. Pour appeler les méthodes :meth:`__str__` ou :meth:" +"`__repr__` de la classe :class:`Enum`, il faut utiliser les codes de " +"formatage ``!s`` ou ``!r``." #: library/enum.rst:759 msgid "When to use :meth:`__new__` vs. :meth:`__init__`" @@ -926,6 +929,10 @@ msgid "" "of the :class:`Enum` member. Any other modifications may go in either :meth:" "`__new__` or :meth:`__init__`, with :meth:`__init__` being preferred." msgstr "" +":meth:`__new__` doit être utilisé dès que vous souhaitez personnaliser la " +"valeur effective des membres d'un :class:`Enum`. Tout autre modification " +"peut autant aller dans :meth:`__new__` que dans :meth:`__init__`, mais " +"l'usage de :meth:`__init__` est recommandé." #: library/enum.rst:765 msgid "" @@ -963,7 +970,7 @@ msgid "" 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 :" +"simple :" #: library/enum.rst:805 msgid "use instances of :class:`auto` for the value" @@ -1042,12 +1049,16 @@ msgid "" "To make a more general purpose ``AutoNumber``, add ``*args`` to the " "signature::" msgstr "" +"Pour définir un ``AutoNumber`` plus générique, ajoutez ``*args`` à la " +"signature ::" #: library/enum.rst:900 msgid "" "Then when you inherit from ``AutoNumber`` you can write your own " "``__init__`` to handle any extra arguments::" msgstr "" +"Ainsi, quand vous héritez d'``AutoNumber``, vous pouvez définir ``__init__`` " +"pour gérer tout argument supplémentaire ::" #: library/enum.rst:919 msgid "" @@ -1118,7 +1129,7 @@ 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 ?" +msgstr "En quoi les *Enums* sont différentes ?" #: library/enum.rst:1045 msgid "" @@ -1126,7 +1137,7 @@ msgid "" "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 leur instances (membres)." +"classes dérivées de *Enum* et de leurs instances (membres)." #: library/enum.rst:1050 msgid "Enum Classes" @@ -1145,8 +1156,8 @@ 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 " +"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__`)." @@ -1208,7 +1219,7 @@ msgstr "``_name_`` -- nom du membre" 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 " +"``_value_`` -- valeur du membre ; il est possible d'y accéder ou de la muer " "dans ``__new__``" #: library/enum.rst:1091 @@ -1220,15 +1231,14 @@ msgstr "" "n'est pas trouvée ; elle peut être redéfinie" #: library/enum.rst:1093 -#, fuzzy msgid "" "``_ignore_`` -- a list of names, either as a :class:`list` or a :class:" "`str`, that will not be transformed into members, and will be removed from " "the final class" msgstr "" -"``_ignore_`` -- une liste de noms, sous la forme de :func:`list` ou de :func:" -"`str`, qui ne seront pas transformés en membres, et seront supprimés de la " -"classe résultante" +"``_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 "" @@ -1276,7 +1286,7 @@ msgstr "" #: library/enum.rst:1126 msgid "_Private__names" -msgstr "" +msgstr "_Noms__privés" #: library/enum.rst:1128 msgid "" @@ -1285,6 +1295,10 @@ msgid "" "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" @@ -1309,7 +1323,7 @@ msgstr "" #: library/enum.rst:1155 msgid "This behavior is deprecated and will be removed in 3.11." -msgstr "" +msgstr "Ce comportement est obsolète et sera retiré en 3.11." #: library/enum.rst:1161 msgid "Boolean value of ``Enum`` classes and members" @@ -1366,3 +1380,6 @@ msgid "" "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 index 8fbcdbf3ad..577d4f5bf9 100644 --- a/library/errno.po +++ b/library/errno.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" +"POT-Creation-Date: 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" @@ -20,10 +20,11 @@ msgid ":mod:`errno` --- Standard errno system symbols" msgstr ":mod:`errno` — Symboles du système *errno* standard" #: library/errno.rst:9 +#, fuzzy msgid "" "This module makes available standard ``errno`` system symbols. The value of " "each symbol is the corresponding integer value. The names and descriptions " -"are borrowed from :file:`linux/include/errno.h`, which should be pretty all-" +"are borrowed from :file:`linux/include/errno.h`, which should be all-" "inclusive." msgstr "" "Ce module met à disposition des symboles du système standard ``errno``. La " @@ -61,495 +62,602 @@ msgstr "" "symboles disponibles font partie de cette liste :" #: library/errno.rst:30 -msgid "Operation not permitted" -msgstr "Opération interdite" - -#: library/errno.rst:35 -msgid "No such file or directory" -msgstr "Fichier ou répertoire inexistant" +#, fuzzy +msgid "" +"Operation not permitted. This error is mapped to the exception :exc:" +"`PermissionError`." +msgstr "Cette erreur est associée à l'exception :exc:`InterruptedError`." -#: library/errno.rst:40 -msgid "No such process" -msgstr "Processus inexistant" +#: library/errno.rst:36 +#, fuzzy +msgid "" +"No such file or directory. This error is mapped to the exception :exc:" +"`FileNotFoundError`." +msgstr "Cette erreur est associée à l'exception :exc:`InterruptedError`." -#: library/errno.rst:45 -msgid "Interrupted system call." -msgstr "Appel système interrompu" +#: library/errno.rst:42 +#, fuzzy +msgid "" +"No such process. This error is mapped to the exception :exc:" +"`ProcessLookupError`." +msgstr "Cette erreur est associée à l'exception :exc:`InterruptedError`." #: library/errno.rst:48 -msgid "This error is mapped to the exception :exc:`InterruptedError`." +#, fuzzy +msgid "" +"Interrupted system call. This error is mapped to the exception :exc:" +"`InterruptedError`." msgstr "Cette erreur est associée à l'exception :exc:`InterruptedError`." -#: library/errno.rst:53 +#: library/errno.rst:54 msgid "I/O error" msgstr "Erreur d'entrée-sortie" -#: library/errno.rst:58 +#: library/errno.rst:59 msgid "No such device or address" msgstr "Dispositif ou adresse inexistant" -#: library/errno.rst:63 +#: library/errno.rst:64 msgid "Arg list too long" msgstr "Liste d'arguments trop longue" -#: library/errno.rst:68 +#: library/errno.rst:69 msgid "Exec format error" msgstr "Erreur de format d'exécution" -#: library/errno.rst:73 +#: library/errno.rst:74 msgid "Bad file number" msgstr "Mauvais descripteur de fichier" -#: library/errno.rst:78 -msgid "No child processes" -msgstr "Pas de processus fils" +#: library/errno.rst:79 +#, fuzzy +msgid "" +"No child processes. This error is mapped to the exception :exc:" +"`ChildProcessError`." +msgstr "Cette erreur est associée à l'exception :exc:`InterruptedError`." -#: library/errno.rst:83 -msgid "Try again" -msgstr "Ressource temporairement indisponible (réessayez)" +#: library/errno.rst:85 +#, fuzzy +msgid "" +"Try again. This error is mapped to the exception :exc:`BlockingIOError`." +msgstr "Cette erreur est associée à l'exception :exc:`InterruptedError`." -#: library/errno.rst:88 +#: library/errno.rst:90 msgid "Out of memory" msgstr "Mémoire insuffisante" -#: library/errno.rst:93 -msgid "Permission denied" -msgstr "Autorisation refusée" +#: library/errno.rst:95 +#, fuzzy +msgid "" +"Permission denied. This error is mapped to the exception :exc:" +"`PermissionError`." +msgstr "Cette erreur est associée à l'exception :exc:`InterruptedError`." -#: library/errno.rst:98 +#: library/errno.rst:101 msgid "Bad address" msgstr "Mauvaise adresse" -#: library/errno.rst:103 +#: library/errno.rst:106 msgid "Block device required" msgstr "Dispositif de bloc requis" -#: library/errno.rst:108 +#: library/errno.rst:111 msgid "Device or resource busy" msgstr "Dispositif ou ressource occupé" -#: library/errno.rst:113 -msgid "File exists" -msgstr "Fichier déjà existant" +#: library/errno.rst:116 +#, fuzzy +msgid "" +"File exists. This error is mapped to the exception :exc:`FileExistsError`." +msgstr "Cette erreur est associée à l'exception :exc:`InterruptedError`." -#: library/errno.rst:118 +#: library/errno.rst:122 msgid "Cross-device link" msgstr "Lien inapproprié" -#: library/errno.rst:123 +#: library/errno.rst:127 msgid "No such device" msgstr "Dispositif inexistant" -#: library/errno.rst:128 -msgid "Not a directory" -msgstr "Pas un répertoire" - -#: library/errno.rst:133 -msgid "Is a directory" -msgstr "Est un répertoire" +#: library/errno.rst:132 +#, fuzzy +msgid "" +"Not a directory. This error is mapped to the exception :exc:" +"`NotADirectoryError`." +msgstr "Cette erreur est associée à l'exception :exc:`InterruptedError`." #: library/errno.rst:138 +#, fuzzy +msgid "" +"Is a directory. This error is mapped to the exception :exc:" +"`IsADirectoryError`." +msgstr "Cette erreur est associée à l'exception :exc:`InterruptedError`." + +#: library/errno.rst:144 msgid "Invalid argument" msgstr "Argument invalide" -#: library/errno.rst:143 +#: library/errno.rst:149 msgid "File table overflow" msgstr "Plus de descripteur de fichier disponible" -#: library/errno.rst:148 +#: library/errno.rst:154 msgid "Too many open files" msgstr "Trop de fichiers ouverts" -#: library/errno.rst:153 +#: library/errno.rst:159 msgid "Not a typewriter" msgstr "Opération de contrôle d'entrée-sortie invalide" -#: library/errno.rst:158 +#: library/errno.rst:164 msgid "Text file busy" msgstr "Fichier texte occupé" -#: library/errno.rst:163 +#: library/errno.rst:169 msgid "File too large" msgstr "Fichier trop grand" -#: library/errno.rst:168 +#: library/errno.rst:174 msgid "No space left on device" msgstr "Plus de place sur le dispositif" -#: library/errno.rst:173 +#: library/errno.rst:179 msgid "Illegal seek" msgstr "Recherche invalide" -#: library/errno.rst:178 +#: library/errno.rst:184 msgid "Read-only file system" msgstr "Système de fichiers en lecture seule" -#: library/errno.rst:183 +#: library/errno.rst:189 msgid "Too many links" msgstr "Trop de liens symboliques" -#: library/errno.rst:188 -msgid "Broken pipe" -msgstr "Tube brisé" +#: library/errno.rst:194 +#, fuzzy +msgid "" +"Broken pipe. This error is mapped to the exception :exc:`BrokenPipeError`." +msgstr "Cette erreur est associée à l'exception :exc:`InterruptedError`." -#: library/errno.rst:193 +#: library/errno.rst:200 msgid "Math argument out of domain of func" msgstr "Argument mathématique hors du domaine de définition de la fonction" -#: library/errno.rst:198 +#: library/errno.rst:205 msgid "Math result not representable" msgstr "Résultat mathématique non représentable" -#: library/errno.rst:203 +#: library/errno.rst:210 msgid "Resource deadlock would occur" msgstr "Un interblocage se produirait sur cette ressource" -#: library/errno.rst:208 +#: library/errno.rst:215 msgid "File name too long" msgstr "Nom de fichier trop long" -#: library/errno.rst:213 +#: library/errno.rst:220 msgid "No record locks available" msgstr "Plus de verrou de fichier disponible" -#: library/errno.rst:218 +#: library/errno.rst:225 msgid "Function not implemented" msgstr "Fonction non implémentée" -#: library/errno.rst:223 +#: library/errno.rst:230 msgid "Directory not empty" msgstr "Dossier non vide" -#: library/errno.rst:228 +#: library/errno.rst:235 msgid "Too many symbolic links encountered" msgstr "Trop de liens symboliques trouvés" -#: library/errno.rst:233 -msgid "Operation would block" -msgstr "L'opération bloquerait" +#: library/errno.rst:240 +#, fuzzy +msgid "" +"Operation would block. This error is mapped to the exception :exc:" +"`BlockingIOError`." +msgstr "Cette erreur est associée à l'exception :exc:`InterruptedError`." -#: library/errno.rst:238 +#: library/errno.rst:246 msgid "No message of desired type" msgstr "Pas de message du type voulu" -#: library/errno.rst:243 +#: library/errno.rst:251 msgid "Identifier removed" msgstr "Identifiant supprimé" -#: library/errno.rst:248 +#: library/errno.rst:256 msgid "Channel number out of range" msgstr "Le numéro de canal est hors des limites" -#: library/errno.rst:253 +#: library/errno.rst:261 msgid "Level 2 not synchronized" msgstr "Le niveau 2 n'est pas synchronisé" -#: library/errno.rst:258 +#: library/errno.rst:266 msgid "Level 3 halted" msgstr "Niveau 3 stoppé" -#: library/errno.rst:263 +#: library/errno.rst:271 msgid "Level 3 reset" msgstr "Niveau 3 réinitialisé" -#: library/errno.rst:268 +#: library/errno.rst:276 msgid "Link number out of range" msgstr "Le numéro du lien est hors des limites" -#: library/errno.rst:273 +#: library/errno.rst:281 msgid "Protocol driver not attached" msgstr "Le pilote de protocole n'est pas attaché" -#: library/errno.rst:278 +#: library/errno.rst:286 msgid "No CSI structure available" msgstr "Pas de structure *CSI* disponible" -#: library/errno.rst:283 +#: library/errno.rst:291 msgid "Level 2 halted" msgstr "Niveau 2 stoppé" -#: library/errno.rst:288 +#: library/errno.rst:296 msgid "Invalid exchange" msgstr "Échange invalide" -#: library/errno.rst:293 +#: library/errno.rst:301 msgid "Invalid request descriptor" msgstr "Descripteur de requête invalide" -#: library/errno.rst:298 +#: library/errno.rst:306 msgid "Exchange full" msgstr "Échange complet" -#: library/errno.rst:303 +#: library/errno.rst:311 msgid "No anode" msgstr "Pas de *anode*" -#: library/errno.rst:308 +#: library/errno.rst:316 msgid "Invalid request code" msgstr "Code de requête invalide" -#: library/errno.rst:313 +#: library/errno.rst:321 msgid "Invalid slot" msgstr "*Slot* invalide" -#: library/errno.rst:318 +#: library/errno.rst:326 msgid "File locking deadlock error" msgstr "Interblocage lors du verrouillage de fichier" -#: library/errno.rst:323 +#: library/errno.rst:331 msgid "Bad font file format" msgstr "Mauvais format de fichier de police" -#: library/errno.rst:328 +#: library/errno.rst:336 msgid "Device not a stream" msgstr "Le périphérique n'est pas un flux" -#: library/errno.rst:333 +#: library/errno.rst:341 msgid "No data available" msgstr "Pas de donnée disponible" -#: library/errno.rst:338 +#: library/errno.rst:346 msgid "Timer expired" msgstr "Délai maximal atteint" -#: library/errno.rst:343 +#: library/errno.rst:351 msgid "Out of streams resources" msgstr "Pas assez de ressources de type flux" -#: library/errno.rst:348 +#: library/errno.rst:356 msgid "Machine is not on the network" msgstr "Machine hors réseau" -#: library/errno.rst:353 +#: library/errno.rst:361 msgid "Package not installed" msgstr "Paquet non installé" -#: library/errno.rst:358 +#: library/errno.rst:366 msgid "Object is remote" msgstr "L'objet est distant" -#: library/errno.rst:363 +#: library/errno.rst:371 msgid "Link has been severed" msgstr "Lien coupé" -#: library/errno.rst:368 +#: library/errno.rst:376 msgid "Advertise error" msgstr "Erreur d'annonce" -#: library/errno.rst:373 +#: library/errno.rst:381 msgid "Srmount error" msgstr "Erreur *Srmount*" -#: library/errno.rst:378 +#: library/errno.rst:386 msgid "Communication error on send" msgstr "Erreur de communication lors de l'envoi" -#: library/errno.rst:383 +#: library/errno.rst:391 msgid "Protocol error" msgstr "Erreur de protocole" -#: library/errno.rst:388 +#: library/errno.rst:396 msgid "Multihop attempted" msgstr "Transfert à sauts multiples essayé" -#: library/errno.rst:393 +#: library/errno.rst:401 msgid "RFS specific error" msgstr "erreur spécifique *RFS*" -#: library/errno.rst:398 +#: library/errno.rst:406 msgid "Not a data message" msgstr "Pas un message de données" -#: library/errno.rst:403 +#: library/errno.rst:411 msgid "Value too large for defined data type" msgstr "Valeur trop grande pour être stockée dans ce type de donnée" -#: library/errno.rst:408 +#: library/errno.rst:416 msgid "Name not unique on network" msgstr "Nom non-unique dans le réseau" -#: library/errno.rst:413 +#: library/errno.rst:421 msgid "File descriptor in bad state" msgstr "Descripteur de fichier en mauvais état" -#: library/errno.rst:418 +#: library/errno.rst:426 msgid "Remote address changed" msgstr "Adresse distante changée" -#: library/errno.rst:423 +#: library/errno.rst:431 msgid "Can not access a needed shared library" msgstr "Accès impossible à une bibliothèque partagée nécessaire" -#: library/errno.rst:428 +#: library/errno.rst:436 msgid "Accessing a corrupted shared library" msgstr "Accès à une bibliothèque partagée corrompue" -#: library/errno.rst:433 +#: library/errno.rst:441 msgid ".lib section in a.out corrupted" msgstr "Section *.lib* de *a.out* corrompue" -#: library/errno.rst:438 +#: library/errno.rst:446 msgid "Attempting to link in too many shared libraries" msgstr "Tentative de liaison entre trop de bibliothèques partagées" -#: library/errno.rst:443 +#: library/errno.rst:451 msgid "Cannot exec a shared library directly" msgstr "Impossible d'exécuter directement une bibliothèque partagée" -#: library/errno.rst:448 +#: library/errno.rst:456 msgid "Illegal byte sequence" msgstr "Séquence de *bytes* illégale" -#: library/errno.rst:453 +#: library/errno.rst:461 msgid "Interrupted system call should be restarted" msgstr "Appel système interrompu qui devrait être relancé" -#: library/errno.rst:458 +#: library/errno.rst:466 msgid "Streams pipe error" msgstr "Erreur d’enchaînement de flux" -#: library/errno.rst:463 +#: library/errno.rst:471 msgid "Too many users" msgstr "Trop d'utilisateurs" -#: library/errno.rst:468 +#: library/errno.rst:476 msgid "Socket operation on non-socket" msgstr "" "Opération d'interface de connexion alors que ce n'est pas une interface de " "connexion" -#: library/errno.rst:473 +#: library/errno.rst:481 msgid "Destination address required" msgstr "Adresse de destination obligatoire" -#: library/errno.rst:478 +#: library/errno.rst:486 msgid "Message too long" msgstr "Message trop long" -#: library/errno.rst:483 +#: library/errno.rst:491 msgid "Protocol wrong type for socket" msgstr "Mauvais type de protocole pour ce connecteur" -#: library/errno.rst:488 +#: library/errno.rst:496 msgid "Protocol not available" msgstr "Protocole pas disponible" -#: library/errno.rst:493 +#: library/errno.rst:501 msgid "Protocol not supported" msgstr "Protocole non géré" -#: library/errno.rst:498 +#: library/errno.rst:506 msgid "Socket type not supported" msgstr "Type de connecteur non géré" -#: library/errno.rst:503 +#: library/errno.rst:511 msgid "Operation not supported on transport endpoint" msgstr "Opération non gérée par cette fin de lien" -#: library/errno.rst:508 +#: library/errno.rst:516 msgid "Protocol family not supported" msgstr "Famille de protocole non gérée" -#: library/errno.rst:513 +#: library/errno.rst:521 msgid "Address family not supported by protocol" msgstr "Famille d'adresses non gérée par ce protocole" -#: library/errno.rst:518 +#: library/errno.rst:526 msgid "Address already in use" msgstr "Adresse déjà utilisée" -#: library/errno.rst:523 +#: library/errno.rst:531 msgid "Cannot assign requested address" msgstr "Impossible d'assigner l'adresse demandée" -#: library/errno.rst:528 +#: library/errno.rst:536 msgid "Network is down" msgstr "Le réseau est désactivé" -#: library/errno.rst:533 +#: library/errno.rst:541 msgid "Network is unreachable" msgstr "Réseau inaccessible" -#: library/errno.rst:538 +#: library/errno.rst:546 msgid "Network dropped connection because of reset" msgstr "Connexion annulée par le réseau" -#: library/errno.rst:543 -msgid "Software caused connection abort" -msgstr "Connexion abandonnée" +#: library/errno.rst:551 +#, fuzzy +msgid "" +"Software caused connection abort. This error is mapped to the exception :exc:" +"`ConnectionAbortedError`." +msgstr "Cette erreur est associée à l'exception :exc:`InterruptedError`." -#: library/errno.rst:548 -msgid "Connection reset by peer" -msgstr "Connexion réinitialisée" +#: library/errno.rst:557 +#, fuzzy +msgid "" +"Connection reset by peer. This error is mapped to the exception :exc:" +"`ConnectionResetError`." +msgstr "Cette erreur est associée à l'exception :exc:`InterruptedError`." -#: library/errno.rst:553 +#: library/errno.rst:563 msgid "No buffer space available" msgstr "Plus d'espace tampon disponible" -#: library/errno.rst:558 +#: library/errno.rst:568 msgid "Transport endpoint is already connected" msgstr "L'interface de connexion est déjà connectée" -#: library/errno.rst:563 +#: library/errno.rst:573 msgid "Transport endpoint is not connected" msgstr "L'interface de connexion n'est pas connectée" -#: library/errno.rst:568 -msgid "Cannot send after transport endpoint shutdown" -msgstr "Impossible d'envoyer après l'arrêt du point final du transport" +#: library/errno.rst:578 +#, fuzzy +msgid "" +"Cannot send after transport endpoint shutdown. This error is mapped to the " +"exception :exc:`BrokenPipeError`." +msgstr "Cette erreur est associée à l'exception :exc:`InterruptedError`." -#: library/errno.rst:573 +#: library/errno.rst:584 msgid "Too many references: cannot splice" msgstr "Trop de descripteurs : impossible d'effectuer la liaison" -#: library/errno.rst:578 -msgid "Connection timed out" -msgstr "Délai maximal de connexion écoulé" +#: library/errno.rst:589 +#, fuzzy +msgid "" +"Connection timed out. This error is mapped to the exception :exc:" +"`TimeoutError`." +msgstr "Cette erreur est associée à l'exception :exc:`InterruptedError`." -#: library/errno.rst:583 -msgid "Connection refused" -msgstr "Connexion refusée" +#: library/errno.rst:595 +#, fuzzy +msgid "" +"Connection refused. This error is mapped to the exception :exc:" +"`ConnectionRefusedError`." +msgstr "Cette erreur est associée à l'exception :exc:`InterruptedError`." -#: library/errno.rst:588 +#: library/errno.rst:601 msgid "Host is down" msgstr "Hôte éteint" -#: library/errno.rst:593 +#: library/errno.rst:606 msgid "No route to host" msgstr "Pas de route vers l'hôte" -#: library/errno.rst:598 -msgid "Operation already in progress" -msgstr "Connexion déjà en cours" +#: library/errno.rst:611 +#, fuzzy +msgid "" +"Operation already in progress. This error is mapped to the exception :exc:" +"`BlockingIOError`." +msgstr "Cette erreur est associée à l'exception :exc:`InterruptedError`." -#: library/errno.rst:603 -msgid "Operation now in progress" -msgstr "Opération en cours" +#: library/errno.rst:617 +#, fuzzy +msgid "" +"Operation now in progress. This error is mapped to the exception :exc:" +"`BlockingIOError`." +msgstr "Cette erreur est associée à l'exception :exc:`InterruptedError`." -#: library/errno.rst:608 +#: library/errno.rst:623 msgid "Stale NFS file handle" msgstr "Descripteur de fichier NFS corrompu" -#: library/errno.rst:613 +#: library/errno.rst:628 msgid "Structure needs cleaning" msgstr "La structure a besoin d'être nettoyée" -#: library/errno.rst:618 +#: library/errno.rst:633 msgid "Not a XENIX named type file" msgstr "N'est pas un fichier nommé du type *XENIX*" -#: library/errno.rst:623 +#: library/errno.rst:638 msgid "No XENIX semaphores available" msgstr "Pas de sémaphore *XENIX* disponible" -#: library/errno.rst:628 +#: library/errno.rst:643 msgid "Is a named type file" msgstr "Est un fichier nommé" -#: library/errno.rst:633 +#: library/errno.rst:648 msgid "Remote I/O error" msgstr "Erreur d'entrées-sorties distante" -#: library/errno.rst:638 +#: library/errno.rst:653 msgid "Quota exceeded" msgstr "Quota dépassé" + +#~ msgid "Operation not permitted" +#~ msgstr "Opération interdite" + +#~ msgid "No such file or directory" +#~ msgstr "Fichier ou répertoire inexistant" + +#~ msgid "No such process" +#~ msgstr "Processus inexistant" + +#~ msgid "Interrupted system call." +#~ msgstr "Appel système interrompu" + +#~ msgid "No child processes" +#~ msgstr "Pas de processus fils" + +#~ msgid "Try again" +#~ msgstr "Ressource temporairement indisponible (réessayez)" + +#~ msgid "Permission denied" +#~ msgstr "Autorisation refusée" + +#~ msgid "File exists" +#~ msgstr "Fichier déjà existant" + +#~ msgid "Not a directory" +#~ msgstr "Pas un répertoire" + +#~ msgid "Is a directory" +#~ msgstr "Est un répertoire" + +#~ msgid "Broken pipe" +#~ msgstr "Tube brisé" + +#~ msgid "Operation would block" +#~ msgstr "L'opération bloquerait" + +#~ msgid "Software caused connection abort" +#~ msgstr "Connexion abandonnée" + +#~ msgid "Connection reset by peer" +#~ msgstr "Connexion réinitialisée" + +#~ msgid "Cannot send after transport endpoint shutdown" +#~ msgstr "Impossible d'envoyer après l'arrêt du point final du transport" + +#~ msgid "Connection timed out" +#~ msgstr "Délai maximal de connexion écoulé" + +#~ msgid "Connection refused" +#~ msgstr "Connexion refusée" + +#~ msgid "Operation already in progress" +#~ msgstr "Connexion déjà en cours" + +#~ msgid "Operation now in progress" +#~ msgstr "Opération en cours" diff --git a/library/exceptions.po b/library/exceptions.po index 5ba0781359..e303ce8e79 100644 --- a/library/exceptions.po +++ b/library/exceptions.po @@ -5,15 +5,15 @@ 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: 2020-10-15 09:04+0200\n" -"Last-Translator: Jules Lasne \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 2.2.3\n" +"X-Generator: Poedit 3.0\n" #: library/exceptions.rst:4 msgid "Built-in Exceptions" @@ -38,9 +38,9 @@ msgstr "" #: library/exceptions.rst:19 msgid "" "The built-in exceptions listed below can be generated by the interpreter or " -"built-in functions. Except where mentioned, they have an \"associated value" -"\" indicating the detailed cause of the error. This may be a string or a " -"tuple of several items of information (e.g., an error code and a string " +"built-in functions. Except where mentioned, they have an \"associated " +"value\" indicating the detailed cause of the error. This may be a string or " +"a tuple of several items of information (e.g., an error code and a string " "explaining the code). The associated value is usually passed as arguments " "to the exception class's constructor." msgstr "" @@ -62,7 +62,7 @@ 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 " +"exception ; mais attention car rien n'empêche du code utilisateur de lever " "une erreur inappropriée." #: library/exceptions.rst:31 @@ -74,46 +74,39 @@ msgid "" "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 ; 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 -#, fuzzy msgid "Exception context" -msgstr "Hiérarchie des exceptions" +msgstr "Contexte des exceptions" #: library/exceptions.rst:41 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." +"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 "" -"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." +"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 -#, fuzzy msgid "" -"When raising a new exception (rather than using a bare ``raise`` to re-raise " -"the exception currently being handled), the implicit exception context can " -"be supplemented with an explicit cause by using :keyword:`from` with :" -"keyword:`raise`::" +"This implicit exception context can be supplemented with an explicit cause " +"by using :keyword:`!from` with :keyword:`raise`::" msgstr "" -"En levant une nouvelle exception (plutôt que d'utiliser un simple ``raise`` " -"pour lever à nouveau l'exception en cours de traitement), le contexte " -"implicite d'exception peut être complété par une cause explicite en " -"utilisant :keyword:`from` avec :keyword:`raise` ::" +"Ce contexte implicite d'exception peut être complété par une cause explicite " +"en utilisant :keyword:`!from` avec :keyword:`raise` ::" -#: library/exceptions.rst:54 -#, fuzzy +#: 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. " @@ -124,16 +117,16 @@ msgid "" "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:" +"L'expression suivant :keyword:`from` doit être une exception ou " +"``None``. Elle sera assignée en tant que :attr:`__cause__` dans l'exception " +"levée. Changer :attr:`__cause__` change aussi implicitement l'attribut :attr:" "`__suppress_context__` à ``True``, de sorte que l'utilisation de ``raise " "new_exc from None`` remplace bien l'ancienne exception avec la nouvelle à " -"des fins d'affichage (e.g., convertir :exc:`KeyError` en :exc:" +"des fins d'affichage (par exemple, convertir :exc:`KeyError` en :exc:" "`AttributeError`), tout en laissant l'ancienne exception disponible dans :" "attr:`__context__` pour introspection lors du débogage." -#: library/exceptions.rst:63 +#: 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 " @@ -148,7 +141,7 @@ msgstr "" "affichée que si :attr:`__cause__` est :const:`None` et :attr:" "`__suppress_context__` est faux." -#: library/exceptions.rst:69 +#: 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 " @@ -158,20 +151,24 @@ msgstr "" "les exceptions enchaînées, de sorte que la dernière ligne de la trace " "d'appels montre toujours la dernière exception qui a été levée." -#: library/exceptions.rst:75 -#, fuzzy +#: library/exceptions.rst:74 msgid "Inheriting from built-in exceptions" -msgstr "La hiérarchie de classes pour les exceptions natives est la suivante :" +msgstr "Hériter des exceptions natives" -#: library/exceptions.rst:77 +#: 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:84 +#: 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 " @@ -180,12 +177,19 @@ msgid "" "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:94 +#: library/exceptions.rst:93 msgid "Base classes" msgstr "Classes de base" -#: library/exceptions.rst:96 +#: library/exceptions.rst:95 msgid "" "The following exceptions are used mostly as base classes for other " "exceptions." @@ -193,7 +197,7 @@ msgstr "" "Les exceptions suivantes sont utilisées principalement en tant que classes " "de base pour d'autres exceptions." -#: library/exceptions.rst:100 +#: 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 :" @@ -207,7 +211,7 @@ msgstr "" "classe, la représentation du ou des argument(s) de l'instance est retournée, " "ou la chaîne vide s'il n'y avait pas d'arguments." -#: library/exceptions.rst:108 +#: 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 " @@ -220,7 +224,7 @@ msgstr "" "uplet, alors que d'autres ne sont généralement appelées qu'avec une seule " "chaîne de caractères rendant un message d'erreur." -#: library/exceptions.rst:115 +#: 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 " @@ -231,8 +235,17 @@ msgid "" "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:133 +#: 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." @@ -241,17 +254,17 @@ msgstr "" "dérivent de cette classe. Toutes les exceptions définies par l'utilisateur " "devraient également être dérivées de cette classe." -#: library/exceptions.rst:139 +#: 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:" +"erreurs arithmétiques : :exc:`OverflowError`, :exc:`ZeroDivisionError`, :exc:" "`FloatingPointError`." -#: library/exceptions.rst:146 +#: library/exceptions.rst:145 msgid "" "Raised when a :ref:`buffer ` related operation cannot be " "performed." @@ -259,7 +272,7 @@ msgstr "" "Levée lorsqu'une opération liée à un :ref:`tampon ` ne peut " "pas être exécutée." -#: library/exceptions.rst:152 +#: 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`. " @@ -267,22 +280,22 @@ msgid "" 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 " +"invalide : :exc:`IndexError`, :exc:`KeyError`. Peut être levée directement " "par :func:`codecs.lookup`." -#: library/exceptions.rst:158 +#: library/exceptions.rst:157 msgid "Concrete exceptions" msgstr "Exceptions concrètes" -#: library/exceptions.rst:160 +#: 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:166 +#: library/exceptions.rst:165 msgid "Raised when an :keyword:`assert` statement fails." msgstr "Levée lorsqu'une instruction :keyword:`assert` échoue." -#: library/exceptions.rst:171 +#: 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 " @@ -292,40 +305,38 @@ msgstr "" "`attribute-references`) échoue. (Lorsqu'un objet ne supporte pas du tout la " "référence ou l'assignation d'attribut, :exc:`TypeError` est levé.)" -#: library/exceptions.rst:175 -#, fuzzy +#: 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:`path` peuvent être définis uniquement à " +"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 du module qui a été tenté d'être " -"importé et le chemin d'accès au fichier qui a déclenché l'exception." +"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:180 -#, fuzzy +#: library/exceptions.rst:179 msgid "Added the :attr:`name` and :attr:`obj` attributes." -msgstr "Ajout des attributs :attr:`name` et :attr:`path`." +msgstr "Ajout des attributs :attr:`name` et :attr:`obj`." -#: library/exceptions.rst:185 +#: 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." +"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:192 +#: library/exceptions.rst:191 msgid "Not currently used." msgstr "N’est pas utilisé pour le moment." -#: library/exceptions.rst:197 +#: 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 :" @@ -337,7 +348,7 @@ msgstr "" "de :exc:`BaseException` au lieu de :exc:`Exception` puisqu'il ne s'agit pas " "techniquement d'une erreur." -#: library/exceptions.rst:205 +#: 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 " @@ -347,7 +358,7 @@ msgstr "" "de charger un module. Également levée lorsque Python ne trouve pas un nom " "dans ``from ... import``." -#: library/exceptions.rst:209 +#: 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 " @@ -359,11 +370,11 @@ msgstr "" "ils représentent respectivement le nom du module qui a été tenté d'être " "importé et le chemin d'accès au fichier qui a déclenché l'exception." -#: library/exceptions.rst:214 +#: 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:219 +#: 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 :" @@ -373,7 +384,7 @@ msgstr "" "lorsqu'un module n'a pas pu être localisé. Elle est généralement levée quand " "``None`` est trouvé dans :data:`sys.modules`." -#: library/exceptions.rst:228 +#: 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 " @@ -381,9 +392,9 @@ msgid "" 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.)" +"autorisée ; si un indice n'est pas un entier, :exc:`TypeError` est levée.)" -#: library/exceptions.rst:237 +#: library/exceptions.rst:236 msgid "" "Raised when a mapping (dictionary) key is not found in the set of existing " "keys." @@ -391,7 +402,7 @@ msgstr "" "Levée lorsqu'une clef (de dictionnaire) n'est pas trouvée dans l'ensemble " "des clefs existantes." -#: library/exceptions.rst:244 +#: 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. " @@ -406,7 +417,22 @@ msgstr "" "du code qui intercepte :exc:`Exception` et ainsi empêcher l'interpréteur de " "quitter." -#: library/exceptions.rst:253 +#: 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 " @@ -421,11 +447,11 @@ msgstr "" "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 " +"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:264 +#: 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 " @@ -435,24 +461,21 @@ msgstr "" "qu'aux noms non qualifiés. La valeur associée est un message d'erreur qui " "inclut le nom qui n'a pas pu être trouvé." -#: library/exceptions.rst:268 -#, fuzzy +#: 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 "" -"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." +"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:272 -#, fuzzy +#: library/exceptions.rst:280 msgid "Added the :attr:`name` attribute." -msgstr "Ajout des attributs :attr:`name` et :attr:`path`." +msgstr "Ajout de l'attribut :attr:`name`." -#: library/exceptions.rst:278 +#: 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 " @@ -465,18 +488,18 @@ msgstr "" "méthode, ou lorsque la classe est en cours de développement pour indiquer " "que l'implémentation concrète doit encore être ajoutée." -#: library/exceptions.rst:285 +#: 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, " -"laissez soit l'opérateur / la méthode non défini, soit, s'il s'agit d'une " -"sous-classe, assignez-le à :data:`None`." +"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:291 +#: library/exceptions.rst:299 msgid "" "``NotImplementedError`` and ``NotImplemented`` are not interchangeable, even " "though they have similar names and purposes. See :data:`NotImplemented` for " @@ -486,18 +509,18 @@ msgstr "" "même s'ils ont des noms et des objectifs similaires. Voir :data:" "`NotImplemented` pour des détails sur la façon de les utiliser." -#: library/exceptions.rst:300 +#: 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)." +"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:304 +#: 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. " @@ -511,7 +534,7 @@ msgstr "" "l'attribut :attr:`~BaseException.args` contient seulement une paire avec les " "valeurs des deux premiers arguments du constructeur." -#: library/exceptions.rst:310 +#: 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 " @@ -525,11 +548,11 @@ msgstr "" "de la construction d':exc:`OSError` directement ou via un alias, et n'est " "pas hérité lors du sous-classement." -#: library/exceptions.rst:318 +#: 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:322 +#: 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 " @@ -539,7 +562,7 @@ msgstr "" "errno` est alors une traduction approximative, en termes POSIX, de ce code " "d'erreur natif." -#: library/exceptions.rst:326 +#: 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 " @@ -551,7 +574,7 @@ msgstr "" "et l'argument *errno* est ignoré. Sur d'autres plateformes, l'argument " "*winerror* est ignoré, et l'attribut :attr:`winerror` n'existe pas." -#: library/exceptions.rst:334 +#: 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:" @@ -561,7 +584,7 @@ msgstr "" "d'exploitation. Il est formaté par les fonctions C :c:func:`perror` sous " "POSIX, et :c:func:`FormatMessage` sous Windows." -#: library/exceptions.rst:342 +#: 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. " @@ -575,7 +598,7 @@ msgstr "" "à deux chemins d'accès au système de fichiers (comme :func:`os.rename`), :" "attr:`filename2` correspond au deuxième nom de fichier passé à la fonction." -#: library/exceptions.rst:349 +#: 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:" @@ -585,8 +608,7 @@ msgstr "" "error`, :exc:`select.error` et :exc:`mmap.error` ont fusionnées en :exc:" "`OSError`, et le constructeur peut renvoyer une sous-classe." -#: library/exceptions.rst:355 -#, fuzzy +#: 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:" @@ -594,11 +616,12 @@ msgid "" "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 de l'encodage du " -"système de fichiers. De plus, l'argument du constructeur et attribut " -"*filename2* a été ajouté." +"à 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:364 +#: 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:" @@ -610,12 +633,12 @@ 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 " +"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:374 +#: 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." @@ -625,11 +648,11 @@ msgstr "" "l'interpréteur détecte que la profondeur de récursivité maximale (voir :func:" "`sys.getrecursionlimit`) est dépassée." -#: library/exceptions.rst:378 +#: library/exceptions.rst:386 msgid "Previously, a plain :exc:`RuntimeError` was raised." msgstr "Auparavant, une simple :exc:`RuntimeError` était levée." -#: library/exceptions.rst:384 +#: 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 " @@ -642,7 +665,7 @@ msgstr "" "Pour plus d'informations sur les pointeurs faibles, voir le module :mod:" "`weakref`." -#: library/exceptions.rst:392 +#: 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 " @@ -652,7 +675,7 @@ msgstr "" "détectée. La valeur associée est une chaîne de caractères indiquant " "précisément ce qui s'est mal passé." -#: library/exceptions.rst:399 +#: 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 " @@ -662,7 +685,7 @@ msgstr "" "__next__` d'un :term:`iterator` (itérateur) pour signaler qu'il n'y a pas " "d'autres éléments produits par l'itérateur." -#: library/exceptions.rst:403 +#: 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`." @@ -671,7 +694,7 @@ msgstr "" "argument lors de la construction de l'exception, et vaut :const:`None` par " "défaut." -#: library/exceptions.rst:407 +#: 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 " @@ -682,7 +705,7 @@ msgstr "" "valeur retournée par la fonction est passée au paramètre :attr:`value` du " "constructeur de l'exception." -#: library/exceptions.rst:412 +#: 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` " @@ -692,7 +715,7 @@ msgstr "" "`StopIteration`, elle est convertie en :exc:`RuntimeError` (en conservant :" "exc:`StopIteration` comme cause de la nouvelle exception)." -#: library/exceptions.rst:416 +#: library/exceptions.rst:424 msgid "" "Added ``value`` attribute and the ability for generator functions to use it " "to return a value." @@ -700,15 +723,15 @@ 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:420 +#: 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`." +"Introduit la transformation des erreurs ``RuntimeError`` via ``from " +"__future__ import generator_stop``, cf. :pep:`479`." -#: library/exceptions.rst:424 +#: 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`." @@ -717,7 +740,7 @@ msgstr "" "`StopIteration` est levée dans un générateur elle est transformée en une :" "exc:`RuntimeError`." -#: library/exceptions.rst:430 +#: library/exceptions.rst:438 msgid "" "Must be raised by :meth:`__anext__` method of an :term:`asynchronous " "iterator` object to stop the iteration." @@ -725,8 +748,7 @@ 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:437 -#, fuzzy +#: 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:" @@ -735,63 +757,78 @@ msgid "" msgstr "" "Levée lorsque l'analyseur syntaxique rencontre une erreur de syntaxe. Cela " "peut se produire dans une instruction :keyword:`import`, dans un appel aux " -"fonctions natives :func:`exec` ou :func:`eval`, ou lors de la lecture du " -"script initial ou de l'entrée standard (également de manière interactive)." +"fonctions natives :func:`compile`, :func:`exec` ou :func:`eval`, ou lors de " +"la lecture du script initial ou de l'entrée standard (également de manière " +"interactive)." -#: library/exceptions.rst:443 +#: 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:448 -#, fuzzy +#: library/exceptions.rst:456 msgid "The name of the file the syntax error occurred in." -msgstr "Le nom de l'encodage qui a provoqué l'erreur." +msgstr "Le nom du fichier dans lequel l'erreur de syntaxe a été rencontrée." -#: library/exceptions.rst:452 +#: 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:457 +#: 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:462 -#, fuzzy +#: library/exceptions.rst:470 msgid "The source code text involved in the error." -msgstr "Le nom de l'encodage qui a provoqué l'erreur." +msgstr "Le texte du code source impliqué dans l'erreur." -#: library/exceptions.rst:466 +#: 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:471 +#: 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:474 +#: 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:479 -#, fuzzy +#: library/exceptions.rst:487 msgid "Added the :attr:`end_lineno` and :attr:`end_offset` attributes." -msgstr "Ajout des attributs :attr:`name` et :attr:`path`." +msgstr "Ajout des attributs :attr:`end_lineno` et :attr:`end_offset`." -#: library/exceptions.rst:484 +#: library/exceptions.rst:492 msgid "" "Base class for syntax errors related to incorrect indentation. This is a " "subclass of :exc:`SyntaxError`." @@ -799,7 +836,7 @@ msgstr "" "Classe de base pour les erreurs de syntaxe liées à une indentation " "incorrecte. C'est une sous-classe de :exc:`SyntaxError`." -#: library/exceptions.rst:490 +#: library/exceptions.rst:498 msgid "" "Raised when indentation contains an inconsistent use of tabs and spaces. " "This is a subclass of :exc:`IndentationError`." @@ -807,7 +844,7 @@ msgstr "" "Levée lorsqu'une indentation contient une utilisation incohérente des " "tabulations et des espaces. C'est une sous-classe de :exc:`IndentationError`." -#: library/exceptions.rst:496 +#: 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 " @@ -818,7 +855,7 @@ msgstr "" "espoir. La valeur associée est une chaîne de caractères indiquant l'erreur " "qui est survenue (en termes bas niveau)." -#: library/exceptions.rst:500 +#: 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." @@ -828,11 +865,11 @@ msgid "" 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 " +"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:509 +#: 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 " @@ -849,15 +886,15 @@ msgstr "" "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 ; " +"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 " +"`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:520 +#: 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 " @@ -874,7 +911,7 @@ msgstr "" "immédiatement (par exemple, dans le processus enfant après un appel à :func:" "`os.fork`)." -#: library/exceptions.rst:529 +#: library/exceptions.rst:537 msgid "" "The exit status or error message that is passed to the constructor. " "(Defaults to ``None``.)" @@ -882,7 +919,7 @@ msgstr "" "L'état de sortie ou le message d'erreur passé au constructeur. (``None`` par " "défaut.)" -#: library/exceptions.rst:535 +#: 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 " @@ -892,7 +929,7 @@ msgstr "" "inapproprié. La valeur associée est une chaîne de caractères donnant des " "détails sur le type d'inadéquation." -#: library/exceptions.rst:538 +#: 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 " @@ -905,7 +942,7 @@ msgstr "" "donnée mais n'a pas encore fourni une implémentation, lever :exc:" "`NotImplementedError` est plus approprié." -#: library/exceptions.rst:543 +#: 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 " @@ -917,7 +954,7 @@ msgstr "" "le passage d'arguments avec la mauvaise valeur (e.g. un nombre en dehors des " "limites attendues) devrait résulter en une :exc:`ValueError`." -#: library/exceptions.rst:550 +#: 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:" @@ -927,7 +964,7 @@ msgstr "" "ou une méthode, mais qu'aucune valeur n'a été liée à cette variable. C'est " "une sous-classe de :exc:`NameError`." -#: library/exceptions.rst:557 +#: library/exceptions.rst:565 msgid "" "Raised when a Unicode-related encoding or decoding error occurs. It is a " "subclass of :exc:`ValueError`." @@ -935,7 +972,7 @@ msgstr "" "Levée lorsqu'une erreur d'encodage ou de décodage liée à Unicode se produit. " "C'est une sous-classe de :exc:`ValueError`." -#: library/exceptions.rst:560 +#: 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 " @@ -945,27 +982,27 @@ msgstr "" "décodage. Par exemple, ``err.object[err.start:err.end]`` donne l'entrée " "particulière invalide sur laquelle le codec a échoué." -#: library/exceptions.rst:566 +#: 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:570 +#: 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:574 +#: 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:578 +#: 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:582 +#: 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:587 +#: library/exceptions.rst:595 msgid "" "Raised when a Unicode-related error occurs during encoding. It is a " "subclass of :exc:`UnicodeError`." @@ -973,7 +1010,7 @@ msgstr "" "Levée lorsqu'une erreur liée à Unicode se produit durant l'encodage. C'est " "une sous-classe d':exc:`UnicodeError`." -#: library/exceptions.rst:593 +#: library/exceptions.rst:601 msgid "" "Raised when a Unicode-related error occurs during decoding. It is a " "subclass of :exc:`UnicodeError`." @@ -981,7 +1018,7 @@ msgstr "" "Levée lorsqu'une erreur liée à Unicode se produit durant le décodage. C'est " "une sous-classe d':exc:`UnicodeError`." -#: library/exceptions.rst:599 +#: library/exceptions.rst:607 msgid "" "Raised when a Unicode-related error occurs during translating. It is a " "subclass of :exc:`UnicodeError`." @@ -989,7 +1026,7 @@ msgstr "" "Levée lorsqu'une erreur liée à Unicode se produit durant la traduction. " "C'est une sous-classe d':exc:`UnicodeError`." -#: library/exceptions.rst:605 +#: 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 " @@ -999,7 +1036,7 @@ msgstr "" "le bon type mais une valeur inappropriée, et que la situation n'est pas " "décrite par une exception plus précise telle que :exc:`IndexError`." -#: library/exceptions.rst:612 +#: 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 " @@ -1009,23 +1046,23 @@ msgstr "" "est zéro. La valeur associée est une chaîne indiquant le type des opérandes " "et de l'opération." -#: library/exceptions.rst:617 +#: 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`." +"anciennes versions ; depuis Python 3.3, ce sont des alias d':exc:`OSError`." -#: library/exceptions.rst:626 +#: library/exceptions.rst:634 msgid "Only available on Windows." msgstr "Seulement disponible sous Windows." -#: library/exceptions.rst:630 +#: library/exceptions.rst:638 msgid "OS exceptions" msgstr "Exceptions système" -#: library/exceptions.rst:632 +#: library/exceptions.rst:640 msgid "" "The following exceptions are subclasses of :exc:`OSError`, they get raised " "depending on the system error code." @@ -1033,25 +1070,27 @@ 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:637 +#: 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` ``EAGAIN``, ``EALREADY``, " -"``EWOULDBLOCK`` and ``EINPROGRESS``." +"blocking operation. Corresponds to :c:data:`errno` :py:data:`~errno." +"EAGAIN`, :py:data:`~errno.EALREADY`, :py:data:`~errno.EWOULDBLOCK` and :py:" +"data:`~errno.EINPROGRESS`." msgstr "" "Levée lorsqu'une opération bloque sur un objet (par exemple un connecteur) " -"configuré pour une opération non-bloquante. Correspond à :c:data:`errno` " -"``EAGAIN``, ``EALREADY``, ``EWOULDBLOCK`` et ``EINPROGRESS``." +"configuré pour une opération non-bloquante. Correspond à :c:data:`errno` :py:" +"data:`~errno.EAGAIN`, :py:data:`~errno.EALREADY`, :py:data:`~errno." +"EWOULDBLOCK` et :py:data:`~errno.EINPROGRESS`." -#: library/exceptions.rst:642 +#: 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 :" +"attribut de plus :" -#: library/exceptions.rst:647 +#: 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 " @@ -1061,19 +1100,19 @@ msgstr "" "qu'il ne soit bloqué. Cet attribut est disponible lors de l'utilisation des " "classes tampon entrées-sorties du module :mod:`io`." -#: library/exceptions.rst:653 +#: library/exceptions.rst:661 msgid "" "Raised when an operation on a child process failed. Corresponds to :c:data:" -"`errno` ``ECHILD``." +"`errno` :py:data:`~errno.ECHILD`." msgstr "" "Levée lorsqu'une opération sur un processus enfant a échoué. Correspond à :c:" -"data:`errno` ``ECHILD``." +"data:`errno` :py:data:`~errno.ECHILD`." -#: library/exceptions.rst:658 +#: 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:660 +#: library/exceptions.rst:668 msgid "" "Subclasses are :exc:`BrokenPipeError`, :exc:`ConnectionAbortedError`, :exc:" "`ConnectionRefusedError` and :exc:`ConnectionResetError`." @@ -1082,61 +1121,65 @@ msgstr "" "`ConnectionAbortedError`, :exc:`ConnectionRefusedError` et :exc:" "`ConnectionResetError`." -#: library/exceptions.rst:665 +#: 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` ``EPIPE`` and " -"``ESHUTDOWN``." +"has been shutdown for writing. Corresponds to :c:data:`errno` :py:data:" +"`~errno.EPIPE` and :py:data:`~errno.ESHUTDOWN`." msgstr "" "Une sous-classe de :exc:`ConnectionError`, levé en essayant d'écrire sur un " "*pipe* alors que l'autre extrémité a été fermée, ou en essayant d'écrire sur " "un connecteur (*socket* en anglais) qui a été fermé pour l'écriture. " -"Correspond à :c:data:`errno` ``EPIPE`` et ``ESHUTDOWN``." +"Correspond à :c:data:`errno` :py:data:`~errno.EPIPE` et :py:data:`~errno." +"ESHUTDOWN`." -#: library/exceptions.rst:672 +#: 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` ``ECONNABORTED``." +"aborted by the peer. Corresponds to :c:data:`errno` :py:data:`~errno." +"ECONNABORTED`." msgstr "" "Une sous-classe de :exc:`ConnectionError`, levée lorsqu'une tentative de " -"connexion est interrompue par le pair. Correspond à :c:data:`errno` " -"``ECONNABORTED``." +"connexion est interrompue par le pair. Correspond à :c:data:`errno` :py:data:" +"`~errno.ECONNABORTED`." -#: library/exceptions.rst:678 +#: 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` ``ECONNREFUSED``." +"refused by the peer. Corresponds to :c:data:`errno` :py:data:`~errno." +"ECONNREFUSED`." msgstr "" "Une sous-classe de :exc:`ConnectionError`, levée lorsqu'une tentative de " -"connexion est refusée par le pair. Correspond à :c:data:`errno` " -"``ECONNREFUSED``." +"connexion est refusée par le pair. Correspond à :c:data:`errno` :py:data:" +"`~errno.ECONNREFUSED`." -#: library/exceptions.rst:684 +#: library/exceptions.rst:692 msgid "" "A subclass of :exc:`ConnectionError`, raised when a connection is reset by " -"the peer. Corresponds to :c:data:`errno` ``ECONNRESET``." +"the peer. Corresponds to :c:data:`errno` :py:data:`~errno.ECONNRESET`." msgstr "" "Une sous-classe de :exc:`ConnectionError`, levée lorsqu'une connexion est " -"réinitialisée par le pair. Correspond à :c:data:`errno` ``ECONNRESET``." +"réinitialisée par le pair. Correspond à :c:data:`errno` :py:data:`~errno." +"ECONNRESET`." -#: library/exceptions.rst:690 +#: library/exceptions.rst:698 msgid "" "Raised when trying to create a file or directory which already exists. " -"Corresponds to :c:data:`errno` ``EEXIST``." +"Corresponds to :c:data:`errno` :py:data:`~errno.EEXIST`." msgstr "" -"Levée en essayant de créer un fichier ou un répertoire qui existe déjà. " -"Correspond à :c:data:`errno` ``EEXIST``." +"Levée pendant la tentative de création d'un fichier ou d'un répertoire qui " +"existe déjà. Correspond à :c:data:`errno` :py:data:`~errno.EEXIST`." -#: library/exceptions.rst:695 +#: library/exceptions.rst:703 msgid "" "Raised when a file or directory is requested but doesn't exist. Corresponds " -"to :c:data:`errno` ``ENOENT``." +"to :c:data:`errno` :py:data:`~errno.ENOENT`." msgstr "" "Levée lorsqu'un fichier ou répertoire est demandé mais n'existe pas. " -"Correspond à :c:data:`errno` ``ENOENT``." +"Correspond à :c:data:`errno` :py:data:`~errno.ENOENT`." -#: library/exceptions.rst:700 +#: 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`." @@ -1144,7 +1187,7 @@ msgstr "" "Levée lorsqu'un appel système est interrompu par un signal entrant. " "Correspond à :c:data:`errno` :py:data:`~errno.EINTR`." -#: library/exceptions.rst:703 +#: 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 " @@ -1154,65 +1197,68 @@ msgstr "" "un signal, sauf si le gestionnaire de signal lève une exception (voir :pep:" "`475` pour les raisons), au lieu de lever :exc:`InterruptedError`." -#: library/exceptions.rst:710 +#: 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` ``EISDIR``." +"directory. Corresponds to :c:data:`errno` :py:data:`~errno.EISDIR`." msgstr "" "Levée lorsqu'une opération sur un fichier (comme :func:`os.remove`) est " -"demandée sur un répertoire. Correspond à :c:data:`errno` ``EISDIR``." +"demandée sur un répertoire. Correspond à :c:data:`errno` :py:data:`~errno." +"EISDIR`." -#: library/exceptions.rst:716 -#, fuzzy +#: 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` ``ENOTDIR``." +"as if it were a directory. Corresponds to :c:data:`errno` :py:data:`~errno." +"ENOTDIR`." msgstr "" "Levée lorsqu'une opération sur un répertoire (comme :func:`os.listdir`) est " -"demandée sur autre chose qu'un répertoire. Correspond à :c:data:`errno` " -"``ENOTDIR``." +"demandée sur autre chose qu'un répertoire. Sur la majorité des plateformes " +"*POSIX*, elle est aussi levée quand une opération tente d'ouvrir ou de " +"traverser un fichier qui n'est pas un répertoire comme s'il en était un. " +"Correspond à :c:data:`errno` :py:data:`~errno.ENOTDIR`." -#: library/exceptions.rst:724 +#: 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` " -"``EACCES`` and ``EPERM``." +"for example filesystem permissions. Corresponds to :c:data:`errno` :py:data:" +"`~errno.EACCES` and :py:data:`~errno.EPERM`." msgstr "" "Levée lorsqu'on essaye d'exécuter une opération sans les droits d'accès " "adéquats — par exemple les permissions du système de fichiers. Correspond à :" -"c:data:`errno` ``EACCES`` et ``EPERM``." +"c:data:`errno` :py:data:`~errno.EACCES` et :py:data:`~errno.EPERM`." -#: library/exceptions.rst:730 +#: library/exceptions.rst:738 msgid "" -"Raised when a given process doesn't exist. Corresponds to :c:data:`errno` " -"``ESRCH``." +"Raised when a given process doesn't exist. Corresponds to :c:data:`errno` :" +"py:data:`~errno.ESRCH`." msgstr "" -"Levée lorsqu'un processus donné n'existe pas. Correspond à :c:data:`errno` " -"``ESRCH``." +"Levée lorsqu'un processus donné n'existe pas. Correspond à :c:data:`errno` :" +"py:data:`~errno.ESRCH`." -#: library/exceptions.rst:735 +#: library/exceptions.rst:743 msgid "" "Raised when a system function timed out at the system level. Corresponds to :" -"c:data:`errno` ``ETIMEDOUT``." +"c:data:`errno` :py:data:`~errno.ETIMEDOUT`." msgstr "" "Levée lorsqu'une fonction système a expiré au niveau système. Correspond à :" -"c:data:`errno` ``ETIMEDOUT``." +"c:data:`errno` :py:data:`~errno.ETIMEDOUT`." -#: library/exceptions.rst:738 +#: 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:744 +#: 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:750 +#: library/exceptions.rst:758 msgid "Warnings" msgstr "Avertissements" -#: library/exceptions.rst:752 +#: library/exceptions.rst:760 msgid "" "The following exceptions are used as warning categories; see the :ref:" "`warning-categories` documentation for more details." @@ -1220,16 +1266,16 @@ msgstr "" "Les exceptions suivantes sont utilisées comme catégories d'avertissement ; " "voir :mod:`warning-categories` pour plus d'informations." -#: library/exceptions.rst:757 +#: library/exceptions.rst:765 msgid "Base class for warning categories." msgstr "Classe de base pour les catégories d'avertissement." -#: library/exceptions.rst:762 +#: 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:767 +#: library/exceptions.rst:775 msgid "" "Base class for warnings about deprecated features when those warnings are " "intended for other Python developers." @@ -1237,18 +1283,21 @@ msgstr "" "Classe de base pour les avertissements sur les fonctionnalités obsolètes, " "lorsque ces avertissements sont destinés aux autres développeurs Python." -#: library/exceptions.rst:770 +#: 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:790 +#: library/exceptions.rst:798 msgid "The deprecation policy is described in :pep:`387`." -msgstr "" +msgstr "La politique relative à l'obsolescence est décrite dans la :pep:`387`." -#: library/exceptions.rst:779 +#: 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." @@ -1257,7 +1306,7 @@ msgstr "" "indiquent que la fonctionnalité peut encore être utilisée actuellement, mais " "qu'elle sera supprimée dans le futur." -#: library/exceptions.rst:783 +#: 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 " @@ -1267,23 +1316,25 @@ msgstr "" "d’une obsolescence à venir est inhabituel, et :exc:`DeprecationWarning` est " "préféré pour les obsolescences actuelles." -#: library/exceptions.rst:813 library/exceptions.rst:840 +#: 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:795 +#: 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:800 +#: 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:805 +#: 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." @@ -1292,44 +1343,56 @@ msgstr "" "seront obsolètes dans le futur quand ces avertissements destinés aux " "utilisateurs finaux des applications écrites en Python." -#: library/exceptions.rst:811 +#: 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:819 +#: 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:824 -#, fuzzy +#: library/exceptions.rst:832 msgid "Base class for warnings related to encodings." -msgstr "Classe de base pour les avertissements liés à l'Unicode." +msgstr "Classe de base pour les avertissements liés à l'encodage des chaînes." -#: library/exceptions.rst:826 +#: library/exceptions.rst:834 msgid "See :ref:`io-encoding-warning` for details." -msgstr "" +msgstr "Voir :ref:`io-encoding-warning` pour plus d'informations." -#: library/exceptions.rst:833 +#: 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:838 -#, fuzzy +#: library/exceptions.rst:846 msgid "Base class for warnings related to resource usage." -msgstr "Classe de base pour les avertissements liés à l'Unicode." +msgstr "" +"Classe de base pour les avertissements liés à l'utilisation des ressources." -#: library/exceptions.rst:848 +#: library/exceptions.rst:856 msgid "Exception hierarchy" msgstr "Hiérarchie des exceptions" -#: library/exceptions.rst:850 +#: 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 :" +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 " diff --git a/library/faulthandler.po b/library/faulthandler.po index 05808053de..7b1a7538e2 100644 --- a/library/faulthandler.po +++ b/library/faulthandler.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-09-23 16:16+0200\n" +"POT-Creation-Date: 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" @@ -88,25 +88,48 @@ msgid "" "enable` at Python startup." msgstr "" -#: library/faulthandler.rst:48 -msgid "Dumping the traceback" +#: 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:73 library/faulthandler.rst:137 +#: 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:60 +#: library/faulthandler.rst:69 msgid "Fault handler state" msgstr "" -#: library/faulthandler.rst:64 +#: 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 " @@ -114,37 +137,37 @@ msgid "" "for every running thread. Otherwise, dump only the current thread." msgstr "" -#: library/faulthandler.rst:70 +#: 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:76 +#: library/faulthandler.rst:85 msgid "On Windows, a handler for Windows exception is also installed." msgstr "" -#: library/faulthandler.rst:79 +#: 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:85 +#: library/faulthandler.rst:94 msgid "" "Disable the fault handler: uninstall the signal handlers installed by :func:" "`enable`." msgstr "" -#: library/faulthandler.rst:90 +#: library/faulthandler.rst:99 msgid "Check if the fault handler is enabled." msgstr "" -#: library/faulthandler.rst:94 +#: library/faulthandler.rst:103 msgid "Dumping the tracebacks after a timeout" msgstr "" -#: library/faulthandler.rst:98 +#: 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``, " @@ -155,58 +178,58 @@ msgid "" "a sub-second resolution." msgstr "" -#: library/faulthandler.rst:106 +#: 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:110 +#: library/faulthandler.rst:119 msgid "This function is implemented using a watchdog thread." msgstr "" -#: library/faulthandler.rst:112 +#: library/faulthandler.rst:121 msgid "This function is now always available." msgstr "" -#: library/faulthandler.rst:120 +#: library/faulthandler.rst:129 msgid "Cancel the last call to :func:`dump_traceback_later`." msgstr "" -#: library/faulthandler.rst:124 +#: library/faulthandler.rst:133 msgid "Dumping the traceback on a user signal" msgstr "" -#: library/faulthandler.rst:128 +#: 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:132 +#: 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:146 +#: library/faulthandler.rst:155 msgid "Not available on Windows." msgstr "" -#: library/faulthandler.rst:142 +#: 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:152 +#: library/faulthandler.rst:161 msgid "Issue with file descriptors" msgstr "" -#: library/faulthandler.rst:154 +#: 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 " @@ -215,11 +238,11 @@ msgid "" "Call these functions again each time that the file is replaced." msgstr "" -#: library/faulthandler.rst:162 +#: library/faulthandler.rst:171 msgid "Example" msgstr "Exemple" -#: library/faulthandler.rst:164 +#: library/faulthandler.rst:173 msgid "" "Example of a segmentation fault on Linux with and without enabling the fault " "handler:" diff --git a/library/fcntl.po b/library/fcntl.po index 68d2b2d969..e620a578b9 100644 --- a/library/fcntl.po +++ b/library/fcntl.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-09-23 16:16+0200\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" @@ -54,21 +54,21 @@ msgid "" "On macOS, the fcntl module exposes the ``F_GETPATH`` constant, which obtains " "the path of a file from a file descriptor. On Linux(>=3.15), the fcntl " "module exposes the ``F_OFD_GETLK``, ``F_OFD_SETLK`` and ``F_OFD_SETLKW`` " -"constants, which working with open file description locks." +"constants, which are used when working with open file description locks." msgstr "" -#: library/fcntl.rst:42 +#: library/fcntl.rst:43 msgid "" "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:47 +#: library/fcntl.rst:48 msgid "The module defines the following functions:" msgstr "Le module définit les fonctions suivantes :" -#: library/fcntl.rst:52 +#: 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 " @@ -87,23 +87,23 @@ msgid "" "result in a segmentation violation or a more subtle data corruption." msgstr "" -#: library/fcntl.rst:69 +#: library/fcntl.rst:70 msgid "If the :c:func:`fcntl` fails, an :exc:`OSError` is raised." msgstr "" -#: library/fcntl.rst:71 +#: library/fcntl.rst:72 msgid "" "Raises an :ref:`auditing event ` ``fcntl.fcntl`` with arguments " "``fd``, ``cmd``, ``arg``." msgstr "" -#: library/fcntl.rst:76 +#: 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:79 +#: 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 " @@ -111,26 +111,26 @@ msgid "" "relevant C header files." msgstr "" -#: library/fcntl.rst:84 +#: 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:88 +#: library/fcntl.rst:89 msgid "" "In all but the last case, behaviour is as for the :func:`~fcntl.fcntl` " "function." msgstr "" -#: library/fcntl.rst:91 +#: 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:94 +#: 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 " @@ -138,7 +138,7 @@ msgid "" "system wants to put there, things should work." msgstr "" -#: library/fcntl.rst:99 +#: 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 " @@ -149,21 +149,21 @@ msgid "" "copied back into the supplied buffer." msgstr "" -#: library/fcntl.rst:107 +#: library/fcntl.rst:108 msgid "If the :c:func:`ioctl` fails, an :exc:`OSError` exception is raised." msgstr "" -#: library/fcntl.rst:109 +#: library/fcntl.rst:110 msgid "An example::" msgstr "Un exemple ::" -#: library/fcntl.rst:122 +#: library/fcntl.rst:123 msgid "" "Raises an :ref:`auditing event ` ``fcntl.ioctl`` with arguments " "``fd``, ``request``, ``arg``." msgstr "" -#: library/fcntl.rst:127 +#: 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 " @@ -171,17 +171,17 @@ msgid "" "function is emulated using :c:func:`fcntl`.)" msgstr "" -#: library/fcntl.rst:132 +#: library/fcntl.rst:133 msgid "If the :c:func:`flock` fails, an :exc:`OSError` exception is raised." msgstr "" -#: library/fcntl.rst:134 +#: library/fcntl.rst:135 msgid "" "Raises an :ref:`auditing event ` ``fcntl.flock`` with arguments " "``fd``, ``operation``." msgstr "" -#: library/fcntl.rst:139 +#: 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." @@ -189,19 +189,19 @@ msgid "" "*cmd* is one of the following values:" msgstr "" -#: library/fcntl.rst:144 +#: library/fcntl.rst:145 msgid ":const:`LOCK_UN` -- unlock" msgstr "" -#: library/fcntl.rst:145 +#: library/fcntl.rst:146 msgid ":const:`LOCK_SH` -- acquire a shared lock" msgstr "" -#: library/fcntl.rst:146 +#: library/fcntl.rst:147 msgid ":const:`LOCK_EX` -- acquire an exclusive lock" msgstr "" -#: library/fcntl.rst:148 +#: 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:" @@ -213,44 +213,44 @@ msgid "" "for writing." msgstr "" -#: library/fcntl.rst:157 +#: 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:161 +#: library/fcntl.rst:162 msgid ":const:`0` -- relative to the start of the file (:data:`os.SEEK_SET`)" msgstr "" -#: library/fcntl.rst:162 +#: library/fcntl.rst:163 msgid "" ":const:`1` -- relative to the current buffer position (:data:`os.SEEK_CUR`)" msgstr "" -#: library/fcntl.rst:163 +#: library/fcntl.rst:164 msgid ":const:`2` -- relative to the end of the file (:data:`os.SEEK_END`)" msgstr "" -#: library/fcntl.rst:165 +#: 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:169 +#: library/fcntl.rst:170 msgid "" "Raises an :ref:`auditing event ` ``fcntl.lockf`` with arguments " "``fd``, ``cmd``, ``len``, ``start``, ``whence``." msgstr "" -#: library/fcntl.rst:171 +#: library/fcntl.rst:172 msgid "Examples (all on a SVR4 compliant system)::" msgstr "" -#: library/fcntl.rst:181 +#: 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. " @@ -258,11 +258,11 @@ msgid "" "therefore using the :func:`flock` call may be better." msgstr "" -#: library/fcntl.rst:192 +#: library/fcntl.rst:193 msgid "Module :mod:`os`" msgstr "Module :mod:`os`" -#: library/fcntl.rst:190 +#: 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 " diff --git a/library/fileinput.po b/library/fileinput.po index cca0605ae1..df74f3452e 100644 --- a/library/fileinput.po +++ b/library/fileinput.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-21 15:04+0200\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" @@ -409,6 +409,6 @@ msgstr "ajout du paramètre facultatif *errors*." #: library/fileinput.rst:229 msgid "" -"This function is deprecated since :func:`input` and :class:`FileInput` now " -"have *encoding* and *errors* parameters." +"This function is deprecated since :func:`fileinput.input` and :class:" +"`FileInput` now have *encoding* and *errors* parameters." msgstr "" diff --git a/library/fractions.po b/library/fractions.po index e3896a6fce..73f51a3e97 100644 --- a/library/fractions.po +++ b/library/fractions.po @@ -5,8 +5,8 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" -"PO-Revision-Date: 2021-03-22 14:55+0100\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" @@ -81,20 +81,21 @@ msgid "" "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 " +"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 hashable, and should be treated " -"as immutable. In addition, :class:`Fraction` has the following properties " -"and methods:" +"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. " @@ -139,14 +140,14 @@ msgstr "" #: library/fractions.rst:110 msgid "" -"This class method constructs a :class:`Fraction` representing the exact " -"value of *flt*, which must be a :class:`float`. Beware that ``Fraction." -"from_float(0.3)`` is not the same value as ``Fraction(3, 10)``." +"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 "" -"Cette méthode de classe construit un objet :class:`Fraction` représentant la " -"valeur exacte de *flt*, qui doit être de type :class:`float`. Attention, " -"``Fraction.from_float(0.3)`` n'est pas la même valeur que ``Fraction(3, " -"10)``." +"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 "" @@ -158,11 +159,11 @@ msgstr "" #: library/fractions.rst:122 msgid "" -"This class method constructs a :class:`Fraction` representing the exact " -"value of *dec*, which must be a :class:`decimal.Decimal` instance." +"Alternative constructor which only accepts instances of :class:`decimal." +"Decimal` or :class:`numbers.Integral`." 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`." +"Ce constructeur alternatif accepte (uniquement) les instances de :class:" +"`decimal.Decimal` ou :class:`numbers.Integral`." #: library/fractions.rst:127 msgid "" @@ -225,6 +226,13 @@ msgstr "Module :mod:`numbers`" 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 " diff --git a/library/ftplib.po b/library/ftplib.po index c9e40e8ec1..6d06978c0f 100644 --- a/library/ftplib.po +++ b/library/ftplib.po @@ -5,18 +5,19 @@ 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" +"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 "" +msgstr ":mod:`ftplib` — Le protocole client FTP" #: library/ftplib.rst:7 msgid "**Source code:** :source:`Lib/ftplib.py`" @@ -31,14 +32,21 @@ msgid "" "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 "" +msgstr "L'encodage par défaut est UTF-8, voir la :rfc:`2640`." #: library/ftplib.rst:24 msgid "Here's a sample session using the :mod:`ftplib` module::" -msgstr "" +msgstr "Voici un exemple de session utilisant le module :mod:`ftplib` ::" #: library/ftplib.rst:46 msgid "The module defines the following items:" @@ -60,6 +68,8 @@ 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." @@ -111,23 +121,27 @@ msgstr "" #: library/ftplib.rst:124 msgid "Here's a sample session using the :class:`FTP_TLS` class::" -msgstr "" +msgstr "Voici un exemple de session utilisant la classe :class:`FTP_TLS` ::" #: library/ftplib.rst:137 msgid "Exception raised when an unexpected reply is received from the server." -msgstr "" +msgstr "Exception levée lorsqu'une réponse inattendue est reçue du serveur." #: library/ftplib.rst: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 "" @@ -135,6 +149,9 @@ msgid "" "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 "" @@ -168,9 +185,9 @@ msgid "" msgstr "" #: library/ftplib.rst:184 -#, fuzzy msgid ":class:`FTP` instances have the following methods:" -msgstr "Les instances :class:`Mailbox` contiennent les méthodes suivantes :" +msgstr "" +"Les instances de la classe :class:`FTP` possèdent les méthodes suivantes :" #: library/ftplib.rst:189 msgid "" @@ -347,10 +364,17 @@ msgid "" "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 "" @@ -365,6 +389,7 @@ 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 "" @@ -379,15 +404,15 @@ msgstr "" #: library/ftplib.rst:393 msgid "Create a new directory on the server." -msgstr "" +msgstr "Crée un nouveau dossier sur le serveur." #: library/ftplib.rst:398 msgid "Return the pathname of the current directory on the server." -msgstr "" +msgstr "Renvoie le chemin d'accès au répertoire courant sur le serveur." #: library/ftplib.rst:403 msgid "Remove the directory named *dirname* on the server." -msgstr "" +msgstr "Supprime le dossier portant le nom *dirname* sur le serveur." #: library/ftplib.rst:408 msgid "" @@ -450,8 +475,8 @@ msgstr "" #: library/ftplib.rst:461 msgid "Set up secure data connection." -msgstr "" +msgstr "Établit une connexion de données sécurisée." #: library/ftplib.rst:465 msgid "Set up clear text data connection." -msgstr "" +msgstr "Établit une connexion de données non sécurisées." diff --git a/library/functions.po b/library/functions.po index 73720444e8..9edb29c3e8 100644 --- a/library/functions.po +++ b/library/functions.po @@ -5,16 +5,16 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-12-31 11:33+0100\n" -"PO-Revision-Date: 2020-08-30 23:21+0200\n" -"Last-Translator: Antoine Wecxsteen\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 2.3\n" +"X-Generator: Poedit 3.2.2\n" #: library/functions.rst:11 msgid "Built-in Functions" @@ -30,7 +30,7 @@ msgstr "" #: library/functions.rst:0 msgid "**A**" -msgstr "" +msgstr "**A**" #: library/functions.rst:0 msgid ":func:`abs`" @@ -58,7 +58,7 @@ msgstr ":func:`ascii`" #: library/functions.rst:0 msgid "**B**" -msgstr "" +msgstr "**B**" #: library/functions.rst:0 msgid ":func:`bin`" @@ -82,7 +82,7 @@ msgstr "|func-bytes|_" #: library/functions.rst:0 msgid "**C**" -msgstr "" +msgstr "*C**" #: library/functions.rst:0 msgid ":func:`callable`" @@ -106,7 +106,7 @@ msgstr ":func:`complex`" #: library/functions.rst:0 msgid "**D**" -msgstr "" +msgstr "**D**" #: library/functions.rst:0 msgid ":func:`delattr`" @@ -126,7 +126,7 @@ msgstr ":func:`divmod`" #: library/functions.rst:0 msgid "**E**" -msgstr "" +msgstr "**E**" #: library/functions.rst:0 msgid ":func:`enumerate`" @@ -142,7 +142,7 @@ msgstr ":func:`exec`" #: library/functions.rst:0 msgid "**F**" -msgstr "" +msgstr "**F**" #: library/functions.rst:0 msgid ":func:`filter`" @@ -162,7 +162,7 @@ msgstr "|func-frozenset|_" #: library/functions.rst:0 msgid "**G**" -msgstr "" +msgstr "**G**" #: library/functions.rst:0 msgid ":func:`getattr`" @@ -174,7 +174,7 @@ msgstr ":func:`globals`" #: library/functions.rst:0 msgid "**H**" -msgstr "" +msgstr "**H**" #: library/functions.rst:0 msgid ":func:`hasattr`" @@ -194,7 +194,7 @@ msgstr ":func:`hex`" #: library/functions.rst:0 msgid "**I**" -msgstr "" +msgstr "**I**" #: library/functions.rst:0 msgid ":func:`id`" @@ -222,7 +222,7 @@ msgstr ":func:`iter`" #: library/functions.rst:0 msgid "**L**" -msgstr "" +msgstr "**L**" #: library/functions.rst:0 msgid ":func:`len`" @@ -238,7 +238,7 @@ msgstr ":func:`locals`" #: library/functions.rst:0 msgid "**M**" -msgstr "" +msgstr "**M**" #: library/functions.rst:0 msgid ":func:`map`" @@ -258,7 +258,7 @@ msgstr ":func:`min`" #: library/functions.rst:0 msgid "**N**" -msgstr "" +msgstr "**N**" #: library/functions.rst:0 msgid ":func:`next`" @@ -266,7 +266,7 @@ msgstr ":func:`next`" #: library/functions.rst:0 msgid "**O**" -msgstr "" +msgstr "**O**" #: library/functions.rst:0 msgid ":func:`object`" @@ -286,7 +286,7 @@ msgstr ":func:`ord`" #: library/functions.rst:0 msgid "**P**" -msgstr "" +msgstr "**P**" #: library/functions.rst:0 msgid ":func:`pow`" @@ -302,7 +302,7 @@ msgstr ":func:`property`" #: library/functions.rst:0 msgid "**R**" -msgstr "" +msgstr "**R**" #: library/functions.rst:0 msgid "|func-range|_" @@ -322,7 +322,7 @@ msgstr ":func:`round`" #: library/functions.rst:0 msgid "**S**" -msgstr "" +msgstr "**S**" #: library/functions.rst:0 msgid "|func-set|_" @@ -358,7 +358,7 @@ msgstr ":func:`super`" #: library/functions.rst:0 msgid "**T**" -msgstr "" +msgstr "**T**" #: library/functions.rst:0 msgid "|func-tuple|_" @@ -370,7 +370,7 @@ msgstr ":func:`type`" #: library/functions.rst:0 msgid "**V**" -msgstr "" +msgstr "**V**" #: library/functions.rst:0 msgid ":func:`vars`" @@ -378,7 +378,7 @@ msgstr ":func:`vars`" #: library/functions.rst:0 msgid "**Z**" -msgstr "" +msgstr "**Z**" #: library/functions.rst:0 msgid ":func:`zip`" @@ -386,7 +386,7 @@ msgstr ":func:`zip`" #: library/functions.rst:0 msgid "**_**" -msgstr "" +msgstr "**_**" #: library/functions.rst:0 msgid ":func:`__import__`" @@ -407,10 +407,15 @@ 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 "" @@ -425,24 +430,28 @@ 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 -#, fuzzy 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 "" -"Donne un :term:`awaitable` en appelant la méthode :meth:`~object.__anext__` " -"de *async_iterator*. Le fait d'attendre renvoie la prochaine valeur de " -"l'itérateur. Si *default* est fourni, il sera renvoyé si l'itérateur est " -"épuisé, sinon :exc:`StopAsyncIteration` est levée." +"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 "" @@ -479,15 +488,14 @@ msgstr "" "entier. Voici quelques exemples :" #: library/functions.rst:132 -#, fuzzy 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." +"Vous pouvez contrôler l'affichage du préfixe ``\"0b\"`` à l'aide d'un des " +"moyens suivants." -#: library/functions.rst:804 library/functions.rst:1099 +#: 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." @@ -509,7 +517,7 @@ msgstr "" "ses seules instances sont ``False`` et ``True`` (voir :ref:`bltin-boolean-" "values`)." -#: library/functions.rst:672 library/functions.rst:888 +#: 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." @@ -522,7 +530,8 @@ msgid "" "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." +"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 " @@ -532,9 +541,11 @@ msgstr "" "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." +"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:168 +#: library/functions.rst:170 msgid "" "Raises an :ref:`auditing event ` ``builtins.breakpoint`` with " "argument ``breakpointhook``." @@ -542,7 +553,7 @@ msgstr "" "Lève un :ref:`évènement d'audit ` ``builtins.breakpoint`` avec " "l'argument ``breakpointhook``." -#: library/functions.rst:176 +#: 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 " @@ -555,7 +566,7 @@ msgstr "" "`typesseq-mutable`, ainsi que la plupart des méthodes de la classe :class:" "`bytes`, voir :ref:`bytes-methods`." -#: library/functions.rst:181 +#: library/functions.rst:183 msgid "" "The optional *source* parameter can be used to initialize the array in a few " "different ways:" @@ -563,7 +574,7 @@ msgstr "" "Le paramètre optionnel *source* peut être utilisé pour initialiser le " "tableau de plusieurs façons :" -#: library/functions.rst:184 +#: 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 " @@ -573,7 +584,7 @@ msgstr "" "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:188 +#: library/functions.rst:190 msgid "" "If it is an *integer*, the array will have that size and will be initialized " "with null bytes." @@ -581,7 +592,7 @@ msgstr "" "si c'est un *entier*, le tableau a cette taille et est initialisé d'octets " "*null* ;" -#: library/functions.rst:191 +#: library/functions.rst:193 #, fuzzy msgid "" "If it is an object conforming to the :ref:`buffer interface " @@ -591,7 +602,7 @@ 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:194 +#: 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." @@ -600,16 +611,15 @@ msgstr "" "l'intervalle ``0 <= x < 256``, qui sont utilisés pour initialiser le contenu " "du tableau." -#: library/functions.rst:197 +#: 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:199 +#: library/functions.rst:201 msgid "See also :ref:`binaryseq` and :ref:`typebytearray`." msgstr "Voir :ref:`binaryseq` et :ref:`typebytearray`." -#: library/functions.rst:206 -#, fuzzy +#: 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 :" @@ -619,27 +629,27 @@ 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 la découpe." +"le même comportement lors de l'indexation ou du découpage." -#: library/functions.rst:211 +#: 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:213 +#: 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:215 +#: 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:220 +#: 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 " @@ -654,7 +664,7 @@ msgstr "" "(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:226 +#: library/functions.rst:228 msgid "" "This function was first removed in Python 3.0 and then brought back in " "Python 3.2." @@ -662,7 +672,7 @@ 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:233 +#: 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 " @@ -673,7 +683,7 @@ msgstr "" "de caractères ``'a'``, tandis que ``chr(8364)`` renvoie ``'€'``. Il s'agit " "de l'inverse de :func:`ord`." -#: library/functions.rst:237 +#: 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." @@ -682,11 +692,11 @@ msgstr "" "(``0x10FFFF`` en base 16). Une exception :exc:`ValueError` est levée si *i* " "est en dehors de l'intervalle." -#: library/functions.rst:243 +#: 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:245 +#: library/functions.rst:247 #, fuzzy msgid "" "A class method receives the class as an implicit first argument, just like " @@ -697,7 +707,7 @@ msgstr "" "tout comme une méthode d'instance reçoit l'instance. Voici comment déclarer " "une méthode de classe ::" -#: library/functions.rst:253 +#: library/functions.rst:255 msgid "" "The ``@classmethod`` form is a function :term:`decorator` -- see :ref:" "`function` for details." @@ -705,7 +715,7 @@ msgstr "" "La forme ``@classmethod`` est un :term:`décorateur ` de fonction " "— consultez :ref:`function` pour plus de détails." -#: library/functions.rst:256 +#: 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 " @@ -717,7 +727,7 @@ msgstr "" "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:261 +#: 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 " @@ -727,7 +737,7 @@ msgstr "" "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:265 +#: library/functions.rst:267 msgid "" "Class methods can now wrap other :term:`descriptors ` such as :" "func:`property`." @@ -735,14 +745,17 @@ msgstr "" "les méthodes de classe peuvent encapsuler d'autres :term:`descripteurs " "` comme :func:`property`." -#: library/functions.rst:269 +#: 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:276 +#: 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 " @@ -754,7 +767,7 @@ msgstr "" "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:281 +#: 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 (``''`` " @@ -764,7 +777,7 @@ msgstr "" "lu. Donnez quelque chose de reconnaissable lorsqu'il n'a pas été lu depuis " "un fichier (typiquement ``\"\"``)." -#: library/functions.rst:285 +#: 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 " @@ -778,8 +791,7 @@ msgstr "" "(dans ce dernier cas, les résultats d'expressions donnant autre chose que " "``None`` sont affichés)." -#: library/functions.rst:291 -#, fuzzy +#: library/functions.rst:293 msgid "" "The optional arguments *flags* and *dont_inherit* control which :ref:" "`compiler options ` should be activated and which :ref:" @@ -800,11 +812,11 @@ msgstr "" "fourni alors que *dont_inherit* ne l'est pas (ou vaut 0), les options de " "compilation et les instructions *futures* utilisées sont celles définies par " "*flags* en plus de celles qui auraient été utilisées. Si *dont_inherit* est " -"un entier différent de zéro, *flags* est utilisé seul — les instructions " -"futures déclarées autour de l'appel à *compile* sont ignorées." +"un entier différent de zéro, *flags* est utilisé tel quel — les *flags* " +"(instructions futures et options de compilation) valables pour le code " +"encadrant *compile* sont ignorés." -#: library/functions.rst:302 -#, fuzzy +#: 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 " @@ -814,12 +826,14 @@ msgid "" "flags>` can be found in :mod:`ast` module, with ``PyCF_`` prefix." msgstr "" "Les instructions *future* sont contrôlées par des bits, il est ainsi " -"possible d'en activer plusieurs en les combinant avec un *ou* binaire. Les " +"possible d'en activer plusieurs en les combinant avec un *OU* binaire. Les " "bits requis pour demander une certaine fonctionnalité se trouvent dans " "l'attribut :attr:`~__future__._Feature.compiler_flag` de la classe :class:" -"`~__future__.Feature` du module :mod:`__future__`." +"`~__future__.Feature` du module :mod:`__future__`. Les :ref:`options du " +"compilateur ` se trouvent dans le module :mod:`ast`, " +"avec le préfixe ``PyCF_``." -#: library/functions.rst:310 +#: 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 " @@ -834,7 +848,7 @@ msgstr "" "``1`` (les ``assert`` sont supprimés, ``__debug__`` est ``False``) ou ``2`` " "(les *docstrings* sont également supprimées)." -#: library/functions.rst:316 +#: 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." @@ -842,7 +856,7 @@ 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:319 +#: library/functions.rst:321 msgid "" "If you want to parse Python code into its AST representation, see :func:`ast." "parse`." @@ -850,7 +864,7 @@ msgstr "" "Si vous voulez transformer du code Python en sa représentation AST, voyez :" "func:`ast.parse`." -#: library/functions.rst:322 +#: library/functions.rst:324 #, fuzzy msgid "" "Raises an :ref:`auditing event ` ``compile`` with arguments " @@ -859,7 +873,7 @@ msgstr "" "Lève un :ref:`évènement d'audit ` ``compile`` avec les arguments " "``source`` et ``filename``." -#: library/functions.rst:324 +#: library/functions.rst:326 msgid "" "Raises an :ref:`auditing event ` ``compile`` with arguments " "``source`` and ``filename``. This event may also be raised by implicit " @@ -869,7 +883,7 @@ msgstr "" "``source`` et ``filename``. Cet événement peut également être levé par une " "compilation implicite." -#: library/functions.rst:330 +#: 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 " @@ -881,7 +895,7 @@ msgstr "" "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:337 +#: 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 " @@ -891,7 +905,7 @@ msgstr "" "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:341 +#: library/functions.rst:343 #, fuzzy msgid "" "Allowed use of Windows and Mac newlines. Also, input in ``'exec'`` mode " @@ -901,7 +915,7 @@ msgstr "" "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:345 +#: library/functions.rst:347 msgid "" "Previously, :exc:`TypeError` was raised when null bytes were encountered in " "*source*." @@ -909,7 +923,7 @@ msgstr "" "précédemment, l'exception :exc:`TypeError` était levée quand un caractère " "nul était rencontré dans *source*." -#: library/functions.rst:349 +#: 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``." @@ -918,7 +932,7 @@ msgstr "" "pour permettre une gestion de ``await``, ``async for``, et ``async with`` de " "haut niveau." -#: library/functions.rst:356 +#: 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, " @@ -939,7 +953,7 @@ msgstr "" "class:`int` ou :class:`float`. Si aucun argument n'est fourni, renvoie " "``0j``." -#: library/functions.rst:365 +#: 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 :" @@ -951,7 +965,7 @@ msgstr "" "meth:`__float__`. Si ``__float__()`` n'est pas défini, alors il délègue à :" "meth:`__index__`." -#: library/functions.rst:372 +#: 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 " @@ -962,17 +976,17 @@ msgstr "" "``complex('1+2j')`` est correct, mais ``complex('1 + 2j')`` lève une :exc:" "`ValueError`." -#: library/functions.rst:377 +#: 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:669 library/functions.rst:885 +#: 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:382 +#: library/functions.rst:384 msgid "" "Falls back to :meth:`__index__` if :meth:`__complex__` and :meth:`__float__` " "are not defined." @@ -980,19 +994,21 @@ msgstr "" "revient à :meth:`__index__` si :meth:`__complex__` et :meth:`__float__` ne " "sont pas définies." -#: library/functions.rst:389 +#: 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``." +"example, ``delattr(x, 'foobar')`` is equivalent to ``del x.foobar``. *name* " +"need not be a Python identifier (see :func:`setattr`)." msgstr "" -"C'est un cousin de :func:`setattr`. Les arguments sont un objet et une " +"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``." +"``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:401 +#: 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." @@ -1001,7 +1017,7 @@ msgstr "" "dictionnaire. Voir :class:`dict` et :ref:`typesmapping` pour vous documenter " "sur cette classe." -#: library/functions.rst:404 +#: 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." @@ -1009,7 +1025,7 @@ 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:410 +#: 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 " @@ -1019,7 +1035,7 @@ msgstr "" "Avec un argument, elle essaye de donner une liste d'attributs valides pour " "cet objet." -#: library/functions.rst:413 +#: 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 " @@ -1031,8 +1047,7 @@ msgstr "" "`__getattr__` ou :func:`__getattribute__` de personnaliser ce que donnera :" "func:`dir`." -#: library/functions.rst:418 -#, fuzzy +#: 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, " @@ -1042,11 +1057,11 @@ msgid "" 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, si 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 un :" -"func:`__getattr__` personnalisé." +"__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:423 +#: 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 " @@ -1056,7 +1071,7 @@ msgstr "" "différents types d'objets, car elle préfère donner une information " "pertinente plutôt qu'exhaustive :" -#: library/functions.rst:427 +#: library/functions.rst:430 msgid "" "If the object is a module object, the list contains the names of the " "module's attributes." @@ -1064,7 +1079,7 @@ msgstr "" "si l'objet est un module, la liste contiendra les noms des attributs du " "module ;" -#: library/functions.rst:430 +#: 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." @@ -1072,7 +1087,7 @@ 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:433 +#: 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 " @@ -1082,11 +1097,11 @@ msgstr "" "attributs de la classe, et récursivement des attributs des parents de la " "classe." -#: library/functions.rst:437 +#: 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:456 +#: 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 " @@ -1100,8 +1115,7 @@ msgstr "" "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:466 -#, fuzzy +#: 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. " @@ -1119,10 +1133,10 @@ msgstr "" "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)``." +"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:478 +#: 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:" @@ -1136,11 +1150,11 @@ msgstr "" "`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:490 +#: library/functions.rst:493 msgid "Equivalent to::" msgstr "Équivalent à ::" -#: library/functions.rst:501 +#: 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 " @@ -1150,8 +1164,7 @@ msgstr "" "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:505 -#, fuzzy +#: 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* " @@ -1172,16 +1185,17 @@ msgstr "" "*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. Cela " -"signifie qu'*expression* a normalement un accès complet à tout le module :" -"mod:`builtins`, et que les environnements restreints sont propagés. 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. Note, *eval()* n'a pas accès aux :term:`portées " -"imbriquées ` (non locales) dans l'environnement englobant." - -#: library/functions.rst:520 +"`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:" @@ -1189,8 +1203,7 @@ 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:527 -#, fuzzy +#: 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 " @@ -1200,9 +1213,9 @@ 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` donnera ``None``." +"*mode* à ``'exec'``, :func:`eval` renvoie ``None``." -#: library/functions.rst:532 +#: library/functions.rst:535 #, fuzzy msgid "" "Hints: dynamic execution of statements is supported by the :func:`exec` " @@ -1215,13 +1228,15 @@ msgstr "" "respectivement les dictionnaires globaux et locaux, qui peuvent être utiles " "lors de l'usage de :func:`eval` et :func:`exec`." -#: library/functions.rst:537 +#: 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:540 +#: library/functions.rst:543 msgid "" "See :func:`ast.literal_eval` for a function that can safely evaluate strings " "with expressions containing only literals." @@ -1230,7 +1245,7 @@ msgstr "" "peut évaluer en toute sécurité des chaînes avec des expressions ne contenant " "que des valeurs littérales." -#: library/functions.rst:579 +#: library/functions.rst:582 #, fuzzy msgid "" "Raises an :ref:`auditing event ` ``exec`` with argument " @@ -1239,7 +1254,7 @@ msgstr "" "Lève un :ref:`évènement d'audit ` ``exec`` avec l'argument " "``code_object``." -#: library/functions.rst:581 +#: 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." @@ -1248,8 +1263,7 @@ msgstr "" "comme argument. Les événements de compilation de code peuvent également être " "levés." -#: library/functions.rst:552 -#, fuzzy +#: 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 " @@ -1266,14 +1280,14 @@ msgstr "" "d'abord analysée en une suite d'instructions Python qui sont ensuite " "exécutés (sauf erreur de syntaxe). [#]_ Si c'est un objet code, il est " "simplement exécuté. Dans tous les cas, le code fourni doit être valide selon " -"les mêmes critères que s'il était un script dans un fichier (voir la section " -"« Fichier d'entrée » dans le manuel de référence du langage). Gardez en tête " -"que les mots clés :keyword:`return` et :keyword:`yield` ne peuvent pas être " -"utilisés en dehors d'une fonction, même dans du code passé à :func:`exec`. " -"La fonction renvoie ``None``." +"les mêmes critères que s'il était un script dans un fichier (voir la " +"section :ref:`Fichier d'entrée ` dans le manuel de référence du " +"langage). Gardez en tête que les mots clés :keyword:`nonlocal`, :keyword:" +"`yield` et :keyword:`return` ne peuvent pas être utilisés en dehors d'une " +"fonction, même dans du code passé à :func:`exec`. La fonction renvoie " +"``None``." -#: library/functions.rst:563 -#, fuzzy +#: 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 " @@ -1290,12 +1304,12 @@ msgstr "" "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 " +"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:573 +#: 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:" @@ -1309,7 +1323,7 @@ msgstr "" "exposées au code exécuté en insérant votre propre dictionnaire " "``__builtins__`` dans *globals* avant de le donner à :func:`exec`." -#: library/functions.rst:586 +#: 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 " @@ -1319,7 +1333,7 @@ msgstr "" "respectivement les dictionnaires globaux et locaux, qui peuvent être utiles " "en deuxième et troisième argument de :func:`exec`." -#: library/functions.rst:592 +#: 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. " @@ -1332,7 +1346,7 @@ msgstr "" "observer l'effet du code sur les variables locales, après que :func:`exec` " "soit terminée." -#: library/functions.rst:600 +#: 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 " @@ -1346,7 +1360,7 @@ msgstr "" "est ``None``, la fonction identité est prise, c'est-à-dire que tous les " "éléments faux d'*iterable* sont supprimés." -#: library/functions.rst:606 +#: 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 " @@ -1358,7 +1372,7 @@ msgstr "" "``None``, et de ``(item for item in iterable if item)`` si *function* est " "``None``." -#: library/functions.rst:611 +#: library/functions.rst:614 msgid "" "See :func:`itertools.filterfalse` for the complementary function that " "returns elements of *iterable* for which *function* returns false." @@ -1366,21 +1380,20 @@ 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:621 +#: 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:623 -#, fuzzy +#: 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 following grammar after leading and trailing whitespace " -"characters are removed:" +"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 " @@ -1388,23 +1401,22 @@ msgstr "" "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 à la grammaire suivante, après que les espaces en début et fin de " -"chaîne aient été retirées :" +"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:638 -#, fuzzy +#: library/functions.rst:644 msgid "" -"Here ``floatnumber`` is the form of a Python floating-point literal, " -"described in :ref:`floating`. Case is not significant, so, for example, " -"\"inf\", \"Inf\", \"INFINITY\", and \"iNfINity\" are all acceptable " -"spellings for positive infinity." +"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 ``floatnumber`` est un nombre a virgule flottante littéral Python, " -"décrit dans :ref:`floating`. La casse n'y est pas significative, donc, par " -"exemple, ``\"inf\"``, ``\" Inf\"``, ``\"INFINITY\"``, et ``\" iNfiNity\"`` " +"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:643 +#: 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 " @@ -1417,7 +1429,7 @@ msgstr "" "dehors de l'intervalle d'un nombre a virgule flottante pour Python, :exc:" "`OverflowError` est levée." -#: library/functions.rst:648 +#: 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 :" @@ -1427,24 +1439,23 @@ msgstr "" "__float__()``. Si ``__float__()`` n'est pas défini alors il est délégué à :" "meth:`__index__`." -#: library/functions.rst:652 +#: library/functions.rst:658 msgid "If no argument is given, ``0.0`` is returned." msgstr "Sans argument, ``0.0`` est renvoyé." -#: library/functions.rst:654 +#: library/functions.rst:660 msgid "Examples::" msgstr "Exemples ::" -#: library/functions.rst:667 +#: 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:675 +#: 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:685 -#, fuzzy +#: 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 " @@ -1453,10 +1464,10 @@ msgid "" 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`." +"valeur. Cependant, il existe une syntaxe standard utilisée par la plupart " +"des types natifs : :ref:`formatspec`." -#: library/functions.rst:690 +#: library/functions.rst:696 msgid "" "The default *format_spec* is an empty string which usually gives the same " "effect as calling :func:`str(value) `." @@ -1464,7 +1475,7 @@ 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:693 +#: 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 " @@ -1480,7 +1491,7 @@ msgstr "" "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:700 +#: library/functions.rst:706 msgid "" "``object().__format__(format_spec)`` raises :exc:`TypeError` if " "*format_spec* is not an empty string." @@ -1488,7 +1499,7 @@ msgstr "" "``object().__format__(format_spec)`` lève :exc:`TypeError` si *format_spec* " "n'est pas une chaîne vide." -#: library/functions.rst:709 +#: 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 :" @@ -1498,7 +1509,7 @@ msgstr "" "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:713 +#: 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." @@ -1507,43 +1518,46 @@ msgstr "" "`list`, :class:`tuple`, et :class:`dict`, ainsi que le module :mod:" "`collections`." -#: library/functions.rst:720 +#: 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." +"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." +"`AttributeError` est levée. *name* n'a pas besoin d'être un identifiant " +"Python (voir :func:`setattr`)." -#: library/functions.rst:728 +#: 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:736 -#, fuzzy +#: 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 une représentation de la table de symboles globaux sous forme d'un " -"dictionnaire. C'est toujours le dictionnaire du module courant (dans une " -"fonction ou méthode, c'est le module où elle est définie, et non le module " -"d'où elle est appelée)." +"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:743 +#: 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. " @@ -1555,7 +1569,7 @@ msgstr "" "``False`` (l'implémentation appelle ``getattr(object, name)`` et regarde si " "une exception :exc:`AttributeError` a été levée)." -#: library/functions.rst:751 +#: 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 " @@ -1568,7 +1582,7 @@ msgstr "" "ont la même valeur de hachage (même si leurs types sont différents, comme " "pour ``1`` et ``1.0``)." -#: library/functions.rst:758 +#: 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 :" @@ -1578,7 +1592,7 @@ msgstr "" "func:`hash` tronque la valeur donnée en fonction du nombre de bits de la " "machine hôte. Voir :meth:`__hash__` pour plus d'information." -#: library/functions.rst:764 +#: 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 " @@ -1595,7 +1609,7 @@ msgstr "" "la console. Si l'argument est d'un autre type, une page d'aide sur cet objet " "est générée." -#: library/functions.rst:771 +#: library/functions.rst:778 #, fuzzy msgid "" "Note that if a slash(/) appears in the parameter list of a function when " @@ -1609,14 +1623,14 @@ msgstr "" "plus d'informations, voir :ref:`La FAQ sur les arguments positionnels `." -#: library/functions.rst:776 +#: 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:778 +#: 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." @@ -1624,7 +1638,7 @@ msgstr "" "les changements aux modules :mod:`pydoc` et :mod:`inspect` rendent les " "signatures des appelables plus compréhensibles et cohérentes." -#: library/functions.rst:785 +#: 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 :" @@ -1634,7 +1648,7 @@ msgstr "" "pas un :class:`int`, il doit définir une méthode :meth:`__index__` qui " "renvoie un entier. Quelques exemples :" -#: library/functions.rst:794 +#: 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 " @@ -1644,7 +1658,7 @@ msgstr "" "majuscule ou non, préfixée ou non, vous pouvez utiliser l'une des méthodes " "suivantes :" -#: library/functions.rst:806 +#: library/functions.rst:813 msgid "" "See also :func:`int` for converting a hexadecimal string to an integer using " "a base of 16." @@ -1652,7 +1666,7 @@ msgstr "" "Voir aussi :func:`int` pour convertir une chaîne hexadécimale en un entier " "(en affectant 16 à l'argument *base*)." -#: library/functions.rst:811 +#: library/functions.rst:818 msgid "" "To obtain a hexadecimal string representation for a float, use the :meth:" "`float.hex` method." @@ -1660,7 +1674,7 @@ msgstr "" "Pour obtenir une représentation hexadécimale sous forme de chaîne d'un " "nombre à virgule flottante, utilisez la méthode :meth:`float.hex`." -#: library/functions.rst:817 +#: 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. " @@ -1671,7 +1685,11 @@ msgstr "" "constant pour cet objet durant sa durée de vie. Deux objets dont les durées " "de vie ne se chevauchent pas peuvent partager le même :func:`id`." -#: library/functions.rst:824 +#: 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 " @@ -1680,7 +1698,7 @@ msgstr "" "Lève un :ref:`évènement d'audit ` ``builtins.id`` avec l'argument " "``id``." -#: library/functions.rst:829 +#: 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, " @@ -1692,7 +1710,7 @@ msgstr "" "standard et la convertit en chaîne (supprimant le retour à la ligne final) " "quelle renvoie. Lorsque EOF est lu, :exc:`EOFError` est levée. Exemple ::" -#: library/functions.rst:839 +#: 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." @@ -1700,16 +1718,15 @@ msgstr "" "Si le module :mod:`readline` est chargé, :func:`input` l'utilisera pour " "fournir des fonctionnalités d'édition et d'historique élaborées." -#: library/functions.rst:842 -#, fuzzy +#: library/functions.rst:849 msgid "" "Raises an :ref:`auditing event ` ``builtins.input`` with argument " "``prompt``." msgstr "" -"Lève un :ref:`auditing event ` ``builtins.input`` avec l'argument " -"``prompt``." +"Lève un :ref:`évènement d'audit ` ``builtins.input`` avec " +"l'argument ``prompt``." -#: library/functions.rst:844 +#: library/functions.rst:851 msgid "" "Raises an :ref:`auditing event ` ``builtins.input`` with argument " "``prompt`` before reading input" @@ -1717,24 +1734,23 @@ msgstr "" "Lève un :ref:`auditing event ` ``builtins.input`` avec l'argument " "``prompt`` avant de lire l'entrée." -#: library/functions.rst:847 -#, fuzzy +#: library/functions.rst:854 msgid "" "Raises an :ref:`auditing event ` ``builtins.input/result`` with " "argument ``result``." msgstr "" -"Lève un :ref:`auditing event ` ``builtins.input/result`` avec " +"Lève un :ref:`évènement d'audit ` ``builtins.input/result`` avec " "l'argument ``result``." -#: library/functions.rst:849 +#: library/functions.rst:856 msgid "" -"Raises an auditing event ``builtins.input/result`` with the result after " -"successfully reading input." +"Raises an :ref:`auditing event ` ``builtins.input/result`` with " +"the result after successfully reading input." msgstr "" -"Lève un événement d'audit ``builtins.input/result`` avec le résultat après " -"avoir lu avec succès l'entrée." +"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:856 +#: 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)`` " @@ -1749,40 +1765,46 @@ msgstr "" "``int(x)`` renvoie ``x.__trunc__()``. Les nombres à virgule flottante sont " "tronqués vers zéro." -#: library/functions.rst:863 +#: 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 :ref:`integer " -"literal ` in radix *base*. Optionally, the literal can be " -"preceded by ``+`` or ``-`` (with no space in between) and surrounded by " -"whitespace. A base-n literal consists of the digits 0 to n-1, with ``a`` to " -"``z`` (or ``A`` to ``Z``) having values 10 to 35. The default *base* is 10. " -"The allowed values are 0 and 2--36. Base-2, -8, and -16 literals can be " -"optionally prefixed with ``0b``/``0B``, ``0o``/``0O``, or ``0x``/``0X``, as " -"with integer literals in code. Base 0 means to interpret exactly as a code " -"literal, so that the actual base is 2, 8, 10, or 16, and so that " -"``int('010', 0)`` is not legal, while ``int('010')`` is, as well as " -"``int('010', 8)``." -msgstr "" -"Si *x* n'est pas un nombre ou si *base* est fourni, alors *x* doit être une " -"chaîne, un :class:`bytes`, ou un :class:`bytearray` représentant un :ref:" -"`entier littéral ` de base *base*. Le littéral peut être précédé " -"d'un ``+`` ou d'un ``-`` (sans être séparés par une espace), et peut être " -"entouré d'espaces. Un littéral de base *n* est composé des symboles de 0 à " -"n-1 où ``a`` jusqu'à ``z`` (ou ``A`` à ``Z``) représentent les valeurs de 10 " -"à 35. 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 " -"littéral dans Python, donc la base sera 2, 8, 10, ou 16, ainsi ``int('010', " -"0)`` n'est pas légal, alors que ``int('010')`` l'est tout comme ``int('010', " -"8)``." +"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:878 +#: 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 " @@ -1795,11 +1817,21 @@ msgstr "" "meth:`base.__int__ ` au lieu de :meth:`base.__index__ " "`." -#: library/functions.rst:891 +#: 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:897 +#: 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* " @@ -1820,19 +1852,19 @@ msgstr "" "un *n*-uplet de types (et récursivement), une exception :exc:`TypeError` est " "levée." -#: library/functions.rst:920 +#: library/functions.rst:940 msgid "*classinfo* can be a :ref:`types-union`." msgstr "" -#: library/functions.rst:913 +#: 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 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." +"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 " @@ -1840,7 +1872,7 @@ msgstr "" "classes, dans ce cas la vérification sera faite pour chaque classe de " "*classinfo*. Dans tous les autres cas, :exc:`TypeError` est levée." -#: library/functions.rst:926 +#: library/functions.rst:946 #, fuzzy msgid "" "Return an :term:`iterator` object. The first argument is interpreted very " @@ -1866,11 +1898,11 @@ msgstr "" "de :meth:`~iterator.__next__`. Si la valeur reçue est égale à *sentinel* :" "exc:`StopIteration` est levée, sinon la valeur est renvoyée." -#: library/functions.rst:939 +#: library/functions.rst:959 msgid "See also :ref:`typeiter`." msgstr "Voir aussi :ref:`typeiter`." -#: library/functions.rst:941 +#: 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 " @@ -1880,7 +1912,7 @@ msgstr "" "construire un lecteur par blocs. Par exemple, lire des blocs de taille fixe " "d'une base de donnée binaire jusqu'à ce que la fin soit atteinte ::" -#: library/functions.rst:953 +#: 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 " @@ -1891,13 +1923,13 @@ msgstr "" "liste ou un intervalle) ou une collection (telle qu'un dictionnaire, un " "ensemble ou un ensemble figé)." -#: library/functions.rst:959 +#: 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:967 +#: 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`." @@ -1906,7 +1938,7 @@ msgstr "" "type séquentiel muable, comme décrit dans :ref:`typesseq-list` et :ref:" "`typesseq`." -#: library/functions.rst:973 +#: 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 " @@ -1919,7 +1951,7 @@ msgstr "" "corps d'une classe. Notez qu’au niveau d’un module, :func:`locals` et :func:" "`globals` sont le même dictionnaire." -#: library/functions.rst:979 +#: 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." @@ -1928,7 +1960,7 @@ msgstr "" "n'affectent pas les valeurs des variables locales ou libres utilisées par " "l'interpréteur." -#: library/functions.rst:984 +#: 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, " @@ -1945,7 +1977,7 @@ msgstr "" "où les arguments sont déjà rangés sous forme de *n*-uplets, voir :func:" "`itertools.starmap`." -#: library/functions.rst:995 +#: library/functions.rst:1015 msgid "" "Return the largest item in an iterable or the largest of two or more " "arguments." @@ -1953,7 +1985,7 @@ msgstr "" "Renvoie le plus grand élément d'un itérable, ou l'argument le plus grand " "parmi au moins deux arguments." -#: library/functions.rst:998 +#: 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 " @@ -1964,7 +1996,7 @@ msgstr "" "deux arguments positionnels sont fournis, l'argument le plus grand sera " "renvoyé." -#: library/functions.rst:1040 +#: 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 " @@ -1978,7 +2010,7 @@ msgstr "" "fourni est vide. Si l'itérable est vide et que *default* n'est pas fourni, :" "exc:`ValueError` est levée." -#: library/functions.rst:1009 +#: 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 " @@ -1990,15 +2022,15 @@ msgstr "" "stabilité lors du tri, tels que ``sorted(iterable, key=keyfunc, reverse=True)" "[0]`` et ``heapq.nlargest(1, iterable, key=keyfunc)``." -#: library/functions.rst:1051 +#: library/functions.rst:1071 msgid "The *default* keyword-only argument." msgstr "L'argument nommé (et seulement donné par son nom) *default*." -#: library/functions.rst:1054 +#: library/functions.rst:1074 msgid "The *key* can be ``None``." msgstr "l'argument *key* peut être ``None``." -#: library/functions.rst:1025 +#: library/functions.rst:1045 msgid "" "Return a \"memory view\" object created from the given argument. See :ref:" "`typememoryview` for more information." @@ -2006,7 +2038,7 @@ msgstr "" "Renvoie une « vue mémoire » (*memory view*) créée depuis l'argument. Voir :" "ref:`typememoryview` pour plus d'informations." -#: library/functions.rst:1032 +#: library/functions.rst:1052 msgid "" "Return the smallest item in an iterable or the smallest of two or more " "arguments." @@ -2014,7 +2046,7 @@ msgstr "" "Renvoie le plus petit élément d'un itérable ou le plus petit d'au moins deux " "arguments." -#: library/functions.rst:1035 +#: 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 " @@ -2024,7 +2056,7 @@ msgstr "" "plus petit élément de l'itérable est renvoyé. Si au moins deux arguments " "positionnels sont fournis, le plus petit argument positionnel est renvoyé." -#: library/functions.rst:1046 +#: 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 " @@ -2036,7 +2068,7 @@ msgstr "" "du tri, tels que ``sorted(iterable, key=keyfunc)[0]`` et ``heapq." "nsmallest(1, iterable, key=keyfunc)``." -#: library/functions.rst:1060 +#: library/functions.rst:1080 #, fuzzy msgid "" "Retrieve the next item from the :term:`iterator` by calling its :meth:" @@ -2047,7 +2079,7 @@ msgstr "" "__next__`. Si *default* est fourni, il sera renvoyé si l'itérateur est " "épuisé, sinon :exc:`StopIteration` est levée." -#: library/functions.rst:1067 +#: library/functions.rst:1087 #, fuzzy msgid "" "Return a new featureless object. :class:`object` is a base for all classes. " @@ -2058,7 +2090,7 @@ msgstr "" "classes. C'est elle qui porte les méthodes communes à toutes les instances " "de classes en Python. Cette fonction n'accepte aucun argument." -#: library/functions.rst:1073 +#: 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." @@ -2067,7 +2099,7 @@ msgstr "" "pouvez donc pas assigner d'attributs arbitraires à une instance d':class:" "`object`." -#: library/functions.rst:1079 +#: 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` " @@ -2079,7 +2111,7 @@ msgstr "" "objet :class:`int`, il doit définir une méthode :meth:`__index__` qui donne " "un entier, par exemple :" -#: library/functions.rst:1089 +#: library/functions.rst:1109 #, fuzzy msgid "" "If you want to convert an integer number to an octal string either with the " @@ -2088,7 +2120,7 @@ msgstr "" "Si vous voulez convertir un nombre entier en chaîne octale, avec ou sans le " "préfixe ``0o``, vous pouvez utiliser l'une des méthodes suivantes." -#: library/functions.rst:1106 +#: 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 " @@ -2098,8 +2130,7 @@ msgstr "" "Si le fichier ne peut pas être ouvert, une :exc:`OSError` est levée. Voir :" "ref:`tut-files` pour plus d'exemple d'utilisation de cette fonction." -#: library/functions.rst:1110 -#, fuzzy +#: 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 " @@ -2113,8 +2144,7 @@ msgstr "" "descripteur de fichier est donné, il sera fermé en même temps que l'objet " "d'entrée-sortie renvoyé, sauf si *closefd* est mis à ``False``)." -#: library/functions.rst:1116 -#, fuzzy +#: 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. " @@ -2141,73 +2171,71 @@ msgstr "" "mode binaire sans préciser *encoding* non spécifié). Les modes disponibles " "sont :" -#: library/functions.rst:1133 +#: library/functions.rst:1153 msgid "Character" msgstr "Caractère" -#: library/functions.rst:1133 +#: library/functions.rst:1153 msgid "Meaning" msgstr "Signification" -#: library/functions.rst:1135 +#: library/functions.rst:1155 msgid "``'r'``" msgstr "``'r'``" -#: library/functions.rst:1135 +#: library/functions.rst:1155 msgid "open for reading (default)" msgstr "ouvre en lecture (par défaut)" -#: library/functions.rst:1136 +#: library/functions.rst:1156 msgid "``'w'``" msgstr "``'w'``" -#: library/functions.rst:1136 +#: 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:1137 +#: library/functions.rst:1157 msgid "``'x'``" msgstr "``'x'``" -#: library/functions.rst:1137 +#: 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:1138 +#: library/functions.rst:1158 msgid "``'a'``" msgstr "``'a'``" -#: library/functions.rst:1138 -#, fuzzy +#: 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:1139 +#: library/functions.rst:1159 msgid "``'b'``" msgstr "``'b'``" -#: library/functions.rst:1139 +#: library/functions.rst:1159 msgid "binary mode" msgstr "mode binaire" -#: library/functions.rst:1140 +#: library/functions.rst:1160 msgid "``'t'``" msgstr "``'t'``" -#: library/functions.rst:1140 +#: library/functions.rst:1160 msgid "text mode (default)" msgstr "mode texte (par défaut)" -#: library/functions.rst:1141 +#: library/functions.rst:1161 msgid "``'+'``" msgstr "``'+'``" -#: library/functions.rst:1141 +#: library/functions.rst:1161 msgid "open for updating (reading and writing)" msgstr "ouvre en modification (lecture et écriture)" -#: library/functions.rst:1144 -#, fuzzy +#: 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 " @@ -2217,7 +2245,7 @@ msgstr "" "``'rt'``). Les modes ``'w+'`` et ``'w+b'`` ouvrent et vident le fichier. Les " "modes ``'r+'`` et ``'r+b'`` ouvrent le fichier sans le vider." -#: library/functions.rst:1148 +#: 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* " @@ -2235,8 +2263,7 @@ msgstr "" "octets ayant été décodés au préalable en utilisant un encodage déduit de " "l'environnement ou *encoding* s'il est donné." -#: library/functions.rst:1156 -#, fuzzy +#: 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:" @@ -2251,7 +2278,7 @@ msgstr "" "documentation du paramètre :ref:`newline ` pour plus " "de détails." -#: library/functions.rst:1164 +#: 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 " @@ -2261,22 +2288,31 @@ msgstr "" "jacent. Tout le traitement est effectué par Python lui-même, et est ainsi " "indépendant de la plate-forme." -#: library/functions.rst:1168 +#: 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. When no *buffering* argument is " +"size in bytes of a fixed-size chunk buffer. Note that specifying a buffer " +"size this way applies for binary buffered I/O, but ``TextIOWrapper`` (i.e., " +"files opened with ``mode='r+'``) would have another buffering. To disable " +"buffering in ``TextIOWrapper``, consider using the ``write_through`` flag " +"for :func:`io.TextIOWrapper.reconfigure`. When no *buffering* argument is " "given, the default buffering policy works as follows:" msgstr "" -"*buffering* est un entier optionnel permettant de configurer l'espace " -"tampon. 0 pour désactiver l'espace tampon (seulement autorisé en mode " +"*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. Sans l'argument *buffering*, les " +"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:1174 +#: 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 " @@ -2289,7 +2325,7 @@ msgstr "" "DEFAULT_BUFFER_SIZE`. Sur de nombreux systèmes, le tampon sera de 4096 ou " "8192 octets." -#: library/functions.rst:1179 +#: 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 " @@ -2299,7 +2335,7 @@ msgstr "" "isatty` renvoie ``True``) utilisent un tampon par lignes. Les autres " "fichiers texte sont traités comme les fichiers binaires." -#: library/functions.rst:1183 +#: 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 " @@ -2314,7 +2350,7 @@ msgstr "" "par Python peut être utilisé. Voir :mod:`codecs` pour une liste des " "encodages pris en charge." -#: library/functions.rst:1190 +#: 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 " @@ -2329,7 +2365,7 @@ msgstr "" "d'erreur enregistré avec :func:`codecs.register_error` est aussi un argument " "valide. Les noms standards sont :" -#: library/functions.rst:1198 +#: 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." @@ -2337,7 +2373,7 @@ msgstr "" "``'strict'`` pour lever une :exc:`ValueError` si une erreur d'encodage est " "rencontrée. La valeur par défaut, ``None``, a le même effet." -#: library/functions.rst:1202 +#: library/functions.rst:1226 msgid "" "``'ignore'`` ignores errors. Note that ignoring encoding errors can lead to " "data loss." @@ -2345,7 +2381,7 @@ msgstr "" "``'ignore'`` ignore les erreurs. Notez qu'ignorer les erreurs d'encodage " "peut mener à des pertes de données." -#: library/functions.rst:1205 +#: library/functions.rst:1229 msgid "" "``'replace'`` causes a replacement marker (such as ``'?'``) to be inserted " "where there is malformed data." @@ -2353,7 +2389,7 @@ msgstr "" "``'replace'`` insère un marqueur de substitution (tel que ``'?'``) en place " "des données mal formées." -#: library/functions.rst:1208 +#: library/functions.rst:1232 #, fuzzy msgid "" "``'surrogateescape'`` will represent any incorrect bytes as low surrogate " @@ -2369,7 +2405,7 @@ msgstr "" "l'écriture de la donnée. C'est utile pour traiter des fichiers d'un encodage " "inconnu." -#: library/functions.rst:1215 +#: 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 " @@ -2379,7 +2415,7 @@ msgstr "" "fichier. Les caractères non gérés par l'encodage sont remplacés par une " "entité XML de la forme ``&#nnn;``." -#: library/functions.rst:1219 +#: library/functions.rst:1243 msgid "" "``'backslashreplace'`` replaces malformed data by Python's backslashed " "escape sequences." @@ -2387,7 +2423,7 @@ msgstr "" "``'backslashreplace'`` remplace les données mal formées par des séquences " "d'échappement Python (utilisant des barres obliques inverses)." -#: library/functions.rst:1222 +#: library/functions.rst:1246 msgid "" "``'namereplace'`` (also only supported when writing) replaces unsupported " "characters with ``\\N{...}`` escape sequences." @@ -2395,18 +2431,19 @@ 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:1230 +#: library/functions.rst:1254 +#, fuzzy msgid "" -"*newline* controls how :term:`universal newlines` mode works (it only " -"applies to text mode). It can be ``None``, ``''``, ``'\\n'``, ``'\\r'``, " -"and ``'\\r\\n'``. It works as follows:" +"*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:1234 +#: 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'``, " @@ -2419,12 +2456,12 @@ 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 " +"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:1242 +#: 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, :" @@ -2434,11 +2471,11 @@ msgid "" 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 ``''`` 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:1248 +#: library/functions.rst:1272 #, fuzzy msgid "" "If *closefd* is ``False`` and a file descriptor rather than a filename was " @@ -2451,7 +2488,7 @@ msgstr "" "le fichier sera fermé. Si un nom de fichier est donné, *closefd* doit rester " "``True`` (la valeur par défaut) sans quoi une erreur est levée." -#: library/functions.rst:1253 +#: 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 " @@ -2465,13 +2502,13 @@ msgstr "" "descripteur de fichier ouvert (fournir :mod:`os.open` en tant qu'*opener* " "aura le même effet que donner ``None``)." -#: library/functions.rst:1259 +#: 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:1261 +#: 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::" @@ -2479,7 +2516,7 @@ msgstr "" "L'exemple suivant utilise le paramètre :ref:`dir_fd ` de la " "fonction :func:`os.open` pour ouvrir un fichier relatif au dossier courant ::" -#: library/functions.rst:1274 +#: 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 " @@ -2505,7 +2542,7 @@ msgstr "" "BufferedRandom`. Lorsque le tampon est désactivé, le flux brut, une classe " "fille de :class:`io.RawIOBase`, :class:`io.FileIO` est renvoyée." -#: library/functions.rst:1295 +#: library/functions.rst:1319 #, fuzzy msgid "" "See also the file handling modules, such as :mod:`fileinput`, :mod:`io` " @@ -2516,7 +2553,7 @@ msgstr "" "`fileinput`, :mod:`io` (où :func:`open` est déclarée), :mod:`os`, :mod:`os." "path`, :mod:`tmpfile`, et :mod:`shutil`." -#: library/functions.rst:1299 +#: library/functions.rst:1323 msgid "" "Raises an :ref:`auditing event ` ``open`` with arguments ``file``, " "``mode``, ``flags``." @@ -2524,7 +2561,7 @@ msgstr "" "Lève un :ref:`évènement d'audit ` ``open`` avec les arguments " "``file``, ``mode`` et ``flags``." -#: library/functions.rst:1301 +#: library/functions.rst:1325 msgid "" "The ``mode`` and ``flags`` arguments may have been modified or inferred from " "the original call." @@ -2532,21 +2569,21 @@ msgstr "" "Les arguments ``mode`` et ``flags`` peuvent avoir été modifiés ou déduits de " "l'appel original." -#: library/functions.rst:1307 +#: library/functions.rst:1331 msgid "The *opener* parameter was added." msgstr "ajout du paramètre *opener*." -#: library/functions.rst:1308 +#: library/functions.rst:1332 msgid "The ``'x'`` mode was added." msgstr "ajout du mode ``'x'``." -#: library/functions.rst:1309 +#: 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:1310 +#: library/functions.rst:1334 msgid "" ":exc:`FileExistsError` is now raised if the file opened in exclusive " "creation mode (``'x'``) already exists." @@ -2554,15 +2591,15 @@ msgstr "" ":exc:`FileExistsError` est maintenant levée si le fichier ouvert en mode " "création exclusive (``'x'``) existe déjà." -#: library/functions.rst:1316 +#: 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:1320 +#: library/functions.rst:1344 msgid "The ``'U'`` mode." msgstr "Le mode ``'U'``." -#: library/functions.rst:1325 +#: 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 :" @@ -2572,15 +2609,15 @@ msgstr "" "aucune exception, la fonction réessaye l'appel système au lieu de lever une :" "exc:`InterruptedError` (voir la :pep:`475` pour la justification)." -#: library/functions.rst:1328 +#: library/functions.rst:1352 msgid "The ``'namereplace'`` error handler was added." msgstr "ajout du gestionnaire d'erreurs ``'namereplace'``." -#: library/functions.rst:1333 +#: 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:1334 +#: library/functions.rst:1358 msgid "" "On Windows, opening a console buffer may return a subclass of :class:`io." "RawIOBase` other than :class:`io.FileIO`." @@ -2588,7 +2625,7 @@ msgstr "" "Sous Windows, ouvrir un *buffer* du terminal peut renvoyer une sous-classe " "de :class:`io.RawIOBase` autre que :class:`io.FileIO`." -#: library/functions.rst:1339 +#: 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, " @@ -2600,7 +2637,7 @@ msgstr "" "entier ``97`` et ``ord('€')`` (symbole euro) renvoie ``8364``. Il s'agit de " "l'inverse de :func:`chr`." -#: library/functions.rst:1347 +#: 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) % " @@ -2612,7 +2649,7 @@ msgstr "" "``pow(base, exp) % mod``). La forme à deux arguments ``pow(base, exp)`` est " "équivalente à l'opérateur puissance : ``base**exp``." -#: library/functions.rst:1352 +#: library/functions.rst:1376 #, fuzzy msgid "" "The arguments must have numeric types. With mixed operand types, the " @@ -2633,7 +2670,7 @@ msgstr "" "convertis en ``float``, et le résultat sera un ``float`` aussi. Par exemple, " "``10**2`` donne ``100``, alors que ``10**-2`` donne ``0.01``." -#: library/functions.rst:1362 +#: 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 " @@ -2647,11 +2684,11 @@ msgstr "" "être premiers entre eux. Dans ce cas, ``pow(inv_base, -exp, mod)`` est " "renvoyé, où *inv_base* est un inverse de *base* modulo *mod*." -#: library/functions.rst:1368 +#: 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:1375 +#: 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." @@ -2660,14 +2697,14 @@ msgstr "" "permet maintenant au deuxième argument d'être négatif, permettant le calcul " "des inverses modulaires." -#: library/functions.rst:1380 +#: 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:1387 +#: library/functions.rst:1411 #, fuzzy msgid "" "Print *objects* to the text stream *file*, separated by *sep* and followed " @@ -2678,7 +2715,7 @@ msgstr "" "*end*. Les arguments *sep*, *end*, *file*, et *flush*, s'ils sont présents, " "doivent être nommés." -#: library/functions.rst:1391 +#: 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* " @@ -2692,7 +2729,7 @@ msgstr "" "les valeurs par défaut. Si aucun *objects* n'est donné :func:`print` écris " "seulement *end*." -#: library/functions.rst:1397 +#: 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 " @@ -2705,7 +2742,7 @@ msgstr "" "peut pas être utilisé avec des fichiers ouverts en mode binaire. Pour ceux-" "ci utilisez plutôt ``file.write(...)``." -#: library/functions.rst:1402 +#: library/functions.rst:1426 #, fuzzy msgid "" "Whether the output is buffered is usually determined by *file*, but if the " @@ -2714,15 +2751,15 @@ msgstr "" "Que la sortie utilise un *buffer* ou non est souvent décidé par *file*, mais " "si l'argument *flush* est vrai, le tampon du flux est vidé explicitement." -#: library/functions.rst:1405 +#: library/functions.rst:1429 msgid "Added the *flush* keyword argument." msgstr "ajout de l'argument nommé *flush*." -#: library/functions.rst:1411 +#: library/functions.rst:1435 msgid "Return a property attribute." msgstr "Renvoie un attribut propriété." -#: library/functions.rst:1413 +#: 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 " @@ -2733,11 +2770,11 @@ msgstr "" "supprimer la valeur d'un attribut, et *doc* créé une *docstring* pour " "l'attribut." -#: library/functions.rst:1417 +#: 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:1434 +#: library/functions.rst:1458 #, fuzzy msgid "" "If *c* is an instance of *C*, ``c.x`` will invoke the getter, ``c.x = " @@ -2747,7 +2784,7 @@ msgstr "" "anglais), ``c.x = value`` invoque le mutateur (*setter*), et ``del x`` le " "destructeur (*deleter*)." -#: library/functions.rst:1437 +#: 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 " @@ -2759,17 +2796,17 @@ msgstr "" "création de propriétés en lecture seule en utilisant simplement :func:" "`property` comme un :term:`décorateur ` ::" -#: library/functions.rst:1450 +#: 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.\"" +"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:1454 +#: 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 " @@ -2781,7 +2818,7 @@ msgstr "" "une copie de la propriété avec les accesseurs correspondants définis par la " "fonction de décoration. C'est plus clair avec un exemple ::" -#: library/functions.rst:1476 +#: 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 " @@ -2791,7 +2828,7 @@ msgstr "" "donner aux fonctions additionnelles le même nom que la propriété (``x`` dans " "ce cas)." -#: library/functions.rst:1480 +#: library/functions.rst:1504 msgid "" "The returned property object also has the attributes ``fget``, ``fset``, and " "``fdel`` corresponding to the constructor arguments." @@ -2799,11 +2836,11 @@ msgstr "" "L'objet propriété renvoyé à aussi les attributs ``fget``, ``fset`` et " "``fdel`` correspondants aux arguments du constructeur." -#: library/functions.rst:1483 +#: 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:1492 +#: 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`." @@ -2812,7 +2849,7 @@ msgstr "" "type de séquence immuable, comme décrit dans :ref:`typesseq-range` et :ref:" "`typesseq`." -#: library/functions.rst:1498 +#: library/functions.rst:1522 #, fuzzy msgid "" "Return a string containing a printable representation of an object. For " @@ -2821,7 +2858,9 @@ msgid "" "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." +"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 " @@ -2831,7 +2870,7 @@ msgstr "" "l'adresse de l'objet. Une classe peut contrôler ce que cette fonction " "renvoie pour ses instances en définissant une méthode :meth:`__repr__`." -#: library/functions.rst:1509 +#: 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:" @@ -2843,7 +2882,7 @@ msgstr "" "séquence (la méthode :meth:`__len__` et la méthode :meth:`__getitem__` avec " "des arguments entiers commençant à zéro)." -#: library/functions.rst:1517 +#: 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 " @@ -2853,7 +2892,7 @@ msgstr "" "virgule. Si *ndigits* est omis (ou est ``None``), l'entier le plus proche " "est renvoyé." -#: library/functions.rst:1521 +#: library/functions.rst:1547 #, fuzzy msgid "" "For the built-in types supporting :func:`round`, values are rounded to the " @@ -2872,7 +2911,7 @@ msgstr "" "zéro, ou négatif). La valeur renvoyée est un entier si *ndigits* n'est pas " "donné, (ou est ``None``). Sinon elle est du même type que *number*." -#: library/functions.rst:1530 +#: library/functions.rst:1556 msgid "" "For a general Python object ``number``, ``round`` delegates to ``number." "__round__``." @@ -2880,7 +2919,7 @@ msgstr "" "Pour tout autre objet Python ``number``, ``round`` délègue à ``number." "__round__``." -#: library/functions.rst:1535 +#: 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 " @@ -2894,7 +2933,7 @@ msgstr "" "fractions de décimaux ne peuvent pas être représentés exactement en nombre a " "virgule flottante. Voir :ref:`tut-fp-issues` pour plus d'information." -#: library/functions.rst:1546 +#: 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-" @@ -2904,7 +2943,7 @@ msgstr "" "d'*iterable*. ``set`` est une classe native. Voir :class:`set` et :ref:" "`types-set` pour la documentation de cette classe." -#: library/functions.rst:1550 +#: 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` " @@ -2913,7 +2952,7 @@ msgstr "" "D'autres conteneurs existent, comme : :class:`frozenset`, :class:`list`, :" "class:`tuple`, et :class:`dict`, ainsi que le module :mod:`collections`." -#: library/functions.rst:1557 +#: library/functions.rst:1583 #, fuzzy msgid "" "This is the counterpart of :func:`getattr`. The arguments are an object, a " @@ -2928,14 +2967,23 @@ msgstr "" "si l'objet l'autorise. Par exemple, ``setattr(x, 'foobar', 123)`` équivaut à " "``x.foobar = 123``." -#: library/functions.rst:1565 +#: 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:1574 +#: library/functions.rst:1606 #, fuzzy msgid "" "Return a :term:`slice` object representing the set of indices specified by " @@ -2960,16 +3008,16 @@ msgstr "" "Voir :func:`itertools.islice` pour une version alternative renvoyant un " "itérateur." -#: library/functions.rst:1587 +#: 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:1589 +#: 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:1591 +#: 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." @@ -2980,7 +3028,7 @@ msgstr "" "lower``). La valeur par défaut est ``None`` (compare les éléments " "directement)." -#: library/functions.rst:1595 +#: 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." @@ -2988,7 +3036,7 @@ msgstr "" "*reverse*, une valeur booléenne. Si elle est ``True``, la liste d'éléments " "est triée comme si toutes les comparaisons étaient inversées." -#: library/functions.rst:1598 +#: library/functions.rst:1630 msgid "" "Use :func:`functools.cmp_to_key` to convert an old-style *cmp* function to a " "*key* function." @@ -2996,7 +3044,7 @@ msgstr "" "Utilisez :func:`functools.cmp_to_key` pour convertir l'ancienne notation " "*cmp* en une fonction *key*." -#: library/functions.rst:1601 +#: 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 " @@ -3008,7 +3056,7 @@ msgstr "" "eux. C'est utile pour trier en plusieurs passes (par exemple par département " "puis par salaire)." -#: library/functions.rst:1606 +#: 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` " @@ -3020,17 +3068,17 @@ msgid "" "method." msgstr "" -#: library/functions.rst:1615 +#: 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:1619 +#: library/functions.rst:1651 msgid "Transform a method into a static method." msgstr "Transforme une méthode en méthode statique." -#: library/functions.rst:1621 +#: library/functions.rst:1653 msgid "" "A static method does not receive an implicit first argument. To declare a " "static method, use this idiom::" @@ -3038,7 +3086,7 @@ msgstr "" "Une méthode statique ne reçoit pas de premier argument implicitement. Voilà " "comment déclarer une méthode statique ::" -#: library/functions.rst:1628 +#: library/functions.rst:1660 msgid "" "The ``@staticmethod`` form is a function :term:`decorator` -- see :ref:" "`function` for details." @@ -3046,7 +3094,7 @@ msgstr "" "La forme ``@staticmethod`` est un :term:`décorateur ` de " "fonction. Consultez :ref:`function` pour plus de détails." -#: library/functions.rst:1631 +#: library/functions.rst:1663 #, fuzzy msgid "" "A static method can be called either on the class (such as ``C.f()``) or on " @@ -3057,7 +3105,7 @@ msgstr "" "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:1635 +#: library/functions.rst:1667 #, fuzzy msgid "" "Static methods in Python are similar to those found in Java or C++. Also, " @@ -3068,7 +3116,7 @@ msgstr "" "ou en C++. Consultez :func:`classmethod` pour une variante utile pour créer " "des constructeurs alternatifs." -#: library/functions.rst:1639 +#: 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 " @@ -3082,26 +3130,26 @@ msgstr "" "depuis le corps d'une classe, et souhaiteriez éviter sa transformation en " "méthode d'instance. Pour ces cas, faites comme suit ::" -#: library/functions.rst:1651 +#: 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:1653 +#: 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:1668 +#: 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:1670 +#: library/functions.rst:1702 msgid "" "``str`` is the built-in string :term:`class`. For general information about " "strings, see :ref:`textseq`." @@ -3109,7 +3157,7 @@ msgstr "" "``str`` est la :term:`classe ` native des chaînes de caractères. Pour " "des informations générales à propos des chaînes, consultez :ref:`textseq`." -#: library/functions.rst:1676 +#: 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 " @@ -3119,7 +3167,7 @@ msgstr "" "donne le total. Les éléments de l'*iterable* sont normalement des nombres, " "et la valeur de *start* ne peut pas être une chaîne de caractères." -#: library/functions.rst:1680 +#: 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 ``''." @@ -3133,11 +3181,11 @@ msgstr "" "meilleure précision, voir :func:`math.fsum`. Pour concaténer une série " "d'itérables, utilisez plutôt :func:`itertools.chain`." -#: library/functions.rst:1686 +#: 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:1691 +#: 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 " @@ -3147,7 +3195,7 @@ msgstr "" "de méthode à une classe parente ou sœur de *type*. C'est utile pour accéder " "aux méthodes héritées qui ont été remplacées dans une classe." -#: library/functions.rst:1695 +#: 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*." @@ -3156,7 +3204,7 @@ msgstr "" "` est utilisé pour la recherche. La recherche " "commence à partir de la classe qui suit immédiatement le *type*." -#: library/functions.rst:1699 +#: 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` " @@ -3166,7 +3214,7 @@ msgstr "" "-> A -> object`` et la valeur de *type* est ``B``, alors :func:`super` " "recherche ``C -> A -> object``." -#: library/functions.rst:1703 +#: 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:" @@ -3178,7 +3226,7 @@ msgstr "" "`super`. L'attribut est dynamique et peut changer lorsque la hiérarchie " "d'héritage est modifiée." -#: library/functions.rst:1708 +#: 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. " @@ -3190,7 +3238,7 @@ msgstr "" "le second argument est un type, ``issubclass(type2, type)`` doit être vrai " "(c'est utile pour les méthodes de classe)." -#: library/functions.rst:1713 +#: 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 " @@ -3203,7 +3251,7 @@ msgstr "" "maintenable. Cet usage se rapproche de l'usage de *super* dans d'autres " "langages de programmation." -#: library/functions.rst:1718 +#: library/functions.rst:1750 #, fuzzy msgid "" "The second use case is to support cooperative multiple inheritance in a " @@ -3227,12 +3275,12 @@ msgstr "" "dans la hiérarchie, et parce que l'ordre peut inclure des classes sœurs " "inconnues avant l'exécution)." -#: library/functions.rst:1728 +#: 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:1735 +#: 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 " @@ -3242,7 +3290,7 @@ msgstr "" "la recherche d'attributs. Un cas d'utilisation possible est l'appel d'un :" "term:`descripteur ` d'une classe parente ou sœur." -#: library/functions.rst:1739 +#: 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 " @@ -3259,7 +3307,7 @@ msgstr "" "n'est pas défini pour les recherches implicites via des instructions ou des " "opérateurs tels que ``super()[name]``." -#: library/functions.rst:1746 +#: 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 " @@ -3276,7 +3324,7 @@ msgstr "" "propos de la classe en cours de définition, ainsi qu'accéder à l'instance " "courante pour les méthodes ordinaires." -#: library/functions.rst:1753 +#: library/functions.rst:1785 msgid "" "For practical suggestions on how to design cooperative classes using :func:" "`super`, see `guide to using super() `_." -#: library/functions.rst:1762 +#: 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`." @@ -3294,7 +3342,7 @@ msgstr "" "Plutôt qu'être une fonction, :class:`tuple` est en fait un type de séquence " "immuable, comme documenté dans :ref:`typesseq-tuple` et :ref:`typesseq`." -#: library/functions.rst:1771 +#: 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." @@ -3304,7 +3352,7 @@ msgstr "" "objet type et généralement la même que la valeur de l'attribut :attr:`object." "__class__ `." -#: library/functions.rst:1775 +#: 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." @@ -3312,7 +3360,7 @@ msgstr "" "La fonction native :func:`isinstance` est recommandée pour tester le type " "d'un objet, car elle prend en compte l'héritage." -#: library/functions.rst:1779 +#: library/functions.rst:1811 #, fuzzy msgid "" "With three arguments, return a new type object. This is essentially a " @@ -3336,11 +3384,11 @@ msgstr "" "`~object.__dict__`. Par exemple, les deux instructions suivantes créent deux " "instances identiques de :class:`type` :" -#: library/functions.rst:1794 +#: library/functions.rst:1826 msgid "See also :ref:`bltin-type-objects`." msgstr "Voir aussi :ref:`bltin-type-objects`." -#: library/functions.rst:1796 +#: 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__`) " @@ -3348,12 +3396,12 @@ msgid "" "would." msgstr "" -#: library/functions.rst:1801 +#: library/functions.rst:1833 #, fuzzy msgid "See also :ref:`class-customization`." msgstr "Voir aussi :ref:`class-customization`." -#: library/functions.rst:1803 +#: 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." @@ -3362,7 +3410,7 @@ msgstr "" "ne doivent plus utiliser la forme à un argument pour récupérer le type d'un " "objet." -#: library/functions.rst:1809 +#: 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." @@ -3371,7 +3419,7 @@ msgstr "" "instance ou de n'importe quel objet avec un attribut :attr:`~object." "__dict__`." -#: library/functions.rst:1812 +#: 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 " @@ -3384,7 +3432,7 @@ msgstr "" "exemple, les classes utilisent un :class:`types.MappingProxyType` pour " "éviter les modifications directes du dictionnaire)." -#: library/functions.rst:1817 +#: 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 " @@ -3394,45 +3442,45 @@ msgstr "" "dictionnaire des variables locales n'est utile qu'en lecture, car ses " "écritures sont ignorées." -#: library/functions.rst:1821 +#: 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:1827 +#: library/functions.rst:1859 msgid "" "Iterate over several iterables in parallel, producing tuples with an item " "from each one." msgstr "" -#: library/functions.rst:1830 +#: library/functions.rst:1862 #, fuzzy msgid "Example::" msgstr "Exemple ::" -#: library/functions.rst:1839 +#: 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:1842 +#: 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:1846 +#: 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:1850 +#: 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 " @@ -3440,51 +3488,51 @@ msgid "" "approaches to dealing with this issue:" msgstr "" -#: library/functions.rst:1855 +#: 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:1862 +#: 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:1869 +#: library/functions.rst:1901 msgid "" -"Unlike the default behavior, it checks that the lengths of iterables are " -"identical, raising a :exc:`ValueError` if they aren't:" +"Unlike the default behavior, it raises a :exc:`ValueError` if one iterable " +"is exhausted before the others:" msgstr "" -#: library/functions.rst:1877 +#: 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:1881 +#: 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:1885 +#: 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:1888 +#: library/functions.rst:1930 msgid "Tips and tricks:" msgstr "" -#: library/functions.rst:1890 +#: library/functions.rst:1932 #, fuzzy msgid "" "The left-to-right evaluation order of the iterables is guaranteed. This " @@ -3500,7 +3548,7 @@ msgstr "" "``n`` appels à l'itérateur. Cela a pour effet de diviser la séquence en " "morceaux de taille *n*." -#: library/functions.rst:1896 +#: library/functions.rst:1938 msgid "" ":func:`zip` in conjunction with the ``*`` operator can be used to unzip a " "list::" @@ -3508,12 +3556,12 @@ msgstr "" ":func:`zip` peut être utilisée conjointement avec l'opérateur ``*`` pour " "dézipper une liste ::" -#: library/functions.rst:1907 +#: library/functions.rst:1949 #, fuzzy msgid "Added the ``strict`` argument." msgstr "ajout de l'argument ``strict``." -#: library/functions.rst:1919 +#: library/functions.rst:1961 msgid "" "This is an advanced function that is not needed in everyday Python " "programming, unlike :func:`importlib.import_module`." @@ -3521,7 +3569,7 @@ msgstr "" "C'est une fonction avancée qui n'est pas fréquemment nécessaire, " "contrairement à :func:`importlib.import_module`." -#: library/functions.rst:1922 +#: 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 " @@ -3541,7 +3589,7 @@ msgstr "" "à trouver l'implémentation par défaut. L'usage direct de :func:`__import__` " "est aussi déconseillé en faveur de :func:`importlib.import_module`." -#: library/functions.rst:1931 +#: library/functions.rst:1973 #, fuzzy msgid "" "The function imports the module *name*, potentially using the given " @@ -3558,7 +3606,7 @@ msgstr "" "l'argument *locals* et n'utilise *globals* que pour déterminer le contexte " "du paquet de l'instruction :keyword:`import`." -#: library/functions.rst:1938 +#: 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* " @@ -3571,7 +3619,7 @@ msgstr "" "positive indique le nombre de dossiers parents relativement au dossier du " "module appelant :func:`__import__` (voir la :pep:`328`)." -#: library/functions.rst:1944 +#: 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 " @@ -3583,7 +3631,7 @@ msgstr "" "et *pas* le module nommé par *name*. Cependant, lorsqu'un argument " "*fromlist* est fourni, le module nommé par *name* est renvoyé." -#: library/functions.rst:1949 +#: library/functions.rst:1991 msgid "" "For example, the statement ``import spam`` results in bytecode resembling " "the following code::" @@ -3591,11 +3639,11 @@ msgstr "" "Par exemple, l'instruction ``import spam`` renvoie un code intermédiaire " "(*bytecode* en anglais) ressemblant au code suivant ::" -#: library/functions.rst:1954 +#: library/functions.rst:1996 msgid "The statement ``import spam.ham`` results in this call::" msgstr "L'instruction ``import spam.ham`` appelle ::" -#: library/functions.rst:1958 +#: 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." @@ -3603,7 +3651,7 @@ msgstr "" "Notez comment :func:`__import__` renvoie ici le module de plus haut niveau " "parce que c'est l'objet lié à un nom par l'instruction :keyword:`import`." -#: library/functions.rst:1961 +#: library/functions.rst:2003 msgid "" "On the other hand, the statement ``from spam.ham import eggs, sausage as " "saus`` results in ::" @@ -3611,7 +3659,7 @@ msgstr "" "En revanche, l'instruction ``from spam.ham import eggs, sausage as saus`` " "donne ::" -#: library/functions.rst:1968 +#: 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 " @@ -3620,7 +3668,7 @@ msgstr "" "Ici le module ``spam.ham`` est renvoyé par :func:`__import__`. De cet objet, " "les noms à importer sont récupérés et assignés à leurs noms respectifs." -#: library/functions.rst:1972 +#: library/functions.rst:2014 msgid "" "If you simply want to import a module (potentially within a package) by " "name, use :func:`importlib.import_module`." @@ -3628,7 +3676,7 @@ msgstr "" "Si vous voulez simplement importer un module (potentiellement dans un " "paquet) par son nom, utilisez :func:`importlib.import_module`." -#: library/functions.rst:1975 +#: library/functions.rst:2017 msgid "" "Negative values for *level* are no longer supported (which also changes the " "default value to 0)." @@ -3636,7 +3684,7 @@ msgstr "" "les valeurs négatives pour *level* ne sont plus prises en charge (et sa " "valeur par défaut est 0)." -#: library/functions.rst:1979 +#: 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." @@ -3644,11 +3692,11 @@ msgstr "" "Quand les options :option:`-E` ou :option:`-I` sont précisées dans la ligne " "de commande, la variable d'environnement :envvar:`PYTHONCASEOK` est ignorée." -#: library/functions.rst:1984 +#: library/functions.rst:2026 msgid "Footnotes" msgstr "Notes" -#: library/functions.rst:1985 +#: 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 " diff --git a/library/functools.po b/library/functools.po index d0b8fc6ce9..b9be2a7398 100644 --- a/library/functools.po +++ b/library/functools.po @@ -5,8 +5,8 @@ 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-02-06 18:15+0100\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" @@ -48,8 +48,8 @@ msgid "" "`_." msgstr "" "Fonction de cache très simple et sans limite de taille. Cette technique est " -"parfois appelée `« mémoïsation » `_." +"parfois appelée `« mémoïsation » `_." #: library/functools.rst:34 msgid "" @@ -142,8 +142,9 @@ msgstr "" "Python 3." #: library/functools.rst:122 +#, fuzzy msgid "" -"A comparison function is any callable that accept two arguments, compares " +"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." @@ -172,9 +173,10 @@ msgstr "" "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 hashable." +"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." @@ -187,8 +189,8 @@ msgid "" 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." +"``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 "" @@ -403,11 +405,11 @@ msgstr "" #: 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:" +"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 " diff --git a/library/gettext.po b/library/gettext.po index c7eccb6fdb..ee0710d677 100644 --- a/library/gettext.po +++ b/library/gettext.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-01 16:00+0200\n" +"POT-Creation-Date: 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" @@ -298,7 +298,7 @@ msgid "" "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 " +"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." @@ -609,9 +609,9 @@ msgstr "" "paires de la forme ``clef: valeur`` comme définie par la :rfc:`822`, et doit " "contenir la clef ``Project-Id-Version``. Si la clef ``Content-Type`` est " "trouvée dans une métadonnée, alors la propriété ``charset`` (jeu de " -"caractères) est utilisée pour initialiser la variable d'instance \"protégée" -"\" :attr:`_charset`, sinon cette dernière est positionnée à ``None``. Si " -"l'encodage du jeu de caractères est spécifié, tous les messages " +"caractères) est utilisée pour initialiser la variable d'instance " +"\"protégée\" :attr:`_charset`, sinon cette dernière est positionnée à " +"``None``. Si l'encodage du jeu de caractères est spécifié, tous les messages " "(identifiants et chaînes de caractères) lus depuis le catalogue sont " "convertis en chaînes Unicode via cet encodage, ou via l'encodage ASCII si " "non renseigné." @@ -852,12 +852,13 @@ msgstr "" "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 " +"`__ 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 \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 1.8.11\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" +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. Note that unlike :func:" -"`fnmatch.fnmatch`, :mod:`glob` treats filenames beginning with a dot (``.``) " -"as special cases. (For tilde and shell variable expansion, use :func:`os." -"path.expanduser` and :func:`os.path.expandvars`.)" +"in concert, and not by actually invoking a subshell." msgstr "" "Le module :mod:`glob` recherche tous les chemins correspondant à un motif " "particulier selon les règles utilisées par le shell Unix, les résultats sont " @@ -48,7 +45,15 @@ msgstr "" "remplacer le tilde et les variables shell, nous vous conseillons d'utiliser " "les fonctions :func:`os.path.expanduser` et :func:`os.path.expandvars`.)" -#: library/glob.rst:31 +#: library/glob.rst:28 +msgid "" +"Note that files beginning with a dot (``.``) can only be matched by patterns " +"that also start with a dot, unlike :func:`fnmatch.fnmatch` or :func:`pathlib." +"Path.glob`. (For tilde and shell variable expansion, use :func:`os.path." +"expanduser` and :func:`os.path.expandvars`.)" +msgstr "" + +#: library/glob.rst:34 msgid "" "For a literal match, wrap the meta-characters in brackets. For example, " "``'[?]'`` matches the character ``'?'``." @@ -56,16 +61,16 @@ msgstr "" "Pour une correspondance littérale, il faut entourer le métacaractère par des " "crochets. Par exemple, ``'[?]'`` reconnaît le caractère ``'?'``." -#: library/glob.rst:36 +#: library/glob.rst:39 msgid "The :mod:`pathlib` module offers high-level path objects." msgstr "" "Le module :mod:`pathlib` offre une représentation objet de haut niveau des " "chemins." -#: library/glob.rst:41 +#: library/glob.rst:44 #, fuzzy msgid "" -"Return a possibly-empty list of path names that match *pathname*, which must " +"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 " @@ -80,48 +85,59 @@ msgstr "" "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)." +"shell). Le fait que les résultats soient triés ou non dépend du système de " +"fichiers." -#: library/glob.rst:50 +#: 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:56 +#: 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:62 -#, fuzzy +#: 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 et, " -"zéro ou plus répertoires et sous-répertoires. Si le motif est suivi par un " -"caractère de séparation ``os.sep``, seuls les répertoires et sous-" -"répertoires sont reconnus." +"Si *recursive* est vrai, le motif \"``**``\" reconnaît tous les fichiers, " +"aucun ou plusieurs répertoires, sous-répertoires et liens symboliques aux " +"répertoires. Si le motif est suivi par :data:`os.sep` ou :data:`os.altsep` " +"alors les fichiers ne sont pas inclus dans le résultat." -#: library/glob.rst:86 +#: 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:87 +#: 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:71 +#: library/glob.rst:74 msgid "" "Using the \"``**``\" pattern in large directory trees may consume an " "inordinate amount of time." @@ -129,23 +145,23 @@ msgstr "" "Utiliser le motif \"``**``\" dans de grandes arborescences de dossier peut " "consommer une quantité de temps démesurée." -#: library/glob.rst:89 +#: library/glob.rst:92 msgid "Support for recursive globs using \"``**``\"." -msgstr "Gestion des chemins récursifs utilisant le motif \"``**``\"." +msgstr "Prise en charge des chemins récursifs utilisant le motif \"``**``\"." -#: library/glob.rst:92 +#: library/glob.rst:95 msgid "Added the *root_dir* and *dir_fd* parameters." -msgstr "" +msgstr "Paramètres *root_dir* et *dir_fd* ajoutés." -#: library/glob.rst:83 +#: 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:`iterator` qui produit les mêmes valeurs que :func:`glob`, " -"sans toutes les charger en mémoire simultanément." +"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:98 +#: 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 " @@ -160,7 +176,7 @@ msgstr "" "Windows ``escape('//?/c:/Quo vadis?.txt')`` renvoie ``'//?/c:/Quo vadis[?]." "txt'``." -#: library/glob.rst:107 +#: 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 " @@ -174,7 +190,7 @@ msgstr "" "les résultats suivants. Notons que les composantes principales des chemins " "sont préservées. ::" -#: library/glob.rst:125 +#: 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 :" @@ -184,11 +200,11 @@ msgstr "" "reconnus par défaut. Par exemple, considérons un répertoire contenant :file:" "`card.gif` et :file:`.card.gif` ::" -#: library/glob.rst:137 +#: library/glob.rst:140 msgid "Module :mod:`fnmatch`" msgstr "Module :mod:`fnmatch`" -#: library/glob.rst:138 +#: 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 index 976c7d2569..2b29ebb658 100644 --- a/library/graphlib.po +++ b/library/graphlib.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-09-23 16:16+0200\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" @@ -17,14 +17,21 @@ msgstr "" #: library/graphlib.rst:2 msgid ":mod:`graphlib` --- Functionality to operate with graph-like structures" msgstr "" +":mod:`graphlib` — Fonctionnalités pour travailler avec des structures de " +"type graphe" #: library/graphlib.rst:8 msgid "**Source code:** :source:`Lib/graphlib.py`" -msgstr "" +msgstr "**Code source:** :source:`Lib/graphlib.py`" #: library/graphlib.rst:20 -msgid "Provides functionality to topologically sort a graph of hashable nodes." +#, 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 "" @@ -37,6 +44,14 @@ msgid "" "topological ordering is possible if and only if the graph has no directed " "cycles, that is, if it is a directed acyclic graph." msgstr "" +"L'ordre topologique est un ordre linéaire des sommets d'un graphe afin que " +"pour chaque arête u → v d'un sommet u à un sommet v, cet ordre va placer le " +"sommet u avant le sommet v. Par exemple, les sommets d'un graphe peuvent " +"représenter une tâche à faire et une arête peut représenter la contrainte " +"comme quoi telle tâche doit être réalisée avant telle autre. Dans cet " +"exemple, un ordre topologique est simplement une séquence valide pour ces " +"tâches. Cet ordre n'est possible que si le graphe n'a pas de circuit, c'est-" +"à-dire si c'est un graphe orienté acyclique." #: library/graphlib.rst:31 msgid "" @@ -46,26 +61,35 @@ msgid "" "nodes that have edges that point to the value in the key). Additional nodes " "can be added to the graph using the :meth:`~TopologicalSorter.add` method." msgstr "" +"Si l'argument optionnel *graph* est fourni, cela doit être un dictionnaire " +"représentant un graphe acyclique avec comme clés les nœuds et comme valeurs " +"des itérables sur les prédécesseurs de ces nœuds dans le graphe (les nœuds " +"qui ont des arêtes qui pointent vers la valeur de la clé). Les nœuds " +"s'ajoutent en utilisant la méthode :meth:`~TopologicalSorter.add`" #: library/graphlib.rst:37 msgid "" "In the general case, the steps required to perform the sorting of a given " "graph are as follows:" msgstr "" +"De manière générale, les étapes nécessaires pour trier un graphe donné sont " +"les suivantes :" #: library/graphlib.rst:40 msgid "" "Create an instance of the :class:`TopologicalSorter` with an optional " "initial graph." msgstr "" +"créer une instance de la classe :class:`TopologicalSorter` avec " +"éventuellement un graphe initial ;" #: library/graphlib.rst:42 msgid "Add additional nodes to the graph." -msgstr "" +msgstr "ajouter d'autres nœuds au graphe ;" #: library/graphlib.rst:43 msgid "Call :meth:`~TopologicalSorter.prepare` on the graph." -msgstr "" +msgstr "appeler :meth:`~TopologicalSorter.prepare` sur le graphe ;" #: library/graphlib.rst:44 msgid "" @@ -73,6 +97,10 @@ msgid "" "nodes returned by :meth:`~TopologicalSorter.get_ready` and process them. " "Call :meth:`~TopologicalSorter.done` on each node as it finishes processing." msgstr "" +"tant que :meth:`~TopologicalSorter.is_active` est à ``True``, itérer sur les " +"nœuds renvoyés par :meth:`~TopologicalSorter.get_ready` pour les traiter. " +"Appeler :meth:`~TopologicalSorter.done` sur chaque nœud une fois le " +"traitement terminé." #: library/graphlib.rst:49 msgid "" @@ -80,24 +108,35 @@ msgid "" "no parallelism is involved, the convenience method :meth:`TopologicalSorter." "static_order` can be used directly:" msgstr "" +"Si vous souhaitez simplement trier des nœuds du graphe sans parallélisme, la " +"méthode :meth:`TopologicalSorter.static_order` peut être utilisée " +"directement :" #: library/graphlib.rst:60 msgid "" "The class is designed to easily support parallel processing of the nodes as " "they become ready. For instance::" msgstr "" +"La classe est conçue pour prendre facilement en charge le traitement en " +"parallèle des nœuds quand ils deviennent disponibles. Par exemple ::" #: library/graphlib.rst:87 +#, fuzzy msgid "" "Add a new node and its predecessors to the graph. Both the *node* and all " -"elements in *predecessors* must be hashable." +"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 "" @@ -106,11 +145,17 @@ msgid "" "provided before is included among *predecessors* it will be automatically " "added to the graph with no predecessors of its own." msgstr "" +"Il est possible d'ajouter un nœud sans dépendance (*predecessors* n'est pas " +"fourni) ou de fournir une dépendance deux fois. Si un nœud qui n'a jamais " +"été fourni auparavant est inclus dans *predecessors* il sera automatiquement " +"ajouté au graphe sans prédécesseur lui-même." #: library/graphlib.rst:98 msgid "" "Raises :exc:`ValueError` if called after :meth:`~TopologicalSorter.prepare`." msgstr "" +"Lève une :exc:`ValueError` si appelée après :meth:`~TopologicalSorter." +"prepare`." #: library/graphlib.rst:102 msgid "" @@ -121,6 +166,12 @@ msgid "" "be modified, and therefore no more nodes can be added using :meth:" "`~TopologicalSorter.add`." msgstr "" +"Indique que le graphe est terminé et vérifie les circuits du graphe. Si un " +"circuit est détecté, une :exc:`CycleError` est levée mais :meth:" +"`~TopologicalSorter.get_ready` peut encore être utilisée pour obtenir autant " +"de nœuds que possible avant que les circuits ne bloquent la progression. " +"Après un appel de cette fonction, le graphe ne peut pas être modifié, et " +"donc aucun nœud ne peut être ajouté avec :meth:`~TopologicalSorter.add`." #: library/graphlib.rst:111 msgid "" @@ -131,22 +182,32 @@ msgid "" "`TopologicalSorter.done` is less than the number that have been returned by :" "meth:`TopologicalSorter.get_ready`." msgstr "" +"Renvoie ``True`` si une progression peut être faite et ``False`` dans le cas " +"contraire. La progression est possible si des circuits ne bloquent pas la " +"résolution ou qu'il reste des nœuds prêts qui n'ont pas encore été renvoyés " +"par :meth:`TopologicalSorter.get_ready` ou que le nombre de nœuds marqués :" +"meth:`TopologicalSorter.done` est inférieur au nombre qui a été renvoyé par :" +"meth:`TopologicalSorter.get_ready`." #: library/graphlib.rst:118 msgid "" "The :meth:`~TopologicalSorter.__bool__` method of this class defers to this " "function, so instead of::" msgstr "" +"La méthode :meth:`~TopologicalSorter.__bool__` de cette classe renvoie à " +"cette fonction donc au lieu de ::" #: library/graphlib.rst:124 msgid "it is possible to simply do::" -msgstr "" +msgstr "il est plus simple de faire ::" #: library/graphlib.rst:152 msgid "" "Raises :exc:`ValueError` if called without calling :meth:`~TopologicalSorter." "prepare` previously." msgstr "" +"Lève une :exc:`ValueError` si l'appel à :meth:`~TopologicalSorter.prepare` " +"n'a pas été fait au préalable." #: library/graphlib.rst:134 msgid "" @@ -154,6 +215,9 @@ msgid "" "processed, unblocking any successor of each node in *nodes* for being " "returned in the future by a call to :meth:`TopologicalSorter.get_ready`." msgstr "" +"Marque un ensemble de nœuds renvoyé par :meth:`TopologicalSorter.get_ready` " +"comme traités, permettant aux successeurs de chaque nœud de *nodes* d'être " +"renvoyés lors d'un prochain appel à :meth:`~TopologicalSorter.get_ready`." #: library/graphlib.rst:138 msgid "" @@ -163,6 +227,11 @@ msgid "" "meth:`~TopologicalSorter.prepare` or if node has not yet been returned by :" "meth:`~TopologicalSorter.get_ready`." msgstr "" +"Lève une :exc:`ValueError` si n'importe quel nœud dans *nodes* a déjà été " +"marqué comme traité par un précédent appel à cette méthode ou si un nœud n'a " +"pas été ajouté au graphe en utilisant :meth:`TopologicalSorter.add`, si " +"l'appel est fait sans appel à :meth:`~TopologicalSorter.prepare` ou si le " +"nœud n'a pas encore été renvoyé par :meth:`~TopologicalSorter.get_ready`." #: library/graphlib.rst:146 msgid "" @@ -172,6 +241,11 @@ msgid "" "nodes that have all their predecessors already processed. Once no more " "progress can be made, empty tuples are returned." msgstr "" +"Renvoie un *n*-uplet avec tous les nœuds prêts. Renvoie d'abord tous les " +"nœuds sans prédécesseurs, et une fois marqués comme traités avec un appel " +"de :meth:`TopologicalSorter.done`, les autres appels renvoient tous les " +"nouveaux nœuds dont tous les prédécesseurs sont traités. Une fois que la " +"progression n'est plus possible, des tuples vides sont renvoyés." #: library/graphlib.rst:157 msgid "" @@ -186,6 +260,8 @@ 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 "" @@ -194,10 +270,14 @@ msgid "" "`~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 "" +msgstr "Si un circuit est détecté alors une :exc:`CycleError` est levée." #: library/graphlib.rst:198 msgid "Exceptions" @@ -205,7 +285,7 @@ msgstr "Exceptions" #: library/graphlib.rst:199 msgid "The :mod:`graphlib` module defines the following exception classes:" -msgstr "" +msgstr "Le module :mod:`graphlib` définit les classes d'exceptions suivantes :" #: library/graphlib.rst:203 msgid "" @@ -213,6 +293,9 @@ msgid "" "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 "" @@ -222,3 +305,8 @@ msgid "" "predecessor of the next node in the list. In the reported list, the first " "and the last node will be the same, to make it clear that it is cyclic." msgstr "" +"On accède au circuit détecté via le second élément de l'attribut :attr:" +"`~CycleError.args` de l'instance de l'exception. Cet attribut est une liste " +"de nœuds où chaque nœud est, dans le graphe, un prédécesseur immédiat du " +"nœud suivant de la liste. Dans la liste renvoyée, le premier et le dernier " +"nœud sont les mêmes afin de bien indiquer que c'est un circuit." diff --git a/library/grp.po b/library/grp.po index 11f4cf86f2..26a523e5e2 100644 --- a/library/grp.po +++ b/library/grp.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" +"POT-Creation-Date: 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" @@ -28,7 +28,7 @@ msgstr "" msgid "" "Group database entries are reported as a tuple-like object, whose attributes " "correspond to the members of the ``group`` structure (Attribute field below, " -"see ````):" +"see ````):" msgstr "" #: library/grp.rst:18 @@ -114,35 +114,34 @@ msgstr "" #: library/grp.rst:46 msgid "" -"Since Python 3.6 the support of non-integer arguments like floats or strings " -"in :func:`getgrgid` is deprecated." +":exc:`TypeError` is raised for non-integer arguments like floats or strings." msgstr "" -#: library/grp.rst:52 +#: 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:58 +#: library/grp.rst:57 msgid "Return a list of all available group entries, in arbitrary order." msgstr "" -#: library/grp.rst:64 +#: library/grp.rst:63 msgid "Module :mod:`pwd`" msgstr "Module :mod:`pwd`" -#: library/grp.rst:64 +#: 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:66 +#: library/grp.rst:65 #, fuzzy msgid "Module :mod:`spwd`" msgstr "Module :mod:`pwd`" -#: library/grp.rst:67 +#: library/grp.rst:66 #, fuzzy msgid "An interface to the shadow password database, similar to this." msgstr "" diff --git a/library/gzip.po b/library/gzip.po index 0fa5187d6a..ae86d39ddb 100644 --- a/library/gzip.po +++ b/library/gzip.po @@ -216,7 +216,7 @@ msgid "" "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 " +"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``." diff --git a/library/hashlib.po b/library/hashlib.po index 5c74d71f4f..25a1f4229a 100644 --- a/library/hashlib.po +++ b/library/hashlib.po @@ -5,8 +5,8 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-12-31 11:33+0100\n" -"PO-Revision-Date: 2020-04-27 22:47+0200\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" @@ -25,7 +25,6 @@ msgid "**Source code:** :source:`Lib/hashlib.py`" msgstr "**Code source :** :source:`Lib/hashlib.py`" #: library/hashlib.rst:23 -#, fuzzy msgid "" "This module implements a common interface to many different secure hash and " "message digest algorithms. Included are the FIPS secure hash algorithms " @@ -53,8 +52,8 @@ msgstr "" #: library/hashlib.rst:37 msgid "" -"Some algorithms have known hash collision weaknesses, refer to the \"See also" -"\" section at the end." +"Some algorithms have known hash collision weaknesses, refer to the \"See " +"also\" section at the end." msgstr "" "Certains algorithmes ont des faiblesses connues relatives à la collision, se " "référer à la section \"Voir aussi\" à la fin." @@ -339,8 +338,8 @@ msgid "" "Key derivation and key stretching algorithms are designed for secure " "password hashing. Naive algorithms such as ``sha1(password)`` are not " "resistant against brute-force attacks. A good password hashing function must " -"be tunable, slow, and include a `salt `_." +"be tunable, slow, and include a `salt `_." msgstr "" "Les algorithmes de dérivation de clés et d'étirement de clés sont conçus " "pour le hachage sécurisé de mots de passe. Des algorithmes naïfs comme " @@ -375,14 +374,13 @@ msgstr "" #: library/hashlib.rst:251 msgid "" "The number of *iterations* should be chosen based on the hash algorithm and " -"computing power. As of 2013, at least 100,000 iterations of SHA-256 are " -"suggested." +"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 "" -"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." -#: library/hashlib.rst:255 +#: 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." @@ -391,7 +389,7 @@ msgstr "" "taille du message de l'algorithme de hachage *hash_name* est utilisé, e.g. " "64 pour SHA-512." -#: library/hashlib.rst:267 +#: 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 " @@ -401,13 +399,13 @@ msgstr "" "L'implémentation Python utilise une version anonyme de :mod:`hmac`. Elle est " "trois fois plus lente et ne libère pas le GIL." -#: library/hashlib.rst:273 +#: 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:279 +#: library/hashlib.rst:282 msgid "" "The function provides scrypt password-based key derivation function as " "defined in :rfc:`7914`." @@ -415,7 +413,7 @@ msgstr "" "La fonction fournit la fonction de dérivation de clé *scrypt* comme définie " "dans :rfc:`7914`." -#: library/hashlib.rst:282 +#: library/hashlib.rst:285 msgid "" "*password* and *salt* must be :term:`bytes-like objects `. Applications and libraries should limit *password* to a sensible " @@ -427,7 +425,7 @@ msgstr "" "longueur raisonnable (e.g. 1024). *salt* doit être de 16 octets ou plus " "provenant d'une source correcte, e.g. :func:`os.urandom`." -#: library/hashlib.rst:287 +#: 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). " @@ -437,11 +435,11 @@ msgstr "" "facteur de parallélisation et *maxmem* limite la mémoire (OpenSSL 1.1.0 " "limite à 32 MB par défaut). *dklen* est la longueur de la clé dérivée." -#: library/hashlib.rst:295 +#: library/hashlib.rst:298 msgid "BLAKE2" msgstr "BLAKE2" -#: library/hashlib.rst:302 +#: library/hashlib.rst:305 msgid "" "BLAKE2_ is a cryptographic hash function defined in :rfc:`7693` that comes " "in two flavors:" @@ -449,7 +447,7 @@ msgstr "" "BLAKE2_ est une fonction de hachage cryptographique définie dans la :rfc:" "`7693` et disponible en deux versions ::" -#: library/hashlib.rst:305 +#: library/hashlib.rst:308 msgid "" "**BLAKE2b**, optimized for 64-bit platforms and produces digests of any size " "between 1 and 64 bytes," @@ -457,7 +455,7 @@ msgstr "" "**BLAKE2b**, optimisée pour les plates-formes 64-bit et produisant des " "messages de toutes tailles entre 1 et 64 octets," -#: library/hashlib.rst:308 +#: library/hashlib.rst:311 msgid "" "**BLAKE2s**, optimized for 8- to 32-bit platforms and produces digests of " "any size between 1 and 32 bytes." @@ -465,7 +463,7 @@ msgstr "" "**BLAKE2s**, optimisée pour les plates-formes de 8 à 32-bit et produisant " "des messages de toutes tailles entre 1 et 32 octets." -#: library/hashlib.rst:311 +#: library/hashlib.rst:314 msgid "" "BLAKE2 supports **keyed mode** (a faster and simpler replacement for HMAC_), " "**salted hashing**, **personalization**, and **tree hashing**." @@ -474,7 +472,7 @@ msgstr "" "rapide et plus simple pour HMAC_), **salted hashing**, **personalization**, " "et **tree hashing**." -#: library/hashlib.rst:314 +#: library/hashlib.rst:317 msgid "" "Hash objects from this module follow the API of standard library's :mod:" "`hashlib` objects." @@ -482,15 +480,15 @@ msgstr "" "Les objets hachés de ce module suivent l'API des objets du module :mod:" "`hashlib` de la librairie standard." -#: library/hashlib.rst:319 +#: library/hashlib.rst:322 msgid "Creating hash objects" msgstr "Création d'objets hachés" -#: library/hashlib.rst:321 +#: 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:335 +#: library/hashlib.rst:338 msgid "" "These functions return the corresponding hash objects for calculating " "BLAKE2b or BLAKE2s. They optionally take these general parameters:" @@ -498,7 +496,7 @@ msgstr "" "Ces fonctions produisent l'objet haché correspondant aux calculs de BLAKE2b " "ou BLAKE2s. Elles prennent ces paramètres optionnels ::" -#: library/hashlib.rst:338 +#: 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." @@ -506,11 +504,11 @@ msgstr "" "*data*: morceau initial de données à hacher, qui doit être un objet de type :" "term:`bytes-like object`. Il peut être passé comme argument positionnel." -#: library/hashlib.rst:341 +#: 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:343 +#: library/hashlib.rst:346 msgid "" "*key*: key for keyed hashing (up to 64 bytes for BLAKE2b, up to 32 bytes for " "BLAKE2s)." @@ -518,7 +516,7 @@ msgstr "" "*key*: clé pour les code d'authentification de message *keyed hashing* " "(jusqu'à 64 octets pour BLAKE2b, jusqu'à 32 octets pour BLAKE2s)." -#: library/hashlib.rst:346 +#: library/hashlib.rst:349 msgid "" "*salt*: salt for randomized hashing (up to 16 bytes for BLAKE2b, up to 8 " "bytes for BLAKE2s)." @@ -526,7 +524,7 @@ msgstr "" "*salt*: sel pour le hachage randomisé *randomized hashing* (jusqu'à 16 " "octets pour BLAKE2b, jusqu'à 8 octets pour BLAKE2s)." -#: library/hashlib.rst:349 +#: library/hashlib.rst:352 msgid "" "*person*: personalization string (up to 16 bytes for BLAKE2b, up to 8 bytes " "for BLAKE2s)." @@ -534,57 +532,57 @@ msgstr "" "*person*: chaîne de personnalisation (jusqu'à 16 octets pour BLAKE2b, " "jusqu'à 8 octets pour BLAKE2s)." -#: library/hashlib.rst:352 +#: 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:355 +#: library/hashlib.rst:358 msgid "Hash" msgstr "Hash" -#: library/hashlib.rst:355 +#: library/hashlib.rst:358 msgid "digest_size" msgstr "digest_size" -#: library/hashlib.rst:355 +#: library/hashlib.rst:358 msgid "len(key)" msgstr "len(key)" -#: library/hashlib.rst:355 +#: library/hashlib.rst:358 msgid "len(salt)" msgstr "len(salt)" -#: library/hashlib.rst:355 +#: library/hashlib.rst:358 msgid "len(person)" msgstr "len(person)" -#: library/hashlib.rst:357 +#: library/hashlib.rst:360 msgid "BLAKE2b" msgstr "BLAKE2b" -#: library/hashlib.rst:357 +#: library/hashlib.rst:360 msgid "64" msgstr "64" -#: library/hashlib.rst:357 +#: library/hashlib.rst:360 msgid "16" msgstr "16" -#: library/hashlib.rst:358 +#: library/hashlib.rst:361 msgid "BLAKE2s" msgstr "BLAKE2s" -#: library/hashlib.rst:358 +#: library/hashlib.rst:361 msgid "32" msgstr "32" -#: library/hashlib.rst:358 +#: library/hashlib.rst:361 msgid "8" msgstr "8" -#: library/hashlib.rst:363 +#: library/hashlib.rst:366 msgid "" "BLAKE2 specification defines constant lengths for salt and personalization " "parameters, however, for convenience, this implementation accepts byte " @@ -601,24 +599,24 @@ msgstr "" "``b'salt'`` et ``b'salt\\x00'`` sont la même valeur (Ce n'est pas le cas " "pour *key*.)" -#: library/hashlib.rst:370 +#: 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:372 +#: 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:374 +#: 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:376 +#: library/hashlib.rst:379 msgid "" "*depth*: maximal depth of tree (1 to 255, 255 if unlimited, 1 in sequential " "mode)." @@ -626,7 +624,7 @@ msgstr "" "*depth*: profondeur maximale de l'arbre (1 à 255, 255 si illimité, 1 en mode " "séquentiel)." -#: library/hashlib.rst:379 +#: library/hashlib.rst:382 #, fuzzy msgid "" "*leaf_size*: maximal byte length of leaf (0 to ``2**32-1``, 0 if unlimited " @@ -635,7 +633,7 @@ 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:382 +#: library/hashlib.rst:385 #, fuzzy msgid "" "*node_offset*: node offset (0 to ``2**64-1`` for BLAKE2b, 0 to ``2**48-1`` " @@ -644,14 +642,14 @@ 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:385 +#: 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:387 +#: library/hashlib.rst:390 msgid "" "*inner_size*: inner digest size (0 to 64 for BLAKE2b, 0 to 32 for BLAKE2s, 0 " "in sequential mode)." @@ -659,19 +657,16 @@ msgstr "" "*inner_size*: taille interne du message (0 à 64 pour BLAKE2b, 0 à 32 pour " "BLAKE2s, 0 en mode séquentiel)." -#: library/hashlib.rst:390 +#: library/hashlib.rst:393 +#, fuzzy msgid "" "*last_node*: boolean indicating whether the processed node is the last one " -"(`False` for sequential mode)." +"(``False`` for sequential mode)." msgstr "" -"*last_node*: booléen indiquant si le nœud traité est le dernier (`False` " +"*last_node*: booléen indiquant si le nœud traité est le dernier (``False`` " "pour le mode séquentiel)." -#: library/hashlib.rst:None -msgid "Explanation of tree mode parameters." -msgstr "" - -#: library/hashlib.rst:396 +#: library/hashlib.rst:399 msgid "" "See section 2.10 in `BLAKE2 specification `_ for comprehensive review of tree hashing." @@ -679,38 +674,38 @@ msgstr "" "Voir section 2.10 dans `BLAKE2 specification `_ pour une approche compréhensive du *tree hashing*." -#: library/hashlib.rst:402 +#: library/hashlib.rst:405 msgid "Constants" msgstr "Constantes" -#: library/hashlib.rst:407 +#: 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:413 +#: 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:419 +#: library/hashlib.rst:422 msgid "Maximum key size." msgstr "Taille maximale de clé." -#: library/hashlib.rst:425 +#: 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:429 +#: library/hashlib.rst:432 msgid "Examples" msgstr "Exemples" -#: library/hashlib.rst:432 +#: library/hashlib.rst:435 msgid "Simple hashing" msgstr "Hachage simple" -#: library/hashlib.rst:434 +#: 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:" @@ -725,7 +720,7 @@ msgstr "" "l'empreinte du message en appelant la méthode :meth:`digest` (ou :meth:" "`hexdigest` pour les chaînes hexadécimales)." -#: library/hashlib.rst:447 +#: 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:" @@ -733,7 +728,7 @@ msgstr "" "Pour raccourcir, vous pouvez passer directement au constructeur, comme " "argument positionnel, le premier morceau du message à mettre à jour ::" -#: library/hashlib.rst:454 +#: library/hashlib.rst:457 msgid "" "You can call :meth:`hash.update` as many times as you need to iteratively " "update the hash:" @@ -741,11 +736,11 @@ msgstr "" "Vous pouvez appeler la méthode :meth:`hash.update` autant de fois que " "nécessaire pour mettre à jour le *hash* de manière itérative ::" -#: library/hashlib.rst:467 +#: library/hashlib.rst:470 msgid "Using different digest sizes" msgstr "Usage de tailles d'empreintes différentes" -#: library/hashlib.rst:469 +#: 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 " @@ -756,7 +751,7 @@ msgstr "" "par BLAKE2b sans changer la taille de la sortie, nous pouvons dire à BLAKE2b " "de produire une empreinte de 20 octets ::" -#: library/hashlib.rst:483 +#: 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 " @@ -767,11 +762,11 @@ msgstr "" "de *hash* plus longs); BLAKE2b et BLAKE2s produisent des sorties différentes " "même si les longueurs des sorties sont les mêmes ::" -#: library/hashlib.rst:499 +#: library/hashlib.rst:502 msgid "Keyed hashing" msgstr "Code d'authentification de message" -#: library/hashlib.rst:501 +#: library/hashlib.rst:504 #, fuzzy msgid "" "Keyed hashing can be used for authentication as a faster and simpler " @@ -786,7 +781,7 @@ msgstr "" "manière sécurisée dans le mode préfixe MAC grâce à la propriété " "d'indifférentiabilité héritée de BLAKE." -#: library/hashlib.rst:507 +#: 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'``::" @@ -795,7 +790,7 @@ msgstr "" "128-bit (en hexadécimal) pour un message ``b'message data'`` avec la clé " "``b'pseudorandom key'`` ::" -#: library/hashlib.rst:517 +#: 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::" @@ -804,7 +799,7 @@ msgstr "" "*cookies* envoyés aux utilisateurs et les vérifier plus tard pour être " "certaine qu'ils n'aient pas été altérés ::" -#: library/hashlib.rst:546 +#: 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::" @@ -813,11 +808,11 @@ msgstr "" "(MAC), BLAKE2 peut, bien sûr, être utilisé pour construire un HMAC en " "combinaison du module :mod:`hmac` ::" -#: library/hashlib.rst:557 +#: library/hashlib.rst:560 msgid "Randomized hashing" msgstr "Hachage randomisé" -#: library/hashlib.rst:559 +#: 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 " @@ -828,7 +823,7 @@ msgstr "" "se protéger des attaques par collisions sur les fonctions de hachage " "utilisées dans les signatures numériques." -#: library/hashlib.rst:563 +#: 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, " @@ -868,7 +863,7 @@ msgstr "" "par une signature numérique lorsque tous les morceaux du message sont " "préparés par le signataire." -#: library/hashlib.rst:582 +#: library/hashlib.rst:585 msgid "" "(`NIST SP-800-106 \"Randomized Hashing for Digital Signatures\" `_)" @@ -876,7 +871,7 @@ msgstr "" "(`NIST SP-800-106 \"Randomized Hashing for Digital Signatures\" `_, article en anglais)" -#: library/hashlib.rst:585 +#: 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." @@ -884,7 +879,7 @@ msgstr "" "Dans BLAKE2, le sel est passé une seule fois lors de l'initialisation de la " "fonction de hachage, plutôt qu'à chaque appel d'une fonction de compression." -#: library/hashlib.rst:590 +#: 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 " @@ -895,11 +890,11 @@ msgstr "" "mots de passe. Voir `BLAKE2 FAQ `_ pour plus " "d'informations." -#: library/hashlib.rst:613 +#: library/hashlib.rst:616 msgid "Personalization" msgstr "Personnalisation" -#: library/hashlib.rst:615 +#: 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 " @@ -909,7 +904,7 @@ msgstr "" "différentes empreintes de message d'une même entrée pour différentes " "utilisations. Pour citer les auteurs de la fonction de hachage Skein  ::" -#: library/hashlib.rst:619 +#: 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 " @@ -926,20 +921,21 @@ msgstr "" "prendre en entrée le même *hash*. Personnaliser chaque fonction de hachage " "utilisée dans le protocole stoppe immédiatement ce genre d'attaque." -#: library/hashlib.rst:626 +#: library/hashlib.rst:629 +#, fuzzy msgid "" -"(`The Skein Hash Function Family `_, p. 21)" +"(`The Skein Hash Function Family `_, p. 21)" msgstr "" "(`The Skein Hash Function Family `_, p. 21, article en anglais)" -#: library/hashlib.rst:630 +#: 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:644 +#: library/hashlib.rst:647 msgid "" "Personalization together with the keyed mode can also be used to derive " "different keys from a single one." @@ -947,17 +943,17 @@ msgstr "" "La personnalisation et le *keyed mode* peuvent être utilisés ensemble pour " "dériver différentes clés à partir d'une seule." -#: library/hashlib.rst:658 +#: library/hashlib.rst:661 msgid "Tree mode" msgstr "Mode Arbre" -#: library/hashlib.rst:660 +#: 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:666 +#: library/hashlib.rst:669 msgid "" "This example uses 64-byte internal digests, and returns the 32-byte final " "digest::" @@ -965,11 +961,11 @@ msgstr "" "Cet exemple utilise en interne des empreintes de 64 octets, et produit " "finalement des empreintes 32 octets ::" -#: library/hashlib.rst:696 +#: library/hashlib.rst:699 msgid "Credits" msgstr "Crédits" -#: library/hashlib.rst:698 +#: 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_ " @@ -981,7 +977,7 @@ msgstr "" "créé par *Jean-Philippe Aumasson*, *Luca Henzen*, *Willi Meier*, et *Raphael " "C.-W. Phan*." -#: library/hashlib.rst:703 +#: library/hashlib.rst:706 msgid "" "It uses core algorithm from ChaCha_ cipher designed by *Daniel J. " "Bernstein*." @@ -989,7 +985,7 @@ msgstr "" "Il utilise le cœur de l'algorithme de chiffrement de ChaCha_ conçu par " "*Daniel J. Bernstein*." -#: library/hashlib.rst:705 +#: 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 " @@ -1000,12 +996,12 @@ msgstr "" "l'implémentation C écrite par *Samuel Neves*. La documentation a été copiée " "depuis pyblake2_ et écrite par *Dmitry Chestnykh*." -#: library/hashlib.rst:709 +#: 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:711 +#: library/hashlib.rst:714 msgid "" "The following public domain dedication applies for both C hash function " "implementation, extension code, and this documentation:" @@ -1013,7 +1009,7 @@ msgstr "" "Le transfert dans le domaine publique s'applique pour l'implémentation C de " "la fonction de hachage, ses extensions et cette documentation ::" -#: library/hashlib.rst:714 +#: 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 " @@ -1024,7 +1020,7 @@ msgstr "" "domaine public dans le monde entier. Ce logiciel est distribué sans aucune " "garantie." -#: library/hashlib.rst:718 +#: 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/" @@ -1034,7 +1030,7 @@ msgstr "" "Domain Dedication*. Sinon, voir https://creativecommons.org/publicdomain/" "zero/1.0/." -#: library/hashlib.rst:722 +#: 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 " @@ -1044,38 +1040,38 @@ msgstr "" "modification du projet et au domaine public selon la licence Creative " "Commons Public Domain Dedication 1.0 Universal ::" -#: library/hashlib.rst:726 +#: library/hashlib.rst:729 msgid "*Alexandr Sokolovskiy*" msgstr "*Alexandr Sokolovskiy*" -#: library/hashlib.rst:740 +#: library/hashlib.rst:744 msgid "Module :mod:`hmac`" msgstr "Module :mod:`hmac`" -#: library/hashlib.rst:740 +#: 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:743 +#: library/hashlib.rst:747 msgid "Module :mod:`base64`" msgstr "Module :mod:`base64`" -#: library/hashlib.rst:743 +#: 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:746 +#: library/hashlib.rst:750 msgid "https://blake2.net" msgstr "https://blake2.net" -#: library/hashlib.rst:746 +#: library/hashlib.rst:750 msgid "Official BLAKE2 website." msgstr "Site officiel de BLAKE2." -#: library/hashlib.rst:749 +#: library/hashlib.rst:753 msgid "" "https://csrc.nist.gov/csrc/media/publications/fips/180/2/archive/2002-08-01/" "documents/fips180-2.pdf" @@ -1083,11 +1079,11 @@ msgstr "" "https://csrc.nist.gov/csrc/media/publications/fips/180/2/archive/2002-08-01/" "documents/fips180-2.pdf" -#: library/hashlib.rst:749 +#: 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:753 +#: library/hashlib.rst:757 msgid "" "https://en.wikipedia.org/wiki/" "Cryptographic_hash_function#Cryptographic_hash_algorithms" @@ -1095,7 +1091,7 @@ msgstr "" "https://en.wikipedia.org/wiki/" "Cryptographic_hash_function#Cryptographic_hash_algorithms" -#: library/hashlib.rst:752 +#: library/hashlib.rst:756 msgid "" "Wikipedia article with information on which algorithms have known issues and " "what that means regarding their use." @@ -1103,15 +1099,33 @@ 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:755 +#: library/hashlib.rst:760 #, fuzzy msgid "https://www.ietf.org/rfc/rfc8018.txt" msgstr "https://www.ietf.org/rfc/rfc2898.txt" -#: library/hashlib.rst:756 +#: 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 index d37c5df78a..32fcab25f2 100644 --- a/library/heapq.po +++ b/library/heapq.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" +"POT-Creation-Date: 2022-03-18 17:06+0100\n" "PO-Revision-Date: 2021-05-10 23:09+0200\n" "Last-Translator: \n" "Language-Team: FRENCH \n" @@ -295,9 +295,9 @@ msgid "" "A `priority queue `_ is common " "use for a heap, and it presents several implementation challenges:" msgstr "" -"Une `file de priorité `_ est une application courante des tas et présente plusieurs défis " -"d'implémentation :" +"Une `file de priorité `_ est une application courante des tas et présente " +"plusieurs défis d'implémentation :" #: library/heapq.rst:172 msgid "" @@ -415,17 +415,17 @@ msgid "" "two cells it tops contain three different items, but the top cell \"wins\" " "over the two topped cells." msgstr "" -"Dans l'arbre ci-dessus, chaque nœud *k* a pour enfants ``2*k+1`` et ``2*k" -"+2``. Dans les tournois binaires habituels dans les compétitions sportives, " -"chaque nœud est le vainqueur des deux nœuds inférieurs et nous pouvons " -"tracer le chemin du vainqueur le long de l'arbre afin de voir qui étaient " -"ses adversaires. Cependant, dans de nombreuses applications informatiques de " -"ces tournois, nous n'avons pas besoin de produire l'historique du vainqueur. " -"Afin d'occuper moins de mémoire, on remplace le vainqueur lors de sa " -"promotion par un autre élément à un plus bas niveau. La règle devient alors " -"qu'un nœud et les deux nœuds qu'il chapeaute contiennent trois éléments " -"différents, mais le nœud supérieur « gagne » contre les deux nœuds " -"inférieurs." +"Dans l'arbre ci-dessus, chaque nœud *k* a pour enfants ``2*k+1`` et " +"``2*k+2``. Dans les tournois binaires habituels dans les compétitions " +"sportives, chaque nœud est le vainqueur des deux nœuds inférieurs et nous " +"pouvons tracer le chemin du vainqueur le long de l'arbre afin de voir qui " +"étaient ses adversaires. Cependant, dans de nombreuses applications " +"informatiques de ces tournois, nous n'avons pas besoin de produire " +"l'historique du vainqueur. Afin d'occuper moins de mémoire, on remplace le " +"vainqueur lors de sa promotion par un autre élément à un plus bas niveau. La " +"règle devient alors qu'un nœud et les deux nœuds qu'il chapeaute contiennent " +"trois éléments différents, mais le nœud supérieur « gagne » contre les deux " +"nœuds inférieurs." #: library/heapq.rst:268 msgid "" @@ -450,13 +450,13 @@ msgstr "" #: library/heapq.rst:275 msgid "" "A nice feature of this sort is that you can efficiently insert new items " -"while the sort is going on, provided that the inserted items are not \"better" -"\" than the last 0'th element you extracted. This is especially useful in " -"simulation contexts, where the tree holds all incoming events, and the \"win" -"\" condition means the smallest scheduled time. When an event schedules " -"other events for execution, they are scheduled into the future, so they can " -"easily go into the heap. So, a heap is a good structure for implementing " -"schedulers (this is what I used for my MIDI sequencer :-)." +"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 " diff --git a/library/hmac.po b/library/hmac.po index 6ac9edc9bc..a2cb9a639c 100644 --- a/library/hmac.po +++ b/library/hmac.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" +"POT-Creation-Date: 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" @@ -124,8 +124,9 @@ msgstr "" "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 " +"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." @@ -147,8 +148,9 @@ msgstr "" "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 " +"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." diff --git a/library/html.entities.po b/library/html.entities.po index 1c5ffd39b7..9a3d407a60 100644 --- a/library/html.entities.po +++ b/library/html.entities.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-21 15:04+0200\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" @@ -72,9 +72,10 @@ msgid "Footnotes" msgstr "Notes" #: library/html.entities.rst:47 +#, fuzzy msgid "" -"See https://html.spec.whatwg.org/multipage/syntax.html#named-character-" -"references" +"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 index 286c674277..1d0654ae9d 100644 --- a/library/html.parser.po +++ b/library/html.parser.po @@ -5,23 +5,23 @@ 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" +"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 "" +msgstr ":mod:`html.parser`— Un analyseur syntaxique simple pour HTML et XHTML" #: library/html.parser.rst:7 -#, fuzzy msgid "**Source code:** :source:`Lib/html/parser.py`" -msgstr "**Code source :** :source:`Lib/email/parser.py`" +msgstr "**Code source :** :source:`Lib/html/parser.py`" #: library/html.parser.rst:15 msgid "" @@ -29,10 +29,17 @@ msgid "" "for parsing text files formatted in HTML (HyperText Mark-up Language) and " "XHTML." msgstr "" +"Ce module définit une classe :class:`HTMLParser` qui sert de base pour " +"l'analyse syntaxique de fichiers texte formatés HTML (*HyperText Mark-up " +"Language*, le « langage de balisage hypertexte ») et XHTML (*EXtensible " +"HyperText Markup Language*, le « langage extensible de balisage " +"hypertexte »)." #: library/html.parser.rst:20 msgid "Create a parser instance able to parse invalid markup." msgstr "" +"Crée une instance d'analyseur capable de traiter tout balisage, même " +"invalide." #: library/html.parser.rst:22 msgid "" @@ -40,6 +47,9 @@ msgid "" "(except the ones in ``script``/``style`` elements) are automatically " "converted to the corresponding Unicode characters." msgstr "" +"Si *convert_charrefs* est ``True`` (valeur par défaut), toute référence de " +"caractère (sauf ceux enchâssés dans des éléments ``script``/``style``) est " +"automatiquement convertie en son caractère Unicode." #: library/html.parser.rst:26 msgid "" @@ -48,6 +58,11 @@ msgid "" "encountered. The user should subclass :class:`.HTMLParser` and override its " "methods to implement the desired behavior." msgstr "" +"Une instance de :class:`.HTMLParser` est alimentée par des données HTML. " +"Elle fait appel à des méthodes offrant un traitement spécifique quand est " +"rencontré un élément de balisage : balise ouvrante ou fermante, textes, " +"commentaires… Pour implémenter le comportement désiré, l'utilisateur crée " +"une sous-classe de :class:`.HTMLParser` en surchargeant ses méthodes." #: library/html.parser.rst:31 msgid "" @@ -55,18 +70,22 @@ msgid "" "tag handler for elements which are closed implicitly by closing an outer " "element." msgstr "" +"Cet analyseur ne vérifie ni que les balises fermantes correspondent aux " +"balises ouvrantes, ni n'invoque le gestionnaire de balises fermantes pour " +"les éléments implicitement fermés par un élément extérieur." #: library/html.parser.rst:34 msgid "*convert_charrefs* keyword argument added." -msgstr "" +msgstr "L'argument *convert_charrefs* a été ajouté." #: library/html.parser.rst:37 msgid "The default value for argument *convert_charrefs* is now ``True``." msgstr "" +"La valeur par défaut de l'argument *convert_charrefs* est désormais ``True``." #: library/html.parser.rst:42 msgid "Example HTML Parser Application" -msgstr "" +msgstr "Exemple d'application de l'analyseur HTML" #: library/html.parser.rst:44 msgid "" @@ -74,20 +93,22 @@ msgid "" "`HTMLParser` class to print out start tags, end tags, and data as they are " "encountered::" msgstr "" +"Comme exemple simple, un analyseur HTML minimal qui utilise la classe :class:" +"`HTMLParser` pour afficher les balises ouvrantes, les balises fermantes " +"ainsi que les données quand elles apparaissent ::" #: library/html.parser.rst:64 msgid "The output will then be:" -msgstr "" +msgstr "La sortie est alors :" #: library/html.parser.rst:83 msgid ":class:`.HTMLParser` Methods" -msgstr "" +msgstr "Méthodes de la classe :class:`.HTMLParser`" #: library/html.parser.rst:85 -#, fuzzy msgid ":class:`HTMLParser` instances have the following methods:" msgstr "" -"Les instances de :class:`!HTMLCalendar` utilisent les méthodes suivantes :" +"Les instances de :class:`HTMLParser` disposent des méthodes suivantes :" #: library/html.parser.rst:90 msgid "" @@ -95,6 +116,11 @@ msgid "" "complete elements; incomplete data is buffered until more data is fed or :" "meth:`close` is called. *data* must be :class:`str`." msgstr "" +"Alimente l'analyseur avec du texte. Ce texte est traité dans la mesure où il " +"constitue des éléments complets ; les données incomplètes sont mises dans un " +"tampon jusqu'à ce que d'autres données soient fournies ou que la méthode :" +"meth:`close` soit appelée. L'argument *data* doit être de classe :class:" +"`str`." #: library/html.parser.rst:97 msgid "" @@ -103,24 +129,39 @@ msgid "" "additional processing at the end of the input, but the redefined version " "should always call the :class:`HTMLParser` base class method :meth:`close`." msgstr "" +"Force le traitement de toutes les données du tampon comme si elles étaient " +"suivies par un caractère *fin de fichier*. Cette méthode peut-être redéfinie " +"par une classe dérivée pour ajouter des traitements supplémentaires à la fin " +"de l'entrée, mais la version redéfinie devra impérativement appeler la " +"méthode :meth:`close` de la classe de base :class:`HTMLParser`." #: library/html.parser.rst:105 msgid "" "Reset the instance. Loses all unprocessed data. This is called implicitly " "at instantiation time." msgstr "" +"Réinitialise l'instance. Toutes les données non traitées sont perdues. Cette " +"méthode est appelée implicitement lors de l'instanciation." #: library/html.parser.rst:111 msgid "Return current line number and offset." msgstr "" +"Renvoie le numéro de ligne et le numéro du caractère dans la ligne où le " +"curseur est positionné." #: library/html.parser.rst:116 +#, 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 "" @@ -129,12 +170,18 @@ msgid "" "class implementations do nothing (except for :meth:`~HTMLParser." "handle_startendtag`):" msgstr "" +"Les méthodes suivantes sont appelées lors de la rencontre de données ou " +"d'éléments de balisage ; elles sont destinées à être surchargées par la sous-" +"classe. L'implémentation de la classe de base ne fait rien (sauf pour ce qui " +"est de :meth:`~HTMLParser.handle_startendtag`) :" #: library/html.parser.rst:129 msgid "" -"This method is called to handle the start of a tag (e.g. ``
``)." +"This method is called to handle the start tag of an element (e.g. ``
``)." msgstr "" +"Cette méthode est appelée pour traiter une balise ouvrante (p. ex. ``
``)." #: library/html.parser.rst:131 msgid "" @@ -144,6 +191,12 @@ msgid "" "translated to lower case, and quotes in the *value* have been removed, and " "character and entity references have been replaced." msgstr "" +"L'argument *tag* contient le nom de la balise en minuscules. L'argument " +"*attrs* contient une liste de *n-uplets* ``(name, value)`` regroupant les " +"attributs présents entre les symboles ``<`` et ``>`` de la balise. Le " +"paramètre *name* est converti en minuscule ; les guillemets sont supprimés " +"du paramètre *value* et toute entité de référence ou de caractère est " +"remplacée." #: library/html.parser.rst:137 msgid "" @@ -151,21 +204,28 @@ msgid "" "would be called as ``handle_starttag('a', [('href', 'https://www.cwi." "nl/')])``." msgstr "" +"Par exemple, pour la balise ````, cette " +"méthode est appelée par ``handle_starttag('a', [('href', 'https://www.cwi." +"nl/')])``." #: library/html.parser.rst:140 msgid "" "All entity references from :mod:`html.entities` are replaced in the " "attribute values." msgstr "" +"Toute référence d'entité présente dans :mod:`html.entities` est remplacée " +"dans la valeur des attributs." #: library/html.parser.rst:146 msgid "" "This method is called to handle the end tag of an element (e.g. ``
``)." msgstr "" +"Cette méthode est appelée pour traiter les balises fermantes (p. ex. ````)." #: library/html.parser.rst:148 msgid "The *tag* argument is the name of the tag converted to lower case." -msgstr "" +msgstr "L'argument *tag* est le nom de la balise en minuscules." #: library/html.parser.rst:153 msgid "" @@ -175,12 +235,20 @@ msgid "" "implementation simply calls :meth:`handle_starttag` and :meth:" "`handle_endtag`." msgstr "" +"Traitée de façon similaire à :meth:`handle_starttag`, mais appelée quand " +"l'analyseur rencontre une balise vide de type *XHTML* (p. ex. ````). Cette méthode peut-être surchargée par les sous-classes demandant " +"cette information lexicale ; l'implémentation par défaut appelle simplement :" +"meth:`handle_starttag` et :meth:`handle_endtag`." #: library/html.parser.rst:161 msgid "" "This method is called to process arbitrary data (e.g. text nodes and the " "content of ```` and ````)." msgstr "" +"Cette méthode est appelée pour traiter toute donnée arbitraire (p. ex. les " +"nœuds textuels ou les contenus de ```` et ``