diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000000..7f909e5306 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,11 @@ +# Usefull with: +# +# cat < ~/.local/bin/podiff +# #!/bin/sh +# grep -v '^#:' "$1" +# EOF +# chmod a+x ~/.local/bin/podiff +# git config diff.podiff.textconv podiff + +*.po diff=podiff +*.pot diff=podiff diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000000..501166396f --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1 @@ +liberapay: python-docs-fr diff --git a/.github/ISSUE_TEMPLATE/r-servation.md b/.github/ISSUE_TEMPLATE/r-servation.md new file mode 100644 index 0000000000..6a3f74edb8 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/r-servation.md @@ -0,0 +1,12 @@ +--- +name: Réservation +about: Juste réserver un fichier po (je veux être le seul à travailler dessus). +title: Je travaille sur DOSSIER/FICHIER.po +labels: reservation +assignees: '' + +--- + + diff --git a/.github/problem-matchers/pospell.json b/.github/problem-matchers/pospell.json new file mode 100644 index 0000000000..cedddb008a --- /dev/null +++ b/.github/problem-matchers/pospell.json @@ -0,0 +1,15 @@ +{ + "problemMatcher": [ + { + "owner": "pospell", + "pattern": [ + { + "regexp": "^(.*):(\\d+):(.*)$", + "file": 1, + "line": 2, + "message": 3 + } + ] + } + ] +} diff --git a/.github/stale.yml b/.github/stale.yml new file mode 100644 index 0000000000..c005b30158 --- /dev/null +++ b/.github/stale.yml @@ -0,0 +1,26 @@ +# Number of days of inactivity before an issue becomes stale +daysUntilStale: 60 +# Number of days of inactivity before a stale issue is closed +daysUntilClose: 14 +# Issues with these labels will never be considered stale +exemptLabels: + - meta + - on hold + - EASY +# Label to use when marking an issue as stale +staleLabel: stale +# Comment to post when marking an issue as stale. Set to `false` to disable +markComment: > + Cette issue/pull request a été automatiquement marquée comme innactive car elle n'a pas eu d'activité récente. + Elle sera fermée si il ne se passe rien dans les 14 jours qui viennent. Merci pour votre contribution + + This issue/pull request has been automatically marked as stale because it has not had + recent activity. It will be closed if no further activity occurs. Thank you + for your contributions. +# Comment to post when closing a stale issue. Set to `false` to disable +closeComment: true + +# Comment to post when removing the stale label. +unmarkComment: > + Cette issue n'est plus innactive ! + This issue isn't stale anymore! diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000000..ec71c0146f --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,101 @@ +--- + +name: Tests + +on: + push: + branches: + - '*.*' + pull_request: + branches: + - '*.*' + +jobs: + checks: + strategy: + matrix: + tool: + - name: sphinx-lint + package: sphinx-lint + command: 'sphinx-lint --enable default-role --ignore .git' + - name: Orthographe + package: pospell + apt_dependencies: hunspell hunspell-fr-comprehensive + command: 'pospell -p dict -l fr_FR $CHANGED_PO_FILES' + - name: Longueur des lignes + command: 'awk ''{if (length($0) > 80 && length(gensub(/[^ ]/, "", "g")) > 1) {print FILENAME ":" FNR, "line too long:", $0; ERRORS+=1}} END {if (ERRORS>0) {exit 1}}'' $CHANGED_PO_FILES' + - name: Grammaire + package: padpo + command: 'padpo -i $CHANGED_PO_FILES 2>&1 | grep -v -Ff padpo.ignore' + + name: ${{ matrix.tool.name }} (${{ matrix.tool.package }}) + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Register problem matchers + run: echo "::add-matcher::.github/problem-matchers/pospell.json" + - uses: lots0logs/gh-action-get-changed-files@2.1.4 + id: changed_files + with: + token: ${{ secrets.GITHUB_TOKEN }} + - uses: actions/setup-python@v2 + with: + python-version: '3.9' + - name: Install ${{ matrix.tool.package }} + run: | + if [ -n "${{ matrix.tool.apt_dependencies }}" ]; then + sudo apt-get update && sudo apt-get install -y ${{ matrix.tool.apt_dependencies }} + fi + if [ -n "${{ matrix.tool.package }}" ]; then + python -m pip install --upgrade pip setuptools wheel + python -m pip install ${{ matrix.tool.package }} + fi + - name: Run ${{ matrix.tool.package }} + env: + ADDED_FILES: ${{ join(fromJSON(steps.changed_files.outputs.added), ' ') }} + MODIFIED_FILES: ${{ join(fromJSON(steps.changed_files.outputs.modified), ' ') }} + run: | + CHANGED_PO_FILES=$(printf "%s %s\n" "$ADDED_FILES" "$MODIFIED_FILES" | tr ' ' '\n' | grep '.po$'; true) + if [ -n "$CHANGED_PO_FILES" ] + then + echo "Running on:" $CHANGED_PO_FILES + ${{ matrix.tool.command }} + else + echo "No changed po files, nothing to check." + fi + + sphinx: + name: 'Génération de la doc (sphinx)' + runs-on: ubuntu-latest + timeout-minutes: 30 + steps: + - uses: actions/checkout@v3 + - uses: actions/cache@v3 + with: + path: '~/cpython/' + key: '1' + - uses: actions/cache@v3 + with: + path: ~/.cache/pip + key: '1' + - uses: actions/setup-python@v4 + with: + python-version: '3.10' + - name: Clone cpython + run: | + if [ ! -d ~/cpython ]; then + git clone https://github.com/python/cpython ~/cpython/ + else + git -C ~/cpython fetch + fi + - name: Prepare build hierarchy + run: | + mkdir -p ~/locales/fr/LC_MESSAGES/ + cp -uv --parents *.po */*.po ~/locales/fr/LC_MESSAGES/ + git -C ~/cpython checkout $(grep ^CPYTHON_CURRENT_COMMIT Makefile| cut -d= -f2) + - name: Prepare venv + run: | + make -C $HOME/cpython/Doc clean-venv + make -C $HOME/cpython/Doc venv + - name: sphinx-build + run: make -C $HOME/cpython/Doc SPHINXOPTS="-q -j4 -D locale_dirs=$HOME/locales -D language=fr -D gettext_compact=0" autobuild-dev-html diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000..6d4d663da4 --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ +*.mo +.tx/**/*.po +venv/ +.idea/ +.DS_Store +.pospell/ +.potodo/ +locales/ +.venv/ diff --git a/.potodoignore b/.potodoignore new file mode 100644 index 0000000000..734b522417 --- /dev/null +++ b/.potodoignore @@ -0,0 +1,2 @@ +venv/ +locales/ diff --git a/CONTRIBUTING-CORE.rst b/CONTRIBUTING-CORE.rst new file mode 100644 index 0000000000..9701a87ee4 --- /dev/null +++ b/CONTRIBUTING-CORE.rst @@ -0,0 +1,61 @@ +Maintenance +----------- + +Dans certains cas on a besoin de propager des traductions d'une branche +à l'autre : + +- d'une ancienne branche vers une nouvelle branche : lors du passage + d'une version à l'autre de CPython, lorsque quelqu'un a une PR sur une + ancienne version (*forward porting*) ; +- d'une nouvelle branche vers des anciennes branches : pour propager + de temps en temps le travail sur d'anciennes versions (rétroportage + ou *backporting*). + +Pour forward-porter un ou plusieurs commits, il vaut mieux utiliser ``git +cherry-pick -x LE_SHA``, ça garde l'auteur, le sha1 d'origine, et +toutes les modifications. + +Pour rétroporter « en gros » on utilise ``pomerge``\ : on le fait lire +sur une branche, puis écrire sur une autre, par exemple pour copier de +la 3.8 à la 3.7 : + +.. code-block:: bash + + git fetch + git checkout 3.8 + git reset --hard upstream/3.8 + pomerge --from-files *.po */*.po + git checkout --branch back-porting upstream/3.7 + pomerge --no-overwrite --to-files *.po */*.po + powrap --modified + git add --patch + git commit --message="Backporting from 3.8" + git push --set-upstream origin HEAD + + +Notes : + +- j'utilise ``git fetch`` au début pour avoir *upstream/3.7* et + *upstream/3.8* à jour localement, ainsi je peux travailler sans + toucher au réseau jusqu'au ``git push``, mais chacun fait comme il + veut ; +- j'utilise ``*.po */*.po`` et pas ``**/*.po``, car si vous avez un + *venv* dans l'arborescence il va vous trouver des traductions de Sphinx + et peut-être d'autres paquets dans ``.venv/lib/python*/`` (et mettre + beaucoup plus de temps) ; +- j'utilise ``pomerge --no-overwrite``, ça indique à ``pomerge`` de + n'écrire que si le ``msgstr`` est vide, donc de ne pas modifier + l'existant, ainsi il est impossible de casser quelque chose. + On peut le tenter sans ``--no-overwrite``, attention, ça fait + des bêtises, ça nécessite une relecture attentive : + certaines traductions, comme *example:* sont en parfois traduites en + français avec une majuscule, et parfois non, en + fonction du contexte, ``pomerge`` uniformiserait ça, ce n'est pas bien ; +- attention, si vous testez sans ``--no-overwrite``, il est peut-être + bon de vider la mémoire de ``pomerge`` avant la lecture, pour éviter + de lui faire écrire des choses lues lors des sessions précédentes, + via un ``rm -f ~/.pomerge.json``\ ; +- j'utilise ``git add --patch`` (ou ``-p``) car j'aime bien relire quand même, + en général, je n'ajoute pas les différences d'ordre dans les entêtes, + mais un ``git add --update`` irait très bien ; +- attention au fichier *dict* auquel il peut manquer des lignes. diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst new file mode 100644 index 0000000000..03363622b8 --- /dev/null +++ b/CONTRIBUTING.rst @@ -0,0 +1,843 @@ +Guide de contribution à la documentation via GitHub +################################################### + +Prérequis +========= + +Outils souhaitables +------------------- + +Pour pouvoir participer à la traduction en commun, il est souhaitable +d'installer : + +- un client ``git`` `Linux `_, `MacOS + `_ ou `Windows `_ ; + +- un éditeur de fichier ``.po`` (comme `Poedit `_). + + +Outils facultatifs +------------------ +De plus, il peut être utile de s'équiper d'utilitaires pour faciliter +la manipulation des fichiers ``.po`` et la traduction. + +`Poutils `_ est un paquet PyPI qui +regroupe un certain nombre d'outils liés à la traduction. Dans un +environnement disposant de Python 3.7 ou plus, installez-le avec :: + + python3 -m pip install poutils + +Dans notre cas, les utilitaires de *Poutils* qui nous intéressent sont : + +Pospell +^^^^^^^ + +Vérificateur d'orthographe fondé sur Hunspell. ``make spell`` exécute +Pospell. Pour l'utiliser, il vous faut installer Hunspell. Attention, +dans Debian notamment (et ses dérivés comme Ubuntu), il existe plusieurs +dictionnaires français qui diffèrent en raison de l'orthographe +réformée. Installez celui qui contient les deux orthographes avec :: + + sudo apt install hunspell hunspell-fr-comprehensive + +Potodo +^^^^^^ + +Permet d'identifier les parties de la documentation qu'il reste à +traduire. ``make todo`` fait appel à Potodo. + +Pogrep +^^^^^^ + +Permet de rechercher dans la documentation des termes. Utile si on a un doute +sur comment traduire un terme ou chercher la traduction d'un terme dans +d'autres fichiers. Pour connaître les options disponibles, tapez :: + + pogrep --help + +Powrap +^^^^^^ + +Formateur de fichier *.po*. C'est l'outil qui se cache derrière ``make +wrap``. + +Padpo (beta) +^^^^^^^^^^^^ + +Analyseur de code qui encapsule notamment `Grammalecte +`_ et qui vérifie la grammaire, l'orthographe +et la syntaxe des fichiers *.po*. + +Configuration des outils +------------------------ + +Configuration de Poedit +^^^^^^^^^^^^^^^^^^^^^^^ +* N'oubliez pas de configurer votre nom et + votre adresse de courriel (Édition → Préférences → Général). +* Vérifiez également qu'il est configuré pour passer à la ligne à 79 + caractères (Édition → Préférences → Avancé → Passer à la ligne à + 79). + +Configuration de Git (rendre plus lisible l'affichage des modifications) +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Le résultat de ``git diff`` est souvent encombré de changements inutiles de numéros +de ligne, comme : + +.. code-block:: diff + + -#: ../Doc/library/sys.rst:406 + +#: ../Doc/library/sys.rst:408 + + +Pour dire à Git que ce ne sont pas des informations utiles, vous pouvez faire +ce qui suit après vous être assuré que ``~/.local/bin/`` se trouve dans votre +``PATH``. + +.. code-block:: bash + + cat < ~/.local/bin/podiff + #!/bin/sh + grep -v '^#:' "\$1" + EOF + + chmod a+x ~/.local/bin/podiff + + git config diff.podiff.textconv podiff + + +Pas d'inquiétude, cela ne change la façon dont Git affiche les changements que sur +les fichiers de la traduction, sans incidence sur les autres. + +Première étape : créer et peupler son dépôt +=========================================== + +Sur Github +---------- + +Depuis votre compte GitHub, se rendre dans le dépôt des sources `python-docs-fr +`_ puis cliquer sur son bouton ``Fork``. +Ceci crée une copie du projet sur votre compte Github. C'est sur cette copie +que vous avez le droit de faire des modifications. + +Étape par étape : + +.. code-block:: bash + + # Clonez votre fork Github avec `git` en utilisant ssh + git clone git@github.com:VOTRE_NOM_DE_COMPTE_GITHUB/python-docs-fr.git + + # ou bien avec HTTPS + git clone https://github.com/VOTRE_NOM_DE_COMPTE_GITHUB/python-docs-fr.git + + # Allez dans le répertoire cloné + cd python-docs-fr/ + + # Ajoutez le dépôt officiel (nommé upstream), + # ceci permet à *git* de savoir quoi et où est *upstream* + git remote add upstream https://github.com/python/python-docs-fr.git + + +Sur une autre forge +------------------- + +Si vous n'avez pas de compte Github, il est possible d'utiliser une autre forge. +Vous devez dans un premier temps initier un dépôt vide sur la forge où vous voulez héberger le +dépôt puis le peupler. + +Étape par étape : + +.. code-block:: bash + + # Clonez en HTTPS le dépôt + git clone https://github.com/python/python-docs-fr + + # Allez dans le répertoire cloné + cd python-docs-fr/ + + # Renommez *origin* en *upstream* pour avoir une référence vers le dépôt officiel + # Il permettra de récupérer les nouveaux commits + git remote rename origin upstream + + # Rajoutez le *remote* de votre forge (en HTTPS ou SSH) + git remote add origin + + # Envoyez le dépôt sur votre forge et définir par défaut + git push -u origin + + +Deuxième étape : choisir et réserver le fichier sur lequel travailler +===================================================================== + +Note liminaire +-------------- + +Il est vivement conseillé de ne pas travailler sur fichiers des +répertoires *c-api/*, *whatsnew/*, *distutils/* et *install/* : + +- *c-api/* car c'est une partie très technique ; + +- *whatsnew/* car les anciennes versions de Python sont pour la plupart + obsolètes et leurs journaux de modifications ne sont pas les pages les plus + consultées ; + +- *distutils/*, *install/*, et quelques autres parties qui seront bientôt + obsolètes. De manière générale, il n'est pas utile de traduire un module que + sa documentation mentionne comme obsolète. + +Trouver un fichier sur lequel travailler +---------------------------------------- + +Pour vous aiguiller dans votre choix, vous pouvez utiliser ``potodo``, +un outil recherchant des fichiers ``.po`` à traduire. Une fois +installé, utilisez la commande ``make todo`` dans votre clone local. + +La liste renvoyée contient tous les fichiers qui ne sont pas encore complètement +traduits. Vous pouvez choisir n'importe quel fichier non réservé dans la liste +renvoyée (notez que ceux mentionnés plus haut sont automatiquement exclus). + +Vous pouvez commencer par des tâches faciles comme réviser les entrées +*fuzzy* pour aider à garder la documentation à jour (trouvez-les à l'aide +de ``make fuzzy``). Une entrée *fuzzy* correspond à une entrée déjà traduite +mais dont la source en anglais a été modifiée depuis (correction orthographique, +changement d'un terme, ajout ou suppression d'une phrase…). Elles sont +généralement plus « faciles » à traduire. + +Vous pouvez également relire des entrées déjà traduites pour vous faire une +idée, et passer ensuite à la traduction de celles qui ne le sont pas encore. + +Nous vous conseillons de choisir, si possible, un fichier traitant +d'un sujet que vous maîtrisez, cela vous aidera grandement à produire +une traduction de bonne qualité. + +Si c'est votre première contribution, commencez par une toute petite +traduction, de quelques paragraphes maximum, pour vous familiariser. Il n'est +pas nécessaire de terminer un fichier lorsqu'on le commence, vous +pouvez donc prendre n'importe quel fichier, mais ne traduire que +quelques paragraphes. + +Réserver le fichier +------------------- + +*Chaque fois que vous commencez un nouveau fichier, suivez cette procédure.* + +Une fois que vous avez choisi un fichier sur lequel travailler vous pouvez nous +le signaler par différents moyens : + +* Soit en ouvrant un `ticket sur Github `_ + en indiquant dans le titre ``Je travaille sur DOSSIER/FICHIER.po`` + (par exemple « Je travaille sur library/sys.po »). + +Ceci permet à `potodo`_ de détecter via l'API Github les fichiers ``.po`` réservés +dans les tickets et les *pull requests*. + +* Soit en créant un sujet sur le + `discuss de l'AFPy `_ dans la section Traduction + en indiquant sur quoi vous travaillez et l'URL de votre dépôt. + +* Soit sur IRC en venant sur le canal + `irc://irc.libera.chat/#python-docs-fr `_ + pour nous le signaler. + + +Création de la branche de traduction +------------------------------------ + +*Chaque fois que vous commencez un nouveau fichier, suivez cette procédure.* + +Vous êtes maintenant prêt. Pour travailler, nous avons besoin d'une +branche, basée sur une version à jour (fraîchement récupérée) de la +branche « upstream/3.10 ». On met donc à jour notre version locale. + +.. code-block:: bash + + git fetch upstream + + +On crée ensuite la branche, en la basant sur « upstream/3.10 », fraîchement récupérée. +Il est pratique de nommer cette branche en fonction du +fichier sur lequel on travaille. Par exemple, si vous travaillez sur +« library/sys.po », vous pouvez nommer votre branche « library-sys ». + +.. code-block:: bash + + git checkout -b library-sys upstream/3.10 + + + +Troisième étape: Traduction +=========================== + +Avec Poedit +--------------- +Ici, remplacez « library/sys.po » par le fichier que vous avez choisi précédemment. + +.. code-block:: bash + + poedit library/sys.po + + +Ou lancez simplement Poedit puis « Fichier » → « Ouvrir ». + + +Vérifications après traduction +------------------------------ + +Après avoir modifié les fichiers, vérifiez que vous respectez les +`conventions`_ du projet. Pour vous y aider, la commande : + +.. code-block:: bash + + make verifs + +vérifie la longueur des lignes et l'orthographe (mais pas la +grammaire, pour cela utilisez `padpo (beta)`_). En cas de doute, un +`glossaire`_ répertorie déjà les traductions retenues pour certains +termes techniques ou faux amis en anglais. + +Si ``make verifs`` trouve des problèmes de longueurs de ligne, +vérifiez votre configuration ``poedit`` (Édition → Préférences → +Avancé → Passer à la ligne à 79) ou utilisez ``make wrap``. + +Une fois la traduction finie, il faut compiler la documentation, +c'est-à-dire générer les fichiers HTML affichés par le site, pour les +relire. Si la commande précédente s'est exécutée sans erreur, la +compilation ne devrait pas échouer. + +.. code-block:: bash + + make + + +Vérifiez alors le rendu de la traduction « en vrai ». Lancez un serveur de +documentation local : + +.. code-block:: bash + + make serve + + +La documentation est publiée à l'adresse ``_. + +Attention: le port TCP/8000 ne peut être changé, il convient d'arrêter +tout service qui écouterait sur celui-ci. + +Vous pouvez recommencer les étapes de cette section autant de fois que +nécessaire. + +Poedit donne beaucoup d'avertissements, par exemple pour vous informer que +« la traduction devrait commencer par une majuscule » car c'est le cas pour +la source. Ces avertissements ne sont pas tous fondés. En cas de doute, +*affichez et relisez la page HTML produite* avec ``make serve``. + +Quatrième étape : publier sa traduction +======================================= + +Une fois que le *make verifs* ne lève pas d'erreur et que vous êtes certains de bien respecter les +`Conventions`_ de traduction, vient le moment d'envoyer votre travail sur le dépôt local. + +* ``git add`` place nos modifications dans l'index de Git en attendant + d'être propagées dans le dépôt local. + +.. code-block:: bash + + git add library/sys.po + + +* ``git commit`` permet de les propager : + +.. code-block:: bash + + git commit --message "Traduction de library/sys.po" # Ou un autre message plus inspiré :) + + + +Poussez ensuite vos modifications sur votre *fork* avec ``git push``. +Le ``-u`` n'est utile qu'une fois pour que votre client git se souvienne que cette +branche est liée à votre *fork* (et donc que vos futurs ``git pull`` et +``git push`` sachent quoi tirer). + +.. code-block:: bash + + git push --set-upstream origin + +Sur Github +---------- + +La commande précédente vous affiche un lien pour ouvrir une *pull request* sur +Github. Si vous l'avez manqué, allez simplement sur https://github.com/python/python-docs-fr/pulls +et un joli bouton « Compare & pull request » devrait apparaître au bout de +quelques secondes vous indiquant que vous pouvez demander une *pull request*. + +Mettez dans le commentaire de la *pull request* le texte suivant : +« Closes #XXXX » où XXXX est le numéro du ticket GitHub créé pour réserver le fichier traduit. +Cela permet à Github de lier la *pull request* au ticket de réservation. + +Il peut arriver que vous ayez besoin de reprendre votre PR sur votre +ordinateur après avoir fait des modifications en ligne sur GitHub, +par exemple lorsque GitHub vous offre la possibilité de faire un commit +automatique contenant les suggestions proposées pendant la revue. +Cela fonctionne bien, mais le résultat n'est pas toujours accepté par +``powrap``. Si cela arrive, vous pouvez récupérer le commit fait par +GitHub puis relancer ``powrap`` : + +.. code-block:: bash + + git pull + powrap + git add + git commit -m "Formatage après commit automatique" + git push + +Sur une autre forge +------------------- + +Quand vous avez poussé vos modifications, il y a plusieurs possibilités. + +Soit vous signalez via le `discuss de l'AFPy `_ ou sur IRC que +vous avez traduit une section. Nous viendrons récupérer les modifications pour les intégrer +sur Github. + +Soit en créant un *`bundle `_* Git, +pour cela, il faut créer un fichier contenant les différentes modifications effectuées. + +.. code-block:: bash + + git bundle create .bundle .. + +Puis nous partager ce *bundle* sur le `discuss de l'AFPy `_ pour pouvoir l'intégrer. + + +À partir de là, quelqu'un passera en revue vos modifications, et vous fera des +suggestions et corrections. Pour les prendre en compte, retournez sur votre branche +contenant le fichier concerné (au cas où vous auriez commencé quelque chose d'autre +sur une autre branche) : + +.. code-block:: bash + + git checkout library-sys + git pull # pour rapatrier les modifications que vous auriez acceptées + # sur l'interface web. + + # Réglez les problèmes, puis commitez à nouveau : + git commit --all --message "prise en compte des remarques" + git push + + +Vous avez peut-être remarqué que cela ressemble à un triangle, avec un +segment manquant : + +- vous récupérez depuis *upstream* (le dépôt commun public sur Github) ; +- vous poussez sur *origin* (votre clone sur Github). + +C'est le travail de quelqu'un d'autre d'ajouter le dernier segment, +de votre *origin* au *upstream* public, pour « boucler la boucle ». C'est le +rôle des personnes qui *fusionnent* les *pull requests* après les avoir relues. + +Vous avez peut-être aussi remarqué que vous n'avez jamais commité sur une +branche de version (3.9, 3.10, etc.), seulement récupéré les +modifications à partir d'elles. + +Toutes les traductions sont faites sur la dernière version. +Nous ne traduisons jamais sur une version plus ancienne. Par exemple, +si la dernière version de python est Python 3.10, nous ne voulons pas +traduire directement sur la version Python 3.6. +Si nécessaire, les traductions seraient rétroportées sur les versions +les plus anciennes par l'`équipe de documentation +`_. + + + + +Conventions +=========== + +Certaines conventions ont été édictées pour homogénéiser la traduction. +Il faut suivre les règles de `style`_ imposées, les `règles rst`_ et +les traductions déjà définies dans le `glossaire`_. + + +Style +----- + +Une bonne traduction est une traduction qui transcrit fidèlement l'idée originelle +en français, sans rien ajouter ni enlever au fond, tout en restant claire, concise et +agréable à lire. Les traductions mot-à-mot sont à proscrire et il est permis — même +conseillé — d'intervertir des propositions ou de réarranger des phrases de la +documentation anglaise, si le rythme l'exige. Il faut aussi chercher des +équivalents français aux termes techniques et aux idiotismes rencontrés, et prendre +garde aux anglicismes. + +Utilisation du futur +^^^^^^^^^^^^^^^^^^^^ + +Dans la description du comportement de Python (au sens large, c'est-à-dire +l'interpréteur lui-même mais aussi toutes les bibliothèques), la version +originale utilise souvent le futur : « if you do this, it will produce +that… ». En français, l'utilisation du présent convient tout à fait et le +présent est souvent plus facile à lire : « si vous faites ceci, il se +produit cela… ». On ne conserve le futur que si la seconde proposition +se situe réellement dans le futur (par exemple, on peut penser qu'un +processus de compilation n'est pas immédiat) ou pour des raisons de +concordance des temps. + +Utilisation du conditionnel +^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +La version originale est très polie envers le lecteur ; elle lui intime +rarement des obligations, préférant employer « you should ». Cependant, en +français, il est d'usage d'être plus direct pour être correctement compris : +« vous devez ». *Vous devriez* est en effet généralement compris comme quelque +chose dont on peut de temps en temps se passer, alors que c'est très +rarement le cas pour les « you should » de cette documentation. +De la même manière, « can » est souvent mieux traduit sans introduire de notion +de possibilité, en particulier quand la phrase est à la voix passive ; la +phrase « these objects can be accessed by… » se traduit mieux par « on accède à +ces objets en… ». + +Utilisation du masculin +^^^^^^^^^^^^^^^^^^^^^^^ + +Dans un souci de lisibilité et en accord avec la préconisation de +l'Académie française, nous utilisons le masculin pour indiquer un +genre neutre. Par exemple : l'utilisateur ou le lecteur. + +Règles rst +---------- + +Prototypes et exemples +^^^^^^^^^^^^^^^^^^^^^^ + +Il ne faut pas traduire le nom des éléments de la bibliothèque standard (noms +de fonctions, paramètres de ces fonctions, constantes, etc.) mais les laisser +tels quel, entourés d'astérisques dans les blocs de texte. +Si la documentation contient des exemples, vous *pouvez* traduire les noms +utilisés, en prenant garde d'être cohérent. Vous pouvez ainsi traduire : + +.. code-block:: python + + def sample_function(): + result = thread.join(timeout=...) + ... + + +en + +.. code-block:: python + + def fonction_exemple(): + resultat = thread.join(timeout=...) + ... + + +mais pas en + +.. code-block:: python + + def fonction_exemple(): + resultat = fildexécution.attendre(délai=...) + ... + + +Liens hypertextes +^^^^^^^^^^^^^^^^^ + +Il faut transformer les liens hypertextes qui redirigent vers une page dont il +existe une version française (c'est notamment très souvent le cas pour les +articles de Wikipédia). Modifiez le lien *et* sa description dans ce cas. +Si aucune traduction de la cible n'existe, ne traduisez pas la description. +Par exemple, ```Conway's Game of Life `_`` +doit devenir ```Jeu de la vie `_``. + + +Balises +^^^^^^^ + +Ne traduisez pas le contenu des balises comme ``:ref:...`` ou ``:class:...``. +Vous devez cependant traduire les balises ``:term:...``, qui font référence à +une primitive ou un concept défini dans le `glossaire Python `_. +La syntaxe est ``:term:nom_français``. Par exemple, traduisez +``:term:`dictionary``` en ``:term:`dictionnaire ```. + +Comme le glossaire est déjà traduit, il y a forcément une correspondance à chaque +terme que vous pouvez rencontrer. + + +Glossaire +========= + +Afin d'assurer la cohérence de la traduction, voici quelques +termes fréquents déjà traduits. Une liste blanche de noms propres, comme « Guido », +« C99 » ou de certains anglicismes comme « sérialisable » ou « implémentation», +est stockée dans le fichier *dict* à la racine du projet. Vous pouvez +y ajouter une entrée si cela est nécessaire. +Si vous devez *absolument* utiliser un mot anglais, mettez-le en italique +(entouré par des astérisques). + +Pour trouver facilement comment un terme est déjà traduit dans la +documentation, vous pouvez utiliser `pogrep`_. + +========================== =============================================== +Terme Traduction +========================== =============================================== +-like -compatible +abstract data type type abstrait +argument argument (à ne pas confondre avec *paramètre*) +backslash antislash, *backslash* +backtrace trace d'appels, trace de pile +backport rétroporter +bound lier +bug bogue +built-in natif +bytecode code intermédiaire +callback fonction de rappel +call stack pile d'appels +caught (exception) interceptée +daemon *daemon* +debugging débogage +deep copy copie récursive (préféré), ou copie profonde +double quote guillemet +deprecated obsolète +e.g. p. ex. (on n'utilise pas l'anglicisme « e.g. », + lui-même issu du latin *exempli gratia*). + On sépare les deux mots par une espace + insécable pour éviter les retours à la ligne + malheureux. +et al. et autres, `à accorder + `_ + suivant le contexte +export exportation +expression expression +framework cadriciel +frozen package or set paquet ou ensemble figé +garbage collector ramasse-miettes +getter accesseur +i.e. c.-à-d. (on n'utilise pas l'anglicisme « i.e. », + lui-même issu du latin *id est*) +identifier identifiant +immutable immuable +import importation +index indice (en particulier quand on parle de chaînes + de caractères) +installer installateur +interpreter interpréteur +keyword mot clé +keyword argument argument nommé +library bibliothèque +list comprehension liste en compréhension (liste en intension est + valide, mais nous ne l'utilisons pas) +little-endian, big-endian `petit-boutiste, gros-boutiste + `_ +mixin type type de mélange +mutable muable +namespace espace de nommage + (sauf pour le XML où c'est espace de noms) +parameter paramètre +parse, parser analyser, analyseur syntaxique +pickle (v.) sérialiser +prompt invite +raise lever +regular expression expression rationnelle, expression régulière +return renvoie, donne (on évite « retourne » qui + pourrait porter à confusion) +roughly approximativement, à peu près (on ne traduit pas + « roughly equivalent » par « sensiblement équivalent ») +setter mutateur +simple quote guillemet simple +socket connecteur ou interface de connexion +sort trier (préféré), ordonner, classer +specify définir, préciser (plutôt que « spécifier ») +statement instruction +subprocess sous-processus +support prendre en charge, implémenter (« supporter » + n'a pas le même sens en français) +token (parsing) lexème +thread fil d'exécution +traceback trace d'appels, trace de pile +tuple *n*-uplet (avec *n* en italique), on peut + traduire *2-tuple* par « paire » ou « couple », + *3-tuple* par « triplet », *4-tuple* par + « quadruplet » etc. +typically normalement, habituellement, comme d'habitude + (plutôt que « typiquement ») +underscore tiret bas, *underscore*, sous-tiret +whitespace caractère d'espacement +========================== =============================================== + +Ressources de traduction +======================== + +- les canaux IRC sur irc.libera.chat : + + - `#python-docs-fr `_ — communauté python autour de la documentation française, + - `#python-fr `_ — communauté python francophone, + - `#python-doc `_ — communauté python autour de la documentation anglophone ; +- les listes de diffusion relatives à la documentation (courriel) : + + - `de l'AFPy `_, + - `de CPython `_ ; +- des glossaires et dictionnaires : + + - le `glossaire de la documentation Python `_, car il est déjà traduit, + - les `glossaires et dictionnaires de traduc.org `_, en particulier le `grand dictionnaire terminologique `_ de l'Office québécois de la langue française, + - Wikipédia. En consultant un article sur la version anglaise, puis en basculant sur la version française pour voir comment le sujet de l'article est traduit ; +- le `guide stylistique pour le français de localisation des produits Sun + `_ donne + beaucoup de conseils pour éviter une traduction trop mot à mot ; +- `Petites leçons de typographie `_, + résumé succinct de typographie, utile pour apprendre le bon usage des + majuscules, des espaces, etc. + +L'utilisation de traducteurs automatiques comme `DeepL `_ ou semi-automatiques comme +`reverso `_ est proscrite. +Les traductions générées sont très souvent à retravailler, ils ignorent les règles énoncées sur cette +page et génèrent une documentation au style très « lourd ». + + +Caractères spéciaux et typographie +================================== + +La touche de composition +------------------------ + +Cette `touche `_, +absente par défaut des claviers, permet de saisir des +caractères spéciaux en combinant les caractères déjà présents sur le +clavier. C'est à l'utilisateur de définir la touche de composition. + +Avec une touche de composition, vous pouvez utiliser les +compositions suivantes : + +- :kbd:`Compose < <` donne ``«`` +- :kbd:`Compose > >` donne ``»`` +- :kbd:`Compose SPACE SPACE` donne une espace insécable +- :kbd:`Compose . . .` donne ``…`` + +Comme vous l'avez noté, presque toutes les compositions sont intuitives, +vous pouvez donc en essayer d'autres et elles devraient tout +simplement fonctionner : + +- :kbd:`Compose C =` donne ``€`` +- :kbd:`Compose 1 2` donne ``½`` +- :kbd:`Compose ' E` donne ``É`` +- etc. + +Comment définir la touche de composition ? +------------------------------------------ + +Cela dépend de votre système d'exploitation et de votre clavier. + +⇒ Sous Linux, Unix et \*BSD (tel OpenBSD), vous pouvez la configurer à l'aide de +l'outil graphique de configuration de votre clavier ou avec +``dpkg-reconfigure keyboard-configuration`` +(pour `Ubuntu `_ ou Debian +et distributions assimilées). + +À tout le moins, vous pouvez configurer votre fichier *~/.Xmodmap* pour +ajouter l'équivalent de : + +.. code-block:: shell + + # key Compose + keycode 115 = Multi_key + + +Utilisez ``xev`` pour connaître la bonne correspondance de la touche que vous +voulez assigner ! + +Ensuite, dans votre fichier *~/.xsession*, ajoutez : + +.. code-block:: shell + + # Gestion des touches clavier + xmodmap $HOME/.Xmodmap + + +⇒ Sous X, avec un bureau graphique, tel que Gnome, ou Xfce, il faut aller +modifier dans les « Paramètres » → « Clavier » → « Disposition » → +« Touche composée ». Pour finir, redémarrez votre session. + +⇒ Sous Windows, vous +pouvez utiliser `wincompose `_. + +Le cas de « --- », « -- », « ... » +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +La version anglaise utilise les +`smartquotes `_, +qui fonctionnent en anglais, mais causent des problèmes dans d'autres langues. +Nous les avons donc désactivées (voir #303) dans la version française. + +Les *smartquotes* sont normalement responsables de la transformation de +``--`` en *en-dash* (``—``), de ``---`` en *em-dash* (``—``), et de +``...`` en *ellipses* ``…``. + +⇒ Si vous voyez : +| « -- » ou « --- » : faites :kbd:`Compose - - -` +| « ... » : faites :kbd:`Compose . . .` + +Le cas de « "…" » +^^^^^^^^^^^^^^^^^ + +Les guillemets français ``«`` et ``»`` ne sont pas identiques aux +guillemets anglais ``"``. Cependant, Python utilise les guillemets +anglais comme délimiteurs de chaîne de caractères. Il convient donc de +traduire les guillemets mais pas les délimiteurs de chaîne. + +⇒ Si vous voyez : +| « "…" » : faites :kbd:`Compose < <` ou :kbd:`Compose > >` + +Le cas de « :: » +^^^^^^^^^^^^^^^^ + +| Du point de vue du langage *reStructuredText* (ou *rst*) utilisé dans la + documentation nous voyons soit « bla bla:: », soit « bla bla. :: ». +| ``::`` collé à la fin d'un mot signifie « affiche ``:`` et introduit un bloc de code », + mais un ``::`` après une espace signifie « introduit juste un bloc de code ». + +En français, nous mettons une espace insécable devant nos deux-points, comme : +« Et voilà : ». + +⇒ Traduisez ``mot deux-points deux-points`` par +``mot espace-insécable deux-points deux-points``. + +Pour saisir une espace insécable faites :kbd:`Compose SPACE SPACE` + +Les doubles-espaces +^^^^^^^^^^^^^^^^^^^ + +La documentation originale comporte beaucoup de doubles-espaces. +Cela se fait en anglais, mais pas en français. De toute manière, +ils passent ensuite à une moulinette et le rendu des espaces est délégué +au HTML et au PDF, qui n'en tiennent pas compte. +Nous avons décidé de ne rien changer pour les doubles-espaces +coté traduction : nous ne les retirons pas et ce n'est pas grave +si des traducteurs en retirent par accident. + +Les énumérations +^^^^^^^^^^^^^^^^ + +Chaque paragraphe d'une énumération introduite par un deux-point +doit se terminer par un point-virgule (bien entendu précédé d'une +espace insécable) quelle que soit sa ponctuation interne. Seul le dernier +paragraphe de l'énumération s'achève par un point ou, si la phrase +continue après l'énumération, une virgule. Si l'un des paragraphes est +lui-même une énumération, chacun des sous-paragraphes se termine par +une virgule et le dernier par un point-virgule. + +Par exemple : + +- le premier paragraphe de l'énumération ; +- le deuxième paragraphe, lui aussi une énumération : + + - premier sous-paragraphe, + - second sous-paragraphe ; + +- le dernier paragraphe. + +Malheureusement Poedit n'aime pas les différences de ponctuation finales +entre un paragraphe et sa traduction ; il faut passer outre ses avertissements. +Vous pouvez aussi rajouter un commentaire dans le fichier *.po* pour avertir +les traducteurs suivants et éviter qu'ils ne « corrigent » par erreur ces +avertissements. diff --git a/Makefile b/Makefile new file mode 100644 index 0000000000..48251e3c0d --- /dev/null +++ b/Makefile @@ -0,0 +1,188 @@ +# Makefile for French Python Documentation +# +# Here is what you can do: +# +# - make # Automatically build an HTML local version +# - make todo # To list remaining tasks and show current progression +# - make verifs # To check for correctness: wrapping, spelling +# - make wrap # To rewrap modified files +# - make spell # To check for spelling +# - make clean # To remove build artifacts +# - make fuzzy # To find fuzzy strings +# +# Modes are: autobuild-stable, autobuild-dev, and autobuild-html, +# documented in gen/src/3.6/Doc/Makefile as we're only delegating the +# real work to the Python Doc Makefile. + +# Configuration + +# The CPYTHON_CURRENT_COMMIT is the commit, in the cpython repository, +# from which we generated our po files. We use it here so when we +# test build, we're building with the .rst files that generated our +# .po files. +CPYTHON_CURRENT_COMMIT := 100da7c31aeb3888962bf33c8cc3594272964815 +LANGUAGE := fr +BRANCH := 3.10 + +EXCLUDED := \ + whatsnew/2.?.po \ + whatsnew/3.[0-8].po \ + c-api/ \ + distutils/ \ + install/ \ + library/2to3.po \ + library/distutils.po \ + library/imp.po \ + library/tkinter.tix.po \ + library/test.po \ + library/aifc.po \ + library/asynchat.po \ + library/asyncore.po \ + library/audioop.po \ + library/cgi.po \ + library/cgitb.po \ + library/chunk.po \ + library/crypt.po \ + library/imghdr.po \ + library/msilib.po \ + library/nntplib.po \ + library/nis.po \ + library/ossaudiodev.po \ + library/pipes.po \ + library/smtpd.po \ + library/sndhdr.po \ + library/spwd.po \ + library/sunau.po \ + library/telnetlib.po \ + library/uu.po \ + library/xdrlib.po + +# Internal variables + +UPSTREAM := https://github.com/python/cpython + +PYTHON := $(shell which python3) +MODE := html +POSPELL_TMP_DIR := .pospell/ +JOBS := auto +SPHINXERRORHANDLING = -W + +# Detect OS + +ifeq '$(findstring ;,$(PATH))' ';' + detected_OS := Windows +else + detected_OS := $(shell uname 2>/dev/null || echo Unknown) + detected_OS := $(patsubst CYGWIN%,Cygwin,$(detected_OS)) + detected_OS := $(patsubst MSYS%,MSYS,$(detected_OS)) + detected_OS := $(patsubst MINGW%,MSYS,$(detected_OS)) +endif + +ifeq ($(detected_OS),Darwin) # Mac OS X + CP_CMD := gcp # accessible with `brew install coreutils` or `brew upgrade coreutils` +else + CP_CMD := cp +endif + +.PHONY: all +all: ensure_prerequisites + git -C venv/cpython checkout $(CPYTHON_CURRENT_COMMIT) || (git -C venv/cpython fetch && git -C venv/cpython checkout $(CPYTHON_CURRENT_COMMIT)) + mkdir -p locales/$(LANGUAGE)/LC_MESSAGES/ + $(CP_CMD) -u --parents *.po */*.po locales/$(LANGUAGE)/LC_MESSAGES/ + $(MAKE) -C venv/cpython/Doc/ \ + JOBS='$(JOBS)' \ + SPHINXOPTS='-D locale_dirs=$(abspath locales) \ + -D language=$(LANGUAGE) \ + -D gettext_compact=0 \ + -D latex_engine=xelatex \ + -D latex_elements.inputenc= \ + -D latex_elements.fontenc=' \ + SPHINXERRORHANDLING=$(SPHINXERRORHANDLING) \ + $(MODE) + @echo "Build success, open file://$(abspath venv/cpython/)/Doc/build/html/index.html or run 'make htmlview' to see them." + + +# We clone cpython/ inside venv/ because venv/ is the only directory +# excluded by cpython' Sphinx configuration. +venv/cpython/.git/HEAD: + git clone https://github.com/python/cpython venv/cpython + + +.PHONY: ensure_prerequisites +ensure_prerequisites: venv/cpython/.git/HEAD + @if ! (blurb help >/dev/null 2>&1 && sphinx-build --version >/dev/null 2>&1); then \ + git -C venv/cpython/ checkout $(BRANCH); \ + echo "You're missing dependencies please install:"; \ + echo ""; \ + echo " python -m pip install -r requirements.txt -r venv/cpython/Doc/requirements.txt"; \ + exit 1; \ + fi + +.PHONY: htmlview +htmlview: MODE=htmlview +htmlview: all + +.PHONY: todo +todo: ensure_prerequisites + potodo --api-url 'https://git.afpy.org/api/v1/repos/AFPy/python-docs-fr/issues?state=open&type=issues' --exclude venv .venv $(EXCLUDED) + +.PHONY: wrap +wrap: ensure_prerequisites + @echo "Re wrapping modified files" + powrap -m + +SRCS = $(shell git diff --name-only $(BRANCH) | grep '.po$$') +# foo/bar.po => $(POSPELL_TMP_DIR)/foo/bar.po.out +DESTS = $(addprefix $(POSPELL_TMP_DIR)/,$(addsuffix .out,$(SRCS))) + +.PHONY: spell +spell: ensure_prerequisites $(DESTS) + +.PHONY: line-length +line-length: + @echo "Searching for long lines..." + @awk '{if (length(gensub(/శ్రీనివాస్/, ".", "g", $$0)) > 80 && length(gensub(/[^ ]/, "", "g")) > 1) {print FILENAME ":" FNR, "line too long:", $$0; ERRORS+=1}} END {if (ERRORS>0) {exit 1}}' *.po */*.po + +.PHONY: sphinx-lint +sphinx-lint: + @echo "Checking all files using sphinx-lint..." + @sphinx-lint --enable all --disable line-too-long *.po */*.po + +$(POSPELL_TMP_DIR)/%.po.out: %.po dict + @echo "Pospell checking $<..." + @mkdir -p $(@D) + pospell -p dict -l fr_FR $< && touch $@ + +.PHONY: fuzzy +fuzzy: ensure_prerequisites + potodo --only-fuzzy --api-url 'https://git.afpy.org/api/v1/repos/AFPy/python-docs-fr/issues?state=open&type=issues' --exclude venv .venv $(EXCLUDED) + +.PHONY: check-headers +check-headers: + @grep -L '^# Copyright (C) [0-9-]*, Python Software Foundation' *.po */*.po | while read -r file;\ + do \ + echo "Please update the po comment in $$file"; \ + done + @grep -L '^"Project-Id-Version: Python 3\\n"$$' *.po */*.po | while read -r file;\ + do \ + echo "Please update the 'Project-Id-Version' header in $$file"; \ + done + @grep -L '^"Language: fr\\n"$$' *.po */*.po | while read -r file;\ + do \ + echo "Please update the 'Language' header in $$file"; \ + done + @grep -L '^"Language-Team: FRENCH \\n"' *.po */*.po | while read -r file;\ + do \ + echo "Please update the 'Language-Team' header in $$file"; \ + done + +.PHONY: verifs +verifs: spell line-length sphinx-lint check-headers + +.PHONY: clean +clean: + @echo "Cleaning *.mo and $(POSPELL_TMP_DIR)" + rm -fr $(POSPELL_TMP_DIR) locales/$(LANGUAGE)/LC_MESSAGES/ + find -name '*.mo' -delete + @echo "Cleaning build directory" + $(MAKE) -C venv/cpython/Doc/ clean diff --git a/README.rst b/README.rst index 62319459e4..16c5a5a8b9 100644 --- a/README.rst +++ b/README.rst @@ -1,10 +1,74 @@ Traduction française de la documentation Python =============================================== -Ce repo existe sur deux forges : +Ce projet est réalisé en collaboration avec l'`AFPy +`_ (Association Francophone Python), dont le but est la +promotion du langage de développement Python dans l'ensemble des +nations francophones à travers des événements accessibles à tous comme +l'édition francophone de la PyCon, la `PyConFR +`_, de nombreux meetups dans plusieurs villes et le +maintien de nombreux projets communautaires pour enrichir +l'écosystème. -- https://git.afpy.org/AFPy/python-docs-fr/ -- https://github.com/python/python-docs-fr/ +Contribuer à la traduction +-------------------------- + +Vous pouvez contribuer : + +- en proposant des *pull requests* Github (solution recommandée) ; +- en remontant des erreurs et propositions d'amélioration sur + le `forum de l'AFPy `_ ou sur la + `liste de diffusion `_ ; +- en devenant `membre `_ de l'AFPy ou + `mécène `_ du projet. + +Consultez le +`guide `_ +pour apprendre les conventions à respecter. + +Le `coordinateur `_ de +cette traduction est `Julien Palard (mdk) `_. +Vous pouvez obtenir de l'aide sur le canal +`irc://irc.libera.chat/#python-fr `_ +(ne nécessite pas d'inscription) ou poser vos questions sur la +`liste de diffusion `_ +des traductions de l'AFPy. + + +Accord de contribution à la documentation +----------------------------------------- + +NOTE CONCERNANT LA LICENCE POUR LES TRADUCTIONS : La documentation de Python +est maintenue grâce à un réseau mondial de bénévoles. En publiant ce projet +sur Transifex, Github, et d'autres endroits publics, et vous invitant +à participer, la PSF vous enjoint à accepter cet accord qui stipule que vous +acceptez de fournir vos améliorations à la documentation de Python ou à la +traduction de la documentation de Python pour le bénéfice de la PSF sous licence +CC0 (disponible à l'adresse +https://creativecommons.org/publicdomain/zero/1.0/legalcode). En retour, vous +pouvez demander à ce que votre contribution à la documentation soit +publiquement reconnue, et si votre traduction est acceptée par la +PSF, vous pouvez (mais vous n'êtes pas obligé) soumettre un correctif incluant +une modification appropriée dans le fichier Misc/ACKS ou TRANSLATORS. Bien que +rien dans le présent *accord de contribution* à la documentation n'oblige la PSF +à incorporer votre contribution textuelle, votre participation à la communauté +Python est bienvenue et appréciée. + +En soumettant votre travail à la PSF pour inclusion dans la documentation, +vous signifiez votre acceptation de cet accord. + + +Historique du projet +-------------------- + +- vers 2000 : `lancement du projet `_ ; +- vers 2012 : `reprise `_ par l'`AFPy `_ ; +- 2016 : 15 % de la documentation traduite ; +- 2017 : le projet devient traduction officielle de la documentation Python par la `PEP 545 `_ ; +- 2019 : 30 % de la documentation traduite ; +- 2021 : 50 % de la documentation traduite. + +.. image:: https://julienpalard.frama.io/write-the-docs-paris-19/fr_translation_percent.png + :target: https://framagit.org/JulienPalard/write-the-docs-paris-19 + :alt: Progression de la traduction -le travail s’effectue sur ``git.afpy.org``, github est un mirroir -utilisé pour générer la doc sur https://docs.python.org/fr/ diff --git a/TRANSLATORS b/TRANSLATORS new file mode 100644 index 0000000000..6df8140bf5 --- /dev/null +++ b/TRANSLATORS @@ -0,0 +1,23 @@ +Baptiste Fontaine +Julien Palard +RobinPetit +Valentin Lorentz +Antoine Rozo +Mohamed Kiouaz +Hervé Sousset +Mickaël Bergem +Vincent Poulailleau +Jules Lasne +Mathieu Dupuy +Vivien Lambert +Andy Kwok +Aya Keddam +Antoine Wecxsteen +Youen 'laën' Froger +Sascha Salles +Valériane Venance +Loc Cosnier +Yannick Gingras +Martin Chlumsky +Stephan Michaud +Edith Viau diff --git a/about.po b/about.po new file mode 100644 index 0000000000..e3811998b5 --- /dev/null +++ b/about.po @@ -0,0 +1,91 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-18 15:46+0200\n" +"PO-Revision-Date: 2022-07-08 17:54+0200\n" +"Last-Translator: Julien Palard \n" +"Language-Team: FRENCH \n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: about.rst:3 +msgid "About these documents" +msgstr "À propos de ces documents" + +#: about.rst:6 +msgid "" +"These documents are generated from `reStructuredText`_ sources by `Sphinx`_, " +"a document processor specifically written for the Python documentation." +msgstr "" +"Ces documents sont générés à partir de sources en `reStructuredText`_ par " +"`Sphinx`_, un analyseur de documents spécialement conçu pour la " +"documentation Python." + +#: about.rst:15 +msgid "" +"Development of the documentation and its toolchain is an entirely volunteer " +"effort, just like Python itself. If you want to contribute, please take a " +"look at the :ref:`reporting-bugs` page for information on how to do so. New " +"volunteers are always welcome!" +msgstr "" +"Le développement de la documentation et de ses outils est entièrement basé " +"sur le volontariat, tout comme Python. Si vous voulez contribuer, allez voir " +"la page :ref:`reporting-bugs` qui contient des informations pour vous y " +"aider. Les nouveaux volontaires sont toujours les bienvenus !" + +#: about.rst:20 +msgid "Many thanks go to:" +msgstr "Merci beaucoup à :" + +#: about.rst:22 +msgid "" +"Fred L. Drake, Jr., the creator of the original Python documentation toolset " +"and writer of much of the content;" +msgstr "" +"Fred L. Drake, Jr., créateur des outils originaux de la documentation Python " +"et rédacteur de la plupart de son contenu ;" + +#: about.rst:24 +msgid "" +"the `Docutils `_ project for creating " +"reStructuredText and the Docutils suite;" +msgstr "" +"le projet `Docutils `_ pour avoir créé " +"*reStructuredText* et la suite d'outils *Docutils* ;" + +#: about.rst:26 +msgid "" +"Fredrik Lundh for his Alternative Python Reference project from which Sphinx " +"got many good ideas." +msgstr "" +"Fredrik Lundh pour son projet *Alternative Python Reference*, dont Sphinx a " +"pris beaucoup de bonnes idées." + +#: about.rst:31 +msgid "Contributors to the Python Documentation" +msgstr "Contributeurs de la documentation Python" + +#: about.rst:33 +msgid "" +"Many people have contributed to the Python language, the Python standard " +"library, and the Python documentation. See :source:`Misc/ACKS` in the " +"Python source distribution for a partial list of contributors." +msgstr "" +"De nombreuses personnes ont contribué au langage Python, à sa bibliothèque " +"standard et à sa documentation. Consultez :source:`Misc/ACKS` dans les " +"sources de la distribution Python pour avoir une liste partielle des " +"contributeurs." + +#: about.rst:37 +msgid "" +"It is only with the input and contributions of the Python community that " +"Python has such wonderful documentation -- Thank You!" +msgstr "" +"Ce n'est que grâce aux suggestions et contributions de la communauté Python " +"que Python a une documentation si merveilleuse — Merci !" diff --git a/bugs.po b/bugs.po new file mode 100644 index 0000000000..045b57f2c2 --- /dev/null +++ b/bugs.po @@ -0,0 +1,288 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-22 22:57+0100\n" +"PO-Revision-Date: 2022-07-08 17:50+0200\n" +"Last-Translator: Jean Abou Samra \n" +"Language-Team: FRENCH \n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 3.0\n" + +#: bugs.rst:5 +msgid "Dealing with Bugs" +msgstr "S'attaquer aux bogues" + +#: bugs.rst:7 +msgid "" +"Python is a mature programming language which has established a reputation " +"for stability. In order to maintain this reputation, the developers would " +"like to know of any deficiencies you find in Python." +msgstr "" +"Python est un langage de programmation robuste réputé pour sa stabilité. " +"Afin de maintenir cette réputation, les développeurs souhaitent connaître " +"tout problème que vous pourriez rencontrer dans Python." + +#: bugs.rst:11 +msgid "" +"It can be sometimes faster to fix bugs yourself and contribute patches to " +"Python as it streamlines the process and involves less people. Learn how to :" +"ref:`contribute `." +msgstr "" +"Il est parfois plus rapide de réparer les bogues soi-même et d'en proposer " +"les correctifs, ça simplifie le processus et implique moins de monde. " +"Apprenez à :ref:`contribuer `." + +#: bugs.rst:16 +msgid "Documentation bugs" +msgstr "Bogues de documentation" + +#: bugs.rst:18 +msgid "" +"If you find a bug in this documentation or would like to propose an " +"improvement, please submit a bug report on the :ref:`tracker `. If you have a suggestion on how to fix it, include that as well." +msgstr "" +"Si vous trouvez un bogue dans cette documentation ou si vous désirez " +"proposer une amélioration, si cela concerne aussi la documentation en " +"anglais, ouvrez un rapport sur le :ref:`tracker ` " +"décrivant en anglais le bogue et où vous l'avez trouvé. Si le problème ne " +"touche que la traduction en français, ouvrez un ticket sur https://github." +"com/python/python-docs-fr/issues, ou venez nous en toucher un mot sur le " +"canal #python-fr sur *libera.chat* (https://kiwiirc.com/nextclient/#irc://" +"irc.libera.chat/#python-fr). Si vous avez une suggestion de correction, " +"merci de l'inclure également." + +#: bugs.rst:22 +msgid "" +"You can also open a discussion item on our `Documentation Discourse forum " +"`_." +msgstr "" + +#: bugs.rst:25 +msgid "" +"If you're short on time, you can also email documentation bug reports to " +"docs@python.org (behavioral bugs can be sent to python-list@python.org). " +"'docs@' is a mailing list run by volunteers; your request will be noticed, " +"though it may take a while to be processed." +msgstr "" +"Si vous êtes limité par le temps, vous pouvez aussi envoyer un courriel à " +"docs@python.org (les bogues de comportement peuvent être envoyés à python-" +"list@python.org). « docs@ » est une liste de diffusion gérée par des " +"volontaires, votre requête sera vue, mais elle peut prendre un moment pour " +"être traitée." + +#: bugs.rst:33 +msgid "`Documentation bugs`_" +msgstr "`Bogues de documentation`_" + +#: bugs.rst:33 +msgid "" +"A list of documentation bugs that have been submitted to the Python issue " +"tracker." +msgstr "" +"Liste des bogues de documentation soumis à l'outil de suivi des problèmes " +"Python." + +#: bugs.rst:36 +msgid "`Issue Tracking `_" +msgstr "`Outil de suivi des problèmes `_" + +#: bugs.rst:36 +msgid "" +"Overview of the process involved in reporting an improvement on the tracker." +msgstr "" +"Vue d'ensemble du processus pour proposer une amélioration avec l'outil de " +"suivi." + +#: bugs.rst:39 +msgid "" +"`Helping with Documentation `_" +msgstr "" +"`Aider avec la documentation `_" + +#: bugs.rst:39 +msgid "" +"Comprehensive guide for individuals that are interested in contributing to " +"Python documentation." +msgstr "Guide complet pour qui souhaite contribuer à la documentation Python." + +#: bugs.rst:41 +msgid "" +"`Documentation Translations `_" +msgstr "" +"`Aider avec la documentation `_" + +#: bugs.rst:42 +msgid "" +"A list of GitHub pages for documentation translation and their primary " +"contacts." +msgstr "" +"Liste de dépôts GitHub où la documentation est traduite, avec les personnes " +"à contacter." + +#: bugs.rst:48 +msgid "Using the Python issue tracker" +msgstr "Utilisation du gestionnaire de tickets Python" + +#: bugs.rst:50 +msgid "" +"Issue reports for Python itself should be submitted via the GitHub issues " +"tracker (https://github.com/python/cpython/issues). The GitHub issues " +"tracker offers a web form which allows pertinent information to be entered " +"and submitted to the developers." +msgstr "" +"Les rapports concernant un problème relatif à Python lui-même doivent être " +"soumis *via* l'outil de suivi des problèmes de GitHub (https://github.com/" +"python/cpython/issues). Le gestionnaire de tickets propose un formulaire Web " +"permettant de saisir des informations pertinentes à soumettre aux " +"développeurs." + +#: bugs.rst:55 +msgid "" +"The first step in filing a report is to determine whether the problem has " +"already been reported. The advantage in doing so, aside from saving the " +"developers' time, is that you learn what has been done to fix it; it may be " +"that the problem has already been fixed for the next release, or additional " +"information is needed (in which case you are welcome to provide it if you " +"can!). To do this, search the tracker using the search box at the top of the " +"page." +msgstr "" +"La première étape pour remplir un rapport est de déterminer si le problème a " +"déjà été rapporté. L'avantage de cette approche, en plus d'économiser du " +"temps aux développeurs, est d'apprendre ce qui a été fait pour le résoudre ; " +"il se peut que le problème soit déjà résolu dans la prochaine version, ou " +"que des informations complémentaires soient attendues (auquel cas votre " +"contribution est la bienvenue !). Pour ce faire, cherchez dans le " +"gestionnaire de tickets grâce à la boîte de recherche en haut de la page." + +#: bugs.rst:62 +msgid "" +"If the problem you're reporting is not already in the list, log in to " +"GitHub. If you don't already have a GitHub account, create a new account " +"using the \"Sign up\" link. It is not possible to submit a bug report " +"anonymously." +msgstr "" +"Si le problème que vous soumettez n'est pas déjà dans la liste, connectez-" +"vous à GitHub. Si vous n'avez pas déjà un compte GitHub, créez un nouveau " +"compte en cliquant sur le lien « Sign Up ». Il n'est pas possible de " +"soumettre un rapport de bogue de manière anonyme." + +#: bugs.rst:67 +msgid "" +"Being now logged in, you can submit an issue. Click on the \"New issue\" " +"button in the top bar to report a new issue." +msgstr "" +"Une fois connecté, vous pouvez rapporter un problème. Sélectionnez le bouton " +"*New issue* dans la barre en haut pour ouvrir un nouveau formulaire de " +"rapport." + +#: bugs.rst:70 +msgid "The submission form has two fields, \"Title\" and \"Comment\"." +msgstr "Le formulaire de rapport contient deux champs, *Title* et *Comment*." + +#: bugs.rst:72 +#, fuzzy +msgid "" +"For the \"Title\" field, enter a *very* short description of the problem; " +"fewer than ten words is good." +msgstr "" +"Dans le champ *Title*, entrez une *très* brève description du problème " +"rencontré ; tâchez de vous limiter à dix mots." + +#: bugs.rst:75 +msgid "" +"In the \"Comment\" field, describe the problem in detail, including what you " +"expected to happen and what did happen. Be sure to include whether any " +"extension modules were involved, and what hardware and software platform you " +"were using (including version information as appropriate)." +msgstr "" +"Dans le champ « Commentaire », décrivez le problème de manière détaillée, " +"incluant ce à quoi vous vous attendiez et ce qui s'est vraiment produit. " +"Assurez-vous d'y inclure les éventuels modules d'extensions impliqués et la " +"plateforme matérielle et logicielle vous utilisiez (en incluant les " +"informations de versions)." + +#: bugs.rst:80 +msgid "" +"Each issue report will be reviewed by a developer who will determine what " +"needs to be done to correct the problem. You will receive an update each " +"time an action is taken on the issue." +msgstr "" +"Chaque rapport sera attribué à un développeur qui déterminera ce qui est " +"nécessaire d'entreprendre pour corriger le problème. Vous recevrez une " +"notification à chaque action concernant le rapport." + +#: bugs.rst:89 +msgid "" +"`How to Report Bugs Effectively `_" +msgstr "" +"`Comment signaler des bogues de manière efficace `_ (en anglais)" + +#: bugs.rst:88 +msgid "" +"Article which goes into some detail about how to create a useful bug report. " +"This describes what kind of information is useful and why it is useful." +msgstr "" +"Article qui entre dans les détails sur la manière de créer un rapport de " +"bogue utile. Il décrit quel genre d'information est utile et pourquoi elle " +"est utile." + +#: bugs.rst:92 +msgid "" +"`Bug Writing Guidelines `_" +msgstr "" +"`Guide pour la rédaction de rapports de bogues `_" + +#: bugs.rst:92 +msgid "" +"Information about writing a good bug report. Some of this is specific to " +"the Mozilla project, but describes general good practices." +msgstr "" +"Conseils pour écrire un bon rapport de bogue. Certains sont spécifiques au " +"projet Mozilla mais présentent des bonnes pratiques générales." + +#: bugs.rst:98 +msgid "Getting started contributing to Python yourself" +msgstr "Commencer à contribuer à Python vous-même" + +#: bugs.rst:100 +msgid "" +"Beyond just reporting bugs that you find, you are also welcome to submit " +"patches to fix them. You can find more information on how to get started " +"patching Python in the `Python Developer's Guide`_. If you have questions, " +"the `core-mentorship mailing list`_ is a friendly place to get answers to " +"any and all questions pertaining to the process of fixing issues in Python." +msgstr "" +"Au-delà de simplement remonter les bogues que vous trouvez, il est aussi " +"apprécié d'y attacher des correctifs. Vous pouvez trouver plus " +"d'informations pour débuter la rédaction de correctifs dans le `Python " +"Developer's Guide`_. Si vous avez des questions, le `core-mentorship mailing " +"list`_ est un endroit amical pour obtenir des réponses à toutes les " +"questions à propos du processus de corrections de bugs dans Python." + +#~ msgid "" +#~ "The submission form has a number of fields. For the \"Title\" field, " +#~ "enter a *very* short description of the problem; less than ten words is " +#~ "good. In the \"Type\" field, select the type of your problem; also " +#~ "select the \"Component\" and \"Versions\" to which the bug relates." +#~ msgstr "" +#~ "Le formulaire de soumission a un certain nombre de champs. Pour le champ " +#~ "« Titre », saisissez une *très* courte description du problème ; moins de " +#~ "dix mots est approprié. Dans le champ « Type », sélectionnez le type de " +#~ "problème ; sélectionnez aussi « Composant » et « Versions » en rapport " +#~ "avec le bogue." diff --git a/c-api/abstract.po b/c-api/abstract.po new file mode 100644 index 0000000000..903aed00e7 --- /dev/null +++ b/c-api/abstract.po @@ -0,0 +1,45 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-08-24 09:01+0200\n" +"PO-Revision-Date: 2018-10-17 19:31+0200\n" +"Last-Translator: \n" +"Language-Team: FRENCH \n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 2.2\n" + +#: c-api/abstract.rst:7 +msgid "Abstract Objects Layer" +msgstr "Couche d'abstraction des objets" + +#: c-api/abstract.rst:9 +msgid "" +"The functions in this chapter interact with Python objects regardless of " +"their type, or with wide classes of object types (e.g. all numerical types, " +"or all sequence types). When used on object types for which they do not " +"apply, they will raise a Python exception." +msgstr "" +"Dans ce chapitre, les fonctions s'appliquent à des objets Python sans tenir " +"compte de leur type, ou des classes d'objets au sens large (par exemple, " +"tous les types numériques, ou tous les types de séquence). Quand ils sont " +"utilisés sur des types d'objets qui ne correspondent pas, ils lèveront une " +"exception Python." + +#: c-api/abstract.rst:14 +msgid "" +"It is not possible to use these functions on objects that are not properly " +"initialized, such as a list object that has been created by :c:func:" +"`PyList_New`, but whose items have not been set to some non-\\ ``NULL`` " +"value yet." +msgstr "" +"Il n'est pas possible d'utiliser ces fonctions sur des objets qui n'ont pas " +"été correctement initialisés, comme un objet liste qui a été créé avec :c:" +"func:`PyList_New` mais dont les éléments n'ont pas encore été mis à une " +"valeur non-\\ ``NULL``." diff --git a/c-api/allocation.po b/c-api/allocation.po new file mode 100644 index 0000000000..7dfa7cea54 --- /dev/null +++ b/c-api/allocation.po @@ -0,0 +1,111 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-18 15:46+0200\n" +"PO-Revision-Date: 2018-10-20 21:16+0200\n" +"Last-Translator: Julien Palard \n" +"Language-Team: FRENCH \n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 2.2\n" + +#: c-api/allocation.rst:6 +msgid "Allocating Objects on the Heap" +msgstr "Allouer des objets dans le tas" + +#: c-api/allocation.rst:17 +#, fuzzy +msgid "" +"Initialize a newly allocated object *op* with its type and initial " +"reference. Returns the initialized object. If *type* indicates that the " +"object participates in the cyclic garbage detector, it is added to the " +"detector's set of observed objects. Other fields of the object are not " +"affected." +msgstr "" +"Permet d'initialiser un objet *op* nouvellement alloué ainsi que son type et " +"sa référence initiale. Renvoie l'objet initialisé. La présence de *type* " +"indique que l'objet doit être traité par le détecteur d'ordures cycliques, " +"il est de ce fait ajouté à l'ensemble du détecteur d'objets observés. Les " +"autres champs de l'objet ne sont pas affectés." + +#: c-api/allocation.rst:26 +msgid "" +"This does everything :c:func:`PyObject_Init` does, and also initializes the " +"length information for a variable-size object." +msgstr "" +"Effectue les mêmes opérations que :c:func:`PyObject_Init` fait, et " +"initialise également l'information de la longueur pour un objet de taille " +"variable." + +#: c-api/allocation.rst:32 +msgid "" +"Allocate a new Python object using the C structure type *TYPE* and the " +"Python type object *type*. Fields not defined by the Python object header " +"are not initialized; the object's reference count will be one. The size of " +"the memory allocation is determined from the :c:member:`~PyTypeObject." +"tp_basicsize` field of the type object." +msgstr "" +"Alloue un nouvel objet Python en utilisant le type de structure C *TYPE* et " +"l'objet Python *type*. Les champs non définis par l'en-tête de l'objet " +"Python ne sont pas initialisés; le compteur de la référence objet sera égal " +"à un. La taille de l'allocation mémoire est déterminée par le champ :c:" +"member:`~PyTypeObject.tp_basicsize` de l'objet type." + +#: c-api/allocation.rst:41 +msgid "" +"Allocate a new Python object using the C structure type *TYPE* and the " +"Python type object *type*. Fields not defined by the Python object header " +"are not initialized. The allocated memory allows for the *TYPE* structure " +"plus *size* fields of the size given by the :c:member:`~PyTypeObject." +"tp_itemsize` field of *type*. This is useful for implementing objects like " +"tuples, which are able to determine their size at construction time. " +"Embedding the array of fields into the same allocation decreases the number " +"of allocations, improving the memory management efficiency." +msgstr "" +"Alloue un nouvel objet Python en utilisant le type de structure C *TYPE* et " +"l'objet Python de type *type*. Les champs non définis par l'en-tête de " +"l'objet Python ne sont pas initialisés. La mémoire allouée est suffisante " +"pour la structure *TYPE* plus *size* champs de la taille donnée par le champ " +"de *type* :c:member:`~PyTypeObject.tp_itemsize`. Ceci est utile pour " +"l'implémentation d'objets comme les *n*-uplets, qui sont capables de " +"déterminer leur taille à la construction. Allouer les champs en même temps " +"que l'objet diminue le nombre d'allocations, améliorant ainsi les " +"performances." + +#: c-api/allocation.rst:53 +msgid "" +"Releases memory allocated to an object using :c:func:`PyObject_New` or :c:" +"func:`PyObject_NewVar`. This is normally called from the :c:member:" +"`~PyTypeObject.tp_dealloc` handler specified in the object's type. The " +"fields of the object should not be accessed after this call as the memory is " +"no longer a valid Python object." +msgstr "" +"Libère la mémoire allouée à un objet utilisant :c:func:`PyObject_New` ou :c:" +"func:`PyObject_NewVar`. Ceci est normalement appelé par le gestionnaire :c:" +"member:`~PyTypeObject.tp_dealloc` spécifié dans le type d'objet. Les champs " +"de l'objet ne doivent plus être accédés après cet appel puisque cet " +"emplacement mémoire ne correspond plus à un objet Python valide." + +#: c-api/allocation.rst:62 +msgid "" +"Object which is visible in Python as ``None``. This should only be accessed " +"using the :c:macro:`Py_None` macro, which evaluates to a pointer to this " +"object." +msgstr "" +"Objet qui est visible en tant que ``None`` dans Python. Ne devrait être " +"accessible uniquement en utilisant la macro :c:macro:`Py_None`, qui évalue " +"cet objet à un pointeur." + +#: c-api/allocation.rst:69 +msgid ":c:func:`PyModule_Create`" +msgstr ":c:func:`PyModule_Create`" + +#: c-api/allocation.rst:70 +msgid "To allocate and create extension modules." +msgstr "Allouer et créer des modules d'extension." diff --git a/c-api/apiabiversion.po b/c-api/apiabiversion.po new file mode 100644 index 0000000000..374251d475 --- /dev/null +++ b/c-api/apiabiversion.po @@ -0,0 +1,190 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-09-23 16:16+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: FRENCH \n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: c-api/apiabiversion.rst:7 +msgid "API and ABI Versioning" +msgstr "Version des API et ABI" + +#: c-api/apiabiversion.rst:9 +msgid "" +"CPython exposes its version number in the following macros. Note that these " +"correspond to the version code is **built** with, not necessarily the " +"version used at **run time**." +msgstr "" +"CPython révèle son numéro de version dans les macros suivantes. À noter " +"qu'ils correspondent au code de la version **compilée** avec, pas " +"nécessairement la version utilisée à l'**exécution**." + +#: c-api/apiabiversion.rst:13 +msgid "" +"See :ref:`stable` for a discussion of API and ABI stability across versions." +msgstr "" +"Voir :ref:`stable` pour une discussion sur la stabilité des API et ABI entre " +"(ou en fonction) de la version." + +#: c-api/apiabiversion.rst:17 +msgid "The ``3`` in ``3.4.1a2``." +msgstr "Le ``3`` dans ``3.4.1a2``.)" + +#: c-api/apiabiversion.rst:21 +msgid "The ``4`` in ``3.4.1a2``." +msgstr "Le ``4`` dans ``3.4.1a2``." + +#: c-api/apiabiversion.rst:25 +msgid "The ``1`` in ``3.4.1a2``." +msgstr "Le ``1`` dans ``3.4.1a2``.)" + +#: c-api/apiabiversion.rst:29 +msgid "" +"The ``a`` in ``3.4.1a2``. This can be ``0xA`` for alpha, ``0xB`` for beta, " +"``0xC`` for release candidate or ``0xF`` for final." +msgstr "" +" Le ``a`` dans ``3.4.1a2``. Cela peut être ``0xA`` pour alpha, ``0xB`` pour " +"bêta, ``0xC`` pour une version candidate ou ``0xF`` pour finale)." + +#: c-api/apiabiversion.rst:35 +msgid "The ``2`` in ``3.4.1a2``. Zero for final releases." +msgstr "Le ``2`` dans ``3.4.1a2``. Nul pour des versions finales." + +#: c-api/apiabiversion.rst:39 +msgid "The Python version number encoded in a single integer." +msgstr "Le numéro de version de Python encodé en un seul entier." + +#: c-api/apiabiversion.rst:41 +msgid "" +"The underlying version information can be found by treating it as a 32 bit " +"number in the following manner:" +msgstr "" +"L'information sur la version sous-jacente peut être trouvée en la traitant " +"comme un nombre sous 32 bits de la manière suivante:" + +#: c-api/apiabiversion.rst:45 +msgid "Bytes" +msgstr "Bytes" + +#: c-api/apiabiversion.rst:45 +msgid "Bits (big endian order)" +msgstr "Bits (ordre gros-boutiste)" + +#: c-api/apiabiversion.rst:45 +msgid "Meaning" +msgstr "Signification" + +#: c-api/apiabiversion.rst:45 +msgid "Value for ``3.4.1a2``" +msgstr "Valeur pour ``3.4.1a2``" + +#: c-api/apiabiversion.rst:47 +msgid "1" +msgstr "1" + +#: c-api/apiabiversion.rst:47 +msgid "1-8" +msgstr "1-8" + +#: c-api/apiabiversion.rst:47 +msgid "``PY_MAJOR_VERSION``" +msgstr "``PY_MAJOR_VERSION``" + +#: c-api/apiabiversion.rst:47 +msgid "``0x03``" +msgstr "``0x03``" + +#: c-api/apiabiversion.rst:49 +msgid "2" +msgstr "2" + +#: c-api/apiabiversion.rst:49 +msgid "9-16" +msgstr "9-16" + +#: c-api/apiabiversion.rst:49 +msgid "``PY_MINOR_VERSION``" +msgstr "``PY_MINOR_VERSION``" + +#: c-api/apiabiversion.rst:49 +msgid "``0x04``" +msgstr "``0x04``" + +#: c-api/apiabiversion.rst:51 +msgid "3" +msgstr "3" + +#: c-api/apiabiversion.rst:51 +msgid "17-24" +msgstr "17-24" + +#: c-api/apiabiversion.rst:51 +msgid "``PY_MICRO_VERSION``" +msgstr "``PY_MICRO_VERSION``" + +#: c-api/apiabiversion.rst:51 +msgid "``0x01``" +msgstr "``0x01``" + +#: c-api/apiabiversion.rst:53 +msgid "4" +msgstr "4" + +#: c-api/apiabiversion.rst:53 +msgid "25-28" +msgstr "25-28" + +#: c-api/apiabiversion.rst:53 +msgid "``PY_RELEASE_LEVEL``" +msgstr "``PY_RELEASE_LEVEL``" + +#: c-api/apiabiversion.rst:53 +msgid "``0xA``" +msgstr "``0xA``" + +#: c-api/apiabiversion.rst:55 +msgid "29-32" +msgstr "29-32" + +#: c-api/apiabiversion.rst:55 +msgid "``PY_RELEASE_SERIAL``" +msgstr "``PY_RELEASE_SERIAL``" + +#: c-api/apiabiversion.rst:55 +msgid "``0x2``" +msgstr "``0x2``" + +#: c-api/apiabiversion.rst:58 +msgid "" +"Thus ``3.4.1a2`` is hexversion ``0x030401a2`` and ``3.10.0`` is hexversion " +"``0x030a00f0``." +msgstr "" +"Ainsi, ``0x030401a2`` est la version en notation hexadécimale sur un entier " +"de ``3.4.1a2`` et ``0x030a00f0`` est la version en notation hexadécimale sur " +"un entier de ``3.10.0``" + +#: c-api/apiabiversion.rst:62 +msgid "All the given macros are defined in :source:`Include/patchlevel.h`." +msgstr "" +"Toutes les macros données sont définies dans :source:`Include/patchlevel.h`." + +#~ msgid "``1``" +#~ msgstr "``1``" + +#~ msgid "``2``" +#~ msgstr "``2``" + +#~ msgid "``3``" +#~ msgstr "``3``" + +#~ msgid "``4``" +#~ msgstr "``4``" diff --git a/c-api/arg.po b/c-api/arg.po new file mode 100644 index 0000000000..fae360ef57 --- /dev/null +++ b/c-api/arg.po @@ -0,0 +1,1395 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-22 22:57+0100\n" +"PO-Revision-Date: 2021-12-11 11:44+0100\n" +"Last-Translator: Julien Palard \n" +"Language-Team: FRENCH \n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 2.2.1\n" + +#: c-api/arg.rst:6 +msgid "Parsing arguments and building values" +msgstr "Analyse des arguments et construction des valeurs" + +#: c-api/arg.rst:8 +msgid "" +"These functions are useful when creating your own extensions functions and " +"methods. Additional information and examples are available in :ref:" +"`extending-index`." +msgstr "" +"Ces fonctions sont utiles pour créer vos propres fonctions et méthodes " +"d'extensions. Des informations supplémentaires et des exemples sont " +"disponibles ici: :ref:`extending-index`." + +#: c-api/arg.rst:12 +msgid "" +"The first three of these functions described, :c:func:`PyArg_ParseTuple`, :c:" +"func:`PyArg_ParseTupleAndKeywords`, and :c:func:`PyArg_Parse`, all use " +"*format strings* which are used to tell the function about the expected " +"arguments. The format strings use the same syntax for each of these " +"functions." +msgstr "" +"Dans Les trois premières de ces fonctions décrites, :c:func:" +"`PyArg_ParseTuple`, :c:func:`PyArg_ParseTupleAndKeywords`, et :c:func:" +"`PyArg_Parse`, toutes utilisent *des chaînes de format* qui sont utilisées " +"pour indiquer à la fonction les arguments attendus. Les chaînes de format " +"utilise la même syntaxe pour chacune de ces fonctions." + +#: c-api/arg.rst:19 +msgid "Parsing arguments" +msgstr "Analyse des arguments" + +#: c-api/arg.rst:21 +msgid "" +"A format string consists of zero or more \"format units.\" A format unit " +"describes one Python object; it is usually a single character or a " +"parenthesized sequence of format units. With a few exceptions, a format " +"unit that is not a parenthesized sequence normally corresponds to a single " +"address argument to these functions. In the following description, the " +"quoted form is the format unit; the entry in (round) parentheses is the " +"Python object type that matches the format unit; and the entry in [square] " +"brackets is the type of the C variable(s) whose address should be passed." +msgstr "" +"Une chaîne de format se compose de zéro ou plusieurs \"unités de format\". " +"Une unité de format décrit un objet Python, elle est généralement composée " +"d'un seul caractère ou d'une séquence d'unités de format entre parenthèses. " +"À quelques exceptions près, une unité de format qui n'est pas une séquence " +"entre parenthèses correspond normalement à un argument d'une seule adresse " +"pour ces fonctions. Dans la description qui suit, la forme entre guillemets " +"est l'unité de format, l'entrée entre parenthèses est le type d'objet Python " +"qui correspond à l'unité de format, et l'entrée entre crochets est le type " +"de la variable C (ou des variables) dont l'adresse doit être donnée." + +#: c-api/arg.rst:31 +msgid "Strings and buffers" +msgstr "Chaînes et tampons" + +#: c-api/arg.rst:33 +msgid "" +"These formats allow accessing an object as a contiguous chunk of memory. You " +"don't have to provide raw storage for the returned unicode or bytes area." +msgstr "" +"Ces formats permettent d'accéder à un objet sous forme d'un fragment de " +"mémoire contiguë. Il n'est pas nécessaire d'allouer la mémoire pour " +"l'*unicode* ou le *bytes* renvoyé." + +#: c-api/arg.rst:37 +msgid "Unless otherwise stated, buffers are not NUL-terminated." +msgstr "Sauf indication contraire, les tampons ne se terminent pas par NUL." + +#: c-api/arg.rst:39 +msgid "There are three ways strings and buffers can be converted to C:" +msgstr "" + +#: c-api/arg.rst:41 +#, fuzzy +msgid "" +"Formats such as ``y*`` and ``s*`` fill a :c:type:`Py_buffer` structure. This " +"locks the underlying buffer so that the caller can subsequently use the " +"buffer even inside a :c:type:`Py_BEGIN_ALLOW_THREADS` block without the risk " +"of mutable data being resized or destroyed. As a result, **you have to " +"call** :c:func:`PyBuffer_Release` after you have finished processing the " +"data (or in any early abort case)." +msgstr "" +"Néanmoins, quand une structure :c:type:`Py_buffer` est en cours de " +"remplissage, le tampon sous-jacent est verrouillé pour permettre à " +"l'appelant d'utiliser le tampon par la suite, même à l'intérieur d'un bloc :" +"c:type:`Py_BEGIN_ALLOW_THREADS`, sans risques de voir des données muables se " +"faire redimensionner ou supprimer. En conséquence, **il vous appartient " +"d'appeler** :c:func:`PyBuffer_Release` après avoir terminé de traiter les " +"données (ou après une interruption prématurée du traitement de ces données)." + +#: c-api/arg.rst:48 +msgid "" +"The ``es``, ``es#``, ``et`` and ``et#`` formats allocate the result buffer. " +"**You have to call** :c:func:`PyMem_Free` after you have finished processing " +"the data (or in any early abort case)." +msgstr "" + +#: c-api/arg.rst:54 +#, fuzzy +msgid "" +"Other formats take a :class:`str` or a read-only :term:`bytes-like object`, " +"such as :class:`bytes`, and provide a ``const char *`` pointer to its " +"buffer. In this case the buffer is \"borrowed\": it is managed by the " +"corresponding Python object, and shares the lifetime of this object. You " +"won't have to release any memory yourself." +msgstr "" +"En général, lorsqu'un format définit un pointeur vers un tampon, le tampon " +"est géré par l'objet Python correspondant et le tampon partage la durée de " +"vie de cet objet. vous n'avez pas à libérer de mémoire. Les seules " +"exceptions sont ``es``, ``es#``, ``et`` et ``et#``." + +#: c-api/arg.rst:61 +msgid "" +"To ensure that the underlying buffer may be safely borrowed, the object's :c:" +"member:`PyBufferProcs.bf_releasebuffer` field must be ``NULL``. This " +"disallows common mutable objects such as :class:`bytearray`, but also some " +"read-only objects such as :class:`memoryview` of :class:`bytes`." +msgstr "" + +#: c-api/arg.rst:67 +msgid "" +"Besides this ``bf_releasebuffer`` requirement, there is no check to verify " +"whether the input object is immutable (e.g. whether it would honor a request " +"for a writable buffer, or whether another thread can mutate the data)." +msgstr "" + +#: c-api/arg.rst:73 +msgid "" +"For all ``#`` variants of formats (``s#``, ``y#``, etc.), the macro :c:macro:" +"`PY_SSIZE_T_CLEAN` must be defined before including :file:`Python.h`. On " +"Python 3.9 and older, the type of the length argument is :c:type:" +"`Py_ssize_t` if the :c:macro:`PY_SSIZE_T_CLEAN` macro is defined, or int " +"otherwise." +msgstr "" + +#: c-api/arg.rst:98 +msgid "``s`` (:class:`str`) [const char \\*]" +msgstr "``s`` (:class:`str`) [``const char *``]" + +#: c-api/arg.rst:81 +msgid "" +"Convert a Unicode object to a C pointer to a character string. A pointer to " +"an existing string is stored in the character pointer variable whose address " +"you pass. The C string is NUL-terminated. The Python string must not " +"contain embedded null code points; if it does, a :exc:`ValueError` exception " +"is raised. Unicode objects are converted to C strings using ``'utf-8'`` " +"encoding. If this conversion fails, a :exc:`UnicodeError` is raised." +msgstr "" +"Convertit un objet Unicode en un pointeur vers une chaîne de caractères. " +"S'il s'agit d'un pointeur vers une chaîne de caractères déjà existante, il " +"est stocké dans la variable de type pointeur vers un caractère dont vous " +"avez donné l'adresse. Une chaîne de caractères en C se termine par *NULL*. " +"La chaîne de caractères Python ne doit donc pas contenir de caractère dont " +"le code est *null*. Si elle en contient, une exception :exc:`ValueError` est " +"levée. Si la conversion échoue, une :exc:`UnicodeError` est levée." + +#: c-api/arg.rst:90 +msgid "" +"This format does not accept :term:`bytes-like objects `. " +"If you want to accept filesystem paths and convert them to C character " +"strings, it is preferable to use the ``O&`` format with :c:func:" +"`PyUnicode_FSConverter` as *converter*." +msgstr "" +"Ce format n'accepte pas les :term:`objets compatibles avec une chaîne " +"d'octets `. Si vous voulez accepter les chemins du " +"système de fichiers et les convertir vers des chaînes de caractères C, il " +"est préférable d'utiliser le format ``O&`` avec :c:func:" +"`PyUnicode_FSConverter` en tant que *converter*." + +#: c-api/arg.rst:164 +msgid "" +"Previously, :exc:`TypeError` was raised when embedded null code points were " +"encountered in the Python string." +msgstr "" +"Auparavant, une :exc:`TypeError` était levée quand la chaîne de caractères " +"Python contenait des codes NULL." + +#: c-api/arg.rst:104 +msgid "``s*`` (:class:`str` or :term:`bytes-like object`) [Py_buffer]" +msgstr "``s*`` (:class:`str` ou :term:`bytes-like object`) [``Py_buffer``]" + +#: c-api/arg.rst:101 +msgid "" +"This format accepts Unicode objects as well as bytes-like objects. It fills " +"a :c:type:`Py_buffer` structure provided by the caller. In this case the " +"resulting C string may contain embedded NUL bytes. Unicode objects are " +"converted to C strings using ``'utf-8'`` encoding." +msgstr "" +"Ce format accepte les objets Unicode et les *bytes-like object*. Cela " +"remplit une structure :c:type:`Py_buffer` qui est fournie par l'appelant. " +"Dans ce cas, la chaîne de caractères C qui en résulte peut contenir des " +"octets NULL. Les objets Unicode sont convertis en chaînes de caractères C en " +"utilisant l'encodage ``'utf-8'``." + +#: c-api/arg.rst:111 +#, fuzzy +msgid "" +"``s#`` (:class:`str`, read-only :term:`bytes-like object`) [const char \\*, :" +"c:type:`Py_ssize_t`]" +msgstr "" +"``s#`` (:class:`str`, :term:`bytes-like object` en lecture seule) [``const " +"char \\*``, ``int`` ou :c:type:`Py_ssize_t`]" + +#: c-api/arg.rst:107 +#, fuzzy +msgid "" +"Like ``s*``, except that it provides a :ref:`borrowed buffer `. The result is stored into two C variables, the first one a pointer " +"to a C string, the second one its length. The string may contain embedded " +"null bytes. Unicode objects are converted to C strings using ``'utf-8'`` " +"encoding." +msgstr "" +"La même chose que ``s*``, mais n'accepte pas les objets muables. Le résultat " +"est stocké dans deux variables C, la première est un pointeur vers une " +"chaîne de caractères C, la seconde contient sa taille. La chaîne de " +"caractères peut contenir des octets NULL. Les objets Unicode sont convertis " +"vers des chaînes de caractères C utilisant l'encodage ``'utf-8'``." + +#: c-api/arg.rst:581 +msgid "``z`` (:class:`str` or ``None``) [const char \\*]" +msgstr "``z`` (:class:`str` ou ``None``) [``const char *``]" + +#: c-api/arg.rst:114 +#, fuzzy +msgid "" +"Like ``s``, but the Python object may also be ``None``, in which case the C " +"pointer is set to ``NULL``." +msgstr "" +"Comme ``s``, mais l'objet Python peut aussi être ``None``, auquel cas le " +"pointeur C devient *NULL*." + +#: c-api/arg.rst:119 +msgid "" +"``z*`` (:class:`str`, :term:`bytes-like object` or ``None``) [Py_buffer]" +msgstr "" +"``z*`` (:class:`str`, :term:`bytes-like object` ou ``None``) [``Py_buffer``]" + +#: c-api/arg.rst:118 +msgid "" +"Like ``s*``, but the Python object may also be ``None``, in which case the " +"``buf`` member of the :c:type:`Py_buffer` structure is set to ``NULL``." +msgstr "" +"Comme ``s*``, mais l'objet Python peut aussi être ``None``, auquel cas le " +"membre ``buf``, dont la structure est :c:type:`Py_buffer` est fixée à *NULL*." + +#: c-api/arg.rst:123 +#, fuzzy +msgid "" +"``z#`` (:class:`str`, read-only :term:`bytes-like object` or ``None``) " +"[const char \\*, :c:type:`Py_ssize_t`]" +msgstr "" +"``s#`` (:class:`str`, :term:`bytes-like object` en lecture seule) [``const " +"char \\*``, ``int`` ou :c:type:`Py_ssize_t`]" + +#: c-api/arg.rst:122 +#, fuzzy +msgid "" +"Like ``s#``, but the Python object may also be ``None``, in which case the C " +"pointer is set to ``NULL``." +msgstr "" +"Comme ``s#``, mais l'objet Python peut également être ``None``, dans ce cas " +"le pointeur C est définie à *NULL*." + +#: c-api/arg.rst:134 +msgid "``y`` (read-only :term:`bytes-like object`) [const char \\*]" +msgstr "" +"``y`` (lecture seule :term:`objet compatible avec une chaîne d'octets `) [constante char \\*]" + +#: c-api/arg.rst:126 +#, fuzzy +msgid "" +"This format converts a bytes-like object to a C pointer to a :ref:`borrowed " +"` character string; it does not accept Unicode " +"objects. The bytes buffer must not contain embedded null bytes; if it does, " +"a :exc:`ValueError` exception is raised." +msgstr "" +"Ce format convertit un *objet compatible avec une chaîne d'octets* en un " +"pointeur C vers une chaîne de caractères ; il n'accepte pas les objets " +"Unicode. Le tampon d'octets ne doit pas contenir d'octets *null* ; si c'est " +"le cas, une exception :exc:`ValueError` est levée." + +#: c-api/arg.rst:132 +msgid "" +"Previously, :exc:`TypeError` was raised when embedded null bytes were " +"encountered in the bytes buffer." +msgstr "" +"Auparavant, :exc:`TypeError` était levée lorsque des octets *null* étaient " +"rencontrés dans le tampon d'octets." + +#: c-api/arg.rst:139 +msgid "``y*`` (:term:`bytes-like object`) [Py_buffer]" +msgstr "``y*`` (:term:`bytes-like object`) [``Py_buffer``]" + +#: c-api/arg.rst:137 +msgid "" +"This variant on ``s*`` doesn't accept Unicode objects, only bytes-like " +"objects. **This is the recommended way to accept binary data.**" +msgstr "" + +#: c-api/arg.rst:143 +#, fuzzy +msgid "" +"``y#`` (read-only :term:`bytes-like object`) [const char \\*, :c:type:" +"`Py_ssize_t`]" +msgstr "" +"``s#`` (:class:`str`, :term:`bytes-like object` en lecture seule) [``const " +"char \\*``, ``int`` ou :c:type:`Py_ssize_t`]" + +#: c-api/arg.rst:142 +msgid "" +"This variant on ``s#`` doesn't accept Unicode objects, only bytes-like " +"objects." +msgstr "" +"Cette variante de ``s#`` n'accepte pas les objets Unicode, uniquement des " +"objets assimilés à des octets." + +#: c-api/arg.rst:148 +msgid "``S`` (:class:`bytes`) [PyBytesObject \\*]" +msgstr "``S`` (:class:`bytes`) [``PyBytesObject *``]" + +#: c-api/arg.rst:146 +#, fuzzy +msgid "" +"Requires that the Python object is a :class:`bytes` object, without " +"attempting any conversion. Raises :exc:`TypeError` if the object is not a " +"bytes object. The C variable may also be declared as :c:expr:`PyObject*`." +msgstr "" +"Nécessite que l'objet Python soit de type :class:`bytes`, sans avoir tenté " +"de conversion. :exc:`TypeError` est levée si l'objet n'est pas un objet de " +"type *bytes*. La variable C doit aussi être déclarée en tant que :c:type:" +"`PyObject\\*`." + +#: c-api/arg.rst:153 +msgid "``Y`` (:class:`bytearray`) [PyByteArrayObject \\*]" +msgstr "``Y`` (:class:`bytearray`) [``PyByteArrayObject *``]" + +#: c-api/arg.rst:151 +#, fuzzy +msgid "" +"Requires that the Python object is a :class:`bytearray` object, without " +"attempting any conversion. Raises :exc:`TypeError` if the object is not a :" +"class:`bytearray` object. The C variable may also be declared as :c:expr:" +"`PyObject*`." +msgstr "" +"Nécessite que l'objet Python soit de type :class:`bytes`, sans avoir tenté " +"de conversion. :exc:`TypeError` est levée si l'objet n'est pas un objet de " +"type *bytes*. La variable C doit aussi être déclarée en tant que :c:type:" +"`PyObject\\*`." + +#: c-api/arg.rst:170 +msgid "``u`` (:class:`str`) [const Py_UNICODE \\*]" +msgstr "``u`` (:class:`str`) [``const Py_UNICODE *``]" + +#: c-api/arg.rst:156 +msgid "" +"Convert a Python Unicode object to a C pointer to a NUL-terminated buffer of " +"Unicode characters. You must pass the address of a :c:type:`Py_UNICODE` " +"pointer variable, which will be filled with the pointer to an existing " +"Unicode buffer. Please note that the width of a :c:type:`Py_UNICODE` " +"character depends on compilation options (it is either 16 or 32 bits). The " +"Python string must not contain embedded null code points; if it does, a :exc:" +"`ValueError` exception is raised." +msgstr "" +"Convertit un objet Python Unicode en un pointeur C vers un tampon de " +"caractères Unicode terminé par *NULL*. Vous devez passer l'adresse d'un " +"pointeur :c:type:`Py_UNICODE`, qui sera rempli avec le pointeur vers un " +"tampon Unicode existant. Veuillez noter que la taille d'un :c:type:" +"`Py_UNICODE` dépend des options de compilation (soit 16, soit 32 bits). La " +"chaîne de caractères Python ne doit pas contenir de code *NULL*. Si elle en " +"contient, une exception :exc:`ValueError` est levée." + +#: c-api/arg.rst:188 c-api/arg.rst:196 +msgid "" +"Part of the old-style :c:type:`Py_UNICODE` API; please migrate to using :c:" +"func:`PyUnicode_AsWideCharString`." +msgstr "" + +#: c-api/arg.rst:179 +#, fuzzy +msgid "``u#`` (:class:`str`) [const Py_UNICODE \\*, :c:type:`Py_ssize_t`]" +msgstr "``u#`` (:class:`str`) [``const Py_UNICODE *``, ``int``]" + +#: c-api/arg.rst:173 +msgid "" +"This variant on ``u`` stores into two C variables, the first one a pointer " +"to a Unicode data buffer, the second one its length. This variant allows " +"null code points." +msgstr "" + +#: c-api/arg.rst:187 +msgid "``Z`` (:class:`str` or ``None``) [const Py_UNICODE \\*]" +msgstr "``Z`` (:class:`str` ou ``None``) [``const Py_UNICODE *``]" + +#: c-api/arg.rst:182 +#, fuzzy +msgid "" +"Like ``u``, but the Python object may also be ``None``, in which case the :c:" +"type:`Py_UNICODE` pointer is set to ``NULL``." +msgstr "" +"Comme ``u``, mais l'objet Python peut aussi être ``None``, auquel cas le " +"pointeur :c:type:`Py_UNICODE` vaut *NULL*." + +#: c-api/arg.rst:195 +#, fuzzy +msgid "" +"``Z#`` (:class:`str` or ``None``) [const Py_UNICODE \\*, :c:type:" +"`Py_ssize_t`]" +msgstr "``Z#`` (:class:`str` ou ``None``) [``const Py_UNICODE *``, ``int``]" + +#: c-api/arg.rst:190 +#, fuzzy +msgid "" +"Like ``u#``, but the Python object may also be ``None``, in which case the :" +"c:type:`Py_UNICODE` pointer is set to ``NULL``." +msgstr "" +"Comme ``u#``, mais l'objet Python peut également être ``None``, auquel cas " +"le pointeur :c:type:`Py_UNICODE` vaut *NULL*." + +#: c-api/arg.rst:200 +msgid "``U`` (:class:`str`) [PyObject \\*]" +msgstr "``U`` (:class:`str`) [``PyObject *``]" + +#: c-api/arg.rst:198 +#, fuzzy +msgid "" +"Requires that the Python object is a Unicode object, without attempting any " +"conversion. Raises :exc:`TypeError` if the object is not a Unicode object. " +"The C variable may also be declared as :c:expr:`PyObject*`." +msgstr "" +"Nécessite que l'objet Python soit de type :class:`bytes`, sans avoir tenté " +"de conversion. :exc:`TypeError` est levée si l'objet n'est pas un objet de " +"type *bytes*. La variable C doit aussi être déclarée en tant que :c:type:" +"`PyObject\\*`." + +#: c-api/arg.rst:206 +msgid "``w*`` (read-write :term:`bytes-like object`) [Py_buffer]" +msgstr "``w*`` (lecture-écriture :term:`bytes-like object`) [``Py_buffer``]" + +#: c-api/arg.rst:203 +msgid "" +"This format accepts any object which implements the read-write buffer " +"interface. It fills a :c:type:`Py_buffer` structure provided by the caller. " +"The buffer may contain embedded null bytes. The caller have to call :c:func:" +"`PyBuffer_Release` when it is done with the buffer." +msgstr "" + +#: c-api/arg.rst:223 +msgid "``es`` (:class:`str`) [const char \\*encoding, char \\*\\*buffer]" +msgstr "" + +#: c-api/arg.rst:209 +msgid "" +"This variant on ``s`` is used for encoding Unicode into a character buffer. " +"It only works for encoded data without embedded NUL bytes." +msgstr "" + +#: c-api/arg.rst:212 +msgid "" +"This format requires two arguments. The first is only used as input, and " +"must be a :c:expr:`const char*` which points to the name of an encoding as a " +"NUL-terminated string, or ``NULL``, in which case ``'utf-8'`` encoding is " +"used. An exception is raised if the named encoding is not known to Python. " +"The second argument must be a :c:expr:`char**`; the value of the pointer it " +"references will be set to a buffer with the contents of the argument text. " +"The text will be encoded in the encoding specified by the first argument." +msgstr "" + +#: c-api/arg.rst:220 +msgid "" +":c:func:`PyArg_ParseTuple` will allocate a buffer of the needed size, copy " +"the encoded data into this buffer and adjust *\\*buffer* to reference the " +"newly allocated storage. The caller is responsible for calling :c:func:" +"`PyMem_Free` to free the allocated buffer after use." +msgstr "" + +#: c-api/arg.rst:228 +msgid "" +"``et`` (:class:`str`, :class:`bytes` or :class:`bytearray`) [const char " +"\\*encoding, char \\*\\*buffer]" +msgstr "" + +#: c-api/arg.rst:226 +msgid "" +"Same as ``es`` except that byte string objects are passed through without " +"recoding them. Instead, the implementation assumes that the byte string " +"object uses the encoding passed in as parameter." +msgstr "" + +#: c-api/arg.rst:259 +#, fuzzy +msgid "" +"``es#`` (:class:`str`) [const char \\*encoding, char \\*\\*buffer, :c:type:" +"`Py_ssize_t` \\*buffer_length]" +msgstr "" +"``s#`` (:class:`str`, :term:`bytes-like object` en lecture seule) [``const " +"char \\*``, ``int`` ou :c:type:`Py_ssize_t`]" + +#: c-api/arg.rst:231 +msgid "" +"This variant on ``s#`` is used for encoding Unicode into a character buffer. " +"Unlike the ``es`` format, this variant allows input data which contains NUL " +"characters." +msgstr "" + +#: c-api/arg.rst:235 +msgid "" +"It requires three arguments. The first is only used as input, and must be " +"a :c:expr:`const char*` which points to the name of an encoding as a NUL-" +"terminated string, or ``NULL``, in which case ``'utf-8'`` encoding is used. " +"An exception is raised if the named encoding is not known to Python. The " +"second argument must be a :c:expr:`char**`; the value of the pointer it " +"references will be set to a buffer with the contents of the argument text. " +"The text will be encoded in the encoding specified by the first argument. " +"The third argument must be a pointer to an integer; the referenced integer " +"will be set to the number of bytes in the output buffer." +msgstr "" + +#: c-api/arg.rst:245 +msgid "There are two modes of operation:" +msgstr "Il existe deux modes de fonctionnement :" + +#: c-api/arg.rst:247 +msgid "" +"If *\\*buffer* points a ``NULL`` pointer, the function will allocate a " +"buffer of the needed size, copy the encoded data into this buffer and set " +"*\\*buffer* to reference the newly allocated storage. The caller is " +"responsible for calling :c:func:`PyMem_Free` to free the allocated buffer " +"after usage." +msgstr "" + +#: c-api/arg.rst:252 +msgid "" +"If *\\*buffer* points to a non-``NULL`` pointer (an already allocated " +"buffer), :c:func:`PyArg_ParseTuple` will use this location as the buffer and " +"interpret the initial value of *\\*buffer_length* as the buffer size. It " +"will then copy the encoded data into the buffer and NUL-terminate it. If " +"the buffer is not large enough, a :exc:`ValueError` will be set." +msgstr "" + +#: c-api/arg.rst:258 +msgid "" +"In both cases, *\\*buffer_length* is set to the length of the encoded data " +"without the trailing NUL byte." +msgstr "" +"Dans les deux cas, *\\*buffer_length* est la longueur des données encodées, " +"sans l'octet NUL de fin." + +#: c-api/arg.rst:264 +#, fuzzy +msgid "" +"``et#`` (:class:`str`, :class:`bytes` or :class:`bytearray`) [const char " +"\\*encoding, char \\*\\*buffer, :c:type:`Py_ssize_t` \\*buffer_length]" +msgstr "" +"``s#`` (:class:`str`, :term:`bytes-like object` en lecture seule) [``const " +"char \\*``, ``int`` ou :c:type:`Py_ssize_t`]" + +#: c-api/arg.rst:262 +msgid "" +"Same as ``es#`` except that byte string objects are passed through without " +"recoding them. Instead, the implementation assumes that the byte string " +"object uses the encoding passed in as parameter." +msgstr "" + +#: c-api/arg.rst:267 +msgid "Numbers" +msgstr "Les nombres" + +#: c-api/arg.rst:271 +msgid "``b`` (:class:`int`) [unsigned char]" +msgstr "``b`` (:class:`int`) [``unsigned char``]" + +#: c-api/arg.rst:270 +#, fuzzy +msgid "" +"Convert a nonnegative Python integer to an unsigned tiny int, stored in a C :" +"c:expr:`unsigned char`." +msgstr "" +"Convertit un entier Python positif ou nul en un ``unsigned tiny int``, " +"stocké dans un :c:type:`unsigned char` C." + +#: c-api/arg.rst:615 +msgid "``B`` (:class:`int`) [unsigned char]" +msgstr "``B`` (:class:`int`) [``unsigned char``]" + +#: c-api/arg.rst:274 +#, fuzzy +msgid "" +"Convert a Python integer to a tiny int without overflow checking, stored in " +"a C :c:expr:`unsigned char`." +msgstr "" +"Convertit un entier Python en un ``tiny int`` sans vérifier le débordement, " +"stocké dans un :c:type:`unsigned char` C." + +#: c-api/arg.rst:609 +msgid "``h`` (:class:`int`) [short int]" +msgstr "``h`` (:class:`int`) [``short int``]" + +#: c-api/arg.rst:278 +#, fuzzy +msgid "Convert a Python integer to a C :c:expr:`short int`." +msgstr "Convertit un entier Python en un :c:type:`short int` C." + +#: c-api/arg.rst:618 +msgid "``H`` (:class:`int`) [unsigned short int]" +msgstr "``H`` (:class:`int`) [``unsigned short int``]" + +#: c-api/arg.rst:281 +#, fuzzy +msgid "" +"Convert a Python integer to a C :c:expr:`unsigned short int`, without " +"overflow checking." +msgstr "" +"Convertit un entier Python en un :c:type:`unsigned short int` C, sans " +"contrôle de débordement." + +#: c-api/arg.rst:603 +msgid "``i`` (:class:`int`) [int]" +msgstr "``i`` (:class:`int`) [``int``]" + +#: c-api/arg.rst:285 +#, fuzzy +msgid "Convert a Python integer to a plain C :c:expr:`int`." +msgstr "Convertit un entier Python en un :c:type:`int` C." + +#: c-api/arg.rst:621 +msgid "``I`` (:class:`int`) [unsigned int]" +msgstr "``I`` (:class:`int`) [``unsigned int``]" + +#: c-api/arg.rst:288 +#, fuzzy +msgid "" +"Convert a Python integer to a C :c:expr:`unsigned int`, without overflow " +"checking." +msgstr "" +"Convertit un entier Python en un :c:type:`unsigned int` C, sans contrôle de " +"le débordement." + +#: c-api/arg.rst:612 +msgid "``l`` (:class:`int`) [long int]" +msgstr "``l`` (:class:`int`) [``long int``]" + +#: c-api/arg.rst:292 +#, fuzzy +msgid "Convert a Python integer to a C :c:expr:`long int`." +msgstr "Convertit un entier Python en un :c:type:`long int`." + +#: c-api/arg.rst:624 +msgid "``k`` (:class:`int`) [unsigned long]" +msgstr "``k`` (:class:`int`) [``unsigned long``]" + +#: c-api/arg.rst:295 +#, fuzzy +msgid "" +"Convert a Python integer to a C :c:expr:`unsigned long` without overflow " +"checking." +msgstr "" +"Convertit un entier Python en un :c:type:`unsigned long` C sans en vérifier " +"le débordement." + +#: c-api/arg.rst:627 +msgid "``L`` (:class:`int`) [long long]" +msgstr "``L`` (:class:`int`) [``long long``]" + +#: c-api/arg.rst:299 +#, fuzzy +msgid "Convert a Python integer to a C :c:expr:`long long`." +msgstr "Convertit un entier Python en un :c:type:`long int`." + +#: c-api/arg.rst:630 +msgid "``K`` (:class:`int`) [unsigned long long]" +msgstr "``K`` (:class:`int`) [``unsigned long long``]" + +#: c-api/arg.rst:302 +#, fuzzy +msgid "" +"Convert a Python integer to a C :c:expr:`unsigned long long` without " +"overflow checking." +msgstr "" +"Convertit un entier Python en un :c:type:`unsigned long` C sans en vérifier " +"le débordement." + +#: c-api/arg.rst:633 +#, fuzzy +msgid "``n`` (:class:`int`) [:c:type:`Py_ssize_t`]" +msgstr "``n`` (:class:`int`) [``Py_ssize_t``]" + +#: c-api/arg.rst:306 +msgid "Convert a Python integer to a C :c:type:`Py_ssize_t`." +msgstr "Convertit un entier Python en un :c:type:`Py_ssize_t`." + +#: c-api/arg.rst:313 +msgid "``c`` (:class:`bytes` or :class:`bytearray` of length 1) [char]" +msgstr "``c`` (:class:`bytes` ou :class:`bytearray` de longueur 1) [``char``]" + +#: c-api/arg.rst:309 +#, fuzzy +msgid "" +"Convert a Python byte, represented as a :class:`bytes` or :class:`bytearray` " +"object of length 1, to a C :c:expr:`char`." +msgstr "" +"Convertit un *byte* Python, représenté comme un objet :class:`bytes` ou :" +"class:`bytearray` de longueur 1, en un :c:type:`char` C." + +#: c-api/arg.rst:312 +msgid "Allow :class:`bytearray` objects." +msgstr "" + +#: c-api/arg.rst:641 +msgid "``C`` (:class:`str` of length 1) [int]" +msgstr "``C`` (:class:`str` de longueur 1) [``int``]" + +#: c-api/arg.rst:316 +#, fuzzy +msgid "" +"Convert a Python character, represented as a :class:`str` object of length " +"1, to a C :c:expr:`int`." +msgstr "" +"Convertit un caractère Python, représenté comme un objet :class:`str` de " +"longueur 1, en un :c:type:`int` C." + +#: c-api/arg.rst:647 +msgid "``f`` (:class:`float`) [float]" +msgstr "``f`` (:class:`float`) [``float``]" + +#: c-api/arg.rst:320 +#, fuzzy +msgid "Convert a Python floating point number to a C :c:expr:`float`." +msgstr "Convertit un nombre flottant Python vers un :c:type:`float`." + +#: c-api/arg.rst:644 +msgid "``d`` (:class:`float`) [double]" +msgstr "``d`` (:class:`float`) [``double``]" + +#: c-api/arg.rst:323 +#, fuzzy +msgid "Convert a Python floating point number to a C :c:expr:`double`." +msgstr "Convertit un nombre flottant Python vers un :c:type:`double` C." + +#: c-api/arg.rst:326 +msgid "``D`` (:class:`complex`) [Py_complex]" +msgstr "``D`` (:class:`complex`) [``Py_complex``]" + +#: c-api/arg.rst:326 +msgid "Convert a Python complex number to a C :c:type:`Py_complex` structure." +msgstr "" +"Convertit un nombre complexe Python vers une structure :c:type:`Py_complex` " +"C." + +#: c-api/arg.rst:329 +msgid "Other objects" +msgstr "Autres objets" + +#: c-api/arg.rst:658 +msgid "``O`` (object) [PyObject \\*]" +msgstr "``O`` (objet) [``PyObject *``]" + +#: c-api/arg.rst:332 +#, fuzzy +msgid "" +"Store a Python object (without any conversion) in a C object pointer. The C " +"program thus receives the actual object that was passed. The object's " +"reference count is not increased. The pointer stored is not ``NULL``." +msgstr "" +"Stocke un objet Python (sans aucune conversion) en un pointeur sur un objet " +"C. Ainsi, Le programme C reçoit l'objet réel qui a été passé. Le compteur de " +"référence sur l'objet n'est pas incrémenté. Le pointeur stocké n'est pas " +"*NULL*." + +#: c-api/arg.rst:341 +msgid "``O!`` (object) [*typeobject*, PyObject \\*]" +msgstr "``O!`` (objet) [*typeobject*, ``PyObject *``]" + +#: c-api/arg.rst:337 +msgid "" +"Store a Python object in a C object pointer. This is similar to ``O``, but " +"takes two C arguments: the first is the address of a Python type object, the " +"second is the address of the C variable (of type :c:expr:`PyObject*`) into " +"which the object pointer is stored. If the Python object does not have the " +"required type, :exc:`TypeError` is raised." +msgstr "" + +#: c-api/arg.rst:672 +msgid "``O&`` (object) [*converter*, *anything*]" +msgstr "``O&`` (objet) [*converter*, *anything*]" + +#: c-api/arg.rst:346 +msgid "" +"Convert a Python object to a C variable through a *converter* function. " +"This takes two arguments: the first is a function, the second is the address " +"of a C variable (of arbitrary type), converted to :c:expr:`void *`. The " +"*converter* function in turn is called as follows::" +msgstr "" + +#: c-api/arg.rst:353 +msgid "" +"where *object* is the Python object to be converted and *address* is the :c:" +"expr:`void*` argument that was passed to the ``PyArg_Parse*`` function. The " +"returned *status* should be ``1`` for a successful conversion and ``0`` if " +"the conversion has failed. When the conversion fails, the *converter* " +"function should raise an exception and leave the content of *address* " +"unmodified." +msgstr "" + +#: c-api/arg.rst:359 +msgid "" +"If the *converter* returns ``Py_CLEANUP_SUPPORTED``, it may get called a " +"second time if the argument parsing eventually fails, giving the converter a " +"chance to release any memory that it had already allocated. In this second " +"call, the *object* parameter will be ``NULL``; *address* will have the same " +"value as in the original call." +msgstr "" + +#: c-api/arg.rst:365 +msgid "``Py_CLEANUP_SUPPORTED`` was added." +msgstr "``Py_CLEANUP_SUPPORTED`` à été ajouté." + +#: c-api/arg.rst:375 +msgid "``p`` (:class:`bool`) [int]" +msgstr "``p`` (:class:`bool`) [``int``]" + +#: c-api/arg.rst:369 +msgid "" +"Tests the value passed in for truth (a boolean **p**\\ redicate) and " +"converts the result to its equivalent C true/false integer value. Sets the " +"int to ``1`` if the expression was true and ``0`` if it was false. This " +"accepts any valid Python value. See :ref:`truth` for more information about " +"how Python tests values for truth." +msgstr "" + +#: c-api/arg.rst:675 +msgid "``(items)`` (:class:`tuple`) [*matching-items*]" +msgstr "``(items)`` (:class:`tuple`) [*matching-items*]" + +#: c-api/arg.rst:378 +msgid "" +"The object must be a Python sequence whose length is the number of format " +"units in *items*. The C arguments must correspond to the individual format " +"units in *items*. Format units for sequences may be nested." +msgstr "" +"L'objet doit être une séquence Python dont la longueur est le nombre " +"d'unités de formats dans *articles*. Les arguments C doivent correspondre à " +"chaque unité de format particulière dans *articles*. Les unités de formats " +"pour les séquences peuvent être imbriquées." + +#: c-api/arg.rst:382 +msgid "" +"It is possible to pass \"long\" integers (integers whose value exceeds the " +"platform's :const:`LONG_MAX`) however no proper range checking is done --- " +"the most significant bits are silently truncated when the receiving field is " +"too small to receive the value (actually, the semantics are inherited from " +"downcasts in C --- your mileage may vary)." +msgstr "" + +#: c-api/arg.rst:388 +msgid "" +"A few other characters have a meaning in a format string. These may not " +"occur inside nested parentheses. They are:" +msgstr "" +"Quelques autres caractères ont un sens dans une chaîne de format. On ne doit " +"pas les trouvées dans des parenthèses imbriquées. Ce sont :" + +#: c-api/arg.rst:396 +msgid "``|``" +msgstr "``|``" + +#: c-api/arg.rst:392 +msgid "" +"Indicates that the remaining arguments in the Python argument list are " +"optional. The C variables corresponding to optional arguments should be " +"initialized to their default value --- when an optional argument is not " +"specified, :c:func:`PyArg_ParseTuple` does not touch the contents of the " +"corresponding C variable(s)." +msgstr "" + +#: c-api/arg.rst:405 +msgid "``$``" +msgstr "``$``" + +#: c-api/arg.rst:399 +msgid "" +":c:func:`PyArg_ParseTupleAndKeywords` only: Indicates that the remaining " +"arguments in the Python argument list are keyword-only. Currently, all " +"keyword-only arguments must also be optional arguments, so ``|`` must always " +"be specified before ``$`` in the format string." +msgstr "" + +#: c-api/arg.rst:410 +msgid "``:``" +msgstr "" + +#: c-api/arg.rst:408 +msgid "" +"The list of format units ends here; the string after the colon is used as " +"the function name in error messages (the \"associated value\" of the " +"exception that :c:func:`PyArg_ParseTuple` raises)." +msgstr "" + +#: c-api/arg.rst:415 +msgid "``;``" +msgstr "" + +#: c-api/arg.rst:413 +msgid "" +"The list of format units ends here; the string after the semicolon is used " +"as the error message *instead* of the default error message. ``:`` and ``;" +"`` mutually exclude each other." +msgstr "" +"La liste des unités de format s'arrête ici ; la chaîne après le point-" +"virgule est utilise comme message d'erreur *au lieu* du message d'erreur par " +"défaut. ``:`` et ``;`` sont mutuellement exclusifs." + +#: c-api/arg.rst:417 +msgid "" +"Note that any Python object references which are provided to the caller are " +"*borrowed* references; do not decrement their reference count!" +msgstr "" +"Notez que n'importe quelles références sur un objet Python qui sont données " +"à l'appelant sont des références *empruntées* ; ne décrémentez pas leur " +"compteur de références !" + +#: c-api/arg.rst:420 +msgid "" +"Additional arguments passed to these functions must be addresses of " +"variables whose type is determined by the format string; these are used to " +"store values from the input tuple. There are a few cases, as described in " +"the list of format units above, where these parameters are used as input " +"values; they should match what is specified for the corresponding format " +"unit in that case." +msgstr "" +"Les arguments additionnels qui sont donnés à ces fonctions doivent être des " +"adresses de variables dont le type est déterminé par la chaîne de format. " +"Elles sont utilisées pour stocker les valeurs du *n*-uplet d'entrée. Il y a " +"quelques cas, comme décrit précédemment dans le liste des unités de formats, " +"où ces paramètres sont utilisés comme valeurs d'entrée. Dans ce cas, ils " +"devraient correspondre à ce qui est spécifié pour l'unité de format " +"correspondante." + +#: c-api/arg.rst:426 +msgid "" +"For the conversion to succeed, the *arg* object must match the format and " +"the format must be exhausted. On success, the ``PyArg_Parse*`` functions " +"return true, otherwise they return false and raise an appropriate exception. " +"When the ``PyArg_Parse*`` functions fail due to conversion failure in one of " +"the format units, the variables at the addresses corresponding to that and " +"the following format units are left untouched." +msgstr "" + +#: c-api/arg.rst:435 +msgid "API Functions" +msgstr "Fonction de l'API" + +#: c-api/arg.rst:439 +msgid "" +"Parse the parameters of a function that takes only positional parameters " +"into local variables. Returns true on success; on failure, it returns false " +"and raises the appropriate exception." +msgstr "" + +#: c-api/arg.rst:446 +msgid "" +"Identical to :c:func:`PyArg_ParseTuple`, except that it accepts a va_list " +"rather than a variable number of arguments." +msgstr "" + +#: c-api/arg.rst:452 +msgid "" +"Parse the parameters of a function that takes both positional and keyword " +"parameters into local variables. The *keywords* argument is a ``NULL``-" +"terminated array of keyword parameter names. Empty names denote :ref:" +"`positional-only parameters `. Returns true on " +"success; on failure, it returns false and raises the appropriate exception." +msgstr "" + +#: c-api/arg.rst:459 +msgid "" +"Added support for :ref:`positional-only parameters `." +msgstr "" + +#: c-api/arg.rst:466 +msgid "" +"Identical to :c:func:`PyArg_ParseTupleAndKeywords`, except that it accepts a " +"va_list rather than a variable number of arguments." +msgstr "" + +#: c-api/arg.rst:472 +msgid "" +"Ensure that the keys in the keywords argument dictionary are strings. This " +"is only needed if :c:func:`PyArg_ParseTupleAndKeywords` is not used, since " +"the latter already does this check." +msgstr "" + +#: c-api/arg.rst:482 +msgid "" +"Function used to deconstruct the argument lists of \"old-style\" functions " +"--- these are functions which use the :const:`METH_OLDARGS` parameter " +"parsing method, which has been removed in Python 3. This is not recommended " +"for use in parameter parsing in new code, and most code in the standard " +"interpreter has been modified to no longer use this for that purpose. It " +"does remain a convenient way to decompose other tuples, however, and may " +"continue to be used for that purpose." +msgstr "" + +#: c-api/arg.rst:493 +msgid "" +"A simpler form of parameter retrieval which does not use a format string to " +"specify the types of the arguments. Functions which use this method to " +"retrieve their parameters should be declared as :const:`METH_VARARGS` in " +"function or method tables. The tuple containing the actual parameters " +"should be passed as *args*; it must actually be a tuple. The length of the " +"tuple must be at least *min* and no more than *max*; *min* and *max* may be " +"equal. Additional arguments must be passed to the function, each of which " +"should be a pointer to a :c:expr:`PyObject*` variable; these will be filled " +"in with the values from *args*; they will contain :term:`borrowed references " +"`. The variables which correspond to optional parameters " +"not given by *args* will not be filled in; these should be initialized by " +"the caller. This function returns true on success and false if *args* is not " +"a tuple or contains the wrong number of elements; an exception will be set " +"if there was a failure." +msgstr "" + +#: c-api/arg.rst:508 +msgid "" +"This is an example of the use of this function, taken from the sources for " +"the :mod:`_weakref` helper module for weak references::" +msgstr "" + +#: c-api/arg.rst:524 +msgid "" +"The call to :c:func:`PyArg_UnpackTuple` in this example is entirely " +"equivalent to this call to :c:func:`PyArg_ParseTuple`::" +msgstr "" + +#: c-api/arg.rst:532 +msgid "Building values" +msgstr "Construction des valeurs" + +#: c-api/arg.rst:536 +msgid "" +"Create a new value based on a format string similar to those accepted by the " +"``PyArg_Parse*`` family of functions and a sequence of values. Returns the " +"value or ``NULL`` in the case of an error; an exception will be raised if " +"``NULL`` is returned." +msgstr "" + +#: c-api/arg.rst:541 +msgid "" +":c:func:`Py_BuildValue` does not always build a tuple. It builds a tuple " +"only if its format string contains two or more format units. If the format " +"string is empty, it returns ``None``; if it contains exactly one format " +"unit, it returns whatever object is described by that format unit. To force " +"it to return a tuple of size 0 or one, parenthesize the format string." +msgstr "" + +#: c-api/arg.rst:547 +msgid "" +"When memory buffers are passed as parameters to supply data to build " +"objects, as for the ``s`` and ``s#`` formats, the required data is copied. " +"Buffers provided by the caller are never referenced by the objects created " +"by :c:func:`Py_BuildValue`. In other words, if your code invokes :c:func:" +"`malloc` and passes the allocated memory to :c:func:`Py_BuildValue`, your " +"code is responsible for calling :c:func:`free` for that memory once :c:func:" +"`Py_BuildValue` returns." +msgstr "" + +#: c-api/arg.rst:555 +msgid "" +"In the following description, the quoted form is the format unit; the entry " +"in (round) parentheses is the Python object type that the format unit will " +"return; and the entry in [square] brackets is the type of the C value(s) to " +"be passed." +msgstr "" + +#: c-api/arg.rst:559 +msgid "" +"The characters space, tab, colon and comma are ignored in format strings " +"(but not within format units such as ``s#``). This can be used to make long " +"format strings a tad more readable." +msgstr "" + +#: c-api/arg.rst:565 +msgid "``s`` (:class:`str` or ``None``) [const char \\*]" +msgstr "``s`` (:class:`str` ou ``None``) [``const char *``]" + +#: c-api/arg.rst:564 +msgid "" +"Convert a null-terminated C string to a Python :class:`str` object using " +"``'utf-8'`` encoding. If the C string pointer is ``NULL``, ``None`` is used." +msgstr "" + +#: c-api/arg.rst:570 +#, fuzzy +msgid "" +"``s#`` (:class:`str` or ``None``) [const char \\*, :c:type:`Py_ssize_t`]" +msgstr "``s#`` (:class:`str` ou ``None``) [``const char *``, ``int``]" + +#: c-api/arg.rst:568 +msgid "" +"Convert a C string and its length to a Python :class:`str` object using " +"``'utf-8'`` encoding. If the C string pointer is ``NULL``, the length is " +"ignored and ``None`` is returned." +msgstr "" + +#: c-api/arg.rst:574 +msgid "``y`` (:class:`bytes`) [const char \\*]" +msgstr "``y`` (:class:`bytes`) [``const char *``]" + +#: c-api/arg.rst:573 +msgid "" +"This converts a C string to a Python :class:`bytes` object. If the C string " +"pointer is ``NULL``, ``None`` is returned." +msgstr "" + +#: c-api/arg.rst:578 +#, fuzzy +msgid "``y#`` (:class:`bytes`) [const char \\*, :c:type:`Py_ssize_t`]" +msgstr "``y#`` (:class:`bytes`) [``const char *, int``]" + +#: c-api/arg.rst:577 +msgid "" +"This converts a C string and its lengths to a Python object. If the C " +"string pointer is ``NULL``, ``None`` is returned." +msgstr "" + +#: c-api/arg.rst:597 +msgid "Same as ``s``." +msgstr "" + +#: c-api/arg.rst:584 +#, fuzzy +msgid "" +"``z#`` (:class:`str` or ``None``) [const char \\*, :c:type:`Py_ssize_t`]" +msgstr "``z#`` (:class:`str` ou ``None``) [``const char *``, ``int``]" + +#: c-api/arg.rst:600 +msgid "Same as ``s#``." +msgstr "" + +#: c-api/arg.rst:589 +msgid "``u`` (:class:`str`) [const wchar_t \\*]" +msgstr "``u`` (:class:`str`) [``const wchar_t *``]" + +#: c-api/arg.rst:587 +msgid "" +"Convert a null-terminated :c:expr:`wchar_t` buffer of Unicode (UTF-16 or " +"UCS-4) data to a Python Unicode object. If the Unicode buffer pointer is " +"``NULL``, ``None`` is returned." +msgstr "" + +#: c-api/arg.rst:594 +#, fuzzy +msgid "``u#`` (:class:`str`) [const wchar_t \\*, :c:type:`Py_ssize_t`]" +msgstr "``u#`` (:class:`str`) [``const wchar_t *``, ``int``]" + +#: c-api/arg.rst:592 +msgid "" +"Convert a Unicode (UTF-16 or UCS-4) data buffer and its length to a Python " +"Unicode object. If the Unicode buffer pointer is ``NULL``, the length is " +"ignored and ``None`` is returned." +msgstr "" + +#: c-api/arg.rst:597 +msgid "``U`` (:class:`str` or ``None``) [const char \\*]" +msgstr "``U`` (:class:`str` ou ``None``) [``const char *``]" + +#: c-api/arg.rst:600 +#, fuzzy +msgid "" +"``U#`` (:class:`str` or ``None``) [const char \\*, :c:type:`Py_ssize_t`]" +msgstr "``U#`` (:class:`str` ou ``None``) [``const char *``, ``int``]" + +#: c-api/arg.rst:603 +#, fuzzy +msgid "Convert a plain C :c:expr:`int` to a Python integer object." +msgstr "Convertit un :c:type:`long int` en un *int* Python." + +#: c-api/arg.rst:606 +msgid "``b`` (:class:`int`) [char]" +msgstr "``b`` (:class:`int`) [``char``]" + +#: c-api/arg.rst:606 +#, fuzzy +msgid "Convert a plain C :c:expr:`char` to a Python integer object." +msgstr "Convertit un :c:type:`long int` en un *int* Python." + +#: c-api/arg.rst:609 +#, fuzzy +msgid "Convert a plain C :c:expr:`short int` to a Python integer object." +msgstr "Convertit un :c:type:`long int` en un *int* Python." + +#: c-api/arg.rst:612 +#, fuzzy +msgid "Convert a C :c:expr:`long int` to a Python integer object." +msgstr "Convertit un :c:type:`long int` en un *int* Python." + +#: c-api/arg.rst:615 +#, fuzzy +msgid "Convert a C :c:expr:`unsigned char` to a Python integer object." +msgstr "Convertit un :c:type:`long int` en un *int* Python." + +#: c-api/arg.rst:618 +#, fuzzy +msgid "Convert a C :c:expr:`unsigned short int` to a Python integer object." +msgstr "Convertit un :c:type:`long int` en un *int* Python." + +#: c-api/arg.rst:621 +#, fuzzy +msgid "Convert a C :c:expr:`unsigned int` to a Python integer object." +msgstr "Convertit un :c:type:`long int` en un *int* Python." + +#: c-api/arg.rst:624 +#, fuzzy +msgid "Convert a C :c:expr:`unsigned long` to a Python integer object." +msgstr "Convertit un :c:type:`long int` en un *int* Python." + +#: c-api/arg.rst:627 +#, fuzzy +msgid "Convert a C :c:expr:`long long` to a Python integer object." +msgstr "Convertit un :c:type:`long int` en un *int* Python." + +#: c-api/arg.rst:630 +#, fuzzy +msgid "Convert a C :c:expr:`unsigned long long` to a Python integer object." +msgstr "Convertit un :c:type:`long int` en un *int* Python." + +#: c-api/arg.rst:633 +msgid "Convert a C :c:type:`Py_ssize_t` to a Python integer." +msgstr "" + +#: c-api/arg.rst:637 +msgid "``c`` (:class:`bytes` of length 1) [char]" +msgstr "``c`` (:class:`bytes` de taille 1) [``char``]" + +#: c-api/arg.rst:636 +#, fuzzy +msgid "" +"Convert a C :c:expr:`int` representing a byte to a Python :class:`bytes` " +"object of length 1." +msgstr "" +"Convertit un caractère Python, représenté comme un objet :class:`str` de " +"longueur 1, en un :c:type:`int` C." + +#: c-api/arg.rst:640 +#, fuzzy +msgid "" +"Convert a C :c:expr:`int` representing a character to Python :class:`str` " +"object of length 1." +msgstr "" +"Convertit un caractère Python, représenté comme un objet :class:`str` de " +"longueur 1, en un :c:type:`int` C." + +#: c-api/arg.rst:644 +#, fuzzy +msgid "Convert a C :c:expr:`double` to a Python floating point number." +msgstr "Convertit un :c:type:`long int` en un *int* Python." + +#: c-api/arg.rst:647 +#, fuzzy +msgid "Convert a C :c:expr:`float` to a Python floating point number." +msgstr "Convertit un :c:type:`long int` en un *int* Python." + +#: c-api/arg.rst:650 +msgid "``D`` (:class:`complex`) [Py_complex \\*]" +msgstr "``D`` (:class:`complex`) [``Py_complex *``]" + +#: c-api/arg.rst:650 +msgid "Convert a C :c:type:`Py_complex` structure to a Python complex number." +msgstr "" + +#: c-api/arg.rst:653 +msgid "" +"Pass a Python object untouched (except for its reference count, which is " +"incremented by one). If the object passed in is a ``NULL`` pointer, it is " +"assumed that this was caused because the call producing the argument found " +"an error and set an exception. Therefore, :c:func:`Py_BuildValue` will " +"return ``NULL`` but won't raise an exception. If no exception has been " +"raised yet, :exc:`SystemError` is set." +msgstr "" + +#: c-api/arg.rst:661 +msgid "``S`` (object) [PyObject \\*]" +msgstr "``S`` (objet) [``PyObject *``]" + +#: c-api/arg.rst:661 +msgid "Same as ``O``." +msgstr "" + +#: c-api/arg.rst:666 +msgid "``N`` (object) [PyObject \\*]" +msgstr "``N`` (objet) [``PyObject *``]" + +#: c-api/arg.rst:664 +msgid "" +"Same as ``O``, except it doesn't increment the reference count on the " +"object. Useful when the object is created by a call to an object constructor " +"in the argument list." +msgstr "" + +#: c-api/arg.rst:669 +msgid "" +"Convert *anything* to a Python object through a *converter* function. The " +"function is called with *anything* (which should be compatible with :c:expr:" +"`void*`) as its argument and should return a \"new\" Python object, or " +"``NULL`` if an error occurred." +msgstr "" + +#: c-api/arg.rst:675 +msgid "" +"Convert a sequence of C values to a Python tuple with the same number of " +"items." +msgstr "" + +#: c-api/arg.rst:678 +msgid "``[items]`` (:class:`list`) [*matching-items*]" +msgstr "``[items]`` (:class:`list`) [*matching-items*]" + +#: c-api/arg.rst:678 +msgid "" +"Convert a sequence of C values to a Python list with the same number of " +"items." +msgstr "" + +#: c-api/arg.rst:683 +msgid "``{items}`` (:class:`dict`) [*matching-items*]" +msgstr "``{items}`` (:class:`dict`) [*matching-items*]" + +#: c-api/arg.rst:681 +msgid "" +"Convert a sequence of C values to a Python dictionary. Each pair of " +"consecutive C values adds one item to the dictionary, serving as key and " +"value, respectively." +msgstr "" + +#: c-api/arg.rst:685 +msgid "" +"If there is an error in the format string, the :exc:`SystemError` exception " +"is set and ``NULL`` returned." +msgstr "" + +#: c-api/arg.rst:690 +msgid "" +"Identical to :c:func:`Py_BuildValue`, except that it accepts a va_list " +"rather than a variable number of arguments." +msgstr "" + +#~ msgid "" +#~ "Some formats require a read-only :term:`bytes-like object`, and set a " +#~ "pointer instead of a buffer structure. They work by checking that the " +#~ "object's :c:member:`PyBufferProcs.bf_releasebuffer` field is ``NULL``, " +#~ "which disallows mutable objects such as :class:`bytearray`." +#~ msgstr "" +#~ "Certains formats requièrent un :term:`objet compatible avec une chaîne " +#~ "d'octets ` en lecture seule, et définissent un " +#~ "pointeur à la place d'une structure tampon. Ils fonctionnent en vérifiant " +#~ "que le champ :c:member:`PyBufferProcs.bf_releasebuffer` de l'objet est " +#~ "*NULL*, ce qui n'autorise pas les objets muables tels que :class:" +#~ "`bytearray`." + +#~ msgid "" +#~ "For all ``#`` variants of formats (``s#``, ``y#``, etc.), the type of the " +#~ "length argument (int or :c:type:`Py_ssize_t`) is controlled by defining " +#~ "the macro :c:macro:`PY_SSIZE_T_CLEAN` before including :file:`Python.h`. " +#~ "If the macro was defined, length is a :c:type:`Py_ssize_t` rather than " +#~ "an :c:type:`int`. This behavior will change in a future Python version to " +#~ "only support :c:type:`Py_ssize_t` and drop :c:type:`int` support. It is " +#~ "best to always define :c:macro:`PY_SSIZE_T_CLEAN`." +#~ msgstr "" +#~ "Pour toutes les variantes du marqueur ``#`` (``s#``, ``y#``, etc), le " +#~ "type de l'argument *length* (*int* ou :c:type:`Py_ssize_t`) est contrôlé " +#~ "en définissant la macro :c:macro:`PY_SSIZE_T_CLEAN` avant d'inclure le " +#~ "fichier :file:`Python.h`. Si la macro est définie, la longueur est de " +#~ "type :c:type:`Py_ssize_t` au lieu d'être de type :c:type:`int`. Ce " +#~ "comportement changera dans une future version de Python, qui supportera " +#~ "seulement :c:type:`Py_ssize_t` a la place de :c:type:`int`. Il est " +#~ "préférable de toujours définir :c:macro:`PY_SSIZE_T_CLEAN`." diff --git a/c-api/bool.po b/c-api/bool.po new file mode 100644 index 0000000000..4394ddb715 --- /dev/null +++ b/c-api/bool.po @@ -0,0 +1,83 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-11-04 18:14+0100\n" +"PO-Revision-Date: 2021-10-27 19:19+0200\n" +"Last-Translator: \n" +"Language-Team: FRENCH \n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 3.0\n" + +#: c-api/bool.rst:6 +msgid "Boolean Objects" +msgstr "Les objets booléens" + +#: c-api/bool.rst:8 +msgid "" +"Booleans in Python are implemented as a subclass of integers. There are " +"only two booleans, :const:`Py_False` and :const:`Py_True`. As such, the " +"normal creation and deletion functions don't apply to booleans. The " +"following macros are available, however." +msgstr "" +"Les booléens en Python sont implémentés comme une classe dérivée des " +"entiers. Il y a seulement deux booléens, :const:`Py_False` et :const:" +"`Py_True`. Comme tel, les fonctions de création de suppression ne " +"s'appliquent pas aux booléens. Toutefois, les macros suivantes sont " +"disponibles." + +#: c-api/bool.rst:16 +msgid "" +"Return true if *o* is of type :c:data:`PyBool_Type`. This function always " +"succeeds." +msgstr "" +"Renvoie vrai si *o* est de type :c:data:`PyBook_Type`. Cette fonction " +"réussit systématiquement." + +#: c-api/bool.rst:22 +msgid "" +"The Python ``False`` object. This object has no methods. It needs to be " +"treated just like any other object with respect to reference counts." +msgstr "" +"L'objet Python ``False``. Cet objet n'a pas de méthodes. En ce qui concerne " +"le comptage de référence, il doit être traité comme n'importe quel autre " +"objet." + +#: c-api/bool.rst:28 +msgid "" +"The Python ``True`` object. This object has no methods. It needs to be " +"treated just like any other object with respect to reference counts." +msgstr "" +"L'objet Python ``True``. Cet objet n'a pas de méthodes. En ce qui concerne " +"le comptage de références, il doit être traité comme n'importe quel autre " +"objet." + +#: c-api/bool.rst:34 +msgid "" +"Return :const:`Py_False` from a function, properly incrementing its " +"reference count." +msgstr "" +"Renvoie :const:`Py_False` depuis une fonction tout en incrémentant son " +"nombre de références." + +#: c-api/bool.rst:40 +msgid "" +"Return :const:`Py_True` from a function, properly incrementing its reference " +"count." +msgstr "" +"Renvoie :const:`Py_True` depuis une fonction, en incrémentant son nombre de " +"références." + +#: c-api/bool.rst:46 +msgid "" +"Return a new reference to :const:`Py_True` or :const:`Py_False` depending on " +"the truth value of *v*." +msgstr "" +"Renvoie une nouvelle référence de :const:`Py_True` ou :const:`Py_False` en " +"fonction de la valeur de *v*." diff --git a/c-api/buffer.po b/c-api/buffer.po new file mode 100644 index 0000000000..dc4feeb0e1 --- /dev/null +++ b/c-api/buffer.po @@ -0,0 +1,713 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-04-05 10:05+0200\n" +"PO-Revision-Date: 2021-10-27 21:13+0200\n" +"Last-Translator: David GIRAUD \n" +"Language-Team: FRENCH \n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 3.0\n" + +#: c-api/buffer.rst:11 +msgid "Buffer Protocol" +msgstr "Protocole tampon" + +#: c-api/buffer.rst:18 +msgid "" +"Certain objects available in Python wrap access to an underlying memory " +"array or *buffer*. Such objects include the built-in :class:`bytes` and :" +"class:`bytearray`, and some extension types like :class:`array.array`. Third-" +"party libraries may define their own types for special purposes, such as " +"image processing or numeric analysis." +msgstr "" +"Certains objets Python enveloppent l'accès à un tableau de mémoire sous-" +"jacente (nommée zone tampon ou simplement tampon, *buffer* en anglais). Les " +"objets natifs :class:`bytes` et :class:`bytearray` en sont des exemples, " +"ainsi que quelques types d'extension comme :class:`array.array`. Les " +"bibliothèques tierces peuvent définir leurs propres types à des fins " +"spéciales, telles que le traitement d'image ou l'analyse numérique." + +#: c-api/buffer.rst:24 +msgid "" +"While each of these types have their own semantics, they share the common " +"characteristic of being backed by a possibly large memory buffer. It is " +"then desirable, in some situations, to access that buffer directly and " +"without intermediate copying." +msgstr "" +"Alors que chacun de ces types a sa propre sémantique, ils partagent la " +"caractéristique commune d'être soutenus par un tampon de mémoire important. " +"Il est donc souhaitable, dans certains cas, d'accéder à cette mémoire " +"directement sans l'étape intermédiaire de copie." + +#: c-api/buffer.rst:29 +msgid "" +"Python provides such a facility at the C level in the form of the :ref:" +"`buffer protocol `. This protocol has two sides:" +msgstr "" +"Python fournit une telle facilité au niveau du C sous la forme de :ref:" +"`protocole tampon `. Ce protocole comporte deux aspects :" + +#: c-api/buffer.rst:34 +msgid "" +"on the producer side, a type can export a \"buffer interface\" which allows " +"objects of that type to expose information about their underlying buffer. " +"This interface is described in the section :ref:`buffer-structs`;" +msgstr "" +"du côté producteur, un type peut exporter une \"interface tampon\" qui " +"permet aux objets de ce type d'exposer des informations concernant leur " +"tampon sous-jacent. Cette interface est décrite dans la section :ref:`buffer-" +"structs` ;" + +#: c-api/buffer.rst:38 +msgid "" +"on the consumer side, several means are available to obtain a pointer to the " +"raw underlying data of an object (for example a method parameter)." +msgstr "" +"du côté consommateur, plusieurs moyens sont disponibles pour obtenir un " +"pointeur vers les données sous-jacentes brutes d'un objet (par exemple un " +"paramètre de méthode)." + +#: c-api/buffer.rst:41 +msgid "" +"Simple objects such as :class:`bytes` and :class:`bytearray` expose their " +"underlying buffer in byte-oriented form. Other forms are possible; for " +"example, the elements exposed by an :class:`array.array` can be multi-byte " +"values." +msgstr "" +"Des objets simples tels que :class:`bytes` et :class:`bytearray` exposent " +"leur tampon sous-jacent dans un format orienté octet. D'autres formes sont " +"possibles ; par exemple, les éléments exposés par un :class:`array.array` " +"peuvent être des valeurs multi-octets." + +#: c-api/buffer.rst:45 +msgid "" +"An example consumer of the buffer interface is the :meth:`~io.BufferedIOBase." +"write` method of file objects: any object that can export a series of bytes " +"through the buffer interface can be written to a file. While :meth:`write` " +"only needs read-only access to the internal contents of the object passed to " +"it, other methods such as :meth:`~io.BufferedIOBase.readinto` need write " +"access to the contents of their argument. The buffer interface allows " +"objects to selectively allow or reject exporting of read-write and read-only " +"buffers." +msgstr "" +"Un exemple de consommateur de l'interface tampon est la méthode :meth:`~io." +"BufferedIOBase.write` des objets fichiers : tout objet qui peut exporter une " +"série d'octets à travers l'interface tampon peut être écrit dans un fichier. " +"Alors que :meth:`write` n'a besoin que d'un accès lecture au contenu " +"interne de l'objet qui lui est passé, d'autres méthodes telles que :meth:" +"`~io.BufferedIOBase.readinto` nécessitent un accès écriture au contenu de " +"leur argument. L'interface *buffer* permet aux objets d'autoriser ou de " +"rejeter sélectivement l'exportation de tampons en mode lecture-écriture et " +"en mode lecture seule." + +#: c-api/buffer.rst:53 +msgid "" +"There are two ways for a consumer of the buffer interface to acquire a " +"buffer over a target object:" +msgstr "" +"Un consommateur de l'interface tampon peut acquérir un tampon sur un objet " +"cible de deux manières :" + +#: c-api/buffer.rst:56 +msgid "call :c:func:`PyObject_GetBuffer` with the right parameters;" +msgstr "appelez :c:func:`PyObject_GetBuffer` avec les paramètres appropriés ;" + +#: c-api/buffer.rst:58 +msgid "" +"call :c:func:`PyArg_ParseTuple` (or one of its siblings) with one of the " +"``y*``, ``w*`` or ``s*`` :ref:`format codes `." +msgstr "" +"appelez :c:func:`PyArg_ParseTuple` (ou l'un de ses fonctions sœurs) avec " +"l'un des ``y*``, ``w*`` ou ``s*`` :ref:`format codes `." + +#: c-api/buffer.rst:61 +msgid "" +"In both cases, :c:func:`PyBuffer_Release` must be called when the buffer " +"isn't needed anymore. Failure to do so could lead to various issues such as " +"resource leaks." +msgstr "" +"Dans les deux cas, :c:func:`PyBuffer_Release` doit être appelée quand le " +"tampon n'est plus nécessaire. Ne pas le faire peut conduire à divers " +"problèmes tels que des fuites de ressources." + +#: c-api/buffer.rst:69 +msgid "Buffer structure" +msgstr "La structure *buffer*" + +#: c-api/buffer.rst:71 +msgid "" +"Buffer structures (or simply \"buffers\") are useful as a way to expose the " +"binary data from another object to the Python programmer. They can also be " +"used as a zero-copy slicing mechanism. Using their ability to reference a " +"block of memory, it is possible to expose any data to the Python programmer " +"quite easily. The memory could be a large, constant array in a C extension, " +"it could be a raw block of memory for manipulation before passing to an " +"operating system library, or it could be used to pass around structured data " +"in its native, in-memory format." +msgstr "" +"Les structures tampons (ou simplement les \"tampons\", *buffers* en anglais) " +"sont utiles pour exposer les données binaires d'un autre objet au " +"programmeur Python. Elles peuvent également être utilisées comme un " +"mécanisme de découpage sans copie. En utilisant leur capacité à référencer " +"un bloc de mémoire, il est possible d'exposer toutes les données au " +"programmeur Python assez facilement. La mémoire peut être un grand tableau " +"constant dans une extension C, il peut s'agir d'un bloc brut de mémoire à " +"manipuler avant de passer à une bibliothèque de système d'exploitation ou " +"être utilisé pour transmettre des données structurées dans son format natif " +"en mémoire." + +#: c-api/buffer.rst:80 +msgid "" +"Contrary to most data types exposed by the Python interpreter, buffers are " +"not :c:type:`PyObject` pointers but rather simple C structures. This allows " +"them to be created and copied very simply. When a generic wrapper around a " +"buffer is needed, a :ref:`memoryview ` object can be " +"created." +msgstr "" +"Contrairement à la plupart des types de données exposés par l'interpréteur " +"Python, les tampons ne sont pas de simples pointeurs vers :c:type:`PyObject` " +"mais plutôt des structures C simples. Cela leur permet d'être créés et " +"copiés très simplement. lorsque vous avez besoin d'une enveloppe générique " +"(*wrapper* en anglais) pour un tampon, un objet :ref:`memoryview ` peut être créé." + +#: c-api/buffer.rst:86 +msgid "" +"For short instructions how to write an exporting object, see :ref:`Buffer " +"Object Structures `. For obtaining a buffer, see :c:func:" +"`PyObject_GetBuffer`." +msgstr "" + +#: c-api/buffer.rst:94 +msgid "" +"A pointer to the start of the logical structure described by the buffer " +"fields. This can be any location within the underlying physical memory block " +"of the exporter. For example, with negative :c:member:`~Py_buffer.strides` " +"the value may point to the end of the memory block." +msgstr "" + +#: c-api/buffer.rst:99 +msgid "" +"For :term:`contiguous` arrays, the value points to the beginning of the " +"memory block." +msgstr "" + +#: c-api/buffer.rst:104 +msgid "" +"A new reference to the exporting object. The reference is owned by the " +"consumer and automatically decremented and set to ``NULL`` by :c:func:" +"`PyBuffer_Release`. The field is the equivalent of the return value of any " +"standard C-API function." +msgstr "" + +#: c-api/buffer.rst:109 +msgid "" +"As a special case, for *temporary* buffers that are wrapped by :c:func:" +"`PyMemoryView_FromBuffer` or :c:func:`PyBuffer_FillInfo` this field is " +"``NULL``. In general, exporting objects MUST NOT use this scheme." +msgstr "" + +#: c-api/buffer.rst:116 +msgid "" +"``product(shape) * itemsize``. For contiguous arrays, this is the length of " +"the underlying memory block. For non-contiguous arrays, it is the length " +"that the logical structure would have if it were copied to a contiguous " +"representation." +msgstr "" + +#: c-api/buffer.rst:121 +msgid "" +"Accessing ``((char *)buf)[0] up to ((char *)buf)[len-1]`` is only valid if " +"the buffer has been obtained by a request that guarantees contiguity. In " +"most cases such a request will be :c:macro:`PyBUF_SIMPLE` or :c:macro:" +"`PyBUF_WRITABLE`." +msgstr "" + +#: c-api/buffer.rst:127 +msgid "" +"An indicator of whether the buffer is read-only. This field is controlled by " +"the :c:macro:`PyBUF_WRITABLE` flag." +msgstr "" + +#: c-api/buffer.rst:132 +msgid "" +"Item size in bytes of a single element. Same as the value of :func:`struct." +"calcsize` called on non-``NULL`` :c:member:`~Py_buffer.format` values." +msgstr "" + +#: c-api/buffer.rst:135 +msgid "" +"Important exception: If a consumer requests a buffer without the :c:macro:" +"`PyBUF_FORMAT` flag, :c:member:`~Py_buffer.format` will be set to " +"``NULL``, but :c:member:`~Py_buffer.itemsize` still has the value for the " +"original format." +msgstr "" + +#: c-api/buffer.rst:140 +msgid "" +"If :c:member:`~Py_buffer.shape` is present, the equality ``product(shape) * " +"itemsize == len`` still holds and the consumer can use :c:member:`~Py_buffer." +"itemsize` to navigate the buffer." +msgstr "" + +#: c-api/buffer.rst:144 +msgid "" +"If :c:member:`~Py_buffer.shape` is ``NULL`` as a result of a :c:macro:" +"`PyBUF_SIMPLE` or a :c:macro:`PyBUF_WRITABLE` request, the consumer must " +"disregard :c:member:`~Py_buffer.itemsize` and assume ``itemsize == 1``." +msgstr "" + +#: c-api/buffer.rst:150 +msgid "" +"A *NUL* terminated string in :mod:`struct` module style syntax describing " +"the contents of a single item. If this is ``NULL``, ``\"B\"`` (unsigned " +"bytes) is assumed." +msgstr "" + +#: c-api/buffer.rst:154 +msgid "This field is controlled by the :c:macro:`PyBUF_FORMAT` flag." +msgstr "" + +#: c-api/buffer.rst:158 +msgid "" +"The number of dimensions the memory represents as an n-dimensional array. If " +"it is ``0``, :c:member:`~Py_buffer.buf` points to a single item representing " +"a scalar. In this case, :c:member:`~Py_buffer.shape`, :c:member:`~Py_buffer." +"strides` and :c:member:`~Py_buffer.suboffsets` MUST be ``NULL``." +msgstr "" + +#: c-api/buffer.rst:163 +msgid "" +"The macro :c:macro:`PyBUF_MAX_NDIM` limits the maximum number of dimensions " +"to 64. Exporters MUST respect this limit, consumers of multi-dimensional " +"buffers SHOULD be able to handle up to :c:macro:`PyBUF_MAX_NDIM` dimensions." +msgstr "" + +#: c-api/buffer.rst:169 +msgid "" +"An array of :c:type:`Py_ssize_t` of length :c:member:`~Py_buffer.ndim` " +"indicating the shape of the memory as an n-dimensional array. Note that " +"``shape[0] * ... * shape[ndim-1] * itemsize`` MUST be equal to :c:member:" +"`~Py_buffer.len`." +msgstr "" + +#: c-api/buffer.rst:174 +msgid "" +"Shape values are restricted to ``shape[n] >= 0``. The case ``shape[n] == 0`` " +"requires special attention. See `complex arrays`_ for further information." +msgstr "" + +#: c-api/buffer.rst:178 +msgid "The shape array is read-only for the consumer." +msgstr "" + +#: c-api/buffer.rst:182 +msgid "" +"An array of :c:type:`Py_ssize_t` of length :c:member:`~Py_buffer.ndim` " +"giving the number of bytes to skip to get to a new element in each dimension." +msgstr "" + +#: c-api/buffer.rst:186 +msgid "" +"Stride values can be any integer. For regular arrays, strides are usually " +"positive, but a consumer MUST be able to handle the case ``strides[n] <= " +"0``. See `complex arrays`_ for further information." +msgstr "" + +#: c-api/buffer.rst:190 +msgid "The strides array is read-only for the consumer." +msgstr "" + +#: c-api/buffer.rst:194 +msgid "" +"An array of :c:type:`Py_ssize_t` of length :c:member:`~Py_buffer.ndim`. If " +"``suboffsets[n] >= 0``, the values stored along the nth dimension are " +"pointers and the suboffset value dictates how many bytes to add to each " +"pointer after de-referencing. A suboffset value that is negative indicates " +"that no de-referencing should occur (striding in a contiguous memory block)." +msgstr "" + +#: c-api/buffer.rst:201 +msgid "" +"If all suboffsets are negative (i.e. no de-referencing is needed), then this " +"field must be ``NULL`` (the default value)." +msgstr "" + +#: c-api/buffer.rst:204 +msgid "" +"This type of array representation is used by the Python Imaging Library " +"(PIL). See `complex arrays`_ for further information how to access elements " +"of such an array." +msgstr "" + +#: c-api/buffer.rst:208 +msgid "The suboffsets array is read-only for the consumer." +msgstr "" + +#: c-api/buffer.rst:212 +msgid "" +"This is for use internally by the exporting object. For example, this might " +"be re-cast as an integer by the exporter and used to store flags about " +"whether or not the shape, strides, and suboffsets arrays must be freed when " +"the buffer is released. The consumer MUST NOT alter this value." +msgstr "" + +#: c-api/buffer.rst:221 +msgid "Buffer request types" +msgstr "" + +#: c-api/buffer.rst:223 +msgid "" +"Buffers are usually obtained by sending a buffer request to an exporting " +"object via :c:func:`PyObject_GetBuffer`. Since the complexity of the logical " +"structure of the memory can vary drastically, the consumer uses the *flags* " +"argument to specify the exact buffer type it can handle." +msgstr "" + +#: c-api/buffer.rst:228 +msgid "" +"All :c:data:`Py_buffer` fields are unambiguously defined by the request type." +msgstr "" + +#: c-api/buffer.rst:232 +msgid "request-independent fields" +msgstr "" + +#: c-api/buffer.rst:233 +msgid "" +"The following fields are not influenced by *flags* and must always be filled " +"in with the correct values: :c:member:`~Py_buffer.obj`, :c:member:" +"`~Py_buffer.buf`, :c:member:`~Py_buffer.len`, :c:member:`~Py_buffer." +"itemsize`, :c:member:`~Py_buffer.ndim`." +msgstr "" + +#: c-api/buffer.rst:239 +msgid "readonly, format" +msgstr "" + +#: c-api/buffer.rst:243 +msgid "" +"Controls the :c:member:`~Py_buffer.readonly` field. If set, the exporter " +"MUST provide a writable buffer or else report failure. Otherwise, the " +"exporter MAY provide either a read-only or writable buffer, but the choice " +"MUST be consistent for all consumers." +msgstr "" + +#: c-api/buffer.rst:250 +msgid "" +"Controls the :c:member:`~Py_buffer.format` field. If set, this field MUST be " +"filled in correctly. Otherwise, this field MUST be ``NULL``." +msgstr "" + +#: c-api/buffer.rst:254 +msgid "" +":c:macro:`PyBUF_WRITABLE` can be \\|'d to any of the flags in the next " +"section. Since :c:macro:`PyBUF_SIMPLE` is defined as 0, :c:macro:" +"`PyBUF_WRITABLE` can be used as a stand-alone flag to request a simple " +"writable buffer." +msgstr "" + +#: c-api/buffer.rst:258 +msgid "" +":c:macro:`PyBUF_FORMAT` can be \\|'d to any of the flags except :c:macro:" +"`PyBUF_SIMPLE`. The latter already implies format ``B`` (unsigned bytes)." +msgstr "" + +#: c-api/buffer.rst:263 +msgid "shape, strides, suboffsets" +msgstr "" + +#: c-api/buffer.rst:265 +msgid "" +"The flags that control the logical structure of the memory are listed in " +"decreasing order of complexity. Note that each flag contains all bits of the " +"flags below it." +msgstr "" + +#: c-api/buffer.rst:296 c-api/buffer.rst:321 +msgid "Request" +msgstr "" + +#: c-api/buffer.rst:296 c-api/buffer.rst:321 +msgid "shape" +msgstr "" + +#: c-api/buffer.rst:296 c-api/buffer.rst:321 +msgid "strides" +msgstr "" + +#: c-api/buffer.rst:296 c-api/buffer.rst:321 +msgid "suboffsets" +msgstr "" + +#: c-api/buffer.rst:276 c-api/buffer.rst:298 c-api/buffer.rst:302 +#: c-api/buffer.rst:323 c-api/buffer.rst:327 c-api/buffer.rst:331 +#: c-api/buffer.rst:335 c-api/buffer.rst:337 +msgid "yes" +msgstr "oui" + +#: c-api/buffer.rst:323 c-api/buffer.rst:325 +msgid "if needed" +msgstr "si nécessaire" + +#: c-api/buffer.rst:278 c-api/buffer.rst:298 c-api/buffer.rst:302 +#: c-api/buffer.rst:327 c-api/buffer.rst:331 c-api/buffer.rst:335 +#: c-api/buffer.rst:337 +msgid "NULL" +msgstr "" + +#: c-api/buffer.rst:287 +msgid "contiguity requests" +msgstr "" + +#: c-api/buffer.rst:289 +msgid "" +"C or Fortran :term:`contiguity ` can be explicitly requested, " +"with and without stride information. Without stride information, the buffer " +"must be C-contiguous." +msgstr "" + +#: c-api/buffer.rst:321 +msgid "contig" +msgstr "" + +#: c-api/buffer.rst:304 c-api/buffer.rst:337 +msgid "C" +msgstr "" + +#: c-api/buffer.rst:300 +msgid "F" +msgstr "F" + +#: c-api/buffer.rst:302 +msgid "C or F" +msgstr "" + +#: c-api/buffer.rst:304 +msgid ":c:macro:`PyBUF_ND`" +msgstr "" + +#: c-api/buffer.rst:309 +msgid "compound requests" +msgstr "" + +#: c-api/buffer.rst:311 +msgid "" +"All possible requests are fully defined by some combination of the flags in " +"the previous section. For convenience, the buffer protocol provides " +"frequently used combinations as single flags." +msgstr "" + +#: c-api/buffer.rst:315 +msgid "" +"In the following table *U* stands for undefined contiguity. The consumer " +"would have to call :c:func:`PyBuffer_IsContiguous` to determine contiguity." +msgstr "" + +#: c-api/buffer.rst:321 +msgid "readonly" +msgstr "lecture seule" + +#: c-api/buffer.rst:321 +msgid "format" +msgstr "format" + +#: c-api/buffer.rst:325 c-api/buffer.rst:329 c-api/buffer.rst:333 +msgid "U" +msgstr "" + +#: c-api/buffer.rst:327 c-api/buffer.rst:335 +msgid "0" +msgstr "0" + +#: c-api/buffer.rst:329 c-api/buffer.rst:337 +msgid "1 or 0" +msgstr "0 ou 1" + +#: c-api/buffer.rst:342 +msgid "Complex arrays" +msgstr "" + +#: c-api/buffer.rst:345 +msgid "NumPy-style: shape and strides" +msgstr "" + +#: c-api/buffer.rst:347 +msgid "" +"The logical structure of NumPy-style arrays is defined by :c:member:" +"`~Py_buffer.itemsize`, :c:member:`~Py_buffer.ndim`, :c:member:`~Py_buffer." +"shape` and :c:member:`~Py_buffer.strides`." +msgstr "" + +#: c-api/buffer.rst:350 +msgid "" +"If ``ndim == 0``, the memory location pointed to by :c:member:`~Py_buffer." +"buf` is interpreted as a scalar of size :c:member:`~Py_buffer.itemsize`. In " +"that case, both :c:member:`~Py_buffer.shape` and :c:member:`~Py_buffer." +"strides` are ``NULL``." +msgstr "" + +#: c-api/buffer.rst:354 +msgid "" +"If :c:member:`~Py_buffer.strides` is ``NULL``, the array is interpreted as a " +"standard n-dimensional C-array. Otherwise, the consumer must access an n-" +"dimensional array as follows:" +msgstr "" + +#: c-api/buffer.rst:364 +msgid "" +"As noted above, :c:member:`~Py_buffer.buf` can point to any location within " +"the actual memory block. An exporter can check the validity of a buffer with " +"this function:" +msgstr "" + +#: c-api/buffer.rst:398 +msgid "PIL-style: shape, strides and suboffsets" +msgstr "" + +#: c-api/buffer.rst:400 +msgid "" +"In addition to the regular items, PIL-style arrays can contain pointers that " +"must be followed in order to get to the next element in a dimension. For " +"example, the regular three-dimensional C-array ``char v[2][2][3]`` can also " +"be viewed as an array of 2 pointers to 2 two-dimensional arrays: ``char " +"(*v[2])[2][3]``. In suboffsets representation, those two pointers can be " +"embedded at the start of :c:member:`~Py_buffer.buf`, pointing to two ``char " +"x[2][3]`` arrays that can be located anywhere in memory." +msgstr "" + +#: c-api/buffer.rst:409 +msgid "" +"Here is a function that returns a pointer to the element in an N-D array " +"pointed to by an N-dimensional index when there are both non-``NULL`` " +"strides and suboffsets::" +msgstr "" + +#: c-api/buffer.rst:428 +msgid "Buffer-related functions" +msgstr "Fonctions relatives aux tampons" + +#: c-api/buffer.rst:432 +msgid "" +"Return ``1`` if *obj* supports the buffer interface otherwise ``0``. When " +"``1`` is returned, it doesn't guarantee that :c:func:`PyObject_GetBuffer` " +"will succeed. This function always succeeds." +msgstr "" + +#: c-api/buffer.rst:439 +msgid "" +"Send a request to *exporter* to fill in *view* as specified by *flags*. If " +"the exporter cannot provide a buffer of the exact type, it MUST raise :c:" +"data:`PyExc_BufferError`, set ``view->obj`` to ``NULL`` and return ``-1``." +msgstr "" + +#: c-api/buffer.rst:444 +msgid "" +"On success, fill in *view*, set ``view->obj`` to a new reference to " +"*exporter* and return 0. In the case of chained buffer providers that " +"redirect requests to a single object, ``view->obj`` MAY refer to this object " +"instead of *exporter* (See :ref:`Buffer Object Structures `)." +msgstr "" + +#: c-api/buffer.rst:449 +msgid "" +"Successful calls to :c:func:`PyObject_GetBuffer` must be paired with calls " +"to :c:func:`PyBuffer_Release`, similar to :c:func:`malloc` and :c:func:" +"`free`. Thus, after the consumer is done with the buffer, :c:func:" +"`PyBuffer_Release` must be called exactly once." +msgstr "" + +#: c-api/buffer.rst:457 +msgid "" +"Release the buffer *view* and decrement the reference count for ``view-" +">obj``. This function MUST be called when the buffer is no longer being " +"used, otherwise reference leaks may occur." +msgstr "" + +#: c-api/buffer.rst:461 +msgid "" +"It is an error to call this function on a buffer that was not obtained via :" +"c:func:`PyObject_GetBuffer`." +msgstr "" + +#: c-api/buffer.rst:467 +msgid "" +"Return the implied :c:data:`~Py_buffer.itemsize` from :c:data:`~Py_buffer." +"format`. On error, raise an exception and return -1." +msgstr "" +"Retourne l'\\ :c:data:`~Py_buffer.itemsize` du :c:data:`~Py_buffer.format`. " +"En cas d'erreur, lève une exception et retourne -1." + +#: c-api/buffer.rst:475 +msgid "" +"Return ``1`` if the memory defined by the *view* is C-style (*order* is " +"``'C'``) or Fortran-style (*order* is ``'F'``) :term:`contiguous` or either " +"one (*order* is ``'A'``). Return ``0`` otherwise. This function always " +"succeeds." +msgstr "" + +#: c-api/buffer.rst:482 +msgid "" +"Get the memory area pointed to by the *indices* inside the given *view*. " +"*indices* must point to an array of ``view->ndim`` indices." +msgstr "" + +#: c-api/buffer.rst:488 +msgid "" +"Copy contiguous *len* bytes from *buf* to *view*. *fort* can be ``'C'`` or " +"``'F'`` (for C-style or Fortran-style ordering). ``0`` is returned on " +"success, ``-1`` on error." +msgstr "" + +#: c-api/buffer.rst:495 +msgid "" +"Copy *len* bytes from *src* to its contiguous representation in *buf*. " +"*order* can be ``'C'`` or ``'F'`` or ``'A'`` (for C-style or Fortran-style " +"ordering or either one). ``0`` is returned on success, ``-1`` on error." +msgstr "" + +#: c-api/buffer.rst:499 +msgid "This function fails if *len* != *src->len*." +msgstr "" + +#: c-api/buffer.rst:504 +msgid "" +"Fill the *strides* array with byte-strides of a :term:`contiguous` (C-style " +"if *order* is ``'C'`` or Fortran-style if *order* is ``'F'``) array of the " +"given shape with the given number of bytes per element." +msgstr "" + +#: c-api/buffer.rst:511 +msgid "" +"Handle buffer requests for an exporter that wants to expose *buf* of size " +"*len* with writability set according to *readonly*. *buf* is interpreted as " +"a sequence of unsigned bytes." +msgstr "" + +#: c-api/buffer.rst:515 +msgid "" +"The *flags* argument indicates the request type. This function always fills " +"in *view* as specified by flags, unless *buf* has been designated as read-" +"only and :c:macro:`PyBUF_WRITABLE` is set in *flags*." +msgstr "" + +#: c-api/buffer.rst:519 +msgid "" +"On success, set ``view->obj`` to a new reference to *exporter* and return 0. " +"Otherwise, raise :c:data:`PyExc_BufferError`, set ``view->obj`` to ``NULL`` " +"and return ``-1``;" +msgstr "" + +#: c-api/buffer.rst:523 +msgid "" +"If this function is used as part of a :ref:`getbufferproc `, " +"*exporter* MUST be set to the exporting object and *flags* must be passed " +"unmodified. Otherwise, *exporter* MUST be ``NULL``." +msgstr "" diff --git a/c-api/bytearray.po b/c-api/bytearray.po new file mode 100644 index 0000000000..1d82668d06 --- /dev/null +++ b/c-api/bytearray.po @@ -0,0 +1,118 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-04-05 10:05+0200\n" +"PO-Revision-Date: 2021-05-05 14:32+0200\n" +"Last-Translator: Mindiell \n" +"Language-Team: FRENCH \n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 2.2.1\n" + +#: c-api/bytearray.rst:6 +msgid "Byte Array Objects" +msgstr "Objets tableau d'octets" + +#: c-api/bytearray.rst:13 +msgid "" +"This subtype of :c:type:`PyObject` represents a Python bytearray object." +msgstr "" +"Ce sous-type de :c:type:`PyObject` représente un objet ``bytearray`` Python." + +#: c-api/bytearray.rst:18 +msgid "" +"This instance of :c:type:`PyTypeObject` represents the Python bytearray " +"type; it is the same object as :class:`bytearray` in the Python layer." +msgstr "" +"Cette instance de :c:type:`PyTypeObject` représente le type Python " +"*bytearray*, c'est le même que :class:`bytearray` côté Python." + +#: c-api/bytearray.rst:23 +msgid "Type check macros" +msgstr "Macros de vérification de type" + +#: c-api/bytearray.rst:27 +msgid "" +"Return true if the object *o* is a bytearray object or an instance of a " +"subtype of the bytearray type. This function always succeeds." +msgstr "" +"Renvoie vrai si l'objet *o* est un ``bytearray`` ou une instance d'un sous-" +"type du type ``bytearray``. Cette méthode réussit toujours." + +#: c-api/bytearray.rst:33 +msgid "" +"Return true if the object *o* is a bytearray object, but not an instance of " +"a subtype of the bytearray type. This function always succeeds." +msgstr "" +"Renvoie vrai si l'objet *o* est un ``bytearray``, mais pas une instance d'un " +"sous-type du type ``bytearray``. Cette méthode réussit toujours." + +#: c-api/bytearray.rst:38 +msgid "Direct API functions" +msgstr "Fonctions directes sur l'API" + +#: c-api/bytearray.rst:42 +msgid "" +"Return a new bytearray object from any object, *o*, that implements the :ref:" +"`buffer protocol `." +msgstr "" +"Renvoie un nouvel objet *bytearray* depuis n'importe quel objet, *o*, qui " +"implémente le :ref:`protocole buffer `." + +#: c-api/bytearray.rst:48 +msgid "" +"Create a new bytearray object from *string* and its length, *len*. On " +"failure, ``NULL`` is returned." +msgstr "" +"Crée un nouvel objet ``bytearray`` à partir d'un objet *string* et de sa " +"longueur, *len*. En cas d'échec, ``NULL`` est renvoyé." + +#: c-api/bytearray.rst:54 +msgid "" +"Concat bytearrays *a* and *b* and return a new bytearray with the result." +msgstr "" +"Concatène les ``bytearrays`` *a* et *b* et renvoie un nouveau ``bytearray`` " +"avec le résultat." + +#: c-api/bytearray.rst:59 +msgid "Return the size of *bytearray* after checking for a ``NULL`` pointer." +msgstr "" +"Renvoie la taille de *bytearray* après vérification de la présence d'un " +"pointeur ``NULL``." + +#: c-api/bytearray.rst:64 +msgid "" +"Return the contents of *bytearray* as a char array after checking for a " +"``NULL`` pointer. The returned array always has an extra null byte appended." +msgstr "" +"Renvoie le contenu de *bytearray* sous forme d'un tableau de caractères, en " +"vérifiant que ce n'est pas un pointeur ``NULL``. Le tableau renvoyé a " +"toujours un caractère *null* rajouté." + +#: c-api/bytearray.rst:71 +msgid "Resize the internal buffer of *bytearray* to *len*." +msgstr "Redimensionne le tampon interne de *bytearray* à la taille *len*." + +#: c-api/bytearray.rst:74 +msgid "Macros" +msgstr "Macros" + +#: c-api/bytearray.rst:76 +msgid "These macros trade safety for speed and they don't check pointers." +msgstr "" +"Ces macros sont taillées pour la vitesse d'exécution et ne vérifient pas les " +"pointeurs." + +#: c-api/bytearray.rst:80 +msgid "Macro version of :c:func:`PyByteArray_AsString`." +msgstr "Version macro de :c:func:`PyByteArray_AsString`." + +#: c-api/bytearray.rst:85 +msgid "Macro version of :c:func:`PyByteArray_Size`." +msgstr "Version macro de :c:func:`PyByteArray_Size`." diff --git a/c-api/bytes.po b/c-api/bytes.po new file mode 100644 index 0000000000..deca3ebd31 --- /dev/null +++ b/c-api/bytes.po @@ -0,0 +1,336 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-05-21 16:37+0200\n" +"PO-Revision-Date: 2018-07-03 11:50+0200\n" +"Last-Translator: FULL NAME \n" +"Language-Team: FRENCH \n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: c-api/bytes.rst:6 +msgid "Bytes Objects" +msgstr "Objets *bytes*" + +#: c-api/bytes.rst:8 +msgid "" +"These functions raise :exc:`TypeError` when expecting a bytes parameter and " +"called with a non-bytes parameter." +msgstr "" + +#: c-api/bytes.rst:16 +#, fuzzy +msgid "This subtype of :c:type:`PyObject` represents a Python bytes object." +msgstr "" +"Ce sous-type de :c:type:`PyObject` représente un objet ``bytearray`` Python." + +#: c-api/bytes.rst:21 +#, fuzzy +msgid "" +"This instance of :c:type:`PyTypeObject` represents the Python bytes type; it " +"is the same object as :class:`bytes` in the Python layer." +msgstr "" +"Cette instance de :c:type:`PyTypeObject` représente le type Python " +"*bytearray*, c'est le même que :class:`bytearray` côté Python." + +#: c-api/bytes.rst:27 +#, fuzzy +msgid "" +"Return true if the object *o* is a bytes object or an instance of a subtype " +"of the bytes type. This function always succeeds." +msgstr "" +"Renvoie vrai si l'objet *o* est un ``bytearray`` ou une instance d'un sous-" +"type du type ``bytearray``." + +#: c-api/bytes.rst:33 +#, fuzzy +msgid "" +"Return true if the object *o* is a bytes object, but not an instance of a " +"subtype of the bytes type. This function always succeeds." +msgstr "" +"Renvoie vrai si l'objet *o* est un ``bytearray``, mais pas une instance d'un " +"sous-type du type ``bytearray``." + +#: c-api/bytes.rst:39 +msgid "" +"Return a new bytes object with a copy of the string *v* as value on success, " +"and ``NULL`` on failure. The parameter *v* must not be ``NULL``; it will " +"not be checked." +msgstr "" + +#: c-api/bytes.rst:46 +msgid "" +"Return a new bytes object with a copy of the string *v* as value and length " +"*len* on success, and ``NULL`` on failure. If *v* is ``NULL``, the contents " +"of the bytes object are uninitialized." +msgstr "" + +#: c-api/bytes.rst:53 +msgid "" +"Take a C :c:func:`printf`\\ -style *format* string and a variable number of " +"arguments, calculate the size of the resulting Python bytes object and " +"return a bytes object with the values formatted into it. The variable " +"arguments must be C types and must correspond exactly to the format " +"characters in the *format* string. The following format characters are " +"allowed:" +msgstr "" + +#: c-api/bytes.rst:68 +msgid "Format Characters" +msgstr "Caractères de format" + +#: c-api/bytes.rst:68 +msgid "Type" +msgstr "Type" + +#: c-api/bytes.rst:68 +#, fuzzy +msgid "Comment" +msgstr "Commentaires" + +#: c-api/bytes.rst:70 +msgid ":attr:`%%`" +msgstr ":attr:`%%`" + +#: c-api/bytes.rst:70 +msgid "*n/a*" +msgstr "" + +#: c-api/bytes.rst:70 +msgid "The literal % character." +msgstr "" + +#: c-api/bytes.rst:72 +msgid ":attr:`%c`" +msgstr ":attr:`%c`" + +#: c-api/bytes.rst:75 c-api/bytes.rst:96 +msgid "int" +msgstr "*int*" + +#: c-api/bytes.rst:72 +msgid "A single byte, represented as a C int." +msgstr "" + +#: c-api/bytes.rst:75 +msgid ":attr:`%d`" +msgstr ":attr:`%d`" + +#: c-api/bytes.rst:75 +msgid "Equivalent to ``printf(\"%d\")``. [1]_" +msgstr "" + +#: c-api/bytes.rst:78 +msgid ":attr:`%u`" +msgstr ":attr:`%u`" + +#: c-api/bytes.rst:78 +msgid "unsigned int" +msgstr "``unsigned int``" + +#: c-api/bytes.rst:78 +msgid "Equivalent to ``printf(\"%u\")``. [1]_" +msgstr "" + +#: c-api/bytes.rst:81 +msgid ":attr:`%ld`" +msgstr ":attr:`%ld`" + +#: c-api/bytes.rst:81 +msgid "long" +msgstr "" + +#: c-api/bytes.rst:81 +msgid "Equivalent to ``printf(\"%ld\")``. [1]_" +msgstr "" + +#: c-api/bytes.rst:84 +msgid ":attr:`%lu`" +msgstr ":attr:`%lu`" + +#: c-api/bytes.rst:84 +msgid "unsigned long" +msgstr "``unsigned long``" + +#: c-api/bytes.rst:84 +msgid "Equivalent to ``printf(\"%lu\")``. [1]_" +msgstr "" + +#: c-api/bytes.rst:87 +msgid ":attr:`%zd`" +msgstr ":attr:`%zd`" + +#: c-api/bytes.rst:87 +msgid ":c:type:`\\ Py_ssize_t`" +msgstr "" + +#: c-api/bytes.rst:87 +msgid "Equivalent to ``printf(\"%zd\")``. [1]_" +msgstr "" + +#: c-api/bytes.rst:90 +msgid ":attr:`%zu`" +msgstr ":attr:`%zu`" + +#: c-api/bytes.rst:90 +msgid "size_t" +msgstr "" + +#: c-api/bytes.rst:90 +msgid "Equivalent to ``printf(\"%zu\")``. [1]_" +msgstr "" + +#: c-api/bytes.rst:93 +msgid ":attr:`%i`" +msgstr ":attr:`%i`" + +#: c-api/bytes.rst:93 +msgid "Equivalent to ``printf(\"%i\")``. [1]_" +msgstr "" + +#: c-api/bytes.rst:96 +msgid ":attr:`%x`" +msgstr ":attr:`%x`" + +#: c-api/bytes.rst:96 +msgid "Equivalent to ``printf(\"%x\")``. [1]_" +msgstr "" + +#: c-api/bytes.rst:99 +msgid ":attr:`%s`" +msgstr ":attr:`%s`" + +#: c-api/bytes.rst:99 +msgid "const char\\*" +msgstr "" + +#: c-api/bytes.rst:99 +msgid "A null-terminated C character array." +msgstr "" + +#: c-api/bytes.rst:102 +msgid ":attr:`%p`" +msgstr ":attr:`%p`" + +#: c-api/bytes.rst:102 +msgid "const void\\*" +msgstr "" + +#: c-api/bytes.rst:102 +msgid "" +"The hex representation of a C pointer. Mostly equivalent to " +"``printf(\"%p\")`` except that it is guaranteed to start with the literal " +"``0x`` regardless of what the platform's ``printf`` yields." +msgstr "" + +#: c-api/bytes.rst:111 +msgid "" +"An unrecognized format character causes all the rest of the format string to " +"be copied as-is to the result object, and any extra arguments discarded." +msgstr "" + +#: c-api/bytes.rst:114 +msgid "" +"For integer specifiers (d, u, ld, lu, zd, zu, i, x): the 0-conversion flag " +"has effect even when a precision is given." +msgstr "" + +#: c-api/bytes.rst:120 +msgid "" +"Identical to :c:func:`PyBytes_FromFormat` except that it takes exactly two " +"arguments." +msgstr "" + +#: c-api/bytes.rst:126 +msgid "" +"Return the bytes representation of object *o* that implements the buffer " +"protocol." +msgstr "" + +#: c-api/bytes.rst:132 +msgid "Return the length of the bytes in bytes object *o*." +msgstr "" + +#: c-api/bytes.rst:137 +msgid "Macro form of :c:func:`PyBytes_Size` but without error checking." +msgstr "" + +#: c-api/bytes.rst:142 +msgid "" +"Return a pointer to the contents of *o*. The pointer refers to the internal " +"buffer of *o*, which consists of ``len(o) + 1`` bytes. The last byte in the " +"buffer is always null, regardless of whether there are any other null " +"bytes. The data must not be modified in any way, unless the object was just " +"created using ``PyBytes_FromStringAndSize(NULL, size)``. It must not be " +"deallocated. If *o* is not a bytes object at all, :c:func:" +"`PyBytes_AsString` returns ``NULL`` and raises :exc:`TypeError`." +msgstr "" + +#: c-api/bytes.rst:154 +msgid "Macro form of :c:func:`PyBytes_AsString` but without error checking." +msgstr "" + +#: c-api/bytes.rst:159 +msgid "" +"Return the null-terminated contents of the object *obj* through the output " +"variables *buffer* and *length*." +msgstr "" + +#: c-api/bytes.rst:162 +msgid "" +"If *length* is ``NULL``, the bytes object may not contain embedded null " +"bytes; if it does, the function returns ``-1`` and a :exc:`ValueError` is " +"raised." +msgstr "" + +#: c-api/bytes.rst:166 +msgid "" +"The buffer refers to an internal buffer of *obj*, which includes an " +"additional null byte at the end (not counted in *length*). The data must " +"not be modified in any way, unless the object was just created using " +"``PyBytes_FromStringAndSize(NULL, size)``. It must not be deallocated. If " +"*obj* is not a bytes object at all, :c:func:`PyBytes_AsStringAndSize` " +"returns ``-1`` and raises :exc:`TypeError`." +msgstr "" + +#: c-api/bytes.rst:173 +msgid "" +"Previously, :exc:`TypeError` was raised when embedded null bytes were " +"encountered in the bytes object." +msgstr "" + +#: c-api/bytes.rst:180 +msgid "" +"Create a new bytes object in *\\*bytes* containing the contents of *newpart* " +"appended to *bytes*; the caller will own the new reference. The reference " +"to the old value of *bytes* will be stolen. If the new object cannot be " +"created, the old reference to *bytes* will still be discarded and the value " +"of *\\*bytes* will be set to ``NULL``; the appropriate exception will be set." +msgstr "" + +#: c-api/bytes.rst:189 +msgid "" +"Create a new bytes object in *\\*bytes* containing the contents of *newpart* " +"appended to *bytes*. This version decrements the reference count of " +"*newpart*." +msgstr "" + +#: c-api/bytes.rst:196 +msgid "" +"A way to resize a bytes object even though it is \"immutable\". Only use " +"this to build up a brand new bytes object; don't use this if the bytes may " +"already be known in other parts of the code. It is an error to call this " +"function if the refcount on the input bytes object is not one. Pass the " +"address of an existing bytes object as an lvalue (it may be written into), " +"and the new size desired. On success, *\\*bytes* holds the resized bytes " +"object and ``0`` is returned; the address in *\\*bytes* may differ from its " +"input value. If the reallocation fails, the original bytes object at " +"*\\*bytes* is deallocated, *\\*bytes* is set to ``NULL``, :exc:`MemoryError` " +"is set, and ``-1`` is returned." +msgstr "" diff --git a/c-api/call.po b/c-api/call.po new file mode 100644 index 0000000000..37f5609e90 --- /dev/null +++ b/c-api/call.po @@ -0,0 +1,555 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-18 15:46+0200\n" +"PO-Revision-Date: 2020-07-20 15:07+0200\n" +"Last-Translator: FULL NAME \n" +"Language-Team: FRENCH \n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: c-api/call.rst:6 +msgid "Call Protocol" +msgstr "" + +#: c-api/call.rst:8 +msgid "" +"CPython supports two different calling protocols: *tp_call* and vectorcall." +msgstr "" + +#: c-api/call.rst:12 +msgid "The *tp_call* Protocol" +msgstr "" + +#: c-api/call.rst:14 +msgid "" +"Instances of classes that set :c:member:`~PyTypeObject.tp_call` are " +"callable. The signature of the slot is::" +msgstr "" + +#: c-api/call.rst:19 +msgid "" +"A call is made using a tuple for the positional arguments and a dict for the " +"keyword arguments, similarly to ``callable(*args, **kwargs)`` in Python " +"code. *args* must be non-NULL (use an empty tuple if there are no arguments) " +"but *kwargs* may be *NULL* if there are no keyword arguments." +msgstr "" + +#: c-api/call.rst:25 +msgid "" +"This convention is not only used by *tp_call*: :c:member:`~PyTypeObject." +"tp_new` and :c:member:`~PyTypeObject.tp_init` also pass arguments this way." +msgstr "" + +#: c-api/call.rst:29 +msgid "" +"To call an object, use :c:func:`PyObject_Call` or another :ref:`call API " +"`." +msgstr "" + +#: c-api/call.rst:36 +msgid "The Vectorcall Protocol" +msgstr "" + +#: c-api/call.rst:40 +msgid "" +"The vectorcall protocol was introduced in :pep:`590` as an additional " +"protocol for making calls more efficient." +msgstr "" + +#: c-api/call.rst:43 +msgid "" +"As rule of thumb, CPython will prefer the vectorcall for internal calls if " +"the callable supports it. However, this is not a hard rule. Additionally, " +"some third-party extensions use *tp_call* directly (rather than using :c:" +"func:`PyObject_Call`). Therefore, a class supporting vectorcall must also " +"implement :c:member:`~PyTypeObject.tp_call`. Moreover, the callable must " +"behave the same regardless of which protocol is used. The recommended way to " +"achieve this is by setting :c:member:`~PyTypeObject.tp_call` to :c:func:" +"`PyVectorcall_Call`. This bears repeating:" +msgstr "" + +#: c-api/call.rst:57 +msgid "" +"A class supporting vectorcall **must** also implement :c:member:" +"`~PyTypeObject.tp_call` with the same semantics." +msgstr "" + +#: c-api/call.rst:60 +msgid "" +"A class should not implement vectorcall if that would be slower than " +"*tp_call*. For example, if the callee needs to convert the arguments to an " +"args tuple and kwargs dict anyway, then there is no point in implementing " +"vectorcall." +msgstr "" + +#: c-api/call.rst:65 +msgid "" +"Classes can implement the vectorcall protocol by enabling the :const:" +"`Py_TPFLAGS_HAVE_VECTORCALL` flag and setting :c:member:`~PyTypeObject." +"tp_vectorcall_offset` to the offset inside the object structure where a " +"*vectorcallfunc* appears. This is a pointer to a function with the following " +"signature:" +msgstr "" + +#: c-api/call.rst:73 +msgid "*callable* is the object being called." +msgstr "" + +#: c-api/call.rst:75 +msgid "" +"*args* is a C array consisting of the positional arguments followed by the" +msgstr "" + +#: c-api/call.rst:75 +msgid "" +"values of the keyword arguments. This can be *NULL* if there are no " +"arguments." +msgstr "" + +#: c-api/call.rst:79 +msgid "*nargsf* is the number of positional arguments plus possibly the" +msgstr "" + +#: c-api/call.rst:78 +msgid "" +":const:`PY_VECTORCALL_ARGUMENTS_OFFSET` flag. To get the actual number of " +"positional arguments from *nargsf*, use :c:func:`PyVectorcall_NARGS`." +msgstr "" + +#: c-api/call.rst:85 +msgid "*kwnames* is a tuple containing the names of the keyword arguments;" +msgstr "" + +#: c-api/call.rst:82 +msgid "" +"in other words, the keys of the kwargs dict. These names must be strings " +"(instances of ``str`` or a subclass) and they must be unique. If there are " +"no keyword arguments, then *kwnames* can instead be *NULL*." +msgstr "" + +#: c-api/call.rst:89 +msgid "" +"If this flag is set in a vectorcall *nargsf* argument, the callee is allowed " +"to temporarily change ``args[-1]``. In other words, *args* points to " +"argument 1 (not 0) in the allocated vector. The callee must restore the " +"value of ``args[-1]`` before returning." +msgstr "" + +#: c-api/call.rst:94 +msgid "" +"For :c:func:`PyObject_VectorcallMethod`, this flag means instead that " +"``args[0]`` may be changed." +msgstr "" + +#: c-api/call.rst:97 +msgid "" +"Whenever they can do so cheaply (without additional allocation), callers are " +"encouraged to use :const:`PY_VECTORCALL_ARGUMENTS_OFFSET`. Doing so will " +"allow callables such as bound methods to make their onward calls (which " +"include a prepended *self* argument) very efficiently." +msgstr "" + +#: c-api/call.rst:102 +msgid "" +"To call an object that implements vectorcall, use a :ref:`call API ` function as with any other callable. :c:func:`PyObject_Vectorcall` " +"will usually be most efficient." +msgstr "" + +#: c-api/call.rst:109 +msgid "" +"In CPython 3.8, the vectorcall API and related functions were available " +"provisionally under names with a leading underscore: " +"``_PyObject_Vectorcall``, ``_Py_TPFLAGS_HAVE_VECTORCALL``, " +"``_PyObject_VectorcallMethod``, ``_PyVectorcall_Function``, " +"``_PyObject_CallOneArg``, ``_PyObject_CallMethodNoArgs``, " +"``_PyObject_CallMethodOneArg``. Additionally, ``PyObject_VectorcallDict`` " +"was available as ``_PyObject_FastCallDict``. The old names are still defined " +"as aliases of the new, non-underscored names." +msgstr "" + +#: c-api/call.rst:121 +msgid "Recursion Control" +msgstr "Contrôle de la récursion" + +#: c-api/call.rst:123 +msgid "" +"When using *tp_call*, callees do not need to worry about :ref:`recursion " +"`: CPython uses :c:func:`Py_EnterRecursiveCall` and :c:func:" +"`Py_LeaveRecursiveCall` for calls made using *tp_call*." +msgstr "" + +#: c-api/call.rst:128 +msgid "" +"For efficiency, this is not the case for calls done using vectorcall: the " +"callee should use *Py_EnterRecursiveCall* and *Py_LeaveRecursiveCall* if " +"needed." +msgstr "" + +#: c-api/call.rst:134 +msgid "Vectorcall Support API" +msgstr "" + +#: c-api/call.rst:138 +msgid "" +"Given a vectorcall *nargsf* argument, return the actual number of arguments. " +"Currently equivalent to::" +msgstr "" + +#: c-api/call.rst:144 +msgid "" +"However, the function ``PyVectorcall_NARGS`` should be used to allow for " +"future extensions." +msgstr "" + +#: c-api/call.rst:151 +msgid "" +"If *op* does not support the vectorcall protocol (either because the type " +"does not or because the specific instance does not), return *NULL*. " +"Otherwise, return the vectorcall function pointer stored in *op*. This " +"function never raises an exception." +msgstr "" + +#: c-api/call.rst:156 +msgid "" +"This is mostly useful to check whether or not *op* supports vectorcall, " +"which can be done by checking ``PyVectorcall_Function(op) != NULL``." +msgstr "" + +#: c-api/call.rst:163 +msgid "" +"Call *callable*'s :c:type:`vectorcallfunc` with positional and keyword " +"arguments given in a tuple and dict, respectively." +msgstr "" + +#: c-api/call.rst:166 +msgid "" +"This is a specialized function, intended to be put in the :c:member:" +"`~PyTypeObject.tp_call` slot or be used in an implementation of ``tp_call``. " +"It does not check the :const:`Py_TPFLAGS_HAVE_VECTORCALL` flag and it does " +"not fall back to ``tp_call``." +msgstr "" + +#: c-api/call.rst:177 +msgid "Object Calling API" +msgstr "" + +#: c-api/call.rst:179 +msgid "" +"Various functions are available for calling a Python object. Each converts " +"its arguments to a convention supported by the called object – either " +"*tp_call* or vectorcall. In order to do as little conversion as possible, " +"pick one that best fits the format of data you have available." +msgstr "" + +#: c-api/call.rst:185 +msgid "" +"The following table summarizes the available functions; please see " +"individual documentation for details." +msgstr "" + +#: c-api/call.rst:189 +msgid "Function" +msgstr "Fonction" + +#: c-api/call.rst:189 +msgid "callable" +msgstr "appelable (*callable*)" + +#: c-api/call.rst:189 +msgid "args" +msgstr "" + +#: c-api/call.rst:189 +msgid "kwargs" +msgstr "" + +#: c-api/call.rst:191 +msgid ":c:func:`PyObject_Call`" +msgstr "" + +#: c-api/call.rst:193 c-api/call.rst:197 c-api/call.rst:203 c-api/call.rst:213 +msgid "``PyObject *``" +msgstr "" + +#: c-api/call.rst:191 +msgid "tuple" +msgstr "" + +#: c-api/call.rst:213 +msgid "dict/``NULL``" +msgstr "" + +#: c-api/call.rst:193 +msgid ":c:func:`PyObject_CallNoArgs`" +msgstr "" + +#: c-api/call.rst:195 c-api/call.rst:199 c-api/call.rst:203 c-api/call.rst:207 +#: c-api/call.rst:209 +msgid "---" +msgstr "" + +#: c-api/call.rst:195 +msgid ":c:func:`PyObject_CallOneArg`" +msgstr "" + +#: c-api/call.rst:209 +msgid "1 object" +msgstr "" + +#: c-api/call.rst:197 +msgid ":c:func:`PyObject_CallObject`" +msgstr "" + +#: c-api/call.rst:197 +msgid "tuple/``NULL``" +msgstr "" + +#: c-api/call.rst:199 +msgid ":c:func:`PyObject_CallFunction`" +msgstr "" + +#: c-api/call.rst:201 +msgid "format" +msgstr "format" + +#: c-api/call.rst:201 +msgid ":c:func:`PyObject_CallMethod`" +msgstr "" + +#: c-api/call.rst:201 +msgid "obj + ``char*``" +msgstr "" + +#: c-api/call.rst:203 +msgid ":c:func:`PyObject_CallFunctionObjArgs`" +msgstr "" + +#: c-api/call.rst:205 +msgid "variadic" +msgstr "" + +#: c-api/call.rst:205 +msgid ":c:func:`PyObject_CallMethodObjArgs`" +msgstr "" + +#: c-api/call.rst:207 c-api/call.rst:209 +msgid "obj + name" +msgstr "" + +#: c-api/call.rst:207 +msgid ":c:func:`PyObject_CallMethodNoArgs`" +msgstr "" + +#: c-api/call.rst:209 +msgid ":c:func:`PyObject_CallMethodOneArg`" +msgstr "" + +#: c-api/call.rst:211 +msgid ":c:func:`PyObject_Vectorcall`" +msgstr "" + +#: c-api/call.rst:213 c-api/call.rst:215 +msgid "vectorcall" +msgstr "" + +#: c-api/call.rst:213 +msgid ":c:func:`PyObject_VectorcallDict`" +msgstr "" + +#: c-api/call.rst:215 +msgid ":c:func:`PyObject_VectorcallMethod`" +msgstr "" + +#: c-api/call.rst:215 +msgid "arg + name" +msgstr "" + +#: c-api/call.rst:221 +msgid "" +"Call a callable Python object *callable*, with arguments given by the tuple " +"*args*, and named arguments given by the dictionary *kwargs*." +msgstr "" +"Appelle un objet Python appelable *callable*, avec des arguments donnés par " +"le *n*-uplet *args*, et des arguments nommés donnés par le dictionnaire " +"*kwargs*." + +#: c-api/call.rst:224 +msgid "" +"*args* must not be *NULL*; use an empty tuple if no arguments are needed. If " +"no named arguments are needed, *kwargs* can be *NULL*." +msgstr "" + +#: c-api/call.rst:239 c-api/call.rst:261 c-api/call.rst:293 c-api/call.rst:326 +#: c-api/call.rst:347 c-api/call.rst:394 +msgid "" +"Return the result of the call on success, or raise an exception and return " +"*NULL* on failure." +msgstr "" + +#: c-api/call.rst:230 +msgid "" +"This is the equivalent of the Python expression: ``callable(*args, " +"**kwargs)``." +msgstr "" +"Ceci est l'équivalent de l'expression Python : ``callable(*args, **kwargs)``." + +#: c-api/call.rst:236 +msgid "" +"Call a callable Python object *callable* without any arguments. It is the " +"most efficient way to call a callable Python object without any argument." +msgstr "" + +#: c-api/call.rst:247 +msgid "" +"Call a callable Python object *callable* with exactly 1 positional argument " +"*arg* and no keyword arguments." +msgstr "" + +#: c-api/call.rst:258 +msgid "" +"Call a callable Python object *callable*, with arguments given by the tuple " +"*args*. If no arguments are needed, then *args* can be *NULL*." +msgstr "" + +#: c-api/call.rst:276 +msgid "This is the equivalent of the Python expression: ``callable(*args)``." +msgstr "Ceci est l'équivalent de l'expression Python : ``callable(*args)``." + +#: c-api/call.rst:269 +msgid "" +"Call a callable Python object *callable*, with a variable number of C " +"arguments. The C arguments are described using a :c:func:`Py_BuildValue` " +"style format string. The format can be *NULL*, indicating that no arguments " +"are provided." +msgstr "" + +#: c-api/call.rst:278 +msgid "" +"Note that if you only pass :c:expr:`PyObject *` args, :c:func:" +"`PyObject_CallFunctionObjArgs` is a faster alternative." +msgstr "" + +#: c-api/call.rst:281 +msgid "The type of *format* was changed from ``char *``." +msgstr "" + +#: c-api/call.rst:287 +msgid "" +"Call the method named *name* of object *obj* with a variable number of C " +"arguments. The C arguments are described by a :c:func:`Py_BuildValue` " +"format string that should produce a tuple." +msgstr "" + +#: c-api/call.rst:291 +msgid "The format can be *NULL*, indicating that no arguments are provided." +msgstr "" + +#: c-api/call.rst:296 +msgid "" +"This is the equivalent of the Python expression: ``obj.name(arg1, " +"arg2, ...)``." +msgstr "" + +#: c-api/call.rst:299 +msgid "" +"Note that if you only pass :c:expr:`PyObject *` args, :c:func:" +"`PyObject_CallMethodObjArgs` is a faster alternative." +msgstr "" + +#: c-api/call.rst:302 +msgid "The types of *name* and *format* were changed from ``char *``." +msgstr "" + +#: c-api/call.rst:308 +msgid "" +"Call a callable Python object *callable*, with a variable number of :c:expr:" +"`PyObject *` arguments. The arguments are provided as a variable number of " +"parameters followed by *NULL*." +msgstr "" + +#: c-api/call.rst:315 +msgid "" +"This is the equivalent of the Python expression: ``callable(arg1, " +"arg2, ...)``." +msgstr "" + +#: c-api/call.rst:321 +msgid "" +"Call a method of the Python object *obj*, where the name of the method is " +"given as a Python string object in *name*. It is called with a variable " +"number of :c:expr:`PyObject *` arguments. The arguments are provided as a " +"variable number of parameters followed by *NULL*." +msgstr "" + +#: c-api/call.rst:332 +msgid "" +"Call a method of the Python object *obj* without arguments, where the name " +"of the method is given as a Python string object in *name*." +msgstr "" + +#: c-api/call.rst:343 +msgid "" +"Call a method of the Python object *obj* with a single positional argument " +"*arg*, where the name of the method is given as a Python string object in " +"*name*." +msgstr "" + +#: c-api/call.rst:355 +msgid "" +"Call a callable Python object *callable*. The arguments are the same as for :" +"c:type:`vectorcallfunc`. If *callable* supports vectorcall_, this directly " +"calls the vectorcall function stored in *callable*." +msgstr "" + +#: c-api/call.rst:367 +msgid "" +"Call *callable* with positional arguments passed exactly as in the " +"vectorcall_ protocol, but with keyword arguments passed as a dictionary " +"*kwdict*. The *args* array contains only the positional arguments." +msgstr "" + +#: c-api/call.rst:371 +msgid "" +"Regardless of which protocol is used internally, a conversion of arguments " +"needs to be done. Therefore, this function should only be used if the caller " +"already has a dictionary ready to use for the keyword arguments, but not a " +"tuple for the positional arguments." +msgstr "" + +#: c-api/call.rst:381 +msgid "" +"Call a method using the vectorcall calling convention. The name of the " +"method is given as a Python string *name*. The object whose method is called " +"is *args[0]*, and the *args* array starting at *args[1]* represents the " +"arguments of the call. There must be at least one positional argument. " +"*nargsf* is the number of positional arguments including *args[0]*, plus :" +"const:`PY_VECTORCALL_ARGUMENTS_OFFSET` if the value of ``args[0]`` may " +"temporarily be changed. Keyword arguments can be passed just like in :c:func:" +"`PyObject_Vectorcall`." +msgstr "" + +#: c-api/call.rst:390 +msgid "" +"If the object has the :const:`Py_TPFLAGS_METHOD_DESCRIPTOR` feature, this " +"will call the unbound method object with the full *args* vector as arguments." +msgstr "" + +#: c-api/call.rst:401 +msgid "Call Support API" +msgstr "" + +#: c-api/call.rst:405 +msgid "" +"Determine if the object *o* is callable. Return ``1`` if the object is " +"callable and ``0`` otherwise. This function always succeeds." +msgstr "" +"Détermine si l'objet *o* est appelable. Renvoie ``1`` si c'est le cas, et " +"``0`` sinon. Cette fonction réussit toujours." diff --git a/c-api/capsule.po b/c-api/capsule.po new file mode 100644 index 0000000000..ffb042ea56 --- /dev/null +++ b/c-api/capsule.po @@ -0,0 +1,199 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-18 15:46+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: FRENCH \n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: c-api/capsule.rst:6 +msgid "Capsules" +msgstr "Capsules" + +#: c-api/capsule.rst:10 +msgid "" +"Refer to :ref:`using-capsules` for more information on using these objects." +msgstr "" +"Reportez-vous à :ref:`using-capsules` pour plus d'informations sur " +"l'utilisation de ces objets." + +#: c-api/capsule.rst:17 +msgid "" +"This subtype of :c:type:`PyObject` represents an opaque value, useful for C " +"extension modules who need to pass an opaque value (as a :c:expr:`void*` " +"pointer) through Python code to other C code. It is often used to make a C " +"function pointer defined in one module available to other modules, so the " +"regular import mechanism can be used to access C APIs defined in dynamically " +"loaded modules." +msgstr "" + +#: c-api/capsule.rst:27 +msgid "The type of a destructor callback for a capsule. Defined as::" +msgstr "" + +#: c-api/capsule.rst:31 +msgid "" +"See :c:func:`PyCapsule_New` for the semantics of PyCapsule_Destructor " +"callbacks." +msgstr "" + +#: c-api/capsule.rst:37 +msgid "" +"Return true if its argument is a :c:type:`PyCapsule`. This function always " +"succeeds." +msgstr "" + +#: c-api/capsule.rst:43 +msgid "" +"Create a :c:type:`PyCapsule` encapsulating the *pointer*. The *pointer* " +"argument may not be ``NULL``." +msgstr "" + +#: c-api/capsule.rst:46 +msgid "On failure, set an exception and return ``NULL``." +msgstr "" + +#: c-api/capsule.rst:48 +msgid "" +"The *name* string may either be ``NULL`` or a pointer to a valid C string. " +"If non-``NULL``, this string must outlive the capsule. (Though it is " +"permitted to free it inside the *destructor*.)" +msgstr "" + +#: c-api/capsule.rst:52 +msgid "" +"If the *destructor* argument is not ``NULL``, it will be called with the " +"capsule as its argument when it is destroyed." +msgstr "" + +#: c-api/capsule.rst:55 +msgid "" +"If this capsule will be stored as an attribute of a module, the *name* " +"should be specified as ``modulename.attributename``. This will enable other " +"modules to import the capsule using :c:func:`PyCapsule_Import`." +msgstr "" + +#: c-api/capsule.rst:62 +msgid "" +"Retrieve the *pointer* stored in the capsule. On failure, set an exception " +"and return ``NULL``." +msgstr "" + +#: c-api/capsule.rst:65 +msgid "" +"The *name* parameter must compare exactly to the name stored in the capsule. " +"If the name stored in the capsule is ``NULL``, the *name* passed in must " +"also be ``NULL``. Python uses the C function :c:func:`strcmp` to compare " +"capsule names." +msgstr "" + +#: c-api/capsule.rst:73 +msgid "" +"Return the current destructor stored in the capsule. On failure, set an " +"exception and return ``NULL``." +msgstr "" + +#: c-api/capsule.rst:76 +msgid "" +"It is legal for a capsule to have a ``NULL`` destructor. This makes a " +"``NULL`` return code somewhat ambiguous; use :c:func:`PyCapsule_IsValid` or :" +"c:func:`PyErr_Occurred` to disambiguate." +msgstr "" + +#: c-api/capsule.rst:83 +msgid "" +"Return the current context stored in the capsule. On failure, set an " +"exception and return ``NULL``." +msgstr "" + +#: c-api/capsule.rst:86 +msgid "" +"It is legal for a capsule to have a ``NULL`` context. This makes a ``NULL`` " +"return code somewhat ambiguous; use :c:func:`PyCapsule_IsValid` or :c:func:" +"`PyErr_Occurred` to disambiguate." +msgstr "" + +#: c-api/capsule.rst:93 +msgid "" +"Return the current name stored in the capsule. On failure, set an exception " +"and return ``NULL``." +msgstr "" + +#: c-api/capsule.rst:96 +msgid "" +"It is legal for a capsule to have a ``NULL`` name. This makes a ``NULL`` " +"return code somewhat ambiguous; use :c:func:`PyCapsule_IsValid` or :c:func:" +"`PyErr_Occurred` to disambiguate." +msgstr "" + +#: c-api/capsule.rst:103 +msgid "" +"Import a pointer to a C object from a capsule attribute in a module. The " +"*name* parameter should specify the full name to the attribute, as in " +"``module.attribute``. The *name* stored in the capsule must match this " +"string exactly. If *no_block* is true, import the module without blocking " +"(using :c:func:`PyImport_ImportModuleNoBlock`). If *no_block* is false, " +"import the module conventionally (using :c:func:`PyImport_ImportModule`)." +msgstr "" + +#: c-api/capsule.rst:110 +msgid "" +"Return the capsule's internal *pointer* on success. On failure, set an " +"exception and return ``NULL``." +msgstr "" + +#: c-api/capsule.rst:116 +msgid "" +"Determines whether or not *capsule* is a valid capsule. A valid capsule is " +"non-``NULL``, passes :c:func:`PyCapsule_CheckExact`, has a non-``NULL`` " +"pointer stored in it, and its internal name matches the *name* parameter. " +"(See :c:func:`PyCapsule_GetPointer` for information on how capsule names are " +"compared.)" +msgstr "" + +#: c-api/capsule.rst:122 +msgid "" +"In other words, if :c:func:`PyCapsule_IsValid` returns a true value, calls " +"to any of the accessors (any function starting with :c:func:`PyCapsule_Get`) " +"are guaranteed to succeed." +msgstr "" + +#: c-api/capsule.rst:126 +msgid "" +"Return a nonzero value if the object is valid and matches the name passed " +"in. Return ``0`` otherwise. This function will not fail." +msgstr "" + +#: c-api/capsule.rst:132 +msgid "Set the context pointer inside *capsule* to *context*." +msgstr "" + +#: c-api/capsule.rst:141 c-api/capsule.rst:158 +msgid "" +"Return ``0`` on success. Return nonzero and set an exception on failure." +msgstr "" + +#: c-api/capsule.rst:139 +msgid "Set the destructor inside *capsule* to *destructor*." +msgstr "" + +#: c-api/capsule.rst:146 +msgid "" +"Set the name inside *capsule* to *name*. If non-``NULL``, the name must " +"outlive the capsule. If the previous *name* stored in the capsule was not " +"``NULL``, no attempt is made to free it." +msgstr "" + +#: c-api/capsule.rst:155 +msgid "" +"Set the void pointer inside *capsule* to *pointer*. The pointer may not be " +"``NULL``." +msgstr "" diff --git a/c-api/cell.po b/c-api/cell.po new file mode 100644 index 0000000000..8479a01571 --- /dev/null +++ b/c-api/cell.po @@ -0,0 +1,105 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-01-27 19:26+0100\n" +"PO-Revision-Date: 2019-05-09 10:14+0200\n" +"Last-Translator: \n" +"Language-Team: FRENCH \n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 2.2.1\n" + +#: c-api/cell.rst:6 +msgid "Cell Objects" +msgstr "Objets Cellules" + +#: c-api/cell.rst:8 +msgid "" +"\"Cell\" objects are used to implement variables referenced by multiple " +"scopes. For each such variable, a cell object is created to store the value; " +"the local variables of each stack frame that references the value contains a " +"reference to the cells from outer scopes which also use that variable. When " +"the value is accessed, the value contained in the cell is used instead of " +"the cell object itself. This de-referencing of the cell object requires " +"support from the generated byte-code; these are not automatically de-" +"referenced when accessed. Cell objects are not likely to be useful elsewhere." +msgstr "" +"Les objets \"Cellules\" (*cell* en anglais) sont utilisés pour implémenter " +"des variables référencées dans de multiples environnements. Pour chacune de " +"ces variables, un objet cellule est créé pour stocker sa valeur ; les " +"variables locales de chaque pile d'exécution qui référence cette valeur " +"contiennent une référence sur les cellules des autres environnements qui " +"utilisent aussi cette variable. Quand la valeur est accédée, la valeur de la " +"cellule est utilisée, au lei de celle de l'objet cellule proprement dit. Ce " +"dé-référencement de l'objet cellule requiert l'intervention du *bytecode* " +"généré ; il n'est pas automatiquement dé-référencé quand il est accédé. Il " +"est plausible que les objets cellules ne soit utilisés ailleurs." + +#: c-api/cell.rst:20 +msgid "The C structure used for cell objects." +msgstr "Structure C utilisée pour les objets cellules." + +#: c-api/cell.rst:25 +msgid "The type object corresponding to cell objects." +msgstr "Type objet correspondant aux objets cellules." + +#: c-api/cell.rst:30 +#, fuzzy +msgid "" +"Return true if *ob* is a cell object; *ob* must not be ``NULL``. This " +"function always succeeds." +msgstr "" +"Renvoie ``True`` si *ob* est un objet cellule ; *ob* ne doit pas être à " +"*NULL*." + +#: c-api/cell.rst:36 +#, fuzzy +msgid "" +"Create and return a new cell object containing the value *ob*. The parameter " +"may be ``NULL``." +msgstr "" +"Crée et retourne un nouvel objet cellule contenant la valeur *ob*. Le " +"paramètre peut être mis à *NULL*." + +#: c-api/cell.rst:42 +msgid "Return the contents of the cell *cell*." +msgstr "Renvoie le contenu de la cellule *cell*." + +#: c-api/cell.rst:47 +#, fuzzy +msgid "" +"Return the contents of the cell *cell*, but without checking that *cell* is " +"non-``NULL`` and a cell object." +msgstr "" +"Renvoie le contenu de la cellule *cell*, mais sans vérifier si *cell* est " +"non *NULL* et sans vérifier si c'est un objet cellule." + +#: c-api/cell.rst:53 +#, fuzzy +msgid "" +"Set the contents of the cell object *cell* to *value*. This releases the " +"reference to any current content of the cell. *value* may be ``NULL``. " +"*cell* must be non-``NULL``; if it is not a cell object, ``-1`` will be " +"returned. On success, ``0`` will be returned." +msgstr "" +"Définit le contenu de l'objet cellule à *value*. Cela libère la référence à " +"toute valeur de la cellule. *value* peut être fixé à *NULL*. *cell* ne doit " +"pas être *NULL* ; si ce n'est pas un objet cellule, ``-1`` est renvoyé. Si " +"c'est un objet cellule, renvoie ``0``." + +#: c-api/cell.rst:61 +#, fuzzy +msgid "" +"Sets the value of the cell object *cell* to *value*. No reference counts " +"are adjusted, and no checks are made for safety; *cell* must be non-``NULL`` " +"and must be a cell object." +msgstr "" +"Définit la valeur de l'objet cellule à *value*. Pas de comptage de " +"références n'est ajusté et il n'y' a pas de contrôle effectué pour vérifier " +"la sûreté ; *cell* doit être à non *NULL* et doit être un objet cellule." diff --git a/c-api/code.po b/c-api/code.po new file mode 100644 index 0000000000..2094616202 --- /dev/null +++ b/c-api/code.po @@ -0,0 +1,98 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-09-23 16:16+0200\n" +"PO-Revision-Date: 2018-02-15 00:30+0100\n" +"Last-Translator: FULL NAME \n" +"Language-Team: FRENCH \n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: c-api/code.rst:8 +msgid "Code Objects" +msgstr "Objets code" + +#: c-api/code.rst:12 +msgid "" +"Code objects are a low-level detail of the CPython implementation. Each one " +"represents a chunk of executable code that hasn't yet been bound into a " +"function." +msgstr "" +"Les objets *Code* sont spécifiques à l'implémentation bas niveau de CPython. " +"Chacun d'eux représente une partie de code exécutable, qui n'a pas encore " +"été lié dans une fonction." + +#: c-api/code.rst:18 +msgid "" +"The C structure of the objects used to describe code objects. The fields of " +"this type are subject to change at any time." +msgstr "" +"La structure C utilisée pour décrire les objets *Code*. Les attributs de " +"cette structure sont sujets à changer à tout moment." + +#: c-api/code.rst:24 +msgid "" +"This is an instance of :c:type:`PyTypeObject` representing the Python :class:" +"`code` type." +msgstr "" +"C'est une instance de :c:type:`PyTypeObject` représentant le type Python :" +"class:`code`." + +#: c-api/code.rst:30 +#, fuzzy +msgid "" +"Return true if *co* is a :class:`code` object. This function always " +"succeeds." +msgstr "Renvoie vrai si *co* est un objet :class:`code`." + +#: c-api/code.rst:34 +msgid "Return the number of free variables in *co*." +msgstr "Renvoie le nombre de variables libres dans *co*." + +#: c-api/code.rst:38 +msgid "" +"Return a new code object. If you need a dummy code object to create a " +"frame, use :c:func:`PyCode_NewEmpty` instead. Calling :c:func:`PyCode_New` " +"directly can bind you to a precise Python version since the definition of " +"the bytecode changes often." +msgstr "" +"Renvoie un nouvel objet *code*. Si vous avez besoin d'un objet code factice " +"pour créer une *frame*, utilisez plutôt :c:func:`PyCode_NewEmpty`. Appeler :" +"c:func:`PyCode_New` peut vous lier directement à une version spécifique de " +"Python, le *bytecode* étant sujet à modifications." + +#: c-api/code.rst:45 +msgid "" +"Similar to :c:func:`PyCode_New`, but with an extra \"posonlyargcount\" for " +"positional-only arguments." +msgstr "" + +#: c-api/code.rst:51 +msgid "" +"Return a new empty code object with the specified filename, function name, " +"and first line number. It is illegal to :func:`exec` or :func:`eval` the " +"resulting code object." +msgstr "" +"Renvoie un nouvel objet *code* avec le nom de fichier, le nom de fonction, " +"et le numéro de première ligne donnés. Il n'est pas permis d'utiliser :func:" +"`exec` ou :func:`eval` sur l'objet renvoyé." + +#: c-api/code.rst:57 +msgid "" +"Return the line number of the instruction that occurs on or before " +"``byte_offset`` and ends after it. If you just need the line number of a " +"frame, use :c:func:`PyFrame_GetLineNumber` instead." +msgstr "" + +#: c-api/code.rst:60 +msgid "" +"For efficiently iterating over the line numbers in a code object, use `the " +"API described in PEP 626 `_." +msgstr "" diff --git a/c-api/codec.po b/c-api/codec.po new file mode 100644 index 0000000000..8d0d24baae --- /dev/null +++ b/c-api/codec.po @@ -0,0 +1,170 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-09-23 16:16+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: FRENCH \n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: c-api/codec.rst:4 +msgid "Codec registry and support functions" +msgstr "" + +#: c-api/codec.rst:8 +msgid "Register a new codec search function." +msgstr "" + +#: c-api/codec.rst:10 +msgid "" +"As side effect, this tries to load the :mod:`encodings` package, if not yet " +"done, to make sure that it is always first in the list of search functions." +msgstr "" + +#: c-api/codec.rst:15 +msgid "" +"Unregister a codec search function and clear the registry's cache. If the " +"search function is not registered, do nothing. Return 0 on success. Raise an " +"exception and return -1 on error." +msgstr "" + +#: c-api/codec.rst:23 +msgid "" +"Return ``1`` or ``0`` depending on whether there is a registered codec for " +"the given *encoding*. This function always succeeds." +msgstr "" + +#: c-api/codec.rst:28 +msgid "Generic codec based encoding API." +msgstr "" + +#: c-api/codec.rst:30 +msgid "" +"*object* is passed through the encoder function found for the given " +"*encoding* using the error handling method defined by *errors*. *errors* " +"may be ``NULL`` to use the default method defined for the codec. Raises a :" +"exc:`LookupError` if no encoder can be found." +msgstr "" + +#: c-api/codec.rst:37 +msgid "Generic codec based decoding API." +msgstr "" + +#: c-api/codec.rst:39 +msgid "" +"*object* is passed through the decoder function found for the given " +"*encoding* using the error handling method defined by *errors*. *errors* " +"may be ``NULL`` to use the default method defined for the codec. Raises a :" +"exc:`LookupError` if no encoder can be found." +msgstr "" + +#: c-api/codec.rst:46 +msgid "Codec lookup API" +msgstr "" + +#: c-api/codec.rst:48 +msgid "" +"In the following functions, the *encoding* string is looked up converted to " +"all lower-case characters, which makes encodings looked up through this " +"mechanism effectively case-insensitive. If no codec is found, a :exc:" +"`KeyError` is set and ``NULL`` returned." +msgstr "" + +#: c-api/codec.rst:55 +msgid "Get an encoder function for the given *encoding*." +msgstr "" + +#: c-api/codec.rst:59 +msgid "Get a decoder function for the given *encoding*." +msgstr "" + +#: c-api/codec.rst:63 +msgid "" +"Get an :class:`~codecs.IncrementalEncoder` object for the given *encoding*." +msgstr "" + +#: c-api/codec.rst:67 +msgid "" +"Get an :class:`~codecs.IncrementalDecoder` object for the given *encoding*." +msgstr "" + +#: c-api/codec.rst:71 +msgid "" +"Get a :class:`~codecs.StreamReader` factory function for the given " +"*encoding*." +msgstr "" + +#: c-api/codec.rst:75 +msgid "" +"Get a :class:`~codecs.StreamWriter` factory function for the given " +"*encoding*." +msgstr "" + +#: c-api/codec.rst:79 +msgid "Registry API for Unicode encoding error handlers" +msgstr "" + +#: c-api/codec.rst:83 +msgid "" +"Register the error handling callback function *error* under the given " +"*name*. This callback function will be called by a codec when it encounters " +"unencodable characters/undecodable bytes and *name* is specified as the " +"error parameter in the call to the encode/decode function." +msgstr "" + +#: c-api/codec.rst:88 +msgid "" +"The callback gets a single argument, an instance of :exc:" +"`UnicodeEncodeError`, :exc:`UnicodeDecodeError` or :exc:" +"`UnicodeTranslateError` that holds information about the problematic " +"sequence of characters or bytes and their offset in the original string " +"(see :ref:`unicodeexceptions` for functions to extract this information). " +"The callback must either raise the given exception, or return a two-item " +"tuple containing the replacement for the problematic sequence, and an " +"integer giving the offset in the original string at which encoding/decoding " +"should be resumed." +msgstr "" + +#: c-api/codec.rst:98 +msgid "Return ``0`` on success, ``-1`` on error." +msgstr "" + +#: c-api/codec.rst:102 +msgid "" +"Lookup the error handling callback function registered under *name*. As a " +"special case ``NULL`` can be passed, in which case the error handling " +"callback for \"strict\" will be returned." +msgstr "" + +#: c-api/codec.rst:108 +msgid "Raise *exc* as an exception." +msgstr "" + +#: c-api/codec.rst:112 +msgid "Ignore the unicode error, skipping the faulty input." +msgstr "" + +#: c-api/codec.rst:116 +msgid "Replace the unicode encode error with ``?`` or ``U+FFFD``." +msgstr "" + +#: c-api/codec.rst:120 +msgid "Replace the unicode encode error with XML character references." +msgstr "" + +#: c-api/codec.rst:124 +msgid "" +"Replace the unicode encode error with backslash escapes (``\\x``, ``\\u`` " +"and ``\\U``)." +msgstr "" + +#: c-api/codec.rst:129 +msgid "Replace the unicode encode error with ``\\N{...}`` escapes." +msgstr "" diff --git a/c-api/complex.po b/c-api/complex.po new file mode 100644 index 0000000000..68bc4bbbce --- /dev/null +++ b/c-api/complex.po @@ -0,0 +1,213 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-18 15:46+0200\n" +"PO-Revision-Date: 2019-01-14 20:31+0100\n" +"Last-Translator: ANTOINE FOURES \n" +"Language-Team: FRENCH \n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 2.0.4\n" + +#: c-api/complex.rst:6 +msgid "Complex Number Objects" +msgstr "Objets représentant des nombres complexes" + +#: c-api/complex.rst:10 +msgid "" +"Python's complex number objects are implemented as two distinct types when " +"viewed from the C API: one is the Python object exposed to Python programs, " +"and the other is a C structure which represents the actual complex number " +"value. The API provides functions for working with both." +msgstr "" +"Les nombres complexes Python sont implémentés comme deux types distincts, " +"lorsqu'ils sont vus de l'API C : l'un est l'objet Python tel qu'il est vu " +"par les programmes Python, et l'autre est une structure C qui représente la " +"valeur exacte du nombre complexe. L'API fournit des fonctions pour " +"travailler avec ces deux représentations." + +#: c-api/complex.rst:17 +msgid "Complex Numbers as C Structures" +msgstr "Nombres complexes en tant que structures C" + +#: c-api/complex.rst:19 +msgid "" +"Note that the functions which accept these structures as parameters and " +"return them as results do so *by value* rather than dereferencing them " +"through pointers. This is consistent throughout the API." +msgstr "" +"Les fonctions qui acceptent ces structures comme paramètres et les renvoient " +"comme résultats le font en fonction de leur *valeur* au lieu de les dé-" +"référencer en utilisant des pointeurs. C'est constant dans toute l'API." + +#: c-api/complex.rst:26 +msgid "" +"The C structure which corresponds to the value portion of a Python complex " +"number object. Most of the functions for dealing with complex number " +"objects use structures of this type as input or output values, as " +"appropriate. It is defined as::" +msgstr "" +"Structure C représentant la valeur d'un nombre complexe Python. La majorité " +"des fonctions qui traitent des nombres complexes utilisent cette structure " +"en entrée ou en sortie, selon le cas. Elle est définie par ::" + +#: c-api/complex.rst:39 +msgid "" +"Return the sum of two complex numbers, using the C :c:type:`Py_complex` " +"representation." +msgstr "" +"Renvoie la somme de deux nombres complexes, sous la forme d'un :c:type:" +"`Py_complex` en C." + +#: c-api/complex.rst:45 +msgid "" +"Return the difference between two complex numbers, using the C :c:type:" +"`Py_complex` representation." +msgstr "" +"Renvoie la différence de deux nombres complexes, sous la forme d'un :c:type:" +"`Py_complex` en C." + +#: c-api/complex.rst:51 +#, fuzzy +msgid "" +"Return the negation of the complex number *num*, using the C :c:type:" +"`Py_complex` representation." +msgstr "" +"Renvoie l'opposé du nombre complexe *complex*, sous la forme d'un :c:type:" +"`Py_complex` en C." + +#: c-api/complex.rst:57 +msgid "" +"Return the product of two complex numbers, using the C :c:type:`Py_complex` " +"representation." +msgstr "" +"Renvoie le produit de deux nombres complexes, sous la forme d'un :c:type:" +"`Py_complex` en C." + +#: c-api/complex.rst:63 +msgid "" +"Return the quotient of two complex numbers, using the C :c:type:`Py_complex` " +"representation." +msgstr "" +"Renvoie le quotient de deux nombres complexes, sous la forme d'un :c:type:" +"`Py_complex` en C." + +#: c-api/complex.rst:66 +msgid "" +"If *divisor* is null, this method returns zero and sets :c:data:`errno` to :" +"c:data:`EDOM`." +msgstr "" +"Si *divisor* est nul, cette méthode renvoie zéro et assigne :c:data:`EDOM` " +"à :c:data:`errno`." + +#: c-api/complex.rst:72 +msgid "" +"Return the exponentiation of *num* by *exp*, using the C :c:type:" +"`Py_complex` representation." +msgstr "" +"Renvoie *num* à la puissance *exp*, sous la forme d'un :c:type:`Py_complex` " +"en C." + +#: c-api/complex.rst:75 +msgid "" +"If *num* is null and *exp* is not a positive real number, this method " +"returns zero and sets :c:data:`errno` to :c:data:`EDOM`." +msgstr "" +"Si *num* est nul et *exp* n'est pas un nombre réel positif, cette méthode " +"renvoie zéro et assigne :c:data:`EDOM` à :c:data:`errno`." + +#: c-api/complex.rst:80 +msgid "Complex Numbers as Python Objects" +msgstr "Nombres complexes en tant qu'objets Python" + +#: c-api/complex.rst:85 +msgid "" +"This subtype of :c:type:`PyObject` represents a Python complex number object." +msgstr "" +"Ce sous-type de l'objet :c:type:`PyObject` représente un nombre complexe en " +"Python." + +#: c-api/complex.rst:90 +msgid "" +"This instance of :c:type:`PyTypeObject` represents the Python complex number " +"type. It is the same object as :class:`complex` in the Python layer." +msgstr "" +"Cette instance de :c:type:`PyTypeObject` représente le type nombre complexe " +"Python. C'est le même objet que la classe :class:`complex` de la couche " +"Python." + +#: c-api/complex.rst:96 +#, fuzzy +msgid "" +"Return true if its argument is a :c:type:`PyComplexObject` or a subtype of :" +"c:type:`PyComplexObject`. This function always succeeds." +msgstr "" +"Renvoie vrai si l'argument est de type :c:type:`PyComplexObject` ou un sous-" +"type de :c:type:`PyComplexObject`." + +#: c-api/complex.rst:102 +#, fuzzy +msgid "" +"Return true if its argument is a :c:type:`PyComplexObject`, but not a " +"subtype of :c:type:`PyComplexObject`. This function always succeeds." +msgstr "" +"Renvoie vrai si l'argument est de type :c:type:`PyComplexObject`, mais pas " +"un sous-type de :c:type:`PyComplexObject`." + +#: c-api/complex.rst:108 +msgid "" +"Create a new Python complex number object from a C :c:type:`Py_complex` " +"value." +msgstr "" +"Crée un nouveau nombre complexe à partir de la valeur d'un :c:type:" +"`Py_complex` en C." + +#: c-api/complex.rst:113 +msgid "Return a new :c:type:`PyComplexObject` object from *real* and *imag*." +msgstr "" +"Renvoie un nouveau :c:type:`PyComplexObject` à partir de *real* et de *imag*." + +#: c-api/complex.rst:118 +#, fuzzy +msgid "Return the real part of *op* as a C :c:expr:`double`." +msgstr "" +"Renvoie la partie réelle du nombre complexe *op* sous la forme d'un :c:type:" +"`double` en C." + +#: c-api/complex.rst:123 +#, fuzzy +msgid "Return the imaginary part of *op* as a C :c:expr:`double`." +msgstr "" +"Renvoie la partie imaginaire du nombre complexe *op* sous la forme d'un :c:" +"type:`double` en C." + +#: c-api/complex.rst:128 +msgid "Return the :c:type:`Py_complex` value of the complex number *op*." +msgstr "" +"Renvoie la valeur du nombre complexe *op* sous la forme d'un :c:type:" +"`Py_complex` en C." + +#: c-api/complex.rst:130 +#, fuzzy +msgid "" +"If *op* is not a Python complex number object but has a :meth:`__complex__` " +"method, this method will first be called to convert *op* to a Python complex " +"number object. If ``__complex__()`` is not defined then it falls back to :" +"meth:`__float__`. If ``__float__()`` is not defined then it falls back to :" +"meth:`__index__`. Upon failure, this method returns ``-1.0`` as a real " +"value." +msgstr "" +"Si *op* n'est pas un nombre complexe Python mais a une méthode :meth:" +"`__complex__`, cette méthode est d'abord appelée pour convertir *op* en " +"nombre complexe Python. En cas d'échec, cette méthode renvoie ``-1.0`` en " +"tant que nombre réel." + +#: c-api/complex.rst:137 +msgid "Use :meth:`__index__` if available." +msgstr "" diff --git a/c-api/concrete.po b/c-api/concrete.po new file mode 100644 index 0000000000..72da448f4a --- /dev/null +++ b/c-api/concrete.po @@ -0,0 +1,91 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-08-24 09:01+0200\n" +"PO-Revision-Date: 2021-01-28 14:56+0100\n" +"Last-Translator: Jules Lasne \n" +"Language-Team: FRENCH \n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 2.4.2\n" + +#: c-api/concrete.rst:8 +msgid "Concrete Objects Layer" +msgstr "Couche des objets concrets" + +#: c-api/concrete.rst:10 +msgid "" +"The functions in this chapter are specific to certain Python object types. " +"Passing them an object of the wrong type is not a good idea; if you receive " +"an object from a Python program and you are not sure that it has the right " +"type, you must perform a type check first; for example, to check that an " +"object is a dictionary, use :c:func:`PyDict_Check`. The chapter is " +"structured like the \"family tree\" of Python object types." +msgstr "" +"Les fonctions de ce chapitre sont spécifiques à certains types d'objets " +"Python. Leur donner un objet du mauvais type n'est pas une bonne idée, si " +"vous recevez un objet d'un programme Python, et que vous n'êtes pas sûr " +"qu'il soit du bon type, vous devez vérifier son type en premier. Par " +"exemple, pour vérifier qu'un objet est un dictionnaire, utilisez :c:func:" +"`PyDict_Check`. Ce chapitre est organisé comme un arbre généalogique de " +"types d'objets Python." + +#: c-api/concrete.rst:19 +msgid "" +"While the functions described in this chapter carefully check the type of " +"the objects which are passed in, many of them do not check for ``NULL`` " +"being passed instead of a valid object. Allowing ``NULL`` to be passed in " +"can cause memory access violations and immediate termination of the " +"interpreter." +msgstr "" +"Tandis que les fonctions décrites dans ce chapitre vérifient avec soin le " +"type des objets qui leur sont passés, beaucoup d'entre elles ne vérifient " +"pas que ``NULL`` est passé au lieu d'un objet valide. Autoriser ``NULL`` à " +"être passé peut provoquer des violations d'accès à la mémoire et ainsi " +"terminer immédiatement l'interpréteur." + +#: c-api/concrete.rst:28 +msgid "Fundamental Objects" +msgstr "Objets fondamentaux" + +#: c-api/concrete.rst:30 +msgid "" +"This section describes Python type objects and the singleton object ``None``." +msgstr "" +"Cette section décrit les objets de type Python et l'objet singleton ``None``." + +#: c-api/concrete.rst:41 +msgid "Numeric Objects" +msgstr "Objets numériques" + +#: c-api/concrete.rst:56 +msgid "Sequence Objects" +msgstr "Objets séquences" + +#: c-api/concrete.rst:60 +msgid "" +"Generic operations on sequence objects were discussed in the previous " +"chapter; this section deals with the specific kinds of sequence objects that " +"are intrinsic to the Python language." +msgstr "" +"Les opérations génériques sur les objets séquences ont été discutées dans le " +"chapitre précédent. Cette section traite des genres spécifiques d'objets " +"séquences qui sont intrinsèques au langage Python." + +#: c-api/concrete.rst:78 +msgid "Container Objects" +msgstr "Objets conteneurs" + +#: c-api/concrete.rst:91 +msgid "Function Objects" +msgstr "Objets fonctions" + +#: c-api/concrete.rst:102 +msgid "Other Objects" +msgstr "Autres objets" diff --git a/c-api/contextvars.po b/c-api/contextvars.po new file mode 100644 index 0000000000..36ac798c66 --- /dev/null +++ b/c-api/contextvars.po @@ -0,0 +1,172 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-05-19 22:36+0200\n" +"PO-Revision-Date: 2018-08-03 23:47+0200\n" +"Last-Translator: FULL NAME \n" +"Language-Team: FRENCH \n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: c-api/contextvars.rst:6 +msgid "Context Variables Objects" +msgstr "" + +#: c-api/contextvars.rst:13 +msgid "" +"In Python 3.7.1 the signatures of all context variables C APIs were " +"**changed** to use :c:type:`PyObject` pointers instead of :c:type:" +"`PyContext`, :c:type:`PyContextVar`, and :c:type:`PyContextToken`, e.g.::" +msgstr "" + +#: c-api/contextvars.rst:24 +msgid "See :issue:`34762` for more details." +msgstr "" + +#: c-api/contextvars.rst:29 +msgid "" +"This section details the public C API for the :mod:`contextvars` module." +msgstr "" + +#: c-api/contextvars.rst:33 +msgid "" +"The C structure used to represent a :class:`contextvars.Context` object." +msgstr "" + +#: c-api/contextvars.rst:38 +msgid "" +"The C structure used to represent a :class:`contextvars.ContextVar` object." +msgstr "" + +#: c-api/contextvars.rst:43 +msgid "The C structure used to represent a :class:`contextvars.Token` object." +msgstr "" + +#: c-api/contextvars.rst:47 +msgid "The type object representing the *context* type." +msgstr "" + +#: c-api/contextvars.rst:51 +msgid "The type object representing the *context variable* type." +msgstr "" + +#: c-api/contextvars.rst:55 +msgid "The type object representing the *context variable token* type." +msgstr "" + +#: c-api/contextvars.rst:58 +msgid "Type-check macros:" +msgstr "Macros pour vérifier les types :" + +#: c-api/contextvars.rst:62 +msgid "" +"Return true if *o* is of type :c:data:`PyContext_Type`. *o* must not be " +"``NULL``. This function always succeeds." +msgstr "" + +#: c-api/contextvars.rst:67 +msgid "" +"Return true if *o* is of type :c:data:`PyContextVar_Type`. *o* must not be " +"``NULL``. This function always succeeds." +msgstr "" + +#: c-api/contextvars.rst:72 +msgid "" +"Return true if *o* is of type :c:data:`PyContextToken_Type`. *o* must not be " +"``NULL``. This function always succeeds." +msgstr "" + +#: c-api/contextvars.rst:76 +msgid "Context object management functions:" +msgstr "" + +#: c-api/contextvars.rst:80 +msgid "" +"Create a new empty context object. Returns ``NULL`` if an error has " +"occurred." +msgstr "" + +#: c-api/contextvars.rst:85 +msgid "" +"Create a shallow copy of the passed *ctx* context object. Returns ``NULL`` " +"if an error has occurred." +msgstr "" + +#: c-api/contextvars.rst:90 +msgid "" +"Create a shallow copy of the current thread context. Returns ``NULL`` if an " +"error has occurred." +msgstr "" + +#: c-api/contextvars.rst:95 +msgid "" +"Set *ctx* as the current context for the current thread. Returns ``0`` on " +"success, and ``-1`` on error." +msgstr "" + +#: c-api/contextvars.rst:100 +msgid "" +"Deactivate the *ctx* context and restore the previous context as the current " +"context for the current thread. Returns ``0`` on success, and ``-1`` on " +"error." +msgstr "" + +#: c-api/contextvars.rst:105 +msgid "Context variable functions:" +msgstr "" + +#: c-api/contextvars.rst:109 +msgid "" +"Create a new ``ContextVar`` object. The *name* parameter is used for " +"introspection and debug purposes. The *def* parameter specifies a default " +"value for the context variable, or ``NULL`` for no default. If an error has " +"occurred, this function returns ``NULL``." +msgstr "" + +#: c-api/contextvars.rst:116 +msgid "" +"Get the value of a context variable. Returns ``-1`` if an error has " +"occurred during lookup, and ``0`` if no error occurred, whether or not a " +"value was found." +msgstr "" + +#: c-api/contextvars.rst:120 +msgid "" +"If the context variable was found, *value* will be a pointer to it. If the " +"context variable was *not* found, *value* will point to:" +msgstr "" + +#: c-api/contextvars.rst:123 +msgid "*default_value*, if not ``NULL``;" +msgstr "" + +#: c-api/contextvars.rst:124 +msgid "the default value of *var*, if not ``NULL``;" +msgstr "" + +#: c-api/contextvars.rst:125 +msgid "``NULL``" +msgstr "``NULL``" + +#: c-api/contextvars.rst:127 +msgid "Except for ``NULL``, the function returns a new reference." +msgstr "" + +#: c-api/contextvars.rst:131 +msgid "" +"Set the value of *var* to *value* in the current context. Returns a new " +"token object for this change, or ``NULL`` if an error has occurred." +msgstr "" + +#: c-api/contextvars.rst:136 +msgid "" +"Reset the state of the *var* context variable to that it was in before :c:" +"func:`PyContextVar_Set` that returned the *token* was called. This function " +"returns ``0`` on success and ``-1`` on error." +msgstr "" diff --git a/c-api/conversion.po b/c-api/conversion.po new file mode 100644 index 0000000000..af95d132bc --- /dev/null +++ b/c-api/conversion.po @@ -0,0 +1,195 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-18 15:46+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: FRENCH \n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: c-api/conversion.rst:6 +msgid "String conversion and formatting" +msgstr "Conversion et formatage de chaînes" + +#: c-api/conversion.rst:8 +msgid "Functions for number conversion and formatted string output." +msgstr "" +"Fonctions de conversion pour les nombres et pour la sortie des chaînes " +"formatées." + +#: c-api/conversion.rst:13 +msgid "" +"Output not more than *size* bytes to *str* according to the format string " +"*format* and the extra arguments. See the Unix man page :manpage:" +"`snprintf(3)`." +msgstr "" + +#: c-api/conversion.rst:19 +msgid "" +"Output not more than *size* bytes to *str* according to the format string " +"*format* and the variable argument list *va*. Unix man page :manpage:" +"`vsnprintf(3)`." +msgstr "" + +#: c-api/conversion.rst:23 +msgid "" +":c:func:`PyOS_snprintf` and :c:func:`PyOS_vsnprintf` wrap the Standard C " +"library functions :c:func:`snprintf` and :c:func:`vsnprintf`. Their purpose " +"is to guarantee consistent behavior in corner cases, which the Standard C " +"functions do not." +msgstr "" + +#: c-api/conversion.rst:28 +msgid "" +"The wrappers ensure that ``str[size-1]`` is always ``'\\0'`` upon return. " +"They never write more than *size* bytes (including the trailing ``'\\0'``) " +"into str. Both functions require that ``str != NULL``, ``size > 0``, " +"``format != NULL`` and ``size < INT_MAX``. Note that this means there is no " +"equivalent to the C99 ``n = snprintf(NULL, 0, ...)`` which would determine " +"the necessary buffer size." +msgstr "" + +#: c-api/conversion.rst:34 +msgid "" +"The return value (*rv*) for these functions should be interpreted as follows:" +msgstr "" + +#: c-api/conversion.rst:36 +msgid "" +"When ``0 <= rv < size``, the output conversion was successful and *rv* " +"characters were written to *str* (excluding the trailing ``'\\0'`` byte at " +"``str[rv]``)." +msgstr "" + +#: c-api/conversion.rst:40 +msgid "" +"When ``rv >= size``, the output conversion was truncated and a buffer with " +"``rv + 1`` bytes would have been needed to succeed. ``str[size-1]`` is " +"``'\\0'`` in this case." +msgstr "" + +#: c-api/conversion.rst:44 +msgid "" +"When ``rv < 0``, \"something bad happened.\" ``str[size-1]`` is ``'\\0'`` in " +"this case too, but the rest of *str* is undefined. The exact cause of the " +"error depends on the underlying platform." +msgstr "" + +#: c-api/conversion.rst:49 +msgid "" +"The following functions provide locale-independent string to number " +"conversions." +msgstr "" + +#: c-api/conversion.rst:53 +msgid "" +"Convert a string ``s`` to a :c:expr:`double`, raising a Python exception on " +"failure. The set of accepted strings corresponds to the set of strings " +"accepted by Python's :func:`float` constructor, except that ``s`` must not " +"have leading or trailing whitespace. The conversion is independent of the " +"current locale." +msgstr "" + +#: c-api/conversion.rst:59 +msgid "" +"If ``endptr`` is ``NULL``, convert the whole string. Raise :exc:" +"`ValueError` and return ``-1.0`` if the string is not a valid representation " +"of a floating-point number." +msgstr "" + +#: c-api/conversion.rst:63 +msgid "" +"If endptr is not ``NULL``, convert as much of the string as possible and set " +"``*endptr`` to point to the first unconverted character. If no initial " +"segment of the string is the valid representation of a floating-point " +"number, set ``*endptr`` to point to the beginning of the string, raise " +"ValueError, and return ``-1.0``." +msgstr "" + +#: c-api/conversion.rst:70 +msgid "" +"If ``s`` represents a value that is too large to store in a float (for " +"example, ``\"1e500\"`` is such a string on many platforms) then if " +"``overflow_exception`` is ``NULL`` return ``Py_HUGE_VAL`` (with an " +"appropriate sign) and don't set any exception. Otherwise, " +"``overflow_exception`` must point to a Python exception object; raise that " +"exception and return ``-1.0``. In both cases, set ``*endptr`` to point to " +"the first character after the converted value." +msgstr "" + +#: c-api/conversion.rst:78 +msgid "" +"If any other error occurs during the conversion (for example an out-of-" +"memory error), set the appropriate Python exception and return ``-1.0``." +msgstr "" + +#: c-api/conversion.rst:87 +msgid "" +"Convert a :c:expr:`double` *val* to a string using supplied *format_code*, " +"*precision*, and *flags*." +msgstr "" + +#: c-api/conversion.rst:90 +msgid "" +"*format_code* must be one of ``'e'``, ``'E'``, ``'f'``, ``'F'``, ``'g'``, " +"``'G'`` or ``'r'``. For ``'r'``, the supplied *precision* must be 0 and is " +"ignored. The ``'r'`` format code specifies the standard :func:`repr` format." +msgstr "" + +#: c-api/conversion.rst:95 +msgid "" +"*flags* can be zero or more of the values ``Py_DTSF_SIGN``, " +"``Py_DTSF_ADD_DOT_0``, or ``Py_DTSF_ALT``, or-ed together:" +msgstr "" + +#: c-api/conversion.rst:98 +msgid "" +"``Py_DTSF_SIGN`` means to always precede the returned string with a sign " +"character, even if *val* is non-negative." +msgstr "" + +#: c-api/conversion.rst:101 +msgid "" +"``Py_DTSF_ADD_DOT_0`` means to ensure that the returned string will not look " +"like an integer." +msgstr "" + +#: c-api/conversion.rst:104 +msgid "" +"``Py_DTSF_ALT`` means to apply \"alternate\" formatting rules. See the " +"documentation for the :c:func:`PyOS_snprintf` ``'#'`` specifier for details." +msgstr "" + +#: c-api/conversion.rst:108 +msgid "" +"If *ptype* is non-``NULL``, then the value it points to will be set to one " +"of ``Py_DTST_FINITE``, ``Py_DTST_INFINITE``, or ``Py_DTST_NAN``, signifying " +"that *val* is a finite number, an infinite number, or not a number, " +"respectively." +msgstr "" + +#: c-api/conversion.rst:112 +msgid "" +"The return value is a pointer to *buffer* with the converted string or " +"``NULL`` if the conversion failed. The caller is responsible for freeing the " +"returned string by calling :c:func:`PyMem_Free`." +msgstr "" + +#: c-api/conversion.rst:121 +msgid "" +"Case insensitive comparison of strings. The function works almost " +"identically to :c:func:`strcmp` except that it ignores the case." +msgstr "" + +#: c-api/conversion.rst:127 +msgid "" +"Case insensitive comparison of strings. The function works almost " +"identically to :c:func:`strncmp` except that it ignores the case." +msgstr "" diff --git a/c-api/coro.po b/c-api/coro.po new file mode 100644 index 0000000000..7ea10961be --- /dev/null +++ b/c-api/coro.po @@ -0,0 +1,56 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-01-27 19:26+0100\n" +"PO-Revision-Date: 2018-10-04 12:24+0200\n" +"Last-Translator: Julien Palard \n" +"Language-Team: FRENCH \n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: c-api/coro.rst:6 +msgid "Coroutine Objects" +msgstr "Objets coroutines" + +#: c-api/coro.rst:10 +msgid "" +"Coroutine objects are what functions declared with an ``async`` keyword " +"return." +msgstr "" +"Les objets coroutines sont les objets renvoyés par les fonctions déclarées " +"avec le mot clef ``async``." + +#: c-api/coro.rst:16 +msgid "The C structure used for coroutine objects." +msgstr "La structure C utilisée pour les objets coroutine." + +#: c-api/coro.rst:21 +msgid "The type object corresponding to coroutine objects." +msgstr "L'objet type correspondant aux objets coroutines." + +#: c-api/coro.rst:26 +#, fuzzy +msgid "" +"Return true if *ob*'s type is :c:type:`PyCoro_Type`; *ob* must not be " +"``NULL``. This function always succeeds." +msgstr "" +"Renvoie vrai si *ob* est de type *PyCoro_Type*. *ob* ne doit pas être *NULL*." + +#: c-api/coro.rst:32 +#, fuzzy +msgid "" +"Create and return a new coroutine object based on the *frame* object, with " +"``__name__`` and ``__qualname__`` set to *name* and *qualname*. A reference " +"to *frame* is stolen by this function. The *frame* argument must not be " +"``NULL``." +msgstr "" +"Crée et renvoie un nouvel objet coroutine basé sur l'objet *frame*, avec " +"``__name__`` et ``__qualname__`` respectivement assignés de *name* et " +"*qualname*. Une référence à *frame* est empruntée par cette fonction. " +"L'argument *frame* ne doit pas être *NULL*." diff --git a/c-api/datetime.po b/c-api/datetime.po new file mode 100644 index 0000000000..d3678e3c6f --- /dev/null +++ b/c-api/datetime.po @@ -0,0 +1,342 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-18 15:46+0200\n" +"PO-Revision-Date: 2021-12-11 11:57+0100\n" +"Last-Translator: Jules Lasne \n" +"Language-Team: FRENCH \n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 2.2.3\n" +"X-Poedit-Bookmarks: -1,-1,-1,-1,-1,-1,-1,3,-1,-1\n" + +#: c-api/datetime.rst:6 +msgid "DateTime Objects" +msgstr "Objets DateTime" + +#: c-api/datetime.rst:8 +msgid "" +"Various date and time objects are supplied by the :mod:`datetime` module. " +"Before using any of these functions, the header file :file:`datetime.h` must " +"be included in your source (note that this is not included by :file:`Python." +"h`), and the macro :c:macro:`PyDateTime_IMPORT` must be invoked, usually as " +"part of the module initialisation function. The macro puts a pointer to a C " +"structure into a static variable, :c:data:`PyDateTimeAPI`, that is used by " +"the following macros." +msgstr "" +"De nombreux objets *date* et *time* sont exposés par le module :mod:" +"`DateTime`. Avant d'utiliser une de ces fonctions, le fichier d'en-tête :" +"file:`datetime.h` doit être inclus dans vos sources (veuillez noter qu'il " +"n'est pas inclus par le fichier :file:`Python.h`) et la macro :c:macro:" +"`PyDateTime_IMPORT` doit être invoquée, généralement lors de la fonction " +"d'initialisation du module. La macro crée un pointeur vers une structure C " +"et place celui-ci dans une variable statique, :c:data:`PyDateTimeAPI`, qui " +"est utilisée par les macros suivantes." + +#: c-api/datetime.rst:16 +msgid "Macro for access to the UTC singleton:" +msgstr "Macro pour accéder au singleton UTC :" + +#: c-api/datetime.rst:20 +msgid "" +"Returns the time zone singleton representing UTC, the same object as :attr:" +"`datetime.timezone.utc`." +msgstr "" +"Renvoie le singleton du fuseau horaire UTC, qui est le même objet que :attr:" +"`datetime.timezone.utc`." + +#: c-api/datetime.rst:26 +msgid "Type-check macros:" +msgstr "Macros pour vérifier les types :" + +#: c-api/datetime.rst:30 +#, fuzzy +msgid "" +"Return true if *ob* is of type :c:data:`PyDateTime_DateType` or a subtype " +"of :c:data:`PyDateTime_DateType`. *ob* must not be ``NULL``. This function " +"always succeeds." +msgstr "" +"Renvoie vrai si *ob* est de type :c:data:`PyDateTime_DateType` ou un sous-" +"type de :c:data:`PyDateTime_DateType`. *ob* ne doit pas être *NULL*." + +#: c-api/datetime.rst:37 +#, fuzzy +msgid "" +"Return true if *ob* is of type :c:data:`PyDateTime_DateType`. *ob* must not " +"be ``NULL``. This function always succeeds." +msgstr "" +"Renvoie vrai si *ob* est de type :c:data:`PyDateTime_DateType`. *ob* ne doit " +"pas être *NULL*." + +#: c-api/datetime.rst:43 +#, fuzzy +msgid "" +"Return true if *ob* is of type :c:data:`PyDateTime_DateTimeType` or a " +"subtype of :c:data:`PyDateTime_DateTimeType`. *ob* must not be ``NULL``. " +"This function always succeeds." +msgstr "" +"Renvoie vrai si *ob* est de type :c:data:`PyDateTime_DateTimeType` ou un " +"sous-type de :c:data:`PyDateTime_DateTimeType`. *ob* ne doit pas être *NULL*." + +#: c-api/datetime.rst:50 +#, fuzzy +msgid "" +"Return true if *ob* is of type :c:data:`PyDateTime_DateTimeType`. *ob* must " +"not be ``NULL``. This function always succeeds." +msgstr "" +"Renvoie vrai si *ob* est de type :c:data:`PyDateTime_DateTimeType`. *ob* ne " +"doit pas être *NULL*." + +#: c-api/datetime.rst:56 +#, fuzzy +msgid "" +"Return true if *ob* is of type :c:data:`PyDateTime_TimeType` or a subtype " +"of :c:data:`PyDateTime_TimeType`. *ob* must not be ``NULL``. This function " +"always succeeds." +msgstr "" +"Renvoie vrai si *ob* est de type :c:data:`PyDateTime_TimeType` ou un sous-" +"type de :c:data:`PyDateTime_TimeType`. *ob* ne doit pas être *NULL*." + +#: c-api/datetime.rst:63 +#, fuzzy +msgid "" +"Return true if *ob* is of type :c:data:`PyDateTime_TimeType`. *ob* must not " +"be ``NULL``. This function always succeeds." +msgstr "" +"Renvoie vrai si *ob* est de type :c:data:`PyDateTime_TimeType`. *ob* ne doit " +"pas être *NULL*." + +#: c-api/datetime.rst:69 +#, fuzzy +msgid "" +"Return true if *ob* is of type :c:data:`PyDateTime_DeltaType` or a subtype " +"of :c:data:`PyDateTime_DeltaType`. *ob* must not be ``NULL``. This " +"function always succeeds." +msgstr "" +"Renvoie vrai si *ob* est de type :c:data:`PyDateTime_DeltaType` ou un sous-" +"type de :c:data:`PyDateTime_DeltaType`. *ob* ne doit pas être *NULL*." + +#: c-api/datetime.rst:76 +#, fuzzy +msgid "" +"Return true if *ob* is of type :c:data:`PyDateTime_DeltaType`. *ob* must not " +"be ``NULL``. This function always succeeds." +msgstr "" +"Renvoie vrai si *ob* est de type :c:data:`PyDateTime_DeltaType`. *ob* ne " +"doit pas être *NULL*." + +#: c-api/datetime.rst:82 +#, fuzzy +msgid "" +"Return true if *ob* is of type :c:data:`PyDateTime_TZInfoType` or a subtype " +"of :c:data:`PyDateTime_TZInfoType`. *ob* must not be ``NULL``. This " +"function always succeeds." +msgstr "" +"Renvoie vrai si *ob* est de type :c:data:`PyDateTime_TZInfoType` ou un sous-" +"type de :c:data:`PyDateTime_TZInfoType`. *ob* ne doit pas être *NULL*." + +#: c-api/datetime.rst:89 +#, fuzzy +msgid "" +"Return true if *ob* is of type :c:data:`PyDateTime_TZInfoType`. *ob* must " +"not be ``NULL``. This function always succeeds." +msgstr "" +"Renvoie vrai si *ob* est de type :c:data:`PyDateTime_TZInfoType`. *ob* ne " +"doit pas être *NULL*." + +#: c-api/datetime.rst:93 +msgid "Macros to create objects:" +msgstr "Macros pour créer des objets :" + +#: c-api/datetime.rst:97 +msgid "" +"Return a :class:`datetime.date` object with the specified year, month and " +"day." +msgstr "" +"Renvoie un objet :class:`datetime.date` avec l'année, le mois et le jour " +"spécifiés." + +#: c-api/datetime.rst:102 +msgid "" +"Return a :class:`datetime.datetime` object with the specified year, month, " +"day, hour, minute, second and microsecond." +msgstr "" +"Renvoie un objet :class:`datetime.datetime` avec l'année, le mois, le jour, " +"l'heure, la minute, la seconde et la microseconde spécifiés." + +#: c-api/datetime.rst:108 +msgid "" +"Return a :class:`datetime.datetime` object with the specified year, month, " +"day, hour, minute, second, microsecond and fold." +msgstr "" +"Renvoie un objet :class:`datetime.datetime` avec l'année, le mois, le jour, " +"l'heure, la minute, la seconde, la microseconde et le pli (*fold* en " +"anglais) spécifiés." + +#: c-api/datetime.rst:116 +msgid "" +"Return a :class:`datetime.time` object with the specified hour, minute, " +"second and microsecond." +msgstr "" +"Renvoie un objet :class:`datetime.time` avec l'heure, la minute, la seconde " +"et la microseconde spécifiées." + +#: c-api/datetime.rst:122 +msgid "" +"Return a :class:`datetime.time` object with the specified hour, minute, " +"second, microsecond and fold." +msgstr "" +"Renvoie un objet :class:`datetime.time` avec l'heure, la minute, la seconde, " +"la microseconde et le pli (*fold* en anglais) spécifiés." + +#: c-api/datetime.rst:130 +msgid "" +"Return a :class:`datetime.timedelta` object representing the given number of " +"days, seconds and microseconds. Normalization is performed so that the " +"resulting number of microseconds and seconds lie in the ranges documented " +"for :class:`datetime.timedelta` objects." +msgstr "" +"Renvoie un objet :class:`datetime.timedelta` représentant le nombre passé en " +"paramètre de jours, de secondes et de microsecondes. Le résultat est " +"normalisé pour que le nombre de microsecondes et de secondes tombe dans la " +"plage documentée pour les objets :class:`datetime.timedelta`." + +#: c-api/datetime.rst:138 +msgid "" +"Return a :class:`datetime.timezone` object with an unnamed fixed offset " +"represented by the *offset* argument." +msgstr "" +"Renvoie un objet :class:`datetime.timezone` avec un décalage anonyme fixe " +"représenté par l'argument *offset*." + +#: c-api/datetime.rst:146 +msgid "" +"Return a :class:`datetime.timezone` object with a fixed offset represented " +"by the *offset* argument and with tzname *name*." +msgstr "" +"Renvoie un objet :class:`datetime.timezone` avec un décalage fixe représenté " +"par l'argument *offset* et avec le nom de fuseau horaire *name*." + +#: c-api/datetime.rst:152 +#, fuzzy +msgid "" +"Macros to extract fields from date objects. The argument must be an " +"instance of :c:data:`PyDateTime_Date`, including subclasses (such as :c:data:" +"`PyDateTime_DateTime`). The argument must not be ``NULL``, and the type is " +"not checked:" +msgstr "" +"Macros pour extraire les champs des objets *date*. L'argument doit être une " +"instance de :c:data:`PyDateTime_Date`, ou une sous-classe (telle que :c:data:" +"`PyDateTime_DateTime`). L'argument ne doit pas être *NULL*, et le type n'est " +"pas vérifié :" + +#: c-api/datetime.rst:159 +msgid "Return the year, as a positive int." +msgstr "Renvoie l'année, sous forme d'entier positif." + +#: c-api/datetime.rst:164 +msgid "Return the month, as an int from 1 through 12." +msgstr "Renvoie le mois, sous forme d'entier allant de 1 à 12." + +#: c-api/datetime.rst:169 +msgid "Return the day, as an int from 1 through 31." +msgstr "Renvoie le jour, sous forme d'entier allant de 1 à 31." + +#: c-api/datetime.rst:172 +#, fuzzy +msgid "" +"Macros to extract fields from datetime objects. The argument must be an " +"instance of :c:data:`PyDateTime_DateTime`, including subclasses. The " +"argument must not be ``NULL``, and the type is not checked:" +msgstr "" +"Macros pour extraire les champs des objets *datetime*. L'argument doit être " +"une instance de :c:data:`PyDateTime_DateTime` ou une sous-classe de celle-" +"ci. L'argument ne doit pas être *NULL*, et le type n'est pas vérifié :" + +#: c-api/datetime.rst:216 +msgid "Return the hour, as an int from 0 through 23." +msgstr "Renvoie l'heure, sous forme d'entier allant de 0 à 23." + +#: c-api/datetime.rst:221 +msgid "Return the minute, as an int from 0 through 59." +msgstr "Renvoie la minute, sous forme d'entier allant de 0 à 59." + +#: c-api/datetime.rst:226 +msgid "Return the second, as an int from 0 through 59." +msgstr "Renvoie la seconde, sous forme d'entier allant de 0 à 59." + +#: c-api/datetime.rst:231 +msgid "Return the microsecond, as an int from 0 through 999999." +msgstr "Renvoie la microseconde, sous forme d'entier allant de 0 à 999999." + +#: c-api/datetime.rst:236 +#, fuzzy +msgid "Return the fold, as an int from 0 through 1." +msgstr "Renvoie le jour, sous forme d'entier allant de 1 à 31." + +#: c-api/datetime.rst:243 +msgid "Return the tzinfo (which may be ``None``)." +msgstr "" + +#: c-api/datetime.rst:210 +#, fuzzy +msgid "" +"Macros to extract fields from time objects. The argument must be an " +"instance of :c:data:`PyDateTime_Time`, including subclasses. The argument " +"must not be ``NULL``, and the type is not checked:" +msgstr "" +"Macros pour extraire les champs des objets *time*. L'argument doit être une " +"instance de :c:data:`PyDateTime_Time` ou une sous-classe de celle-ci. " +"L'argument ne doit pas être *NULL*, et le type n'est pas vérifié :" + +#: c-api/datetime.rst:248 +#, fuzzy +msgid "" +"Macros to extract fields from time delta objects. The argument must be an " +"instance of :c:data:`PyDateTime_Delta`, including subclasses. The argument " +"must not be ``NULL``, and the type is not checked:" +msgstr "" +"Macros pour extraire les champs des objets *time delta*. L'argument doit " +"être une instance de :c:data:`PyDateTime_Delta` ou une sous-classe de celle-" +"ci. L'argument ne doit pas être *NULL*, et le type n'est pas vérifié :" + +#: c-api/datetime.rst:254 +msgid "Return the number of days, as an int from -999999999 to 999999999." +msgstr "" +"Renvoie le nombre de jours, sous forme d'entier allant de ``-999999999`` à " +"``999999999``." + +#: c-api/datetime.rst:261 +msgid "Return the number of seconds, as an int from 0 through 86399." +msgstr "Renvoie le nombre de secondes sous forme d'entier allant de 0 à 86399." + +#: c-api/datetime.rst:268 +msgid "Return the number of microseconds, as an int from 0 through 999999." +msgstr "" +"Renvoie le nombre de microsecondes, sous forme d'entier allant de 0 à 999999." + +#: c-api/datetime.rst:273 +msgid "Macros for the convenience of modules implementing the DB API:" +msgstr "Macros de confort pour les modules implémentant l'API DB :" + +#: c-api/datetime.rst:277 +msgid "" +"Create and return a new :class:`datetime.datetime` object given an argument " +"tuple suitable for passing to :meth:`datetime.datetime.fromtimestamp()`." +msgstr "" +"Crée et renvoie un nouvel objet :class:`datetime.datetime` à partir d'un n-" +"uplet qui peut être passé à :meth:`datetime.datetime.fromtimestamp()`." + +#: c-api/datetime.rst:283 +msgid "" +"Create and return a new :class:`datetime.date` object given an argument " +"tuple suitable for passing to :meth:`datetime.date.fromtimestamp()`." +msgstr "" +"Crée et renvoie un nouvel objet :class:`datetime.date` à partir d'un *n*-" +"uplet qui peut être passé à :meth:`datetime.date.fromtimestamp()`." diff --git a/c-api/descriptor.po b/c-api/descriptor.po new file mode 100644 index 0000000000..b9eae213d3 --- /dev/null +++ b/c-api/descriptor.po @@ -0,0 +1,42 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-09-23 16:16+0200\n" +"PO-Revision-Date: 2018-02-15 00:32+0100\n" +"Last-Translator: Julien Palard \n" +"Language-Team: FRENCH \n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: c-api/descriptor.rst:6 +msgid "Descriptor Objects" +msgstr "Les descripteurs" + +#: c-api/descriptor.rst:8 +msgid "" +"\"Descriptors\" are objects that describe some attribute of an object. They " +"are found in the dictionary of type objects." +msgstr "" +"Les \"Descripteurs\" sont des objets décrivant des attributs pour un objet. " +"Ils se trouvent dans le dictionnaire du type de l'objet." + +#: c-api/descriptor.rst:15 +msgid "The type object for the built-in descriptor types." +msgstr "L'objet *type* des descripteurs natifs." + +#: c-api/descriptor.rst:35 +#, fuzzy +msgid "" +"Return non-zero if the descriptor objects *descr* describes a data " +"attribute, or ``0`` if it describes a method. *descr* must be a descriptor " +"object; there is no error checking." +msgstr "" +"Renvoie vrai si le descripteur *descr* décrit un attribut de donnée, ou faux " +"s'il décrit une méthode. *descr* doit être un objet descripteur. Il n'y a " +"pas de vérification d'erreur." diff --git a/c-api/dict.po b/c-api/dict.po new file mode 100644 index 0000000000..4ec951e3a1 --- /dev/null +++ b/c-api/dict.po @@ -0,0 +1,229 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-22 22:57+0100\n" +"PO-Revision-Date: 2018-07-03 11:36+0200\n" +"Last-Translator: FULL NAME \n" +"Language-Team: FRENCH \n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: c-api/dict.rst:6 +msgid "Dictionary Objects" +msgstr "Objets dictionnaires" + +#: c-api/dict.rst:13 +#, fuzzy +msgid "" +"This subtype of :c:type:`PyObject` represents a Python dictionary object." +msgstr "" +"Ce sous-type de :c:type:`PyObject` représente un objet ``bytearray`` Python." + +#: c-api/dict.rst:18 +#, fuzzy +msgid "" +"This instance of :c:type:`PyTypeObject` represents the Python dictionary " +"type. This is the same object as :class:`dict` in the Python layer." +msgstr "" +"Cette instance de l'objet :c:type:`PyTypeObject` représente le type nombre à " +"virgule flottante en Python. C'est le même objet que la classe :class:" +"`float` de la couche Python." + +#: c-api/dict.rst:24 +msgid "" +"Return true if *p* is a dict object or an instance of a subtype of the dict " +"type. This function always succeeds." +msgstr "" + +#: c-api/dict.rst:30 +msgid "" +"Return true if *p* is a dict object, but not an instance of a subtype of the " +"dict type. This function always succeeds." +msgstr "" + +#: c-api/dict.rst:36 +msgid "Return a new empty dictionary, or ``NULL`` on failure." +msgstr "" + +#: c-api/dict.rst:41 +msgid "" +"Return a :class:`types.MappingProxyType` object for a mapping which enforces " +"read-only behavior. This is normally used to create a view to prevent " +"modification of the dictionary for non-dynamic class types." +msgstr "" + +#: c-api/dict.rst:48 +msgid "Empty an existing dictionary of all key-value pairs." +msgstr "" + +#: c-api/dict.rst:53 +msgid "" +"Determine if dictionary *p* contains *key*. If an item in *p* is matches " +"*key*, return ``1``, otherwise return ``0``. On error, return ``-1``. This " +"is equivalent to the Python expression ``key in p``." +msgstr "" + +#: c-api/dict.rst:60 +msgid "Return a new dictionary that contains the same key-value pairs as *p*." +msgstr "" + +#: c-api/dict.rst:65 +msgid "" +"Insert *val* into the dictionary *p* with a key of *key*. *key* must be :" +"term:`hashable`; if it isn't, :exc:`TypeError` will be raised. Return ``0`` " +"on success or ``-1`` on failure. This function *does not* steal a reference " +"to *val*." +msgstr "" + +#: c-api/dict.rst:75 +msgid "" +"Insert *val* into the dictionary *p* using *key* as a key. *key* should be " +"a :c:expr:`const char*`. The key object is created using " +"``PyUnicode_FromString(key)``. Return ``0`` on success or ``-1`` on " +"failure. This function *does not* steal a reference to *val*." +msgstr "" + +#: c-api/dict.rst:83 +msgid "" +"Remove the entry in dictionary *p* with key *key*. *key* must be :term:" +"`hashable`; if it isn't, :exc:`TypeError` is raised. If *key* is not in the " +"dictionary, :exc:`KeyError` is raised. Return ``0`` on success or ``-1`` on " +"failure." +msgstr "" + +#: c-api/dict.rst:91 +msgid "" +"Remove the entry in dictionary *p* which has a key specified by the string " +"*key*. If *key* is not in the dictionary, :exc:`KeyError` is raised. Return " +"``0`` on success or ``-1`` on failure." +msgstr "" + +#: c-api/dict.rst:98 +msgid "" +"Return the object from dictionary *p* which has a key *key*. Return " +"``NULL`` if the key *key* is not present, but *without* setting an exception." +msgstr "" + +#: c-api/dict.rst:101 +msgid "" +"Note that exceptions which occur while calling :meth:`__hash__` and :meth:" +"`__eq__` methods will get suppressed. To get error reporting use :c:func:" +"`PyDict_GetItemWithError()` instead." +msgstr "" + +#: c-api/dict.rst:105 +msgid "" +"Calling this API without :term:`GIL` held had been allowed for historical " +"reason. It is no longer allowed." +msgstr "" + +#: c-api/dict.rst:112 +msgid "" +"Variant of :c:func:`PyDict_GetItem` that does not suppress exceptions. " +"Return ``NULL`` **with** an exception set if an exception occurred. Return " +"``NULL`` **without** an exception set if the key wasn't present." +msgstr "" + +#: c-api/dict.rst:120 +msgid "" +"This is the same as :c:func:`PyDict_GetItem`, but *key* is specified as a :c:" +"expr:`const char*`, rather than a :c:expr:`PyObject*`." +msgstr "" + +#: c-api/dict.rst:123 +msgid "" +"Note that exceptions which occur while calling :meth:`__hash__` and :meth:" +"`__eq__` methods and creating a temporary string object will get suppressed. " +"To get error reporting use :c:func:`PyDict_GetItemWithError()` instead." +msgstr "" + +#: c-api/dict.rst:131 +msgid "" +"This is the same as the Python-level :meth:`dict.setdefault`. If present, " +"it returns the value corresponding to *key* from the dictionary *p*. If the " +"key is not in the dict, it is inserted with value *defaultobj* and " +"*defaultobj* is returned. This function evaluates the hash function of " +"*key* only once, instead of evaluating it independently for the lookup and " +"the insertion." +msgstr "" + +#: c-api/dict.rst:141 +msgid "" +"Return a :c:type:`PyListObject` containing all the items from the dictionary." +msgstr "" + +#: c-api/dict.rst:146 +msgid "" +"Return a :c:type:`PyListObject` containing all the keys from the dictionary." +msgstr "" + +#: c-api/dict.rst:151 +msgid "" +"Return a :c:type:`PyListObject` containing all the values from the " +"dictionary *p*." +msgstr "" + +#: c-api/dict.rst:159 +msgid "" +"Return the number of items in the dictionary. This is equivalent to " +"``len(p)`` on a dictionary." +msgstr "" + +#: c-api/dict.rst:165 +msgid "" +"Iterate over all key-value pairs in the dictionary *p*. The :c:type:" +"`Py_ssize_t` referred to by *ppos* must be initialized to ``0`` prior to the " +"first call to this function to start the iteration; the function returns " +"true for each pair in the dictionary, and false once all pairs have been " +"reported. The parameters *pkey* and *pvalue* should either point to :c:expr:" +"`PyObject*` variables that will be filled in with each key and value, " +"respectively, or may be ``NULL``. Any references returned through them are " +"borrowed. *ppos* should not be altered during iteration. Its value " +"represents offsets within the internal dictionary structure, and since the " +"structure is sparse, the offsets are not consecutive." +msgstr "" + +#: c-api/dict.rst:176 +msgid "For example::" +msgstr "Par exemple ::" + +#: c-api/dict.rst:186 +msgid "" +"The dictionary *p* should not be mutated during iteration. It is safe to " +"modify the values of the keys as you iterate over the dictionary, but only " +"so long as the set of keys does not change. For example::" +msgstr "" + +#: c-api/dict.rst:211 +msgid "" +"Iterate over mapping object *b* adding key-value pairs to dictionary *a*. " +"*b* may be a dictionary, or any object supporting :c:func:`PyMapping_Keys` " +"and :c:func:`PyObject_GetItem`. If *override* is true, existing pairs in *a* " +"will be replaced if a matching key is found in *b*, otherwise pairs will " +"only be added if there is not a matching key in *a*. Return ``0`` on success " +"or ``-1`` if an exception was raised." +msgstr "" + +#: c-api/dict.rst:221 +msgid "" +"This is the same as ``PyDict_Merge(a, b, 1)`` in C, and is similar to ``a." +"update(b)`` in Python except that :c:func:`PyDict_Update` doesn't fall back " +"to the iterating over a sequence of key value pairs if the second argument " +"has no \"keys\" attribute. Return ``0`` on success or ``-1`` if an " +"exception was raised." +msgstr "" + +#: c-api/dict.rst:230 +msgid "" +"Update or merge into dictionary *a*, from the key-value pairs in *seq2*. " +"*seq2* must be an iterable object producing iterable objects of length 2, " +"viewed as key-value pairs. In case of duplicate keys, the last wins if " +"*override* is true, else the first wins. Return ``0`` on success or ``-1`` " +"if an exception was raised. Equivalent Python (except for the return value)::" +msgstr "" diff --git a/c-api/exceptions.po b/c-api/exceptions.po new file mode 100644 index 0000000000..533e9b28e5 --- /dev/null +++ b/c-api/exceptions.po @@ -0,0 +1,1503 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-18 15:46+0200\n" +"PO-Revision-Date: 2018-10-04 12:24+0200\n" +"Last-Translator: Julien Palard \n" +"Language-Team: FRENCH \n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 1.8.11\n" + +#: c-api/exceptions.rst:8 +msgid "Exception Handling" +msgstr "Gestion des exceptions" + +#: c-api/exceptions.rst:10 +msgid "" +"The functions described in this chapter will let you handle and raise Python " +"exceptions. It is important to understand some of the basics of Python " +"exception handling. It works somewhat like the POSIX :c:data:`errno` " +"variable: there is a global indicator (per thread) of the last error that " +"occurred. Most C API functions don't clear this on success, but will set it " +"to indicate the cause of the error on failure. Most C API functions also " +"return an error indicator, usually ``NULL`` if they are supposed to return a " +"pointer, or ``-1`` if they return an integer (exception: the ``PyArg_*`` " +"functions return ``1`` for success and ``0`` for failure)." +msgstr "" + +#: c-api/exceptions.rst:20 +msgid "" +"Concretely, the error indicator consists of three object pointers: the " +"exception's type, the exception's value, and the traceback object. Any of " +"those pointers can be ``NULL`` if non-set (although some combinations are " +"forbidden, for example you can't have a non-``NULL`` traceback if the " +"exception type is ``NULL``)." +msgstr "" + +#: c-api/exceptions.rst:26 +msgid "" +"When a function must fail because some function it called failed, it " +"generally doesn't set the error indicator; the function it called already " +"set it. It is responsible for either handling the error and clearing the " +"exception or returning after cleaning up any resources it holds (such as " +"object references or memory allocations); it should *not* continue normally " +"if it is not prepared to handle the error. If returning due to an error, it " +"is important to indicate to the caller that an error has been set. If the " +"error is not handled or carefully propagated, additional calls into the " +"Python/C API may not behave as intended and may fail in mysterious ways." +msgstr "" + +#: c-api/exceptions.rst:37 +msgid "" +"The error indicator is **not** the result of :func:`sys.exc_info()`. The " +"former corresponds to an exception that is not yet caught (and is therefore " +"still propagating), while the latter returns an exception after it is caught " +"(and has therefore stopped propagating)." +msgstr "" + +#: c-api/exceptions.rst:44 +msgid "Printing and clearing" +msgstr "" + +#: c-api/exceptions.rst:49 +msgid "" +"Clear the error indicator. If the error indicator is not set, there is no " +"effect." +msgstr "" + +#: c-api/exceptions.rst:55 +msgid "" +"Print a standard traceback to ``sys.stderr`` and clear the error indicator. " +"**Unless** the error is a ``SystemExit``, in that case no traceback is " +"printed and the Python process will exit with the error code specified by " +"the ``SystemExit`` instance." +msgstr "" + +#: c-api/exceptions.rst:60 +msgid "" +"Call this function **only** when the error indicator is set. Otherwise it " +"will cause a fatal error!" +msgstr "" + +#: c-api/exceptions.rst:63 +msgid "" +"If *set_sys_last_vars* is nonzero, the variables :data:`sys.last_type`, :" +"data:`sys.last_value` and :data:`sys.last_traceback` will be set to the " +"type, value and traceback of the printed exception, respectively." +msgstr "" + +#: c-api/exceptions.rst:70 +msgid "Alias for ``PyErr_PrintEx(1)``." +msgstr "" + +#: c-api/exceptions.rst:75 +msgid "" +"Call :func:`sys.unraisablehook` using the current exception and *obj* " +"argument." +msgstr "" + +#: c-api/exceptions.rst:78 +msgid "" +"This utility function prints a warning message to ``sys.stderr`` when an " +"exception has been set but it is impossible for the interpreter to actually " +"raise the exception. It is used, for example, when an exception occurs in " +"an :meth:`__del__` method." +msgstr "" + +#: c-api/exceptions.rst:83 +msgid "" +"The function is called with a single argument *obj* that identifies the " +"context in which the unraisable exception occurred. If possible, the repr of " +"*obj* will be printed in the warning message." +msgstr "" + +#: c-api/exceptions.rst:87 +msgid "An exception must be set when calling this function." +msgstr "" + +#: c-api/exceptions.rst:91 +msgid "Raising exceptions" +msgstr "Lever des exceptions" + +#: c-api/exceptions.rst:93 +msgid "" +"These functions help you set the current thread's error indicator. For " +"convenience, some of these functions will always return a ``NULL`` pointer " +"for use in a ``return`` statement." +msgstr "" + +#: c-api/exceptions.rst:100 +msgid "" +"This is the most common way to set the error indicator. The first argument " +"specifies the exception type; it is normally one of the standard exceptions, " +"e.g. :c:data:`PyExc_RuntimeError`. You need not increment its reference " +"count. The second argument is an error message; it is decoded from " +"``'utf-8'``." +msgstr "" + +#: c-api/exceptions.rst:108 +msgid "" +"This function is similar to :c:func:`PyErr_SetString` but lets you specify " +"an arbitrary Python object for the \"value\" of the exception." +msgstr "" + +#: c-api/exceptions.rst:114 +msgid "" +"This function sets the error indicator and returns ``NULL``. *exception* " +"should be a Python exception class. The *format* and subsequent parameters " +"help format the error message; they have the same meaning and values as in :" +"c:func:`PyUnicode_FromFormat`. *format* is an ASCII-encoded string." +msgstr "" + +#: c-api/exceptions.rst:123 +msgid "" +"Same as :c:func:`PyErr_Format`, but taking a :c:type:`va_list` argument " +"rather than a variable number of arguments." +msgstr "" + +#: c-api/exceptions.rst:131 +msgid "This is a shorthand for ``PyErr_SetObject(type, Py_None)``." +msgstr "" + +#: c-api/exceptions.rst:136 +msgid "" +"This is a shorthand for ``PyErr_SetString(PyExc_TypeError, message)``, where " +"*message* indicates that a built-in operation was invoked with an illegal " +"argument. It is mostly for internal use." +msgstr "" + +#: c-api/exceptions.rst:143 +msgid "" +"This is a shorthand for ``PyErr_SetNone(PyExc_MemoryError)``; it returns " +"``NULL`` so an object allocation function can write ``return " +"PyErr_NoMemory();`` when it runs out of memory." +msgstr "" + +#: c-api/exceptions.rst:152 +msgid "" +"This is a convenience function to raise an exception when a C library " +"function has returned an error and set the C variable :c:data:`errno`. It " +"constructs a tuple object whose first item is the integer :c:data:`errno` " +"value and whose second item is the corresponding error message (gotten from :" +"c:func:`strerror`), and then calls ``PyErr_SetObject(type, object)``. On " +"Unix, when the :c:data:`errno` value is :const:`EINTR`, indicating an " +"interrupted system call, this calls :c:func:`PyErr_CheckSignals`, and if " +"that set the error indicator, leaves it set to that. The function always " +"returns ``NULL``, so a wrapper function around a system call can write " +"``return PyErr_SetFromErrno(type);`` when the system call returns an error." +msgstr "" + +#: c-api/exceptions.rst:166 +msgid "" +"Similar to :c:func:`PyErr_SetFromErrno`, with the additional behavior that " +"if *filenameObject* is not ``NULL``, it is passed to the constructor of " +"*type* as a third parameter. In the case of :exc:`OSError` exception, this " +"is used to define the :attr:`filename` attribute of the exception instance." +msgstr "" + +#: c-api/exceptions.rst:175 +msgid "" +"Similar to :c:func:`PyErr_SetFromErrnoWithFilenameObject`, but takes a " +"second filename object, for raising errors when a function that takes two " +"filenames fails." +msgstr "" + +#: c-api/exceptions.rst:184 +msgid "" +"Similar to :c:func:`PyErr_SetFromErrnoWithFilenameObject`, but the filename " +"is given as a C string. *filename* is decoded from the :term:`filesystem " +"encoding and error handler`." +msgstr "" + +#: c-api/exceptions.rst:191 +msgid "" +"This is a convenience function to raise :exc:`WindowsError`. If called with " +"*ierr* of ``0``, the error code returned by a call to :c:func:`GetLastError` " +"is used instead. It calls the Win32 function :c:func:`FormatMessage` to " +"retrieve the Windows description of error code given by *ierr* or :c:func:" +"`GetLastError`, then it constructs a tuple object whose first item is the " +"*ierr* value and whose second item is the corresponding error message " +"(gotten from :c:func:`FormatMessage`), and then calls " +"``PyErr_SetObject(PyExc_WindowsError, object)``. This function always " +"returns ``NULL``." +msgstr "" + +#: c-api/exceptions.rst:208 c-api/exceptions.rst:225 c-api/exceptions.rst:243 +msgid ":ref:`Availability `: Windows." +msgstr ":ref:`Disponibilité ` : Windows." + +#: c-api/exceptions.rst:205 +msgid "" +"Similar to :c:func:`PyErr_SetFromWindowsErr`, with an additional parameter " +"specifying the exception type to be raised." +msgstr "" + +#: c-api/exceptions.rst:213 +msgid "" +"Similar to :c:func:`PyErr_SetFromWindowsErrWithFilenameObject`, but the " +"filename is given as a C string. *filename* is decoded from the filesystem " +"encoding (:func:`os.fsdecode`)." +msgstr "" + +#: c-api/exceptions.rst:222 +msgid "" +"Similar to :c:func:`PyErr_SetFromWindowsErrWithFilenameObject`, with an " +"additional parameter specifying the exception type to be raised." +msgstr "" + +#: c-api/exceptions.rst:230 +msgid "" +"Similar to :c:func:`PyErr_SetExcFromWindowsErrWithFilenameObject`, but " +"accepts a second filename object." +msgstr "" + +#: c-api/exceptions.rst:240 +msgid "" +"Similar to :c:func:`PyErr_SetFromWindowsErrWithFilename`, with an additional " +"parameter specifying the exception type to be raised." +msgstr "" + +#: c-api/exceptions.rst:248 +msgid "" +"This is a convenience function to raise :exc:`ImportError`. *msg* will be " +"set as the exception's message string. *name* and *path*, both of which can " +"be ``NULL``, will be set as the :exc:`ImportError`'s respective ``name`` and " +"``path`` attributes." +msgstr "" + +#: c-api/exceptions.rst:258 +msgid "" +"Much like :c:func:`PyErr_SetImportError` but this function allows for " +"specifying a subclass of :exc:`ImportError` to raise." +msgstr "" + +#: c-api/exceptions.rst:266 +msgid "" +"Set file, line, and offset information for the current exception. If the " +"current exception is not a :exc:`SyntaxError`, then it sets additional " +"attributes, which make the exception printing subsystem think the exception " +"is a :exc:`SyntaxError`." +msgstr "" + +#: c-api/exceptions.rst:276 +msgid "" +"Like :c:func:`PyErr_SyntaxLocationObject`, but *filename* is a byte string " +"decoded from the :term:`filesystem encoding and error handler`." +msgstr "" + +#: c-api/exceptions.rst:284 +msgid "" +"Like :c:func:`PyErr_SyntaxLocationEx`, but the *col_offset* parameter is " +"omitted." +msgstr "" + +#: c-api/exceptions.rst:290 +msgid "" +"This is a shorthand for ``PyErr_SetString(PyExc_SystemError, message)``, " +"where *message* indicates that an internal operation (e.g. a Python/C API " +"function) was invoked with an illegal argument. It is mostly for internal " +"use." +msgstr "" + +#: c-api/exceptions.rst:297 +msgid "Issuing warnings" +msgstr "" + +#: c-api/exceptions.rst:299 +msgid "" +"Use these functions to issue warnings from C code. They mirror similar " +"functions exported by the Python :mod:`warnings` module. They normally " +"print a warning message to *sys.stderr*; however, it is also possible that " +"the user has specified that warnings are to be turned into errors, and in " +"that case they will raise an exception. It is also possible that the " +"functions raise an exception because of a problem with the warning " +"machinery. The return value is ``0`` if no exception is raised, or ``-1`` if " +"an exception is raised. (It is not possible to determine whether a warning " +"message is actually printed, nor what the reason is for the exception; this " +"is intentional.) If an exception is raised, the caller should do its normal " +"exception handling (for example, :c:func:`Py_DECREF` owned references and " +"return an error value)." +msgstr "" + +#: c-api/exceptions.rst:314 +msgid "" +"Issue a warning message. The *category* argument is a warning category (see " +"below) or ``NULL``; the *message* argument is a UTF-8 encoded string. " +"*stack_level* is a positive number giving a number of stack frames; the " +"warning will be issued from the currently executing line of code in that " +"stack frame. A *stack_level* of 1 is the function calling :c:func:" +"`PyErr_WarnEx`, 2 is the function above that, and so forth." +msgstr "" + +#: c-api/exceptions.rst:321 +msgid "" +"Warning categories must be subclasses of :c:data:`PyExc_Warning`; :c:data:" +"`PyExc_Warning` is a subclass of :c:data:`PyExc_Exception`; the default " +"warning category is :c:data:`PyExc_RuntimeWarning`. The standard Python " +"warning categories are available as global variables whose names are " +"enumerated at :ref:`standardwarningcategories`." +msgstr "" + +#: c-api/exceptions.rst:327 +msgid "" +"For information about warning control, see the documentation for the :mod:" +"`warnings` module and the :option:`-W` option in the command line " +"documentation. There is no C API for warning control." +msgstr "" + +#: c-api/exceptions.rst:334 +msgid "" +"Issue a warning message with explicit control over all warning attributes. " +"This is a straightforward wrapper around the Python function :func:`warnings." +"warn_explicit`; see there for more information. The *module* and *registry* " +"arguments may be set to ``NULL`` to get the default effect described there." +msgstr "" + +#: c-api/exceptions.rst:345 +msgid "" +"Similar to :c:func:`PyErr_WarnExplicitObject` except that *message* and " +"*module* are UTF-8 encoded strings, and *filename* is decoded from the :term:" +"`filesystem encoding and error handler`." +msgstr "" + +#: c-api/exceptions.rst:352 +msgid "" +"Function similar to :c:func:`PyErr_WarnEx`, but use :c:func:" +"`PyUnicode_FromFormat` to format the warning message. *format* is an ASCII-" +"encoded string." +msgstr "" + +#: c-api/exceptions.rst:361 +msgid "" +"Function similar to :c:func:`PyErr_WarnFormat`, but *category* is :exc:" +"`ResourceWarning` and it passes *source* to :func:`warnings.WarningMessage`." +msgstr "" + +#: c-api/exceptions.rst:368 +msgid "Querying the error indicator" +msgstr "" + +#: c-api/exceptions.rst:372 +msgid "" +"Test whether the error indicator is set. If set, return the exception " +"*type* (the first argument to the last call to one of the ``PyErr_Set*`` " +"functions or to :c:func:`PyErr_Restore`). If not set, return ``NULL``. You " +"do not own a reference to the return value, so you do not need to :c:func:" +"`Py_DECREF` it." +msgstr "" + +#: c-api/exceptions.rst:378 +msgid "The caller must hold the GIL." +msgstr "" + +#: c-api/exceptions.rst:382 +msgid "" +"Do not compare the return value to a specific exception; use :c:func:" +"`PyErr_ExceptionMatches` instead, shown below. (The comparison could easily " +"fail since the exception may be an instance instead of a class, in the case " +"of a class exception, or it may be a subclass of the expected exception.)" +msgstr "" + +#: c-api/exceptions.rst:390 +msgid "" +"Equivalent to ``PyErr_GivenExceptionMatches(PyErr_Occurred(), exc)``. This " +"should only be called when an exception is actually set; a memory access " +"violation will occur if no exception has been raised." +msgstr "" + +#: c-api/exceptions.rst:397 +msgid "" +"Return true if the *given* exception matches the exception type in *exc*. " +"If *exc* is a class object, this also returns true when *given* is an " +"instance of a subclass. If *exc* is a tuple, all exception types in the " +"tuple (and recursively in subtuples) are searched for a match." +msgstr "" + +#: c-api/exceptions.rst:405 +msgid "" +"Retrieve the error indicator into three variables whose addresses are " +"passed. If the error indicator is not set, set all three variables to " +"``NULL``. If it is set, it will be cleared and you own a reference to each " +"object retrieved. The value and traceback object may be ``NULL`` even when " +"the type object is not." +msgstr "" + +#: c-api/exceptions.rst:412 +msgid "" +"This function is normally only used by code that needs to catch exceptions " +"or by code that needs to save and restore the error indicator temporarily, e." +"g.::" +msgstr "" + +#: c-api/exceptions.rst:427 +msgid "" +"Set the error indicator from the three objects. If the error indicator is " +"already set, it is cleared first. If the objects are ``NULL``, the error " +"indicator is cleared. Do not pass a ``NULL`` type and non-``NULL`` value or " +"traceback. The exception type should be a class. Do not pass an invalid " +"exception type or value. (Violating these rules will cause subtle problems " +"later.) This call takes away a reference to each object: you must own a " +"reference to each object before the call and after the call you no longer " +"own these references. (If you don't understand this, don't use this " +"function. I warned you.)" +msgstr "" + +#: c-api/exceptions.rst:439 +msgid "" +"This function is normally only used by code that needs to save and restore " +"the error indicator temporarily. Use :c:func:`PyErr_Fetch` to save the " +"current error indicator." +msgstr "" + +#: c-api/exceptions.rst:446 +msgid "" +"Under certain circumstances, the values returned by :c:func:`PyErr_Fetch` " +"below can be \"unnormalized\", meaning that ``*exc`` is a class object but " +"``*val`` is not an instance of the same class. This function can be used " +"to instantiate the class in that case. If the values are already " +"normalized, nothing happens. The delayed normalization is implemented to " +"improve performance." +msgstr "" + +#: c-api/exceptions.rst:454 +msgid "" +"This function *does not* implicitly set the ``__traceback__`` attribute on " +"the exception value. If setting the traceback appropriately is desired, the " +"following additional snippet is needed::" +msgstr "" + +#: c-api/exceptions.rst:465 +msgid "" +"Retrieve the exception info, as known from ``sys.exc_info()``. This refers " +"to an exception that was *already caught*, not to an exception that was " +"freshly raised. Returns new references for the three objects, any of which " +"may be ``NULL``. Does not modify the exception info state." +msgstr "" + +#: c-api/exceptions.rst:472 +msgid "" +"This function is not normally used by code that wants to handle exceptions. " +"Rather, it can be used when code needs to save and restore the exception " +"state temporarily. Use :c:func:`PyErr_SetExcInfo` to restore or clear the " +"exception state." +msgstr "" + +#: c-api/exceptions.rst:482 +msgid "" +"Set the exception info, as known from ``sys.exc_info()``. This refers to an " +"exception that was *already caught*, not to an exception that was freshly " +"raised. This function steals the references of the arguments. To clear the " +"exception state, pass ``NULL`` for all three arguments. For general rules " +"about the three arguments, see :c:func:`PyErr_Restore`." +msgstr "" + +#: c-api/exceptions.rst:490 +msgid "" +"This function is not normally used by code that wants to handle exceptions. " +"Rather, it can be used when code needs to save and restore the exception " +"state temporarily. Use :c:func:`PyErr_GetExcInfo` to read the exception " +"state." +msgstr "" + +#: c-api/exceptions.rst:499 +msgid "Signal Handling" +msgstr "Traitement des signaux" + +#: c-api/exceptions.rst:509 +msgid "This function interacts with Python's signal handling." +msgstr "" + +#: c-api/exceptions.rst:511 +msgid "" +"If the function is called from the main thread and under the main Python " +"interpreter, it checks whether a signal has been sent to the processes and " +"if so, invokes the corresponding signal handler. If the :mod:`signal` " +"module is supported, this can invoke a signal handler written in Python." +msgstr "" + +#: c-api/exceptions.rst:516 +msgid "" +"The function attempts to handle all pending signals, and then returns ``0``. " +"However, if a Python signal handler raises an exception, the error indicator " +"is set and the function returns ``-1`` immediately (such that other pending " +"signals may not have been handled yet: they will be on the next :c:func:" +"`PyErr_CheckSignals()` invocation)." +msgstr "" + +#: c-api/exceptions.rst:522 +msgid "" +"If the function is called from a non-main thread, or under a non-main Python " +"interpreter, it does nothing and returns ``0``." +msgstr "" + +#: c-api/exceptions.rst:525 +msgid "" +"This function can be called by long-running C code that wants to be " +"interruptible by user requests (such as by pressing Ctrl-C)." +msgstr "" + +#: c-api/exceptions.rst:529 +msgid "" +"The default Python signal handler for :const:`SIGINT` raises the :exc:" +"`KeyboardInterrupt` exception." +msgstr "" + +#: c-api/exceptions.rst:540 +msgid "" +"Simulate the effect of a :const:`SIGINT` signal arriving. This is equivalent " +"to ``PyErr_SetInterruptEx(SIGINT)``." +msgstr "" + +#: c-api/exceptions.rst:571 +msgid "" +"This function is async-signal-safe. It can be called without the :term:" +"`GIL` and from a C signal handler." +msgstr "" + +#: c-api/exceptions.rst:554 +msgid "" +"Simulate the effect of a signal arriving. The next time :c:func:" +"`PyErr_CheckSignals` is called, the Python signal handler for the given " +"signal number will be called." +msgstr "" + +#: c-api/exceptions.rst:558 +msgid "" +"This function can be called by C code that sets up its own signal handling " +"and wants Python signal handlers to be invoked as expected when an " +"interruption is requested (for example when the user presses Ctrl-C to " +"interrupt an operation)." +msgstr "" + +#: c-api/exceptions.rst:563 +msgid "" +"If the given signal isn't handled by Python (it was set to :data:`signal." +"SIG_DFL` or :data:`signal.SIG_IGN`), it will be ignored." +msgstr "" + +#: c-api/exceptions.rst:566 +msgid "" +"If *signum* is outside of the allowed range of signal numbers, ``-1`` is " +"returned. Otherwise, ``0`` is returned. The error indicator is never " +"changed by this function." +msgstr "" + +#: c-api/exceptions.rst:579 +msgid "" +"This utility function specifies a file descriptor to which the signal number " +"is written as a single byte whenever a signal is received. *fd* must be non-" +"blocking. It returns the previous such file descriptor." +msgstr "" + +#: c-api/exceptions.rst:583 +msgid "" +"The value ``-1`` disables the feature; this is the initial state. This is " +"equivalent to :func:`signal.set_wakeup_fd` in Python, but without any error " +"checking. *fd* should be a valid file descriptor. The function should only " +"be called from the main thread." +msgstr "" + +#: c-api/exceptions.rst:588 +msgid "On Windows, the function now also supports socket handles." +msgstr "" + +#: c-api/exceptions.rst:593 +msgid "Exception Classes" +msgstr "" + +#: c-api/exceptions.rst:597 +msgid "" +"This utility function creates and returns a new exception class. The *name* " +"argument must be the name of the new exception, a C string of the form " +"``module.classname``. The *base* and *dict* arguments are normally " +"``NULL``. This creates a class object derived from :exc:`Exception` " +"(accessible in C as :c:data:`PyExc_Exception`)." +msgstr "" + +#: c-api/exceptions.rst:603 +msgid "" +"The :attr:`__module__` attribute of the new class is set to the first part " +"(up to the last dot) of the *name* argument, and the class name is set to " +"the last part (after the last dot). The *base* argument can be used to " +"specify alternate base classes; it can either be only one class or a tuple " +"of classes. The *dict* argument can be used to specify a dictionary of class " +"variables and methods." +msgstr "" + +#: c-api/exceptions.rst:612 +msgid "" +"Same as :c:func:`PyErr_NewException`, except that the new exception class " +"can easily be given a docstring: If *doc* is non-``NULL``, it will be used " +"as the docstring for the exception class." +msgstr "" + +#: c-api/exceptions.rst:620 +msgid "Exception Objects" +msgstr "Objets exception" + +#: c-api/exceptions.rst:624 +msgid "" +"Return the traceback associated with the exception as a new reference, as " +"accessible from Python through :attr:`__traceback__`. If there is no " +"traceback associated, this returns ``NULL``." +msgstr "" + +#: c-api/exceptions.rst:631 +msgid "" +"Set the traceback associated with the exception to *tb*. Use ``Py_None`` to " +"clear it." +msgstr "" + +#: c-api/exceptions.rst:637 +msgid "" +"Return the context (another exception instance during whose handling *ex* " +"was raised) associated with the exception as a new reference, as accessible " +"from Python through :attr:`__context__`. If there is no context associated, " +"this returns ``NULL``." +msgstr "" + +#: c-api/exceptions.rst:645 +msgid "" +"Set the context associated with the exception to *ctx*. Use ``NULL`` to " +"clear it. There is no type check to make sure that *ctx* is an exception " +"instance. This steals a reference to *ctx*." +msgstr "" + +#: c-api/exceptions.rst:652 +msgid "" +"Return the cause (either an exception instance, or :const:`None`, set by " +"``raise ... from ...``) associated with the exception as a new reference, as " +"accessible from Python through :attr:`__cause__`." +msgstr "" + +#: c-api/exceptions.rst:659 +msgid "" +"Set the cause associated with the exception to *cause*. Use ``NULL`` to " +"clear it. There is no type check to make sure that *cause* is either an " +"exception instance or :const:`None`. This steals a reference to *cause*." +msgstr "" + +#: c-api/exceptions.rst:663 +msgid "" +":attr:`__suppress_context__` is implicitly set to ``True`` by this function." +msgstr "" + +#: c-api/exceptions.rst:669 +msgid "Unicode Exception Objects" +msgstr "Objets exception Unicode" + +#: c-api/exceptions.rst:671 +msgid "" +"The following functions are used to create and modify Unicode exceptions " +"from C." +msgstr "" + +#: c-api/exceptions.rst:675 +msgid "" +"Create a :class:`UnicodeDecodeError` object with the attributes *encoding*, " +"*object*, *length*, *start*, *end* and *reason*. *encoding* and *reason* are " +"UTF-8 encoded strings." +msgstr "" + +#: c-api/exceptions.rst:681 +msgid "" +"Create a :class:`UnicodeEncodeError` object with the attributes *encoding*, " +"*object*, *length*, *start*, *end* and *reason*. *encoding* and *reason* are " +"UTF-8 encoded strings." +msgstr "" + +#: c-api/exceptions.rst:695 +msgid "3.11" +msgstr "3.11" + +#: c-api/exceptions.rst:687 +msgid "" +"``Py_UNICODE`` is deprecated since Python 3.3. Please migrate to " +"``PyObject_CallFunction(PyExc_UnicodeEncodeError, \"sOnns\", ...)``." +msgstr "" + +#: c-api/exceptions.rst:692 +msgid "" +"Create a :class:`UnicodeTranslateError` object with the attributes *object*, " +"*length*, *start*, *end* and *reason*. *reason* is a UTF-8 encoded string." +msgstr "" + +#: c-api/exceptions.rst:697 +msgid "" +"``Py_UNICODE`` is deprecated since Python 3.3. Please migrate to " +"``PyObject_CallFunction(PyExc_UnicodeTranslateError, \"Onns\", ...)``." +msgstr "" + +#: c-api/exceptions.rst:703 +msgid "Return the *encoding* attribute of the given exception object." +msgstr "" + +#: c-api/exceptions.rst:709 +msgid "Return the *object* attribute of the given exception object." +msgstr "" + +#: c-api/exceptions.rst:715 +msgid "" +"Get the *start* attribute of the given exception object and place it into " +"*\\*start*. *start* must not be ``NULL``. Return ``0`` on success, ``-1`` " +"on failure." +msgstr "" + +#: c-api/exceptions.rst:723 +msgid "" +"Set the *start* attribute of the given exception object to *start*. Return " +"``0`` on success, ``-1`` on failure." +msgstr "" + +#: c-api/exceptions.rst:730 +msgid "" +"Get the *end* attribute of the given exception object and place it into " +"*\\*end*. *end* must not be ``NULL``. Return ``0`` on success, ``-1`` on " +"failure." +msgstr "" + +#: c-api/exceptions.rst:738 +msgid "" +"Set the *end* attribute of the given exception object to *end*. Return " +"``0`` on success, ``-1`` on failure." +msgstr "" + +#: c-api/exceptions.rst:745 +msgid "Return the *reason* attribute of the given exception object." +msgstr "" + +#: c-api/exceptions.rst:751 +msgid "" +"Set the *reason* attribute of the given exception object to *reason*. " +"Return ``0`` on success, ``-1`` on failure." +msgstr "" + +#: c-api/exceptions.rst:758 +msgid "Recursion Control" +msgstr "Contrôle de la récursion" + +#: c-api/exceptions.rst:760 +msgid "" +"These two functions provide a way to perform safe recursive calls at the C " +"level, both in the core and in extension modules. They are needed if the " +"recursive code does not necessarily invoke Python code (which tracks its " +"recursion depth automatically). They are also not needed for *tp_call* " +"implementations because the :ref:`call protocol ` takes care of " +"recursion handling." +msgstr "" + +#: c-api/exceptions.rst:769 +msgid "Marks a point where a recursive C-level call is about to be performed." +msgstr "" + +#: c-api/exceptions.rst:771 +msgid "" +"If :const:`USE_STACKCHECK` is defined, this function checks if the OS stack " +"overflowed using :c:func:`PyOS_CheckStack`. In this is the case, it sets a :" +"exc:`MemoryError` and returns a nonzero value." +msgstr "" + +#: c-api/exceptions.rst:775 +msgid "" +"The function then checks if the recursion limit is reached. If this is the " +"case, a :exc:`RecursionError` is set and a nonzero value is returned. " +"Otherwise, zero is returned." +msgstr "" + +#: c-api/exceptions.rst:779 +msgid "" +"*where* should be a UTF-8 encoded string such as ``\" in instance check\"`` " +"to be concatenated to the :exc:`RecursionError` message caused by the " +"recursion depth limit." +msgstr "" + +#: c-api/exceptions.rst:791 +msgid "This function is now also available in the limited API." +msgstr "" + +#: c-api/exceptions.rst:788 +msgid "" +"Ends a :c:func:`Py_EnterRecursiveCall`. Must be called once for each " +"*successful* invocation of :c:func:`Py_EnterRecursiveCall`." +msgstr "" + +#: c-api/exceptions.rst:794 +msgid "" +"Properly implementing :c:member:`~PyTypeObject.tp_repr` for container types " +"requires special recursion handling. In addition to protecting the stack, :" +"c:member:`~PyTypeObject.tp_repr` also needs to track objects to prevent " +"cycles. The following two functions facilitate this functionality. " +"Effectively, these are the C equivalent to :func:`reprlib.recursive_repr`." +msgstr "" + +#: c-api/exceptions.rst:802 +msgid "" +"Called at the beginning of the :c:member:`~PyTypeObject.tp_repr` " +"implementation to detect cycles." +msgstr "" + +#: c-api/exceptions.rst:805 +msgid "" +"If the object has already been processed, the function returns a positive " +"integer. In that case the :c:member:`~PyTypeObject.tp_repr` implementation " +"should return a string object indicating a cycle. As examples, :class:" +"`dict` objects return ``{...}`` and :class:`list` objects return ``[...]``." +msgstr "" + +#: c-api/exceptions.rst:811 +msgid "" +"The function will return a negative integer if the recursion limit is " +"reached. In that case the :c:member:`~PyTypeObject.tp_repr` implementation " +"should typically return ``NULL``." +msgstr "" + +#: c-api/exceptions.rst:815 +msgid "" +"Otherwise, the function returns zero and the :c:member:`~PyTypeObject." +"tp_repr` implementation can continue normally." +msgstr "" + +#: c-api/exceptions.rst:820 +msgid "" +"Ends a :c:func:`Py_ReprEnter`. Must be called once for each invocation of :" +"c:func:`Py_ReprEnter` that returns zero." +msgstr "" + +#: c-api/exceptions.rst:827 +msgid "Standard Exceptions" +msgstr "Exceptions standards" + +#: c-api/exceptions.rst:829 +msgid "" +"All standard Python exceptions are available as global variables whose names " +"are ``PyExc_`` followed by the Python exception name. These have the type :" +"c:expr:`PyObject*`; they are all class objects. For completeness, here are " +"all the variables:" +msgstr "" + +#: c-api/exceptions.rst:1023 c-api/exceptions.rst:1068 +msgid "C Name" +msgstr "Nom C" + +#: c-api/exceptions.rst:1068 +msgid "Python Name" +msgstr "Nom Python" + +#: c-api/exceptions.rst:1023 c-api/exceptions.rst:1068 +msgid "Notes" +msgstr "Notes" + +#: c-api/exceptions.rst:892 +msgid ":c:data:`PyExc_BaseException`" +msgstr ":c:data:`PyExc_BaseException`" + +#: c-api/exceptions.rst:892 +msgid ":exc:`BaseException`" +msgstr ":exc:`BaseException`" + +#: c-api/exceptions.rst:894 c-api/exceptions.rst:942 c-api/exceptions.rst:954 +msgid "[1]_" +msgstr "" + +#: c-api/exceptions.rst:894 +msgid ":c:data:`PyExc_Exception`" +msgstr ":c:data:`PyExc_Exception`" + +#: c-api/exceptions.rst:894 +msgid ":exc:`Exception`" +msgstr ":exc:`Exception`" + +#: c-api/exceptions.rst:896 +msgid ":c:data:`PyExc_ArithmeticError`" +msgstr ":c:data:`PyExc_ArithmeticError`" + +#: c-api/exceptions.rst:896 +msgid ":exc:`ArithmeticError`" +msgstr ":exc:`ArithmeticError`" + +#: c-api/exceptions.rst:898 +msgid ":c:data:`PyExc_AssertionError`" +msgstr ":c:data:`PyExc_AssertionError`" + +#: c-api/exceptions.rst:898 +msgid ":exc:`AssertionError`" +msgstr ":exc:`AssertionError`" + +#: c-api/exceptions.rst:900 +msgid ":c:data:`PyExc_AttributeError`" +msgstr ":c:data:`PyExc_AttributeError`" + +#: c-api/exceptions.rst:900 +msgid ":exc:`AttributeError`" +msgstr ":exc:`AttributeError`" + +#: c-api/exceptions.rst:902 +msgid ":c:data:`PyExc_BlockingIOError`" +msgstr ":c:data:`PyExc_BlockingIOError`" + +#: c-api/exceptions.rst:902 +msgid ":exc:`BlockingIOError`" +msgstr ":exc:`BlockingIOError`" + +#: c-api/exceptions.rst:904 +msgid ":c:data:`PyExc_BrokenPipeError`" +msgstr ":c:data:`PyExc_BrokenPipeError`" + +#: c-api/exceptions.rst:904 +msgid ":exc:`BrokenPipeError`" +msgstr ":exc:`BrokenPipeError`" + +#: c-api/exceptions.rst:906 +msgid ":c:data:`PyExc_BufferError`" +msgstr ":c:data:`PyExc_BufferError`" + +#: c-api/exceptions.rst:906 +msgid ":exc:`BufferError`" +msgstr ":exc:`BufferError`" + +#: c-api/exceptions.rst:908 +msgid ":c:data:`PyExc_ChildProcessError`" +msgstr ":c:data:`PyExc_ChildProcessError`" + +#: c-api/exceptions.rst:908 +msgid ":exc:`ChildProcessError`" +msgstr ":exc:`ChildProcessError`" + +#: c-api/exceptions.rst:910 +msgid ":c:data:`PyExc_ConnectionAbortedError`" +msgstr ":c:data:`PyExc_ConnectionAbortedError`" + +#: c-api/exceptions.rst:910 +msgid ":exc:`ConnectionAbortedError`" +msgstr ":exc:`ConnectionAbortedError`" + +#: c-api/exceptions.rst:912 +msgid ":c:data:`PyExc_ConnectionError`" +msgstr ":c:data:`PyExc_ConnectionError`" + +#: c-api/exceptions.rst:912 +msgid ":exc:`ConnectionError`" +msgstr ":exc:`ConnectionError`" + +#: c-api/exceptions.rst:914 +msgid ":c:data:`PyExc_ConnectionRefusedError`" +msgstr ":c:data:`PyExc_ConnectionRefusedError`" + +#: c-api/exceptions.rst:914 +msgid ":exc:`ConnectionRefusedError`" +msgstr ":exc:`ConnectionRefusedError`" + +#: c-api/exceptions.rst:916 +msgid ":c:data:`PyExc_ConnectionResetError`" +msgstr ":c:data:`PyExc_ConnectionResetError`" + +#: c-api/exceptions.rst:916 +msgid ":exc:`ConnectionResetError`" +msgstr ":exc:`ConnectionResetError`" + +#: c-api/exceptions.rst:918 +msgid ":c:data:`PyExc_EOFError`" +msgstr ":c:data:`PyExc_EOFError`" + +#: c-api/exceptions.rst:918 +msgid ":exc:`EOFError`" +msgstr ":exc:`EOFError`" + +#: c-api/exceptions.rst:920 +msgid ":c:data:`PyExc_FileExistsError`" +msgstr ":c:data:`PyExc_FileExistsError`" + +#: c-api/exceptions.rst:920 +msgid ":exc:`FileExistsError`" +msgstr ":exc:`FileExistsError`" + +#: c-api/exceptions.rst:922 +msgid ":c:data:`PyExc_FileNotFoundError`" +msgstr ":c:data:`PyExc_FloatingPointError`" + +#: c-api/exceptions.rst:922 +msgid ":exc:`FileNotFoundError`" +msgstr ":exc:`FileNotFoundError`" + +#: c-api/exceptions.rst:924 +msgid ":c:data:`PyExc_FloatingPointError`" +msgstr ":c:data:`PyExc_FloatingPointError`" + +#: c-api/exceptions.rst:924 +msgid ":exc:`FloatingPointError`" +msgstr ":exc:`FloatingPointError`" + +#: c-api/exceptions.rst:926 +msgid ":c:data:`PyExc_GeneratorExit`" +msgstr ":c:data:`PyExc_GeneratorExit`" + +#: c-api/exceptions.rst:926 +msgid ":exc:`GeneratorExit`" +msgstr ":exc:`GeneratorExit`" + +#: c-api/exceptions.rst:928 +msgid ":c:data:`PyExc_ImportError`" +msgstr ":c:data:`PyExc_ImportError`" + +#: c-api/exceptions.rst:928 +msgid ":exc:`ImportError`" +msgstr ":exc:`ImportError`" + +#: c-api/exceptions.rst:930 +msgid ":c:data:`PyExc_IndentationError`" +msgstr ":c:data:`PyExc_IndentationError`" + +#: c-api/exceptions.rst:930 +msgid ":exc:`IndentationError`" +msgstr ":exc:`IndentationError`" + +#: c-api/exceptions.rst:932 +msgid ":c:data:`PyExc_IndexError`" +msgstr ":c:data:`PyExc_IndexError`" + +#: c-api/exceptions.rst:932 +msgid ":exc:`IndexError`" +msgstr ":exc:`IndexError`" + +#: c-api/exceptions.rst:934 +msgid ":c:data:`PyExc_InterruptedError`" +msgstr ":c:data:`PyExc_InterruptedError`" + +#: c-api/exceptions.rst:934 +msgid ":exc:`InterruptedError`" +msgstr ":exc:`InterruptedError`" + +#: c-api/exceptions.rst:936 +msgid ":c:data:`PyExc_IsADirectoryError`" +msgstr ":c:data:`PyExc_IsADirectoryError`" + +#: c-api/exceptions.rst:936 +msgid ":exc:`IsADirectoryError`" +msgstr ":exc:`IsADirectoryError`" + +#: c-api/exceptions.rst:938 +msgid ":c:data:`PyExc_KeyError`" +msgstr ":c:data:`PyExc_KeyError`" + +#: c-api/exceptions.rst:938 +msgid ":exc:`KeyError`" +msgstr ":exc:`KeyError`" + +#: c-api/exceptions.rst:940 +msgid ":c:data:`PyExc_KeyboardInterrupt`" +msgstr ":c:data:`PyExc_KeyboardInterrupt`" + +#: c-api/exceptions.rst:940 +msgid ":exc:`KeyboardInterrupt`" +msgstr ":exc:`KeyboardInterrupt`" + +#: c-api/exceptions.rst:942 +msgid ":c:data:`PyExc_LookupError`" +msgstr ":c:data:`PyExc_LookupError`" + +#: c-api/exceptions.rst:942 +msgid ":exc:`LookupError`" +msgstr ":exc:`LookupError`" + +#: c-api/exceptions.rst:944 +msgid ":c:data:`PyExc_MemoryError`" +msgstr ":c:data:`PyExc_MemoryError`" + +#: c-api/exceptions.rst:944 +msgid ":exc:`MemoryError`" +msgstr ":exc:`MemoryError`" + +#: c-api/exceptions.rst:946 +#, fuzzy +msgid ":c:data:`PyExc_ModuleNotFoundError`" +msgstr ":c:data:`PyExc_ModuleNotFoundError`." + +#: c-api/exceptions.rst:946 +msgid ":exc:`ModuleNotFoundError`" +msgstr ":exc:`ModuleNotFoundError`" + +#: c-api/exceptions.rst:948 +msgid ":c:data:`PyExc_NameError`" +msgstr ":c:data:`PyExc_NameError`" + +#: c-api/exceptions.rst:948 +msgid ":exc:`NameError`" +msgstr ":exc:`NameError`" + +#: c-api/exceptions.rst:950 +msgid ":c:data:`PyExc_NotADirectoryError`" +msgstr ":c:data:`PyExc_NotADirectoryError`" + +#: c-api/exceptions.rst:950 +msgid ":exc:`NotADirectoryError`" +msgstr ":exc:`NotADirectoryError`" + +#: c-api/exceptions.rst:952 +msgid ":c:data:`PyExc_NotImplementedError`" +msgstr ":c:data:`PyExc_NotImplementedError`" + +#: c-api/exceptions.rst:952 +msgid ":exc:`NotImplementedError`" +msgstr ":exc:`NotImplementedError`" + +#: c-api/exceptions.rst:954 +msgid ":c:data:`PyExc_OSError`" +msgstr ":c:data:`PyExc_OSError`" + +#: c-api/exceptions.rst:954 +msgid ":exc:`OSError`" +msgstr ":exc:`OSError`" + +#: c-api/exceptions.rst:956 +msgid ":c:data:`PyExc_OverflowError`" +msgstr ":c:data:`PyExc_OverflowError`" + +#: c-api/exceptions.rst:956 +msgid ":exc:`OverflowError`" +msgstr ":exc:`OverflowError`" + +#: c-api/exceptions.rst:958 +msgid ":c:data:`PyExc_PermissionError`" +msgstr ":c:data:`PyExc_PermissionError`" + +#: c-api/exceptions.rst:958 +msgid ":exc:`PermissionError`" +msgstr ":exc:`PermissionError`" + +#: c-api/exceptions.rst:960 +msgid ":c:data:`PyExc_ProcessLookupError`" +msgstr ":c:data:`PyExc_ProcessLookupError`" + +#: c-api/exceptions.rst:960 +msgid ":exc:`ProcessLookupError`" +msgstr ":exc:`ProcessLookupError`" + +#: c-api/exceptions.rst:962 +msgid ":c:data:`PyExc_RecursionError`" +msgstr ":c:data:`PyExc_ReferenceError`" + +#: c-api/exceptions.rst:962 +msgid ":exc:`RecursionError`" +msgstr ":exc:`RecursionError`" + +#: c-api/exceptions.rst:964 +msgid ":c:data:`PyExc_ReferenceError`" +msgstr ":c:data:`PyExc_ReferenceError`" + +#: c-api/exceptions.rst:964 +msgid ":exc:`ReferenceError`" +msgstr ":exc:`ReferenceError`" + +#: c-api/exceptions.rst:966 +msgid ":c:data:`PyExc_RuntimeError`" +msgstr ":c:data:`PyExc_RuntimeError`" + +#: c-api/exceptions.rst:966 +msgid ":exc:`RuntimeError`" +msgstr ":exc:`RuntimeError`" + +#: c-api/exceptions.rst:968 +msgid ":c:data:`PyExc_StopAsyncIteration`" +msgstr ":c:data:`PyExc_StopAsyncIteration`" + +#: c-api/exceptions.rst:968 +msgid ":exc:`StopAsyncIteration`" +msgstr ":exc:`StopAsyncIteration`" + +#: c-api/exceptions.rst:970 +msgid ":c:data:`PyExc_StopIteration`" +msgstr ":c:data:`PyExc_StopIteration`" + +#: c-api/exceptions.rst:970 +msgid ":exc:`StopIteration`" +msgstr ":exc:`StopIteration`" + +#: c-api/exceptions.rst:972 +msgid ":c:data:`PyExc_SyntaxError`" +msgstr ":c:data:`PyExc_SyntaxError`" + +#: c-api/exceptions.rst:972 +msgid ":exc:`SyntaxError`" +msgstr ":exc:`SyntaxError`" + +#: c-api/exceptions.rst:974 +msgid ":c:data:`PyExc_SystemError`" +msgstr ":c:data:`PyExc_SystemError`" + +#: c-api/exceptions.rst:974 +msgid ":exc:`SystemError`" +msgstr ":exc:`SystemError`" + +#: c-api/exceptions.rst:976 +msgid ":c:data:`PyExc_SystemExit`" +msgstr ":c:data:`PyExc_SystemExit`" + +#: c-api/exceptions.rst:976 +msgid ":exc:`SystemExit`" +msgstr ":exc:`SystemExit`" + +#: c-api/exceptions.rst:978 +msgid ":c:data:`PyExc_TabError`" +msgstr ":c:data:`PyExc_TabError`" + +#: c-api/exceptions.rst:978 +msgid ":exc:`TabError`" +msgstr ":exc:`TabError`" + +#: c-api/exceptions.rst:980 +msgid ":c:data:`PyExc_TimeoutError`" +msgstr ":c:data:`PyExc_ImportError`" + +#: c-api/exceptions.rst:980 +msgid ":exc:`TimeoutError`" +msgstr ":exc:`TimeoutError`" + +#: c-api/exceptions.rst:982 +msgid ":c:data:`PyExc_TypeError`" +msgstr ":c:data:`PyExc_TypeError`" + +#: c-api/exceptions.rst:982 +msgid ":exc:`TypeError`" +msgstr ":exc:`TypeError`" + +#: c-api/exceptions.rst:984 +msgid ":c:data:`PyExc_UnboundLocalError`" +msgstr ":c:data:`PyExc_UnboundLocalError`" + +#: c-api/exceptions.rst:984 +msgid ":exc:`UnboundLocalError`" +msgstr ":exc:`UnboundLocalError`" + +#: c-api/exceptions.rst:986 +msgid ":c:data:`PyExc_UnicodeDecodeError`" +msgstr ":c:data:`PyExc_UnicodeDecodeError`" + +#: c-api/exceptions.rst:986 +msgid ":exc:`UnicodeDecodeError`" +msgstr ":exc:`UnicodeDecodeError`" + +#: c-api/exceptions.rst:988 +msgid ":c:data:`PyExc_UnicodeEncodeError`" +msgstr ":c:data:`PyExc_UnicodeEncodeError`" + +#: c-api/exceptions.rst:988 +msgid ":exc:`UnicodeEncodeError`" +msgstr ":exc:`UnicodeEncodeError`" + +#: c-api/exceptions.rst:990 +msgid ":c:data:`PyExc_UnicodeError`" +msgstr ":c:data:`PyExc_UnicodeError`" + +#: c-api/exceptions.rst:990 +msgid ":exc:`UnicodeError`" +msgstr ":exc:`UnicodeError`" + +#: c-api/exceptions.rst:992 +msgid ":c:data:`PyExc_UnicodeTranslateError`" +msgstr ":c:data:`PyExc_UnicodeTranslateError`" + +#: c-api/exceptions.rst:992 +msgid ":exc:`UnicodeTranslateError`" +msgstr ":exc:`UnicodeTranslateError`" + +#: c-api/exceptions.rst:994 +msgid ":c:data:`PyExc_ValueError`" +msgstr ":c:data:`PyExc_ValueError`" + +#: c-api/exceptions.rst:994 +msgid ":exc:`ValueError`" +msgstr ":exc:`ValueError`" + +#: c-api/exceptions.rst:996 +msgid ":c:data:`PyExc_ZeroDivisionError`" +msgstr ":c:data:`PyExc_ZeroDivisionError`" + +#: c-api/exceptions.rst:996 +msgid ":exc:`ZeroDivisionError`" +msgstr ":exc:`ZeroDivisionError`" + +#: c-api/exceptions.rst:999 +msgid "" +":c:data:`PyExc_BlockingIOError`, :c:data:`PyExc_BrokenPipeError`, :c:data:" +"`PyExc_ChildProcessError`, :c:data:`PyExc_ConnectionError`, :c:data:" +"`PyExc_ConnectionAbortedError`, :c:data:`PyExc_ConnectionRefusedError`, :c:" +"data:`PyExc_ConnectionResetError`, :c:data:`PyExc_FileExistsError`, :c:data:" +"`PyExc_FileNotFoundError`, :c:data:`PyExc_InterruptedError`, :c:data:" +"`PyExc_IsADirectoryError`, :c:data:`PyExc_NotADirectoryError`, :c:data:" +"`PyExc_PermissionError`, :c:data:`PyExc_ProcessLookupError` and :c:data:" +"`PyExc_TimeoutError` were introduced following :pep:`3151`." +msgstr "" + +#: c-api/exceptions.rst:1009 +msgid ":c:data:`PyExc_StopAsyncIteration` and :c:data:`PyExc_RecursionError`." +msgstr ":c:data:`PyExc_StopAsyncIteration` et :c:data:`PyExc_RecursionError`." + +#: c-api/exceptions.rst:1012 +msgid ":c:data:`PyExc_ModuleNotFoundError`." +msgstr ":c:data:`PyExc_ModuleNotFoundError`." + +#: c-api/exceptions.rst:1015 +msgid "These are compatibility aliases to :c:data:`PyExc_OSError`:" +msgstr "" + +#: c-api/exceptions.rst:1025 +msgid ":c:data:`PyExc_EnvironmentError`" +msgstr ":c:data:`PyExc_EnvironmentError`" + +#: c-api/exceptions.rst:1027 +msgid ":c:data:`PyExc_IOError`" +msgstr ":c:data:`PyExc_IOError`" + +#: c-api/exceptions.rst:1029 +msgid ":c:data:`PyExc_WindowsError`" +msgstr ":c:data:`PyExc_WindowsError`" + +#: c-api/exceptions.rst:1029 +msgid "[2]_" +msgstr "" + +#: c-api/exceptions.rst:1032 +msgid "These aliases used to be separate exception types." +msgstr "" + +#: c-api/exceptions.rst:1096 +msgid "Notes:" +msgstr "Notes :" + +#: c-api/exceptions.rst:1038 +msgid "This is a base class for other standard exceptions." +msgstr "C'est la classe de base pour les autres exceptions standards." + +#: c-api/exceptions.rst:1041 +msgid "" +"Only defined on Windows; protect code that uses this by testing that the " +"preprocessor macro ``MS_WINDOWS`` is defined." +msgstr "" + +#: c-api/exceptions.rst:1047 +msgid "Standard Warning Categories" +msgstr "" + +#: c-api/exceptions.rst:1049 +msgid "" +"All standard Python warning categories are available as global variables " +"whose names are ``PyExc_`` followed by the Python exception name. These have " +"the type :c:expr:`PyObject*`; they are all class objects. For completeness, " +"here are all the variables:" +msgstr "" + +#: c-api/exceptions.rst:1070 +msgid ":c:data:`PyExc_Warning`" +msgstr ":c:data:`PyExc_Warning`" + +#: c-api/exceptions.rst:1070 +msgid ":exc:`Warning`" +msgstr ":exc:`Warning`" + +#: c-api/exceptions.rst:1070 +msgid "[3]_" +msgstr "" + +#: c-api/exceptions.rst:1072 +msgid ":c:data:`PyExc_BytesWarning`" +msgstr ":c:data:`PyExc_BytesWarning`" + +#: c-api/exceptions.rst:1072 +msgid ":exc:`BytesWarning`" +msgstr ":exc:`BytesWarning`" + +#: c-api/exceptions.rst:1074 +msgid ":c:data:`PyExc_DeprecationWarning`" +msgstr ":c:data:`PyExc_DeprecationWarning`" + +#: c-api/exceptions.rst:1074 +msgid ":exc:`DeprecationWarning`" +msgstr ":exc:`DeprecationWarning`" + +#: c-api/exceptions.rst:1076 +msgid ":c:data:`PyExc_FutureWarning`" +msgstr ":c:data:`PyExc_FutureWarning`" + +#: c-api/exceptions.rst:1076 +msgid ":exc:`FutureWarning`" +msgstr ":exc:`FutureWarning`" + +#: c-api/exceptions.rst:1078 +msgid ":c:data:`PyExc_ImportWarning`" +msgstr ":c:data:`PyExc_ImportWarning`" + +#: c-api/exceptions.rst:1078 +msgid ":exc:`ImportWarning`" +msgstr ":exc:`ImportWarning`" + +#: c-api/exceptions.rst:1080 +msgid ":c:data:`PyExc_PendingDeprecationWarning`" +msgstr ":c:data:`PyExc_PendingDeprecationWarning`" + +#: c-api/exceptions.rst:1080 +msgid ":exc:`PendingDeprecationWarning`" +msgstr ":exc:`PendingDeprecationWarning`" + +#: c-api/exceptions.rst:1082 +msgid ":c:data:`PyExc_ResourceWarning`" +msgstr ":c:data:`PyExc_ResourceWarning`" + +#: c-api/exceptions.rst:1082 +msgid ":exc:`ResourceWarning`" +msgstr ":exc:`ResourceWarning`" + +#: c-api/exceptions.rst:1084 +msgid ":c:data:`PyExc_RuntimeWarning`" +msgstr ":c:data:`PyExc_RuntimeWarning`" + +#: c-api/exceptions.rst:1084 +msgid ":exc:`RuntimeWarning`" +msgstr ":exc:`RuntimeWarning`" + +#: c-api/exceptions.rst:1086 +msgid ":c:data:`PyExc_SyntaxWarning`" +msgstr ":c:data:`PyExc_SyntaxWarning`" + +#: c-api/exceptions.rst:1086 +msgid ":exc:`SyntaxWarning`" +msgstr ":exc:`SyntaxWarning`" + +#: c-api/exceptions.rst:1088 +msgid ":c:data:`PyExc_UnicodeWarning`" +msgstr ":c:data:`PyExc_UnicodeWarning`" + +#: c-api/exceptions.rst:1088 +msgid ":exc:`UnicodeWarning`" +msgstr ":exc:`UnicodeWarning`" + +#: c-api/exceptions.rst:1090 +msgid ":c:data:`PyExc_UserWarning`" +msgstr ":c:data:`PyExc_UserWarning`" + +#: c-api/exceptions.rst:1090 +msgid ":exc:`UserWarning`" +msgstr ":exc:`UserWarning`" + +#: c-api/exceptions.rst:1093 +msgid ":c:data:`PyExc_ResourceWarning`." +msgstr ":c:data:`PyExc_ResourceWarning`." + +#: c-api/exceptions.rst:1099 +msgid "This is a base class for other standard warning categories." +msgstr "C'est la classe de base pour les autres catégories de *warning*." + +#~ msgid "\\(1)" +#~ msgstr "\\(1)" + +#~ msgid "\\(2)" +#~ msgstr "\\(2)" + +#~ msgid "\\(3)" +#~ msgstr "\\(3)" diff --git a/c-api/file.po b/c-api/file.po new file mode 100644 index 0000000000..d33211c76f --- /dev/null +++ b/c-api/file.po @@ -0,0 +1,178 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-18 15:46+0200\n" +"PO-Revision-Date: 2021-12-11 12:00+0100\n" +"Last-Translator: \n" +"Language-Team: FRENCH \n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 1.8.11\n" + +#: c-api/file.rst:6 +msgid "File Objects" +msgstr "Objets fichiers" + +#: c-api/file.rst:10 +#, fuzzy +msgid "" +"These APIs are a minimal emulation of the Python 2 C API for built-in file " +"objects, which used to rely on the buffered I/O (:c:expr:`FILE*`) support " +"from the C standard library. In Python 3, files and streams use the new :" +"mod:`io` module, which defines several layers over the low-level unbuffered " +"I/O of the operating system. The functions described below are convenience " +"C wrappers over these new APIs, and meant mostly for internal error " +"reporting in the interpreter; third-party code is advised to access the :mod:" +"`io` APIs instead." +msgstr "" +"Ces API sont une émulation minimale de l'API C Python 2 pour les objets " +"fichier natifs, qui reposaient sur la gestion des entrées-sorties avec " +"tampon (:c:type:`FILE\\*`) de la bibliothèque standard C. En Python 3, les " +"fichiers et les flux utilisent le nouveau module :mod:`io`, qui définit " +"plusieurs couches au dessus des entrées/sorties bas niveau sans tampon du " +"système d'exploitation. Les fonctions définies ci-dessous, écrites en C, " +"encapsulent ces nouvelles API pour les rendre plus faciles d'utilisation et " +"sont majoritairement pensées pour signaler des erreurs internes dans " +"l'interpréteur ; il est conseillé au code tiers d'utiliser les API de :mod:" +"`io` à la place." + +#: c-api/file.rst:22 +#, fuzzy +msgid "" +"Create a Python file object from the file descriptor of an already opened " +"file *fd*. The arguments *name*, *encoding*, *errors* and *newline* can be " +"``NULL`` to use the defaults; *buffering* can be *-1* to use the default. " +"*name* is ignored and kept for backward compatibility. Return ``NULL`` on " +"failure. For a more comprehensive description of the arguments, please refer " +"to the :func:`io.open` function documentation." +msgstr "" +"Crée un objet fichier Python à partir du descripteur d'un fichier déjà " +"ouvert *fd*. Les arguments *name*, *encoding*, *errors* et *newline* peuvent " +"être *NULL* pour utiliser ceux par défaut ; *buffering* peut être *-1* pour " +"utiliser celui par défaut ; *name* est ignoré et gardé pour la rétro-" +"compatibilité. Renvoie *NULL* en cas d'échec. Pour une description plus " +"détaillée des arguments, merci de vous référer à la documentation de " +"fonction :func:`io.open`." + +#: c-api/file.rst:31 +msgid "" +"Since Python streams have their own buffering layer, mixing them with OS-" +"level file descriptors can produce various issues (such as unexpected " +"ordering of data)." +msgstr "" +"Étant donné que les flux de données Python possèdent leur propre couche de " +"tampon, les mélanger avec des descripteurs de fichiers du niveau du système " +"d'exploitation peut produire des erreurs (comme par exemple un ordre des " +"données inattendu)." + +#: c-api/file.rst:35 +msgid "Ignore *name* attribute." +msgstr "ignore l'attribut *name*" + +#: c-api/file.rst:41 +#, fuzzy +msgid "" +"Return the file descriptor associated with *p* as an :c:expr:`int`. If the " +"object is an integer, its value is returned. If not, the object's :meth:" +"`~io.IOBase.fileno` method is called if it exists; the method must return an " +"integer, which is returned as the file descriptor value. Sets an exception " +"and returns ``-1`` on failure." +msgstr "" +"Renvoie un descripteur de fichier associé avec *p* comme un :c:type:`int`. " +"Si l'objet est un entier, sa valeur est renvoyée. Sinon, la méthode :meth:" +"`~io.IOBase.fileno` de l'objet est appelée si elle existe; la méthode doit " +"renvoyer un entier, qui est renvoyé en tant que valeur du descripteur. " +"Affecte une exception et renvoie ``-1`` lors d'un échec." + +#: c-api/file.rst:52 +msgid "" +"Equivalent to ``p.readline([n])``, this function reads one line from the " +"object *p*. *p* may be a file object or any object with a :meth:`~io.IOBase." +"readline` method. If *n* is ``0``, exactly one line is read, regardless of " +"the length of the line. If *n* is greater than ``0``, no more than *n* " +"bytes will be read from the file; a partial line can be returned. In both " +"cases, an empty string is returned if the end of the file is reached " +"immediately. If *n* is less than ``0``, however, one line is read " +"regardless of length, but :exc:`EOFError` is raised if the end of the file " +"is reached immediately." +msgstr "" +"Cette fonction, équivalente à ``p.readline([n])``, lit une ligne de l'objet " +"*p*. *p* peut être un objet fichier ou n'importe quel objet qui possède une " +"méthode :meth:`~io.IOBase.readline`. Si *n* vaut ``0``, une seule ligne est " +"lue, indépendamment de la taille de la ligne. Si *n* est plus grand que " +"``0``, un maximum de *n* octets seront lus en provenance du fichier ; une " +"ligne partielle peut être renvoyée. Dans les deux cas, une chaîne de " +"caractères vide est renvoyée si la fin du fichier est atteinte " +"immédiatement. Cependant, si *n* est plus petit que ``0``, une ligne est lue " +"indépendamment de sa taille, mais :exc:`EOFError` est levée si la fin du " +"fichier est atteinte immédiatement." + +#: c-api/file.rst:65 +msgid "" +"Overrides the normal behavior of :func:`io.open_code` to pass its parameter " +"through the provided handler." +msgstr "" + +#: c-api/file.rst:68 +msgid "" +"The handler is a function of type :c:expr:`PyObject *(\\*)(PyObject *path, " +"void *userData)`, where *path* is guaranteed to be :c:type:`PyUnicodeObject`." +msgstr "" + +#: c-api/file.rst:71 +msgid "" +"The *userData* pointer is passed into the hook function. Since hook " +"functions may be called from different runtimes, this pointer should not " +"refer directly to Python state." +msgstr "" + +#: c-api/file.rst:75 +msgid "" +"As this hook is intentionally used during import, avoid importing new " +"modules during its execution unless they are known to be frozen or available " +"in ``sys.modules``." +msgstr "" + +#: c-api/file.rst:79 +msgid "" +"Once a hook has been set, it cannot be removed or replaced, and later calls " +"to :c:func:`PyFile_SetOpenCodeHook` will fail. On failure, the function " +"returns -1 and sets an exception if the interpreter has been initialized." +msgstr "" + +#: c-api/file.rst:83 +msgid "This function is safe to call before :c:func:`Py_Initialize`." +msgstr "" + +#: c-api/file.rst:85 +msgid "" +"Raises an :ref:`auditing event ` ``setopencodehook`` with no " +"arguments." +msgstr "" + +#: c-api/file.rst:95 +msgid "" +"Write object *obj* to file object *p*. The only supported flag for *flags* " +"is :const:`Py_PRINT_RAW`; if given, the :func:`str` of the object is written " +"instead of the :func:`repr`. Return ``0`` on success or ``-1`` on failure; " +"the appropriate exception will be set." +msgstr "" +"Écrit l'objet *obj* dans l'objet fichier *p*. La seule option gérée pour " +"*flags* est :const:`Py_PRINT_RAW` ; si défini, l'attribut :func:`str` de " +"l'objet est écrit à la place de l'attribut :func:`repr`. Retourne ``0`` en " +"cas de succès ou ``-1`` en cas échec ; l'exception appropriée sera levée." + +#: c-api/file.rst:103 +msgid "" +"Write string *s* to file object *p*. Return ``0`` on success or ``-1`` on " +"failure; the appropriate exception will be set." +msgstr "" +"Écrit la chaîne de caractères *s* dans l'objet fichier *p*. Retourne ``0`` " +"en cas de succès ou ``-1`` en cas d'échec ; l'exception appropriée sera mise " +"en place." diff --git a/c-api/float.po b/c-api/float.po new file mode 100644 index 0000000000..cd18ca540b --- /dev/null +++ b/c-api/float.po @@ -0,0 +1,134 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-18 15:46+0200\n" +"PO-Revision-Date: 2019-01-14 15:30+0100\n" +"Last-Translator: ANTOINE FOURES \n" +"Language-Team: FRENCH \n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: c-api/float.rst:6 +msgid "Floating Point Objects" +msgstr "Objets représentant les nombres à virgule flottante" + +#: c-api/float.rst:13 +msgid "" +"This subtype of :c:type:`PyObject` represents a Python floating point object." +msgstr "" +"Ce sous-type de l'objet :c:type:`PyObject` représente un nombre à virgule " +"flottante en Python." + +#: c-api/float.rst:18 +msgid "" +"This instance of :c:type:`PyTypeObject` represents the Python floating point " +"type. This is the same object as :class:`float` in the Python layer." +msgstr "" +"Cette instance de l'objet :c:type:`PyTypeObject` représente le type nombre à " +"virgule flottante en Python. C'est le même objet que la classe :class:" +"`float` de la couche Python." + +#: c-api/float.rst:24 +#, fuzzy +msgid "" +"Return true if its argument is a :c:type:`PyFloatObject` or a subtype of :c:" +"type:`PyFloatObject`. This function always succeeds." +msgstr "" +"Renvoie vrai si l'argument est de type :c:type:`PyFloatObject` ou un sous-" +"type de :c:type:`PyFloatObject`." + +#: c-api/float.rst:30 +#, fuzzy +msgid "" +"Return true if its argument is a :c:type:`PyFloatObject`, but not a subtype " +"of :c:type:`PyFloatObject`. This function always succeeds." +msgstr "" +"Renvoie vrai si l'argument est de type :c:type:`PyFloatObject`, mais pas un " +"sous-type de :c:type:`PyFloatObject`." + +#: c-api/float.rst:36 +#, fuzzy +msgid "" +"Create a :c:type:`PyFloatObject` object based on the string value in *str*, " +"or ``NULL`` on failure." +msgstr "" +"Crée un objet :c:type:`PyFloatObject` à partir de la valeur de la chaîne de " +"caractères *str*, ou *NULL* en cas d'échec." + +#: c-api/float.rst:42 +#, fuzzy +msgid "" +"Create a :c:type:`PyFloatObject` object from *v*, or ``NULL`` on failure." +msgstr "" +"Crée un objet :c:type:`PyFloatObject` à partir de *v*, ou *NULL* en cas " +"d'échec." + +#: c-api/float.rst:47 +#, fuzzy +msgid "" +"Return a C :c:expr:`double` representation of the contents of *pyfloat*. If " +"*pyfloat* is not a Python floating point object but has a :meth:`__float__` " +"method, this method will first be called to convert *pyfloat* into a float. " +"If ``__float__()`` is not defined then it falls back to :meth:`__index__`. " +"This method returns ``-1.0`` upon failure, so one should call :c:func:" +"`PyErr_Occurred` to check for errors." +msgstr "" +"Renvoie une représentation du contenu d'un *pyfloat* sous la forme d'un :c:" +"type:`double` en C. Si le *pyfloat* n'est pas un nombre à virgule flottante " +"mais contient une méthode :meth:`__float__`, elle est d'abord appelée pour " +"convertir le *pyfloat* en nombre à virgule flottante. Cette méthode renvoie " +"``-1.0`` en cas d'échec, il faut appeler :c:func:`PyErr_Occurred` pour " +"vérifier les erreurs." + +#: c-api/float.rst:54 +msgid "Use :meth:`__index__` if available." +msgstr "" + +#: c-api/float.rst:60 +#, fuzzy +msgid "" +"Return a C :c:expr:`double` representation of the contents of *pyfloat*, but " +"without error checking." +msgstr "" +"Renvoie une représentation du contenu d'un *pyfloat* sous la forme d'un :c:" +"type:`double` en C, sans vérifier les erreurs." + +#: c-api/float.rst:66 +msgid "" +"Return a structseq instance which contains information about the precision, " +"minimum and maximum values of a float. It's a thin wrapper around the header " +"file :file:`float.h`." +msgstr "" +"Renvoie une instance *structseq* qui contient les informations sur la " +"précision et les valeurs minimales et maximales pour un nombre à virgule " +"flottante. C'est une enveloppe autour du fichier d'entête :file:`float.h`." + +#: c-api/float.rst:73 +#, fuzzy +msgid "" +"Return the maximum representable finite float *DBL_MAX* as C :c:expr:" +"`double`." +msgstr "" +"Renvoie le nombre à virgule flottante fini maximal *DBL_MAX* sous la forme " +"d'un :c:type:`double` en C." + +#: c-api/float.rst:78 +#, fuzzy +msgid "" +"Return the minimum normalized positive float *DBL_MIN* as C :c:expr:`double`." +msgstr "" +"Renvoie le nombre à virgule flottante minimal normalisé *DBL_MIN* sous la " +"forme :c:type:`double` en C." + +#~ msgid "" +#~ "Clear the float free list. Return the number of items that could not be " +#~ "freed." +#~ msgstr "" +#~ "Libère la mémoire de la *free list* des nombres à virgule flottante. " +#~ "Renvoie le nombre d'éléments qui n'ont pas pu être libérés." diff --git a/c-api/function.po b/c-api/function.po new file mode 100644 index 0000000000..2dedf0c20b --- /dev/null +++ b/c-api/function.po @@ -0,0 +1,148 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-04-05 10:05+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: FRENCH \n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: c-api/function.rst:6 +msgid "Function Objects" +msgstr "Objets fonctions" + +#: c-api/function.rst:10 +msgid "There are a few functions specific to Python functions." +msgstr "Certaines fonctions sont spécifiques aux fonctions Python." + +#: c-api/function.rst:15 +msgid "The C structure used for functions." +msgstr "La structure C utilisée pour les fonctions." + +#: c-api/function.rst:22 +msgid "" +"This is an instance of :c:type:`PyTypeObject` and represents the Python " +"function type. It is exposed to Python programmers as ``types." +"FunctionType``." +msgstr "" +"C'est une instance de :c:type:`PyTypeObject` et représente le type fonction " +"en Python. Il est exposé aux développeurs comme ``types.FunctionType``." + +#: c-api/function.rst:28 +msgid "" +"Return true if *o* is a function object (has type :c:data:" +"`PyFunction_Type`). The parameter must not be ``NULL``. This function " +"always succeeds." +msgstr "" +"Renvoie vrai si *o* est un objet de type fonction (a comme type :c:data:" +"`PyFunction_Type`). Le paramètre ne doit pas être ``NULL``. Cette fonction " +"réussit toujours." + +#: c-api/function.rst:34 +msgid "" +"Return a new function object associated with the code object *code*. " +"*globals* must be a dictionary with the global variables accessible to the " +"function." +msgstr "" +"Renvoie une nouvelle fonction associée avec l'objet *code*. *globals* doit " +"être un dictionnaire avec les variables globales accessibles à la fonction." + +#: c-api/function.rst:37 +msgid "" +"The function's docstring and name are retrieved from the code object. " +"*__module__* is retrieved from *globals*. The argument defaults, annotations " +"and closure are set to ``NULL``. *__qualname__* is set to the same value as " +"the function's name." +msgstr "" + +#: c-api/function.rst:44 +msgid "" +"As :c:func:`PyFunction_New`, but also allows setting the function object's " +"``__qualname__`` attribute. *qualname* should be a unicode object or " +"``NULL``; if ``NULL``, the ``__qualname__`` attribute is set to the same " +"value as its ``__name__`` attribute." +msgstr "" + +#: c-api/function.rst:54 +msgid "Return the code object associated with the function object *op*." +msgstr "Renvoie l'objet code associé avec l'objet de la fonction *op*." + +#: c-api/function.rst:59 +msgid "Return the globals dictionary associated with the function object *op*." +msgstr "" +"Renvoie le dictionnaire global associé avec l'objet de la fonction *op*." + +#: c-api/function.rst:64 +msgid "" +"Return a :term:`borrowed reference` to the *__module__* attribute of the " +"function object *op*. It can be *NULL*." +msgstr "" +"Renvoie un :term:`borrowed reference` à l'attribut ``__module__`` de l'objet " +"fonction *op*. Il peut être *NULL*." + +#: c-api/function.rst:67 +msgid "" +"This is normally a string containing the module name, but can be set to any " +"other object by Python code." +msgstr "" +"C'est typiquement une chaîne de caractère contenant le nom du module, mais " +"il peut être changé par du code Python pour n'importe quel autre objet." + +#: c-api/function.rst:73 +msgid "" +"Return the argument default values of the function object *op*. This can be " +"a tuple of arguments or ``NULL``." +msgstr "" +"Renvoie les valeurs par défaut de l'argument de l'objet de la fonction *op*. " +"Cela peut être un tuple d'arguments ou ``NULL``." + +#: c-api/function.rst:79 +msgid "" +"Set the argument default values for the function object *op*. *defaults* " +"must be ``Py_None`` or a tuple." +msgstr "" +"Définir les valeurs par défaut de l'argument pour l'objet de la fonction " +"*op*. *defaults* doit être ``Py_None`` ou un tuple." + +#: c-api/function.rst:96 c-api/function.rst:110 +msgid "Raises :exc:`SystemError` and returns ``-1`` on failure." +msgstr "Lève :exc:`SystemError` et renvoie ``-1`` en cas de d'échec." + +#: c-api/function.rst:87 +msgid "" +"Return the closure associated with the function object *op*. This can be " +"``NULL`` or a tuple of cell objects." +msgstr "" +"Renvoie la fermeture associée avec l'objet de la fonction *op*. Cela peut " +"être ``NULL`` ou un tuple d'objets cellule." + +#: c-api/function.rst:93 +msgid "" +"Set the closure associated with the function object *op*. *closure* must be " +"``Py_None`` or a tuple of cell objects." +msgstr "" +"Définir la fermeture associée avec l'objet de la fonction *op*. *closure* " +"doit être ``Py_None`` ou un tuple d'objets cellule." + +#: c-api/function.rst:101 +msgid "" +"Return the annotations of the function object *op*. This can be a mutable " +"dictionary or ``NULL``." +msgstr "" +"Renvoie les annotations de l'objet de la fonction *op*. Cela peut être un " +"dictionnaire mutable ou ``NULL``." + +#: c-api/function.rst:107 +msgid "" +"Set the annotations for the function object *op*. *annotations* must be a " +"dictionary or ``Py_None``." +msgstr "" +"Définir les annotations pour l'objet de la fonction *op*. *annotations* doit " +"être un dictionnaire ou ``Py_None``." diff --git a/c-api/gcsupport.po b/c-api/gcsupport.po new file mode 100644 index 0000000000..6935f39282 --- /dev/null +++ b/c-api/gcsupport.po @@ -0,0 +1,283 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-03-18 17:06+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: FRENCH \n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: c-api/gcsupport.rst:6 +msgid "Supporting Cyclic Garbage Collection" +msgstr "" + +#: c-api/gcsupport.rst:8 +msgid "" +"Python's support for detecting and collecting garbage which involves " +"circular references requires support from object types which are " +"\"containers\" for other objects which may also be containers. Types which " +"do not store references to other objects, or which only store references to " +"atomic types (such as numbers or strings), do not need to provide any " +"explicit support for garbage collection." +msgstr "" + +#: c-api/gcsupport.rst:15 +msgid "" +"To create a container type, the :c:member:`~PyTypeObject.tp_flags` field of " +"the type object must include the :const:`Py_TPFLAGS_HAVE_GC` and provide an " +"implementation of the :c:member:`~PyTypeObject.tp_traverse` handler. If " +"instances of the type are mutable, a :c:member:`~PyTypeObject.tp_clear` " +"implementation must also be provided." +msgstr "" + +#: c-api/gcsupport.rst:24 +msgid "" +"Objects with a type with this flag set must conform with the rules " +"documented here. For convenience these objects will be referred to as " +"container objects." +msgstr "" + +#: c-api/gcsupport.rst:28 +msgid "Constructors for container types must conform to two rules:" +msgstr "" + +#: c-api/gcsupport.rst:30 +msgid "" +"The memory for the object must be allocated using :c:func:`PyObject_GC_New` " +"or :c:func:`PyObject_GC_NewVar`." +msgstr "" + +#: c-api/gcsupport.rst:33 +msgid "" +"Once all the fields which may contain references to other containers are " +"initialized, it must call :c:func:`PyObject_GC_Track`." +msgstr "" + +#: c-api/gcsupport.rst:36 +msgid "" +"Similarly, the deallocator for the object must conform to a similar pair of " +"rules:" +msgstr "" + +#: c-api/gcsupport.rst:39 +msgid "" +"Before fields which refer to other containers are invalidated, :c:func:" +"`PyObject_GC_UnTrack` must be called." +msgstr "" + +#: c-api/gcsupport.rst:42 +msgid "" +"The object's memory must be deallocated using :c:func:`PyObject_GC_Del`." +msgstr "" + +#: c-api/gcsupport.rst:45 +msgid "" +"If a type adds the Py_TPFLAGS_HAVE_GC, then it *must* implement at least a :" +"c:member:`~PyTypeObject.tp_traverse` handler or explicitly use one from its " +"subclass or subclasses." +msgstr "" + +#: c-api/gcsupport.rst:49 +msgid "" +"When calling :c:func:`PyType_Ready` or some of the APIs that indirectly call " +"it like :c:func:`PyType_FromSpecWithBases` or :c:func:`PyType_FromSpec` the " +"interpreter will automatically populate the :c:member:`~PyTypeObject." +"tp_flags`, :c:member:`~PyTypeObject.tp_traverse` and :c:member:" +"`~PyTypeObject.tp_clear` fields if the type inherits from a class that " +"implements the garbage collector protocol and the child class does *not* " +"include the :const:`Py_TPFLAGS_HAVE_GC` flag." +msgstr "" + +#: c-api/gcsupport.rst:59 +msgid "" +"Analogous to :c:func:`PyObject_New` but for container objects with the :" +"const:`Py_TPFLAGS_HAVE_GC` flag set." +msgstr "" + +#: c-api/gcsupport.rst:65 +msgid "" +"Analogous to :c:func:`PyObject_NewVar` but for container objects with the :" +"const:`Py_TPFLAGS_HAVE_GC` flag set." +msgstr "" + +#: c-api/gcsupport.rst:71 +msgid "" +"Resize an object allocated by :c:func:`PyObject_NewVar`. Returns the " +"resized object or ``NULL`` on failure. *op* must not be tracked by the " +"collector yet." +msgstr "" + +#: c-api/gcsupport.rst:77 +msgid "" +"Adds the object *op* to the set of container objects tracked by the " +"collector. The collector can run at unexpected times so objects must be " +"valid while being tracked. This should be called once all the fields " +"followed by the :c:member:`~PyTypeObject.tp_traverse` handler become valid, " +"usually near the end of the constructor." +msgstr "" + +#: c-api/gcsupport.rst:86 +msgid "" +"Returns non-zero if the object implements the garbage collector protocol, " +"otherwise returns 0." +msgstr "" + +#: c-api/gcsupport.rst:89 +msgid "" +"The object cannot be tracked by the garbage collector if this function " +"returns 0." +msgstr "" + +#: c-api/gcsupport.rst:94 +msgid "" +"Returns 1 if the object type of *op* implements the GC protocol and *op* is " +"being currently tracked by the garbage collector and 0 otherwise." +msgstr "" + +#: c-api/gcsupport.rst:97 +msgid "This is analogous to the Python function :func:`gc.is_tracked`." +msgstr "" + +#: c-api/gcsupport.rst:104 +msgid "" +"Returns 1 if the object type of *op* implements the GC protocol and *op* has " +"been already finalized by the garbage collector and 0 otherwise." +msgstr "" + +#: c-api/gcsupport.rst:107 +msgid "This is analogous to the Python function :func:`gc.is_finalized`." +msgstr "" + +#: c-api/gcsupport.rst:114 +msgid "" +"Releases memory allocated to an object using :c:func:`PyObject_GC_New` or :c:" +"func:`PyObject_GC_NewVar`." +msgstr "" + +#: c-api/gcsupport.rst:120 +msgid "" +"Remove the object *op* from the set of container objects tracked by the " +"collector. Note that :c:func:`PyObject_GC_Track` can be called again on " +"this object to add it back to the set of tracked objects. The deallocator (:" +"c:member:`~PyTypeObject.tp_dealloc` handler) should call this for the object " +"before any of the fields used by the :c:member:`~PyTypeObject.tp_traverse` " +"handler become invalid." +msgstr "" + +#: c-api/gcsupport.rst:129 +msgid "" +"The :c:func:`_PyObject_GC_TRACK` and :c:func:`_PyObject_GC_UNTRACK` macros " +"have been removed from the public C API." +msgstr "" + +#: c-api/gcsupport.rst:132 +msgid "" +"The :c:member:`~PyTypeObject.tp_traverse` handler accepts a function " +"parameter of this type:" +msgstr "" + +#: c-api/gcsupport.rst:137 +msgid "" +"Type of the visitor function passed to the :c:member:`~PyTypeObject." +"tp_traverse` handler. The function should be called with an object to " +"traverse as *object* and the third parameter to the :c:member:`~PyTypeObject." +"tp_traverse` handler as *arg*. The Python core uses several visitor " +"functions to implement cyclic garbage detection; it's not expected that " +"users will need to write their own visitor functions." +msgstr "" + +#: c-api/gcsupport.rst:144 +msgid "" +"The :c:member:`~PyTypeObject.tp_traverse` handler must have the following " +"type:" +msgstr "" + +#: c-api/gcsupport.rst:149 +msgid "" +"Traversal function for a container object. Implementations must call the " +"*visit* function for each object directly contained by *self*, with the " +"parameters to *visit* being the contained object and the *arg* value passed " +"to the handler. The *visit* function must not be called with a ``NULL`` " +"object argument. If *visit* returns a non-zero value that value should be " +"returned immediately." +msgstr "" + +#: c-api/gcsupport.rst:156 +msgid "" +"To simplify writing :c:member:`~PyTypeObject.tp_traverse` handlers, a :c:" +"func:`Py_VISIT` macro is provided. In order to use this macro, the :c:" +"member:`~PyTypeObject.tp_traverse` implementation must name its arguments " +"exactly *visit* and *arg*:" +msgstr "" + +#: c-api/gcsupport.rst:163 +msgid "" +"If *o* is not ``NULL``, call the *visit* callback, with arguments *o* and " +"*arg*. If *visit* returns a non-zero value, then return it. Using this " +"macro, :c:member:`~PyTypeObject.tp_traverse` handlers look like::" +msgstr "" + +#: c-api/gcsupport.rst:176 +msgid "" +"The :c:member:`~PyTypeObject.tp_clear` handler must be of the :c:type:" +"`inquiry` type, or ``NULL`` if the object is immutable." +msgstr "" + +#: c-api/gcsupport.rst:182 +msgid "" +"Drop references that may have created reference cycles. Immutable objects " +"do not have to define this method since they can never directly create " +"reference cycles. Note that the object must still be valid after calling " +"this method (don't just call :c:func:`Py_DECREF` on a reference). The " +"collector will call this method if it detects that this object is involved " +"in a reference cycle." +msgstr "" + +#: c-api/gcsupport.rst:191 +msgid "Controlling the Garbage Collector State" +msgstr "" + +#: c-api/gcsupport.rst:193 +msgid "" +"The C-API provides the following functions for controlling garbage " +"collection runs." +msgstr "" + +#: c-api/gcsupport.rst:198 +msgid "" +"Perform a full garbage collection, if the garbage collector is enabled. " +"(Note that :func:`gc.collect` runs it unconditionally.)" +msgstr "" + +#: c-api/gcsupport.rst:201 +msgid "" +"Returns the number of collected + unreachable objects which cannot be " +"collected. If the garbage collector is disabled or already collecting, " +"returns ``0`` immediately. Errors during garbage collection are passed to :" +"data:`sys.unraisablehook`. This function does not raise exceptions." +msgstr "" + +#: c-api/gcsupport.rst:211 +msgid "" +"Enable the garbage collector: similar to :func:`gc.enable`. Returns the " +"previous state, 0 for disabled and 1 for enabled." +msgstr "" + +#: c-api/gcsupport.rst:219 +msgid "" +"Disable the garbage collector: similar to :func:`gc.disable`. Returns the " +"previous state, 0 for disabled and 1 for enabled." +msgstr "" + +#: c-api/gcsupport.rst:227 +msgid "" +"Query the state of the garbage collector: similar to :func:`gc.isenabled`. " +"Returns the current state, 0 for disabled and 1 for enabled." +msgstr "" diff --git a/c-api/gen.po b/c-api/gen.po new file mode 100644 index 0000000000..83df41a5b0 --- /dev/null +++ b/c-api/gen.po @@ -0,0 +1,82 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-01-27 19:26+0100\n" +"PO-Revision-Date: 2018-10-04 12:24+0200\n" +"Last-Translator: Julien Palard \n" +"Language-Team: FRENCH \n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 2.0.4\n" + +#: c-api/gen.rst:6 +msgid "Generator Objects" +msgstr "Objets générateur" + +#: c-api/gen.rst:8 +msgid "" +"Generator objects are what Python uses to implement generator iterators. " +"They are normally created by iterating over a function that yields values, " +"rather than explicitly calling :c:func:`PyGen_New` or :c:func:" +"`PyGen_NewWithQualName`." +msgstr "" +"Python utilise des objets générateurs pour implémenter les itérations de " +"générateurs. Ils sont normalement crées en itérant sur une fonction donnant " +"des valeurs via ``yield``, au lieu d'appeler explicitement :c:func:" +"`PyGen_New` ou :c:func:`PyGen_NewWithQualName`." + +#: c-api/gen.rst:15 +msgid "The C structure used for generator objects." +msgstr "La structure C utilisée pour les objets générateurs." + +#: c-api/gen.rst:20 +msgid "The type object corresponding to generator objects." +msgstr "Le type objet correspondant aux objets générateurs." + +#: c-api/gen.rst:25 +#, fuzzy +msgid "" +"Return true if *ob* is a generator object; *ob* must not be ``NULL``. This " +"function always succeeds." +msgstr "" +"Renvoie ``True`` si *ob* est un objet générateur. *ob* ne doit pas être " +"*NULL*." + +#: c-api/gen.rst:31 +#, fuzzy +msgid "" +"Return true if *ob*'s type is :c:type:`PyGen_Type`; *ob* must not be " +"``NULL``. This function always succeeds." +msgstr "" +"Renvoie ``True`` si le type de *ob* est *PyGen_Type*. *ob* ne doit pas être " +"*NULL*." + +#: c-api/gen.rst:37 +#, fuzzy +msgid "" +"Create and return a new generator object based on the *frame* object. A " +"reference to *frame* is stolen by this function. The argument must not be " +"``NULL``." +msgstr "" +"Crée et renvoie un nouvel objet générateur basé sur l'objet *frame*. Une " +"référence à *frame* est volée par cette fonction. L'argument ne doit pas " +"être *NULL*." + +#: c-api/gen.rst:43 +#, fuzzy +msgid "" +"Create and return a new generator object based on the *frame* object, with " +"``__name__`` and ``__qualname__`` set to *name* and *qualname*. A reference " +"to *frame* is stolen by this function. The *frame* argument must not be " +"``NULL``." +msgstr "" +"Crée et renvoie un nouvel objet générateur basé sur l'objet *frame*, avec " +"``__name__`` et ``__qualname__`` valant *name* et *qualname*. Une référence " +"à *frame* est volée par cette fonction. L'argument *frame* ne doit pas être " +"*NULL*." diff --git a/c-api/import.po b/c-api/import.po new file mode 100644 index 0000000000..4303354d0e --- /dev/null +++ b/c-api/import.po @@ -0,0 +1,324 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-18 15:46+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: FRENCH \n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: c-api/import.rst:6 +msgid "Importing Modules" +msgstr "Importer des modules" + +#: c-api/import.rst:16 +msgid "" +"This is a simplified interface to :c:func:`PyImport_ImportModuleEx` below, " +"leaving the *globals* and *locals* arguments set to ``NULL`` and *level* set " +"to 0. When the *name* argument contains a dot (when it specifies a " +"submodule of a package), the *fromlist* argument is set to the list " +"``['*']`` so that the return value is the named module rather than the top-" +"level package containing it as would otherwise be the case. (Unfortunately, " +"this has an additional side effect when *name* in fact specifies a " +"subpackage instead of a submodule: the submodules specified in the package's " +"``__all__`` variable are loaded.) Return a new reference to the imported " +"module, or ``NULL`` with an exception set on failure. A failing import of a " +"module doesn't leave the module in :data:`sys.modules`." +msgstr "" + +#: c-api/import.rst:89 +msgid "This function always uses absolute imports." +msgstr "" + +#: c-api/import.rst:33 +msgid "This function is a deprecated alias of :c:func:`PyImport_ImportModule`." +msgstr "" + +#: c-api/import.rst:35 +msgid "" +"This function used to fail immediately when the import lock was held by " +"another thread. In Python 3.3 though, the locking scheme switched to per-" +"module locks for most purposes, so this function's special behaviour isn't " +"needed anymore." +msgstr "" + +#: c-api/import.rst:46 +msgid "" +"Import a module. This is best described by referring to the built-in Python " +"function :func:`__import__`." +msgstr "" + +#: c-api/import.rst:65 +msgid "" +"The return value is a new reference to the imported module or top-level " +"package, or ``NULL`` with an exception set on failure. Like for :func:" +"`__import__`, the return value when a submodule of a package was requested " +"is normally the top-level package, unless a non-empty *fromlist* was given." +msgstr "" + +#: c-api/import.rst:55 +msgid "" +"Failing imports remove incomplete module objects, like with :c:func:" +"`PyImport_ImportModule`." +msgstr "" + +#: c-api/import.rst:61 +msgid "" +"Import a module. This is best described by referring to the built-in Python " +"function :func:`__import__`, as the standard :func:`__import__` function " +"calls this function directly." +msgstr "" + +#: c-api/import.rst:75 +msgid "" +"Similar to :c:func:`PyImport_ImportModuleLevelObject`, but the name is a " +"UTF-8 encoded string instead of a Unicode object." +msgstr "" + +#: c-api/import.rst:78 +msgid "Negative values for *level* are no longer accepted." +msgstr "" + +#: c-api/import.rst:83 +msgid "" +"This is a higher-level interface that calls the current \"import hook " +"function\" (with an explicit *level* of 0, meaning absolute import). It " +"invokes the :func:`__import__` function from the ``__builtins__`` of the " +"current globals. This means that the import is done using whatever import " +"hooks are installed in the current environment." +msgstr "" + +#: c-api/import.rst:94 +msgid "" +"Reload a module. Return a new reference to the reloaded module, or ``NULL`` " +"with an exception set on failure (the module still exists in this case)." +msgstr "" + +#: c-api/import.rst:100 +msgid "" +"Return the module object corresponding to a module name. The *name* " +"argument may be of the form ``package.module``. First check the modules " +"dictionary if there's one there, and if not, create a new one and insert it " +"in the modules dictionary. Return ``NULL`` with an exception set on failure." +msgstr "" + +#: c-api/import.rst:107 +msgid "" +"This function does not load or import the module; if the module wasn't " +"already loaded, you will get an empty module object. Use :c:func:" +"`PyImport_ImportModule` or one of its variants to import a module. Package " +"structures implied by a dotted name for *name* are not created if not " +"already present." +msgstr "" + +#: c-api/import.rst:117 +msgid "" +"Similar to :c:func:`PyImport_AddModuleObject`, but the name is a UTF-8 " +"encoded string instead of a Unicode object." +msgstr "" + +#: c-api/import.rst:125 +msgid "" +"Given a module name (possibly of the form ``package.module``) and a code " +"object read from a Python bytecode file or obtained from the built-in " +"function :func:`compile`, load the module. Return a new reference to the " +"module object, or ``NULL`` with an exception set if an error occurred. " +"*name* is removed from :attr:`sys.modules` in error cases, even if *name* " +"was already in :attr:`sys.modules` on entry to :c:func:" +"`PyImport_ExecCodeModule`. Leaving incompletely initialized modules in :" +"attr:`sys.modules` is dangerous, as imports of such modules have no way to " +"know that the module object is an unknown (and probably damaged with respect " +"to the module author's intents) state." +msgstr "" + +#: c-api/import.rst:135 +msgid "" +"The module's :attr:`__spec__` and :attr:`__loader__` will be set, if not set " +"already, with the appropriate values. The spec's loader will be set to the " +"module's ``__loader__`` (if set) and to an instance of :class:" +"`SourceFileLoader` otherwise." +msgstr "" + +#: c-api/import.rst:140 +msgid "" +"The module's :attr:`__file__` attribute will be set to the code object's :c:" +"member:`co_filename`. If applicable, :attr:`__cached__` will also be set." +msgstr "" + +#: c-api/import.rst:144 +msgid "" +"This function will reload the module if it was already imported. See :c:" +"func:`PyImport_ReloadModule` for the intended way to reload a module." +msgstr "" + +#: c-api/import.rst:147 +msgid "" +"If *name* points to a dotted name of the form ``package.module``, any " +"package structures not already created will still not be created." +msgstr "" + +#: c-api/import.rst:150 +msgid "" +"See also :c:func:`PyImport_ExecCodeModuleEx` and :c:func:" +"`PyImport_ExecCodeModuleWithPathnames`." +msgstr "" + +#: c-api/import.rst:156 +msgid "" +"Like :c:func:`PyImport_ExecCodeModule`, but the :attr:`__file__` attribute " +"of the module object is set to *pathname* if it is non-``NULL``." +msgstr "" + +#: c-api/import.rst:159 +msgid "See also :c:func:`PyImport_ExecCodeModuleWithPathnames`." +msgstr "" + +#: c-api/import.rst:164 +msgid "" +"Like :c:func:`PyImport_ExecCodeModuleEx`, but the :attr:`__cached__` " +"attribute of the module object is set to *cpathname* if it is non-``NULL``. " +"Of the three functions, this is the preferred one to use." +msgstr "" + +#: c-api/import.rst:173 +msgid "" +"Like :c:func:`PyImport_ExecCodeModuleObject`, but *name*, *pathname* and " +"*cpathname* are UTF-8 encoded strings. Attempts are also made to figure out " +"what the value for *pathname* should be from *cpathname* if the former is " +"set to ``NULL``." +msgstr "" + +#: c-api/import.rst:179 +msgid "" +"Uses :func:`imp.source_from_cache()` in calculating the source path if only " +"the bytecode path is provided." +msgstr "" + +#: c-api/import.rst:186 +msgid "" +"Return the magic number for Python bytecode files (a.k.a. :file:`.pyc` " +"file). The magic number should be present in the first four bytes of the " +"bytecode file, in little-endian byte order. Returns ``-1`` on error." +msgstr "" + +#: c-api/import.rst:190 +msgid "Return value of ``-1`` upon failure." +msgstr "" + +#: c-api/import.rst:196 +msgid "" +"Return the magic tag string for :pep:`3147` format Python bytecode file " +"names. Keep in mind that the value at ``sys.implementation.cache_tag`` is " +"authoritative and should be used instead of this function." +msgstr "" + +#: c-api/import.rst:204 +msgid "" +"Return the dictionary used for the module administration (a.k.a. ``sys." +"modules``). Note that this is a per-interpreter variable." +msgstr "" + +#: c-api/import.rst:209 +msgid "" +"Return the already imported module with the given name. If the module has " +"not been imported yet then returns ``NULL`` but does not set an error. " +"Returns ``NULL`` and sets an error if the lookup failed." +msgstr "" + +#: c-api/import.rst:217 +msgid "" +"Return a finder object for a :data:`sys.path`/:attr:`pkg.__path__` item " +"*path*, possibly by fetching it from the :data:`sys.path_importer_cache` " +"dict. If it wasn't yet cached, traverse :data:`sys.path_hooks` until a hook " +"is found that can handle the path item. Return ``None`` if no hook could; " +"this tells our caller that the :term:`path based finder` could not find a " +"finder for this path item. Cache the result in :data:`sys." +"path_importer_cache`. Return a new reference to the finder object." +msgstr "" + +#: c-api/import.rst:228 +msgid "" +"Load a frozen module named *name*. Return ``1`` for success, ``0`` if the " +"module is not found, and ``-1`` with an exception set if the initialization " +"failed. To access the imported module on a successful load, use :c:func:" +"`PyImport_ImportModule`. (Note the misnomer --- this function would reload " +"the module if it was already imported.)" +msgstr "" + +#: c-api/import.rst:236 +msgid "The ``__file__`` attribute is no longer set on the module." +msgstr "" + +#: c-api/import.rst:242 +msgid "" +"Similar to :c:func:`PyImport_ImportFrozenModuleObject`, but the name is a " +"UTF-8 encoded string instead of a Unicode object." +msgstr "" + +#: c-api/import.rst:250 +msgid "" +"This is the structure type definition for frozen module descriptors, as " +"generated by the :program:`freeze` utility (see :file:`Tools/freeze/` in the " +"Python source distribution). Its definition, found in :file:`Include/import." +"h`, is::" +msgstr "" + +#: c-api/import.rst:264 +#, fuzzy +msgid "" +"This pointer is initialized to point to an array of :c:struct:`_frozen` " +"records, terminated by one whose members are all ``NULL`` or zero. When a " +"frozen module is imported, it is searched in this table. Third-party code " +"could play tricks with this to provide a dynamically created collection of " +"frozen modules." +msgstr "" +"Ce pointeur est initialisé de manière à pointer sur un tableau d'entrées de :" +"c:type:`struct _frozen`, dont tous les membres de la dernière valent " +"``NULL`` ou zéro. Quand un module figé est importé, il est cherché dans ce " +"tableau. Du code tiers peut jouer avec pour construire dynamiquement une " +"collection de module figés." + +#: c-api/import.rst:272 +msgid "" +"Add a single module to the existing table of built-in modules. This is a " +"convenience wrapper around :c:func:`PyImport_ExtendInittab`, returning " +"``-1`` if the table could not be extended. The new module can be imported " +"by the name *name*, and uses the function *initfunc* as the initialization " +"function called on the first attempted import. This should be called " +"before :c:func:`Py_Initialize`." +msgstr "" + +#: c-api/import.rst:282 +msgid "" +"Structure describing a single entry in the list of built-in modules. Each " +"of these structures gives the name and initialization function for a module " +"built into the interpreter. The name is an ASCII encoded string. Programs " +"which embed Python may use an array of these structures in conjunction with :" +"c:func:`PyImport_ExtendInittab` to provide additional built-in modules. The " +"structure is defined in :file:`Include/import.h` as::" +msgstr "" + +#: c-api/import.rst:297 +msgid "" +"Add a collection of modules to the table of built-in modules. The *newtab* " +"array must end with a sentinel entry which contains ``NULL`` for the :attr:" +"`name` field; failure to provide the sentinel value can result in a memory " +"fault. Returns ``0`` on success or ``-1`` if insufficient memory could be " +"allocated to extend the internal table. In the event of failure, no modules " +"are added to the internal table. This must be called before :c:func:" +"`Py_Initialize`." +msgstr "" + +#: c-api/import.rst:304 +msgid "" +"If Python is initialized multiple times, :c:func:`PyImport_AppendInittab` " +"or :c:func:`PyImport_ExtendInittab` must be called before each Python " +"initialization." +msgstr "" diff --git a/c-api/index.po b/c-api/index.po new file mode 100644 index 0000000000..53095f5826 --- /dev/null +++ b/c-api/index.po @@ -0,0 +1,32 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-08-24 09:01+0200\n" +"PO-Revision-Date: 2018-02-15 00:33+0100\n" +"Last-Translator: Julien Palard \n" +"Language-Team: FRENCH \n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: c-api/index.rst:5 +msgid "Python/C API Reference Manual" +msgstr "Manuel de référence de l'API Python/C" + +#: c-api/index.rst:7 +msgid "" +"This manual documents the API used by C and C++ programmers who want to " +"write extension modules or embed Python. It is a companion to :ref:" +"`extending-index`, which describes the general principles of extension " +"writing but does not document the API functions in detail." +msgstr "" +"C'est la documentation de l'API utilisée par les développeurs C et C++ " +"écrivant des modules d'extension ou intégrant Python. Elle va de pair avec :" +"ref:`extending-index`, qui décrit les principes généraux de l'écriture " +"d'extensions, mais ne rentre pas dans les détails de chaque fonction de " +"l'API." diff --git a/c-api/init.po b/c-api/init.po new file mode 100644 index 0000000000..a79574f2df --- /dev/null +++ b/c-api/init.po @@ -0,0 +1,2045 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-22 22:57+0100\n" +"PO-Revision-Date: 2018-11-29 18:22+0100\n" +"Last-Translator: FULL NAME \n" +"Language-Team: FRENCH \n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: c-api/init.rst:8 +msgid "Initialization, Finalization, and Threads" +msgstr "" + +#: c-api/init.rst:10 +msgid "See also :ref:`Python Initialization Configuration `." +msgstr "" + +#: c-api/init.rst:15 +msgid "Before Python Initialization" +msgstr "" + +#: c-api/init.rst:17 +msgid "" +"In an application embedding Python, the :c:func:`Py_Initialize` function " +"must be called before using any other Python/C API functions; with the " +"exception of a few functions and the :ref:`global configuration variables " +"`." +msgstr "" + +#: c-api/init.rst:22 +msgid "" +"The following functions can be safely called before Python is initialized:" +msgstr "" + +#: c-api/init.rst:24 +msgid "Configuration functions:" +msgstr "" + +#: c-api/init.rst:26 +msgid ":c:func:`PyImport_AppendInittab`" +msgstr "" + +#: c-api/init.rst:27 +msgid ":c:func:`PyImport_ExtendInittab`" +msgstr "" + +#: c-api/init.rst:28 +msgid ":c:func:`PyInitFrozenExtensions`" +msgstr "" + +#: c-api/init.rst:29 +msgid ":c:func:`PyMem_SetAllocator`" +msgstr "" + +#: c-api/init.rst:30 +msgid ":c:func:`PyMem_SetupDebugHooks`" +msgstr "" + +#: c-api/init.rst:31 +msgid ":c:func:`PyObject_SetArenaAllocator`" +msgstr "" + +#: c-api/init.rst:32 +msgid ":c:func:`Py_SetPath`" +msgstr "" + +#: c-api/init.rst:33 +msgid ":c:func:`Py_SetProgramName`" +msgstr "" + +#: c-api/init.rst:34 +msgid ":c:func:`Py_SetPythonHome`" +msgstr "" + +#: c-api/init.rst:35 +msgid ":c:func:`Py_SetStandardStreamEncoding`" +msgstr "" + +#: c-api/init.rst:36 +msgid ":c:func:`PySys_AddWarnOption`" +msgstr "" + +#: c-api/init.rst:37 +msgid ":c:func:`PySys_AddXOption`" +msgstr "" + +#: c-api/init.rst:38 +msgid ":c:func:`PySys_ResetWarnOptions`" +msgstr "" + +#: c-api/init.rst:40 +msgid "Informative functions:" +msgstr "" + +#: c-api/init.rst:42 +msgid ":c:func:`Py_IsInitialized`" +msgstr "" + +#: c-api/init.rst:43 +msgid ":c:func:`PyMem_GetAllocator`" +msgstr "" + +#: c-api/init.rst:44 +msgid ":c:func:`PyObject_GetArenaAllocator`" +msgstr "" + +#: c-api/init.rst:45 +msgid ":c:func:`Py_GetBuildInfo`" +msgstr "" + +#: c-api/init.rst:46 +msgid ":c:func:`Py_GetCompiler`" +msgstr "" + +#: c-api/init.rst:47 +msgid ":c:func:`Py_GetCopyright`" +msgstr "" + +#: c-api/init.rst:48 +msgid ":c:func:`Py_GetPlatform`" +msgstr "" + +#: c-api/init.rst:49 +msgid ":c:func:`Py_GetVersion`" +msgstr "" + +#: c-api/init.rst:51 +#, fuzzy +msgid "Utilities:" +msgstr "Utilitaires" + +#: c-api/init.rst:53 +msgid ":c:func:`Py_DecodeLocale`" +msgstr "" + +#: c-api/init.rst:55 +msgid "Memory allocators:" +msgstr "" + +#: c-api/init.rst:57 +#, fuzzy +msgid ":c:func:`PyMem_RawMalloc`" +msgstr ":c:func:`PyMem_RawCalloc`," + +#: c-api/init.rst:58 +#, fuzzy +msgid ":c:func:`PyMem_RawRealloc`" +msgstr ":c:func:`PyMem_RawCalloc`," + +#: c-api/init.rst:59 +#, fuzzy +msgid ":c:func:`PyMem_RawCalloc`" +msgstr ":c:func:`PyMem_RawCalloc`," + +#: c-api/init.rst:60 +msgid ":c:func:`PyMem_RawFree`" +msgstr "" + +#: c-api/init.rst:64 +msgid "" +"The following functions **should not be called** before :c:func:" +"`Py_Initialize`: :c:func:`Py_EncodeLocale`, :c:func:`Py_GetPath`, :c:func:" +"`Py_GetPrefix`, :c:func:`Py_GetExecPrefix`, :c:func:" +"`Py_GetProgramFullPath`, :c:func:`Py_GetPythonHome`, :c:func:" +"`Py_GetProgramName` and :c:func:`PyEval_InitThreads`." +msgstr "" + +#: c-api/init.rst:74 +msgid "Global configuration variables" +msgstr "" + +#: c-api/init.rst:76 +msgid "" +"Python has variables for the global configuration to control different " +"features and options. By default, these flags are controlled by :ref:" +"`command line options `." +msgstr "" + +#: c-api/init.rst:80 +msgid "" +"When a flag is set by an option, the value of the flag is the number of " +"times that the option was set. For example, ``-b`` sets :c:data:" +"`Py_BytesWarningFlag` to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to " +"2." +msgstr "" + +#: c-api/init.rst:86 +msgid "" +"Issue a warning when comparing :class:`bytes` or :class:`bytearray` with :" +"class:`str` or :class:`bytes` with :class:`int`. Issue an error if greater " +"or equal to ``2``." +msgstr "" + +#: c-api/init.rst:90 +msgid "Set by the :option:`-b` option." +msgstr "" + +#: c-api/init.rst:94 +msgid "" +"Turn on parser debugging output (for expert only, depending on compilation " +"options)." +msgstr "" + +#: c-api/init.rst:97 +msgid "" +"Set by the :option:`-d` option and the :envvar:`PYTHONDEBUG` environment " +"variable." +msgstr "" + +#: c-api/init.rst:102 +msgid "" +"If set to non-zero, Python won't try to write ``.pyc`` files on the import " +"of source modules." +msgstr "" + +#: c-api/init.rst:105 +msgid "" +"Set by the :option:`-B` option and the :envvar:`PYTHONDONTWRITEBYTECODE` " +"environment variable." +msgstr "" + +#: c-api/init.rst:110 +msgid "" +"Suppress error messages when calculating the module search path in :c:func:" +"`Py_GetPath`." +msgstr "" + +#: c-api/init.rst:113 +msgid "Private flag used by ``_freeze_importlib`` and ``frozenmain`` programs." +msgstr "" + +#: c-api/init.rst:117 +msgid "" +"Set to ``1`` if the :envvar:`PYTHONHASHSEED` environment variable is set to " +"a non-empty string." +msgstr "" + +#: c-api/init.rst:120 +msgid "" +"If the flag is non-zero, read the :envvar:`PYTHONHASHSEED` environment " +"variable to initialize the secret hash seed." +msgstr "" + +#: c-api/init.rst:125 +msgid "" +"Ignore all :envvar:`PYTHON*` environment variables, e.g. :envvar:" +"`PYTHONPATH` and :envvar:`PYTHONHOME`, that might be set." +msgstr "" +"Ignore toutes les variables d'environnement :envvar:`PYTHON*` qui pourraient " +"être définies. Par exemple, :envvar:`PYTHONPATH` et :envvar:`PYTHONHOME`." + +#: c-api/init.rst:128 +msgid "Set by the :option:`-E` and :option:`-I` options." +msgstr "" + +#: c-api/init.rst:132 +msgid "" +"When a script is passed as first argument or the :option:`-c` option is " +"used, enter interactive mode after executing the script or the command, even " +"when :data:`sys.stdin` does not appear to be a terminal." +msgstr "" + +#: c-api/init.rst:136 +msgid "" +"Set by the :option:`-i` option and the :envvar:`PYTHONINSPECT` environment " +"variable." +msgstr "" + +#: c-api/init.rst:141 +msgid "Set by the :option:`-i` option." +msgstr "" + +#: c-api/init.rst:145 +msgid "" +"Run Python in isolated mode. In isolated mode :data:`sys.path` contains " +"neither the script's directory nor the user's site-packages directory." +msgstr "" + +#: c-api/init.rst:148 +msgid "Set by the :option:`-I` option." +msgstr "" + +#: c-api/init.rst:154 +msgid "" +"If the flag is non-zero, use the ``mbcs`` encoding with ``replace`` error " +"handler, instead of the UTF-8 encoding with ``surrogatepass`` error handler, " +"for the :term:`filesystem encoding and error handler`." +msgstr "" + +#: c-api/init.rst:158 +msgid "" +"Set to ``1`` if the :envvar:`PYTHONLEGACYWINDOWSFSENCODING` environment " +"variable is set to a non-empty string." +msgstr "" + +#: c-api/init.rst:161 +msgid "See :pep:`529` for more details." +msgstr "Voir la :pep:`529` pour plus d'informations." + +#: c-api/init.rst:175 +msgid ":ref:`Availability `: Windows." +msgstr ":ref:`Disponibilité ` : Windows." + +#: c-api/init.rst:167 +msgid "" +"If the flag is non-zero, use :class:`io.FileIO` instead of :class:" +"`WindowsConsoleIO` for :mod:`sys` standard streams." +msgstr "" + +#: c-api/init.rst:170 +msgid "" +"Set to ``1`` if the :envvar:`PYTHONLEGACYWINDOWSSTDIO` environment variable " +"is set to a non-empty string." +msgstr "" + +#: c-api/init.rst:173 +#, fuzzy +msgid "See :pep:`528` for more details." +msgstr "Voir la :pep:`529` pour plus d'informations." + +#: c-api/init.rst:179 +msgid "" +"Disable the import of the module :mod:`site` and the site-dependent " +"manipulations of :data:`sys.path` that it entails. Also disable these " +"manipulations if :mod:`site` is explicitly imported later (call :func:`site." +"main` if you want them to be triggered)." +msgstr "" +"Désactive l’importation du module :mod:`site` et les modifications locales " +"de :data:`sys.path` qu’il implique. Désactive aussi ces manipulations si :" +"mod:`site` est importé explicitement plus tard (appelez :func:`site.main` si " +"vous voulez les déclencher)." + +#: c-api/init.rst:184 +msgid "Set by the :option:`-S` option." +msgstr "" + +#: c-api/init.rst:188 +msgid "" +"Don't add the :data:`user site-packages directory ` to :data:" +"`sys.path`." +msgstr "" +"N'ajoute pas le répertoire utilisateur :data:`site-packages ` à :data:`sys.path`." + +#: c-api/init.rst:191 +msgid "" +"Set by the :option:`-s` and :option:`-I` options, and the :envvar:" +"`PYTHONNOUSERSITE` environment variable." +msgstr "" + +#: c-api/init.rst:196 +msgid "" +"Set by the :option:`-O` option and the :envvar:`PYTHONOPTIMIZE` environment " +"variable." +msgstr "" + +#: c-api/init.rst:201 +msgid "" +"Don't display the copyright and version messages even in interactive mode." +msgstr "N'affiche pas le copyright et la version, même en mode interactif." + +#: c-api/init.rst:203 +msgid "Set by the :option:`-q` option." +msgstr "" + +#: c-api/init.rst:209 +msgid "Force the stdout and stderr streams to be unbuffered." +msgstr "" + +#: c-api/init.rst:211 +msgid "" +"Set by the :option:`-u` option and the :envvar:`PYTHONUNBUFFERED` " +"environment variable." +msgstr "" + +#: c-api/init.rst:216 +msgid "" +"Print a message each time a module is initialized, showing the place " +"(filename or built-in module) from which it is loaded. If greater or equal " +"to ``2``, print a message for each file that is checked for when searching " +"for a module. Also provides information on module cleanup at exit." +msgstr "" + +#: c-api/init.rst:221 +msgid "" +"Set by the :option:`-v` option and the :envvar:`PYTHONVERBOSE` environment " +"variable." +msgstr "" + +#: c-api/init.rst:226 +msgid "Initializing and finalizing the interpreter" +msgstr "" + +#: c-api/init.rst:244 +msgid "" +"Initialize the Python interpreter. In an application embedding Python, " +"this should be called before using any other Python/C API functions; see :" +"ref:`Before Python Initialization ` for the few exceptions." +msgstr "" + +#: c-api/init.rst:248 +msgid "" +"This initializes the table of loaded modules (``sys.modules``), and creates " +"the fundamental modules :mod:`builtins`, :mod:`__main__` and :mod:`sys`. It " +"also initializes the module search path (``sys.path``). It does not set " +"``sys.argv``; use :c:func:`PySys_SetArgvEx` for that. This is a no-op when " +"called for a second time (without calling :c:func:`Py_FinalizeEx` first). " +"There is no return value; it is a fatal error if the initialization fails." +msgstr "" + +#: c-api/init.rst:257 +msgid "" +"On Windows, changes the console mode from ``O_TEXT`` to ``O_BINARY``, which " +"will also affect non-Python uses of the console using the C Runtime." +msgstr "" + +#: c-api/init.rst:263 +msgid "" +"This function works like :c:func:`Py_Initialize` if *initsigs* is ``1``. If " +"*initsigs* is ``0``, it skips initialization registration of signal " +"handlers, which might be useful when Python is embedded." +msgstr "" + +#: c-api/init.rst:270 +msgid "" +"Return true (nonzero) when the Python interpreter has been initialized, " +"false (zero) if not. After :c:func:`Py_FinalizeEx` is called, this returns " +"false until :c:func:`Py_Initialize` is called again." +msgstr "" + +#: c-api/init.rst:277 +msgid "" +"Undo all initializations made by :c:func:`Py_Initialize` and subsequent use " +"of Python/C API functions, and destroy all sub-interpreters (see :c:func:" +"`Py_NewInterpreter` below) that were created and not yet destroyed since the " +"last call to :c:func:`Py_Initialize`. Ideally, this frees all memory " +"allocated by the Python interpreter. This is a no-op when called for a " +"second time (without calling :c:func:`Py_Initialize` again first). Normally " +"the return value is ``0``. If there were errors during finalization " +"(flushing buffered data), ``-1`` is returned." +msgstr "" + +#: c-api/init.rst:286 +msgid "" +"This function is provided for a number of reasons. An embedding application " +"might want to restart Python without having to restart the application " +"itself. An application that has loaded the Python interpreter from a " +"dynamically loadable library (or DLL) might want to free all memory " +"allocated by Python before unloading the DLL. During a hunt for memory leaks " +"in an application a developer might want to free all memory allocated by " +"Python before exiting from the application." +msgstr "" + +#: c-api/init.rst:294 +msgid "" +"**Bugs and caveats:** The destruction of modules and objects in modules is " +"done in random order; this may cause destructors (:meth:`__del__` methods) " +"to fail when they depend on other objects (even functions) or modules. " +"Dynamically loaded extension modules loaded by Python are not unloaded. " +"Small amounts of memory allocated by the Python interpreter may not be freed " +"(if you find a leak, please report it). Memory tied up in circular " +"references between objects is not freed. Some memory allocated by extension " +"modules may not be freed. Some extensions may not work properly if their " +"initialization routine is called more than once; this can happen if an " +"application calls :c:func:`Py_Initialize` and :c:func:`Py_FinalizeEx` more " +"than once." +msgstr "" + +#: c-api/init.rst:305 +msgid "" +"Raises an :ref:`auditing event ` ``cpython." +"_PySys_ClearAuditHooks`` with no arguments." +msgstr "" + +#: c-api/init.rst:311 +msgid "" +"This is a backwards-compatible version of :c:func:`Py_FinalizeEx` that " +"disregards the return value." +msgstr "" + +#: c-api/init.rst:316 +msgid "Process-wide parameters" +msgstr "" + +#: c-api/init.rst:326 +msgid "" +"This function should be called before :c:func:`Py_Initialize`, if it is " +"called at all. It specifies which encoding and error handling to use with " +"standard IO, with the same meanings as in :func:`str.encode`." +msgstr "" + +#: c-api/init.rst:330 +msgid "" +"It overrides :envvar:`PYTHONIOENCODING` values, and allows embedding code to " +"control IO encoding when the environment variable does not work." +msgstr "" + +#: c-api/init.rst:333 +msgid "" +"*encoding* and/or *errors* may be ``NULL`` to use :envvar:`PYTHONIOENCODING` " +"and/or default values (depending on other settings)." +msgstr "" + +#: c-api/init.rst:337 +msgid "" +"Note that :data:`sys.stderr` always uses the \"backslashreplace\" error " +"handler, regardless of this (or any other) setting." +msgstr "" + +#: c-api/init.rst:340 +msgid "" +"If :c:func:`Py_FinalizeEx` is called, this function will need to be called " +"again in order to affect subsequent calls to :c:func:`Py_Initialize`." +msgstr "" + +#: c-api/init.rst:343 +msgid "" +"Returns ``0`` if successful, a nonzero value on error (e.g. calling after " +"the interpreter has already been initialized)." +msgstr "" + +#: c-api/init.rst:356 +msgid "" +"This function should be called before :c:func:`Py_Initialize` is called for " +"the first time, if it is called at all. It tells the interpreter the value " +"of the ``argv[0]`` argument to the :c:func:`main` function of the program " +"(converted to wide characters). This is used by :c:func:`Py_GetPath` and " +"some other functions below to find the Python run-time libraries relative to " +"the interpreter executable. The default value is ``'python'``. The " +"argument should point to a zero-terminated wide character string in static " +"storage whose contents will not change for the duration of the program's " +"execution. No code in the Python interpreter will change the contents of " +"this storage." +msgstr "" + +#: c-api/init.rst:511 c-api/init.rst:644 c-api/init.rst:661 +msgid "" +"Use :c:func:`Py_DecodeLocale` to decode a bytes string to get a :c:expr:" +"`wchar_*` string." +msgstr "" + +#: c-api/init.rst:375 +msgid "" +"Return the program name set with :c:func:`Py_SetProgramName`, or the " +"default. The returned string points into static storage; the caller should " +"not modify its value." +msgstr "" + +#: c-api/init.rst:398 c-api/init.rst:458 c-api/init.rst:671 +msgid "" +"This function should not be called before :c:func:`Py_Initialize`, otherwise " +"it returns ``NULL``." +msgstr "" + +#: c-api/init.rst:401 c-api/init.rst:461 c-api/init.rst:674 +msgid "It now returns ``NULL`` if called before :c:func:`Py_Initialize`." +msgstr "" + +#: c-api/init.rst:388 +msgid "" +"Return the *prefix* for installed platform-independent files. This is " +"derived through a number of complicated rules from the program name set " +"with :c:func:`Py_SetProgramName` and some environment variables; for " +"example, if the program name is ``'/usr/local/bin/python'``, the prefix is " +"``'/usr/local'``. The returned string points into static storage; the caller " +"should not modify its value. This corresponds to the :makevar:`prefix` " +"variable in the top-level :file:`Makefile` and the :option:`--prefix` " +"argument to the :program:`configure` script at build time. The value is " +"available to Python code as ``sys.prefix``. It is only useful on Unix. See " +"also the next function." +msgstr "" + +#: c-api/init.rst:407 +msgid "" +"Return the *exec-prefix* for installed platform-*dependent* files. This is " +"derived through a number of complicated rules from the program name set " +"with :c:func:`Py_SetProgramName` and some environment variables; for " +"example, if the program name is ``'/usr/local/bin/python'``, the exec-prefix " +"is ``'/usr/local'``. The returned string points into static storage; the " +"caller should not modify its value. This corresponds to the :makevar:" +"`exec_prefix` variable in the top-level :file:`Makefile` and the ``--exec-" +"prefix`` argument to the :program:`configure` script at build time. The " +"value is available to Python code as ``sys.exec_prefix``. It is only useful " +"on Unix." +msgstr "" + +#: c-api/init.rst:417 +msgid "" +"Background: The exec-prefix differs from the prefix when platform dependent " +"files (such as executables and shared libraries) are installed in a " +"different directory tree. In a typical installation, platform dependent " +"files may be installed in the :file:`/usr/local/plat` subtree while platform " +"independent may be installed in :file:`/usr/local`." +msgstr "" + +#: c-api/init.rst:423 +msgid "" +"Generally speaking, a platform is a combination of hardware and software " +"families, e.g. Sparc machines running the Solaris 2.x operating system are " +"considered the same platform, but Intel machines running Solaris 2.x are " +"another platform, and Intel machines running Linux are yet another " +"platform. Different major revisions of the same operating system generally " +"also form different platforms. Non-Unix operating systems are a different " +"story; the installation strategies on those systems are so different that " +"the prefix and exec-prefix are meaningless, and set to the empty string. " +"Note that compiled Python bytecode files are platform independent (but not " +"independent from the Python version by which they were compiled!)." +msgstr "" + +#: c-api/init.rst:434 +msgid "" +"System administrators will know how to configure the :program:`mount` or :" +"program:`automount` programs to share :file:`/usr/local` between platforms " +"while having :file:`/usr/local/plat` be a different filesystem for each " +"platform." +msgstr "" + +#: c-api/init.rst:452 +msgid "" +"Return the full program name of the Python executable; this is computed as " +"a side-effect of deriving the default module search path from the program " +"name (set by :c:func:`Py_SetProgramName` above). The returned string points " +"into static storage; the caller should not modify its value. The value is " +"available to Python code as ``sys.executable``." +msgstr "" + +#: c-api/init.rst:472 +msgid "" +"Return the default module search path; this is computed from the program " +"name (set by :c:func:`Py_SetProgramName` above) and some environment " +"variables. The returned string consists of a series of directory names " +"separated by a platform dependent delimiter character. The delimiter " +"character is ``':'`` on Unix and macOS, ``';'`` on Windows. The returned " +"string points into static storage; the caller should not modify its value. " +"The list :data:`sys.path` is initialized with this value on interpreter " +"startup; it can be (and usually is) modified later to change the search path " +"for loading modules." +msgstr "" + +#: c-api/init.rst:498 +msgid "" +"Set the default module search path. If this function is called before :c:" +"func:`Py_Initialize`, then :c:func:`Py_GetPath` won't attempt to compute a " +"default search path but uses the one provided instead. This is useful if " +"Python is embedded by an application that has full knowledge of the location " +"of all modules. The path components should be separated by the platform " +"dependent delimiter character, which is ``':'`` on Unix and macOS, ``';'`` " +"on Windows." +msgstr "" + +#: c-api/init.rst:506 +msgid "" +"This also causes :data:`sys.executable` to be set to the program full path " +"(see :c:func:`Py_GetProgramFullPath`) and for :data:`sys.prefix` and :data:" +"`sys.exec_prefix` to be empty. It is up to the caller to modify these if " +"required after calling :c:func:`Py_Initialize`." +msgstr "" + +#: c-api/init.rst:514 +msgid "" +"The path argument is copied internally, so the caller may free it after the " +"call completes." +msgstr "" + +#: c-api/init.rst:517 +msgid "" +"The program full path is now used for :data:`sys.executable`, instead of the " +"program name." +msgstr "" + +#: c-api/init.rst:524 +msgid "" +"Return the version of this Python interpreter. This is a string that looks " +"something like ::" +msgstr "" + +#: c-api/init.rst:531 +msgid "" +"The first word (up to the first space character) is the current Python " +"version; the first characters are the major and minor version separated by a " +"period. The returned string points into static storage; the caller should " +"not modify its value. The value is available to Python code as :data:`sys." +"version`." +msgstr "" + +#: c-api/init.rst:541 +msgid "" +"Return the platform identifier for the current platform. On Unix, this is " +"formed from the \"official\" name of the operating system, converted to " +"lower case, followed by the major revision number; e.g., for Solaris 2.x, " +"which is also known as SunOS 5.x, the value is ``'sunos5'``. On macOS, it " +"is ``'darwin'``. On Windows, it is ``'win'``. The returned string points " +"into static storage; the caller should not modify its value. The value is " +"available to Python code as ``sys.platform``." +msgstr "" + +#: c-api/init.rst:552 +msgid "" +"Return the official copyright string for the current Python version, for " +"example" +msgstr "" + +#: c-api/init.rst:554 +msgid "``'Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam'``" +msgstr "" + +#: c-api/init.rst:558 +msgid "" +"The returned string points into static storage; the caller should not modify " +"its value. The value is available to Python code as ``sys.copyright``." +msgstr "" + +#: c-api/init.rst:564 +msgid "" +"Return an indication of the compiler used to build the current Python " +"version, in square brackets, for example::" +msgstr "" + +#: c-api/init.rst:585 +msgid "" +"The returned string points into static storage; the caller should not modify " +"its value. The value is available to Python code as part of the variable " +"``sys.version``." +msgstr "" + +#: c-api/init.rst:578 +msgid "" +"Return information about the sequence number and build date and time of the " +"current Python interpreter instance, for example ::" +msgstr "" + +#: c-api/init.rst:597 +msgid "" +"Set :data:`sys.argv` based on *argc* and *argv*. These parameters are " +"similar to those passed to the program's :c:func:`main` function with the " +"difference that the first entry should refer to the script file to be " +"executed rather than the executable hosting the Python interpreter. If " +"there isn't a script that will be run, the first entry in *argv* can be an " +"empty string. If this function fails to initialize :data:`sys.argv`, a " +"fatal condition is signalled using :c:func:`Py_FatalError`." +msgstr "" + +#: c-api/init.rst:605 +msgid "" +"If *updatepath* is zero, this is all the function does. If *updatepath* is " +"non-zero, the function also modifies :data:`sys.path` according to the " +"following algorithm:" +msgstr "" + +#: c-api/init.rst:609 +msgid "" +"If the name of an existing script is passed in ``argv[0]``, the absolute " +"path of the directory where the script is located is prepended to :data:`sys." +"path`." +msgstr "" + +#: c-api/init.rst:612 +msgid "" +"Otherwise (that is, if *argc* is ``0`` or ``argv[0]`` doesn't point to an " +"existing file name), an empty string is prepended to :data:`sys.path`, which " +"is the same as prepending the current working directory (``\".\"``)." +msgstr "" + +#: c-api/init.rst:621 +msgid "" +"It is recommended that applications embedding the Python interpreter for " +"purposes other than executing a single script pass ``0`` as *updatepath*, " +"and update :data:`sys.path` themselves if desired. See `CVE-2008-5983 " +"`_." +msgstr "" + +#: c-api/init.rst:626 +msgid "" +"On versions before 3.1.3, you can achieve the same effect by manually " +"popping the first :data:`sys.path` element after having called :c:func:" +"`PySys_SetArgv`, for example using::" +msgstr "" + +#: c-api/init.rst:640 +msgid "" +"This function works like :c:func:`PySys_SetArgvEx` with *updatepath* set to " +"``1`` unless the :program:`python` interpreter was started with the :option:" +"`-I`." +msgstr "" + +#: c-api/init.rst:647 +msgid "The *updatepath* value depends on :option:`-I`." +msgstr "" + +#: c-api/init.rst:652 +msgid "" +"Set the default \"home\" directory, that is, the location of the standard " +"Python libraries. See :envvar:`PYTHONHOME` for the meaning of the argument " +"string." +msgstr "" + +#: c-api/init.rst:656 +msgid "" +"The argument should point to a zero-terminated character string in static " +"storage whose contents will not change for the duration of the program's " +"execution. No code in the Python interpreter will change the contents of " +"this storage." +msgstr "" + +#: c-api/init.rst:667 +msgid "" +"Return the default \"home\", that is, the value set by a previous call to :c:" +"func:`Py_SetPythonHome`, or the value of the :envvar:`PYTHONHOME` " +"environment variable if it is set." +msgstr "" + +#: c-api/init.rst:681 +msgid "Thread State and the Global Interpreter Lock" +msgstr "" + +#: c-api/init.rst:688 +msgid "" +"The Python interpreter is not fully thread-safe. In order to support multi-" +"threaded Python programs, there's a global lock, called the :term:`global " +"interpreter lock` or :term:`GIL`, that must be held by the current thread " +"before it can safely access Python objects. Without the lock, even the " +"simplest operations could cause problems in a multi-threaded program: for " +"example, when two threads simultaneously increment the reference count of " +"the same object, the reference count could end up being incremented only " +"once instead of twice." +msgstr "" + +#: c-api/init.rst:698 +msgid "" +"Therefore, the rule exists that only the thread that has acquired the :term:" +"`GIL` may operate on Python objects or call Python/C API functions. In order " +"to emulate concurrency of execution, the interpreter regularly tries to " +"switch threads (see :func:`sys.setswitchinterval`). The lock is also " +"released around potentially blocking I/O operations like reading or writing " +"a file, so that other Python threads can run in the meantime." +msgstr "" + +#: c-api/init.rst:709 +msgid "" +"The Python interpreter keeps some thread-specific bookkeeping information " +"inside a data structure called :c:type:`PyThreadState`. There's also one " +"global variable pointing to the current :c:type:`PyThreadState`: it can be " +"retrieved using :c:func:`PyThreadState_Get`." +msgstr "" + +#: c-api/init.rst:715 +msgid "Releasing the GIL from extension code" +msgstr "" + +#: c-api/init.rst:717 +msgid "" +"Most extension code manipulating the :term:`GIL` has the following simple " +"structure::" +msgstr "" + +#: c-api/init.rst:726 +msgid "This is so common that a pair of macros exists to simplify it::" +msgstr "" + +#: c-api/init.rst:736 +msgid "" +"The :c:macro:`Py_BEGIN_ALLOW_THREADS` macro opens a new block and declares a " +"hidden local variable; the :c:macro:`Py_END_ALLOW_THREADS` macro closes the " +"block." +msgstr "" + +#: c-api/init.rst:740 +msgid "The block above expands to the following code::" +msgstr "" + +#: c-api/init.rst:752 +msgid "" +"Here is how these functions work: the global interpreter lock is used to " +"protect the pointer to the current thread state. When releasing the lock " +"and saving the thread state, the current thread state pointer must be " +"retrieved before the lock is released (since another thread could " +"immediately acquire the lock and store its own thread state in the global " +"variable). Conversely, when acquiring the lock and restoring the thread " +"state, the lock must be acquired before storing the thread state pointer." +msgstr "" + +#: c-api/init.rst:761 +msgid "" +"Calling system I/O functions is the most common use case for releasing the " +"GIL, but it can also be useful before calling long-running computations " +"which don't need access to Python objects, such as compression or " +"cryptographic functions operating over memory buffers. For example, the " +"standard :mod:`zlib` and :mod:`hashlib` modules release the GIL when " +"compressing or hashing data." +msgstr "" + +#: c-api/init.rst:772 +msgid "Non-Python created threads" +msgstr "" + +#: c-api/init.rst:774 +msgid "" +"When threads are created using the dedicated Python APIs (such as the :mod:" +"`threading` module), a thread state is automatically associated to them and " +"the code showed above is therefore correct. However, when threads are " +"created from C (for example by a third-party library with its own thread " +"management), they don't hold the GIL, nor is there a thread state structure " +"for them." +msgstr "" + +#: c-api/init.rst:781 +msgid "" +"If you need to call Python code from these threads (often this will be part " +"of a callback API provided by the aforementioned third-party library), you " +"must first register these threads with the interpreter by creating a thread " +"state data structure, then acquiring the GIL, and finally storing their " +"thread state pointer, before you can start using the Python/C API. When you " +"are done, you should reset the thread state pointer, release the GIL, and " +"finally free the thread state data structure." +msgstr "" + +#: c-api/init.rst:789 +msgid "" +"The :c:func:`PyGILState_Ensure` and :c:func:`PyGILState_Release` functions " +"do all of the above automatically. The typical idiom for calling into " +"Python from a C thread is::" +msgstr "" + +#: c-api/init.rst:803 +msgid "" +"Note that the ``PyGILState_*`` functions assume there is only one global " +"interpreter (created automatically by :c:func:`Py_Initialize`). Python " +"supports the creation of additional interpreters (using :c:func:" +"`Py_NewInterpreter`), but mixing multiple interpreters and the " +"``PyGILState_*`` API is unsupported." +msgstr "" + +#: c-api/init.rst:813 +msgid "Cautions about fork()" +msgstr "" + +#: c-api/init.rst:815 +msgid "" +"Another important thing to note about threads is their behaviour in the face " +"of the C :c:func:`fork` call. On most systems with :c:func:`fork`, after a " +"process forks only the thread that issued the fork will exist. This has a " +"concrete impact both on how locks must be handled and on all stored state in " +"CPython's runtime." +msgstr "" + +#: c-api/init.rst:821 +msgid "" +"The fact that only the \"current\" thread remains means any locks held by " +"other threads will never be released. Python solves this for :func:`os.fork` " +"by acquiring the locks it uses internally before the fork, and releasing " +"them afterwards. In addition, it resets any :ref:`lock-objects` in the " +"child. When extending or embedding Python, there is no way to inform Python " +"of additional (non-Python) locks that need to be acquired before or reset " +"after a fork. OS facilities such as :c:func:`pthread_atfork` would need to " +"be used to accomplish the same thing. Additionally, when extending or " +"embedding Python, calling :c:func:`fork` directly rather than through :func:" +"`os.fork` (and returning to or calling into Python) may result in a deadlock " +"by one of Python's internal locks being held by a thread that is defunct " +"after the fork. :c:func:`PyOS_AfterFork_Child` tries to reset the necessary " +"locks, but is not always able to." +msgstr "" + +#: c-api/init.rst:836 +msgid "" +"The fact that all other threads go away also means that CPython's runtime " +"state there must be cleaned up properly, which :func:`os.fork` does. This " +"means finalizing all other :c:type:`PyThreadState` objects belonging to the " +"current interpreter and all other :c:type:`PyInterpreterState` objects. Due " +"to this and the special nature of the :ref:`\"main\" interpreter `, :c:func:`fork` should only be called in that " +"interpreter's \"main\" thread, where the CPython global runtime was " +"originally initialized. The only exception is if :c:func:`exec` will be " +"called immediately after." +msgstr "" + +#: c-api/init.rst:849 +#, fuzzy +msgid "High-level API" +msgstr "Bibliothèques de haut-niveau" + +#: c-api/init.rst:851 +msgid "" +"These are the most commonly used types and functions when writing C " +"extension code, or when embedding the Python interpreter:" +msgstr "" + +#: c-api/init.rst:856 +msgid "" +"This data structure represents the state shared by a number of cooperating " +"threads. Threads belonging to the same interpreter share their module " +"administration and a few other internal items. There are no public members " +"in this structure." +msgstr "" + +#: c-api/init.rst:861 +msgid "" +"Threads belonging to different interpreters initially share nothing, except " +"process state like available memory, open file descriptors and such. The " +"global interpreter lock is also shared by all threads, regardless of to " +"which interpreter they belong." +msgstr "" + +#: c-api/init.rst:869 +msgid "" +"This data structure represents the state of a single thread. The only " +"public data member is :attr:`interp` (:c:expr:`PyInterpreterState *`), which " +"points to this thread's interpreter state." +msgstr "" + +#: c-api/init.rst:882 +msgid "Deprecated function which does nothing." +msgstr "" + +#: c-api/init.rst:884 +msgid "" +"In Python 3.6 and older, this function created the GIL if it didn't exist." +msgstr "" + +#: c-api/init.rst:886 +msgid "The function now does nothing." +msgstr "" + +#: c-api/init.rst:889 +msgid "" +"This function is now called by :c:func:`Py_Initialize()`, so you don't have " +"to call it yourself anymore." +msgstr "" + +#: c-api/init.rst:893 +msgid "" +"This function cannot be called before :c:func:`Py_Initialize()` anymore." +msgstr "" + +#: c-api/init.rst:903 +msgid "" +"Returns a non-zero value if :c:func:`PyEval_InitThreads` has been called. " +"This function can be called without holding the GIL, and therefore can be " +"used to avoid calls to the locking API when running single-threaded." +msgstr "" + +#: c-api/init.rst:907 +msgid "The :term:`GIL` is now initialized by :c:func:`Py_Initialize()`." +msgstr "" + +#: c-api/init.rst:915 +msgid "" +"Release the global interpreter lock (if it has been created) and reset the " +"thread state to ``NULL``, returning the previous thread state (which is not " +"``NULL``). If the lock has been created, the current thread must have " +"acquired it." +msgstr "" + +#: c-api/init.rst:923 +msgid "" +"Acquire the global interpreter lock (if it has been created) and set the " +"thread state to *tstate*, which must not be ``NULL``. If the lock has been " +"created, the current thread must not have acquired it, otherwise deadlock " +"ensues." +msgstr "" + +#: c-api/init.rst:975 c-api/init.rst:1272 +msgid "" +"Calling this function from a thread when the runtime is finalizing will " +"terminate the thread, even if the thread was not created by Python. You can " +"use :c:func:`_Py_IsFinalizing` or :func:`sys.is_finalizing` to check if the " +"interpreter is in process of being finalized before calling this function to " +"avoid unwanted termination." +msgstr "" + +#: c-api/init.rst:937 +msgid "" +"Return the current thread state. The global interpreter lock must be held. " +"When the current thread state is ``NULL``, this issues a fatal error (so " +"that the caller needn't check for ``NULL``)." +msgstr "" + +#: c-api/init.rst:944 +msgid "" +"Swap the current thread state with the thread state given by the argument " +"*tstate*, which may be ``NULL``. The global interpreter lock must be held " +"and is not released." +msgstr "" + +#: c-api/init.rst:949 +msgid "" +"The following functions use thread-local storage, and are not compatible " +"with sub-interpreters:" +msgstr "" + +#: c-api/init.rst:954 +msgid "" +"Ensure that the current thread is ready to call the Python C API regardless " +"of the current state of Python, or of the global interpreter lock. This may " +"be called as many times as desired by a thread as long as each call is " +"matched with a call to :c:func:`PyGILState_Release`. In general, other " +"thread-related APIs may be used between :c:func:`PyGILState_Ensure` and :c:" +"func:`PyGILState_Release` calls as long as the thread state is restored to " +"its previous state before the Release(). For example, normal usage of the :" +"c:macro:`Py_BEGIN_ALLOW_THREADS` and :c:macro:`Py_END_ALLOW_THREADS` macros " +"is acceptable." +msgstr "" + +#: c-api/init.rst:964 +msgid "" +"The return value is an opaque \"handle\" to the thread state when :c:func:" +"`PyGILState_Ensure` was called, and must be passed to :c:func:" +"`PyGILState_Release` to ensure Python is left in the same state. Even though " +"recursive calls are allowed, these handles *cannot* be shared - each unique " +"call to :c:func:`PyGILState_Ensure` must save the handle for its call to :c:" +"func:`PyGILState_Release`." +msgstr "" + +#: c-api/init.rst:971 +msgid "" +"When the function returns, the current thread will hold the GIL and be able " +"to call arbitrary Python code. Failure is a fatal error." +msgstr "" + +#: c-api/init.rst:983 +msgid "" +"Release any resources previously acquired. After this call, Python's state " +"will be the same as it was prior to the corresponding :c:func:" +"`PyGILState_Ensure` call (but generally this state will be unknown to the " +"caller, hence the use of the GILState API)." +msgstr "" + +#: c-api/init.rst:988 +msgid "" +"Every call to :c:func:`PyGILState_Ensure` must be matched by a call to :c:" +"func:`PyGILState_Release` on the same thread." +msgstr "" + +#: c-api/init.rst:994 +msgid "" +"Get the current thread state for this thread. May return ``NULL`` if no " +"GILState API has been used on the current thread. Note that the main thread " +"always has such a thread-state, even if no auto-thread-state call has been " +"made on the main thread. This is mainly a helper/diagnostic function." +msgstr "" + +#: c-api/init.rst:1002 +msgid "" +"Return ``1`` if the current thread is holding the GIL and ``0`` otherwise. " +"This function can be called from any thread at any time. Only if it has had " +"its Python thread state initialized and currently is holding the GIL will it " +"return ``1``. This is mainly a helper/diagnostic function. It can be useful " +"for example in callback contexts or memory allocation functions when knowing " +"that the GIL is locked can allow the caller to perform sensitive actions or " +"otherwise behave differently." +msgstr "" + +#: c-api/init.rst:1014 +msgid "" +"The following macros are normally used without a trailing semicolon; look " +"for example usage in the Python source distribution." +msgstr "" + +#: c-api/init.rst:1020 +msgid "" +"This macro expands to ``{ PyThreadState *_save; _save = PyEval_SaveThread();" +"``. Note that it contains an opening brace; it must be matched with a " +"following :c:macro:`Py_END_ALLOW_THREADS` macro. See above for further " +"discussion of this macro." +msgstr "" + +#: c-api/init.rst:1028 +msgid "" +"This macro expands to ``PyEval_RestoreThread(_save); }``. Note that it " +"contains a closing brace; it must be matched with an earlier :c:macro:" +"`Py_BEGIN_ALLOW_THREADS` macro. See above for further discussion of this " +"macro." +msgstr "" + +#: c-api/init.rst:1036 +msgid "" +"This macro expands to ``PyEval_RestoreThread(_save);``: it is equivalent to :" +"c:macro:`Py_END_ALLOW_THREADS` without the closing brace." +msgstr "" + +#: c-api/init.rst:1042 +msgid "" +"This macro expands to ``_save = PyEval_SaveThread();``: it is equivalent to :" +"c:macro:`Py_BEGIN_ALLOW_THREADS` without the opening brace and variable " +"declaration." +msgstr "" + +#: c-api/init.rst:1048 +#, fuzzy +msgid "Low-level API" +msgstr "Bibliothèques de bas-niveau" + +#: c-api/init.rst:1050 +msgid "" +"All of the following functions must be called after :c:func:`Py_Initialize`." +msgstr "" + +#: c-api/init.rst:1052 +msgid ":c:func:`Py_Initialize()` now initializes the :term:`GIL`." +msgstr "" + +#: c-api/init.rst:1058 +msgid "" +"Create a new interpreter state object. The global interpreter lock need not " +"be held, but may be held if it is necessary to serialize calls to this " +"function." +msgstr "" + +#: c-api/init.rst:1062 +msgid "" +"Raises an :ref:`auditing event ` ``cpython." +"PyInterpreterState_New`` with no arguments." +msgstr "" + +#: c-api/init.rst:1067 +msgid "" +"Reset all information in an interpreter state object. The global " +"interpreter lock must be held." +msgstr "" + +#: c-api/init.rst:1070 +msgid "" +"Raises an :ref:`auditing event ` ``cpython." +"PyInterpreterState_Clear`` with no arguments." +msgstr "" + +#: c-api/init.rst:1075 +msgid "" +"Destroy an interpreter state object. The global interpreter lock need not " +"be held. The interpreter state must have been reset with a previous call " +"to :c:func:`PyInterpreterState_Clear`." +msgstr "" + +#: c-api/init.rst:1082 +msgid "" +"Create a new thread state object belonging to the given interpreter object. " +"The global interpreter lock need not be held, but may be held if it is " +"necessary to serialize calls to this function." +msgstr "" + +#: c-api/init.rst:1089 +msgid "" +"Reset all information in a thread state object. The global interpreter lock " +"must be held." +msgstr "" + +#: c-api/init.rst:1092 +msgid "" +"This function now calls the :c:member:`PyThreadState.on_delete` callback. " +"Previously, that happened in :c:func:`PyThreadState_Delete`." +msgstr "" + +#: c-api/init.rst:1099 +msgid "" +"Destroy a thread state object. The global interpreter lock need not be " +"held. The thread state must have been reset with a previous call to :c:func:" +"`PyThreadState_Clear`." +msgstr "" + +#: c-api/init.rst:1106 +msgid "" +"Destroy the current thread state and release the global interpreter lock. " +"Like :c:func:`PyThreadState_Delete`, the global interpreter lock need not be " +"held. The thread state must have been reset with a previous call to :c:func:" +"`PyThreadState_Clear`." +msgstr "" + +#: c-api/init.rst:1114 +msgid "Get the current frame of the Python thread state *tstate*." +msgstr "" + +#: c-api/init.rst:1116 +msgid "" +"Return a :term:`strong reference`. Return ``NULL`` if no frame is currently " +"executing." +msgstr "" + +#: c-api/init.rst:1119 +msgid "See also :c:func:`PyEval_GetFrame`." +msgstr "" + +#: c-api/init.rst:1130 c-api/init.rst:1139 +msgid "*tstate* must not be ``NULL``." +msgstr "" + +#: c-api/init.rst:1128 +msgid "" +"Get the unique thread state identifier of the Python thread state *tstate*." +msgstr "" + +#: c-api/init.rst:1137 +msgid "Get the interpreter of the Python thread state *tstate*." +msgstr "" + +#: c-api/init.rst:1146 +msgid "Get the current interpreter." +msgstr "" + +#: c-api/init.rst:1148 +msgid "" +"Issue a fatal error if there no current Python thread state or no current " +"interpreter. It cannot return NULL." +msgstr "" + +#: c-api/init.rst:1161 +msgid "The caller must hold the GIL." +msgstr "" + +#: c-api/init.rst:1158 +msgid "" +"Return the interpreter's unique ID. If there was any error in doing so then " +"``-1`` is returned and an error is set." +msgstr "" + +#: c-api/init.rst:1168 +msgid "" +"Return a dictionary in which interpreter-specific data may be stored. If " +"this function returns ``NULL`` then no exception has been raised and the " +"caller should assume no interpreter-specific dict is available." +msgstr "" + +#: c-api/init.rst:1172 +msgid "" +"This is not a replacement for :c:func:`PyModule_GetState()`, which " +"extensions should use to store interpreter-specific state information." +msgstr "" + +#: c-api/init.rst:1179 +msgid "Type of a frame evaluation function." +msgstr "" + +#: c-api/init.rst:1181 +msgid "" +"The *throwflag* parameter is used by the ``throw()`` method of generators: " +"if non-zero, handle the current exception." +msgstr "" + +#: c-api/init.rst:1184 +msgid "The function now takes a *tstate* parameter." +msgstr "" + +#: c-api/init.rst:1189 +msgid "Get the frame evaluation function." +msgstr "" + +#: c-api/init.rst:1199 +msgid "See the :pep:`523` \"Adding a frame evaluation API to CPython\"." +msgstr "" + +#: c-api/init.rst:1197 +msgid "Set the frame evaluation function." +msgstr "" + +#: c-api/init.rst:1206 +msgid "" +"Return a dictionary in which extensions can store thread-specific state " +"information. Each extension should use a unique key to use to store state " +"in the dictionary. It is okay to call this function when no current thread " +"state is available. If this function returns ``NULL``, no exception has been " +"raised and the caller should assume no current thread state is available." +msgstr "" + +#: c-api/init.rst:1215 +msgid "" +"Asynchronously raise an exception in a thread. The *id* argument is the " +"thread id of the target thread; *exc* is the exception object to be raised. " +"This function does not steal any references to *exc*. To prevent naive " +"misuse, you must write your own C extension to call this. Must be called " +"with the GIL held. Returns the number of thread states modified; this is " +"normally one, but will be zero if the thread id isn't found. If *exc* is :" +"const:`NULL`, the pending exception (if any) for the thread is cleared. This " +"raises no exceptions." +msgstr "" + +#: c-api/init.rst:1223 +msgid "" +"The type of the *id* parameter changed from :c:expr:`long` to :c:expr:" +"`unsigned long`." +msgstr "" + +#: c-api/init.rst:1229 +msgid "" +"Acquire the global interpreter lock and set the current thread state to " +"*tstate*, which must not be ``NULL``. The lock must have been created " +"earlier. If this thread already has the lock, deadlock ensues." +msgstr "" + +#: c-api/init.rst:1278 +msgid "" +"Updated to be consistent with :c:func:`PyEval_RestoreThread`, :c:func:" +"`Py_END_ALLOW_THREADS`, and :c:func:`PyGILState_Ensure`, and terminate the " +"current thread if called while the interpreter is finalizing." +msgstr "" + +#: c-api/init.rst:1245 +msgid "" +":c:func:`PyEval_RestoreThread` is a higher-level function which is always " +"available (even when threads have not been initialized)." +msgstr "" + +#: c-api/init.rst:1251 +msgid "" +"Reset the current thread state to ``NULL`` and release the global " +"interpreter lock. The lock must have been created earlier and must be held " +"by the current thread. The *tstate* argument, which must not be ``NULL``, " +"is only used to check that it represents the current thread state --- if it " +"isn't, a fatal error is reported." +msgstr "" + +#: c-api/init.rst:1257 +msgid "" +":c:func:`PyEval_SaveThread` is a higher-level function which is always " +"available (even when threads have not been initialized)." +msgstr "" + +#: c-api/init.rst:1263 +msgid "" +"Acquire the global interpreter lock. The lock must have been created " +"earlier. If this thread already has the lock, a deadlock ensues." +msgstr "" + +#: c-api/init.rst:1266 +msgid "" +"This function does not update the current thread state. Please use :c:func:" +"`PyEval_RestoreThread` or :c:func:`PyEval_AcquireThread` instead." +msgstr "" + +#: c-api/init.rst:1286 +msgid "" +"Release the global interpreter lock. The lock must have been created " +"earlier." +msgstr "" + +#: c-api/init.rst:1288 +msgid "" +"This function does not update the current thread state. Please use :c:func:" +"`PyEval_SaveThread` or :c:func:`PyEval_ReleaseThread` instead." +msgstr "" + +#: c-api/init.rst:1297 +msgid "Sub-interpreter support" +msgstr "" + +#: c-api/init.rst:1299 +msgid "" +"While in most uses, you will only embed a single Python interpreter, there " +"are cases where you need to create several independent interpreters in the " +"same process and perhaps even in the same thread. Sub-interpreters allow you " +"to do that." +msgstr "" + +#: c-api/init.rst:1304 +msgid "" +"The \"main\" interpreter is the first one created when the runtime " +"initializes. It is usually the only Python interpreter in a process. Unlike " +"sub-interpreters, the main interpreter has unique process-global " +"responsibilities like signal handling. It is also responsible for execution " +"during runtime initialization and is usually the active interpreter during " +"runtime finalization. The :c:func:`PyInterpreterState_Main` function " +"returns a pointer to its state." +msgstr "" + +#: c-api/init.rst:1311 +msgid "" +"You can switch between sub-interpreters using the :c:func:" +"`PyThreadState_Swap` function. You can create and destroy them using the " +"following functions:" +msgstr "" + +#: c-api/init.rst:1325 +msgid "" +"Create a new sub-interpreter. This is an (almost) totally separate " +"environment for the execution of Python code. In particular, the new " +"interpreter has separate, independent versions of all imported modules, " +"including the fundamental modules :mod:`builtins`, :mod:`__main__` and :mod:" +"`sys`. The table of loaded modules (``sys.modules``) and the module search " +"path (``sys.path``) are also separate. The new environment has no ``sys." +"argv`` variable. It has new standard I/O stream file objects ``sys.stdin``, " +"``sys.stdout`` and ``sys.stderr`` (however these refer to the same " +"underlying file descriptors)." +msgstr "" + +#: c-api/init.rst:1335 +msgid "" +"The return value points to the first thread state created in the new sub-" +"interpreter. This thread state is made in the current thread state. Note " +"that no actual thread is created; see the discussion of thread states " +"below. If creation of the new interpreter is unsuccessful, ``NULL`` is " +"returned; no exception is set since the exception state is stored in the " +"current thread state and there may not be a current thread state. (Like all " +"other Python/C API functions, the global interpreter lock must be held " +"before calling this function and is still held when it returns; however, " +"unlike most other Python/C API functions, there needn't be a current thread " +"state on entry.)" +msgstr "" + +#: c-api/init.rst:1350 +msgid "Extension modules are shared between (sub-)interpreters as follows:" +msgstr "" + +#: c-api/init.rst:1352 +msgid "" +"For modules using multi-phase initialization, e.g. :c:func:" +"`PyModule_FromDefAndSpec`, a separate module object is created and " +"initialized for each interpreter. Only C-level static and global variables " +"are shared between these module objects." +msgstr "" + +#: c-api/init.rst:1358 +msgid "" +"For modules using single-phase initialization, e.g. :c:func:" +"`PyModule_Create`, the first time a particular extension is imported, it is " +"initialized normally, and a (shallow) copy of its module's dictionary is " +"squirreled away. When the same extension is imported by another " +"(sub-)interpreter, a new module is initialized and filled with the contents " +"of this copy; the extension's ``init`` function is not called. Objects in " +"the module's dictionary thus end up shared across (sub-)interpreters, which " +"might cause unwanted behavior (see `Bugs and caveats`_ below)." +msgstr "" + +#: c-api/init.rst:1369 +msgid "" +"Note that this is different from what happens when an extension is imported " +"after the interpreter has been completely re-initialized by calling :c:func:" +"`Py_FinalizeEx` and :c:func:`Py_Initialize`; in that case, the extension's " +"``initmodule`` function *is* called again. As with multi-phase " +"initialization, this means that only C-level static and global variables are " +"shared between these modules." +msgstr "" + +#: c-api/init.rst:1383 +msgid "" +"Destroy the (sub-)interpreter represented by the given thread state. The " +"given thread state must be the current thread state. See the discussion of " +"thread states below. When the call returns, the current thread state is " +"``NULL``. All thread states associated with this interpreter are " +"destroyed. (The global interpreter lock must be held before calling this " +"function and is still held when it returns.) :c:func:`Py_FinalizeEx` will " +"destroy all sub-interpreters that haven't been explicitly destroyed at that " +"point." +msgstr "" + +#: c-api/init.rst:1393 +msgid "Bugs and caveats" +msgstr "" + +#: c-api/init.rst:1395 +msgid "" +"Because sub-interpreters (and the main interpreter) are part of the same " +"process, the insulation between them isn't perfect --- for example, using " +"low-level file operations like :func:`os.close` they can (accidentally or " +"maliciously) affect each other's open files. Because of the way extensions " +"are shared between (sub-)interpreters, some extensions may not work " +"properly; this is especially likely when using single-phase initialization " +"or (static) global variables. It is possible to insert objects created in " +"one sub-interpreter into a namespace of another (sub-)interpreter; this " +"should be avoided if possible." +msgstr "" + +#: c-api/init.rst:1405 +msgid "" +"Special care should be taken to avoid sharing user-defined functions, " +"methods, instances or classes between sub-interpreters, since import " +"operations executed by such objects may affect the wrong (sub-)interpreter's " +"dictionary of loaded modules. It is equally important to avoid sharing " +"objects from which the above are reachable." +msgstr "" + +#: c-api/init.rst:1411 +msgid "" +"Also note that combining this functionality with ``PyGILState_*`` APIs is " +"delicate, because these APIs assume a bijection between Python thread states " +"and OS-level threads, an assumption broken by the presence of sub-" +"interpreters. It is highly recommended that you don't switch sub-" +"interpreters between a pair of matching :c:func:`PyGILState_Ensure` and :c:" +"func:`PyGILState_Release` calls. Furthermore, extensions (such as :mod:" +"`ctypes`) using these APIs to allow calling of Python code from non-Python " +"created threads will probably be broken when using sub-interpreters." +msgstr "" + +#: c-api/init.rst:1422 +msgid "Asynchronous Notifications" +msgstr "" + +#: c-api/init.rst:1424 +msgid "" +"A mechanism is provided to make asynchronous notifications to the main " +"interpreter thread. These notifications take the form of a function pointer " +"and a void pointer argument." +msgstr "" + +#: c-api/init.rst:1433 +msgid "" +"Schedule a function to be called from the main interpreter thread. On " +"success, ``0`` is returned and *func* is queued for being called in the main " +"thread. On failure, ``-1`` is returned without setting any exception." +msgstr "" + +#: c-api/init.rst:1437 +msgid "" +"When successfully queued, *func* will be *eventually* called from the main " +"interpreter thread with the argument *arg*. It will be called " +"asynchronously with respect to normally running Python code, but with both " +"these conditions met:" +msgstr "" + +#: c-api/init.rst:1442 +msgid "on a :term:`bytecode` boundary;" +msgstr "" + +#: c-api/init.rst:1443 +msgid "" +"with the main thread holding the :term:`global interpreter lock` (*func* can " +"therefore use the full C API)." +msgstr "" + +#: c-api/init.rst:1446 +msgid "" +"*func* must return ``0`` on success, or ``-1`` on failure with an exception " +"set. *func* won't be interrupted to perform another asynchronous " +"notification recursively, but it can still be interrupted to switch threads " +"if the global interpreter lock is released." +msgstr "" + +#: c-api/init.rst:1451 +msgid "" +"This function doesn't need a current thread state to run, and it doesn't " +"need the global interpreter lock." +msgstr "" + +#: c-api/init.rst:1454 +msgid "" +"To call this function in a subinterpreter, the caller must hold the GIL. " +"Otherwise, the function *func* can be scheduled to be called from the wrong " +"interpreter." +msgstr "" + +#: c-api/init.rst:1459 +msgid "" +"This is a low-level function, only useful for very special cases. There is " +"no guarantee that *func* will be called as quick as possible. If the main " +"thread is busy executing a system call, *func* won't be called before the " +"system call returns. This function is generally **not** suitable for " +"calling Python code from arbitrary C threads. Instead, use the :ref:" +"`PyGILState API`." +msgstr "" + +#: c-api/init.rst:1466 +msgid "" +"If this function is called in a subinterpreter, the function *func* is now " +"scheduled to be called from the subinterpreter, rather than being called " +"from the main interpreter. Each subinterpreter now has its own list of " +"scheduled calls." +msgstr "" + +#: c-api/init.rst:1477 +msgid "Profiling and Tracing" +msgstr "" + +#: c-api/init.rst:1482 +msgid "" +"The Python interpreter provides some low-level support for attaching " +"profiling and execution tracing facilities. These are used for profiling, " +"debugging, and coverage analysis tools." +msgstr "" + +#: c-api/init.rst:1486 +msgid "" +"This C interface allows the profiling or tracing code to avoid the overhead " +"of calling through Python-level callable objects, making a direct C function " +"call instead. The essential attributes of the facility have not changed; " +"the interface allows trace functions to be installed per-thread, and the " +"basic events reported to the trace function are the same as had been " +"reported to the Python-level trace functions in previous versions." +msgstr "" + +#: c-api/init.rst:1496 +msgid "" +"The type of the trace function registered using :c:func:`PyEval_SetProfile` " +"and :c:func:`PyEval_SetTrace`. The first parameter is the object passed to " +"the registration function as *obj*, *frame* is the frame object to which the " +"event pertains, *what* is one of the constants :const:`PyTrace_CALL`, :const:" +"`PyTrace_EXCEPTION`, :const:`PyTrace_LINE`, :const:`PyTrace_RETURN`, :const:" +"`PyTrace_C_CALL`, :const:`PyTrace_C_EXCEPTION`, :const:`PyTrace_C_RETURN`, " +"or :const:`PyTrace_OPCODE`, and *arg* depends on the value of *what*:" +msgstr "" + +#: c-api/init.rst:1505 +msgid "Value of *what*" +msgstr "" + +#: c-api/init.rst:1505 +msgid "Meaning of *arg*" +msgstr "" + +#: c-api/init.rst:1507 +msgid ":const:`PyTrace_CALL`" +msgstr ":const:`PyTrace_CALL`" + +#: c-api/init.rst:1512 c-api/init.rst:1523 +msgid "Always :c:data:`Py_None`." +msgstr "" + +#: c-api/init.rst:1509 +msgid ":const:`PyTrace_EXCEPTION`" +msgstr ":const:`PyTrace_EXCEPTION`" + +#: c-api/init.rst:1509 +msgid "Exception information as returned by :func:`sys.exc_info`." +msgstr "" + +#: c-api/init.rst:1512 +msgid ":const:`PyTrace_LINE`" +msgstr ":const:`PyTrace_LINE`" + +#: c-api/init.rst:1514 +msgid ":const:`PyTrace_RETURN`" +msgstr ":const:`PyTrace_RETURN`" + +#: c-api/init.rst:1514 +msgid "" +"Value being returned to the caller, or ``NULL`` if caused by an exception." +msgstr "" + +#: c-api/init.rst:1517 +msgid ":const:`PyTrace_C_CALL`" +msgstr ":const:`PyTrace_C_CALL`" + +#: c-api/init.rst:1519 c-api/init.rst:1521 +msgid "Function object being called." +msgstr "" + +#: c-api/init.rst:1519 +msgid ":const:`PyTrace_C_EXCEPTION`" +msgstr ":const:`PyTrace_C_EXCEPTION`" + +#: c-api/init.rst:1521 +msgid ":const:`PyTrace_C_RETURN`" +msgstr ":const:`PyTrace_C_RETURN`" + +#: c-api/init.rst:1523 +msgid ":const:`PyTrace_OPCODE`" +msgstr ":const:`PyTrace_OPCODE`" + +#: c-api/init.rst:1528 +msgid "" +"The value of the *what* parameter to a :c:type:`Py_tracefunc` function when " +"a new call to a function or method is being reported, or a new entry into a " +"generator. Note that the creation of the iterator for a generator function " +"is not reported as there is no control transfer to the Python bytecode in " +"the corresponding frame." +msgstr "" + +#: c-api/init.rst:1537 +msgid "" +"The value of the *what* parameter to a :c:type:`Py_tracefunc` function when " +"an exception has been raised. The callback function is called with this " +"value for *what* when after any bytecode is processed after which the " +"exception becomes set within the frame being executed. The effect of this " +"is that as exception propagation causes the Python stack to unwind, the " +"callback is called upon return to each frame as the exception propagates. " +"Only trace functions receives these events; they are not needed by the " +"profiler." +msgstr "" + +#: c-api/init.rst:1548 +msgid "" +"The value passed as the *what* parameter to a :c:type:`Py_tracefunc` " +"function (but not a profiling function) when a line-number event is being " +"reported. It may be disabled for a frame by setting :attr:`f_trace_lines` to " +"*0* on that frame." +msgstr "" + +#: c-api/init.rst:1555 +msgid "" +"The value for the *what* parameter to :c:type:`Py_tracefunc` functions when " +"a call is about to return." +msgstr "" + +#: c-api/init.rst:1561 +msgid "" +"The value for the *what* parameter to :c:type:`Py_tracefunc` functions when " +"a C function is about to be called." +msgstr "" + +#: c-api/init.rst:1567 +msgid "" +"The value for the *what* parameter to :c:type:`Py_tracefunc` functions when " +"a C function has raised an exception." +msgstr "" + +#: c-api/init.rst:1573 +msgid "" +"The value for the *what* parameter to :c:type:`Py_tracefunc` functions when " +"a C function has returned." +msgstr "" + +#: c-api/init.rst:1579 +msgid "" +"The value for the *what* parameter to :c:type:`Py_tracefunc` functions (but " +"not profiling functions) when a new opcode is about to be executed. This " +"event is not emitted by default: it must be explicitly requested by setting :" +"attr:`f_trace_opcodes` to *1* on the frame." +msgstr "" + +#: c-api/init.rst:1587 +msgid "" +"Set the profiler function to *func*. The *obj* parameter is passed to the " +"function as its first parameter, and may be any Python object, or ``NULL``. " +"If the profile function needs to maintain state, using a different value for " +"*obj* for each thread provides a convenient and thread-safe place to store " +"it. The profile function is called for all monitored events except :const:" +"`PyTrace_LINE` :const:`PyTrace_OPCODE` and :const:`PyTrace_EXCEPTION`." +msgstr "" + +#: c-api/init.rst:1606 +msgid "The caller must hold the :term:`GIL`." +msgstr "" + +#: c-api/init.rst:1599 +msgid "" +"Set the tracing function to *func*. This is similar to :c:func:" +"`PyEval_SetProfile`, except the tracing function does receive line-number " +"events and per-opcode events, but does not receive any event related to C " +"function objects being called. Any trace function registered using :c:func:" +"`PyEval_SetTrace` will not receive :const:`PyTrace_C_CALL`, :const:" +"`PyTrace_C_EXCEPTION` or :const:`PyTrace_C_RETURN` as a value for the *what* " +"parameter." +msgstr "" + +#: c-api/init.rst:1612 +msgid "Advanced Debugger Support" +msgstr "Support avancé du débogueur" + +#: c-api/init.rst:1617 +msgid "" +"These functions are only intended to be used by advanced debugging tools." +msgstr "" + +#: c-api/init.rst:1622 +msgid "" +"Return the interpreter state object at the head of the list of all such " +"objects." +msgstr "" + +#: c-api/init.rst:1627 +msgid "Return the main interpreter state object." +msgstr "" + +#: c-api/init.rst:1632 +msgid "" +"Return the next interpreter state object after *interp* from the list of all " +"such objects." +msgstr "" + +#: c-api/init.rst:1638 +msgid "" +"Return the pointer to the first :c:type:`PyThreadState` object in the list " +"of threads associated with the interpreter *interp*." +msgstr "" + +#: c-api/init.rst:1644 +msgid "" +"Return the next thread state object after *tstate* from the list of all such " +"objects belonging to the same :c:type:`PyInterpreterState` object." +msgstr "" + +#: c-api/init.rst:1651 +msgid "Thread Local Storage Support" +msgstr "" + +#: c-api/init.rst:1655 +msgid "" +"The Python interpreter provides low-level support for thread-local storage " +"(TLS) which wraps the underlying native TLS implementation to support the " +"Python-level thread local storage API (:class:`threading.local`). The " +"CPython C level APIs are similar to those offered by pthreads and Windows: " +"use a thread key and functions to associate a :c:expr:`void*` value per " +"thread." +msgstr "" + +#: c-api/init.rst:1662 +msgid "" +"The GIL does *not* need to be held when calling these functions; they supply " +"their own locking." +msgstr "" + +#: c-api/init.rst:1665 +msgid "" +"Note that :file:`Python.h` does not include the declaration of the TLS APIs, " +"you need to include :file:`pythread.h` to use thread-local storage." +msgstr "" + +#: c-api/init.rst:1669 +msgid "" +"None of these API functions handle memory management on behalf of the :c:" +"expr:`void*` values. You need to allocate and deallocate them yourself. If " +"the :c:expr:`void*` values happen to be :c:expr:`PyObject*`, these functions " +"don't do refcount operations on them either." +msgstr "" + +#: c-api/init.rst:1677 +msgid "Thread Specific Storage (TSS) API" +msgstr "" + +#: c-api/init.rst:1679 +msgid "" +"TSS API is introduced to supersede the use of the existing TLS API within " +"the CPython interpreter. This API uses a new type :c:type:`Py_tss_t` " +"instead of :c:expr:`int` to represent thread keys." +msgstr "" + +#: c-api/init.rst:1685 +msgid "\"A New C-API for Thread-Local Storage in CPython\" (:pep:`539`)" +msgstr "" + +#: c-api/init.rst:1690 +msgid "" +"This data structure represents the state of a thread key, the definition of " +"which may depend on the underlying TLS implementation, and it has an " +"internal field representing the key's initialization state. There are no " +"public members in this structure." +msgstr "" + +#: c-api/init.rst:1695 +msgid "" +"When :ref:`Py_LIMITED_API ` is not defined, static allocation of " +"this type by :c:macro:`Py_tss_NEEDS_INIT` is allowed." +msgstr "" + +#: c-api/init.rst:1701 +msgid "" +"This macro expands to the initializer for :c:type:`Py_tss_t` variables. Note " +"that this macro won't be defined with :ref:`Py_LIMITED_API `." +msgstr "" + +#: c-api/init.rst:1706 +msgid "Dynamic Allocation" +msgstr "" + +#: c-api/init.rst:1708 +msgid "" +"Dynamic allocation of the :c:type:`Py_tss_t`, required in extension modules " +"built with :ref:`Py_LIMITED_API `, where static allocation of this " +"type is not possible due to its implementation being opaque at build time." +msgstr "" + +#: c-api/init.rst:1715 +msgid "" +"Return a value which is the same state as a value initialized with :c:macro:" +"`Py_tss_NEEDS_INIT`, or ``NULL`` in the case of dynamic allocation failure." +msgstr "" + +#: c-api/init.rst:1722 +msgid "" +"Free the given *key* allocated by :c:func:`PyThread_tss_alloc`, after first " +"calling :c:func:`PyThread_tss_delete` to ensure any associated thread locals " +"have been unassigned. This is a no-op if the *key* argument is ``NULL``." +msgstr "" + +#: c-api/init.rst:1728 +msgid "" +"A freed key becomes a dangling pointer. You should reset the key to `NULL`." +msgstr "" + +#: c-api/init.rst:1733 +msgid "Methods" +msgstr "Méthodes" + +#: c-api/init.rst:1735 +msgid "" +"The parameter *key* of these functions must not be ``NULL``. Moreover, the " +"behaviors of :c:func:`PyThread_tss_set` and :c:func:`PyThread_tss_get` are " +"undefined if the given :c:type:`Py_tss_t` has not been initialized by :c:" +"func:`PyThread_tss_create`." +msgstr "" + +#: c-api/init.rst:1743 +msgid "" +"Return a non-zero value if the given :c:type:`Py_tss_t` has been initialized " +"by :c:func:`PyThread_tss_create`." +msgstr "" + +#: c-api/init.rst:1749 +msgid "" +"Return a zero value on successful initialization of a TSS key. The behavior " +"is undefined if the value pointed to by the *key* argument is not " +"initialized by :c:macro:`Py_tss_NEEDS_INIT`. This function can be called " +"repeatedly on the same key -- calling it on an already initialized key is a " +"no-op and immediately returns success." +msgstr "" + +#: c-api/init.rst:1758 +msgid "" +"Destroy a TSS key to forget the values associated with the key across all " +"threads, and change the key's initialization state to uninitialized. A " +"destroyed key is able to be initialized again by :c:func:" +"`PyThread_tss_create`. This function can be called repeatedly on the same " +"key -- calling it on an already destroyed key is a no-op." +msgstr "" + +#: c-api/init.rst:1767 +msgid "" +"Return a zero value to indicate successfully associating a :c:expr:`void*` " +"value with a TSS key in the current thread. Each thread has a distinct " +"mapping of the key to a :c:expr:`void*` value." +msgstr "" + +#: c-api/init.rst:1774 +msgid "" +"Return the :c:expr:`void*` value associated with a TSS key in the current " +"thread. This returns ``NULL`` if no value is associated with the key in the " +"current thread." +msgstr "" + +#: c-api/init.rst:1782 +msgid "Thread Local Storage (TLS) API" +msgstr "" + +#: c-api/init.rst:1784 +msgid "" +"This API is superseded by :ref:`Thread Specific Storage (TSS) API `." +msgstr "" + +#: c-api/init.rst:1789 +msgid "" +"This version of the API does not support platforms where the native TLS key " +"is defined in a way that cannot be safely cast to ``int``. On such " +"platforms, :c:func:`PyThread_create_key` will return immediately with a " +"failure status, and the other TLS functions will all be no-ops on such " +"platforms." +msgstr "" + +#: c-api/init.rst:1794 +msgid "" +"Due to the compatibility problem noted above, this version of the API should " +"not be used in new code." +msgstr "" diff --git a/c-api/init_config.po b/c-api/init_config.po new file mode 100644 index 0000000000..5bbbfd3b49 --- /dev/null +++ b/c-api/init_config.po @@ -0,0 +1,1934 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-22 22:57+0100\n" +"PO-Revision-Date: 2019-09-04 11:42+0200\n" +"Last-Translator: FULL NAME \n" +"Language-Team: FRENCH \n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: c-api/init_config.rst:7 +msgid "Python Initialization Configuration" +msgstr "" + +#: c-api/init_config.rst:11 +msgid "" +"Python can be initialized with :c:func:`Py_InitializeFromConfig` and the :c:" +"type:`PyConfig` structure. It can be preinitialized with :c:func:" +"`Py_PreInitialize` and the :c:type:`PyPreConfig` structure." +msgstr "" + +#: c-api/init_config.rst:15 +msgid "There are two kinds of configuration:" +msgstr "" + +#: c-api/init_config.rst:17 +msgid "" +"The :ref:`Python Configuration ` can be used to build a " +"customized Python which behaves as the regular Python. For example, " +"environment variables and command line arguments are used to configure " +"Python." +msgstr "" + +#: c-api/init_config.rst:22 +msgid "" +"The :ref:`Isolated Configuration ` can be used to embed " +"Python into an application. It isolates Python from the system. For example, " +"environment variables are ignored, the LC_CTYPE locale is left unchanged and " +"no signal handler is registered." +msgstr "" + +#: c-api/init_config.rst:27 +msgid "" +"The :c:func:`Py_RunMain` function can be used to write a customized Python " +"program." +msgstr "" + +#: c-api/init_config.rst:30 +msgid "" +"See also :ref:`Initialization, Finalization, and Threads `." +msgstr "" + +#: c-api/init_config.rst:33 +msgid ":pep:`587` \"Python Initialization Configuration\"." +msgstr "" + +#: c-api/init_config.rst:37 +msgid "Example" +msgstr "Exemple" + +#: c-api/init_config.rst:39 +msgid "Example of customized Python always running in isolated mode::" +msgstr "" + +#: c-api/init_config.rst:76 +msgid "PyWideStringList" +msgstr "" + +#: c-api/init_config.rst:80 +msgid "List of ``wchar_t*`` strings." +msgstr "" + +#: c-api/init_config.rst:82 +msgid "" +"If *length* is non-zero, *items* must be non-``NULL`` and all strings must " +"be non-``NULL``." +msgstr "" + +#: c-api/init_config.rst:85 +#, fuzzy +msgid "Methods:" +msgstr "Méthodes" + +#: c-api/init_config.rst:89 +msgid "Append *item* to *list*." +msgstr "" + +#: c-api/init_config.rst:102 +msgid "Python must be preinitialized to call this function." +msgstr "" + +#: c-api/init_config.rst:95 +msgid "Insert *item* into *list* at *index*." +msgstr "" + +#: c-api/init_config.rst:97 +msgid "" +"If *index* is greater than or equal to *list* length, append *item* to " +"*list*." +msgstr "" + +#: c-api/init_config.rst:100 +msgid "*index* must be greater than or equal to 0." +msgstr "" + +#: c-api/init_config.rst:124 c-api/init_config.rst:519 +msgid "Structure fields:" +msgstr "" + +#: c-api/init_config.rst:108 +msgid "List length." +msgstr "" + +#: c-api/init_config.rst:112 +msgid "List items." +msgstr "" + +#: c-api/init_config.rst:115 +msgid "PyStatus" +msgstr "" + +#: c-api/init_config.rst:119 +msgid "" +"Structure to store an initialization function status: success, error or exit." +msgstr "" + +#: c-api/init_config.rst:122 +msgid "For an error, it can store the C function name which created the error." +msgstr "" + +#: c-api/init_config.rst:128 +msgid "Exit code. Argument passed to ``exit()``." +msgstr "" + +#: c-api/init_config.rst:132 +msgid "Error message." +msgstr "" + +#: c-api/init_config.rst:136 +msgid "Name of the function which created an error, can be ``NULL``." +msgstr "" + +#: c-api/init_config.rst:138 +msgid "Functions to create a status:" +msgstr "" + +#: c-api/init_config.rst:142 +msgid "Success." +msgstr "" + +#: c-api/init_config.rst:146 +msgid "Initialization error with a message." +msgstr "" + +#: c-api/init_config.rst:148 +msgid "*err_msg* must not be ``NULL``." +msgstr "" + +#: c-api/init_config.rst:152 +msgid "Memory allocation failure (out of memory)." +msgstr "" + +#: c-api/init_config.rst:156 +msgid "Exit Python with the specified exit code." +msgstr "" + +#: c-api/init_config.rst:158 +msgid "Functions to handle a status:" +msgstr "" + +#: c-api/init_config.rst:162 +msgid "" +"Is the status an error or an exit? If true, the exception must be handled; " +"by calling :c:func:`Py_ExitStatusException` for example." +msgstr "" + +#: c-api/init_config.rst:167 +msgid "Is the result an error?" +msgstr "" + +#: c-api/init_config.rst:171 +msgid "Is the result an exit?" +msgstr "" + +#: c-api/init_config.rst:175 +msgid "" +"Call ``exit(exitcode)`` if *status* is an exit. Print the error message and " +"exit with a non-zero exit code if *status* is an error. Must only be called " +"if ``PyStatus_Exception(status)`` is non-zero." +msgstr "" + +#: c-api/init_config.rst:180 +msgid "" +"Internally, Python uses macros which set ``PyStatus.func``, whereas " +"functions to create a status set ``func`` to ``NULL``." +msgstr "" + +#: c-api/init_config.rst:183 +msgid "Example::" +msgstr "Exemple ::" + +#: c-api/init_config.rst:207 +msgid "PyPreConfig" +msgstr "" + +#: c-api/init_config.rst:211 +msgid "Structure used to preinitialize Python." +msgstr "" + +#: c-api/init_config.rst:213 +msgid "Function to initialize a preconfiguration:" +msgstr "" + +#: c-api/init_config.rst:217 +msgid "" +"Initialize the preconfiguration with :ref:`Python Configuration `." +msgstr "" + +#: c-api/init_config.rst:222 +msgid "" +"Initialize the preconfiguration with :ref:`Isolated Configuration `." +msgstr "" + +#: c-api/init_config.rst:229 +msgid "Name of the Python memory allocators:" +msgstr "" + +#: c-api/init_config.rst:231 +msgid "" +"``PYMEM_ALLOCATOR_NOT_SET`` (``0``): don't change memory allocators (use " +"defaults)." +msgstr "" + +#: c-api/init_config.rst:233 +msgid "" +"``PYMEM_ALLOCATOR_DEFAULT`` (``1``): :ref:`default memory allocators " +"`." +msgstr "" + +#: c-api/init_config.rst:235 +msgid "" +"``PYMEM_ALLOCATOR_DEBUG`` (``2``): :ref:`default memory allocators ` with :ref:`debug hooks `." +msgstr "" + +#: c-api/init_config.rst:238 +msgid "``PYMEM_ALLOCATOR_MALLOC`` (``3``): use ``malloc()`` of the C library." +msgstr "" + +#: c-api/init_config.rst:239 +msgid "" +"``PYMEM_ALLOCATOR_MALLOC_DEBUG`` (``4``): force usage of ``malloc()`` with :" +"ref:`debug hooks `." +msgstr "" + +#: c-api/init_config.rst:241 +msgid "" +"``PYMEM_ALLOCATOR_PYMALLOC`` (``5``): :ref:`Python pymalloc memory allocator " +"`." +msgstr "" + +#: c-api/init_config.rst:243 +msgid "" +"``PYMEM_ALLOCATOR_PYMALLOC_DEBUG`` (``6``): :ref:`Python pymalloc memory " +"allocator ` with :ref:`debug hooks `." +msgstr "" + +#: c-api/init_config.rst:247 +msgid "" +"``PYMEM_ALLOCATOR_PYMALLOC`` and ``PYMEM_ALLOCATOR_PYMALLOC_DEBUG`` are not " +"supported if Python is :option:`configured using --without-pymalloc <--" +"without-pymalloc>`." +msgstr "" + +#: c-api/init_config.rst:251 +msgid "See :ref:`Memory Management `." +msgstr "" + +#: c-api/init_config.rst:253 +msgid "Default: ``PYMEM_ALLOCATOR_NOT_SET``." +msgstr "" + +#: c-api/init_config.rst:257 +msgid "Set the LC_CTYPE locale to the user preferred locale." +msgstr "" + +#: c-api/init_config.rst:259 +msgid "" +"If equals to 0, set :c:member:`~PyPreConfig.coerce_c_locale` and :c:member:" +"`~PyPreConfig.coerce_c_locale_warn` members to 0." +msgstr "" + +#: c-api/init_config.rst:273 +msgid "See the :term:`locale encoding`." +msgstr "" + +#: c-api/init_config.rst:319 c-api/init_config.rst:627 +msgid "Default: ``1`` in Python config, ``0`` in isolated config." +msgstr "" + +#: c-api/init_config.rst:268 +msgid "If equals to 2, coerce the C locale." +msgstr "" + +#: c-api/init_config.rst:270 +msgid "" +"If equals to 1, read the LC_CTYPE locale to decide if it should be coerced." +msgstr "" + +#: c-api/init_config.rst:281 +msgid "Default: ``-1`` in Python config, ``0`` in isolated config." +msgstr "" + +#: c-api/init_config.rst:279 +msgid "If non-zero, emit a warning if the C locale is coerced." +msgstr "" + +#: c-api/init_config.rst:285 +msgid "" +"If non-zero, enables the :ref:`Python Development Mode `: see :c:" +"member:`PyConfig.dev_mode`." +msgstr "" + +#: c-api/init_config.rst:633 c-api/init_config.rst:1093 +msgid "Default: ``-1`` in Python mode, ``0`` in isolated mode." +msgstr "" + +#: c-api/init_config.rst:292 +msgid "Isolated mode: see :c:member:`PyConfig.isolated`." +msgstr "" + +#: c-api/init_config.rst:797 +msgid "Default: ``0`` in Python mode, ``1`` in isolated mode." +msgstr "" + +#: c-api/init_config.rst:298 +msgid "If non-zero:" +msgstr "" + +#: c-api/init_config.rst:300 +msgid "Set :c:member:`PyPreConfig.utf8_mode` to ``0``," +msgstr "" + +#: c-api/init_config.rst:301 +msgid "Set :c:member:`PyConfig.filesystem_encoding` to ``\"mbcs\"``," +msgstr "" + +#: c-api/init_config.rst:302 +msgid "Set :c:member:`PyConfig.filesystem_errors` to ``\"replace\"``." +msgstr "" + +#: c-api/init_config.rst:304 +msgid "" +"Initialized the from :envvar:`PYTHONLEGACYWINDOWSFSENCODING` environment " +"variable value." +msgstr "" + +#: c-api/init_config.rst:810 +msgid "" +"Only available on Windows. ``#ifdef MS_WINDOWS`` macro can be used for " +"Windows specific code." +msgstr "" + +#: c-api/init_config.rst:588 c-api/init_config.rst:646 +#: c-api/init_config.rst:769 c-api/init_config.rst:813 +#: c-api/init_config.rst:880 c-api/init_config.rst:989 +#: c-api/init_config.rst:1057 c-api/init_config.rst:1128 +msgid "Default: ``0``." +msgstr "" + +#: c-api/init_config.rst:314 +msgid "" +"If non-zero, :c:func:`Py_PreInitializeFromArgs` and :c:func:" +"`Py_PreInitializeFromBytesArgs` parse their ``argv`` argument the same way " +"the regular Python parses command line arguments: see :ref:`Command Line " +"Arguments `." +msgstr "" + +#: c-api/init_config.rst:323 +msgid "" +"Use :ref:`environment variables `? See :c:member:`PyConfig." +"use_environment`." +msgstr "" + +#: c-api/init_config.rst:1102 +msgid "Default: ``1`` in Python config and ``0`` in isolated config." +msgstr "" + +#: c-api/init_config.rst:330 +msgid "If non-zero, enable the :ref:`Python UTF-8 Mode `." +msgstr "" + +#: c-api/init_config.rst:332 +msgid "" +"Set by the :option:`-X utf8 <-X>` command line option and the :envvar:" +"`PYTHONUTF8` environment variable." +msgstr "" + +#: c-api/init_config.rst:335 +msgid "Default: ``-1`` in Python config and ``0`` in isolated config." +msgstr "" + +#: c-api/init_config.rst:341 +msgid "Preinitialize Python with PyPreConfig" +msgstr "" + +#: c-api/init_config.rst:343 +msgid "The preinitialization of Python:" +msgstr "" + +#: c-api/init_config.rst:345 +msgid "Set the Python memory allocators (:c:member:`PyPreConfig.allocator`)" +msgstr "" + +#: c-api/init_config.rst:346 +msgid "Configure the LC_CTYPE locale (:term:`locale encoding`)" +msgstr "" + +#: c-api/init_config.rst:347 +msgid "" +"Set the :ref:`Python UTF-8 Mode ` (:c:member:`PyPreConfig." +"utf8_mode`)" +msgstr "" + +#: c-api/init_config.rst:350 +msgid "" +"The current preconfiguration (``PyPreConfig`` type) is stored in " +"``_PyRuntime.preconfig``." +msgstr "" + +#: c-api/init_config.rst:353 +msgid "Functions to preinitialize Python:" +msgstr "" + +#: c-api/init_config.rst:363 c-api/init_config.rst:372 +msgid "Preinitialize Python from *preconfig* preconfiguration." +msgstr "" + +#: c-api/init_config.rst:368 c-api/init_config.rst:377 +msgid "*preconfig* must not be ``NULL``." +msgstr "" + +#: c-api/init_config.rst:365 +msgid "" +"Parse *argv* command line arguments (bytes strings) if :c:member:" +"`~PyPreConfig.parse_argv` of *preconfig* is non-zero." +msgstr "" + +#: c-api/init_config.rst:374 +msgid "" +"Parse *argv* command line arguments (wide strings) if :c:member:" +"`~PyPreConfig.parse_argv` of *preconfig* is non-zero." +msgstr "" + +#: c-api/init_config.rst:1190 +msgid "" +"The caller is responsible to handle exceptions (error or exit) using :c:func:" +"`PyStatus_Exception` and :c:func:`Py_ExitStatusException`." +msgstr "" + +#: c-api/init_config.rst:382 +msgid "" +"For :ref:`Python Configuration ` (:c:func:" +"`PyPreConfig_InitPythonConfig`), if Python is initialized with command line " +"arguments, the command line arguments must also be passed to preinitialize " +"Python, since they have an effect on the pre-configuration like encodings. " +"For example, the :option:`-X utf8 <-X>` command line option enables the :ref:" +"`Python UTF-8 Mode `." +msgstr "" + +#: c-api/init_config.rst:389 +msgid "" +"``PyMem_SetAllocator()`` can be called after :c:func:`Py_PreInitialize` and " +"before :c:func:`Py_InitializeFromConfig` to install a custom memory " +"allocator. It can be called before :c:func:`Py_PreInitialize` if :c:member:" +"`PyPreConfig.allocator` is set to ``PYMEM_ALLOCATOR_NOT_SET``." +msgstr "" + +#: c-api/init_config.rst:394 +msgid "" +"Python memory allocation functions like :c:func:`PyMem_RawMalloc` must not " +"be used before the Python preinitialization, whereas calling directly " +"``malloc()`` and ``free()`` is always safe. :c:func:`Py_DecodeLocale` must " +"not be called before the Python preinitialization." +msgstr "" + +#: c-api/init_config.rst:399 +msgid "" +"Example using the preinitialization to enable the :ref:`Python UTF-8 Mode " +"`::" +msgstr "" + +#: c-api/init_config.rst:421 +msgid "PyConfig" +msgstr "" + +#: c-api/init_config.rst:425 +msgid "Structure containing most parameters to configure Python." +msgstr "" + +#: c-api/init_config.rst:427 +msgid "" +"When done, the :c:func:`PyConfig_Clear` function must be used to release the " +"configuration memory." +msgstr "" + +#: c-api/init_config.rst:430 +msgid "Structure methods:" +msgstr "" + +#: c-api/init_config.rst:434 +msgid "" +"Initialize configuration with the :ref:`Python Configuration `." +msgstr "" + +#: c-api/init_config.rst:439 +msgid "" +"Initialize configuration with the :ref:`Isolated Configuration `." +msgstr "" + +#: c-api/init_config.rst:444 +msgid "Copy the wide character string *str* into ``*config_str``." +msgstr "" + +#: c-api/init_config.rst:453 c-api/init_config.rst:468 +#: c-api/init_config.rst:488 +msgid ":ref:`Preinitialize Python ` if needed." +msgstr "" + +#: c-api/init_config.rst:450 +msgid "" +"Decode *str* using :c:func:`Py_DecodeLocale` and set the result into " +"``*config_str``." +msgstr "" + +#: c-api/init_config.rst:457 +msgid "" +"Set command line arguments (:c:member:`~PyConfig.argv` member of *config*) " +"from the *argv* list of wide character strings." +msgstr "" + +#: c-api/init_config.rst:464 +msgid "" +"Set command line arguments (:c:member:`~PyConfig.argv` member of *config*) " +"from the *argv* list of bytes strings. Decode bytes using :c:func:" +"`Py_DecodeLocale`." +msgstr "" + +#: c-api/init_config.rst:472 +msgid "Set the list of wide strings *list* to *length* and *items*." +msgstr "" + +#: c-api/init_config.rst:478 +msgid "Read all Python configuration." +msgstr "" + +#: c-api/init_config.rst:480 +msgid "Fields which are already initialized are left unchanged." +msgstr "" + +#: c-api/init_config.rst:909 +msgid "" +"The :c:func:`PyConfig_Read` function only parses :c:member:`PyConfig.argv` " +"arguments once: :c:member:`PyConfig.parse_argv` is set to ``2`` after " +"arguments are parsed. Since Python arguments are strippped from :c:member:" +"`PyConfig.argv`, parsing arguments twice would parse the application options " +"as Python options." +msgstr "" + +#: c-api/init_config.rst:490 +msgid "" +"The :c:member:`PyConfig.argv` arguments are now only parsed once, :c:member:" +"`PyConfig.parse_argv` is set to ``2`` after arguments are parsed, and " +"arguments are only parsed if :c:member:`PyConfig.parse_argv` equals ``1``." +msgstr "" + +#: c-api/init_config.rst:498 +msgid "Release configuration memory." +msgstr "" + +#: c-api/init_config.rst:500 +msgid "" +"Most ``PyConfig`` methods :ref:`preinitialize Python ` if needed. " +"In that case, the Python preinitialization configuration (:c:type:" +"`PyPreConfig`) in based on the :c:type:`PyConfig`. If configuration fields " +"which are in common with :c:type:`PyPreConfig` are tuned, they must be set " +"before calling a :c:type:`PyConfig` method:" +msgstr "" + +#: c-api/init_config.rst:506 +msgid ":c:member:`PyConfig.dev_mode`" +msgstr "" + +#: c-api/init_config.rst:507 +msgid ":c:member:`PyConfig.isolated`" +msgstr "" + +#: c-api/init_config.rst:508 +msgid ":c:member:`PyConfig.parse_argv`" +msgstr "" + +#: c-api/init_config.rst:509 +msgid ":c:member:`PyConfig.use_environment`" +msgstr "" + +#: c-api/init_config.rst:511 +msgid "" +"Moreover, if :c:func:`PyConfig_SetArgv` or :c:func:`PyConfig_SetBytesArgv` " +"is used, this method must be called before other methods, since the " +"preinitialization configuration depends on command line arguments (if :c:" +"member:`parse_argv` is non-zero)." +msgstr "" + +#: c-api/init_config.rst:516 +msgid "" +"The caller of these methods is responsible to handle exceptions (error or " +"exit) using ``PyStatus_Exception()`` and ``Py_ExitStatusException()``." +msgstr "" + +#: c-api/init_config.rst:523 +msgid "Command line arguments: :data:`sys.argv`." +msgstr "" + +#: c-api/init_config.rst:525 +msgid "" +"Set :c:member:`~PyConfig.parse_argv` to ``1`` to parse :c:member:`~PyConfig." +"argv` the same way the regular Python parses Python command line arguments " +"and then to strip Python arguments from :c:member:`~PyConfig.argv`." +msgstr "" + +#: c-api/init_config.rst:530 +msgid "" +"If :c:member:`~PyConfig.argv` is empty, an empty string is added to ensure " +"that :data:`sys.argv` always exists and is never empty." +msgstr "" + +#: c-api/init_config.rst:541 c-api/init_config.rst:561 +#: c-api/init_config.rst:662 c-api/init_config.rst:850 +#: c-api/init_config.rst:966 c-api/init_config.rst:997 +#: c-api/init_config.rst:1017 +msgid "Default: ``NULL``." +msgstr "" + +#: c-api/init_config.rst:535 +msgid "See also the :c:member:`~PyConfig.orig_argv` member." +msgstr "" + +#: c-api/init_config.rst:539 +msgid ":data:`sys.base_exec_prefix`." +msgstr "" + +#: c-api/init_config.rst:555 c-api/init_config.rst:655 +#: c-api/init_config.rst:867 c-api/init_config.rst:950 +msgid "Part of the :ref:`Python Path Configuration ` output." +msgstr "" + +#: c-api/init_config.rst:547 +msgid "Python base executable: :data:`sys._base_executable`." +msgstr "" + +#: c-api/init_config.rst:549 +msgid "Set by the :envvar:`__PYVENV_LAUNCHER__` environment variable." +msgstr "" + +#: c-api/init_config.rst:551 +msgid "Set from :c:member:`PyConfig.executable` if ``NULL``." +msgstr "" + +#: c-api/init_config.rst:559 +msgid ":data:`sys.base_prefix`." +msgstr "" + +#: c-api/init_config.rst:567 +msgid "" +"If equals to 0 and :c:member:`~PyConfig.configure_c_stdio` is non-zero, " +"disable buffering on the C streams stdout and stderr." +msgstr "" + +#: c-api/init_config.rst:570 +msgid "" +"Set to 0 by the :option:`-u` command line option and the :envvar:" +"`PYTHONUNBUFFERED` environment variable." +msgstr "" + +#: c-api/init_config.rst:573 +msgid "stdin is always opened in buffered mode." +msgstr "" + +#: c-api/init_config.rst:1045 c-api/init_config.rst:1160 +msgid "Default: ``1``." +msgstr "" + +#: c-api/init_config.rst:579 +msgid "" +"If equals to 1, issue a warning when comparing :class:`bytes` or :class:" +"`bytearray` with :class:`str`, or comparing :class:`bytes` with :class:`int`." +msgstr "" + +#: c-api/init_config.rst:583 +msgid "" +"If equal or greater to 2, raise a :exc:`BytesWarning` exception in these " +"cases." +msgstr "" + +#: c-api/init_config.rst:586 +msgid "Incremented by the :option:`-b` command line option." +msgstr "" + +#: c-api/init_config.rst:592 +msgid "" +"If non-zero, emit a :exc:`EncodingWarning` warning when :class:`io." +"TextIOWrapper` uses its default encoding. See :ref:`io-encoding-warning` for " +"details." +msgstr "" + +#: c-api/init_config.rst:601 +msgid "" +"Control the validation behavior of hash-based ``.pyc`` files: value of the :" +"option:`--check-hash-based-pycs` command line option." +msgstr "" + +#: c-api/init_config.rst:604 +msgid "Valid values:" +msgstr "" + +#: c-api/init_config.rst:606 +msgid "" +"``L\"always\"``: Hash the source file for invalidation regardless of value " +"of the 'check_source' flag." +msgstr "" + +#: c-api/init_config.rst:608 +msgid "``L\"never\"``: Assume that hash-based pycs always are valid." +msgstr "" + +#: c-api/init_config.rst:609 +msgid "" +"``L\"default\"``: The 'check_source' flag in hash-based pycs determines " +"invalidation." +msgstr "" + +#: c-api/init_config.rst:612 +msgid "Default: ``L\"default\"``." +msgstr "" + +#: c-api/init_config.rst:614 +msgid "See also :pep:`552` \"Deterministic pycs\"." +msgstr "" + +#: c-api/init_config.rst:618 +msgid "If non-zero, configure C standard streams:" +msgstr "" + +#: c-api/init_config.rst:620 +msgid "" +"On Windows, set the binary mode (``O_BINARY``) on stdin, stdout and stderr." +msgstr "" + +#: c-api/init_config.rst:622 +msgid "" +"If :c:member:`~PyConfig.buffered_stdio` equals zero, disable buffering of " +"stdin, stdout and stderr streams." +msgstr "" + +#: c-api/init_config.rst:624 +msgid "" +"If :c:member:`~PyConfig.interactive` is non-zero, enable stream buffering on " +"stdin and stdout (only stdout on Windows)." +msgstr "" + +#: c-api/init_config.rst:631 +msgid "If non-zero, enable the :ref:`Python Development Mode `." +msgstr "" + +#: c-api/init_config.rst:637 +msgid "Dump Python references?" +msgstr "" + +#: c-api/init_config.rst:639 +msgid "If non-zero, dump all objects which are still alive at exit." +msgstr "" + +#: c-api/init_config.rst:641 +msgid "Set to ``1`` by the :envvar:`PYTHONDUMPREFS` environment variable." +msgstr "" + +#: c-api/init_config.rst:643 +msgid "" +"Need a special build of Python with the ``Py_TRACE_REFS`` macro defined: see " +"the :option:`configure --with-trace-refs option <--with-trace-refs>`." +msgstr "" + +#: c-api/init_config.rst:650 +msgid "" +"The site-specific directory prefix where the platform-dependent Python files " +"are installed: :data:`sys.exec_prefix`." +msgstr "" + +#: c-api/init_config.rst:659 +msgid "" +"The absolute path of the executable binary for the Python interpreter: :data:" +"`sys.executable`." +msgstr "" + +#: c-api/init_config.rst:668 +msgid "Enable faulthandler?" +msgstr "" + +#: c-api/init_config.rst:670 +msgid "If non-zero, call :func:`faulthandler.enable` at startup." +msgstr "" + +#: c-api/init_config.rst:672 +msgid "" +"Set to ``1`` by :option:`-X faulthandler <-X>` and the :envvar:" +"`PYTHONFAULTHANDLER` environment variable." +msgstr "" + +#: c-api/init_config.rst:679 +msgid "" +":term:`Filesystem encoding `: :func:" +"`sys.getfilesystemencoding`." +msgstr "" + +#: c-api/init_config.rst:682 +msgid "On macOS, Android and VxWorks: use ``\"utf-8\"`` by default." +msgstr "" + +#: c-api/init_config.rst:684 +msgid "" +"On Windows: use ``\"utf-8\"`` by default, or ``\"mbcs\"`` if :c:member:" +"`~PyPreConfig.legacy_windows_fs_encoding` of :c:type:`PyPreConfig` is non-" +"zero." +msgstr "" + +#: c-api/init_config.rst:688 +msgid "Default encoding on other platforms:" +msgstr "" + +#: c-api/init_config.rst:690 +msgid "``\"utf-8\"`` if :c:member:`PyPreConfig.utf8_mode` is non-zero." +msgstr "" + +#: c-api/init_config.rst:691 +msgid "" +"``\"ascii\"`` if Python detects that ``nl_langinfo(CODESET)`` announces the " +"ASCII encoding, whereas the ``mbstowcs()`` function decodes from a different " +"encoding (usually Latin1)." +msgstr "" + +#: c-api/init_config.rst:694 +msgid "``\"utf-8\"`` if ``nl_langinfo(CODESET)`` returns an empty string." +msgstr "" + +#: c-api/init_config.rst:695 +msgid "" +"Otherwise, use the :term:`locale encoding`: ``nl_langinfo(CODESET)`` result." +msgstr "" + +#: c-api/init_config.rst:698 +msgid "" +"At Python startup, the encoding name is normalized to the Python codec name. " +"For example, ``\"ANSI_X3.4-1968\"`` is replaced with ``\"ascii\"``." +msgstr "" + +#: c-api/init_config.rst:701 +msgid "See also the :c:member:`~PyConfig.filesystem_errors` member." +msgstr "" + +#: c-api/init_config.rst:705 +msgid "" +":term:`Filesystem error handler `: :" +"func:`sys.getfilesystemencodeerrors`." +msgstr "" + +#: c-api/init_config.rst:708 +msgid "" +"On Windows: use ``\"surrogatepass\"`` by default, or ``\"replace\"`` if :c:" +"member:`~PyPreConfig.legacy_windows_fs_encoding` of :c:type:`PyPreConfig` is " +"non-zero." +msgstr "" + +#: c-api/init_config.rst:712 +msgid "On other platforms: use ``\"surrogateescape\"`` by default." +msgstr "" + +#: c-api/init_config.rst:714 +msgid "Supported error handlers:" +msgstr "" + +#: c-api/init_config.rst:716 +msgid "``\"strict\"``" +msgstr "" + +#: c-api/init_config.rst:717 +msgid "``\"surrogateescape\"``" +msgstr "" + +#: c-api/init_config.rst:718 +msgid "``\"surrogatepass\"`` (only supported with the UTF-8 encoding)" +msgstr "" + +#: c-api/init_config.rst:720 +msgid "See also the :c:member:`~PyConfig.filesystem_encoding` member." +msgstr "" + +#: c-api/init_config.rst:725 +msgid "Randomized hash function seed." +msgstr "" + +#: c-api/init_config.rst:727 +msgid "" +"If :c:member:`~PyConfig.use_hash_seed` is zero, a seed is chosen randomly at " +"Python startup, and :c:member:`~PyConfig.hash_seed` is ignored." +msgstr "" + +#: c-api/init_config.rst:730 +msgid "Set by the :envvar:`PYTHONHASHSEED` environment variable." +msgstr "" + +#: c-api/init_config.rst:732 +msgid "" +"Default *use_hash_seed* value: ``-1`` in Python mode, ``0`` in isolated mode." +msgstr "" + +#: c-api/init_config.rst:737 +msgid "Python home directory." +msgstr "" + +#: c-api/init_config.rst:739 +msgid "" +"If :c:func:`Py_SetPythonHome` has been called, use its argument if it is not " +"``NULL``." +msgstr "" + +#: c-api/init_config.rst:742 +msgid "Set by the :envvar:`PYTHONHOME` environment variable." +msgstr "" + +#: c-api/init_config.rst:839 c-api/init_config.rst:941 +#: c-api/init_config.rst:968 +msgid "Part of the :ref:`Python Path Configuration ` input." +msgstr "" + +#: c-api/init_config.rst:750 +msgid "If non-zero, profile import time." +msgstr "" + +#: c-api/init_config.rst:752 +msgid "" +"Set the ``1`` by the :option:`-X importtime <-X>` option and the :envvar:" +"`PYTHONPROFILEIMPORTTIME` environment variable." +msgstr "" + +#: c-api/init_config.rst:759 +msgid "Enter interactive mode after executing a script or a command." +msgstr "" + +#: c-api/init_config.rst:761 +msgid "" +"If greater than 0, enable inspect: when a script is passed as first argument " +"or the -c option is used, enter interactive mode after executing the script " +"or the command, even when :data:`sys.stdin` does not appear to be a terminal." +msgstr "" + +#: c-api/init_config.rst:766 +msgid "" +"Incremented by the :option:`-i` command line option. Set to ``1`` if the :" +"envvar:`PYTHONINSPECT` environment variable is non-empty." +msgstr "" + +#: c-api/init_config.rst:773 +msgid "Install Python signal handlers?" +msgstr "" + +#: c-api/init_config.rst:915 c-api/init_config.rst:1112 +msgid "Default: ``1`` in Python mode, ``0`` in isolated mode." +msgstr "" + +#: c-api/init_config.rst:779 +msgid "If greater than 0, enable the interactive mode (REPL)." +msgstr "" + +#: c-api/init_config.rst:781 +msgid "Incremented by the :option:`-i` command line option." +msgstr "" + +#: c-api/init_config.rst:787 +msgid "If greater than 0, enable isolated mode:" +msgstr "" + +#: c-api/init_config.rst:789 +msgid "" +":data:`sys.path` contains neither the script's directory (computed from " +"``argv[0]`` or the current directory) nor the user's site-packages directory." +msgstr "" + +#: c-api/init_config.rst:792 +msgid "" +"Python REPL doesn't import :mod:`readline` nor enable default readline " +"configuration on interactive prompts." +msgstr "" + +#: c-api/init_config.rst:794 +msgid "" +"Set :c:member:`~PyConfig.use_environment` and :c:member:`~PyConfig." +"user_site_directory` to 0." +msgstr "" + +#: c-api/init_config.rst:799 +msgid "See also :c:member:`PyPreConfig.isolated`." +msgstr "" + +#: c-api/init_config.rst:803 +msgid "" +"If non-zero, use :class:`io.FileIO` instead of :class:`io.WindowsConsoleIO` " +"for :data:`sys.stdin`, :data:`sys.stdout` and :data:`sys.stderr`." +msgstr "" + +#: c-api/init_config.rst:807 +msgid "" +"Set to ``1`` if the :envvar:`PYTHONLEGACYWINDOWSSTDIO` environment variable " +"is set to a non-empty string." +msgstr "" + +#: c-api/init_config.rst:815 +msgid "See also the :pep:`528` (Change Windows console encoding to UTF-8)." +msgstr "" + +#: c-api/init_config.rst:819 +msgid "" +"If non-zero, dump statistics on :ref:`Python pymalloc memory allocator " +"` at exit." +msgstr "" + +#: c-api/init_config.rst:822 +msgid "Set to ``1`` by the :envvar:`PYTHONMALLOCSTATS` environment variable." +msgstr "" + +#: c-api/init_config.rst:824 +msgid "" +"The option is ignored if Python is :option:`configured using the --without-" +"pymalloc option <--without-pymalloc>`." +msgstr "" + +#: c-api/init_config.rst:831 +msgid "Platform library directory name: :data:`sys.platlibdir`." +msgstr "" + +#: c-api/init_config.rst:833 +msgid "Set by the :envvar:`PYTHONPLATLIBDIR` environment variable." +msgstr "" + +#: c-api/init_config.rst:835 +msgid "" +"Default: value of the ``PLATLIBDIR`` macro which is set by the :option:" +"`configure --with-platlibdir option <--with-platlibdir>` (default: " +"``\"lib\"``)." +msgstr "" + +#: c-api/init_config.rst:845 +msgid "" +"Module search paths (:data:`sys.path`) as a string separated by ``DELIM`` (:" +"data:`os.path.pathsep`)." +msgstr "" + +#: c-api/init_config.rst:848 +msgid "Set by the :envvar:`PYTHONPATH` environment variable." +msgstr "" + +#: c-api/init_config.rst:857 +msgid "Module search paths: :data:`sys.path`." +msgstr "" + +#: c-api/init_config.rst:859 +msgid "" +"If :c:member:`~PyConfig.module_search_paths_set` is equal to 0, the function " +"calculating the :ref:`Python Path Configuration ` " +"overrides the :c:member:`~PyConfig.module_search_paths` and sets :c:member:" +"`~PyConfig.module_search_paths_set` to ``1``." +msgstr "" + +#: c-api/init_config.rst:864 +msgid "" +"Default: empty list (``module_search_paths``) and ``0`` " +"(``module_search_paths_set``)." +msgstr "" + +#: c-api/init_config.rst:871 +msgid "Compilation optimization level:" +msgstr "" + +#: c-api/init_config.rst:873 +msgid "``0``: Peephole optimizer, set ``__debug__`` to ``True``." +msgstr "" + +#: c-api/init_config.rst:874 +msgid "``1``: Level 0, remove assertions, set ``__debug__`` to ``False``." +msgstr "" + +#: c-api/init_config.rst:875 +msgid "``2``: Level 1, strip docstrings." +msgstr "" + +#: c-api/init_config.rst:877 +msgid "" +"Incremented by the :option:`-O` command line option. Set to the :envvar:" +"`PYTHONOPTIMIZE` environment variable value." +msgstr "" + +#: c-api/init_config.rst:884 +msgid "" +"The list of the original command line arguments passed to the Python " +"executable: :data:`sys.orig_argv`." +msgstr "" + +#: c-api/init_config.rst:887 +msgid "" +"If :c:member:`~PyConfig.orig_argv` list is empty and :c:member:`~PyConfig." +"argv` is not a list only containing an empty string, :c:func:`PyConfig_Read` " +"copies :c:member:`~PyConfig.argv` into :c:member:`~PyConfig.orig_argv` " +"before modifying :c:member:`~PyConfig.argv` (if :c:member:`~PyConfig." +"parse_argv` is non-zero)." +msgstr "" + +#: c-api/init_config.rst:894 +msgid "" +"See also the :c:member:`~PyConfig.argv` member and the :c:func:" +"`Py_GetArgcArgv` function." +msgstr "" + +#: c-api/init_config.rst:1147 c-api/init_config.rst:1166 +msgid "Default: empty list." +msgstr "" + +#: c-api/init_config.rst:903 +msgid "Parse command line arguments?" +msgstr "" + +#: c-api/init_config.rst:905 +msgid "" +"If equals to ``1``, parse :c:member:`~PyConfig.argv` the same way the " +"regular Python parses :ref:`command line arguments `, and " +"strip Python arguments from :c:member:`~PyConfig.argv`." +msgstr "" + +#: c-api/init_config.rst:917 +msgid "" +"The :c:member:`PyConfig.argv` arguments are now only parsed if :c:member:" +"`PyConfig.parse_argv` equals to ``1``." +msgstr "" + +#: c-api/init_config.rst:923 +msgid "" +"Parser debug mode. If greater than 0, turn on parser debugging output (for " +"expert only, depending on compilation options)." +msgstr "" + +#: c-api/init_config.rst:926 +msgid "" +"Incremented by the :option:`-d` command line option. Set to the :envvar:" +"`PYTHONDEBUG` environment variable value." +msgstr "" + +#: c-api/init_config.rst:933 +msgid "" +"On Unix, if non-zero, calculating the :ref:`Python Path Configuration ` can log warnings into ``stderr``. If equals to 0, suppress " +"these warnings." +msgstr "" + +#: c-api/init_config.rst:937 +msgid "It has no effect on Windows." +msgstr "" + +#: c-api/init_config.rst:945 +msgid "" +"The site-specific directory prefix where the platform independent Python " +"files are installed: :data:`sys.prefix`." +msgstr "" + +#: c-api/init_config.rst:954 +msgid "" +"Program name used to initialize :c:member:`~PyConfig.executable` and in " +"early error messages during Python initialization." +msgstr "" + +#: c-api/init_config.rst:957 +msgid "If :func:`Py_SetProgramName` has been called, use its argument." +msgstr "" + +#: c-api/init_config.rst:958 +msgid "On macOS, use :envvar:`PYTHONEXECUTABLE` environment variable if set." +msgstr "" + +#: c-api/init_config.rst:959 +msgid "" +"If the ``WITH_NEXT_FRAMEWORK`` macro is defined, use :envvar:" +"`__PYVENV_LAUNCHER__` environment variable if set." +msgstr "" + +#: c-api/init_config.rst:961 +msgid "" +"Use ``argv[0]`` of :c:member:`~PyConfig.argv` if available and non-empty." +msgstr "" + +#: c-api/init_config.rst:963 +msgid "" +"Otherwise, use ``L\"python\"`` on Windows, or ``L\"python3\"`` on other " +"platforms." +msgstr "" + +#: c-api/init_config.rst:972 +msgid "" +"Directory where cached ``.pyc`` files are written: :data:`sys." +"pycache_prefix`." +msgstr "" + +#: c-api/init_config.rst:975 +msgid "" +"Set by the :option:`-X pycache_prefix=PATH <-X>` command line option and " +"the :envvar:`PYTHONPYCACHEPREFIX` environment variable." +msgstr "" + +#: c-api/init_config.rst:978 +msgid "If ``NULL``, :data:`sys.pycache_prefix` is set to ``None``." +msgstr "" + +#: c-api/init_config.rst:984 +msgid "" +"Quiet mode. If greater than 0, don't display the copyright and version at " +"Python startup in interactive mode." +msgstr "" + +#: c-api/init_config.rst:987 +msgid "Incremented by the :option:`-q` command line option." +msgstr "" + +#: c-api/init_config.rst:993 +msgid "Value of the :option:`-c` command line option." +msgstr "" + +#: c-api/init_config.rst:1007 c-api/init_config.rst:1015 +msgid "Used by :c:func:`Py_RunMain`." +msgstr "" + +#: c-api/init_config.rst:1001 +msgid "" +"Filename passed on the command line: trailing command line argument without :" +"option:`-c` or :option:`-m`." +msgstr "" + +#: c-api/init_config.rst:1004 +msgid "" +"For example, it is set to ``script.py`` by the ``python3 script.py arg`` " +"command." +msgstr "" + +#: c-api/init_config.rst:1013 +msgid "Value of the :option:`-m` command line option." +msgstr "" + +#: c-api/init_config.rst:1021 +msgid "Show total reference count at exit?" +msgstr "" + +#: c-api/init_config.rst:1023 +msgid "Set to 1 by :option:`-X showrefcount <-X>` command line option." +msgstr "" + +#: c-api/init_config.rst:1025 +msgid "" +"Need a :ref:`debug build of Python ` (the ``Py_REF_DEBUG`` " +"macro must be defined)." +msgstr "" + +#: c-api/init_config.rst:1032 +msgid "Import the :mod:`site` module at startup?" +msgstr "" + +#: c-api/init_config.rst:1034 +msgid "" +"If equal to zero, disable the import of the module site and the site-" +"dependent manipulations of :data:`sys.path` that it entails." +msgstr "" + +#: c-api/init_config.rst:1037 +msgid "" +"Also disable these manipulations if the :mod:`site` module is explicitly " +"imported later (call :func:`site.main` if you want them to be triggered)." +msgstr "" + +#: c-api/init_config.rst:1040 +msgid "Set to ``0`` by the :option:`-S` command line option." +msgstr "" + +#: c-api/init_config.rst:1042 +msgid "" +":data:`sys.flags.no_site` is set to the inverted value of :c:member:" +"`~PyConfig.site_import`." +msgstr "" + +#: c-api/init_config.rst:1049 +msgid "" +"If non-zero, skip the first line of the :c:member:`PyConfig.run_filename` " +"source." +msgstr "" + +#: c-api/init_config.rst:1052 +msgid "" +"It allows the usage of non-Unix forms of ``#!cmd``. This is intended for a " +"DOS specific hack only." +msgstr "" + +#: c-api/init_config.rst:1055 +msgid "Set to ``1`` by the :option:`-x` command line option." +msgstr "" + +#: c-api/init_config.rst:1062 +msgid "" +"Encoding and encoding errors of :data:`sys.stdin`, :data:`sys.stdout` and :" +"data:`sys.stderr` (but :data:`sys.stderr` always uses " +"``\"backslashreplace\"`` error handler)." +msgstr "" + +#: c-api/init_config.rst:1066 +msgid "" +"If :c:func:`Py_SetStandardStreamEncoding` has been called, use its *error* " +"and *errors* arguments if they are not ``NULL``." +msgstr "" + +#: c-api/init_config.rst:1069 +msgid "" +"Use the :envvar:`PYTHONIOENCODING` environment variable if it is non-empty." +msgstr "" + +#: c-api/init_config.rst:1072 +msgid "Default encoding:" +msgstr "" + +#: c-api/init_config.rst:1074 +msgid "``\"UTF-8\"`` if :c:member:`PyPreConfig.utf8_mode` is non-zero." +msgstr "" + +#: c-api/init_config.rst:1075 +msgid "Otherwise, use the :term:`locale encoding`." +msgstr "" + +#: c-api/init_config.rst:1077 +msgid "Default error handler:" +msgstr "" + +#: c-api/init_config.rst:1079 +msgid "On Windows: use ``\"surrogateescape\"``." +msgstr "" + +#: c-api/init_config.rst:1080 +msgid "" +"``\"surrogateescape\"`` if :c:member:`PyPreConfig.utf8_mode` is non-zero, or " +"if the LC_CTYPE locale is \"C\" or \"POSIX\"." +msgstr "" + +#: c-api/init_config.rst:1082 +msgid "``\"strict\"`` otherwise." +msgstr "" + +#: c-api/init_config.rst:1086 +msgid "Enable tracemalloc?" +msgstr "" + +#: c-api/init_config.rst:1088 +msgid "If non-zero, call :func:`tracemalloc.start` at startup." +msgstr "" + +#: c-api/init_config.rst:1090 +msgid "" +"Set by :option:`-X tracemalloc=N <-X>` command line option and by the :" +"envvar:`PYTHONTRACEMALLOC` environment variable." +msgstr "" + +#: c-api/init_config.rst:1097 +msgid "Use :ref:`environment variables `?" +msgstr "" + +#: c-api/init_config.rst:1099 +msgid "" +"If equals to zero, ignore the :ref:`environment variables `." +msgstr "" + +#: c-api/init_config.rst:1106 +msgid "If non-zero, add the user site directory to :data:`sys.path`." +msgstr "" + +#: c-api/init_config.rst:1108 +msgid "Set to ``0`` by the :option:`-s` and :option:`-I` command line options." +msgstr "" + +#: c-api/init_config.rst:1110 +msgid "Set to ``0`` by the :envvar:`PYTHONNOUSERSITE` environment variable." +msgstr "" + +#: c-api/init_config.rst:1116 +msgid "" +"Verbose mode. If greater than 0, print a message each time a module is " +"imported, showing the place (filename or built-in module) from which it is " +"loaded." +msgstr "" + +#: c-api/init_config.rst:1120 +msgid "" +"If greater or equal to 2, print a message for each file that is checked for " +"when searching for a module. Also provides information on module cleanup at " +"exit." +msgstr "" + +#: c-api/init_config.rst:1124 +msgid "Incremented by the :option:`-v` command line option." +msgstr "" + +#: c-api/init_config.rst:1126 +msgid "Set to the :envvar:`PYTHONVERBOSE` environment variable value." +msgstr "" + +#: c-api/init_config.rst:1132 +msgid "" +"Options of the :mod:`warnings` module to build warnings filters, lowest to " +"highest priority: :data:`sys.warnoptions`." +msgstr "" + +#: c-api/init_config.rst:1135 +msgid "" +"The :mod:`warnings` module adds :data:`sys.warnoptions` in the reverse " +"order: the last :c:member:`PyConfig.warnoptions` item becomes the first item " +"of :data:`warnings.filters` which is checked first (highest priority)." +msgstr "" + +#: c-api/init_config.rst:1140 +msgid "" +"The :option:`-W` command line options adds its value to :c:member:`~PyConfig." +"warnoptions`, it can be used multiple times." +msgstr "" + +#: c-api/init_config.rst:1143 +msgid "" +"The :envvar:`PYTHONWARNINGS` environment variable can also be used to add " +"warning options. Multiple options can be specified, separated by commas (``," +"``)." +msgstr "" + +#: c-api/init_config.rst:1151 +msgid "" +"If equal to 0, Python won't try to write ``.pyc`` files on the import of " +"source modules." +msgstr "" + +#: c-api/init_config.rst:1154 +msgid "" +"Set to ``0`` by the :option:`-B` command line option and the :envvar:" +"`PYTHONDONTWRITEBYTECODE` environment variable." +msgstr "" + +#: c-api/init_config.rst:1157 +msgid "" +":data:`sys.dont_write_bytecode` is initialized to the inverted value of :c:" +"member:`~PyConfig.write_bytecode`." +msgstr "" + +#: c-api/init_config.rst:1164 +msgid "Values of the :option:`-X` command line options: :data:`sys._xoptions`." +msgstr "" + +#: c-api/init_config.rst:1168 +msgid "" +"If :c:member:`~PyConfig.parse_argv` is non-zero, :c:member:`~PyConfig.argv` " +"arguments are parsed the same way the regular Python parses :ref:`command " +"line arguments `, and Python arguments are stripped from :" +"c:member:`~PyConfig.argv`." +msgstr "" + +#: c-api/init_config.rst:1173 +msgid "" +"The :c:member:`~PyConfig.xoptions` options are parsed to set other options: " +"see the :option:`-X` command line option." +msgstr "" + +#: c-api/init_config.rst:1178 +msgid "The ``show_alloc_count`` field has been removed." +msgstr "" + +#: c-api/init_config.rst:1182 +msgid "Initialization with PyConfig" +msgstr "" + +#: c-api/init_config.rst:1184 +msgid "Function to initialize Python:" +msgstr "" + +#: c-api/init_config.rst:1188 +msgid "Initialize Python from *config* configuration." +msgstr "" + +#: c-api/init_config.rst:1193 +msgid "" +"If :c:func:`PyImport_FrozenModules`, :c:func:`PyImport_AppendInittab` or :c:" +"func:`PyImport_ExtendInittab` are used, they must be set or called after " +"Python preinitialization and before the Python initialization. If Python is " +"initialized multiple times, :c:func:`PyImport_AppendInittab` or :c:func:" +"`PyImport_ExtendInittab` must be called before each Python initialization." +msgstr "" + +#: c-api/init_config.rst:1200 +msgid "" +"The current configuration (``PyConfig`` type) is stored in " +"``PyInterpreterState.config``." +msgstr "" + +#: c-api/init_config.rst:1203 +msgid "Example setting the program name::" +msgstr "" + +#: c-api/init_config.rst:1231 +msgid "" +"More complete example modifying the default configuration, read the " +"configuration, and then override some parameters::" +msgstr "" + +#: c-api/init_config.rst:1282 +msgid "Isolated Configuration" +msgstr "" + +#: c-api/init_config.rst:1284 +msgid "" +":c:func:`PyPreConfig_InitIsolatedConfig` and :c:func:" +"`PyConfig_InitIsolatedConfig` functions create a configuration to isolate " +"Python from the system. For example, to embed Python into an application." +msgstr "" + +#: c-api/init_config.rst:1289 +msgid "" +"This configuration ignores global configuration variables, environment " +"variables, command line arguments (:c:member:`PyConfig.argv` is not parsed) " +"and user site directory. The C standard streams (ex: ``stdout``) and the " +"LC_CTYPE locale are left unchanged. Signal handlers are not installed." +msgstr "" + +#: c-api/init_config.rst:1294 +msgid "" +"Configuration files are still used with this configuration. Set the :ref:" +"`Python Path Configuration ` (\"output fields\") to ignore " +"these configuration files and avoid the function computing the default path " +"configuration." +msgstr "" + +#: c-api/init_config.rst:1303 +msgid "Python Configuration" +msgstr "" + +#: c-api/init_config.rst:1305 +msgid "" +":c:func:`PyPreConfig_InitPythonConfig` and :c:func:" +"`PyConfig_InitPythonConfig` functions create a configuration to build a " +"customized Python which behaves as the regular Python." +msgstr "" + +#: c-api/init_config.rst:1309 +msgid "" +"Environments variables and command line arguments are used to configure " +"Python, whereas global configuration variables are ignored." +msgstr "" + +#: c-api/init_config.rst:1312 +msgid "" +"This function enables C locale coercion (:pep:`538`) and :ref:`Python UTF-8 " +"Mode ` (:pep:`540`) depending on the LC_CTYPE locale, :envvar:" +"`PYTHONUTF8` and :envvar:`PYTHONCOERCECLOCALE` environment variables." +msgstr "" + +#: c-api/init_config.rst:1321 +msgid "Python Path Configuration" +msgstr "" + +#: c-api/init_config.rst:1323 +msgid ":c:type:`PyConfig` contains multiple fields for the path configuration:" +msgstr "" + +#: c-api/init_config.rst:1325 +msgid "Path configuration inputs:" +msgstr "" + +#: c-api/init_config.rst:1327 +msgid ":c:member:`PyConfig.home`" +msgstr "" + +#: c-api/init_config.rst:1328 +msgid ":c:member:`PyConfig.platlibdir`" +msgstr "" + +#: c-api/init_config.rst:1329 +msgid ":c:member:`PyConfig.pathconfig_warnings`" +msgstr "" + +#: c-api/init_config.rst:1330 +msgid ":c:member:`PyConfig.program_name`" +msgstr "" + +#: c-api/init_config.rst:1331 +msgid ":c:member:`PyConfig.pythonpath_env`" +msgstr "" + +#: c-api/init_config.rst:1332 +msgid "current working directory: to get absolute paths" +msgstr "" + +#: c-api/init_config.rst:1333 +msgid "" +"``PATH`` environment variable to get the program full path (from :c:member:" +"`PyConfig.program_name`)" +msgstr "" + +#: c-api/init_config.rst:1335 +msgid "``__PYVENV_LAUNCHER__`` environment variable" +msgstr "" + +#: c-api/init_config.rst:1336 +msgid "" +"(Windows only) Application paths in the registry under " +"\"Software\\Python\\PythonCore\\X.Y\\PythonPath\" of HKEY_CURRENT_USER and " +"HKEY_LOCAL_MACHINE (where X.Y is the Python version)." +msgstr "" + +#: c-api/init_config.rst:1340 +msgid "Path configuration output fields:" +msgstr "" + +#: c-api/init_config.rst:1342 +msgid ":c:member:`PyConfig.base_exec_prefix`" +msgstr "" + +#: c-api/init_config.rst:1343 +msgid ":c:member:`PyConfig.base_executable`" +msgstr "" + +#: c-api/init_config.rst:1344 +msgid ":c:member:`PyConfig.base_prefix`" +msgstr "" + +#: c-api/init_config.rst:1345 +msgid ":c:member:`PyConfig.exec_prefix`" +msgstr "" + +#: c-api/init_config.rst:1346 +msgid ":c:member:`PyConfig.executable`" +msgstr "" + +#: c-api/init_config.rst:1347 +msgid "" +":c:member:`PyConfig.module_search_paths_set`, :c:member:`PyConfig." +"module_search_paths`" +msgstr "" + +#: c-api/init_config.rst:1349 +msgid ":c:member:`PyConfig.prefix`" +msgstr "" + +#: c-api/init_config.rst:1351 +msgid "" +"If at least one \"output field\" is not set, Python calculates the path " +"configuration to fill unset fields. If :c:member:`~PyConfig." +"module_search_paths_set` is equal to 0, :c:member:`~PyConfig." +"module_search_paths` is overridden and :c:member:`~PyConfig." +"module_search_paths_set` is set to 1." +msgstr "" + +#: c-api/init_config.rst:1357 +msgid "" +"It is possible to completely ignore the function calculating the default " +"path configuration by setting explicitly all path configuration output " +"fields listed above. A string is considered as set even if it is non-empty. " +"``module_search_paths`` is considered as set if ``module_search_paths_set`` " +"is set to 1. In this case, path configuration input fields are ignored as " +"well." +msgstr "" + +#: c-api/init_config.rst:1364 +msgid "" +"Set :c:member:`~PyConfig.pathconfig_warnings` to 0 to suppress warnings when " +"calculating the path configuration (Unix only, Windows does not log any " +"warning)." +msgstr "" + +#: c-api/init_config.rst:1367 +msgid "" +"If :c:member:`~PyConfig.base_prefix` or :c:member:`~PyConfig." +"base_exec_prefix` fields are not set, they inherit their value from :c:" +"member:`~PyConfig.prefix` and :c:member:`~PyConfig.exec_prefix` respectively." +msgstr "" + +#: c-api/init_config.rst:1371 +msgid ":c:func:`Py_RunMain` and :c:func:`Py_Main` modify :data:`sys.path`:" +msgstr "" + +#: c-api/init_config.rst:1373 +msgid "" +"If :c:member:`~PyConfig.run_filename` is set and is a directory which " +"contains a ``__main__.py`` script, prepend :c:member:`~PyConfig." +"run_filename` to :data:`sys.path`." +msgstr "" + +#: c-api/init_config.rst:1376 +msgid "If :c:member:`~PyConfig.isolated` is zero:" +msgstr "" + +#: c-api/init_config.rst:1378 +msgid "" +"If :c:member:`~PyConfig.run_module` is set, prepend the current directory " +"to :data:`sys.path`. Do nothing if the current directory cannot be read." +msgstr "" + +#: c-api/init_config.rst:1380 +msgid "" +"If :c:member:`~PyConfig.run_filename` is set, prepend the directory of the " +"filename to :data:`sys.path`." +msgstr "" + +#: c-api/init_config.rst:1382 +msgid "Otherwise, prepend an empty string to :data:`sys.path`." +msgstr "" + +#: c-api/init_config.rst:1384 +msgid "" +"If :c:member:`~PyConfig.site_import` is non-zero, :data:`sys.path` can be " +"modified by the :mod:`site` module. If :c:member:`~PyConfig." +"user_site_directory` is non-zero and the user's site-package directory " +"exists, the :mod:`site` module appends the user's site-package directory to :" +"data:`sys.path`." +msgstr "" + +#: c-api/init_config.rst:1390 +msgid "The following configuration files are used by the path configuration:" +msgstr "" + +#: c-api/init_config.rst:1392 +msgid "``pyvenv.cfg``" +msgstr "" + +#: c-api/init_config.rst:1393 +msgid "``python._pth`` (Windows only)" +msgstr "" + +#: c-api/init_config.rst:1394 +msgid "``pybuilddir.txt`` (Unix only)" +msgstr "" + +#: c-api/init_config.rst:1396 +msgid "" +"The ``__PYVENV_LAUNCHER__`` environment variable is used to set :c:member:" +"`PyConfig.base_executable`" +msgstr "" + +#: c-api/init_config.rst:1401 +msgid "Py_RunMain()" +msgstr "" + +#: c-api/init_config.rst:1405 +msgid "" +"Execute the command (:c:member:`PyConfig.run_command`), the script (:c:" +"member:`PyConfig.run_filename`) or the module (:c:member:`PyConfig." +"run_module`) specified on the command line or in the configuration." +msgstr "" + +#: c-api/init_config.rst:1410 +msgid "By default and when if :option:`-i` option is used, run the REPL." +msgstr "" + +#: c-api/init_config.rst:1412 +msgid "" +"Finally, finalizes Python and returns an exit status that can be passed to " +"the ``exit()`` function." +msgstr "" + +#: c-api/init_config.rst:1415 +msgid "" +"See :ref:`Python Configuration ` for an example of " +"customized Python always running in isolated mode using :c:func:`Py_RunMain`." +msgstr "" + +#: c-api/init_config.rst:1421 +msgid "Py_GetArgcArgv()" +msgstr "" + +#: c-api/init_config.rst:1425 +msgid "Get the original command line arguments, before Python modified them." +msgstr "" + +#: c-api/init_config.rst:1427 +msgid "See also :c:member:`PyConfig.orig_argv` member." +msgstr "" + +#: c-api/init_config.rst:1431 +msgid "Multi-Phase Initialization Private Provisional API" +msgstr "" + +#: c-api/init_config.rst:1433 +msgid "" +"This section is a private provisional API introducing multi-phase " +"initialization, the core feature of :pep:`432`:" +msgstr "" + +#: c-api/init_config.rst:1436 +msgid "\"Core\" initialization phase, \"bare minimum Python\":" +msgstr "" + +#: c-api/init_config.rst:1438 +msgid "Builtin types;" +msgstr "" + +#: c-api/init_config.rst:1439 +msgid "Builtin exceptions;" +msgstr "" + +#: c-api/init_config.rst:1440 +msgid "Builtin and frozen modules;" +msgstr "" + +#: c-api/init_config.rst:1441 +msgid "" +"The :mod:`sys` module is only partially initialized (ex: :data:`sys.path` " +"doesn't exist yet)." +msgstr "" + +#: c-api/init_config.rst:1444 +msgid "\"Main\" initialization phase, Python is fully initialized:" +msgstr "" + +#: c-api/init_config.rst:1446 +msgid "Install and configure :mod:`importlib`;" +msgstr "" + +#: c-api/init_config.rst:1447 +msgid "Apply the :ref:`Path Configuration `;" +msgstr "" + +#: c-api/init_config.rst:1448 +msgid "Install signal handlers;" +msgstr "" + +#: c-api/init_config.rst:1449 +msgid "" +"Finish :mod:`sys` module initialization (ex: create :data:`sys.stdout` and :" +"data:`sys.path`);" +msgstr "" + +#: c-api/init_config.rst:1451 +msgid "" +"Enable optional features like :mod:`faulthandler` and :mod:`tracemalloc`;" +msgstr "" + +#: c-api/init_config.rst:1452 +msgid "Import the :mod:`site` module;" +msgstr "" + +#: c-api/init_config.rst:1453 +msgid "etc." +msgstr "" + +#: c-api/init_config.rst:1455 +msgid "Private provisional API:" +msgstr "" + +#: c-api/init_config.rst:1457 +msgid "" +":c:member:`PyConfig._init_main`: if set to 0, :c:func:" +"`Py_InitializeFromConfig` stops at the \"Core\" initialization phase." +msgstr "" + +#: c-api/init_config.rst:1459 +msgid "" +":c:member:`PyConfig._isolated_interpreter`: if non-zero, disallow threads, " +"subprocesses and fork." +msgstr "" + +#: c-api/init_config.rst:1464 +msgid "" +"Move to the \"Main\" initialization phase, finish the Python initialization." +msgstr "" + +#: c-api/init_config.rst:1466 +msgid "" +"No module is imported during the \"Core\" phase and the ``importlib`` module " +"is not configured: the :ref:`Path Configuration ` is only " +"applied during the \"Main\" phase. It may allow to customize Python in " +"Python to override or tune the :ref:`Path Configuration `, " +"maybe install a custom :data:`sys.meta_path` importer or an import hook, etc." +msgstr "" + +#: c-api/init_config.rst:1472 +msgid "" +"It may become possible to calculatin the :ref:`Path Configuration ` in Python, after the Core phase and before the Main phase, which is " +"one of the :pep:`432` motivation." +msgstr "" + +#: c-api/init_config.rst:1476 +msgid "" +"The \"Core\" phase is not properly defined: what should be and what should " +"not be available at this phase is not specified yet. The API is marked as " +"private and provisional: the API can be modified or even be removed anytime " +"until a proper public API is designed." +msgstr "" + +#: c-api/init_config.rst:1481 +msgid "" +"Example running Python code between \"Core\" and \"Main\" initialization " +"phases::" +msgstr "" + +#, fuzzy +#~ msgid "Functions:" +#~ msgstr "Fonctions" + +#, fuzzy +#~ msgid "Interactive mode." +#~ msgstr "Mode interactif" diff --git a/c-api/intro.po b/c-api/intro.po new file mode 100644 index 0000000000..2e2cf77bbd --- /dev/null +++ b/c-api/intro.po @@ -0,0 +1,743 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-22 22:57+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: FRENCH \n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: c-api/intro.rst:8 +msgid "Introduction" +msgstr "Introduction" + +#: c-api/intro.rst:10 +msgid "" +"The Application Programmer's Interface to Python gives C and C++ programmers " +"access to the Python interpreter at a variety of levels. The API is equally " +"usable from C++, but for brevity it is generally referred to as the Python/C " +"API. There are two fundamentally different reasons for using the Python/C " +"API. The first reason is to write *extension modules* for specific purposes; " +"these are C modules that extend the Python interpreter. This is probably " +"the most common use. The second reason is to use Python as a component in a " +"larger application; this technique is generally referred to as :dfn:" +"`embedding` Python in an application." +msgstr "" + +#: c-api/intro.rst:20 +msgid "" +"Writing an extension module is a relatively well-understood process, where a " +"\"cookbook\" approach works well. There are several tools that automate the " +"process to some extent. While people have embedded Python in other " +"applications since its early existence, the process of embedding Python is " +"less straightforward than writing an extension." +msgstr "" + +#: c-api/intro.rst:26 +msgid "" +"Many API functions are useful independent of whether you're embedding or " +"extending Python; moreover, most applications that embed Python will need " +"to provide a custom extension as well, so it's probably a good idea to " +"become familiar with writing an extension before attempting to embed Python " +"in a real application." +msgstr "" + +#: c-api/intro.rst:34 +msgid "Coding standards" +msgstr "" + +#: c-api/intro.rst:36 +msgid "" +"If you're writing C code for inclusion in CPython, you **must** follow the " +"guidelines and standards defined in :PEP:`7`. These guidelines apply " +"regardless of the version of Python you are contributing to. Following " +"these conventions is not necessary for your own third party extension " +"modules, unless you eventually expect to contribute them to Python." +msgstr "" + +#: c-api/intro.rst:46 +msgid "Include Files" +msgstr "" + +#: c-api/intro.rst:48 +msgid "" +"All function, type and macro definitions needed to use the Python/C API are " +"included in your code by the following line::" +msgstr "" + +#: c-api/intro.rst:54 +msgid "" +"This implies inclusion of the following standard headers: ````, " +"````, ````, ````, ```` and ```` (if available)." +msgstr "" + +#: c-api/intro.rst:60 +msgid "" +"Since Python may define some pre-processor definitions which affect the " +"standard headers on some systems, you *must* include :file:`Python.h` before " +"any standard headers are included." +msgstr "" +"Python pouvant définir certaines définitions pré-processeur qui affectent " +"les têtes standard sur certains systèmes, vous *devez* inclure :file:`Python." +"h` avant les en-têtes standards." + +#: c-api/intro.rst:64 +#, fuzzy +msgid "" +"It is recommended to always define ``PY_SSIZE_T_CLEAN`` before including " +"``Python.h``. See :ref:`arg-parsing` for a description of this macro." +msgstr "" +"Il est recommandé de toujours définir ``PY_SSIZE_T_CLEAN`` avant d'inclure " +"``Python.h``. Lisez :ref:`parsetuple` pour avoir une description de cette " +"macro." + +#: c-api/intro.rst:67 +msgid "" +"All user visible names defined by Python.h (except those defined by the " +"included standard headers) have one of the prefixes ``Py`` or ``_Py``. " +"Names beginning with ``_Py`` are for internal use by the Python " +"implementation and should not be used by extension writers. Structure member " +"names do not have a reserved prefix." +msgstr "" + +#: c-api/intro.rst:74 +msgid "" +"User code should never define names that begin with ``Py`` or ``_Py``. This " +"confuses the reader, and jeopardizes the portability of the user code to " +"future Python versions, which may define additional names beginning with one " +"of these prefixes." +msgstr "" + +#: c-api/intro.rst:79 +msgid "" +"The header files are typically installed with Python. On Unix, these are " +"located in the directories :file:`{prefix}/include/pythonversion/` and :file:" +"`{exec_prefix}/include/pythonversion/`, where :option:`prefix <--prefix>` " +"and :option:`exec_prefix <--exec-prefix>` are defined by the corresponding " +"parameters to Python's :program:`configure` script and *version* is ``'%d." +"%d' % sys.version_info[:2]``. On Windows, the headers are installed in :" +"file:`{prefix}/include`, where ``prefix`` is the installation directory " +"specified to the installer." +msgstr "" + +#: c-api/intro.rst:88 +msgid "" +"To include the headers, place both directories (if different) on your " +"compiler's search path for includes. Do *not* place the parent directories " +"on the search path and then use ``#include ``; this will " +"break on multi-platform builds since the platform independent headers under :" +"option:`prefix <--prefix>` include the platform specific headers from :" +"option:`exec_prefix <--exec-prefix>`." +msgstr "" + +#: c-api/intro.rst:95 +msgid "" +"C++ users should note that although the API is defined entirely using C, the " +"header files properly declare the entry points to be ``extern \"C\"``. As a " +"result, there is no need to do anything special to use the API from C++." +msgstr "" + +#: c-api/intro.rst:101 +msgid "Useful macros" +msgstr "" + +#: c-api/intro.rst:103 +msgid "" +"Several useful macros are defined in the Python header files. Many are " +"defined closer to where they are useful (e.g. :c:macro:`Py_RETURN_NONE`). " +"Others of a more general utility are defined here. This is not necessarily " +"a complete listing." +msgstr "" + +#: c-api/intro.rst:110 +msgid "" +"Use this when you have a code path that cannot be reached by design. For " +"example, in the ``default:`` clause in a ``switch`` statement for which all " +"possible values are covered in ``case`` statements. Use this in places " +"where you might be tempted to put an ``assert(0)`` or ``abort()`` call." +msgstr "" + +#: c-api/intro.rst:115 +msgid "" +"In release mode, the macro helps the compiler to optimize the code, and " +"avoids a warning about unreachable code. For example, the macro is " +"implemented with ``__builtin_unreachable()`` on GCC in release mode." +msgstr "" + +#: c-api/intro.rst:119 +msgid "" +"A use for ``Py_UNREACHABLE()`` is following a call a function that never " +"returns but that is not declared :c:macro:`_Py_NO_RETURN`." +msgstr "" + +#: c-api/intro.rst:122 +msgid "" +"If a code path is very unlikely code but can be reached under exceptional " +"case, this macro must not be used. For example, under low memory condition " +"or if a system call returns a value out of the expected range. In this " +"case, it's better to report the error to the caller. If the error cannot be " +"reported to caller, :c:func:`Py_FatalError` can be used." +msgstr "" + +#: c-api/intro.rst:132 +#, fuzzy +msgid "Return the absolute value of ``x``." +msgstr "Renvoie la valeur absolue de *x*." + +#: c-api/intro.rst:138 +msgid "Return the minimum value between ``x`` and ``y``." +msgstr "" + +#: c-api/intro.rst:144 +msgid "Return the maximum value between ``x`` and ``y``." +msgstr "" + +#: c-api/intro.rst:150 +msgid "" +"Convert ``x`` to a C string. E.g. ``Py_STRINGIFY(123)`` returns ``\"123\"``." +msgstr "" + +#: c-api/intro.rst:157 +msgid "Return the size of a structure (``type``) ``member`` in bytes." +msgstr "" + +#: c-api/intro.rst:163 +msgid "" +"Argument must be a character or an integer in the range [-128, 127] or [0, " +"255]. This macro returns ``c`` cast to an ``unsigned char``." +msgstr "" + +#: c-api/intro.rst:168 +msgid "" +"Like ``getenv(s)``, but returns ``NULL`` if :option:`-E` was passed on the " +"command line (i.e. if ``Py_IgnoreEnvironmentFlag`` is set)." +msgstr "" + +#: c-api/intro.rst:173 +msgid "" +"Use this for unused arguments in a function definition to silence compiler " +"warnings. Example: ``int func(int a, int Py_UNUSED(b)) { return a; }``." +msgstr "" + +#: c-api/intro.rst:180 +msgid "" +"Use this for deprecated declarations. The macro must be placed before the " +"symbol name." +msgstr "" + +#: c-api/intro.rst:198 c-api/intro.rst:216 +msgid "Example::" +msgstr "Exemple ::" + +#: c-api/intro.rst:187 +msgid "MSVC support was added." +msgstr "" + +#: c-api/intro.rst:192 +msgid "" +"Creates a variable with name ``name`` that can be used in docstrings. If " +"Python is built without docstrings, the value will be empty." +msgstr "" + +#: c-api/intro.rst:195 +msgid "" +"Use :c:macro:`PyDoc_STRVAR` for docstrings to support building Python " +"without docstrings, as specified in :pep:`7`." +msgstr "" + +#: c-api/intro.rst:210 +msgid "" +"Creates a docstring for the given input string or an empty string if " +"docstrings are disabled." +msgstr "" + +#: c-api/intro.rst:213 +msgid "" +"Use :c:macro:`PyDoc_STR` in specifying docstrings to support building Python " +"without docstrings, as specified in :pep:`7`." +msgstr "" + +#: c-api/intro.rst:227 +msgid "Objects, Types and Reference Counts" +msgstr "" + +#: c-api/intro.rst:231 +msgid "" +"Most Python/C API functions have one or more arguments as well as a return " +"value of type :c:expr:`PyObject*`. This type is a pointer to an opaque data " +"type representing an arbitrary Python object. Since all Python object types " +"are treated the same way by the Python language in most situations (e.g., " +"assignments, scope rules, and argument passing), it is only fitting that " +"they should be represented by a single C type. Almost all Python objects " +"live on the heap: you never declare an automatic or static variable of type :" +"c:type:`PyObject`, only pointer variables of type :c:expr:`PyObject*` can " +"be declared. The sole exception are the type objects; since these must " +"never be deallocated, they are typically static :c:type:`PyTypeObject` " +"objects." +msgstr "" + +#: c-api/intro.rst:242 +msgid "" +"All Python objects (even Python integers) have a :dfn:`type` and a :dfn:" +"`reference count`. An object's type determines what kind of object it is (e." +"g., an integer, a list, or a user-defined function; there are many more as " +"explained in :ref:`types`). For each of the well-known types there is a " +"macro to check whether an object is of that type; for instance, " +"``PyList_Check(a)`` is true if (and only if) the object pointed to by *a* is " +"a Python list." +msgstr "" + +#: c-api/intro.rst:253 +msgid "Reference Counts" +msgstr "Compteurs de références" + +#: c-api/intro.rst:255 +msgid "" +"The reference count is important because today's computers have a finite " +"(and often severely limited) memory size; it counts how many different " +"places there are that have a reference to an object. Such a place could be " +"another object, or a global (or static) C variable, or a local variable in " +"some C function. When an object's reference count becomes zero, the object " +"is deallocated. If it contains references to other objects, their " +"reference count is decremented. Those other objects may be deallocated in " +"turn, if this decrement makes their reference count become zero, and so on. " +"(There's an obvious problem with objects that reference each other here; " +"for now, the solution is \"don't do that.\")" +msgstr "" + +#: c-api/intro.rst:270 +msgid "" +"Reference counts are always manipulated explicitly. The normal way is to " +"use the macro :c:func:`Py_INCREF` to increment an object's reference count " +"by one, and :c:func:`Py_DECREF` to decrement it by one. The :c:func:" +"`Py_DECREF` macro is considerably more complex than the incref one, since it " +"must check whether the reference count becomes zero and then cause the " +"object's deallocator to be called. The deallocator is a function pointer " +"contained in the object's type structure. The type-specific deallocator " +"takes care of decrementing the reference counts for other objects contained " +"in the object if this is a compound object type, such as a list, as well as " +"performing any additional finalization that's needed. There's no chance " +"that the reference count can overflow; at least as many bits are used to " +"hold the reference count as there are distinct memory locations in virtual " +"memory (assuming ``sizeof(Py_ssize_t) >= sizeof(void*)``). Thus, the " +"reference count increment is a simple operation." +msgstr "" + +#: c-api/intro.rst:284 +msgid "" +"It is not necessary to increment an object's reference count for every " +"local variable that contains a pointer to an object. In theory, the " +"object's reference count goes up by one when the variable is made to point " +"to it and it goes down by one when the variable goes out of scope. " +"However, these two cancel each other out, so at the end the reference count " +"hasn't changed. The only real reason to use the reference count is to " +"prevent the object from being deallocated as long as our variable is " +"pointing to it. If we know that there is at least one other reference to " +"the object that lives at least as long as our variable, there is no need to " +"increment the reference count temporarily. An important situation where " +"this arises is in objects that are passed as arguments to C functions in an " +"extension module that are called from Python; the call mechanism guarantees " +"to hold a reference to every argument for the duration of the call." +msgstr "" + +#: c-api/intro.rst:298 +msgid "" +"However, a common pitfall is to extract an object from a list and hold on to " +"it for a while without incrementing its reference count. Some other " +"operation might conceivably remove the object from the list, decrementing " +"its reference count and possibly deallocating it. The real danger is that " +"innocent-looking operations may invoke arbitrary Python code which could do " +"this; there is a code path which allows control to flow back to the user " +"from a :c:func:`Py_DECREF`, so almost any operation is potentially dangerous." +msgstr "" + +#: c-api/intro.rst:306 +msgid "" +"A safe approach is to always use the generic operations (functions whose " +"name begins with ``PyObject_``, ``PyNumber_``, ``PySequence_`` or " +"``PyMapping_``). These operations always increment the reference count of " +"the object they return. This leaves the caller with the responsibility to " +"call :c:func:`Py_DECREF` when they are done with the result; this soon " +"becomes second nature." +msgstr "" + +#: c-api/intro.rst:316 +msgid "Reference Count Details" +msgstr "" + +#: c-api/intro.rst:318 +msgid "" +"The reference count behavior of functions in the Python/C API is best " +"explained in terms of *ownership of references*. Ownership pertains to " +"references, never to objects (objects are not owned: they are always " +"shared). \"Owning a reference\" means being responsible for calling " +"Py_DECREF on it when the reference is no longer needed. Ownership can also " +"be transferred, meaning that the code that receives ownership of the " +"reference then becomes responsible for eventually decref'ing it by calling :" +"c:func:`Py_DECREF` or :c:func:`Py_XDECREF` when it's no longer needed---or " +"passing on this responsibility (usually to its caller). When a function " +"passes ownership of a reference on to its caller, the caller is said to " +"receive a *new* reference. When no ownership is transferred, the caller is " +"said to *borrow* the reference. Nothing needs to be done for a :term:" +"`borrowed reference`." +msgstr "" + +#: c-api/intro.rst:331 +msgid "" +"Conversely, when a calling function passes in a reference to an object, " +"there are two possibilities: the function *steals* a reference to the " +"object, or it does not. *Stealing a reference* means that when you pass a " +"reference to a function, that function assumes that it now owns that " +"reference, and you are not responsible for it any longer." +msgstr "" + +#: c-api/intro.rst:341 +msgid "" +"Few functions steal references; the two notable exceptions are :c:func:" +"`PyList_SetItem` and :c:func:`PyTuple_SetItem`, which steal a reference to " +"the item (but not to the tuple or list into which the item is put!). These " +"functions were designed to steal a reference because of a common idiom for " +"populating a tuple or list with newly created objects; for example, the code " +"to create the tuple ``(1, 2, \"three\")`` could look like this (forgetting " +"about error handling for the moment; a better way to code this is shown " +"below)::" +msgstr "" + +#: c-api/intro.rst:356 +msgid "" +"Here, :c:func:`PyLong_FromLong` returns a new reference which is immediately " +"stolen by :c:func:`PyTuple_SetItem`. When you want to keep using an object " +"although the reference to it will be stolen, use :c:func:`Py_INCREF` to grab " +"another reference before calling the reference-stealing function." +msgstr "" + +#: c-api/intro.rst:361 +msgid "" +"Incidentally, :c:func:`PyTuple_SetItem` is the *only* way to set tuple " +"items; :c:func:`PySequence_SetItem` and :c:func:`PyObject_SetItem` refuse to " +"do this since tuples are an immutable data type. You should only use :c:" +"func:`PyTuple_SetItem` for tuples that you are creating yourself." +msgstr "" + +#: c-api/intro.rst:366 +msgid "" +"Equivalent code for populating a list can be written using :c:func:" +"`PyList_New` and :c:func:`PyList_SetItem`." +msgstr "" + +#: c-api/intro.rst:369 +msgid "" +"However, in practice, you will rarely use these ways of creating and " +"populating a tuple or list. There's a generic function, :c:func:" +"`Py_BuildValue`, that can create most common objects from C values, directed " +"by a :dfn:`format string`. For example, the above two blocks of code could " +"be replaced by the following (which also takes care of the error checking)::" +msgstr "" + +#: c-api/intro.rst:380 +msgid "" +"It is much more common to use :c:func:`PyObject_SetItem` and friends with " +"items whose references you are only borrowing, like arguments that were " +"passed in to the function you are writing. In that case, their behaviour " +"regarding reference counts is much saner, since you don't have to increment " +"a reference count so you can give a reference away (\"have it be stolen\"). " +"For example, this function sets all items of a list (actually, any mutable " +"sequence) to a given item::" +msgstr "" + +#: c-api/intro.rst:410 +msgid "" +"The situation is slightly different for function return values. While " +"passing a reference to most functions does not change your ownership " +"responsibilities for that reference, many functions that return a reference " +"to an object give you ownership of the reference. The reason is simple: in " +"many cases, the returned object is created on the fly, and the reference " +"you get is the only reference to the object. Therefore, the generic " +"functions that return object references, like :c:func:`PyObject_GetItem` " +"and :c:func:`PySequence_GetItem`, always return a new reference (the caller " +"becomes the owner of the reference)." +msgstr "" + +#: c-api/intro.rst:419 +msgid "" +"It is important to realize that whether you own a reference returned by a " +"function depends on which function you call only --- *the plumage* (the type " +"of the object passed as an argument to the function) *doesn't enter into it!" +"* Thus, if you extract an item from a list using :c:func:`PyList_GetItem`, " +"you don't own the reference --- but if you obtain the same item from the " +"same list using :c:func:`PySequence_GetItem` (which happens to take exactly " +"the same arguments), you do own a reference to the returned object." +msgstr "" + +#: c-api/intro.rst:431 +msgid "" +"Here is an example of how you could write a function that computes the sum " +"of the items in a list of integers; once using :c:func:`PyList_GetItem`, " +"and once using :c:func:`PySequence_GetItem`. ::" +msgstr "" + +#: c-api/intro.rst:495 +msgid "Types" +msgstr "" + +#: c-api/intro.rst:497 +msgid "" +"There are few other data types that play a significant role in the Python/C " +"API; most are simple C types such as :c:expr:`int`, :c:expr:`long`, :c:expr:" +"`double` and :c:expr:`char*`. A few structure types are used to describe " +"static tables used to list the functions exported by a module or the data " +"attributes of a new object type, and another is used to describe the value " +"of a complex number. These will be discussed together with the functions " +"that use them." +msgstr "" + +#: c-api/intro.rst:507 +msgid "" +"A signed integral type such that ``sizeof(Py_ssize_t) == sizeof(size_t)``. " +"C99 doesn't define such a thing directly (size_t is an unsigned integral " +"type). See :pep:`353` for details. ``PY_SSIZE_T_MAX`` is the largest " +"positive value of type :c:type:`Py_ssize_t`." +msgstr "" + +#: c-api/intro.rst:516 +msgid "Exceptions" +msgstr "Exceptions" + +#: c-api/intro.rst:518 +msgid "" +"The Python programmer only needs to deal with exceptions if specific error " +"handling is required; unhandled exceptions are automatically propagated to " +"the caller, then to the caller's caller, and so on, until they reach the top-" +"level interpreter, where they are reported to the user accompanied by a " +"stack traceback." +msgstr "" + +#: c-api/intro.rst:526 +msgid "" +"For C programmers, however, error checking always has to be explicit. All " +"functions in the Python/C API can raise exceptions, unless an explicit claim " +"is made otherwise in a function's documentation. In general, when a " +"function encounters an error, it sets an exception, discards any object " +"references that it owns, and returns an error indicator. If not documented " +"otherwise, this indicator is either ``NULL`` or ``-1``, depending on the " +"function's return type. A few functions return a Boolean true/false result, " +"with false indicating an error. Very few functions return no explicit error " +"indicator or have an ambiguous return value, and require explicit testing " +"for errors with :c:func:`PyErr_Occurred`. These exceptions are always " +"explicitly documented." +msgstr "" + +#: c-api/intro.rst:541 +msgid "" +"Exception state is maintained in per-thread storage (this is equivalent to " +"using global storage in an unthreaded application). A thread can be in one " +"of two states: an exception has occurred, or not. The function :c:func:" +"`PyErr_Occurred` can be used to check for this: it returns a borrowed " +"reference to the exception type object when an exception has occurred, and " +"``NULL`` otherwise. There are a number of functions to set the exception " +"state: :c:func:`PyErr_SetString` is the most common (though not the most " +"general) function to set the exception state, and :c:func:`PyErr_Clear` " +"clears the exception state." +msgstr "" + +#: c-api/intro.rst:551 +msgid "" +"The full exception state consists of three objects (all of which can be " +"``NULL``): the exception type, the corresponding exception value, and the " +"traceback. These have the same meanings as the Python result of ``sys." +"exc_info()``; however, they are not the same: the Python objects represent " +"the last exception being handled by a Python :keyword:`try` ... :keyword:" +"`except` statement, while the C level exception state only exists while an " +"exception is being passed on between C functions until it reaches the Python " +"bytecode interpreter's main loop, which takes care of transferring it to " +"``sys.exc_info()`` and friends." +msgstr "" + +#: c-api/intro.rst:563 +msgid "" +"Note that starting with Python 1.5, the preferred, thread-safe way to access " +"the exception state from Python code is to call the function :func:`sys." +"exc_info`, which returns the per-thread exception state for Python code. " +"Also, the semantics of both ways to access the exception state have changed " +"so that a function which catches an exception will save and restore its " +"thread's exception state so as to preserve the exception state of its " +"caller. This prevents common bugs in exception handling code caused by an " +"innocent-looking function overwriting the exception being handled; it also " +"reduces the often unwanted lifetime extension for objects that are " +"referenced by the stack frames in the traceback." +msgstr "" + +#: c-api/intro.rst:574 +msgid "" +"As a general principle, a function that calls another function to perform " +"some task should check whether the called function raised an exception, and " +"if so, pass the exception state on to its caller. It should discard any " +"object references that it owns, and return an error indicator, but it " +"should *not* set another exception --- that would overwrite the exception " +"that was just raised, and lose important information about the exact cause " +"of the error." +msgstr "" + +#: c-api/intro.rst:583 +msgid "" +"A simple example of detecting exceptions and passing them on is shown in " +"the :c:func:`sum_sequence` example above. It so happens that this example " +"doesn't need to clean up any owned references when it detects an error. The " +"following example function shows some error cleanup. First, to remind you " +"why you like Python, we show the equivalent Python code::" +msgstr "" + +#: c-api/intro.rst:598 +msgid "Here is the corresponding C code, in all its glory::" +msgstr "" + +#: c-api/intro.rst:650 +msgid "" +"This example represents an endorsed use of the ``goto`` statement in C! It " +"illustrates the use of :c:func:`PyErr_ExceptionMatches` and :c:func:" +"`PyErr_Clear` to handle specific exceptions, and the use of :c:func:" +"`Py_XDECREF` to dispose of owned references that may be ``NULL`` (note the " +"``'X'`` in the name; :c:func:`Py_DECREF` would crash when confronted with a " +"``NULL`` reference). It is important that the variables used to hold owned " +"references are initialized to ``NULL`` for this to work; likewise, the " +"proposed return value is initialized to ``-1`` (failure) and only set to " +"success after the final call made is successful." +msgstr "" + +#: c-api/intro.rst:664 +msgid "Embedding Python" +msgstr "Embarquer Python" + +#: c-api/intro.rst:666 +msgid "" +"The one important task that only embedders (as opposed to extension writers) " +"of the Python interpreter have to worry about is the initialization, and " +"possibly the finalization, of the Python interpreter. Most functionality of " +"the interpreter can only be used after the interpreter has been initialized." +msgstr "" + +#: c-api/intro.rst:679 +msgid "" +"The basic initialization function is :c:func:`Py_Initialize`. This " +"initializes the table of loaded modules, and creates the fundamental " +"modules :mod:`builtins`, :mod:`__main__`, and :mod:`sys`. It also " +"initializes the module search path (``sys.path``)." +msgstr "" + +#: c-api/intro.rst:686 +msgid "" +":c:func:`Py_Initialize` does not set the \"script argument list\" (``sys." +"argv``). If this variable is needed by Python code that will be executed " +"later, it must be set explicitly with a call to ``PySys_SetArgvEx(argc, " +"argv, updatepath)`` after the call to :c:func:`Py_Initialize`." +msgstr "" + +#: c-api/intro.rst:691 +msgid "" +"On most systems (in particular, on Unix and Windows, although the details " +"are slightly different), :c:func:`Py_Initialize` calculates the module " +"search path based upon its best guess for the location of the standard " +"Python interpreter executable, assuming that the Python library is found in " +"a fixed location relative to the Python interpreter executable. In " +"particular, it looks for a directory named :file:`lib/python{X.Y}` relative " +"to the parent directory where the executable named :file:`python` is found " +"on the shell command search path (the environment variable :envvar:`PATH`)." +msgstr "" + +#: c-api/intro.rst:700 +msgid "" +"For instance, if the Python executable is found in :file:`/usr/local/bin/" +"python`, it will assume that the libraries are in :file:`/usr/local/lib/" +"python{X.Y}`. (In fact, this particular path is also the \"fallback\" " +"location, used when no executable file named :file:`python` is found along :" +"envvar:`PATH`.) The user can override this behavior by setting the " +"environment variable :envvar:`PYTHONHOME`, or insert additional directories " +"in front of the standard path by setting :envvar:`PYTHONPATH`." +msgstr "" + +#: c-api/intro.rst:715 +msgid "" +"The embedding application can steer the search by calling " +"``Py_SetProgramName(file)`` *before* calling :c:func:`Py_Initialize`. Note " +"that :envvar:`PYTHONHOME` still overrides this and :envvar:`PYTHONPATH` is " +"still inserted in front of the standard path. An application that requires " +"total control has to provide its own implementation of :c:func:" +"`Py_GetPath`, :c:func:`Py_GetPrefix`, :c:func:`Py_GetExecPrefix`, and :c:" +"func:`Py_GetProgramFullPath` (all defined in :file:`Modules/getpath.c`)." +msgstr "" + +#: c-api/intro.rst:725 +msgid "" +"Sometimes, it is desirable to \"uninitialize\" Python. For instance, the " +"application may want to start over (make another call to :c:func:" +"`Py_Initialize`) or the application is simply done with its use of Python " +"and wants to free memory allocated by Python. This can be accomplished by " +"calling :c:func:`Py_FinalizeEx`. The function :c:func:`Py_IsInitialized` " +"returns true if Python is currently in the initialized state. More " +"information about these functions is given in a later chapter. Notice that :" +"c:func:`Py_FinalizeEx` does *not* free all memory allocated by the Python " +"interpreter, e.g. memory allocated by extension modules currently cannot be " +"released." +msgstr "" + +#: c-api/intro.rst:739 +msgid "Debugging Builds" +msgstr "" + +#: c-api/intro.rst:741 +msgid "" +"Python can be built with several macros to enable extra checks of the " +"interpreter and extension modules. These checks tend to add a large amount " +"of overhead to the runtime so they are not enabled by default." +msgstr "" + +#: c-api/intro.rst:745 +msgid "" +"A full list of the various types of debugging builds is in the file :file:" +"`Misc/SpecialBuilds.txt` in the Python source distribution. Builds are " +"available that support tracing of reference counts, debugging the memory " +"allocator, or low-level profiling of the main interpreter loop. Only the " +"most frequently used builds will be described in the remainder of this " +"section." +msgstr "" + +#: c-api/intro.rst:751 +msgid "" +"Compiling the interpreter with the :c:macro:`Py_DEBUG` macro defined " +"produces what is generally meant by :ref:`a debug build of Python `. :c:macro:`Py_DEBUG` is enabled in the Unix build by adding :option:" +"`--with-pydebug` to the :file:`./configure` command. It is also implied by " +"the presence of the not-Python-specific :c:macro:`_DEBUG` macro. When :c:" +"macro:`Py_DEBUG` is enabled in the Unix build, compiler optimization is " +"disabled." +msgstr "" + +#: c-api/intro.rst:759 +msgid "" +"In addition to the reference count debugging described below, extra checks " +"are performed, see :ref:`Python Debug Build `." +msgstr "" + +#: c-api/intro.rst:762 +msgid "" +"Defining :c:macro:`Py_TRACE_REFS` enables reference tracing (see the :option:" +"`configure --with-trace-refs option <--with-trace-refs>`). When defined, a " +"circular doubly linked list of active objects is maintained by adding two " +"extra fields to every :c:type:`PyObject`. Total allocations are tracked as " +"well. Upon exit, all existing references are printed. (In interactive mode " +"this happens after every statement run by the interpreter.)" +msgstr "" + +#: c-api/intro.rst:769 +msgid "" +"Please refer to :file:`Misc/SpecialBuilds.txt` in the Python source " +"distribution for more detailed information." +msgstr "" diff --git a/c-api/iter.po b/c-api/iter.po new file mode 100644 index 0000000000..f910b9223c --- /dev/null +++ b/c-api/iter.po @@ -0,0 +1,85 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-04-05 10:05+0200\n" +"PO-Revision-Date: 2018-02-15 00:33+0100\n" +"Last-Translator: Julien Palard \n" +"Language-Team: FRENCH \n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: c-api/iter.rst:6 +msgid "Iterator Protocol" +msgstr "Protocole d'itération" + +#: c-api/iter.rst:8 +msgid "There are two functions specifically for working with iterators." +msgstr "Il existe deux fonctions dédiées à l'interaction avec les itérateurs." + +#: c-api/iter.rst:12 +#, fuzzy +msgid "" +"Return non-zero if the object *o* can be safely passed to :c:func:" +"`PyIter_Next`, and ``0`` otherwise. This function always succeeds." +msgstr "Renvoie vrai si l'objet *o* supporte le protocole d'itération." + +#: c-api/iter.rst:17 +#, fuzzy +msgid "" +"Return non-zero if the object *o* provides the :class:`AsyncIterator` " +"protocol, and ``0`` otherwise. This function always succeeds." +msgstr "Renvoie vrai si l'objet *o* supporte le protocole d'itération." + +#: c-api/iter.rst:24 +#, fuzzy +msgid "" +"Return the next value from the iterator *o*. The object must be an iterator " +"according to :c:func:`PyIter_Check` (it is up to the caller to check this). " +"If there are no remaining values, returns ``NULL`` with no exception set. If " +"an error occurs while retrieving the item, returns ``NULL`` and passes along " +"the exception." +msgstr "" +"Renvoie la valeur suivante d'une itération de *o*. L'objet doit être un " +"itérateur (c'est à l'appelant de faire cette vérification). Renvoie *NULL* " +"s'il n'y a plus de valeurs, sans déclarer d'exception. Renvoie *NULL* en " +"déclarant une exception si une erreur survient lors de la récupération d'un " +"élément." + +#: c-api/iter.rst:30 +msgid "" +"To write a loop which iterates over an iterator, the C code should look " +"something like this::" +msgstr "" +"Pour écrire une boucle itérant un itérateur, le code C devrait ressembler " +"à ::" + +#: c-api/iter.rst:59 +msgid "" +"The enum value used to represent different results of :c:func:`PyIter_Send`." +msgstr "" + +#: c-api/iter.rst:66 +msgid "Sends the *arg* value into the iterator *iter*. Returns:" +msgstr "" + +#: c-api/iter.rst:68 +msgid "" +"``PYGEN_RETURN`` if iterator returns. Return value is returned via *presult*." +msgstr "" + +#: c-api/iter.rst:69 +msgid "" +"``PYGEN_NEXT`` if iterator yields. Yielded value is returned via *presult*." +msgstr "" + +#: c-api/iter.rst:70 +msgid "" +"``PYGEN_ERROR`` if iterator has raised and exception. *presult* is set to " +"``NULL``." +msgstr "" diff --git a/c-api/iterator.po b/c-api/iterator.po new file mode 100644 index 0000000000..6d921aa268 --- /dev/null +++ b/c-api/iterator.po @@ -0,0 +1,87 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-01-27 19:26+0100\n" +"PO-Revision-Date: 2019-03-26 17:16+0100\n" +"Last-Translator: ANTOINE FOURES \n" +"Language-Team: FRENCH \n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: c-api/iterator.rst:6 +msgid "Iterator Objects" +msgstr "Itérateurs" + +#: c-api/iterator.rst:8 +msgid "" +"Python provides two general-purpose iterator objects. The first, a sequence " +"iterator, works with an arbitrary sequence supporting the :meth:" +"`__getitem__` method. The second works with a callable object and a " +"sentinel value, calling the callable for each item in the sequence, and " +"ending the iteration when the sentinel value is returned." +msgstr "" +"Python fournit deux itérateurs d'usage générique. Le premier est un " +"itérateur de séquence, il fonctionne avec n'importe quelle séquence " +"implémentant la méthode :meth:`__getitem__`. Le second fonctionne avec un " +"objet appelable et une valeur sentinelle, l'appelable permet d'obtenir " +"chaque élément de la séquence, et l'itération se termine lorsque la " +"sentinelle est atteinte." + +#: c-api/iterator.rst:17 +msgid "" +"Type object for iterator objects returned by :c:func:`PySeqIter_New` and the " +"one-argument form of the :func:`iter` built-in function for built-in " +"sequence types." +msgstr "" +"Type des itérateurs renvoyés par les fonctions :c:func:`PySeqIter_New` et la " +"forme à un argument de la fonction native :func:`iter` pour les séquences " +"natives." + +#: c-api/iterator.rst:24 +#, fuzzy +msgid "" +"Return true if the type of *op* is :c:data:`PySeqIter_Type`. This function " +"always succeeds." +msgstr "Renvoie vrai si *op* est de type :c:data:`PySeqIter_Type`." + +#: c-api/iterator.rst:30 +msgid "" +"Return an iterator that works with a general sequence object, *seq*. The " +"iteration ends when the sequence raises :exc:`IndexError` for the " +"subscripting operation." +msgstr "" +"Renvoie un itérateur sur la séquence *seq*. L'itération prend fin lorsque la " +"séquence lève :exc:`IndexError` lors d'une tentative d'accès." + +#: c-api/iterator.rst:37 +msgid "" +"Type object for iterator objects returned by :c:func:`PyCallIter_New` and " +"the two-argument form of the :func:`iter` built-in function." +msgstr "" +"Type de l'itérateur renvoyé par les fonctions :c:func:`PyCallIter_New` et :" +"func:`iter` à deux arguments." + +#: c-api/iterator.rst:43 +#, fuzzy +msgid "" +"Return true if the type of *op* is :c:data:`PyCallIter_Type`. This function " +"always succeeds." +msgstr "Renvoie vrai si *op* est de type :c:data:`PyCallIter_Type`." + +#: c-api/iterator.rst:49 +msgid "" +"Return a new iterator. The first parameter, *callable*, can be any Python " +"callable object that can be called with no parameters; each call to it " +"should return the next item in the iteration. When *callable* returns a " +"value equal to *sentinel*, the iteration will be terminated." +msgstr "" +"Renvoie un nouvel itérateur. Le premier paramètre, *callable*, peut être " +"n'importe quel objet Python appelable sans aucun paramètre ; chaque appel " +"doit renvoyer l'élément suivant de l'itération. Lorsque *callable* renvoie " +"une valeur égale à *sentinel*, l'itération prend fin." diff --git a/c-api/list.po b/c-api/list.po new file mode 100644 index 0000000000..42f3d1a4c3 --- /dev/null +++ b/c-api/list.po @@ -0,0 +1,156 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-01-27 19:26+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: FRENCH \n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: c-api/list.rst:6 +msgid "List Objects" +msgstr "" + +#: c-api/list.rst:13 +#, fuzzy +msgid "This subtype of :c:type:`PyObject` represents a Python list object." +msgstr "" +"Ce sous-type de :c:type:`PyObject` représente un objet ``bytearray`` Python." + +#: c-api/list.rst:18 +#, fuzzy +msgid "" +"This instance of :c:type:`PyTypeObject` represents the Python list type. " +"This is the same object as :class:`list` in the Python layer." +msgstr "" +"Cette instance de l'objet :c:type:`PyTypeObject` représente le type nombre à " +"virgule flottante en Python. C'est le même objet que la classe :class:" +"`float` de la couche Python." + +#: c-api/list.rst:24 +msgid "" +"Return true if *p* is a list object or an instance of a subtype of the list " +"type. This function always succeeds." +msgstr "" + +#: c-api/list.rst:30 +msgid "" +"Return true if *p* is a list object, but not an instance of a subtype of the " +"list type. This function always succeeds." +msgstr "" + +#: c-api/list.rst:36 +msgid "Return a new list of length *len* on success, or ``NULL`` on failure." +msgstr "" + +#: c-api/list.rst:40 +msgid "" +"If *len* is greater than zero, the returned list object's items are set to " +"``NULL``. Thus you cannot use abstract API functions such as :c:func:" +"`PySequence_SetItem` or expose the object to Python code before setting all " +"items to a real object with :c:func:`PyList_SetItem`." +msgstr "" + +#: c-api/list.rst:50 +msgid "" +"Return the length of the list object in *list*; this is equivalent to " +"``len(list)`` on a list object." +msgstr "" + +#: c-api/list.rst:56 +msgid "Macro form of :c:func:`PyList_Size` without error checking." +msgstr "" + +#: c-api/list.rst:61 +msgid "" +"Return the object at position *index* in the list pointed to by *list*. The " +"position must be non-negative; indexing from the end of the list is not " +"supported. If *index* is out of bounds (<0 or >=len(list)), return ``NULL`` " +"and set an :exc:`IndexError` exception." +msgstr "" + +#: c-api/list.rst:69 +msgid "Macro form of :c:func:`PyList_GetItem` without error checking." +msgstr "" + +#: c-api/list.rst:74 +msgid "" +"Set the item at index *index* in list to *item*. Return ``0`` on success. " +"If *index* is out of bounds, return ``-1`` and set an :exc:`IndexError` " +"exception." +msgstr "" + +#: c-api/list.rst:80 +msgid "" +"This function \"steals\" a reference to *item* and discards a reference to " +"an item already in the list at the affected position." +msgstr "" + +#: c-api/list.rst:86 +msgid "" +"Macro form of :c:func:`PyList_SetItem` without error checking. This is " +"normally only used to fill in new lists where there is no previous content." +msgstr "" + +#: c-api/list.rst:91 +msgid "" +"This macro \"steals\" a reference to *item*, and, unlike :c:func:" +"`PyList_SetItem`, does *not* discard a reference to any item that is being " +"replaced; any reference in *list* at position *i* will be leaked." +msgstr "" + +#: c-api/list.rst:99 +msgid "" +"Insert the item *item* into list *list* in front of index *index*. Return " +"``0`` if successful; return ``-1`` and set an exception if unsuccessful. " +"Analogous to ``list.insert(index, item)``." +msgstr "" + +#: c-api/list.rst:106 +msgid "" +"Append the object *item* at the end of list *list*. Return ``0`` if " +"successful; return ``-1`` and set an exception if unsuccessful. Analogous " +"to ``list.append(item)``." +msgstr "" + +#: c-api/list.rst:113 +msgid "" +"Return a list of the objects in *list* containing the objects *between* " +"*low* and *high*. Return ``NULL`` and set an exception if unsuccessful. " +"Analogous to ``list[low:high]``. Indexing from the end of the list is not " +"supported." +msgstr "" + +#: c-api/list.rst:120 +msgid "" +"Set the slice of *list* between *low* and *high* to the contents of " +"*itemlist*. Analogous to ``list[low:high] = itemlist``. The *itemlist* may " +"be ``NULL``, indicating the assignment of an empty list (slice deletion). " +"Return ``0`` on success, ``-1`` on failure. Indexing from the end of the " +"list is not supported." +msgstr "" + +#: c-api/list.rst:129 +msgid "" +"Sort the items of *list* in place. Return ``0`` on success, ``-1`` on " +"failure. This is equivalent to ``list.sort()``." +msgstr "" + +#: c-api/list.rst:135 +msgid "" +"Reverse the items of *list* in place. Return ``0`` on success, ``-1`` on " +"failure. This is the equivalent of ``list.reverse()``." +msgstr "" + +#: c-api/list.rst:143 +msgid "" +"Return a new tuple object containing the contents of *list*; equivalent to " +"``tuple(list)``." +msgstr "" diff --git a/c-api/long.po b/c-api/long.po new file mode 100644 index 0000000000..8ec49d2f49 --- /dev/null +++ b/c-api/long.po @@ -0,0 +1,338 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-22 22:57+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: FRENCH \n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: c-api/long.rst:6 +msgid "Integer Objects" +msgstr "Objets *Integer*" + +#: c-api/long.rst:11 +msgid "" +"All integers are implemented as \"long\" integer objects of arbitrary size." +msgstr "" + +#: c-api/long.rst:13 +msgid "" +"On error, most ``PyLong_As*`` APIs return ``(return type)-1`` which cannot " +"be distinguished from a number. Use :c:func:`PyErr_Occurred` to " +"disambiguate." +msgstr "" + +#: c-api/long.rst:18 +#, fuzzy +msgid "This subtype of :c:type:`PyObject` represents a Python integer object." +msgstr "" +"Ce sous-type de :c:type:`PyObject` représente un objet ``bytearray`` Python." + +#: c-api/long.rst:23 +#, fuzzy +msgid "" +"This instance of :c:type:`PyTypeObject` represents the Python integer type. " +"This is the same object as :class:`int` in the Python layer." +msgstr "" +"Cette instance de l'objet :c:type:`PyTypeObject` représente le type nombre à " +"virgule flottante en Python. C'est le même objet que la classe :class:" +"`float` de la couche Python." + +#: c-api/long.rst:29 +#, fuzzy +msgid "" +"Return true if its argument is a :c:type:`PyLongObject` or a subtype of :c:" +"type:`PyLongObject`. This function always succeeds." +msgstr "" +"Renvoie vrai si l'argument est de type :c:type:`PyFloatObject` ou un sous-" +"type de :c:type:`PyFloatObject`." + +#: c-api/long.rst:35 +#, fuzzy +msgid "" +"Return true if its argument is a :c:type:`PyLongObject`, but not a subtype " +"of :c:type:`PyLongObject`. This function always succeeds." +msgstr "" +"Renvoie vrai si l'argument est de type :c:type:`PyFloatObject`, mais pas un " +"sous-type de :c:type:`PyFloatObject`." + +#: c-api/long.rst:41 +msgid "" +"Return a new :c:type:`PyLongObject` object from *v*, or ``NULL`` on failure." +msgstr "" + +#: c-api/long.rst:43 +msgid "" +"The current implementation keeps an array of integer objects for all " +"integers between ``-5`` and ``256``. When you create an int in that range " +"you actually just get back a reference to the existing object." +msgstr "" + +#: c-api/long.rst:50 +msgid "" +"Return a new :c:type:`PyLongObject` object from a C :c:expr:`unsigned long`, " +"or ``NULL`` on failure." +msgstr "" + +#: c-api/long.rst:56 +msgid "" +"Return a new :c:type:`PyLongObject` object from a C :c:type:`Py_ssize_t`, or " +"``NULL`` on failure." +msgstr "" + +#: c-api/long.rst:62 +msgid "" +"Return a new :c:type:`PyLongObject` object from a C :c:type:`size_t`, or " +"``NULL`` on failure." +msgstr "" + +#: c-api/long.rst:68 +msgid "" +"Return a new :c:type:`PyLongObject` object from a C :c:expr:`long long`, or " +"``NULL`` on failure." +msgstr "" + +#: c-api/long.rst:74 +msgid "" +"Return a new :c:type:`PyLongObject` object from a C :c:expr:`unsigned long " +"long`, or ``NULL`` on failure." +msgstr "" + +#: c-api/long.rst:80 +msgid "" +"Return a new :c:type:`PyLongObject` object from the integer part of *v*, or " +"``NULL`` on failure." +msgstr "" + +#: c-api/long.rst:86 +msgid "" +"Return a new :c:type:`PyLongObject` based on the string value in *str*, " +"which is interpreted according to the radix in *base*. If *pend* is non-" +"``NULL``, *\\*pend* will point to the first character in *str* which follows " +"the representation of the number. If *base* is ``0``, *str* is interpreted " +"using the :ref:`integers` definition; in this case, leading zeros in a non-" +"zero decimal number raises a :exc:`ValueError`. If *base* is not ``0``, it " +"must be between ``2`` and ``36``, inclusive. Leading spaces and single " +"underscores after a base specifier and between digits are ignored. If there " +"are no digits, :exc:`ValueError` will be raised." +msgstr "" + +#: c-api/long.rst:96 +msgid "" +"Python methods :meth:`int.to_bytes` and :meth:`int.from_bytes` to convert a :" +"c:type:`PyLongObject` to/from an array of bytes in base ``256``. You can " +"call those from C using :c:func:`PyObject_CallMethod`." +msgstr "" + +#: c-api/long.rst:103 +msgid "" +"Convert a sequence of Unicode digits in the string *u* to a Python integer " +"value." +msgstr "" + +#: c-api/long.rst:111 +msgid "" +"Create a Python integer from the pointer *p*. The pointer value can be " +"retrieved from the resulting value using :c:func:`PyLong_AsVoidPtr`." +msgstr "" + +#: c-api/long.rst:140 +msgid "" +"Return a C :c:expr:`long` representation of *obj*. If *obj* is not an " +"instance of :c:type:`PyLongObject`, first call its :meth:`__index__` method " +"(if present) to convert it to a :c:type:`PyLongObject`." +msgstr "" + +#: c-api/long.rst:126 +msgid "" +"Raise :exc:`OverflowError` if the value of *obj* is out of range for a :c:" +"expr:`long`." +msgstr "" + +#: c-api/long.rst:149 c-api/long.rst:190 c-api/long.rst:213 +msgid "Returns ``-1`` on error. Use :c:func:`PyErr_Occurred` to disambiguate." +msgstr "" + +#: c-api/long.rst:151 c-api/long.rst:194 c-api/long.rst:298 +msgid "Use :meth:`__index__` if available." +msgstr "" + +#: c-api/long.rst:154 c-api/long.rst:197 c-api/long.rst:301 +msgid "This function will no longer use :meth:`__int__`." +msgstr "" + +#: c-api/long.rst:144 +msgid "" +"If the value of *obj* is greater than :const:`LONG_MAX` or less than :const:" +"`LONG_MIN`, set *\\*overflow* to ``1`` or ``-1``, respectively, and return " +"``-1``; otherwise, set *\\*overflow* to ``0``. If any other exception " +"occurs set *\\*overflow* to ``0`` and return ``-1`` as usual." +msgstr "" + +#: c-api/long.rst:181 +msgid "" +"Return a C :c:expr:`long long` representation of *obj*. If *obj* is not an " +"instance of :c:type:`PyLongObject`, first call its :meth:`__index__` method " +"(if present) to convert it to a :c:type:`PyLongObject`." +msgstr "" + +#: c-api/long.rst:167 +msgid "" +"Raise :exc:`OverflowError` if the value of *obj* is out of range for a :c:" +"expr:`long long`." +msgstr "" + +#: c-api/long.rst:185 +msgid "" +"If the value of *obj* is greater than :const:`LLONG_MAX` or less than :const:" +"`LLONG_MIN`, set *\\*overflow* to ``1`` or ``-1``, respectively, and return " +"``-1``; otherwise, set *\\*overflow* to ``0``. If any other exception " +"occurs set *\\*overflow* to ``0`` and return ``-1`` as usual." +msgstr "" + +#: c-api/long.rst:207 +msgid "" +"Return a C :c:type:`Py_ssize_t` representation of *pylong*. *pylong* must " +"be an instance of :c:type:`PyLongObject`." +msgstr "" + +#: c-api/long.rst:210 +msgid "" +"Raise :exc:`OverflowError` if the value of *pylong* is out of range for a :c:" +"type:`Py_ssize_t`." +msgstr "" + +#: c-api/long.rst:222 +msgid "" +"Return a C :c:expr:`unsigned long` representation of *pylong*. *pylong* " +"must be an instance of :c:type:`PyLongObject`." +msgstr "" + +#: c-api/long.rst:225 +msgid "" +"Raise :exc:`OverflowError` if the value of *pylong* is out of range for a :c:" +"expr:`unsigned long`." +msgstr "" + +#: c-api/long.rst:228 +msgid "" +"Returns ``(unsigned long)-1`` on error. Use :c:func:`PyErr_Occurred` to " +"disambiguate." +msgstr "" + +#: c-api/long.rst:238 +msgid "" +"Return a C :c:type:`size_t` representation of *pylong*. *pylong* must be an " +"instance of :c:type:`PyLongObject`." +msgstr "" + +#: c-api/long.rst:241 +msgid "" +"Raise :exc:`OverflowError` if the value of *pylong* is out of range for a :c:" +"type:`size_t`." +msgstr "" + +#: c-api/long.rst:244 +msgid "" +"Returns ``(size_t)-1`` on error. Use :c:func:`PyErr_Occurred` to " +"disambiguate." +msgstr "" + +#: c-api/long.rst:253 +msgid "" +"Return a C :c:expr:`unsigned long long` representation of *pylong*. " +"*pylong* must be an instance of :c:type:`PyLongObject`." +msgstr "" + +#: c-api/long.rst:256 +msgid "" +"Raise :exc:`OverflowError` if the value of *pylong* is out of range for an :" +"c:expr:`unsigned long long`." +msgstr "" + +#: c-api/long.rst:259 +msgid "" +"Returns ``(unsigned long long)-1`` on error. Use :c:func:`PyErr_Occurred` to " +"disambiguate." +msgstr "" + +#: c-api/long.rst:262 +msgid "" +"A negative *pylong* now raises :exc:`OverflowError`, not :exc:`TypeError`." +msgstr "" + +#: c-api/long.rst:268 +msgid "" +"Return a C :c:expr:`unsigned long` representation of *obj*. If *obj* is not " +"an instance of :c:type:`PyLongObject`, first call its :meth:`__index__` " +"method (if present) to convert it to a :c:type:`PyLongObject`." +msgstr "" + +#: c-api/long.rst:272 +msgid "" +"If the value of *obj* is out of range for an :c:expr:`unsigned long`, return " +"the reduction of that value modulo ``ULONG_MAX + 1``." +msgstr "" + +#: c-api/long.rst:275 +msgid "" +"Returns ``(unsigned long)-1`` on error. Use :c:func:`PyErr_Occurred` to " +"disambiguate." +msgstr "" + +#: c-api/long.rst:287 +msgid "" +"Return a C :c:expr:`unsigned long long` representation of *obj*. If *obj* " +"is not an instance of :c:type:`PyLongObject`, first call its :meth:" +"`__index__` method (if present) to convert it to a :c:type:`PyLongObject`." +msgstr "" + +#: c-api/long.rst:292 +msgid "" +"If the value of *obj* is out of range for an :c:expr:`unsigned long long`, " +"return the reduction of that value modulo ``ULLONG_MAX + 1``." +msgstr "" + +#: c-api/long.rst:295 +msgid "" +"Returns ``(unsigned long long)-1`` on error. Use :c:func:`PyErr_Occurred` " +"to disambiguate." +msgstr "" + +#: c-api/long.rst:307 +msgid "" +"Return a C :c:expr:`double` representation of *pylong*. *pylong* must be an " +"instance of :c:type:`PyLongObject`." +msgstr "" + +#: c-api/long.rst:310 +msgid "" +"Raise :exc:`OverflowError` if the value of *pylong* is out of range for a :c:" +"expr:`double`." +msgstr "" + +#: c-api/long.rst:313 +msgid "" +"Returns ``-1.0`` on error. Use :c:func:`PyErr_Occurred` to disambiguate." +msgstr "" + +#: c-api/long.rst:318 +msgid "" +"Convert a Python integer *pylong* to a C :c:expr:`void` pointer. If *pylong* " +"cannot be converted, an :exc:`OverflowError` will be raised. This is only " +"assured to produce a usable :c:expr:`void` pointer for values created with :" +"c:func:`PyLong_FromVoidPtr`." +msgstr "" + +#: c-api/long.rst:323 +msgid "" +"Returns ``NULL`` on error. Use :c:func:`PyErr_Occurred` to disambiguate." +msgstr "" diff --git a/c-api/mapping.po b/c-api/mapping.po new file mode 100644 index 0000000000..55bd3511a0 --- /dev/null +++ b/c-api/mapping.po @@ -0,0 +1,154 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-04-05 10:05+0200\n" +"PO-Revision-Date: 2021-01-28 14:58+0100\n" +"Last-Translator: Jules Lasne \n" +"Language-Team: FRENCH \n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 2.4.2\n" + +#: c-api/mapping.rst:6 +msgid "Mapping Protocol" +msgstr "Protocole de correspondance" + +#: c-api/mapping.rst:8 +msgid "" +"See also :c:func:`PyObject_GetItem`, :c:func:`PyObject_SetItem` and :c:func:" +"`PyObject_DelItem`." +msgstr "" +"Voir aussi :c:func:`PyObject_GetItem`, :c:func:`PyObject_SetItem` et :c:func:" +"`PyObject_DelItem`." + +# - " in general case it is impossible to determine what the type of keys it +# supports." +# → pas correct en VO ! +# - "This function always succeeds." équivaut-il à "jamais d'erreur" ? +#: c-api/mapping.rst:14 +#, fuzzy +msgid "" +"Return ``1`` if the object provides the mapping protocol or supports " +"slicing, and ``0`` otherwise. Note that it returns ``1`` for Python classes " +"with a :meth:`__getitem__` method, since in general it is impossible to " +"determine what type of keys the class supports. This function always " +"succeeds." +msgstr "" +"Renvoie ``1`` si l'objet prend en charge le protocole de correspondance ou " +"le découpage en tranches et ``0`` sinon. Notez qu'elle renvoie ``1`` pour " +"les classes Python avec une méthode :meth:`__getitem__` puisque, dans le cas " +"général, il est impossible de déterminer quel type de clef est pris en " +"charge. Cette fonction ne provoque jamais d'erreur." + +#: c-api/mapping.rst:25 +msgid "" +"Returns the number of keys in object *o* on success, and ``-1`` on failure. " +"This is equivalent to the Python expression ``len(o)``." +msgstr "" +"Renvoie le nombre de clefs dans l'objet *o* et ``-1`` en cas d'échec. C'est " +"l'équivalent de l'expression Python ``len(o)``." + +#: c-api/mapping.rst:31 +msgid "" +"Return element of *o* corresponding to the string *key* or ``NULL`` on " +"failure. This is the equivalent of the Python expression ``o[key]``. See " +"also :c:func:`PyObject_GetItem`." +msgstr "" +"Renvoie les éléments de *o* qui correspondent à la chaîne *key* ou *NULL* en " +"cas d'échec. C'est l'équivalent de l'expression Python ``o[key]``. Voir " +"aussi :c:func:`PyObject_GetItem`." + +#: c-api/mapping.rst:38 +msgid "" +"Map the string *key* to the value *v* in object *o*. Returns ``-1`` on " +"failure. This is the equivalent of the Python statement ``o[key] = v``. See " +"also :c:func:`PyObject_SetItem`. This function *does not* steal a reference " +"to *v*." +msgstr "" +"Fait correspondre la chaîne *key* à la valeur *v* dans l'objet *o*. Renvoie " +"``-1`` en cas d'échec. C'est l'équivalent de la commande Python ``o[key] = " +"v``. Voir aussi :c:func:`PyObject_SetItem`. Cette fonction *ne vole pas* de " +"référence à *v*." + +#: c-api/mapping.rst:46 +msgid "" +"Remove the mapping for the object *key* from the object *o*. Return ``-1`` " +"on failure. This is equivalent to the Python statement ``del o[key]``. This " +"is an alias of :c:func:`PyObject_DelItem`." +msgstr "" +"Supprime la correspondance associée à l'objet *key* dans l'objet *o*. " +"Renvoie ``-1`` en cas d'échec. C'est l'équivalent de la commande Python " +"``del o[key]``. C'est un alias pour :c:func:`PyObject_DelItem`." + +#: c-api/mapping.rst:53 +msgid "" +"Remove the mapping for the string *key* from the object *o*. Return ``-1`` " +"on failure. This is equivalent to the Python statement ``del o[key]``." +msgstr "" +"Supprime la correspondance associée à la chaîne *key* dans l'objet *o*. " +"Renvoie ``-1`` en cas d'échec. C'est l'équivalent de la commande Python " +"``del o[key]``." + +#: c-api/mapping.rst:70 +msgid "" +"Return ``1`` if the mapping object has the key *key* and ``0`` otherwise. " +"This is equivalent to the Python expression ``key in o``. This function " +"always succeeds." +msgstr "" +"Renvoie ``1`` si l'objet de correspondance possède une clef *key* et ``0`` " +"sinon. C'est l'équivalent de l'expression Python ``key in o``. Cette " +"fonction ne provoque jamais d'erreur." + +#: c-api/mapping.rst:63 +msgid "" +"Note that exceptions which occur while calling the :meth:`__getitem__` " +"method will get suppressed. To get error reporting use :c:func:" +"`PyObject_GetItem()` instead." +msgstr "" +"Notez que les exceptions qui surviennent pendant l'appel de la méthode :meth:" +"`__getitem__` seront supprimées. Pour obtenir le rapport d'erreur, utilisez " +"plutôt :c:func:`PyObject_GetItem()`." + +#: c-api/mapping.rst:74 +msgid "" +"Note that exceptions which occur while calling the :meth:`__getitem__` " +"method and creating a temporary string object will get suppressed. To get " +"error reporting use :c:func:`PyMapping_GetItemString()` instead." +msgstr "" +"Notez que les exceptions qui surviennent en créant une chaîne de caractères " +"temporaire pendant l'appel de la méthode :meth:`__getitem__` seront " +"supprimées. Pour obtenir le rapport d'erreur, utilisez plutôt :c:func:" +"`PyMapping_GetItemString()`." + +#: c-api/mapping.rst:81 +msgid "" +"On success, return a list of the keys in object *o*. On failure, return " +"``NULL``." +msgstr "" +"Renvoie la liste des clefs dans l'objet *o*. En cas d'échec, renvoie *NULL*." + +#: c-api/mapping.rst:93 c-api/mapping.rst:102 +msgid "Previously, the function returned a list or a tuple." +msgstr "Auparavant, la fonction renvoyait une liste ou un *n*-uplet." + +#: c-api/mapping.rst:90 +msgid "" +"On success, return a list of the values in object *o*. On failure, return " +"``NULL``." +msgstr "" +"Renvoie la liste des valeurs dans l'objet *o*. En cas d'échec, renvoie " +"*NULL*." + +#: c-api/mapping.rst:99 +msgid "" +"On success, return a list of the items in object *o*, where each item is a " +"tuple containing a key-value pair. On failure, return ``NULL``." +msgstr "" +"Renvoie la liste des éléments dans l'objet *o*, où chaque élément est un n-" +"uplet contenant une paire clef-valeur. En cas d'échec, renvoie *NULL*." diff --git a/c-api/marshal.po b/c-api/marshal.po new file mode 100644 index 0000000000..be0eee8b28 --- /dev/null +++ b/c-api/marshal.po @@ -0,0 +1,112 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-10-18 15:46+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: FRENCH \n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: c-api/marshal.rst:6 +msgid "Data marshalling support" +msgstr "" + +#: c-api/marshal.rst:8 +msgid "" +"These routines allow C code to work with serialized objects using the same " +"data format as the :mod:`marshal` module. There are functions to write data " +"into the serialization format, and additional functions that can be used to " +"read the data back. Files used to store marshalled data must be opened in " +"binary mode." +msgstr "" + +#: c-api/marshal.rst:14 +msgid "Numeric values are stored with the least significant byte first." +msgstr "" + +#: c-api/marshal.rst:16 +msgid "" +"The module supports two versions of the data format: version 0 is the " +"historical version, version 1 shares interned strings in the file, and upon " +"unmarshalling. Version 2 uses a binary format for floating point numbers. " +"``Py_MARSHAL_VERSION`` indicates the current file format (currently 2)." +msgstr "" + +#: c-api/marshal.rst:24 +msgid "" +"Marshal a :c:expr:`long` integer, *value*, to *file*. This will only write " +"the least-significant 32 bits of *value*; regardless of the size of the " +"native :c:expr:`long` type. *version* indicates the file format." +msgstr "" + +#: c-api/marshal.rst:31 +msgid "" +"Marshal a Python object, *value*, to *file*. *version* indicates the file " +"format." +msgstr "" + +#: c-api/marshal.rst:37 +msgid "" +"Return a bytes object containing the marshalled representation of *value*. " +"*version* indicates the file format." +msgstr "" + +#: c-api/marshal.rst:41 +msgid "The following functions allow marshalled values to be read back in." +msgstr "" + +#: c-api/marshal.rst:46 +msgid "" +"Return a C :c:expr:`long` from the data stream in a :c:expr:`FILE*` opened " +"for reading. Only a 32-bit value can be read in using this function, " +"regardless of the native size of :c:expr:`long`." +msgstr "" + +#: c-api/marshal.rst:60 +msgid "" +"On error, sets the appropriate exception (:exc:`EOFError`) and returns " +"``-1``." +msgstr "" + +#: c-api/marshal.rst:56 +msgid "" +"Return a C :c:expr:`short` from the data stream in a :c:expr:`FILE*` opened " +"for reading. Only a 16-bit value can be read in using this function, " +"regardless of the native size of :c:expr:`short`." +msgstr "" + +#: c-api/marshal.rst:66 +msgid "" +"Return a Python object from the data stream in a :c:expr:`FILE*` opened for " +"reading." +msgstr "" + +#: c-api/marshal.rst:83 c-api/marshal.rst:92 +msgid "" +"On error, sets the appropriate exception (:exc:`EOFError`, :exc:`ValueError` " +"or :exc:`TypeError`) and returns ``NULL``." +msgstr "" + +#: c-api/marshal.rst:75 +msgid "" +"Return a Python object from the data stream in a :c:expr:`FILE*` opened for " +"reading. Unlike :c:func:`PyMarshal_ReadObjectFromFile`, this function " +"assumes that no further objects will be read from the file, allowing it to " +"aggressively load file data into memory so that the de-serialization can " +"operate from data in memory rather than reading a byte at a time from the " +"file. Only use these variant if you are certain that you won't be reading " +"anything else from the file." +msgstr "" + +#: c-api/marshal.rst:89 +msgid "" +"Return a Python object from the data stream in a byte buffer containing " +"*len* bytes pointed to by *data*." +msgstr "" diff --git a/c-api/memory.po b/c-api/memory.po new file mode 100644 index 0000000000..773069639c --- /dev/null +++ b/c-api/memory.po @@ -0,0 +1,1057 @@ +# Copyright (C) 2001-2018, Python Software Foundation +# For licence information, see README file. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-22 22:57+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: FRENCH \n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: c-api/memory.rst:8 +msgid "Memory Management" +msgstr "" + +#: c-api/memory.rst:17 +msgid "Overview" +msgstr "Aperçu" + +#: c-api/memory.rst:19 +msgid "" +"Memory management in Python involves a private heap containing all Python " +"objects and data structures. The management of this private heap is ensured " +"internally by the *Python memory manager*. The Python memory manager has " +"different components which deal with various dynamic storage management " +"aspects, like sharing, segmentation, preallocation or caching." +msgstr "" + +#: c-api/memory.rst:25 +msgid "" +"At the lowest level, a raw memory allocator ensures that there is enough " +"room in the private heap for storing all Python-related data by interacting " +"with the memory manager of the operating system. On top of the raw memory " +"allocator, several object-specific allocators operate on the same heap and " +"implement distinct memory management policies adapted to the peculiarities " +"of every object type. For example, integer objects are managed differently " +"within the heap than strings, tuples or dictionaries because integers imply " +"different storage requirements and speed/space tradeoffs. The Python memory " +"manager thus delegates some of the work to the object-specific allocators, " +"but ensures that the latter operate within the bounds of the private heap." +msgstr "" + +#: c-api/memory.rst:36 +msgid "" +"It is important to understand that the management of the Python heap is " +"performed by the interpreter itself and that the user has no control over " +"it, even if they regularly manipulate object pointers to memory blocks " +"inside that heap. The allocation of heap space for Python objects and other " +"internal buffers is performed on demand by the Python memory manager through " +"the Python/C API functions listed in this document." +msgstr "" + +#: c-api/memory.rst:49 +msgid "" +"To avoid memory corruption, extension writers should never try to operate on " +"Python objects with the functions exported by the C library: :c:func:" +"`malloc`, :c:func:`calloc`, :c:func:`realloc` and :c:func:`free`. This will " +"result in mixed calls between the C allocator and the Python memory manager " +"with fatal consequences, because they implement different algorithms and " +"operate on different heaps. However, one may safely allocate and release " +"memory blocks with the C library allocator for individual purposes, as shown " +"in the following example::" +msgstr "" + +#: c-api/memory.rst:68 +msgid "" +"In this example, the memory request for the I/O buffer is handled by the C " +"library allocator. The Python memory manager is involved only in the " +"allocation of the bytes object returned as a result." +msgstr "" + +#: c-api/memory.rst:72 +msgid "" +"In most situations, however, it is recommended to allocate memory from the " +"Python heap specifically because the latter is under control of the Python " +"memory manager. For example, this is required when the interpreter is " +"extended with new object types written in C. Another reason for using the " +"Python heap is the desire to *inform* the Python memory manager about the " +"memory needs of the extension module. Even when the requested memory is used " +"exclusively for internal, highly specific purposes, delegating all memory " +"requests to the Python memory manager causes the interpreter to have a more " +"accurate image of its memory footprint as a whole. Consequently, under " +"certain circumstances, the Python memory manager may or may not trigger " +"appropriate actions, like garbage collection, memory compaction or other " +"preventive procedures. Note that by using the C library allocator as shown " +"in the previous example, the allocated memory for the I/O buffer escapes " +"completely the Python memory manager." +msgstr "" + +#: c-api/memory.rst:88 +msgid "" +"The :envvar:`PYTHONMALLOC` environment variable can be used to configure the " +"memory allocators used by Python." +msgstr "" + +#: c-api/memory.rst:91 +msgid "" +"The :envvar:`PYTHONMALLOCSTATS` environment variable can be used to print " +"statistics of the :ref:`pymalloc memory allocator ` every time a " +"new pymalloc object arena is created, and on shutdown." +msgstr "" + +#: c-api/memory.rst:96 +msgid "Allocator Domains" +msgstr "" + +#: c-api/memory.rst:100 +msgid "" +"All allocating functions belong to one of three different \"domains\" (see " +"also :c:type:`PyMemAllocatorDomain`). These domains represent different " +"allocation strategies and are optimized for different purposes. The specific " +"details on how every domain allocates memory or what internal functions each " +"domain calls is considered an implementation detail, but for debugging " +"purposes a simplified table can be found at :ref:`here `. There is no hard requirement to use the memory returned by the " +"allocation functions belonging to a given domain for only the purposes " +"hinted by that domain (although this is the recommended practice). For " +"example, one could use the memory returned by :c:func:`PyMem_RawMalloc` for " +"allocating Python objects or the memory returned by :c:func:" +"`PyObject_Malloc` for allocating memory for buffers." +msgstr "" + +#: c-api/memory.rst:112 +msgid "The three allocation domains are:" +msgstr "" + +#: c-api/memory.rst:114 +msgid "" +"Raw domain: intended for allocating memory for general-purpose memory " +"buffers where the allocation *must* go to the system allocator or where the " +"allocator can operate without the :term:`GIL`. The memory is requested " +"directly to the system." +msgstr "" + +#: c-api/memory.rst:119 +msgid "" +"\"Mem\" domain: intended for allocating memory for Python buffers and " +"general-purpose memory buffers where the allocation must be performed with " +"the :term:`GIL` held. The memory is taken from the Python private heap." +msgstr "" + +#: c-api/memory.rst:123 +msgid "" +"Object domain: intended for allocating memory belonging to Python objects. " +"The memory is taken from the Python private heap." +msgstr "" + +#: c-api/memory.rst:126 +msgid "" +"When freeing memory previously allocated by the allocating functions " +"belonging to a given domain,the matching specific deallocating functions " +"must be used. For example, :c:func:`PyMem_Free` must be used to free memory " +"allocated using :c:func:`PyMem_Malloc`." +msgstr "" + +#: c-api/memory.rst:131 +msgid "Raw Memory Interface" +msgstr "" + +#: c-api/memory.rst:133 +msgid "" +"The following function sets are wrappers to the system allocator. These " +"functions are thread-safe, the :term:`GIL ` does " +"not need to be held." +msgstr "" + +#: c-api/memory.rst:137 +msgid "" +"The :ref:`default raw memory allocator ` uses the " +"following functions: :c:func:`malloc`, :c:func:`calloc`, :c:func:`realloc` " +"and :c:func:`free`; call ``malloc(1)`` (or ``calloc(1, 1)``) when requesting " +"zero bytes." +msgstr "" + +#: c-api/memory.rst:217 c-api/memory.rst:325 +msgid "" +"Allocates *n* bytes and returns a pointer of type :c:expr:`void*` to the " +"allocated memory, or ``NULL`` if the request fails." +msgstr "" + +#: c-api/memory.rst:149 +msgid "" +"Requesting zero bytes returns a distinct non-``NULL`` pointer if possible, " +"as if ``PyMem_RawMalloc(1)`` had been called instead. The memory will not " +"have been initialized in any way." +msgstr "" + +#: c-api/memory.rst:227 c-api/memory.rst:335 +msgid "" +"Allocates *nelem* elements each whose size in bytes is *elsize* and returns " +"a pointer of type :c:expr:`void*` to the allocated memory, or ``NULL`` if " +"the request fails. The memory is initialized to zeros." +msgstr "" + +#: c-api/memory.rst:160 +msgid "" +"Requesting zero elements or elements of size zero bytes returns a distinct " +"non-``NULL`` pointer if possible, as if ``PyMem_RawCalloc(1, 1)`` had been " +"called instead." +msgstr "" + +#: c-api/memory.rst:240 c-api/memory.rst:348 +msgid "" +"Resizes the memory block pointed to by *p* to *n* bytes. The contents will " +"be unchanged to the minimum of the old and the new sizes." +msgstr "" + +#: c-api/memory.rst:172 +msgid "" +"If *p* is ``NULL``, the call is equivalent to ``PyMem_RawMalloc(n)``; else " +"if *n* is equal to zero, the memory block is resized but is not freed, and " +"the returned pointer is non-``NULL``." +msgstr "" + +#: c-api/memory.rst:176 +msgid "" +"Unless *p* is ``NULL``, it must have been returned by a previous call to :c:" +"func:`PyMem_RawMalloc`, :c:func:`PyMem_RawRealloc` or :c:func:" +"`PyMem_RawCalloc`." +msgstr "" + +#: c-api/memory.rst:180 +msgid "" +"If the request fails, :c:func:`PyMem_RawRealloc` returns ``NULL`` and *p* " +"remains a valid pointer to the previous memory area." +msgstr "" + +#: c-api/memory.rst:186 +msgid "" +"Frees the memory block pointed to by *p*, which must have been returned by a " +"previous call to :c:func:`PyMem_RawMalloc`, :c:func:`PyMem_RawRealloc` or :c:" +"func:`PyMem_RawCalloc`. Otherwise, or if ``PyMem_RawFree(p)`` has been " +"called before, undefined behavior occurs." +msgstr "" + +#: c-api/memory.rst:261 c-api/memory.rst:369 +msgid "If *p* is ``NULL``, no operation is performed." +msgstr "" + +#: c-api/memory.rst:197 +msgid "Memory Interface" +msgstr "" + +#: c-api/memory.rst:305 +msgid "" +"The following function sets, modeled after the ANSI C standard, but " +"specifying behavior when requesting zero bytes, are available for allocating " +"and releasing memory from the Python heap." +msgstr "" + +#: c-api/memory.rst:203 +msgid "" +"The :ref:`default memory allocator ` uses the :" +"ref:`pymalloc memory allocator `." +msgstr "" + +#: c-api/memory.rst:320 +msgid "" +"The :term:`GIL ` must be held when using these " +"functions." +msgstr "" + +#: c-api/memory.rst:213 +msgid "" +"The default allocator is now pymalloc instead of system :c:func:`malloc`." +msgstr "" + +#: c-api/memory.rst:220 +msgid "" +"Requesting zero bytes returns a distinct non-``NULL`` pointer if possible, " +"as if ``PyMem_Malloc(1)`` had been called instead. The memory will not have " +"been initialized in any way." +msgstr "" + +#: c-api/memory.rst:231 +msgid "" +"Requesting zero elements or elements of size zero bytes returns a distinct " +"non-``NULL`` pointer if possible, as if ``PyMem_Calloc(1, 1)`` had been " +"called instead." +msgstr "" + +#: c-api/memory.rst:243 +msgid "" +"If *p* is ``NULL``, the call is equivalent to ``PyMem_Malloc(n)``; else if " +"*n* is equal to zero, the memory block is resized but is not freed, and the " +"returned pointer is non-``NULL``." +msgstr "" + +#: c-api/memory.rst:247 +msgid "" +"Unless *p* is ``NULL``, it must have been returned by a previous call to :c:" +"func:`PyMem_Malloc`, :c:func:`PyMem_Realloc` or :c:func:`PyMem_Calloc`." +msgstr "" + +#: c-api/memory.rst:250 +msgid "" +"If the request fails, :c:func:`PyMem_Realloc` returns ``NULL`` and *p* " +"remains a valid pointer to the previous memory area." +msgstr "" + +#: c-api/memory.rst:256 +msgid "" +"Frees the memory block pointed to by *p*, which must have been returned by a " +"previous call to :c:func:`PyMem_Malloc`, :c:func:`PyMem_Realloc` or :c:func:" +"`PyMem_Calloc`. Otherwise, or if ``PyMem_Free(p)`` has been called before, " +"undefined behavior occurs." +msgstr "" + +#: c-api/memory.rst:263 +msgid "" +"The following type-oriented macros are provided for convenience. Note that " +"*TYPE* refers to any C type." +msgstr "" + +#: c-api/memory.rst:269 +msgid "" +"Same as :c:func:`PyMem_Malloc`, but allocates ``(n * sizeof(TYPE))`` bytes " +"of memory. Returns a pointer cast to :c:expr:`TYPE*`. The memory will not " +"have been initialized in any way." +msgstr "" + +#: c-api/memory.rst:276 +msgid "" +"Same as :c:func:`PyMem_Realloc`, but the memory block is resized to ``(n * " +"sizeof(TYPE))`` bytes. Returns a pointer cast to :c:expr:`TYPE*`. On " +"return, *p* will be a pointer to the new memory area, or ``NULL`` in the " +"event of failure." +msgstr "" + +#: c-api/memory.rst:281 +msgid "" +"This is a C preprocessor macro; *p* is always reassigned. Save the original " +"value of *p* to avoid losing memory when handling errors." +msgstr "" + +#: c-api/memory.rst:287 +msgid "Same as :c:func:`PyMem_Free`." +msgstr "" + +#: c-api/memory.rst:289 +msgid "" +"In addition, the following macro sets are provided for calling the Python " +"memory allocator directly, without involving the C API functions listed " +"above. However, note that their use does not preserve binary compatibility " +"across Python versions and is therefore deprecated in extension modules." +msgstr "" + +#: c-api/memory.rst:294 +msgid "``PyMem_MALLOC(size)``" +msgstr "" + +#: c-api/memory.rst:295 +msgid "``PyMem_NEW(type, size)``" +msgstr "" + +#: c-api/memory.rst:296 +msgid "``PyMem_REALLOC(ptr, size)``" +msgstr "" + +#: c-api/memory.rst:297 +msgid "``PyMem_RESIZE(ptr, type, size)``" +msgstr "" + +#: c-api/memory.rst:298 +msgid "``PyMem_FREE(ptr)``" +msgstr "" + +#: c-api/memory.rst:299 +msgid "``PyMem_DEL(ptr)``" +msgstr "" + +#: c-api/memory.rst:303 +msgid "Object allocators" +msgstr "" + +#: c-api/memory.rst:310 +msgid "" +"There is no guarantee that the memory returned by these allocators can be " +"successfully cast to a Python object when intercepting the allocating " +"functions in this domain by the methods described in the :ref:`Customize " +"Memory Allocators ` section." +msgstr "" + +#: c-api/memory.rst:315 +msgid "" +"The :ref:`default object allocator ` uses the :" +"ref:`pymalloc memory allocator `." +msgstr "" + +#: c-api/memory.rst:328 +msgid "" +"Requesting zero bytes returns a distinct non-``NULL`` pointer if possible, " +"as if ``PyObject_Malloc(1)`` had been called instead. The memory will not " +"have been initialized in any way." +msgstr "" + +#: c-api/memory.rst:339 +msgid "" +"Requesting zero elements or elements of size zero bytes returns a distinct " +"non-``NULL`` pointer if possible, as if ``PyObject_Calloc(1, 1)`` had been " +"called instead." +msgstr "" + +#: c-api/memory.rst:351 +msgid "" +"If *p* is ``NULL``, the call is equivalent to ``PyObject_Malloc(n)``; else " +"if *n* is equal to zero, the memory block is resized but is not freed, and " +"the returned pointer is non-``NULL``." +msgstr "" + +#: c-api/memory.rst:355 +msgid "" +"Unless *p* is ``NULL``, it must have been returned by a previous call to :c:" +"func:`PyObject_Malloc`, :c:func:`PyObject_Realloc` or :c:func:" +"`PyObject_Calloc`." +msgstr "" + +#: c-api/memory.rst:358 +msgid "" +"If the request fails, :c:func:`PyObject_Realloc` returns ``NULL`` and *p* " +"remains a valid pointer to the previous memory area." +msgstr "" + +#: c-api/memory.rst:364 +msgid "" +"Frees the memory block pointed to by *p*, which must have been returned by a " +"previous call to :c:func:`PyObject_Malloc`, :c:func:`PyObject_Realloc` or :c:" +"func:`PyObject_Calloc`. Otherwise, or if ``PyObject_Free(p)`` has been " +"called before, undefined behavior occurs." +msgstr "" + +#: c-api/memory.rst:375 +msgid "Default Memory Allocators" +msgstr "" + +#: c-api/memory.rst:377 +msgid "Default memory allocators:" +msgstr "" + +#: c-api/memory.rst:380 +msgid "Configuration" +msgstr "Configuration" + +#: c-api/memory.rst:380 +msgid "Name" +msgstr "Nom" + +#: c-api/memory.rst:380 +msgid "PyMem_RawMalloc" +msgstr "" + +#: c-api/memory.rst:380 +msgid "PyMem_Malloc" +msgstr "" + +#: c-api/memory.rst:380 +msgid "PyObject_Malloc" +msgstr "" + +#: c-api/memory.rst:382 +msgid "Release build" +msgstr "" + +#: c-api/memory.rst:382 +msgid "``\"pymalloc\"``" +msgstr "" + +#: c-api/memory.rst:384 +msgid "``malloc``" +msgstr "" + +#: c-api/memory.rst:382 +msgid "``pymalloc``" +msgstr "" + +#: c-api/memory.rst:383 +msgid "Debug build" +msgstr "" + +#: c-api/memory.rst:383 +msgid "``\"pymalloc_debug\"``" +msgstr "" + +#: c-api/memory.rst:385 +msgid "``malloc`` + debug" +msgstr "" + +#: c-api/memory.rst:383 +msgid "``pymalloc`` + debug" +msgstr "" + +#: c-api/memory.rst:384 +msgid "Release build, without pymalloc" +msgstr "" + +#: c-api/memory.rst:384 +msgid "``\"malloc\"``" +msgstr "" + +#: c-api/memory.rst:385 +msgid "Debug build, without pymalloc" +msgstr "" + +#: c-api/memory.rst:385 +msgid "``\"malloc_debug\"``" +msgstr "" + +#: c-api/memory.rst:388 +msgid "Legend:" +msgstr "" + +#: c-api/memory.rst:390 +msgid "Name: value for :envvar:`PYTHONMALLOC` environment variable." +msgstr "" + +#: c-api/memory.rst:391 +msgid "" +"``malloc``: system allocators from the standard C library, C functions: :c:" +"func:`malloc`, :c:func:`calloc`, :c:func:`realloc` and :c:func:`free`." +msgstr "" + +#: c-api/memory.rst:393 +msgid "``pymalloc``: :ref:`pymalloc memory allocator `." +msgstr "" + +#: c-api/memory.rst:394 +msgid "" +"\"+ debug\": with :ref:`debug hooks on the Python memory allocators `." +msgstr "" + +#: c-api/memory.rst:396 +msgid "\"Debug build\": :ref:`Python build in debug mode `." +msgstr "" + +#: c-api/memory.rst:401 +msgid "Customize Memory Allocators" +msgstr "" + +#: c-api/memory.rst:407 +msgid "" +"Structure used to describe a memory block allocator. The structure has the " +"following fields:" +msgstr "" + +#: c-api/memory.rst:647 +msgid "Field" +msgstr "Champ" + +#: c-api/memory.rst:647 +msgid "Meaning" +msgstr "Signification" + +#: c-api/memory.rst:649 +msgid "``void *ctx``" +msgstr "``void *ctx``" + +#: c-api/memory.rst:649 +msgid "user context passed as first argument" +msgstr "" + +#: c-api/memory.rst:415 +msgid "``void* malloc(void *ctx, size_t size)``" +msgstr "``void* malloc(void *ctx, size_t size)``" + +#: c-api/memory.rst:415 +msgid "allocate a memory block" +msgstr "" + +#: c-api/memory.rst:417 +msgid "``void* calloc(void *ctx, size_t nelem, size_t elsize)``" +msgstr "" + +#: c-api/memory.rst:417 +msgid "allocate a memory block initialized with zeros" +msgstr "" + +#: c-api/memory.rst:420 +msgid "``void* realloc(void *ctx, void *ptr, size_t new_size)``" +msgstr "" + +#: c-api/memory.rst:420 +msgid "allocate or resize a memory block" +msgstr "" + +#: c-api/memory.rst:422 +msgid "``void free(void *ctx, void *ptr)``" +msgstr "``void free(void *ctx, void *ptr)``" + +#: c-api/memory.rst:422 +msgid "free a memory block" +msgstr "" + +#: c-api/memory.rst:425 +msgid "" +"The :c:type:`PyMemAllocator` structure was renamed to :c:type:" +"`PyMemAllocatorEx` and a new ``calloc`` field was added." +msgstr "" + +#: c-api/memory.rst:432 +msgid "Enum used to identify an allocator domain. Domains:" +msgstr "" + +#: c-api/memory.rst:445 c-api/memory.rst:454 +#, fuzzy +msgid "Functions:" +msgstr "Fonctions" + +#: c-api/memory.rst:438 +#, fuzzy +msgid ":c:func:`PyMem_RawMalloc`" +msgstr ":c:func:`PyMem_RawCalloc`," + +#: c-api/memory.rst:439 +#, fuzzy +msgid ":c:func:`PyMem_RawRealloc`" +msgstr ":c:func:`PyMem_RawCalloc`," + +#: c-api/memory.rst:440 +#, fuzzy +msgid ":c:func:`PyMem_RawCalloc`" +msgstr ":c:func:`PyMem_RawCalloc`," + +#: c-api/memory.rst:441 +msgid ":c:func:`PyMem_RawFree`" +msgstr "" + +#: c-api/memory.rst:447 +#, fuzzy +msgid ":c:func:`PyMem_Malloc`," +msgstr ":c:func:`PyMem_Calloc`," + +#: c-api/memory.rst:448 +#, fuzzy +msgid ":c:func:`PyMem_Realloc`" +msgstr ":c:func:`PyMem_Calloc`," + +#: c-api/memory.rst:449 +#, fuzzy +msgid ":c:func:`PyMem_Calloc`" +msgstr ":c:func:`PyMem_Calloc`," + +#: c-api/memory.rst:450 +msgid ":c:func:`PyMem_Free`" +msgstr "" + +#: c-api/memory.rst:456 +msgid ":c:func:`PyObject_Malloc`" +msgstr "" + +#: c-api/memory.rst:457 +msgid ":c:func:`PyObject_Realloc`" +msgstr "" + +#: c-api/memory.rst:458 +msgid ":c:func:`PyObject_Calloc`" +msgstr "" + +#: c-api/memory.rst:459 +msgid ":c:func:`PyObject_Free`" +msgstr "" + +#: c-api/memory.rst:463 +msgid "Get the memory block allocator of the specified domain." +msgstr "" + +#: c-api/memory.rst:468 +msgid "Set the memory block allocator of the specified domain." +msgstr "" + +#: c-api/memory.rst:470 +msgid "" +"The new allocator must return a distinct non-``NULL`` pointer when " +"requesting zero bytes." +msgstr "" + +#: c-api/memory.rst:473 +msgid "" +"For the :c:data:`PYMEM_DOMAIN_RAW` domain, the allocator must be thread-" +"safe: the :term:`GIL ` is not held when the " +"allocator is called." +msgstr "" + +#: c-api/memory.rst:477 +msgid "" +"If the new allocator is not a hook (does not call the previous allocator), " +"the :c:func:`PyMem_SetupDebugHooks` function must be called to reinstall the " +"debug hooks on top on the new allocator." +msgstr "" + +#: c-api/memory.rst:484 +msgid ":c:func:`PyMem_SetAllocator` does have the following contract:" +msgstr "" + +#: c-api/memory.rst:486 +msgid "" +"It can be called after :c:func:`Py_PreInitialize` and before :c:func:" +"`Py_InitializeFromConfig` to install a custom memory allocator. There are no " +"restrictions over the installed allocator other than the ones imposed by the " +"domain (for instance, the Raw Domain allows the allocator to be called " +"without the GIL held). See :ref:`the section on allocator domains ` for more information." +msgstr "" + +#: c-api/memory.rst:494 +msgid "" +"If called after Python has finish initializing (after :c:func:" +"`Py_InitializeFromConfig` has been called) the allocator **must** wrap the " +"existing allocator. Substituting the current allocator for some other " +"arbitrary one is **not supported**." +msgstr "" + +#: c-api/memory.rst:503 +msgid "" +"Setup :ref:`debug hooks in the Python memory allocators ` " +"to detect memory errors." +msgstr "" + +#: c-api/memory.rst:510 +msgid "Debug hooks on the Python memory allocators" +msgstr "" + +#: c-api/memory.rst:512 +msgid "" +"When :ref:`Python is built in debug mode `, the :c:func:" +"`PyMem_SetupDebugHooks` function is called at the :ref:`Python " +"preinitialization